@vite-hub/ui 0.8.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.
Files changed (130) hide show
  1. package/README.md +66 -50
  2. package/dist/{Chat-CuSthJVg.js → Chat-DYQitDw8.js} +1 -1
  3. package/dist/{ChatMessage-CFQs0v4N.js → ChatMessage-DzjHnxMT.js} +1 -1
  4. package/dist/{CodeBlockTitle-DIu8Ef3V.js → CodeBlockTitle-DX13mCTi.js} +1 -1
  5. package/dist/{CommentRow-XY3FNp30.js → CommentRow-DLW77qch.js} +2 -2
  6. package/dist/{CopyButton-Bs6DT-Z8.js → CopyButton-D-g6PWc8.js} +3 -3
  7. package/dist/{Markdown-Da5t-931.js → Markdown-3-Tvy5Kl.js} +1 -1
  8. package/dist/{MarkdownCodeBlock-BWDLOWPO.js → MarkdownCodeBlock-CALGW0iw.js} +1 -1
  9. package/dist/{MessageParts-CyJLG34y.js → MessageParts-BGSctG7Z.js} +1 -1
  10. package/dist/{MorphText-B6MWdeIv.js → MorphText-DAHAswWX.js} +1 -1
  11. package/dist/{RollNumber-CnF52zJM.js → RollNumber-CkdLiy2i.js} +1 -1
  12. package/dist/{SwapIcon-CUIq1TU5.js → SwapIcon-Bjkk7WlZ.js} +1 -1
  13. package/dist/{agent-session-2j2gbGpp.js → agent-session-D291hyRk.js} +1 -1
  14. package/dist/{avatar-stack-CoLlsmwJ.js → avatar-stack-Bi4CJPuU.js} +1 -1
  15. package/dist/{chat-session-cxUzvwdj.js → chat-session-Bl-x4c9b.js} +1 -1
  16. package/dist/{code-block-BqOEVWPh.d.ts → code-block-Bp8y-XJp.d.ts} +1 -1
  17. package/dist/{comment-composer-D_mcH3Ts.js → comment-composer-BtYrIT5W.js} +14 -19
  18. package/dist/{comment-composer-CsVOvG9j.d.ts → comment-composer-PmERtNNb.d.ts} +6 -6
  19. package/dist/{comment-layer-C3xmg-0_.d.ts → comment-layer-BgQz1ixK.d.ts} +6 -6
  20. package/dist/{comment-layer-Ci6ipGi2.js → comment-layer-T8hN_7bN.js} +11 -12
  21. package/dist/{comment-panel-DxN21VoY.d.ts → comment-panel-Vo3m6rHB.d.ts} +8 -8
  22. package/dist/{comment-selection-bar-DZAtiRZ9.js → comment-selection-bar-BMFTtI3V.js} +2 -3
  23. package/dist/{comment-thread-BzOZVqF2.js → comment-thread-CAexk1r7.js} +78 -38
  24. package/dist/{comment-thread-BmsqcjVQ.d.ts → comment-thread-Cp9k80uv.d.ts} +53 -5
  25. package/dist/{comments-BU8cTt5o.d.ts → comments-BBNiQTxK.d.ts} +4 -4
  26. package/dist/{components-B_2Q0dJ3.js → components-D44u1fsy.js} +22 -47
  27. package/dist/{config-BDQYUjjp.js → config-7CiYbXk6.js} +8 -5
  28. package/dist/{config-JmsTI7gs.d.ts → config-BYLPA0Ts.d.ts} +8 -6
  29. package/dist/{drop-field-DeIvKoJs.js → drop-field-BkoJOWR9.js} +1 -1
  30. package/dist/{editor-hXea1i46.js → editor-CE_q2Yzb.js} +89 -49
  31. package/dist/{editor-BsOTjnnN.d.ts → editor-DZxaa6vs.d.ts} +8 -7
  32. package/dist/editor.d.ts +2 -2
  33. package/dist/editor.js +2 -2
  34. package/dist/{hold-to-delete-DazElJT2.js → hold-to-delete-pyrlKzk0.js} +1 -1
  35. package/dist/{hold-to-delete-D1Vy40w5.js → hold-to-delete-sscThmPW.js} +1 -1
  36. package/dist/icon-component-ofUeRW4L.js +4 -0
  37. package/dist/{index-CffOzibW.d.ts → index-BlQsW8ZZ.d.ts} +1 -1
  38. package/dist/index.d.ts +11 -18
  39. package/dist/index.js +23 -24
  40. package/dist/{markdown-_0HhbsOo.js → markdown-CqVyNG-h.js} +2 -2
  41. package/dist/markdown-editor.d.ts +1 -1
  42. package/dist/markdown-editor.js +4 -4
  43. package/dist/markdown.js +1 -1
  44. package/dist/motion/core.d.ts +1 -1
  45. package/dist/motion/core.js +4 -4
  46. package/dist/{motion-BhARaNBB.js → motion-C8P5yWaA.js} +1 -1
  47. package/dist/{motion-core-gfsTPLbh.d.ts → motion-core-BEwxN7Il.d.ts} +0 -2
  48. package/dist/{motion-core-JZZiPKEk.js → motion-core-pkL0M4Y1.js} +3 -46
  49. package/dist/{motion-list-9vD1hSS0.js → motion-list-DDVUyVYa.js} +1 -1
  50. package/dist/motion.d.ts +1 -1
  51. package/dist/motion.js +5 -5
  52. package/dist/nuxt.d.ts +2 -4
  53. package/dist/nuxt.js +1 -33
  54. package/dist/parts/components/agent-session.js +1 -1
  55. package/dist/parts/components/avatar-stack.js +1 -1
  56. package/dist/parts/components/chat-message.js +1 -1
  57. package/dist/parts/components/chat-session.js +1 -1
  58. package/dist/parts/components/chat.js +1 -1
  59. package/dist/parts/components/code-block.d.ts +1 -1
  60. package/dist/parts/components/code-block.js +1 -1
  61. package/dist/parts/components/comment-composer.d.ts +1 -1
  62. package/dist/parts/components/comment-composer.js +1 -1
  63. package/dist/parts/components/comment-layer.d.ts +1 -1
  64. package/dist/parts/components/comment-layer.js +1 -1
  65. package/dist/parts/components/comment-panel.d.ts +1 -1
  66. package/dist/parts/components/comment-panel.js +6 -7
  67. package/dist/parts/components/comment-selection-bar.js +1 -1
  68. package/dist/parts/components/comment-thread.d.ts +1 -1
  69. package/dist/parts/components/comment-thread.js +1 -1
  70. package/dist/parts/components/comments.d.ts +5 -5
  71. package/dist/parts/components/comments.js +4 -4
  72. package/dist/parts/components/copy-button.js +1 -1
  73. package/dist/parts/components/drop-field.js +1 -1
  74. package/dist/parts/components/hold-to-delete.js +1 -1
  75. package/dist/parts/components/markdown.js +1 -1
  76. package/dist/parts/components/message-parts.js +1 -1
  77. package/dist/parts/components/motion-list.d.ts +1 -1
  78. package/dist/parts/components/motion-list.js +1 -1
  79. package/dist/parts/components/motion.d.ts +2 -2
  80. package/dist/parts/components/motion.js +4 -4
  81. package/dist/parts/components/progress.js +1 -1
  82. package/dist/parts/components/prompt-input.d.ts +1 -1
  83. package/dist/parts/components/sync-status.js +1 -1
  84. package/dist/parts/playground/share.js +0 -1
  85. package/dist/parts/workspace/browser-support-notice.d.ts +2 -2
  86. package/dist/parts/workspace/browser-support-notice.js +4 -4
  87. package/dist/parts/workspace/codemirror.js +0 -4
  88. package/dist/parts/workspace/connect-panel.js +2 -3
  89. package/dist/parts/workspace/file-icons.js +0 -8
  90. package/dist/parts/workspace/runners/web-container.js +2 -2
  91. package/dist/parts/workspace/workspace-bar.d.ts +1 -1
  92. package/dist/parts/workspace/workspace-bar.js +2 -3
  93. package/dist/parts/workspace/workspace-boot-status.js +1 -1
  94. package/dist/parts/workspace/workspace-editor-head.js +2 -3
  95. package/dist/parts/workspace/workspace-examples.js +4 -5
  96. package/dist/parts/workspace/workspace-file-tree.d.ts +1 -1
  97. package/dist/parts/workspace/workspace-guide.d.ts +1 -1
  98. package/dist/parts/workspace/workspace-guide.js +3 -4
  99. package/dist/parts/workspace/workspace-preview.d.ts +1 -1
  100. package/dist/parts/workspace/workspace-preview.js +2 -4
  101. package/dist/parts/workspace/workspace-shell.d.ts +1 -1
  102. package/dist/parts/workspace/workspace-shell.js +2 -7
  103. package/dist/parts/workspace/workspace-sidebar.d.ts +3 -3
  104. package/dist/parts/workspace/workspace-sidebar.js +5 -6
  105. package/dist/parts/workspace/workspace-start.d.ts +1 -1
  106. package/dist/parts/workspace/workspace-start.js +2 -3
  107. package/dist/parts/workspace/workspace-steps.js +6 -7
  108. package/dist/parts/workspace/workspace-terminal.js +0 -6
  109. package/dist/parts/workspace/workspace.d.ts +5 -5
  110. package/dist/parts/workspace/workspace.js +15 -18
  111. package/dist/{progress-8P8RLYMy.js → progress-D7CyDkLW.js} +1 -1
  112. package/dist/{prompt-input-j4OFTF5p.d.ts → prompt-input-DZM3E6WP.d.ts} +2 -2
  113. package/dist/{ring-B0nZBnU0.js → ring-C5lNUEAG.js} +1 -1
  114. package/dist/runtime/nuxt-plugin.js +27 -1
  115. package/dist/{stand-ins-CuKM1UH1.js → stand-ins-C2oSoNwV.js} +29 -84
  116. package/dist/styles.css +27 -9
  117. package/dist/{sync-status-B29eG_n-.js → sync-status-D27Qt7mk.js} +1 -1
  118. package/dist/theme-focus-ring.css +1 -1
  119. package/dist/{tween-1W-LlKk9.js → tween-DGAmrS3r.js} +0 -2
  120. package/dist/{vue-BdA18K5-.js → vue-D70TZJhJ.js} +1 -1
  121. package/dist/{workspace-boot-status-CyGlJS06.js → workspace-boot-status-BDkpubHd.js} +0 -1
  122. package/dist/{workspace-shell-B4A7CINd.d.ts → workspace-shell-CwEQT_1s.d.ts} +1 -1
  123. package/dist/workspace.d.ts +1 -1
  124. package/dist/workspace.js +1 -1
  125. package/package.json +10 -15
  126. package/dist/nuxt-ui-D3Qda35W.js +0 -22
  127. package/dist/theme.css +0 -379
  128. package/dist/theme.d.ts +0 -410
  129. package/dist/theme.js +0 -290
  130. package/dist/ui-components-CKQAPI-W.js +0 -7
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  [![license](https://img.shields.io/static/v1?label=license&message=Apache-2.0&color=blue)](https://github.com/vite-hub/vitehub/blob/main/LICENSE)
6
6
  [![docs](https://img.shields.io/static/v1?label=docs&message=vitehub.dev&color=blue)](https://vitehub.dev/docs)
7
7
 
8
- Vue primitives for AI chat, traces, diffs, and file trees. The styled components render [ui-sdk](https://ui-sdk.dev) components by default, or the [Nuxt UI](https://ui.nuxt.com/) ones that an app passes, and render [AI SDK](https://ai-sdk.dev/) message contracts; the headless entry point provides message-scrolling behavior without the styled component layer.
8
+ Vue primitives for AI chat, traces, diffs, and file trees. The styled components render [ui-sdk](https://ui-sdk.dev) components, styled by the `@vite-hub/kit` style family, and render [AI SDK](https://ai-sdk.dev/) message contracts; the headless entry point provides message-scrolling behavior without the styled component layer.
9
9
 
10
10
  `Markdown` accepts a string or a parsed Content page. Comark UI block components and document styles are bundled, so readers do not install Comark packages or assemble a component map. `vite-hub/nuxt` auto-imports the primitive; Vite apps import it from `@vite-hub/ui`.
11
11
 
@@ -25,24 +25,23 @@ Markdown images and image attachments use compact thumbnails with an expanded pr
25
25
  | `@vite-hub/ui/motion` | The motion layer: press, toggle, select, drag, and appear motion by role, the shared spring engine, and reduced motion. No Vue, so a plain TypeScript page or a shadow root can use it | Nothing: `createViteHubUI()` and the Nuxt module install it |
26
26
  | `@vite-hub/ui/motion/core` | The same layer, where `installMotion(root, { effects })` runs only the effects that you list, such as `pressEffect`, so a small script bundles only those | Which effects the script runs |
27
27
  | `@vite-hub/ui/playground` | Share links and zips for any playground, with no UI. It runs in Node too | Where the links and zips go |
28
- | `@vite-hub/ui/theme` and `@vite-hub/ui/theme.css` | `vitehubTheme`, the Nuxt UI app config, and the tokens and focus ring. The tokens use shadcn/ui names, such as `--background` and `--radius`, which an app can override. Import the theme in `nuxt.config` or `app.config` | Loading Nuxt UI and Tailwind CSS |
29
28
  | `@vite-hub/ui/vite` | Vue with Vite setup | Configures the Comark Vite plugin |
30
- | `@vite-hub/ui/styles.css` | The styles of every part | The `@vite-hub/kit` style family, or Tailwind CSS and Nuxt UI when the app passes Nuxt UI components |
29
+ | `@vite-hub/ui/styles.css` | The styles of every part | The `@vite-hub/kit` style family: `default.css`, or `default.scoped.css` next to Nuxt UI |
31
30
  | `@vite-hub/ui/comment-marks.css` | Comment pins, areas, and text highlights in plain CSS, for a page or a shadow root without Vue. `styles.css` includes it | Rendering the marks with their data attributes |
32
31
 
33
32
  Import components from the root. A production build keeps only the components that the app imports. `markdown-editor` and `workspace` have their own entries because their dependencies are large, and a chat page must not load them. The components do not need a ViteHub Agent: `Chat` and `PromptInput` render the messages and status of any AI SDK chat, such as `new Chat()` of `@ai-sdk/vue` on a route that returns `streamText().toUIMessageStreamResponse()`.
34
33
 
35
- `vite-hub/nuxt` registers the `vitehub` Iconify collection, so `i-vitehub-kv` works in `UIcon`. The icon rail of ViteHub docs and the Console is in `@vite-hub/docs/primitive-rail`. Its styles stay in `@vite-hub/ui/styles.css`.
34
+ `vite-hub/nuxt` registers the `vitehub` Iconify collection, so `i-vitehub-kv` works in the `Icon` component of `@nuxt/icon`. The icon rail of ViteHub docs and the Console is in `@vite-hub/docs/primitive-rail`. Its styles stay in `@vite-hub/ui/styles.css`.
36
35
 
37
36
  The parts `Message`, `Bubble`, `Marker`, `Trace`, and `Attachment` follow the [shadcn/ui agentic components](https://ui.shadcn.com/docs/changelog/2026-10-ai-elements): the same part names and `data-slot` attributes. `Message`, `Bubble`, `Attachment`, and `PromptInput` are also `@vitehub` registry items, with the props of the ViteHub contract. Their default styles map shadcn/ui tokens to Nuxt UI tokens and live in the `components` layer of `styles.css`, so Tailwind utility classes on a part override them. Import them under another name, for example `import { Message as VhMessage } from "@vite-hub/ui"`, when the application already has a `Message` or `Trace` component.
38
37
 
39
- The package declares `vue` and `ai` as required peers. The Vite integration requires `vite`, an optional peer. The styled components need no Nuxt UI: they render the ui-sdk components unless the app passes others (see [the ui-sdk set](#the-ui-sdk-set)).
38
+ The package declares `vue` and `ai` as required peers. The Vite integration requires `vite`, an optional peer. The styled components need no Nuxt UI. They render the ui-sdk components and need the kit styles (see [the ui-sdk components](#the-ui-sdk-components)).
40
39
 
41
40
  `RelativeTime` shows the full date in a ui-sdk tooltip, the `@vitehub/tooltip` item, once it mounts. Set `plain` to leave it out.
42
41
 
43
42
  ## Edit Markdown
44
43
 
45
- `MarkdownEditor` from `@vite-hub/ui/markdown-editor` edits Markdown with [comark-ui's editor](https://comark-ui.onmax.me/guide/editor/), a bubble toolbar, a "/" menu, and a drag handle. The editor uses ui-sdk parts unless the app overrides them. Bind the Markdown with `v-model`, or pass `editor` with a Tiptap editor the app made, such as a Realtime room's. A document that the editor can't save unchanged opens read-only.
44
+ `MarkdownEditor` from `@vite-hub/ui/markdown-editor` edits Markdown with [comark-ui's editor](https://comark-ui.onmax.me/guide/editor/), a bubble toolbar, a "/" menu, and a drag handle. The editor uses ui-sdk parts. Bind the Markdown with `v-model`, or pass `editor` with a Tiptap editor the app made, such as a Realtime room's. A document that the editor can't save unchanged opens read-only.
46
45
 
47
46
  Pass `upload` to take pasted and dropped images, video, and audio, and to add Image to the "/" menu, which opens the file picker. Each file shows a placeholder with its percentage only on your screen, so a collaborative room never holds a half-uploaded file. A string is a route that returns `blob.handleUpload()`, and the store must be served (`blob.serve`) so the file has a URL:
48
47
 
@@ -76,7 +75,7 @@ export default defineEventHandler(async (event) => {
76
75
 
77
76
  `upload` also takes a function, `(file, progress) => Promise<url>`, for any other storage; `blobUpload(route)` is the one a string uses. The default slot receives `{ editor }` for more menus. The entry isn't in the root barrel, so pages that only render Markdown don't load Tiptap. It needs these Tiptap packages: `@tiptap/core`, `@tiptap/pm`, `@tiptap/vue-3`, `@tiptap/starter-kit`, `@tiptap/extension-image`, `@tiptap/extension-list`, `@tiptap/extension-table`, `@tiptap/extension-drag-handle`, `@tiptap/extension-drag-handle-vue-3`, and `@floating-ui/dom`. The `@vitehub/markdown-editor` item adds them to the app. Start without `v-model` with `defaultValue`. A failed upload emits `error` with `{ error, file }`.
78
77
 
79
- The menus run each item's `kind`, such as `{ kind: "heading", level: 2 }`, through the handlers that the editor provides. `createEditorHandlers()` returns them, and `mapEditorItems(editor, items)` turns editor items into dropdown entries with `active`, `disabled`, and `onSelect`, as Nuxt UI's `mapEditorItems()` does. Provide your own under `editorHandlersKey` to add kinds; both sets read them.
78
+ The menus run each item's `kind`, such as `{ kind: "heading", level: 2 }`, through the handlers that the editor provides. `createEditorHandlers()` returns them, and `mapEditorItems(editor, items)` turns editor items into dropdown entries with `active`, `disabled`, and `onSelect`, as Nuxt UI's `mapEditorItems()` does. Provide your own under `editorHandlersKey` to add kinds. The editor parts read them.
80
79
 
81
80
  ## Run an app in the browser
82
81
 
@@ -181,34 +180,37 @@ const runner = render(async files => ({ html: await marked.parse(files["content.
181
180
 
182
181
  ## Nuxt
183
182
 
184
- Add the package, ViteHub, and the runtime peers to an existing Nuxt application:
183
+ Add the package, ViteHub, the kit, and the runtime peers to an existing Nuxt application:
185
184
 
186
185
  ```bash
187
- pnpm add vite-hub @vite-hub/ui @nuxt/ui ai tailwindcss vue @iconify-json/lucide
186
+ pnpm add vite-hub @vite-hub/ui @vite-hub/kit ai vue
188
187
  ```
189
188
 
190
- Register Nuxt UI and `vite-hub/nuxt`:
189
+ Register `vite-hub/nuxt`:
191
190
 
192
191
  ```ts
193
192
  // nuxt.config.ts
194
193
  export default defineNuxtConfig({
195
- modules: ["@nuxt/ui", "vite-hub/nuxt"],
194
+ modules: ["vite-hub/nuxt"],
196
195
  css: ["~/assets/css/main.css"],
197
196
  });
198
197
  ```
199
198
 
200
- Load Tailwind, Nuxt UI, and the package styles in that order:
199
+ Load the kit style family before the package styles:
201
200
 
202
201
  ```css
203
202
  /* assets/css/main.css */
204
- @import "tailwindcss";
205
- @import "@nuxt/ui";
203
+ @layer theme, base, kit, comark, components, utilities;
204
+ @import "@vite-hub/kit/styles/tokens.css";
205
+ @import "@vite-hub/kit/styles/default.css" layer(kit);
206
206
  @import "@vite-hub/ui/styles.css";
207
207
  ```
208
208
 
209
- The parts render the ui-sdk components by default. To keep Nuxt UI's look, pass the Nuxt UI components in a plugin, as [Nuxt UI apps](#nuxt-ui-apps) shows.
209
+ Nuxt UI is optional. The parts render the ui-sdk components, so they need the kit styles also in an app with Nuxt UI. For that app, see [Nuxt UI apps](#nuxt-ui-apps).
210
210
 
211
- `vite-hub/nuxt` gives the components their icon names and adds the icons that they use to the `@nuxt/icon` client bundle, because `@nuxt/icon` does not scan dependencies. It also registers the `vitehub` collection, so names such as `<UIcon name="i-vitehub-kv" />` keep working. The Lucide collection must be installed in the application. It auto-imports public components such as `Chat`, `Markdown`, and `TraceRun`. No separate Vue plugin registration is needed. The stylesheet stays an explicit import.
211
+ `vite-hub/nuxt` auto-imports public components such as `Chat`, `Markdown`, and `TraceRun`. No separate Vue plugin registration is needed. The stylesheet stays an explicit import.
212
+
213
+ If the app enables `@nuxt/icon`, `vite-hub/nuxt` adds the component icons to its client bundle and registers the `vitehub` collection for names such as `<Icon name="i-vitehub-kv" />`. Install `@iconify-json/lucide` if the app uses Lucide names through `@nuxt/icon`. The default ViteHub parts do not need that collection installed in the app.
212
214
 
213
215
  `@vite-hub/ui/nuxt` is internal. `vite-hub/nuxt` and `@vite-hub/docs/nuxt` load it, and it can change in any release. Do not add it to Nuxt `modules`.
214
216
 
@@ -256,7 +258,7 @@ Load the kit style family before the package styles:
256
258
  @import "@vite-hub/ui/styles.css";
257
259
  ```
258
260
 
259
- For Nuxt UI's look, see [Nuxt UI apps](#nuxt-ui-apps).
261
+ For an app with Nuxt UI, see [Nuxt UI apps](#nuxt-ui-apps).
260
262
 
261
263
  Unlike `vite-hub/nuxt`, the Vite integration does not auto-register ViteHub UI components. Import them from `@vite-hub/ui` in each component or use the application's component-registration convention.
262
264
 
@@ -312,24 +314,24 @@ Without Vue, `createMotionList`, `createProgress`, `createDropField`, and `creat
312
314
 
313
315
  ### Labels, icons, counts, and rings
314
316
 
315
- The layer also morphs what changes with state. When the label of a `UButton` changes, such as `:label="loading ? 'Publishing' : 'Publish'"`, its letters change one at a time and the button's width follows with a spring. When Vue draws another icon into the button's leading or trailing icon, such as the spinner of `loading`, the old icon blurs out and the spinner draws its stroke in. The app only changes the label and the icon. With `@nuxt/icon` in CSS mode an icon is a class, which the layer does not watch, so the icon changes at once there; use `SwapIcon` in the button's `leading` slot.
317
+ The layer also morphs what changes with state. When the label of a button changes, such as `:label="loading ? 'Publishing' : 'Publish'"`, its letters change one at a time and the button's width follows with a spring. When Vue draws another icon into the button's leading or trailing icon, such as the spinner of `loading`, the old icon blurs out and the spinner draws its stroke in. The app only changes the label and the icon. With `@nuxt/icon` in CSS mode an icon is a class, which the layer does not watch, so the icon changes at once there; use `SwapIcon` in the button's `leading` slot.
316
318
 
317
319
  For everything else, use the component or the helper:
318
320
 
319
321
  | Vue | Helper in `@vite-hub/ui/motion` | Use it for |
320
322
  | --- | --- | --- |
321
- | `<MorphText :text="copied ? 'Copied' : 'Copy link'" />` | `morphText(element, text)` | A label outside a `UButton` |
322
- | `<SwapIcon :name="icon" enter="draw" v-slot="{ name }"><UIcon :name="name" /></SwapIcon>` | `swapIcon(container, icon, { exit, enter })` | An icon that says what happened: `exit: "right"` for an arrow that leaves the way it points, `enter: "draw"` for a check or a spinner |
323
+ | `<MorphText :text="copied ? 'Copied' : 'Copy link'" />` | `morphText(element, text)` | A label outside a button |
324
+ | `<SwapIcon :name="icon" enter="draw" v-slot="{ name }"><Icon :name="name" /></SwapIcon>` | `swapIcon(container, icon, { exit, enter })` | An icon that says what happened: `exit: "right"` for an arrow that leaves the way it points, `enter: "draw"` for a check or a spinner |
323
325
  | `<RollNumber :value="count" />` | `rollNumber(element, value, format?)` | A count: only the changed digits roll, up when it grows, down when it shrinks |
324
- | `<UButton v-ring="saved" />` | `ring(element)` | A finished action, such as saved or copied: a ring in the border color grows once and fades. A button joined to others in a `UFieldGroup` rings the whole group |
326
+ | `<button v-ring="saved">` | `ring(element)` | A finished action, such as saved or copied: a ring in the border color grows once and fades. A button joined to others in a field group rings the whole group |
325
327
 
326
328
  `CopyButton` uses all of them. Each helper can be called again in the middle of its motion and continues from where it is. The element keeps the final text for screen readers the whole time and holds plain text again at the end. Under reduced motion a label, an icon, or a digit crossfades in 150ms, and there is no ring. Inside `data-motion="none"` the change happens at once.
327
329
 
328
330
  The entry also has the spring engine (`createSpring`, `springs.snappy`, `springs.soft`), reduced motion (`prefersReducedMotion`, `onReducedMotionChange`, `forceReducedMotion`), `setMotionSlowFactor(4)` to watch an effect at ¼×, and `defineMotionEffect` to add an effect for a role. The motion page in `test/browser/motion/` renders every role; `pnpm --filter @vite-hub/ui test:motion` checks it in Chromium, and `MOTION_RECORD=<dir>` records each press at ¼×.
329
331
 
330
- ## The ui-sdk set
332
+ ## The ui-sdk components
331
333
 
332
- The styled parts render a few components by Nuxt UI's names: `UButton`, `UIcon`, `UInput`, `UModal`, `UTabs`, `UTooltip`, and `UDropdownMenu`. By default they render `uiSdkComponents`, the same names built on [ui-sdk](https://ui-sdk.dev) and styled by the `@vite-hub/kit` style family. The editor's `UEditorToolbar`, `UEditorSuggestionMenu`, and `UEditorDragHandle` defaults live in the editor entry so other parts do not pull in Tiptap. Load the kit styles:
334
+ The styled parts render [ui-sdk](https://ui-sdk.dev) components for their buttons, icons, fields, dialogs, tabs, tooltips, and menus. The `@vite-hub/kit` style family styles them. The editor toolbar, the "/" menu, and the drag handle are in the editor entry, so other parts do not load Tiptap. Load the kit styles:
333
335
 
334
336
  ```css
335
337
  /* src/assets/main.css */
@@ -339,40 +341,54 @@ The styled parts render a few components by Nuxt UI's names: `UButton`, `UIcon`,
339
341
  @import "@vite-hub/ui/styles.css";
340
342
  ```
341
343
 
342
- - `UIcon` draws the Lucide icons that the parts use. To show other names, such as your own in `createViteHubUI({ icons })`, pass your own: `createViteHubUI({ components: { UIcon: MyIcon } })`.
344
+ - The parts draw the Lucide icons that they use. To draw other icon names, such as your own in `createViteHubUI({ icons })` pass a component that takes the icon name in its `name` prop. See [Icons](#icons).
343
345
  - The buttons and fields keep the kit's `data-slot` (`button`, `input`), so a part's own name moves to `data-part`, for example `data-part="copy-button"`.
344
- - `UTooltip` puts ui-sdk's `Tooltip` on the trigger. The content opens on hover and focus, above the trigger by default.
345
- - The set also replaces the editor parts of `MarkdownEditor`: `UEditorToolbar` on ui-sdk's `Toolbar` and `Toggle`, which says the pressed state with `aria-pressed`, `UEditorSuggestionMenu` on ui-sdk's `TriggerMenu`, a listbox at the caret while focus stays in the editor, and `UEditorDragHandle` on Tiptap's drag handle. They take the props, slots, and events of Nuxt UI's, and load on first render.
346
+ - A tooltip puts ui-sdk's `Tooltip` on the trigger. The content opens on hover and focus, above the trigger by default.
347
+ - The editor parts of `MarkdownEditor` are on ui-sdk too. The toolbar uses `Toolbar` and `Toggle`, which say the pressed state with `aria-pressed`. The "/" menu uses `TriggerMenu`, a listbox at the caret while focus stays in the editor. The drag handle uses Tiptap's drag handle. They load on first render.
346
348
  - In the "/" menu, Escape closes the list until the trigger is typed again or Control+Space reopens it, and a disabled item can be highlighted but not chosen, as the listbox pattern asks.
347
349
 
348
- A part uses a component given to `createViteHubUI({ components })` first, then a global one with the same name from `app.component()`, then the ui-sdk one.
350
+ The parts do not use components that the app registers, such as Nuxt UI's `UButton`.
349
351
 
350
- ### Nuxt UI apps
352
+ ### Icons
351
353
 
352
- A Nuxt UI app keeps Nuxt UI's look when it passes the Nuxt UI components by name. The ViteHub Console and the docs do this for now. `@nuxt/ui/vue-plugin` registers no components, so pass them:
353
-
354
- In Nuxt, [register the overrides globally](https://vitehub.dev/docs/ui/installation#nuxt-ui-components) without reinstalling the ViteHub UI plugin. In Vue with Vite, pass the overrides when you install the plugin in `src/main.ts`:
354
+ Pass your icon component to `createViteHubUI({ iconComponent })`. The parts give it the icon name in its `name` prop, such as `i-lucide-x`:
355
355
 
356
356
  ```ts fragment
357
357
  import { createViteHubUI } from "@vite-hub/ui";
358
- import { defineAsyncComponent } from "vue";
359
-
360
- app.use(createViteHubUI({
361
- components: {
362
- UButton: defineAsyncComponent(() => import("@nuxt/ui/components/Button.vue")),
363
- UDropdownMenu: defineAsyncComponent(() => import("@nuxt/ui/components/DropdownMenu.vue")),
364
- UIcon: defineAsyncComponent(() => import("@nuxt/ui/components/Icon.vue")),
365
- UInput: defineAsyncComponent(() => import("@nuxt/ui/components/Input.vue")),
366
- UModal: defineAsyncComponent(() => import("@nuxt/ui/components/Modal.vue")),
367
- UTabs: defineAsyncComponent(() => import("@nuxt/ui/components/Tabs.vue")),
368
- UTooltip: defineAsyncComponent(() => import("@nuxt/ui/components/Tooltip.vue")),
369
- },
370
- }));
358
+ import MyIcon from "./MyIcon.vue";
359
+
360
+ app.use(createViteHubUI({ iconComponent: MyIcon }));
371
361
  ```
372
362
 
373
- Add `UEditorToolbar`, `UEditorSuggestionMenu`, and `UEditorDragHandle` for `MarkdownEditor`. Load Tailwind CSS and `@nuxt/ui` before `@vite-hub/ui/styles.css`, and do not load the kit's `default.css` next to Nuxt UI. In Vue with Vite, add `@nuxt/ui/vite` to the plugins before `viteHubUI()`.
363
+ In Nuxt, the module draws the icons with a `UIcon` that the app registers, else with the `Icon` component of `@nuxt/icon`, else with the Lucide icons that the parts draw.
364
+
365
+ ### Nuxt UI apps
366
+
367
+ The parts do not render Nuxt UI components. In an app that also renders Nuxt UI, load the scoped kit family, `@vite-hub/kit/styles/default.scoped.css`, instead of `default.css`. It styles only the elements inside an element with the `ui-sdk` class, so the component styles of Nuxt UI stay as they are outside it:
368
+
369
+ ```css
370
+ /* assets/css/main.css */
371
+ @layer theme, base, kit, comark, components, utilities;
372
+ @import "tailwindcss";
373
+ @import "@nuxt/ui";
374
+ @import "@vite-hub/kit/styles/tokens.css";
375
+ @import "@vite-hub/kit/styles/default.scoped.css" layer(kit);
376
+ @import "@vite-hub/ui/styles.css";
377
+ ```
378
+
379
+ ```vue
380
+ <template>
381
+ <section class="ui-sdk">
382
+ <Chat :messages="messages" />
383
+ </section>
384
+ </template>
385
+ ```
386
+
387
+ `tokens.css` is global, not scoped. It sets the shadcn/ui names and the `--ui-*` text, background, border, and status tokens on `:root`, so Nuxt UI's colors take the ViteHub values on the whole page. Only the component rules of the kit family stay inside the scope root.
388
+
389
+ Put no Nuxt UI component inside a scope root. A popup stays inside its root. See [Next to Nuxt UI](../kit/README.md#next-to-nuxt-ui) in the kit README for the rules of the scope root.
374
390
 
375
- `pnpm --filter @vite-hub/ui test:ui-sdk` renders every part that uses these names with the default set and drives each one with the keyboard. `pnpm --filter @vite-hub/ui test:editor` drives the editor parts with the keyboard and the pointer, with Nuxt UI's parts and with the set.
391
+ `pnpm --filter @vite-hub/ui test:ui-sdk` renders every part with the ui-sdk components and drives each one with the keyboard. It fails when a page loads `@nuxt/ui`. `pnpm --filter @vite-hub/ui test:editor` drives the editor parts with the keyboard and the pointer.
376
392
 
377
393
  ## Registry
378
394
 
@@ -401,7 +417,7 @@ An item component follows one contract: compound parts, `data-slot` on the root,
401
417
 
402
418
  `core` also writes `:where([data-slot]) { box-sizing: border-box }` in `@layer components` into the app's CSS. That rule changes nothing, but it keeps the `components` layer after `base`. Without it, Tailwind 4 emits an empty `components` layer as the statement `@layer components;`, and when the app's CSS keeps an external `@import`, such as the Google Fonts line from `shadcn-vue init`, Vite's postcss-import (16.2.0 in Vite 8.4) moves that statement to the top. Then `components` is the first layer, and Tailwind's Preflight in `base` removes the padding and background of a button.
403
419
 
404
- `node --test test/registry-install/install.mjs` (from the repository root) runs `build:registry` and serves `docs/public/r/` on a local port and makes four apps: Vite + Vue + Tailwind 4 from `init --preset`, Nuxt 5, Vite with stock shadcn-vue and Reka UI, and Nuxt 5 with Nuxt UI. It runs `shadcn-vue@2.9.0 add` for every item, installs `@vite-hub/ui` and `@vite-hub/comments` packed from this checkout, builds each app, and renders every example in Chromium. Build UI and its workspace dependencies first with `corepack pnpm exec vp run --cache -t @vite-hub/ui#build`. The check fails on a console error, a root without `data-slot`, a copy button that lost its padding or background to Preflight, or Reka UI in the item files of the first two apps. It needs the npm registry. `REGISTRY_APPS=vite-vue,nuxt` runs some apps, `REGISTRY_INSTALL_DIR` keeps them, and `REGISTRY_SCREENSHOTS` saves a screenshot of each.
420
+ `node --test test/registry-install/install.mjs` (from the repository root) runs `build:registry` and serves `docs/public/r/` on a local port and makes four apps: Vite + Vue + Tailwind 4 from `init --preset`, Nuxt 5, Vite with stock shadcn-vue and Reka UI, and Nuxt 5 with Nuxt UI. It runs `shadcn-vue@2.9.0 add` for every item, installs `@vite-hub/ui`, `@vite-hub/comments`, and their required workspace dependencies from tarballs packed from this checkout, builds each app, and renders every example in Chromium. Build UI and its workspace dependencies first with `corepack pnpm exec vp run --cache -t @vite-hub/ui#build`. The check fails on a console error, a root without `data-slot`, a copy button that lost its padding or background to Preflight, or Reka UI in the item files of the first two apps. It needs the npm registry. `REGISTRY_APPS=vite-vue,nuxt` runs some apps, `REGISTRY_INSTALL_DIR` keeps them, and `REGISTRY_SCREENSHOTS` saves a screenshot of each.
405
421
 
406
422
  ## Verify the setup
407
423
 
@@ -425,16 +441,16 @@ The page displays **ViteHub UI is ready.** in bold. This confirms the public com
425
441
  - The components render state supplied by the application. They do not send messages, fetch Agent Invocations, choose routes, persist sessions, or authorize access to instruction and trace data.
426
442
  - `PromptInput` submits only in the ready state after attachment conversion finishes. It preserves the draft while blocked; Stop and Retry remain separate actions. The default slot of `PromptInput` receives `canSubmit` and `preparing` for a custom submit button. The application owns draft recovery and clearing after a send; unmount the prompt when switching sessions with pending file reads.
427
443
  - Primary chat and trace output supports Vue server rendering. Scrolling observers, clipboard actions, and attachment conversion use browser APIs and become interactive after hydration. Upload and persist raw files yourself when data URLs are not appropriate.
428
- - The styled components depend on the ui-sdk components and the kit tokens, or on the Nuxt UI components and tokens that the app passes. `@vite-hub/ui/styles.css` adds ViteHub presentation but does not replace those styles.
444
+ - The styled components depend on the ui-sdk components and the kit styles. `@vite-hub/ui/styles.css` adds ViteHub presentation but does not replace those styles.
429
445
  - The package supplies accessible defaults for its message log, prompt, scroll controls, lists, and built-in actions. The application remains responsible for accessible names on custom controls and slots, meaningful status and error copy, focus behavior around application-owned navigation, and testing the completed interface.
430
446
  - `FileTree` names its search input **Search files** by default. Pass `search-label` for a localized or context-specific accessible name.
431
- - The headless entry point owns scrolling behavior, not appearance. Importing `@vite-hub/ui/headless` does not load the stylesheet or register Nuxt UI components.
447
+ - The headless entry point owns scrolling behavior, not appearance. Importing `@vite-hub/ui/headless` does not load the stylesheet or the ui-sdk components.
432
448
 
433
449
  ## Documentation
434
450
 
435
451
  - [AI components overview and layer ownership](https://vitehub.dev/docs/ui/ai-components)
436
452
  - [Installation and package defaults](https://vitehub.dev/docs/ui/installation)
437
- - [Icons](https://vitehub.dev/docs/ui/installation#icons): the parts read Nuxt UI's `appConfig.ui.icons` and, for names Nuxt UI does not have, `appConfig.viteHubUI.icons`
453
+ - [Icons](https://vitehub.dev/docs/ui/installation#icons): in Nuxt the parts read their icon names from `appConfig.ui.icons` and `appConfig.viteHubUI.icons`, and `createViteHubUI({ iconComponent })` draws names that the parts do not draw
438
454
  - [Chat and transport boundary](https://vitehub.dev/docs/ui/chat)
439
455
  - [Prompt input](https://vitehub.dev/docs/ui/prompt-input) and [attachments](https://vitehub.dev/docs/ui/attachments)
440
456
  - [Headless message scroller](https://vitehub.dev/docs/ui/message-scroller)
@@ -1,4 +1,4 @@
1
- import { t as ChatMessage_default } from "./ChatMessage-CFQs0v4N.js";
1
+ import { t as ChatMessage_default } from "./ChatMessage-DzjHnxMT.js";
2
2
  import { a as MessageScroller_default, i as MessageScrollerButton_default, n as MessageScrollerItem_default, r as MessageScrollerContent_default, t as MessageScrollerViewport_default } from "./MessageScrollerViewport-BaTlWLki.js";
3
3
  import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, mergeProps, openBlock, renderList, renderSlot, toDisplayString, unref, useSlots, withCtx } from "vue";
4
4
  import { ChevronDown } from "@lucide/vue";
@@ -1,6 +1,6 @@
1
1
  import { n as Bubble_default, t as BubbleContent_default } from "./BubbleContent-B1a4e3vE.js";
2
2
  import { a as Message_default, i as MessageAvatar_default, n as MessageFooter_default, r as MessageContent_default, t as MessageHeader_default } from "./MessageHeader-CJ9eBHSS.js";
3
- import { t as MessageParts_default } from "./MessageParts-CyJLG34y.js";
3
+ import { t as MessageParts_default } from "./MessageParts-BGSctG7Z.js";
4
4
  import { computed, createBlock, createCommentVNode, createElementBlock, createSlots, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderList, renderSlot, unref, useSlots, withCtx } from "vue";
5
5
  // registry/chat-message/ChatMessage.vue?vue&type=script&setup=true&lang.ts
6
6
  const _hoisted_1 = [
@@ -1,4 +1,4 @@
1
- import { t as CopyButton_default } from "./CopyButton-Bs6DT-Z8.js";
1
+ import { t as CopyButton_default } from "./CopyButton-D-g6PWc8.js";
2
2
  import { createBlock, createElementBlock, createSlots, defineComponent, guardReactiveProps, normalizeProps, openBlock, renderSlot, withCtx } from "vue";
3
3
  // registry/code-block/CodeBlockActions.vue?vue&type=script&setup=true&lang.ts
4
4
  const _hoisted_1$2 = { "data-slot": "code-block-actions" };
@@ -1,5 +1,5 @@
1
- import { t as AvatarStack_default } from "./avatar-stack-CoLlsmwJ.js";
2
- import { c as writerName, l as writerPerson, o as plainText } from "./comment-composer-D_mcH3Ts.js";
1
+ import { t as AvatarStack_default } from "./avatar-stack-Bi4CJPuU.js";
2
+ import { c as writerName, l as writerPerson, o as plainText } from "./comment-composer-BtYrIT5W.js";
3
3
  import { t as RelativeTime_default } from "./relative-time-BnJfjeEm.js";
4
4
  import { Fragment, computed, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, openBlock, renderSlot, toDisplayString, unref } from "vue";
5
5
  // src/internal/comment-attachments.ts
@@ -1,6 +1,6 @@
1
- import { m as prepareAnnouncer, p as announce } from "./hold-to-delete-D1Vy40w5.js";
2
- import { t as MorphText_default } from "./MorphText-B6MWdeIv.js";
3
- import { t as SwapIcon_default } from "./SwapIcon-CUIq1TU5.js";
1
+ import { m as prepareAnnouncer, p as announce } from "./hold-to-delete-sscThmPW.js";
2
+ import { t as MorphText_default } from "./MorphText-DAHAswWX.js";
3
+ import { t as SwapIcon_default } from "./SwapIcon-Bjkk7WlZ.js";
4
4
  import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, getCurrentScope, mergeProps, onMounted, onScopeDispose, openBlock, readonly, ref, renderSlot, resolveDynamicComponent, toValue, unref, useSlots, useTemplateRef, watch, withCtx } from "vue";
5
5
  import { Check, Copy, LoaderCircle } from "@lucide/vue";
6
6
  import { Button } from "@ui-sdk/vue/button";
@@ -17,7 +17,7 @@ var Markdown_default = /* @__PURE__ */ defineComponent({
17
17
  setup(__props) {
18
18
  const props = __props;
19
19
  const MarkdownRenderer = defineAsyncComponent(() => import("./markdown.js").then((module) => module.MarkdownRenderer));
20
- const MarkdownCodeBlock = defineAsyncComponent(() => import("./MarkdownCodeBlock-BWDLOWPO.js"));
20
+ const MarkdownCodeBlock = defineAsyncComponent(() => import("./MarkdownCodeBlock-CALGW0iw.js"));
21
21
  const MarkdownImage = defineAsyncComponent(() => import("./MarkdownImage-CJN3myt4.js").then((n) => n.n));
22
22
  const instance = getCurrentInstance();
23
23
  const hasParentSuspense = Boolean(instance && "suspense" in instance && instance.suspense);
@@ -1,5 +1,5 @@
1
1
  import { n as CodeBlockLine_default, r as CodeBlock_default, t as CodeBlockContent_default } from "./CodeBlockContent-BjXJm8lO.js";
2
- import { i as CodeBlockActions_default, n as CodeBlockHeader_default, r as CodeBlockCopyButton_default, t as CodeBlockTitle_default } from "./CodeBlockTitle-DIu8Ef3V.js";
2
+ import { i as CodeBlockActions_default, n as CodeBlockHeader_default, r as CodeBlockCopyButton_default, t as CodeBlockTitle_default } from "./CodeBlockTitle-DX13mCTi.js";
3
3
  import { Comment, Fragment, Text, computed, createBlock, createTextVNode, createVNode, defineComponent, h, isVNode, normalizeClass, openBlock, toDisplayString, unref, useSlots, withCtx } from "vue";
4
4
  // registry/markdown/MarkdownCodeBlock.vue
5
5
  var MarkdownCodeBlock_default = /* @__PURE__ */ defineComponent({
@@ -1,5 +1,5 @@
1
1
  import { MessagePartsRenderer } from "./message-parts.js";
2
- import { t as Markdown_default } from "./Markdown-Da5t-931.js";
2
+ import { t as Markdown_default } from "./Markdown-3-Tvy5Kl.js";
3
3
  import { t as MarkdownImage_default } from "./MarkdownImage-CJN3myt4.js";
4
4
  import { createBlock, createCommentVNode, createSlots, createVNode, defineComponent, guardReactiveProps, normalizeProps, openBlock, renderList, renderSlot, unref, useSlots, withCtx } from "vue";
5
5
  // registry/message-parts/MessageParts.vue
@@ -1,4 +1,4 @@
1
- import { b as morphText } from "./motion-core-JZZiPKEk.js";
1
+ import { b as morphText } from "./motion-core-pkL0M4Y1.js";
2
2
  import { t as elementOf } from "./element-BpjNQvZ0.js";
3
3
  import { createElementVNode, createTextVNode, defineComponent, mergeProps, renderSlot, toDisplayString, unref, watch } from "vue";
4
4
  // registry/motion/MorphText.vue
@@ -1,4 +1,4 @@
1
- import { o as rollNumber } from "./motion-core-JZZiPKEk.js";
1
+ import { o as rollNumber } from "./motion-core-pkL0M4Y1.js";
2
2
  import { t as elementOf } from "./element-BpjNQvZ0.js";
3
3
  import { createElementVNode, createTextVNode, defineComponent, mergeProps, renderSlot, shallowRef, toDisplayString, unref, watch } from "vue";
4
4
  // registry/motion/RollNumber.vue
@@ -1,4 +1,4 @@
1
- import { x as swapIcon } from "./motion-core-JZZiPKEk.js";
1
+ import { x as swapIcon } from "./motion-core-pkL0M4Y1.js";
2
2
  import { Fragment, createCommentVNode, createElementBlock, defineComponent, mergeProps, nextTick, openBlock, ref, renderList, renderSlot, useTemplateRef, watch } from "vue";
3
3
  // registry/motion/SwapIcon.vue?vue&type=script&setup=true&lang.ts
4
4
  const _hoisted_1 = ["data-icon-key", "data-spin"];
@@ -1,4 +1,4 @@
1
- import { t as Markdown_default } from "./Markdown-Da5t-931.js";
1
+ import { t as Markdown_default } from "./Markdown-3-Tvy5Kl.js";
2
2
  import { Comment, Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createSlots, createTextVNode, createVNode, defineComponent, isVNode, mergeProps, onBeforeUnmount, onMounted, openBlock, ref, renderList, renderSlot, resolveDynamicComponent, toDisplayString, unref, useAttrs, useId, useSlots, useTemplateRef, watch, withCtx } from "vue";
3
3
  import { Bot, Brain, ChevronDown, CircleX, FilePenLine, FileText, Globe, ListChecks, Maximize2, Minimize2, PanelRight, Plug, Plus, Search, Sparkles, SquareMenu, Terminal, Wrench, X } from "@lucide/vue";
4
4
  import { Tabs, TabsList, TabsPanel, TabsTab } from "@ui-sdk/vue/tabs";
@@ -1,4 +1,4 @@
1
- import { t as RollNumber_default } from "./RollNumber-CnF52zJM.js";
1
+ import { t as RollNumber_default } from "./RollNumber-CkdLiy2i.js";
2
2
  import { Fragment, computed, createCommentVNode, createElementBlock, createTextVNode, createVNode, defineComponent, normalizeStyle, openBlock, renderList, toDisplayString, unref } from "vue";
3
3
  // registry/avatar-stack/initials.ts
4
4
  function initials(name) {
@@ -1,4 +1,4 @@
1
- import { t as Chat_default } from "./Chat-CuSthJVg.js";
1
+ import { t as Chat_default } from "./Chat-DYQitDw8.js";
2
2
  import { createCommentVNode, createElementBlock, createElementVNode, createSlots, createVNode, defineComponent, guardReactiveProps, mergeProps, normalizeProps, openBlock, renderList, renderSlot, toDisplayString, unref, useSlots, withCtx } from "vue";
3
3
  // registry/chat-session/ChatSession.vue?vue&type=script&setup=true&lang.ts
4
4
  const _hoisted_1 = ["aria-label", "data-session-id"];
@@ -121,8 +121,8 @@ declare const __VLS_base$4: import("vue", { with: { "resolution-mode": "import"
121
121
  preload: BooleanConstructor;
122
122
  disabled: BooleanConstructor;
123
123
  }>> & Readonly<{}>, {
124
- size: CopyButtonSize | undefined;
125
124
  variant: CopyButtonVariant | undefined;
125
+ size: CopyButtonSize | undefined;
126
126
  disabled: boolean;
127
127
  copyLabel: string;
128
128
  copiedLabel: string;
@@ -1,11 +1,12 @@
1
1
  import { c as shakeEventName, i as consumedPointerEvents, l as swallowNextClick, n as injectComments, o as pathOf, u as useDocumentPointerDown } from "./comments-context-3js2YFl2.js";
2
- import { a as shake, i as travel, r as createMotionList } from "./motion-core-JZZiPKEk.js";
2
+ import { a as shake, i as travel, r as createMotionList } from "./motion-core-pkL0M4Y1.js";
3
3
  import { n as matchesAccept } from "./files-cuVXzWlx.js";
4
- import { t as RollNumber_default } from "./RollNumber-CnF52zJM.js";
5
- import { n as useViteHubUIIcons } from "./config-BDQYUjjp.js";
6
- import { t as useUIComponent } from "./nuxt-ui-D3Qda35W.js";
4
+ import { t as RollNumber_default } from "./RollNumber-CkdLiy2i.js";
5
+ import { r as useViteHubUIIcons } from "./config-7CiYbXk6.js";
6
+ import { r as ViteHubModal } from "./components-D44u1fsy.js";
7
+ import { n as ViteHubButton, r as ViteHubIcon } from "./stand-ins-C2oSoNwV.js";
7
8
  import { a as AttachmentActions_default, i as AttachmentContent_default, n as AttachmentMedia_default, o as AttachmentAction_default, r as AttachmentGroup_default, s as Attachment_default, t as AttachmentTitle_default } from "./AttachmentTitle-BWw0ck0T.js";
8
- import { t as AvatarStack_default } from "./avatar-stack-CoLlsmwJ.js";
9
+ import { t as AvatarStack_default } from "./avatar-stack-Bi4CJPuU.js";
9
10
  import { i as PromptInputSubmit_default, n as PromptInputToolbar_default, o as PromptInputAttach_default, r as PromptInputTextarea_default, t as PromptInput_default } from "./prompt-input-CRXEJBAK.js";
10
11
  import { computed, defineComponent, h, nextTick, onBeforeUnmount, onBeforeUpdate, onMounted, onUpdated, ref, useId, watch } from "vue";
11
12
  import { foldName } from "@vite-hub/comments/client";
@@ -40,7 +41,6 @@ function excerpt(body, length = 60) {
40
41
  // src/internal/comment-mentions.ts
41
42
  /** The tag of a mention chip in a rendered message. */
42
43
  const mentionTag = "comment-mention";
43
- /** A character that may stand before the `@` of a mention: the start of the text, a space, or an opening mark. */
44
44
  const mentionLead = /[\s([{"'“]/u;
45
45
  /** The `@…` at the caret: where its `@` sits and the words after it. Names have spaces, so the query may too. */
46
46
  function mentionQuery(text, caret) {
@@ -145,15 +145,13 @@ const ImagePreview = defineComponent({
145
145
  setup(props) {
146
146
  const failed = ref(false);
147
147
  const label = computed(() => props.alt || props.title || "Image");
148
- const UModal = useUIComponent("UModal");
149
- const UButton = useUIComponent("UButton");
150
148
  const icons = useViteHubUIIcons();
151
149
  watch(() => props.src, () => {
152
150
  failed.value = false;
153
151
  });
154
152
  return () => {
155
153
  if (!isImageUrl(props.src)) return h("span", { class: "vh-image-unavailable" }, label.value);
156
- return h(UModal, {
154
+ return h(ViteHubModal, {
157
155
  title: label.value,
158
156
  transition: false,
159
157
  ui: {
@@ -179,7 +177,7 @@ const ImagePreview = defineComponent({
179
177
  class: "vh-image-dialog__name",
180
178
  title: label.value
181
179
  }, label.value),
182
- h(UButton, {
180
+ h(ViteHubButton, {
183
181
  "aria-label": "Open original image",
184
182
  class: "vh-image-dialog__action",
185
183
  color: "neutral",
@@ -190,7 +188,7 @@ const ImagePreview = defineComponent({
190
188
  rel: "noreferrer",
191
189
  variant: "ghost"
192
190
  }),
193
- h(UButton, {
191
+ h(ViteHubButton, {
194
192
  "aria-label": "Close image preview",
195
193
  class: "vh-image-dialog__action",
196
194
  color: "neutral",
@@ -239,7 +237,6 @@ const CommentImageStack = defineComponent({
239
237
  emits: ["remove"],
240
238
  setup(props, { emit }) {
241
239
  const icons = useViteHubUIIcons();
242
- const UButton = useUIComponent("UButton");
243
240
  const root = ref();
244
241
  const cards = ref();
245
242
  const fanned = ref(false);
@@ -333,7 +330,7 @@ const CommentImageStack = defineComponent({
333
330
  closeSoon();
334
331
  },
335
332
  onKeydown: (event) => {
336
- if (event.key !== "Escape" || !fanned.value) return;
333
+ if (event.key !== "Escape" || event.defaultPrevented || !fanned.value) return;
337
334
  event.preventDefault();
338
335
  event.stopPropagation();
339
336
  setFanned(false);
@@ -382,7 +379,7 @@ const CommentImageStack = defineComponent({
382
379
  alt: image.name,
383
380
  compact: true,
384
381
  src: image.url
385
- }), h(UButton, {
382
+ }), h(ViteHubButton, {
386
383
  "aria-label": `Remove ${image.name}`,
387
384
  color: "neutral",
388
385
  "data-slot": "comment-image-stack-remove",
@@ -409,7 +406,6 @@ const placeholders = {
409
406
  edit: "Edit your comment",
410
407
  reply: "Reply"
411
408
  };
412
- /** The name of the send button. A comment on a page is sent as a comment, and an answer in a thread as a reply. */
413
409
  const sendLabels = {
414
410
  comment: "Comment",
415
411
  edit: "Save",
@@ -817,7 +813,6 @@ const CommentComposer = defineComponent({
817
813
  origin = void 0;
818
814
  return from;
819
815
  };
820
- const UIcon = useUIComponent("UIcon");
821
816
  const icons = useViteHubUIIcons();
822
817
  const removeFile = (index) => {
823
818
  const part = fileParts.value[index];
@@ -846,13 +841,13 @@ const CommentComposer = defineComponent({
846
841
  key: file.url,
847
842
  size: "xs"
848
843
  }, () => [
849
- h(AttachmentMedia_default, { kind: "icon" }, () => h(UIcon, { name: icons.value.file })),
844
+ h(AttachmentMedia_default, { kind: "icon" }, () => h(ViteHubIcon, { name: icons.value.file })),
850
845
  h(AttachmentContent_default, () => h(AttachmentTitle_default, () => file.filename ?? file.mediaType)),
851
846
  h(AttachmentActions_default, () => h(AttachmentAction_default, {
852
847
  disabled: props.busy,
853
848
  label: `Remove ${file.filename ?? "attachment"}`,
854
849
  onClick: () => remove(index)
855
- }, () => h(UIcon, { name: icons.value.close })))
850
+ }, () => h(ViteHubIcon, { name: icons.value.close })))
856
851
  ]))) : null];
857
852
  };
858
853
  return () => h("div", {
@@ -924,7 +919,7 @@ const CommentComposer = defineComponent({
924
919
  h(PromptInputToolbar_default, () => [attachmentsOn.value ? h(PromptInputAttach_default, {
925
920
  disabled: props.busy,
926
921
  variant: props.layout === "row" ? "ghost" : "outline"
927
- }, () => h(UIcon, { name: icons.value.plus })) : null, h(PromptInputSubmit_default, null, () => h(UIcon, { name: icons.value.arrowUp }))])
922
+ }, () => h(ViteHubIcon, { name: icons.value.plus })) : null, h(PromptInputSubmit_default, null, () => h(ViteHubIcon, { name: icons.value.arrowUp }))])
928
923
  ]),
929
924
  menu.value && menu.value.items.length === 0 ? h("div", {
930
925
  "data-slot": "comment-composer-mentions",
@@ -124,7 +124,7 @@ declare const CommentComposer: import("vue").DefineComponent<import("vue").Extra
124
124
  };
125
125
  }>, () => VNode<import("vue").RendererNode, import("vue").RendererElement, {
126
126
  [key: string]: any;
127
- }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancel" | "submit" | "update:modelValue" | "update:mentions" | "update:files")[], "cancel" | "submit" | "update:modelValue" | "update:mentions" | "update:files", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
127
+ }>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("cancel" | "submit" | "update:mentions" | "update:files" | "update:modelValue")[], "cancel" | "submit" | "update:mentions" | "update:files" | "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
128
128
  modelValue: {
129
129
  default: string;
130
130
  type: StringConstructor;
@@ -220,21 +220,21 @@ declare const CommentComposer: import("vue").DefineComponent<import("vue").Extra
220
220
  }>> & Readonly<{
221
221
  onCancel?: ((...args: any[]) => any) | undefined;
222
222
  onSubmit?: ((...args: any[]) => any) | undefined;
223
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
224
223
  "onUpdate:mentions"?: ((...args: any[]) => any) | undefined;
225
224
  "onUpdate:files"?: ((...args: any[]) => any) | undefined;
225
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
226
226
  }>, {
227
- size: CommentComposerSize;
227
+ variant: CommentComposerVariant;
228
+ allowEmpty: boolean;
228
229
  people: CommentUser[];
229
230
  busy: boolean;
230
231
  attachments: boolean;
231
- variant: CommentComposerVariant;
232
- modelValue: string;
232
+ size: CommentComposerSize;
233
233
  mentions: string[];
234
+ modelValue: string;
234
235
  autofocus: boolean;
235
236
  guard: boolean;
236
237
  participants: string[];
237
- allowEmpty: boolean;
238
238
  layout: "box" | "row";
239
239
  frame: CommentComposerFrame;
240
240
  }, SlotsType<CommentComposerSlots>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,8 +1,8 @@
1
1
  import { s as CommentsState, t as CommentCan } from "./comments-ZfV6IZs8.js";
2
2
  import { t as AvatarStackPerson } from "./types-CTk3aNb5.js";
3
- import { r as CommentComposerSize } from "./comment-composer-CsVOvG9j.js";
4
- import { o as CommentUpload } from "./comment-panel-DxN21VoY.js";
5
- import { n as CommentAttachmentUrl } from "./comment-thread-BmsqcjVQ.js";
3
+ import { r as CommentComposerSize } from "./comment-composer-PmERtNNb.js";
4
+ import { o as CommentUpload } from "./comment-panel-Vo3m6rHB.js";
5
+ import { n as CommentAttachmentUrl } from "./comment-thread-Cp9k80uv.js";
6
6
  import { PropType } from "vue";
7
7
  import { CommentSubject, CommentUser, CommentsClient } from "@vite-hub/comments/client";
8
8
  /** Where a thread opens: in a card beside its pin, or in a column of cards on the right edge of the screen. */
@@ -128,12 +128,12 @@ declare const CommentLayer: import("vue").DefineComponent<import("vue").ExtractP
128
128
  type: PropType<CommentComposerSize>;
129
129
  };
130
130
  }>> & Readonly<{}>, {
131
- size: CommentComposerSize;
131
+ readOnly: boolean;
132
+ queueFiles: boolean;
132
133
  people: AvatarStackPerson[];
134
+ size: CommentComposerSize;
133
135
  hotkey: string | false;
134
- readOnly: boolean;
135
136
  canComment: boolean;
136
- queueFiles: boolean;
137
137
  placement: CommentPlacement;
138
138
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
139
139
  export { CommentPlacement as n, CommentLayer as t };