@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
package/dist/styles.css
CHANGED
|
@@ -8,8 +8,6 @@
|
|
|
8
8
|
@import "./theme-focus-ring.css";
|
|
9
9
|
/* Comment pins, areas, and highlights. The ViteHub pill and Drop's page frame load the same file without a framework. */
|
|
10
10
|
@import "./comment-marks.css" layer(components);
|
|
11
|
-
/* CommentSend, the Send segment of a comment pill. The ViteHub pill loads the same file in its toolbar. */
|
|
12
|
-
@import "./comment-send.css" layer(components);
|
|
13
11
|
/* The registry items. shadcn-vue installs the same files, and the build inlines them into dist/styles.css. */
|
|
14
12
|
@layer components {
|
|
15
13
|
/* Status: a 6px dot in the brighter status color and a label. A colored label uses the darker text shade of the theme. */
|
|
@@ -209,7 +207,7 @@
|
|
|
209
207
|
width: 1.25rem;
|
|
210
208
|
}
|
|
211
209
|
|
|
212
|
-
[data-slot="copy-button"][data-loading] [data-
|
|
210
|
+
[data-slot="copy-button"][data-loading] [data-copy-button-loader] {
|
|
213
211
|
animation: copy-button-spin 1s linear infinite;
|
|
214
212
|
}
|
|
215
213
|
|
|
@@ -224,7 +222,7 @@
|
|
|
224
222
|
transition: none;
|
|
225
223
|
}
|
|
226
224
|
|
|
227
|
-
[data-slot="copy-button"][data-loading] [data-
|
|
225
|
+
[data-slot="copy-button"][data-loading] [data-copy-button-loader] {
|
|
228
226
|
animation: none;
|
|
229
227
|
}
|
|
230
228
|
}
|
|
@@ -2183,8 +2181,8 @@
|
|
|
2183
2181
|
}
|
|
2184
2182
|
|
|
2185
2183
|
/*
|
|
2186
|
-
* The editor parts
|
|
2187
|
-
* rules give them the shape of Nuxt UI's editor parts.
|
|
2184
|
+
* The editor parts (`EditorToolbar`, `EditorSuggestionMenu`, `EditorDragHandle`). The kit style family draws their
|
|
2185
|
+
* ui-sdk parts, and these rules give them the shape of Nuxt UI's editor parts.
|
|
2188
2186
|
*/
|
|
2189
2187
|
@layer components {
|
|
2190
2188
|
/* The bubble toolbar floats as a popup does: a ring and a soft shadow, no border. */
|
|
@@ -2235,7 +2233,7 @@
|
|
|
2235
2233
|
white-space: nowrap;
|
|
2236
2234
|
}
|
|
2237
2235
|
|
|
2238
|
-
/* The handle moves to the block under the pointer with the list mover of the motion layer (
|
|
2236
|
+
/* The handle moves to the block under the pointer with the list mover of the motion layer (EditorDragHandle). A
|
|
2239
2237
|
narrow screen has no room beside the text, as in Nuxt UI. */
|
|
2240
2238
|
.vh-editor-drag-handle {
|
|
2241
2239
|
align-items: center;
|
|
@@ -2404,7 +2402,8 @@
|
|
|
2404
2402
|
|
|
2405
2403
|
/* The bar over selected text: a flat surface in the ink color, so it is dark on a light page and light on a dark one.
|
|
2406
2404
|
It floats over any page, such as in the ViteHub pill's shadow root, so its sizes are in px and do not follow the
|
|
2407
|
-
page's root font size: the page places it by its fixed 38px height.
|
|
2405
|
+
page's root font size: the page places it by its fixed 38px height. It shows at once, with no motion: people select
|
|
2406
|
+
text many times a day, and the bar is a menu they read and pick from. */
|
|
2408
2407
|
[data-slot="comment-selection-bar"] {
|
|
2409
2408
|
--vh-selection-bar-text: color-mix(in oklab, var(--vh-inverted) 82%, var(--vh-highlighted));
|
|
2410
2409
|
align-items: center;
|
|
@@ -2419,14 +2418,9 @@
|
|
|
2419
2418
|
gap: 4px;
|
|
2420
2419
|
line-height: 1;
|
|
2421
2420
|
padding: 4px;
|
|
2422
|
-
transform-origin: 50% 100%;
|
|
2423
2421
|
width: max-content;
|
|
2424
2422
|
}
|
|
2425
2423
|
|
|
2426
|
-
[data-slot="comment-selection-bar"][data-side="bottom"] {
|
|
2427
|
-
transform-origin: 50% 0;
|
|
2428
|
-
}
|
|
2429
|
-
|
|
2430
2424
|
[data-slot="comment-selection-bar-action"] {
|
|
2431
2425
|
align-items: center;
|
|
2432
2426
|
background: none;
|
|
@@ -2639,7 +2633,8 @@
|
|
|
2639
2633
|
/* The whole-page island: a 32px capsule at the top center of the screen with the card's surface, so it follows the
|
|
2640
2634
|
page's theme. `data-state` is "none", "count", "hint", or "open"; with "none" it renders no card. The motion layer
|
|
2641
2635
|
moves it: the card comes down from the top edge (`data-motion-appear`, `data-side="bottom"`), the label morphs with
|
|
2642
|
-
the width following, and the trigger squashes. Open, the card is wider at once
|
|
2636
|
+
the width following, and the trigger squashes. Open, the card is wider at once, with the 12px corners of a floating
|
|
2637
|
+
card. `--vh-comment-island-top` puts it
|
|
2643
2638
|
under a pill that docks to the top edge. A card that leaves goes up as a copy in the same grid cell, so a card
|
|
2644
2639
|
that shows again meanwhile stays centered. */
|
|
2645
2640
|
[data-slot="comment-layer"] > [data-slot="comment-page-island"] {
|
|
@@ -2671,6 +2666,7 @@
|
|
|
2671
2666
|
}
|
|
2672
2667
|
|
|
2673
2668
|
[data-slot="comment-page-island-card"][data-open] {
|
|
2669
|
+
border-radius: 0.75rem;
|
|
2674
2670
|
width: min(21.25rem, 100vw - 1.5rem);
|
|
2675
2671
|
}
|
|
2676
2672
|
|
|
@@ -2680,7 +2676,8 @@
|
|
|
2680
2676
|
}
|
|
2681
2677
|
}
|
|
2682
2678
|
|
|
2683
|
-
/* The 18px faces sit 7px inside the 16px corner, so they are concentric with it.
|
|
2679
|
+
/* The 18px faces sit 7px inside the 16px corner, so they are concentric with it. The letters of a label that
|
|
2680
|
+
leaves blur out inside the capsule while it narrows, not past its edge. */
|
|
2684
2681
|
[data-slot="comment-page-island-trigger"] {
|
|
2685
2682
|
align-items: center;
|
|
2686
2683
|
background: none;
|
|
@@ -2695,6 +2692,7 @@
|
|
|
2695
2692
|
font-weight: 500;
|
|
2696
2693
|
gap: 0.375rem;
|
|
2697
2694
|
height: 2rem;
|
|
2695
|
+
overflow: clip;
|
|
2698
2696
|
padding: 0 0.75rem 0 0.4375rem;
|
|
2699
2697
|
text-align: start;
|
|
2700
2698
|
white-space: nowrap;
|
|
@@ -2925,11 +2923,17 @@
|
|
|
2925
2923
|
font-weight: 500;
|
|
2926
2924
|
}
|
|
2927
2925
|
|
|
2928
|
-
:is([data-slot="comment-reply-time"], [data-slot="comment-reply-edited"]) {
|
|
2926
|
+
:is([data-slot="comment-reply-time"], [data-slot="comment-reply-edited"], [data-slot="comment-reply-via"]) {
|
|
2929
2927
|
color: var(--vh-muted);
|
|
2930
2928
|
font-size: 0.75rem;
|
|
2931
2929
|
}
|
|
2932
2930
|
|
|
2931
|
+
[data-slot="comment-reply-via"] > a {
|
|
2932
|
+
color: inherit;
|
|
2933
|
+
text-decoration: underline;
|
|
2934
|
+
text-underline-offset: 2px;
|
|
2935
|
+
}
|
|
2936
|
+
|
|
2933
2937
|
[data-slot="comment-reply-body"] {
|
|
2934
2938
|
overflow-wrap: anywhere;
|
|
2935
2939
|
}
|
|
@@ -3279,7 +3283,7 @@
|
|
|
3279
3283
|
border-radius: inherit;
|
|
3280
3284
|
}
|
|
3281
3285
|
|
|
3282
|
-
& [data-slot="comment-image-stack-remove"] {
|
|
3286
|
+
& :is([data-part="comment-image-stack-remove"], [data-slot="comment-image-stack-remove"]) {
|
|
3283
3287
|
position: absolute;
|
|
3284
3288
|
right: -0.375rem;
|
|
3285
3289
|
top: -0.375rem;
|
|
@@ -3320,7 +3324,7 @@
|
|
|
3320
3324
|
width: 3.5rem;
|
|
3321
3325
|
z-index: auto;
|
|
3322
3326
|
|
|
3323
|
-
& [data-slot="comment-image-stack-remove"] {
|
|
3327
|
+
& :is([data-part="comment-image-stack-remove"], [data-slot="comment-image-stack-remove"]) {
|
|
3324
3328
|
visibility: visible;
|
|
3325
3329
|
}
|
|
3326
3330
|
}
|
|
@@ -4855,6 +4859,11 @@
|
|
|
4855
4859
|
*/
|
|
4856
4860
|
.vh-image-overlay {
|
|
4857
4861
|
background: rgb(from var(--vh-media-scrim, var(--vh-bg-elevated)) r g b / 80%);
|
|
4862
|
+
border: 0;
|
|
4863
|
+
inset: 0;
|
|
4864
|
+
margin: 0;
|
|
4865
|
+
padding: 0;
|
|
4866
|
+
position: fixed;
|
|
4858
4867
|
transition: opacity 150ms;
|
|
4859
4868
|
z-index: 59;
|
|
4860
4869
|
}
|
|
@@ -4866,11 +4875,20 @@
|
|
|
4866
4875
|
|
|
4867
4876
|
.vh-image-dialog {
|
|
4868
4877
|
background: transparent;
|
|
4878
|
+
border: 0;
|
|
4869
4879
|
border-radius: 0;
|
|
4870
4880
|
box-shadow: none;
|
|
4881
|
+
display: flex;
|
|
4882
|
+
flex-direction: column;
|
|
4883
|
+
gap: 0;
|
|
4884
|
+
height: fit-content;
|
|
4885
|
+
inset: 0;
|
|
4886
|
+
margin: auto;
|
|
4871
4887
|
max-height: 92dvh;
|
|
4872
4888
|
max-width: 92vw;
|
|
4873
4889
|
overflow: visible;
|
|
4890
|
+
padding: 0;
|
|
4891
|
+
position: fixed;
|
|
4874
4892
|
width: max-content;
|
|
4875
4893
|
z-index: 60;
|
|
4876
4894
|
}
|
|
@@ -5057,9 +5075,7 @@
|
|
|
5057
5075
|
width: 1.125rem;
|
|
5058
5076
|
}
|
|
5059
5077
|
|
|
5060
|
-
|
|
5061
|
-
Nuxt UI button, so this rule stays outside a layer to win over its classes. */
|
|
5062
|
-
[data-slot="comment-image-stack-remove"] {
|
|
5078
|
+
:is([data-part="comment-image-stack-remove"], [data-slot="comment-image-stack-remove"]) {
|
|
5063
5079
|
background: var(--vh-highlighted);
|
|
5064
5080
|
border: 0;
|
|
5065
5081
|
border-radius: 9999px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as MorphText_default } from "./MorphText-
|
|
1
|
+
import { t as MorphText_default } from "./MorphText-DAHAswWX.js";
|
|
2
2
|
import { createElementBlock, createVNode, defineComponent, inject, openBlock, provide, ref, renderSlot, toRef, unref } from "vue";
|
|
3
3
|
// registry/sync-status/context.ts
|
|
4
4
|
const syncStatusKey = Symbol("SyncStatus");
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
outline-offset: 2px;
|
|
5
5
|
}
|
|
6
6
|
|
|
7
|
-
/* Row comment fields share this frame through
|
|
7
|
+
/* Row comment fields share this frame through styles.css. Its specificity keeps the row's soft
|
|
8
8
|
focus and drag states above the theme's general data-focus-frame rule, regardless of import order. */
|
|
9
9
|
[data-slot="comment-composer"][data-layout="row"] {
|
|
10
10
|
& [data-slot="prompt-input-textarea"]:focus-visible {
|
|
@@ -44,12 +44,14 @@ function forceReducedMotion(reduced) {
|
|
|
44
44
|
// src/motion/spring.ts
|
|
45
45
|
/** The named springs of docs/design/motion.md. Use them, not numbers of your own. */
|
|
46
46
|
const springs = {
|
|
47
|
-
/** Moves and resizes: an indicator that travels, a width that follows its label. */
|
|
48
47
|
snappy: {
|
|
49
48
|
stiffness: 520,
|
|
50
49
|
damping: 34
|
|
51
50
|
},
|
|
52
|
-
|
|
51
|
+
glide: {
|
|
52
|
+
stiffness: 800,
|
|
53
|
+
damping: 57
|
|
54
|
+
},
|
|
53
55
|
soft: {
|
|
54
56
|
stiffness: 380,
|
|
55
57
|
damping: 20
|
|
@@ -2,7 +2,7 @@ import "./headless-2IcUWHMq.js";
|
|
|
2
2
|
import { s as CommentsState } from "./comments-ZfV6IZs8.js";
|
|
3
3
|
import { t as AvatarStackPerson } from "./types-CTk3aNb5.js";
|
|
4
4
|
import { VNode } from "vue";
|
|
5
|
-
import {
|
|
5
|
+
import { CommentStatus, CommentThread, CommentUser } from "@vite-hub/comments/client";
|
|
6
6
|
interface CommentPinProps {
|
|
7
7
|
number?: number;
|
|
8
8
|
author?: CommentUser;
|
|
@@ -29,9 +29,6 @@ interface CommentSelectionBarSlots {
|
|
|
29
29
|
"comment-icon"?: () => unknown;
|
|
30
30
|
"suggest-icon"?: () => unknown;
|
|
31
31
|
}
|
|
32
|
-
interface CommentSendProps {
|
|
33
|
-
client: CommentSendClient;
|
|
34
|
-
}
|
|
35
32
|
interface CommentRowSlotScope {
|
|
36
33
|
thread: CommentThread;
|
|
37
34
|
text: string;
|
|
@@ -71,4 +68,4 @@ interface CommentToolbarSlots {
|
|
|
71
68
|
"list-icon"?: () => unknown;
|
|
72
69
|
"page-icon"?: () => unknown;
|
|
73
70
|
}
|
|
74
|
-
export {
|
|
71
|
+
export { CommentPinEmits as a, CommentRowProps as c, CommentSelectionBarEmits as d, CommentSelectionBarProps as f, CommentToolbarSlots as g, CommentToolbarProps as h, CommentListSlots as i, CommentRowSlotScope as l, CommentSelectionBarSlots as m, CommentListEmits as n, CommentPinProps as o, CommentSelectionBarSide as p, CommentListProps as r, CommentRowPartSlots as s, CommentFiltersProps as t, CommentRowSlots as u };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "./markdown-
|
|
1
|
+
import "./markdown-CqVyNG-h.js";
|
|
2
2
|
import { defineComponent, h, onBeforeUnmount, onMounted, ref, useId, watch } from "vue";
|
|
3
3
|
import { escapeHtml } from "comark/utils";
|
|
4
4
|
// ../../node_modules/.pnpm/pele@1.12.0/node_modules/pele/dist/pele.js
|
|
@@ -34,7 +34,6 @@ const checklist = [
|
|
|
34
34
|
stage: "starting"
|
|
35
35
|
}
|
|
36
36
|
];
|
|
37
|
-
/** The install hint shows after this many milliseconds. */
|
|
38
37
|
const slowInstallMs = 2e4;
|
|
39
38
|
/** Maps the steps of `@vite-hub/web-container` to the five rows of the checklist. */
|
|
40
39
|
function bootChecklist(steps, status, now) {
|
|
@@ -102,9 +102,9 @@ declare const WorkspaceShell: import("vue").DefineComponent<import("vue").Extrac
|
|
|
102
102
|
}>, {
|
|
103
103
|
label: string;
|
|
104
104
|
layout: WorkspaceLayout;
|
|
105
|
-
storageKey: string | false;
|
|
106
105
|
tab: WorkspaceTab;
|
|
107
106
|
tabs: readonly WorkspaceTabItem[];
|
|
107
|
+
storageKey: string | false;
|
|
108
108
|
covered: boolean;
|
|
109
109
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
110
110
|
export { WorkspaceTabItem as a, WorkspaceTab as i, WorkspaceShell as n, WorkspaceSplits as r, WorkspaceLayout as t };
|
package/dist/workspace.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ import { WorkspaceFileTree } from "./parts/workspace/workspace-file-tree.js";
|
|
|
14
14
|
import { WorkspaceGuide } from "./parts/workspace/workspace-guide.js";
|
|
15
15
|
import { WorkspaceIssue, WorkspaceIssues } from "./parts/workspace/workspace-issues.js";
|
|
16
16
|
import { WorkspacePreview, WorkspacePreviewDevice, workspacePreviewScript } from "./parts/workspace/workspace-preview.js";
|
|
17
|
-
import { a as WorkspaceTabItem, i as WorkspaceTab, n as WorkspaceShell, r as WorkspaceSplits, t as WorkspaceLayout } from "./workspace-shell-
|
|
17
|
+
import { a as WorkspaceTabItem, i as WorkspaceTab, n as WorkspaceShell, r as WorkspaceSplits, t as WorkspaceLayout } from "./workspace-shell-CwEQT_1s.js";
|
|
18
18
|
import { WorkspaceSidebar, WorkspaceSidebarAction } from "./parts/workspace/workspace-sidebar.js";
|
|
19
19
|
import { WorkspaceStart } from "./parts/workspace/workspace-start.js";
|
|
20
20
|
import { WorkspaceCursor, WorkspaceStatus, workspaceLanguage } from "./parts/workspace/workspace-status.js";
|
package/dist/workspace.js
CHANGED
|
@@ -5,7 +5,7 @@ import { render } from "./parts/workspace/runners/render.js";
|
|
|
5
5
|
import { webContainer } from "./parts/workspace/runners/web-container.js";
|
|
6
6
|
import { Workspace, useWorkspace, useWorkspaceDevice } from "./parts/workspace/workspace.js";
|
|
7
7
|
import { WorkspaceBar } from "./parts/workspace/workspace-bar.js";
|
|
8
|
-
import { n as bootChecklist, r as formatDuration, t as WorkspaceBootStatus } from "./workspace-boot-status-
|
|
8
|
+
import { n as bootChecklist, r as formatDuration, t as WorkspaceBootStatus } from "./workspace-boot-status-BDkpubHd.js";
|
|
9
9
|
import { WorkspaceEditor } from "./parts/workspace/workspace-editor.js";
|
|
10
10
|
import { WorkspaceEditorHead } from "./parts/workspace/workspace-editor-head.js";
|
|
11
11
|
import { WorkspaceExamples, groupExamples } from "./parts/workspace/workspace-examples.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vite-hub/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "AI interface primitives for Vue and Nuxt.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -28,9 +28,7 @@
|
|
|
28
28
|
"type": "module",
|
|
29
29
|
"sideEffects": [
|
|
30
30
|
"./dist/comment-marks.css",
|
|
31
|
-
"./dist/
|
|
32
|
-
"./dist/styles.css",
|
|
33
|
-
"./dist/theme.css"
|
|
31
|
+
"./dist/styles.css"
|
|
34
32
|
],
|
|
35
33
|
"types": "./dist/index.d.ts",
|
|
36
34
|
"exports": {
|
|
@@ -99,11 +97,6 @@
|
|
|
99
97
|
"import": "./dist/playground.js",
|
|
100
98
|
"default": "./dist/playground.js"
|
|
101
99
|
},
|
|
102
|
-
"./theme": {
|
|
103
|
-
"types": "./dist/theme.d.ts",
|
|
104
|
-
"import": "./dist/theme.js",
|
|
105
|
-
"default": "./dist/theme.js"
|
|
106
|
-
},
|
|
107
100
|
"./vite": {
|
|
108
101
|
"types": "./dist/vite.d.ts",
|
|
109
102
|
"import": "./dist/vite.js",
|
|
@@ -116,9 +109,7 @@
|
|
|
116
109
|
},
|
|
117
110
|
"./package.json": "./package.json",
|
|
118
111
|
"./styles.css": "./dist/styles.css",
|
|
119
|
-
"./comment-marks.css": "./dist/comment-marks.css"
|
|
120
|
-
"./comment-send.css": "./dist/comment-send.css",
|
|
121
|
-
"./theme.css": "./dist/theme.css"
|
|
112
|
+
"./comment-marks.css": "./dist/comment-marks.css"
|
|
122
113
|
},
|
|
123
114
|
"dependencies": {
|
|
124
115
|
"reka-ui": "^2.11.0",
|
|
@@ -128,7 +119,7 @@
|
|
|
128
119
|
"@shikijs/langs": "4.6.0",
|
|
129
120
|
"@shikijs/themes": "4.6.0",
|
|
130
121
|
"@types/node": "^24.19.2",
|
|
131
|
-
"@vite-hub/comments": "0.
|
|
122
|
+
"@vite-hub/comments": "0.9.0",
|
|
132
123
|
"@ui-sdk/core": "0.1.0-beta.20",
|
|
133
124
|
"@ui-sdk/vue": "0.1.0-beta.20",
|
|
134
125
|
"nostics": "1.4.0",
|
|
@@ -149,7 +140,7 @@
|
|
|
149
140
|
"@codemirror/view": "6.43.15",
|
|
150
141
|
"@lezer/highlight": "1.2.5",
|
|
151
142
|
"@lucide/vue": "1.80.0",
|
|
152
|
-
"@vite-hub/web-container": "0.
|
|
143
|
+
"@vite-hub/web-container": "0.9.0",
|
|
153
144
|
"@xterm/addon-fit": "0.11.0",
|
|
154
145
|
"@xterm/xterm": "6.0.0"
|
|
155
146
|
},
|
|
@@ -166,10 +157,11 @@
|
|
|
166
157
|
"@pierre/diffs": "1.7.1",
|
|
167
158
|
"@pierre/theme": "2.1.0",
|
|
168
159
|
"@pierre/trees": "1.0.0",
|
|
160
|
+
"@tailwindcss/vite": "^4.3.5",
|
|
169
161
|
"@vitejs/plugin-vue": "^6.0.11",
|
|
170
162
|
"@vite-hub/icons": "0.1.0",
|
|
171
163
|
"@vite-hub/internal": "0.0.1",
|
|
172
|
-
"@vite-hub/runtime": "0.
|
|
164
|
+
"@vite-hub/runtime": "0.9.0",
|
|
173
165
|
"@vue/server-renderer": "3.5.46",
|
|
174
166
|
"@vue/test-utils": "2.6.0",
|
|
175
167
|
"ai": "7.0.179",
|
|
@@ -187,7 +179,7 @@
|
|
|
187
179
|
"vue-tsc": "^3.3.14",
|
|
188
180
|
"@types/markdown-it": "^14.2.0",
|
|
189
181
|
"comark-ui": "^0.14.3",
|
|
190
|
-
"@vite-hub/content": "0.
|
|
182
|
+
"@vite-hub/content": "0.9.0",
|
|
191
183
|
"playwright-core": "^1.65.1",
|
|
192
184
|
"@tiptap/core": "^3.35.0",
|
|
193
185
|
"@tiptap/extension-drag-handle": "3.35.0",
|
|
@@ -198,7 +190,7 @@
|
|
|
198
190
|
"@tiptap/pm": "^3.35.0",
|
|
199
191
|
"@tiptap/starter-kit": "^3.35.0",
|
|
200
192
|
"@tiptap/vue-3": "3.35.0",
|
|
201
|
-
"@vite-hub/blob": "0.
|
|
193
|
+
"@vite-hub/blob": "0.9.0"
|
|
202
194
|
},
|
|
203
195
|
"peerDependencies": {
|
|
204
196
|
"@floating-ui/dom": "^1.0.0",
|
|
@@ -268,9 +260,9 @@
|
|
|
268
260
|
"test:browser": "vp run --cache -t @vite-hub/ui#build && node --test test/browser/workspace.browser.mjs",
|
|
269
261
|
"test:bridge": "node --test test/browser/tailwind-bridge.browser.mjs",
|
|
270
262
|
"test:kit-parts": "node --test test/browser/kit-parts.browser.mjs",
|
|
263
|
+
"test:form-parts": "node --test test/browser/form-parts.browser.mjs",
|
|
271
264
|
"test:parity": "node --test test/browser/parity.browser.mjs",
|
|
272
265
|
"test:anchored": "node --test test/browser/anchored.browser.mjs",
|
|
273
|
-
"test:comment-send": "node --test test/browser/comment-send.browser.mjs",
|
|
274
266
|
"test:ui-sdk": "node --test test/browser/ui-sdk.browser.mjs",
|
|
275
267
|
"test:editor": "node --test test/browser/editor.browser.mjs",
|
|
276
268
|
"test:workspace-parts": "node --test test/browser/workspace-parts.browser.mjs test/browser/workspace-start.browser.mjs",
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
import { n as prepareAnnouncer, t as announce } from "./announce-CJNXaYbT.js";
|
|
2
|
-
import { t as useCopy } from "./use-copy-DK1SSZkh.js";
|
|
3
|
-
import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, onMounted, openBlock, ref, renderSlot, resolveDynamicComponent, toDisplayString, unref, useSlots, useTemplateRef, watch, withCtx } from "vue";
|
|
4
|
-
import { Check, Copy, LoaderCircle } from "@lucide/vue";
|
|
5
|
-
import { Button } from "@ui-sdk/vue/button";
|
|
6
|
-
// registry/copy-button/CopyButton.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
const _hoisted_1 = {
|
|
8
|
-
key: 3,
|
|
9
|
-
"data-slot": "copy-button-label"
|
|
10
|
-
};
|
|
11
|
-
// registry/copy-button/CopyButton.vue
|
|
12
|
-
var CopyButton_default = /* @__PURE__ */ defineComponent({
|
|
13
|
-
__name: "CopyButton",
|
|
14
|
-
props: {
|
|
15
|
-
value: { type: [String, Function] },
|
|
16
|
-
label: {},
|
|
17
|
-
copyLabel: { default: "Copy" },
|
|
18
|
-
copiedLabel: { default: "Copied" },
|
|
19
|
-
failedLabel: { default: "Copy failed" },
|
|
20
|
-
variant: { default: "ghost" },
|
|
21
|
-
size: { default: "sm" },
|
|
22
|
-
duration: { default: 2e3 },
|
|
23
|
-
preload: {
|
|
24
|
-
type: Boolean,
|
|
25
|
-
default: false
|
|
26
|
-
},
|
|
27
|
-
disabled: {
|
|
28
|
-
type: Boolean,
|
|
29
|
-
default: false
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
emits: ["copy", "error"],
|
|
33
|
-
setup(__props, { emit: __emit }) {
|
|
34
|
-
const emit = __emit;
|
|
35
|
-
const slots = useSlots();
|
|
36
|
-
const { copy, copied } = useCopy({ duration: () => __props.duration });
|
|
37
|
-
const root = useTemplateRef("root");
|
|
38
|
-
const element = () => root.value?.$el instanceof Element ? root.value.$el : void 0;
|
|
39
|
-
onMounted(() => prepareAnnouncer(element()));
|
|
40
|
-
let preloaded;
|
|
41
|
-
watch(() => __props.value, () => preloaded = void 0);
|
|
42
|
-
function startPreload() {
|
|
43
|
-
if (!__props.preload || preloaded || typeof __props.value !== "function") return;
|
|
44
|
-
const entry = { text: callValue(__props.value) };
|
|
45
|
-
preloaded = entry;
|
|
46
|
-
if (typeof entry.text === "string") return;
|
|
47
|
-
entry.text.then((text) => {
|
|
48
|
-
if (preloaded === entry) entry.text = text;
|
|
49
|
-
}, () => {
|
|
50
|
-
if (preloaded === entry) preloaded = void 0;
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
const loading = ref(false);
|
|
54
|
-
async function onClick() {
|
|
55
|
-
let text = __props.value;
|
|
56
|
-
if (typeof text === "function") {
|
|
57
|
-
const pending = preloaded?.text ?? callValue(text);
|
|
58
|
-
preloaded = void 0;
|
|
59
|
-
text = typeof pending === "string" ? pending : () => pending;
|
|
60
|
-
loading.value = typeof pending !== "string";
|
|
61
|
-
}
|
|
62
|
-
const ok = await copy(text);
|
|
63
|
-
loading.value = false;
|
|
64
|
-
announce(element(), ok ? __props.copiedLabel : __props.failedLabel, __props.duration);
|
|
65
|
-
if (ok) emit("copy");
|
|
66
|
-
else emit("error");
|
|
67
|
-
}
|
|
68
|
-
const name = computed(() => __props.label || slots.default ? void 0 : __props.copyLabel);
|
|
69
|
-
function callValue(read) {
|
|
70
|
-
try {
|
|
71
|
-
return read();
|
|
72
|
-
} catch (error) {
|
|
73
|
-
return Promise.reject(error);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
return (_ctx, _cache) => {
|
|
77
|
-
return openBlock(), createBlock(unref(Button), {
|
|
78
|
-
ref_key: "root",
|
|
79
|
-
ref: root,
|
|
80
|
-
"data-slot": "copy-button",
|
|
81
|
-
"data-variant": __props.variant,
|
|
82
|
-
"data-size": __props.size,
|
|
83
|
-
"data-copied": unref(copied) ? "" : void 0,
|
|
84
|
-
"data-loading": loading.value ? "" : void 0,
|
|
85
|
-
"aria-label": name.value,
|
|
86
|
-
disabled: __props.disabled || loading.value,
|
|
87
|
-
onClick,
|
|
88
|
-
onFocus: startPreload,
|
|
89
|
-
onPointerenter: startPreload
|
|
90
|
-
}, {
|
|
91
|
-
render: withCtx(({ props: part, children }) => [createElementVNode("button", mergeProps(part, { "data-slot": "copy-button" }), [(openBlock(), createBlock(resolveDynamicComponent(children)))], 16)]),
|
|
92
|
-
default: withCtx(() => [loading.value ? (openBlock(), createBlock(unref(LoaderCircle), {
|
|
93
|
-
key: 0,
|
|
94
|
-
"data-slot": "copy-button-icon",
|
|
95
|
-
"aria-hidden": "true"
|
|
96
|
-
})) : unref(copied) ? renderSlot(_ctx.$slots, "copied-icon", {}, () => [createVNode(unref(Check), {
|
|
97
|
-
"data-slot": "copy-button-icon",
|
|
98
|
-
"aria-hidden": "true"
|
|
99
|
-
})], void 0, 1) : renderSlot(_ctx.$slots, "icon", {}, () => [createVNode(unref(Copy), {
|
|
100
|
-
"data-slot": "copy-button-icon",
|
|
101
|
-
"aria-hidden": "true"
|
|
102
|
-
})], void 0, 2), __props.label || unref(slots).default ? (openBlock(), createElementBlock("span", _hoisted_1, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(unref(copied) && __props.label ? __props.copiedLabel : __props.label), 1)])])) : createCommentVNode("v-if", true)]),
|
|
103
|
-
_: 3
|
|
104
|
-
}, 8, [
|
|
105
|
-
"data-variant",
|
|
106
|
-
"data-size",
|
|
107
|
-
"data-copied",
|
|
108
|
-
"data-loading",
|
|
109
|
-
"aria-label",
|
|
110
|
-
"disabled"
|
|
111
|
-
]);
|
|
112
|
-
};
|
|
113
|
-
}
|
|
114
|
-
});
|
|
115
|
-
export { CopyButton_default as t };
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
// registry/core/announce.ts
|
|
2
|
-
const regionSlot = "live-announcer";
|
|
3
|
-
const hidden = "position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0";
|
|
4
|
-
function regionFor(element) {
|
|
5
|
-
const container = element.closest("[role=dialog], [role=alertdialog]") ?? element.ownerDocument.body;
|
|
6
|
-
for (const child of container.children) if (child instanceof HTMLElement && child.dataset.slot === regionSlot) return child;
|
|
7
|
-
const region = element.ownerDocument.createElement("div");
|
|
8
|
-
region.dataset.slot = regionSlot;
|
|
9
|
-
region.setAttribute("aria-live", "polite");
|
|
10
|
-
region.setAttribute("aria-atomic", "true");
|
|
11
|
-
region.style.cssText = hidden;
|
|
12
|
-
container.append(region);
|
|
13
|
-
return region;
|
|
14
|
-
}
|
|
15
|
-
function prepareAnnouncer(element) {
|
|
16
|
-
if (element) regionFor(element);
|
|
17
|
-
}
|
|
18
|
-
const clearTimers = /* @__PURE__ */ new WeakMap();
|
|
19
|
-
function announce(element, message, duration = 2e3) {
|
|
20
|
-
if (!element) return;
|
|
21
|
-
const region = regionFor(element);
|
|
22
|
-
clearTimeout(clearTimers.get(region));
|
|
23
|
-
region.textContent = "";
|
|
24
|
-
requestAnimationFrame(() => {
|
|
25
|
-
region.textContent = message;
|
|
26
|
-
});
|
|
27
|
-
clearTimers.set(region, setTimeout(() => region.textContent = "", duration));
|
|
28
|
-
}
|
|
29
|
-
export { prepareAnnouncer as n, announce as t };
|