@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
@@ -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
- url: string;
67
66
  title: string;
68
67
  path: string;
68
+ url: string;
69
69
  device: WorkspacePreviewDevice;
70
70
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -1,6 +1,6 @@
1
1
  import { t as DeviceFrame_default } from "../../device-frame-DDWoyB-G.js";
2
- import { t as useUIComponent } from "../../nuxt-ui-D3Qda35W.js";
3
2
  import { icon } from "./icons.js";
3
+ import { n as ViteHubInput } from "../../components-D44u1fsy.js";
4
4
  import { computed, defineComponent, h, onBeforeUnmount, onMounted, ref, shallowRef, useId, watch } from "vue";
5
5
  // src/workspace/workspace-preview.ts
6
6
  function join(base, path) {
@@ -54,7 +54,6 @@ function readLocation(data) {
54
54
  forward: forward === true
55
55
  };
56
56
  }
57
- /** Whether `source` is `frame` or a frame inside it. The preview origin wraps the app in frames of its own. */
58
57
  function isInside(source, frame) {
59
58
  let current = source;
60
59
  for (let depth = 0; frame && current && typeof current === "object" && depth < 8; depth++) {
@@ -150,7 +149,6 @@ const WorkspacePreview = defineComponent({
150
149
  },
151
150
  setup(props, { emit, expose, slots }) {
152
151
  const inputId = useId();
153
- const UInput = useUIComponent("UInput");
154
152
  const reloads = ref(0);
155
153
  const src = computed(() => props.url ? join(props.url, props.path) : void 0);
156
154
  const live = shallowRef();
@@ -249,7 +247,7 @@ const WorkspacePreview = defineComponent({
249
247
  class: "vh-ws-sr-only",
250
248
  for: inputId
251
249
  }, "Preview path"),
252
- h(UInput, {
250
+ h(ViteHubInput, {
253
251
  autocapitalize: "off",
254
252
  autocomplete: "off",
255
253
  class: "vh-ws-preview-path",
@@ -1,2 +1,2 @@
1
- import { a as WorkspaceTabItem, i as WorkspaceTab, n as WorkspaceShell, r as WorkspaceSplits, t as WorkspaceLayout } from "../../workspace-shell-B4A7CINd.js";
1
+ import { a as WorkspaceTabItem, i as WorkspaceTab, n as WorkspaceShell, r as WorkspaceSplits, t as WorkspaceLayout } from "../../workspace-shell-CwEQT_1s.js";
2
2
  export { WorkspaceLayout, WorkspaceShell, WorkspaceSplits, WorkspaceTab, WorkspaceTabItem };
@@ -1,4 +1,4 @@
1
- import { t as useUIComponent } from "../../nuxt-ui-D3Qda35W.js";
1
+ import { i as ViteHubTabs } from "../../components-D44u1fsy.js";
2
2
  import { computed, defineComponent, h, onMounted, ref, watch } from "vue";
3
3
  // src/workspace/workspace-shell.ts
4
4
  const defaultSplits = {
@@ -77,10 +77,6 @@ function readSplits(key, layout) {
77
77
  } catch {}
78
78
  return fallback;
79
79
  }
80
- /**
81
- * A resize handle. It uses pointer capture so a drag over the preview iframe keeps working,
82
- * and it moves by a step with the arrow keys.
83
- */
84
80
  function separator(options) {
85
81
  const { name, orientation, splits } = options;
86
82
  const [defaultMin, defaultMax, step] = limits[name];
@@ -220,7 +216,6 @@ const WorkspaceShell = defineComponent({
220
216
  tab: active.value,
221
217
  showTab: select
222
218
  });
223
- const UTabs = useUIComponent("UTabs");
224
219
  function panelContent(name) {
225
220
  const custom = slots[`tab-${name}`];
226
221
  if (custom) return custom(slotProps());
@@ -236,7 +231,7 @@ const WorkspaceShell = defineComponent({
236
231
  key: name,
237
232
  role: "tabpanel"
238
233
  }, panelContent(name)));
239
- return h("div", { class: "vh-ws-pane vh-ws-pane--output" }, [h(UTabs, {
234
+ return h("div", { class: "vh-ws-pane vh-ws-pane--output" }, [h(ViteHubTabs, {
240
235
  "aria-label": "Workspace panels",
241
236
  class: "vh-ws-tab-list",
242
237
  content: false,
@@ -58,15 +58,15 @@ export declare const WorkspaceSidebar: import("vue").DefineComponent<import("vue
58
58
  };
59
59
  }>> & Readonly<{
60
60
  onReset?: (() => any) | undefined;
61
+ "onUpdate:open"?: ((open: boolean) => any) | undefined;
61
62
  onDownload?: (() => any) | undefined;
62
63
  "onCopy-link"?: (() => any) | undefined;
63
- "onUpdate:open"?: ((open: boolean) => any) | undefined;
64
64
  }>, {
65
- copied: boolean;
65
+ open: boolean;
66
66
  label: string;
67
67
  id: string;
68
- open: boolean;
69
68
  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-D3Qda35W.js";
2
- import { t as ring } from "../../ring-B0nZBnU0.js";
1
+ import { t as ring } from "../../ring-C5lNUEAG.js";
2
+ import { n as ViteHubButton } from "../../stand-ins-C2oSoNwV.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'])";
@@ -45,7 +45,6 @@ const WorkspaceSidebar = defineComponent({
45
45
  },
46
46
  slots: Object,
47
47
  setup(props, { emit, slots }) {
48
- const UButton = useUIComponent("UButton");
49
48
  const fallbackId = useId();
50
49
  const id = () => props.id ?? fallbackId;
51
50
  const panel = ref();
@@ -89,19 +88,19 @@ const WorkspaceSidebar = defineComponent({
89
88
  key: action,
90
89
  variant: "ghost"
91
90
  };
92
- if (action === "reset") return h(UButton, {
91
+ if (action === "reset") return h(ViteHubButton, {
93
92
  ...shared,
94
93
  icon: "i-lucide-rotate-ccw",
95
94
  label: "Reset",
96
95
  onClick: () => emit("reset")
97
96
  });
98
- if (action === "download") return h(UButton, {
97
+ if (action === "download") return h(ViteHubButton, {
99
98
  ...shared,
100
99
  icon: "i-lucide-download",
101
100
  label: "Download",
102
101
  onClick: () => emit("download")
103
102
  });
104
- return h(UButton, {
103
+ return h(ViteHubButton, {
105
104
  ...shared,
106
105
  icon: props.copied ? "i-lucide-check" : "i-lucide-link",
107
106
  label: props.copied ? "Link copied" : "Copy link",
@@ -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
- description: string;
42
41
  title: string;
42
+ description: 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-D3Qda35W.js";
1
+ import { r as ViteHubIcon } from "../../stand-ins-C2oSoNwV.js";
2
2
  import { defineComponent, h, useId } from "vue";
3
3
  // src/workspace/workspace-start.ts
4
4
  /**
@@ -25,7 +25,6 @@ const WorkspaceStart = defineComponent({
25
25
  emits: { pick: (id) => typeof id === "string" },
26
26
  slots: Object,
27
27
  setup(props, { emit, slots }) {
28
- const UIcon = useUIComponent("UIcon");
29
28
  const titleId = useId();
30
29
  const count = (files) => {
31
30
  const length = files ? Object.keys(files).length : 0;
@@ -49,7 +48,7 @@ const WorkspaceStart = defineComponent({
49
48
  example.description ? h("span", { class: "vh-ws-start-text" }, example.description) : void 0,
50
49
  count(example.files)
51
50
  ])))),
52
- h("div", { class: "vh-ws-start-foot" }, slots.footer?.() ?? [h(UIcon, {
51
+ h("div", { class: "vh-ws-start-foot" }, slots.footer?.() ?? [h(ViteHubIcon, {
53
52
  class: "vh-ws-icon",
54
53
  name: "i-lucide-link"
55
54
  }), "Opened from a share link? The files open at once, without this screen."])
@@ -1,4 +1,5 @@
1
- import { t as useUIComponent } from "../../nuxt-ui-D3Qda35W.js";
1
+ import { n as ViteHubButton } from "../../stand-ins-C2oSoNwV.js";
2
+ import { t as ViteHubDropdownMenu } from "../../components-D44u1fsy.js";
2
3
  import { computed, defineComponent, h, nextTick, ref } from "vue";
3
4
  // src/workspace/workspace-steps.ts
4
5
  /**
@@ -60,8 +61,6 @@ const WorkspaceSteps = defineComponent({
60
61
  emits: { "update:step": (step) => Number.isInteger(step) },
61
62
  setup(props, { emit }) {
62
63
  const { current, go } = useStepModel(props, emit);
63
- const UButton = useUIComponent("UButton");
64
- const UDropdownMenu = useUIComponent("UDropdownMenu");
65
64
  const nav = ref(null);
66
65
  function move(index, other) {
67
66
  go(index);
@@ -82,14 +81,14 @@ const WorkspaceSteps = defineComponent({
82
81
  class: "vh-ws-step-nav",
83
82
  ref: nav
84
83
  }, [
85
- h(UDropdownMenu, {
84
+ h(ViteHubDropdownMenu, {
86
85
  content: { align: "start" },
87
86
  items: props.label ? [[{
88
87
  label: props.label,
89
88
  type: "label"
90
89
  }], items] : [items],
91
90
  ui: { content: "w-72" }
92
- }, () => h(UButton, {
91
+ }, () => h(ViteHubButton, {
93
92
  "aria-label": `Step: ${name}`,
94
93
  class: "vh-ws-step-nav-menu",
95
94
  color: "neutral",
@@ -98,7 +97,7 @@ const WorkspaceSteps = defineComponent({
98
97
  variant: "ghost"
99
98
  }, () => h("span", { class: "vh-ws-step-nav-name" }, name))),
100
99
  h("span", { class: "vh-ws-step-nav-count" }, total ? `Step ${index + 1} of ${total}` : ""),
101
- h(UButton, {
100
+ h(ViteHubButton, {
102
101
  "aria-label": "Previous step",
103
102
  class: "vh-ws-step-nav-back",
104
103
  color: "neutral",
@@ -109,7 +108,7 @@ const WorkspaceSteps = defineComponent({
109
108
  variant: "ghost",
110
109
  onClick: () => move(index - 1, ".vh-ws-step-nav-next")
111
110
  }),
112
- h(UButton, {
111
+ h(ViteHubButton, {
113
112
  "aria-label": "Next step",
114
113
  class: "vh-ws-step-nav-next",
115
114
  color: "neutral",
@@ -1,11 +1,6 @@
1
1
  import { defineComponent, h, onBeforeUnmount, onMounted, ref, watch } from "vue";
2
2
  // src/workspace/workspace-terminal.ts
3
3
  let colorProbe;
4
- /**
5
- * A CSS color as `#rrggbbaa`. xterm parses only hex and `rgb()` itself, and it refuses translucent colors in other
6
- * formats, but the tokens are `oklch()` and `color-mix()`. A canvas reads any CSS color as RGBA bytes. Without a canvas,
7
- * as on the server or in a test DOM, the color stays as it is.
8
- */
9
4
  function toHex(color) {
10
5
  colorProbe ??= document.createElement("canvas").getContext("2d", { willReadFrequently: true });
11
6
  if (!colorProbe) return color;
@@ -21,7 +16,6 @@ function cssColor(element, name) {
21
16
  const value = getComputedStyle(element).getPropertyValue(name).trim();
22
17
  return value ? toHex(value) : void 0;
23
18
  }
24
- /** The colors of the terminal, from the `--vh-ws-*` tokens of styles.css, which follow the theme and the color mode. */
25
19
  function terminalTheme(element) {
26
20
  return {
27
21
  background: cssColor(element, "--vh-ws-terminal-bg"),
@@ -1,5 +1,5 @@
1
1
  import { WorkspaceExample } from "./workspace-examples.js";
2
- import { a as WorkspaceTabItem, i as WorkspaceTab } from "../../workspace-shell-B4A7CINd.js";
2
+ import { a as WorkspaceTabItem, i as WorkspaceTab } from "../../workspace-shell-CwEQT_1s.js";
3
3
  import { t as WorkspaceStep } from "../../workspace-steps-BKByX9DW.js";
4
4
  import { ComputedRef, ExtractPropTypes, PropType, Ref, VNode } from "vue";
5
5
  /** Files by project-relative path. */
@@ -229,20 +229,20 @@ export declare const Workspace: import("vue").DefineComponent<ExtractPropTypes<{
229
229
  type: PropType<(files: WorkspaceFiles, example: WorkspaceExample) => WorkspaceFiles>;
230
230
  };
231
231
  }>> & Readonly<{
232
+ "onUpdate:open"?: ((open: boolean) => any) | undefined;
232
233
  "onUpdate:selected"?: ((path: string) => any) | undefined;
233
234
  "onUpdate:step"?: ((step: number) => any) | undefined;
234
- "onUpdate:open"?: ((open: boolean) => any) | undefined;
235
235
  "onUpdate:example"?: ((id: string) => any) | undefined;
236
236
  }>, {
237
+ open: boolean;
237
238
  name: string;
238
239
  label: string;
239
240
  reset: (files: WorkspaceFiles, example: WorkspaceExample) => WorkspaceFiles;
240
- open: boolean;
241
241
  start: boolean;
242
- steps: readonly WorkspaceStep[];
243
242
  step: number;
244
- selected: string;
243
+ steps: readonly WorkspaceStep[];
245
244
  tabs: readonly WorkspaceTabItem[];
245
+ selected: string;
246
246
  example: string;
247
247
  guide: "top" | "side";
248
248
  share: boolean;
@@ -1,8 +1,8 @@
1
- import { n as useCopy } from "../../CopyButton-Bs6DT-Z8.js";
1
+ import { n as useCopy } from "../../CopyButton-D-g6PWc8.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-D3Qda35W.js";
5
- import { t as ring } from "../../ring-B0nZBnU0.js";
4
+ import { n as ViteHubButton } from "../../stand-ins-C2oSoNwV.js";
5
+ import { t as ring } from "../../ring-C5lNUEAG.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";
@@ -18,6 +18,7 @@ import { WorkspaceSidebar } from "./workspace-sidebar.js";
18
18
  import { WorkspaceStart } from "./workspace-start.js";
19
19
  import { WorkspaceStatus } from "./workspace-status.js";
20
20
  import { WorkspaceSteps } from "./workspace-steps.js";
21
+ import { r as ViteHubModal, t as ViteHubDropdownMenu } from "../../components-D44u1fsy.js";
21
22
  import { computed, defineComponent, h, inject, markRaw, nextTick, onBeforeUnmount, onMounted, provide, reactive, ref, shallowRef, watch } from "vue";
22
23
  // src/workspace/workspace.ts
23
24
  const contextKey = Symbol("Workspace");
@@ -161,9 +162,6 @@ const WorkspaceSession = defineComponent({
161
162
  restore: (link) => !!link
162
163
  },
163
164
  setup(props, { emit, slots }) {
164
- const UButton = useUIComponent("UButton");
165
- const UDropdownMenu = useUIComponent("UDropdownMenu");
166
- const UModal = useUIComponent("UModal");
167
165
  const config = props.config;
168
166
  const tab = ref();
169
167
  const showTab = (next) => {
@@ -309,7 +307,7 @@ const WorkspaceSession = defineComponent({
309
307
  }))] : void 0,
310
308
  actions: () => [
311
309
  slots["bar-actions"]?.(slotProps),
312
- hasSidebar ? void 0 : h(UButton, {
310
+ hasSidebar ? void 0 : h(ViteHubButton, {
313
311
  color: "neutral",
314
312
  disabled: edited.value.length === 0,
315
313
  icon: "i-lucide-rotate-ccw",
@@ -317,20 +315,20 @@ const WorkspaceSession = defineComponent({
317
315
  variant: "ghost",
318
316
  onClick: reset
319
317
  }),
320
- ...config.share && !hasSidebar ? [h(UButton, {
318
+ ...config.share && !hasSidebar ? [h(ViteHubButton, {
321
319
  color: "neutral",
322
320
  icon: "i-lucide-download",
323
321
  label: "Download",
324
322
  variant: "ghost",
325
323
  onClick: download
326
- }), h(UButton, {
324
+ }), h(ViteHubButton, {
327
325
  color: "neutral",
328
326
  icon: copied.value ? "i-lucide-check" : "i-lucide-link",
329
327
  label: copied.value ? "Link copied" : "Copy link",
330
328
  variant: "outline",
331
329
  onClick: (event) => void copyLink(event.currentTarget)
332
330
  })] : [],
333
- actions.length ? h(UDropdownMenu, {
331
+ actions.length ? h(ViteHubDropdownMenu, {
334
332
  content: { align: "end" },
335
333
  items: [actions.map((item) => ({
336
334
  disabled: item.disabled,
@@ -338,7 +336,7 @@ const WorkspaceSession = defineComponent({
338
336
  label: item.label,
339
337
  onSelect: item.onSelect
340
338
  }))]
341
- }, () => h(UButton, {
339
+ }, () => h(ViteHubButton, {
342
340
  "aria-label": "More actions",
343
341
  color: "neutral",
344
342
  icon: "i-lucide-ellipsis",
@@ -418,21 +416,21 @@ const WorkspaceSession = defineComponent({
418
416
  tab: tab.value,
419
417
  tabs: tabItems.value,
420
418
  "onUpdate:tab": showTab
421
- }, shellSlots), h(UModal, {
419
+ }, shellSlots), h(ViteHubModal, {
422
420
  description: config.share ? "Your edits to the current files are lost. Copy a link or download them first to keep them." : "Your edits to the current files are lost.",
423
421
  open: !!confirm.value,
424
422
  title: confirm.value?.title,
425
423
  "onUpdate:open": (open) => {
426
424
  if (!open) confirm.value = void 0;
427
425
  }
428
- }, { footer: () => h("div", { class: "vh-workspace-modal-actions" }, [h(UButton, {
426
+ }, { footer: () => h("div", { class: "vh-workspace-modal-actions" }, [h(ViteHubButton, {
429
427
  color: "neutral",
430
428
  label: "Cancel",
431
429
  variant: "ghost",
432
430
  onClick: () => {
433
431
  confirm.value = void 0;
434
432
  }
435
- }), h(UButton, {
433
+ }), h(ViteHubButton, {
436
434
  color: "neutral",
437
435
  label: confirm.value?.label,
438
436
  onClick: confirmAction
@@ -455,7 +453,6 @@ const Workspace = defineComponent({
455
453
  "update:open": (open) => typeof open === "boolean"
456
454
  },
457
455
  setup(props, { emit, slots }) {
458
- const UButton = useUIComponent("UButton");
459
456
  const { device, supported } = useWorkspaceDevice(props.runner);
460
457
  const root = ref();
461
458
  const first = () => props.examples.find((item) => item.id === props.example) ?? props.examples[0];
@@ -584,7 +581,7 @@ const Workspace = defineComponent({
584
581
  function download() {
585
582
  downloadZip(session.value?.files ?? filesOf(active.value), zipName(props.name, active.value));
586
583
  }
587
- const downloadButton = () => h(UButton, {
584
+ const downloadButton = () => h(ViteHubButton, {
588
585
  color: "neutral",
589
586
  icon: "i-lucide-download",
590
587
  label: "Download files",
@@ -604,7 +601,7 @@ const Workspace = defineComponent({
604
601
  "data-state": "pending"
605
602
  }, h("div", { class: "vh-workspace-placeholder" }, [h("div", { class: "vh-workspace-placeholder-bar" }), h("p", { class: "vh-workspace-muted" }, `Starting the ${props.label}`)]));
606
603
  const state = device.value === "pending" ? "pending" : device.value === "phone" ? "phone" : supported.value === false ? "unsupported" : device.value === "tablet" ? "tablet" : "pending";
607
- const phone = h("aside", { class: "vh-workspace-card vh-workspace-phone" }, [h("p", { class: "vh-workspace-strong" }, `The live ${props.label} runs in a desktop browser. Open this page on a desktop to edit and run the code.`), h("div", { class: "vh-workspace-actions" }, [h(UButton, {
604
+ const phone = h("aside", { class: "vh-workspace-card vh-workspace-phone" }, [h("p", { class: "vh-workspace-strong" }, `The live ${props.label} runs in a desktop browser. Open this page on a desktop to edit and run the code.`), h("div", { class: "vh-workspace-actions" }, [h(ViteHubButton, {
608
605
  color: "neutral",
609
606
  icon: copied.value ? "i-lucide-check" : "i-lucide-link",
610
607
  label: copied.value ? "Copied" : "Copy link",
@@ -618,7 +615,7 @@ const Workspace = defineComponent({
618
615
  const card = state === "pending" || state === "phone" ? phone : state === "unsupported" ? h("div", { class: "vh-workspace-unsupported" }, [h(BrowserSupportNotice, {
619
616
  description: "Download the files to run the app on your machine, or open this page in Chrome, Edge, or Firefox on a desktop to edit and run it here.",
620
617
  supported: false
621
- }), h("div", { class: "vh-workspace-actions" }, [downloadButton()])]) : h("div", { class: "vh-workspace-card" }, [h("p", { class: "vh-workspace-muted" }, "Edit and run the code in your browser. The first start downloads the dependencies of the app."), h("div", { class: "vh-workspace-actions" }, [h(UButton, {
618
+ }), h("div", { class: "vh-workspace-actions" }, [downloadButton()])]) : h("div", { class: "vh-workspace-card" }, [h("p", { class: "vh-workspace-muted" }, "Edit and run the code in your browser. The first start downloads the dependencies of the app."), h("div", { class: "vh-workspace-actions" }, [h(ViteHubButton, {
622
619
  color: "neutral",
623
620
  icon: "i-lucide-play",
624
621
  label: `Open ${props.label}`,
@@ -1,4 +1,4 @@
1
- import { n as createProgress } from "./motion-core-JZZiPKEk.js";
1
+ import { n as createProgress } from "./motion-core-pkL0M4Y1.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"];
@@ -61,8 +61,8 @@ declare const __VLS_base$3: import("vue", { with: { "resolution-mode": "import"
61
61
  error: unknown;
62
62
  }) => any;
63
63
  submit: (event: PromptInputSubmitEvent) => any;
64
- "update:modelValue": (value: string) => any;
65
64
  "update:files": (files: readonly FileUIPart[]) => any;
65
+ "update:modelValue": (value: string) => any;
66
66
  stop: () => any;
67
67
  retry: () => any;
68
68
  }, string, import("vue", { with: { "resolution-mode": "import" } }).PublicProps, Readonly<PromptInputProps> & Readonly<{
@@ -70,8 +70,8 @@ declare const __VLS_base$3: import("vue", { with: { "resolution-mode": "import"
70
70
  error: unknown;
71
71
  }) => any) | undefined;
72
72
  onSubmit?: ((event: PromptInputSubmitEvent) => any) | undefined;
73
- "onUpdate:modelValue"?: ((value: string) => any) | undefined;
74
73
  "onUpdate:files"?: ((files: readonly FileUIPart[]) => any) | undefined;
74
+ "onUpdate:modelValue"?: ((value: string) => any) | undefined;
75
75
  onStop?: (() => any) | undefined;
76
76
  onRetry?: (() => any) | undefined;
77
77
  }>, {}, {}, {}, {}, string, import("vue", { with: { "resolution-mode": "import" } }).ComponentProvideOptions, false, {}, any>;
@@ -1,4 +1,4 @@
1
- import { a as tween, c as createSpring, h as prefersReducedMotion, o as isMotionOff, r as easeOut } from "./tween-1W-LlKk9.js";
1
+ import { a as tween, c as createSpring, h as prefersReducedMotion, o as isMotionOff, r as easeOut } from "./tween-DGAmrS3r.js";
2
2
  // src/motion/helpers/frame.ts
3
3
  const ownNodes = /* @__PURE__ */ new WeakSet();
4
4
  function own(node) {
@@ -1,6 +1,31 @@
1
1
  import { r as startRelativeClock, t as provideRelativeNow } from "../relative-time-Dz2DR4eb.js";
2
- import { t as createViteHubUI } from "../config-BDQYUjjp.js";
2
+ import { t as createViteHubUI } from "../config-7CiYbXk6.js";
3
+ import { t as DrawnIcon } from "../stand-ins-C2oSoNwV.js";
4
+ import { defineComponent, h } from "vue";
3
5
  import { defineNuxtPlugin, useAppConfig, useRuntimeConfig, useState } from "#app";
6
+ // src/internal/nuxt-icon.ts
7
+ /**
8
+ * The icon component that the parts render in a Nuxt app: a `UIcon` that the app registered, else the `Icon` that
9
+ * `@nuxt/icon` registers globally, which draws `appConfig.ui.icons` names such as `i-mingcute-add-line`. With neither,
10
+ * the parts draw their Lucide icons. It looks up the app component on each render, after every plugin, so the app's own
11
+ * `UIcon` wins.
12
+ */
13
+ function nuxtIconComponent(app) {
14
+ return defineComponent({
15
+ name: "ViteHubNuxtIcon",
16
+ inheritAttrs: false,
17
+ props: { name: {
18
+ default: "",
19
+ type: String
20
+ } },
21
+ setup(props, { attrs }) {
22
+ return () => h(app.component("UIcon") ?? app.component("Icon") ?? DrawnIcon, {
23
+ ...attrs,
24
+ name: props.name
25
+ });
26
+ }
27
+ });
28
+ }
4
29
  // src/runtime/nuxt-plugin.ts
5
30
  const viteHubUIPlugin = defineNuxtPlugin((nuxtApp) => {
6
31
  const options = useRuntimeConfig().public.viteHubUI;
@@ -11,6 +36,7 @@ const viteHubUIPlugin = defineNuxtPlugin((nuxtApp) => {
11
36
  });
12
37
  nuxtApp.vueApp.use(createViteHubUI({
13
38
  ...options,
39
+ iconComponent: nuxtIconComponent(nuxtApp.vueApp),
14
40
  icons
15
41
  }));
16
42
  const now = useState("vite-hub-ui:now", () => Date.now());