sparkdesign 0.4.2 → 0.4.3
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 +112 -204
- package/{cli/dist → dist}/commands/add.js +11 -2
- package/package.json +19 -126
- package/{cli/registry → registry}/chat/markdown.tsx +1 -1
- package/{cli/registry → registry}/chat/tool-invocation-card.tsx +5 -5
- package/registry/meta.json +750 -0
- package/cli/registry/meta.json +0 -1
- package/dist/_basePickBy-DnQN8w3y.js +0 -151
- package/dist/_basePickBy-a-kPMlkg.cjs +0 -1
- package/dist/_baseUniq-B-N2NQ50.js +0 -614
- package/dist/_baseUniq-Cc_zbSif.cjs +0 -1
- package/dist/arc-BQBhijZ6.js +0 -83
- package/dist/arc-mWQt0Yph.cjs +0 -1
- package/dist/architectureDiagram-VXUJARFQ-BMZEucno.cjs +0 -36
- package/dist/architectureDiagram-VXUJARFQ-DTdjD3Bp.js +0 -4661
- package/dist/blockDiagram-VD42YOAC-CzHn0yob.js +0 -2256
- package/dist/blockDiagram-VD42YOAC-DDxdHAlz.cjs +0 -122
- package/dist/c4Diagram-YG6GDRKO-4Gz0I4gj.cjs +0 -10
- package/dist/c4Diagram-YG6GDRKO-BIy--yVN.js +0 -1580
- package/dist/channel-BQn0o8bs.js +0 -5
- package/dist/channel-DaN7XniJ.cjs +0 -1
- package/dist/chunk-4BX2VUAB-BlQFTQqz.cjs +0 -1
- package/dist/chunk-4BX2VUAB-Czitj3Kc.js +0 -8
- package/dist/chunk-55IACEB6-DXacNZbO.js +0 -8
- package/dist/chunk-55IACEB6-DnDxpye9.cjs +0 -1
- package/dist/chunk-B4BG7PRW-CBdN0q_V.js +0 -1375
- package/dist/chunk-B4BG7PRW-DbGvUkGO.cjs +0 -165
- package/dist/chunk-DI55MBZ5-D1YJMs6x.cjs +0 -220
- package/dist/chunk-DI55MBZ5-NCQTvayw.js +0 -1370
- package/dist/chunk-FMBD7UC4-CsGMbrtr.js +0 -19
- package/dist/chunk-FMBD7UC4-Di7cUUh5.cjs +0 -15
- package/dist/chunk-QN33PNHL-0j5LC8Lm.cjs +0 -1
- package/dist/chunk-QN33PNHL-3GERZBRm.js +0 -19
- package/dist/chunk-QZHKN3VN-AVEY9ImQ.js +0 -15
- package/dist/chunk-QZHKN3VN-s8Z0a8mc.cjs +0 -1
- package/dist/chunk-TZMSLE5B-CAf87HPt.cjs +0 -1
- package/dist/chunk-TZMSLE5B-sbiflal0.js +0 -64
- package/dist/classDiagram-2ON5EDUG-Ct9JLIN2.cjs +0 -1
- package/dist/classDiagram-2ON5EDUG-Dzfrft3a.js +0 -16
- package/dist/classDiagram-v2-WZHVMYZB-Ct9JLIN2.cjs +0 -1
- package/dist/classDiagram-v2-WZHVMYZB-Dzfrft3a.js +0 -16
- package/dist/clone-Cde_NQ8V.js +0 -8
- package/dist/clone-DCNjWuM2.cjs +0 -1
- package/dist/cose-bilkent-S5V4N54A-0uLijMro.cjs +0 -1
- package/dist/cose-bilkent-S5V4N54A-Bb08N431.js +0 -2608
- package/dist/cytoscape.esm-CNUX3VTg.cjs +0 -321
- package/dist/cytoscape.esm-Cvf3sx9F.js +0 -18704
- package/dist/dagre-6UL2VRFP-CY_Wz5Zd.js +0 -444
- package/dist/dagre-6UL2VRFP-Dxe7_qZc.cjs +0 -4
- package/dist/defaultLocale-BgPVtth8.js +0 -171
- package/dist/defaultLocale-C4wbwF1n.cjs +0 -1
- package/dist/diagram-PSM6KHXK-D2bdb7MT.js +0 -531
- package/dist/diagram-PSM6KHXK-YF69SUjY.cjs +0 -24
- package/dist/diagram-QEK2KX5R-BpUSoh0-.js +0 -217
- package/dist/diagram-QEK2KX5R-DZPGteon.cjs +0 -43
- package/dist/diagram-S2PKOQOG-ht-zdvFG.cjs +0 -24
- package/dist/diagram-S2PKOQOG-zFeLJ50Z.js +0 -142
- package/dist/erDiagram-Q2GNP2WA-B38iJ6ts.js +0 -841
- package/dist/erDiagram-Q2GNP2WA-RgS80DDU.cjs +0 -60
- package/dist/flowDiagram-NV44I4VS-BHilOs2p.cjs +0 -162
- package/dist/flowDiagram-NV44I4VS-BrBJcoce.js +0 -1620
- 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 +0 -267
- package/dist/ganttDiagram-JELNMOA3-tw6FhkWJ.js +0 -2670
- package/dist/gitGraphDiagram-V2S2FVAM-BWn5uIK5.js +0 -699
- package/dist/gitGraphDiagram-V2S2FVAM-DKKeG-9R.cjs +0 -65
- package/dist/graph-DIbblrZP.cjs +0 -1
- package/dist/graph-DPcK91G3.js +0 -247
- package/dist/infoDiagram-HS3SLOUP-B8gwwhct.cjs +0 -2
- package/dist/infoDiagram-HS3SLOUP-D47PNcP_.js +0 -24
- package/dist/init-CHZsXQcr.cjs +0 -1
- package/dist/init-DjUOC4st.js +0 -16
- package/dist/journeyDiagram-XKPGCS4Q-BG3cfhyU.js +0 -834
- package/dist/journeyDiagram-XKPGCS4Q-D8DVLJof.cjs +0 -139
- package/dist/kanban-definition-3W4ZIXB7-4OCnEouP.cjs +0 -89
- package/dist/kanban-definition-3W4ZIXB7-CWi_ssF9.js +0 -719
- package/dist/katex.css +0 -1
- package/dist/layout-Byuh8f-J.cjs +0 -1
- package/dist/layout-CdLdvj1j.js +0 -1335
- package/dist/linear-C2Q_PI9B.js +0 -259
- package/dist/linear-C69aPBW1.cjs +0 -1
- package/dist/mermaid.core-DBwAx_jp.cjs +0 -249
- package/dist/mermaid.core-gFR0XUlD.js +0 -15300
- package/dist/mindmap-definition-VGOIOE7T-8P7obVV4.cjs +0 -68
- package/dist/mindmap-definition-VGOIOE7T-DnOa7WJ9.js +0 -784
- package/dist/ordinal-B6-f3MAq.js +0 -61
- package/dist/ordinal-CagbB1m8.cjs +0 -1
- package/dist/pieDiagram-ADFJNKIX-5NAlvhMo.js +0 -161
- package/dist/pieDiagram-ADFJNKIX-CQBG4yR9.cjs +0 -30
- package/dist/qoder-design.css +0 -2
- package/dist/quadrantDiagram-AYHSOK5B-Oe4y7RZ0.cjs +0 -7
- package/dist/quadrantDiagram-AYHSOK5B-rh2DPEP1.js +0 -1022
- package/dist/registry/basic/alert-dialog.d.ts +0 -40
- package/dist/registry/basic/avatar.d.ts +0 -30
- package/dist/registry/basic/button.d.ts +0 -16
- package/dist/registry/basic/collapse.d.ts +0 -22
- package/dist/registry/basic/collapsible-card.d.ts +0 -34
- package/dist/registry/basic/collapsible.d.ts +0 -15
- package/dist/registry/basic/dropdown-menu.d.ts +0 -52
- package/dist/registry/basic/icon-button.d.ts +0 -12
- package/dist/registry/basic/icons-inline.d.ts +0 -51
- package/dist/registry/basic/kbd.d.ts +0 -23
- package/dist/registry/basic/option-list.d.ts +0 -16
- package/dist/registry/basic/pagination.d.ts +0 -33
- package/dist/registry/basic/progress.d.ts +0 -18
- package/dist/registry/basic/radio-group.d.ts +0 -25
- package/dist/registry/basic/resizable.d.ts +0 -318
- package/dist/registry/basic/scrollbar.d.ts +0 -12
- package/dist/registry/basic/select.d.ts +0 -35
- package/dist/registry/basic/shimmering-text.d.ts +0 -27
- package/dist/registry/basic/sidebar-menu.d.ts +0 -23
- package/dist/registry/basic/skeleton.d.ts +0 -10
- package/dist/registry/basic/slider.d.ts +0 -16
- package/dist/registry/basic/sonner.d.ts +0 -23
- package/dist/registry/basic/spinner.d.ts +0 -5
- package/dist/registry/basic/switch.d.ts +0 -20
- package/dist/registry/basic/table.d.ts +0 -18
- package/dist/registry/basic/tabs.d.ts +0 -29
- package/dist/registry/basic/tag.d.ts +0 -23
- package/dist/registry/basic/theme-from-document.d.ts +0 -10
- package/dist/registry/basic/toggle.d.ts +0 -29
- package/dist/registry/basic/tooltip.d.ts +0 -34
- package/dist/registry/basic/typography.d.ts +0 -76
- package/dist/registry/chat/ask-user-part.d.ts +0 -24
- package/dist/registry/chat/browser-action-part.d.ts +0 -28
- package/dist/registry/chat/chat-input/chat-input-folder-selector.d.ts +0 -22
- package/dist/registry/chat/chat-input/chat-input-model-switcher.d.ts +0 -12
- package/dist/registry/chat/chat-input/chat-input-textarea.d.ts +0 -9
- package/dist/registry/chat/chat-input/compound.d.ts +0 -97
- package/dist/registry/chat/chat-input/context.d.ts +0 -64
- package/dist/registry/chat/chat-input/folder-permission-dialog.d.ts +0 -11
- package/dist/registry/chat/chat-input/index.d.ts +0 -34
- package/dist/registry/chat/chat-input/types.d.ts +0 -79
- package/dist/registry/chat/chat-input/useAutoResizeTextarea.d.ts +0 -7
- package/dist/registry/chat/code-block-part.d.ts +0 -23
- package/dist/registry/chat/file-attachment.d.ts +0 -19
- package/dist/registry/chat/file-card.d.ts +0 -10
- package/dist/registry/chat/file-review-part.d.ts +0 -30
- package/dist/registry/chat/folder-button.d.ts +0 -20
- package/dist/registry/chat/generated-images-grid.d.ts +0 -15
- package/dist/registry/chat/generation-status-bar.d.ts +0 -19
- package/dist/registry/chat/hint-banner.d.ts +0 -28
- package/dist/registry/chat/image-attachment.d.ts +0 -19
- package/dist/registry/chat/image-generating.d.ts +0 -15
- package/dist/registry/chat/markdown.d.ts +0 -8
- package/dist/registry/chat/mermaid-part.d.ts +0 -17
- package/dist/registry/chat/permission-card.d.ts +0 -24
- package/dist/registry/chat/plan-part.d.ts +0 -30
- package/dist/registry/chat/queue-indicator.d.ts +0 -27
- package/dist/registry/chat/reasoning-step/compound.d.ts +0 -17
- package/dist/registry/chat/reasoning-step/context.d.ts +0 -10
- package/dist/registry/chat/reasoning-step/index.d.ts +0 -14
- package/dist/registry/chat/reasoning-step/types.d.ts +0 -95
- package/dist/registry/chat/related-prompts.d.ts +0 -23
- package/dist/registry/chat/response/compound.d.ts +0 -25
- package/dist/registry/chat/response/context.d.ts +0 -9
- package/dist/registry/chat/response/index.d.ts +0 -15
- package/dist/registry/chat/response/types.d.ts +0 -99
- package/dist/registry/chat/send-button.d.ts +0 -17
- package/dist/registry/chat/streaming-markdown-block.d.ts +0 -8
- package/dist/registry/chat/task-part.d.ts +0 -28
- package/dist/registry/chat/terminal-code-block-part.d.ts +0 -18
- package/dist/registry/chat/thinking-indicator.d.ts +0 -14
- package/dist/registry/chat/tool-invocation-card.d.ts +0 -20
- package/dist/registry/chat/user-message.d.ts +0 -6
- package/dist/registry/chat/user-question/UserQuestionCard.d.ts +0 -30
- package/dist/registry/chat/user-question/UserQuestionFooter.d.ts +0 -18
- package/dist/registry/chat/user-question/UserQuestionHeader.d.ts +0 -20
- package/dist/registry/chat/user-question/compound.d.ts +0 -37
- package/dist/registry/chat/user-question/context.d.ts +0 -55
- package/dist/registry/chat/user-question/index.d.ts +0 -15
- package/dist/registry/chat/user-question/types.d.ts +0 -52
- package/dist/registry/chat/user-question/useUserQuestionKeyboard.d.ts +0 -17
- package/dist/registry/chat/user-question/useUserQuestionState.d.ts +0 -26
- package/dist/registry/chat/user-question-answer.d.ts +0 -13
- package/dist/registry/lib/file-icon-maps.d.ts +0 -20
- package/dist/registry/lib/use-mermaid-render.d.ts +0 -5
- package/dist/registry/lib/utils.d.ts +0 -11
- package/dist/requirementDiagram-UZGBJVZJ-DcWaCuXr.js +0 -850
- package/dist/requirementDiagram-UZGBJVZJ-gfdlrFiq.cjs +0 -64
- package/dist/sankeyDiagram-TZEHDZUN-CQIKFwD0.js +0 -810
- package/dist/sankeyDiagram-TZEHDZUN-DvPtzQvC.cjs +0 -10
- package/dist/scale/computed.css +0 -103
- package/dist/scale/config.css +0 -110
- package/dist/scale/index.css +0 -30
- package/dist/scale/presets/compact.css +0 -30
- package/dist/scale/presets/dense.css +0 -64
- package/dist/scale/presets/sharp.css +0 -40
- package/dist/scale/presets/soft.css +0 -16
- package/dist/scale.css +0 -13
- package/dist/sequenceDiagram-WL72ISMW-BNrsMagL.cjs +0 -145
- package/dist/sequenceDiagram-WL72ISMW-iCX3ckKx.js +0 -2511
- package/dist/spark-design.cjs.js +0 -265
- package/dist/spark-design.es.js +0 -13425
- package/dist/src/components/basic/AlertDialog/index.d.ts +0 -20
- package/dist/src/components/basic/Avatar/index.d.ts +0 -7
- package/dist/src/components/basic/Button/index.d.ts +0 -7
- package/dist/src/components/basic/Collapse/index.d.ts +0 -15
- package/dist/src/components/basic/Collapsible/index.d.ts +0 -7
- package/dist/src/components/basic/CollapsibleCard/index.d.ts +0 -7
- package/dist/src/components/basic/CollapsibleSection/index.d.ts +0 -43
- package/dist/src/components/basic/DropdownMenu/index.d.ts +0 -19
- package/dist/src/components/basic/EllipsisText/index.d.ts +0 -53
- package/dist/src/components/basic/IconButton/index.d.ts +0 -7
- package/dist/src/components/basic/Kbd/index.d.ts +0 -7
- package/dist/src/components/basic/OptionList/index.d.ts +0 -7
- package/dist/src/components/basic/Pagination/index.d.ts +0 -7
- package/dist/src/components/basic/Progress/index.d.ts +0 -7
- package/dist/src/components/basic/RadioGroup/index.d.ts +0 -7
- package/dist/src/components/basic/Resizable/index.d.ts +0 -7
- package/dist/src/components/basic/Scrollbar/index.d.ts +0 -7
- package/dist/src/components/basic/Select/index.d.ts +0 -17
- package/dist/src/components/basic/ShimmeringText/index.d.ts +0 -7
- package/dist/src/components/basic/SidebarMenu/index.d.ts +0 -4
- package/dist/src/components/basic/Skeleton/index.d.ts +0 -7
- package/dist/src/components/basic/Slider/index.d.ts +0 -7
- package/dist/src/components/basic/Spinner/index.d.ts +0 -7
- package/dist/src/components/basic/Switch/index.d.ts +0 -38
- package/dist/src/components/basic/Table/index.d.ts +0 -7
- package/dist/src/components/basic/Tabs/index.d.ts +0 -7
- package/dist/src/components/basic/Tag/index.d.ts +0 -10
- package/dist/src/components/basic/Toast/index.d.ts +0 -12
- package/dist/src/components/basic/Toggle/index.d.ts +0 -7
- package/dist/src/components/basic/Tooltip/index.d.ts +0 -21
- package/dist/src/components/basic/Typography/index.d.ts +0 -7
- package/dist/src/components/chat/AskUserPart/index.d.ts +0 -6
- package/dist/src/components/chat/BrowserActionPart/index.d.ts +0 -7
- package/dist/src/components/chat/ChatInput/index.d.ts +0 -29
- package/dist/src/components/chat/CodeBlockPart/index.d.ts +0 -7
- package/dist/src/components/chat/FileAttachment/index.d.ts +0 -3
- package/dist/src/components/chat/FileCard/index.d.ts +0 -3
- package/dist/src/components/chat/FileReviewPart/index.d.ts +0 -7
- package/dist/src/components/chat/FolderButton/index.d.ts +0 -5
- package/dist/src/components/chat/GeneratedImagesGrid/index.d.ts +0 -7
- package/dist/src/components/chat/GenerationStatusBar/index.d.ts +0 -7
- package/dist/src/components/chat/HintBanner/index.d.ts +0 -6
- package/dist/src/components/chat/ImageAttachment/index.d.ts +0 -3
- package/dist/src/components/chat/ImageGenerating/index.d.ts +0 -6
- package/dist/src/components/chat/Markdown/demo-content.d.ts +0 -1
- package/dist/src/components/chat/Markdown/index.d.ts +0 -7
- package/dist/src/components/chat/MermaidPart/index.d.ts +0 -6
- package/dist/src/components/chat/PermissionCard/index.d.ts +0 -4
- package/dist/src/components/chat/PlanPart/index.d.ts +0 -6
- package/dist/src/components/chat/QueueIndicator/index.d.ts +0 -4
- package/dist/src/components/chat/ReasoningStep/index.d.ts +0 -13
- package/dist/src/components/chat/RelatedPrompts/index.d.ts +0 -6
- package/dist/src/components/chat/Response/StreamingMarkdownBlock.d.ts +0 -6
- package/dist/src/components/chat/Response/index.d.ts +0 -16
- package/dist/src/components/chat/SendButton/index.d.ts +0 -5
- package/dist/src/components/chat/TaskPart/index.d.ts +0 -7
- package/dist/src/components/chat/TerminalCodeBlockPart/index.d.ts +0 -6
- package/dist/src/components/chat/ThinkingIndicator/index.d.ts +0 -6
- package/dist/src/components/chat/ToolInvocationCard/index.d.ts +0 -4
- package/dist/src/components/chat/UserMessage/index.d.ts +0 -7
- package/dist/src/components/chat/UserQuestion/index.d.ts +0 -19
- package/dist/src/components/chat/UserQuestionAnswer/index.d.ts +0 -3
- package/dist/src/components/index.d.ts +0 -138
- package/dist/src/icons/context.d.ts +0 -26
- package/dist/src/icons/types.d.ts +0 -18
- package/dist/src/lib/ThemeStyleContext.d.ts +0 -21
- package/dist/src/lib/file-icon.d.ts +0 -16
- package/dist/src/lib/i18n.d.ts +0 -12
- package/dist/src/lib/index.d.ts +0 -10
- package/dist/src/lib/motion.d.ts +0 -22
- package/dist/src/lib/utils.d.ts +0 -11
- package/dist/stateDiagram-FKZM4ZOC-DBvJ_eeL.cjs +0 -1
- package/dist/stateDiagram-FKZM4ZOC-ZVsJlaHJ.js +0 -263
- package/dist/stateDiagram-v2-4FDKWEC3-CB_nTHcE.js +0 -16
- package/dist/stateDiagram-v2-4FDKWEC3-Xkx17v6T.cjs +0 -1
- package/dist/theme-base.css +0 -270
- package/dist/theme.css +0 -17
- package/dist/themes/dark-parchment.css +0 -133
- package/dist/themes/dark-qoder.css +0 -133
- package/dist/themes/light-parchment.css +0 -124
- package/dist/themes/light-qoder.css +0 -132
- package/dist/timeline-definition-IT6M3QCI-BmGkYQiz.cjs +0 -61
- package/dist/timeline-definition-IT6M3QCI-Ck8zTt6w.js +0 -795
- package/dist/tokens/CLAUDE.md +0 -305
- package/dist/tokens/index.css +0 -35
- package/dist/tokens/scale/computed.css +0 -103
- package/dist/tokens/scale/config.css +0 -110
- package/dist/tokens/scale/index.css +0 -30
- package/dist/tokens/scale/presets/compact.css +0 -30
- package/dist/tokens/scale/presets/dense.css +0 -64
- package/dist/tokens/scale/presets/sharp.css +0 -40
- package/dist/tokens/scale/presets/soft.css +0 -16
- package/dist/tokens/scale.css +0 -13
- package/dist/tokens/scrollbar-utility.css +0 -35
- package/dist/tokens/theme-base.css +0 -270
- package/dist/tokens/theme.css +0 -17
- package/dist/tokens/themes/dark-parchment.css +0 -133
- package/dist/tokens/themes/dark-qoder.css +0 -133
- package/dist/tokens/themes/light-parchment.css +0 -124
- package/dist/tokens/themes/light-qoder.css +0 -132
- package/dist/treemap-GDKQZRPO-B9sfERx8.js +0 -17922
- package/dist/treemap-GDKQZRPO-BVfJRs0Z.cjs +0 -160
- package/dist/xychartDiagram-PRI3JC2R-By_S8NzN.js +0 -1340
- package/dist/xychartDiagram-PRI3JC2R-CNfDrGxM.cjs +0 -7
- /package/{cli/dist → dist}/commands/diff.js +0 -0
- /package/{cli/dist → dist}/commands/init.js +0 -0
- /package/{cli/dist → dist}/commands/list.js +0 -0
- /package/{cli/dist → dist}/index.js +0 -0
- /package/{cli/dist → dist}/utils/config.js +0 -0
- /package/{cli/dist → dist}/utils/registry.js +0 -0
- /package/{cli/dist → dist}/utils/tokens.js +0 -0
- /package/{cli/dist → dist}/utils/transform.js +0 -0
- /package/{cli/registry → registry}/__tests__/basic/button.test.tsx +0 -0
- /package/{cli/registry → registry}/__tests__/chat/markdown.test.tsx +0 -0
- /package/{cli/registry → registry}/__tests__/chat/thinking-indicator.test.tsx +0 -0
- /package/{cli/registry → registry}/__tests__/chat/tool-invocation-card.test.tsx +0 -0
- /package/{cli/registry → registry}/basic/alert-dialog.tsx +0 -0
- /package/{cli/registry → registry}/basic/avatar.tsx +0 -0
- /package/{cli/registry → registry}/basic/button.tsx +0 -0
- /package/{cli/registry → registry}/basic/collapse.tsx +0 -0
- /package/{cli/registry → registry}/basic/collapsible-card.tsx +0 -0
- /package/{cli/registry → registry}/basic/collapsible.tsx +0 -0
- /package/{cli/registry → registry}/basic/dropdown-menu.tsx +0 -0
- /package/{cli/registry → registry}/basic/icon-button.tsx +0 -0
- /package/{cli/registry → registry}/basic/icons-inline.tsx +0 -0
- /package/{cli/registry → registry}/basic/kbd.tsx +0 -0
- /package/{cli/registry → registry}/basic/option-list.tsx +0 -0
- /package/{cli/registry → registry}/basic/pagination.tsx +0 -0
- /package/{cli/registry → registry}/basic/progress.tsx +0 -0
- /package/{cli/registry → registry}/basic/radio-group.tsx +0 -0
- /package/{cli/registry → registry}/basic/resizable.tsx +0 -0
- /package/{cli/registry → registry}/basic/scrollbar.tsx +0 -0
- /package/{cli/registry → registry}/basic/select.tsx +0 -0
- /package/{cli/registry → registry}/basic/shimmering-text.tsx +0 -0
- /package/{cli/registry → registry}/basic/sidebar-menu.tsx +0 -0
- /package/{cli/registry → registry}/basic/skeleton.tsx +0 -0
- /package/{cli/registry → registry}/basic/slider.tsx +0 -0
- /package/{cli/registry → registry}/basic/sonner.tsx +0 -0
- /package/{cli/registry → registry}/basic/spinner.tsx +0 -0
- /package/{cli/registry → registry}/basic/switch.tsx +0 -0
- /package/{cli/registry → registry}/basic/table.tsx +0 -0
- /package/{cli/registry → registry}/basic/tabs.tsx +0 -0
- /package/{cli/registry → registry}/basic/tag.tsx +0 -0
- /package/{cli/registry → registry}/basic/theme-from-document.ts +0 -0
- /package/{cli/registry → registry}/basic/toggle.tsx +0 -0
- /package/{cli/registry → registry}/basic/tooltip.tsx +0 -0
- /package/{cli/registry → registry}/basic/typography.tsx +0 -0
- /package/{cli/registry → registry}/chat/ask-user-part.tsx +0 -0
- /package/{cli/registry → registry}/chat/browser-action-part.tsx +0 -0
- /package/{cli/registry → registry}/chat/chat-input/chat-input-folder-selector.tsx +0 -0
- /package/{cli/registry → registry}/chat/chat-input/chat-input-model-switcher.tsx +0 -0
- /package/{cli/registry → registry}/chat/chat-input/chat-input-textarea.tsx +0 -0
- /package/{cli/registry → registry}/chat/chat-input/compound.tsx +0 -0
- /package/{cli/registry → registry}/chat/chat-input/context.tsx +0 -0
- /package/{cli/registry → registry}/chat/chat-input/folder-permission-dialog.tsx +0 -0
- /package/{cli/registry → registry}/chat/chat-input/index.tsx +0 -0
- /package/{cli/registry → registry}/chat/chat-input/types.ts +0 -0
- /package/{cli/registry → registry}/chat/chat-input/useAutoResizeTextarea.ts +0 -0
- /package/{cli/registry → registry}/chat/code-block-part.tsx +0 -0
- /package/{cli/registry → registry}/chat/file-attachment.tsx +0 -0
- /package/{cli/registry → registry}/chat/file-card.tsx +0 -0
- /package/{cli/registry → registry}/chat/file-review-part.tsx +0 -0
- /package/{cli/registry → registry}/chat/folder-button.tsx +0 -0
- /package/{cli/registry → registry}/chat/generated-images-grid.tsx +0 -0
- /package/{cli/registry → registry}/chat/generation-status-bar.tsx +0 -0
- /package/{cli/registry → registry}/chat/hint-banner.tsx +0 -0
- /package/{cli/registry → registry}/chat/image-attachment.tsx +0 -0
- /package/{cli/registry → registry}/chat/image-generating.tsx +0 -0
- /package/{cli/registry → registry}/chat/mermaid-part.tsx +0 -0
- /package/{cli/registry → registry}/chat/permission-card.tsx +0 -0
- /package/{cli/registry → registry}/chat/plan-part.tsx +0 -0
- /package/{cli/registry → registry}/chat/queue-indicator.tsx +0 -0
- /package/{cli/registry → registry}/chat/reasoning-step/compound.tsx +0 -0
- /package/{cli/registry → registry}/chat/reasoning-step/context.tsx +0 -0
- /package/{cli/registry → registry}/chat/reasoning-step/index.tsx +0 -0
- /package/{cli/registry → registry}/chat/reasoning-step/types.ts +0 -0
- /package/{cli/registry → registry}/chat/related-prompts.tsx +0 -0
- /package/{cli/registry → registry}/chat/response/compound.tsx +0 -0
- /package/{cli/registry → registry}/chat/response/context.tsx +0 -0
- /package/{cli/registry → registry}/chat/response/index.tsx +0 -0
- /package/{cli/registry → registry}/chat/response/types.ts +0 -0
- /package/{cli/registry → registry}/chat/send-button.tsx +0 -0
- /package/{cli/registry → registry}/chat/streaming-markdown-block.tsx +0 -0
- /package/{cli/registry → registry}/chat/task-part.tsx +0 -0
- /package/{cli/registry → registry}/chat/terminal-code-block-part.tsx +0 -0
- /package/{cli/registry → registry}/chat/thinking-indicator.tsx +0 -0
- /package/{cli/registry → registry}/chat/user-message.tsx +0 -0
- /package/{cli/registry → registry}/chat/user-question/UserQuestionCard.tsx +0 -0
- /package/{cli/registry → registry}/chat/user-question/UserQuestionFooter.tsx +0 -0
- /package/{cli/registry → registry}/chat/user-question/UserQuestionHeader.tsx +0 -0
- /package/{cli/registry → registry}/chat/user-question/compound.tsx +0 -0
- /package/{cli/registry → registry}/chat/user-question/context.tsx +0 -0
- /package/{cli/registry → registry}/chat/user-question/index.tsx +0 -0
- /package/{cli/registry → registry}/chat/user-question/types.ts +0 -0
- /package/{cli/registry → registry}/chat/user-question/useUserQuestionKeyboard.ts +0 -0
- /package/{cli/registry → registry}/chat/user-question/useUserQuestionState.ts +0 -0
- /package/{cli/registry → registry}/chat/user-question-answer.tsx +0 -0
- /package/{cli/registry → registry}/lib/file-icon-maps.ts +0 -0
- /package/{cli/registry → registry}/lib/use-mermaid-render.ts +0 -0
- /package/{cli/registry → registry}/lib/utils.ts +0 -0
- /package/{cli/registry → registry}/tokens/index.css +0 -0
- /package/{cli/registry → registry}/tokens/scale/computed.css +0 -0
- /package/{cli/registry → registry}/tokens/scale/config.css +0 -0
- /package/{cli/registry → registry}/tokens/scale/index.css +0 -0
- /package/{cli/registry → registry}/tokens/scale/presets/compact.css +0 -0
- /package/{cli/registry → registry}/tokens/scale/presets/dense.css +0 -0
- /package/{cli/registry → registry}/tokens/scale/presets/sharp.css +0 -0
- /package/{cli/registry → registry}/tokens/scale/presets/soft.css +0 -0
- /package/{cli/registry → registry}/tokens/scale.css +0 -0
- /package/{cli/registry → registry}/tokens/scrollbar-utility.css +0 -0
- /package/{cli/registry → registry}/tokens/theme.css +0 -0
- /package/{cli/registry → registry}/tokens/themes/dark-parchment.css +0 -0
- /package/{cli/registry → registry}/tokens/themes/dark-qoder.css +0 -0
- /package/{cli/registry → registry}/tokens/themes/light-parchment.css +0 -0
- /package/{cli/registry → registry}/tokens/themes/light-qoder.css +0 -0
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { PlanPartProps as RegistryPlanPartProps } from '../../../../registry/chat/plan-part';
|
|
2
|
-
export type PlanPartProps = Omit<RegistryPlanPartProps, 'headerIcon' | 'downloadIcon' | 'builtIcon'>;
|
|
3
|
-
export declare function PlanPart(props: PlanPartProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
export declare namespace PlanPart {
|
|
5
|
-
var displayName: string;
|
|
6
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { QueueIndicatorProps as RegistryQueueIndicatorProps, QueueIndicatorItem, QueueIndicatorLabels } from '../../../../registry/chat/queue-indicator';
|
|
2
|
-
export type { QueueIndicatorItem, QueueIndicatorLabels };
|
|
3
|
-
export type QueueIndicatorProps = Omit<RegistryQueueIndicatorProps, 'arrowUpIcon' | 'closeIcon' | 'arrowDownSIcon'>;
|
|
4
|
-
export declare const QueueIndicator: import("react").NamedExoticComponent<QueueIndicatorProps>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { useReasoningStepContext } from '../../../../registry/chat/reasoning-step/context';
|
|
2
|
-
import { ReasoningStepDefaultLayout } from '../../../../registry/chat/reasoning-step/compound';
|
|
3
|
-
import type { ReasoningStepProps as RegistryReasoningStepProps, ReasoningStepDetail, ReasoningStepRootProps, ReasoningStepStatus, ReasoningStepCompound } from '../../../../registry/chat/reasoning-step/types';
|
|
4
|
-
import type { ReactNode } from 'react';
|
|
5
|
-
export type { ReasoningStepDetail, ReasoningStepStatus };
|
|
6
|
-
export type ReasoningStepProps = Omit<RegistryReasoningStepProps, 'eyeIcon' | 'arrowRightIcon'>;
|
|
7
|
-
interface MainLibReasoningStepCompound extends Omit<ReasoningStepCompound, 'Root'> {
|
|
8
|
-
Root: React.FC<Omit<ReasoningStepRootProps, 'eyeIcon' | 'arrowRightIcon'> & {
|
|
9
|
-
children?: ReactNode;
|
|
10
|
-
}>;
|
|
11
|
-
}
|
|
12
|
-
export declare const ReasoningStep: React.FC<ReasoningStepProps> & MainLibReasoningStepCompound;
|
|
13
|
-
export { useReasoningStepContext, ReasoningStepDefaultLayout };
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { RelatedPromptsProps, RelatedPromptItem } from '../../../../registry/chat/related-prompts';
|
|
2
|
-
export type { RelatedPromptsProps, RelatedPromptItem };
|
|
3
|
-
export declare function RelatedPrompts(props: Omit<RelatedPromptsProps, 'defaultIcon'>): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
export declare namespace RelatedPrompts {
|
|
5
|
-
var displayName: string;
|
|
6
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* [INPUT]: (ResponseProps)
|
|
3
|
-
* [OUTPUT]: (JSX.Element)
|
|
4
|
-
* [POS]: components/chat/Response - 从 registry 再导出,注入带 Lottie 的 ThinkingIndicator
|
|
5
|
-
*
|
|
6
|
-
* 设计模式:shadcn 风格复合组件
|
|
7
|
-
* - Response = 便捷导出(Root + DefaultLayout)
|
|
8
|
-
* - Response.Root/Thinking/Steps/Step/Content/ImageGenerating = 复合子组件
|
|
9
|
-
*/
|
|
10
|
-
import type { HTMLAttributes } from 'react';
|
|
11
|
-
import { useResponseContext as useRegistryResponseContext, DEMO_ROUNDS, DEMO_FINAL_MD } from '../../../../registry/chat/response/context';
|
|
12
|
-
import type { ResponseProps as RegistryResponseProps, ResponseCompound, ResponsePhase, ResponseStep, ResponseStepToolType, ResponseRound, ResponseBlock, BlockType } from '../../../../registry/chat/response/types';
|
|
13
|
-
export type { ResponsePhase, ResponseRound, ResponseStep, ResponseStepToolType, ResponseBlock, BlockType, ResponseCompound, };
|
|
14
|
-
export type ResponseProps = RegistryResponseProps;
|
|
15
|
-
export declare const Response: React.FC<RegistryResponseProps & HTMLAttributes<HTMLDivElement>> & ResponseCompound;
|
|
16
|
-
export { useRegistryResponseContext as useResponseContext, DEMO_ROUNDS, DEMO_FINAL_MD, };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { sendButtonVariants, sendButtonIconVariants } from '../../../../registry/chat/send-button';
|
|
2
|
-
import type { SendButtonProps as RegistrySendButtonProps } from '../../../../registry/chat/send-button';
|
|
3
|
-
export type SendButtonProps = Omit<RegistrySendButtonProps, 'sendIcon' | 'stopIcon' | 'micIcon'>;
|
|
4
|
-
export declare const SendButton: import("react").ForwardRefExoticComponent<SendButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
5
|
-
export { sendButtonVariants, sendButtonIconVariants };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { TaskPartProps as RegistryTaskPartProps, TaskPartTask, TaskStatus } from '../../../../registry/chat/task-part';
|
|
2
|
-
export type { TaskPartTask, TaskStatus };
|
|
3
|
-
export type TaskPartProps = Omit<RegistryTaskPartProps, 'headerIcon' | 'uncompletedIcon' | 'completedIcon' | 'skippedIcon' | 'loaderIcon'>;
|
|
4
|
-
export declare function TaskPart(props: TaskPartProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
-
export declare namespace TaskPart {
|
|
6
|
-
var displayName: string;
|
|
7
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { TerminalCodeBlockPartProps as RegistryTerminalCodeBlockPartProps } from '../../../../registry/chat/terminal-code-block-part';
|
|
2
|
-
export type TerminalCodeBlockPartProps = Omit<RegistryTerminalCodeBlockPartProps, 'headerIcon' | 'externalLinkIcon'>;
|
|
3
|
-
export declare function TerminalCodeBlockPart(props: TerminalCodeBlockPartProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
export declare namespace TerminalCodeBlockPart {
|
|
5
|
-
var displayName: string;
|
|
6
|
-
}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type { ThinkingIndicatorProps } from '../../../../registry/chat/thinking-indicator';
|
|
2
|
-
export type { ThinkingIndicatorProps };
|
|
3
|
-
export declare function ThinkingIndicator(props: ThinkingIndicatorProps): import("react/jsx-runtime").JSX.Element;
|
|
4
|
-
export declare namespace ThinkingIndicator {
|
|
5
|
-
var displayName: string;
|
|
6
|
-
}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { ToolInvocationCardProps as RegistryToolInvocationCardProps, ToolInvocationStatus } from '../../../../registry/chat/tool-invocation-card';
|
|
2
|
-
export type { ToolInvocationStatus };
|
|
3
|
-
export type ToolInvocationCardProps = Omit<RegistryToolInvocationCardProps, 'timeIcon' | 'checkboxCircleIcon' | 'closeCircleIcon' | 'arrowRightIcon' | 'runningText' | 'ranText' | 'failedText' | 'responseLabel'>;
|
|
4
|
-
export declare const ToolInvocationCard: import("react").NamedExoticComponent<ToolInvocationCardProps>;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* [INPUT]: (UserMessageProps)
|
|
3
|
-
* [OUTPUT]: (JSX.Element) - 用户消息气泡容器
|
|
4
|
-
* [POS]: components/chat/UserMessage - 从 registry 再导出
|
|
5
|
-
*/
|
|
6
|
-
export { UserMessage } from '../../../../registry/chat/user-message';
|
|
7
|
-
export type { UserMessageProps } from '../../../../registry/chat/user-message';
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import { useUserQuestionContext, type UserQuestionRootProps } from '../../../../registry/chat/user-question/context';
|
|
3
|
-
import { UserQuestionHeader, UserQuestionCard, UserQuestionCards, UserQuestionFooter, UserQuestionDefaultLayout } from '../../../../registry/chat/user-question/compound';
|
|
4
|
-
import type { UserQuestionProps as RegistryUserQuestionProps, UserQuestionHandle, UserQuestionItem, UserQuestionOption, UserQuestionLabels } from '../../../../registry/chat/user-question/types';
|
|
5
|
-
export type { UserQuestionHandle, UserQuestionItem, UserQuestionOption, UserQuestionLabels };
|
|
6
|
-
export type UserQuestionProps = Omit<RegistryUserQuestionProps, 'chat4Icon' | 'arrowUpSIcon' | 'arrowDownSIcon' | 'sparklingIcon'>;
|
|
7
|
-
declare const UserQuestionRootProvider: import("react").ForwardRefExoticComponent<Omit<UserQuestionRootProps, "arrowDownSIcon" | "sparklingIcon" | "chat4Icon" | "arrowUpSIcon"> & {
|
|
8
|
-
children?: ReactNode;
|
|
9
|
-
} & import("react").RefAttributes<UserQuestionHandle>>;
|
|
10
|
-
interface MainLibUserQuestionCompound {
|
|
11
|
-
Root: typeof UserQuestionRootProvider;
|
|
12
|
-
Header: typeof UserQuestionHeader;
|
|
13
|
-
Card: typeof UserQuestionCard;
|
|
14
|
-
Cards: typeof UserQuestionCards;
|
|
15
|
-
Footer: typeof UserQuestionFooter;
|
|
16
|
-
DefaultLayout: typeof UserQuestionDefaultLayout;
|
|
17
|
-
}
|
|
18
|
-
export declare const UserQuestion: React.ForwardRefExoticComponent<UserQuestionProps & React.RefAttributes<UserQuestionHandle>> & MainLibUserQuestionCompound;
|
|
19
|
-
export { useUserQuestionContext, UserQuestionDefaultLayout };
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import type { UserQuestionAnswerProps, UserQuestionAnswerLabels } from '../../../../registry/chat/user-question-answer';
|
|
2
|
-
export type { UserQuestionAnswerProps, UserQuestionAnswerLabels };
|
|
3
|
-
export declare const UserQuestionAnswer: import("react").NamedExoticComponent<Omit<UserQuestionAnswerProps, "questionAnswerIcon">>;
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* [INPUT]: (N/A) - 此为导出入口文件,不接收输入
|
|
3
|
-
* [OUTPUT]: (Component & Type Exports) - 统一导出所有组件及其类型定义
|
|
4
|
-
* [POS]: components/index.ts - 组件库统一导出入口
|
|
5
|
-
*
|
|
6
|
-
* [PROTOCOL]:
|
|
7
|
-
* 1. 文件逻辑变更时必须同步更新此 Header
|
|
8
|
-
* 2. 更新后必须上浮检查 L2、L1 文档
|
|
9
|
-
* 3. 导出完整性检查:新增组件是否同步添加到导出列表
|
|
10
|
-
* 4. 类型导出检查:每个组件是否同时导出 Props 类型
|
|
11
|
-
*
|
|
12
|
-
* 注意:样式通过 Vite 构建配置自动处理,无需在此引入
|
|
13
|
-
*/
|
|
14
|
-
export { Button } from './basic/Button';
|
|
15
|
-
export type { ButtonProps } from './basic/Button';
|
|
16
|
-
export { IconButton } from './basic/IconButton';
|
|
17
|
-
export type { IconButtonProps } from './basic/IconButton';
|
|
18
|
-
export { Tooltip } from './basic/Tooltip';
|
|
19
|
-
export type { TooltipProps } from './basic/Tooltip';
|
|
20
|
-
export { EllipsisText } from './basic/EllipsisText';
|
|
21
|
-
export type { EllipsisTextProps } from './basic/EllipsisText';
|
|
22
|
-
export { OptionList } from './basic/OptionList';
|
|
23
|
-
export type { OptionListProps, OptionItem } from './basic/OptionList';
|
|
24
|
-
export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, } from './basic/DropdownMenu';
|
|
25
|
-
export type { DropdownMenuItemProps, DropdownMenuSubTriggerProps, DropdownMenuLabelProps, } from './basic/DropdownMenu';
|
|
26
|
-
export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, } from './basic/AlertDialog';
|
|
27
|
-
export type { AlertDialogContentProps, AlertDialogActionProps, AlertDialogHeaderProps, AlertDialogFooterProps, AlertDialogMediaProps, } from './basic/AlertDialog';
|
|
28
|
-
export { Kbd, KbdGroup } from './basic/Kbd';
|
|
29
|
-
export type { KbdProps, KbdGroupProps } from './basic/Kbd';
|
|
30
|
-
export { Switch, FunctionSwitch } from './basic/Switch';
|
|
31
|
-
export type { SwitchProps, FunctionSwitchProps, FunctionSwitchSize, FunctionSwitchValue, SegmentOption } from './basic/Switch';
|
|
32
|
-
export { Toggle, ToggleGroup, ToggleGroupItem } from './basic/Toggle';
|
|
33
|
-
export type { ToggleProps, ToggleGroupProps, ToggleGroupItemProps } from './basic/Toggle';
|
|
34
|
-
export { RadioGroup, RadioGroupItem } from './basic/RadioGroup';
|
|
35
|
-
export type { RadioGroupProps, RadioGroupItemProps } from './basic/RadioGroup';
|
|
36
|
-
export { CollapsibleSection } from './basic/CollapsibleSection';
|
|
37
|
-
export type { CollapsibleSectionProps } from './basic/CollapsibleSection';
|
|
38
|
-
export { Collapsible, CollapsibleTrigger, CollapsibleContent } from './basic/Collapsible';
|
|
39
|
-
export { ResizablePanelGroup, ResizablePanel, ResizableHandle, } from './basic/Resizable';
|
|
40
|
-
export type { ResizablePanelGroupProps, ResizablePanelProps, ResizableHandleProps, } from './basic/Resizable';
|
|
41
|
-
export { Scrollbar } from './basic/Scrollbar';
|
|
42
|
-
export type { ScrollbarProps } from './basic/Scrollbar';
|
|
43
|
-
export { Skeleton } from './basic/Skeleton';
|
|
44
|
-
export type { SkeletonProps } from './basic/Skeleton';
|
|
45
|
-
export { ShimmeringText } from './basic/ShimmeringText';
|
|
46
|
-
export type { ShimmeringTextProps } from './basic/ShimmeringText';
|
|
47
|
-
export { Spinner } from './basic/Spinner';
|
|
48
|
-
export type { SpinnerProps } from './basic/Spinner';
|
|
49
|
-
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, } from './basic/Table';
|
|
50
|
-
export type { TableProps, TableHeaderProps, TableBodyProps, TableFooterProps, TableRowProps, TableHeadProps, TableCellProps, TableCaptionProps, } from './basic/Table';
|
|
51
|
-
export { Avatar, AvatarImage, AvatarFallback, AvatarBadge, AvatarGroup, AvatarGroupCount, } from './basic/Avatar';
|
|
52
|
-
export type { AvatarProps, AvatarImageProps, AvatarFallbackProps, AvatarBadgeProps, AvatarGroupProps, AvatarGroupCountProps, } from './basic/Avatar';
|
|
53
|
-
export { Toaster, toast } from './basic/Toast';
|
|
54
|
-
export type { ToasterProps } from './basic/Toast';
|
|
55
|
-
export { Select, SelectTrigger, SelectValue, SelectContent, SelectLabel, SelectSeparator, SelectGroup, SelectItem, SelectScrollUpButton, SelectScrollDownButton, } from './basic/Select';
|
|
56
|
-
export type { SelectProps, SelectTriggerProps, SelectValueProps, SelectContentProps, SelectLabelProps, SelectSeparatorProps, SelectGroupProps, SelectItemProps, } from './basic/Select';
|
|
57
|
-
export { Tabs, TabsList, TabsTrigger, TabsContent, } from './basic/Tabs';
|
|
58
|
-
export type { TabsProps, TabsListProps, TabsTriggerProps, TabsContentProps, } from './basic/Tabs';
|
|
59
|
-
export { Collapse, CollapseItem, CollapseTrigger, CollapseContent, } from './basic/Collapse';
|
|
60
|
-
export type { CollapseProps, CollapseItemProps, CollapseTriggerProps, CollapseContentProps, } from './basic/Collapse';
|
|
61
|
-
export { TypographyH1, TypographyH2, TypographyH3, TypographyH4, TypographyP, TypographyBlockquote, TypographyTable, TypographyList, TypographyInlineCode, TypographyLead, TypographyLarge, TypographySmall, TypographyMuted, } from './basic/Typography';
|
|
62
|
-
export type { TypographyH1Props, TypographyH2Props, TypographyH3Props, TypographyH4Props, TypographyPProps, TypographyBlockquoteProps, TypographyTableProps, TypographyListProps, TypographyInlineCodeProps, TypographyLeadProps, TypographyLargeProps, TypographySmallProps, TypographyMutedProps, } from './basic/Typography';
|
|
63
|
-
export { Slider } from './basic/Slider';
|
|
64
|
-
export type { SliderProps } from './basic/Slider';
|
|
65
|
-
export { Pagination, PaginationContent, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PaginationEllipsis, } from './basic/Pagination';
|
|
66
|
-
export type { PaginationLinkProps, PaginationPreviousProps, PaginationNextProps, } from './basic/Pagination';
|
|
67
|
-
export { Tag, tagVariants } from './basic/Tag';
|
|
68
|
-
export type { TagProps } from './basic/Tag';
|
|
69
|
-
export { Progress } from './basic/Progress';
|
|
70
|
-
export type { ProgressProps } from './basic/Progress';
|
|
71
|
-
export { CollapsibleCard } from './basic/CollapsibleCard';
|
|
72
|
-
export type { CollapsibleCardProps } from './basic/CollapsibleCard';
|
|
73
|
-
export { SidebarMenu } from './basic/SidebarMenu';
|
|
74
|
-
export type { SidebarMenuProps, SidebarMenuItem, SidebarMenuItemAction } from './basic/SidebarMenu';
|
|
75
|
-
export { FolderButton } from './chat/FolderButton';
|
|
76
|
-
export type { FolderButtonProps } from './chat/FolderButton';
|
|
77
|
-
export { ChatInput, ChatInputRoot, ChatInputAbove, ChatInputBox, ChatInputAttachments, ChatInputInput, ChatInputActions, ChatInputActionsLeft, ChatInputActionsRight, ChatInputExpandButton, ChatInputFolderButton, ChatInputMoreButton, ChatInputSendButton, ChatInputFooterLeft, } from './chat/ChatInput';
|
|
78
|
-
export type { ChatInputProps, FolderPermissionConfig, GenerationStatusConfig, FooterLeftModelSwitchConfig, FooterLeftModelSwitchItem, ChatInputRootProps, ChatInputAboveProps, ChatInputBoxProps, ChatInputAttachmentsProps, ChatInputInputProps, ChatInputActionsProps, ChatInputActionsLeftProps, ChatInputActionsRightProps, ChatInputExpandButtonProps, } from './chat/ChatInput';
|
|
79
|
-
export { RelatedPrompts } from './chat/RelatedPrompts';
|
|
80
|
-
export type { RelatedPromptsProps, RelatedPromptItem } from './chat/RelatedPrompts';
|
|
81
|
-
export { HintBanner } from './chat/HintBanner';
|
|
82
|
-
export type { HintBannerProps } from './chat/HintBanner';
|
|
83
|
-
export { SendButton } from './chat/SendButton';
|
|
84
|
-
export type { SendButtonProps } from './chat/SendButton';
|
|
85
|
-
export { Response } from './chat/Response';
|
|
86
|
-
export type { ResponseProps, ResponsePhase, ResponseRound, ResponseStep, ResponseStepToolType } from './chat/Response';
|
|
87
|
-
export { UserMessage } from './chat/UserMessage';
|
|
88
|
-
export type { UserMessageProps } from './chat/UserMessage';
|
|
89
|
-
export { FileCard } from './chat/FileCard';
|
|
90
|
-
export type { FileCardProps } from './chat/FileCard';
|
|
91
|
-
export { FileAttachment } from './chat/FileAttachment';
|
|
92
|
-
export type { FileAttachmentProps } from './chat/FileAttachment';
|
|
93
|
-
export { ImageAttachment } from './chat/ImageAttachment';
|
|
94
|
-
export type { ImageAttachmentProps } from './chat/ImageAttachment';
|
|
95
|
-
export { ReasoningStep } from './chat/ReasoningStep';
|
|
96
|
-
export type { ReasoningStepProps, ReasoningStepDetail } from './chat/ReasoningStep';
|
|
97
|
-
export { ToolInvocationCard } from './chat/ToolInvocationCard';
|
|
98
|
-
export type { ToolInvocationCardProps, ToolInvocationStatus } from './chat/ToolInvocationCard';
|
|
99
|
-
export { PermissionCard } from './chat/PermissionCard';
|
|
100
|
-
export type { PermissionCardProps, PermissionCardAction } from './chat/PermissionCard';
|
|
101
|
-
export { MarkdownBody } from './chat/Markdown';
|
|
102
|
-
export type { MarkdownBodyProps } from './chat/Markdown';
|
|
103
|
-
export { GenerationStatusBar } from './chat/GenerationStatusBar';
|
|
104
|
-
export type { GenerationStatusBarProps } from './chat/GenerationStatusBar';
|
|
105
|
-
export { ThinkingIndicator } from './chat/ThinkingIndicator';
|
|
106
|
-
export type { ThinkingIndicatorProps } from './chat/ThinkingIndicator';
|
|
107
|
-
export { ImageGenerating } from './chat/ImageGenerating';
|
|
108
|
-
export type { ImageGeneratingProps } from './chat/ImageGenerating';
|
|
109
|
-
export { GeneratedImagesGrid } from './chat/GeneratedImagesGrid';
|
|
110
|
-
export type { GeneratedImagesGridProps } from './chat/GeneratedImagesGrid';
|
|
111
|
-
export { UserQuestion } from './chat/UserQuestion';
|
|
112
|
-
export type { UserQuestionProps, UserQuestionHandle, UserQuestionItem, UserQuestionOption, UserQuestionLabels, } from './chat/UserQuestion';
|
|
113
|
-
export { UserQuestionAnswer } from './chat/UserQuestionAnswer';
|
|
114
|
-
export type { UserQuestionAnswerProps, UserQuestionAnswerLabels, } from './chat/UserQuestionAnswer';
|
|
115
|
-
export { QueueIndicator } from './chat/QueueIndicator';
|
|
116
|
-
export type { QueueIndicatorProps, QueueIndicatorItem, QueueIndicatorLabels, } from './chat/QueueIndicator';
|
|
117
|
-
export { FileReviewPart } from './chat/FileReviewPart';
|
|
118
|
-
export type { FileReviewPartProps, FileReviewFile } from './chat/FileReviewPart';
|
|
119
|
-
export { TaskPart } from './chat/TaskPart';
|
|
120
|
-
export type { TaskPartProps, TaskPartTask, TaskStatus } from './chat/TaskPart';
|
|
121
|
-
export { PlanPart } from './chat/PlanPart';
|
|
122
|
-
export type { PlanPartProps } from './chat/PlanPart';
|
|
123
|
-
export { MermaidPart } from './chat/MermaidPart';
|
|
124
|
-
export type { MermaidPartProps } from './chat/MermaidPart';
|
|
125
|
-
export { CodeBlockPart } from './chat/CodeBlockPart';
|
|
126
|
-
export type { CodeBlockPartProps, CodeBlockDiffType } from './chat/CodeBlockPart';
|
|
127
|
-
export { TerminalCodeBlockPart } from './chat/TerminalCodeBlockPart';
|
|
128
|
-
export type { TerminalCodeBlockPartProps } from './chat/TerminalCodeBlockPart';
|
|
129
|
-
export { BrowserActionPart } from './chat/BrowserActionPart';
|
|
130
|
-
export type { BrowserActionPartProps, BrowserActionStatus } from './chat/BrowserActionPart';
|
|
131
|
-
export { AskUserPart } from './chat/AskUserPart';
|
|
132
|
-
export type { AskUserPartProps } from './chat/AskUserPart';
|
|
133
|
-
export { IconsProvider, useIcons, useIcon } from '../icons/context';
|
|
134
|
-
export type { IconKey, IconComponent, IconProps } from '../icons/types';
|
|
135
|
-
export type { IconsContextValue } from '../icons/context';
|
|
136
|
-
export { ThemeStyleProvider, useThemeStyle, type ThemeStyleValue, } from '../lib/ThemeStyleContext';
|
|
137
|
-
export { MOTION_DURATION, MOTION_EASE, MOTION_SPRING } from '../lib/motion';
|
|
138
|
-
export { FILE_TYPE_MAP, SETI_CHAR_MAP, SETI_COLOR_MAP, TYPE_TO_TOKEN_CLASS, getSetiIconType, getSetiIcon, getSetiIconColor, getFileIconColorClass, } from '../lib';
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* [INPUT]: (IconsProviderProps) - 图标映射与可选 getFileIcon
|
|
3
|
-
* [OUTPUT]: (JSX.Element) - Provider 包裹子节点;useIcon 无配置时返回 undefined,便于 ?? 走内置 fallback
|
|
4
|
-
* [POS]: icons/context - 图标注入层,组件通过 useIcons() 取图标,用户可替换为 Lucide/Remix 等
|
|
5
|
-
*
|
|
6
|
-
* [PROTOCOL]:
|
|
7
|
-
* 1. 新增 IconKey 时同步 types.ts
|
|
8
|
-
* 2. 不依赖 @ali/qoder-icon,主库零图标依赖
|
|
9
|
-
* 3. useIcon 无图标时返回 undefined,主库直接渲染处需 ?? 内置 SVG(如 CollapsibleSection、Toast)
|
|
10
|
-
*/
|
|
11
|
-
import { type ReactNode } from 'react';
|
|
12
|
-
import type { IconKey, IconComponent } from './types';
|
|
13
|
-
export interface IconsContextValue {
|
|
14
|
-
/** 语义化图标映射,未提供时组件内使用占位 */
|
|
15
|
-
icons: Partial<Record<IconKey, IconComponent>>;
|
|
16
|
-
/** 可选:按文件名返回文件类型图标,未提供时 file-icon 使用通用占位 */
|
|
17
|
-
getFileIcon?: (filename: string, className?: string) => ReactNode;
|
|
18
|
-
}
|
|
19
|
-
export interface IconsProviderProps {
|
|
20
|
-
value: IconsContextValue;
|
|
21
|
-
children: ReactNode;
|
|
22
|
-
}
|
|
23
|
-
export declare function IconsProvider({ value, children }: IconsProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
export declare function useIcons(): IconsContextValue;
|
|
25
|
-
/** 渲染语义化图标:有则用传入的 Icon,无则返回 undefined,便于调用方用 ?? 走内置 SVG fallback */
|
|
26
|
-
export declare function useIcon(key: IconKey, className?: string): ReactNode;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* [INPUT]: N/A - 类型定义
|
|
3
|
-
* [OUTPUT]: IconKey, IconComponent 等类型
|
|
4
|
-
* [POS]: icons/types - 图标抽象层类型,供 IconsContext 与组件使用
|
|
5
|
-
*
|
|
6
|
-
* [PROTOCOL]:
|
|
7
|
-
* 1. 新增组件使用图标时在此补充语义化 key
|
|
8
|
-
* 2. 与 IconsContext 的默认实现(若有)保持同步
|
|
9
|
-
*/
|
|
10
|
-
import type { ComponentType } from 'react';
|
|
11
|
-
/** 图标组件通用 props(支持 className 与无障碍) */
|
|
12
|
-
export interface IconProps {
|
|
13
|
-
className?: string;
|
|
14
|
-
'aria-hidden'?: boolean;
|
|
15
|
-
}
|
|
16
|
-
/** 语义化图标 key:库内组件通过 useIcons() 按 key 取图标,用户可用任意图标库实现 */
|
|
17
|
-
export type IconKey = 'send' | 'stop' | 'mic' | 'addLarge' | 'folder' | 'folderOpen' | 'history' | 'folderFill' | 'close' | 'closeLarge' | 'arrowRight' | 'arrowLeft' | 'codeSlash' | 'eye' | 'warning' | 'arrowDown' | 'arrowUp' | 'checkboxCircle' | 'closeCircle' | 'time' | 'chat' | 'chat3' | 'chat4' | 'sparkling' | 'questionAnswer' | 'infinity' | 'more' | 'arrowDownS' | 'arrowUpS' | 'check' | 'checkLine' | 'loader' | 'arrowRightCircleFill' | 'requestChanges' | 'catalog' | 'circle' | 'indeterminateCircle' | 'fileList2' | 'download' | 'questionnaire' | 'terminalBox' | 'externalLink' | 'global' | 'forbid2';
|
|
18
|
-
export type IconComponent = ComponentType<IconProps>;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* [INPUT]: (N/A) - Context 由上层 Provider 注入
|
|
3
|
-
* [OUTPUT]: (React Context) - 供 Portal 浮层继承 data-style / data-theme
|
|
4
|
-
* [POS]: lib/ThemeStyleContext
|
|
5
|
-
*
|
|
6
|
-
* [PROTOCOL]:
|
|
7
|
-
* 1. 用于 DropdownMenu、Tooltip 等挂到 body 的浮层,使其与当前页面的 data-style/data-theme 一致
|
|
8
|
-
* 2. 应用层在根节点用 ThemeStyleProvider 包裹并传入 style/theme,浮层内组件通过 useThemeStyle 读取并包一层 div
|
|
9
|
-
*/
|
|
10
|
-
import { type ReactNode } from 'react';
|
|
11
|
-
export interface ThemeStyleValue {
|
|
12
|
-
/** 布局风格:neutral | compact | soft | sharp | dense,对应 scale.css */
|
|
13
|
-
style?: string;
|
|
14
|
-
/** 颜色主题:light | dark | custom,对应 theme.css */
|
|
15
|
-
theme?: string;
|
|
16
|
-
}
|
|
17
|
-
export declare function ThemeStyleProvider({ children, value, }: {
|
|
18
|
-
children: ReactNode;
|
|
19
|
-
value: ThemeStyleValue;
|
|
20
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
export declare function useThemeStyle(): ThemeStyleValue;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* [INPUT]: (filename: string, className?: string) - 文件名、图标样式类
|
|
3
|
-
* [OUTPUT]: (ReactNode) - 对应文件类型的图标(默认通用占位;可通过 IconsProvider.getFileIcon 注入自定义)
|
|
4
|
-
* [POS]: lib/file-icon - 文件图标工具,用于 FileCard 等
|
|
5
|
-
*
|
|
6
|
-
* [PROTOCOL]:
|
|
7
|
-
* 1. 文件逻辑变更时必须同步更新此 Header
|
|
8
|
-
* 2. 使用方通过 IconsProvider 的 getFileIcon 注入时可实现按扩展名映射(如 Lucide/Remix)
|
|
9
|
-
* 3. 主库不依赖任何闭源图标包
|
|
10
|
-
*/
|
|
11
|
-
import type { ReactNode } from 'react';
|
|
12
|
-
/**
|
|
13
|
-
* 根据文件名返回文件图标。
|
|
14
|
-
* 主库仅提供通用占位图标;用户通过 IconsProvider 传入 getFileIcon 时可实现按扩展名映射(如 Lucide、Remix)。
|
|
15
|
-
*/
|
|
16
|
-
export declare function getFileIconByFilename(filename: string, className?: string): ReactNode;
|
package/dist/src/lib/i18n.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* [INPUT]: () - 无输入
|
|
3
|
-
* [OUTPUT]: (void) - 初始化 i18next 实例,供 react-i18next 使用
|
|
4
|
-
* [POS]: lib/i18n.ts - 在应用入口最早导入,确保 useTranslation 可用
|
|
5
|
-
*
|
|
6
|
-
* [PROTOCOL]:
|
|
7
|
-
* 1. 文件逻辑变更时必须同步更新此 Header
|
|
8
|
-
* 2. 新增语言或翻译时在此扩展 resources
|
|
9
|
-
* 3. 当前仅英文:lng/fallbackLng 为 en;业务侧可通过 props 传入 t() 做多语言
|
|
10
|
-
*/
|
|
11
|
-
import i18n from 'i18next';
|
|
12
|
-
export default i18n;
|
package/dist/src/lib/index.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* [INPUT]: (N/A) - Lib 工具函数导出入口
|
|
3
|
-
* [OUTPUT]: (Utility Exports) - 统一导出所有工具函数
|
|
4
|
-
* [POS]: lib/index.ts
|
|
5
|
-
*/
|
|
6
|
-
export { getFileIconByFilename } from './file-icon';
|
|
7
|
-
export { FILE_TYPE_MAP, SETI_CHAR_MAP, SETI_COLOR_MAP, TYPE_TO_TOKEN_CLASS, getSetiIconType, getSetiIcon, getSetiIconColor, getFileIconColorClass, } from '../../registry/lib/file-icon-maps';
|
|
8
|
-
export { default as i18n } from './i18n';
|
|
9
|
-
export { ThemeStyleProvider, useThemeStyle, type ThemeStyleValue, } from './ThemeStyleContext';
|
|
10
|
-
export { MOTION_DURATION, MOTION_EASE, MOTION_SPRING } from './motion';
|
package/dist/src/lib/motion.d.ts
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared motion baseline for foundation components shown in showcase.
|
|
3
|
-
* Keep values centralized to make interaction rhythm consistent.
|
|
4
|
-
*/
|
|
5
|
-
export declare const MOTION_DURATION: {
|
|
6
|
-
readonly fast: 0.15;
|
|
7
|
-
readonly base: 0.2;
|
|
8
|
-
readonly slow: 0.3;
|
|
9
|
-
};
|
|
10
|
-
export declare const MOTION_EASE: {
|
|
11
|
-
readonly standard: readonly [0.16, 1, 0.3, 1];
|
|
12
|
-
readonly emphasized: readonly [0.2, 0.8, 0.2, 1];
|
|
13
|
-
readonly out: readonly [0, 0, 0.2, 1];
|
|
14
|
-
};
|
|
15
|
-
export declare const MOTION_SPRING: {
|
|
16
|
-
readonly snappy: {
|
|
17
|
-
readonly type: "spring";
|
|
18
|
-
readonly stiffness: 520;
|
|
19
|
-
readonly damping: 34;
|
|
20
|
-
readonly mass: 0.7;
|
|
21
|
-
};
|
|
22
|
-
};
|
package/dist/src/lib/utils.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* [INPUT]: (ClassValue[])
|
|
3
|
-
* [OUTPUT]: (string) - 合并后的 class 名
|
|
4
|
-
* [POS]: lib/utils.ts - 从 registry 重导出,避免重复
|
|
5
|
-
*
|
|
6
|
-
* [PROTOCOL]:
|
|
7
|
-
* 1. 唯一来源为 registry/lib/utils.ts
|
|
8
|
-
* 2. 此文件仅做重导出
|
|
9
|
-
*/
|
|
10
|
-
export { cn } from '../../registry/lib/utils';
|
|
11
|
-
export type { ClassValue } from 'clsx';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const S=require("./chunk-DI55MBZ5-D1YJMs6x.cjs"),t=require("./mermaid.core-DBwAx_jp.cjs"),T=require("./graph-DIbblrZP.cjs"),H=require("./layout-Byuh8f-J.cjs");var z=t.__name(e=>e.append("circle").attr("class","start-state").attr("r",t.getConfig2().state.sizeUnit).attr("cx",t.getConfig2().state.padding+t.getConfig2().state.sizeUnit).attr("cy",t.getConfig2().state.padding+t.getConfig2().state.sizeUnit),"drawStartState"),L=t.__name(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",t.getConfig2().state.textHeight).attr("class","divider").attr("x2",t.getConfig2().state.textHeight*2).attr("y1",0).attr("y2",0),"drawDivider"),A=t.__name((e,n)=>{const d=e.append("text").attr("x",2*t.getConfig2().state.padding).attr("y",t.getConfig2().state.textHeight+2*t.getConfig2().state.padding).attr("font-size",t.getConfig2().state.fontSize).attr("class","state-title").text(n.id),g=d.node().getBBox();return e.insert("rect",":first-child").attr("x",t.getConfig2().state.padding).attr("y",t.getConfig2().state.padding).attr("width",g.width+2*t.getConfig2().state.padding).attr("height",g.height+2*t.getConfig2().state.padding).attr("rx",t.getConfig2().state.radius),d},"drawSimpleState"),P=t.__name((e,n)=>{const d=t.__name(function(c,m,y){const b=c.append("tspan").attr("x",2*t.getConfig2().state.padding).text(m);y||b.attr("dy",t.getConfig2().state.textHeight)},"addTspan"),o=e.append("text").attr("x",2*t.getConfig2().state.padding).attr("y",t.getConfig2().state.textHeight+1.3*t.getConfig2().state.padding).attr("font-size",t.getConfig2().state.fontSize).attr("class","state-title").text(n.descriptions[0]).node().getBBox(),l=o.height,p=e.append("text").attr("x",t.getConfig2().state.padding).attr("y",l+t.getConfig2().state.padding*.4+t.getConfig2().state.dividerMargin+t.getConfig2().state.textHeight).attr("class","state-description");let i=!0,r=!0;n.descriptions.forEach(function(c){i||(d(p,c,r),r=!1),i=!1});const C=e.append("line").attr("x1",t.getConfig2().state.padding).attr("y1",t.getConfig2().state.padding+l+t.getConfig2().state.dividerMargin/2).attr("y2",t.getConfig2().state.padding+l+t.getConfig2().state.dividerMargin/2).attr("class","descr-divider"),h=p.node().getBBox(),s=Math.max(h.width,o.width);return C.attr("x2",s+3*t.getConfig2().state.padding),e.insert("rect",":first-child").attr("x",t.getConfig2().state.padding).attr("y",t.getConfig2().state.padding).attr("width",s+2*t.getConfig2().state.padding).attr("height",h.height+l+2*t.getConfig2().state.padding).attr("rx",t.getConfig2().state.radius),e},"drawDescrState"),R=t.__name((e,n,d)=>{const g=t.getConfig2().state.padding,o=2*t.getConfig2().state.padding,l=e.node().getBBox(),p=l.width,i=l.x,r=e.append("text").attr("x",0).attr("y",t.getConfig2().state.titleShift).attr("font-size",t.getConfig2().state.fontSize).attr("class","state-title").text(n.id),h=r.node().getBBox().width+o;let s=Math.max(h,p);s===p&&(s=s+o);let c;const m=e.node().getBBox();n.doc,c=i-g,h>p&&(c=(p-s)/2+g),Math.abs(i-m.x)<g&&h>p&&(c=i-(h-p)/2);const y=1-t.getConfig2().state.textHeight;return e.insert("rect",":first-child").attr("x",c).attr("y",y).attr("class",d?"alt-composit":"composit").attr("width",s).attr("height",m.height+t.getConfig2().state.textHeight+t.getConfig2().state.titleShift+1).attr("rx","0"),r.attr("x",c+g),h<=p&&r.attr("x",i+(s-o)/2-h/2+g),e.insert("rect",":first-child").attr("x",c).attr("y",t.getConfig2().state.titleShift-t.getConfig2().state.textHeight-t.getConfig2().state.padding).attr("width",s).attr("height",t.getConfig2().state.textHeight*3).attr("rx",t.getConfig2().state.radius),e.insert("rect",":first-child").attr("x",c).attr("y",t.getConfig2().state.titleShift-t.getConfig2().state.textHeight-t.getConfig2().state.padding).attr("width",s).attr("height",m.height+3+2*t.getConfig2().state.textHeight).attr("rx",t.getConfig2().state.radius),e},"addTitleAndBox"),W=t.__name(e=>(e.append("circle").attr("class","end-state-outer").attr("r",t.getConfig2().state.sizeUnit+t.getConfig2().state.miniPadding).attr("cx",t.getConfig2().state.padding+t.getConfig2().state.sizeUnit+t.getConfig2().state.miniPadding).attr("cy",t.getConfig2().state.padding+t.getConfig2().state.sizeUnit+t.getConfig2().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",t.getConfig2().state.sizeUnit).attr("cx",t.getConfig2().state.padding+t.getConfig2().state.sizeUnit+2).attr("cy",t.getConfig2().state.padding+t.getConfig2().state.sizeUnit+2)),"drawEndState"),G=t.__name((e,n)=>{let d=t.getConfig2().state.forkWidth,g=t.getConfig2().state.forkHeight;if(n.parentId){let o=d;d=g,g=o}return e.append("rect").style("stroke","black").style("fill","black").attr("width",d).attr("height",g).attr("x",t.getConfig2().state.padding).attr("y",t.getConfig2().state.padding)},"drawForkJoinState"),D=t.__name((e,n,d,g)=>{let o=0;const l=g.append("text");l.style("text-anchor","start"),l.attr("class","noteText");let p=e.replace(/\r\n/g,"<br/>");p=p.replace(/\n/g,"<br/>");const i=p.split(t.common_default.lineBreakRegex);let r=1.25*t.getConfig2().state.noteMargin;for(const C of i){const h=C.trim();if(h.length>0){const s=l.append("tspan");if(s.text(h),r===0){const c=s.node().getBBox();r+=c.height}o+=r,s.attr("x",n+t.getConfig2().state.noteMargin),s.attr("y",d+o+1.25*t.getConfig2().state.noteMargin)}}return{textWidth:l.node().getBBox().width,textHeight:o}},"_drawLongText"),U=t.__name((e,n)=>{n.attr("class","state-note");const d=n.append("rect").attr("x",0).attr("y",t.getConfig2().state.padding),g=n.append("g"),{textWidth:o,textHeight:l}=D(e,0,0,g);return d.attr("height",l+2*t.getConfig2().state.noteMargin),d.attr("width",o+t.getConfig2().state.noteMargin*2),d},"drawNote"),k=t.__name(function(e,n){const d=n.id,g={id:d,label:n.id,width:0,height:0},o=e.append("g").attr("id",d).attr("class","stateGroup");n.type==="start"&&z(o),n.type==="end"&&W(o),(n.type==="fork"||n.type==="join")&&G(o,n),n.type==="note"&&U(n.note.text,o),n.type==="divider"&&L(o),n.type==="default"&&n.descriptions.length===0&&A(o,n),n.type==="default"&&n.descriptions.length>0&&P(o,n);const l=o.node().getBBox();return g.width=l.width+2*t.getConfig2().state.padding,g.height=l.height+2*t.getConfig2().state.padding,g},"drawState"),N=0,F=t.__name(function(e,n,d){const g=t.__name(function(r){switch(r){case S.StateDB.relationType.AGGREGATION:return"aggregation";case S.StateDB.relationType.EXTENSION:return"extension";case S.StateDB.relationType.COMPOSITION:return"composition";case S.StateDB.relationType.DEPENDENCY:return"dependency"}},"getRelationType");n.points=n.points.filter(r=>!Number.isNaN(r.y));const o=n.points,l=t.line().x(function(r){return r.x}).y(function(r){return r.y}).curve(t.curveBasis),p=e.append("path").attr("d",l(o)).attr("id","edge"+N).attr("class","transition");let i="";if(t.getConfig2().state.arrowMarkerAbsolute&&(i=t.getUrl(!0)),p.attr("marker-end","url("+i+"#"+g(S.StateDB.relationType.DEPENDENCY)+"End)"),d.title!==void 0){const r=e.append("g").attr("class","stateLabel"),{x:C,y:h}=t.utils_default.calcLabelPosition(n.points),s=t.common_default.getRows(d.title);let c=0;const m=[];let y=0,b=0;for(let x=0;x<=s.length;x++){const f=r.append("text").attr("text-anchor","middle").text(s[x]).attr("x",C).attr("y",h+c),u=f.node().getBBox();y=Math.max(y,u.width),b=Math.min(b,u.x),t.log.info(u.x,C,h+c),c===0&&(c=f.node().getBBox().height,t.log.info("Title height",c,h)),m.push(f)}let _=c*s.length;if(s.length>1){const x=(s.length-1)*c*.5;m.forEach((f,u)=>f.attr("y",h+u*c-x)),_=c*s.length}const a=r.node().getBBox();r.insert("rect",":first-child").attr("class","box").attr("x",C-y/2-t.getConfig2().state.padding/2).attr("y",h-_/2-t.getConfig2().state.padding/2-3.5).attr("width",y+t.getConfig2().state.padding).attr("height",_+t.getConfig2().state.padding),t.log.info(a)}N++},"drawEdge"),w,E={},O=t.__name(function(){},"setConf"),q=t.__name(function(e){e.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),J=t.__name(function(e,n,d,g){w=t.getConfig2().state;const o=t.getConfig2().securityLevel;let l;o==="sandbox"&&(l=t.select("#i"+n));const p=o==="sandbox"?t.select(l.nodes()[0].contentDocument.body):t.select("body"),i=o==="sandbox"?l.nodes()[0].contentDocument:document;t.log.debug("Rendering diagram "+e);const r=p.select(`[id='${n}']`);q(r);const C=g.db.getRootDoc();M(C,r,void 0,!1,p,i,g);const h=w.padding,s=r.node().getBBox(),c=s.width+h*2,m=s.height+h*2,y=c*1.75;t.configureSvgSize(r,m,y,w.useMaxWidth),r.attr("viewBox",`${s.x-w.padding} ${s.y-w.padding} `+c+" "+m)},"draw"),X=t.__name(e=>e?e.length*w.fontSizeFactor:1,"getLabelWidth"),M=t.__name((e,n,d,g,o,l,p)=>{const i=new T.Graph({compound:!0,multigraph:!0});let r,C=!0;for(r=0;r<e.length;r++)if(e[r].stmt==="relation"){C=!1;break}d?i.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:C?1:w.edgeLengthFactor,nodeSep:C?1:50,isMultiGraph:!0}):i.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:C?1:w.edgeLengthFactor,nodeSep:C?1:50,ranker:"tight-tree",isMultiGraph:!0}),i.setDefaultEdgeLabel(function(){return{}});const h=p.db.getStates(),s=p.db.getRelations(),c=Object.keys(h);for(const a of c){const x=h[a];d&&(x.parentId=d);let f;if(x.doc){let u=n.append("g").attr("id",x.id).attr("class","stateGroup");f=M(x.doc,u,x.id,!g,o,l,p);{u=R(u,x,g);let B=u.node().getBBox();f.width=B.width,f.height=B.height+w.padding/2,E[x.id]={y:w.compositTitleSize}}}else f=k(n,x,i);if(x.note){const u={descriptions:[],id:x.id+"-note",note:x.note,type:"note"},B=k(n,u,i);x.note.position==="left of"?(i.setNode(f.id+"-note",B),i.setNode(f.id,f)):(i.setNode(f.id,f),i.setNode(f.id+"-note",B)),i.setParent(f.id,f.id+"-group"),i.setParent(f.id+"-note",f.id+"-group")}else i.setNode(f.id,f)}t.log.debug("Count=",i.nodeCount(),i);let m=0;s.forEach(function(a){m++,t.log.debug("Setting edge",a),i.setEdge(a.id1,a.id2,{relation:a,width:X(a.title),height:w.labelHeight*t.common_default.getRows(a.title).length,labelpos:"c"},"id"+m)}),H.layout(i),t.log.debug("Graph after layout",i.nodes());const y=n.node();i.nodes().forEach(function(a){a!==void 0&&i.node(a)!==void 0?(t.log.warn("Node "+a+": "+JSON.stringify(i.node(a))),o.select("#"+y.id+" #"+a).attr("transform","translate("+(i.node(a).x-i.node(a).width/2)+","+(i.node(a).y+(E[a]?E[a].y:0)-i.node(a).height/2)+" )"),o.select("#"+y.id+" #"+a).attr("data-x-shift",i.node(a).x-i.node(a).width/2),l.querySelectorAll("#"+y.id+" #"+a+" .divider").forEach(f=>{const u=f.parentElement;let B=0,v=0;u&&(u.parentElement&&(B=u.parentElement.getBBox().width),v=parseInt(u.getAttribute("data-x-shift"),10),Number.isNaN(v)&&(v=0)),f.setAttribute("x1",0-v+8),f.setAttribute("x2",B-v-8)})):t.log.debug("No Node "+a+": "+JSON.stringify(i.node(a)))});let b=y.getBBox();i.edges().forEach(function(a){a!==void 0&&i.edge(a)!==void 0&&(t.log.debug("Edge "+a.v+" -> "+a.w+": "+JSON.stringify(i.edge(a))),F(n,i.edge(a),i.edge(a).relation))}),b=y.getBBox();const _={id:d||"root",label:d||"root",width:0,height:0};return _.width=b.width+2*w.padding,_.height=b.height+2*w.padding,t.log.debug("Doc rendered",_,i),_},"renderDoc"),I={setConf:O,draw:J},Y={parser:S.stateDiagram_default,get db(){return new S.StateDB(1)},renderer:I,styles:S.styles_default,init:t.__name(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")};exports.diagram=Y;
|