@vite-hub/ui 0.6.0 → 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 +106 -46
- 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/client-BG-oCUtv-5i4sRwXP.js +6587 -0
- 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/{colors-BghReA9C-DEq4bhEP.js → colors-BghReA9C-A4M9YE0s.js} +1 -1
- package/dist/{comment-composer-BP-CJx7f.js → comment-composer-BUt6vbnr.js} +176 -38
- package/dist/{comment-composer-BI6CNJyO.d.ts → comment-composer-CIsbz-78.d.ts} +7 -7
- package/dist/comment-layer-BlVNORgj.d.ts +139 -0
- package/dist/comment-layer-Ck2H24oJ.js +1206 -0
- package/dist/comment-panel-Djx-KxVa.d.ts +173 -0
- 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-5h93DXds.js → comment-thread-C_Q4UDaV.js} +78 -53
- package/dist/{comment-thread-DSkWODKG.d.ts → comment-thread-X6gYMNay.d.ts} +11 -14
- package/dist/comments-B1itauwb.d.ts +52 -0
- package/dist/{comments-D9dONfs9.js → comments-BaSrroRV.js} +65 -44
- package/dist/comments-BtD28xEn.js +390 -0
- package/dist/{comments-CnG_c-_c.d.ts → comments-ZfV6IZs8.d.ts} +15 -7
- package/dist/{comments-context-CrjhleVA.js → comments-context-3js2YFl2.js} +2 -2
- package/dist/components-CM5mZe0a.js +269 -0
- package/dist/{config-BDvnaVUn.js → config-CFwvNt4Y.js} +16 -29
- package/dist/{config-xL4EBeXw.d.ts → config-JmsTI7gs.d.ts} +21 -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/{draw-DzSmD7uo-Cb7s9kxJ.js → draw-DzSmD7uo-BvtKi0oE.js} +2 -2
- 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-3gY9MLvy.js → editor-DJPUs1nt.js} +877 -116
- 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 -670
- package/dist/markdown-BLALLOc0.d.ts +45 -0
- package/dist/{markdown-renderer-BgsmNqv7.js → markdown-DDyOdYq_.js} +13044 -12356
- 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-DEoFFycD.js → motion-core-BdTfxAhY.js} +1779 -55
- package/dist/{motion-core-DNl7TR1T.d.ts → motion-core-BfIefToe.d.ts} +32 -74
- package/dist/motion-dPwxx3Wk.js +76 -0
- package/dist/{install-qNaj4OY4.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 -252
- package/dist/parts/components/agent-session.js +1 -639
- 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 -645
- package/dist/parts/components/comment-panel.d.ts +2 -2
- package/dist/parts/components/comment-panel.js +49 -40
- 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 +2 -2
- 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.d.ts +1 -1
- 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 +3 -3
- 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 +4 -4
- 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-BN4d8vtw.js → ring-DoL9jivj.js} +64 -14
- package/dist/runtime/nuxt-plugin.js +2 -5
- package/dist/{sankey-CAYwt82B-BAAk7WkJ.js → sankey-CAYwt82B-e6k34wtW.js} +3 -3
- 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 +4315 -3362
- 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-Cs_HmYsp.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 +49 -15
- 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-CMpYOJod.js +0 -19
- package/dist/comment-layer-Ba2DV4L7.d.ts +0 -174
- package/dist/comment-list-BJdZu0DS.d.ts +0 -60
- package/dist/comment-panel-DISGe7yM.d.ts +0 -206
- package/dist/comment-person-D_IyIjXo.js +0 -39
- package/dist/comment-pin-C5UeLPTa.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-CH46zawK.js +0 -275
- package/dist/comment-send-MmxFsOQf.d.ts +0 -23
- package/dist/drop-field-CNZgwFVO.js +0 -162
- package/dist/editor-BuByBIkJ.js +0 -620
- package/dist/format-Bc9m7-r0.js +0 -38
- package/dist/handlers-CnbkvXjX.js +0 -181
- package/dist/icon-XZaCUZTG.d.ts +0 -29
- package/dist/image-preview-EqfPcFZ9.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-a6qaYHno.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 -172
- 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-BWzZFnGY.js +0 -822
- package/dist/travel-CwVhU_GS.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
- package/dist/vue-BlknIGIm.js +0 -2501
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { s as CommentsState, t as CommentCan } from "./comments-ZfV6IZs8.js";
|
|
2
|
+
import { u as CommentRowSlots } from "./types-BF_U0tgp.js";
|
|
3
|
+
import { l as CommentThreadSlots, n as CommentAttachmentUrl } from "./comment-thread-X6gYMNay.js";
|
|
4
|
+
import { PropType, SlotsType, VNode } from "vue";
|
|
5
|
+
import { CommentStatus, CommentSubject, CommentThread, CommentUser, CommentsClient } from "@vite-hub/comments/client";
|
|
6
|
+
type CommentPanelVariant = "docked" | "floating";
|
|
7
|
+
/** Turns files into attachment keys, such as Blob keys, before a comment or a reply is sent. */
|
|
8
|
+
type CommentUpload = (files: File[]) => Promise<string[]>;
|
|
9
|
+
/** The scope of the `group-header` slot: the label that `group` gave, and the threads under it. */
|
|
10
|
+
interface CommentGroupSlotScope {
|
|
11
|
+
group: string;
|
|
12
|
+
threads: CommentThread[];
|
|
13
|
+
}
|
|
14
|
+
type CommentPanelSlots = CommentThreadSlots & CommentRowSlots & {
|
|
15
|
+
/** The heading of a group of rows. Replaces the label that `group` gave. */
|
|
16
|
+
"group-header"?: (scope: CommentGroupSlotScope) => VNode[];
|
|
17
|
+
/** Buttons at the end of the list's top row, beside Open and Resolved, such as Close. */
|
|
18
|
+
"list-actions"?: () => VNode[];
|
|
19
|
+
};
|
|
20
|
+
/** Puts a thread under a heading of the list, such as `"From earlier versions"`. `undefined` keeps it in the first, unnamed group. */
|
|
21
|
+
type CommentGroup = (thread: CommentThread) => string | undefined;
|
|
22
|
+
declare const CommentPanel: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
23
|
+
comments: {
|
|
24
|
+
type: PropType<CommentsState>;
|
|
25
|
+
};
|
|
26
|
+
client: {
|
|
27
|
+
type: PropType<CommentsClient>;
|
|
28
|
+
};
|
|
29
|
+
subject: {
|
|
30
|
+
type: PropType<CommentSubject>;
|
|
31
|
+
};
|
|
32
|
+
user: {
|
|
33
|
+
type: PropType<CommentUser>;
|
|
34
|
+
};
|
|
35
|
+
variant: {
|
|
36
|
+
default: string;
|
|
37
|
+
type: PropType<CommentPanelVariant>;
|
|
38
|
+
};
|
|
39
|
+
thread: {
|
|
40
|
+
default: undefined;
|
|
41
|
+
type: PropType<string | null>;
|
|
42
|
+
};
|
|
43
|
+
status: {
|
|
44
|
+
type: PropType<CommentStatus>;
|
|
45
|
+
};
|
|
46
|
+
title: {
|
|
47
|
+
default: string;
|
|
48
|
+
type: StringConstructor;
|
|
49
|
+
};
|
|
50
|
+
heading: {
|
|
51
|
+
default: boolean;
|
|
52
|
+
type: BooleanConstructor;
|
|
53
|
+
};
|
|
54
|
+
composer: {
|
|
55
|
+
default: boolean;
|
|
56
|
+
type: BooleanConstructor;
|
|
57
|
+
};
|
|
58
|
+
readOnly: {
|
|
59
|
+
default: boolean;
|
|
60
|
+
type: BooleanConstructor;
|
|
61
|
+
};
|
|
62
|
+
upload: {
|
|
63
|
+
type: PropType<CommentUpload>;
|
|
64
|
+
};
|
|
65
|
+
queueFiles: {
|
|
66
|
+
default: boolean;
|
|
67
|
+
type: BooleanConstructor;
|
|
68
|
+
};
|
|
69
|
+
accept: {
|
|
70
|
+
type: StringConstructor;
|
|
71
|
+
};
|
|
72
|
+
attachmentUrl: {
|
|
73
|
+
type: PropType<CommentAttachmentUrl>;
|
|
74
|
+
};
|
|
75
|
+
allowEmpty: {
|
|
76
|
+
default: boolean;
|
|
77
|
+
type: BooleanConstructor;
|
|
78
|
+
};
|
|
79
|
+
people: {
|
|
80
|
+
default: () => never[];
|
|
81
|
+
type: PropType<CommentUser[]>;
|
|
82
|
+
};
|
|
83
|
+
can: {
|
|
84
|
+
type: PropType<CommentCan>;
|
|
85
|
+
};
|
|
86
|
+
group: {
|
|
87
|
+
type: PropType<CommentGroup>;
|
|
88
|
+
};
|
|
89
|
+
}>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
90
|
+
[key: string]: any;
|
|
91
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:thread" | "update:status" | "select")[], "update:thread" | "update:status" | "select", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
92
|
+
comments: {
|
|
93
|
+
type: PropType<CommentsState>;
|
|
94
|
+
};
|
|
95
|
+
client: {
|
|
96
|
+
type: PropType<CommentsClient>;
|
|
97
|
+
};
|
|
98
|
+
subject: {
|
|
99
|
+
type: PropType<CommentSubject>;
|
|
100
|
+
};
|
|
101
|
+
user: {
|
|
102
|
+
type: PropType<CommentUser>;
|
|
103
|
+
};
|
|
104
|
+
variant: {
|
|
105
|
+
default: string;
|
|
106
|
+
type: PropType<CommentPanelVariant>;
|
|
107
|
+
};
|
|
108
|
+
thread: {
|
|
109
|
+
default: undefined;
|
|
110
|
+
type: PropType<string | null>;
|
|
111
|
+
};
|
|
112
|
+
status: {
|
|
113
|
+
type: PropType<CommentStatus>;
|
|
114
|
+
};
|
|
115
|
+
title: {
|
|
116
|
+
default: string;
|
|
117
|
+
type: StringConstructor;
|
|
118
|
+
};
|
|
119
|
+
heading: {
|
|
120
|
+
default: boolean;
|
|
121
|
+
type: BooleanConstructor;
|
|
122
|
+
};
|
|
123
|
+
composer: {
|
|
124
|
+
default: boolean;
|
|
125
|
+
type: BooleanConstructor;
|
|
126
|
+
};
|
|
127
|
+
readOnly: {
|
|
128
|
+
default: boolean;
|
|
129
|
+
type: BooleanConstructor;
|
|
130
|
+
};
|
|
131
|
+
upload: {
|
|
132
|
+
type: PropType<CommentUpload>;
|
|
133
|
+
};
|
|
134
|
+
queueFiles: {
|
|
135
|
+
default: boolean;
|
|
136
|
+
type: BooleanConstructor;
|
|
137
|
+
};
|
|
138
|
+
accept: {
|
|
139
|
+
type: StringConstructor;
|
|
140
|
+
};
|
|
141
|
+
attachmentUrl: {
|
|
142
|
+
type: PropType<CommentAttachmentUrl>;
|
|
143
|
+
};
|
|
144
|
+
allowEmpty: {
|
|
145
|
+
default: boolean;
|
|
146
|
+
type: BooleanConstructor;
|
|
147
|
+
};
|
|
148
|
+
people: {
|
|
149
|
+
default: () => never[];
|
|
150
|
+
type: PropType<CommentUser[]>;
|
|
151
|
+
};
|
|
152
|
+
can: {
|
|
153
|
+
type: PropType<CommentCan>;
|
|
154
|
+
};
|
|
155
|
+
group: {
|
|
156
|
+
type: PropType<CommentGroup>;
|
|
157
|
+
};
|
|
158
|
+
}>> & Readonly<{
|
|
159
|
+
"onUpdate:thread"?: ((...args: any[]) => any) | undefined;
|
|
160
|
+
"onUpdate:status"?: ((...args: any[]) => any) | undefined;
|
|
161
|
+
onSelect?: ((...args: any[]) => any) | undefined;
|
|
162
|
+
}>, {
|
|
163
|
+
variant: CommentPanelVariant;
|
|
164
|
+
thread: string | null;
|
|
165
|
+
title: string;
|
|
166
|
+
heading: boolean;
|
|
167
|
+
composer: boolean;
|
|
168
|
+
readOnly: boolean;
|
|
169
|
+
queueFiles: boolean;
|
|
170
|
+
allowEmpty: boolean;
|
|
171
|
+
people: CommentUser[];
|
|
172
|
+
}, SlotsType<CommentPanelSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
173
|
+
export { CommentPanelVariant as a, CommentPanelSlots as i, CommentGroupSlotScope as n, CommentUpload as o, CommentPanel as r, CommentGroup as t };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { m as CommentSelectionBarSlots, p as CommentSelectionBarSide } from "./types-BF_U0tgp.js";
|
|
2
|
+
import { PropType, SlotsType } from "vue";
|
|
3
|
+
declare const CommentSelectionBar: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
|
+
side: {
|
|
5
|
+
default: string;
|
|
6
|
+
type: PropType<CommentSelectionBarSide>;
|
|
7
|
+
};
|
|
8
|
+
suggest: {
|
|
9
|
+
default: boolean;
|
|
10
|
+
type: BooleanConstructor;
|
|
11
|
+
};
|
|
12
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
13
|
+
[key: string]: any;
|
|
14
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
15
|
+
comment: () => true;
|
|
16
|
+
suggest: () => true;
|
|
17
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
18
|
+
side: {
|
|
19
|
+
default: string;
|
|
20
|
+
type: PropType<CommentSelectionBarSide>;
|
|
21
|
+
};
|
|
22
|
+
suggest: {
|
|
23
|
+
default: boolean;
|
|
24
|
+
type: BooleanConstructor;
|
|
25
|
+
};
|
|
26
|
+
}>> & Readonly<{
|
|
27
|
+
onComment?: (() => any) | undefined;
|
|
28
|
+
onSuggest?: (() => any) | undefined;
|
|
29
|
+
}>, {
|
|
30
|
+
side: CommentSelectionBarSide;
|
|
31
|
+
suggest: boolean;
|
|
32
|
+
}, SlotsType<CommentSelectionBarSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
33
|
+
export { CommentSelectionBar as t };
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { t as useUIComponent } from "./nuxt-ui-CPdiTwwD.js";
|
|
2
|
+
import { Fragment, cloneVNode, computed, createBlock, createElementBlock, createElementVNode, createTextVNode, defineComponent, h, mergeProps, onErrorCaptured, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, withCtx, withModifiers } from "vue";
|
|
3
|
+
import { MessageCircle, Pencil } from "@lucide/vue";
|
|
4
|
+
// registry/comments/CommentSelectionBar.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
const _hoisted_1 = ["data-side"];
|
|
6
|
+
const _hoisted_2 = [
|
|
7
|
+
"data-action",
|
|
8
|
+
"aria-keyshortcuts",
|
|
9
|
+
"title",
|
|
10
|
+
"onClick"
|
|
11
|
+
];
|
|
12
|
+
// registry/comments/CommentSelectionBar.vue
|
|
13
|
+
var CommentSelectionBar_default = /* @__PURE__ */ defineComponent({
|
|
14
|
+
name: "CommentSelectionBar",
|
|
15
|
+
__name: "CommentSelectionBar",
|
|
16
|
+
props: {
|
|
17
|
+
suggest: {
|
|
18
|
+
type: Boolean,
|
|
19
|
+
default: false
|
|
20
|
+
},
|
|
21
|
+
side: { default: "top" },
|
|
22
|
+
tooltip: { type: [Object, Function] }
|
|
23
|
+
},
|
|
24
|
+
emits: ["comment", "suggest"],
|
|
25
|
+
setup(__props, { emit: __emit }) {
|
|
26
|
+
const emit = __emit;
|
|
27
|
+
const NativeHint = (_props, { slots }) => slots.default?.();
|
|
28
|
+
const actions = computed(() => [{
|
|
29
|
+
name: "comment",
|
|
30
|
+
label: "Comment",
|
|
31
|
+
hint: "Comment on the selected text",
|
|
32
|
+
key: "C",
|
|
33
|
+
icon: MessageCircle
|
|
34
|
+
}, ...__props.suggest ? [{
|
|
35
|
+
name: "suggest",
|
|
36
|
+
label: "Suggest",
|
|
37
|
+
hint: "Suggest new words",
|
|
38
|
+
key: "E",
|
|
39
|
+
icon: Pencil
|
|
40
|
+
}] : []]);
|
|
41
|
+
function run(name) {
|
|
42
|
+
if (name === "comment") emit("comment");
|
|
43
|
+
else emit("suggest");
|
|
44
|
+
}
|
|
45
|
+
return (_ctx, _cache) => {
|
|
46
|
+
return openBlock(), createElementBlock("div", {
|
|
47
|
+
"data-slot": "comment-selection-bar",
|
|
48
|
+
"data-motion-appear": "",
|
|
49
|
+
"data-side": __props.side,
|
|
50
|
+
role: "group",
|
|
51
|
+
"aria-label": "Selected text",
|
|
52
|
+
onMousedown: _cache[0] || (_cache[0] = withModifiers(() => {}, ["prevent"]))
|
|
53
|
+
}, [(openBlock(true), createElementBlock(Fragment, null, renderList(actions.value, (action) => {
|
|
54
|
+
return openBlock(), createBlock(resolveDynamicComponent(__props.tooltip || NativeHint), mergeProps({ key: action.name }, { ref_for: true }, __props.tooltip ? {
|
|
55
|
+
side: __props.side,
|
|
56
|
+
hint: action.hint,
|
|
57
|
+
shortcut: action.key
|
|
58
|
+
} : {}), {
|
|
59
|
+
default: withCtx(() => [createElementVNode("button", {
|
|
60
|
+
type: "button",
|
|
61
|
+
"data-slot": "comment-selection-bar-action",
|
|
62
|
+
"data-action": action.name,
|
|
63
|
+
"aria-keyshortcuts": action.key,
|
|
64
|
+
title: __props.tooltip ? void 0 : `${action.hint} (${action.key})`,
|
|
65
|
+
onClick: ($event) => run(action.name)
|
|
66
|
+
}, [renderSlot(_ctx.$slots, `${action.name}-icon`, {}, () => [(openBlock(), createBlock(resolveDynamicComponent(action.icon), {
|
|
67
|
+
"data-slot": "comment-icon",
|
|
68
|
+
"aria-hidden": "true"
|
|
69
|
+
}))]), createTextVNode(toDisplayString(action.label), 1)], 8, _hoisted_2)]),
|
|
70
|
+
_: 2
|
|
71
|
+
}, 1040);
|
|
72
|
+
}), 128))], 40, _hoisted_1);
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
// src/components/comment-selection-bar.ts
|
|
77
|
+
const SelectionHint = defineComponent({
|
|
78
|
+
props: {
|
|
79
|
+
hint: {
|
|
80
|
+
required: true,
|
|
81
|
+
type: String
|
|
82
|
+
},
|
|
83
|
+
shortcut: {
|
|
84
|
+
required: true,
|
|
85
|
+
type: String
|
|
86
|
+
},
|
|
87
|
+
side: {
|
|
88
|
+
required: true,
|
|
89
|
+
type: String
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
setup(props, { slots }) {
|
|
93
|
+
const Tooltip = useUIComponent("UTooltip");
|
|
94
|
+
const failed = ref(false);
|
|
95
|
+
let mounted = false;
|
|
96
|
+
onErrorCaptured(() => {
|
|
97
|
+
if (mounted || failed.value) return;
|
|
98
|
+
failed.value = true;
|
|
99
|
+
return false;
|
|
100
|
+
});
|
|
101
|
+
return () => {
|
|
102
|
+
const title = `${props.hint} (${props.shortcut})`;
|
|
103
|
+
if (failed.value) return slots.default?.().map((node) => cloneVNode(node, { title }));
|
|
104
|
+
return h(Tooltip, {
|
|
105
|
+
content: {
|
|
106
|
+
side: props.side,
|
|
107
|
+
sideOffset: 8
|
|
108
|
+
},
|
|
109
|
+
onVnodeMounted: () => mounted = true,
|
|
110
|
+
text: title
|
|
111
|
+
}, {
|
|
112
|
+
content: () => [props.hint, h("kbd", { "data-slot": "comment-selection-bar-kbd" }, props.shortcut)],
|
|
113
|
+
default: slots.default
|
|
114
|
+
});
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
const CommentSelectionBar = defineComponent({
|
|
119
|
+
name: "CommentSelectionBar",
|
|
120
|
+
props: {
|
|
121
|
+
side: {
|
|
122
|
+
default: "top",
|
|
123
|
+
type: String
|
|
124
|
+
},
|
|
125
|
+
suggest: {
|
|
126
|
+
default: false,
|
|
127
|
+
type: Boolean
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
emits: {
|
|
131
|
+
comment: () => true,
|
|
132
|
+
suggest: () => true
|
|
133
|
+
},
|
|
134
|
+
slots: Object,
|
|
135
|
+
setup(props, { emit, slots }) {
|
|
136
|
+
return () => h(CommentSelectionBar_default, {
|
|
137
|
+
...props,
|
|
138
|
+
"data-slot": "comment-selection-bar",
|
|
139
|
+
tooltip: SelectionHint,
|
|
140
|
+
onComment: () => emit("comment"),
|
|
141
|
+
onSuggest: () => emit("suggest")
|
|
142
|
+
}, slots);
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
export { CommentSelectionBar as t };
|
package/dist/comment-send.css
CHANGED
|
@@ -146,12 +146,12 @@
|
|
|
146
146
|
}
|
|
147
147
|
|
|
148
148
|
@media (max-width: 600px) {
|
|
149
|
-
[data-slot="comment-send"]:is([data-
|
|
149
|
+
[data-slot="comment-send"]:is([data-status="pairing"], [data-status="confirm"]) {
|
|
150
150
|
flex-shrink: 1;
|
|
151
151
|
max-inline-size: calc(100vw - 64px);
|
|
152
152
|
}
|
|
153
153
|
|
|
154
|
-
[data-slot="comment-send"]:is([data-
|
|
154
|
+
[data-slot="comment-send"]:is([data-status="pairing"], [data-status="confirm"]) [data-slot="comment-send-content"],
|
|
155
155
|
[data-slot="comment-send-status"]:has([data-slot="comment-send-message"]) {
|
|
156
156
|
flex: 0 1 auto;
|
|
157
157
|
min-inline-size: 0;
|
|
@@ -1,18 +1,36 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as consumedPointerEvents, l as swallowNextClick, n as injectComments, o as pathOf, r as commentThreadPortals, s as shakeDirtyComposers, u as useDocumentPointerDown } from "./comments-context-
|
|
3
|
-
import { n as mentionPlugin, r as mentionTag, t as CommentComposer } from "./comment-composer-
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { t as
|
|
8
|
-
import { r as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { t as RelativeTime } from "./relative-time-DJnw45tr.js";
|
|
1
|
+
import { t as RollNumber_default } from "./RollNumber-Bo2tzfAp.js";
|
|
2
|
+
import { i as consumedPointerEvents, l as swallowNextClick, n as injectComments, o as pathOf, r as commentThreadPortals, s as shakeDirtyComposers, u as useDocumentPointerDown } from "./comments-context-3js2YFl2.js";
|
|
3
|
+
import { c as writerName, i as displayName, l as writerPerson, n as mentionPlugin, r as mentionTag, t as CommentComposer } from "./comment-composer-BUt6vbnr.js";
|
|
4
|
+
import { t as defaultCommentCan } from "./comments-BaSrroRV.js";
|
|
5
|
+
import { n as useViteHubUIIcons } from "./config-CFwvNt4Y.js";
|
|
6
|
+
import { i as travel } from "./motion-core-BdTfxAhY.js";
|
|
7
|
+
import { t as useUIComponent } from "./nuxt-ui-CPdiTwwD.js";
|
|
8
|
+
import { i as AttachmentContent_default, n as AttachmentMedia_default, r as AttachmentGroup_default, s as Attachment_default, t as AttachmentTitle_default } from "./AttachmentTitle-BWw0ck0T.js";
|
|
9
|
+
import { t as AvatarStack_default } from "./avatar-stack-nQErr0qn.js";
|
|
10
|
+
import { t as Markdown_default } from "./Markdown-_w7feFzl.js";
|
|
11
|
+
import { i as Marker_default, r as MarkerContent_default } from "./marker-DNL6QR3L.js";
|
|
12
|
+
import { t as MotionList_default } from "./motion-list-BBbz93WT.js";
|
|
13
|
+
import { t as RelativeTime_default } from "./relative-time-BnJfjeEm.js";
|
|
15
14
|
import { computed, defineComponent, h, inject, nextTick, onBeforeUnmount, provide, ref, watch } from "vue";
|
|
15
|
+
// registry/comments/status.ts
|
|
16
|
+
function messagesSinceResolved(thread) {
|
|
17
|
+
const { resolvedAt } = thread;
|
|
18
|
+
if (thread.status !== "resolved" || resolvedAt === void 0) return [];
|
|
19
|
+
return thread.messages.filter((message) => message.createdAt > resolvedAt);
|
|
20
|
+
}
|
|
21
|
+
const repliedSinceResolved = (thread) => messagesSinceResolved(thread).length > 0;
|
|
22
|
+
function commentTitle(thread) {
|
|
23
|
+
return thread.n ? `Comment ${thread.n}` : "Comment";
|
|
24
|
+
}
|
|
25
|
+
function commentHeading(thread) {
|
|
26
|
+
return thread.n ? `#${thread.n}` : "Comment";
|
|
27
|
+
}
|
|
28
|
+
function deliveryAttributes(delivery) {
|
|
29
|
+
return {
|
|
30
|
+
"data-failed": delivery?.status === "failed" ? "true" : void 0,
|
|
31
|
+
"data-pending": delivery?.status === "pending" ? "true" : void 0
|
|
32
|
+
};
|
|
33
|
+
}
|
|
16
34
|
// src/internal/image-gallery.ts
|
|
17
35
|
const tileCount = 4;
|
|
18
36
|
/** The box of `width` by `height` that covers `box`, centered on it: the picture with the shape it has full size. */
|
|
@@ -154,7 +172,7 @@ const ImageGallery = defineComponent({
|
|
|
154
172
|
class: "vh-image-dialog__name",
|
|
155
173
|
title: shown.value?.name
|
|
156
174
|
}, shown.value?.name),
|
|
157
|
-
many ? h("span", { class: "vh-image-gallery__count" }, [h(
|
|
175
|
+
many ? h("span", { class: "vh-image-gallery__count" }, [h(RollNumber_default, { value: (current.value ?? 0) + 1 }), ` of ${count}`]) : null,
|
|
158
176
|
h(UButton, {
|
|
159
177
|
"aria-label": "Open original image",
|
|
160
178
|
class: "vh-image-dialog__action",
|
|
@@ -253,10 +271,10 @@ function attachmentList(message, url, icon, fileIcon) {
|
|
|
253
271
|
src: item.href
|
|
254
272
|
}] : []);
|
|
255
273
|
const files = items.filter((item) => !item.image);
|
|
256
|
-
return [images.length > 0 ? h(ImageGallery, { images }) : null, files.length > 0 ? h(
|
|
274
|
+
return [images.length > 0 ? h(ImageGallery, { images }) : null, files.length > 0 ? h(AttachmentGroup_default, { "data-slot": "comment-reply-attachments" }, () => files.map((item) => h(Attachment_default, {
|
|
257
275
|
key: item.key,
|
|
258
276
|
size: "xs"
|
|
259
|
-
}, () => [h(
|
|
277
|
+
}, () => [h(AttachmentMedia_default, { kind: "icon" }, () => h(icon, { name: fileIcon })), h(AttachmentContent_default, () => h(AttachmentTitle_default, () => item.href ? h("a", {
|
|
260
278
|
href: item.href,
|
|
261
279
|
rel: "noreferrer",
|
|
262
280
|
target: "_blank"
|
|
@@ -416,7 +434,7 @@ const CommentReply = defineComponent({
|
|
|
416
434
|
"data-slot": "comment-reply"
|
|
417
435
|
}, [h("div", { "data-slot": "comment-reply-content" }, [
|
|
418
436
|
h("div", { "data-slot": "comment-reply-header" }, [
|
|
419
|
-
h(
|
|
437
|
+
h(AvatarStack_default, {
|
|
420
438
|
"aria-hidden": "true",
|
|
421
439
|
people: [writerPerson(message)],
|
|
422
440
|
size: "sm"
|
|
@@ -425,7 +443,7 @@ const CommentReply = defineComponent({
|
|
|
425
443
|
"data-agent": message.actor ? "true" : void 0,
|
|
426
444
|
"data-slot": "comment-reply-author"
|
|
427
445
|
}, writerName(message)),
|
|
428
|
-
h(
|
|
446
|
+
h(RelativeTime_default, {
|
|
429
447
|
at: message.createdAt,
|
|
430
448
|
"data-slot": "comment-reply-time"
|
|
431
449
|
}),
|
|
@@ -451,13 +469,14 @@ const CommentReply = defineComponent({
|
|
|
451
469
|
}, {
|
|
452
470
|
...slots["mention-item"] ? { "mention-item": slots["mention-item"] } : {},
|
|
453
471
|
...slots["mention-empty"] ? { "mention-empty": slots["mention-empty"] } : {}
|
|
454
|
-
}) : slots.body?.({ message }) ?? h(
|
|
472
|
+
}) : slots.body?.({ message }) ?? h(Markdown_default, {
|
|
455
473
|
components: bodyComponents,
|
|
456
474
|
"data-slot": "comment-reply-body",
|
|
457
475
|
plugins: bodyPlugins.value,
|
|
458
476
|
value: message.body
|
|
459
477
|
}),
|
|
460
478
|
editing.value || props.compact ? null : slots.attachments?.({ message }) ?? attachmentList(message, props.attachmentUrl, UIcon, icons.value.file),
|
|
479
|
+
editing.value || props.compact || !slots.footer ? null : h("div", { "data-slot": "comment-reply-footer" }, slots.footer({ message })),
|
|
461
480
|
!editing.value && message.delivery ? statusOf(message, message.delivery) : null,
|
|
462
481
|
confirming.value ? h("div", {
|
|
463
482
|
"aria-label": "Confirm delete",
|
|
@@ -503,10 +522,10 @@ const CommentReply = defineComponent({
|
|
|
503
522
|
}
|
|
504
523
|
});
|
|
505
524
|
/** "Resolved by Ana", or "Resolved by Claude (Ana)" when her agent did, as a line across the thread. */
|
|
506
|
-
const resolvedMarker = (thread) => h(
|
|
525
|
+
const resolvedMarker = (thread) => h(Marker_default, {
|
|
507
526
|
key: "resolved",
|
|
508
527
|
variant: "separator"
|
|
509
|
-
}, () => h(
|
|
528
|
+
}, () => h(MarkerContent_default, () => `Resolved${thread.resolvedBy ? ` by ${writerName({
|
|
510
529
|
author: thread.resolvedBy,
|
|
511
530
|
...thread.resolvedActor ? { actor: thread.resolvedActor } : {}
|
|
512
531
|
})}` : ""}`));
|
|
@@ -596,7 +615,7 @@ const CommentThread = defineComponent({
|
|
|
596
615
|
const sending = ref(false);
|
|
597
616
|
const failure = ref();
|
|
598
617
|
const composer = ref(null);
|
|
599
|
-
const portals = /* @__PURE__ */ new Set();
|
|
618
|
+
const portals = inject(commentThreadPortals, void 0) ?? /* @__PURE__ */ new Set();
|
|
600
619
|
provide(commentThreadPortals, portals);
|
|
601
620
|
const user = computed(() => props.user ?? comments?.user.value);
|
|
602
621
|
const users = computed(() => props.users ?? (comments ? (query) => comments.users(query, props.thread.id) : void 0));
|
|
@@ -665,6 +684,7 @@ const CommentThread = defineComponent({
|
|
|
665
684
|
const replySlots = () => ({
|
|
666
685
|
...slots.body ? { body: slots.body } : {},
|
|
667
686
|
...slots.attachments ? { attachments: slots.attachments } : {},
|
|
687
|
+
...slots.footer ? { footer: slots.footer } : {},
|
|
668
688
|
...slots.status ? { status: slots.status } : {},
|
|
669
689
|
...slots["mention-item"] ? { "mention-item": slots["mention-item"] } : {},
|
|
670
690
|
...slots["mention-empty"] ? { "mention-empty": slots["mention-empty"] } : {}
|
|
@@ -678,7 +698,6 @@ const CommentThread = defineComponent({
|
|
|
678
698
|
const { thread } = props;
|
|
679
699
|
const resolved = thread.status === "resolved";
|
|
680
700
|
const later = messagesSinceResolved(thread);
|
|
681
|
-
const resolvable = !resolved || later.length > 0;
|
|
682
701
|
const first = thread.messages[0];
|
|
683
702
|
const quote = thread.anchor.kind === "text" ? thread.anchor.exact : void 0;
|
|
684
703
|
if (props.preview) {
|
|
@@ -698,7 +717,7 @@ const CommentThread = defineComponent({
|
|
|
698
717
|
}, {
|
|
699
718
|
...slots.body ? { body: slots.body } : {},
|
|
700
719
|
...slots.status ? { status: slots.status } : {}
|
|
701
|
-
}) : null, replies > 0 ? h("p", { "data-slot": "comment-thread-count" }, [h(
|
|
720
|
+
}) : null, replies > 0 ? h("p", { "data-slot": "comment-thread-count" }, [h(RollNumber_default, { value: replies }), replies === 1 ? " reply" : " replies"]) : null]);
|
|
702
721
|
}
|
|
703
722
|
const back = props.navigation === "back";
|
|
704
723
|
const anchor = slots.anchor ? slots.anchor({ thread }) : quote ? h("blockquote", { "data-slot": "comment-thread-quote" }, quote) : null;
|
|
@@ -721,14 +740,14 @@ const CommentThread = defineComponent({
|
|
|
721
740
|
size: "xs",
|
|
722
741
|
variant: "ghost"
|
|
723
742
|
}) : null,
|
|
724
|
-
h("span", { "data-slot": "comment-thread-title" },
|
|
743
|
+
h("span", { "data-slot": "comment-thread-title" }, commentHeading(thread)),
|
|
725
744
|
h("span", { "data-slot": "comment-thread-spacer" }),
|
|
726
745
|
slots.actions ? h("div", { "data-slot": "comment-thread-actions" }, slots.actions({ thread })) : null,
|
|
727
746
|
!allowed("resolve") ? null : h(UButton, {
|
|
728
|
-
"aria-label":
|
|
747
|
+
"aria-label": resolved ? "Reopen" : "Resolve",
|
|
729
748
|
color: "neutral",
|
|
730
|
-
icon:
|
|
731
|
-
onClick: () => void act(
|
|
749
|
+
icon: resolved ? icons.value.reopen : icons.value.check,
|
|
750
|
+
onClick: () => void act(resolved ? props.onReopen : props.onResolve),
|
|
732
751
|
size: "xs",
|
|
733
752
|
variant: "ghost"
|
|
734
753
|
}),
|
|
@@ -741,29 +760,35 @@ const CommentThread = defineComponent({
|
|
|
741
760
|
variant: "ghost"
|
|
742
761
|
})
|
|
743
762
|
]),
|
|
744
|
-
h(
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
"data-slot": "comment-thread-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
762
|
-
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
763
|
+
h(MotionList_default, null, {
|
|
764
|
+
render: ({ props: list, children }) => h("div", {
|
|
765
|
+
...list,
|
|
766
|
+
"data-slot": "comment-thread-messages"
|
|
767
|
+
}, [children]),
|
|
768
|
+
default: () => [
|
|
769
|
+
anchor,
|
|
770
|
+
props.detached ? h("p", {
|
|
771
|
+
"data-slot": "comment-thread-detached",
|
|
772
|
+
role: "status"
|
|
773
|
+
}, "The place of this comment is no longer on the page.") : null,
|
|
774
|
+
...thread.messages.flatMap((message, index) => [resolved && message === later[0] ? resolvedMarker(thread) : null, h(CommentReply, {
|
|
775
|
+
attachmentUrl: props.attachmentUrl,
|
|
776
|
+
confirmDelete: index === 0,
|
|
777
|
+
deletable: allowed("delete", message),
|
|
778
|
+
editable: allowed("edit", message),
|
|
779
|
+
key: message.id,
|
|
780
|
+
message,
|
|
781
|
+
onDelete: props.onDelete,
|
|
782
|
+
onEdit: props.onEdit,
|
|
783
|
+
people: people.value,
|
|
784
|
+
size: props.size,
|
|
785
|
+
user: user.value,
|
|
786
|
+
users: users.value
|
|
787
|
+
}, replySlots())]),
|
|
788
|
+
resolved && later.length === 0 ? resolvedMarker(thread) : null,
|
|
789
|
+
slots.after ? h("div", { "data-slot": "comment-thread-after" }, slots.after({ thread })) : null
|
|
790
|
+
]
|
|
791
|
+
}),
|
|
767
792
|
!allowed("reply") && (failure.value ?? props.error) ? h("p", { role: "alert" }, failure.value ?? props.error) : null,
|
|
768
793
|
!allowed("reply") ? null : h(CommentComposer, {
|
|
769
794
|
accept: props.accept,
|
|
@@ -793,4 +818,4 @@ const CommentThread = defineComponent({
|
|
|
793
818
|
};
|
|
794
819
|
}
|
|
795
820
|
});
|
|
796
|
-
export { CommentThread as n, CommentReply as t };
|
|
821
|
+
export { messagesSinceResolved as a, deliveryAttributes as i, CommentThread as n, repliedSinceResolved as o, commentTitle as r, CommentReply as t };
|
|
@@ -1,13 +1,8 @@
|
|
|
1
|
-
import { t as CommentCan } from "./comments-
|
|
2
|
-
import { i as CommentComposerSlots, r as CommentComposerSize } from "./comment-composer-
|
|
1
|
+
import { t as CommentCan } from "./comments-ZfV6IZs8.js";
|
|
2
|
+
import { i as CommentComposerSlots, r as CommentComposerSize } from "./comment-composer-CIsbz-78.js";
|
|
3
3
|
import { PropType, SlotsType, VNode } from "vue";
|
|
4
4
|
import { CommentDelivery, CommentMessage, CommentThread, CommentUser } from "@vite-hub/comments/client";
|
|
5
|
-
/** The messages written after the thread was resolved. Empty for an open thread. */
|
|
6
5
|
declare function messagesSinceResolved(thread: Pick<CommentThread, "status" | "resolvedAt" | "messages">): CommentMessage[];
|
|
7
|
-
/**
|
|
8
|
-
* Whether someone replied after the thread was resolved, such as an agent that says what it changed. The thread stays
|
|
9
|
-
* resolved, and lists show it with the open threads until someone resolves it again.
|
|
10
|
-
*/
|
|
11
6
|
declare const repliedSinceResolved: (thread: Pick<CommentThread, "status" | "resolvedAt" | "messages">) => boolean;
|
|
12
7
|
type Done = Promise<unknown> | void;
|
|
13
8
|
/** An attachment as `attachmentUrl` describes it: its URL, and the file name and media type when the key does not say. */
|
|
@@ -22,7 +17,7 @@ interface CommentAttachmentLink {
|
|
|
22
17
|
* key as a file without a link. An image shows as a thumbnail that opens full size.
|
|
23
18
|
*/
|
|
24
19
|
type CommentAttachmentUrl = (key: string) => string | CommentAttachmentLink | undefined;
|
|
25
|
-
/** The scope of the `body` and `
|
|
20
|
+
/** The scope of the `body`, `attachments`, and `footer` slots of `CommentReply`. */
|
|
26
21
|
interface CommentReplySlotScope {
|
|
27
22
|
message: CommentMessage;
|
|
28
23
|
}
|
|
@@ -43,6 +38,8 @@ type CommentReplySlots = {
|
|
|
43
38
|
body?: (scope: CommentReplySlotScope) => VNode[];
|
|
44
39
|
/** The attachments of the message. Replaces the default thumbnails. */
|
|
45
40
|
attachments?: (scope: CommentReplySlotScope) => VNode[];
|
|
41
|
+
/** Below the text and attachments of the message, such as actions on it. Hidden while it is edited and in previews. */
|
|
42
|
+
footer?: (scope: CommentReplySlotScope) => VNode[];
|
|
46
43
|
/**
|
|
47
44
|
* Below a message that has not reached the server, such as "Waiting to send" or a refusal with Retry and Discard.
|
|
48
45
|
* Nothing shows without it. The message also gets `data-pending` or `data-failed`.
|
|
@@ -172,11 +169,11 @@ declare const CommentReply: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
172
169
|
type: PropType<(messageId: string) => Done>;
|
|
173
170
|
};
|
|
174
171
|
}>> & Readonly<{}>, {
|
|
175
|
-
size: CommentComposerSize;
|
|
176
|
-
compact: boolean;
|
|
177
172
|
people: CommentUser[];
|
|
173
|
+
size: CommentComposerSize;
|
|
178
174
|
editable: boolean;
|
|
179
175
|
deletable: boolean;
|
|
176
|
+
compact: boolean;
|
|
180
177
|
confirmDelete: boolean;
|
|
181
178
|
}, SlotsType<CommentReplySlots & Pick<CommentComposerSlots, "mention-item" | "mention-empty">>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
182
179
|
declare const CommentThread$1: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
@@ -368,14 +365,14 @@ declare const CommentThread$1: import("vue").DefineComponent<import("vue").Extra
|
|
|
368
365
|
}>> & Readonly<{
|
|
369
366
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
370
367
|
}>, {
|
|
371
|
-
size: CommentComposerSize;
|
|
372
|
-
people: CommentUser[];
|
|
373
|
-
busy: boolean;
|
|
374
|
-
attachments: boolean;
|
|
375
368
|
readOnly: boolean;
|
|
369
|
+
people: CommentUser[];
|
|
376
370
|
preview: boolean;
|
|
371
|
+
busy: boolean;
|
|
377
372
|
detached: boolean;
|
|
373
|
+
attachments: boolean;
|
|
378
374
|
navigation: "close" | "back";
|
|
379
375
|
dismissible: boolean;
|
|
376
|
+
size: CommentComposerSize;
|
|
380
377
|
}, SlotsType<CommentThreadSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
381
378
|
export { CommentReplySlots as a, CommentThreadSlotScope as c, repliedSinceResolved as d, CommentReplySlotScope as i, CommentThreadSlots as l, CommentAttachmentUrl as n, CommentStatusSlotScope as o, CommentReply as r, CommentThread$1 as s, CommentAttachmentLink as t, messagesSinceResolved as u };
|