@vite-hub/ui 0.4.1 → 0.5.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 +102 -76
- package/dist/announce-Cy_Tn9wW.js +32 -0
- package/dist/{avatar-stack-DPRFuezh.d.ts → avatar-stack-DXmCQhxd.d.ts} +1 -1
- package/dist/{comment-composer-jYv2ULNP.js → comment-composer-D7ZytyER.js} +257 -10
- package/dist/{comment-composer-fINL5bxo.d.ts → comment-composer-DvKMTrAi.d.ts} +4 -4
- package/dist/{comment-layer-C_sbPIR5.d.ts → comment-layer-GTsLdABl.d.ts} +4 -4
- package/dist/{comment-list-BcSaLngS.d.ts → comment-list-BI96empx.d.ts} +2 -2
- package/dist/comment-marks.css +18 -22
- package/dist/{comment-panel-CfvdRUMX.d.ts → comment-panel-CsKWTms_.d.ts} +2 -2
- package/dist/{comment-pin-DHOdRvUw.d.ts → comment-pin-CvwgRSDR.d.ts} +1 -1
- package/dist/{comment-row-Bn3nr8l5.js → comment-row-JmTC0uXr.js} +1 -1
- package/dist/comment-send-7bg4NEEM.js +277 -0
- package/dist/comment-send-C45dHC22.d.ts +25 -0
- package/dist/comment-send.css +267 -0
- package/dist/comment-thread-B_Sc2QX6.js +797 -0
- package/dist/{comment-thread-DKJjmWN0.d.ts → comment-thread-C6U-bsK_.d.ts} +4 -4
- package/dist/{comments-D0d26ghV.js → comments-B88zg9gC.js} +1 -1
- package/dist/{comments-context-C2lOZyQ5.js → comments-context-DhbIdYQ1.js} +2 -1
- package/dist/{config-Dk67emQt.js → config-B1u7zqMB.js} +8 -1
- package/dist/{config-DgxBW013.d.ts → config-pHazYdq6.d.ts} +11 -0
- package/dist/drop-field-3CDRFFRm.js +163 -0
- package/dist/{editor-C_wt4RRV.js → editor-BHYGLgty.js} +42 -3
- package/dist/effects-Ql6VzCRa.js +2971 -0
- package/dist/headless.d.ts +1 -1
- package/dist/headless.js +1 -1
- package/dist/hold-to-delete-DjWzRDyY.d.ts +51 -0
- package/dist/hold-to-delete-ROLQRZg_.js +434 -0
- package/dist/icon-c5Jb_Tl7.d.ts +31 -0
- package/dist/{image-preview-C9tdkmEj.js → image-preview-BigoAvb3.js} +2 -2
- package/dist/{index-BYRFQfCd.d.ts → index-YUvL2nV8.d.ts} +8 -10
- package/dist/index.d.ts +19 -14
- package/dist/index.js +45 -44
- package/dist/install-D5f6msEU.js +17 -0
- package/dist/list-RCbNZ14q.js +271 -0
- package/dist/{markdown-editor-CMbNZOdN.js → markdown-editor-Dfl2DgPS.js} +1 -1
- package/dist/markdown-editor.js +1 -1
- package/dist/{message-scroller-jrYN9dG9.d.ts → message-scroller-Bm1YWTeY.d.ts} +2 -2
- package/dist/motion/core.d.ts +4 -0
- package/dist/motion/core.js +11 -0
- package/dist/motion-core-lHRF8PZz.d.ts +456 -0
- package/dist/motion.d.ts +16 -0
- package/dist/motion.js +13 -0
- package/dist/{nuxt-ui-DSQFzq3s.js → nuxt-ui-CgvMzO5v.js} +20 -14
- package/dist/nuxt.d.ts +1 -1
- package/dist/nuxt.js +12 -3
- package/dist/opt-out-b6bnUjIT.js +208 -0
- package/dist/parts/components/agent-session.js +1 -1
- package/dist/parts/components/attachment.d.ts +1 -1
- package/dist/parts/components/attachment.js +1 -1
- package/dist/parts/components/avatar-stack.d.ts +1 -1
- package/dist/parts/components/avatar-stack.js +2 -1
- package/dist/parts/components/bubble.d.ts +1 -1
- package/dist/parts/components/chat-session.d.ts +1 -1
- package/dist/parts/components/chat.js +2 -2
- package/dist/parts/components/code-block.d.ts +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 +24 -6
- package/dist/parts/components/comment-list.d.ts +1 -1
- package/dist/parts/components/comment-list.js +12 -7
- package/dist/parts/components/comment-panel.d.ts +1 -1
- package/dist/parts/components/comment-panel.js +24 -10
- package/dist/parts/components/comment-pin.d.ts +1 -1
- package/dist/parts/components/comment-selection-bar.js +3 -2
- package/dist/parts/components/comment-send.d.ts +2 -0
- package/dist/parts/components/comment-send.js +2 -0
- package/dist/parts/components/comment-thread.d.ts +1 -1
- package/dist/parts/components/comment-thread.js +2 -597
- package/dist/parts/components/comments.d.ts +8 -7
- package/dist/parts/components/comments.js +5 -4
- package/dist/parts/components/copy-button.d.ts +13 -3
- package/dist/parts/components/copy-button.js +226 -1
- package/dist/parts/components/device-frame.d.ts +2 -2
- package/dist/parts/components/drop-field.d.ts +69 -0
- package/dist/parts/components/drop-field.js +77 -0
- package/dist/parts/components/filter-search.js +1 -1
- package/dist/parts/components/hold-to-delete.d.ts +82 -0
- package/dist/parts/components/hold-to-delete.js +76 -0
- 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/marker.d.ts +1 -1
- package/dist/parts/components/message-parts.js +13 -5
- package/dist/parts/components/motion-list.d.ts +42 -0
- package/dist/parts/components/motion-list.js +42 -0
- package/dist/parts/components/motion.d.ts +124 -0
- package/dist/parts/components/motion.js +172 -0
- package/dist/parts/components/progress.d.ts +41 -0
- package/dist/parts/components/progress.js +54 -0
- package/dist/parts/components/prompt-input.d.ts +5 -5
- package/dist/parts/components/prompt-input.js +3 -3
- package/dist/parts/components/relative-time.js +1 -1
- package/dist/parts/components/sync-status.js +2 -1
- package/dist/parts/components/tool-list.d.ts +1 -1
- package/dist/parts/components/trace-run.d.ts +1 -1
- package/dist/parts/components/trace-run.js +1 -1
- package/dist/parts/components/trace.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/playground/share.d.ts +36 -2
- package/dist/parts/workspace/browser-support-notice.d.ts +1 -1
- package/dist/parts/workspace/browser-support-notice.js +12 -4
- package/dist/parts/workspace/codemirror.d.ts +9 -0
- package/dist/parts/workspace/codemirror.js +37 -4
- package/dist/parts/workspace/connect-panel.d.ts +1 -1
- package/dist/parts/workspace/connect-panel.js +1 -1
- package/dist/parts/workspace/file-icons.d.ts +16 -0
- package/dist/parts/workspace/file-icons.js +82 -0
- package/dist/parts/workspace/icons.d.ts +1 -0
- package/dist/parts/workspace/icons.js +1 -0
- package/dist/parts/workspace/runners/render.d.ts +26 -0
- package/dist/parts/workspace/runners/render.js +124 -0
- package/dist/parts/workspace/runners/web-container.d.ts +29 -0
- package/dist/parts/workspace/runners/web-container.js +186 -0
- package/dist/parts/workspace/workspace-bar.d.ts +51 -0
- package/dist/parts/workspace/workspace-bar.js +51 -0
- package/dist/parts/workspace/workspace-editor-head.d.ts +47 -0
- package/dist/parts/workspace/workspace-editor-head.js +66 -0
- package/dist/parts/workspace/workspace-editor.d.ts +17 -0
- package/dist/parts/workspace/workspace-editor.js +29 -3
- package/dist/parts/workspace/workspace-examples.d.ts +74 -0
- package/dist/parts/workspace/workspace-examples.js +72 -0
- package/dist/parts/workspace/workspace-file-link.d.ts +35 -0
- package/dist/parts/workspace/workspace-file-link.js +39 -0
- package/dist/parts/workspace/workspace-file-tree.d.ts +8 -8
- package/dist/parts/workspace/workspace-file-tree.js +26 -19
- package/dist/parts/workspace/workspace-guide.d.ts +52 -0
- package/dist/parts/workspace/workspace-guide.js +91 -0
- package/dist/parts/workspace/workspace-issues.d.ts +46 -0
- package/dist/parts/workspace/workspace-issues.js +49 -0
- package/dist/parts/workspace/workspace-preview.js +1 -1
- package/dist/parts/workspace/workspace-shell.d.ts +2 -88
- package/dist/parts/workspace/workspace-shell.js +131 -78
- package/dist/parts/workspace/workspace-sidebar.d.ts +75 -0
- package/dist/parts/workspace/workspace-sidebar.js +132 -0
- package/dist/parts/workspace/workspace-start.d.ts +47 -0
- package/dist/parts/workspace/workspace-start.js +60 -0
- package/dist/parts/workspace/workspace-status.d.ts +69 -0
- package/dist/parts/workspace/workspace-status.js +74 -0
- package/dist/parts/workspace/workspace-steps.d.ts +2 -0
- package/dist/parts/workspace/workspace-steps.js +128 -0
- package/dist/parts/workspace/workspace-task.d.ts +20 -0
- package/dist/parts/workspace/workspace-task.js +20 -0
- package/dist/parts/workspace/workspace.d.ts +251 -0
- package/dist/parts/workspace/workspace.js +665 -0
- package/dist/playground.d.ts +1 -1
- package/dist/progress-C7afI5vq.js +266 -0
- package/dist/registry-D3-ysX7l.js +78 -0
- package/dist/{relative-time-BVmjOsYG.js → relative-time-DgSS3zKN.js} +1 -1
- package/dist/ring-B7Qxu7zd.js +175 -0
- package/dist/runtime/nuxt-plugin.js +2 -2
- package/dist/styles.css +586 -573
- package/dist/text-BCJflBJf.js +826 -0
- package/dist/theme.d.ts +43 -0
- package/dist/theme.js +22 -7
- package/dist/travel-C87xd5Wh.js +182 -0
- package/dist/tween-CO24nMpf.js +62 -0
- package/dist/{types-Dj7vp0lZ.d.ts → types-BX64qHlV.d.ts} +1 -1
- package/dist/visual-copy-CrVc3z4n.js +15 -0
- package/dist/workspace-shell-BJGnoF3p.d.ts +112 -0
- package/dist/workspace-steps-Bgph2rpr.d.ts +72 -0
- package/dist/workspace.d.ts +16 -3
- package/dist/workspace.js +15 -2
- package/package.json +21 -10
- package/dist/copy-button-CRN3kmSD.js +0 -253
- package/dist/icon-swap.css +0 -69
- package/dist/parts/playground/highlight.d.ts +0 -5
- package/dist/parts/playground/highlight.js +0 -23
- package/dist/parts/playground/playground-render.d.ts +0 -126
- package/dist/parts/playground/playground-render.js +0 -356
- package/dist/parts/workspace/playground-container.d.ts +0 -192
- package/dist/parts/workspace/playground-container.js +0 -603
- package/dist/share-DM4eNy4q.d.ts +0 -37
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
//#region src/motion/reduced-motion.ts
|
|
2
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
3
|
+
let query;
|
|
4
|
+
let forced;
|
|
5
|
+
let current = false;
|
|
6
|
+
function read() {
|
|
7
|
+
return forced ?? query?.matches ?? false;
|
|
8
|
+
}
|
|
9
|
+
function update() {
|
|
10
|
+
const next = read();
|
|
11
|
+
if (next === current) return;
|
|
12
|
+
current = next;
|
|
13
|
+
for (const listener of listeners) listener(next);
|
|
14
|
+
}
|
|
15
|
+
function watch() {
|
|
16
|
+
if (query || typeof matchMedia !== "function") return;
|
|
17
|
+
query = matchMedia("(prefers-reduced-motion: reduce)");
|
|
18
|
+
query.addEventListener?.("change", update);
|
|
19
|
+
current = read();
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* True when the person asked for less motion. It follows the system setting live. Under it, nothing travels,
|
|
23
|
+
* stretches, or wobbles: springs jump to their target, and helpers use a 150ms crossfade.
|
|
24
|
+
*/
|
|
25
|
+
function prefersReducedMotion() {
|
|
26
|
+
watch();
|
|
27
|
+
return read();
|
|
28
|
+
}
|
|
29
|
+
/** Calls `listener` each time reduced motion turns on or off. Returns a function that stops it. */
|
|
30
|
+
function onReducedMotionChange(listener) {
|
|
31
|
+
watch();
|
|
32
|
+
listeners.add(listener);
|
|
33
|
+
return () => listeners.delete(listener);
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Sets reduced motion on or off whatever the system setting is, such as from an app setting or a test page. `undefined`
|
|
37
|
+
* follows the system setting again.
|
|
38
|
+
*/
|
|
39
|
+
function forceReducedMotion(reduced) {
|
|
40
|
+
watch();
|
|
41
|
+
forced = reduced;
|
|
42
|
+
update();
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region src/motion/spring.ts
|
|
46
|
+
/** The named springs of docs/design/motion.md. Use them, not numbers of your own. */
|
|
47
|
+
const springs = {
|
|
48
|
+
/** Moves and resizes: an indicator that travels, a width that follows its label. */
|
|
49
|
+
snappy: {
|
|
50
|
+
stiffness: 520,
|
|
51
|
+
damping: 34
|
|
52
|
+
},
|
|
53
|
+
/** Wobbles and settles: a toggled icon, a knob that lands. */
|
|
54
|
+
soft: {
|
|
55
|
+
stiffness: 380,
|
|
56
|
+
damping: 20
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
const live = /* @__PURE__ */ new Map();
|
|
60
|
+
const steps = /* @__PURE__ */ new Set();
|
|
61
|
+
let revision = 0;
|
|
62
|
+
let watchingReducedMotion = false;
|
|
63
|
+
let frameId = 0;
|
|
64
|
+
let lastTime = 0;
|
|
65
|
+
let slowFactor = 1;
|
|
66
|
+
/**
|
|
67
|
+
* Makes every spring run `factor` times slower, such as 4 to record at ¼×. 1 is real time. It also slows tweens.
|
|
68
|
+
*/
|
|
69
|
+
function setMotionSlowFactor(factor) {
|
|
70
|
+
if (!(factor > 0)) throw new RangeError(`The motion slow factor must be above 0. It is ${factor}.`);
|
|
71
|
+
slowFactor = factor;
|
|
72
|
+
}
|
|
73
|
+
function getMotionSlowFactor() {
|
|
74
|
+
return slowFactor;
|
|
75
|
+
}
|
|
76
|
+
function frame(time) {
|
|
77
|
+
const step = Math.min(.032, lastTime ? (time - lastTime) / 1e3 : .016) / slowFactor;
|
|
78
|
+
lastTime = time;
|
|
79
|
+
const batch = Array.from(live);
|
|
80
|
+
const frameSteps = Array.from(steps);
|
|
81
|
+
for (const [spring, queued] of batch) {
|
|
82
|
+
if (live.get(spring) !== queued) continue;
|
|
83
|
+
if (spring.tween) {
|
|
84
|
+
const tween = spring.tween;
|
|
85
|
+
tween.elapsed += step;
|
|
86
|
+
const progress = Math.min(1, tween.elapsed / tween.duration);
|
|
87
|
+
const eased = 1 - (1 - progress) ** 3;
|
|
88
|
+
const next = tween.from + (spring.target - tween.from) * eased;
|
|
89
|
+
spring.velocity = (next - spring.value) / (step || 1);
|
|
90
|
+
spring.value = next;
|
|
91
|
+
if (progress >= 1) settle(spring);
|
|
92
|
+
} else {
|
|
93
|
+
const { stiffness, damping } = spring.preset;
|
|
94
|
+
const part = step / 6;
|
|
95
|
+
for (let index = 0; index < 6; index++) {
|
|
96
|
+
const force = -stiffness * (spring.value - spring.target) - damping * spring.velocity;
|
|
97
|
+
spring.velocity += force * part;
|
|
98
|
+
spring.value += spring.velocity * part;
|
|
99
|
+
}
|
|
100
|
+
if (Math.abs(spring.velocity) < .002 && Math.abs(spring.value - spring.target) < 5e-4) settle(spring);
|
|
101
|
+
}
|
|
102
|
+
spring.frame(spring.value, spring.velocity);
|
|
103
|
+
}
|
|
104
|
+
for (const run of frameSteps) if (steps.has(run) && run(step) === false) steps.delete(run);
|
|
105
|
+
if (live.size || steps.size) frameId = requestAnimationFrame(frame);
|
|
106
|
+
else {
|
|
107
|
+
frameId = 0;
|
|
108
|
+
lastTime = 0;
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
function settle(spring) {
|
|
112
|
+
spring.value = spring.target;
|
|
113
|
+
spring.velocity = 0;
|
|
114
|
+
spring.tween = void 0;
|
|
115
|
+
live.delete(spring);
|
|
116
|
+
}
|
|
117
|
+
function start(spring) {
|
|
118
|
+
live.set(spring, ++revision);
|
|
119
|
+
if (!frameId) frameId = requestAnimationFrame(frame);
|
|
120
|
+
}
|
|
121
|
+
function onEachFrame(step) {
|
|
122
|
+
const run = (seconds) => step(seconds);
|
|
123
|
+
steps.add(run);
|
|
124
|
+
if (!frameId) frameId = requestAnimationFrame(frame);
|
|
125
|
+
return () => {
|
|
126
|
+
steps.delete(run);
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
function settleMovement(reduced) {
|
|
130
|
+
if (!reduced) return;
|
|
131
|
+
const batch = Array.from(live);
|
|
132
|
+
for (const [spring, queued] of batch) {
|
|
133
|
+
if (live.get(spring) !== queued || spring.tween) continue;
|
|
134
|
+
settle(spring);
|
|
135
|
+
spring.frame(spring.value, 0);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* A spring on one number, such as a scale amount or a position in pixels. All springs share one frame loop, which
|
|
140
|
+
* stops when no spring moves. `onFrame` writes the value where it belongs.
|
|
141
|
+
*/
|
|
142
|
+
function createSpring(initial, onFrame, preset = springs.snappy) {
|
|
143
|
+
const state = {
|
|
144
|
+
value: initial,
|
|
145
|
+
velocity: 0,
|
|
146
|
+
target: initial,
|
|
147
|
+
preset,
|
|
148
|
+
tween: void 0,
|
|
149
|
+
frame: onFrame
|
|
150
|
+
};
|
|
151
|
+
const spring = {
|
|
152
|
+
get value() {
|
|
153
|
+
return state.value;
|
|
154
|
+
},
|
|
155
|
+
get velocity() {
|
|
156
|
+
return state.velocity;
|
|
157
|
+
},
|
|
158
|
+
get target() {
|
|
159
|
+
return state.target;
|
|
160
|
+
},
|
|
161
|
+
get active() {
|
|
162
|
+
return live.has(state);
|
|
163
|
+
},
|
|
164
|
+
to(target, options = {}) {
|
|
165
|
+
if (options.preset) state.preset = options.preset;
|
|
166
|
+
if (options.tween === void 0 && prefersReducedMotion()) return spring.set(target);
|
|
167
|
+
if (options.tween === void 0 && !watchingReducedMotion) {
|
|
168
|
+
watchingReducedMotion = true;
|
|
169
|
+
onReducedMotionChange(settleMovement);
|
|
170
|
+
}
|
|
171
|
+
state.target = target;
|
|
172
|
+
if (options.velocity !== void 0) state.velocity += options.velocity;
|
|
173
|
+
state.tween = options.tween === void 0 ? void 0 : {
|
|
174
|
+
from: state.value,
|
|
175
|
+
elapsed: 0,
|
|
176
|
+
duration: options.tween
|
|
177
|
+
};
|
|
178
|
+
start(state);
|
|
179
|
+
},
|
|
180
|
+
set(value) {
|
|
181
|
+
state.value = state.target = value;
|
|
182
|
+
state.velocity = 0;
|
|
183
|
+
state.tween = void 0;
|
|
184
|
+
live.delete(state);
|
|
185
|
+
onFrame(value, 0);
|
|
186
|
+
},
|
|
187
|
+
stop() {
|
|
188
|
+
state.velocity = 0;
|
|
189
|
+
state.tween = void 0;
|
|
190
|
+
live.delete(state);
|
|
191
|
+
}
|
|
192
|
+
};
|
|
193
|
+
return spring;
|
|
194
|
+
}
|
|
195
|
+
//#endregion
|
|
196
|
+
//#region src/motion/opt-out.ts
|
|
197
|
+
const optOut = "[data-motion=\"none\"]";
|
|
198
|
+
function isMotionOff(element) {
|
|
199
|
+
let node = element;
|
|
200
|
+
while (node) {
|
|
201
|
+
if (node.closest("[data-motion=\"none\"]")) return true;
|
|
202
|
+
const root = node.getRootNode();
|
|
203
|
+
node = root instanceof ShadowRoot ? root.host : null;
|
|
204
|
+
}
|
|
205
|
+
return false;
|
|
206
|
+
}
|
|
207
|
+
//#endregion
|
|
208
|
+
export { onEachFrame as a, forceReducedMotion as c, getMotionSlowFactor as i, onReducedMotionChange as l, optOut as n, setMotionSlowFactor as o, createSpring as r, springs as s, isMotionOff as t, prefersReducedMotion as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as useUIComponent } from "../../nuxt-ui-
|
|
1
|
+
import { r as useUIComponent } from "../../nuxt-ui-CgvMzO5v.js";
|
|
2
2
|
import { n as kitSlot } from "../../slot-part-Doic71uh.js";
|
|
3
3
|
import { Markdown } from "./markdown.js";
|
|
4
4
|
import { Tabs, TabsList, TabsPanel, TabsTab } from "@ui-sdk/vue/tabs";
|
|
@@ -52,7 +52,7 @@ export declare const AttachmentMedia: import("vue").DefineComponent<import("vue"
|
|
|
52
52
|
type: PropType<"icon" | "image">;
|
|
53
53
|
};
|
|
54
54
|
}>> & Readonly<{}>, {
|
|
55
|
-
variant: "
|
|
55
|
+
variant: "icon" | "image";
|
|
56
56
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
57
57
|
export declare const AttachmentContent: import("vue").DefineComponent<{}, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
58
58
|
[key: string]: any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as useUIComponent } from "../../nuxt-ui-
|
|
1
|
+
import { r as useUIComponent } from "../../nuxt-ui-CgvMzO5v.js";
|
|
2
2
|
import { r as slotPart, t as asProp } from "../../slot-part-Doic71uh.js";
|
|
3
3
|
import { defineComponent, h } from "vue";
|
|
4
4
|
//#region src/components/attachment.ts
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as AvatarStackVariant, n as AvatarStackPerson, r as AvatarStackSize, t as AvatarStack } from "../../avatar-stack-
|
|
1
|
+
import { i as AvatarStackVariant, n as AvatarStackPerson, r as AvatarStackSize, t as AvatarStack } from "../../avatar-stack-DXmCQhxd.js";
|
|
2
2
|
export { AvatarStack, AvatarStackPerson, AvatarStackSize, AvatarStackVariant };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { RollNumber } from "./motion.js";
|
|
1
2
|
import { n as initials } from "../../format-orwcdZL_.js";
|
|
2
3
|
import { computed, defineComponent, h } from "vue";
|
|
3
4
|
//#region src/components/avatar-stack.ts
|
|
@@ -53,7 +54,7 @@ const AvatarStack = defineComponent({
|
|
|
53
54
|
"aria-hidden": "true",
|
|
54
55
|
"data-slot": "avatar-stack-count",
|
|
55
56
|
title: hidden.value.map((person) => person.name).join(", ")
|
|
56
|
-
},
|
|
57
|
+
}, ["+", h(RollNumber, { value: hidden.value.length })]) : null]);
|
|
57
58
|
}
|
|
58
59
|
});
|
|
59
60
|
//#endregion
|
|
@@ -26,8 +26,8 @@ export declare const Bubble: import("vue").DefineComponent<import("vue").Extract
|
|
|
26
26
|
type: PropType<BubbleVariant>;
|
|
27
27
|
};
|
|
28
28
|
}>> & Readonly<{}>, {
|
|
29
|
-
variant: BubbleVariant;
|
|
30
29
|
align: BubbleAlign;
|
|
30
|
+
variant: BubbleVariant;
|
|
31
31
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
32
32
|
export declare const BubbleContent: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
33
33
|
as: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as useUIComponent } from "../../nuxt-ui-
|
|
2
|
-
import { i as useViteHubUI } from "../../config-
|
|
1
|
+
import { r as useUIComponent } from "../../nuxt-ui-CgvMzO5v.js";
|
|
2
|
+
import { i as useViteHubUI } from "../../config-B1u7zqMB.js";
|
|
3
3
|
import { ChatMessage } from "./chat-message.js";
|
|
4
4
|
import { MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerViewport } from "../headless/message-scroller.js";
|
|
5
5
|
import { defineComponent, h } from "vue";
|
|
@@ -97,8 +97,8 @@ export declare const CodeBlockContent: import("vue").DefineComponent<import("vue
|
|
|
97
97
|
type: BooleanConstructor;
|
|
98
98
|
};
|
|
99
99
|
}>> & Readonly<{}>, {
|
|
100
|
+
wrap: boolean;
|
|
100
101
|
lineNumbers: boolean;
|
|
101
102
|
startLine: number;
|
|
102
|
-
wrap: boolean;
|
|
103
103
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
104
104
|
//#endregion
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as slotPart } from "../../slot-part-Doic71uh.js";
|
|
2
|
-
import {
|
|
2
|
+
import { CopyButton } from "./copy-button.js";
|
|
3
3
|
import { Fragment, Text, defineComponent, h } from "vue";
|
|
4
4
|
//#region src/components/code-block.ts
|
|
5
5
|
const CodeBlock = defineComponent({
|
|
@@ -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-DvKMTrAi.js";
|
|
2
2
|
export { CommentComposer, CommentComposerFrame, CommentComposerSize, CommentComposerSlots, CommentComposerSubmit, CommentComposerVariant, CommentMentionEmptyScope, CommentMentionItemScope };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as CommentComposer } from "../../comment-composer-
|
|
1
|
+
import { t as CommentComposer } from "../../comment-composer-D7ZytyER.js";
|
|
2
2
|
export { CommentComposer };
|
|
@@ -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-GTsLdABl.js";
|
|
2
2
|
export { CommentLayer, CommentPlacement };
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { t as uiErrorDiagnostics } from "../../error-diagnostics-SXtnk6bz.js";
|
|
2
|
-
import {
|
|
2
|
+
import { i as consumedPointerEvents } from "../../comments-context-DhbIdYQ1.js";
|
|
3
3
|
import { n as excerpt } from "../../comment-person-CLPlW_SS.js";
|
|
4
|
-
import { t as CommentComposer } from "../../comment-composer-
|
|
5
|
-
import {
|
|
4
|
+
import { t as CommentComposer } from "../../comment-composer-D7ZytyER.js";
|
|
5
|
+
import { t as createMotionList } from "../../list-RCbNZ14q.js";
|
|
6
|
+
import { i as useComments, n as draftPositionKey, o as commentTitle, r as provideComments, s as deliveryAttributes, u as commentThreadKey } from "../../comments-B88zg9gC.js";
|
|
6
7
|
import { t as useCommentAttachments } from "../../comment-attachments-C4yNbcx5.js";
|
|
7
|
-
import { n as threadRow } from "../../comment-row-
|
|
8
|
+
import { n as threadRow } from "../../comment-row-JmTC0uXr.js";
|
|
8
9
|
import { CommentList, CommentToolbar } from "./comment-list.js";
|
|
9
10
|
import { CommentPin } from "./comment-pin.js";
|
|
10
|
-
import { CommentThread } from "
|
|
11
|
+
import { n as CommentThread } from "../../comment-thread-B_Sc2QX6.js";
|
|
11
12
|
import { computed, defineComponent, h, nextTick, onBeforeUnmount, onMounted, onUpdated, reactive, ref, shallowRef, watch } from "vue";
|
|
12
13
|
//#region src/components/comment-layer.ts
|
|
13
14
|
const popoverWidth = 360;
|
|
@@ -292,8 +293,24 @@ const CommentLayer = defineComponent({
|
|
|
292
293
|
window.addEventListener("resize", readSidesSoon, { passive: true });
|
|
293
294
|
window.visualViewport?.addEventListener("resize", readSidesSoon, { passive: true });
|
|
294
295
|
});
|
|
295
|
-
|
|
296
|
+
let marginList;
|
|
297
|
+
const moveMargin = () => {
|
|
298
|
+
const element = layer.value;
|
|
299
|
+
if (!element) return;
|
|
300
|
+
if (marginList) marginList.play();
|
|
301
|
+
else marginList = createMotionList(element, {
|
|
302
|
+
items: (root) => [...root.querySelectorAll("[data-margin-key]")],
|
|
303
|
+
movesOnly: true
|
|
304
|
+
});
|
|
305
|
+
marginList.measure();
|
|
306
|
+
};
|
|
307
|
+
onMounted(moveMargin);
|
|
308
|
+
onUpdated(() => {
|
|
309
|
+
readSides();
|
|
310
|
+
moveMargin();
|
|
311
|
+
});
|
|
296
312
|
onBeforeUnmount(() => {
|
|
313
|
+
marginList?.destroy();
|
|
297
314
|
cardSizes?.disconnect();
|
|
298
315
|
cancelAnimationFrame(sideFrame);
|
|
299
316
|
window.removeEventListener("resize", readSidesSoon);
|
|
@@ -569,6 +586,7 @@ const CommentLayer = defineComponent({
|
|
|
569
586
|
draft: true
|
|
570
587
|
}), h("div", {
|
|
571
588
|
...draftColumn,
|
|
589
|
+
"data-motion-appear": draftColumn ? void 0 : "[data-slot=comment-pin]",
|
|
572
590
|
"data-slot": "comment-layer-popover",
|
|
573
591
|
style: draftColumn?.style ?? {
|
|
574
592
|
left: `${placement.left}px`,
|
|
@@ -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-BI96empx.js";
|
|
2
2
|
export { CommentFilters, CommentList, CommentToolbar };
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { r as useUIComponent } from "../../nuxt-ui-
|
|
2
|
-
import {
|
|
1
|
+
import { r as useUIComponent } from "../../nuxt-ui-CgvMzO5v.js";
|
|
2
|
+
import { RollNumber } from "./motion.js";
|
|
3
|
+
import { a as useViteHubUIIcons } from "../../config-B1u7zqMB.js";
|
|
3
4
|
import { AvatarStack } from "./avatar-stack.js";
|
|
4
|
-
import { a as useCommentsContext, s as deliveryAttributes } from "../../comments-
|
|
5
|
-
import { n as threadRow, t as rowSlotScope } from "../../comment-row-
|
|
5
|
+
import { a as useCommentsContext, s as deliveryAttributes } from "../../comments-B88zg9gC.js";
|
|
6
|
+
import { n as threadRow, t as rowSlotScope } from "../../comment-row-JmTC0uXr.js";
|
|
7
|
+
import { MotionList } from "./motion-list.js";
|
|
6
8
|
import { defineComponent, h } from "vue";
|
|
7
9
|
//#region src/components/comment-list.ts
|
|
8
10
|
const commentsProp = { type: Object };
|
|
@@ -19,11 +21,11 @@ const CommentFilters = defineComponent({
|
|
|
19
21
|
"data-slot": "comment-filter",
|
|
20
22
|
"data-state": comments.filters[key] ? "on" : "off",
|
|
21
23
|
key,
|
|
22
|
-
label: count === void 0 ? label :
|
|
24
|
+
label: count === void 0 ? label : void 0,
|
|
23
25
|
onClick: () => comments.filters[key] = !comments.filters[key],
|
|
24
26
|
size: "xs",
|
|
25
27
|
variant: comments.filters[key] ? "soft" : "ghost"
|
|
26
|
-
});
|
|
28
|
+
}, count === void 0 ? void 0 : { default: () => [`${label} `, h(RollNumber, { value: count })] });
|
|
27
29
|
return h("div", {
|
|
28
30
|
"aria-label": "Filter comments",
|
|
29
31
|
"data-slot": "comment-filters",
|
|
@@ -77,7 +79,10 @@ const CommentList = defineComponent({
|
|
|
77
79
|
}, [scopeButton("page", "This page"), scopeButton("site", "All pages")]), h(CommentFilters, { comments })]), rows.length === 0 ? h("p", {
|
|
78
80
|
"data-slot": "comment-list-empty",
|
|
79
81
|
role: "status"
|
|
80
|
-
}, comments.status.value === "loading" && comments.threads.value.length === 0 ? "Loading comments." : comments.status.value === "error" ? "The comments could not load." : "No comments here.") : h(
|
|
82
|
+
}, comments.status.value === "loading" && comments.threads.value.length === 0 ? "Loading comments." : comments.status.value === "error" ? "The comments could not load." : "No comments here.") : h(MotionList, {
|
|
83
|
+
"data-slot": "comment-list-items",
|
|
84
|
+
tag: "ol"
|
|
85
|
+
}, () => rows.map((thread) => {
|
|
81
86
|
const detached = comments.positions.value.get(thread.id)?.detached === true;
|
|
82
87
|
return h("li", { key: thread.id }, [h("a", {
|
|
83
88
|
"aria-current": comments.openId.value === thread.id ? "true" : void 0,
|
|
@@ -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-CsKWTms_.js";
|
|
2
2
|
export { CommentGroup, CommentGroupSlotScope, CommentPanel, CommentPanelSlots, CommentPanelVariant, CommentRowSlotScope, CommentRowSlots, CommentUpload };
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { r as useUIComponent } from "../../nuxt-ui-
|
|
1
|
+
import { r as useUIComponent } from "../../nuxt-ui-CgvMzO5v.js";
|
|
2
|
+
import { RollNumber } from "./motion.js";
|
|
2
3
|
import { t as uiErrorDiagnostics } from "../../error-diagnostics-SXtnk6bz.js";
|
|
3
|
-
import { n as injectComments } from "../../comments-context-
|
|
4
|
-
import { t as CommentComposer } from "../../comment-composer-
|
|
5
|
-
import { a as useCommentsContext, d as useSelectedComment, i as useComments, l as repliedSinceResolved, o as commentTitle, r as provideComments, s as deliveryAttributes, u as commentThreadKey } from "../../comments-
|
|
4
|
+
import { n as injectComments } from "../../comments-context-DhbIdYQ1.js";
|
|
5
|
+
import { t as CommentComposer } from "../../comment-composer-D7ZytyER.js";
|
|
6
|
+
import { a as useCommentsContext, d as useSelectedComment, i as useComments, l as repliedSinceResolved, o as commentTitle, r as provideComments, s as deliveryAttributes, u as commentThreadKey } from "../../comments-B88zg9gC.js";
|
|
6
7
|
import { t as useCommentAttachments } from "../../comment-attachments-C4yNbcx5.js";
|
|
7
|
-
import { n as threadRow, t as rowSlotScope } from "../../comment-row-
|
|
8
|
-
import { CommentThread } from "
|
|
8
|
+
import { n as threadRow, t as rowSlotScope } from "../../comment-row-JmTC0uXr.js";
|
|
9
|
+
import { n as CommentThread } from "../../comment-thread-B_Sc2QX6.js";
|
|
9
10
|
import { computed, defineComponent, h, nextTick, ref, watch } from "vue";
|
|
10
11
|
//#region src/components/comment-panel.ts
|
|
11
12
|
const listSlots = /* @__PURE__ */ new Set([
|
|
@@ -222,15 +223,28 @@ const CommentPanel = defineComponent({
|
|
|
222
223
|
const list = () => {
|
|
223
224
|
const counts = state.counts.value;
|
|
224
225
|
const filter = (value, label, count) => h(UButton, {
|
|
225
|
-
"aria-
|
|
226
|
+
"aria-checked": String(status.value === value),
|
|
226
227
|
color: "neutral",
|
|
227
228
|
"data-slot": "comment-panel-filter",
|
|
228
229
|
"data-state": status.value === value ? "on" : "off",
|
|
229
|
-
label: `${label} ${count}`,
|
|
230
230
|
onClick: () => setStatus(value),
|
|
231
|
+
onKeydown: (event) => {
|
|
232
|
+
if (![
|
|
233
|
+
"ArrowLeft",
|
|
234
|
+
"ArrowRight",
|
|
235
|
+
"ArrowUp",
|
|
236
|
+
"ArrowDown"
|
|
237
|
+
].includes(event.key)) return;
|
|
238
|
+
event.preventDefault();
|
|
239
|
+
const group = event.currentTarget.closest("[role=radiogroup]");
|
|
240
|
+
setStatus(value === "open" ? "resolved" : "open");
|
|
241
|
+
nextTick(() => group?.querySelector("[role=radio][aria-checked=true]")?.focus());
|
|
242
|
+
},
|
|
243
|
+
role: "radio",
|
|
231
244
|
size: "xs",
|
|
245
|
+
tabindex: status.value === value ? 0 : -1,
|
|
232
246
|
variant: status.value === value ? "soft" : "ghost"
|
|
233
|
-
});
|
|
247
|
+
}, { default: () => [`${label} `, h(RollNumber, { value: count })] });
|
|
234
248
|
const empty = state.status.value === "loading" && state.threads.value.length === 0 ? "Loading comments." : state.status.value === "error" ? "The comments could not load." : status.value === "open" ? "No open comments." : "No resolved comments.";
|
|
235
249
|
return [
|
|
236
250
|
h("header", { "data-slot": "comment-panel-header" }, [
|
|
@@ -238,7 +252,7 @@ const CommentPanel = defineComponent({
|
|
|
238
252
|
h("div", {
|
|
239
253
|
"aria-label": "Filter comments",
|
|
240
254
|
"data-slot": "comment-panel-filters",
|
|
241
|
-
role: "
|
|
255
|
+
role: "radiogroup"
|
|
242
256
|
}, [filter("open", "Open", counts.open), filter("resolved", "Resolved", counts.resolved)]),
|
|
243
257
|
slots["list-actions"] ? h("div", { "data-slot": "comment-panel-actions" }, slots["list-actions"]()) : null
|
|
244
258
|
]),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as CommentPin } from "../../comment-pin-
|
|
1
|
+
import { t as CommentPin } from "../../comment-pin-CvwgRSDR.js";
|
|
2
2
|
export { CommentPin };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as useTooltipComponent, r as useUIComponent } from "../../nuxt-ui-
|
|
2
|
-
import { a as useViteHubUIIcons } from "../../config-
|
|
1
|
+
import { n as useTooltipComponent, r as useUIComponent } from "../../nuxt-ui-CgvMzO5v.js";
|
|
2
|
+
import { a as useViteHubUIIcons } from "../../config-B1u7zqMB.js";
|
|
3
3
|
import { defineComponent, h, onErrorCaptured, onMounted, ref } from "vue";
|
|
4
4
|
//#region src/components/comment-selection-bar.ts
|
|
5
5
|
const TooltipOrTitle = defineComponent({
|
|
@@ -94,6 +94,7 @@ const CommentSelectionBar = defineComponent({
|
|
|
94
94
|
}), action.label]);
|
|
95
95
|
return () => h("div", {
|
|
96
96
|
"aria-label": "Selected text",
|
|
97
|
+
"data-motion-appear": "",
|
|
97
98
|
"data-side": props.side,
|
|
98
99
|
"data-slot": "comment-selection-bar",
|
|
99
100
|
onMousedown: (event) => event.preventDefault(),
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as CommentReplySlots, c as CommentThreadSlotScope, d as repliedSinceResolved, 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-
|
|
1
|
+
import { a as CommentReplySlots, c as CommentThreadSlotScope, d as repliedSinceResolved, 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-C6U-bsK_.js";
|
|
2
2
|
export { CommentAttachmentLink, CommentAttachmentUrl, CommentReply, CommentReplySlotScope, CommentReplySlots, CommentStatusSlotScope, CommentThread, CommentThreadSlotScope, CommentThreadSlots, messagesSinceResolved, repliedSinceResolved };
|