@vite-hub/ui 0.7.0 → 0.9.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 +68 -52
- package/dist/{Chat-BZxkf3Tt.js → Chat-DYQitDw8.js} +1 -1
- package/dist/{ChatMessage-Blr5F-zi.js → ChatMessage-DzjHnxMT.js} +1 -1
- package/dist/{CodeBlockTitle-DYrYpc1U.js → CodeBlockTitle-DX13mCTi.js} +1 -1
- package/dist/{CommentRow-ViZ7r8nr.js → CommentRow-DLW77qch.js} +2 -2
- package/dist/CopyButton-D-g6PWc8.js +188 -0
- package/dist/{Markdown-_w7feFzl.js → Markdown-3-Tvy5Kl.js} +1 -1
- package/dist/{MarkdownCodeBlock-B4j7x0H6.js → MarkdownCodeBlock-CALGW0iw.js} +1 -1
- package/dist/{MessageParts-FVyYZNsn.js → MessageParts-BGSctG7Z.js} +1 -1
- package/dist/{MorphText-CYTndbyp.js → MorphText-DAHAswWX.js} +1 -1
- package/dist/{RollNumber-Bo2tzfAp.js → RollNumber-CkdLiy2i.js} +1 -1
- package/dist/{motion-dPwxx3Wk.js → SwapIcon-Bjkk7WlZ.js} +2 -11
- package/dist/{agent-session-DhlTKCQG.js → agent-session-D291hyRk.js} +1 -1
- package/dist/{avatar-stack-nQErr0qn.js → avatar-stack-Bi4CJPuU.js} +1 -1
- package/dist/{chat-session-hjZRL6jY.js → chat-session-Bl-x4c9b.js} +1 -1
- package/dist/{comment-composer-BUt6vbnr.js → comment-composer-BtYrIT5W.js} +14 -19
- package/dist/{comment-composer-CIsbz-78.d.ts → comment-composer-PmERtNNb.d.ts} +3 -3
- package/dist/{comment-layer-BlVNORgj.d.ts → comment-layer-BgQz1ixK.d.ts} +3 -3
- package/dist/{comment-layer-Ck2H24oJ.js → comment-layer-T8hN_7bN.js} +11 -12
- package/dist/{comment-panel-Djx-KxVa.d.ts → comment-panel-Vo3m6rHB.d.ts} +2 -2
- package/dist/{comment-selection-bar-CxPkJxVl.js → comment-selection-bar-BMFTtI3V.js} +2 -4
- package/dist/{comment-selection-bar-CbOEI98x.d.ts → comment-selection-bar-B_bchB2O.d.ts} +1 -1
- package/dist/{comment-thread-C_Q4UDaV.js → comment-thread-CAexk1r7.js} +78 -38
- package/dist/{comment-thread-X6gYMNay.d.ts → comment-thread-Cp9k80uv.d.ts} +50 -2
- package/dist/{comments-B1itauwb.d.ts → comments-BBNiQTxK.d.ts} +12 -14
- package/dist/{components-CM5mZe0a.js → components-D44u1fsy.js} +22 -47
- package/dist/{config-CFwvNt4Y.js → config-7CiYbXk6.js} +9 -6
- package/dist/{config-JmsTI7gs.d.ts → config-BYLPA0Ts.d.ts} +8 -6
- package/dist/{drop-field-DKpYQ3tO.js → drop-field-BkoJOWR9.js} +1 -1
- package/dist/{editor-DJPUs1nt.js → editor-CE_q2Yzb.js} +89 -49
- package/dist/{editor-BsOTjnnN.d.ts → editor-DZxaa6vs.d.ts} +8 -7
- package/dist/editor.d.ts +2 -2
- package/dist/editor.js +2 -2
- package/dist/{hold-to-delete-cOPqQ9FJ.js → hold-to-delete-pyrlKzk0.js} +1 -1
- package/dist/{hold-to-delete-CcQbfiQx.js → hold-to-delete-sscThmPW.js} +30 -3
- package/dist/icon-component-ofUeRW4L.js +4 -0
- package/dist/{index-9Z6Gwtnf.d.ts → index-BlQsW8ZZ.d.ts} +1 -1
- package/dist/index.d.ts +32 -39
- package/dist/index.js +25 -26
- package/dist/{markdown-DDyOdYq_.js → markdown-CqVyNG-h.js} +2 -2
- package/dist/markdown-editor.d.ts +1 -1
- package/dist/markdown-editor.js +4 -4
- package/dist/markdown.js +1 -1
- package/dist/motion/core.d.ts +1 -1
- package/dist/motion/core.js +4 -4
- package/dist/{motion-itHFtXwA.js → motion-C8P5yWaA.js} +1 -1
- package/dist/{motion-core-BfIefToe.d.ts → motion-core-BEwxN7Il.d.ts} +4 -2
- package/dist/{motion-core-BdTfxAhY.js → motion-core-pkL0M4Y1.js} +57 -115
- package/dist/{motion-list-BBbz93WT.js → motion-list-DDVUyVYa.js} +1 -1
- package/dist/motion.d.ts +1 -1
- package/dist/motion.js +5 -5
- package/dist/nuxt.d.ts +2 -4
- package/dist/nuxt.js +1 -34
- package/dist/parts/components/agent-session.js +1 -1
- package/dist/parts/components/avatar-stack.js +1 -1
- package/dist/parts/components/chat-message.js +1 -1
- package/dist/parts/components/chat-session.js +1 -1
- package/dist/parts/components/chat.js +1 -1
- package/dist/parts/components/code-block.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 -1
- package/dist/parts/components/comment-panel.d.ts +1 -1
- package/dist/parts/components/comment-panel.js +6 -7
- package/dist/parts/components/comment-selection-bar.d.ts +1 -1
- package/dist/parts/components/comment-selection-bar.js +1 -1
- package/dist/parts/components/comment-thread.d.ts +1 -1
- package/dist/parts/components/comment-thread.js +1 -1
- package/dist/parts/components/comments.d.ts +8 -8
- package/dist/parts/components/comments.js +5 -6
- package/dist/parts/components/copy-button.js +1 -3
- package/dist/parts/components/drop-field.js +1 -1
- package/dist/parts/components/hold-to-delete.js +1 -1
- package/dist/parts/components/markdown.js +1 -1
- package/dist/parts/components/message-parts.js +1 -1
- package/dist/parts/components/motion-list.d.ts +1 -1
- package/dist/parts/components/motion-list.js +1 -1
- package/dist/parts/components/motion.d.ts +2 -2
- package/dist/parts/components/motion.js +12 -3
- package/dist/parts/components/progress.js +1 -1
- package/dist/parts/components/prompt-input.d.ts +1 -1
- package/dist/parts/components/sync-status.js +1 -1
- package/dist/parts/playground/share.js +0 -1
- package/dist/parts/workspace/browser-support-notice.d.ts +1 -1
- package/dist/parts/workspace/browser-support-notice.js +4 -4
- package/dist/parts/workspace/codemirror.js +0 -4
- package/dist/parts/workspace/connect-panel.js +2 -3
- package/dist/parts/workspace/file-icons.js +0 -8
- 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 +2 -3
- package/dist/parts/workspace/workspace-boot-status.js +1 -1
- package/dist/parts/workspace/workspace-editor-head.js +2 -3
- package/dist/parts/workspace/workspace-examples.js +4 -5
- package/dist/parts/workspace/workspace-file-tree.d.ts +1 -1
- package/dist/parts/workspace/workspace-guide.js +3 -4
- package/dist/parts/workspace/workspace-preview.d.ts +1 -1
- package/dist/parts/workspace/workspace-preview.js +2 -4
- package/dist/parts/workspace/workspace-shell.d.ts +1 -1
- package/dist/parts/workspace/workspace-shell.js +2 -7
- package/dist/parts/workspace/workspace-sidebar.d.ts +1 -1
- package/dist/parts/workspace/workspace-sidebar.js +5 -6
- package/dist/parts/workspace/workspace-start.js +2 -3
- package/dist/parts/workspace/workspace-steps.js +6 -7
- package/dist/parts/workspace/workspace-terminal.js +0 -6
- package/dist/parts/workspace/workspace.d.ts +3 -3
- package/dist/parts/workspace/workspace.js +15 -18
- package/dist/{progress-D_9sG648.js → progress-D7CyDkLW.js} +1 -1
- package/dist/{prompt-input-j4OFTF5p.d.ts → prompt-input-DZM3E6WP.d.ts} +2 -2
- package/dist/{ring-DoL9jivj.js → ring-C5lNUEAG.js} +1 -1
- package/dist/runtime/nuxt-plugin.js +27 -1
- package/dist/{stand-ins-CuKM1UH1.js → stand-ins-C2oSoNwV.js} +29 -84
- package/dist/styles.css +37 -21
- package/dist/{sync-status-BRroyOre.js → sync-status-D27Qt7mk.js} +1 -1
- package/dist/theme-focus-ring.css +1 -1
- package/dist/{tween-lVMRCUEv.js → tween-DGAmrS3r.js} +4 -2
- package/dist/{types-BF_U0tgp.d.ts → types-CMU8Vmew.d.ts} +2 -5
- package/dist/{vue-DdYvDVOr.js → vue-D70TZJhJ.js} +1 -1
- package/dist/{workspace-boot-status-CyGlJS06.js → workspace-boot-status-BDkpubHd.js} +0 -1
- package/dist/{workspace-shell-B4A7CINd.d.ts → workspace-shell-CwEQT_1s.d.ts} +1 -1
- package/dist/workspace.d.ts +1 -1
- package/dist/workspace.js +1 -1
- package/package.json +10 -18
- package/dist/CopyButton-Dtg_Oc9_.js +0 -115
- package/dist/announce-CJNXaYbT.js +0 -29
- package/dist/comment-send.css +0 -267
- package/dist/comments-BtD28xEn.js +0 -390
- package/dist/nuxt-ui-CPdiTwwD.js +0 -22
- package/dist/theme.css +0 -379
- package/dist/theme.d.ts +0 -410
- package/dist/theme.js +0 -290
- package/dist/ui-components-CKQAPI-W.js +0 -7
- package/dist/use-copy-DK1SSZkh.js +0 -66
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { c as shakeEventName, i as consumedPointerEvents, l as swallowNextClick, n as injectComments, o as pathOf, u as useDocumentPointerDown } from "./comments-context-3js2YFl2.js";
|
|
2
|
-
import { a as shake, i as travel, r as createMotionList } from "./motion-core-
|
|
2
|
+
import { a as shake, i as travel, r as createMotionList } from "./motion-core-pkL0M4Y1.js";
|
|
3
3
|
import { n as matchesAccept } from "./files-cuVXzWlx.js";
|
|
4
|
-
import { t as RollNumber_default } from "./RollNumber-
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { t as RollNumber_default } from "./RollNumber-CkdLiy2i.js";
|
|
5
|
+
import { r as useViteHubUIIcons } from "./config-7CiYbXk6.js";
|
|
6
|
+
import { r as ViteHubModal } from "./components-D44u1fsy.js";
|
|
7
|
+
import { n as ViteHubButton, r as ViteHubIcon } from "./stand-ins-C2oSoNwV.js";
|
|
7
8
|
import { a as AttachmentActions_default, i as AttachmentContent_default, n as AttachmentMedia_default, o as AttachmentAction_default, r as AttachmentGroup_default, s as Attachment_default, t as AttachmentTitle_default } from "./AttachmentTitle-BWw0ck0T.js";
|
|
8
|
-
import { t as AvatarStack_default } from "./avatar-stack-
|
|
9
|
+
import { t as AvatarStack_default } from "./avatar-stack-Bi4CJPuU.js";
|
|
9
10
|
import { i as PromptInputSubmit_default, n as PromptInputToolbar_default, o as PromptInputAttach_default, r as PromptInputTextarea_default, t as PromptInput_default } from "./prompt-input-CRXEJBAK.js";
|
|
10
11
|
import { computed, defineComponent, h, nextTick, onBeforeUnmount, onBeforeUpdate, onMounted, onUpdated, ref, useId, watch } from "vue";
|
|
11
12
|
import { foldName } from "@vite-hub/comments/client";
|
|
@@ -40,7 +41,6 @@ function excerpt(body, length = 60) {
|
|
|
40
41
|
// src/internal/comment-mentions.ts
|
|
41
42
|
/** The tag of a mention chip in a rendered message. */
|
|
42
43
|
const mentionTag = "comment-mention";
|
|
43
|
-
/** A character that may stand before the `@` of a mention: the start of the text, a space, or an opening mark. */
|
|
44
44
|
const mentionLead = /[\s([{"'“]/u;
|
|
45
45
|
/** The `@…` at the caret: where its `@` sits and the words after it. Names have spaces, so the query may too. */
|
|
46
46
|
function mentionQuery(text, caret) {
|
|
@@ -145,15 +145,13 @@ const ImagePreview = defineComponent({
|
|
|
145
145
|
setup(props) {
|
|
146
146
|
const failed = ref(false);
|
|
147
147
|
const label = computed(() => props.alt || props.title || "Image");
|
|
148
|
-
const UModal = useUIComponent("UModal");
|
|
149
|
-
const UButton = useUIComponent("UButton");
|
|
150
148
|
const icons = useViteHubUIIcons();
|
|
151
149
|
watch(() => props.src, () => {
|
|
152
150
|
failed.value = false;
|
|
153
151
|
});
|
|
154
152
|
return () => {
|
|
155
153
|
if (!isImageUrl(props.src)) return h("span", { class: "vh-image-unavailable" }, label.value);
|
|
156
|
-
return h(
|
|
154
|
+
return h(ViteHubModal, {
|
|
157
155
|
title: label.value,
|
|
158
156
|
transition: false,
|
|
159
157
|
ui: {
|
|
@@ -179,7 +177,7 @@ const ImagePreview = defineComponent({
|
|
|
179
177
|
class: "vh-image-dialog__name",
|
|
180
178
|
title: label.value
|
|
181
179
|
}, label.value),
|
|
182
|
-
h(
|
|
180
|
+
h(ViteHubButton, {
|
|
183
181
|
"aria-label": "Open original image",
|
|
184
182
|
class: "vh-image-dialog__action",
|
|
185
183
|
color: "neutral",
|
|
@@ -190,7 +188,7 @@ const ImagePreview = defineComponent({
|
|
|
190
188
|
rel: "noreferrer",
|
|
191
189
|
variant: "ghost"
|
|
192
190
|
}),
|
|
193
|
-
h(
|
|
191
|
+
h(ViteHubButton, {
|
|
194
192
|
"aria-label": "Close image preview",
|
|
195
193
|
class: "vh-image-dialog__action",
|
|
196
194
|
color: "neutral",
|
|
@@ -239,7 +237,6 @@ const CommentImageStack = defineComponent({
|
|
|
239
237
|
emits: ["remove"],
|
|
240
238
|
setup(props, { emit }) {
|
|
241
239
|
const icons = useViteHubUIIcons();
|
|
242
|
-
const UButton = useUIComponent("UButton");
|
|
243
240
|
const root = ref();
|
|
244
241
|
const cards = ref();
|
|
245
242
|
const fanned = ref(false);
|
|
@@ -333,7 +330,7 @@ const CommentImageStack = defineComponent({
|
|
|
333
330
|
closeSoon();
|
|
334
331
|
},
|
|
335
332
|
onKeydown: (event) => {
|
|
336
|
-
if (event.key !== "Escape" || !fanned.value) return;
|
|
333
|
+
if (event.key !== "Escape" || event.defaultPrevented || !fanned.value) return;
|
|
337
334
|
event.preventDefault();
|
|
338
335
|
event.stopPropagation();
|
|
339
336
|
setFanned(false);
|
|
@@ -382,7 +379,7 @@ const CommentImageStack = defineComponent({
|
|
|
382
379
|
alt: image.name,
|
|
383
380
|
compact: true,
|
|
384
381
|
src: image.url
|
|
385
|
-
}), h(
|
|
382
|
+
}), h(ViteHubButton, {
|
|
386
383
|
"aria-label": `Remove ${image.name}`,
|
|
387
384
|
color: "neutral",
|
|
388
385
|
"data-slot": "comment-image-stack-remove",
|
|
@@ -409,7 +406,6 @@ const placeholders = {
|
|
|
409
406
|
edit: "Edit your comment",
|
|
410
407
|
reply: "Reply"
|
|
411
408
|
};
|
|
412
|
-
/** The name of the send button. A comment on a page is sent as a comment, and an answer in a thread as a reply. */
|
|
413
409
|
const sendLabels = {
|
|
414
410
|
comment: "Comment",
|
|
415
411
|
edit: "Save",
|
|
@@ -817,7 +813,6 @@ const CommentComposer = defineComponent({
|
|
|
817
813
|
origin = void 0;
|
|
818
814
|
return from;
|
|
819
815
|
};
|
|
820
|
-
const UIcon = useUIComponent("UIcon");
|
|
821
816
|
const icons = useViteHubUIIcons();
|
|
822
817
|
const removeFile = (index) => {
|
|
823
818
|
const part = fileParts.value[index];
|
|
@@ -846,13 +841,13 @@ const CommentComposer = defineComponent({
|
|
|
846
841
|
key: file.url,
|
|
847
842
|
size: "xs"
|
|
848
843
|
}, () => [
|
|
849
|
-
h(AttachmentMedia_default, { kind: "icon" }, () => h(
|
|
844
|
+
h(AttachmentMedia_default, { kind: "icon" }, () => h(ViteHubIcon, { name: icons.value.file })),
|
|
850
845
|
h(AttachmentContent_default, () => h(AttachmentTitle_default, () => file.filename ?? file.mediaType)),
|
|
851
846
|
h(AttachmentActions_default, () => h(AttachmentAction_default, {
|
|
852
847
|
disabled: props.busy,
|
|
853
848
|
label: `Remove ${file.filename ?? "attachment"}`,
|
|
854
849
|
onClick: () => remove(index)
|
|
855
|
-
}, () => h(
|
|
850
|
+
}, () => h(ViteHubIcon, { name: icons.value.close })))
|
|
856
851
|
]))) : null];
|
|
857
852
|
};
|
|
858
853
|
return () => h("div", {
|
|
@@ -924,7 +919,7 @@ const CommentComposer = defineComponent({
|
|
|
924
919
|
h(PromptInputToolbar_default, () => [attachmentsOn.value ? h(PromptInputAttach_default, {
|
|
925
920
|
disabled: props.busy,
|
|
926
921
|
variant: props.layout === "row" ? "ghost" : "outline"
|
|
927
|
-
}, () => h(
|
|
922
|
+
}, () => h(ViteHubIcon, { name: icons.value.plus })) : null, h(PromptInputSubmit_default, null, () => h(ViteHubIcon, { name: icons.value.arrowUp }))])
|
|
928
923
|
]),
|
|
929
924
|
menu.value && menu.value.items.length === 0 ? h("div", {
|
|
930
925
|
"data-slot": "comment-composer-mentions",
|
|
@@ -124,7 +124,7 @@ declare const CommentComposer: import("vue").DefineComponent<import("vue").Extra
|
|
|
124
124
|
};
|
|
125
125
|
}>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
126
126
|
[key: string]: any;
|
|
127
|
-
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancel" | "submit" | "update:
|
|
127
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancel" | "submit" | "update:mentions" | "update:files" | "update:modelValue")[], "cancel" | "submit" | "update:mentions" | "update:files" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
128
128
|
modelValue: {
|
|
129
129
|
default: string;
|
|
130
130
|
type: StringConstructor;
|
|
@@ -220,9 +220,9 @@ declare const CommentComposer: import("vue").DefineComponent<import("vue").Extra
|
|
|
220
220
|
}>> & Readonly<{
|
|
221
221
|
onCancel?: ((...args: any[]) => any) | undefined;
|
|
222
222
|
onSubmit?: ((...args: any[]) => any) | undefined;
|
|
223
|
-
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
224
223
|
"onUpdate:mentions"?: ((...args: any[]) => any) | undefined;
|
|
225
224
|
"onUpdate:files"?: ((...args: any[]) => any) | undefined;
|
|
225
|
+
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
226
226
|
}>, {
|
|
227
227
|
variant: CommentComposerVariant;
|
|
228
228
|
allowEmpty: boolean;
|
|
@@ -230,8 +230,8 @@ declare const CommentComposer: import("vue").DefineComponent<import("vue").Extra
|
|
|
230
230
|
busy: boolean;
|
|
231
231
|
attachments: boolean;
|
|
232
232
|
size: CommentComposerSize;
|
|
233
|
-
modelValue: string;
|
|
234
233
|
mentions: string[];
|
|
234
|
+
modelValue: string;
|
|
235
235
|
autofocus: boolean;
|
|
236
236
|
guard: boolean;
|
|
237
237
|
participants: string[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { s as CommentsState, t as CommentCan } from "./comments-ZfV6IZs8.js";
|
|
2
2
|
import { t as AvatarStackPerson } from "./types-CTk3aNb5.js";
|
|
3
|
-
import { r as CommentComposerSize } from "./comment-composer-
|
|
4
|
-
import { o as CommentUpload } from "./comment-panel-
|
|
5
|
-
import { n as CommentAttachmentUrl } from "./comment-thread-
|
|
3
|
+
import { r as CommentComposerSize } from "./comment-composer-PmERtNNb.js";
|
|
4
|
+
import { o as CommentUpload } from "./comment-panel-Vo3m6rHB.js";
|
|
5
|
+
import { n as CommentAttachmentUrl } from "./comment-thread-Cp9k80uv.js";
|
|
6
6
|
import { PropType } from "vue";
|
|
7
7
|
import { CommentSubject, CommentUser, CommentsClient } from "@vite-hub/comments/client";
|
|
8
8
|
/** Where a thread opens: in a card beside its pin, or in a column of cards on the right edge of the screen. */
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { a as useCommentsContext, i as useComments, n as draftPositionKey, o as commentThreadKey, r as provideComments } from "./comments-BaSrroRV.js";
|
|
2
2
|
import { t as uiErrorDiagnostics } from "./error-diagnostics-BlgA9rI2.js";
|
|
3
|
-
import { n as rowSlotScope, r as useCommentAttachments, t as CommentRow_default } from "./CommentRow-
|
|
3
|
+
import { n as rowSlotScope, r as useCommentAttachments, t as CommentRow_default } from "./CommentRow-DLW77qch.js";
|
|
4
4
|
import { a as hasDirtyComposer, i as consumedPointerEvents, l as swallowNextClick, o as pathOf, r as commentThreadPortals, s as shakeDirtyComposers, u as useDocumentPointerDown } from "./comments-context-3js2YFl2.js";
|
|
5
|
-
import { t as AvatarStack_default } from "./avatar-stack-
|
|
6
|
-
import {
|
|
7
|
-
import { b as morphText, r as createMotionList } from "./motion-core-
|
|
8
|
-
import { a as excerpt, i as displayName, l as writerPerson, s as toPerson, t as CommentComposer } from "./comment-composer-
|
|
9
|
-
import {
|
|
10
|
-
import { i as deliveryAttributes, n as CommentThread, r as commentTitle } from "./comment-thread-
|
|
11
|
-
import { t as MotionList_default } from "./motion-list-
|
|
12
|
-
import { t as RollNumber_default } from "./RollNumber-
|
|
5
|
+
import { t as AvatarStack_default } from "./avatar-stack-Bi4CJPuU.js";
|
|
6
|
+
import { r as useViteHubUIIcons } from "./config-7CiYbXk6.js";
|
|
7
|
+
import { b as morphText, r as createMotionList } from "./motion-core-pkL0M4Y1.js";
|
|
8
|
+
import { a as excerpt, i as displayName, l as writerPerson, s as toPerson, t as CommentComposer } from "./comment-composer-BtYrIT5W.js";
|
|
9
|
+
import { r as ViteHubIcon } from "./stand-ins-C2oSoNwV.js";
|
|
10
|
+
import { i as deliveryAttributes, n as CommentThread, r as commentTitle } from "./comment-thread-CAexk1r7.js";
|
|
11
|
+
import { t as MotionList_default } from "./motion-list-DDVUyVYa.js";
|
|
12
|
+
import { t as RollNumber_default } from "./RollNumber-CkdLiy2i.js";
|
|
13
13
|
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, h, mergeProps, nextTick, onBeforeUnmount, onMounted, onUpdated, openBlock, provide, reactive, ref, renderList, renderSlot, resolveDynamicComponent, shallowRef, toDisplayString, unref, watch, withCtx } from "vue";
|
|
14
14
|
import { List, MessageCircle, SquarePen } from "@lucide/vue";
|
|
15
15
|
// src/internal/comment-page-island.ts
|
|
@@ -44,7 +44,6 @@ const CommentPageIsland = defineComponent({
|
|
|
44
44
|
},
|
|
45
45
|
slots: Object,
|
|
46
46
|
setup(props, { slots }) {
|
|
47
|
-
const UIcon = useUIComponent("UIcon");
|
|
48
47
|
const icons = useViteHubUIIcons();
|
|
49
48
|
const state = props.comments;
|
|
50
49
|
const root = ref();
|
|
@@ -210,7 +209,7 @@ const CommentPageIsland = defineComponent({
|
|
|
210
209
|
max: null,
|
|
211
210
|
people: people(),
|
|
212
211
|
size: "sm"
|
|
213
|
-
})) : h(
|
|
212
|
+
})) : h(ViteHubIcon, {
|
|
214
213
|
"aria-hidden": "true",
|
|
215
214
|
name: icons.value.commentPage
|
|
216
215
|
}), h("span", {
|
|
@@ -717,7 +716,7 @@ const CommentLayer = defineComponent({
|
|
|
717
716
|
nextTick(() => {
|
|
718
717
|
const pins = layer.value?.querySelectorAll("[data-slot='comment-pin']") ?? [];
|
|
719
718
|
restoring = true;
|
|
720
|
-
([...pins].find((pin) => pin.getAttribute("data-thread-id") === target) ?? layer.value?.querySelector("[data-slot='comment-toolbar-mode']"))?.focus();
|
|
719
|
+
([...pins].find((pin) => pin.getAttribute("data-thread-id") === target) ?? layer.value?.querySelector(":is([data-part='comment-toolbar-mode'], [data-slot='comment-toolbar-mode'])"))?.focus();
|
|
721
720
|
restoring = false;
|
|
722
721
|
});
|
|
723
722
|
}, { flush: "post" });
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { s as CommentsState, t as CommentCan } from "./comments-ZfV6IZs8.js";
|
|
2
|
-
import { u as CommentRowSlots } from "./types-
|
|
3
|
-
import { l as CommentThreadSlots, n as CommentAttachmentUrl } from "./comment-thread-
|
|
2
|
+
import { u as CommentRowSlots } from "./types-CMU8Vmew.js";
|
|
3
|
+
import { l as CommentThreadSlots, n as CommentAttachmentUrl } from "./comment-thread-Cp9k80uv.js";
|
|
4
4
|
import { PropType, SlotsType, VNode } from "vue";
|
|
5
5
|
import { CommentStatus, CommentSubject, CommentThread, CommentUser, CommentsClient } from "@vite-hub/comments/client";
|
|
6
6
|
type CommentPanelVariant = "docked" | "floating";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as ViteHubTooltip } from "./components-D44u1fsy.js";
|
|
2
2
|
import { Fragment, cloneVNode, computed, createBlock, createElementBlock, createElementVNode, createTextVNode, defineComponent, h, mergeProps, onErrorCaptured, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, withCtx, withModifiers } from "vue";
|
|
3
3
|
import { MessageCircle, Pencil } from "@lucide/vue";
|
|
4
4
|
// registry/comments/CommentSelectionBar.vue?vue&type=script&setup=true&lang.ts
|
|
@@ -45,7 +45,6 @@ var CommentSelectionBar_default = /* @__PURE__ */ defineComponent({
|
|
|
45
45
|
return (_ctx, _cache) => {
|
|
46
46
|
return openBlock(), createElementBlock("div", {
|
|
47
47
|
"data-slot": "comment-selection-bar",
|
|
48
|
-
"data-motion-appear": "",
|
|
49
48
|
"data-side": __props.side,
|
|
50
49
|
role: "group",
|
|
51
50
|
"aria-label": "Selected text",
|
|
@@ -90,7 +89,6 @@ const SelectionHint = defineComponent({
|
|
|
90
89
|
}
|
|
91
90
|
},
|
|
92
91
|
setup(props, { slots }) {
|
|
93
|
-
const Tooltip = useUIComponent("UTooltip");
|
|
94
92
|
const failed = ref(false);
|
|
95
93
|
let mounted = false;
|
|
96
94
|
onErrorCaptured(() => {
|
|
@@ -101,7 +99,7 @@ const SelectionHint = defineComponent({
|
|
|
101
99
|
return () => {
|
|
102
100
|
const title = `${props.hint} (${props.shortcut})`;
|
|
103
101
|
if (failed.value) return slots.default?.().map((node) => cloneVNode(node, { title }));
|
|
104
|
-
return h(
|
|
102
|
+
return h(ViteHubTooltip, {
|
|
105
103
|
content: {
|
|
106
104
|
side: props.side,
|
|
107
105
|
sideOffset: 8
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { m as CommentSelectionBarSlots, p as CommentSelectionBarSide } from "./types-
|
|
1
|
+
import { m as CommentSelectionBarSlots, p as CommentSelectionBarSide } from "./types-CMU8Vmew.js";
|
|
2
2
|
import { PropType, SlotsType } from "vue";
|
|
3
3
|
declare const CommentSelectionBar: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
4
4
|
side: {
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import { t as RollNumber_default } from "./RollNumber-
|
|
1
|
+
import { t as RollNumber_default } from "./RollNumber-CkdLiy2i.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 { c as writerName, i as displayName, l as writerPerson, n as mentionPlugin, r as mentionTag, t as CommentComposer } from "./comment-composer-
|
|
3
|
+
import { c as writerName, i as displayName, l as writerPerson, n as mentionPlugin, r as mentionTag, t as CommentComposer } from "./comment-composer-BtYrIT5W.js";
|
|
4
4
|
import { t as defaultCommentCan } from "./comments-BaSrroRV.js";
|
|
5
|
-
import {
|
|
6
|
-
import { i as travel } from "./motion-core-
|
|
7
|
-
import {
|
|
5
|
+
import { r as useViteHubUIIcons } from "./config-7CiYbXk6.js";
|
|
6
|
+
import { i as travel } from "./motion-core-pkL0M4Y1.js";
|
|
7
|
+
import { r as ViteHubModal } from "./components-D44u1fsy.js";
|
|
8
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-
|
|
10
|
-
import { t as Markdown_default } from "./Markdown-
|
|
9
|
+
import { t as AvatarStack_default } from "./avatar-stack-Bi4CJPuU.js";
|
|
10
|
+
import { t as Markdown_default } from "./Markdown-3-Tvy5Kl.js";
|
|
11
11
|
import { i as Marker_default, r as MarkerContent_default } from "./marker-DNL6QR3L.js";
|
|
12
|
-
import { t as MotionList_default } from "./motion-list-
|
|
12
|
+
import { t as MotionList_default } from "./motion-list-DDVUyVYa.js";
|
|
13
13
|
import { t as RelativeTime_default } from "./relative-time-BnJfjeEm.js";
|
|
14
|
-
import {
|
|
14
|
+
import { n as ViteHubButton, r as ViteHubIcon } from "./stand-ins-C2oSoNwV.js";
|
|
15
|
+
import { computed, defineComponent, h, inject, nextTick, onBeforeUnmount, provide, ref, shallowRef, watch } from "vue";
|
|
15
16
|
// registry/comments/status.ts
|
|
16
17
|
function messagesSinceResolved(thread) {
|
|
17
18
|
const { resolvedAt } = thread;
|
|
@@ -33,7 +34,6 @@ function deliveryAttributes(delivery) {
|
|
|
33
34
|
}
|
|
34
35
|
// src/internal/image-gallery.ts
|
|
35
36
|
const tileCount = 4;
|
|
36
|
-
/** The box of `width` by `height` that covers `box`, centered on it: the picture with the shape it has full size. */
|
|
37
37
|
function cover(box, width, height) {
|
|
38
38
|
if (!width || !height || !box.width || !box.height) return box;
|
|
39
39
|
const scale = Math.max(box.width / width, box.height / height);
|
|
@@ -59,8 +59,6 @@ const ImageGallery = defineComponent({
|
|
|
59
59
|
type: Array
|
|
60
60
|
} },
|
|
61
61
|
setup(props) {
|
|
62
|
-
const UModal = useUIComponent("UModal");
|
|
63
|
-
const UButton = useUIComponent("UButton");
|
|
64
62
|
const icons = useViteHubUIIcons();
|
|
65
63
|
const current = ref(null);
|
|
66
64
|
const closing = ref(false);
|
|
@@ -145,7 +143,7 @@ const ImageGallery = defineComponent({
|
|
|
145
143
|
}), index === 3 && count > tileCount ? h("span", {
|
|
146
144
|
"aria-hidden": "true",
|
|
147
145
|
"data-slot": "comment-reply-image-more"
|
|
148
|
-
}, `+${count - tileCount + 1}`) : null])), h(
|
|
146
|
+
}, `+${count - tileCount + 1}`) : null])), h(ViteHubModal, {
|
|
149
147
|
open: current.value !== null,
|
|
150
148
|
title: shown.value?.name ?? "Image",
|
|
151
149
|
transition: false,
|
|
@@ -173,7 +171,7 @@ const ImageGallery = defineComponent({
|
|
|
173
171
|
title: shown.value?.name
|
|
174
172
|
}, shown.value?.name),
|
|
175
173
|
many ? h("span", { class: "vh-image-gallery__count" }, [h(RollNumber_default, { value: (current.value ?? 0) + 1 }), ` of ${count}`]) : null,
|
|
176
|
-
h(
|
|
174
|
+
h(ViteHubButton, {
|
|
177
175
|
"aria-label": "Open original image",
|
|
178
176
|
class: "vh-image-dialog__action",
|
|
179
177
|
color: "neutral",
|
|
@@ -184,7 +182,7 @@ const ImageGallery = defineComponent({
|
|
|
184
182
|
to: shown.value?.src,
|
|
185
183
|
variant: "ghost"
|
|
186
184
|
}),
|
|
187
|
-
h(
|
|
185
|
+
h(ViteHubButton, {
|
|
188
186
|
"aria-label": "Close image preview",
|
|
189
187
|
class: "vh-image-dialog__action",
|
|
190
188
|
color: "neutral",
|
|
@@ -193,7 +191,7 @@ const ImageGallery = defineComponent({
|
|
|
193
191
|
variant: "ghost"
|
|
194
192
|
})
|
|
195
193
|
]), h("div", { class: "vh-image-gallery__stage" }, [
|
|
196
|
-
many ? h(
|
|
194
|
+
many ? h(ViteHubButton, {
|
|
197
195
|
"aria-label": "Previous picture",
|
|
198
196
|
class: "vh-image-gallery__step vh-image-gallery__step--previous rounded-full",
|
|
199
197
|
color: "neutral",
|
|
@@ -212,7 +210,7 @@ const ImageGallery = defineComponent({
|
|
|
212
210
|
ref: picture,
|
|
213
211
|
src: active?.src
|
|
214
212
|
}),
|
|
215
|
-
many ? h(
|
|
213
|
+
many ? h(ViteHubButton, {
|
|
216
214
|
"aria-label": "Next picture",
|
|
217
215
|
class: "vh-image-gallery__step vh-image-gallery__step--next rounded-full",
|
|
218
216
|
color: "neutral",
|
|
@@ -241,15 +239,24 @@ function reason(error) {
|
|
|
241
239
|
return error instanceof Error ? error.message : "That did not work. Try again.";
|
|
242
240
|
}
|
|
243
241
|
const fileName = (key) => key.split(/[/\\]/).at(-1) || key;
|
|
244
|
-
function
|
|
242
|
+
function linkHref(value, protocols) {
|
|
245
243
|
if (!value) return void 0;
|
|
246
244
|
try {
|
|
247
|
-
|
|
248
|
-
return protocol === "http:" || protocol === "https:" || protocol === "blob:" ? value : void 0;
|
|
245
|
+
return protocols.includes(new URL(value, "https://vitehub.invalid").protocol) ? value : void 0;
|
|
249
246
|
} catch {
|
|
250
247
|
return;
|
|
251
248
|
}
|
|
252
249
|
}
|
|
250
|
+
function viaOf({ actor }, compact) {
|
|
251
|
+
if (!actor?.via) return null;
|
|
252
|
+
const href = compact ? void 0 : linkHref(actor.url, ["http:", "https:"]);
|
|
253
|
+
const text = `via ${actor.via}`;
|
|
254
|
+
return h("span", { "data-slot": "comment-reply-via" }, href ? h("a", {
|
|
255
|
+
href,
|
|
256
|
+
rel: "noreferrer",
|
|
257
|
+
target: "_blank"
|
|
258
|
+
}, text) : text);
|
|
259
|
+
}
|
|
253
260
|
function attachmentList(message, url, icon, fileIcon) {
|
|
254
261
|
if (message.attachments.length === 0) return null;
|
|
255
262
|
const items = message.attachments.map((key) => {
|
|
@@ -257,7 +264,11 @@ function attachmentList(message, url, icon, fileIcon) {
|
|
|
257
264
|
const link = typeof found === "string" ? { url: found } : found;
|
|
258
265
|
const name = link?.name || fileName(key);
|
|
259
266
|
const extension = /\.([a-z0-9]+)$/i.exec(name)?.[1]?.toLowerCase();
|
|
260
|
-
const href =
|
|
267
|
+
const href = linkHref(link?.url, [
|
|
268
|
+
"http:",
|
|
269
|
+
"https:",
|
|
270
|
+
"blob:"
|
|
271
|
+
]);
|
|
261
272
|
return {
|
|
262
273
|
href,
|
|
263
274
|
image: href !== void 0 && (link?.type ? link.type.startsWith("image/") : extension === void 0 || imageExtensions.has(extension)),
|
|
@@ -329,8 +340,6 @@ const CommentReply = defineComponent({
|
|
|
329
340
|
},
|
|
330
341
|
slots: Object,
|
|
331
342
|
setup(props, { slots }) {
|
|
332
|
-
const UButton = useUIComponent("UButton");
|
|
333
|
-
const UIcon = useUIComponent("UIcon");
|
|
334
343
|
const icons = useViteHubUIIcons();
|
|
335
344
|
const comments = injectComments();
|
|
336
345
|
const editing = ref(false);
|
|
@@ -443,6 +452,7 @@ const CommentReply = defineComponent({
|
|
|
443
452
|
"data-agent": message.actor ? "true" : void 0,
|
|
444
453
|
"data-slot": "comment-reply-author"
|
|
445
454
|
}, writerName(message)),
|
|
455
|
+
viaOf(message, props.compact),
|
|
446
456
|
h(RelativeTime_default, {
|
|
447
457
|
at: message.createdAt,
|
|
448
458
|
"data-slot": "comment-reply-time"
|
|
@@ -475,7 +485,7 @@ const CommentReply = defineComponent({
|
|
|
475
485
|
plugins: bodyPlugins.value,
|
|
476
486
|
value: message.body
|
|
477
487
|
}),
|
|
478
|
-
editing.value || props.compact ? null : slots.attachments?.({ message }) ?? attachmentList(message, props.attachmentUrl,
|
|
488
|
+
editing.value || props.compact ? null : slots.attachments?.({ message }) ?? attachmentList(message, props.attachmentUrl, ViteHubIcon, icons.value.file),
|
|
479
489
|
editing.value || props.compact || !slots.footer ? null : h("div", { "data-slot": "comment-reply-footer" }, slots.footer({ message })),
|
|
480
490
|
!editing.value && message.delivery ? statusOf(message, message.delivery) : null,
|
|
481
491
|
confirming.value ? h("div", {
|
|
@@ -484,14 +494,14 @@ const CommentReply = defineComponent({
|
|
|
484
494
|
role: "group"
|
|
485
495
|
}, [
|
|
486
496
|
h("p", "Delete this comment and every reply to it?"),
|
|
487
|
-
h(
|
|
497
|
+
h(ViteHubButton, {
|
|
488
498
|
color: "error",
|
|
489
499
|
label: "Delete thread",
|
|
490
500
|
loading: busy.value,
|
|
491
501
|
onClick: remove,
|
|
492
502
|
size: "xs"
|
|
493
503
|
}),
|
|
494
|
-
h(
|
|
504
|
+
h(ViteHubButton, {
|
|
495
505
|
color: "neutral",
|
|
496
506
|
label: "Cancel",
|
|
497
507
|
onClick: () => confirming.value = false,
|
|
@@ -503,14 +513,14 @@ const CommentReply = defineComponent({
|
|
|
503
513
|
"data-slot": "comment-reply-error",
|
|
504
514
|
role: "alert"
|
|
505
515
|
}, error.value) : null
|
|
506
|
-
]), (canEdit() || canDelete()) && !editing.value && !confirming.value && !props.compact ? h("div", { "data-slot": "comment-reply-actions" }, [canEdit() ? h(
|
|
516
|
+
]), (canEdit() || canDelete()) && !editing.value && !confirming.value && !props.compact ? h("div", { "data-slot": "comment-reply-actions" }, [canEdit() ? h(ViteHubButton, {
|
|
507
517
|
"aria-label": "Edit",
|
|
508
518
|
color: "neutral",
|
|
509
519
|
icon: icons.value.edit,
|
|
510
520
|
onClick: startEdit,
|
|
511
521
|
size: "xs",
|
|
512
522
|
variant: "ghost"
|
|
513
|
-
}) : null, canDelete() ? h(
|
|
523
|
+
}) : null, canDelete() ? h(ViteHubButton, {
|
|
514
524
|
"aria-label": "Delete",
|
|
515
525
|
color: "neutral",
|
|
516
526
|
icon: icons.value.delete,
|
|
@@ -521,7 +531,6 @@ const CommentReply = defineComponent({
|
|
|
521
531
|
};
|
|
522
532
|
}
|
|
523
533
|
});
|
|
524
|
-
/** "Resolved by Ana", or "Resolved by Claude (Ana)" when her agent did, as a line across the thread. */
|
|
525
534
|
const resolvedMarker = (thread) => h(Marker_default, {
|
|
526
535
|
key: "resolved",
|
|
527
536
|
variant: "separator"
|
|
@@ -529,6 +538,16 @@ const resolvedMarker = (thread) => h(Marker_default, {
|
|
|
529
538
|
author: thread.resolvedBy,
|
|
530
539
|
...thread.resolvedActor ? { actor: thread.resolvedActor } : {}
|
|
531
540
|
})}` : ""}`));
|
|
541
|
+
function draftModel(bound, start, update) {
|
|
542
|
+
const local = shallowRef(start);
|
|
543
|
+
return computed({
|
|
544
|
+
get: () => bound() ?? local.value,
|
|
545
|
+
set: (value) => {
|
|
546
|
+
local.value = value;
|
|
547
|
+
update(value);
|
|
548
|
+
}
|
|
549
|
+
});
|
|
550
|
+
}
|
|
532
551
|
const CommentThread = defineComponent({
|
|
533
552
|
name: "CommentThread",
|
|
534
553
|
props: {
|
|
@@ -593,6 +612,21 @@ const CommentThread = defineComponent({
|
|
|
593
612
|
default: "md",
|
|
594
613
|
type: String
|
|
595
614
|
},
|
|
615
|
+
reply: { type: String },
|
|
616
|
+
defaultReply: {
|
|
617
|
+
default: "",
|
|
618
|
+
type: String
|
|
619
|
+
},
|
|
620
|
+
mentions: { type: Array },
|
|
621
|
+
defaultMentions: {
|
|
622
|
+
default: () => [],
|
|
623
|
+
type: Array
|
|
624
|
+
},
|
|
625
|
+
files: { type: Array },
|
|
626
|
+
defaultFiles: {
|
|
627
|
+
default: () => [],
|
|
628
|
+
type: Array
|
|
629
|
+
},
|
|
596
630
|
/** Sends a reply. Gets `(body, mentions, files)`. */
|
|
597
631
|
onReply: { type: Function },
|
|
598
632
|
/** Saves an edited message. Gets `(messageId, body, mentions)`. */
|
|
@@ -602,16 +636,20 @@ const CommentThread = defineComponent({
|
|
|
602
636
|
onResolve: { type: Function },
|
|
603
637
|
onReopen: { type: Function }
|
|
604
638
|
},
|
|
605
|
-
emits: [
|
|
639
|
+
emits: [
|
|
640
|
+
"close",
|
|
641
|
+
"update:reply",
|
|
642
|
+
"update:mentions",
|
|
643
|
+
"update:files"
|
|
644
|
+
],
|
|
606
645
|
slots: Object,
|
|
607
646
|
setup(props, { emit, expose, slots }) {
|
|
608
|
-
const UButton = useUIComponent("UButton");
|
|
609
647
|
const icons = useViteHubUIIcons();
|
|
610
648
|
const comments = injectComments();
|
|
611
649
|
const root = ref(null);
|
|
612
|
-
const reply =
|
|
613
|
-
const mentions =
|
|
614
|
-
const files =
|
|
650
|
+
const reply = draftModel(() => props.reply, props.defaultReply, (value) => emit("update:reply", value));
|
|
651
|
+
const mentions = draftModel(() => props.mentions, props.defaultMentions, (value) => emit("update:mentions", value));
|
|
652
|
+
const files = draftModel(() => props.files, props.defaultFiles, (value) => emit("update:files", value));
|
|
615
653
|
const sending = ref(false);
|
|
616
654
|
const failure = ref();
|
|
617
655
|
const composer = ref(null);
|
|
@@ -653,9 +691,11 @@ const CommentThread = defineComponent({
|
|
|
653
691
|
const submitted = reply.value;
|
|
654
692
|
const submittedMentions = mentions.value;
|
|
655
693
|
const submittedFiles = files.value;
|
|
694
|
+
const mentionSnapshot = [...submittedMentions];
|
|
695
|
+
const fileSnapshot = [...submittedFiles];
|
|
656
696
|
try {
|
|
657
697
|
await props.onReply(submit.body, [...submit.mentions], [...submit.files]);
|
|
658
|
-
if (reply.value === submitted && mentions.value === submittedMentions && files.value === submittedFiles) {
|
|
698
|
+
if (reply.value === submitted && mentions.value === submittedMentions && files.value === submittedFiles && submittedMentions.length === mentionSnapshot.length && mentionSnapshot.every((id, index) => id === submittedMentions[index]) && submittedFiles.length === fileSnapshot.length && fileSnapshot.every((file, index) => file === submittedFiles[index])) {
|
|
659
699
|
reply.value = "";
|
|
660
700
|
mentions.value = [];
|
|
661
701
|
files.value = [];
|
|
@@ -732,7 +772,7 @@ const CommentThread = defineComponent({
|
|
|
732
772
|
tabindex: -1
|
|
733
773
|
}, [
|
|
734
774
|
h("header", { "data-slot": "comment-thread-header" }, [
|
|
735
|
-
back ? h(
|
|
775
|
+
back ? h(ViteHubButton, {
|
|
736
776
|
"aria-label": "Back to comments",
|
|
737
777
|
color: "neutral",
|
|
738
778
|
icon: icons.value.arrowLeft,
|
|
@@ -743,7 +783,7 @@ const CommentThread = defineComponent({
|
|
|
743
783
|
h("span", { "data-slot": "comment-thread-title" }, commentHeading(thread)),
|
|
744
784
|
h("span", { "data-slot": "comment-thread-spacer" }),
|
|
745
785
|
slots.actions ? h("div", { "data-slot": "comment-thread-actions" }, slots.actions({ thread })) : null,
|
|
746
|
-
!allowed("resolve") ? null : h(
|
|
786
|
+
!allowed("resolve") ? null : h(ViteHubButton, {
|
|
747
787
|
"aria-label": resolved ? "Reopen" : "Resolve",
|
|
748
788
|
color: "neutral",
|
|
749
789
|
icon: resolved ? icons.value.reopen : icons.value.check,
|
|
@@ -751,7 +791,7 @@ const CommentThread = defineComponent({
|
|
|
751
791
|
size: "xs",
|
|
752
792
|
variant: "ghost"
|
|
753
793
|
}),
|
|
754
|
-
back ? null : h(
|
|
794
|
+
back ? null : h(ViteHubButton, {
|
|
755
795
|
"aria-label": "Close",
|
|
756
796
|
color: "neutral",
|
|
757
797
|
icon: icons.value.close,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as CommentCan } from "./comments-ZfV6IZs8.js";
|
|
2
|
-
import { i as CommentComposerSlots, r as CommentComposerSize } from "./comment-composer-
|
|
2
|
+
import { i as CommentComposerSlots, r as CommentComposerSize } from "./comment-composer-PmERtNNb.js";
|
|
3
3
|
import { PropType, SlotsType, VNode } from "vue";
|
|
4
4
|
import { CommentDelivery, CommentMessage, CommentThread, CommentUser } from "@vite-hub/comments/client";
|
|
5
5
|
declare function messagesSinceResolved(thread: Pick<CommentThread, "status" | "resolvedAt" | "messages">): CommentMessage[];
|
|
@@ -250,6 +250,27 @@ declare const CommentThread$1: import("vue").DefineComponent<import("vue").Extra
|
|
|
250
250
|
default: string;
|
|
251
251
|
type: PropType<CommentComposerSize>;
|
|
252
252
|
};
|
|
253
|
+
reply: {
|
|
254
|
+
type: StringConstructor;
|
|
255
|
+
};
|
|
256
|
+
defaultReply: {
|
|
257
|
+
default: string;
|
|
258
|
+
type: StringConstructor;
|
|
259
|
+
};
|
|
260
|
+
mentions: {
|
|
261
|
+
type: PropType<string[]>;
|
|
262
|
+
};
|
|
263
|
+
defaultMentions: {
|
|
264
|
+
default: () => never[];
|
|
265
|
+
type: PropType<string[]>;
|
|
266
|
+
};
|
|
267
|
+
files: {
|
|
268
|
+
type: PropType<File[]>;
|
|
269
|
+
};
|
|
270
|
+
defaultFiles: {
|
|
271
|
+
default: () => never[];
|
|
272
|
+
type: PropType<File[]>;
|
|
273
|
+
};
|
|
253
274
|
/** Sends a reply. Gets `(body, mentions, files)`. */
|
|
254
275
|
onReply: {
|
|
255
276
|
type: PropType<(body: string, mentions: string[], files: File[]) => Done>;
|
|
@@ -270,7 +291,7 @@ declare const CommentThread$1: import("vue").DefineComponent<import("vue").Extra
|
|
|
270
291
|
};
|
|
271
292
|
}>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
272
293
|
[key: string]: any;
|
|
273
|
-
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "close"[], "close", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
294
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "update:reply" | "update:mentions" | "update:files")[], "close" | "update:reply" | "update:mentions" | "update:files", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
274
295
|
thread: {
|
|
275
296
|
required: true;
|
|
276
297
|
type: PropType<CommentThread>;
|
|
@@ -344,6 +365,27 @@ declare const CommentThread$1: import("vue").DefineComponent<import("vue").Extra
|
|
|
344
365
|
default: string;
|
|
345
366
|
type: PropType<CommentComposerSize>;
|
|
346
367
|
};
|
|
368
|
+
reply: {
|
|
369
|
+
type: StringConstructor;
|
|
370
|
+
};
|
|
371
|
+
defaultReply: {
|
|
372
|
+
default: string;
|
|
373
|
+
type: StringConstructor;
|
|
374
|
+
};
|
|
375
|
+
mentions: {
|
|
376
|
+
type: PropType<string[]>;
|
|
377
|
+
};
|
|
378
|
+
defaultMentions: {
|
|
379
|
+
default: () => never[];
|
|
380
|
+
type: PropType<string[]>;
|
|
381
|
+
};
|
|
382
|
+
files: {
|
|
383
|
+
type: PropType<File[]>;
|
|
384
|
+
};
|
|
385
|
+
defaultFiles: {
|
|
386
|
+
default: () => never[];
|
|
387
|
+
type: PropType<File[]>;
|
|
388
|
+
};
|
|
347
389
|
/** Sends a reply. Gets `(body, mentions, files)`. */
|
|
348
390
|
onReply: {
|
|
349
391
|
type: PropType<(body: string, mentions: string[], files: File[]) => Done>;
|
|
@@ -364,6 +406,9 @@ declare const CommentThread$1: import("vue").DefineComponent<import("vue").Extra
|
|
|
364
406
|
};
|
|
365
407
|
}>> & Readonly<{
|
|
366
408
|
onClose?: ((...args: any[]) => any) | undefined;
|
|
409
|
+
"onUpdate:reply"?: ((...args: any[]) => any) | undefined;
|
|
410
|
+
"onUpdate:mentions"?: ((...args: any[]) => any) | undefined;
|
|
411
|
+
"onUpdate:files"?: ((...args: any[]) => any) | undefined;
|
|
367
412
|
}>, {
|
|
368
413
|
readOnly: boolean;
|
|
369
414
|
people: CommentUser[];
|
|
@@ -374,5 +419,8 @@ declare const CommentThread$1: import("vue").DefineComponent<import("vue").Extra
|
|
|
374
419
|
navigation: "close" | "back";
|
|
375
420
|
dismissible: boolean;
|
|
376
421
|
size: CommentComposerSize;
|
|
422
|
+
defaultReply: string;
|
|
423
|
+
defaultMentions: string[];
|
|
424
|
+
defaultFiles: File[];
|
|
377
425
|
}, SlotsType<CommentThreadSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
378
426
|
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 };
|