@vite-hub/ui 0.1.0 → 0.3.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 +244 -18
- package/dist/attachments-BzTwqRTU.js +90 -0
- package/dist/choices-input-ByXJvDn1.d.ts +94 -0
- package/dist/{code-view-J4OsgEdh.js → code-view-D0bqhogi.js} +20 -4
- package/dist/colors-BghReA9C-CjF9gnmy.js +28 -0
- package/dist/comment-composer-Cc8Jvu6u.d.ts +243 -0
- package/dist/comment-composer-jYv2ULNP.js +591 -0
- package/dist/comment-layer-ClH4MLj4.d.ts +165 -0
- package/dist/comment-list-B8hphLfS.d.ts +62 -0
- package/dist/comment-marks.css +234 -0
- package/dist/comment-panel-fcKSKwLC.d.ts +197 -0
- package/dist/comment-person-CLPlW_SS.js +40 -0
- package/dist/comment-pin-CvwgRSDR.d.ts +68 -0
- package/dist/comment-row-Bbm9WwuF.js +39 -0
- package/dist/comment-thread-CoTLrdal.d.ts +368 -0
- package/dist/comment-visibility-DsVuVndP.d.ts +40 -0
- package/dist/{comments-ChNJkV1d.d.ts → comments-Bx2WRsYy.d.ts} +69 -7
- package/dist/{comments-C08J3z4e.js → comments-CkWc2Khc.js} +155 -60
- 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-Du58PlsG.js +18 -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-BD1e8vx5.d.ts} +8 -0
- package/dist/{code-view-vDM-hph-.d.ts → index-CNY1uNTh.d.ts} +14 -228
- package/dist/index.d.ts +53 -56
- package/dist/index.js +677 -25
- package/dist/markdown-editor-CMbNZOdN.js +2394 -0
- package/dist/markdown-editor-DqdZfIEn.d.ts +195 -0
- package/dist/markdown-editor.d.ts +108 -0
- package/dist/markdown-editor.js +3 -0
- package/dist/message-scroller-Bm1YWTeY.d.ts +175 -0
- package/dist/nuxt-ui-DSQFzq3s.js +38 -0
- package/dist/nuxt.d.ts +84 -2
- package/dist/nuxt.js +237 -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} +13 -14
- 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} +8 -9
- 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} +16 -24
- 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 +618 -0
- package/dist/parts/components/comment-list.d.ts +2 -0
- package/dist/parts/components/comment-list.js +167 -0
- package/dist/parts/components/comment-panel.d.ts +2 -0
- package/dist/parts/components/comment-panel.js +299 -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-thread.d.ts +2 -0
- package/dist/parts/components/comment-thread.js +571 -0
- package/dist/parts/components/comments.d.ts +7 -0
- package/dist/parts/components/comments.js +8 -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} +5 -6
- 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} +54 -11
- 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} +10 -11
- 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-xgBL6DO7.js} +209 -86
- 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 +2465 -594
- 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-Dyr6CfBW.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 +136 -150
- 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-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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropType } from "vue";
|
|
2
|
-
//#region ../../node_modules/.pnpm/@pierre+trees@1.0.
|
|
2
|
+
//#region ../../node_modules/.pnpm/@pierre+trees@1.0.0_@pierre+theme@2.0.0_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6_shiki@4.5.0/node_modules/@pierre/trees/dist/iconConfig.d.ts
|
|
3
3
|
//#region src/iconConfig.d.ts
|
|
4
4
|
type RemappedIcon = string | {
|
|
5
5
|
name: string;
|
|
@@ -26,7 +26,7 @@ interface FileTreeIconConfig {
|
|
|
26
26
|
}
|
|
27
27
|
type FileTreeIcons = FileTreeBuiltInIconSet | FileTreeIconConfig;
|
|
28
28
|
//#endregion
|
|
29
|
-
//#region ../../node_modules/.pnpm/@pierre+trees@1.0.
|
|
29
|
+
//#region ../../node_modules/.pnpm/@pierre+trees@1.0.0_@pierre+theme@2.0.0_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6_shiki@4.5.0/node_modules/@pierre/trees/dist/publicTypes.d.ts
|
|
30
30
|
//#region src/publicTypes.d.ts
|
|
31
31
|
type GitStatus = 'added' | 'deleted' | 'ignored' | 'modified' | 'renamed' | 'untracked';
|
|
32
32
|
type GitStatusEntry = {
|
|
@@ -44,20 +44,12 @@ type ContextMenuAnchorRect = Readonly<{
|
|
|
44
44
|
y: number;
|
|
45
45
|
}>;
|
|
46
46
|
//#endregion
|
|
47
|
-
//#region ../../node_modules/.pnpm/@pierre+trees@1.0.
|
|
47
|
+
//#region ../../node_modules/.pnpm/@pierre+trees@1.0.0_@pierre+theme@2.0.0_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6_shiki@4.5.0/node_modules/@pierre/trees/dist/model/density.d.ts
|
|
48
48
|
//#region src/model/density.d.ts
|
|
49
49
|
type FileTreeDensityKeyword = 'compact' | 'default' | 'relaxed';
|
|
50
50
|
type FileTreeDensity = FileTreeDensityKeyword | number;
|
|
51
51
|
//#endregion
|
|
52
|
-
//#region ../../node_modules/.pnpm/@pierre+trees@1.0.
|
|
53
|
-
//#region src/preparedInput.d.ts
|
|
54
|
-
declare const FILE_TREE_PREPARED_INPUT: unique symbol;
|
|
55
|
-
interface FileTreePreparedInput {
|
|
56
|
-
readonly [FILE_TREE_PREPARED_INPUT]: true;
|
|
57
|
-
readonly paths: readonly string[];
|
|
58
|
-
}
|
|
59
|
-
//#endregion
|
|
60
|
-
//#region ../../node_modules/.pnpm/@pierre+trees@1.0.0-beta.6_@pierre+theme@2.0.0_@shikijs+themes@4.5.0_react-dom@19.2.8_r_1bb1bb7c965cf1063203cdfd313d3b8d/node_modules/@pierre/trees/dist/model/publicTypes.d.ts
|
|
52
|
+
//#region ../../node_modules/.pnpm/@pierre+trees@1.0.0_@pierre+theme@2.0.0_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6_shiki@4.5.0/node_modules/@pierre/trees/dist/model/publicTypes.d.ts
|
|
61
53
|
//#region src/model/publicTypes.d.ts
|
|
62
54
|
/**
|
|
63
55
|
* Public tree identity is path-first so render and model callers never depend
|
|
@@ -219,12 +211,37 @@ interface FileTreeRenamingConfig {
|
|
|
219
211
|
onError?: (error: string) => void;
|
|
220
212
|
onRename?: (event: FileTreeRenameEvent) => void;
|
|
221
213
|
}
|
|
214
|
+
/**
|
|
215
|
+
* User-visible text rendered by the tree. Supply translations through the
|
|
216
|
+
* `labels` option or `setLabels()`.
|
|
217
|
+
*/
|
|
218
|
+
interface FileTreeLabels {
|
|
219
|
+
/** Placeholder of the built-in search input. */
|
|
220
|
+
searchPlaceholder: string;
|
|
221
|
+
/** Accessible name of the row action button that opens the context menu. */
|
|
222
|
+
contextMenuTrigger: string;
|
|
223
|
+
/** Accessible name of the inline rename input, given the row's name. */
|
|
224
|
+
renameItem: (itemName: string) => string;
|
|
225
|
+
/** Tooltip of the git status badge on a row, per status. */
|
|
226
|
+
gitStatusTitles: Readonly<Record<GitStatus, string>>;
|
|
227
|
+
/** Tooltip of the dot on a directory that contains git status changes. */
|
|
228
|
+
containsGitStatusTitle: string;
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Labels as accepted by the `labels` option and `setLabels()`. Any label left
|
|
232
|
+
* out, including an individual git status title, falls back to its English
|
|
233
|
+
* default from `DEFAULT_FILE_TREE_LABELS`.
|
|
234
|
+
*/
|
|
235
|
+
type FileTreeLabelsOption = Partial<Omit<FileTreeLabels, 'gitStatusTitles'>> & {
|
|
236
|
+
gitStatusTitles?: Partial<Record<GitStatus, string>>;
|
|
237
|
+
};
|
|
222
238
|
type FileTreeOptionSurface = FileTreeRenderOptions & {
|
|
223
239
|
composition?: FileTreeCompositionOptions;
|
|
224
240
|
density?: FileTreeDensity;
|
|
225
241
|
gitStatus?: readonly GitStatusEntry[];
|
|
226
242
|
id?: string;
|
|
227
243
|
icons?: FileTreeIcons;
|
|
244
|
+
labels?: FileTreeLabelsOption;
|
|
228
245
|
onSelectionChange?: FileTreeSelectionChangeListener;
|
|
229
246
|
renderRowDecoration?: FileTreeRowDecorationRenderer;
|
|
230
247
|
search?: boolean;
|
|
@@ -358,7 +375,15 @@ interface FileTreeRowDecorationContext {
|
|
|
358
375
|
}
|
|
359
376
|
type FileTreeRowDecorationRenderer = (context: FileTreeRowDecorationContext) => FileTreeRowDecoration | null;
|
|
360
377
|
//#endregion
|
|
361
|
-
//#region ../../node_modules/.pnpm/@pierre+trees@1.0.
|
|
378
|
+
//#region ../../node_modules/.pnpm/@pierre+trees@1.0.0_@pierre+theme@2.0.0_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6_shiki@4.5.0/node_modules/@pierre/trees/dist/preparedInput.d.ts
|
|
379
|
+
//#region src/preparedInput.d.ts
|
|
380
|
+
declare const FILE_TREE_PREPARED_INPUT: unique symbol;
|
|
381
|
+
interface FileTreePreparedInput {
|
|
382
|
+
readonly [FILE_TREE_PREPARED_INPUT]: true;
|
|
383
|
+
readonly paths: readonly string[];
|
|
384
|
+
}
|
|
385
|
+
//#endregion
|
|
386
|
+
//#region ../../node_modules/.pnpm/@pierre+trees@1.0.0_@pierre+theme@2.0.0_@shikijs+themes@4.5.0_react-dom@19.2.8_react@19.2.6__react@19.2.6_shiki@4.5.0/node_modules/@pierre/trees/dist/render/FileTree.d.ts
|
|
362
387
|
declare class FileTree$1 implements FileTreeMutationHandle, FileTreeSearchSessionHandle {
|
|
363
388
|
#private;
|
|
364
389
|
static LoadedCustomComponent: boolean;
|
|
@@ -407,6 +432,7 @@ declare class FileTree$1 implements FileTreeMutationHandle, FileTreeSearchSessio
|
|
|
407
432
|
setComposition(composition?: FileTreeCompositionOptions): void;
|
|
408
433
|
setGitStatus(gitStatus?: FileTreeOptions$1['gitStatus']): void;
|
|
409
434
|
setIcons(icons?: FileTreeOptions$1['icons']): void;
|
|
435
|
+
setLabels(labels?: FileTreeOptions$1['labels']): void;
|
|
410
436
|
hydrate({ fileTreeContainer }: FileTreeHydrationProps): void;
|
|
411
437
|
render({ containerWrapper, fileTreeContainer }: FileTreeRenderProps): void;
|
|
412
438
|
}
|
|
@@ -434,9 +460,14 @@ declare const FileTree: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
434
460
|
default: string;
|
|
435
461
|
type: StringConstructor;
|
|
436
462
|
};
|
|
463
|
+
selectedPath: {
|
|
464
|
+
type: StringConstructor;
|
|
465
|
+
};
|
|
437
466
|
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
438
467
|
[key: string]: any;
|
|
439
|
-
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
468
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
469
|
+
"update:selectedPath": (_path: string) => true;
|
|
470
|
+
}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
440
471
|
model: {
|
|
441
472
|
type: PropType<FileTreeModel>;
|
|
442
473
|
};
|
|
@@ -451,7 +482,12 @@ declare const FileTree: import("vue").DefineComponent<import("vue").ExtractPropT
|
|
|
451
482
|
default: string;
|
|
452
483
|
type: StringConstructor;
|
|
453
484
|
};
|
|
454
|
-
|
|
485
|
+
selectedPath: {
|
|
486
|
+
type: StringConstructor;
|
|
487
|
+
};
|
|
488
|
+
}>> & Readonly<{
|
|
489
|
+
"onUpdate:selectedPath"?: ((_path: string) => any) | undefined;
|
|
490
|
+
}>, {
|
|
455
491
|
paths: readonly string[];
|
|
456
492
|
searchLabel: string;
|
|
457
493
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
//#region src/internal/format.ts
|
|
2
|
+
/** "320 ms", "1.2 s", "30 s", or "1 min 35 s". Seconds round down, so a running counter never shows "60 s". */
|
|
3
|
+
function formatDuration(ms) {
|
|
4
|
+
if (ms < 1e3) return `${Math.round(ms)} ms`;
|
|
5
|
+
const seconds = ms / 1e3;
|
|
6
|
+
if (seconds < 10) return `${seconds.toFixed(1)} s`;
|
|
7
|
+
if (seconds < 60) return `${Math.floor(seconds)} s`;
|
|
8
|
+
return `${Math.floor(seconds / 60)} min ${Math.floor(seconds % 60)} s`;
|
|
9
|
+
}
|
|
10
|
+
/** Two letters for an avatar without an image: `Ana Lopez` and `ana.lopez@vitehub.dev` are `AL`, `Ana` is `AN`. */
|
|
11
|
+
function initials(name) {
|
|
12
|
+
const words = name.replace(/@.*/, "").trim().split(/[\s._-]+/).filter(Boolean);
|
|
13
|
+
const first = words[0] ?? "";
|
|
14
|
+
const second = words.length > 1 ? words.at(-1) ?? "" : first.slice(1);
|
|
15
|
+
return (first.slice(0, 1) + second.slice(0, 1)).toUpperCase() || "?";
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { initials as n, formatDuration as t };
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import { NodeSelection } from "@tiptap/pm/state";
|
|
2
|
+
//#region src/editor/handlers.ts
|
|
3
|
+
/**
|
|
4
|
+
* The key that the editor parts read their handlers from, as a `Ref<EditorHandlers>`. It is the string that Nuxt UI's
|
|
5
|
+
* editor components inject, so one `provide()` serves both sets.
|
|
6
|
+
*/
|
|
7
|
+
const editorHandlersKey = "editorHandlers";
|
|
8
|
+
function isNodeTypeSelected(editor, types) {
|
|
9
|
+
const { $from, to } = editor.state.selection;
|
|
10
|
+
let found = false;
|
|
11
|
+
editor.state.doc.nodesBetween($from.pos, to, (node) => {
|
|
12
|
+
if (types.includes(node.type.name)) found = true;
|
|
13
|
+
});
|
|
14
|
+
return found;
|
|
15
|
+
}
|
|
16
|
+
const hasExtension = (editor, name) => editor.extensionManager.extensions.some((extension) => extension.name === name);
|
|
17
|
+
const blocked = (editor) => isNodeTypeSelected(editor, ["image"]) || editor.isActive("code");
|
|
18
|
+
function blockHandler(name, toggle, can) {
|
|
19
|
+
return {
|
|
20
|
+
canExecute: can,
|
|
21
|
+
execute: (editor) => toggle(editor.chain().focus()),
|
|
22
|
+
isActive: (editor) => editor.isActive(name),
|
|
23
|
+
isDisabled: blocked
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
const listItemTypes = ["bulletList", "orderedList"];
|
|
27
|
+
function listHandler(type) {
|
|
28
|
+
const toggle = (chain) => type === "bulletList" ? chain.toggleBulletList() : chain.toggleOrderedList();
|
|
29
|
+
const inAnyList = (editor) => listItemTypes.some((name) => hasExtension(editor, name) && editor.isActive(name));
|
|
30
|
+
return {
|
|
31
|
+
canExecute: (editor) => (type === "bulletList" ? editor.can().toggleBulletList() : editor.can().toggleOrderedList()) || editor.isActive("listItem") || inAnyList(editor),
|
|
32
|
+
execute: (editor) => {
|
|
33
|
+
const { selection } = editor.state;
|
|
34
|
+
let chain = editor.chain().focus();
|
|
35
|
+
if (selection instanceof NodeSelection) {
|
|
36
|
+
const first = selection.node.firstChild?.firstChild;
|
|
37
|
+
const last = selection.node.lastChild?.lastChild;
|
|
38
|
+
const from = first ? selection.from + first.nodeSize : selection.from + 1;
|
|
39
|
+
const to = last ? selection.to - last.nodeSize : selection.to - 1;
|
|
40
|
+
chain = chain.setTextSelection({
|
|
41
|
+
from,
|
|
42
|
+
to
|
|
43
|
+
}).clearNodes();
|
|
44
|
+
}
|
|
45
|
+
const lift = (current) => {
|
|
46
|
+
let result = current.liftListItem("listItem");
|
|
47
|
+
for (const name of listItemTypes) if (hasExtension(editor, name)) result = result.lift(name);
|
|
48
|
+
return result;
|
|
49
|
+
};
|
|
50
|
+
if (editor.isActive(type)) return lift(chain).selectTextblockEnd();
|
|
51
|
+
if (inAnyList(editor)) return toggle(lift(chain)).selectTextblockEnd();
|
|
52
|
+
return toggle(chain).selectTextblockEnd();
|
|
53
|
+
},
|
|
54
|
+
isActive: (editor) => editor.isActive(type),
|
|
55
|
+
isDisabled: (editor) => !hasExtension(editor, type) || blocked(editor)
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
function blockAt(editor, item) {
|
|
59
|
+
const node = item.pos == null ? null : editor.state.doc.nodeAt(item.pos);
|
|
60
|
+
return node && item.pos != null ? {
|
|
61
|
+
node,
|
|
62
|
+
pos: item.pos
|
|
63
|
+
} : void 0;
|
|
64
|
+
}
|
|
65
|
+
function moveHandler(direction) {
|
|
66
|
+
const target = (editor, item) => {
|
|
67
|
+
const block = blockAt(editor, item);
|
|
68
|
+
if (!block) return void 0;
|
|
69
|
+
const $pos = editor.state.doc.resolve(block.pos);
|
|
70
|
+
const index = $pos.index();
|
|
71
|
+
if (direction === "up" ? index <= 0 : index >= $pos.parent.childCount - 1) return void 0;
|
|
72
|
+
const neighbor = $pos.parent.child(direction === "up" ? index - 1 : index + 1);
|
|
73
|
+
return {
|
|
74
|
+
...block,
|
|
75
|
+
to: direction === "up" ? block.pos - neighbor.nodeSize : block.pos + neighbor.nodeSize
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
return {
|
|
79
|
+
canExecute: (editor, item) => Boolean(target(editor, item)),
|
|
80
|
+
execute: (editor, item) => {
|
|
81
|
+
const move = target(editor, item);
|
|
82
|
+
if (!move) return editor.chain();
|
|
83
|
+
return editor.chain().focus().deleteRange({
|
|
84
|
+
from: move.pos,
|
|
85
|
+
to: move.pos + move.node.nodeSize
|
|
86
|
+
}).insertContentAt(move.to, move.node.toJSON());
|
|
87
|
+
},
|
|
88
|
+
isActive: () => false
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* The handlers of the item kinds that ViteHub's editors use: `mark` (with `mark`), `heading` (with `level`),
|
|
93
|
+
* `paragraph`, `blockquote`, `codeBlock`, `horizontalRule`, `bulletList`, `orderedList`, and, for the block at `pos`,
|
|
94
|
+
* `duplicate`, `delete`, `moveUp`, `moveDown`, and `suggestion` (opens the "/" menu below it). They match Nuxt UI's
|
|
95
|
+
* `createHandlers()` for these kinds. Spread your own over them for other kinds.
|
|
96
|
+
*/
|
|
97
|
+
function createEditorHandlers() {
|
|
98
|
+
return {
|
|
99
|
+
mark: {
|
|
100
|
+
canExecute: (editor, { mark = "" }) => editor.can().toggleMark(mark),
|
|
101
|
+
execute: (editor, { mark = "" }) => editor.chain().focus().toggleMark(mark),
|
|
102
|
+
isActive: (editor, { mark = "" }) => editor.isActive(mark),
|
|
103
|
+
isDisabled: (editor, { mark = "" }) => !editor.schema.marks[mark] || isNodeTypeSelected(editor, ["image"])
|
|
104
|
+
},
|
|
105
|
+
heading: {
|
|
106
|
+
canExecute: (editor, { level = 1 }) => editor.can().toggleHeading({ level }),
|
|
107
|
+
execute: (editor, { level = 1 }) => editor.chain().focus().toggleHeading({ level }),
|
|
108
|
+
isActive: (editor, item) => editor.isActive("heading", { level: item.level }),
|
|
109
|
+
isDisabled: blocked
|
|
110
|
+
},
|
|
111
|
+
paragraph: blockHandler("paragraph", (chain) => chain.setParagraph(), (editor) => editor.can().setParagraph()),
|
|
112
|
+
blockquote: blockHandler("blockquote", (chain) => chain.toggleBlockquote(), (editor) => editor.can().toggleBlockquote()),
|
|
113
|
+
codeBlock: blockHandler("codeBlock", (chain) => chain.toggleCodeBlock(), (editor) => editor.can().toggleCodeBlock()),
|
|
114
|
+
horizontalRule: blockHandler("horizontalRule", (chain) => chain.setHorizontalRule(), (editor) => editor.can().setHorizontalRule()),
|
|
115
|
+
bulletList: listHandler("bulletList"),
|
|
116
|
+
orderedList: listHandler("orderedList"),
|
|
117
|
+
duplicate: {
|
|
118
|
+
canExecute: (editor, item) => Boolean(blockAt(editor, item)),
|
|
119
|
+
execute: (editor, item) => {
|
|
120
|
+
const block = blockAt(editor, item);
|
|
121
|
+
return block ? editor.chain().focus().insertContentAt(block.pos + block.node.nodeSize, block.node.toJSON()) : editor.chain();
|
|
122
|
+
},
|
|
123
|
+
isActive: () => false
|
|
124
|
+
},
|
|
125
|
+
delete: {
|
|
126
|
+
canExecute: (editor, item) => Boolean(blockAt(editor, item)),
|
|
127
|
+
execute: (editor, item) => {
|
|
128
|
+
const block = blockAt(editor, item);
|
|
129
|
+
return block ? editor.chain().focus().deleteRange({
|
|
130
|
+
from: block.pos,
|
|
131
|
+
to: block.pos + block.node.nodeSize
|
|
132
|
+
}) : editor.chain();
|
|
133
|
+
},
|
|
134
|
+
isActive: () => false
|
|
135
|
+
},
|
|
136
|
+
moveUp: moveHandler("up"),
|
|
137
|
+
moveDown: moveHandler("down"),
|
|
138
|
+
suggestion: {
|
|
139
|
+
canExecute: () => true,
|
|
140
|
+
execute: (editor, item) => {
|
|
141
|
+
const slash = {
|
|
142
|
+
content: [{
|
|
143
|
+
text: "/",
|
|
144
|
+
type: "text"
|
|
145
|
+
}],
|
|
146
|
+
type: "paragraph"
|
|
147
|
+
};
|
|
148
|
+
const block = blockAt(editor, item);
|
|
149
|
+
if (block) return editor.chain().focus().insertContentAt(block.pos + block.node.nodeSize, slash);
|
|
150
|
+
const { $from } = editor.state.selection;
|
|
151
|
+
return editor.chain().focus().insertContentAt($from.before($from.depth) + $from.node($from.depth).nodeSize, slash);
|
|
152
|
+
},
|
|
153
|
+
isActive: () => false
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
function mapEditorItems(editor, items, handlers) {
|
|
158
|
+
const all = {
|
|
159
|
+
...createEditorHandlers(),
|
|
160
|
+
...handlers
|
|
161
|
+
};
|
|
162
|
+
const map = (group) => group.filter(Boolean).map((entry) => {
|
|
163
|
+
if (entry.type) return entry;
|
|
164
|
+
const { children, ...rest } = entry;
|
|
165
|
+
const mappedChildren = children?.length ? Array.isArray(children[0]) ? children.map(map) : map(children) : void 0;
|
|
166
|
+
const handler = entry.kind ? all[entry.kind] : void 0;
|
|
167
|
+
if (!handler) return {
|
|
168
|
+
...rest,
|
|
169
|
+
children: mappedChildren
|
|
170
|
+
};
|
|
171
|
+
return {
|
|
172
|
+
...rest,
|
|
173
|
+
active: handler.isActive(editor, entry),
|
|
174
|
+
children: mappedChildren,
|
|
175
|
+
disabled: Boolean(handler.isDisabled?.(editor, entry)) || !handler.canExecute(editor, entry),
|
|
176
|
+
onSelect: () => void handler.execute(editor, entry).run()
|
|
177
|
+
};
|
|
178
|
+
});
|
|
179
|
+
return items.length && Array.isArray(items[0]) ? items.map(map) : map(items);
|
|
180
|
+
}
|
|
181
|
+
//#endregion
|
|
182
|
+
export { editorHandlersKey as n, mapEditorItems as r, createEditorHandlers as t };
|
package/dist/headless.d.ts
CHANGED
|
@@ -1,176 +1,5 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
export interface MessageScrollerContext {
|
|
7
|
-
atEnd: Readonly<Ref<boolean>>;
|
|
8
|
-
isScrollable: Readonly<Ref<boolean>>;
|
|
9
|
-
scrollToEnd: (options?: {
|
|
10
|
-
behavior?: MessageScrollBehavior;
|
|
11
|
-
}) => void;
|
|
12
|
-
scrollToMessage: (id: string, options?: {
|
|
13
|
-
behavior?: MessageScrollBehavior;
|
|
14
|
-
block?: ScrollLogicalPosition;
|
|
15
|
-
}) => void;
|
|
16
|
-
viewport: Ref<HTMLElement | null>;
|
|
17
|
-
}
|
|
18
|
-
export declare function useMessageScroller(): MessageScrollerContext;
|
|
19
|
-
export declare function calculatePrependScrollTop(previousTop: number, previousHeight: number, nextHeight: number): number;
|
|
20
|
-
export declare const MessageScroller: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
21
|
-
as: {
|
|
22
|
-
default: string;
|
|
23
|
-
type: StringConstructor;
|
|
24
|
-
};
|
|
25
|
-
autoScroll: {
|
|
26
|
-
default: boolean;
|
|
27
|
-
type: BooleanConstructor;
|
|
28
|
-
};
|
|
29
|
-
defaultScrollPosition: {
|
|
30
|
-
default: string;
|
|
31
|
-
type: PropType<MessageScrollPosition>;
|
|
32
|
-
};
|
|
33
|
-
edgeThreshold: {
|
|
34
|
-
default: number;
|
|
35
|
-
type: NumberConstructor;
|
|
36
|
-
};
|
|
37
|
-
previousItemPeek: {
|
|
38
|
-
default: number;
|
|
39
|
-
type: NumberConstructor;
|
|
40
|
-
};
|
|
41
|
-
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
42
|
-
[key: string]: any;
|
|
43
|
-
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
44
|
-
as: {
|
|
45
|
-
default: string;
|
|
46
|
-
type: StringConstructor;
|
|
47
|
-
};
|
|
48
|
-
autoScroll: {
|
|
49
|
-
default: boolean;
|
|
50
|
-
type: BooleanConstructor;
|
|
51
|
-
};
|
|
52
|
-
defaultScrollPosition: {
|
|
53
|
-
default: string;
|
|
54
|
-
type: PropType<MessageScrollPosition>;
|
|
55
|
-
};
|
|
56
|
-
edgeThreshold: {
|
|
57
|
-
default: number;
|
|
58
|
-
type: NumberConstructor;
|
|
59
|
-
};
|
|
60
|
-
previousItemPeek: {
|
|
61
|
-
default: number;
|
|
62
|
-
type: NumberConstructor;
|
|
63
|
-
};
|
|
64
|
-
}>> & Readonly<{}>, {
|
|
65
|
-
edgeThreshold: number;
|
|
66
|
-
previousItemPeek: number;
|
|
67
|
-
as: string;
|
|
68
|
-
autoScroll: boolean;
|
|
69
|
-
defaultScrollPosition: MessageScrollPosition;
|
|
70
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
71
|
-
export declare const MessageScrollerViewport: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
72
|
-
as: {
|
|
73
|
-
default: string;
|
|
74
|
-
type: StringConstructor;
|
|
75
|
-
};
|
|
76
|
-
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
77
|
-
[key: string]: any;
|
|
78
|
-
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
79
|
-
as: {
|
|
80
|
-
default: string;
|
|
81
|
-
type: StringConstructor;
|
|
82
|
-
};
|
|
83
|
-
}>> & Readonly<{}>, {
|
|
84
|
-
as: string;
|
|
85
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
86
|
-
export declare const MessageScrollerContent: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
87
|
-
as: {
|
|
88
|
-
default: string;
|
|
89
|
-
type: StringConstructor;
|
|
90
|
-
};
|
|
91
|
-
items: {
|
|
92
|
-
default: () => never[];
|
|
93
|
-
type: PropType<readonly string[]>;
|
|
94
|
-
};
|
|
95
|
-
preserveScrollOnPrepend: {
|
|
96
|
-
default: boolean;
|
|
97
|
-
type: BooleanConstructor;
|
|
98
|
-
};
|
|
99
|
-
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
100
|
-
[key: string]: any;
|
|
101
|
-
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
102
|
-
as: {
|
|
103
|
-
default: string;
|
|
104
|
-
type: StringConstructor;
|
|
105
|
-
};
|
|
106
|
-
items: {
|
|
107
|
-
default: () => never[];
|
|
108
|
-
type: PropType<readonly string[]>;
|
|
109
|
-
};
|
|
110
|
-
preserveScrollOnPrepend: {
|
|
111
|
-
default: boolean;
|
|
112
|
-
type: BooleanConstructor;
|
|
113
|
-
};
|
|
114
|
-
}>> & Readonly<{}>, {
|
|
115
|
-
as: string;
|
|
116
|
-
items: readonly string[];
|
|
117
|
-
preserveScrollOnPrepend: boolean;
|
|
118
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
119
|
-
export declare const MessageScrollerItem: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
120
|
-
as: {
|
|
121
|
-
default: string;
|
|
122
|
-
type: StringConstructor;
|
|
123
|
-
};
|
|
124
|
-
messageId: {
|
|
125
|
-
required: true;
|
|
126
|
-
type: StringConstructor;
|
|
127
|
-
};
|
|
128
|
-
scrollAnchor: {
|
|
129
|
-
default: boolean;
|
|
130
|
-
type: BooleanConstructor;
|
|
131
|
-
};
|
|
132
|
-
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
133
|
-
[key: string]: any;
|
|
134
|
-
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
135
|
-
as: {
|
|
136
|
-
default: string;
|
|
137
|
-
type: StringConstructor;
|
|
138
|
-
};
|
|
139
|
-
messageId: {
|
|
140
|
-
required: true;
|
|
141
|
-
type: StringConstructor;
|
|
142
|
-
};
|
|
143
|
-
scrollAnchor: {
|
|
144
|
-
default: boolean;
|
|
145
|
-
type: BooleanConstructor;
|
|
146
|
-
};
|
|
147
|
-
}>> & Readonly<{}>, {
|
|
148
|
-
as: string;
|
|
149
|
-
scrollAnchor: boolean;
|
|
150
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
151
|
-
export declare const MessageScrollerButton: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
152
|
-
as: {
|
|
153
|
-
default: string;
|
|
154
|
-
type: PropType<string | Component>;
|
|
155
|
-
};
|
|
156
|
-
behavior: {
|
|
157
|
-
default: string;
|
|
158
|
-
type: PropType<MessageScrollBehavior>;
|
|
159
|
-
};
|
|
160
|
-
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
161
|
-
[key: string]: any;
|
|
162
|
-
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
163
|
-
as: {
|
|
164
|
-
default: string;
|
|
165
|
-
type: PropType<string | Component>;
|
|
166
|
-
};
|
|
167
|
-
behavior: {
|
|
168
|
-
default: string;
|
|
169
|
-
type: PropType<MessageScrollBehavior>;
|
|
170
|
-
};
|
|
171
|
-
}>> & Readonly<{}>, {
|
|
172
|
-
as: string | Component;
|
|
173
|
-
behavior: MessageScrollBehavior;
|
|
174
|
-
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
175
|
-
//#endregion
|
|
176
|
-
export { CommentDraft, CommentFilterState, CommentScope, CommentsState, UseCommentsOptions, draftPositionKey, provideComments, useComments, useCommentsContext };
|
|
1
|
+
import { a as createCommentVisibility, i as commentLeaveMs, n as CommentVisibilityModel, r as CommentVisibilityOptions, t as CommentVisibility } from "./comment-visibility-DsVuVndP.js";
|
|
2
|
+
import { a as CommentThreadAction, c as defaultCommentCan, d as useComments, f as useCommentsContext, i as CommentScope, l as draftPositionKey, n as CommentDraft, o as CommentsState, r as CommentFilterState, s as UseCommentsOptions, t as CommentCan, u as provideComments } from "./comments-Bx2WRsYy.js";
|
|
3
|
+
import { a as ChoicesInputSource, i as ChoicesInputField, n as ChoicesInputClear, o as ChoicesInputState, r as ChoicesInputError, s as ChoicesInputStatus, t as ChoicesInput } from "./choices-input-ByXJvDn1.js";
|
|
4
|
+
import { a as MessageScrollerContent, c as MessageScrollerViewport, i as MessageScrollerButton, l as calculatePrependScrollTop, n as MessageScrollPosition, o as MessageScrollerContext, r as MessageScroller, s as MessageScrollerItem, t as MessageScrollBehavior, u as useMessageScroller } from "./message-scroller-Bm1YWTeY.js";
|
|
5
|
+
export { ChoicesInput, ChoicesInputClear, ChoicesInputError, ChoicesInputField, ChoicesInputSource, ChoicesInputState, ChoicesInputStatus, CommentCan, CommentDraft, CommentFilterState, CommentScope, CommentThreadAction, CommentVisibility, CommentVisibilityModel, CommentVisibilityOptions, CommentsState, MessageScrollBehavior, MessageScrollPosition, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerContext, MessageScrollerItem, MessageScrollerViewport, UseCommentsOptions, calculatePrependScrollTop, commentLeaveMs, createCommentVisibility, defaultCommentCan, draftPositionKey, provideComments, useComments, useCommentsContext, useMessageScroller };
|
package/dist/headless.js
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
1
|
+
import { MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerViewport, calculatePrependScrollTop, useMessageScroller } from "./parts/headless/message-scroller.js";
|
|
2
|
+
import { commentLeaveMs, createCommentVisibility } from "./parts/headless/comment-visibility.js";
|
|
3
|
+
import { a as useCommentsContext, i as useComments, n as draftPositionKey, r as provideComments, t as defaultCommentCan } from "./comments-CkWc2Khc.js";
|
|
4
|
+
import { ChoicesInput, ChoicesInputClear, ChoicesInputError, ChoicesInputField, ChoicesInputStatus } from "./parts/headless/choices-input.js";
|
|
5
|
+
export { ChoicesInput, ChoicesInputClear, ChoicesInputError, ChoicesInputField, ChoicesInputStatus, MessageScroller, MessageScrollerButton, MessageScrollerContent, MessageScrollerItem, MessageScrollerViewport, calculatePrependScrollTop, commentLeaveMs, createCommentVisibility, defaultCommentCan, draftPositionKey, provideComments, useComments, useCommentsContext, useMessageScroller };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The icon swap of CopyButton: the copy icon and the check cross-fade when the button copies, and again when it returns.
|
|
3
|
+
* This is plain CSS with no framework, so a page without Vue, such as Drop's document frame, draws the same swap. Load
|
|
4
|
+
* it in the page or in a shadow root. `styles.css` imports it into its components layer.
|
|
5
|
+
*
|
|
6
|
+
* The markup:
|
|
7
|
+
*
|
|
8
|
+
* <button data-slot="copy-button" data-copied>
|
|
9
|
+
* <span data-slot="copy-button-icon" aria-hidden="true">
|
|
10
|
+
* <span data-icon="copy"><svg>…</svg></span>
|
|
11
|
+
* <span data-icon="check"><svg>…</svg></span>
|
|
12
|
+
* </span>
|
|
13
|
+
* Copy
|
|
14
|
+
* </button>
|
|
15
|
+
*
|
|
16
|
+
* - `copy-button-icon` holds both icons in one grid cell, so the button keeps its size and both icons stay in the DOM.
|
|
17
|
+
* - `data-icon="copy"` wraps the icon before a copy, and `data-icon="check"` the icon after it. The swap sets the opacity,
|
|
18
|
+
* scale, and filter of the wrappers, so a class on an icon inside, such as a utility opacity, stays as it is.
|
|
19
|
+
* - `data-copied` on the button, or on any element around the icons, shows the check. Remove it to show the copy icon.
|
|
20
|
+
*
|
|
21
|
+
* The entering icon goes from opacity 0, scale 0.3, and a 3px blur to its rest in 300ms. The leaving icon goes back in
|
|
22
|
+
* 200ms. They are transitions, so a swap that starts before the last one ends reverses from where it is, and nothing
|
|
23
|
+
* animates when the page loads. Under reduced motion the icons swap with no animation.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
[data-slot="copy-button-icon"] {
|
|
27
|
+
display: grid;
|
|
28
|
+
place-items: center;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
[data-slot="copy-button-icon"] > * {
|
|
32
|
+
display: flex;
|
|
33
|
+
grid-area: 1 / 1;
|
|
34
|
+
transition-property: opacity, scale, filter;
|
|
35
|
+
transition-timing-function: cubic-bezier(0.23, 1, 0.32, 1);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* The hidden icon of each state. An icon takes the duration of the state that it goes to, so the leaving one is faster. */
|
|
39
|
+
[data-slot="copy-button-icon"] > [data-icon="check"],
|
|
40
|
+
[data-copied] [data-slot="copy-button-icon"] > [data-icon="copy"] {
|
|
41
|
+
filter: blur(3px);
|
|
42
|
+
opacity: 0;
|
|
43
|
+
scale: 0.3;
|
|
44
|
+
transition-duration: 200ms;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/* The shown icon of each state. */
|
|
48
|
+
[data-slot="copy-button-icon"] > [data-icon="copy"],
|
|
49
|
+
[data-copied] [data-slot="copy-button-icon"] > [data-icon="check"] {
|
|
50
|
+
filter: none;
|
|
51
|
+
opacity: 1;
|
|
52
|
+
scale: 1;
|
|
53
|
+
transition-duration: 300ms;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* A check that appears with its button, such as after the loading icon of a text that had to load, also fades in. */
|
|
57
|
+
@starting-style {
|
|
58
|
+
[data-copied] [data-slot="copy-button-icon"] > [data-icon="check"] {
|
|
59
|
+
filter: blur(3px);
|
|
60
|
+
opacity: 0;
|
|
61
|
+
scale: 0.3;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
@media (prefers-reduced-motion: reduce) {
|
|
66
|
+
[data-slot="copy-button-icon"] > * {
|
|
67
|
+
transition: none;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as useUIComponent } from "./nuxt-ui-DSQFzq3s.js";
|
|
2
|
+
import { a as useViteHubUIIcons } from "./config-Dk67emQt.js";
|
|
3
|
+
import { computed, defineComponent, h, ref, watch } from "vue";
|
|
2
4
|
//#region src/internal/image-preview.ts
|
|
3
5
|
function isImageUrl(value) {
|
|
4
6
|
if (!value) return false;
|
|
@@ -31,8 +33,9 @@ const ImagePreview = defineComponent({
|
|
|
31
33
|
setup(props) {
|
|
32
34
|
const failed = ref(false);
|
|
33
35
|
const label = computed(() => props.alt || props.title || "Image");
|
|
34
|
-
const UModal =
|
|
35
|
-
const UButton =
|
|
36
|
+
const UModal = useUIComponent("UModal");
|
|
37
|
+
const UButton = useUIComponent("UButton");
|
|
38
|
+
const icons = useViteHubUIIcons();
|
|
36
39
|
watch(() => props.src, () => {
|
|
37
40
|
failed.value = false;
|
|
38
41
|
});
|
|
@@ -68,7 +71,7 @@ const ImagePreview = defineComponent({
|
|
|
68
71
|
"aria-label": "Open original image",
|
|
69
72
|
class: "vh-image-dialog__action",
|
|
70
73
|
color: "neutral",
|
|
71
|
-
icon:
|
|
74
|
+
icon: icons.value.external,
|
|
72
75
|
external: true,
|
|
73
76
|
to: props.src,
|
|
74
77
|
target: "_blank",
|
|
@@ -79,7 +82,7 @@ const ImagePreview = defineComponent({
|
|
|
79
82
|
"aria-label": "Close image preview",
|
|
80
83
|
class: "vh-image-dialog__action",
|
|
81
84
|
color: "neutral",
|
|
82
|
-
icon:
|
|
85
|
+
icon: icons.value.close,
|
|
83
86
|
onClick: close,
|
|
84
87
|
variant: "ghost"
|
|
85
88
|
})
|
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
import "nostics";
|
|
2
|
+
//#region ../runtime/src/host.d.ts
|
|
3
|
+
declare global {
|
|
4
|
+
/** `wrangler types` adds the app's bindings to `Cloudflare.Env`. ViteHub reads it to type `getHostBinding()`. */
|
|
5
|
+
namespace Cloudflare {
|
|
6
|
+
interface Env {}
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
2
10
|
//#region ../runtime/src/index.d.ts
|
|
3
11
|
interface TraceContext {
|
|
4
12
|
id: string;
|