sparkdesign 0.0.1 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (403) hide show
  1. package/README.md +279 -5
  2. package/cli/dist/commands/add.js +84 -0
  3. package/cli/dist/commands/diff.js +54 -0
  4. package/cli/dist/commands/init.js +96 -0
  5. package/cli/dist/commands/list.js +25 -0
  6. package/cli/dist/index.js +37 -0
  7. package/cli/dist/utils/config.js +53 -0
  8. package/cli/dist/utils/registry.js +34 -0
  9. package/cli/dist/utils/tokens.js +90 -0
  10. package/cli/dist/utils/transform.js +19 -0
  11. package/cli/registry/basic/alert-dialog.tsx +180 -0
  12. package/cli/registry/basic/avatar.tsx +120 -0
  13. package/cli/registry/basic/button.tsx +100 -0
  14. package/cli/registry/basic/collapse.tsx +94 -0
  15. package/cli/registry/basic/collapsible-card.tsx +230 -0
  16. package/cli/registry/basic/collapsible.tsx +21 -0
  17. package/cli/registry/basic/dropdown-menu.tsx +254 -0
  18. package/cli/registry/basic/icon-button.tsx +66 -0
  19. package/cli/registry/basic/icons-inline.tsx +206 -0
  20. package/cli/registry/basic/kbd.tsx +50 -0
  21. package/cli/registry/basic/option-list.tsx +125 -0
  22. package/cli/registry/basic/pagination.tsx +132 -0
  23. package/cli/registry/basic/progress.tsx +42 -0
  24. package/cli/registry/basic/radio-group.tsx +69 -0
  25. package/cli/registry/basic/resizable.tsx +67 -0
  26. package/cli/registry/basic/scrollbar.tsx +114 -0
  27. package/cli/registry/basic/select.tsx +177 -0
  28. package/cli/registry/basic/skeleton.tsx +33 -0
  29. package/cli/registry/basic/slider.tsx +55 -0
  30. package/cli/registry/basic/sonner.tsx +104 -0
  31. package/cli/registry/basic/spinner.tsx +17 -0
  32. package/cli/registry/basic/switch.tsx +49 -0
  33. package/cli/registry/basic/table.tsx +117 -0
  34. package/cli/registry/basic/tabs.tsx +85 -0
  35. package/cli/registry/basic/tag.tsx +161 -0
  36. package/cli/registry/basic/theme-from-document.ts +10 -0
  37. package/cli/registry/basic/toggle.tsx +223 -0
  38. package/cli/registry/basic/tooltip.tsx +80 -0
  39. package/cli/registry/basic/typography.tsx +201 -0
  40. package/cli/registry/chat/browser-use-part.tsx +166 -0
  41. package/cli/registry/chat/chat-input/chat-input-folder-selector.tsx +185 -0
  42. package/cli/registry/chat/chat-input/chat-input-model-switcher.tsx +131 -0
  43. package/cli/registry/chat/chat-input/chat-input-textarea.tsx +67 -0
  44. package/cli/registry/chat/chat-input/compound.tsx +334 -0
  45. package/cli/registry/chat/chat-input/context.tsx +189 -0
  46. package/cli/registry/chat/chat-input/folder-permission-dialog.tsx +61 -0
  47. package/cli/registry/chat/chat-input/index.tsx +123 -0
  48. package/cli/registry/chat/chat-input/types.ts +77 -0
  49. package/cli/registry/chat/chat-input/useAutoResizeTextarea.ts +20 -0
  50. package/cli/registry/chat/code-block-part.tsx +151 -0
  51. package/cli/registry/chat/file-attachment.tsx +44 -0
  52. package/cli/registry/chat/file-card.tsx +68 -0
  53. package/cli/registry/chat/file-review-part.tsx +259 -0
  54. package/cli/registry/chat/folder-button.tsx +169 -0
  55. package/cli/registry/chat/generated-images-grid.tsx +56 -0
  56. package/cli/registry/chat/generation-status-bar.tsx +72 -0
  57. package/cli/registry/chat/image-attachment.tsx +166 -0
  58. package/cli/registry/chat/image-generating.tsx +281 -0
  59. package/cli/registry/chat/markdown.tsx +146 -0
  60. package/cli/registry/chat/mermaid-part.tsx +90 -0
  61. package/cli/registry/chat/permission-card.tsx +178 -0
  62. package/cli/registry/chat/plan-part.tsx +168 -0
  63. package/cli/registry/chat/question-part.tsx +70 -0
  64. package/cli/registry/chat/queue-indicator.tsx +234 -0
  65. package/cli/registry/chat/reasoning-step.tsx +358 -0
  66. package/cli/registry/chat/related-prompts.tsx +91 -0
  67. package/cli/registry/chat/request.tsx +38 -0
  68. package/cli/registry/chat/response.tsx +271 -0
  69. package/cli/registry/chat/send-button.tsx +94 -0
  70. package/cli/registry/chat/sidebar-menu.tsx +177 -0
  71. package/cli/registry/chat/streaming-markdown-block.tsx +111 -0
  72. package/cli/registry/chat/suggestion-part.tsx +165 -0
  73. package/cli/registry/chat/task-part.tsx +109 -0
  74. package/cli/registry/chat/terminal-code-block-part.tsx +69 -0
  75. package/cli/registry/chat/thinking-indicator.tsx +91 -0
  76. package/cli/registry/chat/tool-invocation-card.tsx +132 -0
  77. package/cli/registry/chat/user-question/UserQuestionCard.tsx +198 -0
  78. package/cli/registry/chat/user-question/UserQuestionFooter.tsx +66 -0
  79. package/cli/registry/chat/user-question/UserQuestionHeader.tsx +64 -0
  80. package/cli/registry/chat/user-question/index.tsx +340 -0
  81. package/cli/registry/chat/user-question/types.ts +61 -0
  82. package/cli/registry/chat/user-question/useUserQuestionKeyboard.ts +127 -0
  83. package/cli/registry/chat/user-question/useUserQuestionState.ts +165 -0
  84. package/cli/registry/chat/user-question-answer.tsx +62 -0
  85. package/cli/registry/lib/file-icon-maps.ts +150 -0
  86. package/cli/registry/lib/use-mermaid-render.ts +76 -0
  87. package/cli/registry/lib/utils.ts +6 -0
  88. package/cli/registry/meta.json +1 -0
  89. package/cli/registry/tokens/scale.css +299 -0
  90. package/cli/registry/tokens/theme.css +633 -0
  91. package/dist/_basePickBy-DnQN8w3y.js +151 -0
  92. package/dist/_basePickBy-a-kPMlkg.cjs +1 -0
  93. package/dist/_baseUniq-B-N2NQ50.js +614 -0
  94. package/dist/_baseUniq-Cc_zbSif.cjs +1 -0
  95. package/dist/arc-BQBhijZ6.js +83 -0
  96. package/dist/arc-mWQt0Yph.cjs +1 -0
  97. package/dist/architectureDiagram-VXUJARFQ-BMZEucno.cjs +36 -0
  98. package/dist/architectureDiagram-VXUJARFQ-DTdjD3Bp.js +4661 -0
  99. package/dist/blockDiagram-VD42YOAC-CzHn0yob.js +2256 -0
  100. package/dist/blockDiagram-VD42YOAC-DDxdHAlz.cjs +122 -0
  101. package/dist/c4Diagram-YG6GDRKO-4Gz0I4gj.cjs +10 -0
  102. package/dist/c4Diagram-YG6GDRKO-BIy--yVN.js +1580 -0
  103. package/dist/channel-BQn0o8bs.js +5 -0
  104. package/dist/channel-DaN7XniJ.cjs +1 -0
  105. package/dist/chunk-4BX2VUAB-BlQFTQqz.cjs +1 -0
  106. package/dist/chunk-4BX2VUAB-Czitj3Kc.js +8 -0
  107. package/dist/chunk-55IACEB6-DXacNZbO.js +8 -0
  108. package/dist/chunk-55IACEB6-DnDxpye9.cjs +1 -0
  109. package/dist/chunk-B4BG7PRW-CBdN0q_V.js +1375 -0
  110. package/dist/chunk-B4BG7PRW-DbGvUkGO.cjs +165 -0
  111. package/dist/chunk-DI55MBZ5-D1YJMs6x.cjs +220 -0
  112. package/dist/chunk-DI55MBZ5-NCQTvayw.js +1370 -0
  113. package/dist/chunk-FMBD7UC4-CsGMbrtr.js +19 -0
  114. package/dist/chunk-FMBD7UC4-Di7cUUh5.cjs +15 -0
  115. package/dist/chunk-QN33PNHL-0j5LC8Lm.cjs +1 -0
  116. package/dist/chunk-QN33PNHL-3GERZBRm.js +19 -0
  117. package/dist/chunk-QZHKN3VN-AVEY9ImQ.js +15 -0
  118. package/dist/chunk-QZHKN3VN-s8Z0a8mc.cjs +1 -0
  119. package/dist/chunk-TZMSLE5B-CAf87HPt.cjs +1 -0
  120. package/dist/chunk-TZMSLE5B-sbiflal0.js +64 -0
  121. package/dist/classDiagram-2ON5EDUG-Ct9JLIN2.cjs +1 -0
  122. package/dist/classDiagram-2ON5EDUG-Dzfrft3a.js +16 -0
  123. package/dist/classDiagram-v2-WZHVMYZB-Ct9JLIN2.cjs +1 -0
  124. package/dist/classDiagram-v2-WZHVMYZB-Dzfrft3a.js +16 -0
  125. package/dist/clone-Cde_NQ8V.js +8 -0
  126. package/dist/clone-DCNjWuM2.cjs +1 -0
  127. package/dist/cose-bilkent-S5V4N54A-0uLijMro.cjs +1 -0
  128. package/dist/cose-bilkent-S5V4N54A-Bb08N431.js +2608 -0
  129. package/dist/cytoscape.esm-CNUX3VTg.cjs +321 -0
  130. package/dist/cytoscape.esm-Cvf3sx9F.js +18704 -0
  131. package/dist/dagre-6UL2VRFP-CY_Wz5Zd.js +444 -0
  132. package/dist/dagre-6UL2VRFP-Dxe7_qZc.cjs +4 -0
  133. package/dist/defaultLocale-BgPVtth8.js +171 -0
  134. package/dist/defaultLocale-C4wbwF1n.cjs +1 -0
  135. package/dist/diagram-PSM6KHXK-D2bdb7MT.js +531 -0
  136. package/dist/diagram-PSM6KHXK-YF69SUjY.cjs +24 -0
  137. package/dist/diagram-QEK2KX5R-BpUSoh0-.js +217 -0
  138. package/dist/diagram-QEK2KX5R-DZPGteon.cjs +43 -0
  139. package/dist/diagram-S2PKOQOG-ht-zdvFG.cjs +24 -0
  140. package/dist/diagram-S2PKOQOG-zFeLJ50Z.js +142 -0
  141. package/dist/erDiagram-Q2GNP2WA-B38iJ6ts.js +841 -0
  142. package/dist/erDiagram-Q2GNP2WA-RgS80DDU.cjs +60 -0
  143. package/dist/flowDiagram-NV44I4VS-BHilOs2p.cjs +162 -0
  144. package/dist/flowDiagram-NV44I4VS-BrBJcoce.js +1620 -0
  145. package/dist/fonts/KaTeX_AMS-Regular.ttf +0 -0
  146. package/dist/fonts/KaTeX_AMS-Regular.woff +0 -0
  147. package/dist/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  148. package/dist/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
  149. package/dist/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
  150. package/dist/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  151. package/dist/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
  152. package/dist/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
  153. package/dist/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  154. package/dist/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
  155. package/dist/fonts/KaTeX_Fraktur-Bold.woff +0 -0
  156. package/dist/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  157. package/dist/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
  158. package/dist/fonts/KaTeX_Fraktur-Regular.woff +0 -0
  159. package/dist/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  160. package/dist/fonts/KaTeX_Main-Bold.ttf +0 -0
  161. package/dist/fonts/KaTeX_Main-Bold.woff +0 -0
  162. package/dist/fonts/KaTeX_Main-Bold.woff2 +0 -0
  163. package/dist/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
  164. package/dist/fonts/KaTeX_Main-BoldItalic.woff +0 -0
  165. package/dist/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  166. package/dist/fonts/KaTeX_Main-Italic.ttf +0 -0
  167. package/dist/fonts/KaTeX_Main-Italic.woff +0 -0
  168. package/dist/fonts/KaTeX_Main-Italic.woff2 +0 -0
  169. package/dist/fonts/KaTeX_Main-Regular.ttf +0 -0
  170. package/dist/fonts/KaTeX_Main-Regular.woff +0 -0
  171. package/dist/fonts/KaTeX_Main-Regular.woff2 +0 -0
  172. package/dist/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
  173. package/dist/fonts/KaTeX_Math-BoldItalic.woff +0 -0
  174. package/dist/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  175. package/dist/fonts/KaTeX_Math-Italic.ttf +0 -0
  176. package/dist/fonts/KaTeX_Math-Italic.woff +0 -0
  177. package/dist/fonts/KaTeX_Math-Italic.woff2 +0 -0
  178. package/dist/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
  179. package/dist/fonts/KaTeX_SansSerif-Bold.woff +0 -0
  180. package/dist/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  181. package/dist/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
  182. package/dist/fonts/KaTeX_SansSerif-Italic.woff +0 -0
  183. package/dist/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  184. package/dist/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
  185. package/dist/fonts/KaTeX_SansSerif-Regular.woff +0 -0
  186. package/dist/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  187. package/dist/fonts/KaTeX_Script-Regular.ttf +0 -0
  188. package/dist/fonts/KaTeX_Script-Regular.woff +0 -0
  189. package/dist/fonts/KaTeX_Script-Regular.woff2 +0 -0
  190. package/dist/fonts/KaTeX_Size1-Regular.ttf +0 -0
  191. package/dist/fonts/KaTeX_Size1-Regular.woff +0 -0
  192. package/dist/fonts/KaTeX_Size1-Regular.woff2 +0 -0
  193. package/dist/fonts/KaTeX_Size2-Regular.ttf +0 -0
  194. package/dist/fonts/KaTeX_Size2-Regular.woff +0 -0
  195. package/dist/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  196. package/dist/fonts/KaTeX_Size3-Regular.ttf +0 -0
  197. package/dist/fonts/KaTeX_Size3-Regular.woff +0 -0
  198. package/dist/fonts/KaTeX_Size3-Regular.woff2 +0 -0
  199. package/dist/fonts/KaTeX_Size4-Regular.ttf +0 -0
  200. package/dist/fonts/KaTeX_Size4-Regular.woff +0 -0
  201. package/dist/fonts/KaTeX_Size4-Regular.woff2 +0 -0
  202. package/dist/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
  203. package/dist/fonts/KaTeX_Typewriter-Regular.woff +0 -0
  204. package/dist/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  205. package/dist/ganttDiagram-JELNMOA3-pZiJeFio.cjs +267 -0
  206. package/dist/ganttDiagram-JELNMOA3-tw6FhkWJ.js +2670 -0
  207. package/dist/gitGraphDiagram-V2S2FVAM-BWn5uIK5.js +699 -0
  208. package/dist/gitGraphDiagram-V2S2FVAM-DKKeG-9R.cjs +65 -0
  209. package/dist/graph-DIbblrZP.cjs +1 -0
  210. package/dist/graph-DPcK91G3.js +247 -0
  211. package/dist/infoDiagram-HS3SLOUP-B8gwwhct.cjs +2 -0
  212. package/dist/infoDiagram-HS3SLOUP-D47PNcP_.js +24 -0
  213. package/dist/init-CHZsXQcr.cjs +1 -0
  214. package/dist/init-DjUOC4st.js +16 -0
  215. package/dist/journeyDiagram-XKPGCS4Q-BG3cfhyU.js +834 -0
  216. package/dist/journeyDiagram-XKPGCS4Q-D8DVLJof.cjs +139 -0
  217. package/dist/kanban-definition-3W4ZIXB7-4OCnEouP.cjs +89 -0
  218. package/dist/kanban-definition-3W4ZIXB7-CWi_ssF9.js +719 -0
  219. package/dist/katex.css +1 -0
  220. package/dist/layout-Byuh8f-J.cjs +1 -0
  221. package/dist/layout-CdLdvj1j.js +1335 -0
  222. package/dist/linear-C2Q_PI9B.js +259 -0
  223. package/dist/linear-C69aPBW1.cjs +1 -0
  224. package/dist/mermaid.core-DBwAx_jp.cjs +249 -0
  225. package/dist/mermaid.core-gFR0XUlD.js +15300 -0
  226. package/dist/mindmap-definition-VGOIOE7T-8P7obVV4.cjs +68 -0
  227. package/dist/mindmap-definition-VGOIOE7T-DnOa7WJ9.js +784 -0
  228. package/dist/ordinal-B6-f3MAq.js +61 -0
  229. package/dist/ordinal-CagbB1m8.cjs +1 -0
  230. package/dist/pieDiagram-ADFJNKIX-5NAlvhMo.js +161 -0
  231. package/dist/pieDiagram-ADFJNKIX-CQBG4yR9.cjs +30 -0
  232. package/dist/qoder-design.css +2 -0
  233. package/dist/quadrantDiagram-AYHSOK5B-Oe4y7RZ0.cjs +7 -0
  234. package/dist/quadrantDiagram-AYHSOK5B-rh2DPEP1.js +1022 -0
  235. package/dist/registry/basic/alert-dialog.d.ts +40 -0
  236. package/dist/registry/basic/avatar.d.ts +30 -0
  237. package/dist/registry/basic/button.d.ts +16 -0
  238. package/dist/registry/basic/collapse.d.ts +22 -0
  239. package/dist/registry/basic/collapsible-card.d.ts +34 -0
  240. package/dist/registry/basic/collapsible.d.ts +15 -0
  241. package/dist/registry/basic/dropdown-menu.d.ts +52 -0
  242. package/dist/registry/basic/icon-button.d.ts +12 -0
  243. package/dist/registry/basic/icons-inline.d.ts +51 -0
  244. package/dist/registry/basic/kbd.d.ts +23 -0
  245. package/dist/registry/basic/option-list.d.ts +16 -0
  246. package/dist/registry/basic/pagination.d.ts +33 -0
  247. package/dist/registry/basic/progress.d.ts +18 -0
  248. package/dist/registry/basic/radio-group.d.ts +25 -0
  249. package/dist/registry/basic/resizable.d.ts +318 -0
  250. package/dist/registry/basic/scrollbar.d.ts +12 -0
  251. package/dist/registry/basic/select.d.ts +35 -0
  252. package/dist/registry/basic/skeleton.d.ts +10 -0
  253. package/dist/registry/basic/slider.d.ts +16 -0
  254. package/dist/registry/basic/sonner.d.ts +23 -0
  255. package/dist/registry/basic/spinner.d.ts +5 -0
  256. package/dist/registry/basic/switch.d.ts +20 -0
  257. package/dist/registry/basic/table.d.ts +18 -0
  258. package/dist/registry/basic/tabs.d.ts +29 -0
  259. package/dist/registry/basic/tag.d.ts +23 -0
  260. package/dist/registry/basic/theme-from-document.d.ts +10 -0
  261. package/dist/registry/basic/toggle.d.ts +29 -0
  262. package/dist/registry/basic/tooltip.d.ts +34 -0
  263. package/dist/registry/basic/typography.d.ts +76 -0
  264. package/dist/registry/chat/browser-use-part.d.ts +28 -0
  265. package/dist/registry/chat/chat-input/chat-input-folder-selector.d.ts +22 -0
  266. package/dist/registry/chat/chat-input/chat-input-model-switcher.d.ts +12 -0
  267. package/dist/registry/chat/chat-input/chat-input-textarea.d.ts +9 -0
  268. package/dist/registry/chat/chat-input/compound.d.ts +97 -0
  269. package/dist/registry/chat/chat-input/context.d.ts +64 -0
  270. package/dist/registry/chat/chat-input/folder-permission-dialog.d.ts +11 -0
  271. package/dist/registry/chat/chat-input/index.d.ts +34 -0
  272. package/dist/registry/chat/chat-input/types.d.ts +79 -0
  273. package/dist/registry/chat/chat-input/useAutoResizeTextarea.d.ts +7 -0
  274. package/dist/registry/chat/code-block-part.d.ts +23 -0
  275. package/dist/registry/chat/file-attachment.d.ts +19 -0
  276. package/dist/registry/chat/file-card.d.ts +10 -0
  277. package/dist/registry/chat/file-review-part.d.ts +30 -0
  278. package/dist/registry/chat/folder-button.d.ts +20 -0
  279. package/dist/registry/chat/generated-images-grid.d.ts +15 -0
  280. package/dist/registry/chat/generation-status-bar.d.ts +19 -0
  281. package/dist/registry/chat/image-attachment.d.ts +19 -0
  282. package/dist/registry/chat/image-generating.d.ts +15 -0
  283. package/dist/registry/chat/markdown.d.ts +8 -0
  284. package/dist/registry/chat/mermaid-part.d.ts +17 -0
  285. package/dist/registry/chat/permission-card.d.ts +24 -0
  286. package/dist/registry/chat/plan-part.d.ts +30 -0
  287. package/dist/registry/chat/question-part.d.ts +24 -0
  288. package/dist/registry/chat/queue-indicator.d.ts +27 -0
  289. package/dist/registry/chat/reasoning-step.d.ts +35 -0
  290. package/dist/registry/chat/related-prompts.d.ts +23 -0
  291. package/dist/registry/chat/request.d.ts +6 -0
  292. package/dist/registry/chat/response.d.ts +28 -0
  293. package/dist/registry/chat/send-button.d.ts +17 -0
  294. package/dist/registry/chat/sidebar-menu.d.ts +23 -0
  295. package/dist/registry/chat/streaming-markdown-block.d.ts +8 -0
  296. package/dist/registry/chat/suggestion-part.d.ts +28 -0
  297. package/dist/registry/chat/task-part.d.ts +28 -0
  298. package/dist/registry/chat/terminal-code-block-part.d.ts +18 -0
  299. package/dist/registry/chat/thinking-indicator.d.ts +14 -0
  300. package/dist/registry/chat/tool-invocation-card.d.ts +20 -0
  301. package/dist/registry/chat/user-question/UserQuestionCard.d.ts +30 -0
  302. package/dist/registry/chat/user-question/UserQuestionFooter.d.ts +18 -0
  303. package/dist/registry/chat/user-question/UserQuestionHeader.d.ts +20 -0
  304. package/dist/registry/chat/user-question/index.d.ts +7 -0
  305. package/dist/registry/chat/user-question/types.d.ts +52 -0
  306. package/dist/registry/chat/user-question/useUserQuestionKeyboard.d.ts +18 -0
  307. package/dist/registry/chat/user-question/useUserQuestionState.d.ts +26 -0
  308. package/dist/registry/chat/user-question-answer.d.ts +13 -0
  309. package/dist/registry/lib/file-icon-maps.d.ts +20 -0
  310. package/dist/registry/lib/use-mermaid-render.d.ts +5 -0
  311. package/dist/registry/lib/utils.d.ts +11 -0
  312. package/dist/requirementDiagram-UZGBJVZJ-DcWaCuXr.js +850 -0
  313. package/dist/requirementDiagram-UZGBJVZJ-gfdlrFiq.cjs +64 -0
  314. package/dist/sankeyDiagram-TZEHDZUN-CQIKFwD0.js +810 -0
  315. package/dist/sankeyDiagram-TZEHDZUN-DvPtzQvC.cjs +10 -0
  316. package/dist/scale.css +307 -0
  317. package/dist/sequenceDiagram-WL72ISMW-BNrsMagL.cjs +145 -0
  318. package/dist/sequenceDiagram-WL72ISMW-iCX3ckKx.js +2511 -0
  319. package/dist/spark-design.cjs.js +265 -0
  320. package/dist/spark-design.es.js +13207 -0
  321. package/dist/src/components/chat/BrowserUsePart/index.d.ts +7 -0
  322. package/dist/src/components/chat/ChatInput/index.d.ts +29 -0
  323. package/dist/src/components/chat/CodeBlockPart/index.d.ts +7 -0
  324. package/dist/src/components/chat/CollapsibleCard/index.d.ts +7 -0
  325. package/dist/src/components/chat/FileAttachment/index.d.ts +3 -0
  326. package/dist/src/components/chat/FileCard/index.d.ts +3 -0
  327. package/dist/src/components/chat/FileReviewPart/index.d.ts +7 -0
  328. package/dist/src/components/chat/FolderButton/index.d.ts +5 -0
  329. package/dist/src/components/chat/GeneratedImagesGrid/index.d.ts +7 -0
  330. package/dist/src/components/chat/GenerationStatusBar/index.d.ts +7 -0
  331. package/dist/src/components/chat/ImageAttachment/index.d.ts +3 -0
  332. package/dist/src/components/chat/ImageGenerating/index.d.ts +6 -0
  333. package/dist/src/components/chat/Markdown/demo-content.d.ts +1 -0
  334. package/dist/src/components/chat/Markdown/index.d.ts +7 -0
  335. package/dist/src/components/chat/MermaidPart/index.d.ts +6 -0
  336. package/dist/src/components/chat/PermissionCard/index.d.ts +4 -0
  337. package/dist/src/components/chat/PlanPart/index.d.ts +6 -0
  338. package/dist/src/components/chat/QuestionPart/index.d.ts +6 -0
  339. package/dist/src/components/chat/QueueIndicator/index.d.ts +4 -0
  340. package/dist/src/components/chat/ReasoningStep/index.d.ts +7 -0
  341. package/dist/src/components/chat/RelatedPrompts/index.d.ts +6 -0
  342. package/dist/src/components/chat/Request/index.d.ts +7 -0
  343. package/dist/src/components/chat/Response/StreamingMarkdownBlock.d.ts +6 -0
  344. package/dist/src/components/chat/Response/index.d.ts +6 -0
  345. package/dist/src/components/chat/SendButton/index.d.ts +5 -0
  346. package/dist/src/components/chat/SidebarMenu/index.d.ts +4 -0
  347. package/dist/src/components/chat/SuggestionPart/index.d.ts +6 -0
  348. package/dist/src/components/chat/TaskPart/index.d.ts +7 -0
  349. package/dist/src/components/chat/TerminalCodeBlockPart/index.d.ts +6 -0
  350. package/dist/src/components/chat/ThinkingIndicator/index.d.ts +6 -0
  351. package/dist/src/components/chat/ToolInvocationCard/index.d.ts +4 -0
  352. package/dist/src/components/chat/UserQuestion/index.d.ts +5 -0
  353. package/dist/src/components/chat/UserQuestionAnswer/index.d.ts +3 -0
  354. package/dist/src/components/foundation/AlertDialog/index.d.ts +20 -0
  355. package/dist/src/components/foundation/Avatar/index.d.ts +7 -0
  356. package/dist/src/components/foundation/Button/index.d.ts +7 -0
  357. package/dist/src/components/foundation/Collapse/index.d.ts +15 -0
  358. package/dist/src/components/foundation/Collapsible/index.d.ts +7 -0
  359. package/dist/src/components/foundation/CollapsibleSection/index.d.ts +43 -0
  360. package/dist/src/components/foundation/DropdownMenu/index.d.ts +19 -0
  361. package/dist/src/components/foundation/EllipsisText/index.d.ts +53 -0
  362. package/dist/src/components/foundation/IconButton/index.d.ts +7 -0
  363. package/dist/src/components/foundation/Kbd/index.d.ts +7 -0
  364. package/dist/src/components/foundation/OptionList/index.d.ts +7 -0
  365. package/dist/src/components/foundation/Pagination/index.d.ts +7 -0
  366. package/dist/src/components/foundation/Progress/index.d.ts +7 -0
  367. package/dist/src/components/foundation/RadioGroup/index.d.ts +7 -0
  368. package/dist/src/components/foundation/Resizable/index.d.ts +7 -0
  369. package/dist/src/components/foundation/Scrollbar/index.d.ts +7 -0
  370. package/dist/src/components/foundation/Select/index.d.ts +17 -0
  371. package/dist/src/components/foundation/Skeleton/index.d.ts +7 -0
  372. package/dist/src/components/foundation/Slider/index.d.ts +7 -0
  373. package/dist/src/components/foundation/Spinner/index.d.ts +7 -0
  374. package/dist/src/components/foundation/Switch/index.d.ts +38 -0
  375. package/dist/src/components/foundation/Table/index.d.ts +7 -0
  376. package/dist/src/components/foundation/Tabs/index.d.ts +7 -0
  377. package/dist/src/components/foundation/Tag/index.d.ts +10 -0
  378. package/dist/src/components/foundation/Toast/index.d.ts +12 -0
  379. package/dist/src/components/foundation/Toggle/index.d.ts +7 -0
  380. package/dist/src/components/foundation/Tooltip/index.d.ts +21 -0
  381. package/dist/src/components/foundation/Typography/index.d.ts +7 -0
  382. package/dist/src/components/index.d.ts +136 -0
  383. package/dist/src/icons/context.d.ts +26 -0
  384. package/dist/src/icons/types.d.ts +18 -0
  385. package/dist/src/lib/ThemeStyleContext.d.ts +21 -0
  386. package/dist/src/lib/file-icon.d.ts +16 -0
  387. package/dist/src/lib/i18n.d.ts +12 -0
  388. package/dist/src/lib/index.d.ts +10 -0
  389. package/dist/src/lib/motion.d.ts +22 -0
  390. package/dist/src/lib/utils.d.ts +11 -0
  391. package/dist/stateDiagram-FKZM4ZOC-DBvJ_eeL.cjs +1 -0
  392. package/dist/stateDiagram-FKZM4ZOC-ZVsJlaHJ.js +263 -0
  393. package/dist/stateDiagram-v2-4FDKWEC3-CB_nTHcE.js +16 -0
  394. package/dist/stateDiagram-v2-4FDKWEC3-Xkx17v6T.cjs +1 -0
  395. package/dist/theme.css +804 -0
  396. package/dist/timeline-definition-IT6M3QCI-BmGkYQiz.cjs +61 -0
  397. package/dist/timeline-definition-IT6M3QCI-Ck8zTt6w.js +795 -0
  398. package/dist/treemap-GDKQZRPO-B9sfERx8.js +17922 -0
  399. package/dist/treemap-GDKQZRPO-BVfJRs0Z.cjs +160 -0
  400. package/dist/xychartDiagram-PRI3JC2R-By_S8NzN.js +1340 -0
  401. package/dist/xychartDiagram-PRI3JC2R-CNfDrGxM.cjs +7 -0
  402. package/package.json +111 -9
  403. package/index.js +0 -5
@@ -0,0 +1,38 @@
1
+ /**
2
+ * [INPUT]: (SwitchProps) - toggle 用 registry;segment 主库保留(含 FunctionSwitch)
3
+ * [OUTPUT]: (JSX.Element) - 布尔开关或分段切换
4
+ * [POS]: components/foundation/Switch
5
+ *
6
+ * variant=toggle:从 registry 再导出并包一层 data-style/data-theme。
7
+ * variant=segment:主库实现,默认图标用 registry icons-inline。
8
+ */
9
+ import * as React from 'react';
10
+ import type { SwitchProps as RegistrySwitchProps } from '../../../../registry/basic/switch';
11
+ export type FunctionSwitchValue = 'code' | 'preview';
12
+ export type FunctionSwitchSize = 'sm' | 'md';
13
+ export interface SegmentOption {
14
+ value: string;
15
+ icon?: React.ReactNode;
16
+ label: string;
17
+ }
18
+ export interface SwitchProps extends Omit<RegistrySwitchProps, 'size'> {
19
+ variant?: 'toggle' | 'segment';
20
+ size?: 'md' | 'lg';
21
+ options?: SegmentOption[];
22
+ value?: string;
23
+ defaultValue?: string;
24
+ onValueChange?: (value: string) => void;
25
+ segmentSize?: FunctionSwitchSize;
26
+ }
27
+ declare const Switch: React.ForwardRefExoticComponent<SwitchProps & React.RefAttributes<HTMLDivElement>>;
28
+ /** @deprecated 使用 <Switch variant="segment" /> 替代 */
29
+ export interface FunctionSwitchProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
30
+ size?: FunctionSwitchSize;
31
+ value?: FunctionSwitchValue;
32
+ defaultValue?: FunctionSwitchValue;
33
+ onValueChange?: (value: FunctionSwitchValue) => void;
34
+ disabled?: boolean;
35
+ }
36
+ /** @deprecated 使用 <Switch variant="segment" value={...} onValueChange={...} /> 替代 */
37
+ declare function FunctionSwitch({ size, value, defaultValue, onValueChange, disabled, className, ...rest }: FunctionSwitchProps): import("react/jsx-runtime").JSX.Element;
38
+ export { Switch, FunctionSwitch };
@@ -0,0 +1,7 @@
1
+ /**
2
+ * [INPUT]: (TableProps, TableHeaderProps 等)
3
+ * [OUTPUT]: (JSX.Element) - 表格,基于 Registry 单一来源
4
+ * [POS]: components/foundation/Table - 从 registry 再导出
5
+ */
6
+ export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, } from '../../../../registry/basic/table';
7
+ export type { TableProps, TableHeaderProps, TableBodyProps, TableFooterProps, TableRowProps, TableHeadProps, TableCellProps, TableCaptionProps, } from '../../../../registry/basic/table';
@@ -0,0 +1,7 @@
1
+ /**
2
+ * [INPUT]: (TabsProps, TabsListProps, TabsTriggerProps, TabsContentProps)
3
+ * [OUTPUT]: (JSX.Element) - 标签页,基于 Registry 单一来源
4
+ * [POS]: components/foundation/Tabs - 从 registry 再导出
5
+ */
6
+ export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants, tabsTriggerVariants, } from '../../../../registry/basic/tabs';
7
+ export type { TabsProps, TabsListProps, TabsTriggerProps, TabsContentProps, } from '../../../../registry/basic/tabs';
@@ -0,0 +1,10 @@
1
+ /**
2
+ * [INPUT]: (TagProps)
3
+ * [OUTPUT]: (JSX.Element) - 标签,基于 Registry 单一来源
4
+ * [POS]: components/foundation/Tag - 从 registry 再导出
5
+ *
6
+ * [PROTOCOL]:
7
+ * 1. 实现来自根目录 registry/basic/tag.tsx,主库仅 re-export
8
+ */
9
+ export { Tag, tagVariants } from '../../../../registry/basic/tag';
10
+ export type { TagProps } from '../../../../registry/basic/tag';
@@ -0,0 +1,12 @@
1
+ import type { ToasterProps as RegistryToasterProps } from '../../../../registry/basic/sonner';
2
+ export { toast } from 'sonner';
3
+ export type ToasterProps = RegistryToasterProps & {
4
+ /** 显式传入 data-style,优先于 useThemeStyle */
5
+ dataStyle?: string;
6
+ /** 显式传入 data-theme,优先于 useThemeStyle */
7
+ dataTheme?: string;
8
+ };
9
+ export declare function Toaster({ theme, toastOptions, dataStyle: dataStyleProp, dataTheme: dataThemeProp, ...props }: ToasterProps): import("react/jsx-runtime").JSX.Element;
10
+ export declare namespace Toaster {
11
+ var displayName: string;
12
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * [INPUT]: (ToggleProps, ToggleGroupProps, ToggleGroupItemProps)
3
+ * [OUTPUT]: (JSX.Element) - Toggle / ToggleGroup,基于 Registry 单一来源
4
+ * [POS]: components/foundation/Toggle - 从 registry 再导出
5
+ */
6
+ export { Toggle, ToggleGroup, ToggleGroupItem, toggleVariants, } from '../../../../registry/basic/toggle';
7
+ export type { ToggleProps, ToggleGroupProps, ToggleGroupItemProps, } from '../../../../registry/basic/toggle';
@@ -0,0 +1,21 @@
1
+ /**
2
+ * [INPUT]: (TooltipProps,兼容 placement 与 side)
3
+ * [OUTPUT]: (JSX.Element) - 工具提示,基于 Registry 单一来源
4
+ * [POS]: components/foundation/Tooltip - 从 registry 再导出并兼容 placement
5
+ *
6
+ * [PROTOCOL]:
7
+ * 1. 实现来自根目录 registry/basic/tooltip.tsx;主库注入 useThemeStyle 使 Portal 随 ThemeStyleProvider
8
+ */
9
+ import { TooltipProvider, TooltipRoot, TooltipTrigger, TooltipContent } from '../../../../registry/basic/tooltip';
10
+ import type { TooltipProps as RegistryTooltipProps } from '../../../../registry/basic/tooltip';
11
+ export { TooltipProvider, TooltipRoot, TooltipTrigger, TooltipContent };
12
+ /** 对外 API:支持 placement(兼容旧用法)与 side(与 registry 一致) */
13
+ export interface TooltipProps extends Omit<RegistryTooltipProps, 'side'> {
14
+ /** 弹出方向,与 side 二选一;推荐使用 side */
15
+ placement?: 'top' | 'right' | 'bottom' | 'left';
16
+ side?: 'top' | 'right' | 'bottom' | 'left';
17
+ }
18
+ export declare function Tooltip({ placement, side, ...props }: TooltipProps): import("react/jsx-runtime").JSX.Element;
19
+ export declare namespace Tooltip {
20
+ var displayName: string;
21
+ }
@@ -0,0 +1,7 @@
1
+ /**
2
+ * [INPUT]: (Typography*Props)
3
+ * [OUTPUT]: (JSX.Element) - 排版组件,基于 Registry 单一来源
4
+ * [POS]: components/foundation/Typography - 从 registry 再导出
5
+ */
6
+ export { TypographyH1, TypographyH2, TypographyH3, TypographyH4, TypographyP, TypographyBlockquote, TypographyTable, TypographyList, TypographyInlineCode, TypographyLead, TypographyLarge, TypographySmall, TypographyMuted, } from '../../../../registry/basic/typography';
7
+ export type { TypographyH1Props, TypographyH2Props, TypographyH3Props, TypographyH4Props, TypographyPProps, TypographyBlockquoteProps, TypographyTableProps, TypographyListProps, TypographyInlineCodeProps, TypographyLeadProps, TypographyLargeProps, TypographySmallProps, TypographyMutedProps, } from '../../../../registry/basic/typography';
@@ -0,0 +1,136 @@
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 './foundation/Button';
15
+ export type { ButtonProps } from './foundation/Button';
16
+ export { IconButton } from './foundation/IconButton';
17
+ export type { IconButtonProps } from './foundation/IconButton';
18
+ export { Tooltip } from './foundation/Tooltip';
19
+ export type { TooltipProps } from './foundation/Tooltip';
20
+ export { EllipsisText } from './foundation/EllipsisText';
21
+ export type { EllipsisTextProps } from './foundation/EllipsisText';
22
+ export { OptionList } from './foundation/OptionList';
23
+ export type { OptionListProps, OptionItem } from './foundation/OptionList';
24
+ export { DropdownMenu, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuGroup, DropdownMenuPortal, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuRadioGroup, } from './foundation/DropdownMenu';
25
+ export type { DropdownMenuItemProps, DropdownMenuSubTriggerProps, DropdownMenuLabelProps, } from './foundation/DropdownMenu';
26
+ export { AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogMedia, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, } from './foundation/AlertDialog';
27
+ export type { AlertDialogContentProps, AlertDialogActionProps, AlertDialogHeaderProps, AlertDialogFooterProps, AlertDialogMediaProps, } from './foundation/AlertDialog';
28
+ export { Kbd, KbdGroup } from './foundation/Kbd';
29
+ export type { KbdProps, KbdGroupProps } from './foundation/Kbd';
30
+ export { Switch, FunctionSwitch } from './foundation/Switch';
31
+ export type { SwitchProps, FunctionSwitchProps, FunctionSwitchSize, FunctionSwitchValue, SegmentOption } from './foundation/Switch';
32
+ export { Toggle, ToggleGroup, ToggleGroupItem } from './foundation/Toggle';
33
+ export type { ToggleProps, ToggleGroupProps, ToggleGroupItemProps } from './foundation/Toggle';
34
+ export { RadioGroup, RadioGroupItem } from './foundation/RadioGroup';
35
+ export type { RadioGroupProps, RadioGroupItemProps } from './foundation/RadioGroup';
36
+ export { CollapsibleSection } from './foundation/CollapsibleSection';
37
+ export type { CollapsibleSectionProps } from './foundation/CollapsibleSection';
38
+ export { Collapsible, CollapsibleTrigger, CollapsibleContent } from './foundation/Collapsible';
39
+ export { ResizablePanelGroup, ResizablePanel, ResizableHandle, } from './foundation/Resizable';
40
+ export type { ResizablePanelGroupProps, ResizablePanelProps, ResizableHandleProps, } from './foundation/Resizable';
41
+ export { Scrollbar } from './foundation/Scrollbar';
42
+ export type { ScrollbarProps } from './foundation/Scrollbar';
43
+ export { Skeleton } from './foundation/Skeleton';
44
+ export type { SkeletonProps } from './foundation/Skeleton';
45
+ export { Spinner } from './foundation/Spinner';
46
+ export type { SpinnerProps } from './foundation/Spinner';
47
+ export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, } from './foundation/Table';
48
+ export type { TableProps, TableHeaderProps, TableBodyProps, TableFooterProps, TableRowProps, TableHeadProps, TableCellProps, TableCaptionProps, } from './foundation/Table';
49
+ export { Avatar, AvatarImage, AvatarFallback, AvatarBadge, AvatarGroup, AvatarGroupCount, } from './foundation/Avatar';
50
+ export type { AvatarProps, AvatarImageProps, AvatarFallbackProps, AvatarBadgeProps, AvatarGroupProps, AvatarGroupCountProps, } from './foundation/Avatar';
51
+ export { Toaster, toast } from './foundation/Toast';
52
+ export type { ToasterProps } from './foundation/Toast';
53
+ export { Select, SelectTrigger, SelectValue, SelectContent, SelectLabel, SelectSeparator, SelectGroup, SelectItem, SelectScrollUpButton, SelectScrollDownButton, } from './foundation/Select';
54
+ export type { SelectProps, SelectTriggerProps, SelectValueProps, SelectContentProps, SelectLabelProps, SelectSeparatorProps, SelectGroupProps, SelectItemProps, } from './foundation/Select';
55
+ export { Tabs, TabsList, TabsTrigger, TabsContent, } from './foundation/Tabs';
56
+ export type { TabsProps, TabsListProps, TabsTriggerProps, TabsContentProps, } from './foundation/Tabs';
57
+ export { Collapse, CollapseItem, CollapseTrigger, CollapseContent, } from './foundation/Collapse';
58
+ export type { CollapseProps, CollapseItemProps, CollapseTriggerProps, CollapseContentProps, } from './foundation/Collapse';
59
+ export { TypographyH1, TypographyH2, TypographyH3, TypographyH4, TypographyP, TypographyBlockquote, TypographyTable, TypographyList, TypographyInlineCode, TypographyLead, TypographyLarge, TypographySmall, TypographyMuted, } from './foundation/Typography';
60
+ export type { TypographyH1Props, TypographyH2Props, TypographyH3Props, TypographyH4Props, TypographyPProps, TypographyBlockquoteProps, TypographyTableProps, TypographyListProps, TypographyInlineCodeProps, TypographyLeadProps, TypographyLargeProps, TypographySmallProps, TypographyMutedProps, } from './foundation/Typography';
61
+ export { Slider } from './foundation/Slider';
62
+ export type { SliderProps } from './foundation/Slider';
63
+ export { Pagination, PaginationContent, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, PaginationEllipsis, } from './foundation/Pagination';
64
+ export type { PaginationLinkProps, PaginationPreviousProps, PaginationNextProps, } from './foundation/Pagination';
65
+ export { Tag, tagVariants } from './foundation/Tag';
66
+ export type { TagProps } from './foundation/Tag';
67
+ export { CollapsibleCard } from './chat/CollapsibleCard';
68
+ export type { CollapsibleCardProps } from './chat/CollapsibleCard';
69
+ export { FolderButton } from './chat/FolderButton';
70
+ export type { FolderButtonProps } from './chat/FolderButton';
71
+ export { ChatInput, ChatInputRoot, ChatInputAbove, ChatInputBox, ChatInputAttachments, ChatInputInput, ChatInputActions, ChatInputActionsLeft, ChatInputActionsRight, ChatInputExpandButton, ChatInputFolderButton, ChatInputMoreButton, ChatInputSendButton, ChatInputFooterLeft, } from './chat/ChatInput';
72
+ export type { ChatInputProps, FolderPermissionConfig, GenerationStatusConfig, FooterLeftModelSwitchConfig, FooterLeftModelSwitchItem, ChatInputRootProps, ChatInputAboveProps, ChatInputBoxProps, ChatInputAttachmentsProps, ChatInputInputProps, ChatInputActionsProps, ChatInputActionsLeftProps, ChatInputActionsRightProps, ChatInputExpandButtonProps, } from './chat/ChatInput';
73
+ export { RelatedPrompts } from './chat/RelatedPrompts';
74
+ export type { RelatedPromptsProps, RelatedPromptItem } from './chat/RelatedPrompts';
75
+ export { SuggestionPart } from './chat/SuggestionPart';
76
+ export type { SuggestionPartProps } from './chat/SuggestionPart';
77
+ export { SendButton } from './chat/SendButton';
78
+ export type { SendButtonProps } from './chat/SendButton';
79
+ export { Response } from './chat/Response';
80
+ export type { ResponseProps, ResponsePhase, ResponseRound, ResponseStep, ResponseStepToolType } from './chat/Response';
81
+ export { Request } from './chat/Request';
82
+ export type { RequestProps } from './chat/Request';
83
+ export { FileCard } from './chat/FileCard';
84
+ export type { FileCardProps } from './chat/FileCard';
85
+ export { FileAttachment } from './chat/FileAttachment';
86
+ export type { FileAttachmentProps } from './chat/FileAttachment';
87
+ export { ImageAttachment } from './chat/ImageAttachment';
88
+ export type { ImageAttachmentProps } from './chat/ImageAttachment';
89
+ export { ReasoningStep } from './chat/ReasoningStep';
90
+ export type { ReasoningStepProps, ReasoningStepDetail } from './chat/ReasoningStep';
91
+ export { ToolInvocationCard } from './chat/ToolInvocationCard';
92
+ export type { ToolInvocationCardProps, ToolInvocationStatus } from './chat/ToolInvocationCard';
93
+ export { PermissionCard } from './chat/PermissionCard';
94
+ export type { PermissionCardProps, PermissionCardAction } from './chat/PermissionCard';
95
+ export { MarkdownBody } from './chat/Markdown';
96
+ export type { MarkdownBodyProps } from './chat/Markdown';
97
+ export { GenerationStatusBar } from './chat/GenerationStatusBar';
98
+ export type { GenerationStatusBarProps } from './chat/GenerationStatusBar';
99
+ export { ThinkingIndicator } from './chat/ThinkingIndicator';
100
+ export type { ThinkingIndicatorProps } from './chat/ThinkingIndicator';
101
+ export { ImageGenerating } from './chat/ImageGenerating';
102
+ export type { ImageGeneratingProps } from './chat/ImageGenerating';
103
+ export { SidebarMenu } from './chat/SidebarMenu';
104
+ export type { SidebarMenuProps, SidebarMenuItem, SidebarMenuItemAction } from './chat/SidebarMenu';
105
+ export { GeneratedImagesGrid } from './chat/GeneratedImagesGrid';
106
+ export type { GeneratedImagesGridProps } from './chat/GeneratedImagesGrid';
107
+ export { UserQuestion } from './chat/UserQuestion';
108
+ export type { UserQuestionProps, UserQuestionHandle, UserQuestionItem, UserQuestionOption, UserQuestionLabels, } from './chat/UserQuestion';
109
+ export { UserQuestionAnswer } from './chat/UserQuestionAnswer';
110
+ export type { UserQuestionAnswerProps, UserQuestionAnswerLabels, } from './chat/UserQuestionAnswer';
111
+ export { QueueIndicator } from './chat/QueueIndicator';
112
+ export type { QueueIndicatorProps, QueueIndicatorItem, QueueIndicatorLabels, } from './chat/QueueIndicator';
113
+ export { FileReviewPart } from './chat/FileReviewPart';
114
+ export type { FileReviewPartProps, FileReviewFile } from './chat/FileReviewPart';
115
+ export { TaskPart } from './chat/TaskPart';
116
+ export type { TaskPartProps, TaskPartTask, TaskStatus } from './chat/TaskPart';
117
+ export { PlanPart } from './chat/PlanPart';
118
+ export type { PlanPartProps } from './chat/PlanPart';
119
+ export { MermaidPart } from './chat/MermaidPart';
120
+ export type { MermaidPartProps } from './chat/MermaidPart';
121
+ export { CodeBlockPart } from './chat/CodeBlockPart';
122
+ export type { CodeBlockPartProps, CodeBlockDiffType } from './chat/CodeBlockPart';
123
+ export { TerminalCodeBlockPart } from './chat/TerminalCodeBlockPart';
124
+ export type { TerminalCodeBlockPartProps } from './chat/TerminalCodeBlockPart';
125
+ export { BrowserUsePart } from './chat/BrowserUsePart';
126
+ export type { BrowserUsePartProps, BrowserUseStatus } from './chat/BrowserUsePart';
127
+ export { QuestionPart } from './chat/QuestionPart';
128
+ export type { QuestionPartProps } from './chat/QuestionPart';
129
+ export { Progress } from './foundation/Progress';
130
+ export type { ProgressProps } from './foundation/Progress';
131
+ export { IconsProvider, useIcons, useIcon } from '../icons/context';
132
+ export type { IconKey, IconComponent, IconProps } from '../icons/types';
133
+ export type { IconsContextValue } from '../icons/context';
134
+ export { ThemeStyleProvider, useThemeStyle, type ThemeStyleValue, } from '../lib/ThemeStyleContext';
135
+ export { MOTION_DURATION, MOTION_EASE, MOTION_SPRING } from '../lib/motion';
136
+ 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,21 @@
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;
@@ -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 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 引用(@/lib/utils)
5
+ *
6
+ * [PROTOCOL]:
7
+ * 1. 与 registry/lib/utils 保持一致,供从 registry 引入的组件解析
8
+ * 2. 使用 clsx + tailwind-merge 合并类名
9
+ */
10
+ import { type ClassValue } from 'clsx';
11
+ export declare function cn(...inputs: ClassValue[]): string;
@@ -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;