@vite-hub/ui 0.7.0 → 0.8.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 (112) hide show
  1. package/README.md +3 -3
  2. package/dist/{Chat-BZxkf3Tt.js → Chat-CuSthJVg.js} +1 -1
  3. package/dist/{ChatMessage-Blr5F-zi.js → ChatMessage-CFQs0v4N.js} +1 -1
  4. package/dist/{CodeBlockTitle-DYrYpc1U.js → CodeBlockTitle-DIu8Ef3V.js} +1 -1
  5. package/dist/{CommentRow-ViZ7r8nr.js → CommentRow-XY3FNp30.js} +2 -2
  6. package/dist/CopyButton-Bs6DT-Z8.js +188 -0
  7. package/dist/{Markdown-_w7feFzl.js → Markdown-Da5t-931.js} +1 -1
  8. package/dist/{MarkdownCodeBlock-B4j7x0H6.js → MarkdownCodeBlock-BWDLOWPO.js} +1 -1
  9. package/dist/{MessageParts-FVyYZNsn.js → MessageParts-CyJLG34y.js} +1 -1
  10. package/dist/{MorphText-CYTndbyp.js → MorphText-B6MWdeIv.js} +1 -1
  11. package/dist/{RollNumber-Bo2tzfAp.js → RollNumber-CnF52zJM.js} +1 -1
  12. package/dist/{motion-dPwxx3Wk.js → SwapIcon-CUIq1TU5.js} +2 -11
  13. package/dist/{agent-session-DhlTKCQG.js → agent-session-2j2gbGpp.js} +1 -1
  14. package/dist/{avatar-stack-nQErr0qn.js → avatar-stack-CoLlsmwJ.js} +1 -1
  15. package/dist/{chat-session-hjZRL6jY.js → chat-session-cxUzvwdj.js} +1 -1
  16. package/dist/{code-block-Bp8y-XJp.d.ts → code-block-BqOEVWPh.d.ts} +1 -1
  17. package/dist/{comment-composer-CIsbz-78.d.ts → comment-composer-CsVOvG9j.d.ts} +3 -3
  18. package/dist/{comment-composer-BUt6vbnr.js → comment-composer-D_mcH3Ts.js} +5 -5
  19. package/dist/{comment-layer-BlVNORgj.d.ts → comment-layer-C3xmg-0_.d.ts} +6 -6
  20. package/dist/{comment-layer-Ck2H24oJ.js → comment-layer-Ci6ipGi2.js} +9 -9
  21. package/dist/{comment-panel-Djx-KxVa.d.ts → comment-panel-DxN21VoY.d.ts} +9 -9
  22. package/dist/{comment-selection-bar-CbOEI98x.d.ts → comment-selection-bar-B_bchB2O.d.ts} +1 -1
  23. package/dist/{comment-selection-bar-CxPkJxVl.js → comment-selection-bar-DZAtiRZ9.js} +1 -2
  24. package/dist/{comment-thread-X6gYMNay.d.ts → comment-thread-BmsqcjVQ.d.ts} +4 -4
  25. package/dist/{comment-thread-C_Q4UDaV.js → comment-thread-BzOZVqF2.js} +8 -8
  26. package/dist/{comments-B1itauwb.d.ts → comments-BU8cTt5o.d.ts} +12 -14
  27. package/dist/{components-CM5mZe0a.js → components-B_2Q0dJ3.js} +2 -2
  28. package/dist/{config-CFwvNt4Y.js → config-BDQYUjjp.js} +3 -3
  29. package/dist/{drop-field-DKpYQ3tO.js → drop-field-DeIvKoJs.js} +1 -1
  30. package/dist/{editor-DJPUs1nt.js → editor-hXea1i46.js} +2 -2
  31. package/dist/editor.js +1 -1
  32. package/dist/{hold-to-delete-CcQbfiQx.js → hold-to-delete-D1Vy40w5.js} +30 -3
  33. package/dist/{hold-to-delete-cOPqQ9FJ.js → hold-to-delete-DazElJT2.js} +1 -1
  34. package/dist/{index-9Z6Gwtnf.d.ts → index-CffOzibW.d.ts} +1 -1
  35. package/dist/index.d.ts +32 -32
  36. package/dist/index.js +26 -26
  37. package/dist/{markdown-DDyOdYq_.js → markdown-_0HhbsOo.js} +2 -2
  38. package/dist/markdown-editor.js +1 -1
  39. package/dist/markdown.js +1 -1
  40. package/dist/motion/core.d.ts +1 -1
  41. package/dist/motion/core.js +4 -4
  42. package/dist/{motion-itHFtXwA.js → motion-BhARaNBB.js} +1 -1
  43. package/dist/{motion-core-BdTfxAhY.js → motion-core-JZZiPKEk.js} +57 -72
  44. package/dist/{motion-core-BfIefToe.d.ts → motion-core-gfsTPLbh.d.ts} +5 -1
  45. package/dist/{motion-list-BBbz93WT.js → motion-list-9vD1hSS0.js} +1 -1
  46. package/dist/motion.d.ts +1 -1
  47. package/dist/motion.js +5 -5
  48. package/dist/{nuxt-ui-CPdiTwwD.js → nuxt-ui-D3Qda35W.js} +1 -1
  49. package/dist/nuxt.js +0 -1
  50. package/dist/parts/components/agent-session.js +1 -1
  51. package/dist/parts/components/avatar-stack.js +1 -1
  52. package/dist/parts/components/chat-message.js +1 -1
  53. package/dist/parts/components/chat-session.js +1 -1
  54. package/dist/parts/components/chat.js +1 -1
  55. package/dist/parts/components/code-block.d.ts +1 -1
  56. package/dist/parts/components/code-block.js +1 -1
  57. package/dist/parts/components/comment-composer.d.ts +1 -1
  58. package/dist/parts/components/comment-composer.js +1 -1
  59. package/dist/parts/components/comment-layer.d.ts +1 -1
  60. package/dist/parts/components/comment-layer.js +1 -1
  61. package/dist/parts/components/comment-panel.d.ts +1 -1
  62. package/dist/parts/components/comment-panel.js +5 -5
  63. package/dist/parts/components/comment-selection-bar.d.ts +1 -1
  64. package/dist/parts/components/comment-selection-bar.js +1 -1
  65. package/dist/parts/components/comment-thread.d.ts +1 -1
  66. package/dist/parts/components/comment-thread.js +1 -1
  67. package/dist/parts/components/comments.d.ts +8 -8
  68. package/dist/parts/components/comments.js +5 -6
  69. package/dist/parts/components/copy-button.js +1 -3
  70. package/dist/parts/components/drop-field.js +1 -1
  71. package/dist/parts/components/hold-to-delete.js +1 -1
  72. package/dist/parts/components/markdown.js +1 -1
  73. package/dist/parts/components/message-parts.js +1 -1
  74. package/dist/parts/components/motion-list.d.ts +1 -1
  75. package/dist/parts/components/motion-list.js +1 -1
  76. package/dist/parts/components/motion.d.ts +2 -2
  77. package/dist/parts/components/motion.js +12 -3
  78. package/dist/parts/components/progress.js +1 -1
  79. package/dist/parts/components/sync-status.js +1 -1
  80. package/dist/parts/workspace/browser-support-notice.d.ts +1 -1
  81. package/dist/parts/workspace/browser-support-notice.js +4 -4
  82. package/dist/parts/workspace/connect-panel.js +1 -1
  83. package/dist/parts/workspace/runners/web-container.js +1 -1
  84. package/dist/parts/workspace/workspace-bar.js +1 -1
  85. package/dist/parts/workspace/workspace-editor-head.js +1 -1
  86. package/dist/parts/workspace/workspace-examples.js +1 -1
  87. package/dist/parts/workspace/workspace-guide.d.ts +1 -1
  88. package/dist/parts/workspace/workspace-guide.js +1 -1
  89. package/dist/parts/workspace/workspace-preview.d.ts +1 -1
  90. package/dist/parts/workspace/workspace-preview.js +1 -1
  91. package/dist/parts/workspace/workspace-shell.js +1 -1
  92. package/dist/parts/workspace/workspace-sidebar.d.ts +2 -2
  93. package/dist/parts/workspace/workspace-sidebar.js +2 -2
  94. package/dist/parts/workspace/workspace-start.d.ts +1 -1
  95. package/dist/parts/workspace/workspace-start.js +1 -1
  96. package/dist/parts/workspace/workspace-steps.js +1 -1
  97. package/dist/parts/workspace/workspace.d.ts +2 -2
  98. package/dist/parts/workspace/workspace.js +3 -3
  99. package/dist/{progress-D_9sG648.js → progress-8P8RLYMy.js} +1 -1
  100. package/dist/{ring-DoL9jivj.js → ring-B0nZBnU0.js} +1 -1
  101. package/dist/runtime/nuxt-plugin.js +1 -1
  102. package/dist/styles.css +10 -12
  103. package/dist/{sync-status-BRroyOre.js → sync-status-B29eG_n-.js} +1 -1
  104. package/dist/{tween-lVMRCUEv.js → tween-1W-LlKk9.js} +5 -1
  105. package/dist/{types-BF_U0tgp.d.ts → types-CMU8Vmew.d.ts} +2 -5
  106. package/dist/{vue-DdYvDVOr.js → vue-BdA18K5-.js} +1 -1
  107. package/package.json +6 -9
  108. package/dist/CopyButton-Dtg_Oc9_.js +0 -115
  109. package/dist/announce-CJNXaYbT.js +0 -29
  110. package/dist/comment-send.css +0 -267
  111. package/dist/comments-BtD28xEn.js +0 -390
  112. package/dist/use-copy-DK1SSZkh.js +0 -66
@@ -1,4 +1,4 @@
1
- import { t as useCopy } from "../../../use-copy-DK1SSZkh.js";
1
+ import { n as useCopy } from "../../../CopyButton-Bs6DT-Z8.js";
2
2
  import { ConnectPanel } from "../connect-panel.js";
3
3
  import { useConnectStore } from "../connect-store.js";
4
4
  import { t as WorkspaceBootStatus } from "../../../workspace-boot-status-CyGlJS06.js";
@@ -1,4 +1,4 @@
1
- import { t as useUIComponent } from "../../nuxt-ui-CPdiTwwD.js";
1
+ import { t as useUIComponent } from "../../nuxt-ui-D3Qda35W.js";
2
2
  import { defineComponent, h } from "vue";
3
3
  // src/workspace/workspace-bar.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { t as useUIComponent } from "../../nuxt-ui-CPdiTwwD.js";
1
+ import { t as useUIComponent } from "../../nuxt-ui-D3Qda35W.js";
2
2
  import { fileIcon } from "./file-icons.js";
3
3
  import { icon } from "./icons.js";
4
4
  import { defineComponent, h } from "vue";
@@ -1,4 +1,4 @@
1
- import { t as useUIComponent } from "../../nuxt-ui-CPdiTwwD.js";
1
+ import { t as useUIComponent } from "../../nuxt-ui-D3Qda35W.js";
2
2
  import { computed, defineComponent, h } from "vue";
3
3
  // src/workspace/workspace-examples.ts
4
4
  /** The examples by group, in the order of their first example. Examples without a group come first. */
@@ -45,6 +45,6 @@ export declare const WorkspaceGuide: import("vue").DefineComponent<import("vue")
45
45
  "onUpdate:step"?: ((step: number) => any) | undefined;
46
46
  }>, {
47
47
  title: string;
48
- step: number;
49
48
  steps: readonly WorkspaceStep[];
49
+ step: number;
50
50
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,4 +1,4 @@
1
- import { t as useUIComponent } from "../../nuxt-ui-CPdiTwwD.js";
1
+ import { t as useUIComponent } from "../../nuxt-ui-D3Qda35W.js";
2
2
  import { keepFocus, useStepModel } from "./workspace-steps.js";
3
3
  import { defineComponent, h, ref, watch } from "vue";
4
4
  // src/workspace/workspace-guide.ts
@@ -63,8 +63,8 @@ export declare const WorkspacePreview: import("vue").DefineComponent<import("vue
63
63
  "onUpdate:path"?: ((path: string) => any) | undefined;
64
64
  "onUpdate:device"?: ((device: WorkspacePreviewDevice) => any) | undefined;
65
65
  }>, {
66
- title: string;
67
66
  url: string;
67
+ title: string;
68
68
  path: string;
69
69
  device: WorkspacePreviewDevice;
70
70
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,5 +1,5 @@
1
1
  import { t as DeviceFrame_default } from "../../device-frame-DDWoyB-G.js";
2
- import { t as useUIComponent } from "../../nuxt-ui-CPdiTwwD.js";
2
+ import { t as useUIComponent } from "../../nuxt-ui-D3Qda35W.js";
3
3
  import { icon } from "./icons.js";
4
4
  import { computed, defineComponent, h, onBeforeUnmount, onMounted, ref, shallowRef, useId, watch } from "vue";
5
5
  // src/workspace/workspace-preview.ts
@@ -1,4 +1,4 @@
1
- import { t as useUIComponent } from "../../nuxt-ui-CPdiTwwD.js";
1
+ import { t as useUIComponent } from "../../nuxt-ui-D3Qda35W.js";
2
2
  import { computed, defineComponent, h, onMounted, ref, watch } from "vue";
3
3
  // src/workspace/workspace-shell.ts
4
4
  const defaultSplits = {
@@ -62,11 +62,11 @@ export declare const WorkspaceSidebar: import("vue").DefineComponent<import("vue
62
62
  "onCopy-link"?: (() => any) | undefined;
63
63
  "onUpdate:open"?: ((open: boolean) => any) | undefined;
64
64
  }>, {
65
- open: boolean;
65
+ copied: boolean;
66
66
  label: string;
67
67
  id: string;
68
+ open: boolean;
68
69
  actions: readonly WorkspaceSidebarAction[];
69
- copied: boolean;
70
70
  }, SlotsType<{
71
71
  default?: () => VNode[];
72
72
  footer?: () => VNode[];
@@ -1,5 +1,5 @@
1
- import { t as useUIComponent } from "../../nuxt-ui-CPdiTwwD.js";
2
- import { t as ring } from "../../ring-DoL9jivj.js";
1
+ import { t as useUIComponent } from "../../nuxt-ui-D3Qda35W.js";
2
+ import { t as ring } from "../../ring-B0nZBnU0.js";
3
3
  import { defineComponent, h, nextTick, onBeforeUnmount, onMounted, ref, useId, watch } from "vue";
4
4
  // src/workspace/workspace-sidebar.ts
5
5
  const tabbable = "a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex='-1'])";
@@ -38,8 +38,8 @@ export declare const WorkspaceStart: import("vue").DefineComponent<import("vue")
38
38
  }>> & Readonly<{
39
39
  onPick?: ((id: string) => any) | undefined;
40
40
  }>, {
41
- title: string;
42
41
  description: string;
42
+ title: string;
43
43
  }, SlotsType<{
44
44
  footer?: () => VNode[];
45
45
  }>, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,4 +1,4 @@
1
- import { t as useUIComponent } from "../../nuxt-ui-CPdiTwwD.js";
1
+ import { t as useUIComponent } from "../../nuxt-ui-D3Qda35W.js";
2
2
  import { defineComponent, h, useId } from "vue";
3
3
  // src/workspace/workspace-start.ts
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { t as useUIComponent } from "../../nuxt-ui-CPdiTwwD.js";
1
+ import { t as useUIComponent } from "../../nuxt-ui-D3Qda35W.js";
2
2
  import { computed, defineComponent, h, nextTick, ref } from "vue";
3
3
  // src/workspace/workspace-steps.ts
4
4
  /**
@@ -234,13 +234,13 @@ export declare const Workspace: import("vue").DefineComponent<ExtractPropTypes<{
234
234
  "onUpdate:open"?: ((open: boolean) => any) | undefined;
235
235
  "onUpdate:example"?: ((id: string) => any) | undefined;
236
236
  }>, {
237
- open: boolean;
238
237
  name: string;
239
238
  label: string;
240
239
  reset: (files: WorkspaceFiles, example: WorkspaceExample) => WorkspaceFiles;
240
+ open: boolean;
241
241
  start: boolean;
242
- step: number;
243
242
  steps: readonly WorkspaceStep[];
243
+ step: number;
244
244
  selected: string;
245
245
  tabs: readonly WorkspaceTabItem[];
246
246
  example: string;
@@ -1,8 +1,8 @@
1
- import { t as useCopy } from "../../use-copy-DK1SSZkh.js";
1
+ import { n as useCopy } from "../../CopyButton-Bs6DT-Z8.js";
2
2
  import { t as Status_default } from "../../status-B2Yhrwv8.js";
3
3
  import { t as uiErrorDiagnostics } from "../../error-diagnostics-BlgA9rI2.js";
4
- import { t as useUIComponent } from "../../nuxt-ui-CPdiTwwD.js";
5
- import { t as ring } from "../../ring-DoL9jivj.js";
4
+ import { t as useUIComponent } from "../../nuxt-ui-D3Qda35W.js";
5
+ import { t as ring } from "../../ring-B0nZBnU0.js";
6
6
  import { decodePlaygroundLink, encodePlaygroundLink, playgroundLinkLimit, playgroundUrl, readPlaygroundHash } from "../playground/share.js";
7
7
  import { downloadZip } from "../playground/zip.js";
8
8
  import { BrowserSupportNotice } from "./browser-support-notice.js";
@@ -1,4 +1,4 @@
1
- import { n as createProgress } from "./motion-core-BdTfxAhY.js";
1
+ import { n as createProgress } from "./motion-core-JZZiPKEk.js";
2
2
  import { computed, createElementBlock, defineComponent, onBeforeUnmount, onMounted, openBlock, useTemplateRef, watch } from "vue";
3
3
  // registry/progress/Progress.vue?vue&type=script&setup=true&lang.ts
4
4
  const _hoisted_1 = ["aria-label", "aria-valuenow"];
@@ -1,4 +1,4 @@
1
- import { a as tween, c as createSpring, h as prefersReducedMotion, o as isMotionOff, r as easeOut } from "./tween-lVMRCUEv.js";
1
+ import { a as tween, c as createSpring, h as prefersReducedMotion, o as isMotionOff, r as easeOut } from "./tween-1W-LlKk9.js";
2
2
  // src/motion/helpers/frame.ts
3
3
  const ownNodes = /* @__PURE__ */ new WeakSet();
4
4
  function own(node) {
@@ -1,5 +1,5 @@
1
1
  import { r as startRelativeClock, t as provideRelativeNow } from "../relative-time-Dz2DR4eb.js";
2
- import { t as createViteHubUI } from "../config-CFwvNt4Y.js";
2
+ import { t as createViteHubUI } from "../config-BDQYUjjp.js";
3
3
  import { defineNuxtPlugin, useAppConfig, useRuntimeConfig, useState } from "#app";
4
4
  // src/runtime/nuxt-plugin.ts
5
5
  const viteHubUIPlugin = defineNuxtPlugin((nuxtApp) => {
package/dist/styles.css CHANGED
@@ -8,8 +8,6 @@
8
8
  @import "./theme-focus-ring.css";
9
9
  /* Comment pins, areas, and highlights. The ViteHub pill and Drop's page frame load the same file without a framework. */
10
10
  @import "./comment-marks.css" layer(components);
11
- /* CommentSend, the Send segment of a comment pill. The ViteHub pill loads the same file in its toolbar. */
12
- @import "./comment-send.css" layer(components);
13
11
  /* The registry items. shadcn-vue installs the same files, and the build inlines them into dist/styles.css. */
14
12
  @layer components {
15
13
  /* Status: a 6px dot in the brighter status color and a label. A colored label uses the darker text shade of the theme. */
@@ -209,7 +207,7 @@
209
207
  width: 1.25rem;
210
208
  }
211
209
 
212
- [data-slot="copy-button"][data-loading] [data-slot="copy-button-icon"] {
210
+ [data-slot="copy-button"][data-loading] [data-copy-button-loader] {
213
211
  animation: copy-button-spin 1s linear infinite;
214
212
  }
215
213
 
@@ -224,7 +222,7 @@
224
222
  transition: none;
225
223
  }
226
224
 
227
- [data-slot="copy-button"][data-loading] [data-slot="copy-button-icon"] {
225
+ [data-slot="copy-button"][data-loading] [data-copy-button-loader] {
228
226
  animation: none;
229
227
  }
230
228
  }
@@ -2404,7 +2402,8 @@
2404
2402
 
2405
2403
  /* The bar over selected text: a flat surface in the ink color, so it is dark on a light page and light on a dark one.
2406
2404
  It floats over any page, such as in the ViteHub pill's shadow root, so its sizes are in px and do not follow the
2407
- page's root font size: the page places it by its fixed 38px height. */
2405
+ page's root font size: the page places it by its fixed 38px height. It shows at once, with no motion: people select
2406
+ text many times a day, and the bar is a menu they read and pick from. */
2408
2407
  [data-slot="comment-selection-bar"] {
2409
2408
  --vh-selection-bar-text: color-mix(in oklab, var(--vh-inverted) 82%, var(--vh-highlighted));
2410
2409
  align-items: center;
@@ -2419,14 +2418,9 @@
2419
2418
  gap: 4px;
2420
2419
  line-height: 1;
2421
2420
  padding: 4px;
2422
- transform-origin: 50% 100%;
2423
2421
  width: max-content;
2424
2422
  }
2425
2423
 
2426
- [data-slot="comment-selection-bar"][data-side="bottom"] {
2427
- transform-origin: 50% 0;
2428
- }
2429
-
2430
2424
  [data-slot="comment-selection-bar-action"] {
2431
2425
  align-items: center;
2432
2426
  background: none;
@@ -2639,7 +2633,8 @@
2639
2633
  /* The whole-page island: a 32px capsule at the top center of the screen with the card's surface, so it follows the
2640
2634
  page's theme. `data-state` is "none", "count", "hint", or "open"; with "none" it renders no card. The motion layer
2641
2635
  moves it: the card comes down from the top edge (`data-motion-appear`, `data-side="bottom"`), the label morphs with
2642
- the width following, and the trigger squashes. Open, the card is wider at once. `--vh-comment-island-top` puts it
2636
+ the width following, and the trigger squashes. Open, the card is wider at once, with the 12px corners of a floating
2637
+ card. `--vh-comment-island-top` puts it
2643
2638
  under a pill that docks to the top edge. A card that leaves goes up as a copy in the same grid cell, so a card
2644
2639
  that shows again meanwhile stays centered. */
2645
2640
  [data-slot="comment-layer"] > [data-slot="comment-page-island"] {
@@ -2671,6 +2666,7 @@
2671
2666
  }
2672
2667
 
2673
2668
  [data-slot="comment-page-island-card"][data-open] {
2669
+ border-radius: 0.75rem;
2674
2670
  width: min(21.25rem, 100vw - 1.5rem);
2675
2671
  }
2676
2672
 
@@ -2680,7 +2676,8 @@
2680
2676
  }
2681
2677
  }
2682
2678
 
2683
- /* The 18px faces sit 7px inside the 16px corner, so they are concentric with it. */
2679
+ /* The 18px faces sit 7px inside the 16px corner, so they are concentric with it. The letters of a label that
2680
+ leaves blur out inside the capsule while it narrows, not past its edge. */
2684
2681
  [data-slot="comment-page-island-trigger"] {
2685
2682
  align-items: center;
2686
2683
  background: none;
@@ -2695,6 +2692,7 @@
2695
2692
  font-weight: 500;
2696
2693
  gap: 0.375rem;
2697
2694
  height: 2rem;
2695
+ overflow: clip;
2698
2696
  padding: 0 0.75rem 0 0.4375rem;
2699
2697
  text-align: start;
2700
2698
  white-space: nowrap;
@@ -1,4 +1,4 @@
1
- import { t as MorphText_default } from "./MorphText-CYTndbyp.js";
1
+ import { t as MorphText_default } from "./MorphText-B6MWdeIv.js";
2
2
  import { createElementBlock, createVNode, defineComponent, inject, openBlock, provide, ref, renderSlot, toRef, unref } from "vue";
3
3
  // registry/sync-status/context.ts
4
4
  const syncStatusKey = Symbol("SyncStatus");
@@ -44,11 +44,15 @@ function forceReducedMotion(reduced) {
44
44
  // src/motion/spring.ts
45
45
  /** The named springs of docs/design/motion.md. Use them, not numbers of your own. */
46
46
  const springs = {
47
- /** Moves and resizes: an indicator that travels, a width that follows its label. */
47
+ /** Moves and resizes: a toast, a list row, a width that follows its label. `glide` moves a selection with no overshoot. */
48
48
  snappy: {
49
49
  stiffness: 520,
50
50
  damping: 34
51
51
  },
52
+ glide: {
53
+ stiffness: 800,
54
+ damping: 57
55
+ },
52
56
  /** Wobbles and settles: a toggled icon, a knob that lands. */
53
57
  soft: {
54
58
  stiffness: 380,
@@ -2,7 +2,7 @@ import "./headless-2IcUWHMq.js";
2
2
  import { s as CommentsState } from "./comments-ZfV6IZs8.js";
3
3
  import { t as AvatarStackPerson } from "./types-CTk3aNb5.js";
4
4
  import { VNode } from "vue";
5
- import { CommentSendClient, CommentStatus, CommentThread, CommentUser } from "@vite-hub/comments/client";
5
+ import { CommentStatus, CommentThread, CommentUser } from "@vite-hub/comments/client";
6
6
  interface CommentPinProps {
7
7
  number?: number;
8
8
  author?: CommentUser;
@@ -29,9 +29,6 @@ interface CommentSelectionBarSlots {
29
29
  "comment-icon"?: () => unknown;
30
30
  "suggest-icon"?: () => unknown;
31
31
  }
32
- interface CommentSendProps {
33
- client: CommentSendClient;
34
- }
35
32
  interface CommentRowSlotScope {
36
33
  thread: CommentThread;
37
34
  text: string;
@@ -71,4 +68,4 @@ interface CommentToolbarSlots {
71
68
  "list-icon"?: () => unknown;
72
69
  "page-icon"?: () => unknown;
73
70
  }
74
- export { CommentToolbarSlots as _, CommentPinEmits as a, CommentRowProps as c, CommentSelectionBarEmits as d, CommentSelectionBarProps as f, CommentToolbarProps as g, CommentSendProps as h, CommentListSlots as i, CommentRowSlotScope as l, CommentSelectionBarSlots as m, CommentListEmits as n, CommentPinProps as o, CommentSelectionBarSide as p, CommentListProps as r, CommentRowPartSlots as s, CommentFiltersProps as t, CommentRowSlots as u };
71
+ export { CommentPinEmits as a, CommentRowProps as c, CommentSelectionBarEmits as d, CommentSelectionBarProps as f, CommentToolbarSlots as g, CommentToolbarProps as h, CommentListSlots as i, CommentRowSlotScope as l, CommentSelectionBarSlots as m, CommentListEmits as n, CommentPinProps as o, CommentSelectionBarSide as p, CommentListProps as r, CommentRowPartSlots as s, CommentFiltersProps as t, CommentRowSlots as u };
@@ -1,4 +1,4 @@
1
- import "./markdown-DDyOdYq_.js";
1
+ import "./markdown-_0HhbsOo.js";
2
2
  import { defineComponent, h, onBeforeUnmount, onMounted, ref, useId, watch } from "vue";
3
3
  import { escapeHtml } from "comark/utils";
4
4
  // ../../node_modules/.pnpm/pele@1.12.0/node_modules/pele/dist/pele.js
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vite-hub/ui",
3
- "version": "0.7.0",
3
+ "version": "0.8.0",
4
4
  "description": "AI interface primitives for Vue and Nuxt.",
5
5
  "keywords": [
6
6
  "ai",
@@ -28,7 +28,6 @@
28
28
  "type": "module",
29
29
  "sideEffects": [
30
30
  "./dist/comment-marks.css",
31
- "./dist/comment-send.css",
32
31
  "./dist/styles.css",
33
32
  "./dist/theme.css"
34
33
  ],
@@ -117,7 +116,6 @@
117
116
  "./package.json": "./package.json",
118
117
  "./styles.css": "./dist/styles.css",
119
118
  "./comment-marks.css": "./dist/comment-marks.css",
120
- "./comment-send.css": "./dist/comment-send.css",
121
119
  "./theme.css": "./dist/theme.css"
122
120
  },
123
121
  "dependencies": {
@@ -128,7 +126,7 @@
128
126
  "@shikijs/langs": "4.6.0",
129
127
  "@shikijs/themes": "4.6.0",
130
128
  "@types/node": "^24.19.2",
131
- "@vite-hub/comments": "0.7.0",
129
+ "@vite-hub/comments": "0.8.0",
132
130
  "@ui-sdk/core": "0.1.0-beta.20",
133
131
  "@ui-sdk/vue": "0.1.0-beta.20",
134
132
  "nostics": "1.4.0",
@@ -149,7 +147,7 @@
149
147
  "@codemirror/view": "6.43.15",
150
148
  "@lezer/highlight": "1.2.5",
151
149
  "@lucide/vue": "1.80.0",
152
- "@vite-hub/web-container": "0.7.0",
150
+ "@vite-hub/web-container": "0.8.0",
153
151
  "@xterm/addon-fit": "0.11.0",
154
152
  "@xterm/xterm": "6.0.0"
155
153
  },
@@ -169,7 +167,7 @@
169
167
  "@vitejs/plugin-vue": "^6.0.11",
170
168
  "@vite-hub/icons": "0.1.0",
171
169
  "@vite-hub/internal": "0.0.1",
172
- "@vite-hub/runtime": "0.7.0",
170
+ "@vite-hub/runtime": "0.8.0",
173
171
  "@vue/server-renderer": "3.5.46",
174
172
  "@vue/test-utils": "2.6.0",
175
173
  "ai": "7.0.179",
@@ -187,7 +185,7 @@
187
185
  "vue-tsc": "^3.3.14",
188
186
  "@types/markdown-it": "^14.2.0",
189
187
  "comark-ui": "^0.14.3",
190
- "@vite-hub/content": "0.7.0",
188
+ "@vite-hub/content": "0.8.0",
191
189
  "playwright-core": "^1.65.1",
192
190
  "@tiptap/core": "^3.35.0",
193
191
  "@tiptap/extension-drag-handle": "3.35.0",
@@ -198,7 +196,7 @@
198
196
  "@tiptap/pm": "^3.35.0",
199
197
  "@tiptap/starter-kit": "^3.35.0",
200
198
  "@tiptap/vue-3": "3.35.0",
201
- "@vite-hub/blob": "0.7.0"
199
+ "@vite-hub/blob": "0.8.0"
202
200
  },
203
201
  "peerDependencies": {
204
202
  "@floating-ui/dom": "^1.0.0",
@@ -270,7 +268,6 @@
270
268
  "test:kit-parts": "node --test test/browser/kit-parts.browser.mjs",
271
269
  "test:parity": "node --test test/browser/parity.browser.mjs",
272
270
  "test:anchored": "node --test test/browser/anchored.browser.mjs",
273
- "test:comment-send": "node --test test/browser/comment-send.browser.mjs",
274
271
  "test:ui-sdk": "node --test test/browser/ui-sdk.browser.mjs",
275
272
  "test:editor": "node --test test/browser/editor.browser.mjs",
276
273
  "test:workspace-parts": "node --test test/browser/workspace-parts.browser.mjs test/browser/workspace-start.browser.mjs",
@@ -1,115 +0,0 @@
1
- import { n as prepareAnnouncer, t as announce } from "./announce-CJNXaYbT.js";
2
- import { t as useCopy } from "./use-copy-DK1SSZkh.js";
3
- import { computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, onMounted, openBlock, ref, renderSlot, resolveDynamicComponent, toDisplayString, unref, useSlots, useTemplateRef, watch, withCtx } from "vue";
4
- import { Check, Copy, LoaderCircle } from "@lucide/vue";
5
- import { Button } from "@ui-sdk/vue/button";
6
- // registry/copy-button/CopyButton.vue?vue&type=script&setup=true&lang.ts
7
- const _hoisted_1 = {
8
- key: 3,
9
- "data-slot": "copy-button-label"
10
- };
11
- // registry/copy-button/CopyButton.vue
12
- var CopyButton_default = /* @__PURE__ */ defineComponent({
13
- __name: "CopyButton",
14
- props: {
15
- value: { type: [String, Function] },
16
- label: {},
17
- copyLabel: { default: "Copy" },
18
- copiedLabel: { default: "Copied" },
19
- failedLabel: { default: "Copy failed" },
20
- variant: { default: "ghost" },
21
- size: { default: "sm" },
22
- duration: { default: 2e3 },
23
- preload: {
24
- type: Boolean,
25
- default: false
26
- },
27
- disabled: {
28
- type: Boolean,
29
- default: false
30
- }
31
- },
32
- emits: ["copy", "error"],
33
- setup(__props, { emit: __emit }) {
34
- const emit = __emit;
35
- const slots = useSlots();
36
- const { copy, copied } = useCopy({ duration: () => __props.duration });
37
- const root = useTemplateRef("root");
38
- const element = () => root.value?.$el instanceof Element ? root.value.$el : void 0;
39
- onMounted(() => prepareAnnouncer(element()));
40
- let preloaded;
41
- watch(() => __props.value, () => preloaded = void 0);
42
- function startPreload() {
43
- if (!__props.preload || preloaded || typeof __props.value !== "function") return;
44
- const entry = { text: callValue(__props.value) };
45
- preloaded = entry;
46
- if (typeof entry.text === "string") return;
47
- entry.text.then((text) => {
48
- if (preloaded === entry) entry.text = text;
49
- }, () => {
50
- if (preloaded === entry) preloaded = void 0;
51
- });
52
- }
53
- const loading = ref(false);
54
- async function onClick() {
55
- let text = __props.value;
56
- if (typeof text === "function") {
57
- const pending = preloaded?.text ?? callValue(text);
58
- preloaded = void 0;
59
- text = typeof pending === "string" ? pending : () => pending;
60
- loading.value = typeof pending !== "string";
61
- }
62
- const ok = await copy(text);
63
- loading.value = false;
64
- announce(element(), ok ? __props.copiedLabel : __props.failedLabel, __props.duration);
65
- if (ok) emit("copy");
66
- else emit("error");
67
- }
68
- const name = computed(() => __props.label || slots.default ? void 0 : __props.copyLabel);
69
- function callValue(read) {
70
- try {
71
- return read();
72
- } catch (error) {
73
- return Promise.reject(error);
74
- }
75
- }
76
- return (_ctx, _cache) => {
77
- return openBlock(), createBlock(unref(Button), {
78
- ref_key: "root",
79
- ref: root,
80
- "data-slot": "copy-button",
81
- "data-variant": __props.variant,
82
- "data-size": __props.size,
83
- "data-copied": unref(copied) ? "" : void 0,
84
- "data-loading": loading.value ? "" : void 0,
85
- "aria-label": name.value,
86
- disabled: __props.disabled || loading.value,
87
- onClick,
88
- onFocus: startPreload,
89
- onPointerenter: startPreload
90
- }, {
91
- render: withCtx(({ props: part, children }) => [createElementVNode("button", mergeProps(part, { "data-slot": "copy-button" }), [(openBlock(), createBlock(resolveDynamicComponent(children)))], 16)]),
92
- default: withCtx(() => [loading.value ? (openBlock(), createBlock(unref(LoaderCircle), {
93
- key: 0,
94
- "data-slot": "copy-button-icon",
95
- "aria-hidden": "true"
96
- })) : unref(copied) ? renderSlot(_ctx.$slots, "copied-icon", {}, () => [createVNode(unref(Check), {
97
- "data-slot": "copy-button-icon",
98
- "aria-hidden": "true"
99
- })], void 0, 1) : renderSlot(_ctx.$slots, "icon", {}, () => [createVNode(unref(Copy), {
100
- "data-slot": "copy-button-icon",
101
- "aria-hidden": "true"
102
- })], void 0, 2), __props.label || unref(slots).default ? (openBlock(), createElementBlock("span", _hoisted_1, [renderSlot(_ctx.$slots, "default", {}, () => [createTextVNode(toDisplayString(unref(copied) && __props.label ? __props.copiedLabel : __props.label), 1)])])) : createCommentVNode("v-if", true)]),
103
- _: 3
104
- }, 8, [
105
- "data-variant",
106
- "data-size",
107
- "data-copied",
108
- "data-loading",
109
- "aria-label",
110
- "disabled"
111
- ]);
112
- };
113
- }
114
- });
115
- export { CopyButton_default as t };
@@ -1,29 +0,0 @@
1
- // registry/core/announce.ts
2
- const regionSlot = "live-announcer";
3
- const hidden = "position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0";
4
- function regionFor(element) {
5
- const container = element.closest("[role=dialog], [role=alertdialog]") ?? element.ownerDocument.body;
6
- for (const child of container.children) if (child instanceof HTMLElement && child.dataset.slot === regionSlot) return child;
7
- const region = element.ownerDocument.createElement("div");
8
- region.dataset.slot = regionSlot;
9
- region.setAttribute("aria-live", "polite");
10
- region.setAttribute("aria-atomic", "true");
11
- region.style.cssText = hidden;
12
- container.append(region);
13
- return region;
14
- }
15
- function prepareAnnouncer(element) {
16
- if (element) regionFor(element);
17
- }
18
- const clearTimers = /* @__PURE__ */ new WeakMap();
19
- function announce(element, message, duration = 2e3) {
20
- if (!element) return;
21
- const region = regionFor(element);
22
- clearTimeout(clearTimers.get(region));
23
- region.textContent = "";
24
- requestAnimationFrame(() => {
25
- region.textContent = message;
26
- });
27
- clearTimers.set(region, setTimeout(() => region.textContent = "", duration));
28
- }
29
- export { prepareAnnouncer as n, announce as t };