@vite-hub/ui 0.6.1 → 0.7.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.
- package/README.md +105 -45
- package/dist/AttachmentTitle-BWw0ck0T.js +110 -0
- package/dist/BubbleContent-B1a4e3vE.js +45 -0
- package/dist/Chat-BZxkf3Tt.js +112 -0
- package/dist/ChatMessage-Blr5F-zi.js +94 -0
- package/dist/CodeBlockContent-BjXJm8lO.js +92 -0
- package/dist/CodeBlockTitle-DYrYpc1U.js +99 -0
- package/dist/CommentRow-ViZ7r8nr.js +86 -0
- package/dist/CopyButton-Dtg_Oc9_.js +115 -0
- package/dist/Markdown-_w7feFzl.js +70 -0
- package/dist/MarkdownCodeBlock-B4j7x0H6.js +127 -0
- package/dist/MarkdownImage-CJN3myt4.js +111 -0
- package/dist/MessageHeader-CJ9eBHSS.js +61 -0
- package/dist/MessageParts-FVyYZNsn.js +57 -0
- package/dist/MessageScrollerViewport-BaTlWLki.js +142 -0
- package/dist/MorphText-CYTndbyp.js +36 -0
- package/dist/RollNumber-Bo2tzfAp.js +49 -0
- package/dist/TraceTitle-Cp0y7RRD.js +133 -0
- package/dist/agent-session-BwZSMi4S.d.ts +312 -0
- package/dist/agent-session-DhlTKCQG.js +875 -0
- package/dist/{announce-B0DLwflT.js → announce-CJNXaYbT.js} +1 -3
- package/dist/appendItems-hQ4aBd9Q.js +4047 -0
- package/dist/attachment-BllgHx9Q.d.ts +124 -0
- package/dist/attachment-DQMJNfj0.js +35 -0
- package/dist/avatar-stack-Bj1xUkzY.d.ts +4 -0
- package/dist/avatar-stack-nQErr0qn.js +72 -0
- package/dist/bubble-D3M2_InY.js +32 -0
- package/dist/bubble-DmplVxLr.d.ts +64 -0
- package/dist/chat-DWdyMSuj.d.ts +13 -0
- package/dist/chat-message-QLHnX_ED.d.ts +11 -0
- package/dist/chat-session-BOj5L3Ey.d.ts +29 -0
- package/dist/chat-session-hjZRL6jY.js +43 -0
- package/dist/choices-input-DqgXl5a-.d.ts +97 -0
- package/dist/{vue-d2Td6uu2.js → client-BG-oCUtv-5i4sRwXP.js} +4156 -4156
- package/dist/code-block-Bp8y-XJp.d.ts +182 -0
- package/dist/code-block-CMERLfew.js +14 -0
- package/dist/code-view-26RY6dX8.js +137 -0
- package/dist/code-view-D8yYdFUc.d.ts +184 -0
- package/dist/{comment-composer-X7vJKh5b.js → comment-composer-BUt6vbnr.js} +175 -37
- package/dist/{comment-composer-DmDM3XYP.d.ts → comment-composer-CIsbz-78.d.ts} +7 -7
- package/dist/{comment-layer-KnnVfdRV.d.ts → comment-layer-BlVNORgj.d.ts} +17 -8
- package/dist/comment-layer-Ck2H24oJ.js +1206 -0
- package/dist/{comment-panel-DoLDOw3E.d.ts → comment-panel-Djx-KxVa.d.ts} +28 -21
- package/dist/comment-selection-bar-CbOEI98x.d.ts +33 -0
- package/dist/comment-selection-bar-CxPkJxVl.js +145 -0
- package/dist/comment-send.css +2 -2
- package/dist/{comment-thread-jqPx6aJ8.js → comment-thread-C_Q4UDaV.js} +74 -49
- package/dist/{comment-thread-DPV2kqA4.d.ts → comment-thread-X6gYMNay.d.ts} +11 -10
- package/dist/comments-B1itauwb.d.ts +52 -0
- package/dist/{comments-9MDSNm-9.js → comments-BaSrroRV.js} +32 -4
- package/dist/comments-BtD28xEn.js +390 -0
- package/dist/{comments-OWjNidkP.d.ts → comments-ZfV6IZs8.d.ts} +9 -2
- package/dist/components-CM5mZe0a.js +269 -0
- package/dist/{config-LRonN53j.js → config-CFwvNt4Y.js} +11 -30
- package/dist/{config-COSdO-ay.d.ts → config-JmsTI7gs.d.ts} +20 -33
- package/dist/connection-status-BVSH2ZVo.js +72 -0
- package/dist/connection-status-g62BTn44.d.ts +37 -0
- package/dist/copy-button-CRiXUFsl.d.ts +17 -0
- package/dist/device-frame-BW6IjB6P.d.ts +78 -0
- package/dist/device-frame-DDWoyB-G.js +515 -0
- package/dist/diffs-BTKaVnsb.d.ts +272 -0
- package/dist/diffs.d.ts +3 -0
- package/dist/{pierre-code-view-C49BVDrc.js → diffs.js} +147 -4223
- package/dist/drop-field-C0bXv1J-.d.ts +35 -0
- package/dist/drop-field-DKpYQ3tO.js +77 -0
- package/dist/editor-BsOTjnnN.d.ts +540 -0
- package/dist/{markdown-editor-D1irG9Xl.js → editor-DJPUs1nt.js} +833 -106
- package/dist/editor.d.ts +2 -0
- package/dist/editor.js +3 -0
- package/dist/element-BpjNQvZ0.js +6 -0
- package/dist/{file-tree-CRFIdtzw.js → file-tree-B4JKbp4r.js} +19 -18
- package/dist/{file-tree-DOtkeBaq.d.ts → file-tree-BdnKA6UA.d.ts} +33 -8
- package/dist/file-tree-DDSIafDn.d.ts +22 -0
- package/dist/file-tree-DS5shGSL.js +46 -0
- package/dist/file-tree.d.ts +2 -0
- package/dist/file-tree.js +1 -0
- package/dist/files-cuVXzWlx.js +30 -0
- package/dist/filter-search-C9e6sGij.d.ts +28 -0
- package/dist/filter-search-COZsoRiR.js +73 -0
- package/dist/formatCSSVariablePrefix-DLS1Ed1_.js +5 -0
- package/dist/headless-2IcUWHMq.d.ts +51 -0
- package/dist/headless.d.ts +7 -4
- package/dist/headless.js +5 -3
- package/dist/highlight.d.ts +2 -0
- package/dist/highlight.js +1 -0
- package/dist/{highlights-C2AbEdDI.js → highlights-8Al0-h-v.js} +3 -2
- package/dist/{hold-to-delete-BSMrpE-i.d.ts → hold-to-delete-CQc1JaG_.d.ts} +7 -0
- package/dist/{hold-to-delete-Cludb56v.js → hold-to-delete-CcQbfiQx.js} +111 -20
- package/dist/hold-to-delete-cOPqQ9FJ.js +85 -0
- package/dist/hold-to-delete-ksBE7wxc.d.ts +58 -0
- package/dist/index-9Z6Gwtnf.d.ts +77 -0
- package/dist/{index-B2cbt3py.d.ts → index-D3-uYBqH.d.ts} +1 -1
- package/dist/index.d.ts +165 -52
- package/dist/index.js +127 -671
- package/dist/markdown-BLALLOc0.d.ts +45 -0
- package/dist/{markdown-renderer-DMyYKeil.js → markdown-DDyOdYq_.js} +125 -127
- package/dist/{parts/components/markdown-renderer.d.ts → markdown-DkDxdpMU.d.ts} +10 -7
- package/dist/markdown-editor.d.ts +51 -98
- package/dist/markdown-editor.js +70 -3
- package/dist/markdown.d.ts +2 -0
- package/dist/markdown.js +1 -0
- package/dist/marker-CvcWZ3Zp.d.ts +59 -0
- package/dist/marker-DNL6QR3L.js +63 -0
- package/dist/message-BwivYIEl.js +13 -0
- package/dist/message-DEq4K5cQ.d.ts +72 -0
- package/dist/message-parts-B1BZFVKe.d.ts +3 -0
- package/dist/message-parts-CG3gNWn8.d.ts +11 -0
- package/dist/message-parts.d.ts +2 -0
- package/dist/message-parts.js +1 -0
- package/dist/message-scroller-D7AvM31v.d.ts +41 -0
- package/dist/motion/core.d.ts +4 -4
- package/dist/motion/core.js +5 -11
- package/dist/motion-BH6ShUam.d.ts +12 -0
- package/dist/{effects-C1zYpSpg.js → motion-core-BdTfxAhY.js} +1779 -55
- package/dist/{motion-core-Dh20n5Se.d.ts → motion-core-BfIefToe.d.ts} +30 -73
- package/dist/motion-dPwxx3Wk.js +76 -0
- package/dist/{install-C4LwcJda.js → motion-itHFtXwA.js} +1 -1
- package/dist/motion-list-BBbz93WT.js +49 -0
- package/dist/motion.d.ts +5 -14
- package/dist/motion.js +6 -13
- package/dist/nuxt-ui-CPdiTwwD.js +22 -0
- package/dist/nuxt.d.ts +9 -5
- package/dist/nuxt.js +28 -32
- package/dist/parts/components/agent-session.d.ts +2 -295
- package/dist/parts/components/agent-session.js +1 -659
- package/dist/parts/components/attachment.d.ts +2 -85
- package/dist/parts/components/attachment.js +3 -72
- package/dist/parts/components/avatar-stack.d.ts +3 -2
- package/dist/parts/components/avatar-stack.js +1 -60
- package/dist/parts/components/bubble.d.ts +2 -69
- package/dist/parts/components/bubble.js +3 -52
- package/dist/parts/components/chat-message.d.ts +3 -25
- package/dist/parts/components/chat-message.js +1 -50
- package/dist/parts/components/chat-session.d.ts +2 -26
- package/dist/parts/components/chat-session.js +1 -37
- package/dist/parts/components/chat.d.ts +3 -52
- package/dist/parts/components/chat.js +1 -105
- package/dist/parts/components/code-block.d.ts +2 -102
- package/dist/parts/components/code-block.js +4 -109
- package/dist/parts/components/code-view.d.ts +3 -268
- package/dist/parts/components/code-view.js +1 -1
- package/dist/parts/components/comment-composer.d.ts +1 -1
- package/dist/parts/components/comment-composer.js +1 -1
- package/dist/parts/components/comment-layer.d.ts +1 -1
- package/dist/parts/components/comment-layer.js +1 -634
- package/dist/parts/components/comment-panel.d.ts +2 -2
- package/dist/parts/components/comment-panel.js +22 -16
- package/dist/parts/components/comment-selection-bar.d.ts +2 -2
- package/dist/parts/components/comment-selection-bar.js +1 -116
- package/dist/parts/components/comment-thread.d.ts +1 -1
- package/dist/parts/components/comment-thread.js +1 -3
- package/dist/parts/components/comments.d.ts +8 -9
- package/dist/parts/components/comments.js +6 -9
- package/dist/parts/components/connection-status.d.ts +2 -36
- package/dist/parts/components/connection-status.js +1 -64
- package/dist/parts/components/copy-button.d.ts +3 -126
- package/dist/parts/components/copy-button.js +3 -226
- package/dist/parts/components/device-frame.d.ts +2 -128
- package/dist/parts/components/device-frame.js +1 -470
- package/dist/parts/components/drop-field.d.ts +2 -67
- package/dist/parts/components/drop-field.js +1 -76
- package/dist/parts/components/file-tree.d.ts +3 -2
- package/dist/parts/components/file-tree.js +3 -1
- package/dist/parts/components/filter-search.d.ts +2 -45
- package/dist/parts/components/filter-search.js +1 -57
- package/dist/parts/components/hold-to-delete.d.ts +2 -80
- package/dist/parts/components/hold-to-delete.js +1 -75
- package/dist/parts/components/markdown.d.ts +3 -45
- package/dist/parts/components/markdown.js +1 -46
- package/dist/parts/components/marker.d.ts +2 -32
- package/dist/parts/components/marker.js +1 -22
- package/dist/parts/components/message-parts.d.ts +3 -25
- package/dist/parts/components/message-parts.js +1 -45
- package/dist/parts/components/message.d.ts +2 -32
- package/dist/parts/components/message.js +3 -22
- package/dist/parts/components/motion-list.d.ts +2 -40
- package/dist/parts/components/motion-list.js +1 -41
- package/dist/parts/components/motion.d.ts +5 -118
- package/dist/parts/components/motion.js +4 -171
- package/dist/parts/components/patch-parsers.d.ts +1 -1
- package/dist/parts/components/progress.d.ts +2 -39
- package/dist/parts/components/progress.js +1 -53
- package/dist/parts/components/prompt-input.d.ts +2 -134
- package/dist/parts/components/prompt-input.js +1 -253
- package/dist/parts/components/relative-time.d.ts +2 -71
- package/dist/parts/components/relative-time.js +1 -1
- package/dist/parts/components/status.d.ts +2 -58
- package/dist/parts/components/status.js +1 -47
- package/dist/parts/components/sync-status.d.ts +2 -22
- package/dist/parts/components/sync-status.js +1 -48
- package/dist/parts/components/tool-list.d.ts +2 -28
- package/dist/parts/components/tool-list.js +1 -118
- package/dist/parts/components/trace-run.d.ts +2 -25
- package/dist/parts/components/trace-run.js +1 -89
- package/dist/parts/components/trace.d.ts +2 -59
- package/dist/parts/components/trace.js +1 -76
- package/dist/parts/composables/attachments.js +75 -1
- package/dist/parts/headless/choices-input.d.ts +2 -2
- package/dist/parts/headless/choices-input.js +49 -37
- package/dist/parts/headless/comments.d.ts +1 -1
- package/dist/parts/headless/comments.js +1 -1
- package/dist/parts/headless/message-scroller.d.ts +2 -2
- package/dist/parts/headless/message-scroller.js +211 -309
- package/dist/parts/headless/relative-time.d.ts +2 -0
- package/dist/parts/headless/relative-time.js +1 -0
- package/dist/parts/workspace/browser-support-notice.js +6 -5
- package/dist/parts/workspace/connect-panel.js +1 -1
- package/dist/parts/workspace/runners/web-container.js +2 -2
- package/dist/parts/workspace/workspace-bar.d.ts +1 -1
- package/dist/parts/workspace/workspace-bar.js +1 -1
- package/dist/parts/workspace/workspace-boot-status.d.ts +1 -1
- package/dist/parts/workspace/workspace-boot-status.js +1 -206
- package/dist/parts/workspace/workspace-editor-head.d.ts +1 -1
- package/dist/parts/workspace/workspace-editor-head.js +1 -1
- package/dist/parts/workspace/workspace-editor.d.ts +2 -2
- package/dist/parts/workspace/workspace-examples.js +1 -1
- package/dist/parts/workspace/workspace-file-tree.d.ts +1 -1
- package/dist/parts/workspace/workspace-file-tree.js +3 -2
- package/dist/parts/workspace/workspace-guide.js +1 -1
- package/dist/parts/workspace/workspace-preview.d.ts +1 -1
- package/dist/parts/workspace/workspace-preview.js +14 -12
- package/dist/parts/workspace/workspace-shell.d.ts +1 -1
- package/dist/parts/workspace/workspace-shell.js +11 -11
- package/dist/parts/workspace/workspace-sidebar.d.ts +2 -2
- package/dist/parts/workspace/workspace-sidebar.js +2 -2
- package/dist/parts/workspace/workspace-start.js +1 -1
- package/dist/parts/workspace/workspace-steps.js +1 -1
- package/dist/parts/workspace/workspace.d.ts +3 -3
- package/dist/parts/workspace/workspace.js +5 -5
- package/dist/press-BuEC-XvZ.d.ts +83 -0
- package/dist/progress-Ch0fA-bf.d.ts +8 -0
- package/dist/progress-D_9sG648.js +47 -0
- package/dist/prompt-input-CRXEJBAK.js +412 -0
- package/dist/prompt-input-j4OFTF5p.d.ts +116 -0
- package/dist/relative-time-BnJfjeEm.js +131 -0
- package/dist/relative-time-BuP-Gvzn.d.ts +43 -0
- package/dist/{relative-time-DJnw45tr.js → relative-time-Dz2DR4eb.js} +64 -114
- package/dist/relative-time-grHFu1kY.d.ts +11 -0
- package/dist/{ring-GaJsg32c.js → ring-DoL9jivj.js} +1 -2
- package/dist/runtime/nuxt-plugin.js +2 -5
- package/dist/{shiki-CbfEu_Az.js → shiki-CxzM_xNo.js} +3 -2
- package/dist/stand-ins-CuKM1UH1.js +339 -0
- package/dist/status-B2Yhrwv8.js +67 -0
- package/dist/status-ySiRa-8O.d.ts +38 -0
- package/dist/{stream-tokenizer-ByC3l0HQ.js → stream-tokenizer-BsjV6wxW.js} +1 -1
- package/dist/styles.css +4343 -3403
- package/dist/sync-status-BRroyOre.js +59 -0
- package/dist/sync-status-D4KdGO6y.d.ts +35 -0
- package/dist/theme.css +3 -0
- package/dist/theme.d.ts +14 -0
- package/dist/theme.js +19 -8
- package/dist/{themes-DKugPHlg.js → themes-B0_ioVT0.js} +1 -1
- package/dist/tool-list-DDaCqpR6.js +209 -0
- package/dist/tool-list-DMRPM0Yi.d.ts +50 -0
- package/dist/trace-KCBvOsw_.d.ts +113 -0
- package/dist/trace-run-Dk962P5a.d.ts +49 -0
- package/dist/trace-run-nh6FIsl6.js +202 -0
- package/dist/{opt-out-D66l60sg.js → tween-lVMRCUEv.js} +60 -1
- package/dist/types-BF_U0tgp.d.ts +74 -0
- package/dist/types-CTk3aNb5.d.ts +15 -0
- package/dist/types-D0a3i4Fw.d.ts +21 -0
- package/dist/types-DTecvcsZ.d.ts +35 -0
- package/dist/types-D_BWab7g.d.ts +75 -0
- package/dist/types-RHaQ4gj1.d.ts +27 -0
- package/dist/ui-components-CKQAPI-W.js +7 -0
- package/dist/unwrapDefault-CExq-4rm.js +5 -0
- package/dist/use-copy-DK1SSZkh.js +66 -0
- package/dist/utils-hi9-xROt.js +37 -0
- package/dist/vite.d.ts +0 -1
- package/dist/vite.js +8 -14
- package/dist/{vue-vUGpdMct.js → vue-DdYvDVOr.js} +1 -1
- package/dist/workspace-boot-status-CyGlJS06.js +216 -0
- package/dist/{workspace-shell-ChCwWPyv.d.ts → workspace-shell-B4A7CINd.d.ts} +1 -1
- package/dist/workspace.d.ts +1 -1
- package/dist/workspace.js +1 -2
- package/package.json +48 -14
- package/dist/attachments-DgwoQZKY.js +0 -88
- package/dist/avatar-stack-C0IKwj6g.d.ts +0 -57
- package/dist/choices-input-BUf-QqGj.d.ts +0 -92
- package/dist/code-view-Cg4nyTNA.js +0 -172
- package/dist/comment-attachments-DAzUbRmJ.js +0 -23
- package/dist/comment-list-ncwaCSVX.d.ts +0 -60
- package/dist/comment-person-D_IyIjXo.js +0 -39
- package/dist/comment-pin-hBJFiSYW.d.ts +0 -66
- package/dist/comment-row-DPMWI5Z0.js +0 -38
- package/dist/comment-selection-bar-CVuS-FNL.d.ts +0 -40
- package/dist/comment-send-CUkL3TbZ.js +0 -275
- package/dist/comment-send-MmxFsOQf.d.ts +0 -23
- package/dist/comment-status-nsCdrRk_.js +0 -20
- package/dist/drop-field-CNZgwFVO.js +0 -162
- package/dist/editor-Dmk3k6f6.js +0 -620
- package/dist/format-CPipR1FP.js +0 -19
- package/dist/handlers-CnbkvXjX.js +0 -181
- package/dist/icon-XZaCUZTG.d.ts +0 -29
- package/dist/image-preview-BKVUtfwQ.js +0 -104
- package/dist/index-B_PSX-5h.d.ts +0 -69
- package/dist/list-DUTAo0uC.js +0 -270
- package/dist/markdown-editor-B7gD60tp.d.ts +0 -189
- package/dist/message-scroller-BZqS63IX.d.ts +0 -173
- package/dist/nuxt-ui-7ByUrymx.js +0 -43
- package/dist/parts/components/comment-list.d.ts +0 -2
- package/dist/parts/components/comment-list.js +0 -173
- package/dist/parts/components/comment-pin.d.ts +0 -2
- package/dist/parts/components/comment-pin.js +0 -74
- package/dist/parts/components/comment-send.d.ts +0 -2
- package/dist/parts/components/comment-send.js +0 -1
- package/dist/parts/components/markdown-editor.d.ts +0 -2
- package/dist/parts/components/markdown-editor.js +0 -1
- package/dist/parts/components/markdown-renderer.js +0 -1
- package/dist/payload-text-DQNRbJY5.js +0 -31
- package/dist/progress-DL9k-ERG.js +0 -265
- package/dist/registry-DAIjCjWd.js +0 -77
- package/dist/slot-part-BWHvQ3mK.js +0 -25
- package/dist/text-gacox6bp.js +0 -822
- package/dist/travel-BliEidau.js +0 -180
- package/dist/tween-Dv3IIIQG.js +0 -61
- package/dist/types-Ceh7h7NT.d.ts +0 -31
- 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,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
|
|
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 {
|
|
5
|
+
import { r as useViteHubUIMotionEnabled } from "./config-CFwvNt4Y.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-
|
|
4207
|
+
const Pele = defineAsyncComponent(() => import("./vue-DdYvDVOr.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/
|
|
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,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
|
-
|
|
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<
|
|
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<
|
|
47
|
+
type: PropType<MarkdownValue>;
|
|
44
48
|
};
|
|
45
49
|
}>> & Readonly<{}>, {
|
|
46
|
-
value:
|
|
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,104 +1,57 @@
|
|
|
1
|
-
import { n as MarkdownEditorUpload, r as
|
|
2
|
-
import { PropType
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
type
|
|
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
|
-
|
|
86
|
-
|
|
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
|
-
|
|
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 };
|
package/dist/markdown-editor.js
CHANGED
|
@@ -1,3 +1,70 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
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-DJPUs1nt.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 };
|
package/dist/markdown.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { t as MarkdownRenderer } from "./markdown-DDyOdYq_.js";
|