@vite-hub/ui 0.6.0 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/{colors-BghReA9C-DEq4bhEP.js → colors-BghReA9C-A4M9YE0s.js} +1 -1
- package/dist/{comment-attachments-CMpYOJod.js → comment-attachments-DAzUbRmJ.js} +4 -0
- package/dist/{comment-composer-BI6CNJyO.d.ts → comment-composer-DmDM3XYP.d.ts} +1 -1
- package/dist/{comment-composer-BP-CJx7f.js → comment-composer-X7vJKh5b.js} +4 -4
- package/dist/comment-layer-KnnVfdRV.d.ts +130 -0
- package/dist/{comment-list-BJdZu0DS.d.ts → comment-list-ncwaCSVX.d.ts} +2 -2
- package/dist/{comment-panel-DISGe7yM.d.ts → comment-panel-DoLDOw3E.d.ts} +2 -42
- package/dist/{comment-pin-C5UeLPTa.d.ts → comment-pin-hBJFiSYW.d.ts} +1 -1
- package/dist/{comment-send-CH46zawK.js → comment-send-CUkL3TbZ.js} +1 -1
- package/dist/comment-status-nsCdrRk_.js +20 -0
- package/dist/{comment-thread-DSkWODKG.d.ts → comment-thread-DPV2kqA4.d.ts} +4 -8
- package/dist/{comment-thread-5h93DXds.js → comment-thread-jqPx6aJ8.js} +9 -9
- package/dist/{comments-D9dONfs9.js → comments-9MDSNm-9.js} +33 -40
- package/dist/{comments-CnG_c-_c.d.ts → comments-OWjNidkP.d.ts} +6 -5
- package/dist/{comments-context-CrjhleVA.js → comments-context-3js2YFl2.js} +2 -2
- package/dist/{config-xL4EBeXw.d.ts → config-COSdO-ay.d.ts} +2 -1
- package/dist/{config-BDvnaVUn.js → config-LRonN53j.js} +9 -3
- package/dist/{draw-DzSmD7uo-Cb7s9kxJ.js → draw-DzSmD7uo-BvtKi0oE.js} +2 -2
- package/dist/{editor-BuByBIkJ.js → editor-Dmk3k6f6.js} +1 -1
- package/dist/{effects-DEoFFycD.js → effects-C1zYpSpg.js} +2 -2
- package/dist/{format-Bc9m7-r0.js → format-CPipR1FP.js} +4 -23
- package/dist/headless.d.ts +2 -2
- package/dist/headless.js +1 -1
- package/dist/{image-preview-EqfPcFZ9.js → image-preview-BKVUtfwQ.js} +1 -1
- package/dist/index.d.ts +11 -11
- package/dist/index.js +10 -9
- package/dist/{install-qNaj4OY4.js → install-C4LwcJda.js} +1 -1
- package/dist/{markdown-editor-3gY9MLvy.js → markdown-editor-D1irG9Xl.js} +45 -11
- package/dist/markdown-editor.js +1 -1
- package/dist/{markdown-renderer-BgsmNqv7.js → markdown-renderer-DMyYKeil.js} +13062 -12372
- package/dist/{message-scroller-a6qaYHno.d.ts → message-scroller-BZqS63IX.d.ts} +2 -2
- package/dist/motion/core.d.ts +1 -1
- package/dist/motion/core.js +4 -4
- package/dist/{motion-core-DNl7TR1T.d.ts → motion-core-Dh20n5Se.d.ts} +2 -1
- package/dist/motion.d.ts +1 -1
- package/dist/motion.js +5 -5
- package/dist/nuxt.d.ts +1 -1
- package/dist/parts/components/agent-session.d.ts +46 -3
- package/dist/parts/components/agent-session.js +27 -7
- package/dist/parts/components/avatar-stack.js +1 -1
- package/dist/parts/components/chat.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 +20 -31
- package/dist/parts/components/comment-list.d.ts +1 -1
- package/dist/parts/components/comment-list.js +3 -2
- package/dist/parts/components/comment-panel.d.ts +1 -1
- package/dist/parts/components/comment-panel.js +32 -29
- package/dist/parts/components/comment-pin.d.ts +1 -1
- package/dist/parts/components/comment-selection-bar.js +1 -1
- package/dist/parts/components/comment-send.js +1 -1
- package/dist/parts/components/comment-thread.d.ts +2 -2
- package/dist/parts/components/comment-thread.js +3 -3
- package/dist/parts/components/comments.d.ts +6 -6
- package/dist/parts/components/comments.js +4 -4
- package/dist/parts/components/copy-button.js +2 -2
- package/dist/parts/components/markdown-editor.js +1 -1
- package/dist/parts/components/markdown-renderer.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.js +2 -2
- package/dist/parts/components/prompt-input.d.ts +2 -2
- package/dist/parts/components/prompt-input.js +2 -2
- package/dist/parts/components/trace-run.js +1 -1
- 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 +1 -1
- package/dist/parts/workspace/browser-support-notice.d.ts +1 -1
- package/dist/parts/workspace/browser-support-notice.js +1 -1
- package/dist/parts/workspace/workspace-boot-status.js +1 -1
- package/dist/parts/workspace/workspace-sidebar.d.ts +1 -1
- package/dist/parts/workspace/workspace-sidebar.js +1 -1
- package/dist/parts/workspace/workspace.d.ts +1 -1
- package/dist/parts/workspace/workspace.js +1 -1
- package/dist/{ring-BN4d8vtw.js → ring-GaJsg32c.js} +63 -12
- package/dist/runtime/nuxt-plugin.js +1 -1
- package/dist/{sankey-CAYwt82B-BAAk7WkJ.js → sankey-CAYwt82B-e6k34wtW.js} +3 -3
- package/dist/styles.css +13 -0
- package/dist/{text-BWzZFnGY.js → text-gacox6bp.js} +1 -1
- package/dist/{travel-CwVhU_GS.js → travel-BliEidau.js} +1 -1
- package/dist/vue-d2Td6uu2.js +6587 -0
- package/dist/{vue-Cs_HmYsp.js → vue-vUGpdMct.js} +1 -1
- package/dist/workspace.js +1 -1
- package/package.json +7 -7
- package/dist/comment-layer-Ba2DV4L7.d.ts +0 -174
- package/dist/vue-BlknIGIm.js +0 -2501
|
@@ -61,10 +61,10 @@ declare const MessageScroller: import("vue").DefineComponent<import("vue").Extra
|
|
|
61
61
|
};
|
|
62
62
|
}>> & Readonly<{}>, {
|
|
63
63
|
as: string;
|
|
64
|
-
edgeThreshold: number;
|
|
65
|
-
previousItemPeek: number;
|
|
66
64
|
autoScroll: boolean;
|
|
67
65
|
defaultScrollPosition: MessageScrollPosition;
|
|
66
|
+
edgeThreshold: number;
|
|
67
|
+
previousItemPeek: number;
|
|
68
68
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
69
69
|
declare const MessageScrollerViewport: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
70
70
|
as: {
|
package/dist/motion/core.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { i as createHoldToDelete, n as HoldToDeleteOptions, r as HoldToDeleteState, t as HoldToDelete } from "../hold-to-delete-BSMrpE-i.js";
|
|
2
2
|
import { i as swapIcon, n as IconExit, r as SwapIconOptions, t as IconEnter } from "../icon-XZaCUZTG.js";
|
|
3
|
-
import { $ as MotionStateChange, A as tooltip, B as jelly, C as SpringPreset, D as setMotionSlowFactor, E as getMotionSlowFactor, F as press, G as InstallMotionOptions, H as disclosure, I as panel, J as MotionContentChange, K as installMotion, L as leave, M as switchKnob, N as slider, O as springs, P as select, Q as MotionStateAttribute, R as buttonIcon, S as SpringFrame, T as createSpring, U as check, V as divider, W as motionEffects, X as MotionPress, Y as MotionEffect, Z as MotionRoot, _ as shake, a as ProgressOptions, at as forceReducedMotion, b as morphText, c as MotionList, d as MotionListPlay, et as MotionStyleProperty, f as createMotionList, g as travel, h as TravelOptions, i as Progress, it as writeMotionStyle, j as toast, k as appear, l as MotionListOptions, m as TravelBox, n as DropFieldOptions, nt as listMotionEffects, o as ProgressPhase, ot as onReducedMotionChange, p as Travel, q as isMotionOff, r as createDropField, rt as motionStateAttributes, s as createProgress, st as prefersReducedMotion, t as DropField, tt as defineMotionEffect, u as MotionListOrigin, v as ring, w as SpringTarget, x as Spring, y as rollNumber, z as label } from "../motion-core-
|
|
3
|
+
import { $ as MotionStateChange, A as tooltip, B as jelly, C as SpringPreset, D as setMotionSlowFactor, E as getMotionSlowFactor, F as press, G as InstallMotionOptions, H as disclosure, I as panel, J as MotionContentChange, K as installMotion, L as leave, M as switchKnob, N as slider, O as springs, P as select, Q as MotionStateAttribute, R as buttonIcon, S as SpringFrame, T as createSpring, U as check, V as divider, W as motionEffects, X as MotionPress, Y as MotionEffect, Z as MotionRoot, _ as shake, a as ProgressOptions, at as forceReducedMotion, b as morphText, c as MotionList, d as MotionListPlay, et as MotionStyleProperty, f as createMotionList, g as travel, h as TravelOptions, i as Progress, it as writeMotionStyle, j as toast, k as appear, l as MotionListOptions, m as TravelBox, n as DropFieldOptions, nt as listMotionEffects, o as ProgressPhase, ot as onReducedMotionChange, p as Travel, q as isMotionOff, r as createDropField, rt as motionStateAttributes, s as createProgress, st as prefersReducedMotion, t as DropField, tt as defineMotionEffect, u as MotionListOrigin, v as ring, w as SpringTarget, x as Spring, y as rollNumber, z as label } from "../motion-core-Dh20n5Se.js";
|
|
4
4
|
export { type DropField, type DropFieldOptions, type HoldToDelete, type HoldToDeleteOptions, type HoldToDeleteState, type IconEnter, type IconExit, type InstallMotionOptions, type MotionContentChange, type MotionEffect, type MotionList, type MotionListOptions, type MotionListOrigin, type MotionListPlay, type MotionPress, type MotionRoot, type MotionStateAttribute, type MotionStateChange, type MotionStyleProperty, type Progress, type ProgressOptions, type ProgressPhase, type Spring, type SpringFrame, type SpringPreset, type SpringTarget, type SwapIconOptions, type Travel, type TravelBox, type TravelOptions, appear as appearEffect, buttonIcon as buttonIconEffect, check as checkEffect, createDropField, createHoldToDelete, createMotionList, createProgress, createSpring, defineMotionEffect, disclosure as disclosureEffect, divider as dividerEffect, forceReducedMotion, getMotionSlowFactor, installMotion, isMotionOff, jelly as jellyEffect, label as labelEffect, leave as leaveEffect, listMotionEffects, morphText, motionEffects, motionStateAttributes, onReducedMotionChange, panel as panelEffect, prefersReducedMotion, press as pressEffect, ring, rollNumber, select as selectEffect, setMotionSlowFactor, shake, slider as sliderEffect, springs, swapIcon, switchKnob as switchEffect, toast as toastEffect, tooltip as tooltipEffect, travel, writeMotionStyle };
|
package/dist/motion/core.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { _ as divider, a as switchKnob, c as press, d as buttonIcon, f as label, g as installMotion, h as check, i as toast, l as panel, m as disclosure, n as appear, o as slider, p as jelly, r as tooltip, s as select, t as motionEffects, u as leave } from "../effects-
|
|
1
|
+
import { _ as divider, a as switchKnob, c as press, d as buttonIcon, f as label, g as installMotion, h as check, i as toast, l as panel, m as disclosure, n as appear, o as slider, p as jelly, r as tooltip, s as select, t as motionEffects, u as leave } from "../effects-C1zYpSpg.js";
|
|
2
2
|
import { a as listMotionEffects, n as defineMotionEffect, s as motionStateAttributes, u as writeMotionStyle } from "../registry-DAIjCjWd.js";
|
|
3
3
|
import { c as forceReducedMotion, i as getMotionSlowFactor, l as onReducedMotionChange, o as setMotionSlowFactor, r as createSpring, s as springs, t as isMotionOff, u as prefersReducedMotion } from "../opt-out-D66l60sg.js";
|
|
4
|
-
import { a as rollNumber, i as morphText, l as swapIcon } from "../text-
|
|
5
|
-
import { t as ring } from "../ring-
|
|
6
|
-
import { n as shake, t as travel } from "../travel-
|
|
4
|
+
import { a as rollNumber, i as morphText, l as swapIcon } from "../text-gacox6bp.js";
|
|
5
|
+
import { t as ring } from "../ring-GaJsg32c.js";
|
|
6
|
+
import { n as shake, t as travel } from "../travel-BliEidau.js";
|
|
7
7
|
import { t as createMotionList } from "../list-DUTAo0uC.js";
|
|
8
8
|
import { t as createProgress } from "../progress-DL9k-ERG.js";
|
|
9
9
|
import { t as createDropField } from "../drop-field-CNZgwFVO.js";
|
|
@@ -258,7 +258,8 @@ declare function rollNumber(element: HTMLElement, value: number, format?: (value
|
|
|
258
258
|
/**
|
|
259
259
|
* Rings `element` once, as rule 7 of docs/design/motion.md asks for a finished action such as saved, published, or
|
|
260
260
|
* copied: a 5px ring in the border color grows around it and fades. A second call starts the ring again. There is no
|
|
261
|
-
* ring under reduced motion or inside `data-motion="none"`.
|
|
261
|
+
* ring under reduced motion or inside `data-motion="none"`. A control joined to others in a field group, such as
|
|
262
|
+
* Nuxt UI's `UFieldGroup`, rings the whole group, with the rounded corners of the joined controls.
|
|
262
263
|
*/
|
|
263
264
|
declare function ring(element: HTMLElement): void;
|
|
264
265
|
/**
|
package/dist/motion.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { $ as MotionStateChange, A as tooltip, B as jelly, C as SpringPreset, D as setMotionSlowFactor, E as getMotionSlowFactor, F as press, G as InstallMotionOptions, H as disclosure, I as panel, J as MotionContentChange, L as leave, M as switchKnob, N as slider, O as springs, P as select, Q as MotionStateAttribute, R as buttonIcon, S as SpringFrame, T as createSpring, U as check, V as divider, W as motionEffects, X as MotionPress, Y as MotionEffect, Z as MotionRoot, _ as shake, a as ProgressOptions, at as forceReducedMotion, b as morphText, c as MotionList, d as MotionListPlay, et as MotionStyleProperty, f as createMotionList, g as travel, h as TravelOptions, i as Progress, it as writeMotionStyle, j as toast, k as appear, l as MotionListOptions, m as TravelBox, n as DropFieldOptions, nt as listMotionEffects, o as ProgressPhase, ot as onReducedMotionChange, p as Travel, q as isMotionOff, r as createDropField, rt as motionStateAttributes, s as createProgress, st as prefersReducedMotion, t as DropField, tt as defineMotionEffect, u as MotionListOrigin, v as ring, w as SpringTarget, x as Spring, y as rollNumber, z as label } from "./motion-core-
|
|
1
|
+
import { $ as MotionStateChange, A as tooltip, B as jelly, C as SpringPreset, D as setMotionSlowFactor, E as getMotionSlowFactor, F as press, G as InstallMotionOptions, H as disclosure, I as panel, J as MotionContentChange, L as leave, M as switchKnob, N as slider, O as springs, P as select, Q as MotionStateAttribute, R as buttonIcon, S as SpringFrame, T as createSpring, U as check, V as divider, W as motionEffects, X as MotionPress, Y as MotionEffect, Z as MotionRoot, _ as shake, a as ProgressOptions, at as forceReducedMotion, b as morphText, c as MotionList, d as MotionListPlay, et as MotionStyleProperty, f as createMotionList, g as travel, h as TravelOptions, i as Progress, it as writeMotionStyle, j as toast, k as appear, l as MotionListOptions, m as TravelBox, n as DropFieldOptions, nt as listMotionEffects, o as ProgressPhase, ot as onReducedMotionChange, p as Travel, q as isMotionOff, r as createDropField, rt as motionStateAttributes, s as createProgress, st as prefersReducedMotion, t as DropField, tt as defineMotionEffect, u as MotionListOrigin, v as ring, w as SpringTarget, x as Spring, y as rollNumber, z as label } from "./motion-core-Dh20n5Se.js";
|
|
2
2
|
import { i as createHoldToDelete, n as HoldToDeleteOptions, r as HoldToDeleteState, t as HoldToDelete } from "./hold-to-delete-BSMrpE-i.js";
|
|
3
3
|
import { i as swapIcon, n as IconExit, r as SwapIconOptions, t as IconEnter } from "./icon-XZaCUZTG.js";
|
|
4
4
|
/**
|
package/dist/motion.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { _ as divider, a as switchKnob, c as press, d as buttonIcon, f as label, h as check, i as toast, l as panel, m as disclosure, n as appear, o as slider, p as jelly, r as tooltip, s as select, t as motionEffects, u as leave } from "./effects-
|
|
1
|
+
import { _ as divider, a as switchKnob, c as press, d as buttonIcon, f as label, h as check, i as toast, l as panel, m as disclosure, n as appear, o as slider, p as jelly, r as tooltip, s as select, t as motionEffects, u as leave } from "./effects-C1zYpSpg.js";
|
|
2
2
|
import { t as createDropField } from "./drop-field-CNZgwFVO.js";
|
|
3
3
|
import { t as createHoldToDelete } from "./hold-to-delete-Cludb56v.js";
|
|
4
4
|
import { t as createMotionList } from "./list-DUTAo0uC.js";
|
|
5
5
|
import { t as createProgress } from "./progress-DL9k-ERG.js";
|
|
6
6
|
import { c as forceReducedMotion, i as getMotionSlowFactor, l as onReducedMotionChange, o as setMotionSlowFactor, r as createSpring, s as springs, t as isMotionOff, u as prefersReducedMotion } from "./opt-out-D66l60sg.js";
|
|
7
7
|
import { a as listMotionEffects, n as defineMotionEffect, s as motionStateAttributes, u as writeMotionStyle } from "./registry-DAIjCjWd.js";
|
|
8
|
-
import { a as rollNumber, i as morphText, l as swapIcon } from "./text-
|
|
9
|
-
import { t as ring } from "./ring-
|
|
10
|
-
import { n as shake, t as travel } from "./travel-
|
|
11
|
-
import { t as installMotion } from "./install-
|
|
8
|
+
import { a as rollNumber, i as morphText, l as swapIcon } from "./text-gacox6bp.js";
|
|
9
|
+
import { t as ring } from "./ring-GaJsg32c.js";
|
|
10
|
+
import { n as shake, t as travel } from "./travel-BliEidau.js";
|
|
11
|
+
import { t as installMotion } from "./install-C4LwcJda.js";
|
|
12
12
|
import "./motion/core.js";
|
|
13
13
|
export { appear as appearEffect, buttonIcon as buttonIconEffect, check as checkEffect, createDropField, createHoldToDelete, createMotionList, createProgress, createSpring, defineMotionEffect, disclosure as disclosureEffect, divider as dividerEffect, forceReducedMotion, getMotionSlowFactor, installMotion, isMotionOff, jelly as jellyEffect, label as labelEffect, leave as leaveEffect, listMotionEffects, morphText, motionEffects, motionStateAttributes, onReducedMotionChange, panel as panelEffect, prefersReducedMotion, press as pressEffect, ring, rollNumber, select as selectEffect, setMotionSlowFactor, shake, slider as sliderEffect, springs, swapIcon, switchKnob as switchEffect, toast as toastEffect, tooltip as tooltipEffect, travel, writeMotionStyle };
|
package/dist/nuxt.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as ViteHubUIOptions, r as ViteHubUIIconOptions } from "./config-
|
|
1
|
+
import { a as ViteHubUIOptions, r as ViteHubUIIconOptions } from "./config-COSdO-ay.js";
|
|
2
2
|
/** Name of an icon in the ViteHub set, such as `kv` for `i-vitehub-kv`. */
|
|
3
3
|
type ViteHubIconName = "agent" | "auth" | "blob" | "browser" | "bundle" | "cache" | "channels" | "choices" | "cli" | "cms" | "codemods" | "comments" | "compare" | "connections" | "console" | "content" | "database" | "development" | "device" | "docs" | "email" | "env" | "forge" | "forms" | "gateways" | "guides" | "hosts" | "i18n" | "kv" | "logs" | "markdown-template" | "mcp" | "presets" | "queue" | "rate-limit" | "realtime" | "reference" | "runtime" | "sandbox" | "schedule" | "shell" | "skills" | "source" | "start" | "sync" | "ui" | "usage" | "web-container" | "webhooks" | "workflow" | "workspace";
|
|
4
4
|
/** The ViteHub icon set in the Iconify JSON format, as `@iconify-json/*` packages export it. */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { PropType, VNode } from "vue";
|
|
1
|
+
import { PropType, SlotsType, VNode } from "vue";
|
|
2
2
|
/** A surface that the right panel can show, such as the Workspace files or the session's changes. */
|
|
3
3
|
export interface AgentSessionSurface {
|
|
4
4
|
id: string;
|
|
@@ -206,6 +206,11 @@ export declare const AgentSessionDetailsRow: import("vue").DefineComponent<impor
|
|
|
206
206
|
}>> & Readonly<{}>, {
|
|
207
207
|
tone: "default" | "error" | "muted" | "success" | "info";
|
|
208
208
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
209
|
+
/** The scope of the `detail` slot of `AgentSessionWorkGroup` and the `work-detail` slot of `AgentSessionTimeline`. */
|
|
210
|
+
export interface AgentSessionWorkDetailScope {
|
|
211
|
+
entry: AgentSessionWorkEntry;
|
|
212
|
+
}
|
|
213
|
+
type WorkDetailSlot = (scope: AgentSessionWorkDetailScope) => VNode[];
|
|
209
214
|
/** A group of tool calls, folded behind one line such as "Worked for 3m 12s". */
|
|
210
215
|
export declare const AgentSessionWorkGroup: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
211
216
|
label: {
|
|
@@ -235,7 +240,9 @@ export declare const AgentSessionWorkGroup: import("vue").DefineComponent<import
|
|
|
235
240
|
};
|
|
236
241
|
}>> & Readonly<{}>, {
|
|
237
242
|
defaultOpen: boolean;
|
|
238
|
-
}, {
|
|
243
|
+
}, SlotsType<{
|
|
244
|
+
detail?: WorkDetailSlot;
|
|
245
|
+
}>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
239
246
|
/** The session's turns: user bubbles on the right, the agent's answers as Markdown, and folded tool calls between them. */
|
|
240
247
|
export declare const AgentSessionTimeline: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
241
248
|
items: {
|
|
@@ -249,4 +256,40 @@ export declare const AgentSessionTimeline: import("vue").DefineComponent<import(
|
|
|
249
256
|
required: true;
|
|
250
257
|
type: PropType<AgentSessionItem[]>;
|
|
251
258
|
};
|
|
252
|
-
}>> & Readonly<{}>, {}, {
|
|
259
|
+
}>> & Readonly<{}>, {}, SlotsType<{
|
|
260
|
+
"item-work"?: ((scope: {
|
|
261
|
+
item: {
|
|
262
|
+
type: "work";
|
|
263
|
+
id: string;
|
|
264
|
+
label?: string;
|
|
265
|
+
entries: AgentSessionWorkEntry[];
|
|
266
|
+
defaultOpen?: boolean;
|
|
267
|
+
};
|
|
268
|
+
}) => VNode[]) | undefined;
|
|
269
|
+
"item-user"?: ((scope: {
|
|
270
|
+
item: {
|
|
271
|
+
type: "user";
|
|
272
|
+
id: string;
|
|
273
|
+
text: string;
|
|
274
|
+
createdAt?: string;
|
|
275
|
+
};
|
|
276
|
+
}) => VNode[]) | undefined;
|
|
277
|
+
"item-assistant"?: ((scope: {
|
|
278
|
+
item: {
|
|
279
|
+
type: "assistant";
|
|
280
|
+
id: string;
|
|
281
|
+
text: string;
|
|
282
|
+
createdAt?: string;
|
|
283
|
+
};
|
|
284
|
+
}) => VNode[]) | undefined;
|
|
285
|
+
"item-divider"?: ((scope: {
|
|
286
|
+
item: {
|
|
287
|
+
type: "divider";
|
|
288
|
+
id: string;
|
|
289
|
+
label: string;
|
|
290
|
+
};
|
|
291
|
+
}) => VNode[]) | undefined;
|
|
292
|
+
} & {
|
|
293
|
+
"work-detail"?: WorkDetailSlot;
|
|
294
|
+
}>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
295
|
+
export {};
|
|
@@ -2,7 +2,7 @@ import { r as useUIComponent } from "../../nuxt-ui-7ByUrymx.js";
|
|
|
2
2
|
import { n as kitSlot } from "../../slot-part-BWHvQ3mK.js";
|
|
3
3
|
import { Markdown } from "./markdown.js";
|
|
4
4
|
import { Tabs, TabsList, TabsPanel, TabsTab } from "@ui-sdk/vue/tabs";
|
|
5
|
-
import { computed, defineComponent, h, onBeforeUnmount, onMounted, ref, useId, watch } from "vue";
|
|
5
|
+
import { Comment, Fragment, computed, defineComponent, h, isVNode, onBeforeUnmount, onMounted, ref, useId, watch } from "vue";
|
|
6
6
|
// src/components/agent-session.ts
|
|
7
7
|
const workIcons = {
|
|
8
8
|
command: "i-lucide-terminal",
|
|
@@ -501,7 +501,24 @@ const AgentSessionDetailsRow = defineComponent({
|
|
|
501
501
|
};
|
|
502
502
|
}
|
|
503
503
|
});
|
|
504
|
-
function
|
|
504
|
+
function hasContent(nodes) {
|
|
505
|
+
return nodes.some((node) => {
|
|
506
|
+
if (!isVNode(node)) return true;
|
|
507
|
+
if (node.type === Comment) return false;
|
|
508
|
+
return node.type !== Fragment || Array.isArray(node.children) && hasContent(node.children);
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
function workDetail(entry, slot) {
|
|
512
|
+
const custom = slot?.({ entry });
|
|
513
|
+
return custom && hasContent(custom) ? h("div", {
|
|
514
|
+
class: "vh-agent-session__work-detail-custom",
|
|
515
|
+
"data-slot": "agent-session-work-detail"
|
|
516
|
+
}, custom) : h("pre", {
|
|
517
|
+
class: "vh-agent-session__work-detail",
|
|
518
|
+
"data-slot": "agent-session-work-detail"
|
|
519
|
+
}, entry.detail);
|
|
520
|
+
}
|
|
521
|
+
function workRow(entry, open, onToggle, detailSlot) {
|
|
505
522
|
const expandable = Boolean(entry.detail);
|
|
506
523
|
const line = [
|
|
507
524
|
h("span", {
|
|
@@ -522,7 +539,7 @@ function workRow(entry, open, onToggle) {
|
|
|
522
539
|
class: "vh-agent-session__work-line",
|
|
523
540
|
"aria-expanded": open ? "true" : "false",
|
|
524
541
|
onClick: onToggle
|
|
525
|
-
}, line) : h("div", { class: "vh-agent-session__work-line" }, line), expandable && open ?
|
|
542
|
+
}, line) : h("div", { class: "vh-agent-session__work-line" }, line), expandable && open ? workDetail(entry, detailSlot) : null]);
|
|
526
543
|
}
|
|
527
544
|
/** A group of tool calls, folded behind one line such as "Worked for 3m 12s". */
|
|
528
545
|
const AgentSessionWorkGroup = defineComponent({
|
|
@@ -538,7 +555,8 @@ const AgentSessionWorkGroup = defineComponent({
|
|
|
538
555
|
type: Boolean
|
|
539
556
|
}
|
|
540
557
|
},
|
|
541
|
-
|
|
558
|
+
slots: Object,
|
|
559
|
+
setup(props, { slots }) {
|
|
542
560
|
const open = ref(props.defaultOpen);
|
|
543
561
|
const openRows = ref(/* @__PURE__ */ new Set());
|
|
544
562
|
const toggleRow = (id) => {
|
|
@@ -564,7 +582,7 @@ const AgentSessionWorkGroup = defineComponent({
|
|
|
564
582
|
props.label ? h("span", { class: "vh-agent-session__work-count" }, `${props.entries.length} ${props.entries.length === 1 ? "step" : "steps"}`) : null,
|
|
565
583
|
failed ? h("span", { class: "vh-agent-session__work-failed" }, `${failed} failed`) : null,
|
|
566
584
|
icon("i-lucide-chevron-down", { class: "vh-agent-session__work-chevron" })
|
|
567
|
-
]), open.value ? h("div", { class: "vh-agent-session__work-list" }, props.entries.map((entry) => workRow(entry, openRows.value.has(entry.id), () => toggleRow(entry.id)))) : null]);
|
|
585
|
+
]), open.value ? h("div", { class: "vh-agent-session__work-list" }, props.entries.map((entry) => workRow(entry, openRows.value.has(entry.id), () => toggleRow(entry.id), slots.detail))) : null]);
|
|
568
586
|
};
|
|
569
587
|
}
|
|
570
588
|
});
|
|
@@ -603,12 +621,14 @@ const AgentSessionTimeline = defineComponent({
|
|
|
603
621
|
required: true,
|
|
604
622
|
type: Array
|
|
605
623
|
} },
|
|
624
|
+
slots: Object,
|
|
606
625
|
setup(props, { slots }) {
|
|
607
626
|
return () => h("div", {
|
|
608
627
|
class: "vh-agent-session__timeline",
|
|
609
628
|
"data-slot": "agent-session-timeline"
|
|
610
629
|
}, props.items.map((item) => {
|
|
611
|
-
const
|
|
630
|
+
const itemSlot = slots[`item-${item.type}`];
|
|
631
|
+
const custom = itemSlot?.({ item });
|
|
612
632
|
if (custom) return h("div", {
|
|
613
633
|
key: item.id,
|
|
614
634
|
class: "vh-agent-session__item"
|
|
@@ -632,7 +652,7 @@ const AgentSessionTimeline = defineComponent({
|
|
|
632
652
|
label: item.label,
|
|
633
653
|
entries: item.entries,
|
|
634
654
|
defaultOpen: item.defaultOpen
|
|
635
|
-
});
|
|
655
|
+
}, slots["work-detail"] ? { detail: slots["work-detail"] } : void 0);
|
|
636
656
|
}));
|
|
637
657
|
}
|
|
638
658
|
});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerViewport } from "../headless/message-scroller.js";
|
|
2
|
-
import { i as useViteHubUI } from "../../config-
|
|
2
|
+
import { i as useViteHubUI } from "../../config-LRonN53j.js";
|
|
3
3
|
import { ChatMessage } from "./chat-message.js";
|
|
4
4
|
import { r as useUIComponent } from "../../nuxt-ui-7ByUrymx.js";
|
|
5
5
|
import { defineComponent, h } from "vue";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as CommentComposerSubmit, c as CommentMentionItemScope, i as CommentComposerSlots, n as CommentComposerFrame, o as CommentComposerVariant, r as CommentComposerSize, s as CommentMentionEmptyScope, t as CommentComposer } from "../../comment-composer-
|
|
1
|
+
import { a as CommentComposerSubmit, c as CommentMentionItemScope, i as CommentComposerSlots, n as CommentComposerFrame, o as CommentComposerVariant, r as CommentComposerSize, s as CommentMentionEmptyScope, t as CommentComposer } from "../../comment-composer-DmDM3XYP.js";
|
|
2
2
|
export { CommentComposer, CommentComposerFrame, CommentComposerSize, CommentComposerSlots, CommentComposerSubmit, CommentComposerVariant, CommentMentionEmptyScope, CommentMentionItemScope };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as CommentComposer } from "../../comment-composer-
|
|
1
|
+
export { t as CommentComposer } from "../../comment-composer-X7vJKh5b.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as CommentPlacement, t as CommentLayer } from "../../comment-layer-
|
|
1
|
+
import { n as CommentPlacement, t as CommentLayer } from "../../comment-layer-KnnVfdRV.js";
|
|
2
2
|
export { CommentLayer, CommentPlacement };
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { i as useComments, n as draftPositionKey, o as
|
|
1
|
+
import { i as useComments, n as draftPositionKey, o as commentThreadKey, r as provideComments } from "../../comments-9MDSNm-9.js";
|
|
2
2
|
import { t as uiErrorDiagnostics } from "../../error-diagnostics-BlgA9rI2.js";
|
|
3
|
-
import { t as useCommentAttachments } from "../../comment-attachments-
|
|
4
|
-
import { i as consumedPointerEvents } from "../../comments-context-
|
|
3
|
+
import { t as useCommentAttachments } from "../../comment-attachments-DAzUbRmJ.js";
|
|
4
|
+
import { i as consumedPointerEvents } from "../../comments-context-3js2YFl2.js";
|
|
5
5
|
import { n as excerpt } from "../../comment-person-D_IyIjXo.js";
|
|
6
6
|
import { n as threadRow } from "../../comment-row-DPMWI5Z0.js";
|
|
7
|
+
import { n as deliveryAttributes, t as commentTitle } from "../../comment-status-nsCdrRk_.js";
|
|
7
8
|
import { t as createMotionList } from "../../list-DUTAo0uC.js";
|
|
8
|
-
import { t as CommentComposer } from "../../comment-composer-
|
|
9
|
+
import { t as CommentComposer } from "../../comment-composer-X7vJKh5b.js";
|
|
9
10
|
import { CommentList, CommentToolbar } from "./comment-list.js";
|
|
10
11
|
import { CommentPin } from "./comment-pin.js";
|
|
11
|
-
import { n as CommentThread } from "../../comment-thread-
|
|
12
|
+
import { n as CommentThread } from "../../comment-thread-jqPx6aJ8.js";
|
|
12
13
|
import { computed, defineComponent, h, nextTick, onBeforeUnmount, onMounted, onUpdated, reactive, ref, shallowRef, watch } from "vue";
|
|
13
14
|
// src/components/comment-layer.ts
|
|
14
15
|
const popoverWidth = 360;
|
|
@@ -25,7 +26,6 @@ function placeDraft(point, page, width, viewport) {
|
|
|
25
26
|
left: left - x
|
|
26
27
|
};
|
|
27
28
|
}
|
|
28
|
-
/** A pin on an area or an image is round. Elsewhere it is a drop whose small corner points at the spot. */
|
|
29
29
|
const pinShape = (kind) => kind === "area" || kind === "image" ? "round" : "point";
|
|
30
30
|
const clickSlop = 6;
|
|
31
31
|
const pinSpacing = 32;
|
|
@@ -48,57 +48,35 @@ const CommentLayer = defineComponent({
|
|
|
48
48
|
name: "CommentLayer",
|
|
49
49
|
props: {
|
|
50
50
|
client: { type: Object },
|
|
51
|
-
/** What the threads of this page are about. For a page, `{ kind: "page", id: "/pricing" }`. */
|
|
52
51
|
subject: { type: Object },
|
|
53
|
-
/** The signed-in user. Defaults to the client's user. */
|
|
54
52
|
user: { type: Object },
|
|
55
|
-
/** A state from `useComments()`, instead of `client` and `subject`. */
|
|
56
53
|
comments: { type: Object },
|
|
57
|
-
/** The people on this page, shown in the toolbar. */
|
|
58
54
|
people: {
|
|
59
55
|
default: () => [],
|
|
60
56
|
type: Array
|
|
61
57
|
},
|
|
62
|
-
/** The key that toggles comment mode. `false` turns it off. */
|
|
63
58
|
hotkey: {
|
|
64
59
|
default: "c",
|
|
65
60
|
type: [String, Boolean]
|
|
66
61
|
},
|
|
67
|
-
/** Hide thread mutation controls when the viewer may only read. */
|
|
68
62
|
readOnly: {
|
|
69
63
|
default: false,
|
|
70
64
|
type: Boolean
|
|
71
65
|
},
|
|
72
|
-
/** The URL of the page that a subject lives on, for the links of threads that are not page threads. */
|
|
73
66
|
subjectUrl: { type: Function },
|
|
74
|
-
/** Navigates to the page of a thread from the list. Defaults to `location.assign`. */
|
|
75
67
|
navigate: { type: Function },
|
|
76
|
-
/** What the signed-in user may do in a thread. Defaults to the `can` of the comments state. */
|
|
77
68
|
can: { type: Function },
|
|
78
|
-
/** Turns attached files into attachment keys before the comment is saved or sent. */
|
|
79
69
|
upload: { type: Function },
|
|
80
|
-
/** Save raw files with outbox entries. Set only when the server accepts file uploads. `upload` takes precedence. */
|
|
81
70
|
queueFiles: {
|
|
82
71
|
default: false,
|
|
83
72
|
type: Boolean
|
|
84
73
|
},
|
|
85
|
-
/** The file types that the boxes take, such as `image/*`. */
|
|
86
74
|
accept: { type: String },
|
|
87
|
-
/** Gives the URL of an attachment key. With it, image attachments show as thumbnails. */
|
|
88
75
|
attachmentUrl: { type: Function },
|
|
89
|
-
/**
|
|
90
|
-
* Where threads open. `"pin"` opens a thread in a card beside its pin. `"margin"` shows every thread as a card in a
|
|
91
|
-
* column on the right edge of the screen, level with its pin, and opens it in that card, with the reply box there.
|
|
92
|
-
* A new comment is written there too. On a screen narrower than 900px, `"margin"` works as `"pin"`.
|
|
93
|
-
*/
|
|
94
76
|
placement: {
|
|
95
77
|
default: "pin",
|
|
96
78
|
type: String
|
|
97
79
|
},
|
|
98
|
-
/**
|
|
99
|
-
* The size of the thread cards and of the box for a new comment. `"sm"`, the default, is Drop's floating card: 14px
|
|
100
|
-
* text, tight rows, and Edit and Delete over the name's row. `"md"` is the size of a thread in a panel.
|
|
101
|
-
*/
|
|
102
80
|
size: {
|
|
103
81
|
default: "sm",
|
|
104
82
|
type: String
|
|
@@ -126,7 +104,7 @@ const CommentLayer = defineComponent({
|
|
|
126
104
|
watch(() => state.draft.value, (next, previous) => {
|
|
127
105
|
if (next !== previous) draftFiles.value = next?.files ? [...next.files] : [];
|
|
128
106
|
});
|
|
129
|
-
const { enabled: attachmentsOn, prepare } = useCommentAttachments(state, props);
|
|
107
|
+
const { enabled: attachmentsOn, prepare, queued } = useCommentAttachments(state, props);
|
|
130
108
|
const user = computed(() => state.user.value);
|
|
131
109
|
const pinned = computed(() => state.threads.value.filter((thread) => state.pageThreads.value.includes(thread) || state.shown.value.has(thread.id) || state.leaving.value.has(thread.id)));
|
|
132
110
|
const drawn = computed(() => pinned.value.filter((thread) => state.shown.value.has(thread.id) || state.leaving.value.has(thread.id)));
|
|
@@ -346,9 +324,15 @@ const CommentLayer = defineComponent({
|
|
|
346
324
|
layout: "row",
|
|
347
325
|
onSubmit: async (submit) => {
|
|
348
326
|
if (draft.busy || uploadingDraft.value === draft || state.draft.value !== draft) return;
|
|
349
|
-
uploadingDraft.value = draft;
|
|
350
327
|
draft.error = void 0;
|
|
351
328
|
draft.mentions = submit.mentions;
|
|
329
|
+
const files = queued(submit.files);
|
|
330
|
+
if (files) {
|
|
331
|
+
draft.attachments = [];
|
|
332
|
+
await state.send({ files });
|
|
333
|
+
return;
|
|
334
|
+
}
|
|
335
|
+
uploadingDraft.value = draft;
|
|
352
336
|
const submitted = draftFiles.value;
|
|
353
337
|
const body = draft.body;
|
|
354
338
|
const mentions = draft.mentions;
|
|
@@ -401,6 +385,10 @@ const CommentLayer = defineComponent({
|
|
|
401
385
|
} else cards.delete(key);
|
|
402
386
|
};
|
|
403
387
|
const statusSlot = () => slots.status ? { status: slots.status } : void 0;
|
|
388
|
+
const threadSlots = () => ({
|
|
389
|
+
...statusSlot(),
|
|
390
|
+
...slots.actions ? { actions: slots.actions } : {}
|
|
391
|
+
});
|
|
404
392
|
const threadView = (thread) => h(CommentThread, {
|
|
405
393
|
accept: props.accept,
|
|
406
394
|
attachmentUrl: props.attachmentUrl,
|
|
@@ -424,7 +412,7 @@ const CommentLayer = defineComponent({
|
|
|
424
412
|
},
|
|
425
413
|
thread,
|
|
426
414
|
user: user.value
|
|
427
|
-
},
|
|
415
|
+
}, threadSlots());
|
|
428
416
|
const marginLayout = (spots, draftY) => {
|
|
429
417
|
const entries = pinned.value.flatMap((thread) => {
|
|
430
418
|
const spot = state.shown.value.has(thread.id) ? spots.get(thread.id) : void 0;
|
|
@@ -521,6 +509,7 @@ const CommentLayer = defineComponent({
|
|
|
521
509
|
author: thread.author,
|
|
522
510
|
"data-shape": pinShape(thread.anchor.kind),
|
|
523
511
|
"data-thread-id": thread.id,
|
|
512
|
+
...deliveryAttributes(thread.delivery),
|
|
524
513
|
excerpt: excerpt(thread.messages[0]?.body ?? ""),
|
|
525
514
|
...thread.n ? { n: thread.n } : {},
|
|
526
515
|
onHover: () => {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as CommentList, r as CommentToolbar, t as CommentFilters } from "../../comment-list-
|
|
1
|
+
import { n as CommentList, r as CommentToolbar, t as CommentFilters } from "../../comment-list-ncwaCSVX.js";
|
|
2
2
|
export { CommentFilters, CommentList, CommentToolbar };
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { RollNumber } from "./motion.js";
|
|
2
|
-
import { a as useCommentsContext
|
|
2
|
+
import { a as useCommentsContext } from "../../comments-9MDSNm-9.js";
|
|
3
3
|
import { n as threadRow, t as rowSlotScope } from "../../comment-row-DPMWI5Z0.js";
|
|
4
|
+
import { n as deliveryAttributes } from "../../comment-status-nsCdrRk_.js";
|
|
4
5
|
import { AvatarStack } from "./avatar-stack.js";
|
|
5
6
|
import { MotionList } from "./motion-list.js";
|
|
6
7
|
import { r as useUIComponent } from "../../nuxt-ui-7ByUrymx.js";
|
|
7
|
-
import { a as useViteHubUIIcons } from "../../config-
|
|
8
|
+
import { a as useViteHubUIIcons } from "../../config-LRonN53j.js";
|
|
8
9
|
import { defineComponent, h } from "vue";
|
|
9
10
|
// src/components/comment-list.ts
|
|
10
11
|
const commentsProp = { type: Object };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as CommentPanelVariant, c as CommentUpload, i as CommentPanelSlots, n as CommentGroupSlotScope, o as CommentRowSlotScope, r as CommentPanel, s as CommentRowSlots, t as CommentGroup } from "../../comment-panel-
|
|
1
|
+
import { a as CommentPanelVariant, c as CommentUpload, i as CommentPanelSlots, n as CommentGroupSlotScope, o as CommentRowSlotScope, r as CommentPanel, s as CommentRowSlots, t as CommentGroup } from "../../comment-panel-DoLDOw3E.js";
|
|
2
2
|
export { CommentGroup, CommentGroupSlotScope, CommentPanel, CommentPanelSlots, CommentPanelVariant, CommentRowSlotScope, CommentRowSlots, CommentUpload };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { RollNumber } from "./motion.js";
|
|
2
|
-
import { a as useCommentsContext,
|
|
2
|
+
import { a as useCommentsContext, i as useComments, o as commentThreadKey, r as provideComments, s as useSelectedComment } from "../../comments-9MDSNm-9.js";
|
|
3
3
|
import { t as uiErrorDiagnostics } from "../../error-diagnostics-BlgA9rI2.js";
|
|
4
|
-
import { t as useCommentAttachments } from "../../comment-attachments-
|
|
4
|
+
import { t as useCommentAttachments } from "../../comment-attachments-DAzUbRmJ.js";
|
|
5
5
|
import { n as threadRow, t as rowSlotScope } from "../../comment-row-DPMWI5Z0.js";
|
|
6
|
-
import { n as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
6
|
+
import { n as deliveryAttributes, t as commentTitle } from "../../comment-status-nsCdrRk_.js";
|
|
7
|
+
import { n as injectComments } from "../../comments-context-3js2YFl2.js";
|
|
8
|
+
import { t as CommentComposer } from "../../comment-composer-X7vJKh5b.js";
|
|
9
|
+
import { n as CommentThread } from "../../comment-thread-jqPx6aJ8.js";
|
|
9
10
|
import { r as useUIComponent } from "../../nuxt-ui-7ByUrymx.js";
|
|
10
11
|
import { computed, defineComponent, h, nextTick, ref, watch } from "vue";
|
|
11
12
|
// src/components/comment-panel.ts
|
|
@@ -22,63 +23,43 @@ const sameSubject = (a, b) => a.kind === b.kind && a.id === b.id;
|
|
|
22
23
|
const CommentPanel = defineComponent({
|
|
23
24
|
name: "CommentPanel",
|
|
24
25
|
props: {
|
|
25
|
-
/** A state from `useComments()`. Defaults to the state of the nearest `CommentLayer` or `provideComments()`. */
|
|
26
26
|
comments: { type: Object },
|
|
27
|
-
/** The client, for a panel that is not inside a `CommentLayer`. Give it with `subject`. */
|
|
28
27
|
client: { type: Object },
|
|
29
|
-
/** What the threads are about, with `client`. */
|
|
30
28
|
subject: { type: Object },
|
|
31
|
-
/** The signed-in user, with `client`. Defaults to the client's user. */
|
|
32
29
|
user: { type: Object },
|
|
33
|
-
/** `docked` fills its container, such as a side column. `floating` is a card over the page. */
|
|
34
30
|
variant: {
|
|
35
31
|
default: "docked",
|
|
36
32
|
type: String
|
|
37
33
|
},
|
|
38
|
-
/** The id of the open thread. Use `v-model:thread`. `null` shows the list. */
|
|
39
34
|
thread: {
|
|
40
35
|
default: void 0,
|
|
41
36
|
type: [String, null]
|
|
42
37
|
},
|
|
43
|
-
/** Which threads the list shows. Use `v-model:status`. */
|
|
44
38
|
status: { type: String },
|
|
45
|
-
/** The heading of the list. */
|
|
46
39
|
title: {
|
|
47
40
|
default: "Comments",
|
|
48
41
|
type: String
|
|
49
42
|
},
|
|
50
|
-
/** Hide the page box and every reply, edit, delete, and status control. */
|
|
51
43
|
readOnly: {
|
|
52
44
|
default: false,
|
|
53
45
|
type: Boolean
|
|
54
46
|
},
|
|
55
|
-
/** Turns attached files into attachment keys before the comment is saved or sent. */
|
|
56
47
|
upload: { type: Function },
|
|
57
|
-
/** Save raw files with outbox entries. Set only when the server accepts file uploads. `upload` takes precedence. */
|
|
58
48
|
queueFiles: {
|
|
59
49
|
default: false,
|
|
60
50
|
type: Boolean
|
|
61
51
|
},
|
|
62
|
-
/** The file types that the boxes take, such as `image/*`. */
|
|
63
52
|
accept: { type: String },
|
|
64
|
-
/** Gives the URL of an attachment key. With it, image attachments show as thumbnails. */
|
|
65
53
|
attachmentUrl: { type: Function },
|
|
66
|
-
/** Send a new page comment that has files and no text. */
|
|
67
54
|
allowEmpty: {
|
|
68
55
|
default: false,
|
|
69
56
|
type: Boolean
|
|
70
57
|
},
|
|
71
|
-
/** People that messages may mention, on top of the people that the comments state knows. */
|
|
72
58
|
people: {
|
|
73
59
|
default: () => [],
|
|
74
60
|
type: Array
|
|
75
61
|
},
|
|
76
|
-
/** What the signed-in user may do in a thread. Defaults to the `can` of the comments state. */
|
|
77
62
|
can: { type: Function },
|
|
78
|
-
/**
|
|
79
|
-
* Groups the rows under headings, in the order the groups first appear. Threads without a group come first. Without a
|
|
80
|
-
* group callback, a resolved thread that Open lists for a later reply goes under "Replied since resolved".
|
|
81
|
-
*/
|
|
82
63
|
group: { type: Function }
|
|
83
64
|
},
|
|
84
65
|
emits: [
|
|
@@ -104,7 +85,7 @@ const CommentPanel = defineComponent({
|
|
|
104
85
|
const threadId = computed(() => props.thread === void 0 ? localThread.value : props.thread);
|
|
105
86
|
const status = computed(() => props.status ?? localStatus.value);
|
|
106
87
|
const scoped = computed(() => state.threads.value.filter((thread) => state.scope.value === "site" || sameSubject(thread.subject, state.subject.value)));
|
|
107
|
-
const rows = computed(() => scoped.value.filter((thread) => thread.status === status.value
|
|
88
|
+
const rows = computed(() => scoped.value.filter((thread) => thread.status === status.value));
|
|
108
89
|
const opened = useSelectedComment(state.threads, threadId);
|
|
109
90
|
watch(opened, (thread, _previous, onCleanup) => {
|
|
110
91
|
if (thread) onCleanup(state.retainMark(thread.id));
|
|
@@ -140,7 +121,7 @@ const CommentPanel = defineComponent({
|
|
|
140
121
|
[...root.value?.querySelectorAll("[data-slot='comment-panel-item']") ?? []].find((row) => row.dataset.threadId === id)?.focus();
|
|
141
122
|
});
|
|
142
123
|
}
|
|
143
|
-
const { enabled: attachmentsOn, prepare } = useCommentAttachments(state, props);
|
|
124
|
+
const { enabled: attachmentsOn, prepare, queued } = useCommentAttachments(state, props);
|
|
144
125
|
const subjectKey = () => `${state.subject.value.kind}\u0000${state.subject.value.id}`;
|
|
145
126
|
let sending = 0;
|
|
146
127
|
watch(subjectKey, () => {
|
|
@@ -154,13 +135,35 @@ const CommentPanel = defineComponent({
|
|
|
154
135
|
async function send(submit) {
|
|
155
136
|
if (busy.value) return;
|
|
156
137
|
const run = ++sending;
|
|
157
|
-
busy.value = true;
|
|
158
138
|
failure.value = void 0;
|
|
159
139
|
const submitted = {
|
|
160
140
|
body: body.value,
|
|
161
141
|
files: files.value,
|
|
162
142
|
mentions: mentions.value
|
|
163
143
|
};
|
|
144
|
+
const queuedFiles = queued(submit.files);
|
|
145
|
+
if (queuedFiles) {
|
|
146
|
+
body.value = "";
|
|
147
|
+
mentions.value = [];
|
|
148
|
+
files.value = [];
|
|
149
|
+
try {
|
|
150
|
+
await state.create({
|
|
151
|
+
files: queuedFiles,
|
|
152
|
+
body: submit.body,
|
|
153
|
+
mentions: submit.mentions
|
|
154
|
+
});
|
|
155
|
+
} catch (cause) {
|
|
156
|
+
if (run !== sending) return;
|
|
157
|
+
failure.value = reason(cause);
|
|
158
|
+
if (!body.value && !files.value.length) {
|
|
159
|
+
body.value = submitted.body;
|
|
160
|
+
mentions.value = submitted.mentions;
|
|
161
|
+
files.value = submitted.files;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
return;
|
|
165
|
+
}
|
|
166
|
+
busy.value = true;
|
|
164
167
|
try {
|
|
165
168
|
const attached = await prepare(submit.files);
|
|
166
169
|
if (run !== sending) return;
|
|
@@ -184,7 +187,7 @@ const CommentPanel = defineComponent({
|
|
|
184
187
|
const groups = computed(() => {
|
|
185
188
|
const found = [];
|
|
186
189
|
for (const thread of rows.value) {
|
|
187
|
-
const label = props.group
|
|
190
|
+
const label = props.group?.(thread);
|
|
188
191
|
let entry = found.find((group) => group.label === label);
|
|
189
192
|
if (!entry) found.push(entry = {
|
|
190
193
|
label,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as CommentPin } from "../../comment-pin-
|
|
1
|
+
import { t as CommentPin } from "../../comment-pin-hBJFiSYW.js";
|
|
2
2
|
export { CommentPin };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as useViteHubUIIcons } from "../../config-
|
|
1
|
+
import { a as useViteHubUIIcons } from "../../config-LRonN53j.js";
|
|
2
2
|
import { n as useTooltipComponent, r as useUIComponent } from "../../nuxt-ui-7ByUrymx.js";
|
|
3
3
|
import { defineComponent, h, onErrorCaptured, onMounted, ref } from "vue";
|
|
4
4
|
// src/components/comment-selection-bar.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as CommentSend } from "../../comment-send-
|
|
1
|
+
export { t as CommentSend } from "../../comment-send-CUkL3TbZ.js";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as CommentReplySlots, c as CommentThreadSlotScope,
|
|
2
|
-
export { CommentAttachmentLink, CommentAttachmentUrl, CommentReply, CommentReplySlotScope, CommentReplySlots, CommentStatusSlotScope, CommentThread, CommentThreadSlotScope, CommentThreadSlots, messagesSinceResolved
|
|
1
|
+
import { a as CommentReplySlots, c as CommentThreadSlotScope, i as CommentReplySlotScope, l as CommentThreadSlots, n as CommentAttachmentUrl, o as CommentStatusSlotScope, r as CommentReply, s as CommentThread, t as CommentAttachmentLink, u as messagesSinceResolved } from "../../comment-thread-DPV2kqA4.js";
|
|
2
|
+
export { CommentAttachmentLink, CommentAttachmentUrl, CommentReply, CommentReplySlotScope, CommentReplySlots, CommentStatusSlotScope, CommentThread, CommentThreadSlotScope, CommentThreadSlots, messagesSinceResolved };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as CommentThread, t as CommentReply } from "../../comment-thread-
|
|
3
|
-
export { CommentReply, CommentThread, messagesSinceResolved
|
|
1
|
+
import { r as messagesSinceResolved } from "../../comment-status-nsCdrRk_.js";
|
|
2
|
+
import { n as CommentThread, t as CommentReply } from "../../comment-thread-jqPx6aJ8.js";
|
|
3
|
+
export { CommentReply, CommentThread, messagesSinceResolved };
|