@datawhale/prosemirror-render 0.0.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 (287) hide show
  1. package/dist/AttachmentBlock-ChMNTUOo.mjs +351 -0
  2. package/dist/AttachmentBlock-DsmJP3Kw.js +1 -0
  3. package/dist/AttachmentInline-Dc3dp0g-.js +1 -0
  4. package/dist/AttachmentInline-tbC8BJBy.mjs +52 -0
  5. package/dist/AttachmentMenu-B5x8P9_n.mjs +541 -0
  6. package/dist/AttachmentMenu-ExoCOe4B.js +1 -0
  7. package/dist/Blockquote-BamWUQND.mjs +15 -0
  8. package/dist/Blockquote-CQSBFnsu.js +1 -0
  9. package/dist/BulletList-BQTUD69X.mjs +15 -0
  10. package/dist/BulletList-CFjF3U-l.js +1 -0
  11. package/dist/Callout-Cu6HI-xq.mjs +28 -0
  12. package/dist/Callout-DPdOqTb4.js +1 -0
  13. package/dist/CellOutput-C33VK0df.mjs +981 -0
  14. package/dist/CellOutput-DiKZlIFa.js +6 -0
  15. package/dist/CodeBlock-Cjuxuq7B.mjs +8359 -0
  16. package/dist/CodeBlock-DWniNUQB.js +148 -0
  17. package/dist/Doc-6s4VMDsx.mjs +15 -0
  18. package/dist/Doc-D2yvlSII.js +1 -0
  19. package/dist/FoldBlock-DRdlU-DX.mjs +75 -0
  20. package/dist/FoldBlock-ZPMf0QsR.js +1 -0
  21. package/dist/Grid-GfmJxM93.mjs +31 -0
  22. package/dist/Grid-QToZdaRT.js +1 -0
  23. package/dist/HardBreak-B2tFO31P.mjs +13 -0
  24. package/dist/HardBreak-Dbf5Zg5o.js +1 -0
  25. package/dist/Heading-BElRvhGn.mjs +21 -0
  26. package/dist/Heading-BUnffIAz.js +1 -0
  27. package/dist/HorizontalRule-BRG45oT0.mjs +13 -0
  28. package/dist/HorizontalRule-CE09LZGf.js +1 -0
  29. package/dist/IFrame-CaAOVLGN.mjs +17 -0
  30. package/dist/IFrame-DcCpSoDC.js +1 -0
  31. package/dist/Image-C8v5dCij.mjs +105 -0
  32. package/dist/Image-cHL85CXs.js +1 -0
  33. package/dist/ListItem-BrjxeGxz.js +1 -0
  34. package/dist/ListItem-X0T7a_z8.mjs +15 -0
  35. package/dist/MathDisplay-CESKZV46.js +1 -0
  36. package/dist/MathDisplay-CoGsFzXW.mjs +30 -0
  37. package/dist/MathInline-0xTZoIIq.mjs +30 -0
  38. package/dist/MathInline-C_1SJUVz.js +1 -0
  39. package/dist/McChoices-Aj394G5E.mjs +52 -0
  40. package/dist/McChoices-B4euzY7M.js +1 -0
  41. package/dist/McQuestion-Dq0aM5tC.js +1 -0
  42. package/dist/McQuestion-DvD-J47M.mjs +38 -0
  43. package/dist/McSolution-C5sTXz3y.mjs +24 -0
  44. package/dist/McSolution-N79CllH9.js +1 -0
  45. package/dist/MultipleChoice-DTCF3Q8m.js +1 -0
  46. package/dist/MultipleChoice-Dv-k1zUU.mjs +47 -0
  47. package/dist/OrderedList-B8v1gchv.mjs +17 -0
  48. package/dist/OrderedList-DMl3tvwP.js +1 -0
  49. package/dist/Paragraph-CzRSCJNr.js +1 -0
  50. package/dist/Paragraph-DGcZy8t_.mjs +16 -0
  51. package/dist/SlotNode-6OpoUcOa.mjs +10 -0
  52. package/dist/SlotNode-DMG0R6Vf.js +1 -0
  53. package/dist/TableCell-BY9gdldc.js +1 -0
  54. package/dist/TableCell-Bp52L368.mjs +20 -0
  55. package/dist/TableContainer-C5KXY6f7.js +1 -0
  56. package/dist/TableContainer-C9PhNGlz.mjs +29 -0
  57. package/dist/TableHeader-BTuqvorM.js +1 -0
  58. package/dist/TableHeader-C7KKz3e1.mjs +17 -0
  59. package/dist/TableRow-D4F6AKFt.js +1 -0
  60. package/dist/TableRow-OzpVq1qW.mjs +15 -0
  61. package/dist/Text-Br_pcGz4.mjs +78 -0
  62. package/dist/Text-DlUfrsNI.js +1 -0
  63. package/dist/emoji-Bk6FG72F.js +1 -0
  64. package/dist/emoji-CmOToDEU.mjs +3711 -0
  65. package/dist/index-D2CtpNvR.js +1 -0
  66. package/dist/index-DVmWCrQE.mjs +159 -0
  67. package/dist/index.cjs.js +1 -0
  68. package/dist/index.es.js +4 -0
  69. package/dist/katex-CS0ZfoxP.js +261 -0
  70. package/dist/katex-r9TeExgs.mjs +11690 -0
  71. package/dist/prosemirror-render.css +1 -0
  72. package/dist/types/apis/monitor.d.ts +9 -0
  73. package/dist/types/apis/tingwu.d.ts +14 -0
  74. package/dist/types/apis/types.d.ts +23 -0
  75. package/dist/types/components/TreeRecursive.vue.d.ts +7 -0
  76. package/dist/types/components/TreeRender.vue.d.ts +9 -0
  77. package/dist/types/components/collections/async/AsyncError.vue.d.ts +3 -0
  78. package/dist/types/components/collections/async/AsyncLoading.vue.d.ts +3 -0
  79. package/dist/types/components/collections/attachment/AttachmentBlock.vue.d.ts +7 -0
  80. package/dist/types/components/collections/attachment/AttachmentInline.vue.d.ts +7 -0
  81. package/dist/types/components/collections/attachment/AttachmentMenu.vue.d.ts +16 -0
  82. package/dist/types/components/collections/attachment/VideoDetail.vue.d.ts +7 -0
  83. package/dist/types/components/collections/attachment/index.d.ts +1 -0
  84. package/dist/types/components/collections/basic/Blockquote.vue.d.ts +17 -0
  85. package/dist/types/components/collections/basic/BulletList.vue.d.ts +17 -0
  86. package/dist/types/components/collections/basic/HardBreak.vue.d.ts +7 -0
  87. package/dist/types/components/collections/basic/Heading.vue.d.ts +17 -0
  88. package/dist/types/components/collections/basic/HorizontalRule.vue.d.ts +7 -0
  89. package/dist/types/components/collections/basic/ListItem.vue.d.ts +17 -0
  90. package/dist/types/components/collections/basic/OrderedList.vue.d.ts +17 -0
  91. package/dist/types/components/collections/basic/Paragraph.vue.d.ts +17 -0
  92. package/dist/types/components/collections/basic/Text.vue.d.ts +7 -0
  93. package/dist/types/components/collections/basic/index.d.ts +1 -0
  94. package/dist/types/components/collections/callout/Callout.vue.d.ts +7 -0
  95. package/dist/types/components/collections/callout/index.d.ts +1 -0
  96. package/dist/types/components/collections/code/CellOutput.vue.d.ts +7 -0
  97. package/dist/types/components/collections/code/CodeBlock.vue.d.ts +7 -0
  98. package/dist/types/components/collections/code/index.d.ts +1 -0
  99. package/dist/types/components/collections/fold/FoldBlock.vue.d.ts +7 -0
  100. package/dist/types/components/collections/fold/index.d.ts +1 -0
  101. package/dist/types/components/collections/grid/Grid.vue.d.ts +7 -0
  102. package/dist/types/components/collections/grid/index.d.ts +1 -0
  103. package/dist/types/components/collections/iframe/IFrame.vue.d.ts +7 -0
  104. package/dist/types/components/collections/iframe/index.d.ts +1 -0
  105. package/dist/types/components/collections/img/Image.vue.d.ts +7 -0
  106. package/dist/types/components/collections/img/index.d.ts +1 -0
  107. package/dist/types/components/collections/index.d.ts +1 -0
  108. package/dist/types/components/collections/math/MathDisplay.vue.d.ts +7 -0
  109. package/dist/types/components/collections/math/MathInline.vue.d.ts +7 -0
  110. package/dist/types/components/collections/math/index.d.ts +1 -0
  111. package/dist/types/components/collections/multipleChoice/McChoices.vue.d.ts +16 -0
  112. package/dist/types/components/collections/multipleChoice/McQuestion.vue.d.ts +7 -0
  113. package/dist/types/components/collections/multipleChoice/McSolution.vue.d.ts +8 -0
  114. package/dist/types/components/collections/multipleChoice/MultipleChoice.vue.d.ts +7 -0
  115. package/dist/types/components/collections/multipleChoice/index.d.ts +1 -0
  116. package/dist/types/components/collections/table/TableCell.vue.d.ts +17 -0
  117. package/dist/types/components/collections/table/TableContainer.vue.d.ts +17 -0
  118. package/dist/types/components/collections/table/TableHeader.vue.d.ts +17 -0
  119. package/dist/types/components/collections/table/TableRow.vue.d.ts +17 -0
  120. package/dist/types/components/collections/table/index.d.ts +1 -0
  121. package/dist/types/components/collections/utils.d.ts +2 -0
  122. package/dist/types/components/collections/wrapper/Doc.vue.d.ts +17 -0
  123. package/dist/types/components/collections/wrapper/SlotNode.vue.d.ts +13 -0
  124. package/dist/types/components/collections/wrapper/index.d.ts +1 -0
  125. package/dist/types/components/index.d.ts +1 -0
  126. package/dist/types/icons/Attachment/CardView.vue.d.ts +9 -0
  127. package/dist/types/icons/Attachment/Code/Bat.vue.d.ts +3 -0
  128. package/dist/types/icons/Attachment/Code/C.vue.d.ts +3 -0
  129. package/dist/types/icons/Attachment/Code/Cpp.vue.d.ts +3 -0
  130. package/dist/types/icons/Attachment/Code/Css.vue.d.ts +3 -0
  131. package/dist/types/icons/Attachment/Code/Go.vue.d.ts +3 -0
  132. package/dist/types/icons/Attachment/Code/Html.vue.d.ts +3 -0
  133. package/dist/types/icons/Attachment/Code/Java.vue.d.ts +3 -0
  134. package/dist/types/icons/Attachment/Code/Js.vue.d.ts +3 -0
  135. package/dist/types/icons/Attachment/Code/Json.vue.d.ts +3 -0
  136. package/dist/types/icons/Attachment/Code/Jsx.vue.d.ts +3 -0
  137. package/dist/types/icons/Attachment/Code/Md.vue.d.ts +3 -0
  138. package/dist/types/icons/Attachment/Code/Php.vue.d.ts +3 -0
  139. package/dist/types/icons/Attachment/Code/Python.vue.d.ts +3 -0
  140. package/dist/types/icons/Attachment/Code/Rb.vue.d.ts +3 -0
  141. package/dist/types/icons/Attachment/Code/Sh.vue.d.ts +3 -0
  142. package/dist/types/icons/Attachment/Code/Sql.vue.d.ts +3 -0
  143. package/dist/types/icons/Attachment/Code/Swift.vue.d.ts +3 -0
  144. package/dist/types/icons/Attachment/Code/Ts.vue.d.ts +3 -0
  145. package/dist/types/icons/Attachment/Code/Tsx.vue.d.ts +3 -0
  146. package/dist/types/icons/Attachment/Code/Vue.vue.d.ts +3 -0
  147. package/dist/types/icons/Attachment/Excel.vue.d.ts +3 -0
  148. package/dist/types/icons/Attachment/Eye.vue.d.ts +3 -0
  149. package/dist/types/icons/Attachment/FullScreen.vue.d.ts +3 -0
  150. package/dist/types/icons/Attachment/InlineView.vue.d.ts +9 -0
  151. package/dist/types/icons/Attachment/Pdf.vue.d.ts +3 -0
  152. package/dist/types/icons/Attachment/Ppt.vue.d.ts +3 -0
  153. package/dist/types/icons/Attachment/PreviewView.vue.d.ts +9 -0
  154. package/dist/types/icons/Attachment/UnknownFile.vue.d.ts +3 -0
  155. package/dist/types/icons/Attachment/VideoIcon.vue.d.ts +3 -0
  156. package/dist/types/icons/Attachment/VideoPlay.vue.d.ts +3 -0
  157. package/dist/types/icons/Attachment/Word.vue.d.ts +3 -0
  158. package/dist/types/icons/Code/Confirm.vue.d.ts +3 -0
  159. package/dist/types/icons/Code/Paste.vue.d.ts +3 -0
  160. package/dist/types/icons/Common/Choice.vue.d.ts +3 -0
  161. package/dist/types/icons/Common/Close.vue.d.ts +3 -0
  162. package/dist/types/icons/Common/Comment.vue.d.ts +3 -0
  163. package/dist/types/icons/Common/CopyAnchorLink.vue.d.ts +3 -0
  164. package/dist/types/icons/Common/Delete.vue.d.ts +3 -0
  165. package/dist/types/icons/Common/Download.vue.d.ts +3 -0
  166. package/dist/types/icons/Common/FoldClose.vue.d.ts +3 -0
  167. package/dist/types/icons/Common/FoldOpen.vue.d.ts +3 -0
  168. package/dist/types/icons/Common/Plate.vue.d.ts +3 -0
  169. package/dist/types/icons/Common/Question.vue.d.ts +3 -0
  170. package/dist/types/icons/Common/ShareTextLink.vue.d.ts +3 -0
  171. package/dist/types/index.d.ts +2 -0
  172. package/dist/types/types.d.ts +269 -0
  173. package/dist/types/utils/common.d.ts +1 -0
  174. package/dist/types/utils/emoji.d.ts +10 -0
  175. package/dist/types/utils/globalStatus.d.ts +16 -0
  176. package/dist/types/utils/shiki.d.ts +3 -0
  177. package/dist/types/utils/useAttachment.d.ts +8 -0
  178. package/package.json +29 -0
  179. package/src/apis/monitor.ts +8 -0
  180. package/src/apis/tingwu.ts +22 -0
  181. package/src/apis/types.ts +45 -0
  182. package/src/components/TreeRecursive.vue +47 -0
  183. package/src/components/TreeRender.vue +404 -0
  184. package/src/components/collections/async/AsyncError.vue +17 -0
  185. package/src/components/collections/async/AsyncLoading.vue +1 -0
  186. package/src/components/collections/attachment/AttachmentBlock.vue +561 -0
  187. package/src/components/collections/attachment/AttachmentInline.vue +90 -0
  188. package/src/components/collections/attachment/AttachmentMenu.vue +359 -0
  189. package/src/components/collections/attachment/VideoDetail.vue +375 -0
  190. package/src/components/collections/attachment/index.ts +6 -0
  191. package/src/components/collections/basic/Blockquote.vue +15 -0
  192. package/src/components/collections/basic/BulletList.vue +15 -0
  193. package/src/components/collections/basic/HardBreak.vue +11 -0
  194. package/src/components/collections/basic/Heading.vue +15 -0
  195. package/src/components/collections/basic/HorizontalRule.vue +11 -0
  196. package/src/components/collections/basic/ListItem.vue +15 -0
  197. package/src/components/collections/basic/OrderedList.vue +15 -0
  198. package/src/components/collections/basic/Paragraph.vue +19 -0
  199. package/src/components/collections/basic/Text.vue +73 -0
  200. package/src/components/collections/basic/index.ts +13 -0
  201. package/src/components/collections/callout/Callout.vue +77 -0
  202. package/src/components/collections/callout/index.ts +5 -0
  203. package/src/components/collections/code/CellOutput.vue +72 -0
  204. package/src/components/collections/code/CodeBlock.vue +83 -0
  205. package/src/components/collections/code/index.ts +6 -0
  206. package/src/components/collections/fold/FoldBlock.vue +130 -0
  207. package/src/components/collections/fold/index.ts +5 -0
  208. package/src/components/collections/grid/Grid.vue +70 -0
  209. package/src/components/collections/grid/index.ts +5 -0
  210. package/src/components/collections/iframe/IFrame.vue +19 -0
  211. package/src/components/collections/iframe/index.ts +5 -0
  212. package/src/components/collections/img/Image.vue +318 -0
  213. package/src/components/collections/img/index.ts +5 -0
  214. package/src/components/collections/index.ts +29 -0
  215. package/src/components/collections/math/MathDisplay.vue +42 -0
  216. package/src/components/collections/math/MathInline.vue +42 -0
  217. package/src/components/collections/math/index.ts +6 -0
  218. package/src/components/collections/multipleChoice/McChoices.vue +72 -0
  219. package/src/components/collections/multipleChoice/McQuestion.vue +61 -0
  220. package/src/components/collections/multipleChoice/McSolution.vue +47 -0
  221. package/src/components/collections/multipleChoice/MultipleChoice.vue +62 -0
  222. package/src/components/collections/multipleChoice/index.ts +8 -0
  223. package/src/components/collections/table/TableCell.vue +20 -0
  224. package/src/components/collections/table/TableContainer.vue +32 -0
  225. package/src/components/collections/table/TableHeader.vue +15 -0
  226. package/src/components/collections/table/TableRow.vue +15 -0
  227. package/src/components/collections/table/index.ts +8 -0
  228. package/src/components/collections/utils.ts +17 -0
  229. package/src/components/collections/wrapper/Doc.vue +15 -0
  230. package/src/components/collections/wrapper/SlotNode.vue +5 -0
  231. package/src/components/collections/wrapper/index.ts +6 -0
  232. package/src/components/index.ts +1 -0
  233. package/src/icons/Attachment/CardView.vue +21 -0
  234. package/src/icons/Attachment/Code/Bat.vue +26 -0
  235. package/src/icons/Attachment/Code/C.vue +26 -0
  236. package/src/icons/Attachment/Code/Cpp.vue +26 -0
  237. package/src/icons/Attachment/Code/Css.vue +34 -0
  238. package/src/icons/Attachment/Code/Go.vue +26 -0
  239. package/src/icons/Attachment/Code/Html.vue +34 -0
  240. package/src/icons/Attachment/Code/Java.vue +42 -0
  241. package/src/icons/Attachment/Code/Js.vue +26 -0
  242. package/src/icons/Attachment/Code/Json.vue +26 -0
  243. package/src/icons/Attachment/Code/Jsx.vue +30 -0
  244. package/src/icons/Attachment/Code/Md.vue +26 -0
  245. package/src/icons/Attachment/Code/Php.vue +26 -0
  246. package/src/icons/Attachment/Code/Python.vue +30 -0
  247. package/src/icons/Attachment/Code/Rb.vue +26 -0
  248. package/src/icons/Attachment/Code/Sh.vue +30 -0
  249. package/src/icons/Attachment/Code/Sql.vue +30 -0
  250. package/src/icons/Attachment/Code/Swift.vue +26 -0
  251. package/src/icons/Attachment/Code/Ts.vue +26 -0
  252. package/src/icons/Attachment/Code/Tsx.vue +30 -0
  253. package/src/icons/Attachment/Code/Vue.vue +24 -0
  254. package/src/icons/Attachment/Excel.vue +26 -0
  255. package/src/icons/Attachment/Eye.vue +15 -0
  256. package/src/icons/Attachment/FullScreen.vue +15 -0
  257. package/src/icons/Attachment/InlineView.vue +21 -0
  258. package/src/icons/Attachment/Pdf.vue +25 -0
  259. package/src/icons/Attachment/Ppt.vue +26 -0
  260. package/src/icons/Attachment/PreviewView.vue +21 -0
  261. package/src/icons/Attachment/UnknownFile.vue +26 -0
  262. package/src/icons/Attachment/VideoIcon.vue +25 -0
  263. package/src/icons/Attachment/VideoPlay.vue +15 -0
  264. package/src/icons/Attachment/Word.vue +26 -0
  265. package/src/icons/Code/Confirm.vue +38 -0
  266. package/src/icons/Code/Paste.vue +8 -0
  267. package/src/icons/Common/Choice.vue +28 -0
  268. package/src/icons/Common/Close.vue +15 -0
  269. package/src/icons/Common/Comment.vue +16 -0
  270. package/src/icons/Common/CopyAnchorLink.vue +15 -0
  271. package/src/icons/Common/Delete.vue +15 -0
  272. package/src/icons/Common/Download.vue +15 -0
  273. package/src/icons/Common/FoldClose.vue +9 -0
  274. package/src/icons/Common/FoldOpen.vue +9 -0
  275. package/src/icons/Common/Plate.vue +23 -0
  276. package/src/icons/Common/Question.vue +8 -0
  277. package/src/icons/Common/ShareTextLink.vue +15 -0
  278. package/src/index.ts +3 -0
  279. package/src/types.ts +236 -0
  280. package/src/utils/common.ts +6 -0
  281. package/src/utils/emoji.ts +3715 -0
  282. package/src/utils/globalStatus.ts +19 -0
  283. package/src/utils/shiki.ts +25 -0
  284. package/src/utils/useAttachment.ts +215 -0
  285. package/tsconfig.build.json +10 -0
  286. package/tsconfig.json +23 -0
  287. package/vite.config.ts +24 -0
@@ -0,0 +1 @@
1
+ "use strict";const e=require("vue"),a=Symbol(),l=e.ref([]),m=Symbol(),p=o=>{const t=[],n=s=>{s.type==="image"&&t.push(s),s.content&&s.content.forEach(i=>n(i))};return n(o),t},c=(o,t)=>{const n=o.__vccOpts||o;for(const[s,i]of t)n[s]=i;return n},v={},f={class:"error-wrapper"};function q(o,t){return e.openBlock(),e.createElementBlock("div",f,"组件加载失败")}const k=c(v,[["render",q],["__scopeId","data-v-4fa940a8"]]),P={};function _(o,t){return"loading..."}const g=c(P,[["render",_]]),r=(o,t={loadingComponent:g,delay:200,errorComponent:k,timeout:5e3})=>e.defineAsyncComponent({loader:o,...t}),y={"attachment-inline":r(()=>Promise.resolve().then(()=>require("./AttachmentInline-Dc3dp0g-.js"))),"attachment-block":r(()=>Promise.resolve().then(()=>require("./AttachmentBlock-DsmJP3Kw.js")))},B={text:r(()=>Promise.resolve().then(()=>require("./Text-DlUfrsNI.js"))),paragraph:r(()=>Promise.resolve().then(()=>require("./Paragraph-CzRSCJNr.js"))),heading:r(()=>Promise.resolve().then(()=>require("./Heading-BUnffIAz.js"))),orderedList:r(()=>Promise.resolve().then(()=>require("./OrderedList-DMl3tvwP.js"))),bulletList:r(()=>Promise.resolve().then(()=>require("./BulletList-CFjF3U-l.js"))),listItem:r(()=>Promise.resolve().then(()=>require("./ListItem-BrjxeGxz.js"))),horizontalRule:r(()=>Promise.resolve().then(()=>require("./HorizontalRule-CE09LZGf.js"))),blockquote:r(()=>Promise.resolve().then(()=>require("./Blockquote-CQSBFnsu.js"))),hardBreak:r(()=>Promise.resolve().then(()=>require("./HardBreak-Dbf5Zg5o.js")))},b={callout:r(()=>Promise.resolve().then(()=>require("./Callout-DPdOqTb4.js")))},C={codeBlock:r(()=>Promise.resolve().then(()=>require("./CodeBlock-DWniNUQB.js"))),cellOutput:r(()=>Promise.resolve().then(()=>require("./CellOutput-DiKZlIFa.js")))},x={foldBlock:r(()=>Promise.resolve().then(()=>require("./FoldBlock-ZPMf0QsR.js")))},M={grid:r(()=>Promise.resolve().then(()=>require("./Grid-QToZdaRT.js")))},w={iframe:r(()=>Promise.resolve().then(()=>require("./IFrame-DcCpSoDC.js")))},I={image:r(()=>Promise.resolve().then(()=>require("./Image-cHL85CXs.js")))},L={math_inline:r(()=>Promise.resolve().then(()=>require("./MathInline-C_1SJUVz.js"))),math_display:r(()=>Promise.resolve().then(()=>require("./MathDisplay-CESKZV46.js")))},N={multipleChoice:r(()=>Promise.resolve().then(()=>require("./MultipleChoice-DTCF3Q8m.js"))),mcQuestion:r(()=>Promise.resolve().then(()=>require("./McQuestion-Dq0aM5tC.js"))),mcChoices:r(()=>Promise.resolve().then(()=>require("./McChoices-B4euzY7M.js"))),mcSolution:r(()=>Promise.resolve().then(()=>require("./McSolution-N79CllH9.js")))},R={table:r(()=>Promise.resolve().then(()=>require("./TableContainer-C5KXY6f7.js"))),tableHeader:r(()=>Promise.resolve().then(()=>require("./TableHeader-BTuqvorM.js"))),tableRow:r(()=>Promise.resolve().then(()=>require("./TableRow-D4F6AKFt.js"))),tableCell:r(()=>Promise.resolve().then(()=>require("./TableCell-BY9gdldc.js")))},$={doc:r(()=>Promise.resolve().then(()=>require("./Doc-D2yvlSII.js"))),slotNode:r(()=>Promise.resolve().then(()=>require("./SlotNode-DMG0R6Vf.js")))},A={...y,...B,...b,...C,...x,...M,...I,...L,...N,...R,...$,...w},u=e.defineComponent({__name:"TreeRecursive",props:{node:{}},setup(o){const t=new Set(["blockquote","orderedList","bulletList","paragraph","math_display","codeBlock","cellOutput","callout","foldBlock","image","attachment-block","grid","table","iframe","multipleChoice"]),n=e.computed(()=>t.has(o.node.type)&&o.node.attrs&&o.node.attrs["block-id"]?{"data-block-id":o.node.attrs["block-id"]}:{});return(s,i)=>{const d=e.resolveComponent("TreeRecursive",!0);return e.openBlock(),e.createBlock(e.Suspense,null,{default:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(A)[o.node.type]),e.mergeProps({node:o.node},n.value),{default:e.withCtx(()=>[o.node.content&&!(o.node.type in["foldBlock","grid","callout"])?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(o.node.content,h=>(e.openBlock(),e.createBlock(d,{node:h,key:e.useId()},null,8,["node"]))),128)):e.createCommentVNode("",!0)]),_:1},16,["node"]))]),_:1})}}}),E={class:"tree-render"},S=e.defineComponent({__name:"TreeRender",props:{node:{},axios:{}},setup(o){return e.provide(m,l),e.provide(a,o.axios),e.watch(()=>o.node,t=>{l.value=p(t)}),(t,n)=>(e.openBlock(),e.createElementBlock("div",E,[e.createVNode(u,{node:o.node},null,8,["node"])]))}});exports._export_sfc=c;exports._sfc_main=u;exports._sfc_main$1=S;exports.axiosKey=a;exports.imageNodesKey=m;
@@ -0,0 +1,159 @@
1
+ import { ref as g, createElementBlock as s, openBlock as c, defineAsyncComponent as k, defineComponent as d, computed as _, resolveComponent as b, createBlock as i, Suspense as y, withCtx as l, resolveDynamicComponent as C, unref as v, mergeProps as M, createCommentVNode as B, Fragment as x, renderList as w, useId as I, provide as m, watch as L, createVNode as R } from "vue";
2
+ const A = /* @__PURE__ */ Symbol(), p = g([]), N = /* @__PURE__ */ Symbol(), S = (t) => {
3
+ const o = [], n = (r) => {
4
+ r.type === "image" && o.push(r), r.content && r.content.forEach((a) => n(a));
5
+ };
6
+ return n(t), o;
7
+ }, u = (t, o) => {
8
+ const n = t.__vccOpts || t;
9
+ for (const [r, a] of o)
10
+ n[r] = a;
11
+ return n;
12
+ }, $ = {}, T = { class: "error-wrapper" };
13
+ function E(t, o) {
14
+ return c(), s("div", T, "组件加载失败");
15
+ }
16
+ const O = /* @__PURE__ */ u($, [["render", E], ["__scopeId", "data-v-4fa940a8"]]), q = {};
17
+ function D(t, o) {
18
+ return "loading...";
19
+ }
20
+ const K = /* @__PURE__ */ u(q, [["render", D]]), e = (t, o = {
21
+ loadingComponent: K,
22
+ delay: 200,
23
+ errorComponent: O,
24
+ timeout: 5e3
25
+ }) => k({
26
+ loader: t,
27
+ ...o
28
+ }), V = {
29
+ "attachment-inline": e(() => import("./AttachmentInline-tbC8BJBy.mjs")),
30
+ "attachment-block": e(() => import("./AttachmentBlock-ChMNTUOo.mjs"))
31
+ }, z = {
32
+ text: e(() => import("./Text-Br_pcGz4.mjs")),
33
+ paragraph: e(() => import("./Paragraph-DGcZy8t_.mjs")),
34
+ heading: e(() => import("./Heading-BElRvhGn.mjs")),
35
+ orderedList: e(() => import("./OrderedList-B8v1gchv.mjs")),
36
+ bulletList: e(() => import("./BulletList-BQTUD69X.mjs")),
37
+ listItem: e(() => import("./ListItem-X0T7a_z8.mjs")),
38
+ horizontalRule: e(() => import("./HorizontalRule-BRG45oT0.mjs")),
39
+ blockquote: e(() => import("./Blockquote-BamWUQND.mjs")),
40
+ hardBreak: e(() => import("./HardBreak-B2tFO31P.mjs"))
41
+ }, F = {
42
+ callout: e(() => import("./Callout-Cu6HI-xq.mjs"))
43
+ }, H = {
44
+ codeBlock: e(() => import("./CodeBlock-Cjuxuq7B.mjs")),
45
+ cellOutput: e(() => import("./CellOutput-C33VK0df.mjs"))
46
+ }, P = {
47
+ foldBlock: e(() => import("./FoldBlock-DRdlU-DX.mjs"))
48
+ }, Q = {
49
+ grid: e(() => import("./Grid-GfmJxM93.mjs"))
50
+ }, j = {
51
+ iframe: e(() => import("./IFrame-CaAOVLGN.mjs"))
52
+ }, G = {
53
+ image: e(() => import("./Image-C8v5dCij.mjs"))
54
+ }, J = {
55
+ math_inline: e(() => import("./MathInline-0xTZoIIq.mjs")),
56
+ math_display: e(() => import("./MathDisplay-CoGsFzXW.mjs"))
57
+ }, U = {
58
+ multipleChoice: e(() => import("./MultipleChoice-Dv-k1zUU.mjs")),
59
+ mcQuestion: e(() => import("./McQuestion-DvD-J47M.mjs")),
60
+ mcChoices: e(() => import("./McChoices-Aj394G5E.mjs")),
61
+ mcSolution: e(() => import("./McSolution-C5sTXz3y.mjs"))
62
+ }, W = {
63
+ table: e(() => import("./TableContainer-C9PhNGlz.mjs")),
64
+ tableHeader: e(() => import("./TableHeader-C7KKz3e1.mjs")),
65
+ tableRow: e(() => import("./TableRow-OzpVq1qW.mjs")),
66
+ tableCell: e(() => import("./TableCell-Bp52L368.mjs"))
67
+ }, X = {
68
+ doc: e(() => import("./Doc-6s4VMDsx.mjs")),
69
+ slotNode: e(() => import("./SlotNode-6OpoUcOa.mjs"))
70
+ }, Y = {
71
+ ...V,
72
+ // 附件和视频类型
73
+ ...z,
74
+ // 基础类型,包括各种字体样式
75
+ ...F,
76
+ // 高亮块
77
+ ...H,
78
+ // 代码块
79
+ ...P,
80
+ // 折叠块
81
+ ...Q,
82
+ // 分栏
83
+ ...G,
84
+ // 图片
85
+ ...J,
86
+ // 数学公式
87
+ ...U,
88
+ //选择题
89
+ ...W,
90
+ // 表格
91
+ ...X,
92
+ // 容器
93
+ ...j
94
+ // iframe
95
+ }, Z = /* @__PURE__ */ d({
96
+ __name: "TreeRecursive",
97
+ props: {
98
+ node: {}
99
+ },
100
+ setup(t) {
101
+ const o = /* @__PURE__ */ new Set([
102
+ "blockquote",
103
+ "orderedList",
104
+ "bulletList",
105
+ "paragraph",
106
+ "math_display",
107
+ "codeBlock",
108
+ "cellOutput",
109
+ "callout",
110
+ "foldBlock",
111
+ "image",
112
+ "attachment-block",
113
+ "grid",
114
+ "table",
115
+ "iframe",
116
+ "multipleChoice"
117
+ ]), n = _(() => o.has(t.node.type) && t.node.attrs && t.node.attrs["block-id"] ? { "data-block-id": t.node.attrs["block-id"] } : {});
118
+ return (r, a) => {
119
+ const f = b("TreeRecursive", !0);
120
+ return c(), i(y, null, {
121
+ default: l(() => [
122
+ (c(), i(C(v(Y)[t.node.type]), M({ node: t.node }, n.value), {
123
+ default: l(() => [
124
+ t.node.content && !(t.node.type in ["foldBlock", "grid", "callout"]) ? (c(!0), s(x, { key: 0 }, w(t.node.content, (h) => (c(), i(f, {
125
+ node: h,
126
+ key: I()
127
+ }, null, 8, ["node"]))), 128)) : B("", !0)
128
+ ]),
129
+ _: 1
130
+ }, 16, ["node"]))
131
+ ]),
132
+ _: 1
133
+ });
134
+ };
135
+ }
136
+ }), ee = { class: "tree-render" }, oe = /* @__PURE__ */ d({
137
+ __name: "TreeRender",
138
+ props: {
139
+ node: {},
140
+ axios: {}
141
+ },
142
+ setup(t) {
143
+ return m(N, p), m(A, t.axios), L(
144
+ () => t.node,
145
+ (o) => {
146
+ p.value = S(o);
147
+ }
148
+ ), (o, n) => (c(), s("div", ee, [
149
+ R(Z, { node: t.node }, null, 8, ["node"])
150
+ ]));
151
+ }
152
+ });
153
+ export {
154
+ u as _,
155
+ A as a,
156
+ Z as b,
157
+ oe as c,
158
+ N as i
159
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-D2CtpNvR.js");exports.TreeRender=e._sfc_main$1;
@@ -0,0 +1,4 @@
1
+ import { c as o } from "./index-DVmWCrQE.mjs";
2
+ export {
3
+ o as TreeRender
4
+ };