@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.
Files changed (285) hide show
  1. package/dist/cjs/Aside/index.cjs +6 -4
  2. package/dist/cjs/Aside/index.native.js +6 -4
  3. package/dist/cjs/Aside/index.native.js.map +1 -1
  4. package/dist/cjs/Hr/index.cjs +2 -3
  5. package/dist/cjs/Hr/index.native.js +2 -3
  6. package/dist/cjs/Hr/index.native.js.map +1 -1
  7. package/dist/cjs/MarkdownSimpleTable/index.cjs +15 -15
  8. package/dist/cjs/MarkdownSimpleTable/index.native.js +17 -18
  9. package/dist/cjs/MarkdownSimpleTable/index.native.js.map +1 -1
  10. package/dist/cjs/MdxCodeBlock/index.cjs +9 -5
  11. package/dist/cjs/MdxCodeBlock/index.native.js +9 -5
  12. package/dist/cjs/MdxCodeBlock/index.native.js.map +1 -1
  13. package/dist/cjs/Table/index.cjs +20 -8
  14. package/dist/cjs/Table/index.native.js +20 -8
  15. package/dist/cjs/Table/index.native.js.map +1 -1
  16. package/dist/cjs/Video/index.cjs +11 -7
  17. package/dist/cjs/Video/index.native.js +12 -7
  18. package/dist/cjs/Video/index.native.js.map +1 -1
  19. package/dist/cjs/components/Blockquote.cjs +5 -4
  20. package/dist/cjs/components/Blockquote.native.js +7 -6
  21. package/dist/cjs/components/Blockquote.native.js.map +1 -1
  22. package/dist/cjs/components/CodeBlock.cjs +2 -2
  23. package/dist/cjs/components/CodeBlock.native.js +3 -3
  24. package/dist/cjs/components/CodeBlock.native.js.map +1 -1
  25. package/dist/cjs/components/Heading.cjs +1 -0
  26. package/dist/cjs/components/Heading.native.js +1 -0
  27. package/dist/cjs/components/Heading.native.js.map +1 -1
  28. package/dist/cjs/components/HorizontalRule.cjs +12 -1
  29. package/dist/cjs/components/HorizontalRule.native.js +12 -1
  30. package/dist/cjs/components/HorizontalRule.native.js.map +1 -1
  31. package/dist/cjs/components/Image.cjs +2 -2
  32. package/dist/cjs/components/Image.native.js +3 -2
  33. package/dist/cjs/components/Image.native.js.map +1 -1
  34. package/dist/cjs/components/InlineCode.cjs +2 -1
  35. package/dist/cjs/components/InlineCode.native.js +2 -1
  36. package/dist/cjs/components/InlineCode.native.js.map +1 -1
  37. package/dist/cjs/components/InlineStyles.cjs +14 -1
  38. package/dist/cjs/components/InlineStyles.native.js +14 -1
  39. package/dist/cjs/components/InlineStyles.native.js.map +1 -1
  40. package/dist/cjs/components/Link.cjs +5 -0
  41. package/dist/cjs/components/Link.native.js +5 -0
  42. package/dist/cjs/components/Link.native.js.map +1 -1
  43. package/dist/cjs/components/List.cjs +8 -1
  44. package/dist/cjs/components/List.native.js +11 -3
  45. package/dist/cjs/components/List.native.js.map +1 -1
  46. package/dist/cjs/components/Table.cjs +15 -9
  47. package/dist/cjs/components/Table.native.js +17 -12
  48. package/dist/cjs/components/Table.native.js.map +1 -1
  49. package/dist/cjs/mdxComponents.cjs +175 -108
  50. package/dist/cjs/mdxComponents.native.js +184 -113
  51. package/dist/cjs/mdxComponents.native.js.map +1 -1
  52. package/dist/cjs/mermaid/MermaidBlock.cjs +1 -1
  53. package/dist/cjs/mermaid/renderMermaidDiagram.native.js +11 -81
  54. package/dist/cjs/mermaid/renderMermaidDiagram.native.js.map +1 -1
  55. package/dist/cjs/shared/index.cjs +13 -1
  56. package/dist/cjs/shared/index.native.js +12 -0
  57. package/dist/cjs/shared/index.native.js.map +1 -1
  58. package/dist/cjs/shared/tokenPx.cjs +41 -0
  59. package/dist/cjs/shared/tokenPx.native.js +46 -0
  60. package/dist/cjs/shared/tokenPx.native.js.map +1 -0
  61. package/dist/cjs/shared/useMarkdownTableKnobs.cjs +61 -0
  62. package/dist/cjs/shared/useMarkdownTableKnobs.native.js +64 -0
  63. package/dist/cjs/shared/useMarkdownTableKnobs.native.js.map +1 -0
  64. package/dist/esm/Aside/index.mjs +6 -4
  65. package/dist/esm/Aside/index.mjs.map +1 -1
  66. package/dist/esm/Aside/index.native.js +6 -4
  67. package/dist/esm/Aside/index.native.js.map +1 -1
  68. package/dist/esm/Hr/index.mjs +2 -3
  69. package/dist/esm/Hr/index.mjs.map +1 -1
  70. package/dist/esm/Hr/index.native.js +2 -3
  71. package/dist/esm/Hr/index.native.js.map +1 -1
  72. package/dist/esm/MarkdownSimpleTable/index.mjs +15 -15
  73. package/dist/esm/MarkdownSimpleTable/index.mjs.map +1 -1
  74. package/dist/esm/MarkdownSimpleTable/index.native.js +17 -18
  75. package/dist/esm/MarkdownSimpleTable/index.native.js.map +1 -1
  76. package/dist/esm/MdxCodeBlock/index.mjs +9 -5
  77. package/dist/esm/MdxCodeBlock/index.mjs.map +1 -1
  78. package/dist/esm/MdxCodeBlock/index.native.js +9 -5
  79. package/dist/esm/MdxCodeBlock/index.native.js.map +1 -1
  80. package/dist/esm/Table/index.mjs +20 -8
  81. package/dist/esm/Table/index.mjs.map +1 -1
  82. package/dist/esm/Table/index.native.js +20 -8
  83. package/dist/esm/Table/index.native.js.map +1 -1
  84. package/dist/esm/Video/index.mjs +11 -7
  85. package/dist/esm/Video/index.mjs.map +1 -1
  86. package/dist/esm/Video/index.native.js +12 -7
  87. package/dist/esm/Video/index.native.js.map +1 -1
  88. package/dist/esm/components/Blockquote.mjs +5 -4
  89. package/dist/esm/components/Blockquote.mjs.map +1 -1
  90. package/dist/esm/components/Blockquote.native.js +7 -6
  91. package/dist/esm/components/Blockquote.native.js.map +1 -1
  92. package/dist/esm/components/CodeBlock.mjs +2 -2
  93. package/dist/esm/components/CodeBlock.mjs.map +1 -1
  94. package/dist/esm/components/CodeBlock.native.js +3 -3
  95. package/dist/esm/components/CodeBlock.native.js.map +1 -1
  96. package/dist/esm/components/Heading.mjs +1 -0
  97. package/dist/esm/components/Heading.mjs.map +1 -1
  98. package/dist/esm/components/Heading.native.js +1 -0
  99. package/dist/esm/components/Heading.native.js.map +1 -1
  100. package/dist/esm/components/HorizontalRule.mjs +13 -2
  101. package/dist/esm/components/HorizontalRule.mjs.map +1 -1
  102. package/dist/esm/components/HorizontalRule.native.js +13 -2
  103. package/dist/esm/components/HorizontalRule.native.js.map +1 -1
  104. package/dist/esm/components/Image.mjs +2 -2
  105. package/dist/esm/components/Image.mjs.map +1 -1
  106. package/dist/esm/components/Image.native.js +3 -2
  107. package/dist/esm/components/Image.native.js.map +1 -1
  108. package/dist/esm/components/InlineCode.mjs +2 -1
  109. package/dist/esm/components/InlineCode.mjs.map +1 -1
  110. package/dist/esm/components/InlineCode.native.js +2 -1
  111. package/dist/esm/components/InlineCode.native.js.map +1 -1
  112. package/dist/esm/components/InlineStyles.mjs +14 -1
  113. package/dist/esm/components/InlineStyles.mjs.map +1 -1
  114. package/dist/esm/components/InlineStyles.native.js +14 -1
  115. package/dist/esm/components/InlineStyles.native.js.map +1 -1
  116. package/dist/esm/components/Link.mjs +5 -0
  117. package/dist/esm/components/Link.mjs.map +1 -1
  118. package/dist/esm/components/Link.native.js +5 -0
  119. package/dist/esm/components/Link.native.js.map +1 -1
  120. package/dist/esm/components/List.mjs +8 -1
  121. package/dist/esm/components/List.mjs.map +1 -1
  122. package/dist/esm/components/List.native.js +11 -3
  123. package/dist/esm/components/List.native.js.map +1 -1
  124. package/dist/esm/components/Table.mjs +15 -9
  125. package/dist/esm/components/Table.mjs.map +1 -1
  126. package/dist/esm/components/Table.native.js +17 -12
  127. package/dist/esm/components/Table.native.js.map +1 -1
  128. package/dist/esm/mdxComponents.mjs +175 -108
  129. package/dist/esm/mdxComponents.mjs.map +1 -1
  130. package/dist/esm/mdxComponents.native.js +184 -113
  131. package/dist/esm/mdxComponents.native.js.map +1 -1
  132. package/dist/esm/mermaid/MermaidBlock.mjs +1 -1
  133. package/dist/esm/mermaid/MermaidBlock.mjs.map +1 -1
  134. package/dist/esm/mermaid/renderMermaidDiagram.native.js +9 -68
  135. package/dist/esm/mermaid/renderMermaidDiagram.native.js.map +1 -1
  136. package/dist/esm/shared/index.mjs +3 -0
  137. package/dist/esm/shared/index.mjs.map +1 -1
  138. package/dist/esm/shared/index.native.js +3 -0
  139. package/dist/esm/shared/index.native.js.map +1 -1
  140. package/dist/esm/shared/tokenPx.mjs +16 -0
  141. package/dist/esm/shared/tokenPx.mjs.map +1 -0
  142. package/dist/esm/shared/tokenPx.native.js +18 -0
  143. package/dist/esm/shared/tokenPx.native.js.map +1 -0
  144. package/dist/esm/shared/useMarkdownTableKnobs.mjs +36 -0
  145. package/dist/esm/shared/useMarkdownTableKnobs.mjs.map +1 -0
  146. package/dist/esm/shared/useMarkdownTableKnobs.native.js +36 -0
  147. package/dist/esm/shared/useMarkdownTableKnobs.native.js.map +1 -0
  148. package/dist/jsx/Aside/index.mjs +6 -4
  149. package/dist/jsx/Aside/index.mjs.map +1 -1
  150. package/dist/jsx/Aside/index.native.js +6 -4
  151. package/dist/jsx/Aside/index.native.js.map +1 -1
  152. package/dist/jsx/Hr/index.mjs +2 -3
  153. package/dist/jsx/Hr/index.mjs.map +1 -1
  154. package/dist/jsx/Hr/index.native.js +2 -3
  155. package/dist/jsx/Hr/index.native.js.map +1 -1
  156. package/dist/jsx/MarkdownSimpleTable/index.mjs +15 -15
  157. package/dist/jsx/MarkdownSimpleTable/index.mjs.map +1 -1
  158. package/dist/jsx/MarkdownSimpleTable/index.native.js +17 -18
  159. package/dist/jsx/MarkdownSimpleTable/index.native.js.map +1 -1
  160. package/dist/jsx/MdxCodeBlock/index.mjs +9 -5
  161. package/dist/jsx/MdxCodeBlock/index.mjs.map +1 -1
  162. package/dist/jsx/MdxCodeBlock/index.native.js +9 -5
  163. package/dist/jsx/MdxCodeBlock/index.native.js.map +1 -1
  164. package/dist/jsx/Table/index.mjs +20 -8
  165. package/dist/jsx/Table/index.mjs.map +1 -1
  166. package/dist/jsx/Table/index.native.js +20 -8
  167. package/dist/jsx/Table/index.native.js.map +1 -1
  168. package/dist/jsx/Video/index.mjs +11 -7
  169. package/dist/jsx/Video/index.mjs.map +1 -1
  170. package/dist/jsx/Video/index.native.js +12 -7
  171. package/dist/jsx/Video/index.native.js.map +1 -1
  172. package/dist/jsx/components/Blockquote.mjs +5 -4
  173. package/dist/jsx/components/Blockquote.mjs.map +1 -1
  174. package/dist/jsx/components/Blockquote.native.js +7 -6
  175. package/dist/jsx/components/Blockquote.native.js.map +1 -1
  176. package/dist/jsx/components/CodeBlock.mjs +2 -2
  177. package/dist/jsx/components/CodeBlock.mjs.map +1 -1
  178. package/dist/jsx/components/CodeBlock.native.js +3 -3
  179. package/dist/jsx/components/CodeBlock.native.js.map +1 -1
  180. package/dist/jsx/components/Heading.mjs +1 -0
  181. package/dist/jsx/components/Heading.mjs.map +1 -1
  182. package/dist/jsx/components/Heading.native.js +1 -0
  183. package/dist/jsx/components/Heading.native.js.map +1 -1
  184. package/dist/jsx/components/HorizontalRule.mjs +13 -2
  185. package/dist/jsx/components/HorizontalRule.mjs.map +1 -1
  186. package/dist/jsx/components/HorizontalRule.native.js +12 -1
  187. package/dist/jsx/components/HorizontalRule.native.js.map +1 -1
  188. package/dist/jsx/components/Image.mjs +2 -2
  189. package/dist/jsx/components/Image.mjs.map +1 -1
  190. package/dist/jsx/components/Image.native.js +3 -2
  191. package/dist/jsx/components/Image.native.js.map +1 -1
  192. package/dist/jsx/components/InlineCode.mjs +2 -1
  193. package/dist/jsx/components/InlineCode.mjs.map +1 -1
  194. package/dist/jsx/components/InlineCode.native.js +2 -1
  195. package/dist/jsx/components/InlineCode.native.js.map +1 -1
  196. package/dist/jsx/components/InlineStyles.mjs +14 -1
  197. package/dist/jsx/components/InlineStyles.mjs.map +1 -1
  198. package/dist/jsx/components/InlineStyles.native.js +14 -1
  199. package/dist/jsx/components/InlineStyles.native.js.map +1 -1
  200. package/dist/jsx/components/Link.mjs +5 -0
  201. package/dist/jsx/components/Link.mjs.map +1 -1
  202. package/dist/jsx/components/Link.native.js +5 -0
  203. package/dist/jsx/components/Link.native.js.map +1 -1
  204. package/dist/jsx/components/List.mjs +8 -1
  205. package/dist/jsx/components/List.mjs.map +1 -1
  206. package/dist/jsx/components/List.native.js +11 -3
  207. package/dist/jsx/components/List.native.js.map +1 -1
  208. package/dist/jsx/components/Table.mjs +15 -9
  209. package/dist/jsx/components/Table.mjs.map +1 -1
  210. package/dist/jsx/components/Table.native.js +17 -12
  211. package/dist/jsx/components/Table.native.js.map +1 -1
  212. package/dist/jsx/mdxComponents.mjs +175 -108
  213. package/dist/jsx/mdxComponents.mjs.map +1 -1
  214. package/dist/jsx/mdxComponents.native.js +184 -113
  215. package/dist/jsx/mdxComponents.native.js.map +1 -1
  216. package/dist/jsx/mermaid/MermaidBlock.mjs +1 -1
  217. package/dist/jsx/mermaid/MermaidBlock.mjs.map +1 -1
  218. package/dist/jsx/mermaid/renderMermaidDiagram.native.js +11 -81
  219. package/dist/jsx/mermaid/renderMermaidDiagram.native.js.map +1 -1
  220. package/dist/jsx/shared/index.mjs +3 -0
  221. package/dist/jsx/shared/index.mjs.map +1 -1
  222. package/dist/jsx/shared/index.native.js +12 -0
  223. package/dist/jsx/shared/index.native.js.map +1 -1
  224. package/dist/jsx/shared/tokenPx.mjs +16 -0
  225. package/dist/jsx/shared/tokenPx.mjs.map +1 -0
  226. package/dist/jsx/shared/tokenPx.native.js +46 -0
  227. package/dist/jsx/shared/tokenPx.native.js.map +1 -0
  228. package/dist/jsx/shared/useMarkdownTableKnobs.mjs +36 -0
  229. package/dist/jsx/shared/useMarkdownTableKnobs.mjs.map +1 -0
  230. package/dist/jsx/shared/useMarkdownTableKnobs.native.js +64 -0
  231. package/dist/jsx/shared/useMarkdownTableKnobs.native.js.map +1 -0
  232. package/package.json +14 -9
  233. package/src/Aside/index.tsx +6 -4
  234. package/src/Hr/hr.spec.tsx +11 -10
  235. package/src/Hr/index.tsx +2 -2
  236. package/src/MarkdownSimpleTable/index.tsx +10 -24
  237. package/src/MdxCodeBlock/index.tsx +10 -4
  238. package/src/Table/index.tsx +11 -11
  239. package/src/Video/index.tsx +15 -5
  240. package/src/components/Blockquote.tsx +6 -5
  241. package/src/components/CodeBlock.tsx +2 -2
  242. package/src/components/Heading.tsx +7 -1
  243. package/src/components/HorizontalRule.tsx +19 -2
  244. package/src/components/Image.tsx +3 -2
  245. package/src/components/InlineCode.tsx +2 -1
  246. package/src/components/InlineStyles.tsx +7 -3
  247. package/src/components/Link.tsx +3 -0
  248. package/src/components/List.tsx +10 -3
  249. package/src/components/Table.tsx +13 -10
  250. package/src/designLaw.spec.tsx +130 -0
  251. package/src/mdxComponents.tsx +168 -87
  252. package/src/mermaid/MermaidBlock.tsx +1 -1
  253. package/src/mermaid/nativeGraph.spec.ts +90 -0
  254. package/src/mermaid/renderMermaidDiagram.native.ts +50 -0
  255. package/src/mermaid/renderMermaidDiagram.spec.ts +23 -0
  256. package/src/shared/index.ts +2 -0
  257. package/src/shared/tokenPx.ts +29 -0
  258. package/src/shared/useMarkdownTableKnobs.ts +38 -0
  259. package/src/stories/Blocks.stories.tsx +5 -5
  260. package/types/Aside/index.d.ts.map +1 -1
  261. package/types/Hr/index.d.ts +1 -1
  262. package/types/Hr/index.d.ts.map +1 -1
  263. package/types/MarkdownSimpleTable/index.d.ts.map +1 -1
  264. package/types/MdxCodeBlock/index.d.ts.map +1 -1
  265. package/types/Table/index.d.ts.map +1 -1
  266. package/types/Video/index.d.ts.map +1 -1
  267. package/types/components/Blockquote.d.ts.map +1 -1
  268. package/types/components/Heading.d.ts.map +1 -1
  269. package/types/components/HorizontalRule.d.ts +5 -1
  270. package/types/components/HorizontalRule.d.ts.map +1 -1
  271. package/types/components/Image.d.ts.map +1 -1
  272. package/types/components/InlineCode.d.ts.map +1 -1
  273. package/types/components/InlineStyles.d.ts.map +1 -1
  274. package/types/components/Link.d.ts.map +1 -1
  275. package/types/components/List.d.ts.map +1 -1
  276. package/types/components/Table.d.ts.map +1 -1
  277. package/types/mdxComponents.d.ts.map +1 -1
  278. package/types/mermaid/renderMermaidDiagram.native.d.ts +45 -0
  279. package/types/mermaid/renderMermaidDiagram.native.d.ts.map +1 -0
  280. package/types/shared/index.d.ts +2 -0
  281. package/types/shared/index.d.ts.map +1 -1
  282. package/types/shared/tokenPx.d.ts +7 -0
  283. package/types/shared/tokenPx.d.ts.map +1 -0
  284. package/types/shared/useMarkdownTableKnobs.d.ts +39 -0
  285. 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 import_Li = require("./Li/index.cjs");
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: knobProps.panelPadding.padding,
85
+ paddingHorizontal: inset,
83
86
  ...(import_tamagui.isWeb ? {
84
87
  style: {
85
- marginInlineStart: 12,
86
- borderInlineStartWidth: 1,
87
- borderInlineStartStyle: "solid"
88
+ marginInlineStart: inset,
89
+ borderInlineStartWidth: railWidth,
90
+ borderInlineStartStyle: railWidth ? "solid" : "none"
88
91
  }
89
92
  } : {
90
93
  style: {
91
- marginInlineStart: 12
94
+ marginInlineStart: inset
92
95
  },
93
- borderStartWidth: 1
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: "$8",
101
- lineHeight: "$9",
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)(import_tamagui.H1, {
111
- fontFamily: "$mono",
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)(import_tamagui.H2, {
121
- position: "relative",
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
- children,
133
- id,
134
- ...props
135
- }) => /* @__PURE__ */(0, import_jsx_runtime.jsxs)(LinkHeading, {
136
- "data-heading": true,
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
- id,
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)(import_tamagui.H4, {
152
- position: "relative",
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
- "data-heading": true,
159
- ...props,
160
- fontWeight: "400"
260
+ marginTop: "$8",
261
+ marginBottom: "$2",
262
+ ...props
161
263
  }),
162
- h5: props => /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.H5, {
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)(import_tamagui.H6, {
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)(import_tamagui.Paragraph, {
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)(import_Ul.UL, {
218
- render: "ul",
219
- marginVertical: "$4",
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: props => /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_tamagui.YStack, {
223
- ...props,
224
- render: "ol",
225
- marginBottom: "$3"
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)(import_Li.LI, {
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)(import_tamagui.Paragraph, {
237
- render: "strong",
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)(import_tamagui.YStack, {
260
- render: "img",
261
- ...props,
262
- maxWidth: "100%"
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: 12
380
+ size: iconPx
314
381
  })
315
382
  })]
316
383
  });