sparkdesign 0.4.3 → 0.4.5
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 +205 -111
- 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/shimmering-text.d.ts +27 -0
- package/dist/registry/basic/sidebar-menu.d.ts +23 -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/ask-user-part.d.ts +24 -0
- package/dist/registry/chat/browser-action-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/hint-banner.d.ts +28 -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/queue-indicator.d.ts +27 -0
- package/dist/registry/chat/reasoning-step/compound.d.ts +17 -0
- package/dist/registry/chat/reasoning-step/context.d.ts +10 -0
- package/dist/registry/chat/reasoning-step/index.d.ts +14 -0
- package/dist/registry/chat/reasoning-step/types.d.ts +95 -0
- package/dist/registry/chat/related-prompts.d.ts +23 -0
- package/dist/registry/chat/response/compound.d.ts +25 -0
- package/dist/registry/chat/response/context.d.ts +9 -0
- package/dist/registry/chat/response/index.d.ts +15 -0
- package/dist/registry/chat/response/types.d.ts +99 -0
- package/dist/registry/chat/send-button.d.ts +17 -0
- package/dist/registry/chat/streaming-markdown-block.d.ts +8 -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-message.d.ts +6 -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/compound.d.ts +37 -0
- package/dist/registry/chat/user-question/context.d.ts +55 -0
- package/dist/registry/chat/user-question/index.d.ts +15 -0
- package/dist/registry/chat/user-question/types.d.ts +52 -0
- package/dist/registry/chat/user-question/useUserQuestionKeyboard.d.ts +17 -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/computed.css +103 -0
- package/dist/scale/config.css +110 -0
- package/dist/scale/index.css +30 -0
- package/dist/scale/presets/compact.css +30 -0
- package/dist/scale/presets/dense.css +64 -0
- package/dist/scale/presets/sharp.css +40 -0
- package/dist/scale/presets/soft.css +16 -0
- package/dist/scale.css +13 -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 +13486 -0
- package/dist/src/components/basic/AlertDialog/index.d.ts +20 -0
- package/dist/src/components/basic/Avatar/index.d.ts +7 -0
- package/dist/src/components/basic/Button/index.d.ts +7 -0
- package/dist/src/components/basic/Collapse/index.d.ts +15 -0
- package/dist/src/components/basic/Collapsible/index.d.ts +7 -0
- package/dist/src/components/basic/CollapsibleCard/index.d.ts +7 -0
- package/dist/src/components/basic/CollapsibleSection/index.d.ts +43 -0
- package/dist/src/components/basic/DropdownMenu/index.d.ts +19 -0
- package/dist/src/components/basic/EllipsisText/index.d.ts +53 -0
- package/dist/src/components/basic/IconButton/index.d.ts +7 -0
- package/dist/src/components/basic/Kbd/index.d.ts +7 -0
- package/dist/src/components/basic/OptionList/index.d.ts +7 -0
- package/dist/src/components/basic/Pagination/index.d.ts +7 -0
- package/dist/src/components/basic/Progress/index.d.ts +7 -0
- package/dist/src/components/basic/RadioGroup/index.d.ts +7 -0
- package/dist/src/components/basic/Resizable/index.d.ts +7 -0
- package/dist/src/components/basic/Scrollbar/index.d.ts +7 -0
- package/dist/src/components/basic/Select/index.d.ts +17 -0
- package/dist/src/components/basic/ShimmeringText/index.d.ts +7 -0
- package/dist/src/components/basic/SidebarMenu/index.d.ts +4 -0
- package/dist/src/components/basic/Skeleton/index.d.ts +7 -0
- package/dist/src/components/basic/Slider/index.d.ts +7 -0
- package/dist/src/components/basic/Spinner/index.d.ts +7 -0
- package/dist/src/components/basic/Switch/index.d.ts +38 -0
- package/dist/src/components/basic/Table/index.d.ts +7 -0
- package/dist/src/components/basic/Tabs/index.d.ts +7 -0
- package/dist/src/components/basic/Tag/index.d.ts +10 -0
- package/dist/src/components/basic/Toast/index.d.ts +12 -0
- package/dist/src/components/basic/Toggle/index.d.ts +7 -0
- package/dist/src/components/basic/Tooltip/index.d.ts +21 -0
- package/dist/src/components/basic/Typography/index.d.ts +7 -0
- package/dist/src/components/chat/AskUserPart/index.d.ts +6 -0
- package/dist/src/components/chat/BrowserActionPart/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/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/HintBanner/index.d.ts +6 -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/QueueIndicator/index.d.ts +4 -0
- package/dist/src/components/chat/ReasoningStep/index.d.ts +13 -0
- package/dist/src/components/chat/RelatedPrompts/index.d.ts +6 -0
- package/dist/src/components/chat/Response/StreamingMarkdownBlock.d.ts +6 -0
- package/dist/src/components/chat/Response/index.d.ts +16 -0
- package/dist/src/components/chat/SendButton/index.d.ts +5 -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/UserMessage/index.d.ts +7 -0
- package/dist/src/components/chat/UserQuestion/index.d.ts +19 -0
- package/dist/src/components/chat/UserQuestionAnswer/index.d.ts +3 -0
- package/dist/src/components/index.d.ts +138 -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 +134 -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-base.css +270 -0
- package/dist/theme.css +17 -0
- package/dist/themes/dark-parchment.css +133 -0
- package/dist/themes/dark-qoder.css +133 -0
- package/dist/themes/light-parchment.css +124 -0
- package/dist/themes/light-qoder.css +132 -0
- package/dist/timeline-definition-IT6M3QCI-BmGkYQiz.cjs +61 -0
- package/dist/timeline-definition-IT6M3QCI-Ck8zTt6w.js +795 -0
- package/dist/tokens/CLAUDE.md +305 -0
- package/dist/tokens/index.css +35 -0
- package/dist/tokens/scale/computed.css +103 -0
- package/dist/tokens/scale/config.css +110 -0
- package/dist/tokens/scale/index.css +30 -0
- package/dist/tokens/scale/presets/compact.css +30 -0
- package/dist/tokens/scale/presets/dense.css +64 -0
- package/dist/tokens/scale/presets/sharp.css +40 -0
- package/dist/tokens/scale/presets/soft.css +16 -0
- package/dist/tokens/scale.css +13 -0
- package/dist/tokens/scrollbar-utility.css +35 -0
- package/dist/tokens/theme-base.css +270 -0
- package/dist/tokens/theme.css +17 -0
- package/dist/tokens/themes/dark-parchment.css +133 -0
- package/dist/tokens/themes/dark-qoder.css +133 -0
- package/dist/tokens/themes/light-parchment.css +124 -0
- package/dist/tokens/themes/light-qoder.css +132 -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 +128 -19
- /package/{dist → cli/dist}/commands/add.js +0 -0
- /package/{dist → cli/dist}/commands/diff.js +0 -0
- /package/{dist → cli/dist}/commands/init.js +0 -0
- /package/{dist → cli/dist}/commands/list.js +0 -0
- /package/{dist → cli/dist}/index.js +0 -0
- /package/{dist → cli/dist}/utils/config.js +0 -0
- /package/{dist → cli/dist}/utils/registry.js +0 -0
- /package/{dist → cli/dist}/utils/tokens.js +0 -0
- /package/{dist → cli/dist}/utils/transform.js +0 -0
- /package/{registry → cli/registry}/__tests__/basic/button.test.tsx +0 -0
- /package/{registry → cli/registry}/__tests__/chat/markdown.test.tsx +0 -0
- /package/{registry → cli/registry}/__tests__/chat/thinking-indicator.test.tsx +0 -0
- /package/{registry → cli/registry}/__tests__/chat/tool-invocation-card.test.tsx +0 -0
- /package/{registry → cli/registry}/basic/alert-dialog.tsx +0 -0
- /package/{registry → cli/registry}/basic/avatar.tsx +0 -0
- /package/{registry → cli/registry}/basic/button.tsx +0 -0
- /package/{registry → cli/registry}/basic/collapse.tsx +0 -0
- /package/{registry → cli/registry}/basic/collapsible-card.tsx +0 -0
- /package/{registry → cli/registry}/basic/collapsible.tsx +0 -0
- /package/{registry → cli/registry}/basic/dropdown-menu.tsx +0 -0
- /package/{registry → cli/registry}/basic/icon-button.tsx +0 -0
- /package/{registry → cli/registry}/basic/icons-inline.tsx +0 -0
- /package/{registry → cli/registry}/basic/kbd.tsx +0 -0
- /package/{registry → cli/registry}/basic/option-list.tsx +0 -0
- /package/{registry → cli/registry}/basic/pagination.tsx +0 -0
- /package/{registry → cli/registry}/basic/progress.tsx +0 -0
- /package/{registry → cli/registry}/basic/radio-group.tsx +0 -0
- /package/{registry → cli/registry}/basic/resizable.tsx +0 -0
- /package/{registry → cli/registry}/basic/scrollbar.tsx +0 -0
- /package/{registry → cli/registry}/basic/select.tsx +0 -0
- /package/{registry → cli/registry}/basic/shimmering-text.tsx +0 -0
- /package/{registry → cli/registry}/basic/sidebar-menu.tsx +0 -0
- /package/{registry → cli/registry}/basic/skeleton.tsx +0 -0
- /package/{registry → cli/registry}/basic/slider.tsx +0 -0
- /package/{registry → cli/registry}/basic/sonner.tsx +0 -0
- /package/{registry → cli/registry}/basic/spinner.tsx +0 -0
- /package/{registry → cli/registry}/basic/switch.tsx +0 -0
- /package/{registry → cli/registry}/basic/table.tsx +0 -0
- /package/{registry → cli/registry}/basic/tabs.tsx +0 -0
- /package/{registry → cli/registry}/basic/tag.tsx +0 -0
- /package/{registry → cli/registry}/basic/theme-from-document.ts +0 -0
- /package/{registry → cli/registry}/basic/toggle.tsx +0 -0
- /package/{registry → cli/registry}/basic/tooltip.tsx +0 -0
- /package/{registry → cli/registry}/basic/typography.tsx +0 -0
- /package/{registry → cli/registry}/chat/ask-user-part.tsx +0 -0
- /package/{registry → cli/registry}/chat/browser-action-part.tsx +0 -0
- /package/{registry → cli/registry}/chat/chat-input/chat-input-folder-selector.tsx +0 -0
- /package/{registry → cli/registry}/chat/chat-input/chat-input-model-switcher.tsx +0 -0
- /package/{registry → cli/registry}/chat/chat-input/chat-input-textarea.tsx +0 -0
- /package/{registry → cli/registry}/chat/chat-input/compound.tsx +0 -0
- /package/{registry → cli/registry}/chat/chat-input/context.tsx +0 -0
- /package/{registry → cli/registry}/chat/chat-input/folder-permission-dialog.tsx +0 -0
- /package/{registry → cli/registry}/chat/chat-input/index.tsx +0 -0
- /package/{registry → cli/registry}/chat/chat-input/types.ts +0 -0
- /package/{registry → cli/registry}/chat/chat-input/useAutoResizeTextarea.ts +0 -0
- /package/{registry → cli/registry}/chat/code-block-part.tsx +0 -0
- /package/{registry → cli/registry}/chat/file-attachment.tsx +0 -0
- /package/{registry → cli/registry}/chat/file-card.tsx +0 -0
- /package/{registry → cli/registry}/chat/file-review-part.tsx +0 -0
- /package/{registry → cli/registry}/chat/folder-button.tsx +0 -0
- /package/{registry → cli/registry}/chat/generated-images-grid.tsx +0 -0
- /package/{registry → cli/registry}/chat/generation-status-bar.tsx +0 -0
- /package/{registry → cli/registry}/chat/hint-banner.tsx +0 -0
- /package/{registry → cli/registry}/chat/image-attachment.tsx +0 -0
- /package/{registry → cli/registry}/chat/image-generating.tsx +0 -0
- /package/{registry → cli/registry}/chat/markdown.tsx +0 -0
- /package/{registry → cli/registry}/chat/mermaid-part.tsx +0 -0
- /package/{registry → cli/registry}/chat/permission-card.tsx +0 -0
- /package/{registry → cli/registry}/chat/plan-part.tsx +0 -0
- /package/{registry → cli/registry}/chat/queue-indicator.tsx +0 -0
- /package/{registry → cli/registry}/chat/reasoning-step/compound.tsx +0 -0
- /package/{registry → cli/registry}/chat/reasoning-step/context.tsx +0 -0
- /package/{registry → cli/registry}/chat/reasoning-step/index.tsx +0 -0
- /package/{registry → cli/registry}/chat/reasoning-step/types.ts +0 -0
- /package/{registry → cli/registry}/chat/related-prompts.tsx +0 -0
- /package/{registry → cli/registry}/chat/response/compound.tsx +0 -0
- /package/{registry → cli/registry}/chat/response/context.tsx +0 -0
- /package/{registry → cli/registry}/chat/response/index.tsx +0 -0
- /package/{registry → cli/registry}/chat/response/types.ts +0 -0
- /package/{registry → cli/registry}/chat/send-button.tsx +0 -0
- /package/{registry → cli/registry}/chat/streaming-markdown-block.tsx +0 -0
- /package/{registry → cli/registry}/chat/task-part.tsx +0 -0
- /package/{registry → cli/registry}/chat/terminal-code-block-part.tsx +0 -0
- /package/{registry → cli/registry}/chat/thinking-indicator.tsx +0 -0
- /package/{registry → cli/registry}/chat/tool-invocation-card.tsx +0 -0
- /package/{registry → cli/registry}/chat/user-message.tsx +0 -0
- /package/{registry → cli/registry}/chat/user-question/UserQuestionCard.tsx +0 -0
- /package/{registry → cli/registry}/chat/user-question/UserQuestionFooter.tsx +0 -0
- /package/{registry → cli/registry}/chat/user-question/UserQuestionHeader.tsx +0 -0
- /package/{registry → cli/registry}/chat/user-question/compound.tsx +0 -0
- /package/{registry → cli/registry}/chat/user-question/context.tsx +0 -0
- /package/{registry → cli/registry}/chat/user-question/index.tsx +0 -0
- /package/{registry → cli/registry}/chat/user-question/types.ts +0 -0
- /package/{registry → cli/registry}/chat/user-question/useUserQuestionKeyboard.ts +0 -0
- /package/{registry → cli/registry}/chat/user-question/useUserQuestionState.ts +0 -0
- /package/{registry → cli/registry}/chat/user-question-answer.tsx +0 -0
- /package/{registry → cli/registry}/lib/file-icon-maps.ts +0 -0
- /package/{registry → cli/registry}/lib/use-mermaid-render.ts +0 -0
- /package/{registry → cli/registry}/lib/utils.ts +0 -0
- /package/{registry → cli/registry}/meta.json +0 -0
- /package/{registry → cli/registry}/tokens/index.css +0 -0
- /package/{registry → cli/registry}/tokens/scale/computed.css +0 -0
- /package/{registry → cli/registry}/tokens/scale/config.css +0 -0
- /package/{registry → cli/registry}/tokens/scale/index.css +0 -0
- /package/{registry → cli/registry}/tokens/scale/presets/compact.css +0 -0
- /package/{registry → cli/registry}/tokens/scale/presets/dense.css +0 -0
- /package/{registry → cli/registry}/tokens/scale/presets/sharp.css +0 -0
- /package/{registry → cli/registry}/tokens/scale/presets/soft.css +0 -0
- /package/{registry → cli/registry}/tokens/scale.css +0 -0
- /package/{registry → cli/registry}/tokens/scrollbar-utility.css +0 -0
- /package/{registry → cli/registry}/tokens/theme.css +0 -0
- /package/{registry → cli/registry}/tokens/themes/dark-parchment.css +0 -0
- /package/{registry → cli/registry}/tokens/themes/dark-qoder.css +0 -0
- /package/{registry → cli/registry}/tokens/themes/light-parchment.css +0 -0
- /package/{registry → cli/registry}/tokens/themes/light-qoder.css +0 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* [INPUT]: labels、推荐/跳过/继续 handlers、disabled、sparklingIcon
|
|
3
|
+
* [OUTPUT]: (JSX.Element) - 底部操作区
|
|
4
|
+
* [POS]: registry/chat/user-question
|
|
5
|
+
*/
|
|
6
|
+
import type { ReactNode } from 'react';
|
|
7
|
+
import type { UserQuestionLabels } from './types';
|
|
8
|
+
export interface UserQuestionFooterProps {
|
|
9
|
+
labels: Required<UserQuestionLabels>;
|
|
10
|
+
sparklingIcon: ReactNode;
|
|
11
|
+
isSubmitting: boolean;
|
|
12
|
+
hasCustomText: boolean;
|
|
13
|
+
allQuestionsAnswered: boolean;
|
|
14
|
+
onRecommend: () => void;
|
|
15
|
+
onSkip: () => void;
|
|
16
|
+
onContinue: () => void;
|
|
17
|
+
}
|
|
18
|
+
export declare function UserQuestionFooter({ labels, sparklingIcon, isSubmitting, hasCustomText, allQuestionsAnswered, onRecommend, onSkip, onContinue, }: UserQuestionFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* [INPUT]: 当前题、题数、labels、图标、上一/下一、disabled
|
|
3
|
+
* [OUTPUT]: (JSX.Element) - 顶部标题与题号切换
|
|
4
|
+
* [POS]: registry/chat/user-question
|
|
5
|
+
*/
|
|
6
|
+
import type { ReactNode } from 'react';
|
|
7
|
+
import type { UserQuestionItem } from './types';
|
|
8
|
+
import type { UserQuestionLabels } from './types';
|
|
9
|
+
export interface UserQuestionHeaderProps {
|
|
10
|
+
currentQuestion: UserQuestionItem | undefined;
|
|
11
|
+
questionsLength: number;
|
|
12
|
+
labels: Required<UserQuestionLabels>;
|
|
13
|
+
chat4Icon: ReactNode;
|
|
14
|
+
arrowUpSIcon: ReactNode;
|
|
15
|
+
arrowDownSIcon: ReactNode;
|
|
16
|
+
currentQuestionIndex: number;
|
|
17
|
+
onPrevious: () => void;
|
|
18
|
+
onNext: () => void;
|
|
19
|
+
}
|
|
20
|
+
export declare function UserQuestionHeader({ currentQuestion, questionsLength, labels, chat4Icon, arrowUpSIcon, arrowDownSIcon, currentQuestionIndex, onPrevious, onNext, }: UserQuestionHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { UserQuestionItem } from './types';
|
|
3
|
+
export interface UserQuestionHeaderProps {
|
|
4
|
+
className?: string;
|
|
5
|
+
}
|
|
6
|
+
export declare function UserQuestionHeader({ className }: UserQuestionHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export declare namespace UserQuestionHeader {
|
|
8
|
+
var displayName: string;
|
|
9
|
+
}
|
|
10
|
+
export interface UserQuestionCardProps {
|
|
11
|
+
question: UserQuestionItem;
|
|
12
|
+
qIndex: number;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function UserQuestionCard({ question, qIndex, className }: UserQuestionCardProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare namespace UserQuestionCard {
|
|
17
|
+
var displayName: string;
|
|
18
|
+
}
|
|
19
|
+
export interface UserQuestionCardsProps {
|
|
20
|
+
className?: string;
|
|
21
|
+
children?: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export declare function UserQuestionCards({ className, children }: UserQuestionCardsProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export declare namespace UserQuestionCards {
|
|
25
|
+
var displayName: string;
|
|
26
|
+
}
|
|
27
|
+
export interface UserQuestionFooterProps {
|
|
28
|
+
className?: string;
|
|
29
|
+
}
|
|
30
|
+
export declare function UserQuestionFooter({ className }: UserQuestionFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
export declare namespace UserQuestionFooter {
|
|
32
|
+
var displayName: string;
|
|
33
|
+
}
|
|
34
|
+
export declare function UserQuestionDefaultLayout(): import("react/jsx-runtime").JSX.Element;
|
|
35
|
+
export declare namespace UserQuestionDefaultLayout {
|
|
36
|
+
var displayName: string;
|
|
37
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { ReactNode, MutableRefObject, Dispatch, SetStateAction } from 'react';
|
|
2
|
+
import { type UserQuestionItem, type UserQuestionLabels, type UserQuestionHandle } from './types';
|
|
3
|
+
export interface UserQuestionContextValue {
|
|
4
|
+
questions: UserQuestionItem[];
|
|
5
|
+
labels: Required<UserQuestionLabels>;
|
|
6
|
+
currentQuestionIndex: number;
|
|
7
|
+
setCurrentQuestionIndex: (i: number) => void;
|
|
8
|
+
answers: Record<string, string[]>;
|
|
9
|
+
setAnswers: Dispatch<SetStateAction<Record<string, string[]>>>;
|
|
10
|
+
customInputs: Record<string, string>;
|
|
11
|
+
setCustomInputs: Dispatch<SetStateAction<Record<string, string>>>;
|
|
12
|
+
focusedOptionIndex: number;
|
|
13
|
+
setFocusedOptionIndex: (i: number) => void;
|
|
14
|
+
isSubmitting: boolean;
|
|
15
|
+
setIsSubmitting: (v: boolean) => void;
|
|
16
|
+
maxQuestionHeight: number | undefined;
|
|
17
|
+
scrollContainerRef: MutableRefObject<HTMLDivElement | null>;
|
|
18
|
+
questionRefs: MutableRefObject<Map<number, HTMLDivElement>>;
|
|
19
|
+
customInputRefs: MutableRefObject<Map<string, HTMLInputElement>>;
|
|
20
|
+
setShouldScrollToQuestion: (v: boolean) => void;
|
|
21
|
+
currentQuestion: UserQuestionItem | undefined;
|
|
22
|
+
currentOptions: {
|
|
23
|
+
label: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
}[];
|
|
26
|
+
allQuestionsAnswered: boolean;
|
|
27
|
+
currentQuestionHasAnswer: boolean;
|
|
28
|
+
getSelectedOptionIndex: (i: number) => number;
|
|
29
|
+
handleOptionClick: (questionText: string, optionLabel: string, questionIndex: number) => void;
|
|
30
|
+
handlePrevious: () => void;
|
|
31
|
+
handleNext: () => void;
|
|
32
|
+
handleContinue: () => void;
|
|
33
|
+
handleSkip: () => void;
|
|
34
|
+
handleRecommend: () => void;
|
|
35
|
+
chat4Icon: ReactNode;
|
|
36
|
+
arrowUpSIcon: ReactNode;
|
|
37
|
+
arrowDownSIcon: ReactNode;
|
|
38
|
+
sparklingIcon: ReactNode;
|
|
39
|
+
hasCustomText: boolean;
|
|
40
|
+
}
|
|
41
|
+
export declare function useUserQuestionContext(): UserQuestionContextValue;
|
|
42
|
+
export interface UserQuestionRootProps {
|
|
43
|
+
questions: UserQuestionItem[];
|
|
44
|
+
resetKey?: string;
|
|
45
|
+
onAnswer: (answers: Record<string, string>) => void;
|
|
46
|
+
onSkip: () => void;
|
|
47
|
+
hasCustomText?: boolean;
|
|
48
|
+
labels?: UserQuestionLabels;
|
|
49
|
+
chat4Icon?: ReactNode;
|
|
50
|
+
arrowUpSIcon?: ReactNode;
|
|
51
|
+
arrowDownSIcon?: ReactNode;
|
|
52
|
+
sparklingIcon?: ReactNode;
|
|
53
|
+
children?: ReactNode;
|
|
54
|
+
}
|
|
55
|
+
export declare const UserQuestionRootProvider: import("react").ForwardRefExoticComponent<UserQuestionRootProps & import("react").RefAttributes<UserQuestionHandle>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { useUserQuestionContext, type UserQuestionRootProps } from './context';
|
|
2
|
+
import { UserQuestionHeader, UserQuestionCard, UserQuestionCards, UserQuestionFooter, UserQuestionDefaultLayout } from './compound';
|
|
3
|
+
import type { UserQuestionProps, UserQuestionHandle } from './types';
|
|
4
|
+
export type { UserQuestionOption, UserQuestionItem, UserQuestionLabels, UserQuestionProps, UserQuestionHandle, } from './types';
|
|
5
|
+
export { DEFAULT_LABELS, NO_PREFERENCE_VALUE } from './types';
|
|
6
|
+
export interface UserQuestionCompound {
|
|
7
|
+
Root: React.ForwardRefExoticComponent<UserQuestionRootProps & React.RefAttributes<UserQuestionHandle>>;
|
|
8
|
+
Header: typeof UserQuestionHeader;
|
|
9
|
+
Card: typeof UserQuestionCard;
|
|
10
|
+
Cards: typeof UserQuestionCards;
|
|
11
|
+
Footer: typeof UserQuestionFooter;
|
|
12
|
+
DefaultLayout: typeof UserQuestionDefaultLayout;
|
|
13
|
+
}
|
|
14
|
+
export declare const UserQuestion: React.ForwardRefExoticComponent<UserQuestionProps & React.RefAttributes<UserQuestionHandle>> & UserQuestionCompound;
|
|
15
|
+
export { useUserQuestionContext, UserQuestionDefaultLayout };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* [INPUT]: 无(类型定义模块)
|
|
3
|
+
* [OUTPUT]: 导出 UserQuestion 相关类型与常量
|
|
4
|
+
* [POS]: registry/chat/user-question - 唯一类型来源
|
|
5
|
+
*
|
|
6
|
+
* [PROTOCOL]:
|
|
7
|
+
* 1. 类型/常量变更时同步更新 index 的 re-export
|
|
8
|
+
*/
|
|
9
|
+
import type { ReactNode } from 'react';
|
|
10
|
+
/** 单个问题的选项 */
|
|
11
|
+
export interface UserQuestionOption {
|
|
12
|
+
label: string;
|
|
13
|
+
description?: string;
|
|
14
|
+
}
|
|
15
|
+
/** 单个问题 */
|
|
16
|
+
export interface UserQuestionItem {
|
|
17
|
+
question: string;
|
|
18
|
+
header?: string;
|
|
19
|
+
options: UserQuestionOption[];
|
|
20
|
+
multiSelect?: boolean;
|
|
21
|
+
/** 是否允许用户自定义输入(默认 true) */
|
|
22
|
+
allowCustomInput?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export interface UserQuestionLabels {
|
|
25
|
+
multiSelect?: string;
|
|
26
|
+
singleSelect?: string;
|
|
27
|
+
questionHeader?: string;
|
|
28
|
+
skipAll?: string;
|
|
29
|
+
continue?: string;
|
|
30
|
+
submit?: string;
|
|
31
|
+
sending?: string;
|
|
32
|
+
customInputPlaceholder?: string;
|
|
33
|
+
recommend?: string;
|
|
34
|
+
}
|
|
35
|
+
export declare const DEFAULT_LABELS: Required<UserQuestionLabels>;
|
|
36
|
+
/** 跳过问题时填充的默认值 */
|
|
37
|
+
export declare const NO_PREFERENCE_VALUE = "[No preference]";
|
|
38
|
+
export interface UserQuestionProps {
|
|
39
|
+
questions: UserQuestionItem[];
|
|
40
|
+
resetKey?: string;
|
|
41
|
+
onAnswer: (answers: Record<string, string>) => void;
|
|
42
|
+
onSkip: () => void;
|
|
43
|
+
hasCustomText?: boolean;
|
|
44
|
+
labels?: UserQuestionLabels;
|
|
45
|
+
chat4Icon?: ReactNode;
|
|
46
|
+
arrowUpSIcon?: ReactNode;
|
|
47
|
+
arrowDownSIcon?: ReactNode;
|
|
48
|
+
sparklingIcon?: ReactNode;
|
|
49
|
+
}
|
|
50
|
+
export interface UserQuestionHandle {
|
|
51
|
+
getAnswers: () => Record<string, string>;
|
|
52
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { UserQuestionItem, UserQuestionOption } from './types';
|
|
2
|
+
export interface UseUserQuestionKeyboardProps {
|
|
3
|
+
isSubmitting: boolean;
|
|
4
|
+
currentQuestion: UserQuestionItem | undefined;
|
|
5
|
+
currentOptions: UserQuestionOption[];
|
|
6
|
+
currentQuestionIndex: number;
|
|
7
|
+
questions: UserQuestionItem[];
|
|
8
|
+
focusedOptionIndex: number;
|
|
9
|
+
setFocusedOptionIndex: (n: number) => void;
|
|
10
|
+
currentQuestionHasAnswer: boolean;
|
|
11
|
+
getSelectedOptionIndex: (i: number) => number;
|
|
12
|
+
setShouldScrollToQuestion: (v: boolean) => void;
|
|
13
|
+
setCurrentQuestionIndex: (i: number) => void;
|
|
14
|
+
handleOptionClick: (questionText: string, optionLabel: string, questionIndex: number) => void;
|
|
15
|
+
handleContinue: () => void;
|
|
16
|
+
}
|
|
17
|
+
export declare function useUserQuestionKeyboard({ isSubmitting, currentQuestion, currentOptions, currentQuestionIndex, questions, focusedOptionIndex, setFocusedOptionIndex, currentQuestionHasAnswer, getSelectedOptionIndex, setShouldScrollToQuestion, setCurrentQuestionIndex, handleOptionClick, handleContinue, }: UseUserQuestionKeyboardProps): void;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { Ref } from 'react';
|
|
2
|
+
import type { UserQuestionItem, UserQuestionHandle } from './types';
|
|
3
|
+
export interface UseUserQuestionStateProps {
|
|
4
|
+
questions: UserQuestionItem[];
|
|
5
|
+
resetKey?: string;
|
|
6
|
+
onAnswer: (answers: Record<string, string>) => void;
|
|
7
|
+
ref: Ref<UserQuestionHandle | null>;
|
|
8
|
+
}
|
|
9
|
+
export declare function useUserQuestionState({ questions, resetKey, ref, }: UseUserQuestionStateProps): {
|
|
10
|
+
currentQuestionIndex: number;
|
|
11
|
+
setCurrentQuestionIndex: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
12
|
+
answers: Record<string, string[]>;
|
|
13
|
+
setAnswers: import("react").Dispatch<import("react").SetStateAction<Record<string, string[]>>>;
|
|
14
|
+
customInputs: Record<string, string>;
|
|
15
|
+
setCustomInputs: import("react").Dispatch<import("react").SetStateAction<Record<string, string>>>;
|
|
16
|
+
focusedOptionIndex: number;
|
|
17
|
+
setFocusedOptionIndex: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
18
|
+
isSubmitting: boolean;
|
|
19
|
+
setIsSubmitting: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
20
|
+
maxQuestionHeight: number | undefined;
|
|
21
|
+
scrollContainerRef: import("react").RefObject<HTMLDivElement | null>;
|
|
22
|
+
questionRefs: import("react").RefObject<Map<number, HTMLDivElement>>;
|
|
23
|
+
shouldScrollToQuestionRef: import("react").RefObject<boolean>;
|
|
24
|
+
customInputRefs: import("react").RefObject<Map<string, HTMLInputElement>>;
|
|
25
|
+
getSelectedOptionIndex: (questionIndex: number) => number;
|
|
26
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
export interface UserQuestionAnswerLabels {
|
|
3
|
+
answer?: string;
|
|
4
|
+
answers?: string;
|
|
5
|
+
}
|
|
6
|
+
export interface UserQuestionAnswerProps {
|
|
7
|
+
answers: Record<string, string>;
|
|
8
|
+
showHeader?: boolean;
|
|
9
|
+
labels?: UserQuestionAnswerLabels;
|
|
10
|
+
className?: string;
|
|
11
|
+
questionAnswerIcon?: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
export declare const UserQuestionAnswer: import("react").NamedExoticComponent<UserQuestionAnswerProps>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* [INPUT]: (无) - 文件图标映射配置
|
|
3
|
+
* [OUTPUT]: FILE_TYPE_MAP, SETI_CHAR_MAP, SETI_COLOR_MAP, getSetiIconType, getSetiIcon, getSetiIconColor, getFileIconColorClass
|
|
4
|
+
* [POS]: registry/lib - 与 QodeChatPanel utils/fileIconMaps 一致,供 FileReviewPart、ReasoningStep 等使用
|
|
5
|
+
*
|
|
6
|
+
* SETI_CHAR_MAP 与 QodeChatPanel 一致(qoder-seti.woff 使用 E054=js、E059=json 等)。
|
|
7
|
+
*
|
|
8
|
+
* [PROTOCOL]:
|
|
9
|
+
* 1. 新增文件类型须同时更新 SETI_CHAR_MAP、SETI_COLOR_MAP、FILE_TYPE_MAP
|
|
10
|
+
* 2. 使用 Seti 时需加载 qoder-seti.woff 并 @font-face font-family: 'Seti'(与 QodeChatPanel 同源字体)
|
|
11
|
+
*/
|
|
12
|
+
export declare const SETI_CHAR_MAP: Record<string, string>;
|
|
13
|
+
export declare const SETI_COLOR_MAP: Record<string, string>;
|
|
14
|
+
export declare const FILE_TYPE_MAP: Record<string, string>;
|
|
15
|
+
export declare const TYPE_TO_TOKEN_CLASS: Record<string, string>;
|
|
16
|
+
export declare function getSetiIconType(fileType?: string, filename?: string): string;
|
|
17
|
+
export declare function getSetiIcon(fileType?: string, filename?: string): string;
|
|
18
|
+
export declare function getSetiIconColor(fileType?: string, filename?: string): string;
|
|
19
|
+
/** 返回 Tailwind token 类名,用于通用文件图标(非 Seti 字体) */
|
|
20
|
+
export declare function getFileIconColorClass(fileType?: string, filename?: string): string;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* [INPUT]: (ClassValue[])
|
|
3
|
+
* [OUTPUT]: (string) - 合并后的 class 名
|
|
4
|
+
* [POS]: registry/lib/utils - 注册表工具函数,复制到用户项目后可自由修改
|
|
5
|
+
*
|
|
6
|
+
* [PROTOCOL]:
|
|
7
|
+
* 1. 用户可自由修改此文件
|
|
8
|
+
* 2. 更新时使用 npx sparkdesign diff utils 查看差异
|
|
9
|
+
*/
|
|
10
|
+
import { type ClassValue } from 'clsx';
|
|
11
|
+
export declare function cn(...inputs: ClassValue[]): string;
|