sparkdesign 0.4.3 → 0.4.4

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.
Files changed (467) hide show
  1. package/README.md +205 -111
  2. package/dist/_basePickBy-DnQN8w3y.js +151 -0
  3. package/dist/_basePickBy-a-kPMlkg.cjs +1 -0
  4. package/dist/_baseUniq-B-N2NQ50.js +614 -0
  5. package/dist/_baseUniq-Cc_zbSif.cjs +1 -0
  6. package/dist/arc-BQBhijZ6.js +83 -0
  7. package/dist/arc-mWQt0Yph.cjs +1 -0
  8. package/dist/architectureDiagram-VXUJARFQ-BMZEucno.cjs +36 -0
  9. package/dist/architectureDiagram-VXUJARFQ-DTdjD3Bp.js +4661 -0
  10. package/dist/blockDiagram-VD42YOAC-CzHn0yob.js +2256 -0
  11. package/dist/blockDiagram-VD42YOAC-DDxdHAlz.cjs +122 -0
  12. package/dist/c4Diagram-YG6GDRKO-4Gz0I4gj.cjs +10 -0
  13. package/dist/c4Diagram-YG6GDRKO-BIy--yVN.js +1580 -0
  14. package/dist/channel-BQn0o8bs.js +5 -0
  15. package/dist/channel-DaN7XniJ.cjs +1 -0
  16. package/dist/chunk-4BX2VUAB-BlQFTQqz.cjs +1 -0
  17. package/dist/chunk-4BX2VUAB-Czitj3Kc.js +8 -0
  18. package/dist/chunk-55IACEB6-DXacNZbO.js +8 -0
  19. package/dist/chunk-55IACEB6-DnDxpye9.cjs +1 -0
  20. package/dist/chunk-B4BG7PRW-CBdN0q_V.js +1375 -0
  21. package/dist/chunk-B4BG7PRW-DbGvUkGO.cjs +165 -0
  22. package/dist/chunk-DI55MBZ5-D1YJMs6x.cjs +220 -0
  23. package/dist/chunk-DI55MBZ5-NCQTvayw.js +1370 -0
  24. package/dist/chunk-FMBD7UC4-CsGMbrtr.js +19 -0
  25. package/dist/chunk-FMBD7UC4-Di7cUUh5.cjs +15 -0
  26. package/dist/chunk-QN33PNHL-0j5LC8Lm.cjs +1 -0
  27. package/dist/chunk-QN33PNHL-3GERZBRm.js +19 -0
  28. package/dist/chunk-QZHKN3VN-AVEY9ImQ.js +15 -0
  29. package/dist/chunk-QZHKN3VN-s8Z0a8mc.cjs +1 -0
  30. package/dist/chunk-TZMSLE5B-CAf87HPt.cjs +1 -0
  31. package/dist/chunk-TZMSLE5B-sbiflal0.js +64 -0
  32. package/dist/classDiagram-2ON5EDUG-Ct9JLIN2.cjs +1 -0
  33. package/dist/classDiagram-2ON5EDUG-Dzfrft3a.js +16 -0
  34. package/dist/classDiagram-v2-WZHVMYZB-Ct9JLIN2.cjs +1 -0
  35. package/dist/classDiagram-v2-WZHVMYZB-Dzfrft3a.js +16 -0
  36. package/dist/clone-Cde_NQ8V.js +8 -0
  37. package/dist/clone-DCNjWuM2.cjs +1 -0
  38. package/dist/cose-bilkent-S5V4N54A-0uLijMro.cjs +1 -0
  39. package/dist/cose-bilkent-S5V4N54A-Bb08N431.js +2608 -0
  40. package/dist/cytoscape.esm-CNUX3VTg.cjs +321 -0
  41. package/dist/cytoscape.esm-Cvf3sx9F.js +18704 -0
  42. package/dist/dagre-6UL2VRFP-CY_Wz5Zd.js +444 -0
  43. package/dist/dagre-6UL2VRFP-Dxe7_qZc.cjs +4 -0
  44. package/dist/defaultLocale-BgPVtth8.js +171 -0
  45. package/dist/defaultLocale-C4wbwF1n.cjs +1 -0
  46. package/dist/diagram-PSM6KHXK-D2bdb7MT.js +531 -0
  47. package/dist/diagram-PSM6KHXK-YF69SUjY.cjs +24 -0
  48. package/dist/diagram-QEK2KX5R-BpUSoh0-.js +217 -0
  49. package/dist/diagram-QEK2KX5R-DZPGteon.cjs +43 -0
  50. package/dist/diagram-S2PKOQOG-ht-zdvFG.cjs +24 -0
  51. package/dist/diagram-S2PKOQOG-zFeLJ50Z.js +142 -0
  52. package/dist/erDiagram-Q2GNP2WA-B38iJ6ts.js +841 -0
  53. package/dist/erDiagram-Q2GNP2WA-RgS80DDU.cjs +60 -0
  54. package/dist/flowDiagram-NV44I4VS-BHilOs2p.cjs +162 -0
  55. package/dist/flowDiagram-NV44I4VS-BrBJcoce.js +1620 -0
  56. package/dist/fonts/KaTeX_AMS-Regular.ttf +0 -0
  57. package/dist/fonts/KaTeX_AMS-Regular.woff +0 -0
  58. package/dist/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  59. package/dist/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
  60. package/dist/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
  61. package/dist/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  62. package/dist/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
  63. package/dist/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
  64. package/dist/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  65. package/dist/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
  66. package/dist/fonts/KaTeX_Fraktur-Bold.woff +0 -0
  67. package/dist/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  68. package/dist/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
  69. package/dist/fonts/KaTeX_Fraktur-Regular.woff +0 -0
  70. package/dist/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  71. package/dist/fonts/KaTeX_Main-Bold.ttf +0 -0
  72. package/dist/fonts/KaTeX_Main-Bold.woff +0 -0
  73. package/dist/fonts/KaTeX_Main-Bold.woff2 +0 -0
  74. package/dist/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
  75. package/dist/fonts/KaTeX_Main-BoldItalic.woff +0 -0
  76. package/dist/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  77. package/dist/fonts/KaTeX_Main-Italic.ttf +0 -0
  78. package/dist/fonts/KaTeX_Main-Italic.woff +0 -0
  79. package/dist/fonts/KaTeX_Main-Italic.woff2 +0 -0
  80. package/dist/fonts/KaTeX_Main-Regular.ttf +0 -0
  81. package/dist/fonts/KaTeX_Main-Regular.woff +0 -0
  82. package/dist/fonts/KaTeX_Main-Regular.woff2 +0 -0
  83. package/dist/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
  84. package/dist/fonts/KaTeX_Math-BoldItalic.woff +0 -0
  85. package/dist/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  86. package/dist/fonts/KaTeX_Math-Italic.ttf +0 -0
  87. package/dist/fonts/KaTeX_Math-Italic.woff +0 -0
  88. package/dist/fonts/KaTeX_Math-Italic.woff2 +0 -0
  89. package/dist/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
  90. package/dist/fonts/KaTeX_SansSerif-Bold.woff +0 -0
  91. package/dist/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  92. package/dist/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
  93. package/dist/fonts/KaTeX_SansSerif-Italic.woff +0 -0
  94. package/dist/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  95. package/dist/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
  96. package/dist/fonts/KaTeX_SansSerif-Regular.woff +0 -0
  97. package/dist/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  98. package/dist/fonts/KaTeX_Script-Regular.ttf +0 -0
  99. package/dist/fonts/KaTeX_Script-Regular.woff +0 -0
  100. package/dist/fonts/KaTeX_Script-Regular.woff2 +0 -0
  101. package/dist/fonts/KaTeX_Size1-Regular.ttf +0 -0
  102. package/dist/fonts/KaTeX_Size1-Regular.woff +0 -0
  103. package/dist/fonts/KaTeX_Size1-Regular.woff2 +0 -0
  104. package/dist/fonts/KaTeX_Size2-Regular.ttf +0 -0
  105. package/dist/fonts/KaTeX_Size2-Regular.woff +0 -0
  106. package/dist/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  107. package/dist/fonts/KaTeX_Size3-Regular.ttf +0 -0
  108. package/dist/fonts/KaTeX_Size3-Regular.woff +0 -0
  109. package/dist/fonts/KaTeX_Size3-Regular.woff2 +0 -0
  110. package/dist/fonts/KaTeX_Size4-Regular.ttf +0 -0
  111. package/dist/fonts/KaTeX_Size4-Regular.woff +0 -0
  112. package/dist/fonts/KaTeX_Size4-Regular.woff2 +0 -0
  113. package/dist/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
  114. package/dist/fonts/KaTeX_Typewriter-Regular.woff +0 -0
  115. package/dist/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  116. package/dist/ganttDiagram-JELNMOA3-pZiJeFio.cjs +267 -0
  117. package/dist/ganttDiagram-JELNMOA3-tw6FhkWJ.js +2670 -0
  118. package/dist/gitGraphDiagram-V2S2FVAM-BWn5uIK5.js +699 -0
  119. package/dist/gitGraphDiagram-V2S2FVAM-DKKeG-9R.cjs +65 -0
  120. package/dist/graph-DIbblrZP.cjs +1 -0
  121. package/dist/graph-DPcK91G3.js +247 -0
  122. package/dist/infoDiagram-HS3SLOUP-B8gwwhct.cjs +2 -0
  123. package/dist/infoDiagram-HS3SLOUP-D47PNcP_.js +24 -0
  124. package/dist/init-CHZsXQcr.cjs +1 -0
  125. package/dist/init-DjUOC4st.js +16 -0
  126. package/dist/journeyDiagram-XKPGCS4Q-BG3cfhyU.js +834 -0
  127. package/dist/journeyDiagram-XKPGCS4Q-D8DVLJof.cjs +139 -0
  128. package/dist/kanban-definition-3W4ZIXB7-4OCnEouP.cjs +89 -0
  129. package/dist/kanban-definition-3W4ZIXB7-CWi_ssF9.js +719 -0
  130. package/dist/katex.css +1 -0
  131. package/dist/layout-Byuh8f-J.cjs +1 -0
  132. package/dist/layout-CdLdvj1j.js +1335 -0
  133. package/dist/linear-C2Q_PI9B.js +259 -0
  134. package/dist/linear-C69aPBW1.cjs +1 -0
  135. package/dist/mermaid.core-DBwAx_jp.cjs +249 -0
  136. package/dist/mermaid.core-gFR0XUlD.js +15300 -0
  137. package/dist/mindmap-definition-VGOIOE7T-8P7obVV4.cjs +68 -0
  138. package/dist/mindmap-definition-VGOIOE7T-DnOa7WJ9.js +784 -0
  139. package/dist/ordinal-B6-f3MAq.js +61 -0
  140. package/dist/ordinal-CagbB1m8.cjs +1 -0
  141. package/dist/pieDiagram-ADFJNKIX-5NAlvhMo.js +161 -0
  142. package/dist/pieDiagram-ADFJNKIX-CQBG4yR9.cjs +30 -0
  143. package/dist/qoder-design.css +2 -0
  144. package/dist/quadrantDiagram-AYHSOK5B-Oe4y7RZ0.cjs +7 -0
  145. package/dist/quadrantDiagram-AYHSOK5B-rh2DPEP1.js +1022 -0
  146. package/dist/registry/basic/alert-dialog.d.ts +40 -0
  147. package/dist/registry/basic/avatar.d.ts +30 -0
  148. package/dist/registry/basic/button.d.ts +16 -0
  149. package/dist/registry/basic/collapse.d.ts +22 -0
  150. package/dist/registry/basic/collapsible-card.d.ts +34 -0
  151. package/dist/registry/basic/collapsible.d.ts +15 -0
  152. package/dist/registry/basic/dropdown-menu.d.ts +52 -0
  153. package/dist/registry/basic/icon-button.d.ts +12 -0
  154. package/dist/registry/basic/icons-inline.d.ts +51 -0
  155. package/dist/registry/basic/kbd.d.ts +23 -0
  156. package/dist/registry/basic/option-list.d.ts +16 -0
  157. package/dist/registry/basic/pagination.d.ts +33 -0
  158. package/dist/registry/basic/progress.d.ts +18 -0
  159. package/dist/registry/basic/radio-group.d.ts +25 -0
  160. package/dist/registry/basic/resizable.d.ts +318 -0
  161. package/dist/registry/basic/scrollbar.d.ts +12 -0
  162. package/dist/registry/basic/select.d.ts +35 -0
  163. package/dist/registry/basic/shimmering-text.d.ts +27 -0
  164. package/dist/registry/basic/sidebar-menu.d.ts +23 -0
  165. package/dist/registry/basic/skeleton.d.ts +10 -0
  166. package/dist/registry/basic/slider.d.ts +16 -0
  167. package/dist/registry/basic/sonner.d.ts +23 -0
  168. package/dist/registry/basic/spinner.d.ts +5 -0
  169. package/dist/registry/basic/switch.d.ts +20 -0
  170. package/dist/registry/basic/table.d.ts +18 -0
  171. package/dist/registry/basic/tabs.d.ts +29 -0
  172. package/dist/registry/basic/tag.d.ts +23 -0
  173. package/dist/registry/basic/theme-from-document.d.ts +10 -0
  174. package/dist/registry/basic/toggle.d.ts +29 -0
  175. package/dist/registry/basic/tooltip.d.ts +34 -0
  176. package/dist/registry/basic/typography.d.ts +76 -0
  177. package/dist/registry/chat/ask-user-part.d.ts +24 -0
  178. package/dist/registry/chat/browser-action-part.d.ts +28 -0
  179. package/dist/registry/chat/chat-input/chat-input-folder-selector.d.ts +22 -0
  180. package/dist/registry/chat/chat-input/chat-input-model-switcher.d.ts +12 -0
  181. package/dist/registry/chat/chat-input/chat-input-textarea.d.ts +9 -0
  182. package/dist/registry/chat/chat-input/compound.d.ts +97 -0
  183. package/dist/registry/chat/chat-input/context.d.ts +64 -0
  184. package/dist/registry/chat/chat-input/folder-permission-dialog.d.ts +11 -0
  185. package/dist/registry/chat/chat-input/index.d.ts +34 -0
  186. package/dist/registry/chat/chat-input/types.d.ts +79 -0
  187. package/dist/registry/chat/chat-input/useAutoResizeTextarea.d.ts +7 -0
  188. package/dist/registry/chat/code-block-part.d.ts +23 -0
  189. package/dist/registry/chat/file-attachment.d.ts +19 -0
  190. package/dist/registry/chat/file-card.d.ts +10 -0
  191. package/dist/registry/chat/file-review-part.d.ts +30 -0
  192. package/dist/registry/chat/folder-button.d.ts +20 -0
  193. package/dist/registry/chat/generated-images-grid.d.ts +15 -0
  194. package/dist/registry/chat/generation-status-bar.d.ts +19 -0
  195. package/dist/registry/chat/hint-banner.d.ts +28 -0
  196. package/dist/registry/chat/image-attachment.d.ts +19 -0
  197. package/dist/registry/chat/image-generating.d.ts +15 -0
  198. package/dist/registry/chat/markdown.d.ts +8 -0
  199. package/dist/registry/chat/mermaid-part.d.ts +17 -0
  200. package/dist/registry/chat/permission-card.d.ts +24 -0
  201. package/dist/registry/chat/plan-part.d.ts +30 -0
  202. package/dist/registry/chat/queue-indicator.d.ts +27 -0
  203. package/dist/registry/chat/reasoning-step/compound.d.ts +17 -0
  204. package/dist/registry/chat/reasoning-step/context.d.ts +10 -0
  205. package/dist/registry/chat/reasoning-step/index.d.ts +14 -0
  206. package/dist/registry/chat/reasoning-step/types.d.ts +95 -0
  207. package/dist/registry/chat/related-prompts.d.ts +23 -0
  208. package/dist/registry/chat/response/compound.d.ts +25 -0
  209. package/dist/registry/chat/response/context.d.ts +9 -0
  210. package/dist/registry/chat/response/index.d.ts +15 -0
  211. package/dist/registry/chat/response/types.d.ts +99 -0
  212. package/dist/registry/chat/send-button.d.ts +17 -0
  213. package/dist/registry/chat/streaming-markdown-block.d.ts +8 -0
  214. package/dist/registry/chat/task-part.d.ts +28 -0
  215. package/dist/registry/chat/terminal-code-block-part.d.ts +18 -0
  216. package/dist/registry/chat/thinking-indicator.d.ts +14 -0
  217. package/dist/registry/chat/tool-invocation-card.d.ts +20 -0
  218. package/dist/registry/chat/user-message.d.ts +6 -0
  219. package/dist/registry/chat/user-question/UserQuestionCard.d.ts +30 -0
  220. package/dist/registry/chat/user-question/UserQuestionFooter.d.ts +18 -0
  221. package/dist/registry/chat/user-question/UserQuestionHeader.d.ts +20 -0
  222. package/dist/registry/chat/user-question/compound.d.ts +37 -0
  223. package/dist/registry/chat/user-question/context.d.ts +55 -0
  224. package/dist/registry/chat/user-question/index.d.ts +15 -0
  225. package/dist/registry/chat/user-question/types.d.ts +52 -0
  226. package/dist/registry/chat/user-question/useUserQuestionKeyboard.d.ts +17 -0
  227. package/dist/registry/chat/user-question/useUserQuestionState.d.ts +26 -0
  228. package/dist/registry/chat/user-question-answer.d.ts +13 -0
  229. package/dist/registry/lib/file-icon-maps.d.ts +20 -0
  230. package/dist/registry/lib/use-mermaid-render.d.ts +5 -0
  231. package/dist/registry/lib/utils.d.ts +11 -0
  232. package/dist/requirementDiagram-UZGBJVZJ-DcWaCuXr.js +850 -0
  233. package/dist/requirementDiagram-UZGBJVZJ-gfdlrFiq.cjs +64 -0
  234. package/dist/sankeyDiagram-TZEHDZUN-CQIKFwD0.js +810 -0
  235. package/dist/sankeyDiagram-TZEHDZUN-DvPtzQvC.cjs +10 -0
  236. package/dist/scale/computed.css +103 -0
  237. package/dist/scale/config.css +110 -0
  238. package/dist/scale/index.css +30 -0
  239. package/dist/scale/presets/compact.css +30 -0
  240. package/dist/scale/presets/dense.css +64 -0
  241. package/dist/scale/presets/sharp.css +40 -0
  242. package/dist/scale/presets/soft.css +16 -0
  243. package/dist/scale.css +13 -0
  244. package/dist/sequenceDiagram-WL72ISMW-BNrsMagL.cjs +145 -0
  245. package/dist/sequenceDiagram-WL72ISMW-iCX3ckKx.js +2511 -0
  246. package/dist/spark-design.cjs.js +265 -0
  247. package/dist/spark-design.es.js +13486 -0
  248. package/dist/src/components/basic/AlertDialog/index.d.ts +20 -0
  249. package/dist/src/components/basic/Avatar/index.d.ts +7 -0
  250. package/dist/src/components/basic/Button/index.d.ts +7 -0
  251. package/dist/src/components/basic/Collapse/index.d.ts +15 -0
  252. package/dist/src/components/basic/Collapsible/index.d.ts +7 -0
  253. package/dist/src/components/basic/CollapsibleCard/index.d.ts +7 -0
  254. package/dist/src/components/basic/CollapsibleSection/index.d.ts +43 -0
  255. package/dist/src/components/basic/DropdownMenu/index.d.ts +19 -0
  256. package/dist/src/components/basic/EllipsisText/index.d.ts +53 -0
  257. package/dist/src/components/basic/IconButton/index.d.ts +7 -0
  258. package/dist/src/components/basic/Kbd/index.d.ts +7 -0
  259. package/dist/src/components/basic/OptionList/index.d.ts +7 -0
  260. package/dist/src/components/basic/Pagination/index.d.ts +7 -0
  261. package/dist/src/components/basic/Progress/index.d.ts +7 -0
  262. package/dist/src/components/basic/RadioGroup/index.d.ts +7 -0
  263. package/dist/src/components/basic/Resizable/index.d.ts +7 -0
  264. package/dist/src/components/basic/Scrollbar/index.d.ts +7 -0
  265. package/dist/src/components/basic/Select/index.d.ts +17 -0
  266. package/dist/src/components/basic/ShimmeringText/index.d.ts +7 -0
  267. package/dist/src/components/basic/SidebarMenu/index.d.ts +4 -0
  268. package/dist/src/components/basic/Skeleton/index.d.ts +7 -0
  269. package/dist/src/components/basic/Slider/index.d.ts +7 -0
  270. package/dist/src/components/basic/Spinner/index.d.ts +7 -0
  271. package/dist/src/components/basic/Switch/index.d.ts +38 -0
  272. package/dist/src/components/basic/Table/index.d.ts +7 -0
  273. package/dist/src/components/basic/Tabs/index.d.ts +7 -0
  274. package/dist/src/components/basic/Tag/index.d.ts +10 -0
  275. package/dist/src/components/basic/Toast/index.d.ts +12 -0
  276. package/dist/src/components/basic/Toggle/index.d.ts +7 -0
  277. package/dist/src/components/basic/Tooltip/index.d.ts +21 -0
  278. package/dist/src/components/basic/Typography/index.d.ts +7 -0
  279. package/dist/src/components/chat/AskUserPart/index.d.ts +6 -0
  280. package/dist/src/components/chat/BrowserActionPart/index.d.ts +7 -0
  281. package/dist/src/components/chat/ChatInput/index.d.ts +29 -0
  282. package/dist/src/components/chat/CodeBlockPart/index.d.ts +7 -0
  283. package/dist/src/components/chat/FileAttachment/index.d.ts +3 -0
  284. package/dist/src/components/chat/FileCard/index.d.ts +3 -0
  285. package/dist/src/components/chat/FileReviewPart/index.d.ts +7 -0
  286. package/dist/src/components/chat/FolderButton/index.d.ts +5 -0
  287. package/dist/src/components/chat/GeneratedImagesGrid/index.d.ts +7 -0
  288. package/dist/src/components/chat/GenerationStatusBar/index.d.ts +7 -0
  289. package/dist/src/components/chat/HintBanner/index.d.ts +6 -0
  290. package/dist/src/components/chat/ImageAttachment/index.d.ts +3 -0
  291. package/dist/src/components/chat/ImageGenerating/index.d.ts +6 -0
  292. package/dist/src/components/chat/Markdown/demo-content.d.ts +1 -0
  293. package/dist/src/components/chat/Markdown/index.d.ts +7 -0
  294. package/dist/src/components/chat/MermaidPart/index.d.ts +6 -0
  295. package/dist/src/components/chat/PermissionCard/index.d.ts +4 -0
  296. package/dist/src/components/chat/PlanPart/index.d.ts +6 -0
  297. package/dist/src/components/chat/QueueIndicator/index.d.ts +4 -0
  298. package/dist/src/components/chat/ReasoningStep/index.d.ts +13 -0
  299. package/dist/src/components/chat/RelatedPrompts/index.d.ts +6 -0
  300. package/dist/src/components/chat/Response/StreamingMarkdownBlock.d.ts +6 -0
  301. package/dist/src/components/chat/Response/index.d.ts +16 -0
  302. package/dist/src/components/chat/SendButton/index.d.ts +5 -0
  303. package/dist/src/components/chat/TaskPart/index.d.ts +7 -0
  304. package/dist/src/components/chat/TerminalCodeBlockPart/index.d.ts +6 -0
  305. package/dist/src/components/chat/ThinkingIndicator/index.d.ts +6 -0
  306. package/dist/src/components/chat/ToolInvocationCard/index.d.ts +4 -0
  307. package/dist/src/components/chat/UserMessage/index.d.ts +7 -0
  308. package/dist/src/components/chat/UserQuestion/index.d.ts +19 -0
  309. package/dist/src/components/chat/UserQuestionAnswer/index.d.ts +3 -0
  310. package/dist/src/components/index.d.ts +138 -0
  311. package/dist/src/icons/context.d.ts +26 -0
  312. package/dist/src/icons/types.d.ts +18 -0
  313. package/dist/src/lib/ThemeStyleContext.d.ts +134 -0
  314. package/dist/src/lib/file-icon.d.ts +16 -0
  315. package/dist/src/lib/i18n.d.ts +12 -0
  316. package/dist/src/lib/index.d.ts +10 -0
  317. package/dist/src/lib/motion.d.ts +22 -0
  318. package/dist/src/lib/utils.d.ts +11 -0
  319. package/dist/stateDiagram-FKZM4ZOC-DBvJ_eeL.cjs +1 -0
  320. package/dist/stateDiagram-FKZM4ZOC-ZVsJlaHJ.js +263 -0
  321. package/dist/stateDiagram-v2-4FDKWEC3-CB_nTHcE.js +16 -0
  322. package/dist/stateDiagram-v2-4FDKWEC3-Xkx17v6T.cjs +1 -0
  323. package/dist/theme-base.css +270 -0
  324. package/dist/theme.css +17 -0
  325. package/dist/themes/dark-parchment.css +133 -0
  326. package/dist/themes/dark-qoder.css +133 -0
  327. package/dist/themes/light-parchment.css +124 -0
  328. package/dist/themes/light-qoder.css +132 -0
  329. package/dist/timeline-definition-IT6M3QCI-BmGkYQiz.cjs +61 -0
  330. package/dist/timeline-definition-IT6M3QCI-Ck8zTt6w.js +795 -0
  331. package/dist/tokens/CLAUDE.md +305 -0
  332. package/dist/tokens/index.css +35 -0
  333. package/dist/tokens/scale/computed.css +103 -0
  334. package/dist/tokens/scale/config.css +110 -0
  335. package/dist/tokens/scale/index.css +30 -0
  336. package/dist/tokens/scale/presets/compact.css +30 -0
  337. package/dist/tokens/scale/presets/dense.css +64 -0
  338. package/dist/tokens/scale/presets/sharp.css +40 -0
  339. package/dist/tokens/scale/presets/soft.css +16 -0
  340. package/dist/tokens/scale.css +13 -0
  341. package/dist/tokens/scrollbar-utility.css +35 -0
  342. package/dist/tokens/theme-base.css +270 -0
  343. package/dist/tokens/theme.css +17 -0
  344. package/dist/tokens/themes/dark-parchment.css +133 -0
  345. package/dist/tokens/themes/dark-qoder.css +133 -0
  346. package/dist/tokens/themes/light-parchment.css +124 -0
  347. package/dist/tokens/themes/light-qoder.css +132 -0
  348. package/dist/treemap-GDKQZRPO-B9sfERx8.js +17922 -0
  349. package/dist/treemap-GDKQZRPO-BVfJRs0Z.cjs +160 -0
  350. package/dist/xychartDiagram-PRI3JC2R-By_S8NzN.js +1340 -0
  351. package/dist/xychartDiagram-PRI3JC2R-CNfDrGxM.cjs +7 -0
  352. package/package.json +128 -19
  353. /package/{dist → cli/dist}/commands/add.js +0 -0
  354. /package/{dist → cli/dist}/commands/diff.js +0 -0
  355. /package/{dist → cli/dist}/commands/init.js +0 -0
  356. /package/{dist → cli/dist}/commands/list.js +0 -0
  357. /package/{dist → cli/dist}/index.js +0 -0
  358. /package/{dist → cli/dist}/utils/config.js +0 -0
  359. /package/{dist → cli/dist}/utils/registry.js +0 -0
  360. /package/{dist → cli/dist}/utils/tokens.js +0 -0
  361. /package/{dist → cli/dist}/utils/transform.js +0 -0
  362. /package/{registry → cli/registry}/__tests__/basic/button.test.tsx +0 -0
  363. /package/{registry → cli/registry}/__tests__/chat/markdown.test.tsx +0 -0
  364. /package/{registry → cli/registry}/__tests__/chat/thinking-indicator.test.tsx +0 -0
  365. /package/{registry → cli/registry}/__tests__/chat/tool-invocation-card.test.tsx +0 -0
  366. /package/{registry → cli/registry}/basic/alert-dialog.tsx +0 -0
  367. /package/{registry → cli/registry}/basic/avatar.tsx +0 -0
  368. /package/{registry → cli/registry}/basic/button.tsx +0 -0
  369. /package/{registry → cli/registry}/basic/collapse.tsx +0 -0
  370. /package/{registry → cli/registry}/basic/collapsible-card.tsx +0 -0
  371. /package/{registry → cli/registry}/basic/collapsible.tsx +0 -0
  372. /package/{registry → cli/registry}/basic/dropdown-menu.tsx +0 -0
  373. /package/{registry → cli/registry}/basic/icon-button.tsx +0 -0
  374. /package/{registry → cli/registry}/basic/icons-inline.tsx +0 -0
  375. /package/{registry → cli/registry}/basic/kbd.tsx +0 -0
  376. /package/{registry → cli/registry}/basic/option-list.tsx +0 -0
  377. /package/{registry → cli/registry}/basic/pagination.tsx +0 -0
  378. /package/{registry → cli/registry}/basic/progress.tsx +0 -0
  379. /package/{registry → cli/registry}/basic/radio-group.tsx +0 -0
  380. /package/{registry → cli/registry}/basic/resizable.tsx +0 -0
  381. /package/{registry → cli/registry}/basic/scrollbar.tsx +0 -0
  382. /package/{registry → cli/registry}/basic/select.tsx +0 -0
  383. /package/{registry → cli/registry}/basic/shimmering-text.tsx +0 -0
  384. /package/{registry → cli/registry}/basic/sidebar-menu.tsx +0 -0
  385. /package/{registry → cli/registry}/basic/skeleton.tsx +0 -0
  386. /package/{registry → cli/registry}/basic/slider.tsx +0 -0
  387. /package/{registry → cli/registry}/basic/sonner.tsx +0 -0
  388. /package/{registry → cli/registry}/basic/spinner.tsx +0 -0
  389. /package/{registry → cli/registry}/basic/switch.tsx +0 -0
  390. /package/{registry → cli/registry}/basic/table.tsx +0 -0
  391. /package/{registry → cli/registry}/basic/tabs.tsx +0 -0
  392. /package/{registry → cli/registry}/basic/tag.tsx +0 -0
  393. /package/{registry → cli/registry}/basic/theme-from-document.ts +0 -0
  394. /package/{registry → cli/registry}/basic/toggle.tsx +0 -0
  395. /package/{registry → cli/registry}/basic/tooltip.tsx +0 -0
  396. /package/{registry → cli/registry}/basic/typography.tsx +0 -0
  397. /package/{registry → cli/registry}/chat/ask-user-part.tsx +0 -0
  398. /package/{registry → cli/registry}/chat/browser-action-part.tsx +0 -0
  399. /package/{registry → cli/registry}/chat/chat-input/chat-input-folder-selector.tsx +0 -0
  400. /package/{registry → cli/registry}/chat/chat-input/chat-input-model-switcher.tsx +0 -0
  401. /package/{registry → cli/registry}/chat/chat-input/chat-input-textarea.tsx +0 -0
  402. /package/{registry → cli/registry}/chat/chat-input/compound.tsx +0 -0
  403. /package/{registry → cli/registry}/chat/chat-input/context.tsx +0 -0
  404. /package/{registry → cli/registry}/chat/chat-input/folder-permission-dialog.tsx +0 -0
  405. /package/{registry → cli/registry}/chat/chat-input/index.tsx +0 -0
  406. /package/{registry → cli/registry}/chat/chat-input/types.ts +0 -0
  407. /package/{registry → cli/registry}/chat/chat-input/useAutoResizeTextarea.ts +0 -0
  408. /package/{registry → cli/registry}/chat/code-block-part.tsx +0 -0
  409. /package/{registry → cli/registry}/chat/file-attachment.tsx +0 -0
  410. /package/{registry → cli/registry}/chat/file-card.tsx +0 -0
  411. /package/{registry → cli/registry}/chat/file-review-part.tsx +0 -0
  412. /package/{registry → cli/registry}/chat/folder-button.tsx +0 -0
  413. /package/{registry → cli/registry}/chat/generated-images-grid.tsx +0 -0
  414. /package/{registry → cli/registry}/chat/generation-status-bar.tsx +0 -0
  415. /package/{registry → cli/registry}/chat/hint-banner.tsx +0 -0
  416. /package/{registry → cli/registry}/chat/image-attachment.tsx +0 -0
  417. /package/{registry → cli/registry}/chat/image-generating.tsx +0 -0
  418. /package/{registry → cli/registry}/chat/markdown.tsx +0 -0
  419. /package/{registry → cli/registry}/chat/mermaid-part.tsx +0 -0
  420. /package/{registry → cli/registry}/chat/permission-card.tsx +0 -0
  421. /package/{registry → cli/registry}/chat/plan-part.tsx +0 -0
  422. /package/{registry → cli/registry}/chat/queue-indicator.tsx +0 -0
  423. /package/{registry → cli/registry}/chat/reasoning-step/compound.tsx +0 -0
  424. /package/{registry → cli/registry}/chat/reasoning-step/context.tsx +0 -0
  425. /package/{registry → cli/registry}/chat/reasoning-step/index.tsx +0 -0
  426. /package/{registry → cli/registry}/chat/reasoning-step/types.ts +0 -0
  427. /package/{registry → cli/registry}/chat/related-prompts.tsx +0 -0
  428. /package/{registry → cli/registry}/chat/response/compound.tsx +0 -0
  429. /package/{registry → cli/registry}/chat/response/context.tsx +0 -0
  430. /package/{registry → cli/registry}/chat/response/index.tsx +0 -0
  431. /package/{registry → cli/registry}/chat/response/types.ts +0 -0
  432. /package/{registry → cli/registry}/chat/send-button.tsx +0 -0
  433. /package/{registry → cli/registry}/chat/streaming-markdown-block.tsx +0 -0
  434. /package/{registry → cli/registry}/chat/task-part.tsx +0 -0
  435. /package/{registry → cli/registry}/chat/terminal-code-block-part.tsx +0 -0
  436. /package/{registry → cli/registry}/chat/thinking-indicator.tsx +0 -0
  437. /package/{registry → cli/registry}/chat/tool-invocation-card.tsx +0 -0
  438. /package/{registry → cli/registry}/chat/user-message.tsx +0 -0
  439. /package/{registry → cli/registry}/chat/user-question/UserQuestionCard.tsx +0 -0
  440. /package/{registry → cli/registry}/chat/user-question/UserQuestionFooter.tsx +0 -0
  441. /package/{registry → cli/registry}/chat/user-question/UserQuestionHeader.tsx +0 -0
  442. /package/{registry → cli/registry}/chat/user-question/compound.tsx +0 -0
  443. /package/{registry → cli/registry}/chat/user-question/context.tsx +0 -0
  444. /package/{registry → cli/registry}/chat/user-question/index.tsx +0 -0
  445. /package/{registry → cli/registry}/chat/user-question/types.ts +0 -0
  446. /package/{registry → cli/registry}/chat/user-question/useUserQuestionKeyboard.ts +0 -0
  447. /package/{registry → cli/registry}/chat/user-question/useUserQuestionState.ts +0 -0
  448. /package/{registry → cli/registry}/chat/user-question-answer.tsx +0 -0
  449. /package/{registry → cli/registry}/lib/file-icon-maps.ts +0 -0
  450. /package/{registry → cli/registry}/lib/use-mermaid-render.ts +0 -0
  451. /package/{registry → cli/registry}/lib/utils.ts +0 -0
  452. /package/{registry → cli/registry}/meta.json +0 -0
  453. /package/{registry → cli/registry}/tokens/index.css +0 -0
  454. /package/{registry → cli/registry}/tokens/scale/computed.css +0 -0
  455. /package/{registry → cli/registry}/tokens/scale/config.css +0 -0
  456. /package/{registry → cli/registry}/tokens/scale/index.css +0 -0
  457. /package/{registry → cli/registry}/tokens/scale/presets/compact.css +0 -0
  458. /package/{registry → cli/registry}/tokens/scale/presets/dense.css +0 -0
  459. /package/{registry → cli/registry}/tokens/scale/presets/sharp.css +0 -0
  460. /package/{registry → cli/registry}/tokens/scale/presets/soft.css +0 -0
  461. /package/{registry → cli/registry}/tokens/scale.css +0 -0
  462. /package/{registry → cli/registry}/tokens/scrollbar-utility.css +0 -0
  463. /package/{registry → cli/registry}/tokens/theme.css +0 -0
  464. /package/{registry → cli/registry}/tokens/themes/dark-parchment.css +0 -0
  465. /package/{registry → cli/registry}/tokens/themes/dark-qoder.css +0 -0
  466. /package/{registry → cli/registry}/tokens/themes/light-parchment.css +0 -0
  467. /package/{registry → cli/registry}/tokens/themes/light-qoder.css +0 -0
@@ -0,0 +1,6 @@
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
+ }
@@ -0,0 +1,4 @@
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>;
@@ -0,0 +1,13 @@
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 };
@@ -0,0 +1,6 @@
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
+ }
@@ -0,0 +1,6 @@
1
+ /**
2
+ * [INPUT]: (StreamingMarkdownBlockProps)
3
+ * [OUTPUT]: (JSX.Element)
4
+ * [POS]: components/chat/Response - 从 registry 再导出
5
+ */
6
+ export { StreamingMarkdownBlock, type StreamingMarkdownBlockProps, } from '../../../../registry/chat/streaming-markdown-block';
@@ -0,0 +1,16 @@
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, };
@@ -0,0 +1,5 @@
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 };
@@ -0,0 +1,7 @@
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
+ }
@@ -0,0 +1,6 @@
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
+ }
@@ -0,0 +1,6 @@
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
+ }
@@ -0,0 +1,4 @@
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' | 'arrowDownIcon' | 'runningText' | 'ranText' | 'failedText' | 'responseLabel'>;
4
+ export declare const ToolInvocationCard: import("react").NamedExoticComponent<ToolInvocationCardProps>;
@@ -0,0 +1,7 @@
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';
@@ -0,0 +1,19 @@
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 };
@@ -0,0 +1,3 @@
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">>;
@@ -0,0 +1,138 @@
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 Appearance, type ThemePreset, type CustomTheme, type Theme, type StylePreset, type CustomStyle, type Style, type ThemeStyleContextValue, type ThemeStyleProviderProps, 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';
@@ -0,0 +1,26 @@
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;
@@ -0,0 +1,18 @@
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>;
@@ -0,0 +1,134 @@
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 包裹并传入 appearance/theme/style
9
+ * 3. 三维度独立设计:appearance(亮暗) × theme(颜色) × style(尺度)
10
+ * 4. 支持预设字符串或自定义对象
11
+ */
12
+ import { type ReactNode } from 'react';
13
+ /** 亮暗色 */
14
+ export type Appearance = 'light' | 'dark';
15
+ /** 颜色主题预设 */
16
+ export type ThemePreset = 'qoder' | 'parchment';
17
+ /** 自定义颜色主题 */
18
+ export interface CustomTheme {
19
+ name: string;
20
+ /** 任意 token 覆盖,键为 CSS 变量名(不含 --) */
21
+ tokens: {
22
+ 'color-primary'?: string;
23
+ 'color-primary-hover'?: string;
24
+ 'color-primary-active'?: string;
25
+ 'color-primary-bg'?: string;
26
+ 'color-primary-bg-hover'?: string;
27
+ 'color-primary-border'?: string;
28
+ 'color-primary-border-hover'?: string;
29
+ 'color-text-on-primary'?: string;
30
+ 'color-text'?: string;
31
+ 'color-text-secondary'?: string;
32
+ 'color-text-tertiary'?: string;
33
+ 'color-text-quaternary'?: string;
34
+ 'color-text-base'?: string;
35
+ 'color-border'?: string;
36
+ 'color-border-secondary'?: string;
37
+ 'color-border-tertiary'?: string;
38
+ 'color-fill'?: string;
39
+ 'color-fill-secondary'?: string;
40
+ 'color-fill-tertiary'?: string;
41
+ 'color-fill-quaternary'?: string;
42
+ 'color-fill-disable'?: string;
43
+ 'color-bg-container'?: string;
44
+ 'color-bg-elevated'?: string;
45
+ 'color-bg-layout'?: string;
46
+ 'color-bg-spotlight'?: string;
47
+ 'color-bg-mask'?: string;
48
+ 'color-bg-base'?: string;
49
+ 'color-bg-highlight'?: string;
50
+ 'color-bg-highlight-hover'?: string;
51
+ 'color-link'?: string;
52
+ 'color-error'?: string;
53
+ 'color-error-hover'?: string;
54
+ 'color-error-bg'?: string;
55
+ 'color-error-border'?: string;
56
+ 'color-info'?: string;
57
+ 'color-info-hover'?: string;
58
+ 'color-info-bg'?: string;
59
+ 'color-info-border'?: string;
60
+ 'color-success'?: string;
61
+ 'color-success-hover'?: string;
62
+ 'color-success-bg'?: string;
63
+ 'color-success-border'?: string;
64
+ 'color-warning'?: string;
65
+ 'color-warning-hover'?: string;
66
+ 'color-warning-bg'?: string;
67
+ 'color-warning-border'?: string;
68
+ [key: string]: string | undefined;
69
+ };
70
+ }
71
+ /** 颜色主题:预设或自定义 */
72
+ export type Theme = ThemePreset | CustomTheme;
73
+ /** 布局尺度预设 */
74
+ export type StylePreset = 'neutral' | 'compact' | 'soft' | 'sharp' | 'dense';
75
+ /** 自定义布局尺度 */
76
+ export interface CustomStyle {
77
+ name: string;
78
+ radius?: {
79
+ sm?: string;
80
+ default?: string;
81
+ md?: string;
82
+ lg?: string;
83
+ xl?: string;
84
+ '2xl'?: string;
85
+ '3xl'?: string;
86
+ };
87
+ spacing?: {
88
+ '3'?: string;
89
+ '4'?: string;
90
+ '9'?: string;
91
+ '11'?: string;
92
+ };
93
+ fontSize?: {
94
+ sm?: string;
95
+ lg?: string;
96
+ xl?: string;
97
+ '2xl'?: string;
98
+ '3xl'?: string;
99
+ };
100
+ }
101
+ /** 布局尺度:预设或自定义 */
102
+ export type Style = StylePreset | CustomStyle;
103
+ export interface ThemeStyleContextValue {
104
+ /** 亮暗色 */
105
+ appearance: Appearance;
106
+ /** 颜色主题(原始值) */
107
+ themeConfig: Theme;
108
+ /** 布局尺度(原始值) */
109
+ styleConfig: Style;
110
+ /** 计算后的 data-theme 属性值 */
111
+ dataTheme: string;
112
+ /** 计算后的 data-style 属性值 */
113
+ dataStyle: string;
114
+ /** @deprecated 兼容旧 API,等于 dataTheme */
115
+ theme?: string;
116
+ /** @deprecated 兼容旧 API,等于 dataStyle */
117
+ style?: string;
118
+ }
119
+ export interface ThemeStyleProviderProps {
120
+ children: ReactNode;
121
+ /** 亮暗色,默认 'light' */
122
+ appearance?: Appearance;
123
+ /** 颜色主题,默认 'qoder' */
124
+ theme?: Theme;
125
+ /** 布局尺度,默认 'neutral' */
126
+ style?: Style;
127
+ }
128
+ export declare function ThemeStyleProvider({ children, appearance, theme, style, }: ThemeStyleProviderProps): import("react/jsx-runtime").JSX.Element;
129
+ export declare function useThemeStyle(): ThemeStyleContextValue;
130
+ /** @deprecated 使用新的 ThemeStyleProvider props 代替 */
131
+ export interface ThemeStyleValue {
132
+ style?: string;
133
+ theme?: string;
134
+ }
@@ -0,0 +1,16 @@
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;
@@ -0,0 +1,12 @@
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;
@@ -0,0 +1,10 @@
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 Appearance, type ThemePreset, type CustomTheme, type Theme, type StylePreset, type CustomStyle, type Style, type ThemeStyleContextValue, type ThemeStyleProviderProps, type ThemeStyleValue, } from './ThemeStyleContext';
10
+ export { MOTION_DURATION, MOTION_EASE, MOTION_SPRING } from './motion';
@@ -0,0 +1,22 @@
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
+ };
@@ -0,0 +1,11 @@
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';
@@ -0,0 +1 @@
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;