@vite-hub/ui 0.1.0 → 0.4.1
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.
- package/README.md +247 -21
- package/dist/attachments-BzTwqRTU.js +90 -0
- package/dist/{avatar-stack-DXmCQhxd.d.ts → avatar-stack-DPRFuezh.d.ts} +1 -1
- package/dist/choices-input-ByXJvDn1.d.ts +94 -0
- package/dist/{code-view-J4OsgEdh.js → code-view-DsU-xzic.js} +20 -4
- package/dist/colors-BghReA9C-CjF9gnmy.js +28 -0
- package/dist/comment-attachments-C4yNbcx5.js +20 -0
- package/dist/comment-composer-fINL5bxo.d.ts +243 -0
- package/dist/comment-composer-jYv2ULNP.js +591 -0
- package/dist/comment-layer-C_sbPIR5.d.ts +176 -0
- package/dist/comment-list-BcSaLngS.d.ts +62 -0
- package/dist/comment-marks.css +234 -0
- package/dist/comment-panel-CfvdRUMX.d.ts +208 -0
- package/dist/comment-person-CLPlW_SS.js +40 -0
- package/dist/comment-pin-DHOdRvUw.d.ts +68 -0
- package/dist/comment-row-Bn3nr8l5.js +39 -0
- package/dist/comment-selection-bar-CyVBNYl9.d.ts +42 -0
- package/dist/comment-thread-DKJjmWN0.d.ts +385 -0
- package/dist/comment-visibility-DsVuVndP.d.ts +40 -0
- package/dist/{comments-C08J3z4e.js → comments-D0d26ghV.js} +210 -59
- package/dist/comments-D8hulVPy.d.ts +198 -0
- package/dist/comments-context-C2lOZyQ5.js +38 -0
- package/dist/config-DgxBW013.d.ts +80 -0
- package/dist/config-Dk67emQt.js +63 -0
- package/dist/copy-button-CRN3kmSD.js +253 -0
- package/dist/draw-DzSmD7uo-Dwz8zoH2.js +72976 -0
- package/dist/editor-C_wt4RRV.js +582 -0
- package/dist/error-diagnostics-SXtnk6bz.js +38 -0
- package/dist/{file-tree-C1pv4_AI.js → file-tree-C4OYgbV-.js} +292 -145
- package/dist/{file-tree-Ctb8hZ_g.d.ts → file-tree-DlT9RGhu.d.ts} +51 -15
- package/dist/format-orwcdZL_.js +39 -0
- package/dist/handlers-DMl-Na3x.js +182 -0
- package/dist/headless.d.ts +5 -176
- package/dist/headless.js +5 -3
- package/dist/icon-swap.css +69 -0
- package/dist/{image-preview-VfknBEFu.js → image-preview-C9tdkmEj.js} +8 -5
- package/dist/{index-DcH0QSI5.d.ts → index-BYRFQfCd.d.ts} +14 -0
- package/dist/{code-view-vDM-hph-.d.ts → index-CNY1uNTh.d.ts} +14 -228
- package/dist/index.d.ts +55 -57
- package/dist/index.js +678 -25
- package/dist/markdown-editor-CMbNZOdN.js +2394 -0
- package/dist/markdown-editor-wQF0yD5o.d.ts +195 -0
- package/dist/markdown-editor.d.ts +108 -0
- package/dist/markdown-editor.js +3 -0
- package/dist/message-scroller-jrYN9dG9.d.ts +175 -0
- package/dist/nuxt-ui-DSQFzq3s.js +38 -0
- package/dist/nuxt.d.ts +84 -2
- package/dist/nuxt.js +243 -35
- package/dist/parts/components/agent-session.d.ts +254 -0
- package/dist/parts/components/agent-session.js +640 -0
- package/dist/{attachment-BBndG9_P.d.ts → parts/components/attachment.d.ts} +14 -15
- package/dist/{attachment-B3dXC7jM.js → parts/components/attachment.js} +6 -4
- package/dist/{avatar-stack.d.ts → parts/components/avatar-stack.d.ts} +1 -1
- package/dist/{avatar-stack-DM6HRnc0.js → parts/components/avatar-stack.js} +2 -5
- package/dist/{bubble-BJH2rfii.d.ts → parts/components/bubble.d.ts} +7 -8
- package/dist/{bubble-BPyFQlW7.js → parts/components/bubble.js} +2 -2
- package/dist/{chat-message-mpDmZbIC.d.ts → parts/components/chat-message.d.ts} +2 -3
- package/dist/{chat-message-BNK9G7xF.js → parts/components/chat-message.js} +4 -4
- package/dist/{chat-session-D6C7VJBR.d.ts → parts/components/chat-session.d.ts} +3 -4
- package/dist/{chat-session-DYEHB1HC.js → parts/components/chat-session.js} +2 -2
- package/dist/{chat-B9HlZWA2.d.ts → parts/components/chat.d.ts} +8 -4
- package/dist/{chat-BoFHlu9V.js → parts/components/chat.js} +42 -9
- package/dist/{highlighted-code-Dzf6o54i.d.ts → parts/components/code-block.d.ts} +15 -23
- package/dist/{code-block-Br-02hn-.js → parts/components/code-block.js} +9 -38
- package/dist/parts/components/code-view.d.ts +270 -0
- package/dist/parts/components/code-view.js +2 -0
- package/dist/parts/components/comment-composer.d.ts +2 -0
- package/dist/parts/components/comment-composer.js +2 -0
- package/dist/parts/components/comment-layer.d.ts +2 -0
- package/dist/parts/components/comment-layer.js +631 -0
- package/dist/parts/components/comment-list.d.ts +2 -0
- package/dist/parts/components/comment-list.js +168 -0
- package/dist/parts/components/comment-panel.d.ts +2 -0
- package/dist/parts/components/comment-panel.js +311 -0
- package/dist/parts/components/comment-pin.d.ts +2 -0
- package/dist/parts/components/comment-pin.js +75 -0
- package/dist/parts/components/comment-selection-bar.d.ts +2 -0
- package/dist/parts/components/comment-selection-bar.js +116 -0
- package/dist/parts/components/comment-thread.d.ts +2 -0
- package/dist/parts/components/comment-thread.js +598 -0
- package/dist/parts/components/comments.d.ts +8 -0
- package/dist/parts/components/comments.js +9 -0
- package/dist/{connection-status-DjGBw6xX.d.ts → parts/components/connection-status.d.ts} +6 -7
- package/dist/{connection-status-CzuWBENf.js → parts/components/connection-status.js} +1 -1
- package/dist/parts/components/copy-button.d.ts +118 -0
- package/dist/parts/components/copy-button.js +2 -0
- package/dist/parts/components/device-frame.d.ts +130 -0
- package/dist/parts/components/device-frame.js +471 -0
- package/dist/parts/components/file-tree.d.ts +2 -0
- package/dist/parts/components/file-tree.js +2 -0
- package/dist/parts/components/filter-search.d.ts +47 -0
- package/dist/parts/components/filter-search.js +58 -0
- package/dist/parts/components/markdown-editor.d.ts +2 -0
- package/dist/parts/components/markdown-editor.js +2 -0
- package/dist/parts/components/markdown-renderer.d.ts +52 -0
- package/dist/parts/components/markdown-renderer.js +23077 -0
- package/dist/{markdown-Dse5ldJe.d.ts → parts/components/markdown.d.ts} +7 -7
- package/dist/parts/components/markdown.js +47 -0
- package/dist/{marker-ea-tvx-J.d.ts → parts/components/marker.d.ts} +6 -7
- package/dist/{marker-Di2ZG_k1.js → parts/components/marker.js} +2 -2
- package/dist/{message-parts-BBFUkluC.d.ts → parts/components/message-parts.d.ts} +2 -3
- package/dist/{message-parts-DQnfioAH.js → parts/components/message-parts.js} +6 -6
- package/dist/{message-CW_paC1k.d.ts → parts/components/message.d.ts} +8 -9
- package/dist/{message-DiyBthIq.js → parts/components/message.js} +2 -2
- package/dist/parts/components/patch-parsers.d.ts +2 -0
- package/dist/parts/components/patch-parsers.js +2 -0
- package/dist/{prompt-input-Cy_Ue6B5.d.ts → parts/components/prompt-input.d.ts} +53 -10
- package/dist/{prompt-input-BbnCb80O.js → parts/components/prompt-input.js} +66 -111
- package/dist/parts/components/relative-time.d.ts +73 -0
- package/dist/parts/components/relative-time.js +2 -0
- package/dist/parts/components/status.d.ts +60 -0
- package/dist/parts/components/status.js +48 -0
- package/dist/{sync-status-refELOZn.d.ts → parts/components/sync-status.d.ts} +5 -6
- package/dist/{sync-status-BpxYdZIJ.js → parts/components/sync-status.js} +1 -1
- package/dist/{tool-list-E7CA52rz.d.ts → parts/components/tool-list.d.ts} +3 -4
- package/dist/{tool-list-BdSr5CT4.js → parts/components/tool-list.js} +7 -38
- package/dist/{trace-run-COeXn46Z.d.ts → parts/components/trace-run.d.ts} +3 -4
- package/dist/{trace-run-BIQ17CED.js → parts/components/trace-run.js} +15 -23
- package/dist/{trace-V7rM3Pyd.d.ts → parts/components/trace.d.ts} +11 -12
- package/dist/{trace-llBCDiSW.js → parts/components/trace.js} +20 -13
- package/dist/parts/composables/attachments.d.ts +32 -0
- package/dist/parts/composables/attachments.js +2 -0
- package/dist/parts/composables/highlighted-code.d.ts +9 -0
- package/dist/{highlighted-code-Ck4zexJX.js → parts/composables/highlighted-code.js} +5 -2
- package/dist/parts/headless/choices-input.d.ts +2 -0
- package/dist/parts/headless/choices-input.js +162 -0
- package/dist/parts/headless/comment-visibility.d.ts +2 -0
- package/dist/parts/headless/comment-visibility.js +128 -0
- package/dist/parts/headless/comments.d.ts +2 -0
- package/dist/parts/headless/comments.js +2 -0
- package/dist/parts/headless/message-scroller.d.ts +2 -0
- package/dist/{message-scroller-CX6NJTdm.js → parts/headless/message-scroller.js} +2 -2
- package/dist/parts/playground/highlight.d.ts +5 -0
- package/dist/parts/playground/highlight.js +23 -0
- package/dist/parts/playground/paths.d.ts +4 -0
- package/dist/parts/playground/paths.js +7 -0
- package/dist/parts/playground/playground-render.d.ts +126 -0
- package/dist/parts/playground/playground-render.js +356 -0
- package/dist/parts/playground/share.d.ts +2 -0
- package/dist/parts/playground/share.js +92 -0
- package/dist/parts/playground/zip.d.ts +6 -0
- package/dist/parts/playground/zip.js +76 -0
- package/dist/parts/workspace/browser-support-notice.d.ts +76 -0
- package/dist/parts/workspace/browser-support-notice.js +105 -0
- package/dist/parts/workspace/codemirror.d.ts +16 -0
- package/dist/parts/workspace/codemirror.js +243 -0
- package/dist/parts/workspace/connect-panel.d.ts +129 -0
- package/dist/parts/workspace/connect-panel.js +285 -0
- package/dist/parts/workspace/connect-store.d.ts +26 -0
- package/dist/parts/workspace/connect-store.js +59 -0
- package/dist/parts/workspace/icons.d.ts +34 -0
- package/dist/parts/workspace/icons.js +46 -0
- package/dist/parts/workspace/playground-container.d.ts +192 -0
- package/dist/parts/workspace/playground-container.js +603 -0
- package/dist/parts/workspace/workspace-boot-status.d.ts +75 -0
- package/dist/parts/workspace/workspace-boot-status.js +207 -0
- package/dist/parts/workspace/workspace-editor.d.ts +43 -0
- package/dist/parts/workspace/workspace-editor.js +54 -0
- package/dist/parts/workspace/workspace-file-tree.d.ts +53 -0
- package/dist/parts/workspace/workspace-file-tree.js +68 -0
- package/dist/parts/workspace/workspace-preview.d.ts +72 -0
- package/dist/parts/workspace/workspace-preview.js +307 -0
- package/dist/parts/workspace/workspace-shell.d.ts +88 -0
- package/dist/parts/workspace/workspace-shell.js +291 -0
- package/dist/parts/workspace/workspace-terminal.d.ts +39 -0
- package/dist/parts/workspace/workspace-terminal.js +130 -0
- package/dist/payload-text-sjkYAwvw.js +32 -0
- package/dist/{pierre-code-view-T7V67hwT.js → pierre-code-view-NE35tkmR.js} +245 -102
- package/dist/{pierre-dark-DDWDl8g6.js → pierre-dark-CzUmjETS.js} +3 -1
- package/dist/{pierre-light-CWhW4NrH.js → pierre-light-Dn6E0sWv.js} +3 -1
- package/dist/playground.d.ts +4 -0
- package/dist/playground.js +4 -0
- package/dist/relative-time-BVmjOsYG.js +309 -0
- package/dist/rolldown-runtime-C9mWXvCC.js +29 -0
- package/dist/runtime/nuxt-plugin.js +23 -4
- package/dist/sankey-CAYwt82B-D4uDQoMR.js +2887 -0
- package/dist/share-DM4eNy4q.d.ts +37 -0
- package/dist/{slot-part-C7Ocxn3b.js → slot-part-Doic71uh.js} +7 -1
- package/dist/styles.css +2609 -620
- package/dist/temml-BilSAAws.js +12362 -0
- package/dist/theme-focus-ring.css +42 -0
- package/dist/theme.css +376 -0
- package/dist/theme.d.ts +355 -0
- package/dist/theme.js +265 -0
- package/dist/{types-CqDwuJAm.d.ts → types-Dj7vp0lZ.d.ts} +1 -1
- package/dist/vue-BDmSCtay.js +30779 -0
- package/dist/vue-DGstVdGn.js +2492 -0
- package/dist/workspace.d.ts +15 -0
- package/dist/workspace.js +12 -0
- package/package.json +135 -149
- package/dist/andromeeda-BASpqCeJ.js +0 -4
- package/dist/attachment.d.ts +0 -2
- package/dist/attachment.js +0 -2
- package/dist/aurora-x-DugsLcii.js +0 -4
- package/dist/avatar-stack.js +0 -2
- package/dist/ayu-dark-BT3qdi3o.js +0 -4
- package/dist/ayu-light-BVZyHoh9.js +0 -4
- package/dist/ayu-mirage-XFwUVZQZ.js +0 -4
- package/dist/bubble.d.ts +0 -2
- package/dist/bubble.js +0 -2
- package/dist/catppuccin-frappe-D20KODDN.js +0 -4
- package/dist/catppuccin-latte-eGLVHIUJ.js +0 -4
- package/dist/catppuccin-macchiato-bQGch4PY.js +0 -4
- package/dist/catppuccin-mocha-Bes8-0Mr.js +0 -4
- package/dist/chat-message.d.ts +0 -2
- package/dist/chat-message.js +0 -2
- package/dist/chat-session.d.ts +0 -2
- package/dist/chat-session.js +0 -2
- package/dist/chat.d.ts +0 -2
- package/dist/chat.js +0 -2
- package/dist/code-block.d.ts +0 -2
- package/dist/code-block.js +0 -3
- package/dist/code-view.d.ts +0 -2
- package/dist/code-view.js +0 -2
- package/dist/comment-layer-CBlxJ8eK.js +0 -1113
- package/dist/comments-ChNJkV1d.d.ts +0 -108
- package/dist/comments-Cq5eewsu.d.ts +0 -537
- package/dist/comments.d.ts +0 -2
- package/dist/comments.js +0 -2
- package/dist/config-Bux_AJzm.d.ts +0 -29
- package/dist/config-bHqE4JOs.js +0 -38
- package/dist/connection-status.d.ts +0 -2
- package/dist/connection-status.js +0 -2
- package/dist/dark-plus-BGuiqa1B.js +0 -4
- package/dist/dracula-0CVA2XY5.js +0 -4
- package/dist/dracula-soft-Dk9bpbVU.js +0 -4
- package/dist/error-diagnostics-B4hMpJRL.js +0 -13
- package/dist/everforest-dark-CRjTbhh5.js +0 -4
- package/dist/everforest-light-CEeYFLn8.js +0 -4
- package/dist/file-diff.d.ts +0 -2
- package/dist/file-diff.js +0 -2
- package/dist/file-tree.d.ts +0 -2
- package/dist/file-tree.js +0 -2
- package/dist/file-view.d.ts +0 -2
- package/dist/file-view.js +0 -2
- package/dist/github-dark-BXgKmOw_.js +0 -4
- package/dist/github-dark-default-DzJQXksd.js +0 -4
- package/dist/github-dark-dimmed-B1pEmGtS.js +0 -4
- package/dist/github-dark-high-contrast-BkHIa6jc.js +0 -4
- package/dist/github-light-BKRlUbaB.js +0 -4
- package/dist/github-light-default-BU3eYkzs.js +0 -4
- package/dist/github-light-high-contrast-B3MumDcI.js +0 -4
- package/dist/gruvbox-dark-hard-B0ecF443.js +0 -4
- package/dist/gruvbox-dark-medium-BQnpC39k.js +0 -4
- package/dist/gruvbox-dark-soft-DFZUgESr.js +0 -4
- package/dist/gruvbox-light-hard-CuB_LOJr.js +0 -4
- package/dist/gruvbox-light-medium-idDHgxjs.js +0 -4
- package/dist/gruvbox-light-soft-CfWH49MY.js +0 -4
- package/dist/horizon-bright-Ba6M8QSV.js +0 -4
- package/dist/horizon-h92C5OlZ.js +0 -4
- package/dist/houston-EQnPegWq.js +0 -4
- package/dist/kanagawa-dragon-DgDvwi3B.js +0 -4
- package/dist/kanagawa-lotus-BgoQro20.js +0 -4
- package/dist/kanagawa-wave-DgXEowHs.js +0 -4
- package/dist/laserwave-IxBH_3yW.js +0 -4
- package/dist/light-plus-S8JBx6is.js +0 -4
- package/dist/markdown-BoLBN0qH.js +0 -197
- package/dist/markdown.d.ts +0 -2
- package/dist/markdown.js +0 -2
- package/dist/marker.d.ts +0 -2
- package/dist/marker.js +0 -2
- package/dist/material-theme-D1f3HBq-.js +0 -4
- package/dist/material-theme-darker-ExzYhT0j.js +0 -4
- package/dist/material-theme-lighter-D6gH9nnA.js +0 -4
- package/dist/material-theme-ocean-D1w5BPAa.js +0 -4
- package/dist/material-theme-palenight-CkqWmVpF.js +0 -4
- package/dist/message-parts.d.ts +0 -2
- package/dist/message-parts.js +0 -2
- package/dist/message.d.ts +0 -2
- package/dist/message.js +0 -2
- package/dist/min-dark-npsJH98j.js +0 -4
- package/dist/min-light-DUk1XsVt.js +0 -4
- package/dist/monokai-CfFRWUNl.js +0 -4
- package/dist/multi-file-diff.d.ts +0 -2
- package/dist/multi-file-diff.js +0 -2
- package/dist/night-owl-BS7V-av_.js +0 -4
- package/dist/night-owl-light-CZtRawYE.js +0 -4
- package/dist/nord-BFh54Nqz.js +0 -4
- package/dist/one-dark-pro-zDovGosB.js +0 -4
- package/dist/one-light-gmHK3iK6.js +0 -4
- package/dist/patch-diff.d.ts +0 -2
- package/dist/patch-diff.js +0 -2
- package/dist/plastic-DtdaCjub.js +0 -4
- package/dist/poimandres-Hdda6aHK.js +0 -4
- package/dist/primitive-rail.d.ts +0 -222
- package/dist/primitive-rail.js +0 -348
- package/dist/prompt-input.d.ts +0 -2
- package/dist/prompt-input.js +0 -2
- package/dist/red-VqZFRByZ.js +0 -4
- package/dist/rose-pine-DiTkEueR.js +0 -4
- package/dist/rose-pine-dawn-tfo5y2X0.js +0 -4
- package/dist/rose-pine-moon-C0gON9XN.js +0 -4
- package/dist/runtime-type-DlCscMfw.js +0 -59
- package/dist/slack-dark-v8P_eXr6.js +0 -4
- package/dist/slack-ochin-D8SyEdKz.js +0 -4
- package/dist/snazzy-light-BtkQkvXb.js +0 -4
- package/dist/solarized-dark-B8nAdMfM.js +0 -4
- package/dist/solarized-light-B-3F1INj.js +0 -4
- package/dist/sync-status.d.ts +0 -2
- package/dist/sync-status.js +0 -2
- package/dist/synthwave-84-DcsXCF_c.js +0 -4
- package/dist/tokyo-night-Bvpqduda.js +0 -4
- package/dist/tool-list.d.ts +0 -2
- package/dist/tool-list.js +0 -2
- package/dist/trace-run.d.ts +0 -2
- package/dist/trace-run.js +0 -2
- package/dist/trace.d.ts +0 -2
- package/dist/trace.js +0 -2
- package/dist/unresolved-file.d.ts +0 -2
- package/dist/unresolved-file.js +0 -2
- package/dist/vesper-CfxmMOy3.js +0 -4
- package/dist/vitesse-black-D9-_1mjV.js +0 -4
- package/dist/vitesse-dark-DlSMLlr9.js +0 -4
- package/dist/vitesse-light-KRWWWztf.js +0 -4
package/dist/index.js
CHANGED
|
@@ -1,27 +1,680 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as useViteHubUI, n as createViteHubUI, r as resolveViteHubUIDefaults, t as ViteHubUIInjectionKey } from "./config-
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
1
|
+
import { r as useUIComponent } from "./nuxt-ui-DSQFzq3s.js";
|
|
2
|
+
import { a as useViteHubUIIcons, i as useViteHubUI, n as createViteHubUI, r as resolveViteHubUIDefaults, t as ViteHubUIInjectionKey } from "./config-Dk67emQt.js";
|
|
3
|
+
import { Markdown } from "./parts/components/markdown.js";
|
|
4
|
+
import { AgentSession, AgentSessionDetailsRow, AgentSessionDetailsSection, AgentSessionTimeline, AgentSessionWorkGroup } from "./parts/components/agent-session.js";
|
|
5
|
+
import { Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger } from "./parts/components/attachment.js";
|
|
6
|
+
import { AvatarStack } from "./parts/components/avatar-stack.js";
|
|
7
|
+
import { Bubble, BubbleContent, BubbleGroup, BubbleReactions } from "./parts/components/bubble.js";
|
|
8
|
+
import { Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader } from "./parts/components/message.js";
|
|
9
|
+
import { MessageParts } from "./parts/components/message-parts.js";
|
|
10
|
+
import { ChatMessage } from "./parts/components/chat-message.js";
|
|
11
|
+
import { MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerViewport, calculatePrependScrollTop, useMessageScroller } from "./parts/headless/message-scroller.js";
|
|
12
|
+
import { Chat, chatActivity } from "./parts/components/chat.js";
|
|
13
|
+
import { ChatSession } from "./parts/components/chat-session.js";
|
|
14
|
+
import { n as useCopy, t as CopyButton } from "./copy-button-CRN3kmSD.js";
|
|
15
|
+
import { CodeBlock, CodeBlockActions, CodeBlockContent, CodeBlockCopyButton, CodeBlockFooter, CodeBlockHeader, CodeBlockLine, CodeBlockTitle } from "./parts/components/code-block.js";
|
|
16
|
+
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";
|
|
17
|
+
import { t as CommentComposer } from "./comment-composer-jYv2ULNP.js";
|
|
18
|
+
import { n as fileToUIPart, r as useAgentAttachments, t as fileToDataUrl } from "./attachments-BzTwqRTU.js";
|
|
19
|
+
import { PromptInput } from "./parts/components/prompt-input.js";
|
|
20
|
+
import { commentLeaveMs, createCommentVisibility } from "./parts/headless/comment-visibility.js";
|
|
21
|
+
import { a as useCommentsContext, c as messagesSinceResolved, i as useComments, l as repliedSinceResolved, n as draftPositionKey, r as provideComments, t as defaultCommentCan } from "./comments-D0d26ghV.js";
|
|
22
|
+
import { n as provideRelativeNow, t as RelativeTime } from "./relative-time-BVmjOsYG.js";
|
|
23
|
+
import { CommentFilters, CommentList, CommentToolbar } from "./parts/components/comment-list.js";
|
|
24
|
+
import { CommentPin } from "./parts/components/comment-pin.js";
|
|
25
|
+
import { Marker, MarkerContent, MarkerIcon } from "./parts/components/marker.js";
|
|
26
|
+
import { CommentReply, CommentThread } from "./parts/components/comment-thread.js";
|
|
27
|
+
import { CommentLayer } from "./parts/components/comment-layer.js";
|
|
28
|
+
import { CommentPanel } from "./parts/components/comment-panel.js";
|
|
29
|
+
import { CommentSelectionBar } from "./parts/components/comment-selection-bar.js";
|
|
30
|
+
import "./parts/components/comments.js";
|
|
31
|
+
import { ConnectionStatus, ConnectionStatusIndicator, ConnectionStatusLabel } from "./parts/components/connection-status.js";
|
|
32
|
+
import { DEVICE_FRAME_BREAKPOINTS, DEVICE_FRAME_PRESETS, DeviceFrame } from "./parts/components/device-frame.js";
|
|
33
|
+
import { n as useFileTree, r as useFileTreeSelection, t as FileTree } from "./file-tree-C4OYgbV-.js";
|
|
34
|
+
import { ChoicesInput, ChoicesInputClear, ChoicesInputError, ChoicesInputField, ChoicesInputStatus } from "./parts/headless/choices-input.js";
|
|
35
|
+
import { FilterSearch } from "./parts/components/filter-search.js";
|
|
12
36
|
import { a as parsePatchFiles, n as parseDiffFromFile, t as getSingularPatch } from "./getSingularPatch-Dsb8EgxR.js";
|
|
13
|
-
import
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import { i as useCommentsContext, n as provideComments, r as useComments, t as draftPositionKey } from "./comments-C08J3z4e.js";
|
|
22
|
-
import { a as CommentFilters, c as CommentComposer, i as CommentPin, n as CommentReply, o as CommentList, r as CommentThread, s as CommentToolbar, t as CommentLayer } from "./comment-layer-CBlxJ8eK.js";
|
|
23
|
-
import { n as MarkerContent, r as MarkerIcon, t as Marker } from "./marker-Di2ZG_k1.js";
|
|
24
|
-
import { n as ConnectionStatusIndicator, r as ConnectionStatusLabel, t as ConnectionStatus } from "./connection-status-CzuWBENf.js";
|
|
25
|
-
import { n as SyncStatusIndicator, r as SyncStatusLabel, t as SyncStatus } from "./sync-status-BpxYdZIJ.js";
|
|
37
|
+
import "./parts/components/patch-parsers.js";
|
|
38
|
+
import { Status } from "./parts/components/status.js";
|
|
39
|
+
import { SyncStatus, SyncStatusIndicator, SyncStatusLabel } from "./parts/components/sync-status.js";
|
|
40
|
+
import { ToolList } from "./parts/components/tool-list.js";
|
|
41
|
+
import { Trace, TraceCollapsible, TraceCollapsibleContent, TraceCollapsibleTrigger, TraceDescription, TraceIcon, TraceLine, TraceTitle } from "./parts/components/trace.js";
|
|
42
|
+
import { TraceRun } from "./parts/components/trace-run.js";
|
|
43
|
+
import { useHighlightedCode } from "./parts/composables/highlighted-code.js";
|
|
44
|
+
import { PlaygroundRender } from "./parts/playground/playground-render.js";
|
|
26
45
|
import "./headless.js";
|
|
27
|
-
|
|
46
|
+
import { Tabs, TabsList, TabsTab } from "@ui-sdk/vue/tabs";
|
|
47
|
+
import { cloneVNode, computed, defineAsyncComponent, defineComponent, h, isVNode, nextTick, onMounted, ref } from "vue";
|
|
48
|
+
import { Button } from "@ui-sdk/vue/button";
|
|
49
|
+
import { Dialog, DialogBackdrop, DialogClose, DialogContent, DialogDescription, DialogTitle, DialogTrigger } from "@ui-sdk/vue/dialog";
|
|
50
|
+
import { Input, InputGroup } from "@ui-sdk/vue/input";
|
|
51
|
+
import { Menu, MenuContent, MenuGroup, MenuGroupLabel, MenuItem, MenuItemIcon, MenuSeparator, MenuTrigger } from "@ui-sdk/vue/menu";
|
|
52
|
+
//#region src/internal/icon-shapes.ts
|
|
53
|
+
/** The stroke of every Lucide icon. An icon drawn from shapes without it sets it on its `<svg>`. */
|
|
54
|
+
const lucideStroke = {
|
|
55
|
+
fill: "none",
|
|
56
|
+
stroke: "currentColor",
|
|
57
|
+
"stroke-linecap": "round",
|
|
58
|
+
"stroke-linejoin": "round",
|
|
59
|
+
"stroke-width": "2"
|
|
60
|
+
};
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region src/ui-sdk/icons.ts
|
|
63
|
+
const uiSdkIcons = {
|
|
64
|
+
"i-lucide-arrow-down": [["path", { "d": "M12 5v14m7-7l-7 7l-7-7" }]],
|
|
65
|
+
"i-lucide-arrow-left": [["path", { "d": "m12 19l-7-7l7-7m7 7H5" }]],
|
|
66
|
+
"i-lucide-arrow-right": [["path", { "d": "M5 12h14m-7-7l7 7l-7 7" }]],
|
|
67
|
+
"i-lucide-arrow-up": [["path", { "d": "m5 12l7-7l7 7m-7 7V5" }]],
|
|
68
|
+
"i-lucide-arrow-up-right": [["path", { "d": "M7 7h10v10M7 17L17 7" }]],
|
|
69
|
+
"i-lucide-bold": [["path", { "d": "M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8" }]],
|
|
70
|
+
"i-lucide-box": [["path", { "d": "M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z" }], ["path", { "d": "m3.3 7l8.7 5l8.7-5M12 22V12" }]],
|
|
71
|
+
"i-lucide-brain": [
|
|
72
|
+
["path", { "d": "M12 18V5m3 8a4.17 4.17 0 0 1-3-4a4.17 4.17 0 0 1-3 4m8.598-6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5" }],
|
|
73
|
+
["path", { "d": "M17.997 5.125a4 4 0 0 1 2.526 5.77" }],
|
|
74
|
+
["path", { "d": "M18 18a4 4 0 0 0 2-7.464" }],
|
|
75
|
+
["path", { "d": "M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517" }],
|
|
76
|
+
["path", { "d": "M6 18a4 4 0 0 1-2-7.464" }],
|
|
77
|
+
["path", { "d": "M6.003 5.125a4 4 0 0 0-2.526 5.77" }]
|
|
78
|
+
],
|
|
79
|
+
"i-lucide-check": [["path", { "d": "M20 6L9 17l-5-5" }]],
|
|
80
|
+
"i-lucide-chevron-down": [["path", { "d": "m6 9l6 6l6-6" }]],
|
|
81
|
+
"i-lucide-chevron-left": [["path", { "d": "m15 18l-6-6l6-6" }]],
|
|
82
|
+
"i-lucide-chevron-right": [["path", { "d": "m9 18l6-6l-6-6" }]],
|
|
83
|
+
"i-lucide-chevron-up": [["path", { "d": "m18 15l-6-6l-6 6" }]],
|
|
84
|
+
"i-lucide-chevrons-left": [["path", { "d": "m11 17l-5-5l5-5m7 10l-5-5l5-5" }]],
|
|
85
|
+
"i-lucide-chevrons-right": [["path", { "d": "m6 17l5-5l-5-5m7 10l5-5l-5-5" }]],
|
|
86
|
+
"i-lucide-circle": [["circle", {
|
|
87
|
+
"cx": "12",
|
|
88
|
+
"cy": "12",
|
|
89
|
+
"r": "10"
|
|
90
|
+
}]],
|
|
91
|
+
"i-lucide-circle-alert": [["circle", {
|
|
92
|
+
"cx": "12",
|
|
93
|
+
"cy": "12",
|
|
94
|
+
"r": "10"
|
|
95
|
+
}], ["path", { "d": "M12 8v4m0 4h.01" }]],
|
|
96
|
+
"i-lucide-circle-check": [["circle", {
|
|
97
|
+
"cx": "12",
|
|
98
|
+
"cy": "12",
|
|
99
|
+
"r": "10"
|
|
100
|
+
}], ["path", { "d": "m16 9l-5.5 5.5L8 12" }]],
|
|
101
|
+
"i-lucide-circle-dashed": [["path", { "d": "M10.1 2.182a10 10 0 0 1 3.8 0m0 19.636a10 10 0 0 1-3.8 0m7.509-18.097a10 10 0 0 1 2.69 2.7M2.182 13.9a10 10 0 0 1 0-3.8m18.097 7.509a10 10 0 0 1-2.7 2.69M21.818 10.1a10 10 0 0 1 0 3.8M3.721 6.391a10 10 0 0 1 2.7-2.69m-.03 16.578a10 10 0 0 1-2.69-2.7" }]],
|
|
102
|
+
"i-lucide-circle-minus": [["circle", {
|
|
103
|
+
"cx": "12",
|
|
104
|
+
"cy": "12",
|
|
105
|
+
"r": "10"
|
|
106
|
+
}], ["path", { "d": "M8 12h8" }]],
|
|
107
|
+
"i-lucide-circle-x": [["circle", {
|
|
108
|
+
"cx": "12",
|
|
109
|
+
"cy": "12",
|
|
110
|
+
"r": "10"
|
|
111
|
+
}], ["path", { "d": "m15 9l-6 6m0-6l6 6" }]],
|
|
112
|
+
"i-lucide-code": [["path", { "d": "m16 18l6-6l-6-6M8 6l-6 6l6 6" }]],
|
|
113
|
+
"i-lucide-copy": [["rect", {
|
|
114
|
+
"width": "14",
|
|
115
|
+
"height": "14",
|
|
116
|
+
"x": "8",
|
|
117
|
+
"y": "8",
|
|
118
|
+
"rx": "2",
|
|
119
|
+
"ry": "2"
|
|
120
|
+
}], ["path", { "d": "M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2" }]],
|
|
121
|
+
"i-lucide-database": [
|
|
122
|
+
["ellipse", {
|
|
123
|
+
"cx": "12",
|
|
124
|
+
"cy": "5",
|
|
125
|
+
"rx": "9",
|
|
126
|
+
"ry": "3"
|
|
127
|
+
}],
|
|
128
|
+
["path", { "d": "M3 5v14a9 3 0 0 0 18 0V5" }],
|
|
129
|
+
["path", { "d": "M3 12a9 3 0 0 0 18 0" }]
|
|
130
|
+
],
|
|
131
|
+
"i-lucide-download": [["path", { "d": "M12 15V3m9 12v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }], ["path", { "d": "m7 10l5 5l5-5" }]],
|
|
132
|
+
"i-lucide-ellipsis": [
|
|
133
|
+
["circle", {
|
|
134
|
+
"cx": "12",
|
|
135
|
+
"cy": "12",
|
|
136
|
+
"r": "1"
|
|
137
|
+
}],
|
|
138
|
+
["circle", {
|
|
139
|
+
"cx": "19",
|
|
140
|
+
"cy": "12",
|
|
141
|
+
"r": "1"
|
|
142
|
+
}],
|
|
143
|
+
["circle", {
|
|
144
|
+
"cx": "5",
|
|
145
|
+
"cy": "12",
|
|
146
|
+
"r": "1"
|
|
147
|
+
}]
|
|
148
|
+
],
|
|
149
|
+
"i-lucide-external-link": [["path", { "d": "M15 3h6v6m-11 5L21 3m-3 10v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6" }]],
|
|
150
|
+
"i-lucide-eye": [["path", { "d": "M2.062 12.348a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 19.876 0a1 1 0 0 1 0 .696a10.75 10.75 0 0 1-19.876 0" }], ["circle", {
|
|
151
|
+
"cx": "12",
|
|
152
|
+
"cy": "12",
|
|
153
|
+
"r": "3"
|
|
154
|
+
}]],
|
|
155
|
+
"i-lucide-eye-off": [["path", { "d": "M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575a1 1 0 0 1 0 .696a10.8 10.8 0 0 1-1.444 2.49m-6.41-.679a3 3 0 0 1-4.242-4.242" }], ["path", { "d": "M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151a1 1 0 0 1 0-.696a10.75 10.75 0 0 1 4.446-5.143M2 2l20 20" }]],
|
|
156
|
+
"i-lucide-file": [["path", { "d": "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { "d": "M14 2v5a1 1 0 0 0 1 1h5" }]],
|
|
157
|
+
"i-lucide-file-pen-line": [["path", { "d": "M14.364 13.634a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506l4.013-4.009a1 1 0 0 0-3.004-3.004zm.123-5.776A1 1 0 0 1 14 7V2" }], ["path", { "d": "M20 19.645V20a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l2.516 2.516M8 18h1" }]],
|
|
158
|
+
"i-lucide-file-text": [["path", { "d": "M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z" }], ["path", { "d": "M14 2v5a1 1 0 0 0 1 1h5M10 9H8m8 4H8m8 4H8" }]],
|
|
159
|
+
"i-lucide-files": [["path", { "d": "M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8" }], ["path", { "d": "M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706zM5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1" }]],
|
|
160
|
+
"i-lucide-folder": [["path", { "d": "M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z" }]],
|
|
161
|
+
"i-lucide-folder-open": [["path", { "d": "m6 14l1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2" }]],
|
|
162
|
+
"i-lucide-globe": [["circle", {
|
|
163
|
+
"cx": "12",
|
|
164
|
+
"cy": "12",
|
|
165
|
+
"r": "10"
|
|
166
|
+
}], ["path", { "d": "M12 2a14.5 14.5 0 0 0 0 20a14.5 14.5 0 0 0 0-20M2 12h20" }]],
|
|
167
|
+
"i-lucide-grip-vertical": [
|
|
168
|
+
["circle", {
|
|
169
|
+
"cx": "9",
|
|
170
|
+
"cy": "12",
|
|
171
|
+
"r": "1"
|
|
172
|
+
}],
|
|
173
|
+
["circle", {
|
|
174
|
+
"cx": "9",
|
|
175
|
+
"cy": "5",
|
|
176
|
+
"r": "1"
|
|
177
|
+
}],
|
|
178
|
+
["circle", {
|
|
179
|
+
"cx": "9",
|
|
180
|
+
"cy": "19",
|
|
181
|
+
"r": "1"
|
|
182
|
+
}],
|
|
183
|
+
["circle", {
|
|
184
|
+
"cx": "15",
|
|
185
|
+
"cy": "12",
|
|
186
|
+
"r": "1"
|
|
187
|
+
}],
|
|
188
|
+
["circle", {
|
|
189
|
+
"cx": "15",
|
|
190
|
+
"cy": "5",
|
|
191
|
+
"r": "1"
|
|
192
|
+
}],
|
|
193
|
+
["circle", {
|
|
194
|
+
"cx": "15",
|
|
195
|
+
"cy": "19",
|
|
196
|
+
"r": "1"
|
|
197
|
+
}]
|
|
198
|
+
],
|
|
199
|
+
"i-lucide-hash": [["path", { "d": "M4 9h16M4 15h16M10 3L8 21m8-18l-2 18" }]],
|
|
200
|
+
"i-lucide-heading-1": [["path", { "d": "M4 12h8m-8 6V6m8 12V6m5 6l3-2v8" }]],
|
|
201
|
+
"i-lucide-heading-2": [["path", { "d": "M4 12h8m-8 6V6m8 12V6m9 12h-4c0-4 4-3 4-6c0-1.5-2-2.5-4-1" }]],
|
|
202
|
+
"i-lucide-heading-3": [["path", { "d": "M4 12h8m-8 6V6m8 12V6m5.5 4.5c1.7-1 3.5 0 3.5 1.5a2 2 0 0 1-2 2m-2 3.5c2 1.5 4 .3 4-1.5a2 2 0 0 0-2-2" }]],
|
|
203
|
+
"i-lucide-image": [
|
|
204
|
+
["rect", {
|
|
205
|
+
"width": "18",
|
|
206
|
+
"height": "18",
|
|
207
|
+
"x": "3",
|
|
208
|
+
"y": "3",
|
|
209
|
+
"rx": "2",
|
|
210
|
+
"ry": "2"
|
|
211
|
+
}],
|
|
212
|
+
["circle", {
|
|
213
|
+
"cx": "9",
|
|
214
|
+
"cy": "9",
|
|
215
|
+
"r": "2"
|
|
216
|
+
}],
|
|
217
|
+
["path", { "d": "m21 15l-3.086-3.086a2 2 0 0 0-2.828 0L6 21" }]
|
|
218
|
+
],
|
|
219
|
+
"i-lucide-info": [["circle", {
|
|
220
|
+
"cx": "12",
|
|
221
|
+
"cy": "12",
|
|
222
|
+
"r": "10"
|
|
223
|
+
}], ["path", { "d": "M12 16v-4m0-4h.01" }]],
|
|
224
|
+
"i-lucide-italic": [["path", { "d": "M19 4h-9m4 16H5M15 4L9 20" }]],
|
|
225
|
+
"i-lucide-layout-template": [
|
|
226
|
+
["rect", {
|
|
227
|
+
"width": "18",
|
|
228
|
+
"height": "7",
|
|
229
|
+
"x": "3",
|
|
230
|
+
"y": "3",
|
|
231
|
+
"rx": "1"
|
|
232
|
+
}],
|
|
233
|
+
["rect", {
|
|
234
|
+
"width": "9",
|
|
235
|
+
"height": "7",
|
|
236
|
+
"x": "3",
|
|
237
|
+
"y": "14",
|
|
238
|
+
"rx": "1"
|
|
239
|
+
}],
|
|
240
|
+
["rect", {
|
|
241
|
+
"width": "5",
|
|
242
|
+
"height": "7",
|
|
243
|
+
"x": "16",
|
|
244
|
+
"y": "14",
|
|
245
|
+
"rx": "1"
|
|
246
|
+
}]
|
|
247
|
+
],
|
|
248
|
+
"i-lucide-lightbulb": [["path", { "d": "M15 14c.2-1 .7-1.7 1.5-2.5c1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5c.7.7 1.3 1.5 1.5 2.5m0 4h6m-5 4h4" }]],
|
|
249
|
+
"i-lucide-link": [["path", { "d": "M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" }], ["path", { "d": "M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" }]],
|
|
250
|
+
"i-lucide-list": [["path", { "d": "M3 5h.01M3 12h.01M3 19h.01M8 5h13M8 12h13M8 19h13" }]],
|
|
251
|
+
"i-lucide-list-checks": [["path", { "d": "M13 5h8m-8 7h8m-8 7h8M3 17l2 2l4-4M3 7l2 2l4-4" }]],
|
|
252
|
+
"i-lucide-list-ordered": [["path", { "d": "M11 5h10m-10 7h10m-10 7h10M4 4h1v5M4 9h2m.5 11H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02" }]],
|
|
253
|
+
"i-lucide-loader-circle": [["path", { "d": "M21 12a9 9 0 1 1-6.219-8.56" }]],
|
|
254
|
+
"i-lucide-maximize-2": [["path", { "d": "M15 3h6v6m0-6l-7 7M3 21l7-7m-1 7H3v-6" }]],
|
|
255
|
+
"i-lucide-menu": [["path", { "d": "M4 5h16M4 12h16M4 19h16" }]],
|
|
256
|
+
"i-lucide-message-circle": [["path", { "d": "M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092a10 10 0 1 0-4.777-4.719" }]],
|
|
257
|
+
"i-lucide-minimize-2": [["path", { "d": "m14 10l7-7m-1 7h-6V4M3 21l7-7m-6 0h6v6" }]],
|
|
258
|
+
"i-lucide-minus": [["path", { "d": "M5 12h14" }]],
|
|
259
|
+
"i-lucide-monitor": [["rect", {
|
|
260
|
+
"width": "20",
|
|
261
|
+
"height": "14",
|
|
262
|
+
"x": "2",
|
|
263
|
+
"y": "3",
|
|
264
|
+
"rx": "2"
|
|
265
|
+
}], ["path", { "d": "M8 21h8m-4-4v4" }]],
|
|
266
|
+
"i-lucide-moon": [["path", { "d": "M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401" }]],
|
|
267
|
+
"i-lucide-panel-left-close": [["rect", {
|
|
268
|
+
"width": "18",
|
|
269
|
+
"height": "18",
|
|
270
|
+
"x": "3",
|
|
271
|
+
"y": "3",
|
|
272
|
+
"rx": "2"
|
|
273
|
+
}], ["path", { "d": "M9 3v18m7-6l-3-3l3-3" }]],
|
|
274
|
+
"i-lucide-panel-left-open": [["rect", {
|
|
275
|
+
"width": "18",
|
|
276
|
+
"height": "18",
|
|
277
|
+
"x": "3",
|
|
278
|
+
"y": "3",
|
|
279
|
+
"rx": "2"
|
|
280
|
+
}], ["path", { "d": "M9 3v18m5-12l3 3l-3 3" }]],
|
|
281
|
+
"i-lucide-panel-right": [["rect", {
|
|
282
|
+
"width": "18",
|
|
283
|
+
"height": "18",
|
|
284
|
+
"x": "3",
|
|
285
|
+
"y": "3",
|
|
286
|
+
"rx": "2"
|
|
287
|
+
}], ["path", { "d": "M15 3v18" }]],
|
|
288
|
+
"i-lucide-pencil": [["path", { "d": "M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497zM15 5l4 4" }]],
|
|
289
|
+
"i-lucide-play": [["path", { "d": "M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z" }]],
|
|
290
|
+
"i-lucide-plug": [["path", { "d": "M12 22v-5m3-9V2m2 6a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1zM9 8V2" }]],
|
|
291
|
+
"i-lucide-plus": [["path", { "d": "M5 12h14m-7-7v14" }]],
|
|
292
|
+
"i-lucide-quote": [["path", { "d": "M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2a1 1 0 0 1 1 1v1a2 2 0 0 1-2 2a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1a6 6 0 0 0 6-6V5a2 2 0 0 0-2-2zM5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2a1 1 0 0 1 1 1v1a2 2 0 0 1-2 2a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1a6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z" }]],
|
|
293
|
+
"i-lucide-refresh-cw": [
|
|
294
|
+
["path", { "d": "M3 12a9 9 0 0 1 9-9a9.75 9.75 0 0 1 6.74 2.74L21 8" }],
|
|
295
|
+
["path", { "d": "M21 3v5h-5m5 4a9 9 0 0 1-9 9a9.75 9.75 0 0 1-6.74-2.74L3 16" }],
|
|
296
|
+
["path", { "d": "M8 16H3v5" }]
|
|
297
|
+
],
|
|
298
|
+
"i-lucide-rotate-ccw": [["path", { "d": "M3 12a9 9 0 1 0 9-9a9.75 9.75 0 0 0-6.74 2.74L3 8" }], ["path", { "d": "M3 3v5h5" }]],
|
|
299
|
+
"i-lucide-search": [["path", { "d": "m21 21l-4.34-4.34" }], ["circle", {
|
|
300
|
+
"cx": "11",
|
|
301
|
+
"cy": "11",
|
|
302
|
+
"r": "8"
|
|
303
|
+
}]],
|
|
304
|
+
"i-lucide-sparkles": [["path", { "d": "M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594zM20 2v4m2-2h-4" }], ["circle", {
|
|
305
|
+
"cx": "4",
|
|
306
|
+
"cy": "20",
|
|
307
|
+
"r": "2"
|
|
308
|
+
}]],
|
|
309
|
+
"i-lucide-square": [["rect", {
|
|
310
|
+
"width": "18",
|
|
311
|
+
"height": "18",
|
|
312
|
+
"x": "3",
|
|
313
|
+
"y": "3",
|
|
314
|
+
"rx": "2"
|
|
315
|
+
}]],
|
|
316
|
+
"i-lucide-square-code": [["path", { "d": "m10 9l-3 3l3 3m4 0l3-3l-3-3" }], ["rect", {
|
|
317
|
+
"width": "18",
|
|
318
|
+
"height": "18",
|
|
319
|
+
"x": "3",
|
|
320
|
+
"y": "3",
|
|
321
|
+
"rx": "2"
|
|
322
|
+
}]],
|
|
323
|
+
"i-lucide-square-menu": [["rect", {
|
|
324
|
+
"width": "18",
|
|
325
|
+
"height": "18",
|
|
326
|
+
"x": "3",
|
|
327
|
+
"y": "3",
|
|
328
|
+
"rx": "2"
|
|
329
|
+
}], ["path", { "d": "M7 8h10M7 12h10M7 16h10" }]],
|
|
330
|
+
"i-lucide-square-pen": [["path", { "d": "M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7" }], ["path", { "d": "M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z" }]],
|
|
331
|
+
"i-lucide-star": [["path", { "d": "M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.12 2.12 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.12 2.12 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.12 2.12 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.12 2.12 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.12 2.12 0 0 0 1.597-1.16z" }]],
|
|
332
|
+
"i-lucide-strikethrough": [["path", { "d": "M16 4H9a3 3 0 0 0-2.83 4M14 12a4 4 0 0 1 0 8H6m-2-8h16" }]],
|
|
333
|
+
"i-lucide-sun": [["circle", {
|
|
334
|
+
"cx": "12",
|
|
335
|
+
"cy": "12",
|
|
336
|
+
"r": "4"
|
|
337
|
+
}], ["path", { "d": "M12 2v2m0 16v2M4.93 4.93l1.41 1.41m11.32 11.32l1.41 1.41M2 12h2m16 0h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41" }]],
|
|
338
|
+
"i-lucide-terminal": [["path", { "d": "M12 19h8M4 17l6-6l-6-6" }]],
|
|
339
|
+
"i-lucide-trash-2": [["path", { "d": "M10 11v6m4-6v6m5-11v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6M3 6h18M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2" }]],
|
|
340
|
+
"i-lucide-triangle-alert": [["path", { "d": "m21.73 18l-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3M12 9v4m0 4h.01" }]],
|
|
341
|
+
"i-lucide-type": [["path", { "d": "M12 4v16M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2M9 20h6" }]],
|
|
342
|
+
"i-lucide-upload": [["path", { "d": "M12 3v12m5-7l-5-5l-5 5m14 7v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4" }]],
|
|
343
|
+
"i-lucide-wrench": [["path", { "d": "M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z" }]],
|
|
344
|
+
"i-lucide-x": [["path", { "d": "M18 6L6 18M6 6l12 12" }]]
|
|
345
|
+
};
|
|
346
|
+
//#endregion
|
|
347
|
+
//#region src/ui-sdk/components.ts
|
|
348
|
+
/**
|
|
349
|
+
* The parts render Nuxt UI components by name (see `internal/nuxt-ui.ts`). These take the same props that the parts
|
|
350
|
+
* pass, render ui-sdk parts, and carry the `data-slot` and `data-variant` names that the kit style family
|
|
351
|
+
* (`@vite-hub/kit/styles/default.css`) styles.
|
|
352
|
+
*/
|
|
353
|
+
/** Draws the Lucide icons that the parts use, from shapes in the bundle. Another name draws an empty icon. */
|
|
354
|
+
const UIcon = defineComponent({
|
|
355
|
+
name: "UIcon",
|
|
356
|
+
inheritAttrs: false,
|
|
357
|
+
props: { name: {
|
|
358
|
+
default: "",
|
|
359
|
+
type: String
|
|
360
|
+
} },
|
|
361
|
+
setup(props, { attrs }) {
|
|
362
|
+
return () => h("svg", {
|
|
363
|
+
...lucideStroke,
|
|
364
|
+
"aria-hidden": "true",
|
|
365
|
+
...attrs,
|
|
366
|
+
height: "1em",
|
|
367
|
+
viewBox: "0 0 24 24",
|
|
368
|
+
width: "1em"
|
|
369
|
+
}, uiSdkIcons[props.name]?.map(([tag, shape]) => h(tag, shape)));
|
|
370
|
+
}
|
|
371
|
+
});
|
|
372
|
+
const text = (value) => typeof value === "string" ? value : void 0;
|
|
373
|
+
const Button$1 = Button;
|
|
374
|
+
function buttonVariant(color, variant) {
|
|
375
|
+
if (variant === "ghost" || variant === "link") return variant;
|
|
376
|
+
if (color === "error") return "destructive";
|
|
377
|
+
if (variant === "soft" || variant === "subtle") return "soft";
|
|
378
|
+
return variant === "solid" ? "solid" : void 0;
|
|
379
|
+
}
|
|
380
|
+
/**
|
|
381
|
+
* Nuxt UI's `UButton` as the parts use it. A part that names its button, such as `data-slot="copy-button"`, finds the
|
|
382
|
+
* name in `data-part`, because `data-slot="button"` is what the kit styles.
|
|
383
|
+
*/
|
|
384
|
+
const UButton = defineComponent({
|
|
385
|
+
name: "UButton",
|
|
386
|
+
inheritAttrs: false,
|
|
387
|
+
props: {
|
|
388
|
+
color: {
|
|
389
|
+
default: "primary",
|
|
390
|
+
type: String
|
|
391
|
+
},
|
|
392
|
+
disabled: {
|
|
393
|
+
default: false,
|
|
394
|
+
type: Boolean
|
|
395
|
+
},
|
|
396
|
+
/** Nuxt UI opens `to` in the same tab unless `target` says otherwise. A plain link does the same. */
|
|
397
|
+
external: {
|
|
398
|
+
default: void 0,
|
|
399
|
+
type: Boolean
|
|
400
|
+
},
|
|
401
|
+
icon: { type: String },
|
|
402
|
+
label: { type: String },
|
|
403
|
+
loading: {
|
|
404
|
+
default: false,
|
|
405
|
+
type: Boolean
|
|
406
|
+
},
|
|
407
|
+
size: {
|
|
408
|
+
default: "md",
|
|
409
|
+
type: String
|
|
410
|
+
},
|
|
411
|
+
square: {
|
|
412
|
+
default: false,
|
|
413
|
+
type: Boolean
|
|
414
|
+
},
|
|
415
|
+
to: { type: String },
|
|
416
|
+
trailingIcon: { type: String },
|
|
417
|
+
type: {
|
|
418
|
+
default: "button",
|
|
419
|
+
type: String
|
|
420
|
+
},
|
|
421
|
+
ui: { type: Object },
|
|
422
|
+
variant: {
|
|
423
|
+
default: "solid",
|
|
424
|
+
type: String
|
|
425
|
+
}
|
|
426
|
+
},
|
|
427
|
+
setup(props, { attrs, slots }) {
|
|
428
|
+
const UIcon = useUIComponent("UIcon");
|
|
429
|
+
return () => {
|
|
430
|
+
const shared = {
|
|
431
|
+
...attrs,
|
|
432
|
+
"aria-busy": props.loading ? "true" : text(attrs["aria-busy"]),
|
|
433
|
+
"data-part": text(attrs["data-slot"]),
|
|
434
|
+
"data-size": props.size,
|
|
435
|
+
"data-slot": "button",
|
|
436
|
+
"data-variant": buttonVariant(props.color, props.variant)
|
|
437
|
+
};
|
|
438
|
+
const leading = props.loading ? "i-lucide-loader-circle" : props.icon;
|
|
439
|
+
const content = () => [
|
|
440
|
+
slots.leading ? slots.leading({}) : leading ? h(UIcon, {
|
|
441
|
+
"data-slot": props.loading ? "spinner" : void 0,
|
|
442
|
+
name: leading
|
|
443
|
+
}) : null,
|
|
444
|
+
slots.default ? slots.default() : props.label ? h("span", props.label) : null,
|
|
445
|
+
props.trailingIcon ? h(UIcon, { name: props.trailingIcon }) : null
|
|
446
|
+
];
|
|
447
|
+
if (props.to) return h("a", {
|
|
448
|
+
...shared,
|
|
449
|
+
href: props.to
|
|
450
|
+
}, content());
|
|
451
|
+
return h(Button$1, {
|
|
452
|
+
...shared,
|
|
453
|
+
disabled: props.disabled || props.loading,
|
|
454
|
+
type: props.type
|
|
455
|
+
}, content);
|
|
456
|
+
};
|
|
457
|
+
}
|
|
458
|
+
});
|
|
459
|
+
/**
|
|
460
|
+
* Nuxt UI's `UInput`: a frame with the `leading` and `trailing` slots around the input. `class` goes to the frame, and
|
|
461
|
+
* a part's `data-slot` goes to `data-part` of the input, as on `UButton`.
|
|
462
|
+
*/
|
|
463
|
+
const UInput = defineComponent({
|
|
464
|
+
name: "UInput",
|
|
465
|
+
inheritAttrs: false,
|
|
466
|
+
props: {
|
|
467
|
+
autofocus: {
|
|
468
|
+
default: false,
|
|
469
|
+
type: Boolean
|
|
470
|
+
},
|
|
471
|
+
disabled: {
|
|
472
|
+
default: false,
|
|
473
|
+
type: Boolean
|
|
474
|
+
},
|
|
475
|
+
modelValue: { type: [String, Number] },
|
|
476
|
+
size: {
|
|
477
|
+
default: "md",
|
|
478
|
+
type: String
|
|
479
|
+
},
|
|
480
|
+
type: {
|
|
481
|
+
default: "text",
|
|
482
|
+
type: String
|
|
483
|
+
},
|
|
484
|
+
ui: { type: Object }
|
|
485
|
+
},
|
|
486
|
+
emits: { "update:modelValue": (_value) => true },
|
|
487
|
+
setup(props, { attrs, emit, slots }) {
|
|
488
|
+
const input = ref(null);
|
|
489
|
+
onMounted(() => {
|
|
490
|
+
if (props.autofocus) nextTick(() => (input.value?.$el)?.focus());
|
|
491
|
+
});
|
|
492
|
+
return () => {
|
|
493
|
+
const { class: frameClass, "data-slot": part, style, ...field } = attrs;
|
|
494
|
+
return h(InputGroup, {
|
|
495
|
+
class: frameClass,
|
|
496
|
+
"data-size": props.size,
|
|
497
|
+
style
|
|
498
|
+
}, () => [
|
|
499
|
+
slots.leading?.(),
|
|
500
|
+
h(Input, {
|
|
501
|
+
...field,
|
|
502
|
+
"data-part": text(part),
|
|
503
|
+
disabled: props.disabled,
|
|
504
|
+
ref: input,
|
|
505
|
+
type: props.type,
|
|
506
|
+
value: props.modelValue === void 0 ? "" : String(props.modelValue),
|
|
507
|
+
"onUpdate:value": (value) => emit("update:modelValue", value)
|
|
508
|
+
}),
|
|
509
|
+
slots.trailing?.()
|
|
510
|
+
]);
|
|
511
|
+
};
|
|
512
|
+
}
|
|
513
|
+
});
|
|
514
|
+
function asTrigger(children, props) {
|
|
515
|
+
const vnode = children?.find(isVNode);
|
|
516
|
+
if (!vnode) return null;
|
|
517
|
+
const { "data-slot": _slot, ...trigger } = props;
|
|
518
|
+
return cloneVNode(vnode, trigger, true);
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* Nuxt UI's `UModal`: the default slot opens it, and `content` replaces the title, the description, `body`, and
|
|
522
|
+
* `footer`. `open` with `update:open` controls it. `ui.overlay` and `ui.content` style the backdrop and the dialog.
|
|
523
|
+
*/
|
|
524
|
+
const UModal = defineComponent({
|
|
525
|
+
name: "UModal",
|
|
526
|
+
inheritAttrs: false,
|
|
527
|
+
props: {
|
|
528
|
+
close: {
|
|
529
|
+
default: true,
|
|
530
|
+
type: Boolean
|
|
531
|
+
},
|
|
532
|
+
description: { type: String },
|
|
533
|
+
dismissible: {
|
|
534
|
+
default: true,
|
|
535
|
+
type: Boolean
|
|
536
|
+
},
|
|
537
|
+
open: {
|
|
538
|
+
default: void 0,
|
|
539
|
+
type: Boolean
|
|
540
|
+
},
|
|
541
|
+
title: { type: String },
|
|
542
|
+
transition: {
|
|
543
|
+
default: true,
|
|
544
|
+
type: Boolean
|
|
545
|
+
},
|
|
546
|
+
ui: {
|
|
547
|
+
default: () => ({}),
|
|
548
|
+
type: Object
|
|
549
|
+
}
|
|
550
|
+
},
|
|
551
|
+
emits: { "update:open": (_open) => true },
|
|
552
|
+
setup(props, { emit, slots }) {
|
|
553
|
+
const UIcon = useUIComponent("UIcon");
|
|
554
|
+
const icons = useViteHubUIIcons();
|
|
555
|
+
const inner = ref(false);
|
|
556
|
+
const open = computed(() => props.open ?? inner.value);
|
|
557
|
+
const setOpen = (value) => {
|
|
558
|
+
inner.value = value;
|
|
559
|
+
emit("update:open", value);
|
|
560
|
+
};
|
|
561
|
+
const close = () => setOpen(false);
|
|
562
|
+
return () => h(Dialog, {
|
|
563
|
+
dismissible: props.dismissible,
|
|
564
|
+
open: open.value,
|
|
565
|
+
onOpenChange: setOpen
|
|
566
|
+
}, () => [
|
|
567
|
+
slots.default ? h(DialogTrigger, null, { render: ({ props: trigger }) => asTrigger(slots.default?.(), trigger) }) : null,
|
|
568
|
+
h(DialogBackdrop, { class: props.ui.overlay }),
|
|
569
|
+
h(DialogContent, {
|
|
570
|
+
"aria-label": slots.content ? props.title : void 0,
|
|
571
|
+
class: props.ui.content
|
|
572
|
+
}, () => slots.content ? slots.content({ close }) : [
|
|
573
|
+
props.title ? h(DialogTitle, () => props.title) : null,
|
|
574
|
+
props.description ? h(DialogDescription, () => props.description) : null,
|
|
575
|
+
slots.body?.({ close }),
|
|
576
|
+
slots.footer ? h("div", { "data-slot": "dialog-footer" }, slots.footer({ close })) : null,
|
|
577
|
+
props.close ? h(DialogClose, { "aria-label": "Close" }, () => h(UIcon, { name: icons.value.close })) : null
|
|
578
|
+
])
|
|
579
|
+
]);
|
|
580
|
+
}
|
|
581
|
+
});
|
|
582
|
+
/** Nuxt UI's `UTabs` with `content: false`, as the parts use it: a tab list from `items`, with `v-model`. */
|
|
583
|
+
const UTabs = defineComponent({
|
|
584
|
+
name: "UTabs",
|
|
585
|
+
inheritAttrs: false,
|
|
586
|
+
props: {
|
|
587
|
+
content: {
|
|
588
|
+
default: true,
|
|
589
|
+
type: Boolean
|
|
590
|
+
},
|
|
591
|
+
items: {
|
|
592
|
+
default: () => [],
|
|
593
|
+
type: Array
|
|
594
|
+
},
|
|
595
|
+
modelValue: { type: [String, Number] }
|
|
596
|
+
},
|
|
597
|
+
emits: { "update:modelValue": (_value) => true },
|
|
598
|
+
setup(props, { attrs, emit }) {
|
|
599
|
+
const UIcon = useUIComponent("UIcon");
|
|
600
|
+
return () => {
|
|
601
|
+
const { "aria-label": label, ...root } = attrs;
|
|
602
|
+
return h(Tabs, {
|
|
603
|
+
...root,
|
|
604
|
+
value: props.modelValue === void 0 ? void 0 : String(props.modelValue),
|
|
605
|
+
"onUpdate:value": (value) => {
|
|
606
|
+
const item = props.items.find((entry) => String(entry.value) === value);
|
|
607
|
+
if (item) emit("update:modelValue", item.value);
|
|
608
|
+
}
|
|
609
|
+
}, () => h(TabsList, { "aria-label": text(label) }, () => props.items.map((item) => h(TabsTab, {
|
|
610
|
+
disabled: item.disabled,
|
|
611
|
+
key: item.value,
|
|
612
|
+
value: String(item.value)
|
|
613
|
+
}, () => [
|
|
614
|
+
item.icon ? h(UIcon, { name: item.icon }) : null,
|
|
615
|
+
item.label,
|
|
616
|
+
item.badge === void 0 || item.badge === false ? null : h("span", { "data-slot": "tabs-tab-badge" }, item.badge === true ? "" : String(item.badge))
|
|
617
|
+
]))));
|
|
618
|
+
};
|
|
619
|
+
}
|
|
620
|
+
});
|
|
621
|
+
/**
|
|
622
|
+
* The components that the parts render, on ui-sdk instead of Nuxt UI. Give them to `createViteHubUI({ components })`
|
|
623
|
+
* and load the kit style family. `UIcon` draws the icons that the parts use; to show other icons, such as your own in
|
|
624
|
+
* `createViteHubUI({ icons })`, pass your own `UIcon` next to these.
|
|
625
|
+
*/
|
|
626
|
+
const uiSdkComponents = {
|
|
627
|
+
UButton,
|
|
628
|
+
UDropdownMenu: defineComponent({
|
|
629
|
+
name: "UDropdownMenu",
|
|
630
|
+
inheritAttrs: false,
|
|
631
|
+
props: {
|
|
632
|
+
content: {
|
|
633
|
+
default: () => ({}),
|
|
634
|
+
type: Object
|
|
635
|
+
},
|
|
636
|
+
items: {
|
|
637
|
+
default: () => [],
|
|
638
|
+
type: Array
|
|
639
|
+
},
|
|
640
|
+
ui: {
|
|
641
|
+
default: () => ({}),
|
|
642
|
+
type: Object
|
|
643
|
+
}
|
|
644
|
+
},
|
|
645
|
+
emits: { "update:open": (_open) => true },
|
|
646
|
+
setup(props, { emit, slots }) {
|
|
647
|
+
const UIcon = useUIComponent("UIcon");
|
|
648
|
+
const entry = (item, index) => {
|
|
649
|
+
if (item.type === "label") return h(MenuGroupLabel, { key: index }, () => item.label);
|
|
650
|
+
if (item.type === "separator") return h(MenuSeparator, { key: index });
|
|
651
|
+
return h(MenuItem, {
|
|
652
|
+
disabled: item.disabled,
|
|
653
|
+
key: index,
|
|
654
|
+
label: item.label,
|
|
655
|
+
onSelect: item.onSelect
|
|
656
|
+
}, () => [
|
|
657
|
+
item.icon ? h(MenuItemIcon, () => h(UIcon, { name: item.icon })) : null,
|
|
658
|
+
h("span", item.label),
|
|
659
|
+
item.description ? h("span", { "data-slot": "menu-item-description" }, item.description) : null
|
|
660
|
+
]);
|
|
661
|
+
};
|
|
662
|
+
return () => {
|
|
663
|
+
const groups = props.items.length && Array.isArray(props.items[0]) ? props.items : [props.items];
|
|
664
|
+
return h(Menu, { onOpenChange: (open) => emit("update:open", open) }, () => [h(MenuTrigger, null, { render: ({ props: trigger }) => asTrigger(slots.default?.(), trigger) }), h(MenuContent, {
|
|
665
|
+
...props.content,
|
|
666
|
+
class: props.ui.content
|
|
667
|
+
}, () => groups.flatMap((group, index) => [index ? h(MenuSeparator, { key: `separator-${index}` }) : null, h(MenuGroup, { key: `group-${index}` }, () => group.map(entry))]))]);
|
|
668
|
+
};
|
|
669
|
+
}
|
|
670
|
+
}),
|
|
671
|
+
UEditorDragHandle: defineAsyncComponent(() => import("./editor-C_wt4RRV.js").then((parts) => parts.UEditorDragHandle)),
|
|
672
|
+
UEditorSuggestionMenu: defineAsyncComponent(() => import("./editor-C_wt4RRV.js").then((parts) => parts.UEditorSuggestionMenu)),
|
|
673
|
+
UEditorToolbar: defineAsyncComponent(() => import("./editor-C_wt4RRV.js").then((parts) => parts.UEditorToolbar)),
|
|
674
|
+
UIcon,
|
|
675
|
+
UInput,
|
|
676
|
+
UModal,
|
|
677
|
+
UTabs
|
|
678
|
+
};
|
|
679
|
+
//#endregion
|
|
680
|
+
export { AgentSession, AgentSessionDetailsRow, AgentSessionDetailsSection, AgentSessionTimeline, AgentSessionWorkGroup, Attachment, AttachmentAction, AttachmentActions, AttachmentContent, AttachmentDescription, AttachmentGroup, AttachmentMedia, AttachmentTitle, AttachmentTrigger, AvatarStack, Bubble, BubbleContent, BubbleGroup, BubbleReactions, Chat, ChatMessage, ChatSession, ChoicesInput, ChoicesInputClear, ChoicesInputError, ChoicesInputField, ChoicesInputStatus, CodeBlock, CodeBlockActions, CodeBlockContent, CodeBlockCopyButton, CodeBlockFooter, CodeBlockHeader, CodeBlockLine, CodeBlockTitle, CodeView, CommentComposer, CommentFilters, CommentLayer, CommentList, CommentPanel, CommentPin, CommentReply, CommentSelectionBar, CommentThread, CommentToolbar, ConnectionStatus, ConnectionStatusIndicator, ConnectionStatusLabel, CopyButton, DEVICE_FRAME_BREAKPOINTS, DEVICE_FRAME_PRESETS, DeviceFrame, FileDiff, FileTree, FileView, FilterSearch, Markdown, Marker, MarkerContent, MarkerIcon, Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader, MessageParts, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerViewport, MultiFileDiff, PatchDiff, PlaygroundRender, PromptInput, RelativeTime, Status, SyncStatus, SyncStatusIndicator, SyncStatusLabel, ToolList, Trace, TraceCollapsible, TraceCollapsibleContent, TraceCollapsibleTrigger, TraceDescription, TraceIcon, TraceLine, TraceRun, TraceTitle, UnresolvedFile, ViteHubUIInjectionKey, calculatePrependScrollTop, chatActivity, commentLeaveMs, createCommentVisibility, createViteHubUI, defaultCommentCan, draftPositionKey, fileToDataUrl, fileToUIPart, getSingularPatch, messagesSinceResolved, parseDiffFromFile, parsePatchFiles, provideComments, provideRelativeNow, repliedSinceResolved, resolveViteHubUIDefaults, uiSdkComponents, useAgentAttachments, useComments, useCommentsContext, useCopy, useFileTree, useFileTreeSelection, useHighlightedCode, useMessageScroller, useViteHubUI, useViteHubUIIcons };
|