@vite-hub/ui 0.6.1 → 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.
- package/README.md +106 -46
- package/dist/AttachmentTitle-BWw0ck0T.js +110 -0
- package/dist/BubbleContent-B1a4e3vE.js +45 -0
- package/dist/Chat-CuSthJVg.js +112 -0
- package/dist/ChatMessage-CFQs0v4N.js +94 -0
- package/dist/CodeBlockContent-BjXJm8lO.js +92 -0
- package/dist/CodeBlockTitle-DIu8Ef3V.js +99 -0
- package/dist/CommentRow-XY3FNp30.js +86 -0
- package/dist/CopyButton-Bs6DT-Z8.js +188 -0
- package/dist/Markdown-Da5t-931.js +70 -0
- package/dist/MarkdownCodeBlock-BWDLOWPO.js +127 -0
- package/dist/MarkdownImage-CJN3myt4.js +111 -0
- package/dist/MessageHeader-CJ9eBHSS.js +61 -0
- package/dist/MessageParts-CyJLG34y.js +57 -0
- package/dist/MessageScrollerViewport-BaTlWLki.js +142 -0
- package/dist/MorphText-B6MWdeIv.js +36 -0
- package/dist/RollNumber-CnF52zJM.js +49 -0
- package/dist/SwapIcon-CUIq1TU5.js +67 -0
- package/dist/TraceTitle-Cp0y7RRD.js +133 -0
- package/dist/agent-session-2j2gbGpp.js +875 -0
- package/dist/agent-session-BwZSMi4S.d.ts +312 -0
- package/dist/appendItems-hQ4aBd9Q.js +4047 -0
- package/dist/attachment-BllgHx9Q.d.ts +124 -0
- package/dist/attachment-DQMJNfj0.js +35 -0
- package/dist/avatar-stack-Bj1xUkzY.d.ts +4 -0
- package/dist/avatar-stack-CoLlsmwJ.js +72 -0
- package/dist/bubble-D3M2_InY.js +32 -0
- package/dist/bubble-DmplVxLr.d.ts +64 -0
- package/dist/chat-DWdyMSuj.d.ts +13 -0
- package/dist/chat-message-QLHnX_ED.d.ts +11 -0
- package/dist/chat-session-BOj5L3Ey.d.ts +29 -0
- package/dist/chat-session-cxUzvwdj.js +43 -0
- package/dist/choices-input-DqgXl5a-.d.ts +97 -0
- package/dist/{vue-d2Td6uu2.js → client-BG-oCUtv-5i4sRwXP.js} +4156 -4156
- package/dist/code-block-BqOEVWPh.d.ts +182 -0
- package/dist/code-block-CMERLfew.js +14 -0
- package/dist/code-view-26RY6dX8.js +137 -0
- package/dist/code-view-D8yYdFUc.d.ts +184 -0
- package/dist/{comment-composer-DmDM3XYP.d.ts → comment-composer-CsVOvG9j.d.ts} +6 -6
- package/dist/{comment-composer-X7vJKh5b.js → comment-composer-D_mcH3Ts.js} +175 -37
- package/dist/{comment-layer-KnnVfdRV.d.ts → comment-layer-C3xmg-0_.d.ts} +14 -5
- package/dist/comment-layer-Ci6ipGi2.js +1206 -0
- package/dist/{comment-panel-DoLDOw3E.d.ts → comment-panel-DxN21VoY.d.ts} +24 -17
- package/dist/comment-selection-bar-B_bchB2O.d.ts +33 -0
- package/dist/comment-selection-bar-DZAtiRZ9.js +144 -0
- package/dist/{comment-thread-DPV2kqA4.d.ts → comment-thread-BmsqcjVQ.d.ts} +9 -8
- package/dist/{comment-thread-jqPx6aJ8.js → comment-thread-BzOZVqF2.js} +74 -49
- package/dist/comments-BU8cTt5o.d.ts +50 -0
- package/dist/{comments-9MDSNm-9.js → comments-BaSrroRV.js} +32 -4
- package/dist/{comments-OWjNidkP.d.ts → comments-ZfV6IZs8.d.ts} +9 -2
- package/dist/components-B_2Q0dJ3.js +269 -0
- package/dist/{config-LRonN53j.js → config-BDQYUjjp.js} +10 -29
- package/dist/{config-COSdO-ay.d.ts → config-JmsTI7gs.d.ts} +20 -33
- package/dist/connection-status-BVSH2ZVo.js +72 -0
- package/dist/connection-status-g62BTn44.d.ts +37 -0
- package/dist/copy-button-CRiXUFsl.d.ts +17 -0
- package/dist/device-frame-BW6IjB6P.d.ts +78 -0
- package/dist/device-frame-DDWoyB-G.js +515 -0
- package/dist/diffs-BTKaVnsb.d.ts +272 -0
- package/dist/diffs.d.ts +3 -0
- package/dist/{pierre-code-view-C49BVDrc.js → diffs.js} +147 -4223
- package/dist/drop-field-C0bXv1J-.d.ts +35 -0
- package/dist/drop-field-DeIvKoJs.js +77 -0
- package/dist/editor-BsOTjnnN.d.ts +540 -0
- package/dist/{markdown-editor-D1irG9Xl.js → editor-hXea1i46.js} +833 -106
- package/dist/editor.d.ts +2 -0
- package/dist/editor.js +3 -0
- package/dist/element-BpjNQvZ0.js +6 -0
- package/dist/{file-tree-CRFIdtzw.js → file-tree-B4JKbp4r.js} +19 -18
- package/dist/{file-tree-DOtkeBaq.d.ts → file-tree-BdnKA6UA.d.ts} +33 -8
- package/dist/file-tree-DDSIafDn.d.ts +22 -0
- package/dist/file-tree-DS5shGSL.js +46 -0
- package/dist/file-tree.d.ts +2 -0
- package/dist/file-tree.js +1 -0
- package/dist/files-cuVXzWlx.js +30 -0
- package/dist/filter-search-C9e6sGij.d.ts +28 -0
- package/dist/filter-search-COZsoRiR.js +73 -0
- package/dist/formatCSSVariablePrefix-DLS1Ed1_.js +5 -0
- package/dist/headless-2IcUWHMq.d.ts +51 -0
- package/dist/headless.d.ts +7 -4
- package/dist/headless.js +5 -3
- package/dist/highlight.d.ts +2 -0
- package/dist/highlight.js +1 -0
- package/dist/{highlights-C2AbEdDI.js → highlights-8Al0-h-v.js} +3 -2
- package/dist/{hold-to-delete-BSMrpE-i.d.ts → hold-to-delete-CQc1JaG_.d.ts} +7 -0
- package/dist/{hold-to-delete-Cludb56v.js → hold-to-delete-D1Vy40w5.js} +138 -20
- package/dist/hold-to-delete-DazElJT2.js +85 -0
- package/dist/hold-to-delete-ksBE7wxc.d.ts +58 -0
- package/dist/index-CffOzibW.d.ts +77 -0
- package/dist/{index-B2cbt3py.d.ts → index-D3-uYBqH.d.ts} +1 -1
- package/dist/index.d.ts +165 -52
- package/dist/index.js +126 -670
- package/dist/markdown-BLALLOc0.d.ts +45 -0
- package/dist/{parts/components/markdown-renderer.d.ts → markdown-DkDxdpMU.d.ts} +10 -7
- package/dist/{markdown-renderer-DMyYKeil.js → markdown-_0HhbsOo.js} +125 -127
- package/dist/markdown-editor.d.ts +51 -98
- package/dist/markdown-editor.js +70 -3
- package/dist/markdown.d.ts +2 -0
- package/dist/markdown.js +1 -0
- package/dist/marker-CvcWZ3Zp.d.ts +59 -0
- package/dist/marker-DNL6QR3L.js +63 -0
- package/dist/message-BwivYIEl.js +13 -0
- package/dist/message-DEq4K5cQ.d.ts +72 -0
- package/dist/message-parts-B1BZFVKe.d.ts +3 -0
- package/dist/message-parts-CG3gNWn8.d.ts +11 -0
- package/dist/message-parts.d.ts +2 -0
- package/dist/message-parts.js +1 -0
- package/dist/message-scroller-D7AvM31v.d.ts +41 -0
- package/dist/motion/core.d.ts +4 -4
- package/dist/motion/core.js +5 -11
- package/dist/motion-BH6ShUam.d.ts +12 -0
- package/dist/{install-C4LwcJda.js → motion-BhARaNBB.js} +1 -1
- package/dist/{effects-C1zYpSpg.js → motion-core-JZZiPKEk.js} +1829 -120
- package/dist/{motion-core-Dh20n5Se.d.ts → motion-core-gfsTPLbh.d.ts} +35 -74
- package/dist/motion-list-9vD1hSS0.js +49 -0
- package/dist/motion.d.ts +5 -14
- package/dist/motion.js +6 -13
- package/dist/nuxt-ui-D3Qda35W.js +22 -0
- package/dist/nuxt.d.ts +9 -5
- package/dist/nuxt.js +28 -33
- package/dist/parts/components/agent-session.d.ts +2 -295
- package/dist/parts/components/agent-session.js +1 -659
- package/dist/parts/components/attachment.d.ts +2 -85
- package/dist/parts/components/attachment.js +3 -72
- package/dist/parts/components/avatar-stack.d.ts +3 -2
- package/dist/parts/components/avatar-stack.js +1 -60
- package/dist/parts/components/bubble.d.ts +2 -69
- package/dist/parts/components/bubble.js +3 -52
- package/dist/parts/components/chat-message.d.ts +3 -25
- package/dist/parts/components/chat-message.js +1 -50
- package/dist/parts/components/chat-session.d.ts +2 -26
- package/dist/parts/components/chat-session.js +1 -37
- package/dist/parts/components/chat.d.ts +3 -52
- package/dist/parts/components/chat.js +1 -105
- package/dist/parts/components/code-block.d.ts +2 -102
- package/dist/parts/components/code-block.js +4 -109
- package/dist/parts/components/code-view.d.ts +3 -268
- package/dist/parts/components/code-view.js +1 -1
- package/dist/parts/components/comment-composer.d.ts +1 -1
- package/dist/parts/components/comment-composer.js +1 -1
- package/dist/parts/components/comment-layer.d.ts +1 -1
- package/dist/parts/components/comment-layer.js +1 -634
- package/dist/parts/components/comment-panel.d.ts +2 -2
- package/dist/parts/components/comment-panel.js +22 -16
- package/dist/parts/components/comment-selection-bar.d.ts +2 -2
- package/dist/parts/components/comment-selection-bar.js +1 -116
- package/dist/parts/components/comment-thread.d.ts +1 -1
- package/dist/parts/components/comment-thread.js +1 -3
- package/dist/parts/components/comments.d.ts +8 -9
- package/dist/parts/components/comments.js +5 -9
- package/dist/parts/components/connection-status.d.ts +2 -36
- package/dist/parts/components/connection-status.js +1 -64
- package/dist/parts/components/copy-button.d.ts +3 -126
- package/dist/parts/components/copy-button.js +1 -226
- package/dist/parts/components/device-frame.d.ts +2 -128
- package/dist/parts/components/device-frame.js +1 -470
- package/dist/parts/components/drop-field.d.ts +2 -67
- package/dist/parts/components/drop-field.js +1 -76
- package/dist/parts/components/file-tree.d.ts +3 -2
- package/dist/parts/components/file-tree.js +3 -1
- package/dist/parts/components/filter-search.d.ts +2 -45
- package/dist/parts/components/filter-search.js +1 -57
- package/dist/parts/components/hold-to-delete.d.ts +2 -80
- package/dist/parts/components/hold-to-delete.js +1 -75
- package/dist/parts/components/markdown.d.ts +3 -45
- package/dist/parts/components/markdown.js +1 -46
- package/dist/parts/components/marker.d.ts +2 -32
- package/dist/parts/components/marker.js +1 -22
- package/dist/parts/components/message-parts.d.ts +3 -25
- package/dist/parts/components/message-parts.js +1 -45
- package/dist/parts/components/message.d.ts +2 -32
- package/dist/parts/components/message.js +3 -22
- package/dist/parts/components/motion-list.d.ts +2 -40
- package/dist/parts/components/motion-list.js +1 -41
- package/dist/parts/components/motion.d.ts +5 -118
- package/dist/parts/components/motion.js +5 -163
- package/dist/parts/components/patch-parsers.d.ts +1 -1
- package/dist/parts/components/progress.d.ts +2 -39
- package/dist/parts/components/progress.js +1 -53
- package/dist/parts/components/prompt-input.d.ts +2 -134
- package/dist/parts/components/prompt-input.js +1 -253
- package/dist/parts/components/relative-time.d.ts +2 -71
- package/dist/parts/components/relative-time.js +1 -1
- package/dist/parts/components/status.d.ts +2 -58
- package/dist/parts/components/status.js +1 -47
- package/dist/parts/components/sync-status.d.ts +2 -22
- package/dist/parts/components/sync-status.js +1 -48
- package/dist/parts/components/tool-list.d.ts +2 -28
- package/dist/parts/components/tool-list.js +1 -118
- package/dist/parts/components/trace-run.d.ts +2 -25
- package/dist/parts/components/trace-run.js +1 -89
- package/dist/parts/components/trace.d.ts +2 -59
- package/dist/parts/components/trace.js +1 -76
- package/dist/parts/composables/attachments.js +75 -1
- package/dist/parts/headless/choices-input.d.ts +2 -2
- package/dist/parts/headless/choices-input.js +49 -37
- package/dist/parts/headless/comments.d.ts +1 -1
- package/dist/parts/headless/comments.js +1 -1
- package/dist/parts/headless/message-scroller.d.ts +2 -2
- package/dist/parts/headless/message-scroller.js +211 -309
- package/dist/parts/headless/relative-time.d.ts +2 -0
- package/dist/parts/headless/relative-time.js +1 -0
- package/dist/parts/workspace/browser-support-notice.d.ts +1 -1
- package/dist/parts/workspace/browser-support-notice.js +6 -5
- package/dist/parts/workspace/connect-panel.js +1 -1
- package/dist/parts/workspace/runners/web-container.js +2 -2
- package/dist/parts/workspace/workspace-bar.d.ts +1 -1
- package/dist/parts/workspace/workspace-bar.js +1 -1
- package/dist/parts/workspace/workspace-boot-status.d.ts +1 -1
- package/dist/parts/workspace/workspace-boot-status.js +1 -206
- package/dist/parts/workspace/workspace-editor-head.d.ts +1 -1
- package/dist/parts/workspace/workspace-editor-head.js +1 -1
- package/dist/parts/workspace/workspace-editor.d.ts +2 -2
- package/dist/parts/workspace/workspace-examples.js +1 -1
- package/dist/parts/workspace/workspace-file-tree.d.ts +1 -1
- package/dist/parts/workspace/workspace-file-tree.js +3 -2
- package/dist/parts/workspace/workspace-guide.d.ts +1 -1
- package/dist/parts/workspace/workspace-guide.js +1 -1
- package/dist/parts/workspace/workspace-preview.d.ts +1 -1
- package/dist/parts/workspace/workspace-preview.js +14 -12
- package/dist/parts/workspace/workspace-shell.d.ts +1 -1
- package/dist/parts/workspace/workspace-shell.js +11 -11
- package/dist/parts/workspace/workspace-sidebar.d.ts +2 -2
- package/dist/parts/workspace/workspace-sidebar.js +2 -2
- package/dist/parts/workspace/workspace-start.d.ts +1 -1
- package/dist/parts/workspace/workspace-start.js +1 -1
- package/dist/parts/workspace/workspace-steps.js +1 -1
- package/dist/parts/workspace/workspace.d.ts +3 -3
- package/dist/parts/workspace/workspace.js +5 -5
- package/dist/press-BuEC-XvZ.d.ts +83 -0
- package/dist/progress-8P8RLYMy.js +47 -0
- package/dist/progress-Ch0fA-bf.d.ts +8 -0
- package/dist/prompt-input-CRXEJBAK.js +412 -0
- package/dist/prompt-input-j4OFTF5p.d.ts +116 -0
- package/dist/relative-time-BnJfjeEm.js +131 -0
- package/dist/relative-time-BuP-Gvzn.d.ts +43 -0
- package/dist/{relative-time-DJnw45tr.js → relative-time-Dz2DR4eb.js} +64 -114
- package/dist/relative-time-grHFu1kY.d.ts +11 -0
- package/dist/{ring-GaJsg32c.js → ring-B0nZBnU0.js} +1 -2
- package/dist/runtime/nuxt-plugin.js +2 -5
- package/dist/{shiki-CbfEu_Az.js → shiki-CxzM_xNo.js} +3 -2
- package/dist/stand-ins-CuKM1UH1.js +339 -0
- package/dist/status-B2Yhrwv8.js +67 -0
- package/dist/status-ySiRa-8O.d.ts +38 -0
- package/dist/{stream-tokenizer-ByC3l0HQ.js → stream-tokenizer-BsjV6wxW.js} +1 -1
- package/dist/styles.css +4348 -3410
- package/dist/sync-status-B29eG_n-.js +59 -0
- package/dist/sync-status-D4KdGO6y.d.ts +35 -0
- package/dist/theme.css +3 -0
- package/dist/theme.d.ts +14 -0
- package/dist/theme.js +19 -8
- package/dist/{themes-DKugPHlg.js → themes-B0_ioVT0.js} +1 -1
- package/dist/tool-list-DDaCqpR6.js +209 -0
- package/dist/tool-list-DMRPM0Yi.d.ts +50 -0
- package/dist/trace-KCBvOsw_.d.ts +113 -0
- package/dist/trace-run-Dk962P5a.d.ts +49 -0
- package/dist/trace-run-nh6FIsl6.js +202 -0
- package/dist/{opt-out-D66l60sg.js → tween-1W-LlKk9.js} +65 -2
- package/dist/types-CMU8Vmew.d.ts +71 -0
- package/dist/types-CTk3aNb5.d.ts +15 -0
- package/dist/types-D0a3i4Fw.d.ts +21 -0
- package/dist/types-DTecvcsZ.d.ts +35 -0
- package/dist/types-D_BWab7g.d.ts +75 -0
- package/dist/types-RHaQ4gj1.d.ts +27 -0
- package/dist/ui-components-CKQAPI-W.js +7 -0
- package/dist/unwrapDefault-CExq-4rm.js +5 -0
- package/dist/utils-hi9-xROt.js +37 -0
- package/dist/vite.d.ts +0 -1
- package/dist/vite.js +8 -14
- package/dist/{vue-vUGpdMct.js → vue-BdA18K5-.js} +1 -1
- package/dist/workspace-boot-status-CyGlJS06.js +216 -0
- package/dist/{workspace-shell-ChCwWPyv.d.ts → workspace-shell-B4A7CINd.d.ts} +1 -1
- package/dist/workspace.d.ts +1 -1
- package/dist/workspace.js +1 -2
- package/package.json +46 -15
- package/dist/announce-B0DLwflT.js +0 -31
- package/dist/attachments-DgwoQZKY.js +0 -88
- package/dist/avatar-stack-C0IKwj6g.d.ts +0 -57
- package/dist/choices-input-BUf-QqGj.d.ts +0 -92
- package/dist/code-view-Cg4nyTNA.js +0 -172
- package/dist/comment-attachments-DAzUbRmJ.js +0 -23
- package/dist/comment-list-ncwaCSVX.d.ts +0 -60
- package/dist/comment-person-D_IyIjXo.js +0 -39
- package/dist/comment-pin-hBJFiSYW.d.ts +0 -66
- package/dist/comment-row-DPMWI5Z0.js +0 -38
- package/dist/comment-selection-bar-CVuS-FNL.d.ts +0 -40
- package/dist/comment-send-CUkL3TbZ.js +0 -275
- package/dist/comment-send-MmxFsOQf.d.ts +0 -23
- package/dist/comment-send.css +0 -267
- package/dist/comment-status-nsCdrRk_.js +0 -20
- package/dist/drop-field-CNZgwFVO.js +0 -162
- package/dist/editor-Dmk3k6f6.js +0 -620
- package/dist/format-CPipR1FP.js +0 -19
- package/dist/handlers-CnbkvXjX.js +0 -181
- package/dist/icon-XZaCUZTG.d.ts +0 -29
- package/dist/image-preview-BKVUtfwQ.js +0 -104
- package/dist/index-B_PSX-5h.d.ts +0 -69
- package/dist/list-DUTAo0uC.js +0 -270
- package/dist/markdown-editor-B7gD60tp.d.ts +0 -189
- package/dist/message-scroller-BZqS63IX.d.ts +0 -173
- package/dist/nuxt-ui-7ByUrymx.js +0 -43
- package/dist/parts/components/comment-list.d.ts +0 -2
- package/dist/parts/components/comment-list.js +0 -173
- package/dist/parts/components/comment-pin.d.ts +0 -2
- package/dist/parts/components/comment-pin.js +0 -74
- package/dist/parts/components/comment-send.d.ts +0 -2
- package/dist/parts/components/comment-send.js +0 -1
- package/dist/parts/components/markdown-editor.d.ts +0 -2
- package/dist/parts/components/markdown-editor.js +0 -1
- package/dist/parts/components/markdown-renderer.js +0 -1
- package/dist/payload-text-DQNRbJY5.js +0 -31
- package/dist/progress-DL9k-ERG.js +0 -265
- package/dist/registry-DAIjCjWd.js +0 -77
- package/dist/slot-part-BWHvQ3mK.js +0 -25
- package/dist/text-gacox6bp.js +0 -822
- package/dist/travel-BliEidau.js +0 -180
- package/dist/tween-Dv3IIIQG.js +0 -61
- package/dist/types-Ceh7h7NT.d.ts +0 -31
- package/dist/visual-copy-CHHBfJ6O.js +0 -14
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { a as MotionEffect, s as MotionRoot } from "./press-BuEC-XvZ.js";
|
|
1
2
|
type ReducedMotionListener = (reduced: boolean) => void;
|
|
2
3
|
/**
|
|
3
4
|
* True when the person asked for less motion. It follows the system setting live. Under it, nothing travels,
|
|
@@ -11,77 +12,6 @@ declare function onReducedMotionChange(listener: ReducedMotionListener): () => v
|
|
|
11
12
|
* follows the system setting again.
|
|
12
13
|
*/
|
|
13
14
|
declare function forceReducedMotion(reduced: boolean | undefined): void;
|
|
14
|
-
/** The attributes whose change the motion layer reports to the `state` hook of an effect. */
|
|
15
|
-
declare const motionStateAttributes: readonly ["aria-checked", "aria-selected", "aria-pressed", "aria-expanded", "aria-valuenow", "aria-valuetext", "data-state", "data-checked", "data-open", "open", "data-leaving"];
|
|
16
|
-
type MotionStateAttribute = (typeof motionStateAttributes)[number];
|
|
17
|
-
type MotionRoot = Document | ShadowRoot | Element;
|
|
18
|
-
interface MotionStateChange {
|
|
19
|
-
attribute: MotionStateAttribute;
|
|
20
|
-
oldValue: string | null;
|
|
21
|
-
value: string | null;
|
|
22
|
-
}
|
|
23
|
-
/** The children or the text of an element changed, such as Vue writing the new label of a button. */
|
|
24
|
-
interface MotionContentChange {
|
|
25
|
-
/** The nodes that the change added, in order. */
|
|
26
|
-
added: Node[];
|
|
27
|
-
/** The nodes that the change removed, in order. */
|
|
28
|
-
removed: Node[];
|
|
29
|
-
/** The text before the change, when the change replaced all of it. */
|
|
30
|
-
oldText: string | undefined;
|
|
31
|
-
}
|
|
32
|
-
/** What a press does next. The motion layer calls it until the pointer or the key goes up. */
|
|
33
|
-
interface MotionPress {
|
|
34
|
-
/** The pointer moved while it was down, such as on a resize handle. Not called for a key press. */
|
|
35
|
-
move?(event: PointerEvent): void;
|
|
36
|
-
/** The pointer or the key went up. Also called on cancellation if there is no `cancel` hook. */
|
|
37
|
-
release(): void;
|
|
38
|
-
/** The pointer left, the press was interrupted, or reduced motion turned on. */
|
|
39
|
-
cancel?(): void;
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* One effect of the motion layer, for one interaction. The layer finds the element of the interaction by `selector`,
|
|
43
|
-
* walks the composed path so it also finds elements in shadow DOM, and skips everything inside `[data-motion="none"]`.
|
|
44
|
-
*
|
|
45
|
-
* An effect writes only the separate CSS properties `scale`, `translate`, and `rotate`, and `filter` or `opacity` where
|
|
46
|
-
* it needs them, through `writeMotionStyle`, so it adds to a component's own `transform`. It clears what it wrote when
|
|
47
|
-
* its spring settles.
|
|
48
|
-
*/
|
|
49
|
-
interface MotionEffect {
|
|
50
|
-
/** A unique name, such as "press". Defining an effect with a name that exists replaces it. */
|
|
51
|
-
name: string;
|
|
52
|
-
/** The elements of the interaction, such as `[role=tab]`. The innermost element on the event path wins. */
|
|
53
|
-
selector: string;
|
|
54
|
-
/** Starts tracking state in an installed root and returns its cleanup. */
|
|
55
|
-
watch?(root: MotionRoot): () => void;
|
|
56
|
-
/**
|
|
57
|
-
* A pointer went down on the element (main button only), or Space or Enter went down while it had focus. Return a
|
|
58
|
-
* `MotionPress` to hear the rest of the press. Not called under reduced motion.
|
|
59
|
-
*/
|
|
60
|
-
press?(element: HTMLElement, event: PointerEvent | KeyboardEvent): MotionPress | void;
|
|
61
|
-
/** One of `motionStateAttributes` changed on the element. Also called under reduced motion: keep the meaning. */
|
|
62
|
-
state?(element: HTMLElement, change: MotionStateChange): void;
|
|
63
|
-
/** The element was added to the page, such as a tooltip. Also called under reduced motion: keep the meaning. */
|
|
64
|
-
enter?(element: HTMLElement): void;
|
|
65
|
-
/**
|
|
66
|
-
* The children or the text of the element changed, such as the label or the icon of a button. Also called under
|
|
67
|
-
* reduced motion, and for the changes that effects make themselves: tell them apart by `added`.
|
|
68
|
-
*/
|
|
69
|
-
content?(element: HTMLElement | SVGElement, change: MotionContentChange): void;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Adds an effect to the motion layer. Every installed layer runs it from the next interaction on. Returns a function
|
|
73
|
-
* that removes it. When another copy of the module is the shared layer, the effect goes to that copy.
|
|
74
|
-
*/
|
|
75
|
-
declare function defineMotionEffect(effect: MotionEffect): () => void;
|
|
76
|
-
/** The effects of the motion layer, in the order they were defined. */
|
|
77
|
-
declare function listMotionEffects(): MotionEffect[];
|
|
78
|
-
/**
|
|
79
|
-
* The CSS properties that the motion layer may write. `clip-path` hides the part of a tooltip that is still behind its
|
|
80
|
-
* trigger. `width` is only for a panel that opens beside the page, as a sidebar does.
|
|
81
|
-
*/
|
|
82
|
-
type MotionStyleProperty = "scale" | "translate" | "rotate" | "filter" | "opacity" | "clip-path" | "width";
|
|
83
|
-
/** Writes motion properties inline. An empty string or `null` removes the property, so the stylesheet applies again. */
|
|
84
|
-
declare function writeMotionStyle(element: HTMLElement | SVGElement, values: Partial<Record<MotionStyleProperty, string | null>>): void;
|
|
85
15
|
declare function isMotionOff(element: Element): boolean;
|
|
86
16
|
/** What `installMotion` of `@vite-hub/ui/motion/core` runs. */
|
|
87
17
|
interface InstallMotionOptions {
|
|
@@ -141,7 +71,6 @@ declare const buttonIcon: MotionEffect;
|
|
|
141
71
|
*/
|
|
142
72
|
declare const leave: MotionEffect;
|
|
143
73
|
declare const panel: MotionEffect;
|
|
144
|
-
declare const press: MotionEffect;
|
|
145
74
|
declare const select: MotionEffect;
|
|
146
75
|
/**
|
|
147
76
|
* Drag a value (docs/design/motion.md): a slider thumb from Nuxt UI `USlider`, Reka, ui-sdk and kit, or a plain
|
|
@@ -186,11 +115,15 @@ interface SpringPreset {
|
|
|
186
115
|
}
|
|
187
116
|
/** The named springs of docs/design/motion.md. Use them, not numbers of your own. */
|
|
188
117
|
declare const springs: {
|
|
189
|
-
/** Moves and resizes:
|
|
118
|
+
/** Moves and resizes: a toast, a list row, a width that follows its label. `glide` moves a selection with no overshoot. */
|
|
190
119
|
readonly snappy: {
|
|
191
120
|
readonly stiffness: 520;
|
|
192
121
|
readonly damping: 34;
|
|
193
122
|
};
|
|
123
|
+
readonly glide: {
|
|
124
|
+
readonly stiffness: 800;
|
|
125
|
+
readonly damping: 57;
|
|
126
|
+
};
|
|
194
127
|
/** Wobbles and settles: a toggled icon, a knob that lands. */
|
|
195
128
|
readonly soft: {
|
|
196
129
|
readonly stiffness: 380;
|
|
@@ -245,6 +178,34 @@ declare function createSpring(initial: number, onFrame: SpringFrame, preset?: Sp
|
|
|
245
178
|
* Give it an element of its own with no padding, such as the label `<span>` of a button.
|
|
246
179
|
*/
|
|
247
180
|
declare function morphText(element: HTMLElement, text: string): void;
|
|
181
|
+
/** How the old icon leaves: it blurs out, or, for an arrow, it leaves in the direction that it points. */
|
|
182
|
+
type IconExit = "blur" | "left" | "right" | "up" | "down";
|
|
183
|
+
/**
|
|
184
|
+
* How the new icon comes in: it blurs in, it draws its stroke (a spinner, a check), or it slides in, moving in the
|
|
185
|
+
* direction given, as an arrow that comes back.
|
|
186
|
+
*/
|
|
187
|
+
type IconEnter = "blur" | "draw" | "left" | "right" | "up" | "down";
|
|
188
|
+
interface SwapIconOptions {
|
|
189
|
+
/** Default: `"blur"`. */
|
|
190
|
+
exit?: IconExit;
|
|
191
|
+
/** Default: `"draw"` for a spinning icon (`animate-spin`), else `"blur"`. */
|
|
192
|
+
enter?: IconEnter;
|
|
193
|
+
/**
|
|
194
|
+
* Called for each old icon when it has left, in place of `icon.remove()`, for a container whose children a framework
|
|
195
|
+
* renders. Vue removes the icon from its own list.
|
|
196
|
+
*/
|
|
197
|
+
onRemove?: (icon: Element) => void;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* Swaps the icon in `container` for `icon`, as rule 5 of docs/design/motion.md asks: the old icon blurs out, or leaves in
|
|
201
|
+
* the direction it points, while the new one comes in, and a spinner or a check draws its stroke. `icon` may already be
|
|
202
|
+
* a child of `container`, as when a framework renders it; else the helper appends it. Every other icon in the container
|
|
203
|
+
* leaves, and is removed when it is gone.
|
|
204
|
+
*
|
|
205
|
+
* Call it again at any time: an icon that is still coming in leaves from where it is. Under reduced motion the icons
|
|
206
|
+
* crossfade in 150ms. Inside `data-motion="none"` the old icons go at once.
|
|
207
|
+
*/
|
|
208
|
+
declare function swapIcon(container: HTMLElement, icon: Element, options?: SwapIconOptions): void;
|
|
248
209
|
/**
|
|
249
210
|
* Rolls the number in `element` to `value`, as rule 6 of docs/design/motion.md asks: only the digits that change roll,
|
|
250
211
|
* up when the number grows and down when it shrinks. The width of the element follows with a spring. `format` turns the
|
|
@@ -400,4 +361,4 @@ interface DropField {
|
|
|
400
361
|
* the dots stay still; `data-over` still marks the field, so its colors change.
|
|
401
362
|
*/
|
|
402
363
|
declare function createDropField(field: HTMLElement, options?: DropFieldOptions): DropField;
|
|
403
|
-
export {
|
|
364
|
+
export { prefersReducedMotion as $, getMotionSlowFactor as A, leave as B, swapIcon as C, SpringPreset as D, SpringFrame as E, toast as F, disclosure as G, label as H, switchKnob as I, InstallMotionOptions as J, check as K, slider as L, springs as M, appear as N, SpringTarget as O, tooltip as P, onReducedMotionChange as Q, select as R, SwapIconOptions as S, Spring as T, jelly as U, buttonIcon as V, divider as W, isMotionOff as X, installMotion as Y, forceReducedMotion as Z, shake as _, ProgressOptions as a, IconEnter as b, MotionList as c, MotionListPlay as d, createMotionList as f, travel as g, TravelOptions as h, Progress as i, setMotionSlowFactor as j, createSpring as k, MotionListOptions as l, TravelBox as m, DropFieldOptions as n, ProgressPhase as o, Travel as p, motionEffects as q, createDropField as r, createProgress as s, DropField as t, MotionListOrigin as u, ring as v, morphText as w, IconExit as x, rollNumber as y, panel as z };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { r as createMotionList } from "./motion-core-JZZiPKEk.js";
|
|
2
|
+
import { t as elementOf } from "./element-BpjNQvZ0.js";
|
|
3
|
+
import { Fragment, createElementVNode, defineComponent, h, mergeProps, onBeforeUnmount, onBeforeUpdate, onUpdated, renderSlot, useSlots } from "vue";
|
|
4
|
+
// registry/motion/MotionList.vue
|
|
5
|
+
var MotionList_default = /* @__PURE__ */ defineComponent({
|
|
6
|
+
inheritAttrs: false,
|
|
7
|
+
__name: "MotionList",
|
|
8
|
+
props: {
|
|
9
|
+
origin: { type: Function },
|
|
10
|
+
target: { type: Function }
|
|
11
|
+
},
|
|
12
|
+
setup(__props) {
|
|
13
|
+
const slots = useSlots();
|
|
14
|
+
let root;
|
|
15
|
+
let list;
|
|
16
|
+
function setRoot(value) {
|
|
17
|
+
const next = elementOf(value);
|
|
18
|
+
if (next === root) return;
|
|
19
|
+
list?.destroy();
|
|
20
|
+
root = next;
|
|
21
|
+
list = next ? createMotionList(next) : void 0;
|
|
22
|
+
}
|
|
23
|
+
onBeforeUpdate(() => list?.measure());
|
|
24
|
+
onUpdated(() => list?.play({
|
|
25
|
+
origin: __props.origin,
|
|
26
|
+
target: __props.target?.()
|
|
27
|
+
}));
|
|
28
|
+
onBeforeUnmount(() => {
|
|
29
|
+
list?.destroy();
|
|
30
|
+
list = void 0;
|
|
31
|
+
root = void 0;
|
|
32
|
+
});
|
|
33
|
+
const items = () => h(Fragment, slots.default?.());
|
|
34
|
+
return (_ctx, _cache) => {
|
|
35
|
+
return renderSlot(_ctx.$slots, "render", {
|
|
36
|
+
props: {
|
|
37
|
+
..._ctx.$attrs,
|
|
38
|
+
"data-slot": "motion-list",
|
|
39
|
+
ref: setRoot
|
|
40
|
+
},
|
|
41
|
+
children: items()
|
|
42
|
+
}, () => [createElementVNode("div", mergeProps(_ctx.$attrs, {
|
|
43
|
+
ref: setRoot,
|
|
44
|
+
"data-slot": "motion-list"
|
|
45
|
+
}), [renderSlot(_ctx.$slots, "default")], 16)]);
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
export { MotionList_default as t };
|
package/dist/motion.d.ts
CHANGED
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as
|
|
3
|
-
import { i as
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
* by its role, in `root`: the document by default, a shadow root, or an element and everything in it. `createViteHubUI()`
|
|
7
|
-
* and the Nuxt module call it for the document. A surface with its own bundle, such as the page pill, takes
|
|
8
|
-
* `installMotion` from `@vite-hub/ui/motion/core` instead and lists the effects it runs, so the others stay out of its
|
|
9
|
-
* bundle.
|
|
10
|
-
*
|
|
11
|
-
* It is safe to call more than once. Returns a function that stops this install. On the server it does nothing.
|
|
12
|
-
*/
|
|
13
|
-
export declare function installMotion(root?: MotionRoot): () => void;
|
|
14
|
-
export { type DropField, type DropFieldOptions, type HoldToDelete, type HoldToDeleteOptions, type HoldToDeleteState, type IconEnter, type IconExit, type InstallMotionOptions, type MotionContentChange, type MotionEffect, type MotionList, type MotionListOptions, type MotionListOrigin, type MotionListPlay, type MotionPress, type MotionRoot, type MotionStateAttribute, type MotionStateChange, type MotionStyleProperty, type Progress, type ProgressOptions, type ProgressPhase, type Spring, type SpringFrame, type SpringPreset, type SpringTarget, type SwapIconOptions, type Travel, type TravelBox, type TravelOptions, appear as appearEffect, buttonIcon as buttonIconEffect, check as checkEffect, createDropField, createHoldToDelete, createMotionList, createProgress, createSpring, defineMotionEffect, disclosure as disclosureEffect, divider as dividerEffect, forceReducedMotion, getMotionSlowFactor, isMotionOff, jelly as jellyEffect, label as labelEffect, leave as leaveEffect, listMotionEffects, morphText, motionEffects, motionStateAttributes, onReducedMotionChange, panel as panelEffect, prefersReducedMotion, press as pressEffect, ring, rollNumber, select as selectEffect, setMotionSlowFactor, shake, slider as sliderEffect, springs, swapIcon, switchKnob as switchEffect, toast as toastEffect, tooltip as tooltipEffect, travel, writeMotionStyle };
|
|
1
|
+
import { i as createHoldToDelete, n as HoldToDeleteOptions, r as HoldToDeleteState, t as HoldToDelete } from "./hold-to-delete-CQc1JaG_.js";
|
|
2
|
+
import { $ as prefersReducedMotion, A as getMotionSlowFactor, B as leave, C as swapIcon, D as SpringPreset, E as SpringFrame, F as toast, G as disclosure, H as label, I as switchKnob, J as InstallMotionOptions, K as check, L as slider, M as springs, N as appear, O as SpringTarget, P as tooltip, Q as onReducedMotionChange, R as select, S as SwapIconOptions, T as Spring, U as jelly, V as buttonIcon, W as divider, X as isMotionOff, Z as forceReducedMotion, _ as shake, a as ProgressOptions, b as IconEnter, c as MotionList, d as MotionListPlay, f as createMotionList, g as travel, h as TravelOptions, i as Progress, j as setMotionSlowFactor, k as createSpring, l as MotionListOptions, m as TravelBox, n as DropFieldOptions, o as ProgressPhase, p as Travel, q as motionEffects, r as createDropField, s as createProgress, t as DropField, u as MotionListOrigin, v as ring, w as morphText, x as IconExit, y as rollNumber, z as panel } from "./motion-core-gfsTPLbh.js";
|
|
3
|
+
import { a as MotionEffect, c as MotionStateAttribute, d as defineMotionEffect, f as listMotionEffects, i as MotionContentChange, l as MotionStateChange, m as writeMotionStyle, n as press, o as MotionPress, p as motionStateAttributes, r as setMotionPressMode, s as MotionRoot, t as MotionPressMode, u as MotionStyleProperty } from "./press-BuEC-XvZ.js";
|
|
4
|
+
import { t as installMotion } from "./motion-BH6ShUam.js";
|
|
5
|
+
export { type DropField, type DropFieldOptions, type HoldToDelete, type HoldToDeleteOptions, type HoldToDeleteState, type IconEnter, type IconExit, type InstallMotionOptions, type MotionContentChange, type MotionEffect, type MotionList, type MotionListOptions, type MotionListOrigin, type MotionListPlay, type MotionPress, type MotionPressMode, type MotionRoot, type MotionStateAttribute, type MotionStateChange, type MotionStyleProperty, type Progress, type ProgressOptions, type ProgressPhase, type Spring, type SpringFrame, type SpringPreset, type SpringTarget, type SwapIconOptions, type Travel, type TravelBox, type TravelOptions, appear as appearEffect, buttonIcon as buttonIconEffect, check as checkEffect, createDropField, createHoldToDelete, createMotionList, createProgress, createSpring, defineMotionEffect, disclosure as disclosureEffect, divider as dividerEffect, forceReducedMotion, getMotionSlowFactor, installMotion, isMotionOff, jelly as jellyEffect, label as labelEffect, leave as leaveEffect, listMotionEffects, morphText, motionEffects, motionStateAttributes, onReducedMotionChange, panel as panelEffect, prefersReducedMotion, press as pressEffect, ring, rollNumber, select as selectEffect, setMotionPressMode, setMotionSlowFactor, shake, slider as sliderEffect, springs, swapIcon, switchKnob as switchEffect, toast as toastEffect, tooltip as tooltipEffect, travel, writeMotionStyle };
|
package/dist/motion.js
CHANGED
|
@@ -1,13 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
4
|
-
import { t as
|
|
5
|
-
import { t as
|
|
6
|
-
|
|
7
|
-
import { a as listMotionEffects, n as defineMotionEffect, s as motionStateAttributes, u as writeMotionStyle } from "./registry-DAIjCjWd.js";
|
|
8
|
-
import { a as rollNumber, i as morphText, l as swapIcon } from "./text-gacox6bp.js";
|
|
9
|
-
import { t as ring } from "./ring-GaJsg32c.js";
|
|
10
|
-
import { n as shake, t as travel } from "./travel-BliEidau.js";
|
|
11
|
-
import { t as installMotion } from "./install-C4LwcJda.js";
|
|
12
|
-
import "./motion/core.js";
|
|
13
|
-
export { appear as appearEffect, buttonIcon as buttonIconEffect, check as checkEffect, createDropField, createHoldToDelete, createMotionList, createProgress, createSpring, defineMotionEffect, disclosure as disclosureEffect, divider as dividerEffect, forceReducedMotion, getMotionSlowFactor, installMotion, isMotionOff, jelly as jellyEffect, label as labelEffect, leave as leaveEffect, listMotionEffects, morphText, motionEffects, motionStateAttributes, onReducedMotionChange, panel as panelEffect, prefersReducedMotion, press as pressEffect, ring, rollNumber, select as selectEffect, setMotionSlowFactor, shake, slider as sliderEffect, springs, swapIcon, switchKnob as switchEffect, toast as toastEffect, tooltip as tooltipEffect, travel, writeMotionStyle };
|
|
1
|
+
import { f as writeMotionStyle, i as defineMotionEffect, l as motionStateAttributes, s as listMotionEffects, t as createHoldToDelete } from "./hold-to-delete-D1Vy40w5.js";
|
|
2
|
+
import { c as createSpring, d as setMotionSlowFactor, f as springs, h as prefersReducedMotion, l as getMotionSlowFactor, m as onReducedMotionChange, o as isMotionOff, p as forceReducedMotion } from "./tween-1W-LlKk9.js";
|
|
3
|
+
import { C as disclosure, E as divider, S as jelly, _ as leave, a as shake, b as morphText, c as appear, d as switchKnob, f as slider, g as panel, h as setMotionPressMode, i as travel, l as tooltip, m as press, n as createProgress, o as rollNumber, p as select, r as createMotionList, s as motionEffects, t as createDropField, u as toast, v as buttonIcon, w as check, x as swapIcon, y as label } from "./motion-core-JZZiPKEk.js";
|
|
4
|
+
import { t as ring } from "./ring-B0nZBnU0.js";
|
|
5
|
+
import { t as installMotion } from "./motion-BhARaNBB.js";
|
|
6
|
+
export { appear as appearEffect, buttonIcon as buttonIconEffect, check as checkEffect, createDropField, createHoldToDelete, createMotionList, createProgress, createSpring, defineMotionEffect, disclosure as disclosureEffect, divider as dividerEffect, forceReducedMotion, getMotionSlowFactor, installMotion, isMotionOff, jelly as jellyEffect, label as labelEffect, leave as leaveEffect, listMotionEffects, morphText, motionEffects, motionStateAttributes, onReducedMotionChange, panel as panelEffect, prefersReducedMotion, press as pressEffect, ring, rollNumber, select as selectEffect, setMotionPressMode, setMotionSlowFactor, shake, slider as sliderEffect, springs, swapIcon, switchKnob as switchEffect, toast as toastEffect, tooltip as tooltipEffect, travel, writeMotionStyle };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { n as useUIComponentOverride } from "./ui-components-CKQAPI-W.js";
|
|
2
|
+
import { defineAsyncComponent } from "vue";
|
|
3
|
+
// src/internal/nuxt-ui.ts
|
|
4
|
+
function uiSdk(name) {
|
|
5
|
+
return defineAsyncComponent({
|
|
6
|
+
loader: () => import("./components-B_2Q0dJ3.js").then((n) => n.t).then((parts) => parts.uiSdkComponents[name]),
|
|
7
|
+
suspensible: false
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
const defaults = /* @__PURE__ */ new Map();
|
|
11
|
+
/**
|
|
12
|
+
* The component that a part renders for `name`: the one given to `createViteHubUI({ components })`, else one that the
|
|
13
|
+
* app registered globally under that name, else the ui-sdk one from `uiSdkComponents`. Call it in `setup()`.
|
|
14
|
+
*/
|
|
15
|
+
function useUIComponent(name) {
|
|
16
|
+
const own = useUIComponentOverride(name);
|
|
17
|
+
if (own) return own;
|
|
18
|
+
const component = defaults.get(name) ?? uiSdk(name);
|
|
19
|
+
defaults.set(name, component);
|
|
20
|
+
return component;
|
|
21
|
+
}
|
|
22
|
+
export { useUIComponent as t };
|
package/dist/nuxt.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as ViteHubUIOptions, t as ViteHubUIIconOptions } from "./config-JmsTI7gs.js";
|
|
2
2
|
/** Name of an icon in the ViteHub set, such as `kv` for `i-vitehub-kv`. */
|
|
3
|
-
type ViteHubIconName = "agent" | "auth" | "blob" | "browser" | "bundle" | "cache" | "channels" | "choices" | "cli" | "cms" | "codemods" | "comments" | "compare" | "connections" | "console" | "content" | "database" | "development" | "device" | "docs" | "email" | "env" | "forge" | "forms" | "gateways" | "guides" | "hosts" | "i18n" | "kv" | "logs" | "markdown-template" | "mcp" | "presets" | "queue" | "rate-limit" | "realtime" | "reference" | "runtime" | "sandbox" | "schedule" | "shell" | "skills" | "source" | "start" | "sync" | "ui" | "usage" | "web-container" | "webhooks" | "workflow" | "workspace";
|
|
3
|
+
type ViteHubIconName = "agent" | "auth" | "blob" | "browser" | "bundle" | "cache" | "channels" | "choices" | "cli" | "cms" | "codemods" | "comments" | "compare" | "connections" | "console" | "content" | "database" | "development" | "device" | "docs" | "email" | "env" | "forge" | "forms" | "gateways" | "guides" | "hosts" | "i18n" | "kv" | "logs" | "markdown-template" | "mcp" | "presets" | "queue" | "rate-limit" | "realtime" | "reference" | "runtime" | "sandbox" | "schedule" | "shell" | "site" | "skills" | "source" | "start" | "sync" | "ui" | "usage" | "web-container" | "webhooks" | "workflow" | "workspace";
|
|
4
4
|
/** The ViteHub icon set in the Iconify JSON format, as `@iconify-json/*` packages export it. */
|
|
5
5
|
interface ViteHubIconSet {
|
|
6
6
|
prefix: "vitehub";
|
|
@@ -53,6 +53,9 @@ type ViteAliasOptions = readonly {
|
|
|
53
53
|
/** The parts of a Nuxt instance that `addViteHubUIRuntime()` uses. */
|
|
54
54
|
export interface ViteHubUIRuntimeNuxt {
|
|
55
55
|
options: {
|
|
56
|
+
build: {
|
|
57
|
+
transpile: Array<string | RegExp | ((context: never) => unknown)>;
|
|
58
|
+
};
|
|
56
59
|
plugins: Array<string | {
|
|
57
60
|
src: string;
|
|
58
61
|
}>;
|
|
@@ -65,10 +68,11 @@ export interface ViteHubUIRuntimeNuxt {
|
|
|
65
68
|
hook: (name: "icon:clientBundleIcons", callback: (icons: Set<string>) => void) => unknown;
|
|
66
69
|
}
|
|
67
70
|
/**
|
|
68
|
-
* Adds what the styled parts need at runtime in a Nuxt app: the plugin that gives them
|
|
71
|
+
* Adds what the styled parts need at runtime in a Nuxt app: the plugin that gives them their icon names, their
|
|
69
72
|
* icons in the `@nuxt/icon` client bundle, because `@nuxt/icon` does not scan dependencies, and Shiki's WebAssembly as a
|
|
70
|
-
* module the server build can bundle. The
|
|
71
|
-
*
|
|
73
|
+
* module the server build can bundle. The plugin imports `#app`, which only Nuxt's bundler resolves, so the package is
|
|
74
|
+
* transpiled: Node cannot load the plugin from `node_modules` during server rendering. The module calls it, and so does
|
|
75
|
+
* `vite-hub/nuxt` when the app installed this package. It is safe to call twice.
|
|
72
76
|
*/
|
|
73
77
|
export declare function addViteHubUIRuntime(nuxt: ViteHubUIRuntimeNuxt): void;
|
|
74
78
|
/**
|
package/dist/nuxt.js
CHANGED
|
@@ -5,7 +5,7 @@ const icons = {
|
|
|
5
5
|
"prefix": "vitehub",
|
|
6
6
|
"info": {
|
|
7
7
|
"name": "ViteHub",
|
|
8
|
-
"total":
|
|
8
|
+
"total": 52,
|
|
9
9
|
"author": {
|
|
10
10
|
"name": "ViteHub",
|
|
11
11
|
"url": "https://github.com/vite-hub/vitehub/tree/main/packages/icons"
|
|
@@ -61,6 +61,7 @@ const icons = {
|
|
|
61
61
|
"sandbox": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M3 8V5a2 2 0 0 1 2-2h3M16 3h3a2 2 0 0 1 2 2v3M21 16v3a2 2 0 0 1-2 2h-3M8 21H5a2 2 0 0 1-2-2v-3\"/><g data-motion=\"\"><rect x=\"8\" y=\"8\" width=\"8\" height=\"8\" rx=\"1.5\"/></g></g>" },
|
|
62
62
|
"schedule": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><rect x=\"3\" y=\"5\" width=\"18\" height=\"16\" rx=\"2\"/><path d=\"M3 10h18M8 3v4M16 3v4\"/><g data-motion=\"\"><rect x=\"7\" y=\"13.5\" width=\"3.5\" height=\"3.5\" rx=\"1\"/></g></g>" },
|
|
63
63
|
"shell": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><rect x=\"3\" y=\"4\" width=\"18\" height=\"16\" rx=\"2\"/><path d=\"m7 9.5 3 2.5-3 2.5\"/><g data-motion=\"\"><path d=\"M12.5 15h4.5\"/></g></g>" },
|
|
64
|
+
"site": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M11 5a8 8 0 1 0 8 8M3 13h16M11 5a12 12 0 0 0 0 16 12 12 0 0 0 0-16\"/><rect x=\"15.5\" y=\"6\" width=\"5.5\" height=\"4.5\" rx=\"1\"/><g data-motion=\"\"><path d=\"M17 6V4.75a1.25 1.25 0 0 1 2.5 0V6\"/></g></g>" },
|
|
64
65
|
"skills": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M5 19V5a2 2 0 0 1 2-2h12v14H7a2 2 0 0 0 0 4h12\"/><g data-motion=\"\"><path d=\"M10 3v6.5l2-1.5 2 1.5V3\"/></g></g>" },
|
|
65
66
|
"source": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M3 14v5a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-5\"/><g data-motion=\"\"><path d=\"M12 3v11.5M8 10.5l4 4 4-4\"/></g></g>" },
|
|
66
67
|
"start": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M5 21V3.5\"/><g data-motion=\"\"><path d=\"M5 4h13l-3 4.5 3 4.5H5\"/></g></g>" },
|
|
@@ -68,7 +69,7 @@ const icons = {
|
|
|
68
69
|
"ui": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><rect x=\"3.5\" y=\"3.5\" width=\"7\" height=\"7\" rx=\"1.5\"/><rect x=\"13.5\" y=\"3.5\" width=\"7\" height=\"7\" rx=\"1.5\"/><rect x=\"3.5\" y=\"13.5\" width=\"7\" height=\"7\" rx=\"1.5\"/><g data-motion=\"\"><rect x=\"13.5\" y=\"13.5\" width=\"7\" height=\"7\" rx=\"1.5\"/></g></g>" },
|
|
69
70
|
"usage": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M3 20.5h18\"/><g data-motion=\"\"><rect x=\"5\" y=\"11\" width=\"3\" height=\"6\" rx=\"0.5\"/><rect x=\"10.5\" y=\"5\" width=\"3\" height=\"12\" rx=\"0.5\"/><rect x=\"16\" y=\"8\" width=\"3\" height=\"9\" rx=\"0.5\"/></g></g>" },
|
|
70
71
|
"web-container": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><rect x=\"3\" y=\"4\" width=\"18\" height=\"16\" rx=\"2\"/><path d=\"M3 8.5h18\"/><g data-motion=\"\"><path d=\"m12 11 3.5 2v3.5L12 18.5l-3.5-2V13zM8.5 13l3.5 2 3.5-2M12 15v3.5\"/></g></g>" },
|
|
71
|
-
"webhooks": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"
|
|
72
|
+
"webhooks": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M17.4 16.48h-5.39c-.99 0-1.76.85-2.23 1.71A3.6 3.6 0 0 1 3 16.5c.01-.63.18-1.26.51-1.8\"/><path d=\"M6.6 16.5l2.82-5.2c.48-.87.09-1.96-.45-2.79a3.6 3.6 0 1 1 6.2-3.65\"/><g data-motion=\"\"><path d=\"M12 6.6l2.82 5.16C15.29 12.63 16.41 12.9 17.4 12.9a3.6 3.6 0 0 1 0 7.2\"/></g></g>" },
|
|
72
73
|
"workflow": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><rect x=\"3\" y=\"3\" width=\"6\" height=\"6\" rx=\"1.5\"/><rect x=\"3\" y=\"15\" width=\"6\" height=\"6\" rx=\"1.5\"/><path d=\"M9 6h2.5a1 1 0 0 1 1 1v10a1 1 0 0 1-1 1H9M12.5 12H15\"/><g data-motion=\"\"><rect x=\"15\" y=\"9\" width=\"6\" height=\"6\" rx=\"1.5\"/></g></g>" },
|
|
73
74
|
"workspace": { "body": "<g fill=\"none\" stroke=\"currentColor\" stroke-linecap=\"round\" stroke-linejoin=\"round\" stroke-width=\"1.5\"><path d=\"M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z\"/><g data-motion=\"\"><path d=\"M3 11h18\"/></g></g>" }
|
|
74
75
|
},
|
|
@@ -114,7 +115,6 @@ const partFamilies = {
|
|
|
114
115
|
"CommentPin",
|
|
115
116
|
"CommentReply",
|
|
116
117
|
"CommentSelectionBar",
|
|
117
|
-
"CommentSend",
|
|
118
118
|
"CommentThread",
|
|
119
119
|
"CommentToolbar"
|
|
120
120
|
],
|
|
@@ -126,7 +126,21 @@ const partFamilies = {
|
|
|
126
126
|
marker: [
|
|
127
127
|
"Marker",
|
|
128
128
|
"MarkerContent",
|
|
129
|
-
"MarkerIcon"
|
|
129
|
+
"MarkerIcon",
|
|
130
|
+
"MarkerSeparator"
|
|
131
|
+
],
|
|
132
|
+
status: [
|
|
133
|
+
"Status",
|
|
134
|
+
"StatusIndicator",
|
|
135
|
+
"StatusLabel"
|
|
136
|
+
],
|
|
137
|
+
"prompt-input": [
|
|
138
|
+
"PromptInput",
|
|
139
|
+
"PromptInputAttach",
|
|
140
|
+
"PromptInputAttachments",
|
|
141
|
+
"PromptInputSubmit",
|
|
142
|
+
"PromptInputTextarea",
|
|
143
|
+
"PromptInputToolbar"
|
|
130
144
|
],
|
|
131
145
|
message: [
|
|
132
146
|
"Message",
|
|
@@ -155,12 +169,12 @@ const partFamilies = {
|
|
|
155
169
|
const componentNames = [
|
|
156
170
|
"Chat",
|
|
157
171
|
"ChatMessage",
|
|
158
|
-
"PromptInput",
|
|
159
172
|
"CodeView",
|
|
160
173
|
"FileView",
|
|
161
174
|
"FileDiff",
|
|
162
175
|
"FileTree",
|
|
163
176
|
"DeviceFrame",
|
|
177
|
+
"DeviceFrameToolbar",
|
|
164
178
|
"Markdown",
|
|
165
179
|
"MessageParts",
|
|
166
180
|
"MultiFileDiff",
|
|
@@ -171,6 +185,7 @@ const componentNames = [
|
|
|
171
185
|
"AgentSessionDetailsSection",
|
|
172
186
|
"AgentSessionTimeline",
|
|
173
187
|
"AgentSessionWorkGroup",
|
|
188
|
+
"AgentSessionTitle",
|
|
174
189
|
"FilterSearch",
|
|
175
190
|
"ToolList",
|
|
176
191
|
"TraceRun",
|
|
@@ -180,7 +195,6 @@ const componentNames = [
|
|
|
180
195
|
"RollNumber",
|
|
181
196
|
"SwapIcon",
|
|
182
197
|
"RelativeTime",
|
|
183
|
-
"Status",
|
|
184
198
|
"MotionList",
|
|
185
199
|
"Progress",
|
|
186
200
|
"DropField",
|
|
@@ -192,7 +206,9 @@ const componentNames = [
|
|
|
192
206
|
...partFamilies.comments,
|
|
193
207
|
...partFamilies["connection-status"],
|
|
194
208
|
...partFamilies.marker,
|
|
209
|
+
...partFamilies.status,
|
|
195
210
|
...partFamilies.message,
|
|
211
|
+
...partFamilies["prompt-input"],
|
|
196
212
|
...partFamilies["sync-status"],
|
|
197
213
|
...partFamilies.trace
|
|
198
214
|
];
|
|
@@ -204,7 +220,6 @@ const viteHubUIIcons = [
|
|
|
204
220
|
"lucide:arrow-up",
|
|
205
221
|
"lucide:arrow-up-right",
|
|
206
222
|
"lucide:bold",
|
|
207
|
-
"lucide:brain",
|
|
208
223
|
"lucide:check",
|
|
209
224
|
"lucide:chevron-down",
|
|
210
225
|
"lucide:chevron-left",
|
|
@@ -212,12 +227,8 @@ const viteHubUIIcons = [
|
|
|
212
227
|
"lucide:chevron-up",
|
|
213
228
|
"lucide:chevrons-left",
|
|
214
229
|
"lucide:chevrons-right",
|
|
215
|
-
"lucide:circle",
|
|
216
230
|
"lucide:circle-alert",
|
|
217
231
|
"lucide:circle-check",
|
|
218
|
-
"lucide:circle-dashed",
|
|
219
|
-
"lucide:circle-minus",
|
|
220
|
-
"lucide:circle-x",
|
|
221
232
|
"lucide:code",
|
|
222
233
|
"lucide:copy",
|
|
223
234
|
"lucide:database",
|
|
@@ -227,74 +238,61 @@ const viteHubUIIcons = [
|
|
|
227
238
|
"lucide:eye",
|
|
228
239
|
"lucide:eye-off",
|
|
229
240
|
"lucide:file",
|
|
230
|
-
"lucide:file-pen-line",
|
|
231
|
-
"lucide:file-text",
|
|
232
|
-
"lucide:files",
|
|
233
241
|
"lucide:folder",
|
|
234
242
|
"lucide:folder-open",
|
|
235
|
-
"lucide:globe",
|
|
236
243
|
"lucide:grip-vertical",
|
|
237
244
|
"lucide:hash",
|
|
238
245
|
"lucide:heading-1",
|
|
239
246
|
"lucide:heading-2",
|
|
240
247
|
"lucide:heading-3",
|
|
241
248
|
"lucide:image",
|
|
242
|
-
"lucide:inbox",
|
|
243
249
|
"lucide:info",
|
|
244
250
|
"lucide:italic",
|
|
245
251
|
"lucide:lightbulb",
|
|
246
252
|
"lucide:link",
|
|
247
253
|
"lucide:list",
|
|
248
|
-
"lucide:list-checks",
|
|
249
254
|
"lucide:list-ordered",
|
|
250
255
|
"lucide:loader-circle",
|
|
251
|
-
"lucide:maximize-2",
|
|
252
256
|
"lucide:menu",
|
|
253
257
|
"lucide:message-circle",
|
|
254
|
-
"lucide:minimize-2",
|
|
255
258
|
"lucide:minus",
|
|
256
259
|
"lucide:monitor",
|
|
257
260
|
"lucide:moon",
|
|
258
261
|
"lucide:panel-left",
|
|
259
262
|
"lucide:panel-left-close",
|
|
260
263
|
"lucide:panel-left-open",
|
|
261
|
-
"lucide:panel-right",
|
|
262
264
|
"lucide:pencil",
|
|
263
265
|
"lucide:play",
|
|
264
|
-
"lucide:plug",
|
|
265
266
|
"lucide:plus",
|
|
266
267
|
"lucide:quote",
|
|
267
268
|
"lucide:refresh-cw",
|
|
268
269
|
"lucide:rotate-ccw",
|
|
269
270
|
"lucide:search",
|
|
270
|
-
"lucide:send",
|
|
271
|
-
"lucide:sparkles",
|
|
272
271
|
"lucide:square",
|
|
273
272
|
"lucide:square-code",
|
|
274
|
-
"lucide:square-menu",
|
|
275
273
|
"lucide:square-pen",
|
|
276
274
|
"lucide:star",
|
|
277
275
|
"lucide:strikethrough",
|
|
278
276
|
"lucide:sun",
|
|
279
|
-
"lucide:terminal",
|
|
280
277
|
"lucide:text-wrap",
|
|
281
278
|
"lucide:trash-2",
|
|
282
279
|
"lucide:triangle-alert",
|
|
283
280
|
"lucide:type",
|
|
284
281
|
"lucide:upload",
|
|
285
|
-
"lucide:wrench",
|
|
286
282
|
"lucide:x"
|
|
287
283
|
];
|
|
288
284
|
// src/nuxt.ts
|
|
289
285
|
/**
|
|
290
|
-
* Adds what the styled parts need at runtime in a Nuxt app: the plugin that gives them
|
|
286
|
+
* Adds what the styled parts need at runtime in a Nuxt app: the plugin that gives them their icon names, their
|
|
291
287
|
* icons in the `@nuxt/icon` client bundle, because `@nuxt/icon` does not scan dependencies, and Shiki's WebAssembly as a
|
|
292
|
-
* module the server build can bundle. The
|
|
293
|
-
*
|
|
288
|
+
* module the server build can bundle. The plugin imports `#app`, which only Nuxt's bundler resolves, so the package is
|
|
289
|
+
* transpiled: Node cannot load the plugin from `node_modules` during server rendering. The module calls it, and so does
|
|
290
|
+
* `vite-hub/nuxt` when the app installed this package. It is safe to call twice.
|
|
294
291
|
*/
|
|
295
292
|
function addViteHubUIRuntime(nuxt) {
|
|
296
293
|
const plugin = createResolver(import.meta.url).resolve("./runtime/nuxt-plugin.js");
|
|
297
294
|
if (!nuxt.options.plugins.some((entry) => (typeof entry === "string" ? entry : entry.src) === plugin)) nuxt.options.plugins.push(plugin);
|
|
295
|
+
if (!nuxt.options.build.transpile.includes("@vite-hub/ui")) nuxt.options.build.transpile.push("@vite-hub/ui");
|
|
298
296
|
nuxt.hook("icon:clientBundleIcons", (icons) => {
|
|
299
297
|
for (const icon of viteHubUIIcons) icons.add(icon);
|
|
300
298
|
});
|
|
@@ -355,10 +353,7 @@ const viteHubUINuxtModule = defineNuxtModule({
|
|
|
355
353
|
name: "@vite-hub/ui"
|
|
356
354
|
},
|
|
357
355
|
defaults: {},
|
|
358
|
-
moduleDependencies:
|
|
359
|
-
"@nuxt/ui": {},
|
|
360
|
-
...viteHubUIIconDependencies
|
|
361
|
-
},
|
|
356
|
+
moduleDependencies: viteHubUIIconDependencies,
|
|
362
357
|
async setup({ prefix = "", ...options }, nuxt) {
|
|
363
358
|
const resolver = createResolver(import.meta.url);
|
|
364
359
|
nuxt.options.css.push(resolver.resolve("./styles.css"));
|