@vite-hub/ui 0.6.1 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (319) hide show
  1. package/README.md +106 -46
  2. package/dist/AttachmentTitle-BWw0ck0T.js +110 -0
  3. package/dist/BubbleContent-B1a4e3vE.js +45 -0
  4. package/dist/Chat-CuSthJVg.js +112 -0
  5. package/dist/ChatMessage-CFQs0v4N.js +94 -0
  6. package/dist/CodeBlockContent-BjXJm8lO.js +92 -0
  7. package/dist/CodeBlockTitle-DIu8Ef3V.js +99 -0
  8. package/dist/CommentRow-XY3FNp30.js +86 -0
  9. package/dist/CopyButton-Bs6DT-Z8.js +188 -0
  10. package/dist/Markdown-Da5t-931.js +70 -0
  11. package/dist/MarkdownCodeBlock-BWDLOWPO.js +127 -0
  12. package/dist/MarkdownImage-CJN3myt4.js +111 -0
  13. package/dist/MessageHeader-CJ9eBHSS.js +61 -0
  14. package/dist/MessageParts-CyJLG34y.js +57 -0
  15. package/dist/MessageScrollerViewport-BaTlWLki.js +142 -0
  16. package/dist/MorphText-B6MWdeIv.js +36 -0
  17. package/dist/RollNumber-CnF52zJM.js +49 -0
  18. package/dist/SwapIcon-CUIq1TU5.js +67 -0
  19. package/dist/TraceTitle-Cp0y7RRD.js +133 -0
  20. package/dist/agent-session-2j2gbGpp.js +875 -0
  21. package/dist/agent-session-BwZSMi4S.d.ts +312 -0
  22. package/dist/appendItems-hQ4aBd9Q.js +4047 -0
  23. package/dist/attachment-BllgHx9Q.d.ts +124 -0
  24. package/dist/attachment-DQMJNfj0.js +35 -0
  25. package/dist/avatar-stack-Bj1xUkzY.d.ts +4 -0
  26. package/dist/avatar-stack-CoLlsmwJ.js +72 -0
  27. package/dist/bubble-D3M2_InY.js +32 -0
  28. package/dist/bubble-DmplVxLr.d.ts +64 -0
  29. package/dist/chat-DWdyMSuj.d.ts +13 -0
  30. package/dist/chat-message-QLHnX_ED.d.ts +11 -0
  31. package/dist/chat-session-BOj5L3Ey.d.ts +29 -0
  32. package/dist/chat-session-cxUzvwdj.js +43 -0
  33. package/dist/choices-input-DqgXl5a-.d.ts +97 -0
  34. package/dist/{vue-d2Td6uu2.js → client-BG-oCUtv-5i4sRwXP.js} +4156 -4156
  35. package/dist/code-block-BqOEVWPh.d.ts +182 -0
  36. package/dist/code-block-CMERLfew.js +14 -0
  37. package/dist/code-view-26RY6dX8.js +137 -0
  38. package/dist/code-view-D8yYdFUc.d.ts +184 -0
  39. package/dist/{comment-composer-DmDM3XYP.d.ts → comment-composer-CsVOvG9j.d.ts} +6 -6
  40. package/dist/{comment-composer-X7vJKh5b.js → comment-composer-D_mcH3Ts.js} +175 -37
  41. package/dist/{comment-layer-KnnVfdRV.d.ts → comment-layer-C3xmg-0_.d.ts} +14 -5
  42. package/dist/comment-layer-Ci6ipGi2.js +1206 -0
  43. package/dist/{comment-panel-DoLDOw3E.d.ts → comment-panel-DxN21VoY.d.ts} +24 -17
  44. package/dist/comment-selection-bar-B_bchB2O.d.ts +33 -0
  45. package/dist/comment-selection-bar-DZAtiRZ9.js +144 -0
  46. package/dist/{comment-thread-DPV2kqA4.d.ts → comment-thread-BmsqcjVQ.d.ts} +9 -8
  47. package/dist/{comment-thread-jqPx6aJ8.js → comment-thread-BzOZVqF2.js} +74 -49
  48. package/dist/comments-BU8cTt5o.d.ts +50 -0
  49. package/dist/{comments-9MDSNm-9.js → comments-BaSrroRV.js} +32 -4
  50. package/dist/{comments-OWjNidkP.d.ts → comments-ZfV6IZs8.d.ts} +9 -2
  51. package/dist/components-B_2Q0dJ3.js +269 -0
  52. package/dist/{config-LRonN53j.js → config-BDQYUjjp.js} +10 -29
  53. package/dist/{config-COSdO-ay.d.ts → config-JmsTI7gs.d.ts} +20 -33
  54. package/dist/connection-status-BVSH2ZVo.js +72 -0
  55. package/dist/connection-status-g62BTn44.d.ts +37 -0
  56. package/dist/copy-button-CRiXUFsl.d.ts +17 -0
  57. package/dist/device-frame-BW6IjB6P.d.ts +78 -0
  58. package/dist/device-frame-DDWoyB-G.js +515 -0
  59. package/dist/diffs-BTKaVnsb.d.ts +272 -0
  60. package/dist/diffs.d.ts +3 -0
  61. package/dist/{pierre-code-view-C49BVDrc.js → diffs.js} +147 -4223
  62. package/dist/drop-field-C0bXv1J-.d.ts +35 -0
  63. package/dist/drop-field-DeIvKoJs.js +77 -0
  64. package/dist/editor-BsOTjnnN.d.ts +540 -0
  65. package/dist/{markdown-editor-D1irG9Xl.js → editor-hXea1i46.js} +833 -106
  66. package/dist/editor.d.ts +2 -0
  67. package/dist/editor.js +3 -0
  68. package/dist/element-BpjNQvZ0.js +6 -0
  69. package/dist/{file-tree-CRFIdtzw.js → file-tree-B4JKbp4r.js} +19 -18
  70. package/dist/{file-tree-DOtkeBaq.d.ts → file-tree-BdnKA6UA.d.ts} +33 -8
  71. package/dist/file-tree-DDSIafDn.d.ts +22 -0
  72. package/dist/file-tree-DS5shGSL.js +46 -0
  73. package/dist/file-tree.d.ts +2 -0
  74. package/dist/file-tree.js +1 -0
  75. package/dist/files-cuVXzWlx.js +30 -0
  76. package/dist/filter-search-C9e6sGij.d.ts +28 -0
  77. package/dist/filter-search-COZsoRiR.js +73 -0
  78. package/dist/formatCSSVariablePrefix-DLS1Ed1_.js +5 -0
  79. package/dist/headless-2IcUWHMq.d.ts +51 -0
  80. package/dist/headless.d.ts +7 -4
  81. package/dist/headless.js +5 -3
  82. package/dist/highlight.d.ts +2 -0
  83. package/dist/highlight.js +1 -0
  84. package/dist/{highlights-C2AbEdDI.js → highlights-8Al0-h-v.js} +3 -2
  85. package/dist/{hold-to-delete-BSMrpE-i.d.ts → hold-to-delete-CQc1JaG_.d.ts} +7 -0
  86. package/dist/{hold-to-delete-Cludb56v.js → hold-to-delete-D1Vy40w5.js} +138 -20
  87. package/dist/hold-to-delete-DazElJT2.js +85 -0
  88. package/dist/hold-to-delete-ksBE7wxc.d.ts +58 -0
  89. package/dist/index-CffOzibW.d.ts +77 -0
  90. package/dist/{index-B2cbt3py.d.ts → index-D3-uYBqH.d.ts} +1 -1
  91. package/dist/index.d.ts +165 -52
  92. package/dist/index.js +126 -670
  93. package/dist/markdown-BLALLOc0.d.ts +45 -0
  94. package/dist/{parts/components/markdown-renderer.d.ts → markdown-DkDxdpMU.d.ts} +10 -7
  95. package/dist/{markdown-renderer-DMyYKeil.js → markdown-_0HhbsOo.js} +125 -127
  96. package/dist/markdown-editor.d.ts +51 -98
  97. package/dist/markdown-editor.js +70 -3
  98. package/dist/markdown.d.ts +2 -0
  99. package/dist/markdown.js +1 -0
  100. package/dist/marker-CvcWZ3Zp.d.ts +59 -0
  101. package/dist/marker-DNL6QR3L.js +63 -0
  102. package/dist/message-BwivYIEl.js +13 -0
  103. package/dist/message-DEq4K5cQ.d.ts +72 -0
  104. package/dist/message-parts-B1BZFVKe.d.ts +3 -0
  105. package/dist/message-parts-CG3gNWn8.d.ts +11 -0
  106. package/dist/message-parts.d.ts +2 -0
  107. package/dist/message-parts.js +1 -0
  108. package/dist/message-scroller-D7AvM31v.d.ts +41 -0
  109. package/dist/motion/core.d.ts +4 -4
  110. package/dist/motion/core.js +5 -11
  111. package/dist/motion-BH6ShUam.d.ts +12 -0
  112. package/dist/{install-C4LwcJda.js → motion-BhARaNBB.js} +1 -1
  113. package/dist/{effects-C1zYpSpg.js → motion-core-JZZiPKEk.js} +1829 -120
  114. package/dist/{motion-core-Dh20n5Se.d.ts → motion-core-gfsTPLbh.d.ts} +35 -74
  115. package/dist/motion-list-9vD1hSS0.js +49 -0
  116. package/dist/motion.d.ts +5 -14
  117. package/dist/motion.js +6 -13
  118. package/dist/nuxt-ui-D3Qda35W.js +22 -0
  119. package/dist/nuxt.d.ts +9 -5
  120. package/dist/nuxt.js +28 -33
  121. package/dist/parts/components/agent-session.d.ts +2 -295
  122. package/dist/parts/components/agent-session.js +1 -659
  123. package/dist/parts/components/attachment.d.ts +2 -85
  124. package/dist/parts/components/attachment.js +3 -72
  125. package/dist/parts/components/avatar-stack.d.ts +3 -2
  126. package/dist/parts/components/avatar-stack.js +1 -60
  127. package/dist/parts/components/bubble.d.ts +2 -69
  128. package/dist/parts/components/bubble.js +3 -52
  129. package/dist/parts/components/chat-message.d.ts +3 -25
  130. package/dist/parts/components/chat-message.js +1 -50
  131. package/dist/parts/components/chat-session.d.ts +2 -26
  132. package/dist/parts/components/chat-session.js +1 -37
  133. package/dist/parts/components/chat.d.ts +3 -52
  134. package/dist/parts/components/chat.js +1 -105
  135. package/dist/parts/components/code-block.d.ts +2 -102
  136. package/dist/parts/components/code-block.js +4 -109
  137. package/dist/parts/components/code-view.d.ts +3 -268
  138. package/dist/parts/components/code-view.js +1 -1
  139. package/dist/parts/components/comment-composer.d.ts +1 -1
  140. package/dist/parts/components/comment-composer.js +1 -1
  141. package/dist/parts/components/comment-layer.d.ts +1 -1
  142. package/dist/parts/components/comment-layer.js +1 -634
  143. package/dist/parts/components/comment-panel.d.ts +2 -2
  144. package/dist/parts/components/comment-panel.js +22 -16
  145. package/dist/parts/components/comment-selection-bar.d.ts +2 -2
  146. package/dist/parts/components/comment-selection-bar.js +1 -116
  147. package/dist/parts/components/comment-thread.d.ts +1 -1
  148. package/dist/parts/components/comment-thread.js +1 -3
  149. package/dist/parts/components/comments.d.ts +8 -9
  150. package/dist/parts/components/comments.js +5 -9
  151. package/dist/parts/components/connection-status.d.ts +2 -36
  152. package/dist/parts/components/connection-status.js +1 -64
  153. package/dist/parts/components/copy-button.d.ts +3 -126
  154. package/dist/parts/components/copy-button.js +1 -226
  155. package/dist/parts/components/device-frame.d.ts +2 -128
  156. package/dist/parts/components/device-frame.js +1 -470
  157. package/dist/parts/components/drop-field.d.ts +2 -67
  158. package/dist/parts/components/drop-field.js +1 -76
  159. package/dist/parts/components/file-tree.d.ts +3 -2
  160. package/dist/parts/components/file-tree.js +3 -1
  161. package/dist/parts/components/filter-search.d.ts +2 -45
  162. package/dist/parts/components/filter-search.js +1 -57
  163. package/dist/parts/components/hold-to-delete.d.ts +2 -80
  164. package/dist/parts/components/hold-to-delete.js +1 -75
  165. package/dist/parts/components/markdown.d.ts +3 -45
  166. package/dist/parts/components/markdown.js +1 -46
  167. package/dist/parts/components/marker.d.ts +2 -32
  168. package/dist/parts/components/marker.js +1 -22
  169. package/dist/parts/components/message-parts.d.ts +3 -25
  170. package/dist/parts/components/message-parts.js +1 -45
  171. package/dist/parts/components/message.d.ts +2 -32
  172. package/dist/parts/components/message.js +3 -22
  173. package/dist/parts/components/motion-list.d.ts +2 -40
  174. package/dist/parts/components/motion-list.js +1 -41
  175. package/dist/parts/components/motion.d.ts +5 -118
  176. package/dist/parts/components/motion.js +5 -163
  177. package/dist/parts/components/patch-parsers.d.ts +1 -1
  178. package/dist/parts/components/progress.d.ts +2 -39
  179. package/dist/parts/components/progress.js +1 -53
  180. package/dist/parts/components/prompt-input.d.ts +2 -134
  181. package/dist/parts/components/prompt-input.js +1 -253
  182. package/dist/parts/components/relative-time.d.ts +2 -71
  183. package/dist/parts/components/relative-time.js +1 -1
  184. package/dist/parts/components/status.d.ts +2 -58
  185. package/dist/parts/components/status.js +1 -47
  186. package/dist/parts/components/sync-status.d.ts +2 -22
  187. package/dist/parts/components/sync-status.js +1 -48
  188. package/dist/parts/components/tool-list.d.ts +2 -28
  189. package/dist/parts/components/tool-list.js +1 -118
  190. package/dist/parts/components/trace-run.d.ts +2 -25
  191. package/dist/parts/components/trace-run.js +1 -89
  192. package/dist/parts/components/trace.d.ts +2 -59
  193. package/dist/parts/components/trace.js +1 -76
  194. package/dist/parts/composables/attachments.js +75 -1
  195. package/dist/parts/headless/choices-input.d.ts +2 -2
  196. package/dist/parts/headless/choices-input.js +49 -37
  197. package/dist/parts/headless/comments.d.ts +1 -1
  198. package/dist/parts/headless/comments.js +1 -1
  199. package/dist/parts/headless/message-scroller.d.ts +2 -2
  200. package/dist/parts/headless/message-scroller.js +211 -309
  201. package/dist/parts/headless/relative-time.d.ts +2 -0
  202. package/dist/parts/headless/relative-time.js +1 -0
  203. package/dist/parts/workspace/browser-support-notice.d.ts +1 -1
  204. package/dist/parts/workspace/browser-support-notice.js +6 -5
  205. package/dist/parts/workspace/connect-panel.js +1 -1
  206. package/dist/parts/workspace/runners/web-container.js +2 -2
  207. package/dist/parts/workspace/workspace-bar.d.ts +1 -1
  208. package/dist/parts/workspace/workspace-bar.js +1 -1
  209. package/dist/parts/workspace/workspace-boot-status.d.ts +1 -1
  210. package/dist/parts/workspace/workspace-boot-status.js +1 -206
  211. package/dist/parts/workspace/workspace-editor-head.d.ts +1 -1
  212. package/dist/parts/workspace/workspace-editor-head.js +1 -1
  213. package/dist/parts/workspace/workspace-editor.d.ts +2 -2
  214. package/dist/parts/workspace/workspace-examples.js +1 -1
  215. package/dist/parts/workspace/workspace-file-tree.d.ts +1 -1
  216. package/dist/parts/workspace/workspace-file-tree.js +3 -2
  217. package/dist/parts/workspace/workspace-guide.d.ts +1 -1
  218. package/dist/parts/workspace/workspace-guide.js +1 -1
  219. package/dist/parts/workspace/workspace-preview.d.ts +1 -1
  220. package/dist/parts/workspace/workspace-preview.js +14 -12
  221. package/dist/parts/workspace/workspace-shell.d.ts +1 -1
  222. package/dist/parts/workspace/workspace-shell.js +11 -11
  223. package/dist/parts/workspace/workspace-sidebar.d.ts +2 -2
  224. package/dist/parts/workspace/workspace-sidebar.js +2 -2
  225. package/dist/parts/workspace/workspace-start.d.ts +1 -1
  226. package/dist/parts/workspace/workspace-start.js +1 -1
  227. package/dist/parts/workspace/workspace-steps.js +1 -1
  228. package/dist/parts/workspace/workspace.d.ts +3 -3
  229. package/dist/parts/workspace/workspace.js +5 -5
  230. package/dist/press-BuEC-XvZ.d.ts +83 -0
  231. package/dist/progress-8P8RLYMy.js +47 -0
  232. package/dist/progress-Ch0fA-bf.d.ts +8 -0
  233. package/dist/prompt-input-CRXEJBAK.js +412 -0
  234. package/dist/prompt-input-j4OFTF5p.d.ts +116 -0
  235. package/dist/relative-time-BnJfjeEm.js +131 -0
  236. package/dist/relative-time-BuP-Gvzn.d.ts +43 -0
  237. package/dist/{relative-time-DJnw45tr.js → relative-time-Dz2DR4eb.js} +64 -114
  238. package/dist/relative-time-grHFu1kY.d.ts +11 -0
  239. package/dist/{ring-GaJsg32c.js → ring-B0nZBnU0.js} +1 -2
  240. package/dist/runtime/nuxt-plugin.js +2 -5
  241. package/dist/{shiki-CbfEu_Az.js → shiki-CxzM_xNo.js} +3 -2
  242. package/dist/stand-ins-CuKM1UH1.js +339 -0
  243. package/dist/status-B2Yhrwv8.js +67 -0
  244. package/dist/status-ySiRa-8O.d.ts +38 -0
  245. package/dist/{stream-tokenizer-ByC3l0HQ.js → stream-tokenizer-BsjV6wxW.js} +1 -1
  246. package/dist/styles.css +4348 -3410
  247. package/dist/sync-status-B29eG_n-.js +59 -0
  248. package/dist/sync-status-D4KdGO6y.d.ts +35 -0
  249. package/dist/theme.css +3 -0
  250. package/dist/theme.d.ts +14 -0
  251. package/dist/theme.js +19 -8
  252. package/dist/{themes-DKugPHlg.js → themes-B0_ioVT0.js} +1 -1
  253. package/dist/tool-list-DDaCqpR6.js +209 -0
  254. package/dist/tool-list-DMRPM0Yi.d.ts +50 -0
  255. package/dist/trace-KCBvOsw_.d.ts +113 -0
  256. package/dist/trace-run-Dk962P5a.d.ts +49 -0
  257. package/dist/trace-run-nh6FIsl6.js +202 -0
  258. package/dist/{opt-out-D66l60sg.js → tween-1W-LlKk9.js} +65 -2
  259. package/dist/types-CMU8Vmew.d.ts +71 -0
  260. package/dist/types-CTk3aNb5.d.ts +15 -0
  261. package/dist/types-D0a3i4Fw.d.ts +21 -0
  262. package/dist/types-DTecvcsZ.d.ts +35 -0
  263. package/dist/types-D_BWab7g.d.ts +75 -0
  264. package/dist/types-RHaQ4gj1.d.ts +27 -0
  265. package/dist/ui-components-CKQAPI-W.js +7 -0
  266. package/dist/unwrapDefault-CExq-4rm.js +5 -0
  267. package/dist/utils-hi9-xROt.js +37 -0
  268. package/dist/vite.d.ts +0 -1
  269. package/dist/vite.js +8 -14
  270. package/dist/{vue-vUGpdMct.js → vue-BdA18K5-.js} +1 -1
  271. package/dist/workspace-boot-status-CyGlJS06.js +216 -0
  272. package/dist/{workspace-shell-ChCwWPyv.d.ts → workspace-shell-B4A7CINd.d.ts} +1 -1
  273. package/dist/workspace.d.ts +1 -1
  274. package/dist/workspace.js +1 -2
  275. package/package.json +46 -15
  276. package/dist/announce-B0DLwflT.js +0 -31
  277. package/dist/attachments-DgwoQZKY.js +0 -88
  278. package/dist/avatar-stack-C0IKwj6g.d.ts +0 -57
  279. package/dist/choices-input-BUf-QqGj.d.ts +0 -92
  280. package/dist/code-view-Cg4nyTNA.js +0 -172
  281. package/dist/comment-attachments-DAzUbRmJ.js +0 -23
  282. package/dist/comment-list-ncwaCSVX.d.ts +0 -60
  283. package/dist/comment-person-D_IyIjXo.js +0 -39
  284. package/dist/comment-pin-hBJFiSYW.d.ts +0 -66
  285. package/dist/comment-row-DPMWI5Z0.js +0 -38
  286. package/dist/comment-selection-bar-CVuS-FNL.d.ts +0 -40
  287. package/dist/comment-send-CUkL3TbZ.js +0 -275
  288. package/dist/comment-send-MmxFsOQf.d.ts +0 -23
  289. package/dist/comment-send.css +0 -267
  290. package/dist/comment-status-nsCdrRk_.js +0 -20
  291. package/dist/drop-field-CNZgwFVO.js +0 -162
  292. package/dist/editor-Dmk3k6f6.js +0 -620
  293. package/dist/format-CPipR1FP.js +0 -19
  294. package/dist/handlers-CnbkvXjX.js +0 -181
  295. package/dist/icon-XZaCUZTG.d.ts +0 -29
  296. package/dist/image-preview-BKVUtfwQ.js +0 -104
  297. package/dist/index-B_PSX-5h.d.ts +0 -69
  298. package/dist/list-DUTAo0uC.js +0 -270
  299. package/dist/markdown-editor-B7gD60tp.d.ts +0 -189
  300. package/dist/message-scroller-BZqS63IX.d.ts +0 -173
  301. package/dist/nuxt-ui-7ByUrymx.js +0 -43
  302. package/dist/parts/components/comment-list.d.ts +0 -2
  303. package/dist/parts/components/comment-list.js +0 -173
  304. package/dist/parts/components/comment-pin.d.ts +0 -2
  305. package/dist/parts/components/comment-pin.js +0 -74
  306. package/dist/parts/components/comment-send.d.ts +0 -2
  307. package/dist/parts/components/comment-send.js +0 -1
  308. package/dist/parts/components/markdown-editor.d.ts +0 -2
  309. package/dist/parts/components/markdown-editor.js +0 -1
  310. package/dist/parts/components/markdown-renderer.js +0 -1
  311. package/dist/payload-text-DQNRbJY5.js +0 -31
  312. package/dist/progress-DL9k-ERG.js +0 -265
  313. package/dist/registry-DAIjCjWd.js +0 -77
  314. package/dist/slot-part-BWHvQ3mK.js +0 -25
  315. package/dist/text-gacox6bp.js +0 -822
  316. package/dist/travel-BliEidau.js +0 -180
  317. package/dist/tween-Dv3IIIQG.js +0 -61
  318. package/dist/types-Ceh7h7NT.d.ts +0 -31
  319. package/dist/visual-copy-CHHBfJ6O.js +0 -14
@@ -0,0 +1,45 @@
1
+ import { a as MarkdownValue, n as MarkdownOptions, r as MarkdownPlugins } from "./markdown-DkDxdpMU.js";
2
+ import { Component, PropType } from "vue";
3
+ interface MarkdownProps {
4
+ value?: MarkdownValue;
5
+ components?: Record<string, Component>;
6
+ plugins?: MarkdownPlugins;
7
+ options?: MarkdownOptions;
8
+ streaming?: boolean;
9
+ }
10
+ interface MarkdownCodeBlockProps {
11
+ language?: string;
12
+ filename?: string;
13
+ numbers?: number | string;
14
+ wrap?: boolean;
15
+ frame?: string;
16
+ }
17
+ interface MarkdownImageProps {
18
+ src?: string;
19
+ alt?: string;
20
+ title?: string;
21
+ }
22
+ declare const __VLS_export: import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<import("vue", { with: { "resolution-mode": "import" } }).ExtractPropTypes<{
23
+ value: {
24
+ type: PropType<MarkdownValue>;
25
+ default: string;
26
+ };
27
+ components: PropType<Record<string, Component>>;
28
+ plugins: PropType<MarkdownPlugins>;
29
+ options: PropType<MarkdownOptions>;
30
+ streaming: BooleanConstructor;
31
+ }>, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<import("vue", { with: { "resolution-mode": "import" } }).ExtractPropTypes<{
32
+ value: {
33
+ type: PropType<MarkdownValue>;
34
+ default: string;
35
+ };
36
+ components: PropType<Record<string, Component>>;
37
+ plugins: PropType<MarkdownPlugins>;
38
+ options: PropType<MarkdownOptions>;
39
+ streaming: BooleanConstructor;
40
+ }>> & Readonly<{}>, {
41
+ value: MarkdownValue;
42
+ streaming: boolean;
43
+ }, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, true, {}, any>;
44
+ declare const _default: typeof __VLS_export;
45
+ export { MarkdownProps as i, MarkdownCodeBlockProps as n, MarkdownImageProps as r, _default as t };
@@ -1,10 +1,14 @@
1
1
  import { PropType } from "vue";
2
2
  import { MarkdownDocumentProps, MarkdownProps } from "@comark/vue";
3
+ type MarkdownValue = string | NonNullable<MarkdownDocumentProps["value"]>;
4
+ type MarkdownComponents = NonNullable<MarkdownProps["components"]>;
5
+ type MarkdownPlugins = NonNullable<MarkdownProps["plugins"]>;
6
+ type MarkdownOptions = NonNullable<MarkdownProps["options"]>;
3
7
  /**
4
8
  * The part of `Markdown` that parses and renders: Comark, the comark-ui preset, and their plugins. `Markdown` loads it
5
9
  * with the first Markdown that renders, and passes its own props and attributes.
6
10
  */
7
- export declare const MarkdownRenderer: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
11
+ declare const MarkdownRenderer: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
8
12
  components: {
9
13
  type: PropType<MarkdownProps["components"]>;
10
14
  };
@@ -20,7 +24,7 @@ export declare const MarkdownRenderer: import("vue").DefineComponent<import("vue
20
24
  };
21
25
  value: {
22
26
  default: string;
23
- type: PropType<string | NonNullable<MarkdownDocumentProps["value"]>>;
27
+ type: PropType<MarkdownValue>;
24
28
  };
25
29
  }>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
26
30
  [key: string]: any;
@@ -40,11 +44,10 @@ export declare const MarkdownRenderer: import("vue").DefineComponent<import("vue
40
44
  };
41
45
  value: {
42
46
  default: string;
43
- type: PropType<string | NonNullable<MarkdownDocumentProps["value"]>>;
47
+ type: PropType<MarkdownValue>;
44
48
  };
45
49
  }>> & Readonly<{}>, {
46
- value: string | NonNullable<import("comark").MarkdownDocument<Record<string, any>, Record<string, any>> | {
47
- nodes: import("comark").MarkdownDocument["nodes"];
48
- } | undefined>;
50
+ value: MarkdownValue;
49
51
  streaming: boolean;
50
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
52
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
53
+ export { MarkdownValue as a, MarkdownRenderer as i, MarkdownOptions as n, MarkdownPlugins as r, MarkdownComponents as t };
@@ -1,15 +1,14 @@
1
1
  import { n as __exportAll } from "./rolldown-runtime-CahUhzF3.js";
2
- import { S as theme$29, T as isElement$35, _ as rawText$4, a as start$12, b as TABLE_WIDTHS, d as src_default$41, f as src_default$39, h as src_default$38, i as css$31, l as start$13, m as src_default$40, n as components$36, p as css$32, r as vue_exports$34, s as describeTime, u as addStyles$23, w as childrenOf$31, x as typesetCss, y as FOLD_WIDTHS } from "./vue-d2Td6uu2.js";
2
+ import { S as theme$29, T as isElement$35, _ as rawText$4, a as vue_exports$34, b as TABLE_WIDTHS, d as src_default$41, f as src_default$39, h as src_default$38, i as components$36, l as describeTime, m as src_default$40, n as start$13, o as css$31, p as css$32, s as start$12, u as addStyles$23, w as childrenOf$31, x as typesetCss, y as FOLD_WIDTHS } from "./client-BG-oCUtv-5i4sRwXP.js";
3
3
  import { n as SERIES, t as INK } from "./colors-BghReA9C-A4M9YE0s.js";
4
- import { t as ImagePreview } from "./image-preview-BKVUtfwQ.js";
5
4
  import { t as uiErrorDiagnostics } from "./error-diagnostics-BlgA9rI2.js";
6
- import { o as useViteHubUIMotionEnabled } from "./config-LRonN53j.js";
5
+ import { r as useViteHubUIMotionEnabled } from "./config-BDQYUjjp.js";
7
6
  import { defineAsyncComponent, defineComponent, h, inject, onBeforeUnmount, onMounted, provide, shallowRef, useId, watch, watchEffect } from "vue";
7
+ import { Markdown, MarkdownDocument } from "@comark/vue";
8
8
  import { defineComarkPlugin } from "comark";
9
9
  import { escapeHtml, pascalCase, textContent, toNativeAttributes } from "comark/utils";
10
10
  import comarkHtml from "comark/plugins/html";
11
11
  import { resolveAttributes } from "comark/render";
12
- import { Markdown, MarkdownDocument } from "@comark/vue";
13
12
  import { searchProps } from "comark/plugins/mermaid";
14
13
  import alert from "@comark/vue/plugins/alert";
15
14
  import attributes from "@comark/vue/plugins/attributes";
@@ -3875,126 +3874,6 @@ function preset$1(renderer, options = {}) {
3875
3874
  componentInfo: info
3876
3875
  };
3877
3876
  }
3878
- // ../../node_modules/.pnpm/comark-time@0.14.3_@comark+html@0.9.2_katex@0.19.1_shiki@4.6.0__comark@0.9.2_katex@0.19_52d65904d637efc7b61962992363cd98/node_modules/comark-time/dist/src-C106soQH.mjs
3879
- const isElement$29 = (node) => Array.isArray(node) && node[0] !== null;
3880
- const childrenOf$26 = ([, , ...rest]) => rest;
3881
- /**
3882
- * A prop value as text. Comark writes strings, numbers, and booleans, so an object, array, function, or missing value
3883
- * is no text. The `typeof` check, unlike `instanceof`, can't throw on a revoked proxy.
3884
- */
3885
- function scalar$24(value) {
3886
- switch (typeof value) {
3887
- case "string": return value;
3888
- case "number":
3889
- case "boolean":
3890
- case "bigint":
3891
- case "symbol": return String(value);
3892
- default: return;
3893
- }
3894
- }
3895
- /** A prop value as text, without its surrounding whitespace, or empty when it has none. */
3896
- const text$24 = (value) => scalar$24(value)?.trim() ?? "";
3897
- /** FNV-1a, in base 36: short, and the same every time the same text is hashed, so ids derived from it are stable. */
3898
- function hash$5(source) {
3899
- let value = 2166136261;
3900
- for (let at = 0; at < source.length; at++) value = Math.imul(value ^ source.charCodeAt(at), 16777619);
3901
- return (value >>> 0).toString(36);
3902
- }
3903
- /** The tag a `:time` becomes, so a `<time>` that another plugin or the author writes never reaches its components. */
3904
- const TIME_TAG = "relative-time";
3905
- const PROPS$13 = ["threshold"];
3906
- const DURATION = /^(?:none|never|\d+(?:\.\d+)?\s*(?:s|m|h|d|w|mo|y))$/i;
3907
- function props$1(node, name, issues) {
3908
- for (const key of Object.keys(node[1])) {
3909
- const prop = key.replace(/^:/, "");
3910
- if (!PROPS$13.includes(prop) && prop !== "id" && prop !== "class") issues.push({
3911
- rule: "comark/time/unknown-prop",
3912
- message: `${name}: \`${prop}\` isn't a prop of \`:time\`, so it's ignored. Use \`threshold\`.`
3913
- });
3914
- }
3915
- }
3916
- const textOf$6 = (node) => !Array.isArray(node) ? node : isElement$29(node) ? childrenOf$26(node).map(textOf$6).join("") : "";
3917
- /**
3918
- * Turns `:time[2026-10-12]` into a `relative-time` node that reads "3 days ago" and, from `threshold` on, "Oct 12" or
3919
- * "Oct 12, 2025", with the full date as its tooltip. Everything is worked out against one `now` per document, so
3920
- * rendering twice gives the same words. Problems are added to `meta.issues`.
3921
- */
3922
- var src_default$30 = defineComarkPlugin((settings = {}) => {
3923
- const fallback = settings.threshold ?? "3w";
3924
- const configuredNow = settings.now === void 0 ? void 0 : new Date(settings.now).getTime();
3925
- describeTime(0, {
3926
- ...settings,
3927
- now: settings.now === void 0 ? 0 : configuredNow
3928
- });
3929
- return {
3930
- name: "comark-time",
3931
- post(state) {
3932
- const { tree } = state;
3933
- const data = {
3934
- frontmatter: tree.frontmatter,
3935
- meta: tree.meta,
3936
- data: {},
3937
- props: {}
3938
- };
3939
- const now = configuredNow ?? Date.now();
3940
- const issues = [];
3941
- const prefix = `ctm-${hash$5(state.markdown)}`;
3942
- let count = 0;
3943
- const asWritten = (node, shown) => void node.splice(0, node.length, "span", {}, ...shown ? [shown] : []);
3944
- const read = (node) => {
3945
- const name = `\`:time\` ${++count}`;
3946
- const shown = textOf$6(node).trim();
3947
- props$1(node, name, issues);
3948
- const attrs = resolveAttributes(node[1], data, { parseJson: true });
3949
- const wanted = text$24(attrs.threshold);
3950
- if (wanted && !DURATION.test(wanted)) issues.push({
3951
- rule: "comark/time/invalid-threshold",
3952
- message: `${name}: \`threshold="${wanted}"\` isn't a duration. Write a number and a unit, such as \`threshold="3w"\`, or \`none\` to keep it relative.`
3953
- });
3954
- if (!shown) {
3955
- issues.push({
3956
- rule: "comark/time/missing-date",
3957
- message: `${name} has no date. Write the date in brackets, such as \`:time[2026-10-12]\`.`
3958
- });
3959
- return asWritten(node, "");
3960
- }
3961
- const threshold = wanted && DURATION.test(wanted) ? wanted : fallback;
3962
- const time = describeTime(shown, {
3963
- now,
3964
- threshold,
3965
- locale: settings.locale,
3966
- timeZone: settings.timeZone
3967
- });
3968
- if (!time) {
3969
- issues.push({
3970
- rule: "comark/time/invalid-date",
3971
- message: `${name}: "${shown}" isn't a date, so it's shown as written. Write it as \`2026-10-12\` or \`2026-10-12T14:03:00Z\`.`
3972
- });
3973
- return asWritten(node, shown);
3974
- }
3975
- node.splice(0, node.length, TIME_TAG, {
3976
- id: `${prefix}-${count}`,
3977
- ...time,
3978
- locale: settings.locale ?? "en-US",
3979
- threshold
3980
- });
3981
- };
3982
- const walk = (nodes) => {
3983
- for (const node of nodes) {
3984
- if (!isElement$29(node) || node[1].$?.html) continue;
3985
- if (node[0] === "time" && node[1].datetime === void 0) read(node);
3986
- else walk(childrenOf$26(node));
3987
- }
3988
- };
3989
- walk(tree.nodes);
3990
- tree.meta.issues = [...tree.meta.issues ?? [], ...issues.map((issue) => issue.message)];
3991
- tree.meta.issueRules = {
3992
- ...tree.meta.issueRules,
3993
- ...Object.fromEntries(issues.map((issue) => [issue.message, issue.rule]))
3994
- };
3995
- }
3996
- };
3997
- });
3998
3877
  // ../../node_modules/.pnpm/comark-ui@0.14.3_@comark+html@0.9.2_katex@0.19.1_shiki@4.6.0__@tiptap+core@3.35.0_@tipt_12c0f6863a75018f6c283382c6d06ad0/node_modules/comark-ui/dist/issues-CRIycaOO.mjs
3999
3878
  /**
4000
3879
  * The box's styles, on the shared `--comark-*` tokens: a card tinted with the danger color, which also paints the icon,
@@ -4325,7 +4204,7 @@ function startMermaid() {
4325
4204
  return start$11();
4326
4205
  }
4327
4206
  // ../../node_modules/.pnpm/comark-ui@0.14.3_@comark+html@0.9.2_katex@0.19.1_shiki@4.6.0__@tiptap+core@3.35.0_@tipt_12c0f6863a75018f6c283382c6d06ad0/node_modules/comark-ui/dist/vue-mermaid-BKeezR-B.mjs
4328
- const Pele = defineAsyncComponent(() => import("./vue-vUGpdMct.js").then(({ createPeleComponent }) => createPeleComponent({
4207
+ const Pele = defineAsyncComponent(() => import("./vue-BdA18K5-.js").then(({ createPeleComponent }) => createPeleComponent({
4329
4208
  onRender: addMermaidStyles,
4330
4209
  onError: addMermaidStyles
4331
4210
  })));
@@ -4361,6 +4240,126 @@ const typeset = defineComponent({
4361
4240
  innerHTML: typesetCss
4362
4241
  })
4363
4242
  });
4243
+ // ../../node_modules/.pnpm/comark-time@0.14.3_@comark+html@0.9.2_katex@0.19.1_shiki@4.6.0__comark@0.9.2_katex@0.19_52d65904d637efc7b61962992363cd98/node_modules/comark-time/dist/src-C106soQH.mjs
4244
+ const isElement$29 = (node) => Array.isArray(node) && node[0] !== null;
4245
+ const childrenOf$26 = ([, , ...rest]) => rest;
4246
+ /**
4247
+ * A prop value as text. Comark writes strings, numbers, and booleans, so an object, array, function, or missing value
4248
+ * is no text. The `typeof` check, unlike `instanceof`, can't throw on a revoked proxy.
4249
+ */
4250
+ function scalar$24(value) {
4251
+ switch (typeof value) {
4252
+ case "string": return value;
4253
+ case "number":
4254
+ case "boolean":
4255
+ case "bigint":
4256
+ case "symbol": return String(value);
4257
+ default: return;
4258
+ }
4259
+ }
4260
+ /** A prop value as text, without its surrounding whitespace, or empty when it has none. */
4261
+ const text$24 = (value) => scalar$24(value)?.trim() ?? "";
4262
+ /** FNV-1a, in base 36: short, and the same every time the same text is hashed, so ids derived from it are stable. */
4263
+ function hash$5(source) {
4264
+ let value = 2166136261;
4265
+ for (let at = 0; at < source.length; at++) value = Math.imul(value ^ source.charCodeAt(at), 16777619);
4266
+ return (value >>> 0).toString(36);
4267
+ }
4268
+ /** The tag a `:time` becomes, so a `<time>` that another plugin or the author writes never reaches its components. */
4269
+ const TIME_TAG = "relative-time";
4270
+ const PROPS$13 = ["threshold"];
4271
+ const DURATION = /^(?:none|never|\d+(?:\.\d+)?\s*(?:s|m|h|d|w|mo|y))$/i;
4272
+ function props$1(node, name, issues) {
4273
+ for (const key of Object.keys(node[1])) {
4274
+ const prop = key.replace(/^:/, "");
4275
+ if (!PROPS$13.includes(prop) && prop !== "id" && prop !== "class") issues.push({
4276
+ rule: "comark/time/unknown-prop",
4277
+ message: `${name}: \`${prop}\` isn't a prop of \`:time\`, so it's ignored. Use \`threshold\`.`
4278
+ });
4279
+ }
4280
+ }
4281
+ const textOf$6 = (node) => !Array.isArray(node) ? node : isElement$29(node) ? childrenOf$26(node).map(textOf$6).join("") : "";
4282
+ /**
4283
+ * Turns `:time[2026-10-12]` into a `relative-time` node that reads "3 days ago" and, from `threshold` on, "Oct 12" or
4284
+ * "Oct 12, 2025", with the full date as its tooltip. Everything is worked out against one `now` per document, so
4285
+ * rendering twice gives the same words. Problems are added to `meta.issues`.
4286
+ */
4287
+ var src_default$30 = defineComarkPlugin((settings = {}) => {
4288
+ const fallback = settings.threshold ?? "3w";
4289
+ const configuredNow = settings.now === void 0 ? void 0 : new Date(settings.now).getTime();
4290
+ describeTime(0, {
4291
+ ...settings,
4292
+ now: settings.now === void 0 ? 0 : configuredNow
4293
+ });
4294
+ return {
4295
+ name: "comark-time",
4296
+ post(state) {
4297
+ const { tree } = state;
4298
+ const data = {
4299
+ frontmatter: tree.frontmatter,
4300
+ meta: tree.meta,
4301
+ data: {},
4302
+ props: {}
4303
+ };
4304
+ const now = configuredNow ?? Date.now();
4305
+ const issues = [];
4306
+ const prefix = `ctm-${hash$5(state.markdown)}`;
4307
+ let count = 0;
4308
+ const asWritten = (node, shown) => void node.splice(0, node.length, "span", {}, ...shown ? [shown] : []);
4309
+ const read = (node) => {
4310
+ const name = `\`:time\` ${++count}`;
4311
+ const shown = textOf$6(node).trim();
4312
+ props$1(node, name, issues);
4313
+ const attrs = resolveAttributes(node[1], data, { parseJson: true });
4314
+ const wanted = text$24(attrs.threshold);
4315
+ if (wanted && !DURATION.test(wanted)) issues.push({
4316
+ rule: "comark/time/invalid-threshold",
4317
+ message: `${name}: \`threshold="${wanted}"\` isn't a duration. Write a number and a unit, such as \`threshold="3w"\`, or \`none\` to keep it relative.`
4318
+ });
4319
+ if (!shown) {
4320
+ issues.push({
4321
+ rule: "comark/time/missing-date",
4322
+ message: `${name} has no date. Write the date in brackets, such as \`:time[2026-10-12]\`.`
4323
+ });
4324
+ return asWritten(node, "");
4325
+ }
4326
+ const threshold = wanted && DURATION.test(wanted) ? wanted : fallback;
4327
+ const time = describeTime(shown, {
4328
+ now,
4329
+ threshold,
4330
+ locale: settings.locale,
4331
+ timeZone: settings.timeZone
4332
+ });
4333
+ if (!time) {
4334
+ issues.push({
4335
+ rule: "comark/time/invalid-date",
4336
+ message: `${name}: "${shown}" isn't a date, so it's shown as written. Write it as \`2026-10-12\` or \`2026-10-12T14:03:00Z\`.`
4337
+ });
4338
+ return asWritten(node, shown);
4339
+ }
4340
+ node.splice(0, node.length, TIME_TAG, {
4341
+ id: `${prefix}-${count}`,
4342
+ ...time,
4343
+ locale: settings.locale ?? "en-US",
4344
+ threshold
4345
+ });
4346
+ };
4347
+ const walk = (nodes) => {
4348
+ for (const node of nodes) {
4349
+ if (!isElement$29(node) || node[1].$?.html) continue;
4350
+ if (node[0] === "time" && node[1].datetime === void 0) read(node);
4351
+ else walk(childrenOf$26(node));
4352
+ }
4353
+ };
4354
+ walk(tree.nodes);
4355
+ tree.meta.issues = [...tree.meta.issues ?? [], ...issues.map((issue) => issue.message)];
4356
+ tree.meta.issueRules = {
4357
+ ...tree.meta.issueRules,
4358
+ ...Object.fromEntries(issues.map((issue) => [issue.message, issue.rule]))
4359
+ };
4360
+ }
4361
+ };
4362
+ });
4364
4363
  // ../../node_modules/.pnpm/comark-badge@0.14.3_@comark+html@0.9.2_katex@0.19.1_shiki@4.6.0__comark@0.9.2_katex@0.1_da6a900a092246389107ae99511f34e9/node_modules/comark-badge/dist/live-C_HOkzC_.mjs
4365
4364
  const record$1 = (value) => value !== null && typeof value === "object" && !Array.isArray(value) ? value : {};
4366
4365
  const ttls = {
@@ -27123,7 +27122,7 @@ function isEscapedDelimiter(source, index) {
27123
27122
  for (let position = index - 1; position >= 0 && source[position] === "\\"; position--) backslashes++;
27124
27123
  return backslashes % 2 === 1;
27125
27124
  }
27126
- // src/components/markdown-renderer.ts
27125
+ // src/internal/markdown-renderer.ts
27127
27126
  const preset = vue_default({
27128
27127
  chips: { download: false },
27129
27128
  badge: { download: false },
@@ -27235,7 +27234,6 @@ const MarkdownRenderer = defineComponent({
27235
27234
  const resolvedComponents = {
27236
27235
  ...preset.components,
27237
27236
  "typeset-styles": DocumentStyles,
27238
- img: ImagePreview,
27239
27237
  ...typeof props.value === "string" ? { math: AgentMath } : {},
27240
27238
  ...props.components
27241
27239
  };
@@ -1,104 +1,57 @@
1
- import { n as MarkdownEditorUpload, r as blobUpload, t as MarkdownEditor } from "./markdown-editor-B7gD60tp.js";
2
- import { PropType, VNode } from "vue";
3
- import { Editor, JSONContent } from "@tiptap/core";
4
- import { PluginKey } from "@tiptap/pm/state";
5
- /**
6
- * What an editor menu item asks for. `kind` names the handler that runs it, and the other fields are its arguments:
7
- * the mark to toggle, the heading level, or the position of the block that the block menu acts on.
8
- */
9
- interface EditorItem {
10
- kind?: string;
11
- mark?: string;
12
- level?: 1 | 2 | 3 | 4 | 5 | 6;
13
- pos?: number;
1
+ import { S as mapEditorItems, _ as EditorItem, a as blobUpload, b as createEditorHandlers, c as EditorSuggestionMenuItem, d as EditorToolbarTooltip, g as EditorHandlers, h as EditorHandler, l as EditorToolbarItem, n as MarkdownEditorUpload, r as UseMarkdownEditorOptions, s as EditorDragHandleNode, t as MarkdownEditorError, u as EditorToolbarMenuEntry, v as EditorMenuEntry, x as editorHandlersKey, y as MappedEditorMenuEntry } from "./editor-BsOTjnnN.js";
2
+ import { PropType } from "vue";
3
+ import { AnyExtension } from "@tiptap/core";
4
+ import { Editor as Editor$1 } from "@tiptap/vue-3";
5
+ interface MarkdownEditorProps {
6
+ defaultValue?: string;
7
+ editor?: Editor$1;
8
+ upload?: string | MarkdownEditorUpload;
9
+ accept?: (file: File) => boolean;
10
+ plugins?: UseMarkdownEditorOptions["plugins"];
11
+ extensions?: AnyExtension[];
14
12
  }
15
- /** Runs one `kind` of item on an editor. The toolbar, the "/" menu, and the block menu read the same handlers. */
16
- interface EditorHandler {
17
- canExecute: (editor: Editor, item: EditorItem) => boolean;
18
- execute: (editor: Editor, item: EditorItem) => {
19
- run: () => unknown;
20
- };
21
- isActive: (editor: Editor, item: EditorItem) => boolean;
22
- isDisabled?: (editor: Editor, item: EditorItem) => boolean;
13
+ interface MarkdownEditorEmits {
14
+ "update:modelValue": [value: string];
15
+ error: [event: MarkdownEditorError];
23
16
  }
24
- type EditorHandlers = Record<string, EditorHandler>;
25
- /**
26
- * The key that the editor parts read their handlers from, as a `Ref<EditorHandlers>`. It is the string that Nuxt UI's
27
- * editor components inject, so one `provide()` serves both sets.
28
- */
29
- export declare const editorHandlersKey = "editorHandlers";
30
- /**
31
- * The handlers of the item kinds that ViteHub's editors use: `mark` (with `mark`), `heading` (with `level`),
32
- * `paragraph`, `blockquote`, `codeBlock`, `horizontalRule`, `bulletList`, `orderedList`, and, for the block at `pos`,
33
- * `duplicate`, `delete`, `moveUp`, `moveDown`, and `suggestion` (opens the "/" menu below it). They match Nuxt UI's
34
- * `createHandlers()` for these kinds. Spread your own over them for other kinds.
35
- */
36
- export declare function createEditorHandlers(): EditorHandlers;
37
- /** A menu entry that `mapEditorItems()` reads: an editor item, or a label or separator, with any menu fields. */
38
- type EditorMenuEntry = EditorItem & {
39
- type?: "label" | "separator" | "link" | "checkbox";
40
- children?: EditorMenuEntry[] | EditorMenuEntry[][];
41
- [field: string]: unknown;
42
- };
43
- /** An entry after `mapEditorItems()`: what the editor item says it is, as a dropdown menu entry. */
44
- type MappedEditorMenuEntry = EditorMenuEntry & {
45
- active?: boolean;
46
- disabled?: boolean;
47
- onSelect?: () => void;
48
- };
49
- /**
50
- * Turns editor items into dropdown menu entries: each item with a known `kind` gets `active`, `disabled`, and an
51
- * `onSelect` that runs its handler, as Nuxt UI's `mapEditorItems()` does. Groups and `children` keep their shape.
52
- */
53
- export declare function mapEditorItems(editor: Editor, items: EditorMenuEntry[], handlers?: EditorHandlers): MappedEditorMenuEntry[];
54
- export declare function mapEditorItems(editor: Editor, items: EditorMenuEntry[][], handlers?: EditorHandlers): MappedEditorMenuEntry[][];
55
- /** A tooltip as Nuxt UI's toolbar items take it: its text, and its keys, such as `["meta", "b"]`. */
56
- interface EditorToolbarTooltip {
57
- text?: string;
58
- kbds?: string[];
17
+ interface MarkdownEditorSlots {
18
+ default?: (props: {
19
+ editor: Editor$1;
20
+ }) => unknown;
59
21
  }
60
- /** A dropdown entry of a toolbar item: an editor item, a label, or a separator. */
61
- type EditorToolbarMenuEntry = EditorItem & {
62
- type?: "label" | "separator";
63
- label?: string;
64
- icon?: string;
65
- disabled?: boolean;
66
- onSelect?: (event: Event) => void;
67
- };
68
- /** A toolbar item: an editor item, a button with `onClick`, a dropdown with `items`, or a named slot with `slot`. */
69
- type EditorToolbarItem = EditorItem & {
70
- "aria-label"?: string;
71
- label?: string;
72
- icon?: string;
73
- trailingIcon?: string;
74
- tooltip?: EditorToolbarTooltip;
75
- slot?: string;
76
- active?: boolean;
77
- disabled?: boolean;
78
- onClick?: ((event: MouseEvent) => void) | Array<(event: MouseEvent) => void>;
79
- items?: EditorToolbarMenuEntry[] | EditorToolbarMenuEntry[][];
80
- content?: {
81
- align?: "start" | "center" | "end";
82
- side?: "top" | "right" | "bottom" | "left";
83
- sideOffset?: number;
22
+ type __VLS_Slots = MarkdownEditorSlots;
23
+ declare const __VLS_base: import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<import("vue", { with: { "resolution-mode": "import" } }).ExtractPropTypes<{
24
+ defaultValue: StringConstructor;
25
+ editor: PropType<Editor$1>;
26
+ upload: PropType<MarkdownEditorProps["upload"]>;
27
+ accept: PropType<MarkdownEditorProps["accept"]>;
28
+ plugins: PropType<MarkdownEditorProps["plugins"]>;
29
+ extensions: PropType<AnyExtension[]>;
30
+ modelValue: {
31
+ type: PropType<string>;
84
32
  };
85
- ui?: {
86
- content?: string;
33
+ }>, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {
34
+ error: (event: MarkdownEditorError) => any;
35
+ "update:modelValue": (...args: unknown[]) => any;
36
+ }, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<import("vue", { with: { "resolution-mode": "import" } }).ExtractPropTypes<{
37
+ defaultValue: StringConstructor;
38
+ editor: PropType<Editor$1>;
39
+ upload: PropType<MarkdownEditorProps["upload"]>;
40
+ accept: PropType<MarkdownEditorProps["accept"]>;
41
+ plugins: PropType<MarkdownEditorProps["plugins"]>;
42
+ extensions: PropType<AnyExtension[]>;
43
+ modelValue: {
44
+ type: PropType<string>;
45
+ };
46
+ }>> & Readonly<{
47
+ onError?: ((event: MarkdownEditorError) => any) | undefined;
48
+ "onUpdate:modelValue"?: ((...args: unknown[]) => any) | undefined;
49
+ }>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, true, {}, any>;
50
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
51
+ declare const _default: typeof __VLS_export;
52
+ type __VLS_WithSlots<T, S> = T & {
53
+ new (): {
54
+ $slots: S;
87
55
  };
88
56
  };
89
- /** An entry of the "/" menu: an editor item with a label, or a label or separator between them. */
90
- type EditorSuggestionMenuItem = EditorItem & {
91
- type?: "label" | "separator";
92
- label?: string;
93
- description?: string;
94
- icon?: string;
95
- disabled?: boolean;
96
- keywords?: string[];
97
- class?: string;
98
- };
99
- /** The block that the handle points at: its JSON and its position in the document. */
100
- interface EditorDragHandleNode {
101
- node: JSONContent;
102
- pos: number;
103
- }
104
- export { type EditorDragHandleNode, type EditorHandler, type EditorHandlers, type EditorItem, type EditorMenuEntry, type EditorSuggestionMenuItem, type EditorToolbarItem, type EditorToolbarMenuEntry, type EditorToolbarTooltip, type MappedEditorMenuEntry, MarkdownEditor, type MarkdownEditorUpload, blobUpload };
57
+ export { type EditorDragHandleNode, type EditorHandler, type EditorHandlers, type EditorItem, type EditorMenuEntry, type EditorSuggestionMenuItem, type EditorToolbarItem, type EditorToolbarMenuEntry, type EditorToolbarTooltip, type MappedEditorMenuEntry, _default as MarkdownEditor, type MarkdownEditorEmits, type MarkdownEditorError, type MarkdownEditorProps, type MarkdownEditorSlots, type MarkdownEditorUpload, blobUpload, createEditorHandlers, editorHandlersKey, mapEditorItems };
@@ -1,3 +1,70 @@
1
- import { n as blobUpload, t as MarkdownEditor } from "./markdown-editor-D1irG9Xl.js";
2
- import { n as editorHandlersKey, r as mapEditorItems, t as createEditorHandlers } from "./handlers-CnbkvXjX.js";
3
- export { MarkdownEditor, blobUpload, createEditorHandlers, editorHandlersKey, mapEditorItems };
1
+ import { a as useMarkdownEditor, c as mapEditorItems, i as blobUpload, n as UEditorSuggestionMenu, o as createEditorHandlers, r as UEditorToolbar, s as editorHandlersKey, t as UEditorDragHandle } from "./editor-hXea1i46.js";
2
+ import { x as typesetCss } from "./client-BG-oCUtv-5i4sRwXP.js";
3
+ import { createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, mergeModels, mergeProps, openBlock, ref, renderSlot, resolveDynamicComponent, toRef, unref, useModel, watch } from "vue";
4
+ import { EditorContent } from "@tiptap/vue-3";
5
+ // registry/markdown-editor/MarkdownEditor.vue?vue&type=script&setup=true&lang.ts
6
+ const _hoisted_1 = {
7
+ "data-slot": "markdown-editor-content",
8
+ class: "vh-markdown-editor-content vh-typeset"
9
+ };
10
+ // registry/markdown-editor/MarkdownEditor.vue
11
+ var MarkdownEditor_default = /* @__PURE__ */ defineComponent({
12
+ name: "MarkdownEditor",
13
+ inheritAttrs: false,
14
+ __name: "MarkdownEditor",
15
+ props: /*@__PURE__*/ mergeModels({
16
+ defaultValue: String,
17
+ editor: Object,
18
+ upload: [String, Function],
19
+ accept: Function,
20
+ plugins: Array,
21
+ extensions: Array
22
+ }, {
23
+ "modelValue": {},
24
+ "modelModifiers": {}
25
+ }),
26
+ emits: /*@__PURE__*/ mergeModels(["update:modelValue", "error"], ["update:modelValue"]),
27
+ setup(__props, { emit: __emit }) {
28
+ const model = useModel(__props, "modelValue");
29
+ const props = __props;
30
+ const emit = __emit;
31
+ const markdown = ref(model.value ?? props.defaultValue ?? "");
32
+ watch(model, (value) => {
33
+ if (value !== void 0) markdown.value = value;
34
+ });
35
+ watch(markdown, (value) => {
36
+ if (value !== model.value) model.value = value;
37
+ });
38
+ const { editor, toolbarItems, menuItems } = useMarkdownEditor(markdown, {
39
+ editor: props.editor,
40
+ upload: toRef(props, "upload"),
41
+ accept: toRef(props, "accept"),
42
+ plugins: props.plugins,
43
+ extensions: props.extensions,
44
+ onError: (event) => emit("error", event)
45
+ });
46
+ return (_ctx, _cache) => {
47
+ return unref(editor) ? (openBlock(), createElementBlock("div", mergeProps({ key: 0 }, _ctx.$attrs, {
48
+ "data-slot": "markdown-editor",
49
+ class: "vh-markdown-editor"
50
+ }), [
51
+ createElementVNode("div", _hoisted_1, [(openBlock(), createBlock(resolveDynamicComponent("style"), {
52
+ "data-comark-typeset": "",
53
+ innerHTML: unref(typesetCss)
54
+ }, null, 8, ["innerHTML"])), createVNode(unref(EditorContent), { editor: unref(editor) }, null, 8, ["editor"])]),
55
+ createVNode(unref(UEditorToolbar), {
56
+ editor: unref(editor),
57
+ items: unref(toolbarItems),
58
+ layout: "bubble"
59
+ }, null, 8, ["editor", "items"]),
60
+ createVNode(unref(UEditorSuggestionMenu), {
61
+ editor: unref(editor),
62
+ items: unref(menuItems)
63
+ }, null, 8, ["editor", "items"]),
64
+ createVNode(unref(UEditorDragHandle), { editor: unref(editor) }, null, 8, ["editor"]),
65
+ renderSlot(_ctx.$slots, "default", { editor: unref(editor) })
66
+ ], 16)) : createCommentVNode("v-if", true);
67
+ };
68
+ }
69
+ });
70
+ export { MarkdownEditor_default as MarkdownEditor, blobUpload, createEditorHandlers, editorHandlersKey, mapEditorItems };
@@ -0,0 +1,2 @@
1
+ import { a as MarkdownValue, i as MarkdownRenderer, n as MarkdownOptions, r as MarkdownPlugins, t as MarkdownComponents } from "./markdown-DkDxdpMU.js";
2
+ export { type MarkdownComponents, type MarkdownOptions, type MarkdownPlugins, MarkdownRenderer, type MarkdownValue };
@@ -0,0 +1 @@
1
+ export { t as MarkdownRenderer } from "./markdown-_0HhbsOo.js";