@vite-hub/ui 0.3.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.
Files changed (176) hide show
  1. package/README.md +107 -81
  2. package/dist/announce-Cy_Tn9wW.js +32 -0
  3. package/dist/{code-view-D0bqhogi.js → code-view-DsU-xzic.js} +4 -4
  4. package/dist/comment-attachments-C4yNbcx5.js +20 -0
  5. package/dist/{comment-composer-jYv2ULNP.js → comment-composer-D7ZytyER.js} +257 -10
  6. package/dist/{comment-composer-Cc8Jvu6u.d.ts → comment-composer-DvKMTrAi.d.ts} +1 -1
  7. package/dist/{comment-layer-ClH4MLj4.d.ts → comment-layer-GTsLdABl.d.ts} +17 -6
  8. package/dist/{comment-list-B8hphLfS.d.ts → comment-list-BI96empx.d.ts} +2 -2
  9. package/dist/comment-marks.css +18 -22
  10. package/dist/{comment-panel-fcKSKwLC.d.ts → comment-panel-CsKWTms_.d.ts} +15 -4
  11. package/dist/{comment-row-Bbm9WwuF.js → comment-row-JmTC0uXr.js} +2 -2
  12. package/dist/comment-selection-bar-CyVBNYl9.d.ts +42 -0
  13. package/dist/comment-send-7bg4NEEM.js +277 -0
  14. package/dist/comment-send-C45dHC22.d.ts +25 -0
  15. package/dist/comment-send.css +267 -0
  16. package/dist/comment-thread-B_Sc2QX6.js +797 -0
  17. package/dist/{comment-thread-CoTLrdal.d.ts → comment-thread-C6U-bsK_.d.ts} +23 -6
  18. package/dist/{comments-CkWc2Khc.js → comments-B88zg9gC.js} +66 -10
  19. package/dist/{comments-Bx2WRsYy.d.ts → comments-D8hulVPy.d.ts} +34 -6
  20. package/dist/{comments-context-C2lOZyQ5.js → comments-context-DhbIdYQ1.js} +2 -1
  21. package/dist/{config-Dk67emQt.js → config-B1u7zqMB.js} +8 -1
  22. package/dist/{config-DgxBW013.d.ts → config-pHazYdq6.d.ts} +11 -0
  23. package/dist/drop-field-3CDRFFRm.js +163 -0
  24. package/dist/{editor-C_wt4RRV.js → editor-BHYGLgty.js} +42 -3
  25. package/dist/effects-Ql6VzCRa.js +2971 -0
  26. package/dist/format-orwcdZL_.js +39 -0
  27. package/dist/headless.d.ts +2 -2
  28. package/dist/headless.js +1 -1
  29. package/dist/hold-to-delete-DjWzRDyY.d.ts +51 -0
  30. package/dist/hold-to-delete-ROLQRZg_.js +434 -0
  31. package/dist/icon-c5Jb_Tl7.d.ts +31 -0
  32. package/dist/{image-preview-C9tdkmEj.js → image-preview-BigoAvb3.js} +2 -2
  33. package/dist/{index-BD1e8vx5.d.ts → index-YUvL2nV8.d.ts} +10 -6
  34. package/dist/index.d.ts +18 -12
  35. package/dist/index.js +47 -45
  36. package/dist/install-D5f6msEU.js +17 -0
  37. package/dist/list-RCbNZ14q.js +271 -0
  38. package/dist/{markdown-editor-CMbNZOdN.js → markdown-editor-Dfl2DgPS.js} +1 -1
  39. package/dist/{markdown-editor-DqdZfIEn.d.ts → markdown-editor-wQF0yD5o.d.ts} +1 -1
  40. package/dist/markdown-editor.d.ts +1 -1
  41. package/dist/markdown-editor.js +1 -1
  42. package/dist/motion/core.d.ts +4 -0
  43. package/dist/motion/core.js +11 -0
  44. package/dist/motion-core-lHRF8PZz.d.ts +456 -0
  45. package/dist/motion.d.ts +16 -0
  46. package/dist/motion.js +13 -0
  47. package/dist/{nuxt-ui-DSQFzq3s.js → nuxt-ui-CgvMzO5v.js} +20 -14
  48. package/dist/nuxt.d.ts +2 -2
  49. package/dist/nuxt.js +20 -5
  50. package/dist/opt-out-b6bnUjIT.js +208 -0
  51. package/dist/parts/components/agent-session.js +1 -1
  52. package/dist/parts/components/attachment.js +1 -1
  53. package/dist/parts/components/avatar-stack.js +3 -2
  54. package/dist/parts/components/chat-session.d.ts +1 -1
  55. package/dist/parts/components/chat.js +2 -2
  56. package/dist/parts/components/code-block.js +1 -1
  57. package/dist/parts/components/code-view.js +1 -1
  58. package/dist/parts/components/comment-composer.d.ts +1 -1
  59. package/dist/parts/components/comment-composer.js +1 -1
  60. package/dist/parts/components/comment-layer.d.ts +1 -1
  61. package/dist/parts/components/comment-layer.js +54 -23
  62. package/dist/parts/components/comment-list.d.ts +1 -1
  63. package/dist/parts/components/comment-list.js +13 -7
  64. package/dist/parts/components/comment-panel.d.ts +1 -1
  65. package/dist/parts/components/comment-panel.js +46 -20
  66. package/dist/parts/components/comment-pin.js +1 -1
  67. package/dist/parts/components/comment-selection-bar.d.ts +2 -0
  68. package/dist/parts/components/comment-selection-bar.js +117 -0
  69. package/dist/parts/components/comment-send.d.ts +2 -0
  70. package/dist/parts/components/comment-send.js +2 -0
  71. package/dist/parts/components/comment-thread.d.ts +2 -2
  72. package/dist/parts/components/comment-thread.js +2 -570
  73. package/dist/parts/components/comments.d.ts +8 -6
  74. package/dist/parts/components/comments.js +6 -4
  75. package/dist/parts/components/copy-button.d.ts +12 -2
  76. package/dist/parts/components/copy-button.js +226 -1
  77. package/dist/parts/components/drop-field.d.ts +69 -0
  78. package/dist/parts/components/drop-field.js +77 -0
  79. package/dist/parts/components/filter-search.js +1 -1
  80. package/dist/parts/components/hold-to-delete.d.ts +82 -0
  81. package/dist/parts/components/hold-to-delete.js +76 -0
  82. package/dist/parts/components/markdown-editor.d.ts +1 -1
  83. package/dist/parts/components/markdown-editor.js +1 -1
  84. package/dist/parts/components/markdown-renderer.js +1 -1
  85. package/dist/parts/components/markdown.js +1 -1
  86. package/dist/parts/components/message-parts.js +13 -5
  87. package/dist/parts/components/motion-list.d.ts +42 -0
  88. package/dist/parts/components/motion-list.js +42 -0
  89. package/dist/parts/components/motion.d.ts +124 -0
  90. package/dist/parts/components/motion.js +172 -0
  91. package/dist/parts/components/progress.d.ts +41 -0
  92. package/dist/parts/components/progress.js +54 -0
  93. package/dist/parts/components/prompt-input.d.ts +3 -3
  94. package/dist/parts/components/prompt-input.js +3 -3
  95. package/dist/parts/components/relative-time.js +1 -1
  96. package/dist/parts/components/sync-status.js +2 -1
  97. package/dist/parts/components/tool-list.d.ts +1 -1
  98. package/dist/parts/components/trace-run.d.ts +1 -1
  99. package/dist/parts/components/trace-run.js +2 -2
  100. package/dist/parts/headless/comments.d.ts +2 -2
  101. package/dist/parts/headless/comments.js +1 -1
  102. package/dist/parts/playground/share.d.ts +36 -2
  103. package/dist/parts/workspace/browser-support-notice.js +12 -4
  104. package/dist/parts/workspace/codemirror.d.ts +9 -0
  105. package/dist/parts/workspace/codemirror.js +37 -4
  106. package/dist/parts/workspace/connect-panel.js +1 -1
  107. package/dist/parts/workspace/file-icons.d.ts +16 -0
  108. package/dist/parts/workspace/file-icons.js +82 -0
  109. package/dist/parts/workspace/icons.d.ts +1 -0
  110. package/dist/parts/workspace/icons.js +1 -0
  111. package/dist/parts/workspace/runners/render.d.ts +26 -0
  112. package/dist/parts/workspace/runners/render.js +124 -0
  113. package/dist/parts/workspace/runners/web-container.d.ts +29 -0
  114. package/dist/parts/workspace/runners/web-container.js +186 -0
  115. package/dist/parts/workspace/workspace-bar.d.ts +51 -0
  116. package/dist/parts/workspace/workspace-bar.js +51 -0
  117. package/dist/parts/workspace/workspace-boot-status.js +1 -1
  118. package/dist/parts/workspace/workspace-editor-head.d.ts +47 -0
  119. package/dist/parts/workspace/workspace-editor-head.js +66 -0
  120. package/dist/parts/workspace/workspace-editor.d.ts +17 -0
  121. package/dist/parts/workspace/workspace-editor.js +29 -3
  122. package/dist/parts/workspace/workspace-examples.d.ts +74 -0
  123. package/dist/parts/workspace/workspace-examples.js +72 -0
  124. package/dist/parts/workspace/workspace-file-link.d.ts +35 -0
  125. package/dist/parts/workspace/workspace-file-link.js +39 -0
  126. package/dist/parts/workspace/workspace-file-tree.d.ts +8 -8
  127. package/dist/parts/workspace/workspace-file-tree.js +26 -19
  128. package/dist/parts/workspace/workspace-guide.d.ts +52 -0
  129. package/dist/parts/workspace/workspace-guide.js +91 -0
  130. package/dist/parts/workspace/workspace-issues.d.ts +46 -0
  131. package/dist/parts/workspace/workspace-issues.js +49 -0
  132. package/dist/parts/workspace/workspace-preview.js +1 -1
  133. package/dist/parts/workspace/workspace-shell.d.ts +2 -88
  134. package/dist/parts/workspace/workspace-shell.js +131 -78
  135. package/dist/parts/workspace/workspace-sidebar.d.ts +75 -0
  136. package/dist/parts/workspace/workspace-sidebar.js +132 -0
  137. package/dist/parts/workspace/workspace-start.d.ts +47 -0
  138. package/dist/parts/workspace/workspace-start.js +60 -0
  139. package/dist/parts/workspace/workspace-status.d.ts +69 -0
  140. package/dist/parts/workspace/workspace-status.js +74 -0
  141. package/dist/parts/workspace/workspace-steps.d.ts +2 -0
  142. package/dist/parts/workspace/workspace-steps.js +128 -0
  143. package/dist/parts/workspace/workspace-task.d.ts +20 -0
  144. package/dist/parts/workspace/workspace-task.js +20 -0
  145. package/dist/parts/workspace/workspace.d.ts +251 -0
  146. package/dist/parts/workspace/workspace.js +665 -0
  147. package/dist/{pierre-code-view-xgBL6DO7.js → pierre-code-view-NE35tkmR.js} +37 -17
  148. package/dist/playground.d.ts +1 -1
  149. package/dist/progress-C7afI5vq.js +266 -0
  150. package/dist/registry-D3-ysX7l.js +78 -0
  151. package/dist/{relative-time-BVmjOsYG.js → relative-time-DgSS3zKN.js} +1 -1
  152. package/dist/ring-B7Qxu7zd.js +175 -0
  153. package/dist/runtime/nuxt-plugin.js +2 -2
  154. package/dist/styles.css +657 -526
  155. package/dist/text-BCJflBJf.js +826 -0
  156. package/dist/theme.d.ts +43 -0
  157. package/dist/theme.js +22 -7
  158. package/dist/travel-C87xd5Wh.js +182 -0
  159. package/dist/tween-CO24nMpf.js +62 -0
  160. package/dist/{types-Dyr6CfBW.d.ts → types-BX64qHlV.d.ts} +1 -1
  161. package/dist/visual-copy-CrVc3z4n.js +15 -0
  162. package/dist/workspace-shell-BJGnoF3p.d.ts +112 -0
  163. package/dist/workspace-steps-Bgph2rpr.d.ts +72 -0
  164. package/dist/workspace.d.ts +17 -4
  165. package/dist/workspace.js +16 -3
  166. package/package.json +22 -11
  167. package/dist/copy-button-CRN3kmSD.js +0 -253
  168. package/dist/format-Du58PlsG.js +0 -18
  169. package/dist/icon-swap.css +0 -69
  170. package/dist/parts/playground/highlight.d.ts +0 -5
  171. package/dist/parts/playground/highlight.js +0 -23
  172. package/dist/parts/playground/playground-render.d.ts +0 -126
  173. package/dist/parts/playground/playground-render.js +0 -356
  174. package/dist/parts/workspace/playground-container.d.ts +0 -192
  175. package/dist/parts/workspace/playground-container.js +0 -603
  176. package/dist/share-DM4eNy4q.d.ts +0 -37
package/dist/nuxt.js CHANGED
@@ -5,7 +5,7 @@ const icons = {
5
5
  "prefix": "vitehub",
6
6
  "info": {
7
7
  "name": "ViteHub",
8
- "total": 46,
8
+ "total": 51,
9
9
  "author": {
10
10
  "name": "ViteHub",
11
11
  "url": "https://github.com/vite-hub/vitehub/tree/main/packages/icons"
@@ -27,14 +27,16 @@ const icons = {
27
27
  "bundle": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"m21 7.5-9-4.5-9 4.5v9l9 4.5 9-4.5zM3 7.5l9 4.5 9-4.5M12 12v9\"/><g data-motion=\"\"><path d=\"m7 5.5 9 4.5\"/></g></g>" },
28
28
  "cache": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><rect x=\"3\" y=\"4\" width=\"18\" height=\"16\" rx=\"2\"/><g data-motion=\"\"><path d=\"M13 7.5 9 12.5h3.5l-1 4 4-5H12z\"/></g></g>" },
29
29
  "channels": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M3 16.5V6a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H6.5z\"/><g data-motion=\"\"><path d=\"M18 8h1a2 2 0 0 1 2 2v10.5L17.5 17H11a2 2 0 0 1-2-2v-.5\"/></g></g>" },
30
+ "choices": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M12 21v-9\"/><path d=\"M12 12 3 3M3 7.5V3h4.5M12 12l9-9\"/><g data-motion=\"\"><path d=\"M21 7.5V3h-4.5\"/></g></g>" },
31
+ "cli": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"m4 6.5 6 5.5-6 5.5\"/><g data-motion=\"\"><path d=\"M12.5 18H20\"/></g></g>" },
30
32
  "cms": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M19 10.5V5a2 2 0 0 0-2-2H7a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5\"/><path d=\"M9 7.5h6M9 11.5h3\"/><g data-motion=\"\"><path d=\"M17.5 13.5l2.5 2.5-5 5h-2.5v-2.5z\"/></g></g>" },
31
33
  "codemods": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"m7.5 7-4.5 5 4.5 5\"/><g data-motion=\"\"><path d=\"M11 12h10m-3.5-3.5L21 12l-3.5 3.5\"/></g></g>" },
32
34
  "comments": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M12 20H4v-8a8 8 0 1 1 8 8z\"/><g data-motion=\"\"><path d=\"M8.5 10.5h7M8.5 14h4.5\"/></g></g>" },
33
35
  "compare": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M4 8h16M16 4l4 4-4 4\"/><g data-motion=\"\"><path d=\"M20 16H4M8 12l-4 4 4 4\"/></g></g>" },
34
36
  "connections": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M12 16.5V21\"/><g data-motion=\"\"><path d=\"M9 3v4M15 3v4M6.5 7h11v4a5.5 5.5 0 0 1-11 0z\"/></g></g>" },
37
+ "console": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><rect x=\"3\" y=\"4.5\" width=\"18\" height=\"15\" rx=\"2\"/><path d=\"M8.5 4.5v15\"/><g data-motion=\"\"><path d=\"M11.5 9H17M11.5 12h4M11.5 15H16\"/></g></g>" },
35
38
  "content": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><rect x=\"5\" y=\"3\" width=\"14\" height=\"18\" rx=\"2\"/><path d=\"M9 7.5h6\"/><g data-motion=\"\"><path d=\"M9 11.5h6M9 15.5h4\"/></g></g>" },
36
39
  "database": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M4 6v12c0 1.66 3.58 3 8 3s8-1.34 8-3V6\"/><path d=\"M4 12c0 1.66 3.58 3 8 3s8-1.34 8-3\"/><g data-motion=\"\"><path d=\"M4 6c0-1.66 3.58-3 8-3s8 1.34 8 3-3.58 3-8 3-8-1.34-8-3z\"/></g></g>" },
37
- "decisions": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M12 21v-9\"/><path d=\"M12 12 3 3M3 7.5V3h4.5M12 12l9-9\"/><g data-motion=\"\"><path d=\"M21 7.5V3h-4.5\"/></g></g>" },
38
40
  "development": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"m8 7-5 5 5 5M16 7l5 5-5 5\"/><g data-motion=\"\"><path d=\"m13.5 5-3 14\"/></g></g>" },
39
41
  "device": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><rect x=\"6.5\" y=\"3\" width=\"11\" height=\"18\" rx=\"2.5\"/><path d=\"M10.5 18h3\"/><g data-motion=\"\"><path d=\"M9.5 7.5h5M9.5 10.5h5M9.5 13.5h3\"/></g></g>" },
40
42
  "docs": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M12 6.5C10.5 5 8 4.5 3 4.5v14c5 0 7.5.5 9 2\"/><g data-motion=\"\"><path d=\"M12 6.5c1.5-1.5 4-2 9-2v14c-5 0-7.5.5-9 2V6.5\"/></g></g>" },
@@ -48,11 +50,14 @@ const icons = {
48
50
  "i18n": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M3.5 6h9M8 3.5V6\"/><path d=\"M5 9.5l5 5M4 15l5-5 2-4\"/><g data-motion=\"\"><path d=\"M12.5 21l4-9 4 9M14 18h5\"/></g></g>" },
49
51
  "kv": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\"/><path d=\"M9 5v14M3 12h18\"/><g data-motion=\"\"><path d=\"M12.5 8.5h5M12.5 15.5h3.5\"/></g></g>" },
50
52
  "logs": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M4 6h2M4 12h2M4 18h2\"/><g data-motion=\"\"><path d=\"M9.5 6H20M9.5 12h7.5M9.5 18H19\"/></g></g>" },
53
+ "markdown-template": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><rect x=\"3\" y=\"5\" width=\"18\" height=\"14\" rx=\"2\"/><path d=\"M6.5 15.5v-7l2.5 3 2.5-3v7\"/><g data-motion=\"\"><path d=\"M16.5 8.5v7M14.5 13.5l2 2 2-2\"/></g></g>" },
51
54
  "mcp": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\"/><path d=\"M12 15.5v1.5\"/><g data-motion=\"\"><path d=\"M9.5 8.5v3.5M14.5 8.5v3.5\"/></g></g>" },
55
+ "presets": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M17 3H5a2 2 0 0 0-2 2v12\"/><g data-motion=\"\"><rect x=\"7\" y=\"7\" width=\"14\" height=\"14\" rx=\"2\"/><path d=\"M12 12.5v2M16 12.5v2\"/></g></g>" },
52
56
  "queue": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M16.5 12H21M18 9l3 3-3 3\"/><g data-motion=\"\"><rect x=\"3\" y=\"7\" width=\"5\" height=\"10\" rx=\"1.5\"/><rect x=\"9.5\" y=\"7\" width=\"5\" height=\"10\" rx=\"1.5\"/></g></g>" },
53
57
  "rate-limit": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M3 16a9 9 0 0 1 18 0M6 20h12\"/><path d=\"M12 16h.01\"/><g data-motion=\"\"><path d=\"m12 16 4-5\"/></g></g>" },
54
58
  "realtime": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><circle cx=\"12\" cy=\"12\" r=\"1.5\"/><path d=\"M8.5 8.5a5 5 0 0 0 0 7M15.5 8.5a5 5 0 0 1 0 7\"/><g data-motion=\"\"><path d=\"M5.5 5.5a9.2 9.2 0 0 0 0 13M18.5 5.5a9.2 9.2 0 0 1 0 13\"/></g></g>" },
55
59
  "reference": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M8 3.5H7a2 2 0 0 0-2 2V10a2 2 0 0 1-2 2 2 2 0 0 1 2 2v4.5a2 2 0 0 0 2 2h1\"/><g data-motion=\"\"><path d=\"M16 3.5h1a2 2 0 0 1 2 2V10a2 2 0 0 0 2 2 2 2 0 0 0-2 2v4.5a2 2 0 0 1-2 2h-1\"/></g></g>" },
60
+ "runtime": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><rect x=\"6\" y=\"6\" width=\"12\" height=\"12\" rx=\"2\"/><path d=\"M9.5 3v3M14.5 3v3M9.5 18v3M14.5 18v3M3 9.5h3M3 14.5h3M18 9.5h3M18 14.5h3\"/><g data-motion=\"\"><rect x=\"9.5\" y=\"9.5\" width=\"5\" height=\"5\" rx=\"1\"/></g></g>" },
56
61
  "sandbox": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M3 8V5a2 2 0 0 1 2-2h3M16 3h3a2 2 0 0 1 2 2v3M21 16v3a2 2 0 0 1-2 2h-3M8 21H5a2 2 0 0 1-2-2v-3\"/><g data-motion=\"\"><rect x=\"8\" y=\"8\" width=\"8\" height=\"8\" rx=\"1.5\"/></g></g>" },
57
62
  "schedule": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><rect x=\"3\" y=\"5\" width=\"18\" height=\"16\" rx=\"2\"/><path d=\"M3 10h18M8 3v4M16 3v4\"/><g data-motion=\"\"><rect x=\"7\" y=\"13.5\" width=\"3.5\" height=\"3.5\" rx=\"1\"/></g></g>" },
58
63
  "shell": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><rect x=\"3\" y=\"4\" width=\"18\" height=\"16\" rx=\"2\"/><path d=\"m7 9.5 3 2.5-3 2.5\"/><g data-motion=\"\"><path d=\"M12.5 15h4.5\"/></g></g>" },
@@ -109,6 +114,8 @@ const partFamilies = {
109
114
  "CommentPanel",
110
115
  "CommentPin",
111
116
  "CommentReply",
117
+ "CommentSelectionBar",
118
+ "CommentSend",
112
119
  "CommentThread",
113
120
  "CommentToolbar"
114
121
  ],
@@ -155,7 +162,6 @@ const componentNames = [
155
162
  "FileDiff",
156
163
  "FileTree",
157
164
  "DeviceFrame",
158
- "PlaygroundRender",
159
165
  "Markdown",
160
166
  "MessageParts",
161
167
  "MultiFileDiff",
@@ -171,8 +177,15 @@ const componentNames = [
171
177
  "TraceRun",
172
178
  "UnresolvedFile",
173
179
  "CopyButton",
180
+ "MorphText",
181
+ "RollNumber",
182
+ "SwapIcon",
174
183
  "RelativeTime",
175
184
  "Status",
185
+ "MotionList",
186
+ "Progress",
187
+ "DropField",
188
+ "HoldToDelete",
176
189
  ...partFamilies.attachment,
177
190
  ...partFamilies["avatar-stack"],
178
191
  ...partFamilies.bubble,
@@ -193,7 +206,6 @@ const viteHubUIIcons = [
193
206
  "lucide:arrow-up",
194
207
  "lucide:arrow-up-right",
195
208
  "lucide:bold",
196
- "lucide:box",
197
209
  "lucide:brain",
198
210
  "lucide:check",
199
211
  "lucide:chevron-down",
@@ -229,9 +241,9 @@ const viteHubUIIcons = [
229
241
  "lucide:heading-2",
230
242
  "lucide:heading-3",
231
243
  "lucide:image",
244
+ "lucide:inbox",
232
245
  "lucide:info",
233
246
  "lucide:italic",
234
- "lucide:layout-template",
235
247
  "lucide:lightbulb",
236
248
  "lucide:link",
237
249
  "lucide:list",
@@ -245,6 +257,7 @@ const viteHubUIIcons = [
245
257
  "lucide:minus",
246
258
  "lucide:monitor",
247
259
  "lucide:moon",
260
+ "lucide:panel-left",
248
261
  "lucide:panel-left-close",
249
262
  "lucide:panel-left-open",
250
263
  "lucide:panel-right",
@@ -256,6 +269,7 @@ const viteHubUIIcons = [
256
269
  "lucide:refresh-cw",
257
270
  "lucide:rotate-ccw",
258
271
  "lucide:search",
272
+ "lucide:send",
259
273
  "lucide:sparkles",
260
274
  "lucide:square",
261
275
  "lucide:square-code",
@@ -265,6 +279,7 @@ const viteHubUIIcons = [
265
279
  "lucide:strikethrough",
266
280
  "lucide:sun",
267
281
  "lucide:terminal",
282
+ "lucide:text-wrap",
268
283
  "lucide:trash-2",
269
284
  "lucide:triangle-alert",
270
285
  "lucide:type",
@@ -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-DSQFzq3s.js";
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";
@@ -1,4 +1,4 @@
1
- import { r as useUIComponent } from "../../nuxt-ui-DSQFzq3s.js";
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,4 +1,5 @@
1
- import { n as initials } from "../../format-Du58PlsG.js";
1
+ import { RollNumber } from "./motion.js";
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
4
5
  const AvatarStack = defineComponent({
@@ -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
- }, `+${hidden.value.length}`) : null]);
57
+ }, ["+", h(RollNumber, { value: hidden.value.length })]) : null]);
57
58
  }
58
59
  });
59
60
  //#endregion
@@ -1,4 +1,4 @@
1
- import { i as ViteHubUISession } from "../../types-Dyr6CfBW.js";
1
+ import { i as ViteHubUISession } from "../../types-BX64qHlV.js";
2
2
  import { PropType } from "vue";
3
3
  import { ChatStatus, UIMessage } from "ai";
4
4
  //#region src/components/chat-session.d.ts
@@ -1,5 +1,5 @@
1
- import { r as useUIComponent } from "../../nuxt-ui-DSQFzq3s.js";
2
- import { i as useViteHubUI } from "../../config-Dk67emQt.js";
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";
@@ -1,5 +1,5 @@
1
1
  import { r as slotPart } from "../../slot-part-Doic71uh.js";
2
- import { t as CopyButton } from "../../copy-button-CRN3kmSD.js";
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 PatchDiff, i as MultiFileDiff, n as FileDiff, o as UnresolvedFile, r as FileView, t as CodeView } from "../../code-view-D0bqhogi.js";
1
+ import { a as PatchDiff, i as MultiFileDiff, n as FileDiff, o as UnresolvedFile, r as FileView, t as CodeView } from "../../code-view-DsU-xzic.js";
2
2
  export { CodeView, FileDiff, FileView, MultiFileDiff, PatchDiff, UnresolvedFile };
@@ -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-Cc8Jvu6u.js";
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-jYv2ULNP.js";
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-ClH4MLj4.js";
1
+ import { n as CommentPlacement, t as CommentLayer } from "../../comment-layer-GTsLdABl.js";
2
2
  export { CommentLayer, CommentPlacement };
@@ -1,12 +1,14 @@
1
1
  import { t as uiErrorDiagnostics } from "../../error-diagnostics-SXtnk6bz.js";
2
- import { r as consumedPointerEvents } from "../../comments-context-C2lOZyQ5.js";
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-jYv2ULNP.js";
5
- import { i as useComments, n as draftPositionKey, r as provideComments } from "../../comments-CkWc2Khc.js";
6
- import { n as threadRow } from "../../comment-row-Bbm9WwuF.js";
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";
7
+ import { t as useCommentAttachments } from "../../comment-attachments-C4yNbcx5.js";
8
+ import { n as threadRow } from "../../comment-row-JmTC0uXr.js";
7
9
  import { CommentList, CommentToolbar } from "./comment-list.js";
8
10
  import { CommentPin } from "./comment-pin.js";
9
- import { CommentThread } from "./comment-thread.js";
11
+ import { n as CommentThread } from "../../comment-thread-B_Sc2QX6.js";
10
12
  import { computed, defineComponent, h, nextTick, onBeforeUnmount, onMounted, onUpdated, reactive, ref, shallowRef, watch } from "vue";
11
13
  //#region src/components/comment-layer.ts
12
14
  const popoverWidth = 360;
@@ -73,8 +75,13 @@ const CommentLayer = defineComponent({
73
75
  navigate: { type: Function },
74
76
  /** What the signed-in user may do in a thread. Defaults to the `can` of the comments state. */
75
77
  can: { type: Function },
76
- /** Turns attached files into attachment keys. Without it the boxes take no files. */
78
+ /** Turns attached files into attachment keys before the comment is saved or sent. */
77
79
  upload: { type: Function },
80
+ /** Save raw files with outbox entries. Set only when the server accepts file uploads. `upload` takes precedence. */
81
+ queueFiles: {
82
+ default: false,
83
+ type: Boolean
84
+ },
78
85
  /** The file types that the boxes take, such as `image/*`. */
79
86
  accept: { type: String },
80
87
  /** Gives the URL of an attachment key. With it, image attachments show as thumbnails. */
@@ -119,8 +126,7 @@ const CommentLayer = defineComponent({
119
126
  watch(() => state.draft.value, (next, previous) => {
120
127
  if (next !== previous) draftFiles.value = next?.files ? [...next.files] : [];
121
128
  });
122
- const attachmentsOn = computed(() => props.upload !== void 0 && state.client.transport.supportsAttachments !== false);
123
- const keys = async (files) => attachmentsOn.value && files.length > 0 && props.upload ? props.upload(files) : [];
129
+ const { enabled: attachmentsOn, prepare } = useCommentAttachments(state, props);
124
130
  const user = computed(() => state.user.value);
125
131
  const pinned = computed(() => state.threads.value.filter((thread) => state.pageThreads.value.includes(thread) || state.shown.value.has(thread.id) || state.leaving.value.has(thread.id)));
126
132
  const drawn = computed(() => pinned.value.filter((thread) => state.shown.value.has(thread.id) || state.leaving.value.has(thread.id)));
@@ -179,11 +185,11 @@ const CommentLayer = defineComponent({
179
185
  };
180
186
  let returnTo = null;
181
187
  let restoring = false;
188
+ watch(() => state.opened.value && commentThreadKey(state.opened.value), (key) => {
189
+ if (key) nextTick(() => layer.value?.querySelector("[data-slot='comment-thread']:not([data-preview])")?.focus());
190
+ });
182
191
  watch(() => state.openId.value, (id, previous) => {
183
- if (id) {
184
- nextTick(() => layer.value?.querySelector("[data-slot='comment-thread']:not([data-preview])")?.focus());
185
- return;
186
- }
192
+ if (id) return;
187
193
  returnTo = null;
188
194
  const active = uiRoot().activeElement;
189
195
  const thread = layer.value?.querySelector("[data-slot='comment-thread']:not([data-preview])");
@@ -287,8 +293,24 @@ const CommentLayer = defineComponent({
287
293
  window.addEventListener("resize", readSidesSoon, { passive: true });
288
294
  window.visualViewport?.addEventListener("resize", readSidesSoon, { passive: true });
289
295
  });
290
- onUpdated(readSides);
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
+ });
291
312
  onBeforeUnmount(() => {
313
+ marginList?.destroy();
292
314
  cardSizes?.disconnect();
293
315
  cancelAnimationFrame(sideFrame);
294
316
  window.removeEventListener("resize", readSidesSoon);
@@ -331,10 +353,10 @@ const CommentLayer = defineComponent({
331
353
  const body = draft.body;
332
354
  const mentions = draft.mentions;
333
355
  try {
334
- const attachments = await keys(submit.files);
356
+ const { attachments, files } = await prepare(submit.files);
335
357
  if (state.draft.value !== draft || draft.body !== body || draft.mentions !== mentions || draftFiles.value !== submitted) return;
336
358
  draft.attachments = attachments;
337
- if (await state.send() && draftFiles.value === submitted) draftFiles.value = [];
359
+ if (await state.send({ files }) && draftFiles.value === submitted) draftFiles.value = [];
338
360
  } catch (error) {
339
361
  draft.error = error instanceof Error ? error.message : "The files could not be uploaded. Try again.";
340
362
  } finally {
@@ -349,12 +371,15 @@ const CommentLayer = defineComponent({
349
371
  user: user.value,
350
372
  users: state.users
351
373
  });
352
- const screenWidth = ref(typeof window === "undefined" ? 0 : window.innerWidth);
374
+ const screenWidth = ref(0);
353
375
  const onResize = () => {
354
376
  screenWidth.value = window.innerWidth;
355
377
  measureDraft();
356
378
  };
357
- onMounted(() => window.addEventListener("resize", onResize, { passive: true }));
379
+ onMounted(() => {
380
+ screenWidth.value = window.innerWidth;
381
+ window.addEventListener("resize", onResize, { passive: true });
382
+ });
358
383
  onBeforeUnmount(() => window.removeEventListener("resize", onResize));
359
384
  const inMargin = computed(() => props.placement === "margin" && screenWidth.value >= marginMinWidth);
360
385
  const cardHeights = reactive(/* @__PURE__ */ new Map());
@@ -375,12 +400,13 @@ const CommentLayer = defineComponent({
375
400
  measure?.observe(element);
376
401
  } else cards.delete(key);
377
402
  };
403
+ const statusSlot = () => slots.status ? { status: slots.status } : void 0;
378
404
  const threadView = (thread) => h(CommentThread, {
379
405
  accept: props.accept,
380
406
  attachmentUrl: props.attachmentUrl,
381
407
  attachments: attachmentsOn.value,
382
408
  can: props.can,
383
- key: thread.id,
409
+ key: commentThreadKey(thread),
384
410
  detached: state.positions.value.get(thread.id)?.detached === true,
385
411
  readOnly: props.readOnly,
386
412
  size: props.size,
@@ -388,14 +414,17 @@ const CommentLayer = defineComponent({
388
414
  onDelete: (messageId) => state.remove(thread.id, messageId),
389
415
  onEdit: (messageId, body, mentions) => state.edit(thread.id, messageId, body, mentions),
390
416
  onReopen: () => state.reopen(thread.id),
391
- onReply: async (body, mentions, files) => state.reply(thread.id, body, mentions, await keys(files)),
417
+ onReply: async (body, mentions, list) => {
418
+ const { attachments, files } = await prepare(list);
419
+ return state.reply(thread.id, body, mentions, attachments, files);
420
+ },
392
421
  onResolve: async () => {
393
422
  await state.resolve(thread.id);
394
423
  state.close();
395
424
  },
396
425
  thread,
397
426
  user: user.value
398
- });
427
+ }, statusSlot());
399
428
  const marginLayout = (spots, draftY) => {
400
429
  const entries = pinned.value.flatMap((thread) => {
401
430
  const spot = state.shown.value.has(thread.id) ? spots.get(thread.id) : void 0;
@@ -432,10 +461,11 @@ const CommentLayer = defineComponent({
432
461
  const thread = entry.thread;
433
462
  if (!thread || entry.active) return [];
434
463
  return [h("button", {
435
- "aria-label": `Comment ${thread.n}: ${excerpt(thread.messages[0]?.body ?? "")}`,
464
+ "aria-label": `${commentTitle(thread)}: ${excerpt(thread.messages[0]?.body ?? "")}`,
436
465
  "data-margin-key": entry.key,
437
466
  "data-slot": "comment-margin-card",
438
467
  "data-status": thread.status,
468
+ ...deliveryAttributes(thread.delivery),
439
469
  key: entry.key,
440
470
  onClick: () => state.open(thread),
441
471
  onPointerenter: () => {
@@ -492,7 +522,7 @@ const CommentLayer = defineComponent({
492
522
  "data-shape": pinShape(thread.anchor.kind),
493
523
  "data-thread-id": thread.id,
494
524
  excerpt: excerpt(thread.messages[0]?.body ?? ""),
495
- n: thread.n,
525
+ ...thread.n ? { n: thread.n } : {},
496
526
  onHover: () => {
497
527
  if (!open && !restoring && !state.draft.value) state.hoverId.value = thread.id;
498
528
  },
@@ -508,7 +538,7 @@ const CommentLayer = defineComponent({
508
538
  preview: true,
509
539
  size: props.size,
510
540
  thread
511
- })) : null])];
541
+ }, statusSlot())) : null])];
512
542
  });
513
543
  const draft = state.draft.value;
514
544
  const draftPosition = draft && state.positions.value.get("draft");
@@ -556,6 +586,7 @@ const CommentLayer = defineComponent({
556
586
  draft: true
557
587
  }), h("div", {
558
588
  ...draftColumn,
589
+ "data-motion-appear": draftColumn ? void 0 : "[data-slot=comment-pin]",
559
590
  "data-slot": "comment-layer-popover",
560
591
  style: draftColumn?.style ?? {
561
592
  left: `${placement.left}px`,
@@ -1,2 +1,2 @@
1
- import { n as CommentList, r as CommentToolbar, t as CommentFilters } from "../../comment-list-B8hphLfS.js";
1
+ import { n as CommentList, r as CommentToolbar, t as CommentFilters } from "../../comment-list-BI96empx.js";
2
2
  export { CommentFilters, CommentList, CommentToolbar };