@vite-hub/ui 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/README.md +68 -52
  2. package/dist/{Chat-BZxkf3Tt.js → Chat-DYQitDw8.js} +1 -1
  3. package/dist/{ChatMessage-Blr5F-zi.js → ChatMessage-DzjHnxMT.js} +1 -1
  4. package/dist/{CodeBlockTitle-DYrYpc1U.js → CodeBlockTitle-DX13mCTi.js} +1 -1
  5. package/dist/{CommentRow-ViZ7r8nr.js → CommentRow-DLW77qch.js} +2 -2
  6. package/dist/CopyButton-D-g6PWc8.js +188 -0
  7. package/dist/{Markdown-_w7feFzl.js → Markdown-3-Tvy5Kl.js} +1 -1
  8. package/dist/{MarkdownCodeBlock-B4j7x0H6.js → MarkdownCodeBlock-CALGW0iw.js} +1 -1
  9. package/dist/{MessageParts-FVyYZNsn.js → MessageParts-BGSctG7Z.js} +1 -1
  10. package/dist/{MorphText-CYTndbyp.js → MorphText-DAHAswWX.js} +1 -1
  11. package/dist/{RollNumber-Bo2tzfAp.js → RollNumber-CkdLiy2i.js} +1 -1
  12. package/dist/{motion-dPwxx3Wk.js → SwapIcon-Bjkk7WlZ.js} +2 -11
  13. package/dist/{agent-session-DhlTKCQG.js → agent-session-D291hyRk.js} +1 -1
  14. package/dist/{avatar-stack-nQErr0qn.js → avatar-stack-Bi4CJPuU.js} +1 -1
  15. package/dist/{chat-session-hjZRL6jY.js → chat-session-Bl-x4c9b.js} +1 -1
  16. package/dist/{comment-composer-BUt6vbnr.js → comment-composer-BtYrIT5W.js} +14 -19
  17. package/dist/{comment-composer-CIsbz-78.d.ts → comment-composer-PmERtNNb.d.ts} +3 -3
  18. package/dist/{comment-layer-BlVNORgj.d.ts → comment-layer-BgQz1ixK.d.ts} +3 -3
  19. package/dist/{comment-layer-Ck2H24oJ.js → comment-layer-T8hN_7bN.js} +11 -12
  20. package/dist/{comment-panel-Djx-KxVa.d.ts → comment-panel-Vo3m6rHB.d.ts} +2 -2
  21. package/dist/{comment-selection-bar-CxPkJxVl.js → comment-selection-bar-BMFTtI3V.js} +2 -4
  22. package/dist/{comment-selection-bar-CbOEI98x.d.ts → comment-selection-bar-B_bchB2O.d.ts} +1 -1
  23. package/dist/{comment-thread-C_Q4UDaV.js → comment-thread-CAexk1r7.js} +78 -38
  24. package/dist/{comment-thread-X6gYMNay.d.ts → comment-thread-Cp9k80uv.d.ts} +50 -2
  25. package/dist/{comments-B1itauwb.d.ts → comments-BBNiQTxK.d.ts} +12 -14
  26. package/dist/{components-CM5mZe0a.js → components-D44u1fsy.js} +22 -47
  27. package/dist/{config-CFwvNt4Y.js → config-7CiYbXk6.js} +9 -6
  28. package/dist/{config-JmsTI7gs.d.ts → config-BYLPA0Ts.d.ts} +8 -6
  29. package/dist/{drop-field-DKpYQ3tO.js → drop-field-BkoJOWR9.js} +1 -1
  30. package/dist/{editor-DJPUs1nt.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-cOPqQ9FJ.js → hold-to-delete-pyrlKzk0.js} +1 -1
  35. package/dist/{hold-to-delete-CcQbfiQx.js → hold-to-delete-sscThmPW.js} +30 -3
  36. package/dist/icon-component-ofUeRW4L.js +4 -0
  37. package/dist/{index-9Z6Gwtnf.d.ts → index-BlQsW8ZZ.d.ts} +1 -1
  38. package/dist/index.d.ts +32 -39
  39. package/dist/index.js +25 -26
  40. package/dist/{markdown-DDyOdYq_.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-itHFtXwA.js → motion-C8P5yWaA.js} +1 -1
  47. package/dist/{motion-core-BfIefToe.d.ts → motion-core-BEwxN7Il.d.ts} +4 -2
  48. package/dist/{motion-core-BdTfxAhY.js → motion-core-pkL0M4Y1.js} +57 -115
  49. package/dist/{motion-list-BBbz93WT.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 -34
  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.js +1 -1
  60. package/dist/parts/components/comment-composer.d.ts +1 -1
  61. package/dist/parts/components/comment-composer.js +1 -1
  62. package/dist/parts/components/comment-layer.d.ts +1 -1
  63. package/dist/parts/components/comment-layer.js +1 -1
  64. package/dist/parts/components/comment-panel.d.ts +1 -1
  65. package/dist/parts/components/comment-panel.js +6 -7
  66. package/dist/parts/components/comment-selection-bar.d.ts +1 -1
  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 +8 -8
  71. package/dist/parts/components/comments.js +5 -6
  72. package/dist/parts/components/copy-button.js +1 -3
  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 +12 -3
  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 +1 -1
  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.js +3 -4
  98. package/dist/parts/workspace/workspace-preview.d.ts +1 -1
  99. package/dist/parts/workspace/workspace-preview.js +2 -4
  100. package/dist/parts/workspace/workspace-shell.d.ts +1 -1
  101. package/dist/parts/workspace/workspace-shell.js +2 -7
  102. package/dist/parts/workspace/workspace-sidebar.d.ts +1 -1
  103. package/dist/parts/workspace/workspace-sidebar.js +5 -6
  104. package/dist/parts/workspace/workspace-start.js +2 -3
  105. package/dist/parts/workspace/workspace-steps.js +6 -7
  106. package/dist/parts/workspace/workspace-terminal.js +0 -6
  107. package/dist/parts/workspace/workspace.d.ts +3 -3
  108. package/dist/parts/workspace/workspace.js +15 -18
  109. package/dist/{progress-D_9sG648.js → progress-D7CyDkLW.js} +1 -1
  110. package/dist/{prompt-input-j4OFTF5p.d.ts → prompt-input-DZM3E6WP.d.ts} +2 -2
  111. package/dist/{ring-DoL9jivj.js → ring-C5lNUEAG.js} +1 -1
  112. package/dist/runtime/nuxt-plugin.js +27 -1
  113. package/dist/{stand-ins-CuKM1UH1.js → stand-ins-C2oSoNwV.js} +29 -84
  114. package/dist/styles.css +37 -21
  115. package/dist/{sync-status-BRroyOre.js → sync-status-D27Qt7mk.js} +1 -1
  116. package/dist/theme-focus-ring.css +1 -1
  117. package/dist/{tween-lVMRCUEv.js → tween-DGAmrS3r.js} +4 -2
  118. package/dist/{types-BF_U0tgp.d.ts → types-CMU8Vmew.d.ts} +2 -5
  119. package/dist/{vue-DdYvDVOr.js → vue-D70TZJhJ.js} +1 -1
  120. package/dist/{workspace-boot-status-CyGlJS06.js → workspace-boot-status-BDkpubHd.js} +0 -1
  121. package/dist/{workspace-shell-B4A7CINd.d.ts → workspace-shell-CwEQT_1s.d.ts} +1 -1
  122. package/dist/workspace.d.ts +1 -1
  123. package/dist/workspace.js +1 -1
  124. package/package.json +10 -18
  125. package/dist/CopyButton-Dtg_Oc9_.js +0 -115
  126. package/dist/announce-CJNXaYbT.js +0 -29
  127. package/dist/comment-send.css +0 -267
  128. package/dist/comments-BtD28xEn.js +0 -390
  129. package/dist/nuxt-ui-CPdiTwwD.js +0 -22
  130. package/dist/theme.css +0 -379
  131. package/dist/theme.d.ts +0 -410
  132. package/dist/theme.js +0 -290
  133. package/dist/ui-components-CKQAPI-W.js +0 -7
  134. package/dist/use-copy-DK1SSZkh.js +0 -66
@@ -1,66 +0,0 @@
1
- import { getCurrentScope, onScopeDispose, readonly, ref, toValue } from "vue";
2
- // registry/copy-button/use-copy.ts
3
- async function writeClipboard(value) {
4
- const text = typeof value === "function" ? value() : value;
5
- try {
6
- if (await writeClipboardApi(text)) return true;
7
- } catch {}
8
- return copyWithCommand(await text);
9
- }
10
- async function writeClipboardApi(text) {
11
- const clipboard = globalThis.navigator?.clipboard;
12
- if (typeof clipboard?.writeText !== "function") return false;
13
- if (typeof text === "string") await clipboard.writeText(text);
14
- else if (typeof ClipboardItem === "function" && typeof clipboard.write === "function") await clipboard.write([new ClipboardItem({ "text/plain": text.then((resolved) => new Blob([resolved], { type: "text/plain" })) })]);
15
- else await clipboard.writeText(await text);
16
- return true;
17
- }
18
- function copyWithCommand(text) {
19
- const doc = globalThis.document;
20
- if (typeof doc?.execCommand !== "function" || !doc.body) return false;
21
- const focused = doc.activeElement;
22
- const area = doc.createElement("textarea");
23
- area.value = text;
24
- area.readOnly = true;
25
- area.style.position = "fixed";
26
- area.style.opacity = "0";
27
- doc.body.append(area);
28
- area.focus({ preventScroll: true });
29
- area.select();
30
- try {
31
- return doc.execCommand("copy");
32
- } catch {
33
- return false;
34
- } finally {
35
- area.remove();
36
- if (focused instanceof HTMLElement) focused.focus({ preventScroll: true });
37
- }
38
- }
39
- function useCopy(options = {}) {
40
- const copied = ref(false);
41
- const failed = ref(false);
42
- let timer;
43
- if (getCurrentScope()) onScopeDispose(() => clearTimeout(timer));
44
- async function copy(value) {
45
- clearTimeout(timer);
46
- copied.value = false;
47
- failed.value = false;
48
- try {
49
- copied.value = await writeClipboard(value);
50
- } catch {
51
- copied.value = false;
52
- }
53
- failed.value = !copied.value;
54
- timer = setTimeout(() => {
55
- copied.value = false;
56
- failed.value = false;
57
- }, toValue(options.duration) ?? 2e3);
58
- return copied.value;
59
- }
60
- return {
61
- copy,
62
- copied: readonly(copied),
63
- failed: readonly(failed)
64
- };
65
- }
66
- export { useCopy as t };