@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
|
@@ -1,27 +1,16 @@
|
|
|
1
|
-
import { s as CommentsState, t as CommentCan } from "./comments-
|
|
2
|
-
import {
|
|
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";
|
|
3
4
|
import { PropType, SlotsType, VNode } from "vue";
|
|
4
5
|
import { CommentStatus, CommentSubject, CommentThread, CommentUser, CommentsClient } from "@vite-hub/comments/client";
|
|
5
6
|
type CommentPanelVariant = "docked" | "floating";
|
|
6
7
|
/** Turns files into attachment keys, such as Blob keys, before a comment or a reply is sent. */
|
|
7
8
|
type CommentUpload = (files: File[]) => Promise<string[]>;
|
|
8
|
-
/** The scope of the `row` and `preview` slots of `CommentPanel` and `CommentList`. */
|
|
9
|
-
interface CommentRowSlotScope {
|
|
10
|
-
thread: CommentThread;
|
|
11
|
-
/** The text that the row shows without a `preview` slot: the first message as plain text, else the quoted text. */
|
|
12
|
-
text: string;
|
|
13
|
-
}
|
|
14
9
|
/** The scope of the `group-header` slot: the label that `group` gave, and the threads under it. */
|
|
15
10
|
interface CommentGroupSlotScope {
|
|
16
11
|
group: string;
|
|
17
12
|
threads: CommentThread[];
|
|
18
13
|
}
|
|
19
|
-
type CommentRowSlots = {
|
|
20
|
-
/** The inside of one row of the list. Replaces the number, avatar, text, and facts. */
|
|
21
|
-
row?: (scope: CommentRowSlotScope) => VNode[];
|
|
22
|
-
/** The text of one row. Replaces the start of the first message, as plain text. Render `text` to keep it for some rows. */
|
|
23
|
-
preview?: (scope: CommentRowSlotScope) => VNode[];
|
|
24
|
-
};
|
|
25
14
|
type CommentPanelSlots = CommentThreadSlots & CommentRowSlots & {
|
|
26
15
|
/** The heading of a group of rows. Replaces the label that `group` gave. */
|
|
27
16
|
"group-header"?: (scope: CommentGroupSlotScope) => VNode[];
|
|
@@ -58,6 +47,14 @@ declare const CommentPanel: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
58
47
|
default: string;
|
|
59
48
|
type: StringConstructor;
|
|
60
49
|
};
|
|
50
|
+
heading: {
|
|
51
|
+
default: boolean;
|
|
52
|
+
type: BooleanConstructor;
|
|
53
|
+
};
|
|
54
|
+
composer: {
|
|
55
|
+
default: boolean;
|
|
56
|
+
type: BooleanConstructor;
|
|
57
|
+
};
|
|
61
58
|
readOnly: {
|
|
62
59
|
default: boolean;
|
|
63
60
|
type: BooleanConstructor;
|
|
@@ -91,7 +88,7 @@ declare const CommentPanel: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
91
88
|
};
|
|
92
89
|
}>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
93
90
|
[key: string]: any;
|
|
94
|
-
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("
|
|
91
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:thread" | "update:status" | "select")[], "update:thread" | "update:status" | "select", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
95
92
|
comments: {
|
|
96
93
|
type: PropType<CommentsState>;
|
|
97
94
|
};
|
|
@@ -119,6 +116,14 @@ declare const CommentPanel: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
119
116
|
default: string;
|
|
120
117
|
type: StringConstructor;
|
|
121
118
|
};
|
|
119
|
+
heading: {
|
|
120
|
+
default: boolean;
|
|
121
|
+
type: BooleanConstructor;
|
|
122
|
+
};
|
|
123
|
+
composer: {
|
|
124
|
+
default: boolean;
|
|
125
|
+
type: BooleanConstructor;
|
|
126
|
+
};
|
|
122
127
|
readOnly: {
|
|
123
128
|
default: boolean;
|
|
124
129
|
type: BooleanConstructor;
|
|
@@ -151,16 +156,18 @@ declare const CommentPanel: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
151
156
|
type: PropType<CommentGroup>;
|
|
152
157
|
};
|
|
153
158
|
}>> & Readonly<{
|
|
154
|
-
onSelect?: ((...args: any[]) => any) | undefined;
|
|
155
159
|
"onUpdate:thread"?: ((...args: any[]) => any) | undefined;
|
|
156
160
|
"onUpdate:status"?: ((...args: any[]) => any) | undefined;
|
|
161
|
+
onSelect?: ((...args: any[]) => any) | undefined;
|
|
157
162
|
}>, {
|
|
158
|
-
title: string;
|
|
159
163
|
variant: CommentPanelVariant;
|
|
160
|
-
|
|
161
|
-
|
|
164
|
+
thread: string | null;
|
|
165
|
+
title: string;
|
|
166
|
+
heading: boolean;
|
|
167
|
+
composer: boolean;
|
|
162
168
|
readOnly: boolean;
|
|
163
169
|
queueFiles: boolean;
|
|
164
|
-
|
|
170
|
+
allowEmpty: boolean;
|
|
171
|
+
people: CommentUser[];
|
|
165
172
|
}, SlotsType<CommentPanelSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
166
|
-
export { CommentPanelVariant as a,
|
|
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,19 +1,36 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { t as RollNumber_default } from "./RollNumber-Bo2tzfAp.js";
|
|
2
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 { n as mentionPlugin, r as mentionTag, t as CommentComposer } from "./comment-composer-
|
|
4
|
-
import {
|
|
5
|
-
import { n as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { t as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { MotionList } from "./parts/components/motion-list.js";
|
|
15
|
-
import { t as RelativeTime } from "./relative-time-DJnw45tr.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";
|
|
16
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
|
+
}
|
|
17
34
|
// src/internal/image-gallery.ts
|
|
18
35
|
const tileCount = 4;
|
|
19
36
|
/** The box of `width` by `height` that covers `box`, centered on it: the picture with the shape it has full size. */
|
|
@@ -155,7 +172,7 @@ const ImageGallery = defineComponent({
|
|
|
155
172
|
class: "vh-image-dialog__name",
|
|
156
173
|
title: shown.value?.name
|
|
157
174
|
}, shown.value?.name),
|
|
158
|
-
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,
|
|
159
176
|
h(UButton, {
|
|
160
177
|
"aria-label": "Open original image",
|
|
161
178
|
class: "vh-image-dialog__action",
|
|
@@ -254,10 +271,10 @@ function attachmentList(message, url, icon, fileIcon) {
|
|
|
254
271
|
src: item.href
|
|
255
272
|
}] : []);
|
|
256
273
|
const files = items.filter((item) => !item.image);
|
|
257
|
-
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, {
|
|
258
275
|
key: item.key,
|
|
259
276
|
size: "xs"
|
|
260
|
-
}, () => [h(
|
|
277
|
+
}, () => [h(AttachmentMedia_default, { kind: "icon" }, () => h(icon, { name: fileIcon })), h(AttachmentContent_default, () => h(AttachmentTitle_default, () => item.href ? h("a", {
|
|
261
278
|
href: item.href,
|
|
262
279
|
rel: "noreferrer",
|
|
263
280
|
target: "_blank"
|
|
@@ -417,7 +434,7 @@ const CommentReply = defineComponent({
|
|
|
417
434
|
"data-slot": "comment-reply"
|
|
418
435
|
}, [h("div", { "data-slot": "comment-reply-content" }, [
|
|
419
436
|
h("div", { "data-slot": "comment-reply-header" }, [
|
|
420
|
-
h(
|
|
437
|
+
h(AvatarStack_default, {
|
|
421
438
|
"aria-hidden": "true",
|
|
422
439
|
people: [writerPerson(message)],
|
|
423
440
|
size: "sm"
|
|
@@ -426,7 +443,7 @@ const CommentReply = defineComponent({
|
|
|
426
443
|
"data-agent": message.actor ? "true" : void 0,
|
|
427
444
|
"data-slot": "comment-reply-author"
|
|
428
445
|
}, writerName(message)),
|
|
429
|
-
h(
|
|
446
|
+
h(RelativeTime_default, {
|
|
430
447
|
at: message.createdAt,
|
|
431
448
|
"data-slot": "comment-reply-time"
|
|
432
449
|
}),
|
|
@@ -452,13 +469,14 @@ const CommentReply = defineComponent({
|
|
|
452
469
|
}, {
|
|
453
470
|
...slots["mention-item"] ? { "mention-item": slots["mention-item"] } : {},
|
|
454
471
|
...slots["mention-empty"] ? { "mention-empty": slots["mention-empty"] } : {}
|
|
455
|
-
}) : slots.body?.({ message }) ?? h(
|
|
472
|
+
}) : slots.body?.({ message }) ?? h(Markdown_default, {
|
|
456
473
|
components: bodyComponents,
|
|
457
474
|
"data-slot": "comment-reply-body",
|
|
458
475
|
plugins: bodyPlugins.value,
|
|
459
476
|
value: message.body
|
|
460
477
|
}),
|
|
461
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 })),
|
|
462
480
|
!editing.value && message.delivery ? statusOf(message, message.delivery) : null,
|
|
463
481
|
confirming.value ? h("div", {
|
|
464
482
|
"aria-label": "Confirm delete",
|
|
@@ -504,10 +522,10 @@ const CommentReply = defineComponent({
|
|
|
504
522
|
}
|
|
505
523
|
});
|
|
506
524
|
/** "Resolved by Ana", or "Resolved by Claude (Ana)" when her agent did, as a line across the thread. */
|
|
507
|
-
const resolvedMarker = (thread) => h(
|
|
525
|
+
const resolvedMarker = (thread) => h(Marker_default, {
|
|
508
526
|
key: "resolved",
|
|
509
527
|
variant: "separator"
|
|
510
|
-
}, () => h(
|
|
528
|
+
}, () => h(MarkerContent_default, () => `Resolved${thread.resolvedBy ? ` by ${writerName({
|
|
511
529
|
author: thread.resolvedBy,
|
|
512
530
|
...thread.resolvedActor ? { actor: thread.resolvedActor } : {}
|
|
513
531
|
})}` : ""}`));
|
|
@@ -597,7 +615,7 @@ const CommentThread = defineComponent({
|
|
|
597
615
|
const sending = ref(false);
|
|
598
616
|
const failure = ref();
|
|
599
617
|
const composer = ref(null);
|
|
600
|
-
const portals = /* @__PURE__ */ new Set();
|
|
618
|
+
const portals = inject(commentThreadPortals, void 0) ?? /* @__PURE__ */ new Set();
|
|
601
619
|
provide(commentThreadPortals, portals);
|
|
602
620
|
const user = computed(() => props.user ?? comments?.user.value);
|
|
603
621
|
const users = computed(() => props.users ?? (comments ? (query) => comments.users(query, props.thread.id) : void 0));
|
|
@@ -666,6 +684,7 @@ const CommentThread = defineComponent({
|
|
|
666
684
|
const replySlots = () => ({
|
|
667
685
|
...slots.body ? { body: slots.body } : {},
|
|
668
686
|
...slots.attachments ? { attachments: slots.attachments } : {},
|
|
687
|
+
...slots.footer ? { footer: slots.footer } : {},
|
|
669
688
|
...slots.status ? { status: slots.status } : {},
|
|
670
689
|
...slots["mention-item"] ? { "mention-item": slots["mention-item"] } : {},
|
|
671
690
|
...slots["mention-empty"] ? { "mention-empty": slots["mention-empty"] } : {}
|
|
@@ -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,7 +740,7 @@ 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, {
|
|
@@ -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,8 +1,7 @@
|
|
|
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
6
|
declare const repliedSinceResolved: (thread: Pick<CommentThread, "status" | "resolvedAt" | "messages">) => boolean;
|
|
8
7
|
type Done = Promise<unknown> | void;
|
|
@@ -18,7 +17,7 @@ interface CommentAttachmentLink {
|
|
|
18
17
|
* key as a file without a link. An image shows as a thumbnail that opens full size.
|
|
19
18
|
*/
|
|
20
19
|
type CommentAttachmentUrl = (key: string) => string | CommentAttachmentLink | undefined;
|
|
21
|
-
/** The scope of the `body` and `
|
|
20
|
+
/** The scope of the `body`, `attachments`, and `footer` slots of `CommentReply`. */
|
|
22
21
|
interface CommentReplySlotScope {
|
|
23
22
|
message: CommentMessage;
|
|
24
23
|
}
|
|
@@ -39,6 +38,8 @@ type CommentReplySlots = {
|
|
|
39
38
|
body?: (scope: CommentReplySlotScope) => VNode[];
|
|
40
39
|
/** The attachments of the message. Replaces the default thumbnails. */
|
|
41
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[];
|
|
42
43
|
/**
|
|
43
44
|
* Below a message that has not reached the server, such as "Waiting to send" or a refusal with Retry and Discard.
|
|
44
45
|
* Nothing shows without it. The message also gets `data-pending` or `data-failed`.
|
|
@@ -168,11 +169,11 @@ declare const CommentReply: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
168
169
|
type: PropType<(messageId: string) => Done>;
|
|
169
170
|
};
|
|
170
171
|
}>> & Readonly<{}>, {
|
|
171
|
-
size: CommentComposerSize;
|
|
172
|
-
compact: boolean;
|
|
173
172
|
people: CommentUser[];
|
|
173
|
+
size: CommentComposerSize;
|
|
174
174
|
editable: boolean;
|
|
175
175
|
deletable: boolean;
|
|
176
|
+
compact: boolean;
|
|
176
177
|
confirmDelete: boolean;
|
|
177
178
|
}, SlotsType<CommentReplySlots & Pick<CommentComposerSlots, "mention-item" | "mention-empty">>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
178
179
|
declare const CommentThread$1: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
@@ -364,14 +365,14 @@ declare const CommentThread$1: import("vue").DefineComponent<import("vue").Extra
|
|
|
364
365
|
}>> & Readonly<{
|
|
365
366
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
366
367
|
}>, {
|
|
367
|
-
|
|
368
|
+
readOnly: boolean;
|
|
369
|
+
people: CommentUser[];
|
|
368
370
|
preview: boolean;
|
|
369
371
|
busy: boolean;
|
|
370
|
-
people: CommentUser[];
|
|
371
|
-
attachments: boolean;
|
|
372
|
-
readOnly: boolean;
|
|
373
372
|
detached: boolean;
|
|
373
|
+
attachments: boolean;
|
|
374
374
|
navigation: "close" | "back";
|
|
375
375
|
dismissible: boolean;
|
|
376
|
+
size: CommentComposerSize;
|
|
376
377
|
}, SlotsType<CommentThreadSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
377
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 };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import "./comment-composer-CIsbz-78.js";
|
|
2
|
+
import "./comment-layer-BlVNORgj.js";
|
|
3
|
+
import "./comment-panel-Djx-KxVa.js";
|
|
4
|
+
import "./comment-thread-X6gYMNay.js";
|
|
5
|
+
import { _ as CommentToolbarSlots, g as CommentToolbarProps, h as CommentSendProps, i as CommentListSlots, o as CommentPinProps, r as CommentListProps, t as CommentFiltersProps } from "./types-BF_U0tgp.js";
|
|
6
|
+
import { t as AvatarStackPerson } from "./types-CTk3aNb5.js";
|
|
7
|
+
import "./comment-selection-bar-CbOEI98x.js";
|
|
8
|
+
import { Component } from "vue";
|
|
9
|
+
import { CommentThread } from "@vite-hub/comments/client";
|
|
10
|
+
declare const __VLS_export$4: import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<CommentFiltersProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<CommentFiltersProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>;
|
|
11
|
+
declare const _default$4: typeof __VLS_export$4;
|
|
12
|
+
type __VLS_Slots$1 = CommentListSlots;
|
|
13
|
+
declare const __VLS_base$1: import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<CommentListProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {
|
|
14
|
+
select: (event: {
|
|
15
|
+
thread: CommentThread;
|
|
16
|
+
}) => any;
|
|
17
|
+
}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<CommentListProps> & Readonly<{
|
|
18
|
+
onSelect?: ((event: {
|
|
19
|
+
thread: CommentThread;
|
|
20
|
+
}) => any) | undefined;
|
|
21
|
+
}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const __VLS_export$3: __VLS_WithSlots$1<typeof __VLS_base$1, __VLS_Slots$1>;
|
|
23
|
+
declare const _default$3: typeof __VLS_export$3;
|
|
24
|
+
type __VLS_WithSlots$1<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
declare const __VLS_export$2: import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<CommentPinProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {
|
|
30
|
+
select: () => any;
|
|
31
|
+
hover: () => any;
|
|
32
|
+
leave: () => any;
|
|
33
|
+
}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<CommentPinProps> & Readonly<{
|
|
34
|
+
onSelect?: (() => any) | undefined;
|
|
35
|
+
onHover?: (() => any) | undefined;
|
|
36
|
+
onLeave?: (() => any) | undefined;
|
|
37
|
+
}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>;
|
|
38
|
+
declare const _default$2: typeof __VLS_export$2;
|
|
39
|
+
declare const __VLS_export$1: import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<CommentSendProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<CommentSendProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>;
|
|
40
|
+
declare const _default$1: typeof __VLS_export$1;
|
|
41
|
+
type __VLS_Slots = CommentToolbarSlots;
|
|
42
|
+
declare const __VLS_base: import("vue", { with: { "resolution-mode": "import" } }).DefineComponent<CommentToolbarProps, {}, {}, {}, {}, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, import("vue", { with: { "resolution-mode": "import" } }).ComponentOptionsMixin, {}, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<CommentToolbarProps> & Readonly<{}>, {
|
|
43
|
+
people: AvatarStackPerson[];
|
|
44
|
+
}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>;
|
|
45
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
46
|
+
declare const _default: typeof __VLS_export;
|
|
47
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
48
|
+
new (): {
|
|
49
|
+
$slots: S;
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
export { _default$4 as a, _default$3 as i, _default$1 as n, _default$2 as r, _default as t };
|