sparkdesign 0.0.1 → 0.2.6
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 +279 -5
- package/cli/dist/commands/add.js +84 -0
- package/cli/dist/commands/diff.js +54 -0
- package/cli/dist/commands/init.js +96 -0
- package/cli/dist/commands/list.js +25 -0
- package/cli/dist/index.js +37 -0
- package/cli/dist/utils/config.js +53 -0
- package/cli/dist/utils/registry.js +34 -0
- package/cli/dist/utils/tokens.js +90 -0
- package/cli/dist/utils/transform.js +19 -0
- package/cli/registry/basic/alert-dialog.tsx +180 -0
- package/cli/registry/basic/avatar.tsx +120 -0
- package/cli/registry/basic/button.tsx +100 -0
- package/cli/registry/basic/collapse.tsx +94 -0
- package/cli/registry/basic/collapsible-card.tsx +230 -0
- package/cli/registry/basic/collapsible.tsx +21 -0
- package/cli/registry/basic/dropdown-menu.tsx +254 -0
- package/cli/registry/basic/icon-button.tsx +66 -0
- package/cli/registry/basic/icons-inline.tsx +206 -0
- package/cli/registry/basic/kbd.tsx +50 -0
- package/cli/registry/basic/option-list.tsx +125 -0
- package/cli/registry/basic/pagination.tsx +132 -0
- package/cli/registry/basic/progress.tsx +42 -0
- package/cli/registry/basic/radio-group.tsx +69 -0
- package/cli/registry/basic/resizable.tsx +67 -0
- package/cli/registry/basic/scrollbar.tsx +114 -0
- package/cli/registry/basic/select.tsx +177 -0
- package/cli/registry/basic/skeleton.tsx +33 -0
- package/cli/registry/basic/slider.tsx +55 -0
- package/cli/registry/basic/sonner.tsx +104 -0
- package/cli/registry/basic/spinner.tsx +17 -0
- package/cli/registry/basic/switch.tsx +49 -0
- package/cli/registry/basic/table.tsx +117 -0
- package/cli/registry/basic/tabs.tsx +85 -0
- package/cli/registry/basic/tag.tsx +161 -0
- package/cli/registry/basic/theme-from-document.ts +10 -0
- package/cli/registry/basic/toggle.tsx +223 -0
- package/cli/registry/basic/tooltip.tsx +80 -0
- package/cli/registry/basic/typography.tsx +201 -0
- package/cli/registry/chat/browser-use-part.tsx +166 -0
- package/cli/registry/chat/chat-input/chat-input-folder-selector.tsx +185 -0
- package/cli/registry/chat/chat-input/chat-input-model-switcher.tsx +131 -0
- package/cli/registry/chat/chat-input/chat-input-textarea.tsx +67 -0
- package/cli/registry/chat/chat-input/compound.tsx +334 -0
- package/cli/registry/chat/chat-input/context.tsx +189 -0
- package/cli/registry/chat/chat-input/folder-permission-dialog.tsx +61 -0
- package/cli/registry/chat/chat-input/index.tsx +123 -0
- package/cli/registry/chat/chat-input/types.ts +77 -0
- package/cli/registry/chat/chat-input/useAutoResizeTextarea.ts +20 -0
- package/cli/registry/chat/code-block-part.tsx +151 -0
- package/cli/registry/chat/file-attachment.tsx +44 -0
- package/cli/registry/chat/file-card.tsx +68 -0
- package/cli/registry/chat/file-review-part.tsx +259 -0
- package/cli/registry/chat/folder-button.tsx +169 -0
- package/cli/registry/chat/generated-images-grid.tsx +56 -0
- package/cli/registry/chat/generation-status-bar.tsx +72 -0
- package/cli/registry/chat/image-attachment.tsx +166 -0
- package/cli/registry/chat/image-generating.tsx +281 -0
- package/cli/registry/chat/markdown.tsx +146 -0
- package/cli/registry/chat/mermaid-part.tsx +90 -0
- package/cli/registry/chat/permission-card.tsx +178 -0
- package/cli/registry/chat/plan-part.tsx +168 -0
- package/cli/registry/chat/question-part.tsx +70 -0
- package/cli/registry/chat/queue-indicator.tsx +234 -0
- package/cli/registry/chat/reasoning-step.tsx +358 -0
- package/cli/registry/chat/related-prompts.tsx +91 -0
- package/cli/registry/chat/request.tsx +38 -0
- package/cli/registry/chat/response.tsx +271 -0
- package/cli/registry/chat/send-button.tsx +94 -0
- package/cli/registry/chat/sidebar-menu.tsx +177 -0
- package/cli/registry/chat/streaming-markdown-block.tsx +111 -0
- package/cli/registry/chat/suggestion-part.tsx +165 -0
- package/cli/registry/chat/task-part.tsx +109 -0
- package/cli/registry/chat/terminal-code-block-part.tsx +69 -0
- package/cli/registry/chat/thinking-indicator.tsx +91 -0
- package/cli/registry/chat/tool-invocation-card.tsx +132 -0
- package/cli/registry/chat/user-question/UserQuestionCard.tsx +198 -0
- package/cli/registry/chat/user-question/UserQuestionFooter.tsx +66 -0
- package/cli/registry/chat/user-question/UserQuestionHeader.tsx +64 -0
- package/cli/registry/chat/user-question/index.tsx +340 -0
- package/cli/registry/chat/user-question/types.ts +61 -0
- package/cli/registry/chat/user-question/useUserQuestionKeyboard.ts +127 -0
- package/cli/registry/chat/user-question/useUserQuestionState.ts +165 -0
- package/cli/registry/chat/user-question-answer.tsx +62 -0
- package/cli/registry/lib/file-icon-maps.ts +150 -0
- package/cli/registry/lib/use-mermaid-render.ts +76 -0
- package/cli/registry/lib/utils.ts +6 -0
- package/cli/registry/meta.json +1 -0
- package/cli/registry/tokens/scale.css +299 -0
- package/cli/registry/tokens/theme.css +633 -0
- package/dist/_basePickBy-DnQN8w3y.js +151 -0
- package/dist/_basePickBy-a-kPMlkg.cjs +1 -0
- package/dist/_baseUniq-B-N2NQ50.js +614 -0
- package/dist/_baseUniq-Cc_zbSif.cjs +1 -0
- package/dist/arc-BQBhijZ6.js +83 -0
- package/dist/arc-mWQt0Yph.cjs +1 -0
- package/dist/architectureDiagram-VXUJARFQ-BMZEucno.cjs +36 -0
- package/dist/architectureDiagram-VXUJARFQ-DTdjD3Bp.js +4661 -0
- package/dist/blockDiagram-VD42YOAC-CzHn0yob.js +2256 -0
- package/dist/blockDiagram-VD42YOAC-DDxdHAlz.cjs +122 -0
- package/dist/c4Diagram-YG6GDRKO-4Gz0I4gj.cjs +10 -0
- package/dist/c4Diagram-YG6GDRKO-BIy--yVN.js +1580 -0
- package/dist/channel-BQn0o8bs.js +5 -0
- package/dist/channel-DaN7XniJ.cjs +1 -0
- package/dist/chunk-4BX2VUAB-BlQFTQqz.cjs +1 -0
- package/dist/chunk-4BX2VUAB-Czitj3Kc.js +8 -0
- package/dist/chunk-55IACEB6-DXacNZbO.js +8 -0
- package/dist/chunk-55IACEB6-DnDxpye9.cjs +1 -0
- package/dist/chunk-B4BG7PRW-CBdN0q_V.js +1375 -0
- package/dist/chunk-B4BG7PRW-DbGvUkGO.cjs +165 -0
- package/dist/chunk-DI55MBZ5-D1YJMs6x.cjs +220 -0
- package/dist/chunk-DI55MBZ5-NCQTvayw.js +1370 -0
- package/dist/chunk-FMBD7UC4-CsGMbrtr.js +19 -0
- package/dist/chunk-FMBD7UC4-Di7cUUh5.cjs +15 -0
- package/dist/chunk-QN33PNHL-0j5LC8Lm.cjs +1 -0
- package/dist/chunk-QN33PNHL-3GERZBRm.js +19 -0
- package/dist/chunk-QZHKN3VN-AVEY9ImQ.js +15 -0
- package/dist/chunk-QZHKN3VN-s8Z0a8mc.cjs +1 -0
- package/dist/chunk-TZMSLE5B-CAf87HPt.cjs +1 -0
- package/dist/chunk-TZMSLE5B-sbiflal0.js +64 -0
- package/dist/classDiagram-2ON5EDUG-Ct9JLIN2.cjs +1 -0
- package/dist/classDiagram-2ON5EDUG-Dzfrft3a.js +16 -0
- package/dist/classDiagram-v2-WZHVMYZB-Ct9JLIN2.cjs +1 -0
- package/dist/classDiagram-v2-WZHVMYZB-Dzfrft3a.js +16 -0
- package/dist/clone-Cde_NQ8V.js +8 -0
- package/dist/clone-DCNjWuM2.cjs +1 -0
- package/dist/cose-bilkent-S5V4N54A-0uLijMro.cjs +1 -0
- package/dist/cose-bilkent-S5V4N54A-Bb08N431.js +2608 -0
- package/dist/cytoscape.esm-CNUX3VTg.cjs +321 -0
- package/dist/cytoscape.esm-Cvf3sx9F.js +18704 -0
- package/dist/dagre-6UL2VRFP-CY_Wz5Zd.js +444 -0
- package/dist/dagre-6UL2VRFP-Dxe7_qZc.cjs +4 -0
- package/dist/defaultLocale-BgPVtth8.js +171 -0
- package/dist/defaultLocale-C4wbwF1n.cjs +1 -0
- package/dist/diagram-PSM6KHXK-D2bdb7MT.js +531 -0
- package/dist/diagram-PSM6KHXK-YF69SUjY.cjs +24 -0
- package/dist/diagram-QEK2KX5R-BpUSoh0-.js +217 -0
- package/dist/diagram-QEK2KX5R-DZPGteon.cjs +43 -0
- package/dist/diagram-S2PKOQOG-ht-zdvFG.cjs +24 -0
- package/dist/diagram-S2PKOQOG-zFeLJ50Z.js +142 -0
- package/dist/erDiagram-Q2GNP2WA-B38iJ6ts.js +841 -0
- package/dist/erDiagram-Q2GNP2WA-RgS80DDU.cjs +60 -0
- package/dist/flowDiagram-NV44I4VS-BHilOs2p.cjs +162 -0
- package/dist/flowDiagram-NV44I4VS-BrBJcoce.js +1620 -0
- package/dist/fonts/KaTeX_AMS-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_AMS-Regular.woff +0 -0
- package/dist/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- package/dist/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- package/dist/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/dist/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Main-Bold.ttf +0 -0
- package/dist/fonts/KaTeX_Main-Bold.woff +0 -0
- package/dist/fonts/KaTeX_Main-Bold.woff2 +0 -0
- package/dist/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- package/dist/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- package/dist/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/dist/fonts/KaTeX_Main-Italic.ttf +0 -0
- package/dist/fonts/KaTeX_Main-Italic.woff +0 -0
- package/dist/fonts/KaTeX_Main-Italic.woff2 +0 -0
- package/dist/fonts/KaTeX_Main-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Main-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Main-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- package/dist/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- package/dist/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/dist/fonts/KaTeX_Math-Italic.ttf +0 -0
- package/dist/fonts/KaTeX_Math-Italic.woff +0 -0
- package/dist/fonts/KaTeX_Math-Italic.woff2 +0 -0
- package/dist/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- package/dist/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- package/dist/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/dist/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- package/dist/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- package/dist/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/dist/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- package/dist/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Script-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Script-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Script-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Size1-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Size1-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Size2-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Size2-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Size3-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Size3-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Size4-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Size4-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- package/dist/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- package/dist/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- package/dist/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/dist/ganttDiagram-JELNMOA3-pZiJeFio.cjs +267 -0
- package/dist/ganttDiagram-JELNMOA3-tw6FhkWJ.js +2670 -0
- package/dist/gitGraphDiagram-V2S2FVAM-BWn5uIK5.js +699 -0
- package/dist/gitGraphDiagram-V2S2FVAM-DKKeG-9R.cjs +65 -0
- package/dist/graph-DIbblrZP.cjs +1 -0
- package/dist/graph-DPcK91G3.js +247 -0
- package/dist/infoDiagram-HS3SLOUP-B8gwwhct.cjs +2 -0
- package/dist/infoDiagram-HS3SLOUP-D47PNcP_.js +24 -0
- package/dist/init-CHZsXQcr.cjs +1 -0
- package/dist/init-DjUOC4st.js +16 -0
- package/dist/journeyDiagram-XKPGCS4Q-BG3cfhyU.js +834 -0
- package/dist/journeyDiagram-XKPGCS4Q-D8DVLJof.cjs +139 -0
- package/dist/kanban-definition-3W4ZIXB7-4OCnEouP.cjs +89 -0
- package/dist/kanban-definition-3W4ZIXB7-CWi_ssF9.js +719 -0
- package/dist/katex.css +1 -0
- package/dist/layout-Byuh8f-J.cjs +1 -0
- package/dist/layout-CdLdvj1j.js +1335 -0
- package/dist/linear-C2Q_PI9B.js +259 -0
- package/dist/linear-C69aPBW1.cjs +1 -0
- package/dist/mermaid.core-DBwAx_jp.cjs +249 -0
- package/dist/mermaid.core-gFR0XUlD.js +15300 -0
- package/dist/mindmap-definition-VGOIOE7T-8P7obVV4.cjs +68 -0
- package/dist/mindmap-definition-VGOIOE7T-DnOa7WJ9.js +784 -0
- package/dist/ordinal-B6-f3MAq.js +61 -0
- package/dist/ordinal-CagbB1m8.cjs +1 -0
- package/dist/pieDiagram-ADFJNKIX-5NAlvhMo.js +161 -0
- package/dist/pieDiagram-ADFJNKIX-CQBG4yR9.cjs +30 -0
- package/dist/qoder-design.css +2 -0
- package/dist/quadrantDiagram-AYHSOK5B-Oe4y7RZ0.cjs +7 -0
- package/dist/quadrantDiagram-AYHSOK5B-rh2DPEP1.js +1022 -0
- package/dist/registry/basic/alert-dialog.d.ts +40 -0
- package/dist/registry/basic/avatar.d.ts +30 -0
- package/dist/registry/basic/button.d.ts +16 -0
- package/dist/registry/basic/collapse.d.ts +22 -0
- package/dist/registry/basic/collapsible-card.d.ts +34 -0
- package/dist/registry/basic/collapsible.d.ts +15 -0
- package/dist/registry/basic/dropdown-menu.d.ts +52 -0
- package/dist/registry/basic/icon-button.d.ts +12 -0
- package/dist/registry/basic/icons-inline.d.ts +51 -0
- package/dist/registry/basic/kbd.d.ts +23 -0
- package/dist/registry/basic/option-list.d.ts +16 -0
- package/dist/registry/basic/pagination.d.ts +33 -0
- package/dist/registry/basic/progress.d.ts +18 -0
- package/dist/registry/basic/radio-group.d.ts +25 -0
- package/dist/registry/basic/resizable.d.ts +318 -0
- package/dist/registry/basic/scrollbar.d.ts +12 -0
- package/dist/registry/basic/select.d.ts +35 -0
- package/dist/registry/basic/skeleton.d.ts +10 -0
- package/dist/registry/basic/slider.d.ts +16 -0
- package/dist/registry/basic/sonner.d.ts +23 -0
- package/dist/registry/basic/spinner.d.ts +5 -0
- package/dist/registry/basic/switch.d.ts +20 -0
- package/dist/registry/basic/table.d.ts +18 -0
- package/dist/registry/basic/tabs.d.ts +29 -0
- package/dist/registry/basic/tag.d.ts +23 -0
- package/dist/registry/basic/theme-from-document.d.ts +10 -0
- package/dist/registry/basic/toggle.d.ts +29 -0
- package/dist/registry/basic/tooltip.d.ts +34 -0
- package/dist/registry/basic/typography.d.ts +76 -0
- package/dist/registry/chat/browser-use-part.d.ts +28 -0
- package/dist/registry/chat/chat-input/chat-input-folder-selector.d.ts +22 -0
- package/dist/registry/chat/chat-input/chat-input-model-switcher.d.ts +12 -0
- package/dist/registry/chat/chat-input/chat-input-textarea.d.ts +9 -0
- package/dist/registry/chat/chat-input/compound.d.ts +97 -0
- package/dist/registry/chat/chat-input/context.d.ts +64 -0
- package/dist/registry/chat/chat-input/folder-permission-dialog.d.ts +11 -0
- package/dist/registry/chat/chat-input/index.d.ts +34 -0
- package/dist/registry/chat/chat-input/types.d.ts +79 -0
- package/dist/registry/chat/chat-input/useAutoResizeTextarea.d.ts +7 -0
- package/dist/registry/chat/code-block-part.d.ts +23 -0
- package/dist/registry/chat/file-attachment.d.ts +19 -0
- package/dist/registry/chat/file-card.d.ts +10 -0
- package/dist/registry/chat/file-review-part.d.ts +30 -0
- package/dist/registry/chat/folder-button.d.ts +20 -0
- package/dist/registry/chat/generated-images-grid.d.ts +15 -0
- package/dist/registry/chat/generation-status-bar.d.ts +19 -0
- package/dist/registry/chat/image-attachment.d.ts +19 -0
- package/dist/registry/chat/image-generating.d.ts +15 -0
- package/dist/registry/chat/markdown.d.ts +8 -0
- package/dist/registry/chat/mermaid-part.d.ts +17 -0
- package/dist/registry/chat/permission-card.d.ts +24 -0
- package/dist/registry/chat/plan-part.d.ts +30 -0
- package/dist/registry/chat/question-part.d.ts +24 -0
- package/dist/registry/chat/queue-indicator.d.ts +27 -0
- package/dist/registry/chat/reasoning-step.d.ts +35 -0
- package/dist/registry/chat/related-prompts.d.ts +23 -0
- package/dist/registry/chat/request.d.ts +6 -0
- package/dist/registry/chat/response.d.ts +28 -0
- package/dist/registry/chat/send-button.d.ts +17 -0
- package/dist/registry/chat/sidebar-menu.d.ts +23 -0
- package/dist/registry/chat/streaming-markdown-block.d.ts +8 -0
- package/dist/registry/chat/suggestion-part.d.ts +28 -0
- package/dist/registry/chat/task-part.d.ts +28 -0
- package/dist/registry/chat/terminal-code-block-part.d.ts +18 -0
- package/dist/registry/chat/thinking-indicator.d.ts +14 -0
- package/dist/registry/chat/tool-invocation-card.d.ts +20 -0
- package/dist/registry/chat/user-question/UserQuestionCard.d.ts +30 -0
- package/dist/registry/chat/user-question/UserQuestionFooter.d.ts +18 -0
- package/dist/registry/chat/user-question/UserQuestionHeader.d.ts +20 -0
- package/dist/registry/chat/user-question/index.d.ts +7 -0
- package/dist/registry/chat/user-question/types.d.ts +52 -0
- package/dist/registry/chat/user-question/useUserQuestionKeyboard.d.ts +18 -0
- package/dist/registry/chat/user-question/useUserQuestionState.d.ts +26 -0
- package/dist/registry/chat/user-question-answer.d.ts +13 -0
- package/dist/registry/lib/file-icon-maps.d.ts +20 -0
- package/dist/registry/lib/use-mermaid-render.d.ts +5 -0
- package/dist/registry/lib/utils.d.ts +11 -0
- package/dist/requirementDiagram-UZGBJVZJ-DcWaCuXr.js +850 -0
- package/dist/requirementDiagram-UZGBJVZJ-gfdlrFiq.cjs +64 -0
- package/dist/sankeyDiagram-TZEHDZUN-CQIKFwD0.js +810 -0
- package/dist/sankeyDiagram-TZEHDZUN-DvPtzQvC.cjs +10 -0
- package/dist/scale.css +307 -0
- package/dist/sequenceDiagram-WL72ISMW-BNrsMagL.cjs +145 -0
- package/dist/sequenceDiagram-WL72ISMW-iCX3ckKx.js +2511 -0
- package/dist/spark-design.cjs.js +265 -0
- package/dist/spark-design.es.js +13207 -0
- package/dist/src/components/chat/BrowserUsePart/index.d.ts +7 -0
- package/dist/src/components/chat/ChatInput/index.d.ts +29 -0
- package/dist/src/components/chat/CodeBlockPart/index.d.ts +7 -0
- package/dist/src/components/chat/CollapsibleCard/index.d.ts +7 -0
- package/dist/src/components/chat/FileAttachment/index.d.ts +3 -0
- package/dist/src/components/chat/FileCard/index.d.ts +3 -0
- package/dist/src/components/chat/FileReviewPart/index.d.ts +7 -0
- package/dist/src/components/chat/FolderButton/index.d.ts +5 -0
- package/dist/src/components/chat/GeneratedImagesGrid/index.d.ts +7 -0
- package/dist/src/components/chat/GenerationStatusBar/index.d.ts +7 -0
- package/dist/src/components/chat/ImageAttachment/index.d.ts +3 -0
- package/dist/src/components/chat/ImageGenerating/index.d.ts +6 -0
- package/dist/src/components/chat/Markdown/demo-content.d.ts +1 -0
- package/dist/src/components/chat/Markdown/index.d.ts +7 -0
- package/dist/src/components/chat/MermaidPart/index.d.ts +6 -0
- package/dist/src/components/chat/PermissionCard/index.d.ts +4 -0
- package/dist/src/components/chat/PlanPart/index.d.ts +6 -0
- package/dist/src/components/chat/QuestionPart/index.d.ts +6 -0
- package/dist/src/components/chat/QueueIndicator/index.d.ts +4 -0
- package/dist/src/components/chat/ReasoningStep/index.d.ts +7 -0
- package/dist/src/components/chat/RelatedPrompts/index.d.ts +6 -0
- package/dist/src/components/chat/Request/index.d.ts +7 -0
- package/dist/src/components/chat/Response/StreamingMarkdownBlock.d.ts +6 -0
- package/dist/src/components/chat/Response/index.d.ts +6 -0
- package/dist/src/components/chat/SendButton/index.d.ts +5 -0
- package/dist/src/components/chat/SidebarMenu/index.d.ts +4 -0
- package/dist/src/components/chat/SuggestionPart/index.d.ts +6 -0
- package/dist/src/components/chat/TaskPart/index.d.ts +7 -0
- package/dist/src/components/chat/TerminalCodeBlockPart/index.d.ts +6 -0
- package/dist/src/components/chat/ThinkingIndicator/index.d.ts +6 -0
- package/dist/src/components/chat/ToolInvocationCard/index.d.ts +4 -0
- package/dist/src/components/chat/UserQuestion/index.d.ts +5 -0
- package/dist/src/components/chat/UserQuestionAnswer/index.d.ts +3 -0
- package/dist/src/components/foundation/AlertDialog/index.d.ts +20 -0
- package/dist/src/components/foundation/Avatar/index.d.ts +7 -0
- package/dist/src/components/foundation/Button/index.d.ts +7 -0
- package/dist/src/components/foundation/Collapse/index.d.ts +15 -0
- package/dist/src/components/foundation/Collapsible/index.d.ts +7 -0
- package/dist/src/components/foundation/CollapsibleSection/index.d.ts +43 -0
- package/dist/src/components/foundation/DropdownMenu/index.d.ts +19 -0
- package/dist/src/components/foundation/EllipsisText/index.d.ts +53 -0
- package/dist/src/components/foundation/IconButton/index.d.ts +7 -0
- package/dist/src/components/foundation/Kbd/index.d.ts +7 -0
- package/dist/src/components/foundation/OptionList/index.d.ts +7 -0
- package/dist/src/components/foundation/Pagination/index.d.ts +7 -0
- package/dist/src/components/foundation/Progress/index.d.ts +7 -0
- package/dist/src/components/foundation/RadioGroup/index.d.ts +7 -0
- package/dist/src/components/foundation/Resizable/index.d.ts +7 -0
- package/dist/src/components/foundation/Scrollbar/index.d.ts +7 -0
- package/dist/src/components/foundation/Select/index.d.ts +17 -0
- package/dist/src/components/foundation/Skeleton/index.d.ts +7 -0
- package/dist/src/components/foundation/Slider/index.d.ts +7 -0
- package/dist/src/components/foundation/Spinner/index.d.ts +7 -0
- package/dist/src/components/foundation/Switch/index.d.ts +38 -0
- package/dist/src/components/foundation/Table/index.d.ts +7 -0
- package/dist/src/components/foundation/Tabs/index.d.ts +7 -0
- package/dist/src/components/foundation/Tag/index.d.ts +10 -0
- package/dist/src/components/foundation/Toast/index.d.ts +12 -0
- package/dist/src/components/foundation/Toggle/index.d.ts +7 -0
- package/dist/src/components/foundation/Tooltip/index.d.ts +21 -0
- package/dist/src/components/foundation/Typography/index.d.ts +7 -0
- package/dist/src/components/index.d.ts +136 -0
- package/dist/src/icons/context.d.ts +26 -0
- package/dist/src/icons/types.d.ts +18 -0
- package/dist/src/lib/ThemeStyleContext.d.ts +21 -0
- package/dist/src/lib/file-icon.d.ts +16 -0
- package/dist/src/lib/i18n.d.ts +12 -0
- package/dist/src/lib/index.d.ts +10 -0
- package/dist/src/lib/motion.d.ts +22 -0
- package/dist/src/lib/utils.d.ts +11 -0
- package/dist/stateDiagram-FKZM4ZOC-DBvJ_eeL.cjs +1 -0
- package/dist/stateDiagram-FKZM4ZOC-ZVsJlaHJ.js +263 -0
- package/dist/stateDiagram-v2-4FDKWEC3-CB_nTHcE.js +16 -0
- package/dist/stateDiagram-v2-4FDKWEC3-Xkx17v6T.cjs +1 -0
- package/dist/theme.css +804 -0
- package/dist/timeline-definition-IT6M3QCI-BmGkYQiz.cjs +61 -0
- package/dist/timeline-definition-IT6M3QCI-Ck8zTt6w.js +795 -0
- package/dist/treemap-GDKQZRPO-B9sfERx8.js +17922 -0
- package/dist/treemap-GDKQZRPO-BVfJRs0Z.cjs +160 -0
- package/dist/xychartDiagram-PRI3JC2R-By_S8NzN.js +1340 -0
- package/dist/xychartDiagram-PRI3JC2R-CNfDrGxM.cjs +7 -0
- package/package.json +111 -9
- package/index.js +0 -5
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { ReactNode } from 'react'
|
|
2
|
+
|
|
3
|
+
/** 单个问题的选项 */
|
|
4
|
+
export interface UserQuestionOption {
|
|
5
|
+
label: string
|
|
6
|
+
description?: string
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
/** 单个问题 */
|
|
10
|
+
export interface UserQuestionItem {
|
|
11
|
+
question: string
|
|
12
|
+
header?: string
|
|
13
|
+
options: UserQuestionOption[]
|
|
14
|
+
multiSelect?: boolean
|
|
15
|
+
/** 是否允许用户自定义输入(默认 true) */
|
|
16
|
+
allowCustomInput?: boolean
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface UserQuestionLabels {
|
|
20
|
+
multiSelect?: string
|
|
21
|
+
singleSelect?: string
|
|
22
|
+
questionHeader?: string
|
|
23
|
+
skipAll?: string
|
|
24
|
+
continue?: string
|
|
25
|
+
submit?: string
|
|
26
|
+
sending?: string
|
|
27
|
+
customInputPlaceholder?: string
|
|
28
|
+
recommend?: string
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export const DEFAULT_LABELS: Required<UserQuestionLabels> = {
|
|
32
|
+
multiSelect: 'Multi-select',
|
|
33
|
+
singleSelect: 'Single-select',
|
|
34
|
+
questionHeader: 'Question',
|
|
35
|
+
skipAll: 'Skip All',
|
|
36
|
+
continue: 'Continue',
|
|
37
|
+
submit: 'Submit',
|
|
38
|
+
sending: 'Sending...',
|
|
39
|
+
customInputPlaceholder: 'Other (please specify)',
|
|
40
|
+
recommend: 'Recommend',
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/** 跳过问题时填充的默认值 */
|
|
44
|
+
export const NO_PREFERENCE_VALUE = '[No preference]'
|
|
45
|
+
|
|
46
|
+
export interface UserQuestionProps {
|
|
47
|
+
questions: UserQuestionItem[]
|
|
48
|
+
resetKey?: string
|
|
49
|
+
onAnswer: (answers: Record<string, string>) => void
|
|
50
|
+
onSkip: () => void
|
|
51
|
+
hasCustomText?: boolean
|
|
52
|
+
labels?: UserQuestionLabels
|
|
53
|
+
chat4Icon?: ReactNode
|
|
54
|
+
arrowUpSIcon?: ReactNode
|
|
55
|
+
arrowDownSIcon?: ReactNode
|
|
56
|
+
sparklingIcon?: ReactNode
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface UserQuestionHandle {
|
|
60
|
+
getAnswers: () => Record<string, string>
|
|
61
|
+
}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import { useEffect } from 'react'
|
|
2
|
+
import type { MutableRefObject } from 'react'
|
|
3
|
+
import type { UserQuestionItem, UserQuestionOption } from './types'
|
|
4
|
+
|
|
5
|
+
export interface UseUserQuestionKeyboardProps {
|
|
6
|
+
isSubmitting: boolean
|
|
7
|
+
currentQuestion: UserQuestionItem | undefined
|
|
8
|
+
currentOptions: UserQuestionOption[]
|
|
9
|
+
currentQuestionIndex: number
|
|
10
|
+
questions: UserQuestionItem[]
|
|
11
|
+
focusedOptionIndex: number
|
|
12
|
+
setFocusedOptionIndex: (n: number) => void
|
|
13
|
+
currentQuestionHasAnswer: boolean
|
|
14
|
+
getSelectedOptionIndex: (i: number) => number
|
|
15
|
+
shouldScrollToQuestionRef: MutableRefObject<boolean>
|
|
16
|
+
setCurrentQuestionIndex: (i: number) => void
|
|
17
|
+
handleOptionClick: (questionText: string, optionLabel: string, questionIndex: number) => void
|
|
18
|
+
handleContinue: () => void
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function isFocusInInput(activeEl: Element | null): boolean {
|
|
22
|
+
return (
|
|
23
|
+
activeEl instanceof HTMLInputElement ||
|
|
24
|
+
activeEl instanceof HTMLTextAreaElement ||
|
|
25
|
+
activeEl?.getAttribute('contenteditable') === 'true'
|
|
26
|
+
)
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function useUserQuestionKeyboard({
|
|
30
|
+
isSubmitting,
|
|
31
|
+
currentQuestion,
|
|
32
|
+
currentOptions,
|
|
33
|
+
currentQuestionIndex,
|
|
34
|
+
questions,
|
|
35
|
+
focusedOptionIndex,
|
|
36
|
+
setFocusedOptionIndex,
|
|
37
|
+
currentQuestionHasAnswer,
|
|
38
|
+
getSelectedOptionIndex,
|
|
39
|
+
shouldScrollToQuestionRef,
|
|
40
|
+
setCurrentQuestionIndex,
|
|
41
|
+
handleOptionClick,
|
|
42
|
+
handleContinue,
|
|
43
|
+
}: UseUserQuestionKeyboardProps) {
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
const keyHandlers: Record<string, (e: KeyboardEvent) => void> = {
|
|
46
|
+
ArrowDown(e) {
|
|
47
|
+
e.preventDefault()
|
|
48
|
+
if (focusedOptionIndex < currentOptions.length - 1) {
|
|
49
|
+
setFocusedOptionIndex(focusedOptionIndex + 1)
|
|
50
|
+
} else if (currentQuestionIndex < questions.length - 1) {
|
|
51
|
+
const nextIndex = currentQuestionIndex + 1
|
|
52
|
+
shouldScrollToQuestionRef.current = true
|
|
53
|
+
setCurrentQuestionIndex(nextIndex)
|
|
54
|
+
setFocusedOptionIndex(getSelectedOptionIndex(nextIndex))
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
ArrowUp(e) {
|
|
58
|
+
e.preventDefault()
|
|
59
|
+
if (focusedOptionIndex > 0) {
|
|
60
|
+
setFocusedOptionIndex(focusedOptionIndex - 1)
|
|
61
|
+
} else if (currentQuestionIndex > 0) {
|
|
62
|
+
const prevIndex = currentQuestionIndex - 1
|
|
63
|
+
shouldScrollToQuestionRef.current = true
|
|
64
|
+
setCurrentQuestionIndex(prevIndex)
|
|
65
|
+
setFocusedOptionIndex(getSelectedOptionIndex(prevIndex))
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
Enter(e) {
|
|
69
|
+
e.preventDefault()
|
|
70
|
+
if (currentQuestionHasAnswer) {
|
|
71
|
+
handleContinue()
|
|
72
|
+
} else if (currentQuestion && currentOptions[focusedOptionIndex]) {
|
|
73
|
+
handleOptionClick(
|
|
74
|
+
currentQuestion.question,
|
|
75
|
+
currentOptions[focusedOptionIndex].label,
|
|
76
|
+
currentQuestionIndex
|
|
77
|
+
)
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const handleKeyDown = (e: KeyboardEvent) => {
|
|
83
|
+
if (isSubmitting) return
|
|
84
|
+
if (isFocusInInput(document.activeElement)) return
|
|
85
|
+
|
|
86
|
+
const handler = keyHandlers[e.key]
|
|
87
|
+
if (handler) {
|
|
88
|
+
handler(e)
|
|
89
|
+
return
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
if (e.key >= '1' && e.key <= '9') {
|
|
93
|
+
const numberIndex = parseInt(e.key, 10) - 1
|
|
94
|
+
if (
|
|
95
|
+
numberIndex >= 0 &&
|
|
96
|
+
numberIndex < currentOptions.length &&
|
|
97
|
+
currentQuestion
|
|
98
|
+
) {
|
|
99
|
+
e.preventDefault()
|
|
100
|
+
handleOptionClick(
|
|
101
|
+
currentQuestion.question,
|
|
102
|
+
currentOptions[numberIndex].label,
|
|
103
|
+
currentQuestionIndex
|
|
104
|
+
)
|
|
105
|
+
setFocusedOptionIndex(numberIndex)
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
document.addEventListener('keydown', handleKeyDown)
|
|
111
|
+
return () => document.removeEventListener('keydown', handleKeyDown)
|
|
112
|
+
}, [
|
|
113
|
+
isSubmitting,
|
|
114
|
+
currentQuestion,
|
|
115
|
+
currentOptions,
|
|
116
|
+
currentQuestionIndex,
|
|
117
|
+
questions.length,
|
|
118
|
+
focusedOptionIndex,
|
|
119
|
+
setFocusedOptionIndex,
|
|
120
|
+
currentQuestionHasAnswer,
|
|
121
|
+
getSelectedOptionIndex,
|
|
122
|
+
setCurrentQuestionIndex,
|
|
123
|
+
handleOptionClick,
|
|
124
|
+
handleContinue,
|
|
125
|
+
shouldScrollToQuestionRef,
|
|
126
|
+
])
|
|
127
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { useState, useEffect, useCallback, useRef, useImperativeHandle } from 'react'
|
|
2
|
+
import type { Ref } from 'react'
|
|
3
|
+
import type { UserQuestionItem, UserQuestionHandle } from './types'
|
|
4
|
+
|
|
5
|
+
export interface UseUserQuestionStateProps {
|
|
6
|
+
questions: UserQuestionItem[]
|
|
7
|
+
resetKey?: string
|
|
8
|
+
onAnswer: (answers: Record<string, string>) => void
|
|
9
|
+
ref: Ref<UserQuestionHandle | null>
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export function useUserQuestionState({
|
|
13
|
+
questions,
|
|
14
|
+
resetKey,
|
|
15
|
+
ref,
|
|
16
|
+
}: UseUserQuestionStateProps) {
|
|
17
|
+
const [currentQuestionIndex, setCurrentQuestionIndex] = useState(0)
|
|
18
|
+
const [answers, setAnswers] = useState<Record<string, string[]>>({})
|
|
19
|
+
const [customInputs, setCustomInputs] = useState<Record<string, string>>({})
|
|
20
|
+
const [focusedOptionIndex, setFocusedOptionIndex] = useState(0)
|
|
21
|
+
const [isSubmitting, setIsSubmitting] = useState(false)
|
|
22
|
+
const [maxQuestionHeight, setMaxQuestionHeight] = useState<number | undefined>(undefined)
|
|
23
|
+
|
|
24
|
+
const prevIndexRef = useRef(currentQuestionIndex)
|
|
25
|
+
const prevResetKeyRef = useRef(resetKey)
|
|
26
|
+
const scrollContainerRef = useRef<HTMLDivElement>(null)
|
|
27
|
+
const questionRefs = useRef<Map<number, HTMLDivElement>>(new Map())
|
|
28
|
+
const currentIndexRef = useRef(currentQuestionIndex)
|
|
29
|
+
const isProgrammaticScrollRef = useRef(false)
|
|
30
|
+
const shouldScrollToQuestionRef = useRef(false)
|
|
31
|
+
const customInputRefs = useRef<Map<string, HTMLInputElement>>(new Map())
|
|
32
|
+
|
|
33
|
+
const getSelectedOptionIndex = useCallback(
|
|
34
|
+
(questionIndex: number) => {
|
|
35
|
+
const question = questions[questionIndex]
|
|
36
|
+
if (!question) return 0
|
|
37
|
+
const selectedLabels = answers[question.question] || []
|
|
38
|
+
if (selectedLabels.length === 0) return 0
|
|
39
|
+
const options = question.options || []
|
|
40
|
+
const selectedIndex = options.findIndex((opt) => selectedLabels.includes(opt.label))
|
|
41
|
+
return selectedIndex >= 0 ? selectedIndex : 0
|
|
42
|
+
},
|
|
43
|
+
[questions, answers]
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
useImperativeHandle(
|
|
47
|
+
ref,
|
|
48
|
+
() => ({
|
|
49
|
+
getAnswers: () => {
|
|
50
|
+
const formattedAnswers: Record<string, string> = {}
|
|
51
|
+
for (const question of questions) {
|
|
52
|
+
const selected = answers[question.question] || []
|
|
53
|
+
const customInput = customInputs[question.question]?.trim()
|
|
54
|
+
const allParts: string[] = []
|
|
55
|
+
if (selected.length > 0) allParts.push(...selected)
|
|
56
|
+
if (customInput) allParts.push(customInput)
|
|
57
|
+
if (allParts.length > 0) {
|
|
58
|
+
formattedAnswers[question.question] = allParts.join(', ')
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return formattedAnswers
|
|
62
|
+
},
|
|
63
|
+
}),
|
|
64
|
+
[answers, customInputs, questions]
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
useEffect(() => {
|
|
68
|
+
if (prevResetKeyRef.current !== resetKey) {
|
|
69
|
+
setIsSubmitting(false)
|
|
70
|
+
setCurrentQuestionIndex(0)
|
|
71
|
+
currentIndexRef.current = 0
|
|
72
|
+
setAnswers({})
|
|
73
|
+
setCustomInputs({})
|
|
74
|
+
setFocusedOptionIndex(0)
|
|
75
|
+
prevResetKeyRef.current = resetKey
|
|
76
|
+
questionRefs.current.clear()
|
|
77
|
+
customInputRefs.current.clear()
|
|
78
|
+
}
|
|
79
|
+
}, [resetKey])
|
|
80
|
+
|
|
81
|
+
useEffect(() => {
|
|
82
|
+
if (prevIndexRef.current !== currentQuestionIndex) {
|
|
83
|
+
currentIndexRef.current = currentQuestionIndex
|
|
84
|
+
if (shouldScrollToQuestionRef.current) {
|
|
85
|
+
isProgrammaticScrollRef.current = true
|
|
86
|
+
const questionEl = questionRefs.current.get(currentQuestionIndex)
|
|
87
|
+
const container = scrollContainerRef.current
|
|
88
|
+
if (questionEl && container) {
|
|
89
|
+
const handleScrollEnd = () => {
|
|
90
|
+
isProgrammaticScrollRef.current = false
|
|
91
|
+
shouldScrollToQuestionRef.current = false
|
|
92
|
+
container.removeEventListener('scrollend', handleScrollEnd)
|
|
93
|
+
}
|
|
94
|
+
container.addEventListener('scrollend', handleScrollEnd, { once: true })
|
|
95
|
+
questionEl.scrollIntoView({ behavior: 'smooth', block: 'nearest' })
|
|
96
|
+
} else {
|
|
97
|
+
isProgrammaticScrollRef.current = false
|
|
98
|
+
shouldScrollToQuestionRef.current = false
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
prevIndexRef.current = currentQuestionIndex
|
|
102
|
+
}
|
|
103
|
+
}, [currentQuestionIndex])
|
|
104
|
+
|
|
105
|
+
useEffect(() => {
|
|
106
|
+
const timer = setTimeout(() => {
|
|
107
|
+
let maxHeight = 0
|
|
108
|
+
questionRefs.current.forEach((el) => {
|
|
109
|
+
const h = el.getBoundingClientRect().height
|
|
110
|
+
if (h > maxHeight) maxHeight = h
|
|
111
|
+
})
|
|
112
|
+
if (maxHeight > 0) setMaxQuestionHeight(maxHeight)
|
|
113
|
+
}, 50)
|
|
114
|
+
return () => clearTimeout(timer)
|
|
115
|
+
}, [questions, resetKey])
|
|
116
|
+
|
|
117
|
+
useEffect(() => {
|
|
118
|
+
const container = scrollContainerRef.current
|
|
119
|
+
if (!container) return
|
|
120
|
+
const observer = new IntersectionObserver(
|
|
121
|
+
(entries) => {
|
|
122
|
+
if (isProgrammaticScrollRef.current) return
|
|
123
|
+
let maxRatio = 0
|
|
124
|
+
let visibleIndex = currentIndexRef.current
|
|
125
|
+
entries.forEach((entry) => {
|
|
126
|
+
if (entry.isIntersecting && entry.intersectionRatio > maxRatio) {
|
|
127
|
+
maxRatio = entry.intersectionRatio
|
|
128
|
+
questionRefs.current.forEach((el, index) => {
|
|
129
|
+
if (el === entry.target) visibleIndex = index
|
|
130
|
+
})
|
|
131
|
+
}
|
|
132
|
+
})
|
|
133
|
+
if (visibleIndex !== currentIndexRef.current && maxRatio > 0.5) {
|
|
134
|
+
currentIndexRef.current = visibleIndex
|
|
135
|
+
setCurrentQuestionIndex(visibleIndex)
|
|
136
|
+
setFocusedOptionIndex(getSelectedOptionIndex(visibleIndex))
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{ root: container, threshold: [0, 0.25, 0.5, 0.75, 1] }
|
|
140
|
+
)
|
|
141
|
+
questionRefs.current.forEach((el) => {
|
|
142
|
+
if (el?.isConnected) observer.observe(el)
|
|
143
|
+
})
|
|
144
|
+
return () => observer.disconnect()
|
|
145
|
+
}, [questions, getSelectedOptionIndex])
|
|
146
|
+
|
|
147
|
+
return {
|
|
148
|
+
currentQuestionIndex,
|
|
149
|
+
setCurrentQuestionIndex,
|
|
150
|
+
answers,
|
|
151
|
+
setAnswers,
|
|
152
|
+
customInputs,
|
|
153
|
+
setCustomInputs,
|
|
154
|
+
focusedOptionIndex,
|
|
155
|
+
setFocusedOptionIndex,
|
|
156
|
+
isSubmitting,
|
|
157
|
+
setIsSubmitting,
|
|
158
|
+
maxQuestionHeight,
|
|
159
|
+
scrollContainerRef,
|
|
160
|
+
questionRefs,
|
|
161
|
+
shouldScrollToQuestionRef,
|
|
162
|
+
customInputRefs,
|
|
163
|
+
getSelectedOptionIndex,
|
|
164
|
+
}
|
|
165
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { memo } from 'react'
|
|
2
|
+
import type { ReactNode } from 'react'
|
|
3
|
+
import { QuestionAnswerLine } from '../basic/icons-inline'
|
|
4
|
+
|
|
5
|
+
export interface UserQuestionAnswerLabels {
|
|
6
|
+
answer?: string
|
|
7
|
+
answers?: string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface UserQuestionAnswerProps {
|
|
11
|
+
answers: Record<string, string>
|
|
12
|
+
showHeader?: boolean
|
|
13
|
+
labels?: UserQuestionAnswerLabels
|
|
14
|
+
className?: string
|
|
15
|
+
questionAnswerIcon?: ReactNode
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const DEFAULT_LABELS: Required<UserQuestionAnswerLabels> = {
|
|
19
|
+
answer: 'Answer',
|
|
20
|
+
answers: 'Answers',
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const iconClass = 'w-4 h-4 shrink-0 text-text-tertiary'
|
|
24
|
+
|
|
25
|
+
export const UserQuestionAnswer = memo(function UserQuestionAnswer({
|
|
26
|
+
answers,
|
|
27
|
+
showHeader = true,
|
|
28
|
+
labels: labelsProp,
|
|
29
|
+
className = '',
|
|
30
|
+
questionAnswerIcon,
|
|
31
|
+
}: UserQuestionAnswerProps) {
|
|
32
|
+
const labels = { ...DEFAULT_LABELS, ...labelsProp }
|
|
33
|
+
const entries = Object.entries(answers)
|
|
34
|
+
const defaultIcon = questionAnswerIcon ?? <QuestionAnswerLine className={iconClass} />
|
|
35
|
+
|
|
36
|
+
if (entries.length === 0) return null
|
|
37
|
+
|
|
38
|
+
return (
|
|
39
|
+
<div
|
|
40
|
+
className={`rounded-lg border border-border-tertiary bg-bg-container overflow-hidden mx-2 ${className}`.trim()}
|
|
41
|
+
>
|
|
42
|
+
{showHeader && (
|
|
43
|
+
<div className="flex items-center gap-2 pl-3 pr-3 h-8 border-b border-border-tertiary">
|
|
44
|
+
{defaultIcon}
|
|
45
|
+
<span className="text-xs leading-xs text-text-tertiary">
|
|
46
|
+
{entries.length === 1 ? labels.answer : labels.answers}
|
|
47
|
+
</span>
|
|
48
|
+
</div>
|
|
49
|
+
)}
|
|
50
|
+
<div className="flex flex-col gap-3 p-3 text-xs leading-xs">
|
|
51
|
+
{entries.map(([question, answer], idx) => (
|
|
52
|
+
<div key={idx} className="flex flex-col gap-1">
|
|
53
|
+
<span className="font-medium text-text">{question}</span>
|
|
54
|
+
<span className="text-text-tertiary">{answer}</span>
|
|
55
|
+
</div>
|
|
56
|
+
))}
|
|
57
|
+
</div>
|
|
58
|
+
</div>
|
|
59
|
+
)
|
|
60
|
+
})
|
|
61
|
+
|
|
62
|
+
UserQuestionAnswer.displayName = 'UserQuestionAnswer'
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
2
|
+
// Seti 字体字符映射(与 QodeChatPanel 完全一致:FileReviewPart 内联 + utils/fileIconMaps.js)
|
|
3
|
+
// 用于 qoder-seti.woff,勿改为 VSCode vs-seti 码位(E051/E055 等)
|
|
4
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
5
|
+
export const SETI_CHAR_MAP: Record<string, string> = {
|
|
6
|
+
javascript: '\ue054',
|
|
7
|
+
typescript: '\ue099',
|
|
8
|
+
react: '\ue07d',
|
|
9
|
+
json: '\ue059',
|
|
10
|
+
html: '\ue048',
|
|
11
|
+
css: '\ue01d',
|
|
12
|
+
python: '\ue07b',
|
|
13
|
+
java: '\ue050',
|
|
14
|
+
go: '\ue039',
|
|
15
|
+
rust: '\ue082',
|
|
16
|
+
php: '\ue070',
|
|
17
|
+
ruby: '\ue081',
|
|
18
|
+
vue: '\ue09d',
|
|
19
|
+
svelte: '\ue090',
|
|
20
|
+
markdown: '\ue060',
|
|
21
|
+
yaml: '\ue0a7',
|
|
22
|
+
xml: '\ue0a5',
|
|
23
|
+
shell: '\ue089',
|
|
24
|
+
sass: '\ue084',
|
|
25
|
+
settings: '\ue019',
|
|
26
|
+
default: '\ue023',
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
30
|
+
// Seti 图标颜色(hex,用于 Seti 字体渲染 style.color)
|
|
31
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
32
|
+
export const SETI_COLOR_MAP: Record<string, string> = {
|
|
33
|
+
javascript: '#F8CA3E',
|
|
34
|
+
typescript: '#1E8DEE',
|
|
35
|
+
react: '#1E8DEE',
|
|
36
|
+
json: '#F8CA3E',
|
|
37
|
+
html: '#1E8DEE',
|
|
38
|
+
css: '#1E8DEE',
|
|
39
|
+
python: '#1E8DEE',
|
|
40
|
+
java: '#E84654',
|
|
41
|
+
go: '#1E8DEE',
|
|
42
|
+
rust: '#6A89E6',
|
|
43
|
+
php: '#AE4EE2',
|
|
44
|
+
ruby: '#E84654',
|
|
45
|
+
vue: '#4EBD35',
|
|
46
|
+
svelte: '#E84654',
|
|
47
|
+
markdown: '#1E8DEE',
|
|
48
|
+
yaml: '#AE4EE2',
|
|
49
|
+
xml: '#F18745',
|
|
50
|
+
shell: '#4EBD35',
|
|
51
|
+
sass: '#E84654',
|
|
52
|
+
settings: '#6A89E6',
|
|
53
|
+
default: '#6A89E6',
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
57
|
+
// 扩展名 -> 类型名
|
|
58
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
59
|
+
export const FILE_TYPE_MAP: Record<string, string> = {
|
|
60
|
+
js: 'javascript',
|
|
61
|
+
jsx: 'react',
|
|
62
|
+
ts: 'typescript',
|
|
63
|
+
tsx: 'typescript',
|
|
64
|
+
json: 'json',
|
|
65
|
+
html: 'html',
|
|
66
|
+
css: 'css',
|
|
67
|
+
scss: 'sass',
|
|
68
|
+
sass: 'sass',
|
|
69
|
+
less: 'css',
|
|
70
|
+
py: 'python',
|
|
71
|
+
java: 'java',
|
|
72
|
+
go: 'go',
|
|
73
|
+
rs: 'rust',
|
|
74
|
+
php: 'php',
|
|
75
|
+
rb: 'ruby',
|
|
76
|
+
vue: 'vue',
|
|
77
|
+
svelte: 'svelte',
|
|
78
|
+
md: 'markdown',
|
|
79
|
+
yml: 'yaml',
|
|
80
|
+
yaml: 'yaml',
|
|
81
|
+
xml: 'xml',
|
|
82
|
+
sh: 'shell',
|
|
83
|
+
bash: 'shell',
|
|
84
|
+
zsh: 'shell',
|
|
85
|
+
config: 'settings',
|
|
86
|
+
conf: 'settings',
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
90
|
+
// 类型 -> Tailwind 设计 token 类(无 Seti 字体时用通用图标+此类)
|
|
91
|
+
// ═══════════════════════════════════════════════════════════════════════════════
|
|
92
|
+
export const TYPE_TO_TOKEN_CLASS: Record<string, string> = {
|
|
93
|
+
javascript: 'text-info',
|
|
94
|
+
typescript: 'text-info',
|
|
95
|
+
react: 'text-info',
|
|
96
|
+
json: 'text-info',
|
|
97
|
+
html: 'text-info',
|
|
98
|
+
css: 'text-info',
|
|
99
|
+
python: 'text-teal',
|
|
100
|
+
java: 'text-error',
|
|
101
|
+
go: 'text-info',
|
|
102
|
+
rust: 'text-text-tertiary',
|
|
103
|
+
php: 'text-text-tertiary',
|
|
104
|
+
ruby: 'text-error',
|
|
105
|
+
vue: 'text-success',
|
|
106
|
+
svelte: 'text-error',
|
|
107
|
+
markdown: 'text-text-secondary',
|
|
108
|
+
yaml: 'text-text-tertiary',
|
|
109
|
+
xml: 'text-text-tertiary',
|
|
110
|
+
shell: 'text-success',
|
|
111
|
+
sass: 'text-error',
|
|
112
|
+
settings: 'text-text-tertiary',
|
|
113
|
+
default: 'text-text-tertiary',
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function getSetiIconType(fileType?: string, filename?: string): string {
|
|
117
|
+
let iconType: string | null = null
|
|
118
|
+
|
|
119
|
+
if (filename && typeof filename === 'string' && filename.trim()) {
|
|
120
|
+
const lastDot = filename.lastIndexOf('.')
|
|
121
|
+
if (lastDot > 0 && lastDot < filename.length - 1) {
|
|
122
|
+
const ext = filename.substring(lastDot + 1).toLowerCase().trim()
|
|
123
|
+
if (ext && FILE_TYPE_MAP[ext]) iconType = FILE_TYPE_MAP[ext]
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
if (!iconType && fileType && typeof fileType === 'string' && fileType.trim()) {
|
|
128
|
+
const lower = fileType.toLowerCase().trim()
|
|
129
|
+
if (FILE_TYPE_MAP[lower]) iconType = FILE_TYPE_MAP[lower]
|
|
130
|
+
else if (SETI_CHAR_MAP[lower]) iconType = lower
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
return iconType || 'default'
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export function getSetiIcon(fileType?: string, filename?: string): string {
|
|
137
|
+
const iconType = getSetiIconType(fileType, filename)
|
|
138
|
+
return SETI_CHAR_MAP[iconType] ?? SETI_CHAR_MAP.default
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export function getSetiIconColor(fileType?: string, filename?: string): string {
|
|
142
|
+
const type = getSetiIconType(fileType, filename)
|
|
143
|
+
return SETI_COLOR_MAP[type] ?? SETI_COLOR_MAP.default
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/** 返回 Tailwind token 类名,用于通用文件图标(非 Seti 字体) */
|
|
147
|
+
export function getFileIconColorClass(fileType?: string, filename?: string): string {
|
|
148
|
+
const type = getSetiIconType(fileType, filename)
|
|
149
|
+
return TYPE_TO_TOKEN_CLASS[type] ?? TYPE_TO_TOKEN_CLASS.default
|
|
150
|
+
}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react'
|
|
2
|
+
|
|
3
|
+
export interface UseMermaidRenderResult {
|
|
4
|
+
svg: string
|
|
5
|
+
error: string
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
/** 根据 data-style 取 Mermaid 节点圆角(px),与 scale.css 各风格对应 */
|
|
9
|
+
function getMermaidRadius(dataStyle: string): string {
|
|
10
|
+
const style = (dataStyle || 'neutral').toLowerCase()
|
|
11
|
+
if (style === 'soft') return '12px'
|
|
12
|
+
if (style === 'sharp') return '0'
|
|
13
|
+
if (style === 'dense') return '4px'
|
|
14
|
+
return '6px' // neutral / compact 等
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** 从 document 读取当前 data-style(仅在无传入 dataStyle 时使用) */
|
|
18
|
+
function getDataStyleFromDocument(): string {
|
|
19
|
+
if (typeof document === 'undefined') return 'neutral'
|
|
20
|
+
return (
|
|
21
|
+
document.documentElement.getAttribute('data-style') ||
|
|
22
|
+
document.body?.getAttribute('data-style') ||
|
|
23
|
+
'neutral'
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export function useMermaidRender(
|
|
28
|
+
content: string,
|
|
29
|
+
id: string,
|
|
30
|
+
dataStyle?: string
|
|
31
|
+
): UseMermaidRenderResult {
|
|
32
|
+
const [svg, setSvg] = useState('')
|
|
33
|
+
const [error, setError] = useState('')
|
|
34
|
+
const style = dataStyle ?? getDataStyleFromDocument()
|
|
35
|
+
const radius = getMermaidRadius(style)
|
|
36
|
+
|
|
37
|
+
useEffect(() => {
|
|
38
|
+
let cancelled = false
|
|
39
|
+
const run = async () => {
|
|
40
|
+
setError('')
|
|
41
|
+
setSvg('')
|
|
42
|
+
if (!content) return
|
|
43
|
+
try {
|
|
44
|
+
const mod = await import('mermaid')
|
|
45
|
+
const mermaid = mod?.default ?? mod
|
|
46
|
+
const themeCSS = [
|
|
47
|
+
/* 矩形:直接设 rx/ry */
|
|
48
|
+
`.node rect { rx: ${radius}; ry: ${radius}; }`,
|
|
49
|
+
`.cluster rect { rx: ${radius}; ry: ${radius}; }`,
|
|
50
|
+
`.label rect { rx: ${radius}; ry: ${radius}; }`,
|
|
51
|
+
`.edgeLabel rect { rx: ${radius}; ry: ${radius}; }`,
|
|
52
|
+
/* 菱形、六边形等 polygon:描边圆角 */
|
|
53
|
+
`.node polygon { stroke-linejoin: round; stroke-linecap: round; }`,
|
|
54
|
+
`.node path { stroke-linejoin: round; stroke-linecap: round; }`,
|
|
55
|
+
`.cluster polygon { stroke-linejoin: round; stroke-linecap: round; }`,
|
|
56
|
+
`.cluster path { stroke-linejoin: round; stroke-linecap: round; }`,
|
|
57
|
+
].join('\n')
|
|
58
|
+
mermaid.initialize({
|
|
59
|
+
startOnLoad: false,
|
|
60
|
+
securityLevel: 'strict',
|
|
61
|
+
theme: 'dark',
|
|
62
|
+
themeCSS,
|
|
63
|
+
})
|
|
64
|
+
const renderId = `mermaid-${id.replace(/:/g, '')}`
|
|
65
|
+
const { svg: nextSvg } = await mermaid.render(renderId, content)
|
|
66
|
+
if (!cancelled) setSvg(nextSvg ?? '')
|
|
67
|
+
} catch (e) {
|
|
68
|
+
if (!cancelled) setError((e as Error)?.message ?? 'Failed to render mermaid.')
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
run()
|
|
72
|
+
return () => { cancelled = true }
|
|
73
|
+
}, [id, content, radius])
|
|
74
|
+
|
|
75
|
+
return { svg, error }
|
|
76
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"button":{"files":["basic/button.tsx"],"dependencies":["class-variance-authority","clsx"],"peerDependencies":["react","react-dom"]},"icon-button":{"files":["basic/icon-button.tsx"],"dependencies":["class-variance-authority","clsx"],"peerDependencies":["react","react-dom"]},"tooltip":{"files":["basic/tooltip.tsx","basic/icons-inline.tsx","basic/theme-from-document.ts"],"dependencies":["@radix-ui/react-tooltip","class-variance-authority","clsx","framer-motion"],"peerDependencies":["react","react-dom"]},"dropdown-menu":{"files":["basic/dropdown-menu.tsx","basic/icons-inline.tsx","basic/theme-from-document.ts"],"dependencies":["@radix-ui/react-dropdown-menu","class-variance-authority","clsx","framer-motion"],"peerDependencies":["react","react-dom"]},"alert-dialog":{"files":["basic/alert-dialog.tsx","basic/theme-from-document.ts"],"dependencies":["@radix-ui/react-alert-dialog","class-variance-authority","clsx","framer-motion"],"peerDependencies":["react","react-dom"]},"progress":{"files":["basic/progress.tsx"],"dependencies":["@radix-ui/react-progress","clsx"],"peerDependencies":["react","react-dom"]},"skeleton":{"files":["basic/skeleton.tsx"],"dependencies":["class-variance-authority","clsx"],"peerDependencies":["react","react-dom"]},"kbd":{"files":["basic/kbd.tsx"],"dependencies":["clsx"],"peerDependencies":["react","react-dom"]},"tag":{"files":["basic/tag.tsx","basic/icons-inline.tsx"],"dependencies":["class-variance-authority","clsx","framer-motion"],"peerDependencies":["react","react-dom"]},"tabs":{"files":["basic/tabs.tsx"],"dependencies":["@radix-ui/react-tabs","class-variance-authority","clsx"],"peerDependencies":["react","react-dom"]},"switch":{"files":["basic/switch.tsx"],"dependencies":["@radix-ui/react-switch","class-variance-authority","clsx"],"peerDependencies":["react","react-dom"]},"avatar":{"files":["basic/avatar.tsx"],"dependencies":["@radix-ui/react-avatar","class-variance-authority","clsx"],"peerDependencies":["react","react-dom"]},"collapse":{"files":["basic/collapse.tsx","basic/icons-inline.tsx"],"dependencies":["@radix-ui/react-accordion","clsx"],"peerDependencies":["react","react-dom"]},"slider":{"files":["basic/slider.tsx"],"dependencies":["@radix-ui/react-slider","clsx"],"peerDependencies":["react","react-dom"]},"select":{"files":["basic/select.tsx","basic/icons-inline.tsx","basic/theme-from-document.ts"],"dependencies":["@radix-ui/react-select","clsx"],"peerDependencies":["react","react-dom"]},"table":{"files":["basic/table.tsx"],"dependencies":["clsx"],"peerDependencies":["react","react-dom"]},"toggle":{"files":["basic/toggle.tsx"],"dependencies":["@radix-ui/react-toggle","@radix-ui/react-toggle-group","class-variance-authority","clsx"],"peerDependencies":["react","react-dom"]},"radio-group":{"files":["basic/radio-group.tsx"],"dependencies":["@radix-ui/react-radio-group","class-variance-authority","clsx"],"peerDependencies":["react","react-dom"]},"typography":{"files":["basic/typography.tsx"],"dependencies":["clsx"],"peerDependencies":["react","react-dom"]},"spinner":{"files":["basic/spinner.tsx","basic/icons-inline.tsx"],"dependencies":["clsx"],"peerDependencies":["react","react-dom"]},"pagination":{"files":["basic/pagination.tsx","basic/icons-inline.tsx"],"dependencies":["clsx"],"peerDependencies":["react","react-dom"]},"option-list":{"files":["basic/option-list.tsx"],"dependencies":["class-variance-authority","clsx"],"peerDependencies":["react","react-dom"]},"collapsible":{"files":["basic/collapsible.tsx"],"dependencies":["@radix-ui/react-collapsible","clsx"],"peerDependencies":["react","react-dom"]},"resizable":{"files":["basic/resizable.tsx"],"dependencies":["react-resizable-panels","clsx"],"peerDependencies":["react","react-dom"]},"scrollbar":{"files":["basic/scrollbar.tsx"],"dependencies":["clsx"],"peerDependencies":["react","react-dom"]},"sonner":{"files":["basic/sonner.tsx","basic/theme-from-document.ts"],"dependencies":["sonner"],"peerDependencies":["react","react-dom"]},"send-button":{"files":["chat/send-button.tsx","basic/icons-inline.tsx"],"dependencies":["class-variance-authority","clsx"],"peerDependencies":["react","react-dom"]},"folder-button":{"files":["chat/folder-button.tsx","basic/icons-inline.tsx"],"dependencies":["class-variance-authority","clsx","framer-motion"],"peerDependencies":["react","react-dom"]},"file-attachment":{"files":["chat/file-attachment.tsx","basic/tag.tsx","basic/icons-inline.tsx"],"dependencies":["class-variance-authority","clsx","framer-motion"],"peerDependencies":["react","react-dom"]},"image-attachment":{"files":["chat/image-attachment.tsx","basic/icon-button.tsx","basic/icons-inline.tsx"],"dependencies":["class-variance-authority","clsx"],"peerDependencies":["react","react-dom"]},"file-card":{"files":["chat/file-card.tsx","basic/icons-inline.tsx"],"dependencies":["clsx"],"peerDependencies":["react","react-dom"]},"request":{"files":["chat/request.tsx"],"dependencies":["clsx"],"peerDependencies":["react","react-dom"]},"related-prompts":{"files":["chat/related-prompts.tsx","basic/tooltip.tsx","basic/icons-inline.tsx","basic/theme-from-document.ts"],"dependencies":["@radix-ui/react-tooltip","clsx","framer-motion"],"peerDependencies":["react","react-dom"]},"permission-card":{"files":["chat/permission-card.tsx","basic/button.tsx","basic/icons-inline.tsx"],"dependencies":["class-variance-authority","clsx"],"peerDependencies":["react","react-dom"]},"suggestion-part":{"files":["chat/suggestion-part.tsx","basic/button.tsx","basic/dropdown-menu.tsx","basic/icons-inline.tsx","basic/theme-from-document.ts"],"dependencies":["@radix-ui/react-dropdown-menu","class-variance-authority","clsx","framer-motion"],"peerDependencies":["react","react-dom"]},"generation-status-bar":{"files":["chat/generation-status-bar.tsx"],"dependencies":["clsx"],"peerDependencies":["react","react-dom"]},"queue-indicator":{"files":["chat/queue-indicator.tsx","basic/tooltip.tsx","basic/icon-button.tsx","basic/icons-inline.tsx","basic/theme-from-document.ts"],"dependencies":["@radix-ui/react-tooltip","class-variance-authority","clsx","framer-motion"],"peerDependencies":["react","react-dom"]},"tool-invocation-card":{"files":["chat/tool-invocation-card.tsx","basic/icons-inline.tsx"],"dependencies":["clsx"],"peerDependencies":["react","react-dom"]},"reasoning-step":{"files":["chat/reasoning-step.tsx","basic/icons-inline.tsx"],"dependencies":["clsx","framer-motion"],"peerDependencies":["react","react-dom"]},"sidebar-menu":{"files":["chat/sidebar-menu.tsx","basic/dropdown-menu.tsx","basic/icons-inline.tsx","basic/theme-from-document.ts"],"dependencies":["@radix-ui/react-dropdown-menu","class-variance-authority","clsx","framer-motion"],"peerDependencies":["react","react-dom"]},"user-question-answer":{"files":["chat/user-question-answer.tsx","basic/icons-inline.tsx"],"dependencies":["clsx"],"peerDependencies":["react","react-dom"]},"generated-images-grid":{"files":["chat/generated-images-grid.tsx"],"dependencies":["clsx"],"peerDependencies":["react","react-dom"]},"thinking-indicator":{"files":["chat/thinking-indicator.tsx"],"dependencies":["clsx","framer-motion"],"peerDependencies":["react","react-dom"]},"image-generating":{"files":["chat/image-generating.tsx","basic/icons-inline.tsx"],"dependencies":["clsx","framer-motion"],"peerDependencies":["react","react-dom"]},"markdown":{"files":["chat/markdown.tsx"],"dependencies":["react-markdown","remark-gfm","remark-math","rehype-katex","clsx"],"peerDependencies":["react","react-dom"]},"streaming-markdown-block":{"files":["chat/streaming-markdown-block.tsx","chat/markdown.tsx"],"dependencies":["clsx"],"peerDependencies":["react","react-dom"]},"response":{"files":["chat/response.tsx"],"dependencies":["clsx","framer-motion"],"peerDependencies":["react","react-dom"]},"chat-input":{"files":["chat/chat-input/index.tsx","chat/chat-input/types.ts","chat/chat-input/useAutoResizeTextarea.ts","chat/chat-input/chat-input-textarea.tsx","chat/chat-input/chat-input-folder-selector.tsx","chat/chat-input/chat-input-model-switcher.tsx","chat/chat-input/folder-permission-dialog.tsx","chat/send-button.tsx","chat/folder-button.tsx","chat/generation-status-bar.tsx","basic/icon-button.tsx","basic/dropdown-menu.tsx","basic/alert-dialog.tsx","basic/icons-inline.tsx"],"dependencies":["class-variance-authority","clsx"],"peerDependencies":["react","react-dom"]},"user-question":{"files":["chat/user-question.tsx","basic/button.tsx","basic/icon-button.tsx","basic/option-list.tsx","basic/kbd.tsx","basic/icons-inline.tsx"],"dependencies":["clsx","framer-motion"],"peerDependencies":["react","react-dom"]}}
|