@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.
- package/dist/AttachmentBlock-ChMNTUOo.mjs +351 -0
- package/dist/AttachmentBlock-DsmJP3Kw.js +1 -0
- package/dist/AttachmentInline-Dc3dp0g-.js +1 -0
- package/dist/AttachmentInline-tbC8BJBy.mjs +52 -0
- package/dist/AttachmentMenu-B5x8P9_n.mjs +541 -0
- package/dist/AttachmentMenu-ExoCOe4B.js +1 -0
- package/dist/Blockquote-BamWUQND.mjs +15 -0
- package/dist/Blockquote-CQSBFnsu.js +1 -0
- package/dist/BulletList-BQTUD69X.mjs +15 -0
- package/dist/BulletList-CFjF3U-l.js +1 -0
- package/dist/Callout-Cu6HI-xq.mjs +28 -0
- package/dist/Callout-DPdOqTb4.js +1 -0
- package/dist/CellOutput-C33VK0df.mjs +981 -0
- package/dist/CellOutput-DiKZlIFa.js +6 -0
- package/dist/CodeBlock-Cjuxuq7B.mjs +8359 -0
- package/dist/CodeBlock-DWniNUQB.js +148 -0
- package/dist/Doc-6s4VMDsx.mjs +15 -0
- package/dist/Doc-D2yvlSII.js +1 -0
- package/dist/FoldBlock-DRdlU-DX.mjs +75 -0
- package/dist/FoldBlock-ZPMf0QsR.js +1 -0
- package/dist/Grid-GfmJxM93.mjs +31 -0
- package/dist/Grid-QToZdaRT.js +1 -0
- package/dist/HardBreak-B2tFO31P.mjs +13 -0
- package/dist/HardBreak-Dbf5Zg5o.js +1 -0
- package/dist/Heading-BElRvhGn.mjs +21 -0
- package/dist/Heading-BUnffIAz.js +1 -0
- package/dist/HorizontalRule-BRG45oT0.mjs +13 -0
- package/dist/HorizontalRule-CE09LZGf.js +1 -0
- package/dist/IFrame-CaAOVLGN.mjs +17 -0
- package/dist/IFrame-DcCpSoDC.js +1 -0
- package/dist/Image-C8v5dCij.mjs +105 -0
- package/dist/Image-cHL85CXs.js +1 -0
- package/dist/ListItem-BrjxeGxz.js +1 -0
- package/dist/ListItem-X0T7a_z8.mjs +15 -0
- package/dist/MathDisplay-CESKZV46.js +1 -0
- package/dist/MathDisplay-CoGsFzXW.mjs +30 -0
- package/dist/MathInline-0xTZoIIq.mjs +30 -0
- package/dist/MathInline-C_1SJUVz.js +1 -0
- package/dist/McChoices-Aj394G5E.mjs +52 -0
- package/dist/McChoices-B4euzY7M.js +1 -0
- package/dist/McQuestion-Dq0aM5tC.js +1 -0
- package/dist/McQuestion-DvD-J47M.mjs +38 -0
- package/dist/McSolution-C5sTXz3y.mjs +24 -0
- package/dist/McSolution-N79CllH9.js +1 -0
- package/dist/MultipleChoice-DTCF3Q8m.js +1 -0
- package/dist/MultipleChoice-Dv-k1zUU.mjs +47 -0
- package/dist/OrderedList-B8v1gchv.mjs +17 -0
- package/dist/OrderedList-DMl3tvwP.js +1 -0
- package/dist/Paragraph-CzRSCJNr.js +1 -0
- package/dist/Paragraph-DGcZy8t_.mjs +16 -0
- package/dist/SlotNode-6OpoUcOa.mjs +10 -0
- package/dist/SlotNode-DMG0R6Vf.js +1 -0
- package/dist/TableCell-BY9gdldc.js +1 -0
- package/dist/TableCell-Bp52L368.mjs +20 -0
- package/dist/TableContainer-C5KXY6f7.js +1 -0
- package/dist/TableContainer-C9PhNGlz.mjs +29 -0
- package/dist/TableHeader-BTuqvorM.js +1 -0
- package/dist/TableHeader-C7KKz3e1.mjs +17 -0
- package/dist/TableRow-D4F6AKFt.js +1 -0
- package/dist/TableRow-OzpVq1qW.mjs +15 -0
- package/dist/Text-Br_pcGz4.mjs +78 -0
- package/dist/Text-DlUfrsNI.js +1 -0
- package/dist/emoji-Bk6FG72F.js +1 -0
- package/dist/emoji-CmOToDEU.mjs +3711 -0
- package/dist/index-D2CtpNvR.js +1 -0
- package/dist/index-DVmWCrQE.mjs +159 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.es.js +4 -0
- package/dist/katex-CS0ZfoxP.js +261 -0
- package/dist/katex-r9TeExgs.mjs +11690 -0
- package/dist/prosemirror-render.css +1 -0
- package/dist/types/apis/monitor.d.ts +9 -0
- package/dist/types/apis/tingwu.d.ts +14 -0
- package/dist/types/apis/types.d.ts +23 -0
- package/dist/types/components/TreeRecursive.vue.d.ts +7 -0
- package/dist/types/components/TreeRender.vue.d.ts +9 -0
- package/dist/types/components/collections/async/AsyncError.vue.d.ts +3 -0
- package/dist/types/components/collections/async/AsyncLoading.vue.d.ts +3 -0
- package/dist/types/components/collections/attachment/AttachmentBlock.vue.d.ts +7 -0
- package/dist/types/components/collections/attachment/AttachmentInline.vue.d.ts +7 -0
- package/dist/types/components/collections/attachment/AttachmentMenu.vue.d.ts +16 -0
- package/dist/types/components/collections/attachment/VideoDetail.vue.d.ts +7 -0
- package/dist/types/components/collections/attachment/index.d.ts +1 -0
- package/dist/types/components/collections/basic/Blockquote.vue.d.ts +17 -0
- package/dist/types/components/collections/basic/BulletList.vue.d.ts +17 -0
- package/dist/types/components/collections/basic/HardBreak.vue.d.ts +7 -0
- package/dist/types/components/collections/basic/Heading.vue.d.ts +17 -0
- package/dist/types/components/collections/basic/HorizontalRule.vue.d.ts +7 -0
- package/dist/types/components/collections/basic/ListItem.vue.d.ts +17 -0
- package/dist/types/components/collections/basic/OrderedList.vue.d.ts +17 -0
- package/dist/types/components/collections/basic/Paragraph.vue.d.ts +17 -0
- package/dist/types/components/collections/basic/Text.vue.d.ts +7 -0
- package/dist/types/components/collections/basic/index.d.ts +1 -0
- package/dist/types/components/collections/callout/Callout.vue.d.ts +7 -0
- package/dist/types/components/collections/callout/index.d.ts +1 -0
- package/dist/types/components/collections/code/CellOutput.vue.d.ts +7 -0
- package/dist/types/components/collections/code/CodeBlock.vue.d.ts +7 -0
- package/dist/types/components/collections/code/index.d.ts +1 -0
- package/dist/types/components/collections/fold/FoldBlock.vue.d.ts +7 -0
- package/dist/types/components/collections/fold/index.d.ts +1 -0
- package/dist/types/components/collections/grid/Grid.vue.d.ts +7 -0
- package/dist/types/components/collections/grid/index.d.ts +1 -0
- package/dist/types/components/collections/iframe/IFrame.vue.d.ts +7 -0
- package/dist/types/components/collections/iframe/index.d.ts +1 -0
- package/dist/types/components/collections/img/Image.vue.d.ts +7 -0
- package/dist/types/components/collections/img/index.d.ts +1 -0
- package/dist/types/components/collections/index.d.ts +1 -0
- package/dist/types/components/collections/math/MathDisplay.vue.d.ts +7 -0
- package/dist/types/components/collections/math/MathInline.vue.d.ts +7 -0
- package/dist/types/components/collections/math/index.d.ts +1 -0
- package/dist/types/components/collections/multipleChoice/McChoices.vue.d.ts +16 -0
- package/dist/types/components/collections/multipleChoice/McQuestion.vue.d.ts +7 -0
- package/dist/types/components/collections/multipleChoice/McSolution.vue.d.ts +8 -0
- package/dist/types/components/collections/multipleChoice/MultipleChoice.vue.d.ts +7 -0
- package/dist/types/components/collections/multipleChoice/index.d.ts +1 -0
- package/dist/types/components/collections/table/TableCell.vue.d.ts +17 -0
- package/dist/types/components/collections/table/TableContainer.vue.d.ts +17 -0
- package/dist/types/components/collections/table/TableHeader.vue.d.ts +17 -0
- package/dist/types/components/collections/table/TableRow.vue.d.ts +17 -0
- package/dist/types/components/collections/table/index.d.ts +1 -0
- package/dist/types/components/collections/utils.d.ts +2 -0
- package/dist/types/components/collections/wrapper/Doc.vue.d.ts +17 -0
- package/dist/types/components/collections/wrapper/SlotNode.vue.d.ts +13 -0
- package/dist/types/components/collections/wrapper/index.d.ts +1 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/icons/Attachment/CardView.vue.d.ts +9 -0
- package/dist/types/icons/Attachment/Code/Bat.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/C.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Cpp.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Css.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Go.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Html.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Java.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Js.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Json.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Jsx.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Md.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Php.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Python.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Rb.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Sh.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Sql.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Swift.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Ts.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Tsx.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Code/Vue.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Excel.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Eye.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/FullScreen.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/InlineView.vue.d.ts +9 -0
- package/dist/types/icons/Attachment/Pdf.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Ppt.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/PreviewView.vue.d.ts +9 -0
- package/dist/types/icons/Attachment/UnknownFile.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/VideoIcon.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/VideoPlay.vue.d.ts +3 -0
- package/dist/types/icons/Attachment/Word.vue.d.ts +3 -0
- package/dist/types/icons/Code/Confirm.vue.d.ts +3 -0
- package/dist/types/icons/Code/Paste.vue.d.ts +3 -0
- package/dist/types/icons/Common/Choice.vue.d.ts +3 -0
- package/dist/types/icons/Common/Close.vue.d.ts +3 -0
- package/dist/types/icons/Common/Comment.vue.d.ts +3 -0
- package/dist/types/icons/Common/CopyAnchorLink.vue.d.ts +3 -0
- package/dist/types/icons/Common/Delete.vue.d.ts +3 -0
- package/dist/types/icons/Common/Download.vue.d.ts +3 -0
- package/dist/types/icons/Common/FoldClose.vue.d.ts +3 -0
- package/dist/types/icons/Common/FoldOpen.vue.d.ts +3 -0
- package/dist/types/icons/Common/Plate.vue.d.ts +3 -0
- package/dist/types/icons/Common/Question.vue.d.ts +3 -0
- package/dist/types/icons/Common/ShareTextLink.vue.d.ts +3 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/types.d.ts +269 -0
- package/dist/types/utils/common.d.ts +1 -0
- package/dist/types/utils/emoji.d.ts +10 -0
- package/dist/types/utils/globalStatus.d.ts +16 -0
- package/dist/types/utils/shiki.d.ts +3 -0
- package/dist/types/utils/useAttachment.d.ts +8 -0
- package/package.json +29 -0
- package/src/apis/monitor.ts +8 -0
- package/src/apis/tingwu.ts +22 -0
- package/src/apis/types.ts +45 -0
- package/src/components/TreeRecursive.vue +47 -0
- package/src/components/TreeRender.vue +404 -0
- package/src/components/collections/async/AsyncError.vue +17 -0
- package/src/components/collections/async/AsyncLoading.vue +1 -0
- package/src/components/collections/attachment/AttachmentBlock.vue +561 -0
- package/src/components/collections/attachment/AttachmentInline.vue +90 -0
- package/src/components/collections/attachment/AttachmentMenu.vue +359 -0
- package/src/components/collections/attachment/VideoDetail.vue +375 -0
- package/src/components/collections/attachment/index.ts +6 -0
- package/src/components/collections/basic/Blockquote.vue +15 -0
- package/src/components/collections/basic/BulletList.vue +15 -0
- package/src/components/collections/basic/HardBreak.vue +11 -0
- package/src/components/collections/basic/Heading.vue +15 -0
- package/src/components/collections/basic/HorizontalRule.vue +11 -0
- package/src/components/collections/basic/ListItem.vue +15 -0
- package/src/components/collections/basic/OrderedList.vue +15 -0
- package/src/components/collections/basic/Paragraph.vue +19 -0
- package/src/components/collections/basic/Text.vue +73 -0
- package/src/components/collections/basic/index.ts +13 -0
- package/src/components/collections/callout/Callout.vue +77 -0
- package/src/components/collections/callout/index.ts +5 -0
- package/src/components/collections/code/CellOutput.vue +72 -0
- package/src/components/collections/code/CodeBlock.vue +83 -0
- package/src/components/collections/code/index.ts +6 -0
- package/src/components/collections/fold/FoldBlock.vue +130 -0
- package/src/components/collections/fold/index.ts +5 -0
- package/src/components/collections/grid/Grid.vue +70 -0
- package/src/components/collections/grid/index.ts +5 -0
- package/src/components/collections/iframe/IFrame.vue +19 -0
- package/src/components/collections/iframe/index.ts +5 -0
- package/src/components/collections/img/Image.vue +318 -0
- package/src/components/collections/img/index.ts +5 -0
- package/src/components/collections/index.ts +29 -0
- package/src/components/collections/math/MathDisplay.vue +42 -0
- package/src/components/collections/math/MathInline.vue +42 -0
- package/src/components/collections/math/index.ts +6 -0
- package/src/components/collections/multipleChoice/McChoices.vue +72 -0
- package/src/components/collections/multipleChoice/McQuestion.vue +61 -0
- package/src/components/collections/multipleChoice/McSolution.vue +47 -0
- package/src/components/collections/multipleChoice/MultipleChoice.vue +62 -0
- package/src/components/collections/multipleChoice/index.ts +8 -0
- package/src/components/collections/table/TableCell.vue +20 -0
- package/src/components/collections/table/TableContainer.vue +32 -0
- package/src/components/collections/table/TableHeader.vue +15 -0
- package/src/components/collections/table/TableRow.vue +15 -0
- package/src/components/collections/table/index.ts +8 -0
- package/src/components/collections/utils.ts +17 -0
- package/src/components/collections/wrapper/Doc.vue +15 -0
- package/src/components/collections/wrapper/SlotNode.vue +5 -0
- package/src/components/collections/wrapper/index.ts +6 -0
- package/src/components/index.ts +1 -0
- package/src/icons/Attachment/CardView.vue +21 -0
- package/src/icons/Attachment/Code/Bat.vue +26 -0
- package/src/icons/Attachment/Code/C.vue +26 -0
- package/src/icons/Attachment/Code/Cpp.vue +26 -0
- package/src/icons/Attachment/Code/Css.vue +34 -0
- package/src/icons/Attachment/Code/Go.vue +26 -0
- package/src/icons/Attachment/Code/Html.vue +34 -0
- package/src/icons/Attachment/Code/Java.vue +42 -0
- package/src/icons/Attachment/Code/Js.vue +26 -0
- package/src/icons/Attachment/Code/Json.vue +26 -0
- package/src/icons/Attachment/Code/Jsx.vue +30 -0
- package/src/icons/Attachment/Code/Md.vue +26 -0
- package/src/icons/Attachment/Code/Php.vue +26 -0
- package/src/icons/Attachment/Code/Python.vue +30 -0
- package/src/icons/Attachment/Code/Rb.vue +26 -0
- package/src/icons/Attachment/Code/Sh.vue +30 -0
- package/src/icons/Attachment/Code/Sql.vue +30 -0
- package/src/icons/Attachment/Code/Swift.vue +26 -0
- package/src/icons/Attachment/Code/Ts.vue +26 -0
- package/src/icons/Attachment/Code/Tsx.vue +30 -0
- package/src/icons/Attachment/Code/Vue.vue +24 -0
- package/src/icons/Attachment/Excel.vue +26 -0
- package/src/icons/Attachment/Eye.vue +15 -0
- package/src/icons/Attachment/FullScreen.vue +15 -0
- package/src/icons/Attachment/InlineView.vue +21 -0
- package/src/icons/Attachment/Pdf.vue +25 -0
- package/src/icons/Attachment/Ppt.vue +26 -0
- package/src/icons/Attachment/PreviewView.vue +21 -0
- package/src/icons/Attachment/UnknownFile.vue +26 -0
- package/src/icons/Attachment/VideoIcon.vue +25 -0
- package/src/icons/Attachment/VideoPlay.vue +15 -0
- package/src/icons/Attachment/Word.vue +26 -0
- package/src/icons/Code/Confirm.vue +38 -0
- package/src/icons/Code/Paste.vue +8 -0
- package/src/icons/Common/Choice.vue +28 -0
- package/src/icons/Common/Close.vue +15 -0
- package/src/icons/Common/Comment.vue +16 -0
- package/src/icons/Common/CopyAnchorLink.vue +15 -0
- package/src/icons/Common/Delete.vue +15 -0
- package/src/icons/Common/Download.vue +15 -0
- package/src/icons/Common/FoldClose.vue +9 -0
- package/src/icons/Common/FoldOpen.vue +9 -0
- package/src/icons/Common/Plate.vue +23 -0
- package/src/icons/Common/Question.vue +8 -0
- package/src/icons/Common/ShareTextLink.vue +15 -0
- package/src/index.ts +3 -0
- package/src/types.ts +236 -0
- package/src/utils/common.ts +6 -0
- package/src/utils/emoji.ts +3715 -0
- package/src/utils/globalStatus.ts +19 -0
- package/src/utils/shiki.ts +25 -0
- package/src/utils/useAttachment.ts +215 -0
- package/tsconfig.build.json +10 -0
- package/tsconfig.json +23 -0
- 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;
|
package/dist/index.es.js
ADDED