markdown-flow-ui 0.2.14 → 0.2.16-dev.1

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 (465) hide show
  1. package/README.md +7 -0
  2. package/dist/assets/markdown-flow-ui.css +10 -1
  3. package/dist/components/ContentRender/CodeBlock.cjs +1 -1
  4. package/dist/components/ContentRender/CodeBlock.cjs.map +1 -1
  5. package/dist/components/ContentRender/CodeBlock.d.ts +5 -0
  6. package/dist/components/ContentRender/CodeBlock.es.js +41 -38
  7. package/dist/components/ContentRender/CodeBlock.es.js.map +1 -1
  8. package/dist/components/ContentRender/ContentRender.cjs +2 -2
  9. package/dist/components/ContentRender/ContentRender.cjs.map +1 -1
  10. package/dist/components/ContentRender/ContentRender.d.ts +12 -4
  11. package/dist/components/ContentRender/ContentRender.es.js +436 -306
  12. package/dist/components/ContentRender/ContentRender.es.js.map +1 -1
  13. package/dist/components/ContentRender/IframeSandbox.cjs +7 -7
  14. package/dist/components/ContentRender/IframeSandbox.cjs.map +1 -1
  15. package/dist/components/ContentRender/IframeSandbox.d.ts +5 -1
  16. package/dist/components/ContentRender/IframeSandbox.es.js +311 -266
  17. package/dist/components/ContentRender/IframeSandbox.es.js.map +1 -1
  18. package/dist/components/ContentRender/MarkdownFlowInput.cjs +1 -1
  19. package/dist/components/ContentRender/MarkdownFlowInput.cjs.map +1 -1
  20. package/dist/components/ContentRender/MarkdownFlowInput.d.ts +5 -1
  21. package/dist/components/ContentRender/MarkdownFlowInput.es.js +37 -32
  22. package/dist/components/ContentRender/MarkdownFlowInput.es.js.map +1 -1
  23. package/dist/components/ContentRender/SandboxApp.cjs +2 -2
  24. package/dist/components/ContentRender/SandboxApp.cjs.map +1 -1
  25. package/dist/components/ContentRender/SandboxApp.d.ts +5 -1
  26. package/dist/components/ContentRender/SandboxApp.es.js +108 -103
  27. package/dist/components/ContentRender/SandboxApp.es.js.map +1 -1
  28. package/dist/components/ContentRender/blackboard-vendor.d.ts +1 -1
  29. package/dist/components/ContentRender/contentRenderI18n.cjs +1 -1
  30. package/dist/components/ContentRender/contentRenderI18n.cjs.map +1 -1
  31. package/dist/components/ContentRender/contentRenderI18n.d.ts +6 -1
  32. package/dist/components/ContentRender/contentRenderI18n.es.js +5 -56
  33. package/dist/components/ContentRender/contentRenderI18n.es.js.map +1 -1
  34. package/dist/components/ContentRender/contentRenderI18n.test.d.ts +1 -0
  35. package/dist/components/ContentRender/index.cjs +1 -1
  36. package/dist/components/ContentRender/index.d.ts +11 -11
  37. package/dist/components/ContentRender/index.es.js +1 -2
  38. package/dist/components/ContentRender/index.es.js.map +1 -1
  39. package/dist/components/ContentRender/locales/contentRender.json.cjs +2 -0
  40. package/dist/components/ContentRender/locales/contentRender.json.cjs.map +1 -0
  41. package/dist/components/ContentRender/locales/contentRender.json.d.ts +90 -0
  42. package/dist/components/ContentRender/locales/contentRender.json.es.js +11 -0
  43. package/dist/components/ContentRender/locales/contentRender.json.es.js.map +1 -0
  44. package/dist/components/ContentRender/plugins/CustomVariable.cjs +1 -1
  45. package/dist/components/ContentRender/plugins/CustomVariable.cjs.map +1 -1
  46. package/dist/components/ContentRender/plugins/CustomVariable.d.ts +7 -3
  47. package/dist/components/ContentRender/plugins/CustomVariable.es.js +165 -151
  48. package/dist/components/ContentRender/plugins/CustomVariable.es.js.map +1 -1
  49. package/dist/components/ContentRender/plugins/MermaidChart.cjs +1 -1
  50. package/dist/components/ContentRender/plugins/MermaidChart.cjs.map +1 -1
  51. package/dist/components/ContentRender/plugins/MermaidChart.d.ts +1 -0
  52. package/dist/components/ContentRender/plugins/MermaidChart.es.js +68 -44
  53. package/dist/components/ContentRender/plugins/MermaidChart.es.js.map +1 -1
  54. package/dist/components/ContentRender/typewriterPacing.fixtures.d.ts +14 -0
  55. package/dist/components/ContentRender/utils/typewriter-pacing.cjs +3 -0
  56. package/dist/components/ContentRender/utils/typewriter-pacing.cjs.map +1 -0
  57. package/dist/components/ContentRender/utils/typewriter-pacing.d.ts +27 -0
  58. package/dist/components/ContentRender/utils/typewriter-pacing.es.js +98 -0
  59. package/dist/components/ContentRender/utils/typewriter-pacing.es.js.map +1 -0
  60. package/dist/components/ContentRender/utils/typewriter-pacing.test.d.ts +1 -0
  61. package/dist/components/MarkdownFlow/MarkdownFlow.cjs +1 -1
  62. package/dist/components/MarkdownFlow/MarkdownFlow.cjs.map +1 -1
  63. package/dist/components/MarkdownFlow/MarkdownFlow.d.ts +12 -4
  64. package/dist/components/MarkdownFlow/MarkdownFlow.es.js +51 -39
  65. package/dist/components/MarkdownFlow/MarkdownFlow.es.js.map +1 -1
  66. package/dist/components/MarkdownFlow/ScrollToBottomButton.cjs +1 -1
  67. package/dist/components/MarkdownFlow/ScrollToBottomButton.cjs.map +1 -1
  68. package/dist/components/MarkdownFlow/ScrollToBottomButton.d.ts +31 -1
  69. package/dist/components/MarkdownFlow/ScrollToBottomButton.es.js +46 -17
  70. package/dist/components/MarkdownFlow/ScrollToBottomButton.es.js.map +1 -1
  71. package/dist/components/MarkdownFlow/ScrollToBottomControl.cjs +2 -0
  72. package/dist/components/MarkdownFlow/ScrollToBottomControl.cjs.map +1 -0
  73. package/dist/components/MarkdownFlow/ScrollToBottomControl.d.ts +18 -0
  74. package/dist/components/MarkdownFlow/ScrollToBottomControl.es.js +47 -0
  75. package/dist/components/MarkdownFlow/ScrollToBottomControl.es.js.map +1 -0
  76. package/dist/components/MarkdownFlow/ScrollableMarkdownFlow.cjs +1 -1
  77. package/dist/components/MarkdownFlow/ScrollableMarkdownFlow.cjs.map +1 -1
  78. package/dist/components/MarkdownFlow/ScrollableMarkdownFlow.d.ts +1 -1
  79. package/dist/components/MarkdownFlow/ScrollableMarkdownFlow.es.js +33 -52
  80. package/dist/components/MarkdownFlow/ScrollableMarkdownFlow.es.js.map +1 -1
  81. package/dist/components/MarkdownFlow/index.cjs +1 -1
  82. package/dist/components/MarkdownFlow/index.d.ts +9 -6
  83. package/dist/components/MarkdownFlow/index.es.js +6 -6
  84. package/dist/components/MarkdownFlow/index.es.js.map +1 -1
  85. package/dist/components/MarkdownFlow/useScrollToBottom.cjs +1 -1
  86. package/dist/components/MarkdownFlow/useScrollToBottom.cjs.map +1 -1
  87. package/dist/components/MarkdownFlow/useScrollToBottom.d.ts +40 -8
  88. package/dist/components/MarkdownFlow/useScrollToBottom.es.js +352 -83
  89. package/dist/components/MarkdownFlow/useScrollToBottom.es.js.map +1 -1
  90. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.cjs +1 -1
  91. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.cjs.map +1 -1
  92. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.d.ts +5 -3
  93. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.es.js +371 -324
  94. package/dist/components/MarkdownFlowEditor/MarkdownFlowEditor.es.js.map +1 -1
  95. package/dist/components/MarkdownFlowEditor/components/CustomDialog.cjs +1 -1
  96. package/dist/components/MarkdownFlowEditor/components/CustomDialog.cjs.map +1 -1
  97. package/dist/components/MarkdownFlowEditor/components/CustomDialog.d.ts +10 -0
  98. package/dist/components/MarkdownFlowEditor/components/CustomDialog.es.js +22 -19
  99. package/dist/components/MarkdownFlowEditor/components/CustomDialog.es.js.map +1 -1
  100. package/dist/components/MarkdownFlowEditor/components/CustomPopover.cjs +1 -1
  101. package/dist/components/MarkdownFlowEditor/components/CustomPopover.cjs.map +1 -1
  102. package/dist/components/MarkdownFlowEditor/components/CustomPopover.d.ts +8 -0
  103. package/dist/components/MarkdownFlowEditor/components/CustomPopover.es.js +19 -15
  104. package/dist/components/MarkdownFlowEditor/components/CustomPopover.es.js.map +1 -1
  105. package/dist/components/MarkdownFlowEditor/components/EditorToolbar.cjs +1 -1
  106. package/dist/components/MarkdownFlowEditor/components/EditorToolbar.cjs.map +1 -1
  107. package/dist/components/MarkdownFlowEditor/components/EditorToolbar.d.ts +4 -1
  108. package/dist/components/MarkdownFlowEditor/components/EditorToolbar.es.js +99 -93
  109. package/dist/components/MarkdownFlowEditor/components/EditorToolbar.es.js.map +1 -1
  110. package/dist/components/MarkdownFlowEditor/components/ImageInject.cjs +1 -1
  111. package/dist/components/MarkdownFlowEditor/components/ImageInject.cjs.map +1 -1
  112. package/dist/components/MarkdownFlowEditor/components/ImageInject.d.ts +1 -1
  113. package/dist/components/MarkdownFlowEditor/components/ImageInject.es.js +183 -182
  114. package/dist/components/MarkdownFlowEditor/components/ImageInject.es.js.map +1 -1
  115. package/dist/components/MarkdownFlowEditor/components/VariableSearchDropdown.cjs +1 -1
  116. package/dist/components/MarkdownFlowEditor/components/VariableSearchDropdown.cjs.map +1 -1
  117. package/dist/components/MarkdownFlowEditor/components/VariableSearchDropdown.d.ts +1 -1
  118. package/dist/components/MarkdownFlowEditor/components/VariableSearchDropdown.es.js +107 -103
  119. package/dist/components/MarkdownFlowEditor/components/VariableSearchDropdown.es.js.map +1 -1
  120. package/dist/components/MarkdownFlowEditor/components/VariableSelect.cjs +1 -1
  121. package/dist/components/MarkdownFlowEditor/components/VariableSelect.cjs.map +1 -1
  122. package/dist/components/MarkdownFlowEditor/components/VariableSelect.d.ts +1 -1
  123. package/dist/components/MarkdownFlowEditor/components/VariableSelect.es.js +106 -106
  124. package/dist/components/MarkdownFlowEditor/components/VariableSelect.es.js.map +1 -1
  125. package/dist/components/MarkdownFlowEditor/components/VideoInject.cjs +1 -1
  126. package/dist/components/MarkdownFlowEditor/components/VideoInject.cjs.map +1 -1
  127. package/dist/components/MarkdownFlowEditor/components/VideoInject.es.js +64 -63
  128. package/dist/components/MarkdownFlowEditor/components/VideoInject.es.js.map +1 -1
  129. package/dist/components/MarkdownFlowEditor/components/icons/ButtonIcon.cjs +1 -1
  130. package/dist/components/MarkdownFlowEditor/components/icons/ButtonIcon.cjs.map +1 -1
  131. package/dist/components/MarkdownFlowEditor/components/icons/ButtonIcon.es.js +13 -13
  132. package/dist/components/MarkdownFlowEditor/components/icons/ButtonIcon.es.js.map +1 -1
  133. package/dist/components/MarkdownFlowEditor/components/icons/SearchBracesIcon.cjs +1 -1
  134. package/dist/components/MarkdownFlowEditor/components/icons/SearchBracesIcon.cjs.map +1 -1
  135. package/dist/components/MarkdownFlowEditor/components/icons/SearchBracesIcon.es.js +12 -12
  136. package/dist/components/MarkdownFlowEditor/components/icons/SearchBracesIcon.es.js.map +1 -1
  137. package/dist/components/MarkdownFlowEditor/editor-context.d.ts +1 -1
  138. package/dist/components/MarkdownFlowEditor/editorI18n.cjs +1 -1
  139. package/dist/components/MarkdownFlowEditor/editorI18n.cjs.map +1 -1
  140. package/dist/components/MarkdownFlowEditor/editorI18n.d.ts +290 -0
  141. package/dist/components/MarkdownFlowEditor/editorI18n.es.js +12 -8
  142. package/dist/components/MarkdownFlowEditor/editorI18n.es.js.map +1 -1
  143. package/dist/components/MarkdownFlowEditor/editorI18n.test.d.ts +1 -0
  144. package/dist/components/MarkdownFlowEditor/index.d.ts +6 -6
  145. package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.cjs +2 -0
  146. package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.cjs.map +1 -0
  147. package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.d.ts +72 -0
  148. package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.es.js +140 -0
  149. package/dist/components/MarkdownFlowEditor/locales/ar-SA.json.es.js.map +1 -0
  150. package/dist/components/MarkdownFlowEditor/locales/en-US.json.cjs +1 -1
  151. package/dist/components/MarkdownFlowEditor/locales/en-US.json.d.ts +2 -0
  152. package/dist/components/MarkdownFlowEditor/locales/en-US.json.es.js +118 -114
  153. package/dist/components/MarkdownFlowEditor/locales/en-US.json.es.js.map +1 -1
  154. package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.cjs +1 -1
  155. package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.d.ts +2 -0
  156. package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.es.js +118 -114
  157. package/dist/components/MarkdownFlowEditor/locales/fr-FR.json.es.js.map +1 -1
  158. package/dist/components/MarkdownFlowEditor/locales/th-TH.json.cjs +2 -0
  159. package/dist/components/MarkdownFlowEditor/locales/th-TH.json.cjs.map +1 -0
  160. package/dist/components/MarkdownFlowEditor/locales/th-TH.json.d.ts +72 -0
  161. package/dist/components/MarkdownFlowEditor/locales/th-TH.json.es.js +140 -0
  162. package/dist/components/MarkdownFlowEditor/locales/th-TH.json.es.js.map +1 -0
  163. package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.cjs +1 -1
  164. package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.d.ts +2 -0
  165. package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.es.js +70 -66
  166. package/dist/components/MarkdownFlowEditor/locales/zh-CN.json.es.js.map +1 -1
  167. package/dist/components/MarkdownFlowEditor/plugins/ImgPlaceholder.cjs +1 -1
  168. package/dist/components/MarkdownFlowEditor/plugins/ImgPlaceholder.cjs.map +1 -1
  169. package/dist/components/MarkdownFlowEditor/plugins/ImgPlaceholder.es.js +40 -35
  170. package/dist/components/MarkdownFlowEditor/plugins/ImgPlaceholder.es.js.map +1 -1
  171. package/dist/components/MarkdownFlowEditor/plugins/PlaceholderWidget.d.ts +1 -1
  172. package/dist/components/MarkdownFlowEditor/plugins/VideoPlaceholder.cjs +1 -1
  173. package/dist/components/MarkdownFlowEditor/plugins/VideoPlaceholder.cjs.map +1 -1
  174. package/dist/components/MarkdownFlowEditor/plugins/VideoPlaceholder.es.js +27 -23
  175. package/dist/components/MarkdownFlowEditor/plugins/VideoPlaceholder.es.js.map +1 -1
  176. package/dist/components/MarkdownFlowEditor/plugins/mediaPlaceholderLabels.cjs +2 -0
  177. package/dist/components/MarkdownFlowEditor/plugins/mediaPlaceholderLabels.cjs.map +1 -0
  178. package/dist/components/MarkdownFlowEditor/plugins/mediaPlaceholderLabels.d.ts +7 -0
  179. package/dist/components/MarkdownFlowEditor/plugins/mediaPlaceholderLabels.es.js +12 -0
  180. package/dist/components/MarkdownFlowEditor/plugins/mediaPlaceholderLabels.es.js.map +1 -0
  181. package/dist/components/MarkdownFlowEditor/utils.d.ts +1 -1
  182. package/dist/components/Slide/MarkdownSlideScaling.cjs +1 -1
  183. package/dist/components/Slide/MarkdownSlideScaling.cjs.map +1 -1
  184. package/dist/components/Slide/MarkdownSlideScaling.d.ts +1 -1
  185. package/dist/components/Slide/MarkdownSlideScaling.es.js +20 -20
  186. package/dist/components/Slide/MarkdownSlideScaling.es.js.map +1 -1
  187. package/dist/components/Slide/MobilePlayerSettingsSheet.cjs +1 -1
  188. package/dist/components/Slide/MobilePlayerSettingsSheet.cjs.map +1 -1
  189. package/dist/components/Slide/MobilePlayerSettingsSheet.d.ts +7 -2
  190. package/dist/components/Slide/MobilePlayerSettingsSheet.es.js +61 -57
  191. package/dist/components/Slide/MobilePlayerSettingsSheet.es.js.map +1 -1
  192. package/dist/components/Slide/Player.cjs +1 -1
  193. package/dist/components/Slide/Player.cjs.map +1 -1
  194. package/dist/components/Slide/Player.d.ts +6 -6
  195. package/dist/components/Slide/Player.es.js +547 -541
  196. package/dist/components/Slide/Player.es.js.map +1 -1
  197. package/dist/components/Slide/Slide.cjs +1 -1
  198. package/dist/components/Slide/Slide.cjs.map +1 -1
  199. package/dist/components/Slide/Slide.d.ts +14 -12
  200. package/dist/components/Slide/Slide.es.js +745 -726
  201. package/dist/components/Slide/Slide.es.js.map +1 -1
  202. package/dist/components/Slide/SubtitleOverlay.cjs +1 -1
  203. package/dist/components/Slide/SubtitleOverlay.cjs.map +1 -1
  204. package/dist/components/Slide/SubtitleOverlay.d.ts +2 -2
  205. package/dist/components/Slide/SubtitleOverlay.es.js +17 -17
  206. package/dist/components/Slide/SubtitleOverlay.es.js.map +1 -1
  207. package/dist/components/Slide/diff-utils.d.ts +1 -1
  208. package/dist/components/Slide/index.d.ts +12 -12
  209. package/dist/components/Slide/locales/slide.json.cjs +2 -0
  210. package/dist/components/Slide/locales/slide.json.cjs.map +1 -0
  211. package/dist/components/Slide/locales/slide.json.d.ts +205 -0
  212. package/dist/components/Slide/locales/slide.json.es.js +11 -0
  213. package/dist/components/Slide/locales/slide.json.es.js.map +1 -0
  214. package/dist/components/Slide/slideI18n.cjs +1 -1
  215. package/dist/components/Slide/slideI18n.cjs.map +1 -1
  216. package/dist/components/Slide/slideI18n.d.ts +6 -3
  217. package/dist/components/Slide/slideI18n.es.js +10 -155
  218. package/dist/components/Slide/slideI18n.es.js.map +1 -1
  219. package/dist/components/Slide/useSlide.d.ts +1 -1
  220. package/dist/components/Slide/utils/appendedMarkerAdvance.d.ts +1 -1
  221. package/dist/components/Slide/utils/audioSegments.d.ts +1 -1
  222. package/dist/components/Slide/utils/interactionResolution.d.ts +2 -2
  223. package/dist/components/Slide/utils/listenModeElementList.d.ts +2 -2
  224. package/dist/components/Slide/utils/markdownScaling.d.ts +1 -1
  225. package/dist/components/Slide/utils/playerCustomActions.d.ts +2 -2
  226. package/dist/components/Slide/utils/playerKeyboardShortcuts.cjs +1 -1
  227. package/dist/components/Slide/utils/playerKeyboardShortcuts.cjs.map +1 -1
  228. package/dist/components/Slide/utils/playerKeyboardShortcuts.d.ts +1 -1
  229. package/dist/components/Slide/utils/playerKeyboardShortcuts.es.js +20 -20
  230. package/dist/components/Slide/utils/playerKeyboardShortcuts.es.js.map +1 -1
  231. package/dist/components/Slide/utils/runStreamFixture.d.ts +1 -1
  232. package/dist/components/Slide/utils/segmentSeek.d.ts +1 -1
  233. package/dist/components/Slide/utils/silentStepAutoAdvance.d.ts +1 -1
  234. package/dist/components/Slide/utils/streamingNavigation.d.ts +1 -1
  235. package/dist/components/Slide/utils/subtitleCue.d.ts +1 -1
  236. package/dist/components/Slide/utils/subtitleJumpNavigation.d.ts +1 -1
  237. package/dist/components/index.d.ts +22 -18
  238. package/dist/components/ui/button.cjs +1 -1
  239. package/dist/components/ui/button.cjs.map +1 -1
  240. package/dist/components/ui/button.es.js +12 -13
  241. package/dist/components/ui/button.es.js.map +1 -1
  242. package/dist/components/ui/checkbox.cjs +1 -1
  243. package/dist/components/ui/checkbox.cjs.map +1 -1
  244. package/dist/components/ui/checkbox.es.js +35 -35
  245. package/dist/components/ui/checkbox.es.js.map +1 -1
  246. package/dist/components/ui/dialog.cjs +1 -1
  247. package/dist/components/ui/dialog.cjs.map +1 -1
  248. package/dist/components/ui/dialog.d.ts +5 -1
  249. package/dist/components/ui/dialog.es.js +37 -37
  250. package/dist/components/ui/dialog.es.js.map +1 -1
  251. package/dist/components/ui/input.cjs +1 -1
  252. package/dist/components/ui/input.cjs.map +1 -1
  253. package/dist/components/ui/input.es.js +4 -4
  254. package/dist/components/ui/input.es.js.map +1 -1
  255. package/dist/components/ui/inputGroup/button.cjs +1 -1
  256. package/dist/components/ui/inputGroup/button.cjs.map +1 -1
  257. package/dist/components/ui/inputGroup/button.es.js +9 -10
  258. package/dist/components/ui/inputGroup/button.es.js.map +1 -1
  259. package/dist/components/ui/inputGroup/input-group.cjs +1 -1
  260. package/dist/components/ui/inputGroup/input-group.cjs.map +1 -1
  261. package/dist/components/ui/inputGroup/input-group.d.ts +1 -1
  262. package/dist/components/ui/inputGroup/input-group.es.js +10 -10
  263. package/dist/components/ui/inputGroup/input-group.es.js.map +1 -1
  264. package/dist/components/ui/inputGroup/textarea.cjs +1 -1
  265. package/dist/components/ui/inputGroup/textarea.cjs.map +1 -1
  266. package/dist/components/ui/inputGroup/textarea.es.js +2 -2
  267. package/dist/components/ui/inputGroup/textarea.es.js.map +1 -1
  268. package/dist/components/ui/loading-overlay-card.cjs +2 -2
  269. package/dist/components/ui/loading-overlay-card.cjs.map +1 -1
  270. package/dist/components/ui/loading-overlay-card.es.js +11 -11
  271. package/dist/components/ui/loading-overlay-card.es.js.map +1 -1
  272. package/dist/components/ui/popover.cjs +1 -1
  273. package/dist/components/ui/popover.cjs.map +1 -1
  274. package/dist/components/ui/popover.es.js +6 -6
  275. package/dist/components/ui/popover.es.js.map +1 -1
  276. package/dist/components/ui/tooltip.cjs +1 -1
  277. package/dist/components/ui/tooltip.cjs.map +1 -1
  278. package/dist/components/ui/tooltip.es.js +16 -16
  279. package/dist/components/ui/tooltip.es.js.map +1 -1
  280. package/dist/editor.d.ts +2 -2
  281. package/dist/fonts/KaTeX_AMS-Regular.ttf +0 -0
  282. package/dist/fonts/KaTeX_AMS-Regular.woff +0 -0
  283. package/dist/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  284. package/dist/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
  285. package/dist/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
  286. package/dist/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  287. package/dist/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
  288. package/dist/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
  289. package/dist/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  290. package/dist/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
  291. package/dist/fonts/KaTeX_Fraktur-Bold.woff +0 -0
  292. package/dist/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  293. package/dist/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
  294. package/dist/fonts/KaTeX_Fraktur-Regular.woff +0 -0
  295. package/dist/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  296. package/dist/fonts/KaTeX_Main-Bold.ttf +0 -0
  297. package/dist/fonts/KaTeX_Main-Bold.woff +0 -0
  298. package/dist/fonts/KaTeX_Main-Bold.woff2 +0 -0
  299. package/dist/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
  300. package/dist/fonts/KaTeX_Main-BoldItalic.woff +0 -0
  301. package/dist/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  302. package/dist/fonts/KaTeX_Main-Italic.ttf +0 -0
  303. package/dist/fonts/KaTeX_Main-Italic.woff +0 -0
  304. package/dist/fonts/KaTeX_Main-Italic.woff2 +0 -0
  305. package/dist/fonts/KaTeX_Main-Regular.ttf +0 -0
  306. package/dist/fonts/KaTeX_Main-Regular.woff +0 -0
  307. package/dist/fonts/KaTeX_Main-Regular.woff2 +0 -0
  308. package/dist/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
  309. package/dist/fonts/KaTeX_Math-BoldItalic.woff +0 -0
  310. package/dist/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  311. package/dist/fonts/KaTeX_Math-Italic.ttf +0 -0
  312. package/dist/fonts/KaTeX_Math-Italic.woff +0 -0
  313. package/dist/fonts/KaTeX_Math-Italic.woff2 +0 -0
  314. package/dist/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
  315. package/dist/fonts/KaTeX_SansSerif-Bold.woff +0 -0
  316. package/dist/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  317. package/dist/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
  318. package/dist/fonts/KaTeX_SansSerif-Italic.woff +0 -0
  319. package/dist/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  320. package/dist/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
  321. package/dist/fonts/KaTeX_SansSerif-Regular.woff +0 -0
  322. package/dist/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  323. package/dist/fonts/KaTeX_Script-Regular.ttf +0 -0
  324. package/dist/fonts/KaTeX_Script-Regular.woff +0 -0
  325. package/dist/fonts/KaTeX_Script-Regular.woff2 +0 -0
  326. package/dist/fonts/KaTeX_Size1-Regular.ttf +0 -0
  327. package/dist/fonts/KaTeX_Size1-Regular.woff +0 -0
  328. package/dist/fonts/KaTeX_Size1-Regular.woff2 +0 -0
  329. package/dist/fonts/KaTeX_Size2-Regular.ttf +0 -0
  330. package/dist/fonts/KaTeX_Size2-Regular.woff +0 -0
  331. package/dist/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  332. package/dist/fonts/KaTeX_Size3-Regular.ttf +0 -0
  333. package/dist/fonts/KaTeX_Size3-Regular.woff +0 -0
  334. package/dist/fonts/KaTeX_Size3-Regular.woff2 +0 -0
  335. package/dist/fonts/KaTeX_Size4-Regular.ttf +0 -0
  336. package/dist/fonts/KaTeX_Size4-Regular.woff +0 -0
  337. package/dist/fonts/KaTeX_Size4-Regular.woff2 +0 -0
  338. package/dist/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
  339. package/dist/fonts/KaTeX_Typewriter-Regular.woff +0 -0
  340. package/dist/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  341. package/dist/index.cjs +1 -1
  342. package/dist/index.d.ts +2 -2
  343. package/dist/index.es.js +22 -19
  344. package/dist/index.es.js.map +1 -1
  345. package/dist/lib/locale.cjs +1 -1
  346. package/dist/lib/locale.cjs.map +1 -1
  347. package/dist/lib/locale.d.ts +5 -1
  348. package/dist/lib/locale.es.js +26 -13
  349. package/dist/lib/locale.es.js.map +1 -1
  350. package/dist/lib/locale.test.d.ts +1 -0
  351. package/dist/lib/useDetachedLanguage.cjs +2 -0
  352. package/dist/lib/useDetachedLanguage.cjs.map +1 -0
  353. package/dist/lib/useDetachedLanguage.d.ts +3 -0
  354. package/dist/lib/useDetachedLanguage.es.js +25 -0
  355. package/dist/lib/useDetachedLanguage.es.js.map +1 -0
  356. package/dist/lib/useResolvedDirection.cjs +2 -0
  357. package/dist/lib/useResolvedDirection.cjs.map +1 -0
  358. package/dist/lib/useResolvedDirection.d.ts +6 -0
  359. package/dist/lib/useResolvedDirection.es.js +37 -0
  360. package/dist/lib/useResolvedDirection.es.js.map +1 -0
  361. package/dist/markdown-flow-ui-lib.css +1 -1
  362. package/dist/node_modules/@radix-ui/react-arrow/dist/index.cjs +1 -1
  363. package/dist/node_modules/@radix-ui/react-arrow/dist/index.cjs.map +1 -1
  364. package/dist/node_modules/@radix-ui/react-arrow/dist/index.es.js +6 -6
  365. package/dist/node_modules/@radix-ui/react-arrow/dist/index.es.js.map +1 -1
  366. package/dist/node_modules/@radix-ui/react-context/dist/index.cjs +1 -1
  367. package/dist/node_modules/@radix-ui/react-context/dist/index.cjs.map +1 -1
  368. package/dist/node_modules/@radix-ui/react-context/dist/index.es.js +21 -21
  369. package/dist/node_modules/@radix-ui/react-context/dist/index.es.js.map +1 -1
  370. package/dist/node_modules/@radix-ui/react-dialog/dist/index.cjs +2 -2
  371. package/dist/node_modules/@radix-ui/react-dialog/dist/index.cjs.map +1 -1
  372. package/dist/node_modules/@radix-ui/react-dialog/dist/index.es.js +100 -100
  373. package/dist/node_modules/@radix-ui/react-dialog/dist/index.es.js.map +1 -1
  374. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs +1 -1
  375. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.cjs.map +1 -1
  376. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.es.js +38 -38
  377. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.es.js.map +1 -1
  378. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs +1 -1
  379. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.cjs.map +1 -1
  380. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.es.js +9 -9
  381. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.es.js.map +1 -1
  382. package/dist/node_modules/@radix-ui/react-popover/dist/index.cjs +1 -1
  383. package/dist/node_modules/@radix-ui/react-popover/dist/index.cjs.map +1 -1
  384. package/dist/node_modules/@radix-ui/react-popover/dist/index.es.js +95 -95
  385. package/dist/node_modules/@radix-ui/react-popover/dist/index.es.js.map +1 -1
  386. package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs +1 -1
  387. package/dist/node_modules/@radix-ui/react-popper/dist/index.cjs.map +1 -1
  388. package/dist/node_modules/@radix-ui/react-popper/dist/index.es.js +48 -48
  389. package/dist/node_modules/@radix-ui/react-popper/dist/index.es.js.map +1 -1
  390. package/dist/node_modules/@radix-ui/react-portal/dist/index.cjs +1 -1
  391. package/dist/node_modules/@radix-ui/react-portal/dist/index.cjs.map +1 -1
  392. package/dist/node_modules/@radix-ui/react-portal/dist/index.es.js +6 -6
  393. package/dist/node_modules/@radix-ui/react-portal/dist/index.es.js.map +1 -1
  394. package/dist/node_modules/@radix-ui/react-primitive/dist/index.cjs +1 -1
  395. package/dist/node_modules/@radix-ui/react-primitive/dist/index.cjs.map +1 -1
  396. package/dist/node_modules/@radix-ui/react-primitive/dist/index.es.js +9 -9
  397. package/dist/node_modules/@radix-ui/react-primitive/dist/index.es.js.map +1 -1
  398. package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs +1 -1
  399. package/dist/node_modules/@radix-ui/react-slot/dist/index.cjs.map +1 -1
  400. package/dist/node_modules/@radix-ui/react-slot/dist/index.es.js +17 -17
  401. package/dist/node_modules/@radix-ui/react-slot/dist/index.es.js.map +1 -1
  402. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.cjs +1 -1
  403. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.cjs.map +1 -1
  404. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.es.js +100 -100
  405. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.es.js.map +1 -1
  406. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs +1 -1
  407. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.cjs.map +1 -1
  408. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.es.js +6 -6
  409. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.es.js.map +1 -1
  410. package/dist/node_modules/@uiw/react-codemirror/esm/index.cjs +1 -1
  411. package/dist/node_modules/@uiw/react-codemirror/esm/index.cjs.map +1 -1
  412. package/dist/node_modules/@uiw/react-codemirror/esm/index.es.js +27 -27
  413. package/dist/node_modules/@uiw/react-codemirror/esm/index.es.js.map +1 -1
  414. package/dist/node_modules/lucide-react/dist/esm/icons/{chevron-down.cjs → chevrons-down.cjs} +2 -2
  415. package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-down.cjs.map +1 -0
  416. package/dist/node_modules/lucide-react/dist/esm/icons/{chevron-down.es.js → chevrons-down.es.js} +6 -3
  417. package/dist/node_modules/lucide-react/dist/esm/icons/chevrons-down.es.js.map +1 -0
  418. package/dist/node_modules/react-markdown/lib/index.cjs +1 -1
  419. package/dist/node_modules/react-markdown/lib/index.cjs.map +1 -1
  420. package/dist/node_modules/react-markdown/lib/index.es.js +39 -39
  421. package/dist/node_modules/react-markdown/lib/index.es.js.map +1 -1
  422. package/dist/renderer.cjs +1 -1
  423. package/dist/renderer.d.ts +18 -17
  424. package/dist/renderer.es.js +20 -17
  425. package/dist/renderer.es.js.map +1 -1
  426. package/dist/scroll.cjs +1 -1
  427. package/dist/scroll.d.ts +6 -3
  428. package/dist/scroll.es.js +4 -2
  429. package/dist/scroll.es.js.map +1 -1
  430. package/dist/slide.d.ts +3 -3
  431. package/package.json +5 -2
  432. package/dist/_virtual/jsx-runtime.cjs +0 -2
  433. package/dist/_virtual/jsx-runtime.cjs.map +0 -1
  434. package/dist/_virtual/jsx-runtime.es.js +0 -6
  435. package/dist/_virtual/jsx-runtime.es.js.map +0 -1
  436. package/dist/_virtual/jsx-runtime.es2.js +0 -5
  437. package/dist/_virtual/jsx-runtime.es2.js.map +0 -1
  438. package/dist/_virtual/jsx-runtime2.cjs +0 -2
  439. package/dist/_virtual/jsx-runtime2.cjs.map +0 -1
  440. package/dist/_virtual/react-jsx-runtime.development.cjs +0 -2
  441. package/dist/_virtual/react-jsx-runtime.development.cjs.map +0 -1
  442. package/dist/_virtual/react-jsx-runtime.development.es.js +0 -5
  443. package/dist/_virtual/react-jsx-runtime.development.es.js.map +0 -1
  444. package/dist/_virtual/react-jsx-runtime.production.cjs +0 -2
  445. package/dist/_virtual/react-jsx-runtime.production.cjs.map +0 -1
  446. package/dist/_virtual/react-jsx-runtime.production.es.js +0 -5
  447. package/dist/_virtual/react-jsx-runtime.production.es.js.map +0 -1
  448. package/dist/lib/localeTextMap.cjs +0 -2
  449. package/dist/lib/localeTextMap.cjs.map +0 -1
  450. package/dist/lib/localeTextMap.es.js +0 -5
  451. package/dist/lib/localeTextMap.es.js.map +0 -1
  452. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.cjs.map +0 -1
  453. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.es.js.map +0 -1
  454. package/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs +0 -24
  455. package/dist/node_modules/react/cjs/react-jsx-runtime.development.cjs.map +0 -1
  456. package/dist/node_modules/react/cjs/react-jsx-runtime.development.es.js +0 -409
  457. package/dist/node_modules/react/cjs/react-jsx-runtime.development.es.js.map +0 -1
  458. package/dist/node_modules/react/cjs/react-jsx-runtime.production.cjs +0 -10
  459. package/dist/node_modules/react/cjs/react-jsx-runtime.production.cjs.map +0 -1
  460. package/dist/node_modules/react/cjs/react-jsx-runtime.production.es.js +0 -36
  461. package/dist/node_modules/react/cjs/react-jsx-runtime.production.es.js.map +0 -1
  462. package/dist/node_modules/react/jsx-runtime.cjs +0 -2
  463. package/dist/node_modules/react/jsx-runtime.cjs.map +0 -1
  464. package/dist/node_modules/react/jsx-runtime.es.js +0 -11
  465. package/dist/node_modules/react/jsx-runtime.es.js.map +0 -1
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const P=require("../../../@babel/runtime/helpers/esm/extends.cjs"),U=require("../../../@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.cjs"),e=require("react"),a=require("./useCodeMirror.cjs"),k=require("../../../../_virtual/jsx-runtime.cjs"),I=require("./theme/light.cjs");var z=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],h=e.forwardRef((o,c)=>{var{className:n,value:t="",selection:m,extensions:g=[],onChange:f,onStatistics:v,onCreateEditor:p,onUpdate:C,autoFocus:x,theme:i="light",height:b,minHeight:y,maxHeight:M,width:S,minWidth:w,maxWidth:E,basicSetup:R,placeholder:W,indentWithTab:q,editable:j,readOnly:H,root:N,initialState:O}=o,T=U.default(o,z),r=e.useRef(null),{state:s,view:u,container:_,setContainer:d}=a.useCodeMirror({root:N,value:t,autoFocus:x,theme:i,height:b,minHeight:y,maxHeight:M,width:S,minWidth:w,maxWidth:E,basicSetup:R,placeholder:W,indentWithTab:q,editable:j,readOnly:H,selection:m,onChange:f,onStatistics:v,onCreateEditor:p,onUpdate:C,extensions:g,initialState:O});e.useImperativeHandle(c,()=>({editor:r.current,state:s,view:u}),[r,_,s,u]);var L=e.useCallback(l=>{r.current=l,d(l)},[d]);if(typeof t!="string")throw new Error("value must be typeof string but got "+typeof t);var F=typeof i=="string"?"cm-theme-"+i:"cm-theme";return k.jsxRuntimeExports.jsx("div",P.default({ref:L,className:""+F+(n?" "+n:"")},T))});h.displayName="CodeMirror";exports.ExternalChange=a.ExternalChange;exports.useCodeMirror=a.useCodeMirror;exports.defaultLightThemeOption=I.defaultLightThemeOption;exports.default=h;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const P=require("../../../@babel/runtime/helpers/esm/extends.cjs"),U=require("../../../@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.cjs"),e=require("react"),a=require("./useCodeMirror.cjs"),k=require("react/jsx-runtime"),I=require("./theme/light.cjs");var z=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],h=e.forwardRef((o,c)=>{var{className:n,value:t="",selection:m,extensions:g=[],onChange:f,onStatistics:v,onCreateEditor:C,onUpdate:p,autoFocus:b,theme:i="light",height:x,minHeight:y,maxHeight:M,width:S,minWidth:w,maxWidth:W,basicSetup:q,placeholder:E,indentWithTab:R,editable:H,readOnly:N,root:O,initialState:T}=o,j=U.default(o,z),r=e.useRef(null),{state:s,view:d,container:_,setContainer:u}=a.useCodeMirror({root:O,value:t,autoFocus:b,theme:i,height:x,minHeight:y,maxHeight:M,width:S,minWidth:w,maxWidth:W,basicSetup:q,placeholder:E,indentWithTab:R,editable:H,readOnly:N,selection:m,onChange:f,onStatistics:v,onCreateEditor:C,onUpdate:p,extensions:g,initialState:T});e.useImperativeHandle(c,()=>({editor:r.current,state:s,view:d}),[r,_,s,d]);var L=e.useCallback(l=>{r.current=l,u(l)},[u]);if(typeof t!="string")throw new Error("value must be typeof string but got "+typeof t);var F=typeof i=="string"?"cm-theme-"+i:"cm-theme";return k.jsx("div",P.default({ref:L,className:""+F+(n?" "+n:"")},j))});h.displayName="CodeMirror";exports.ExternalChange=a.ExternalChange;exports.useCodeMirror=a.useCodeMirror;exports.defaultLightThemeOption=I.defaultLightThemeOption;exports.default=h;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../../node_modules/@uiw/react-codemirror/esm/index.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"className\", \"value\", \"selection\", \"extensions\", \"onChange\", \"onStatistics\", \"onCreateEditor\", \"onUpdate\", \"autoFocus\", \"theme\", \"height\", \"minHeight\", \"maxHeight\", \"width\", \"minWidth\", \"maxWidth\", \"basicSetup\", \"placeholder\", \"indentWithTab\", \"editable\", \"readOnly\", \"root\", \"initialState\"];\nimport React, { useRef, forwardRef, useImperativeHandle, useCallback } from 'react';\nimport { useCodeMirror } from \"./useCodeMirror.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport * from '@codemirror/view';\nexport * from '@codemirror/state';\nexport * from '@uiw/codemirror-extensions-basic-setup';\nexport * from \"./useCodeMirror.js\";\nexport * from \"./getDefaultExtensions.js\";\nexport * from \"./utils.js\";\nvar ReactCodeMirror = /*#__PURE__*/forwardRef((props, ref) => {\n var {\n className,\n value = '',\n selection,\n extensions = [],\n onChange,\n onStatistics,\n onCreateEditor,\n onUpdate,\n autoFocus,\n theme = 'light',\n height,\n minHeight,\n maxHeight,\n width,\n minWidth,\n maxWidth,\n basicSetup,\n placeholder,\n indentWithTab,\n editable,\n readOnly,\n root,\n initialState\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var editor = useRef(null);\n var {\n state,\n view,\n container,\n setContainer\n } = useCodeMirror({\n root,\n value,\n autoFocus,\n theme,\n height,\n minHeight,\n maxHeight,\n width,\n minWidth,\n maxWidth,\n basicSetup,\n placeholder,\n indentWithTab,\n editable,\n readOnly,\n selection,\n onChange,\n onStatistics,\n onCreateEditor,\n onUpdate,\n extensions,\n initialState\n });\n useImperativeHandle(ref, () => ({\n editor: editor.current,\n state: state,\n view: view\n }), [editor, container, state, view]);\n var setEditorRef = useCallback(el => {\n editor.current = el;\n setContainer(el);\n }, [setContainer]);\n\n // check type of value\n if (typeof value !== 'string') {\n throw new Error(\"value must be typeof string but got \" + typeof value);\n }\n var defaultClassNames = typeof theme === 'string' ? \"cm-theme-\" + theme : 'cm-theme';\n return /*#__PURE__*/_jsx(\"div\", _extends({\n ref: setEditorRef,\n className: \"\" + defaultClassNames + (className ? \" \" + className : '')\n }, other));\n});\nReactCodeMirror.displayName = 'CodeMirror';\nexport default ReactCodeMirror;"],"names":["_excluded","ReactCodeMirror","forwardRef","props","ref","className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState","other","_objectWithoutPropertiesLoose","editor","useRef","state","view","container","setContainer","useCodeMirror","useImperativeHandle","setEditorRef","useCallback","el","defaultClassNames","_jsx","_extends"],"mappings":"sYAEA,IAAIA,EAAY,CAAC,YAAa,QAAS,YAAa,aAAc,WAAY,eAAgB,iBAAkB,WAAY,YAAa,QAAS,SAAU,YAAa,YAAa,QAAS,WAAY,WAAY,aAAc,cAAe,gBAAiB,WAAY,WAAY,OAAQ,cAAc,EAU/SC,EAA+BC,EAAAA,WAAW,CAACC,EAAO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GAAqBpC,EAAY,IAAMA,EAAY,GACvE,EAAKuB,CAAK,CAAC,CACX,CAAC,EACD3B,EAAgB,YAAc","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs","sources":["../../../../../node_modules/@uiw/react-codemirror/esm/index.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"className\", \"value\", \"selection\", \"extensions\", \"onChange\", \"onStatistics\", \"onCreateEditor\", \"onUpdate\", \"autoFocus\", \"theme\", \"height\", \"minHeight\", \"maxHeight\", \"width\", \"minWidth\", \"maxWidth\", \"basicSetup\", \"placeholder\", \"indentWithTab\", \"editable\", \"readOnly\", \"root\", \"initialState\"];\nimport React, { useRef, forwardRef, useImperativeHandle, useCallback } from 'react';\nimport { useCodeMirror } from \"./useCodeMirror.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport * from '@codemirror/view';\nexport * from '@codemirror/state';\nexport * from '@uiw/codemirror-extensions-basic-setup';\nexport * from \"./useCodeMirror.js\";\nexport * from \"./getDefaultExtensions.js\";\nexport * from \"./utils.js\";\nvar ReactCodeMirror = /*#__PURE__*/forwardRef((props, ref) => {\n var {\n className,\n value = '',\n selection,\n extensions = [],\n onChange,\n onStatistics,\n onCreateEditor,\n onUpdate,\n autoFocus,\n theme = 'light',\n height,\n minHeight,\n maxHeight,\n width,\n minWidth,\n maxWidth,\n basicSetup,\n placeholder,\n indentWithTab,\n editable,\n readOnly,\n root,\n initialState\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var editor = useRef(null);\n var {\n state,\n view,\n container,\n setContainer\n } = useCodeMirror({\n root,\n value,\n autoFocus,\n theme,\n height,\n minHeight,\n maxHeight,\n width,\n minWidth,\n maxWidth,\n basicSetup,\n placeholder,\n indentWithTab,\n editable,\n readOnly,\n selection,\n onChange,\n onStatistics,\n onCreateEditor,\n onUpdate,\n extensions,\n initialState\n });\n useImperativeHandle(ref, () => ({\n editor: editor.current,\n state: state,\n view: view\n }), [editor, container, state, view]);\n var setEditorRef = useCallback(el => {\n editor.current = el;\n setContainer(el);\n }, [setContainer]);\n\n // check type of value\n if (typeof value !== 'string') {\n throw new Error(\"value must be typeof string but got \" + typeof value);\n }\n var defaultClassNames = typeof theme === 'string' ? \"cm-theme-\" + theme : 'cm-theme';\n return /*#__PURE__*/_jsx(\"div\", _extends({\n ref: setEditorRef,\n className: \"\" + defaultClassNames + (className ? \" \" + className : '')\n }, other));\n});\nReactCodeMirror.displayName = 'CodeMirror';\nexport default ReactCodeMirror;"],"names":["_excluded","ReactCodeMirror","forwardRef","props","ref","className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState","other","_objectWithoutPropertiesLoose","editor","useRef","state","view","container","setContainer","useCodeMirror","useImperativeHandle","setEditorRef","useCallback","el","defaultClassNames","_jsx","_extends"],"mappings":"mXAEA,IAAIA,EAAY,CAAC,YAAa,QAAS,YAAa,aAAc,WAAY,eAAgB,iBAAkB,WAAY,YAAa,QAAS,SAAU,YAAa,YAAa,QAAS,WAAY,WAAY,aAAc,cAAe,gBAAiB,WAAY,WAAY,OAAQ,cAAc,EAU/SC,EAA+BC,EAAAA,WAAW,CAACC,EAAOC,IAAQ,CAC5D,GAAI,CACA,UAAAC,EACA,MAAAC,EAAQ,GACR,UAAAC,EACA,WAAAC,EAAa,CAAA,EACb,SAAAC,EACA,aAAAC,EACA,eAAAC,EACA,SAAAC,EACA,UAAAC,EACA,MAAAC,EAAQ,QACR,OAAAC,EACA,UAAAC,EACA,UAAAC,EACA,MAAAC,EACA,SAAAC,EACA,SAAAC,EACA,WAAAC,EACA,YAAAC,EACA,cAAAC,EACA,SAAAC,EACA,SAAAC,EACA,KAAAC,EACA,aAAAC,CACN,EAAQxB,EACJyB,EAAQC,EAAAA,QAA8B1B,EAAOH,CAAS,EACpD8B,EAASC,EAAAA,OAAO,IAAI,EACpB,CACF,MAAAC,EACA,KAAAC,EACA,UAAAC,EACA,aAAAC,CACJ,EAAMC,gBAAc,CAChB,KAAAV,EACA,MAAApB,EACA,UAAAO,EACA,MAAAC,EACA,OAAAC,EACA,UAAAC,EACA,UAAAC,EACA,MAAAC,EACA,SAAAC,EACA,SAAAC,EACA,WAAAC,EACA,YAAAC,EACA,cAAAC,EACA,SAAAC,EACA,SAAAC,EACA,UAAAlB,EACA,SAAAE,EACA,aAAAC,EACA,eAAAC,EACA,SAAAC,EACA,WAAAJ,EACA,aAAAmB,CACJ,CAAG,EACDU,EAAAA,oBAAoBjC,EAAK,KAAO,CAC9B,OAAQ0B,EAAO,QACf,MAAOE,EACP,KAAMC,CACV,GAAM,CAACH,EAAQI,EAAWF,EAAOC,CAAI,CAAC,EACpC,IAAIK,EAAeC,EAAAA,YAAYC,GAAM,CACnCV,EAAO,QAAUU,EACjBL,EAAaK,CAAE,CACjB,EAAG,CAACL,CAAY,CAAC,EAGjB,GAAI,OAAO7B,GAAU,SACnB,MAAM,IAAI,MAAM,uCAAyC,OAAOA,CAAK,EAEvE,IAAImC,EAAoB,OAAO3B,GAAU,SAAW,YAAcA,EAAQ,WAC1E,OAAoB4B,EAAAA,IAAK,MAAOC,UAAS,CACvC,IAAKL,EACL,UAAW,GAAKG,GAAqBpC,EAAY,IAAMA,EAAY,GACvE,EAAKuB,CAAK,CAAC,CACX,CAAC,EACD3B,EAAgB,YAAc","x_google_ignoreList":[0]}
@@ -3,9 +3,9 @@ import L from "../../../@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.
3
3
  import { forwardRef as U, useRef as k, useImperativeHandle as I, useCallback as P } from "react";
4
4
  import { useCodeMirror as q } from "./useCodeMirror.es.js";
5
5
  import { ExternalChange as Y } from "./useCodeMirror.es.js";
6
- import { j as z } from "../../../../_virtual/jsx-runtime.es.js";
6
+ import { jsx as z } from "react/jsx-runtime";
7
7
  import { defaultLightThemeOption as $ } from "./theme/light.es.js";
8
- var A = ["className", "value", "selection", "extensions", "onChange", "onStatistics", "onCreateEditor", "onUpdate", "autoFocus", "theme", "height", "minHeight", "maxHeight", "width", "minWidth", "maxWidth", "basicSetup", "placeholder", "indentWithTab", "editable", "readOnly", "root", "initialState"], B = /* @__PURE__ */ U((r, d) => {
8
+ var A = ["className", "value", "selection", "extensions", "onChange", "onStatistics", "onCreateEditor", "onUpdate", "autoFocus", "theme", "height", "minHeight", "maxHeight", "width", "minWidth", "maxWidth", "basicSetup", "placeholder", "indentWithTab", "editable", "readOnly", "root", "initialState"], B = /* @__PURE__ */ U((r, m) => {
9
9
  var {
10
10
  className: a,
11
11
  value: e = "",
@@ -13,67 +13,67 @@ var A = ["className", "value", "selection", "extensions", "onChange", "onStatist
13
13
  extensions: l = [],
14
14
  onChange: u,
15
15
  onStatistics: c,
16
- onCreateEditor: p,
17
- onUpdate: f,
16
+ onCreateEditor: f,
17
+ onUpdate: p,
18
18
  autoFocus: g,
19
19
  theme: t = "light",
20
- height: x,
21
- minHeight: v,
20
+ height: v,
21
+ minHeight: x,
22
22
  maxHeight: C,
23
23
  width: b,
24
24
  minWidth: w,
25
25
  maxWidth: y,
26
26
  basicSetup: W,
27
- placeholder: E,
28
- indentWithTab: S,
27
+ placeholder: S,
28
+ indentWithTab: E,
29
29
  editable: H,
30
30
  readOnly: N,
31
31
  root: R,
32
- initialState: j
33
- } = r, M = L(r, A), i = k(null), {
32
+ initialState: M
33
+ } = r, O = L(r, A), i = k(null), {
34
34
  state: o,
35
35
  view: n,
36
- container: O,
36
+ container: T,
37
37
  setContainer: s
38
38
  } = q({
39
39
  root: R,
40
40
  value: e,
41
41
  autoFocus: g,
42
42
  theme: t,
43
- height: x,
44
- minHeight: v,
43
+ height: v,
44
+ minHeight: x,
45
45
  maxHeight: C,
46
46
  width: b,
47
47
  minWidth: w,
48
48
  maxWidth: y,
49
49
  basicSetup: W,
50
- placeholder: E,
51
- indentWithTab: S,
50
+ placeholder: S,
51
+ indentWithTab: E,
52
52
  editable: H,
53
53
  readOnly: N,
54
54
  selection: h,
55
55
  onChange: u,
56
56
  onStatistics: c,
57
- onCreateEditor: p,
58
- onUpdate: f,
57
+ onCreateEditor: f,
58
+ onUpdate: p,
59
59
  extensions: l,
60
- initialState: j
60
+ initialState: M
61
61
  });
62
- I(d, () => ({
62
+ I(m, () => ({
63
63
  editor: i.current,
64
64
  state: o,
65
65
  view: n
66
- }), [i, O, o, n]);
67
- var T = P((m) => {
68
- i.current = m, s(m);
66
+ }), [i, T, o, n]);
67
+ var _ = P((d) => {
68
+ i.current = d, s(d);
69
69
  }, [s]);
70
70
  if (typeof e != "string")
71
71
  throw new Error("value must be typeof string but got " + typeof e);
72
- var _ = typeof t == "string" ? "cm-theme-" + t : "cm-theme";
73
- return /* @__PURE__ */ z.jsx("div", F({
74
- ref: T,
75
- className: "" + _ + (a ? " " + a : "")
76
- }, M));
72
+ var j = typeof t == "string" ? "cm-theme-" + t : "cm-theme";
73
+ return /* @__PURE__ */ z("div", F({
74
+ ref: _,
75
+ className: "" + j + (a ? " " + a : "")
76
+ }, O));
77
77
  });
78
78
  B.displayName = "CodeMirror";
79
79
  export {
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":["../../../../../node_modules/@uiw/react-codemirror/esm/index.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"className\", \"value\", \"selection\", \"extensions\", \"onChange\", \"onStatistics\", \"onCreateEditor\", \"onUpdate\", \"autoFocus\", \"theme\", \"height\", \"minHeight\", \"maxHeight\", \"width\", \"minWidth\", \"maxWidth\", \"basicSetup\", \"placeholder\", \"indentWithTab\", \"editable\", \"readOnly\", \"root\", \"initialState\"];\nimport React, { useRef, forwardRef, useImperativeHandle, useCallback } from 'react';\nimport { useCodeMirror } from \"./useCodeMirror.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport * from '@codemirror/view';\nexport * from '@codemirror/state';\nexport * from '@uiw/codemirror-extensions-basic-setup';\nexport * from \"./useCodeMirror.js\";\nexport * from \"./getDefaultExtensions.js\";\nexport * from \"./utils.js\";\nvar ReactCodeMirror = /*#__PURE__*/forwardRef((props, ref) => {\n var {\n className,\n value = '',\n selection,\n extensions = [],\n onChange,\n onStatistics,\n onCreateEditor,\n onUpdate,\n autoFocus,\n theme = 'light',\n height,\n minHeight,\n maxHeight,\n width,\n minWidth,\n maxWidth,\n basicSetup,\n placeholder,\n indentWithTab,\n editable,\n readOnly,\n root,\n initialState\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var editor = useRef(null);\n var {\n state,\n view,\n container,\n setContainer\n } = useCodeMirror({\n root,\n value,\n autoFocus,\n theme,\n height,\n minHeight,\n maxHeight,\n width,\n minWidth,\n maxWidth,\n basicSetup,\n placeholder,\n indentWithTab,\n editable,\n readOnly,\n selection,\n onChange,\n onStatistics,\n onCreateEditor,\n onUpdate,\n extensions,\n initialState\n });\n useImperativeHandle(ref, () => ({\n editor: editor.current,\n state: state,\n view: view\n }), [editor, container, state, view]);\n var setEditorRef = useCallback(el => {\n editor.current = el;\n setContainer(el);\n }, [setContainer]);\n\n // check type of value\n if (typeof value !== 'string') {\n throw new Error(\"value must be typeof string but got \" + typeof value);\n }\n var defaultClassNames = typeof theme === 'string' ? \"cm-theme-\" + theme : 'cm-theme';\n return /*#__PURE__*/_jsx(\"div\", _extends({\n ref: setEditorRef,\n className: \"\" + defaultClassNames + (className ? \" \" + className : '')\n }, other));\n});\nReactCodeMirror.displayName = 'CodeMirror';\nexport default ReactCodeMirror;"],"names":["_excluded","ReactCodeMirror","forwardRef","props","ref","className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState","other","_objectWithoutPropertiesLoose","editor","useRef","state","view","container","setContainer","useCodeMirror","useImperativeHandle","setEditorRef","useCallback","el","defaultClassNames","_jsx","_extends"],"mappings":";;;;;;;AAEA,IAAIA,IAAY,CAAC,aAAa,SAAS,aAAa,cAAc,YAAY,gBAAgB,kBAAkB,YAAY,aAAa,SAAS,UAAU,aAAa,aAAa,SAAS,YAAY,YAAY,cAAc,eAAe,iBAAiB,YAAY,YAAY,QAAQ,cAAc,GAU/SC,IAA+B,gBAAAC,EAAW,CAACC,GAAOC,MAAQ;AAC5D,MAAI;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,IACR,WAAAC;AAAA,IACA,YAAAC,IAAa,CAAA;AAAA,IACb,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,IACR,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,YAAAC;AAAA,IACA,aAAAC;AAAA,IACA,eAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,MAAAC;AAAA,IACA,cAAAC;AAAA,EACN,IAAQxB,GACJyB,IAAQC,EAA8B1B,GAAOH,CAAS,GACpD8B,IAASC,EAAO,IAAI,GACpB;AAAA,IACF,OAAAC;AAAA,IACA,MAAAC;AAAA,IACA,WAAAC;AAAA,IACA,cAAAC;AAAA,EACJ,IAAMC,EAAc;AAAA,IAChB,MAAAV;AAAA,IACA,OAAApB;AAAA,IACA,WAAAO;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,YAAAC;AAAA,IACA,aAAAC;AAAA,IACA,eAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAlB;AAAA,IACA,UAAAE;AAAA,IACA,cAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,YAAAJ;AAAA,IACA,cAAAmB;AAAA,EACJ,CAAG;AACD,EAAAU,EAAoBjC,GAAK,OAAO;AAAA,IAC9B,QAAQ0B,EAAO;AAAA,IACf,OAAOE;AAAA,IACP,MAAMC;AAAA,EACV,IAAM,CAACH,GAAQI,GAAWF,GAAOC,CAAI,CAAC;AACpC,MAAIK,IAAeC,EAAY,CAAAC,MAAM;AACnC,IAAAV,EAAO,UAAUU,GACjBL,EAAaK,CAAE;AAAA,EACjB,GAAG,CAACL,CAAY,CAAC;AAGjB,MAAI,OAAO7B,KAAU;AACnB,UAAM,IAAI,MAAM,yCAAyC,OAAOA,CAAK;AAEvE,MAAImC,IAAoB,OAAO3B,KAAU,WAAW,cAAcA,IAAQ;AAC1E,SAAoB4B,gBAAAA,EAAAA,IAAK,OAAOC,EAAS;AAAA,IACvC,KAAKL;AAAA,IACL,WAAW,KAAKG,KAAqBpC,IAAY,MAAMA,IAAY;AAAA,EACvE,GAAKuB,CAAK,CAAC;AACX,CAAC;AACD3B,EAAgB,cAAc;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es.js","sources":["../../../../../node_modules/@uiw/react-codemirror/esm/index.js"],"sourcesContent":["import _extends from \"@babel/runtime/helpers/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/objectWithoutPropertiesLoose\";\nvar _excluded = [\"className\", \"value\", \"selection\", \"extensions\", \"onChange\", \"onStatistics\", \"onCreateEditor\", \"onUpdate\", \"autoFocus\", \"theme\", \"height\", \"minHeight\", \"maxHeight\", \"width\", \"minWidth\", \"maxWidth\", \"basicSetup\", \"placeholder\", \"indentWithTab\", \"editable\", \"readOnly\", \"root\", \"initialState\"];\nimport React, { useRef, forwardRef, useImperativeHandle, useCallback } from 'react';\nimport { useCodeMirror } from \"./useCodeMirror.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport * from '@codemirror/view';\nexport * from '@codemirror/state';\nexport * from '@uiw/codemirror-extensions-basic-setup';\nexport * from \"./useCodeMirror.js\";\nexport * from \"./getDefaultExtensions.js\";\nexport * from \"./utils.js\";\nvar ReactCodeMirror = /*#__PURE__*/forwardRef((props, ref) => {\n var {\n className,\n value = '',\n selection,\n extensions = [],\n onChange,\n onStatistics,\n onCreateEditor,\n onUpdate,\n autoFocus,\n theme = 'light',\n height,\n minHeight,\n maxHeight,\n width,\n minWidth,\n maxWidth,\n basicSetup,\n placeholder,\n indentWithTab,\n editable,\n readOnly,\n root,\n initialState\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n var editor = useRef(null);\n var {\n state,\n view,\n container,\n setContainer\n } = useCodeMirror({\n root,\n value,\n autoFocus,\n theme,\n height,\n minHeight,\n maxHeight,\n width,\n minWidth,\n maxWidth,\n basicSetup,\n placeholder,\n indentWithTab,\n editable,\n readOnly,\n selection,\n onChange,\n onStatistics,\n onCreateEditor,\n onUpdate,\n extensions,\n initialState\n });\n useImperativeHandle(ref, () => ({\n editor: editor.current,\n state: state,\n view: view\n }), [editor, container, state, view]);\n var setEditorRef = useCallback(el => {\n editor.current = el;\n setContainer(el);\n }, [setContainer]);\n\n // check type of value\n if (typeof value !== 'string') {\n throw new Error(\"value must be typeof string but got \" + typeof value);\n }\n var defaultClassNames = typeof theme === 'string' ? \"cm-theme-\" + theme : 'cm-theme';\n return /*#__PURE__*/_jsx(\"div\", _extends({\n ref: setEditorRef,\n className: \"\" + defaultClassNames + (className ? \" \" + className : '')\n }, other));\n});\nReactCodeMirror.displayName = 'CodeMirror';\nexport default ReactCodeMirror;"],"names":["_excluded","ReactCodeMirror","forwardRef","props","ref","className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState","other","_objectWithoutPropertiesLoose","editor","useRef","state","view","container","setContainer","useCodeMirror","useImperativeHandle","setEditorRef","useCallback","el","defaultClassNames","_jsx","_extends"],"mappings":";;;;;;;AAEA,IAAIA,IAAY,CAAC,aAAa,SAAS,aAAa,cAAc,YAAY,gBAAgB,kBAAkB,YAAY,aAAa,SAAS,UAAU,aAAa,aAAa,SAAS,YAAY,YAAY,cAAc,eAAe,iBAAiB,YAAY,YAAY,QAAQ,cAAc,GAU/SC,IAA+B,gBAAAC,EAAW,CAACC,GAAOC,MAAQ;AAC5D,MAAI;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,IACR,WAAAC;AAAA,IACA,YAAAC,IAAa,CAAA;AAAA,IACb,UAAAC;AAAA,IACA,cAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC,IAAQ;AAAA,IACR,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,YAAAC;AAAA,IACA,aAAAC;AAAA,IACA,eAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,MAAAC;AAAA,IACA,cAAAC;AAAA,EACN,IAAQxB,GACJyB,IAAQC,EAA8B1B,GAAOH,CAAS,GACpD8B,IAASC,EAAO,IAAI,GACpB;AAAA,IACF,OAAAC;AAAA,IACA,MAAAC;AAAA,IACA,WAAAC;AAAA,IACA,cAAAC;AAAA,EACJ,IAAMC,EAAc;AAAA,IAChB,MAAAV;AAAA,IACA,OAAApB;AAAA,IACA,WAAAO;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,WAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,YAAAC;AAAA,IACA,aAAAC;AAAA,IACA,eAAAC;AAAA,IACA,UAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAlB;AAAA,IACA,UAAAE;AAAA,IACA,cAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,UAAAC;AAAA,IACA,YAAAJ;AAAA,IACA,cAAAmB;AAAA,EACJ,CAAG;AACD,EAAAU,EAAoBjC,GAAK,OAAO;AAAA,IAC9B,QAAQ0B,EAAO;AAAA,IACf,OAAOE;AAAA,IACP,MAAMC;AAAA,EACV,IAAM,CAACH,GAAQI,GAAWF,GAAOC,CAAI,CAAC;AACpC,MAAIK,IAAeC,EAAY,CAAAC,MAAM;AACnC,IAAAV,EAAO,UAAUU,GACjBL,EAAaK,CAAE;AAAA,EACjB,GAAG,CAACL,CAAY,CAAC;AAGjB,MAAI,OAAO7B,KAAU;AACnB,UAAM,IAAI,MAAM,yCAAyC,OAAOA,CAAK;AAEvE,MAAImC,IAAoB,OAAO3B,KAAU,WAAW,cAAcA,IAAQ;AAC1E,SAAoB4B,gBAAAA,EAAK,OAAOC,EAAS;AAAA,IACvC,KAAKL;AAAA,IACL,WAAW,KAAKG,KAAqBpC,IAAY,MAAMA,IAAY;AAAA,EACvE,GAAKuB,CAAK,CAAC;AACX,CAAC;AACD3B,EAAgB,cAAc;","x_google_ignoreList":[0]}
@@ -3,5 +3,5 @@
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const e=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],t=o.default("chevron-down",e);exports.__iconNode=e;exports.default=t;
7
- //# sourceMappingURL=chevron-down.cjs.map
6
+ */const e=[["path",{d:"m7 6 5 5 5-5",key:"1lc07p"}],["path",{d:"m7 13 5 5 5-5",key:"1d48rs"}]],t=o.default("chevrons-down",e);exports.__iconNode=e;exports.default=t;
7
+ //# sourceMappingURL=chevrons-down.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chevrons-down.cjs","sources":["../../../../../../node_modules/lucide-react/dist/esm/icons/chevrons-down.js"],"sourcesContent":["/**\n * @license lucide-react v0.525.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"m7 6 5 5 5-5\", key: \"1lc07p\" }],\n [\"path\", { d: \"m7 13 5 5 5-5\", key: \"1d48rs\" }]\n];\nconst ChevronsDown = createLucideIcon(\"chevrons-down\", __iconNode);\n\nexport { __iconNode, ChevronsDown as default };\n//# sourceMappingURL=chevrons-down.js.map\n"],"names":["__iconNode","ChevronsDown","createLucideIcon"],"mappings":"uJAAA;AAAA;AAAA;AAAA;AAAA;AAAA,GASK,MAACA,EAAa,CACjB,CAAC,OAAQ,CAAE,EAAG,eAAgB,IAAK,QAAQ,CAAE,EAC7C,CAAC,OAAQ,CAAE,EAAG,gBAAiB,IAAK,QAAQ,CAAE,CAChD,EACMC,EAAeC,EAAAA,QAAiB,gBAAiBF,CAAU","x_google_ignoreList":[0]}
@@ -5,9 +5,12 @@ import o from "../createLucideIcon.es.js";
5
5
  * This source code is licensed under the ISC license.
6
6
  * See the LICENSE file in the root directory of this source tree.
7
7
  */
8
- const e = [["path", { d: "m6 9 6 6 6-6", key: "qrunsl" }]], c = o("chevron-down", e);
8
+ const e = [
9
+ ["path", { d: "m7 6 5 5 5-5", key: "1lc07p" }],
10
+ ["path", { d: "m7 13 5 5 5-5", key: "1d48rs" }]
11
+ ], n = o("chevrons-down", e);
9
12
  export {
10
13
  e as __iconNode,
11
- c as default
14
+ n as default
12
15
  };
13
- //# sourceMappingURL=chevron-down.es.js.map
16
+ //# sourceMappingURL=chevrons-down.es.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chevrons-down.es.js","sources":["../../../../../../node_modules/lucide-react/dist/esm/icons/chevrons-down.js"],"sourcesContent":["/**\n * @license lucide-react v0.525.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.js';\n\nconst __iconNode = [\n [\"path\", { d: \"m7 6 5 5 5-5\", key: \"1lc07p\" }],\n [\"path\", { d: \"m7 13 5 5 5-5\", key: \"1d48rs\" }]\n];\nconst ChevronsDown = createLucideIcon(\"chevrons-down\", __iconNode);\n\nexport { __iconNode, ChevronsDown as default };\n//# sourceMappingURL=chevrons-down.js.map\n"],"names":["__iconNode","ChevronsDown","createLucideIcon"],"mappings":";AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AASK,MAACA,IAAa;AAAA,EACjB,CAAC,QAAQ,EAAE,GAAG,gBAAgB,KAAK,SAAQ,CAAE;AAAA,EAC7C,CAAC,QAAQ,EAAE,GAAG,iBAAiB,KAAK,SAAQ,CAAE;AAChD,GACMC,IAAeC,EAAiB,iBAAiBF,CAAU;","x_google_ignoreList":[0]}
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("../../devlop/lib/default.cjs"),c=require("../../../_virtual/jsx-runtime.cjs");require("react");const O=require("../../unified/lib/index.cjs"),j=require("../../remark-parse/lib/index.cjs"),E=require("../../remark-rehype/lib/index.cjs"),v=require("../../vfile/lib/index.cjs"),P=require("../../unist-util-visit/lib/index.cjs"),q=require("../../hast-util-to-jsx-runtime/lib/index.cjs"),m=require("../../html-url-attributes/lib/index.cjs"),R="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",f=[],p={allowDangerousHtml:!0},T=/^(https?|ircs?|mailto|xmpp)$/i,N=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function S(r){const e=$(r),s=H(r);return U(e.runSync(e.parse(s),s),r)}function $(r){const e=r.rehypePlugins||f,s=r.remarkPlugins||f,l=r.remarkRehypeOptions?{...r.remarkRehypeOptions,...p}:p;return O.unified().use(j.default).use(s).use(E.default,l).use(e)}function H(r){const e=r.children||"",s=new v.VFile;return typeof e=="string"&&(s.value=e),s}function U(r,e){const s=e.allowedElements,l=e.allowElement,a=e.components,u=e.disallowedElements,w=e.skipHtml,h=e.unwrapDisallowed,y=e.urlTransform||g;for(const t of N)Object.hasOwn(e,t.from)&&b.unreachable("Unexpected `"+t.from+"` prop, "+(t.to?"use `"+t.to+"` instead":"remove it")+" (see <"+R+"#"+t.id+"> for more info)");return P.visit(r,k),q.toJsxRuntime(r,{Fragment:c.jsxRuntimeExports.Fragment,components:a,ignoreInvalidStyle:!0,jsx:c.jsxRuntimeExports.jsx,jsxs:c.jsxRuntimeExports.jsxs,passKeys:!0,passNode:!0});function k(t,n,i){if(t.type==="raw"&&i&&typeof n=="number")return w?i.children.splice(n,1):i.children[n]={type:"text",value:t.value},n;if(t.type==="element"){let o;for(o in m.urlAttributes)if(Object.hasOwn(m.urlAttributes,o)&&Object.hasOwn(t.properties,o)){const x=t.properties[o],d=m.urlAttributes[o];(d===null||d.includes(t.tagName))&&(t.properties[o]=y(String(x||""),o,t))}}if(t.type==="element"){let o=s?!s.includes(t.tagName):u?u.includes(t.tagName):!1;if(!o&&l&&typeof n=="number"&&(o=!l(t,n,i)),o&&i&&typeof n=="number")return h&&t.children?i.children.splice(n,1,...t.children):i.children.splice(n,1),n}}}function g(r){const e=r.indexOf(":"),s=r.indexOf("?"),l=r.indexOf("#"),a=r.indexOf("/");return e===-1||a!==-1&&e>a||s!==-1&&e>s||l!==-1&&e>l||T.test(r.slice(0,e))?r:""}exports.Markdown=S;exports.defaultUrlTransform=g;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const x=require("../../devlop/lib/default.cjs"),c=require("react/jsx-runtime");require("react");const O=require("../../unified/lib/index.cjs"),v=require("../../remark-parse/lib/index.cjs"),P=require("../../remark-rehype/lib/index.cjs"),q=require("../../vfile/lib/index.cjs"),j=require("../../unist-util-visit/lib/index.cjs"),E=require("../../hast-util-to-jsx-runtime/lib/index.cjs"),m=require("../../html-url-attributes/lib/index.cjs"),T="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",f=[],p={allowDangerousHtml:!0},N=/^(https?|ircs?|mailto|xmpp)$/i,R=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function S(r){const e=$(r),s=H(r);return U(e.runSync(e.parse(s),s),r)}function $(r){const e=r.rehypePlugins||f,s=r.remarkPlugins||f,l=r.remarkRehypeOptions?{...r.remarkRehypeOptions,...p}:p;return O.unified().use(v.default).use(s).use(P.default,l).use(e)}function H(r){const e=r.children||"",s=new q.VFile;return typeof e=="string"&&(s.value=e),s}function U(r,e){const s=e.allowedElements,l=e.allowElement,a=e.components,u=e.disallowedElements,w=e.skipHtml,h=e.unwrapDisallowed,y=e.urlTransform||g;for(const t of R)Object.hasOwn(e,t.from)&&x.unreachable("Unexpected `"+t.from+"` prop, "+(t.to?"use `"+t.to+"` instead":"remove it")+" (see <"+T+"#"+t.id+"> for more info)");return j.visit(r,k),E.toJsxRuntime(r,{Fragment:c.Fragment,components:a,ignoreInvalidStyle:!0,jsx:c.jsx,jsxs:c.jsxs,passKeys:!0,passNode:!0});function k(t,n,i){if(t.type==="raw"&&i&&typeof n=="number")return w?i.children.splice(n,1):i.children[n]={type:"text",value:t.value},n;if(t.type==="element"){let o;for(o in m.urlAttributes)if(Object.hasOwn(m.urlAttributes,o)&&Object.hasOwn(t.properties,o)){const b=t.properties[o],d=m.urlAttributes[o];(d===null||d.includes(t.tagName))&&(t.properties[o]=y(String(b||""),o,t))}}if(t.type==="element"){let o=s?!s.includes(t.tagName):u?u.includes(t.tagName):!1;if(!o&&l&&typeof n=="number"&&(o=!l(t,n,i)),o&&i&&typeof n=="number")return h&&t.children?i.children.splice(n,1,...t.children):i.children.splice(n,1),n}}}function g(r){const e=r.indexOf(":"),s=r.indexOf("?"),l=r.indexOf("#"),a=r.indexOf("/");return e===-1||a!==-1&&e>a||s!==-1&&e>s||l!==-1&&e>l||N.test(r.slice(0,e))?r:""}exports.Markdown=S;exports.defaultUrlTransform=g;
2
2
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../node_modules/react-markdown/lib/index.js"],"sourcesContent":["/**\n * @import {Element, Nodes, Parents, Root} from 'hast'\n * @import {Root as MdastRoot} from 'mdast'\n * @import {ComponentType, JSX, ReactElement, ReactNode} from 'react'\n * @import {Options as RemarkRehypeOptions} from 'remark-rehype'\n * @import {BuildVisitor} from 'unist-util-visit'\n * @import {PluggableList, Processor} from 'unified'\n */\n\n/**\n * @callback AllowElement\n * Filter elements.\n * @param {Readonly<Element>} element\n * Element to check.\n * @param {number} index\n * Index of `element` in `parent`.\n * @param {Readonly<Parents> | undefined} parent\n * Parent of `element`.\n * @returns {boolean | null | undefined}\n * Whether to allow `element` (default: `false`).\n */\n\n/**\n * @typedef ExtraProps\n * Extra fields we pass.\n * @property {Element | undefined} [node]\n * passed when `passNode` is on.\n */\n\n/**\n * @typedef {{\n * [Key in keyof JSX.IntrinsicElements]?: ComponentType<JSX.IntrinsicElements[Key] & ExtraProps> | keyof JSX.IntrinsicElements\n * }} Components\n * Map tag names to components.\n */\n\n/**\n * @typedef Deprecation\n * Deprecation.\n * @property {string} from\n * Old field.\n * @property {string} id\n * ID in readme.\n * @property {keyof Options} [to]\n * New field.\n */\n\n/**\n * @typedef Options\n * Configuration.\n * @property {AllowElement | null | undefined} [allowElement]\n * Filter elements (optional);\n * `allowedElements` / `disallowedElements` is used first.\n * @property {ReadonlyArray<string> | null | undefined} [allowedElements]\n * Tag names to allow (default: all tag names);\n * cannot combine w/ `disallowedElements`.\n * @property {string | null | undefined} [children]\n * Markdown.\n * @property {Components | null | undefined} [components]\n * Map tag names to components.\n * @property {ReadonlyArray<string> | null | undefined} [disallowedElements]\n * Tag names to disallow (default: `[]`);\n * cannot combine w/ `allowedElements`.\n * @property {PluggableList | null | undefined} [rehypePlugins]\n * List of rehype plugins to use.\n * @property {PluggableList | null | undefined} [remarkPlugins]\n * List of remark plugins to use.\n * @property {Readonly<RemarkRehypeOptions> | null | undefined} [remarkRehypeOptions]\n * Options to pass through to `remark-rehype`.\n * @property {boolean | null | undefined} [skipHtml=false]\n * Ignore HTML in markdown completely (default: `false`).\n * @property {boolean | null | undefined} [unwrapDisallowed=false]\n * Extract (unwrap) what’s in disallowed elements (default: `false`);\n * normally when say `strong` is not allowed, it and it’s children are dropped,\n * with `unwrapDisallowed` the element itself is replaced by its children.\n * @property {UrlTransform | null | undefined} [urlTransform]\n * Change URLs (default: `defaultUrlTransform`)\n */\n\n/**\n * @typedef HooksOptionsOnly\n * Configuration specifically for {@linkcode MarkdownHooks}.\n * @property {ReactNode | null | undefined} [fallback]\n * Content to render while the processor processing the markdown (optional).\n */\n\n/**\n * @typedef {Options & HooksOptionsOnly} HooksOptions\n * Configuration for {@linkcode MarkdownHooks};\n * extends the regular {@linkcode Options} with a `fallback` prop.\n */\n\n/**\n * @callback UrlTransform\n * Transform all URLs.\n * @param {string} url\n * URL.\n * @param {string} key\n * Property name (example: `'href'`).\n * @param {Readonly<Element>} node\n * Node.\n * @returns {string | null | undefined}\n * Transformed URL (optional).\n */\n\nimport {unreachable} from 'devlop'\nimport {toJsxRuntime} from 'hast-util-to-jsx-runtime'\nimport {urlAttributes} from 'html-url-attributes'\nimport {Fragment, jsx, jsxs} from 'react/jsx-runtime'\nimport {useEffect, useState} from 'react'\nimport remarkParse from 'remark-parse'\nimport remarkRehype from 'remark-rehype'\nimport {unified} from 'unified'\nimport {visit} from 'unist-util-visit'\nimport {VFile} from 'vfile'\n\nconst changelog =\n 'https://github.com/remarkjs/react-markdown/blob/main/changelog.md'\n\n/** @type {PluggableList} */\nconst emptyPlugins = []\n/** @type {Readonly<RemarkRehypeOptions>} */\nconst emptyRemarkRehypeOptions = {allowDangerousHtml: true}\nconst safeProtocol = /^(https?|ircs?|mailto|xmpp)$/i\n\n// Mutable because we `delete` any time it’s used and a message is sent.\n/** @type {ReadonlyArray<Readonly<Deprecation>>} */\nconst deprecations = [\n {from: 'astPlugins', id: 'remove-buggy-html-in-markdown-parser'},\n {from: 'allowDangerousHtml', id: 'remove-buggy-html-in-markdown-parser'},\n {\n from: 'allowNode',\n id: 'replace-allownode-allowedtypes-and-disallowedtypes',\n to: 'allowElement'\n },\n {\n from: 'allowedTypes',\n id: 'replace-allownode-allowedtypes-and-disallowedtypes',\n to: 'allowedElements'\n },\n {from: 'className', id: 'remove-classname'},\n {\n from: 'disallowedTypes',\n id: 'replace-allownode-allowedtypes-and-disallowedtypes',\n to: 'disallowedElements'\n },\n {from: 'escapeHtml', id: 'remove-buggy-html-in-markdown-parser'},\n {from: 'includeElementIndex', id: '#remove-includeelementindex'},\n {\n from: 'includeNodeIndex',\n id: 'change-includenodeindex-to-includeelementindex'\n },\n {from: 'linkTarget', id: 'remove-linktarget'},\n {from: 'plugins', id: 'change-plugins-to-remarkplugins', to: 'remarkPlugins'},\n {from: 'rawSourcePos', id: '#remove-rawsourcepos'},\n {from: 'renderers', id: 'change-renderers-to-components', to: 'components'},\n {from: 'source', id: 'change-source-to-children', to: 'children'},\n {from: 'sourcePos', id: '#remove-sourcepos'},\n {from: 'transformImageUri', id: '#add-urltransform', to: 'urlTransform'},\n {from: 'transformLinkUri', id: '#add-urltransform', to: 'urlTransform'}\n]\n\n/**\n * Component to render markdown.\n *\n * This is a synchronous component.\n * When using async plugins,\n * see {@linkcode MarkdownAsync} or {@linkcode MarkdownHooks}.\n *\n * @param {Readonly<Options>} options\n * Props.\n * @returns {ReactElement}\n * React element.\n */\nexport function Markdown(options) {\n const processor = createProcessor(options)\n const file = createFile(options)\n return post(processor.runSync(processor.parse(file), file), options)\n}\n\n/**\n * Component to render markdown with support for async plugins\n * through async/await.\n *\n * Components returning promises are supported on the server.\n * For async support on the client,\n * see {@linkcode MarkdownHooks}.\n *\n * @param {Readonly<Options>} options\n * Props.\n * @returns {Promise<ReactElement>}\n * Promise to a React element.\n */\nexport async function MarkdownAsync(options) {\n const processor = createProcessor(options)\n const file = createFile(options)\n const tree = await processor.run(processor.parse(file), file)\n return post(tree, options)\n}\n\n/**\n * Component to render markdown with support for async plugins through hooks.\n *\n * This uses `useEffect` and `useState` hooks.\n * Hooks run on the client and do not immediately render something.\n * For async support on the server,\n * see {@linkcode MarkdownAsync}.\n *\n * @param {Readonly<HooksOptions>} options\n * Props.\n * @returns {ReactNode}\n * React node.\n */\nexport function MarkdownHooks(options) {\n const processor = createProcessor(options)\n const [error, setError] = useState(\n /** @type {Error | undefined} */ (undefined)\n )\n const [tree, setTree] = useState(/** @type {Root | undefined} */ (undefined))\n\n useEffect(\n function () {\n let cancelled = false\n const file = createFile(options)\n\n processor.run(processor.parse(file), file, function (error, tree) {\n if (!cancelled) {\n setError(error)\n setTree(tree)\n }\n })\n\n /**\n * @returns {undefined}\n * Nothing.\n */\n return function () {\n cancelled = true\n }\n },\n [\n options.children,\n options.rehypePlugins,\n options.remarkPlugins,\n options.remarkRehypeOptions\n ]\n )\n\n if (error) throw error\n\n return tree ? post(tree, options) : options.fallback\n}\n\n/**\n * Set up the `unified` processor.\n *\n * @param {Readonly<Options>} options\n * Props.\n * @returns {Processor<MdastRoot, MdastRoot, Root, undefined, undefined>}\n * Result.\n */\nfunction createProcessor(options) {\n const rehypePlugins = options.rehypePlugins || emptyPlugins\n const remarkPlugins = options.remarkPlugins || emptyPlugins\n const remarkRehypeOptions = options.remarkRehypeOptions\n ? {...options.remarkRehypeOptions, ...emptyRemarkRehypeOptions}\n : emptyRemarkRehypeOptions\n\n const processor = unified()\n .use(remarkParse)\n .use(remarkPlugins)\n .use(remarkRehype, remarkRehypeOptions)\n .use(rehypePlugins)\n\n return processor\n}\n\n/**\n * Set up the virtual file.\n *\n * @param {Readonly<Options>} options\n * Props.\n * @returns {VFile}\n * Result.\n */\nfunction createFile(options) {\n const children = options.children || ''\n const file = new VFile()\n\n if (typeof children === 'string') {\n file.value = children\n } else {\n unreachable(\n 'Unexpected value `' +\n children +\n '` for `children` prop, expected `string`'\n )\n }\n\n return file\n}\n\n/**\n * Process the result from unified some more.\n *\n * @param {Nodes} tree\n * Tree.\n * @param {Readonly<Options>} options\n * Props.\n * @returns {ReactElement}\n * React element.\n */\nfunction post(tree, options) {\n const allowedElements = options.allowedElements\n const allowElement = options.allowElement\n const components = options.components\n const disallowedElements = options.disallowedElements\n const skipHtml = options.skipHtml\n const unwrapDisallowed = options.unwrapDisallowed\n const urlTransform = options.urlTransform || defaultUrlTransform\n\n for (const deprecation of deprecations) {\n if (Object.hasOwn(options, deprecation.from)) {\n unreachable(\n 'Unexpected `' +\n deprecation.from +\n '` prop, ' +\n (deprecation.to\n ? 'use `' + deprecation.to + '` instead'\n : 'remove it') +\n ' (see <' +\n changelog +\n '#' +\n deprecation.id +\n '> for more info)'\n )\n }\n }\n\n if (allowedElements && disallowedElements) {\n unreachable(\n 'Unexpected combined `allowedElements` and `disallowedElements`, expected one or the other'\n )\n }\n\n visit(tree, transform)\n\n return toJsxRuntime(tree, {\n Fragment,\n components,\n ignoreInvalidStyle: true,\n jsx,\n jsxs,\n passKeys: true,\n passNode: true\n })\n\n /** @type {BuildVisitor<Root>} */\n function transform(node, index, parent) {\n if (node.type === 'raw' && parent && typeof index === 'number') {\n if (skipHtml) {\n parent.children.splice(index, 1)\n } else {\n parent.children[index] = {type: 'text', value: node.value}\n }\n\n return index\n }\n\n if (node.type === 'element') {\n /** @type {string} */\n let key\n\n for (key in urlAttributes) {\n if (\n Object.hasOwn(urlAttributes, key) &&\n Object.hasOwn(node.properties, key)\n ) {\n const value = node.properties[key]\n const test = urlAttributes[key]\n if (test === null || test.includes(node.tagName)) {\n node.properties[key] = urlTransform(String(value || ''), key, node)\n }\n }\n }\n }\n\n if (node.type === 'element') {\n let remove = allowedElements\n ? !allowedElements.includes(node.tagName)\n : disallowedElements\n ? disallowedElements.includes(node.tagName)\n : false\n\n if (!remove && allowElement && typeof index === 'number') {\n remove = !allowElement(node, index, parent)\n }\n\n if (remove && parent && typeof index === 'number') {\n if (unwrapDisallowed && node.children) {\n parent.children.splice(index, 1, ...node.children)\n } else {\n parent.children.splice(index, 1)\n }\n\n return index\n }\n }\n }\n}\n\n/**\n * Make a URL safe.\n *\n * @satisfies {UrlTransform}\n * @param {string} value\n * URL.\n * @returns {string}\n * Safe URL.\n */\nexport function defaultUrlTransform(value) {\n // Same as:\n // <https://github.com/micromark/micromark/blob/929275e/packages/micromark-util-sanitize-uri/dev/index.js#L34>\n // But without the `encode` part.\n const colon = value.indexOf(':')\n const questionMark = value.indexOf('?')\n const numberSign = value.indexOf('#')\n const slash = value.indexOf('/')\n\n if (\n // If there is no protocol, it’s relative.\n colon === -1 ||\n // If the first colon is after a `?`, `#`, or `/`, it’s not a protocol.\n (slash !== -1 && colon > slash) ||\n (questionMark !== -1 && colon > questionMark) ||\n (numberSign !== -1 && colon > numberSign) ||\n // It is a protocol, it should be allowed.\n safeProtocol.test(value.slice(0, colon))\n ) {\n return value\n }\n\n return ''\n}\n"],"names":["changelog","emptyPlugins","emptyRemarkRehypeOptions","safeProtocol","deprecations","Markdown","options","processor","createProcessor","file","createFile","post","rehypePlugins","remarkPlugins","remarkRehypeOptions","unified","remarkParse","remarkRehype","children","VFile","tree","allowedElements","allowElement","components","disallowedElements","skipHtml","unwrapDisallowed","urlTransform","defaultUrlTransform","deprecation","unreachable","visit","transform","toJsxRuntime","Fragment","jsx","jsxs","node","index","parent","key","urlAttributes","value","test","remove","colon","questionMark","numberSign","slash"],"mappings":"ohBAoHMA,EACJ,oEAGIC,EAAe,CAAA,EAEfC,EAA2B,CAAC,mBAAoB,EAAI,EACpDC,EAAe,gCAIfC,EAAe,CACnB,CAAC,KAAM,aAAc,GAAI,sCAAsC,EAC/D,CAAC,KAAM,qBAAsB,GAAI,sCAAsC,EACvE,CACE,KAAM,YACN,GAAI,qDACJ,GAAI,cACR,EACE,CACE,KAAM,eACN,GAAI,qDACJ,GAAI,iBACR,EACE,CAAC,KAAM,YAAa,GAAI,kBAAkB,EAC1C,CACE,KAAM,kBACN,GAAI,qDACJ,GAAI,oBACR,EACE,CAAC,KAAM,aAAc,GAAI,sCAAsC,EAC/D,CAA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,GAAgB,OAAOgB,GAAU,WAC9CM,EAAS,CAACtB,EAAae,EAAMC,EAAOC,CAAM,GAGxCK,GAAUL,GAAU,OAAOD,GAAU,SACvC,OAAIZ,GAAoBW,EAAK,SAC3BE,EAAO,SAAS,OAAOD,EAAO,EAAG,GAAGD,EAAK,QAAQ,EAEjDE,EAAO,SAAS,OAAOD,EAAO,CAAC,EAG1BA,CAEX,CACF,CACF,CAWO,SAASV,EAAoBc,EAAO,CAIzC,MAAMG,EAAQH,EAAM,QAAQ,GAAG,EACzBI,EAAeJ,EAAM,QAAQ,GAAG,EAChCK,EAAaL,EAAM,QAAQ,GAAG,EAC9BM,EAAQN,EAAM,QAAQ,GAAG,EAE/B,OAEEG,IAAU,IAETG,IAAU,IAAMH,EAAQG,GACxBF,IAAiB,IAAMD,EAAQC,GAC/BC,IAAe,IAAMF,EAAQE,GAE9B5C,EAAa,KAAKuC,EAAM,MAAM,EAAGG,CAAK,CAAC,EAEhCH,EAGF,EACT","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.cjs","sources":["../../../../node_modules/react-markdown/lib/index.js"],"sourcesContent":["/**\n * @import {Element, Nodes, Parents, Root} from 'hast'\n * @import {Root as MdastRoot} from 'mdast'\n * @import {ComponentType, JSX, ReactElement, ReactNode} from 'react'\n * @import {Options as RemarkRehypeOptions} from 'remark-rehype'\n * @import {BuildVisitor} from 'unist-util-visit'\n * @import {PluggableList, Processor} from 'unified'\n */\n\n/**\n * @callback AllowElement\n * Filter elements.\n * @param {Readonly<Element>} element\n * Element to check.\n * @param {number} index\n * Index of `element` in `parent`.\n * @param {Readonly<Parents> | undefined} parent\n * Parent of `element`.\n * @returns {boolean | null | undefined}\n * Whether to allow `element` (default: `false`).\n */\n\n/**\n * @typedef ExtraProps\n * Extra fields we pass.\n * @property {Element | undefined} [node]\n * passed when `passNode` is on.\n */\n\n/**\n * @typedef {{\n * [Key in keyof JSX.IntrinsicElements]?: ComponentType<JSX.IntrinsicElements[Key] & ExtraProps> | keyof JSX.IntrinsicElements\n * }} Components\n * Map tag names to components.\n */\n\n/**\n * @typedef Deprecation\n * Deprecation.\n * @property {string} from\n * Old field.\n * @property {string} id\n * ID in readme.\n * @property {keyof Options} [to]\n * New field.\n */\n\n/**\n * @typedef Options\n * Configuration.\n * @property {AllowElement | null | undefined} [allowElement]\n * Filter elements (optional);\n * `allowedElements` / `disallowedElements` is used first.\n * @property {ReadonlyArray<string> | null | undefined} [allowedElements]\n * Tag names to allow (default: all tag names);\n * cannot combine w/ `disallowedElements`.\n * @property {string | null | undefined} [children]\n * Markdown.\n * @property {Components | null | undefined} [components]\n * Map tag names to components.\n * @property {ReadonlyArray<string> | null | undefined} [disallowedElements]\n * Tag names to disallow (default: `[]`);\n * cannot combine w/ `allowedElements`.\n * @property {PluggableList | null | undefined} [rehypePlugins]\n * List of rehype plugins to use.\n * @property {PluggableList | null | undefined} [remarkPlugins]\n * List of remark plugins to use.\n * @property {Readonly<RemarkRehypeOptions> | null | undefined} [remarkRehypeOptions]\n * Options to pass through to `remark-rehype`.\n * @property {boolean | null | undefined} [skipHtml=false]\n * Ignore HTML in markdown completely (default: `false`).\n * @property {boolean | null | undefined} [unwrapDisallowed=false]\n * Extract (unwrap) what’s in disallowed elements (default: `false`);\n * normally when say `strong` is not allowed, it and it’s children are dropped,\n * with `unwrapDisallowed` the element itself is replaced by its children.\n * @property {UrlTransform | null | undefined} [urlTransform]\n * Change URLs (default: `defaultUrlTransform`)\n */\n\n/**\n * @typedef HooksOptionsOnly\n * Configuration specifically for {@linkcode MarkdownHooks}.\n * @property {ReactNode | null | undefined} [fallback]\n * Content to render while the processor processing the markdown (optional).\n */\n\n/**\n * @typedef {Options & HooksOptionsOnly} HooksOptions\n * Configuration for {@linkcode MarkdownHooks};\n * extends the regular {@linkcode Options} with a `fallback` prop.\n */\n\n/**\n * @callback UrlTransform\n * Transform all URLs.\n * @param {string} url\n * URL.\n * @param {string} key\n * Property name (example: `'href'`).\n * @param {Readonly<Element>} node\n * Node.\n * @returns {string | null | undefined}\n * Transformed URL (optional).\n */\n\nimport {unreachable} from 'devlop'\nimport {toJsxRuntime} from 'hast-util-to-jsx-runtime'\nimport {urlAttributes} from 'html-url-attributes'\nimport {Fragment, jsx, jsxs} from 'react/jsx-runtime'\nimport {useEffect, useState} from 'react'\nimport remarkParse from 'remark-parse'\nimport remarkRehype from 'remark-rehype'\nimport {unified} from 'unified'\nimport {visit} from 'unist-util-visit'\nimport {VFile} from 'vfile'\n\nconst changelog =\n 'https://github.com/remarkjs/react-markdown/blob/main/changelog.md'\n\n/** @type {PluggableList} */\nconst emptyPlugins = []\n/** @type {Readonly<RemarkRehypeOptions>} */\nconst emptyRemarkRehypeOptions = {allowDangerousHtml: true}\nconst safeProtocol = /^(https?|ircs?|mailto|xmpp)$/i\n\n// Mutable because we `delete` any time it’s used and a message is sent.\n/** @type {ReadonlyArray<Readonly<Deprecation>>} */\nconst deprecations = [\n {from: 'astPlugins', id: 'remove-buggy-html-in-markdown-parser'},\n {from: 'allowDangerousHtml', id: 'remove-buggy-html-in-markdown-parser'},\n {\n from: 'allowNode',\n id: 'replace-allownode-allowedtypes-and-disallowedtypes',\n to: 'allowElement'\n },\n {\n from: 'allowedTypes',\n id: 'replace-allownode-allowedtypes-and-disallowedtypes',\n to: 'allowedElements'\n },\n {from: 'className', id: 'remove-classname'},\n {\n from: 'disallowedTypes',\n id: 'replace-allownode-allowedtypes-and-disallowedtypes',\n to: 'disallowedElements'\n },\n {from: 'escapeHtml', id: 'remove-buggy-html-in-markdown-parser'},\n {from: 'includeElementIndex', id: '#remove-includeelementindex'},\n {\n from: 'includeNodeIndex',\n id: 'change-includenodeindex-to-includeelementindex'\n },\n {from: 'linkTarget', id: 'remove-linktarget'},\n {from: 'plugins', id: 'change-plugins-to-remarkplugins', to: 'remarkPlugins'},\n {from: 'rawSourcePos', id: '#remove-rawsourcepos'},\n {from: 'renderers', id: 'change-renderers-to-components', to: 'components'},\n {from: 'source', id: 'change-source-to-children', to: 'children'},\n {from: 'sourcePos', id: '#remove-sourcepos'},\n {from: 'transformImageUri', id: '#add-urltransform', to: 'urlTransform'},\n {from: 'transformLinkUri', id: '#add-urltransform', to: 'urlTransform'}\n]\n\n/**\n * Component to render markdown.\n *\n * This is a synchronous component.\n * When using async plugins,\n * see {@linkcode MarkdownAsync} or {@linkcode MarkdownHooks}.\n *\n * @param {Readonly<Options>} options\n * Props.\n * @returns {ReactElement}\n * React element.\n */\nexport function Markdown(options) {\n const processor = createProcessor(options)\n const file = createFile(options)\n return post(processor.runSync(processor.parse(file), file), options)\n}\n\n/**\n * Component to render markdown with support for async plugins\n * through async/await.\n *\n * Components returning promises are supported on the server.\n * For async support on the client,\n * see {@linkcode MarkdownHooks}.\n *\n * @param {Readonly<Options>} options\n * Props.\n * @returns {Promise<ReactElement>}\n * Promise to a React element.\n */\nexport async function MarkdownAsync(options) {\n const processor = createProcessor(options)\n const file = createFile(options)\n const tree = await processor.run(processor.parse(file), file)\n return post(tree, options)\n}\n\n/**\n * Component to render markdown with support for async plugins through hooks.\n *\n * This uses `useEffect` and `useState` hooks.\n * Hooks run on the client and do not immediately render something.\n * For async support on the server,\n * see {@linkcode MarkdownAsync}.\n *\n * @param {Readonly<HooksOptions>} options\n * Props.\n * @returns {ReactNode}\n * React node.\n */\nexport function MarkdownHooks(options) {\n const processor = createProcessor(options)\n const [error, setError] = useState(\n /** @type {Error | undefined} */ (undefined)\n )\n const [tree, setTree] = useState(/** @type {Root | undefined} */ (undefined))\n\n useEffect(\n function () {\n let cancelled = false\n const file = createFile(options)\n\n processor.run(processor.parse(file), file, function (error, tree) {\n if (!cancelled) {\n setError(error)\n setTree(tree)\n }\n })\n\n /**\n * @returns {undefined}\n * Nothing.\n */\n return function () {\n cancelled = true\n }\n },\n [\n options.children,\n options.rehypePlugins,\n options.remarkPlugins,\n options.remarkRehypeOptions\n ]\n )\n\n if (error) throw error\n\n return tree ? post(tree, options) : options.fallback\n}\n\n/**\n * Set up the `unified` processor.\n *\n * @param {Readonly<Options>} options\n * Props.\n * @returns {Processor<MdastRoot, MdastRoot, Root, undefined, undefined>}\n * Result.\n */\nfunction createProcessor(options) {\n const rehypePlugins = options.rehypePlugins || emptyPlugins\n const remarkPlugins = options.remarkPlugins || emptyPlugins\n const remarkRehypeOptions = options.remarkRehypeOptions\n ? {...options.remarkRehypeOptions, ...emptyRemarkRehypeOptions}\n : emptyRemarkRehypeOptions\n\n const processor = unified()\n .use(remarkParse)\n .use(remarkPlugins)\n .use(remarkRehype, remarkRehypeOptions)\n .use(rehypePlugins)\n\n return processor\n}\n\n/**\n * Set up the virtual file.\n *\n * @param {Readonly<Options>} options\n * Props.\n * @returns {VFile}\n * Result.\n */\nfunction createFile(options) {\n const children = options.children || ''\n const file = new VFile()\n\n if (typeof children === 'string') {\n file.value = children\n } else {\n unreachable(\n 'Unexpected value `' +\n children +\n '` for `children` prop, expected `string`'\n )\n }\n\n return file\n}\n\n/**\n * Process the result from unified some more.\n *\n * @param {Nodes} tree\n * Tree.\n * @param {Readonly<Options>} options\n * Props.\n * @returns {ReactElement}\n * React element.\n */\nfunction post(tree, options) {\n const allowedElements = options.allowedElements\n const allowElement = options.allowElement\n const components = options.components\n const disallowedElements = options.disallowedElements\n const skipHtml = options.skipHtml\n const unwrapDisallowed = options.unwrapDisallowed\n const urlTransform = options.urlTransform || defaultUrlTransform\n\n for (const deprecation of deprecations) {\n if (Object.hasOwn(options, deprecation.from)) {\n unreachable(\n 'Unexpected `' +\n deprecation.from +\n '` prop, ' +\n (deprecation.to\n ? 'use `' + deprecation.to + '` instead'\n : 'remove it') +\n ' (see <' +\n changelog +\n '#' +\n deprecation.id +\n '> for more info)'\n )\n }\n }\n\n if (allowedElements && disallowedElements) {\n unreachable(\n 'Unexpected combined `allowedElements` and `disallowedElements`, expected one or the other'\n )\n }\n\n visit(tree, transform)\n\n return toJsxRuntime(tree, {\n Fragment,\n components,\n ignoreInvalidStyle: true,\n jsx,\n jsxs,\n passKeys: true,\n passNode: true\n })\n\n /** @type {BuildVisitor<Root>} */\n function transform(node, index, parent) {\n if (node.type === 'raw' && parent && typeof index === 'number') {\n if (skipHtml) {\n parent.children.splice(index, 1)\n } else {\n parent.children[index] = {type: 'text', value: node.value}\n }\n\n return index\n }\n\n if (node.type === 'element') {\n /** @type {string} */\n let key\n\n for (key in urlAttributes) {\n if (\n Object.hasOwn(urlAttributes, key) &&\n Object.hasOwn(node.properties, key)\n ) {\n const value = node.properties[key]\n const test = urlAttributes[key]\n if (test === null || test.includes(node.tagName)) {\n node.properties[key] = urlTransform(String(value || ''), key, node)\n }\n }\n }\n }\n\n if (node.type === 'element') {\n let remove = allowedElements\n ? !allowedElements.includes(node.tagName)\n : disallowedElements\n ? disallowedElements.includes(node.tagName)\n : false\n\n if (!remove && allowElement && typeof index === 'number') {\n remove = !allowElement(node, index, parent)\n }\n\n if (remove && parent && typeof index === 'number') {\n if (unwrapDisallowed && node.children) {\n parent.children.splice(index, 1, ...node.children)\n } else {\n parent.children.splice(index, 1)\n }\n\n return index\n }\n }\n }\n}\n\n/**\n * Make a URL safe.\n *\n * @satisfies {UrlTransform}\n * @param {string} value\n * URL.\n * @returns {string}\n * Safe URL.\n */\nexport function defaultUrlTransform(value) {\n // Same as:\n // <https://github.com/micromark/micromark/blob/929275e/packages/micromark-util-sanitize-uri/dev/index.js#L34>\n // But without the `encode` part.\n const colon = value.indexOf(':')\n const questionMark = value.indexOf('?')\n const numberSign = value.indexOf('#')\n const slash = value.indexOf('/')\n\n if (\n // If there is no protocol, it’s relative.\n colon === -1 ||\n // If the first colon is after a `?`, `#`, or `/`, it’s not a protocol.\n (slash !== -1 && colon > slash) ||\n (questionMark !== -1 && colon > questionMark) ||\n (numberSign !== -1 && colon > numberSign) ||\n // It is a protocol, it should be allowed.\n safeProtocol.test(value.slice(0, colon))\n ) {\n return value\n }\n\n return ''\n}\n"],"names":["changelog","emptyPlugins","emptyRemarkRehypeOptions","safeProtocol","deprecations","Markdown","options","processor","createProcessor","file","createFile","post","rehypePlugins","remarkPlugins","remarkRehypeOptions","unified","remarkParse","remarkRehype","children","VFile","tree","allowedElements","allowElement","components","disallowedElements","skipHtml","unwrapDisallowed","urlTransform","defaultUrlTransform","deprecation","unreachable","visit","transform","toJsxRuntime","Fragment","jsx","jsxs","node","index","parent","key","urlAttributes","value","test","remove","colon","questionMark","numberSign","slash"],"mappings":"ogBAoHMA,EACJ,oEAGIC,EAAe,CAAA,EAEfC,EAA2B,CAAC,mBAAoB,EAAI,EACpDC,EAAe,gCAIfC,EAAe,CACnB,CAAC,KAAM,aAAc,GAAI,sCAAsC,EAC/D,CAAC,KAAM,qBAAsB,GAAI,sCAAsC,EACvE,CACE,KAAM,YACN,GAAI,qDACJ,GAAI,cACR,EACE,CACE,KAAM,eACN,GAAI,qDACJ,GAAI,iBACR,EACE,CAAC,KAAM,YAAa,GAAI,kBAAkB,EAC1C,CACE,KAAM,kBACN,GAAI,qDACJ,GAAI,oBACR,EACE,CAAC,KAAM,aAAc,GAAI,sCAAsC,EAC/D,CAAC,KAAM,sBAAuB,GAAI,6BAA6B,EAC/D,CACE,KAAM,mBACN,GAAI,gDACR,EACE,CAAC,KAAM,aAAc,GAAI,mBAAmB,EAC5C,CAAC,KAAM,UAAW,GAAI,kCAAmC,GAAI,eAAe,EAC5E,CAAC,KAAM,eAAgB,GAAI,sBAAsB,EACjD,CAAC,KAAM,YAAa,GAAI,iCAAkC,GAAI,YAAY,EAC1E,CAAC,KAAM,SAAU,GAAI,4BAA6B,GAAI,UAAU,EAChE,CAAC,KAAM,YAAa,GAAI,mBAAmB,EAC3C,CAAC,KAAM,oBAAqB,GAAI,oBAAqB,GAAI,cAAc,EACvE,CAAC,KAAM,mBAAoB,GAAI,oBAAqB,GAAI,cAAc,CACxE,EAcO,SAASC,EAASC,EAAS,CAChC,MAAMC,EAAYC,EAAgBF,CAAO,EACnCG,EAAOC,EAAWJ,CAAO,EAC/B,OAAOK,EAAKJ,EAAU,QAAQA,EAAU,MAAME,CAAI,EAAGA,C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@@ -1,14 +1,14 @@
1
- import { unreachable as b } from "../../devlop/lib/default.es.js";
2
- import { j as a } from "../../../_virtual/jsx-runtime.es.js";
1
+ import { unreachable as k } from "../../devlop/lib/default.es.js";
2
+ import { jsxs as b, jsx as O, Fragment as P } from "react/jsx-runtime";
3
3
  import "react";
4
- import { unified as O } from "../../unified/lib/index.es.js";
5
- import P from "../../remark-parse/lib/index.es.js";
6
- import v from "../../remark-rehype/lib/index.es.js";
4
+ import { unified as v } from "../../unified/lib/index.es.js";
5
+ import E from "../../remark-parse/lib/index.es.js";
6
+ import T from "../../remark-rehype/lib/index.es.js";
7
7
  import { VFile as x } from "../../vfile/lib/index.es.js";
8
- import { visit as E } from "../../unist-util-visit/lib/index.es.js";
9
- import { toJsxRuntime as j } from "../../hast-util-to-jsx-runtime/lib/index.es.js";
10
- import { urlAttributes as c } from "../../html-url-attributes/lib/index.es.js";
11
- const R = "https://github.com/remarkjs/react-markdown/blob/main/changelog.md", u = [], p = { allowDangerousHtml: !0 }, T = /^(https?|ircs?|mailto|xmpp)$/i, N = [
8
+ import { visit as N } from "../../unist-util-visit/lib/index.es.js";
9
+ import { toJsxRuntime as R } from "../../hast-util-to-jsx-runtime/lib/index.es.js";
10
+ import { urlAttributes as a } from "../../html-url-attributes/lib/index.es.js";
11
+ const j = "https://github.com/remarkjs/react-markdown/blob/main/changelog.md", f = [], u = { allowDangerousHtml: !0 }, H = /^(https?|ircs?|mailto|xmpp)$/i, S = [
12
12
  { from: "astPlugins", id: "remove-buggy-html-in-markdown-parser" },
13
13
  { from: "allowDangerousHtml", id: "remove-buggy-html-in-markdown-parser" },
14
14
  {
@@ -42,62 +42,62 @@ const R = "https://github.com/remarkjs/react-markdown/blob/main/changelog.md", u
42
42
  { from: "transformImageUri", id: "#add-urltransform", to: "urlTransform" },
43
43
  { from: "transformLinkUri", id: "#add-urltransform", to: "urlTransform" }
44
44
  ];
45
- function z(r) {
46
- const e = H(r), t = S(r);
47
- return D(e.runSync(e.parse(t), t), r);
45
+ function C(r) {
46
+ const e = D(r), t = I(r);
47
+ return U(e.runSync(e.parse(t), t), r);
48
48
  }
49
- function H(r) {
50
- const e = r.rehypePlugins || u, t = r.remarkPlugins || u, l = r.remarkRehypeOptions ? { ...r.remarkRehypeOptions, ...p } : p;
51
- return O().use(P).use(t).use(v, l).use(e);
49
+ function D(r) {
50
+ const e = r.rehypePlugins || f, t = r.remarkPlugins || f, n = r.remarkRehypeOptions ? { ...r.remarkRehypeOptions, ...u } : u;
51
+ return v().use(E).use(t).use(T, n).use(e);
52
52
  }
53
- function S(r) {
53
+ function I(r) {
54
54
  const e = r.children || "", t = new x();
55
55
  return typeof e == "string" && (t.value = e), t;
56
56
  }
57
- function D(r, e) {
58
- const t = e.allowedElements, l = e.allowElement, i = e.components, d = e.disallowedElements, g = e.skipHtml, w = e.unwrapDisallowed, h = e.urlTransform || F;
59
- for (const o of N)
60
- Object.hasOwn(e, o.from) && b(
61
- "Unexpected `" + o.from + "` prop, " + (o.to ? "use `" + o.to + "` instead" : "remove it") + " (see <" + R + "#" + o.id + "> for more info)"
57
+ function U(r, e) {
58
+ const t = e.allowedElements, n = e.allowElement, i = e.components, c = e.disallowedElements, p = e.skipHtml, w = e.unwrapDisallowed, g = e.urlTransform || F;
59
+ for (const o of S)
60
+ Object.hasOwn(e, o.from) && k(
61
+ "Unexpected `" + o.from + "` prop, " + (o.to ? "use `" + o.to + "` instead" : "remove it") + " (see <" + j + "#" + o.id + "> for more info)"
62
62
  );
63
- return E(r, y), j(r, {
64
- Fragment: a.Fragment,
63
+ return N(r, h), R(r, {
64
+ Fragment: P,
65
65
  components: i,
66
66
  ignoreInvalidStyle: !0,
67
- jsx: a.jsx,
68
- jsxs: a.jsxs,
67
+ jsx: O,
68
+ jsxs: b,
69
69
  passKeys: !0,
70
70
  passNode: !0
71
71
  });
72
- function y(o, n, m) {
73
- if (o.type === "raw" && m && typeof n == "number")
74
- return g ? m.children.splice(n, 1) : m.children[n] = { type: "text", value: o.value }, n;
72
+ function h(o, l, m) {
73
+ if (o.type === "raw" && m && typeof l == "number")
74
+ return p ? m.children.splice(l, 1) : m.children[l] = { type: "text", value: o.value }, l;
75
75
  if (o.type === "element") {
76
76
  let s;
77
- for (s in c)
78
- if (Object.hasOwn(c, s) && Object.hasOwn(o.properties, s)) {
79
- const k = o.properties[s], f = c[s];
80
- (f === null || f.includes(o.tagName)) && (o.properties[s] = h(String(k || ""), s, o));
77
+ for (s in a)
78
+ if (Object.hasOwn(a, s) && Object.hasOwn(o.properties, s)) {
79
+ const y = o.properties[s], d = a[s];
80
+ (d === null || d.includes(o.tagName)) && (o.properties[s] = g(String(y || ""), s, o));
81
81
  }
82
82
  }
83
83
  if (o.type === "element") {
84
- let s = t ? !t.includes(o.tagName) : d ? d.includes(o.tagName) : !1;
85
- if (!s && l && typeof n == "number" && (s = !l(o, n, m)), s && m && typeof n == "number")
86
- return w && o.children ? m.children.splice(n, 1, ...o.children) : m.children.splice(n, 1), n;
84
+ let s = t ? !t.includes(o.tagName) : c ? c.includes(o.tagName) : !1;
85
+ if (!s && n && typeof l == "number" && (s = !n(o, l, m)), s && m && typeof l == "number")
86
+ return w && o.children ? m.children.splice(l, 1, ...o.children) : m.children.splice(l, 1), l;
87
87
  }
88
88
  }
89
89
  }
90
90
  function F(r) {
91
- const e = r.indexOf(":"), t = r.indexOf("?"), l = r.indexOf("#"), i = r.indexOf("/");
91
+ const e = r.indexOf(":"), t = r.indexOf("?"), n = r.indexOf("#"), i = r.indexOf("/");
92
92
  return (
93
93
  // If there is no protocol, it’s relative.
94
94
  e === -1 || // If the first colon is after a `?`, `#`, or `/`, it’s not a protocol.
95
- i !== -1 && e > i || t !== -1 && e > t || l !== -1 && e > l || // It is a protocol, it should be allowed.
96
- T.test(r.slice(0, e)) ? r : ""
95
+ i !== -1 && e > i || t !== -1 && e > t || n !== -1 && e > n || // It is a protocol, it should be allowed.
96
+ H.test(r.slice(0, e)) ? r : ""
97
97
  );
98
98
  }
99
99
  export {
100
- z as Markdown,
100
+ C as Markdown,
101
101
  F as defaultUrlTransform
102
102
  };
103
103
  //# sourceMappingURL=index.es.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.es.js","sources":["../../../../node_modules/react-markdown/lib/index.js"],"sourcesContent":["/**\n * @import {Element, Nodes, Parents, Root} from 'hast'\n * @import {Root as MdastRoot} from 'mdast'\n * @import {ComponentType, JSX, ReactElement, ReactNode} from 'react'\n * @import {Options as RemarkRehypeOptions} from 'remark-rehype'\n * @import {BuildVisitor} from 'unist-util-visit'\n * @import {PluggableList, Processor} from 'unified'\n */\n\n/**\n * @callback AllowElement\n * Filter elements.\n * @param {Readonly<Element>} element\n * Element to check.\n * @param {number} index\n * Index of `element` in `parent`.\n * @param {Readonly<Parents> | undefined} parent\n * Parent of `element`.\n * @returns {boolean | null | undefined}\n * Whether to allow `element` (default: `false`).\n */\n\n/**\n * @typedef ExtraProps\n * Extra fields we pass.\n * @property {Element | undefined} [node]\n * passed when `passNode` is on.\n */\n\n/**\n * @typedef {{\n * [Key in keyof JSX.IntrinsicElements]?: ComponentType<JSX.IntrinsicElements[Key] & ExtraProps> | keyof JSX.IntrinsicElements\n * }} Components\n * Map tag names to components.\n */\n\n/**\n * @typedef Deprecation\n * Deprecation.\n * @property {string} from\n * Old field.\n * @property {string} id\n * ID in readme.\n * @property {keyof Options} [to]\n * New field.\n */\n\n/**\n * @typedef Options\n * Configuration.\n * @property {AllowElement | null | undefined} [allowElement]\n * Filter elements (optional);\n * `allowedElements` / `disallowedElements` is used first.\n * @property {ReadonlyArray<string> | null | undefined} [allowedElements]\n * Tag names to allow (default: all tag names);\n * cannot combine w/ `disallowedElements`.\n * @property {string | null | undefined} [children]\n * Markdown.\n * @property {Components | null | undefined} [components]\n * Map tag names to components.\n * @property {ReadonlyArray<string> | null | undefined} [disallowedElements]\n * Tag names to disallow (default: `[]`);\n * cannot combine w/ `allowedElements`.\n * @property {PluggableList | null | undefined} [rehypePlugins]\n * List of rehype plugins to use.\n * @property {PluggableList | null | undefined} [remarkPlugins]\n * List of remark plugins to use.\n * @property {Readonly<RemarkRehypeOptions> | null | undefined} [remarkRehypeOptions]\n * Options to pass through to `remark-rehype`.\n * @property {boolean | null | undefined} [skipHtml=false]\n * Ignore HTML in markdown completely (default: `false`).\n * @property {boolean | null | undefined} [unwrapDisallowed=false]\n * Extract (unwrap) what’s in disallowed elements (default: `false`);\n * normally when say `strong` is not allowed, it and it’s children are dropped,\n * with `unwrapDisallowed` the element itself is replaced by its children.\n * @property {UrlTransform | null | undefined} [urlTransform]\n * Change URLs (default: `defaultUrlTransform`)\n */\n\n/**\n * @typedef HooksOptionsOnly\n * Configuration specifically for {@linkcode MarkdownHooks}.\n * @property {ReactNode | null | undefined} [fallback]\n * Content to render while the processor processing the markdown (optional).\n */\n\n/**\n * @typedef {Options & HooksOptionsOnly} HooksOptions\n * Configuration for {@linkcode MarkdownHooks};\n * extends the regular {@linkcode Options} with a `fallback` prop.\n */\n\n/**\n * @callback UrlTransform\n * Transform all URLs.\n * @param {string} url\n * URL.\n * @param {string} key\n * Property name (example: `'href'`).\n * @param {Readonly<Element>} node\n * Node.\n * @returns {string | null | undefined}\n * Transformed URL (optional).\n */\n\nimport {unreachable} from 'devlop'\nimport {toJsxRuntime} from 'hast-util-to-jsx-runtime'\nimport {urlAttributes} from 'html-url-attributes'\nimport {Fragment, jsx, jsxs} from 'react/jsx-runtime'\nimport {useEffect, useState} from 'react'\nimport remarkParse from 'remark-parse'\nimport remarkRehype from 'remark-rehype'\nimport {unified} from 'unified'\nimport {visit} from 'unist-util-visit'\nimport {VFile} from 'vfile'\n\nconst changelog =\n 'https://github.com/remarkjs/react-markdown/blob/main/changelog.md'\n\n/** @type {PluggableList} */\nconst emptyPlugins = []\n/** @type {Readonly<RemarkRehypeOptions>} */\nconst emptyRemarkRehypeOptions = {allowDangerousHtml: true}\nconst safeProtocol = /^(https?|ircs?|mailto|xmpp)$/i\n\n// Mutable because we `delete` any time it’s used and a message is sent.\n/** @type {ReadonlyArray<Readonly<Deprecation>>} */\nconst deprecations = [\n {from: 'astPlugins', id: 'remove-buggy-html-in-markdown-parser'},\n {from: 'allowDangerousHtml', id: 'remove-buggy-html-in-markdown-parser'},\n {\n from: 'allowNode',\n id: 'replace-allownode-allowedtypes-and-disallowedtypes',\n to: 'allowElement'\n },\n {\n from: 'allowedTypes',\n id: 'replace-allownode-allowedtypes-and-disallowedtypes',\n to: 'allowedElements'\n },\n {from: 'className', id: 'remove-classname'},\n {\n from: 'disallowedTypes',\n id: 'replace-allownode-allowedtypes-and-disallowedtypes',\n to: 'disallowedElements'\n },\n {from: 'escapeHtml', id: 'remove-buggy-html-in-markdown-parser'},\n {from: 'includeElementIndex', id: '#remove-includeelementindex'},\n {\n from: 'includeNodeIndex',\n id: 'change-includenodeindex-to-includeelementindex'\n },\n {from: 'linkTarget', id: 'remove-linktarget'},\n {from: 'plugins', id: 'change-plugins-to-remarkplugins', to: 'remarkPlugins'},\n {from: 'rawSourcePos', id: '#remove-rawsourcepos'},\n {from: 'renderers', id: 'change-renderers-to-components', to: 'components'},\n {from: 'source', id: 'change-source-to-children', to: 'children'},\n {from: 'sourcePos', id: '#remove-sourcepos'},\n {from: 'transformImageUri', id: '#add-urltransform', to: 'urlTransform'},\n {from: 'transformLinkUri', id: '#add-urltransform', to: 'urlTransform'}\n]\n\n/**\n * Component to render markdown.\n *\n * This is a synchronous component.\n * When using async plugins,\n * see {@linkcode MarkdownAsync} or {@linkcode MarkdownHooks}.\n *\n * @param {Readonly<Options>} options\n * Props.\n * @returns {ReactElement}\n * React element.\n */\nexport function Markdown(options) {\n const processor = createProcessor(options)\n const file = createFile(options)\n return post(processor.runSync(processor.parse(file), file), options)\n}\n\n/**\n * Component to render markdown with support for async plugins\n * through async/await.\n *\n * Components returning promises are supported on the server.\n * For async support on the client,\n * see {@linkcode MarkdownHooks}.\n *\n * @param {Readonly<Options>} options\n * Props.\n * @returns {Promise<ReactElement>}\n * Promise to a React element.\n */\nexport async function MarkdownAsync(options) {\n const processor = createProcessor(options)\n const file = createFile(options)\n const tree = await processor.run(processor.parse(file), file)\n return post(tree, options)\n}\n\n/**\n * Component to render markdown with support for async plugins through hooks.\n *\n * This uses `useEffect` and `useState` hooks.\n * Hooks run on the client and do not immediately render something.\n * For async support on the server,\n * see {@linkcode MarkdownAsync}.\n *\n * @param {Readonly<HooksOptions>} options\n * Props.\n * @returns {ReactNode}\n * React node.\n */\nexport function MarkdownHooks(options) {\n const processor = createProcessor(options)\n const [error, setError] = useState(\n /** @type {Error | undefined} */ (undefined)\n )\n const [tree, setTree] = useState(/** @type {Root | undefined} */ (undefined))\n\n useEffect(\n function () {\n let cancelled = false\n const file = createFile(options)\n\n processor.run(processor.parse(file), file, function (error, tree) {\n if (!cancelled) {\n setError(error)\n setTree(tree)\n }\n })\n\n /**\n * @returns {undefined}\n * Nothing.\n */\n return function () {\n cancelled = true\n }\n },\n [\n options.children,\n options.rehypePlugins,\n options.remarkPlugins,\n options.remarkRehypeOptions\n ]\n )\n\n if (error) throw error\n\n return tree ? post(tree, options) : options.fallback\n}\n\n/**\n * Set up the `unified` processor.\n *\n * @param {Readonly<Options>} options\n * Props.\n * @returns {Processor<MdastRoot, MdastRoot, Root, undefined, undefined>}\n * Result.\n */\nfunction createProcessor(options) {\n const rehypePlugins = options.rehypePlugins || emptyPlugins\n const remarkPlugins = options.remarkPlugins || emptyPlugins\n const remarkRehypeOptions = options.remarkRehypeOptions\n ? {...options.remarkRehypeOptions, ...emptyRemarkRehypeOptions}\n : emptyRemarkRehypeOptions\n\n const processor = unified()\n .use(remarkParse)\n .use(remarkPlugins)\n .use(remarkRehype, remarkRehypeOptions)\n .use(rehypePlugins)\n\n return processor\n}\n\n/**\n * Set up the virtual file.\n *\n * @param {Readonly<Options>} options\n * Props.\n * @returns {VFile}\n * Result.\n */\nfunction createFile(options) {\n const children = options.children || ''\n const file = new VFile()\n\n if (typeof children === 'string') {\n file.value = children\n } else {\n unreachable(\n 'Unexpected value `' +\n children +\n '` for `children` prop, expected `string`'\n )\n }\n\n return file\n}\n\n/**\n * Process the result from unified some more.\n *\n * @param {Nodes} tree\n * Tree.\n * @param {Readonly<Options>} options\n * Props.\n * @returns {ReactElement}\n * React element.\n */\nfunction post(tree, options) {\n const allowedElements = options.allowedElements\n const allowElement = options.allowElement\n const components = options.components\n const disallowedElements = options.disallowedElements\n const skipHtml = options.skipHtml\n const unwrapDisallowed = options.unwrapDisallowed\n const urlTransform = options.urlTransform || defaultUrlTransform\n\n for (const deprecation of deprecations) {\n if (Object.hasOwn(options, deprecation.from)) {\n unreachable(\n 'Unexpected `' +\n deprecation.from +\n '` prop, ' +\n (deprecation.to\n ? 'use `' + deprecation.to + '` instead'\n : 'remove it') +\n ' (see <' +\n changelog +\n '#' +\n deprecation.id +\n '> for more info)'\n )\n }\n }\n\n if (allowedElements && disallowedElements) {\n unreachable(\n 'Unexpected combined `allowedElements` and `disallowedElements`, expected one or the other'\n )\n }\n\n visit(tree, transform)\n\n return toJsxRuntime(tree, {\n Fragment,\n components,\n ignoreInvalidStyle: true,\n jsx,\n jsxs,\n passKeys: true,\n passNode: true\n })\n\n /** @type {BuildVisitor<Root>} */\n function transform(node, index, parent) {\n if (node.type === 'raw' && parent && typeof index === 'number') {\n if (skipHtml) {\n parent.children.splice(index, 1)\n } else {\n parent.children[index] = {type: 'text', value: node.value}\n }\n\n return index\n }\n\n if (node.type === 'element') {\n /** @type {string} */\n let key\n\n for (key in urlAttributes) {\n if (\n Object.hasOwn(urlAttributes, key) &&\n Object.hasOwn(node.properties, key)\n ) {\n const value = node.properties[key]\n const test = urlAttributes[key]\n if (test === null || test.includes(node.tagName)) {\n node.properties[key] = urlTransform(String(value || ''), key, node)\n }\n }\n }\n }\n\n if (node.type === 'element') {\n let remove = allowedElements\n ? !allowedElements.includes(node.tagName)\n : disallowedElements\n ? disallowedElements.includes(node.tagName)\n : false\n\n if (!remove && allowElement && typeof index === 'number') {\n remove = !allowElement(node, index, parent)\n }\n\n if (remove && parent && typeof index === 'number') {\n if (unwrapDisallowed && node.children) {\n parent.children.splice(index, 1, ...node.children)\n } else {\n parent.children.splice(index, 1)\n }\n\n return index\n }\n }\n }\n}\n\n/**\n * Make a URL safe.\n *\n * @satisfies {UrlTransform}\n * @param {string} value\n * URL.\n * @returns {string}\n * Safe URL.\n */\nexport function defaultUrlTransform(value) {\n // Same as:\n // <https://github.com/micromark/micromark/blob/929275e/packages/micromark-util-sanitize-uri/dev/index.js#L34>\n // But without the `encode` part.\n const colon = value.indexOf(':')\n const questionMark = value.indexOf('?')\n const numberSign = value.indexOf('#')\n const slash = value.indexOf('/')\n\n if (\n // If there is no protocol, it’s relative.\n colon === -1 ||\n // If the first colon is after a `?`, `#`, or `/`, it’s not a protocol.\n (slash !== -1 && colon > slash) ||\n (questionMark !== -1 && colon > questionMark) ||\n (numberSign !== -1 && colon > numberSign) ||\n // It is a protocol, it should be allowed.\n safeProtocol.test(value.slice(0, colon))\n ) {\n return value\n }\n\n return ''\n}\n"],"names":["changelog","emptyPlugins","emptyRemarkRehypeOptions","safeProtocol","deprecations","Markdown","options","processor","createProcessor","file","createFile","post","rehypePlugins","remarkPlugins","remarkRehypeOptions","unified","remarkParse","remarkRehype","children","VFile","tree","allowedElements","allowElement","components","disallowedElements","skipHtml","unwrapDisallowed","urlTransform","defaultUrlTransform","deprecation","unreachable","visit","transform","toJsxRuntime","Fragment","jsx","jsxs","node","index","parent","key","urlAttributes","value","test","remove","colon","questionMark","numberSign","slash"],"mappings":";;;;;;;;;;AAoHA,MAAMA,IACJ,qEAGIC,IAAe,CAAA,GAEfC,IAA2B,EAAC,oBAAoB,GAAI,GACpDC,IAAe,iCAIfC,IAAe;AAAA,EACnB,EAAC,MAAM,cAAc,IAAI,uCAAsC;AAAA,EAC/D,EAAC,MAAM,sBAAsB,IAAI,uCAAsC;AAAA,EACvE;AAAA,IACE,MAAM;AAAA,IACN,IAAI;AAAA,IACJ,IAAI;AAAA,EACR;AAAA,EACE;AAAA,IACE,MAAM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QAAQA,EAAK,SAASN,EAAK,OAAO,OAC7CA,EAAK,WAAWG,CAAG,IAAIb,EAAa,OAAOe,KAAS,EAAE,GAAGF,GAAKH,CAAI;AAAA,QAEtE;AAAA,IAEJ;AAEA,QAAIA,EAAK,SAAS,WAAW;AAC3B,UAAIO,IAASvB,IACT,CAACA,EAAgB,SAASgB,EAAK,OAAO,IACtCb,IACEA,EAAmB,SAASa,EAAK,OAAO,IACxC;AAMN,UAJI,CAACO,KAAUtB,KAAgB,OAAOgB,KAAU,aAC9CM,IAAS,CAACtB,EAAae,GAAMC,GAAOC,CAAM,IAGxCK,KAAUL,KAAU,OAAOD,KAAU;AACvC,eAAIZ,KAAoBW,EAAK,WAC3BE,EAAO,SAAS,OAAOD,GAAO,GAAG,GAAGD,EAAK,QAAQ,IAEjDE,EAAO,SAAS,OAAOD,GAAO,CAAC,GAG1BA;AAAA,IAEX;AAAA,EACF;AACF;AAWO,SAASV,EAAoBc,GAAO;AAIzC,QAAMG,IAAQH,EAAM,QAAQ,GAAG,GACzBI,IAAeJ,EAAM,QAAQ,GAAG,GAChCK,IAAaL,EAAM,QAAQ,GAAG,GAC9BM,IAAQN,EAAM,QAAQ,GAAG;AAE/B;AAAA;AAAA,IAEEG,MAAU;AAAA,IAETG,MAAU,MAAMH,IAAQG,KACxBF,MAAiB,MAAMD,IAAQC,KAC/BC,MAAe,MAAMF,IAAQE;AAAA,IAE9B5C,EAAa,KAAKuC,EAAM,MAAM,GAAGG,CAAK,CAAC,IAEhCH,IAGF;AAAA;AACT;","x_google_ignoreList":[0]}
1
+ {"version":3,"file":"index.es.js","sources":["../../../../node_modules/react-markdown/lib/index.js"],"sourcesContent":["/**\n * @import {Element, Nodes, Parents, Root} from 'hast'\n * @import {Root as MdastRoot} from 'mdast'\n * @import {ComponentType, JSX, ReactElement, ReactNode} from 'react'\n * @import {Options as RemarkRehypeOptions} from 'remark-rehype'\n * @import {BuildVisitor} from 'unist-util-visit'\n * @import {PluggableList, Processor} from 'unified'\n */\n\n/**\n * @callback AllowElement\n * Filter elements.\n * @param {Readonly<Element>} element\n * Element to check.\n * @param {number} index\n * Index of `element` in `parent`.\n * @param {Readonly<Parents> | undefined} parent\n * Parent of `element`.\n * @returns {boolean | null | undefined}\n * Whether to allow `element` (default: `false`).\n */\n\n/**\n * @typedef ExtraProps\n * Extra fields we pass.\n * @property {Element | undefined} [node]\n * passed when `passNode` is on.\n */\n\n/**\n * @typedef {{\n * [Key in keyof JSX.IntrinsicElements]?: ComponentType<JSX.IntrinsicElements[Key] & ExtraProps> | keyof JSX.IntrinsicElements\n * }} Components\n * Map tag names to components.\n */\n\n/**\n * @typedef Deprecation\n * Deprecation.\n * @property {string} from\n * Old field.\n * @property {string} id\n * ID in readme.\n * @property {keyof Options} [to]\n * New field.\n */\n\n/**\n * @typedef Options\n * Configuration.\n * @property {AllowElement | null | undefined} [allowElement]\n * Filter elements (optional);\n * `allowedElements` / `disallowedElements` is used first.\n * @property {ReadonlyArray<string> | null | undefined} [allowedElements]\n * Tag names to allow (default: all tag names);\n * cannot combine w/ `disallowedElements`.\n * @property {string | null | undefined} [children]\n * Markdown.\n * @property {Components | null | undefined} [components]\n * Map tag names to components.\n * @property {ReadonlyArray<string> | null | undefined} [disallowedElements]\n * Tag names to disallow (default: `[]`);\n * cannot combine w/ `allowedElements`.\n * @property {PluggableList | null | undefined} [rehypePlugins]\n * List of rehype plugins to use.\n * @property {PluggableList | null | undefined} [remarkPlugins]\n * List of remark plugins to use.\n * @property {Readonly<RemarkRehypeOptions> | null | undefined} [remarkRehypeOptions]\n * Options to pass through to `remark-rehype`.\n * @property {boolean | null | undefined} [skipHtml=false]\n * Ignore HTML in markdown completely (default: `false`).\n * @property {boolean | null | undefined} [unwrapDisallowed=false]\n * Extract (unwrap) what’s in disallowed elements (default: `false`);\n * normally when say `strong` is not allowed, it and it’s children are dropped,\n * with `unwrapDisallowed` the element itself is replaced by its children.\n * @property {UrlTransform | null | undefined} [urlTransform]\n * Change URLs (default: `defaultUrlTransform`)\n */\n\n/**\n * @typedef HooksOptionsOnly\n * Configuration specifically for {@linkcode MarkdownHooks}.\n * @property {ReactNode | null | undefined} [fallback]\n * Content to render while the processor processing the markdown (optional).\n */\n\n/**\n * @typedef {Options & HooksOptionsOnly} HooksOptions\n * Configuration for {@linkcode MarkdownHooks};\n * extends the regular {@linkcode Options} with a `fallback` prop.\n */\n\n/**\n * @callback UrlTransform\n * Transform all URLs.\n * @param {string} url\n * URL.\n * @param {string} key\n * Property name (example: `'href'`).\n * @param {Readonly<Element>} node\n * Node.\n * @returns {string | null | undefined}\n * Transformed URL (optional).\n */\n\nimport {unreachable} from 'devlop'\nimport {toJsxRuntime} from 'hast-util-to-jsx-runtime'\nimport {urlAttributes} from 'html-url-attributes'\nimport {Fragment, jsx, jsxs} from 'react/jsx-runtime'\nimport {useEffect, useState} from 'react'\nimport remarkParse from 'remark-parse'\nimport remarkRehype from 'remark-rehype'\nimport {unified} from 'unified'\nimport {visit} from 'unist-util-visit'\nimport {VFile} from 'vfile'\n\nconst changelog =\n 'https://github.com/remarkjs/react-markdown/blob/main/changelog.md'\n\n/** @type {PluggableList} */\nconst emptyPlugins = []\n/** @type {Readonly<RemarkRehypeOptions>} */\nconst emptyRemarkRehypeOptions = {allowDangerousHtml: true}\nconst safeProtocol = /^(https?|ircs?|mailto|xmpp)$/i\n\n// Mutable because we `delete` any time it’s used and a message is sent.\n/** @type {ReadonlyArray<Readonly<Deprecation>>} */\nconst deprecations = [\n {from: 'astPlugins', id: 'remove-buggy-html-in-markdown-parser'},\n {from: 'allowDangerousHtml', id: 'remove-buggy-html-in-markdown-parser'},\n {\n from: 'allowNode',\n id: 'replace-allownode-allowedtypes-and-disallowedtypes',\n to: 'allowElement'\n },\n {\n from: 'allowedTypes',\n id: 'replace-allownode-allowedtypes-and-disallowedtypes',\n to: 'allowedElements'\n },\n {from: 'className', id: 'remove-classname'},\n {\n from: 'disallowedTypes',\n id: 'replace-allownode-allowedtypes-and-disallowedtypes',\n to: 'disallowedElements'\n },\n {from: 'escapeHtml', id: 'remove-buggy-html-in-markdown-parser'},\n {from: 'includeElementIndex', id: '#remove-includeelementindex'},\n {\n from: 'includeNodeIndex',\n id: 'change-includenodeindex-to-includeelementindex'\n },\n {from: 'linkTarget', id: 'remove-linktarget'},\n {from: 'plugins', id: 'change-plugins-to-remarkplugins', to: 'remarkPlugins'},\n {from: 'rawSourcePos', id: '#remove-rawsourcepos'},\n {from: 'renderers', id: 'change-renderers-to-components', to: 'components'},\n {from: 'source', id: 'change-source-to-children', to: 'children'},\n {from: 'sourcePos', id: '#remove-sourcepos'},\n {from: 'transformImageUri', id: '#add-urltransform', to: 'urlTransform'},\n {from: 'transformLinkUri', id: '#add-urltransform', to: 'urlTransform'}\n]\n\n/**\n * Component to render markdown.\n *\n * This is a synchronous component.\n * When using async plugins,\n * see {@linkcode MarkdownAsync} or {@linkcode MarkdownHooks}.\n *\n * @param {Readonly<Options>} options\n * Props.\n * @returns {ReactElement}\n * React element.\n */\nexport function Markdown(options) {\n const processor = createProcessor(options)\n const file = createFile(options)\n return post(processor.runSync(processor.parse(file), file), options)\n}\n\n/**\n * Component to render markdown with support for async plugins\n * through async/await.\n *\n * Components returning promises are supported on the server.\n * For async support on the client,\n * see {@linkcode MarkdownHooks}.\n *\n * @param {Readonly<Options>} options\n * Props.\n * @returns {Promise<ReactElement>}\n * Promise to a React element.\n */\nexport async function MarkdownAsync(options) {\n const processor = createProcessor(options)\n const file = createFile(options)\n const tree = await processor.run(processor.parse(file), file)\n return post(tree, options)\n}\n\n/**\n * Component to render markdown with support for async plugins through hooks.\n *\n * This uses `useEffect` and `useState` hooks.\n * Hooks run on the client and do not immediately render something.\n * For async support on the server,\n * see {@linkcode MarkdownAsync}.\n *\n * @param {Readonly<HooksOptions>} options\n * Props.\n * @returns {ReactNode}\n * React node.\n */\nexport function MarkdownHooks(options) {\n const processor = createProcessor(options)\n const [error, setError] = useState(\n /** @type {Error | undefined} */ (undefined)\n )\n const [tree, setTree] = useState(/** @type {Root | undefined} */ (undefined))\n\n useEffect(\n function () {\n let cancelled = false\n const file = createFile(options)\n\n processor.run(processor.parse(file), file, function (error, tree) {\n if (!cancelled) {\n setError(error)\n setTree(tree)\n }\n })\n\n /**\n * @returns {undefined}\n * Nothing.\n */\n return function () {\n cancelled = true\n }\n },\n [\n options.children,\n options.rehypePlugins,\n options.remarkPlugins,\n options.remarkRehypeOptions\n ]\n )\n\n if (error) throw error\n\n return tree ? post(tree, options) : options.fallback\n}\n\n/**\n * Set up the `unified` processor.\n *\n * @param {Readonly<Options>} options\n * Props.\n * @returns {Processor<MdastRoot, MdastRoot, Root, undefined, undefined>}\n * Result.\n */\nfunction createProcessor(options) {\n const rehypePlugins = options.rehypePlugins || emptyPlugins\n const remarkPlugins = options.remarkPlugins || emptyPlugins\n const remarkRehypeOptions = options.remarkRehypeOptions\n ? {...options.remarkRehypeOptions, ...emptyRemarkRehypeOptions}\n : emptyRemarkRehypeOptions\n\n const processor = unified()\n .use(remarkParse)\n .use(remarkPlugins)\n .use(remarkRehype, remarkRehypeOptions)\n .use(rehypePlugins)\n\n return processor\n}\n\n/**\n * Set up the virtual file.\n *\n * @param {Readonly<Options>} options\n * Props.\n * @returns {VFile}\n * Result.\n */\nfunction createFile(options) {\n const children = options.children || ''\n const file = new VFile()\n\n if (typeof children === 'string') {\n file.value = children\n } else {\n unreachable(\n 'Unexpected value `' +\n children +\n '` for `children` prop, expected `string`'\n )\n }\n\n return file\n}\n\n/**\n * Process the result from unified some more.\n *\n * @param {Nodes} tree\n * Tree.\n * @param {Readonly<Options>} options\n * Props.\n * @returns {ReactElement}\n * React element.\n */\nfunction post(tree, options) {\n const allowedElements = options.allowedElements\n const allowElement = options.allowElement\n const components = options.components\n const disallowedElements = options.disallowedElements\n const skipHtml = options.skipHtml\n const unwrapDisallowed = options.unwrapDisallowed\n const urlTransform = options.urlTransform || defaultUrlTransform\n\n for (const deprecation of deprecations) {\n if (Object.hasOwn(options, deprecation.from)) {\n unreachable(\n 'Unexpected `' +\n deprecation.from +\n '` prop, ' +\n (deprecation.to\n ? 'use `' + deprecation.to + '` instead'\n : 'remove it') +\n ' (see <' +\n changelog +\n '#' +\n deprecation.id +\n '> for more info)'\n )\n }\n }\n\n if (allowedElements && disallowedElements) {\n unreachable(\n 'Unexpected combined `allowedElements` and `disallowedElements`, expected one or the other'\n )\n }\n\n visit(tree, transform)\n\n return toJsxRuntime(tree, {\n Fragment,\n components,\n ignoreInvalidStyle: true,\n jsx,\n jsxs,\n passKeys: true,\n passNode: true\n })\n\n /** @type {BuildVisitor<Root>} */\n function transform(node, index, parent) {\n if (node.type === 'raw' && parent && typeof index === 'number') {\n if (skipHtml) {\n parent.children.splice(index, 1)\n } else {\n parent.children[index] = {type: 'text', value: node.value}\n }\n\n return index\n }\n\n if (node.type === 'element') {\n /** @type {string} */\n let key\n\n for (key in urlAttributes) {\n if (\n Object.hasOwn(urlAttributes, key) &&\n Object.hasOwn(node.properties, key)\n ) {\n const value = node.properties[key]\n const test = urlAttributes[key]\n if (test === null || test.includes(node.tagName)) {\n node.properties[key] = urlTransform(String(value || ''), key, node)\n }\n }\n }\n }\n\n if (node.type === 'element') {\n let remove = allowedElements\n ? !allowedElements.includes(node.tagName)\n : disallowedElements\n ? disallowedElements.includes(node.tagName)\n : false\n\n if (!remove && allowElement && typeof index === 'number') {\n remove = !allowElement(node, index, parent)\n }\n\n if (remove && parent && typeof index === 'number') {\n if (unwrapDisallowed && node.children) {\n parent.children.splice(index, 1, ...node.children)\n } else {\n parent.children.splice(index, 1)\n }\n\n return index\n }\n }\n }\n}\n\n/**\n * Make a URL safe.\n *\n * @satisfies {UrlTransform}\n * @param {string} value\n * URL.\n * @returns {string}\n * Safe URL.\n */\nexport function defaultUrlTransform(value) {\n // Same as:\n // <https://github.com/micromark/micromark/blob/929275e/packages/micromark-util-sanitize-uri/dev/index.js#L34>\n // But without the `encode` part.\n const colon = value.indexOf(':')\n const questionMark = value.indexOf('?')\n const numberSign = value.indexOf('#')\n const slash = value.indexOf('/')\n\n if (\n // If there is no protocol, it’s relative.\n colon === -1 ||\n // If the first colon is after a `?`, `#`, or `/`, it’s not a protocol.\n (slash !== -1 && colon > slash) ||\n (questionMark !== -1 && colon > questionMark) ||\n (numberSign !== -1 && colon > numberSign) ||\n // It is a protocol, it should be allowed.\n safeProtocol.test(value.slice(0, colon))\n ) {\n return value\n }\n\n return ''\n}\n"],"names":["changelog","emptyPlugins","emptyRemarkRehypeOptions","safeProtocol","deprecations","Markdown","options","processor","createProcessor","file","createFile","post","rehypePlugins","remarkPlugins","remarkRehypeOptions","unified","remarkParse","remarkRehype","children","VFile","tree","allowedElements","allowElement","components","disallowedElements","skipHtml","unwrapDisallowed","urlTransform","defaultUrlTransform","deprecation","unreachable","visit","transform","toJsxRuntime","Fragment","jsx","jsxs","node","index","parent","key","urlAttributes","value","test","remove","colon","questionMark","numberSign","slash"],"mappings":";;;;;;;;;;AAoHA,MAAMA,IACJ,qEAGIC,IAAe,CAAA,GAEfC,IAA2B,EAAC,oBAAoB,GAAI,GACpDC,IAAe,iCAIfC,IAAe;AAAA,EACnB,EAAC,MAAM,cAAc,IAAI,uCAAsC;AAAA,EAC/D,EAAC,MAAM,sBAAsB,IAAI,uCAAsC;AAAA,EACvE;AAAA,IACE,MAAM;AAAA,IACN,IAAI;AAAA,IACJ,IAAI;AAAA,EACR;AAAA,EACE;AAAA,IACE,MAAM;AAAA,IACN,IAAI;AAAA,IACJ,IAAI;AAAA,EACR;AAAA,EACE,EAAC,MAAM,aAAa,IAAI,mBAAkB;AAAA,EAC1C;AAAA,IACE,MAAM;AAAA,IACN,IAAI;AAAA,IACJ,IAAI;AAAA,EACR;AAAA,EACE,EAAC,MAAM,cAAc,IAAI,uCAAsC;AAAA,EAC/D,EAAC,MAAM,uBAAuB,IAAI,8BAA6B;AAAA,EAC/D;AAAA,IACE,MAAM;AAAA,IACN,IAAI;AAAA,EACR;AAAA,EACE,EAAC,MAAM,cAAc,IAAI,oBAAmB;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AAU,OAAOD,KAAU;AACvC,eAAIZ,KAAoBW,EAAK,WAC3BE,EAAO,SAAS,OAAOD,GAAO,GAAG,GAAGD,EAAK,QAAQ,IAEjDE,EAAO,SAAS,OAAOD,GAAO,CAAC,GAG1BA;AAAA,IAEX;AAAA,EACF;AACF;AAWO,SAASV,EAAoBc,GAAO;AAIzC,QAAMG,IAAQH,EAAM,QAAQ,GAAG,GACzBI,IAAeJ,EAAM,QAAQ,GAAG,GAChCK,IAAaL,EAAM,QAAQ,GAAG,GAC9BM,IAAQN,EAAM,QAAQ,GAAG;AAE/B;AAAA;AAAA,IAEEG,MAAU;AAAA,IAETG,MAAU,MAAMH,IAAQG,KACxBF,MAAiB,MAAMD,IAAQC,KAC/BC,MAAe,MAAMF,IAAQE;AAAA,IAE9B5C,EAAa,KAAKuC,EAAM,MAAM,GAAGG,CAAK,CAAC,IAEhCH,IAGF;AAAA;AACT;","x_google_ignoreList":[0]}
package/dist/renderer.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const o=require("./components/MarkdownFlow/MarkdownFlow.cjs"),l=require("./components/MarkdownFlow/ScrollableMarkdownFlow.cjs"),n=require("./components/MarkdownFlow/ScrollToBottomButton.cjs"),r=require("./components/MarkdownFlow/useScrollToBottom.cjs"),e=require("./components/ContentRender/ContentRender.cjs"),u=require("./components/ContentRender/IframeSandbox.cjs"),a=require("./components/ContentRender/utils/split-content.cjs"),c=require("./components/ContentRender/MarkdownFlowInput.cjs"),t=require("./lib/interaction-defaults.cjs");exports.MarkdownFlow=o.default;exports.ScrollableMarkdownFlow=l.default;exports.ScrollToBottomButton=n.ScrollToBottomButton;exports.useScrollToBottom=r.useScrollToBottom;exports.ContentRender=e.default;exports.default=e.default;exports.IframeSandbox=u.default;exports.splitContentSegments=a.splitContentSegments;exports.MarkdownFlowInput=c.default;exports.getInteractionDefaultSelectedValues=t.getInteractionDefaultSelectedValues;exports.getInteractionDefaultValues=t.getInteractionDefaultValues;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const l=require("./components/MarkdownFlow/MarkdownFlow.cjs"),t=require("./components/MarkdownFlow/ScrollableMarkdownFlow.cjs"),r=require("./components/MarkdownFlow/ScrollToBottomButton.cjs"),n=require("./components/MarkdownFlow/ScrollToBottomControl.cjs"),u=require("./components/MarkdownFlow/useScrollToBottom.cjs"),o=require("./components/ContentRender/ContentRender.cjs"),a=require("./components/ContentRender/IframeSandbox.cjs"),c=require("./components/ContentRender/utils/split-content.cjs"),s=require("./components/ContentRender/MarkdownFlowInput.cjs"),e=require("./lib/interaction-defaults.cjs");exports.MarkdownFlow=l.default;exports.ScrollableMarkdown=t.default;exports.ScrollableMarkdownFlow=t.default;exports.ScrollToBottomButton=r.ScrollToBottomButton;exports.ScrollToBottomControl=n.ScrollToBottomControl;exports.useScrollToBottom=u.useScrollToBottom;exports.ContentRender=o.default;exports.default=o.default;exports.IframeSandbox=a.default;exports.splitContentSegments=c.splitContentSegments;exports.MarkdownFlowInput=s.default;exports.getInteractionDefaultSelectedValues=e.getInteractionDefaultSelectedValues;exports.getInteractionDefaultValues=e.getInteractionDefaultValues;
2
2
  //# sourceMappingURL=renderer.cjs.map