sparkdesign 0.4.1 → 0.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (452) hide show
  1. package/README.md +112 -204
  2. package/{cli/dist → dist}/commands/add.js +11 -2
  3. package/package.json +19 -126
  4. package/{cli/registry → registry}/chat/markdown.tsx +1 -1
  5. package/{cli/registry → registry}/chat/tool-invocation-card.tsx +5 -5
  6. package/registry/meta.json +750 -0
  7. package/cli/registry/meta.json +0 -1
  8. package/dist/_basePickBy-DnQN8w3y.js +0 -151
  9. package/dist/_basePickBy-a-kPMlkg.cjs +0 -1
  10. package/dist/_baseUniq-B-N2NQ50.js +0 -614
  11. package/dist/_baseUniq-Cc_zbSif.cjs +0 -1
  12. package/dist/arc-BQBhijZ6.js +0 -83
  13. package/dist/arc-mWQt0Yph.cjs +0 -1
  14. package/dist/architectureDiagram-VXUJARFQ-BMZEucno.cjs +0 -36
  15. package/dist/architectureDiagram-VXUJARFQ-DTdjD3Bp.js +0 -4661
  16. package/dist/blockDiagram-VD42YOAC-CzHn0yob.js +0 -2256
  17. package/dist/blockDiagram-VD42YOAC-DDxdHAlz.cjs +0 -122
  18. package/dist/c4Diagram-YG6GDRKO-4Gz0I4gj.cjs +0 -10
  19. package/dist/c4Diagram-YG6GDRKO-BIy--yVN.js +0 -1580
  20. package/dist/channel-BQn0o8bs.js +0 -5
  21. package/dist/channel-DaN7XniJ.cjs +0 -1
  22. package/dist/chunk-4BX2VUAB-BlQFTQqz.cjs +0 -1
  23. package/dist/chunk-4BX2VUAB-Czitj3Kc.js +0 -8
  24. package/dist/chunk-55IACEB6-DXacNZbO.js +0 -8
  25. package/dist/chunk-55IACEB6-DnDxpye9.cjs +0 -1
  26. package/dist/chunk-B4BG7PRW-CBdN0q_V.js +0 -1375
  27. package/dist/chunk-B4BG7PRW-DbGvUkGO.cjs +0 -165
  28. package/dist/chunk-DI55MBZ5-D1YJMs6x.cjs +0 -220
  29. package/dist/chunk-DI55MBZ5-NCQTvayw.js +0 -1370
  30. package/dist/chunk-FMBD7UC4-CsGMbrtr.js +0 -19
  31. package/dist/chunk-FMBD7UC4-Di7cUUh5.cjs +0 -15
  32. package/dist/chunk-QN33PNHL-0j5LC8Lm.cjs +0 -1
  33. package/dist/chunk-QN33PNHL-3GERZBRm.js +0 -19
  34. package/dist/chunk-QZHKN3VN-AVEY9ImQ.js +0 -15
  35. package/dist/chunk-QZHKN3VN-s8Z0a8mc.cjs +0 -1
  36. package/dist/chunk-TZMSLE5B-CAf87HPt.cjs +0 -1
  37. package/dist/chunk-TZMSLE5B-sbiflal0.js +0 -64
  38. package/dist/classDiagram-2ON5EDUG-Ct9JLIN2.cjs +0 -1
  39. package/dist/classDiagram-2ON5EDUG-Dzfrft3a.js +0 -16
  40. package/dist/classDiagram-v2-WZHVMYZB-Ct9JLIN2.cjs +0 -1
  41. package/dist/classDiagram-v2-WZHVMYZB-Dzfrft3a.js +0 -16
  42. package/dist/clone-Cde_NQ8V.js +0 -8
  43. package/dist/clone-DCNjWuM2.cjs +0 -1
  44. package/dist/cose-bilkent-S5V4N54A-0uLijMro.cjs +0 -1
  45. package/dist/cose-bilkent-S5V4N54A-Bb08N431.js +0 -2608
  46. package/dist/cytoscape.esm-CNUX3VTg.cjs +0 -321
  47. package/dist/cytoscape.esm-Cvf3sx9F.js +0 -18704
  48. package/dist/dagre-6UL2VRFP-CY_Wz5Zd.js +0 -444
  49. package/dist/dagre-6UL2VRFP-Dxe7_qZc.cjs +0 -4
  50. package/dist/defaultLocale-BgPVtth8.js +0 -171
  51. package/dist/defaultLocale-C4wbwF1n.cjs +0 -1
  52. package/dist/diagram-PSM6KHXK-D2bdb7MT.js +0 -531
  53. package/dist/diagram-PSM6KHXK-YF69SUjY.cjs +0 -24
  54. package/dist/diagram-QEK2KX5R-BpUSoh0-.js +0 -217
  55. package/dist/diagram-QEK2KX5R-DZPGteon.cjs +0 -43
  56. package/dist/diagram-S2PKOQOG-ht-zdvFG.cjs +0 -24
  57. package/dist/diagram-S2PKOQOG-zFeLJ50Z.js +0 -142
  58. package/dist/erDiagram-Q2GNP2WA-B38iJ6ts.js +0 -841
  59. package/dist/erDiagram-Q2GNP2WA-RgS80DDU.cjs +0 -60
  60. package/dist/flowDiagram-NV44I4VS-BHilOs2p.cjs +0 -162
  61. package/dist/flowDiagram-NV44I4VS-BrBJcoce.js +0 -1620
  62. package/dist/fonts/KaTeX_AMS-Regular.ttf +0 -0
  63. package/dist/fonts/KaTeX_AMS-Regular.woff +0 -0
  64. package/dist/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  65. package/dist/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
  66. package/dist/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
  67. package/dist/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  68. package/dist/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
  69. package/dist/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
  70. package/dist/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  71. package/dist/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
  72. package/dist/fonts/KaTeX_Fraktur-Bold.woff +0 -0
  73. package/dist/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  74. package/dist/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
  75. package/dist/fonts/KaTeX_Fraktur-Regular.woff +0 -0
  76. package/dist/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  77. package/dist/fonts/KaTeX_Main-Bold.ttf +0 -0
  78. package/dist/fonts/KaTeX_Main-Bold.woff +0 -0
  79. package/dist/fonts/KaTeX_Main-Bold.woff2 +0 -0
  80. package/dist/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
  81. package/dist/fonts/KaTeX_Main-BoldItalic.woff +0 -0
  82. package/dist/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  83. package/dist/fonts/KaTeX_Main-Italic.ttf +0 -0
  84. package/dist/fonts/KaTeX_Main-Italic.woff +0 -0
  85. package/dist/fonts/KaTeX_Main-Italic.woff2 +0 -0
  86. package/dist/fonts/KaTeX_Main-Regular.ttf +0 -0
  87. package/dist/fonts/KaTeX_Main-Regular.woff +0 -0
  88. package/dist/fonts/KaTeX_Main-Regular.woff2 +0 -0
  89. package/dist/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
  90. package/dist/fonts/KaTeX_Math-BoldItalic.woff +0 -0
  91. package/dist/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  92. package/dist/fonts/KaTeX_Math-Italic.ttf +0 -0
  93. package/dist/fonts/KaTeX_Math-Italic.woff +0 -0
  94. package/dist/fonts/KaTeX_Math-Italic.woff2 +0 -0
  95. package/dist/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
  96. package/dist/fonts/KaTeX_SansSerif-Bold.woff +0 -0
  97. package/dist/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  98. package/dist/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
  99. package/dist/fonts/KaTeX_SansSerif-Italic.woff +0 -0
  100. package/dist/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  101. package/dist/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
  102. package/dist/fonts/KaTeX_SansSerif-Regular.woff +0 -0
  103. package/dist/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  104. package/dist/fonts/KaTeX_Script-Regular.ttf +0 -0
  105. package/dist/fonts/KaTeX_Script-Regular.woff +0 -0
  106. package/dist/fonts/KaTeX_Script-Regular.woff2 +0 -0
  107. package/dist/fonts/KaTeX_Size1-Regular.ttf +0 -0
  108. package/dist/fonts/KaTeX_Size1-Regular.woff +0 -0
  109. package/dist/fonts/KaTeX_Size1-Regular.woff2 +0 -0
  110. package/dist/fonts/KaTeX_Size2-Regular.ttf +0 -0
  111. package/dist/fonts/KaTeX_Size2-Regular.woff +0 -0
  112. package/dist/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  113. package/dist/fonts/KaTeX_Size3-Regular.ttf +0 -0
  114. package/dist/fonts/KaTeX_Size3-Regular.woff +0 -0
  115. package/dist/fonts/KaTeX_Size3-Regular.woff2 +0 -0
  116. package/dist/fonts/KaTeX_Size4-Regular.ttf +0 -0
  117. package/dist/fonts/KaTeX_Size4-Regular.woff +0 -0
  118. package/dist/fonts/KaTeX_Size4-Regular.woff2 +0 -0
  119. package/dist/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
  120. package/dist/fonts/KaTeX_Typewriter-Regular.woff +0 -0
  121. package/dist/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  122. package/dist/ganttDiagram-JELNMOA3-pZiJeFio.cjs +0 -267
  123. package/dist/ganttDiagram-JELNMOA3-tw6FhkWJ.js +0 -2670
  124. package/dist/gitGraphDiagram-V2S2FVAM-BWn5uIK5.js +0 -699
  125. package/dist/gitGraphDiagram-V2S2FVAM-DKKeG-9R.cjs +0 -65
  126. package/dist/graph-DIbblrZP.cjs +0 -1
  127. package/dist/graph-DPcK91G3.js +0 -247
  128. package/dist/infoDiagram-HS3SLOUP-B8gwwhct.cjs +0 -2
  129. package/dist/infoDiagram-HS3SLOUP-D47PNcP_.js +0 -24
  130. package/dist/init-CHZsXQcr.cjs +0 -1
  131. package/dist/init-DjUOC4st.js +0 -16
  132. package/dist/journeyDiagram-XKPGCS4Q-BG3cfhyU.js +0 -834
  133. package/dist/journeyDiagram-XKPGCS4Q-D8DVLJof.cjs +0 -139
  134. package/dist/kanban-definition-3W4ZIXB7-4OCnEouP.cjs +0 -89
  135. package/dist/kanban-definition-3W4ZIXB7-CWi_ssF9.js +0 -719
  136. package/dist/katex.css +0 -1
  137. package/dist/layout-Byuh8f-J.cjs +0 -1
  138. package/dist/layout-CdLdvj1j.js +0 -1335
  139. package/dist/linear-C2Q_PI9B.js +0 -259
  140. package/dist/linear-C69aPBW1.cjs +0 -1
  141. package/dist/mermaid.core-DBwAx_jp.cjs +0 -249
  142. package/dist/mermaid.core-gFR0XUlD.js +0 -15300
  143. package/dist/mindmap-definition-VGOIOE7T-8P7obVV4.cjs +0 -68
  144. package/dist/mindmap-definition-VGOIOE7T-DnOa7WJ9.js +0 -784
  145. package/dist/ordinal-B6-f3MAq.js +0 -61
  146. package/dist/ordinal-CagbB1m8.cjs +0 -1
  147. package/dist/pieDiagram-ADFJNKIX-5NAlvhMo.js +0 -161
  148. package/dist/pieDiagram-ADFJNKIX-CQBG4yR9.cjs +0 -30
  149. package/dist/qoder-design.css +0 -2
  150. package/dist/quadrantDiagram-AYHSOK5B-Oe4y7RZ0.cjs +0 -7
  151. package/dist/quadrantDiagram-AYHSOK5B-rh2DPEP1.js +0 -1022
  152. package/dist/registry/basic/alert-dialog.d.ts +0 -40
  153. package/dist/registry/basic/avatar.d.ts +0 -30
  154. package/dist/registry/basic/button.d.ts +0 -16
  155. package/dist/registry/basic/collapse.d.ts +0 -22
  156. package/dist/registry/basic/collapsible-card.d.ts +0 -34
  157. package/dist/registry/basic/collapsible.d.ts +0 -15
  158. package/dist/registry/basic/dropdown-menu.d.ts +0 -52
  159. package/dist/registry/basic/icon-button.d.ts +0 -12
  160. package/dist/registry/basic/icons-inline.d.ts +0 -51
  161. package/dist/registry/basic/kbd.d.ts +0 -23
  162. package/dist/registry/basic/option-list.d.ts +0 -16
  163. package/dist/registry/basic/pagination.d.ts +0 -33
  164. package/dist/registry/basic/progress.d.ts +0 -18
  165. package/dist/registry/basic/radio-group.d.ts +0 -25
  166. package/dist/registry/basic/resizable.d.ts +0 -318
  167. package/dist/registry/basic/scrollbar.d.ts +0 -12
  168. package/dist/registry/basic/select.d.ts +0 -35
  169. package/dist/registry/basic/shimmering-text.d.ts +0 -27
  170. package/dist/registry/basic/sidebar-menu.d.ts +0 -23
  171. package/dist/registry/basic/skeleton.d.ts +0 -10
  172. package/dist/registry/basic/slider.d.ts +0 -16
  173. package/dist/registry/basic/sonner.d.ts +0 -23
  174. package/dist/registry/basic/spinner.d.ts +0 -5
  175. package/dist/registry/basic/switch.d.ts +0 -20
  176. package/dist/registry/basic/table.d.ts +0 -18
  177. package/dist/registry/basic/tabs.d.ts +0 -29
  178. package/dist/registry/basic/tag.d.ts +0 -23
  179. package/dist/registry/basic/theme-from-document.d.ts +0 -10
  180. package/dist/registry/basic/toggle.d.ts +0 -29
  181. package/dist/registry/basic/tooltip.d.ts +0 -34
  182. package/dist/registry/basic/typography.d.ts +0 -76
  183. package/dist/registry/chat/ask-user-part.d.ts +0 -24
  184. package/dist/registry/chat/browser-action-part.d.ts +0 -28
  185. package/dist/registry/chat/chat-input/chat-input-folder-selector.d.ts +0 -22
  186. package/dist/registry/chat/chat-input/chat-input-model-switcher.d.ts +0 -12
  187. package/dist/registry/chat/chat-input/chat-input-textarea.d.ts +0 -9
  188. package/dist/registry/chat/chat-input/compound.d.ts +0 -97
  189. package/dist/registry/chat/chat-input/context.d.ts +0 -64
  190. package/dist/registry/chat/chat-input/folder-permission-dialog.d.ts +0 -11
  191. package/dist/registry/chat/chat-input/index.d.ts +0 -34
  192. package/dist/registry/chat/chat-input/types.d.ts +0 -79
  193. package/dist/registry/chat/chat-input/useAutoResizeTextarea.d.ts +0 -7
  194. package/dist/registry/chat/code-block-part.d.ts +0 -23
  195. package/dist/registry/chat/file-attachment.d.ts +0 -19
  196. package/dist/registry/chat/file-card.d.ts +0 -10
  197. package/dist/registry/chat/file-review-part.d.ts +0 -30
  198. package/dist/registry/chat/folder-button.d.ts +0 -20
  199. package/dist/registry/chat/generated-images-grid.d.ts +0 -15
  200. package/dist/registry/chat/generation-status-bar.d.ts +0 -19
  201. package/dist/registry/chat/hint-banner.d.ts +0 -28
  202. package/dist/registry/chat/image-attachment.d.ts +0 -19
  203. package/dist/registry/chat/image-generating.d.ts +0 -15
  204. package/dist/registry/chat/markdown.d.ts +0 -8
  205. package/dist/registry/chat/mermaid-part.d.ts +0 -17
  206. package/dist/registry/chat/permission-card.d.ts +0 -24
  207. package/dist/registry/chat/plan-part.d.ts +0 -30
  208. package/dist/registry/chat/queue-indicator.d.ts +0 -27
  209. package/dist/registry/chat/reasoning-step/compound.d.ts +0 -17
  210. package/dist/registry/chat/reasoning-step/context.d.ts +0 -10
  211. package/dist/registry/chat/reasoning-step/index.d.ts +0 -14
  212. package/dist/registry/chat/reasoning-step/types.d.ts +0 -95
  213. package/dist/registry/chat/related-prompts.d.ts +0 -23
  214. package/dist/registry/chat/response/compound.d.ts +0 -25
  215. package/dist/registry/chat/response/context.d.ts +0 -9
  216. package/dist/registry/chat/response/index.d.ts +0 -15
  217. package/dist/registry/chat/response/types.d.ts +0 -99
  218. package/dist/registry/chat/send-button.d.ts +0 -17
  219. package/dist/registry/chat/streaming-markdown-block.d.ts +0 -8
  220. package/dist/registry/chat/task-part.d.ts +0 -28
  221. package/dist/registry/chat/terminal-code-block-part.d.ts +0 -18
  222. package/dist/registry/chat/thinking-indicator.d.ts +0 -14
  223. package/dist/registry/chat/tool-invocation-card.d.ts +0 -20
  224. package/dist/registry/chat/user-message.d.ts +0 -6
  225. package/dist/registry/chat/user-question/UserQuestionCard.d.ts +0 -30
  226. package/dist/registry/chat/user-question/UserQuestionFooter.d.ts +0 -18
  227. package/dist/registry/chat/user-question/UserQuestionHeader.d.ts +0 -20
  228. package/dist/registry/chat/user-question/compound.d.ts +0 -37
  229. package/dist/registry/chat/user-question/context.d.ts +0 -55
  230. package/dist/registry/chat/user-question/index.d.ts +0 -15
  231. package/dist/registry/chat/user-question/types.d.ts +0 -52
  232. package/dist/registry/chat/user-question/useUserQuestionKeyboard.d.ts +0 -17
  233. package/dist/registry/chat/user-question/useUserQuestionState.d.ts +0 -26
  234. package/dist/registry/chat/user-question-answer.d.ts +0 -13
  235. package/dist/registry/lib/file-icon-maps.d.ts +0 -20
  236. package/dist/registry/lib/use-mermaid-render.d.ts +0 -5
  237. package/dist/registry/lib/utils.d.ts +0 -11
  238. package/dist/requirementDiagram-UZGBJVZJ-DcWaCuXr.js +0 -850
  239. package/dist/requirementDiagram-UZGBJVZJ-gfdlrFiq.cjs +0 -64
  240. package/dist/sankeyDiagram-TZEHDZUN-CQIKFwD0.js +0 -810
  241. package/dist/sankeyDiagram-TZEHDZUN-DvPtzQvC.cjs +0 -10
  242. package/dist/scale/computed.css +0 -103
  243. package/dist/scale/config.css +0 -110
  244. package/dist/scale/index.css +0 -30
  245. package/dist/scale/presets/compact.css +0 -30
  246. package/dist/scale/presets/dense.css +0 -64
  247. package/dist/scale/presets/sharp.css +0 -40
  248. package/dist/scale/presets/soft.css +0 -16
  249. package/dist/scale.css +0 -13
  250. package/dist/sequenceDiagram-WL72ISMW-BNrsMagL.cjs +0 -145
  251. package/dist/sequenceDiagram-WL72ISMW-iCX3ckKx.js +0 -2511
  252. package/dist/spark-design.cjs.js +0 -265
  253. package/dist/spark-design.es.js +0 -13425
  254. package/dist/src/components/basic/AlertDialog/index.d.ts +0 -20
  255. package/dist/src/components/basic/Avatar/index.d.ts +0 -7
  256. package/dist/src/components/basic/Button/index.d.ts +0 -7
  257. package/dist/src/components/basic/Collapse/index.d.ts +0 -15
  258. package/dist/src/components/basic/Collapsible/index.d.ts +0 -7
  259. package/dist/src/components/basic/CollapsibleCard/index.d.ts +0 -7
  260. package/dist/src/components/basic/CollapsibleSection/index.d.ts +0 -43
  261. package/dist/src/components/basic/DropdownMenu/index.d.ts +0 -19
  262. package/dist/src/components/basic/EllipsisText/index.d.ts +0 -53
  263. package/dist/src/components/basic/IconButton/index.d.ts +0 -7
  264. package/dist/src/components/basic/Kbd/index.d.ts +0 -7
  265. package/dist/src/components/basic/OptionList/index.d.ts +0 -7
  266. package/dist/src/components/basic/Pagination/index.d.ts +0 -7
  267. package/dist/src/components/basic/Progress/index.d.ts +0 -7
  268. package/dist/src/components/basic/RadioGroup/index.d.ts +0 -7
  269. package/dist/src/components/basic/Resizable/index.d.ts +0 -7
  270. package/dist/src/components/basic/Scrollbar/index.d.ts +0 -7
  271. package/dist/src/components/basic/Select/index.d.ts +0 -17
  272. package/dist/src/components/basic/ShimmeringText/index.d.ts +0 -7
  273. package/dist/src/components/basic/SidebarMenu/index.d.ts +0 -4
  274. package/dist/src/components/basic/Skeleton/index.d.ts +0 -7
  275. package/dist/src/components/basic/Slider/index.d.ts +0 -7
  276. package/dist/src/components/basic/Spinner/index.d.ts +0 -7
  277. package/dist/src/components/basic/Switch/index.d.ts +0 -38
  278. package/dist/src/components/basic/Table/index.d.ts +0 -7
  279. package/dist/src/components/basic/Tabs/index.d.ts +0 -7
  280. package/dist/src/components/basic/Tag/index.d.ts +0 -10
  281. package/dist/src/components/basic/Toast/index.d.ts +0 -12
  282. package/dist/src/components/basic/Toggle/index.d.ts +0 -7
  283. package/dist/src/components/basic/Tooltip/index.d.ts +0 -21
  284. package/dist/src/components/basic/Typography/index.d.ts +0 -7
  285. package/dist/src/components/chat/AskUserPart/index.d.ts +0 -6
  286. package/dist/src/components/chat/BrowserActionPart/index.d.ts +0 -7
  287. package/dist/src/components/chat/ChatInput/index.d.ts +0 -29
  288. package/dist/src/components/chat/CodeBlockPart/index.d.ts +0 -7
  289. package/dist/src/components/chat/FileAttachment/index.d.ts +0 -3
  290. package/dist/src/components/chat/FileCard/index.d.ts +0 -3
  291. package/dist/src/components/chat/FileReviewPart/index.d.ts +0 -7
  292. package/dist/src/components/chat/FolderButton/index.d.ts +0 -5
  293. package/dist/src/components/chat/GeneratedImagesGrid/index.d.ts +0 -7
  294. package/dist/src/components/chat/GenerationStatusBar/index.d.ts +0 -7
  295. package/dist/src/components/chat/HintBanner/index.d.ts +0 -6
  296. package/dist/src/components/chat/ImageAttachment/index.d.ts +0 -3
  297. package/dist/src/components/chat/ImageGenerating/index.d.ts +0 -6
  298. package/dist/src/components/chat/Markdown/demo-content.d.ts +0 -1
  299. package/dist/src/components/chat/Markdown/index.d.ts +0 -7
  300. package/dist/src/components/chat/MermaidPart/index.d.ts +0 -6
  301. package/dist/src/components/chat/PermissionCard/index.d.ts +0 -4
  302. package/dist/src/components/chat/PlanPart/index.d.ts +0 -6
  303. package/dist/src/components/chat/QueueIndicator/index.d.ts +0 -4
  304. package/dist/src/components/chat/ReasoningStep/index.d.ts +0 -13
  305. package/dist/src/components/chat/RelatedPrompts/index.d.ts +0 -6
  306. package/dist/src/components/chat/Response/StreamingMarkdownBlock.d.ts +0 -6
  307. package/dist/src/components/chat/Response/index.d.ts +0 -16
  308. package/dist/src/components/chat/SendButton/index.d.ts +0 -5
  309. package/dist/src/components/chat/TaskPart/index.d.ts +0 -7
  310. package/dist/src/components/chat/TerminalCodeBlockPart/index.d.ts +0 -6
  311. package/dist/src/components/chat/ThinkingIndicator/index.d.ts +0 -6
  312. package/dist/src/components/chat/ToolInvocationCard/index.d.ts +0 -4
  313. package/dist/src/components/chat/UserMessage/index.d.ts +0 -7
  314. package/dist/src/components/chat/UserQuestion/index.d.ts +0 -19
  315. package/dist/src/components/chat/UserQuestionAnswer/index.d.ts +0 -3
  316. package/dist/src/components/index.d.ts +0 -138
  317. package/dist/src/icons/context.d.ts +0 -26
  318. package/dist/src/icons/types.d.ts +0 -18
  319. package/dist/src/lib/ThemeStyleContext.d.ts +0 -21
  320. package/dist/src/lib/file-icon.d.ts +0 -16
  321. package/dist/src/lib/i18n.d.ts +0 -12
  322. package/dist/src/lib/index.d.ts +0 -10
  323. package/dist/src/lib/motion.d.ts +0 -22
  324. package/dist/src/lib/utils.d.ts +0 -11
  325. package/dist/stateDiagram-FKZM4ZOC-DBvJ_eeL.cjs +0 -1
  326. package/dist/stateDiagram-FKZM4ZOC-ZVsJlaHJ.js +0 -263
  327. package/dist/stateDiagram-v2-4FDKWEC3-CB_nTHcE.js +0 -16
  328. package/dist/stateDiagram-v2-4FDKWEC3-Xkx17v6T.cjs +0 -1
  329. package/dist/theme-base.css +0 -270
  330. package/dist/theme.css +0 -17
  331. package/dist/themes/dark-parchment.css +0 -133
  332. package/dist/themes/dark-qoder.css +0 -133
  333. package/dist/themes/light-parchment.css +0 -124
  334. package/dist/themes/light-qoder.css +0 -132
  335. package/dist/timeline-definition-IT6M3QCI-BmGkYQiz.cjs +0 -61
  336. package/dist/timeline-definition-IT6M3QCI-Ck8zTt6w.js +0 -795
  337. package/dist/tokens/index.css +0 -35
  338. package/dist/treemap-GDKQZRPO-B9sfERx8.js +0 -17922
  339. package/dist/treemap-GDKQZRPO-BVfJRs0Z.cjs +0 -160
  340. package/dist/xychartDiagram-PRI3JC2R-By_S8NzN.js +0 -1340
  341. package/dist/xychartDiagram-PRI3JC2R-CNfDrGxM.cjs +0 -7
  342. /package/{cli/dist → dist}/commands/diff.js +0 -0
  343. /package/{cli/dist → dist}/commands/init.js +0 -0
  344. /package/{cli/dist → dist}/commands/list.js +0 -0
  345. /package/{cli/dist → dist}/index.js +0 -0
  346. /package/{cli/dist → dist}/utils/config.js +0 -0
  347. /package/{cli/dist → dist}/utils/registry.js +0 -0
  348. /package/{cli/dist → dist}/utils/tokens.js +0 -0
  349. /package/{cli/dist → dist}/utils/transform.js +0 -0
  350. /package/{cli/registry → registry}/__tests__/basic/button.test.tsx +0 -0
  351. /package/{cli/registry → registry}/__tests__/chat/markdown.test.tsx +0 -0
  352. /package/{cli/registry → registry}/__tests__/chat/thinking-indicator.test.tsx +0 -0
  353. /package/{cli/registry → registry}/__tests__/chat/tool-invocation-card.test.tsx +0 -0
  354. /package/{cli/registry → registry}/basic/alert-dialog.tsx +0 -0
  355. /package/{cli/registry → registry}/basic/avatar.tsx +0 -0
  356. /package/{cli/registry → registry}/basic/button.tsx +0 -0
  357. /package/{cli/registry → registry}/basic/collapse.tsx +0 -0
  358. /package/{cli/registry → registry}/basic/collapsible-card.tsx +0 -0
  359. /package/{cli/registry → registry}/basic/collapsible.tsx +0 -0
  360. /package/{cli/registry → registry}/basic/dropdown-menu.tsx +0 -0
  361. /package/{cli/registry → registry}/basic/icon-button.tsx +0 -0
  362. /package/{cli/registry → registry}/basic/icons-inline.tsx +0 -0
  363. /package/{cli/registry → registry}/basic/kbd.tsx +0 -0
  364. /package/{cli/registry → registry}/basic/option-list.tsx +0 -0
  365. /package/{cli/registry → registry}/basic/pagination.tsx +0 -0
  366. /package/{cli/registry → registry}/basic/progress.tsx +0 -0
  367. /package/{cli/registry → registry}/basic/radio-group.tsx +0 -0
  368. /package/{cli/registry → registry}/basic/resizable.tsx +0 -0
  369. /package/{cli/registry → registry}/basic/scrollbar.tsx +0 -0
  370. /package/{cli/registry → registry}/basic/select.tsx +0 -0
  371. /package/{cli/registry → registry}/basic/shimmering-text.tsx +0 -0
  372. /package/{cli/registry → registry}/basic/sidebar-menu.tsx +0 -0
  373. /package/{cli/registry → registry}/basic/skeleton.tsx +0 -0
  374. /package/{cli/registry → registry}/basic/slider.tsx +0 -0
  375. /package/{cli/registry → registry}/basic/sonner.tsx +0 -0
  376. /package/{cli/registry → registry}/basic/spinner.tsx +0 -0
  377. /package/{cli/registry → registry}/basic/switch.tsx +0 -0
  378. /package/{cli/registry → registry}/basic/table.tsx +0 -0
  379. /package/{cli/registry → registry}/basic/tabs.tsx +0 -0
  380. /package/{cli/registry → registry}/basic/tag.tsx +0 -0
  381. /package/{cli/registry → registry}/basic/theme-from-document.ts +0 -0
  382. /package/{cli/registry → registry}/basic/toggle.tsx +0 -0
  383. /package/{cli/registry → registry}/basic/tooltip.tsx +0 -0
  384. /package/{cli/registry → registry}/basic/typography.tsx +0 -0
  385. /package/{cli/registry → registry}/chat/ask-user-part.tsx +0 -0
  386. /package/{cli/registry → registry}/chat/browser-action-part.tsx +0 -0
  387. /package/{cli/registry → registry}/chat/chat-input/chat-input-folder-selector.tsx +0 -0
  388. /package/{cli/registry → registry}/chat/chat-input/chat-input-model-switcher.tsx +0 -0
  389. /package/{cli/registry → registry}/chat/chat-input/chat-input-textarea.tsx +0 -0
  390. /package/{cli/registry → registry}/chat/chat-input/compound.tsx +0 -0
  391. /package/{cli/registry → registry}/chat/chat-input/context.tsx +0 -0
  392. /package/{cli/registry → registry}/chat/chat-input/folder-permission-dialog.tsx +0 -0
  393. /package/{cli/registry → registry}/chat/chat-input/index.tsx +0 -0
  394. /package/{cli/registry → registry}/chat/chat-input/types.ts +0 -0
  395. /package/{cli/registry → registry}/chat/chat-input/useAutoResizeTextarea.ts +0 -0
  396. /package/{cli/registry → registry}/chat/code-block-part.tsx +0 -0
  397. /package/{cli/registry → registry}/chat/file-attachment.tsx +0 -0
  398. /package/{cli/registry → registry}/chat/file-card.tsx +0 -0
  399. /package/{cli/registry → registry}/chat/file-review-part.tsx +0 -0
  400. /package/{cli/registry → registry}/chat/folder-button.tsx +0 -0
  401. /package/{cli/registry → registry}/chat/generated-images-grid.tsx +0 -0
  402. /package/{cli/registry → registry}/chat/generation-status-bar.tsx +0 -0
  403. /package/{cli/registry → registry}/chat/hint-banner.tsx +0 -0
  404. /package/{cli/registry → registry}/chat/image-attachment.tsx +0 -0
  405. /package/{cli/registry → registry}/chat/image-generating.tsx +0 -0
  406. /package/{cli/registry → registry}/chat/mermaid-part.tsx +0 -0
  407. /package/{cli/registry → registry}/chat/permission-card.tsx +0 -0
  408. /package/{cli/registry → registry}/chat/plan-part.tsx +0 -0
  409. /package/{cli/registry → registry}/chat/queue-indicator.tsx +0 -0
  410. /package/{cli/registry → registry}/chat/reasoning-step/compound.tsx +0 -0
  411. /package/{cli/registry → registry}/chat/reasoning-step/context.tsx +0 -0
  412. /package/{cli/registry → registry}/chat/reasoning-step/index.tsx +0 -0
  413. /package/{cli/registry → registry}/chat/reasoning-step/types.ts +0 -0
  414. /package/{cli/registry → registry}/chat/related-prompts.tsx +0 -0
  415. /package/{cli/registry → registry}/chat/response/compound.tsx +0 -0
  416. /package/{cli/registry → registry}/chat/response/context.tsx +0 -0
  417. /package/{cli/registry → registry}/chat/response/index.tsx +0 -0
  418. /package/{cli/registry → registry}/chat/response/types.ts +0 -0
  419. /package/{cli/registry → registry}/chat/send-button.tsx +0 -0
  420. /package/{cli/registry → registry}/chat/streaming-markdown-block.tsx +0 -0
  421. /package/{cli/registry → registry}/chat/task-part.tsx +0 -0
  422. /package/{cli/registry → registry}/chat/terminal-code-block-part.tsx +0 -0
  423. /package/{cli/registry → registry}/chat/thinking-indicator.tsx +0 -0
  424. /package/{cli/registry → registry}/chat/user-message.tsx +0 -0
  425. /package/{cli/registry → registry}/chat/user-question/UserQuestionCard.tsx +0 -0
  426. /package/{cli/registry → registry}/chat/user-question/UserQuestionFooter.tsx +0 -0
  427. /package/{cli/registry → registry}/chat/user-question/UserQuestionHeader.tsx +0 -0
  428. /package/{cli/registry → registry}/chat/user-question/compound.tsx +0 -0
  429. /package/{cli/registry → registry}/chat/user-question/context.tsx +0 -0
  430. /package/{cli/registry → registry}/chat/user-question/index.tsx +0 -0
  431. /package/{cli/registry → registry}/chat/user-question/types.ts +0 -0
  432. /package/{cli/registry → registry}/chat/user-question/useUserQuestionKeyboard.ts +0 -0
  433. /package/{cli/registry → registry}/chat/user-question/useUserQuestionState.ts +0 -0
  434. /package/{cli/registry → registry}/chat/user-question-answer.tsx +0 -0
  435. /package/{cli/registry → registry}/lib/file-icon-maps.ts +0 -0
  436. /package/{cli/registry → registry}/lib/use-mermaid-render.ts +0 -0
  437. /package/{cli/registry → registry}/lib/utils.ts +0 -0
  438. /package/{cli/registry → registry}/tokens/index.css +0 -0
  439. /package/{cli/registry → registry}/tokens/scale/computed.css +0 -0
  440. /package/{cli/registry → registry}/tokens/scale/config.css +0 -0
  441. /package/{cli/registry → registry}/tokens/scale/index.css +0 -0
  442. /package/{cli/registry → registry}/tokens/scale/presets/compact.css +0 -0
  443. /package/{cli/registry → registry}/tokens/scale/presets/dense.css +0 -0
  444. /package/{cli/registry → registry}/tokens/scale/presets/sharp.css +0 -0
  445. /package/{cli/registry → registry}/tokens/scale/presets/soft.css +0 -0
  446. /package/{cli/registry → registry}/tokens/scale.css +0 -0
  447. /package/{cli/registry → registry}/tokens/scrollbar-utility.css +0 -0
  448. /package/{cli/registry → registry}/tokens/theme.css +0 -0
  449. /package/{cli/registry → registry}/tokens/themes/dark-parchment.css +0 -0
  450. /package/{cli/registry → registry}/tokens/themes/dark-qoder.css +0 -0
  451. /package/{cli/registry → registry}/tokens/themes/light-parchment.css +0 -0
  452. /package/{cli/registry → registry}/tokens/themes/light-qoder.css +0 -0
@@ -1,699 +0,0 @@
1
- import { p as Y } from "./chunk-4BX2VUAB-Czitj3Kc.js";
2
- import { I as K } from "./chunk-QZHKN3VN-AVEY9ImQ.js";
3
- import { q as U, p as V, s as X, g as J, a as Q, b as Z, _ as l, l as m, d as rr, u as er, C as tr, y as ar, k as C, D as sr, E as nr, F as or, c as cr, G as ir } from "./mermaid.core-gFR0XUlD.js";
4
- import { p as dr } from "./treemap-GDKQZRPO-B9sfERx8.js";
5
- var p = {
6
- NORMAL: 0,
7
- REVERSE: 1,
8
- HIGHLIGHT: 2,
9
- MERGE: 3,
10
- CHERRY_PICK: 4
11
- }, hr = nr.gitGraph, I = /* @__PURE__ */ l(() => sr({
12
- ...hr,
13
- ...or().gitGraph
14
- }), "getConfig"), c = new K(() => {
15
- const t = I(), r = t.mainBranchName, s = t.mainBranchOrder;
16
- return {
17
- mainBranchName: r,
18
- commits: /* @__PURE__ */ new Map(),
19
- head: null,
20
- branchConfig: /* @__PURE__ */ new Map([[r, { name: r, order: s }]]),
21
- branches: /* @__PURE__ */ new Map([[r, null]]),
22
- currBranch: r,
23
- direction: "LR",
24
- seq: 0,
25
- options: {}
26
- };
27
- });
28
- function A() {
29
- return ir({ length: 7 });
30
- }
31
- l(A, "getID");
32
- function F(t, r) {
33
- const s = /* @__PURE__ */ Object.create(null);
34
- return t.reduce((n, e) => {
35
- const a = r(e);
36
- return s[a] || (s[a] = !0, n.push(e)), n;
37
- }, []);
38
- }
39
- l(F, "uniqBy");
40
- var lr = /* @__PURE__ */ l(function(t) {
41
- c.records.direction = t;
42
- }, "setDirection"), $r = /* @__PURE__ */ l(function(t) {
43
- m.debug("options str", t), t = t?.trim(), t = t || "{}";
44
- try {
45
- c.records.options = JSON.parse(t);
46
- } catch (r) {
47
- m.error("error while parsing gitGraph options", r.message);
48
- }
49
- }, "setOptions"), fr = /* @__PURE__ */ l(function() {
50
- return c.records.options;
51
- }, "getOptions"), gr = /* @__PURE__ */ l(function(t) {
52
- let r = t.msg, s = t.id;
53
- const n = t.type;
54
- let e = t.tags;
55
- m.info("commit", r, s, n, e), m.debug("Entering commit:", r, s, n, e);
56
- const a = I();
57
- s = C.sanitizeText(s, a), r = C.sanitizeText(r, a), e = e?.map((o) => C.sanitizeText(o, a));
58
- const d = {
59
- id: s || c.records.seq + "-" + A(),
60
- message: r,
61
- seq: c.records.seq++,
62
- type: n ?? p.NORMAL,
63
- tags: e ?? [],
64
- parents: c.records.head == null ? [] : [c.records.head.id],
65
- branch: c.records.currBranch
66
- };
67
- c.records.head = d, m.info("main branch", a.mainBranchName), c.records.commits.has(d.id) && m.warn(`Commit ID ${d.id} already exists`), c.records.commits.set(d.id, d), c.records.branches.set(c.records.currBranch, d.id), m.debug("in pushCommit " + d.id);
68
- }, "commit"), yr = /* @__PURE__ */ l(function(t) {
69
- let r = t.name;
70
- const s = t.order;
71
- if (r = C.sanitizeText(r, I()), c.records.branches.has(r))
72
- throw new Error(
73
- `Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${r}")`
74
- );
75
- c.records.branches.set(r, c.records.head != null ? c.records.head.id : null), c.records.branchConfig.set(r, { name: r, order: s }), z(r), m.debug("in createBranch");
76
- }, "branch"), ur = /* @__PURE__ */ l((t) => {
77
- let r = t.branch, s = t.id;
78
- const n = t.type, e = t.tags, a = I();
79
- r = C.sanitizeText(r, a), s && (s = C.sanitizeText(s, a));
80
- const d = c.records.branches.get(c.records.currBranch), o = c.records.branches.get(r), f = d ? c.records.commits.get(d) : void 0, h = o ? c.records.commits.get(o) : void 0;
81
- if (f && h && f.branch === r)
82
- throw new Error(`Cannot merge branch '${r}' into itself.`);
83
- if (c.records.currBranch === r) {
84
- const i = new Error('Incorrect usage of "merge". Cannot merge a branch to itself');
85
- throw i.hash = {
86
- text: `merge ${r}`,
87
- token: `merge ${r}`,
88
- expected: ["branch abc"]
89
- }, i;
90
- }
91
- if (f === void 0 || !f) {
92
- const i = new Error(
93
- `Incorrect usage of "merge". Current branch (${c.records.currBranch})has no commits`
94
- );
95
- throw i.hash = {
96
- text: `merge ${r}`,
97
- token: `merge ${r}`,
98
- expected: ["commit"]
99
- }, i;
100
- }
101
- if (!c.records.branches.has(r)) {
102
- const i = new Error(
103
- 'Incorrect usage of "merge". Branch to be merged (' + r + ") does not exist"
104
- );
105
- throw i.hash = {
106
- text: `merge ${r}`,
107
- token: `merge ${r}`,
108
- expected: [`branch ${r}`]
109
- }, i;
110
- }
111
- if (h === void 0 || !h) {
112
- const i = new Error(
113
- 'Incorrect usage of "merge". Branch to be merged (' + r + ") has no commits"
114
- );
115
- throw i.hash = {
116
- text: `merge ${r}`,
117
- token: `merge ${r}`,
118
- expected: ['"commit"']
119
- }, i;
120
- }
121
- if (f === h) {
122
- const i = new Error('Incorrect usage of "merge". Both branches have same head');
123
- throw i.hash = {
124
- text: `merge ${r}`,
125
- token: `merge ${r}`,
126
- expected: ["branch abc"]
127
- }, i;
128
- }
129
- if (s && c.records.commits.has(s)) {
130
- const i = new Error(
131
- 'Incorrect usage of "merge". Commit with id:' + s + " already exists, use different custom id"
132
- );
133
- throw i.hash = {
134
- text: `merge ${r} ${s} ${n} ${e?.join(" ")}`,
135
- token: `merge ${r} ${s} ${n} ${e?.join(" ")}`,
136
- expected: [
137
- `merge ${r} ${s}_UNIQUE ${n} ${e?.join(" ")}`
138
- ]
139
- }, i;
140
- }
141
- const $ = o || "", g = {
142
- id: s || `${c.records.seq}-${A()}`,
143
- message: `merged branch ${r} into ${c.records.currBranch}`,
144
- seq: c.records.seq++,
145
- parents: c.records.head == null ? [] : [c.records.head.id, $],
146
- branch: c.records.currBranch,
147
- type: p.MERGE,
148
- customType: n,
149
- customId: !!s,
150
- tags: e ?? []
151
- };
152
- c.records.head = g, c.records.commits.set(g.id, g), c.records.branches.set(c.records.currBranch, g.id), m.debug(c.records.branches), m.debug("in mergeBranch");
153
- }, "merge"), xr = /* @__PURE__ */ l(function(t) {
154
- let r = t.id, s = t.targetId, n = t.tags, e = t.parent;
155
- m.debug("Entering cherryPick:", r, s, n);
156
- const a = I();
157
- if (r = C.sanitizeText(r, a), s = C.sanitizeText(s, a), n = n?.map((f) => C.sanitizeText(f, a)), e = C.sanitizeText(e, a), !r || !c.records.commits.has(r)) {
158
- const f = new Error(
159
- 'Incorrect usage of "cherryPick". Source commit id should exist and provided'
160
- );
161
- throw f.hash = {
162
- text: `cherryPick ${r} ${s}`,
163
- token: `cherryPick ${r} ${s}`,
164
- expected: ["cherry-pick abc"]
165
- }, f;
166
- }
167
- const d = c.records.commits.get(r);
168
- if (d === void 0 || !d)
169
- throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');
170
- if (e && !(Array.isArray(d.parents) && d.parents.includes(e)))
171
- throw new Error(
172
- "Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit."
173
- );
174
- const o = d.branch;
175
- if (d.type === p.MERGE && !e)
176
- throw new Error(
177
- "Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified."
178
- );
179
- if (!s || !c.records.commits.has(s)) {
180
- if (o === c.records.currBranch) {
181
- const g = new Error(
182
- 'Incorrect usage of "cherryPick". Source commit is already on current branch'
183
- );
184
- throw g.hash = {
185
- text: `cherryPick ${r} ${s}`,
186
- token: `cherryPick ${r} ${s}`,
187
- expected: ["cherry-pick abc"]
188
- }, g;
189
- }
190
- const f = c.records.branches.get(c.records.currBranch);
191
- if (f === void 0 || !f) {
192
- const g = new Error(
193
- `Incorrect usage of "cherry-pick". Current branch (${c.records.currBranch})has no commits`
194
- );
195
- throw g.hash = {
196
- text: `cherryPick ${r} ${s}`,
197
- token: `cherryPick ${r} ${s}`,
198
- expected: ["cherry-pick abc"]
199
- }, g;
200
- }
201
- const h = c.records.commits.get(f);
202
- if (h === void 0 || !h) {
203
- const g = new Error(
204
- `Incorrect usage of "cherry-pick". Current branch (${c.records.currBranch})has no commits`
205
- );
206
- throw g.hash = {
207
- text: `cherryPick ${r} ${s}`,
208
- token: `cherryPick ${r} ${s}`,
209
- expected: ["cherry-pick abc"]
210
- }, g;
211
- }
212
- const $ = {
213
- id: c.records.seq + "-" + A(),
214
- message: `cherry-picked ${d?.message} into ${c.records.currBranch}`,
215
- seq: c.records.seq++,
216
- parents: c.records.head == null ? [] : [c.records.head.id, d.id],
217
- branch: c.records.currBranch,
218
- type: p.CHERRY_PICK,
219
- tags: n ? n.filter(Boolean) : [
220
- `cherry-pick:${d.id}${d.type === p.MERGE ? `|parent:${e}` : ""}`
221
- ]
222
- };
223
- c.records.head = $, c.records.commits.set($.id, $), c.records.branches.set(c.records.currBranch, $.id), m.debug(c.records.branches), m.debug("in cherryPick");
224
- }
225
- }, "cherryPick"), z = /* @__PURE__ */ l(function(t) {
226
- if (t = C.sanitizeText(t, I()), c.records.branches.has(t)) {
227
- c.records.currBranch = t;
228
- const r = c.records.branches.get(c.records.currBranch);
229
- r === void 0 || !r ? c.records.head = null : c.records.head = c.records.commits.get(r) ?? null;
230
- } else {
231
- const r = new Error(
232
- `Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`
233
- );
234
- throw r.hash = {
235
- text: `checkout ${t}`,
236
- token: `checkout ${t}`,
237
- expected: [`branch ${t}`]
238
- }, r;
239
- }
240
- }, "checkout");
241
- function H(t, r, s) {
242
- const n = t.indexOf(r);
243
- n === -1 ? t.push(s) : t.splice(n, 1, s);
244
- }
245
- l(H, "upsert");
246
- function P(t) {
247
- const r = t.reduce((e, a) => e.seq > a.seq ? e : a, t[0]);
248
- let s = "";
249
- t.forEach(function(e) {
250
- e === r ? s += " *" : s += " |";
251
- });
252
- const n = [s, r.id, r.seq];
253
- for (const e in c.records.branches)
254
- c.records.branches.get(e) === r.id && n.push(e);
255
- if (m.debug(n.join(" ")), r.parents && r.parents.length == 2 && r.parents[0] && r.parents[1]) {
256
- const e = c.records.commits.get(r.parents[0]);
257
- H(t, r, e), r.parents[1] && t.push(c.records.commits.get(r.parents[1]));
258
- } else {
259
- if (r.parents.length == 0)
260
- return;
261
- if (r.parents[0]) {
262
- const e = c.records.commits.get(r.parents[0]);
263
- H(t, r, e);
264
- }
265
- }
266
- t = F(t, (e) => e.id), P(t);
267
- }
268
- l(P, "prettyPrintCommitHistory");
269
- var pr = /* @__PURE__ */ l(function() {
270
- m.debug(c.records.commits);
271
- const t = N()[0];
272
- P([t]);
273
- }, "prettyPrint"), mr = /* @__PURE__ */ l(function() {
274
- c.reset(), ar();
275
- }, "clear"), br = /* @__PURE__ */ l(function() {
276
- return [...c.records.branchConfig.values()].map((r, s) => r.order !== null && r.order !== void 0 ? r : {
277
- ...r,
278
- order: parseFloat(`0.${s}`)
279
- }).sort((r, s) => (r.order ?? 0) - (s.order ?? 0)).map(({ name: r }) => ({ name: r }));
280
- }, "getBranchesAsObjArray"), wr = /* @__PURE__ */ l(function() {
281
- return c.records.branches;
282
- }, "getBranches"), vr = /* @__PURE__ */ l(function() {
283
- return c.records.commits;
284
- }, "getCommits"), N = /* @__PURE__ */ l(function() {
285
- const t = [...c.records.commits.values()];
286
- return t.forEach(function(r) {
287
- m.debug(r.id);
288
- }), t.sort((r, s) => r.seq - s.seq), t;
289
- }, "getCommitsArray"), Cr = /* @__PURE__ */ l(function() {
290
- return c.records.currBranch;
291
- }, "getCurrentBranch"), Er = /* @__PURE__ */ l(function() {
292
- return c.records.direction;
293
- }, "getDirection"), Tr = /* @__PURE__ */ l(function() {
294
- return c.records.head;
295
- }, "getHead"), S = {
296
- commitType: p,
297
- getConfig: I,
298
- setDirection: lr,
299
- setOptions: $r,
300
- getOptions: fr,
301
- commit: gr,
302
- branch: yr,
303
- merge: ur,
304
- cherryPick: xr,
305
- checkout: z,
306
- //reset,
307
- prettyPrint: pr,
308
- clear: mr,
309
- getBranchesAsObjArray: br,
310
- getBranches: wr,
311
- getCommits: vr,
312
- getCommitsArray: N,
313
- getCurrentBranch: Cr,
314
- getDirection: Er,
315
- getHead: Tr,
316
- setAccTitle: Z,
317
- getAccTitle: Q,
318
- getAccDescription: J,
319
- setAccDescription: X,
320
- setDiagramTitle: V,
321
- getDiagramTitle: U
322
- }, Br = /* @__PURE__ */ l((t, r) => {
323
- Y(t, r), t.dir && r.setDirection(t.dir);
324
- for (const s of t.statements)
325
- Lr(s, r);
326
- }, "populate"), Lr = /* @__PURE__ */ l((t, r) => {
327
- const n = {
328
- Commit: /* @__PURE__ */ l((e) => r.commit(kr(e)), "Commit"),
329
- Branch: /* @__PURE__ */ l((e) => r.branch(Mr(e)), "Branch"),
330
- Merge: /* @__PURE__ */ l((e) => r.merge(Ir(e)), "Merge"),
331
- Checkout: /* @__PURE__ */ l((e) => r.checkout(Rr(e)), "Checkout"),
332
- CherryPicking: /* @__PURE__ */ l((e) => r.cherryPick(Gr(e)), "CherryPicking")
333
- }[t.$type];
334
- n ? n(t) : m.error(`Unknown statement type: ${t.$type}`);
335
- }, "parseStatement"), kr = /* @__PURE__ */ l((t) => ({
336
- id: t.id,
337
- msg: t.message ?? "",
338
- type: t.type !== void 0 ? p[t.type] : p.NORMAL,
339
- tags: t.tags ?? void 0
340
- }), "parseCommit"), Mr = /* @__PURE__ */ l((t) => ({
341
- name: t.name,
342
- order: t.order ?? 0
343
- }), "parseBranch"), Ir = /* @__PURE__ */ l((t) => ({
344
- branch: t.branch,
345
- id: t.id ?? "",
346
- type: t.type !== void 0 ? p[t.type] : void 0,
347
- tags: t.tags ?? void 0
348
- }), "parseMerge"), Rr = /* @__PURE__ */ l((t) => t.branch, "parseCheckout"), Gr = /* @__PURE__ */ l((t) => ({
349
- id: t.id,
350
- targetId: "",
351
- tags: t.tags?.length === 0 ? void 0 : t.tags,
352
- parent: t.parent
353
- }), "parseCherryPicking"), Or = {
354
- parse: /* @__PURE__ */ l(async (t) => {
355
- const r = await dr("gitGraph", t);
356
- m.debug(r), Br(r, S);
357
- }, "parse")
358
- }, qr = cr(), v = qr?.gitGraph, L = 10, k = 40, E = 4, T = 2, M = 8, b = /* @__PURE__ */ new Map(), w = /* @__PURE__ */ new Map(), O = 30, R = /* @__PURE__ */ new Map(), q = [], B = 0, u = "LR", Ar = /* @__PURE__ */ l(() => {
359
- b.clear(), w.clear(), R.clear(), B = 0, q = [], u = "LR";
360
- }, "clear"), W = /* @__PURE__ */ l((t) => {
361
- const r = document.createElementNS("http://www.w3.org/2000/svg", "text");
362
- return (typeof t == "string" ? t.split(/\\n|\n|<br\s*\/?>/gi) : t).forEach((n) => {
363
- const e = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
364
- e.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), e.setAttribute("dy", "1em"), e.setAttribute("x", "0"), e.setAttribute("class", "row"), e.textContent = n.trim(), r.appendChild(e);
365
- }), r;
366
- }, "drawText"), j = /* @__PURE__ */ l((t) => {
367
- let r, s, n;
368
- return u === "BT" ? (s = /* @__PURE__ */ l((e, a) => e <= a, "comparisonFunc"), n = 1 / 0) : (s = /* @__PURE__ */ l((e, a) => e >= a, "comparisonFunc"), n = 0), t.forEach((e) => {
369
- const a = u === "TB" || u == "BT" ? w.get(e)?.y : w.get(e)?.x;
370
- a !== void 0 && s(a, n) && (r = e, n = a);
371
- }), r;
372
- }, "findClosestParent"), _r = /* @__PURE__ */ l((t) => {
373
- let r = "", s = 1 / 0;
374
- return t.forEach((n) => {
375
- const e = w.get(n).y;
376
- e <= s && (r = n, s = e);
377
- }), r || void 0;
378
- }, "findClosestParentBT"), Hr = /* @__PURE__ */ l((t, r, s) => {
379
- let n = s, e = s;
380
- const a = [];
381
- t.forEach((d) => {
382
- const o = r.get(d);
383
- if (!o)
384
- throw new Error(`Commit not found for key ${d}`);
385
- o.parents.length ? (n = Dr(o), e = Math.max(n, e)) : a.push(o), Fr(o, n);
386
- }), n = e, a.forEach((d) => {
387
- zr(d, n, s);
388
- }), t.forEach((d) => {
389
- const o = r.get(d);
390
- if (o?.parents.length) {
391
- const f = _r(o.parents);
392
- n = w.get(f).y - k, n <= e && (e = n);
393
- const h = b.get(o.branch).pos, $ = n - L;
394
- w.set(o.id, { x: h, y: $ });
395
- }
396
- });
397
- }, "setParallelBTPos"), Pr = /* @__PURE__ */ l((t) => {
398
- const r = j(t.parents.filter((n) => n !== null));
399
- if (!r)
400
- throw new Error(`Closest parent not found for commit ${t.id}`);
401
- const s = w.get(r)?.y;
402
- if (s === void 0)
403
- throw new Error(`Closest parent position not found for commit ${t.id}`);
404
- return s;
405
- }, "findClosestParentPos"), Dr = /* @__PURE__ */ l((t) => Pr(t) + k, "calculateCommitPosition"), Fr = /* @__PURE__ */ l((t, r) => {
406
- const s = b.get(t.branch);
407
- if (!s)
408
- throw new Error(`Branch not found for commit ${t.id}`);
409
- const n = s.pos, e = r + L;
410
- return w.set(t.id, { x: n, y: e }), { x: n, y: e };
411
- }, "setCommitPosition"), zr = /* @__PURE__ */ l((t, r, s) => {
412
- const n = b.get(t.branch);
413
- if (!n)
414
- throw new Error(`Branch not found for commit ${t.id}`);
415
- const e = r + s, a = n.pos;
416
- w.set(t.id, { x: a, y: e });
417
- }, "setRootPosition"), Nr = /* @__PURE__ */ l((t, r, s, n, e, a) => {
418
- if (a === p.HIGHLIGHT)
419
- t.append("rect").attr("x", s.x - 10).attr("y", s.y - 10).attr("width", 20).attr("height", 20).attr(
420
- "class",
421
- `commit ${r.id} commit-highlight${e % M} ${n}-outer`
422
- ), t.append("rect").attr("x", s.x - 6).attr("y", s.y - 6).attr("width", 12).attr("height", 12).attr(
423
- "class",
424
- `commit ${r.id} commit${e % M} ${n}-inner`
425
- );
426
- else if (a === p.CHERRY_PICK)
427
- t.append("circle").attr("cx", s.x).attr("cy", s.y).attr("r", 10).attr("class", `commit ${r.id} ${n}`), t.append("circle").attr("cx", s.x - 3).attr("cy", s.y + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${r.id} ${n}`), t.append("circle").attr("cx", s.x + 3).attr("cy", s.y + 2).attr("r", 2.75).attr("fill", "#fff").attr("class", `commit ${r.id} ${n}`), t.append("line").attr("x1", s.x + 3).attr("y1", s.y + 1).attr("x2", s.x).attr("y2", s.y - 5).attr("stroke", "#fff").attr("class", `commit ${r.id} ${n}`), t.append("line").attr("x1", s.x - 3).attr("y1", s.y + 1).attr("x2", s.x).attr("y2", s.y - 5).attr("stroke", "#fff").attr("class", `commit ${r.id} ${n}`);
428
- else {
429
- const d = t.append("circle");
430
- if (d.attr("cx", s.x), d.attr("cy", s.y), d.attr("r", r.type === p.MERGE ? 9 : 10), d.attr("class", `commit ${r.id} commit${e % M}`), a === p.MERGE) {
431
- const o = t.append("circle");
432
- o.attr("cx", s.x), o.attr("cy", s.y), o.attr("r", 6), o.attr(
433
- "class",
434
- `commit ${n} ${r.id} commit${e % M}`
435
- );
436
- }
437
- a === p.REVERSE && t.append("path").attr(
438
- "d",
439
- `M ${s.x - 5},${s.y - 5}L${s.x + 5},${s.y + 5}M${s.x - 5},${s.y + 5}L${s.x + 5},${s.y - 5}`
440
- ).attr("class", `commit ${n} ${r.id} commit${e % M}`);
441
- }
442
- }, "drawCommitBullet"), Sr = /* @__PURE__ */ l((t, r, s, n) => {
443
- if (r.type !== p.CHERRY_PICK && (r.customId && r.type === p.MERGE || r.type !== p.MERGE) && v?.showCommitLabel) {
444
- const e = t.append("g"), a = e.insert("rect").attr("class", "commit-label-bkg"), d = e.append("text").attr("x", n).attr("y", s.y + 25).attr("class", "commit-label").text(r.id), o = d.node()?.getBBox();
445
- if (o && (a.attr("x", s.posWithOffset - o.width / 2 - T).attr("y", s.y + 13.5).attr("width", o.width + 2 * T).attr("height", o.height + 2 * T), u === "TB" || u === "BT" ? (a.attr("x", s.x - (o.width + 4 * E + 5)).attr("y", s.y - 12), d.attr("x", s.x - (o.width + 4 * E)).attr("y", s.y + o.height - 12)) : d.attr("x", s.posWithOffset - o.width / 2), v.rotateCommitLabel))
446
- if (u === "TB" || u === "BT")
447
- d.attr(
448
- "transform",
449
- "rotate(-45, " + s.x + ", " + s.y + ")"
450
- ), a.attr(
451
- "transform",
452
- "rotate(-45, " + s.x + ", " + s.y + ")"
453
- );
454
- else {
455
- const f = -7.5 - (o.width + 10) / 25 * 9.5, h = 10 + o.width / 25 * 8.5;
456
- e.attr(
457
- "transform",
458
- "translate(" + f + ", " + h + ") rotate(-45, " + n + ", " + s.y + ")"
459
- );
460
- }
461
- }
462
- }, "drawCommitLabel"), Wr = /* @__PURE__ */ l((t, r, s, n) => {
463
- if (r.tags.length > 0) {
464
- let e = 0, a = 0, d = 0;
465
- const o = [];
466
- for (const f of r.tags.reverse()) {
467
- const h = t.insert("polygon"), $ = t.append("circle"), g = t.append("text").attr("y", s.y - 16 - e).attr("class", "tag-label").text(f), i = g.node()?.getBBox();
468
- if (!i)
469
- throw new Error("Tag bbox not found");
470
- a = Math.max(a, i.width), d = Math.max(d, i.height), g.attr("x", s.posWithOffset - i.width / 2), o.push({
471
- tag: g,
472
- hole: $,
473
- rect: h,
474
- yOffset: e
475
- }), e += 20;
476
- }
477
- for (const { tag: f, hole: h, rect: $, yOffset: g } of o) {
478
- const i = d / 2, y = s.y - 19.2 - g;
479
- if ($.attr("class", "tag-label-bkg").attr(
480
- "points",
481
- `
482
- ${n - a / 2 - E / 2},${y + T}
483
- ${n - a / 2 - E / 2},${y - T}
484
- ${s.posWithOffset - a / 2 - E},${y - i - T}
485
- ${s.posWithOffset + a / 2 + E},${y - i - T}
486
- ${s.posWithOffset + a / 2 + E},${y + i + T}
487
- ${s.posWithOffset - a / 2 - E},${y + i + T}`
488
- ), h.attr("cy", y).attr("cx", n - a / 2 + E / 2).attr("r", 1.5).attr("class", "tag-hole"), u === "TB" || u === "BT") {
489
- const x = n + g;
490
- $.attr("class", "tag-label-bkg").attr(
491
- "points",
492
- `
493
- ${s.x},${x + 2}
494
- ${s.x},${x - 2}
495
- ${s.x + L},${x - i - 2}
496
- ${s.x + L + a + 4},${x - i - 2}
497
- ${s.x + L + a + 4},${x + i + 2}
498
- ${s.x + L},${x + i + 2}`
499
- ).attr("transform", "translate(12,12) rotate(45, " + s.x + "," + n + ")"), h.attr("cx", s.x + E / 2).attr("cy", x).attr("transform", "translate(12,12) rotate(45, " + s.x + "," + n + ")"), f.attr("x", s.x + 5).attr("y", x + 3).attr("transform", "translate(14,14) rotate(45, " + s.x + "," + n + ")");
500
- }
501
- }
502
- }
503
- }, "drawCommitTags"), jr = /* @__PURE__ */ l((t) => {
504
- switch (t.customType ?? t.type) {
505
- case p.NORMAL:
506
- return "commit-normal";
507
- case p.REVERSE:
508
- return "commit-reverse";
509
- case p.HIGHLIGHT:
510
- return "commit-highlight";
511
- case p.MERGE:
512
- return "commit-merge";
513
- case p.CHERRY_PICK:
514
- return "commit-cherry-pick";
515
- default:
516
- return "commit-normal";
517
- }
518
- }, "getCommitClassType"), Yr = /* @__PURE__ */ l((t, r, s, n) => {
519
- const e = { x: 0, y: 0 };
520
- if (t.parents.length > 0) {
521
- const a = j(t.parents);
522
- if (a) {
523
- const d = n.get(a) ?? e;
524
- return r === "TB" ? d.y + k : r === "BT" ? (n.get(t.id) ?? e).y - k : d.x + k;
525
- }
526
- } else
527
- return r === "TB" ? O : r === "BT" ? (n.get(t.id) ?? e).y - k : 0;
528
- return 0;
529
- }, "calculatePosition"), Kr = /* @__PURE__ */ l((t, r, s) => {
530
- const n = u === "BT" && s ? r : r + L, e = u === "TB" || u === "BT" ? n : b.get(t.branch)?.pos, a = u === "TB" || u === "BT" ? b.get(t.branch)?.pos : n;
531
- if (a === void 0 || e === void 0)
532
- throw new Error(`Position were undefined for commit ${t.id}`);
533
- return { x: a, y: e, posWithOffset: n };
534
- }, "getCommitPosition"), D = /* @__PURE__ */ l((t, r, s) => {
535
- if (!v)
536
- throw new Error("GitGraph config not found");
537
- const n = t.append("g").attr("class", "commit-bullets"), e = t.append("g").attr("class", "commit-labels");
538
- let a = u === "TB" || u === "BT" ? O : 0;
539
- const d = [...r.keys()], o = v?.parallelCommits ?? !1, f = /* @__PURE__ */ l(($, g) => {
540
- const i = r.get($)?.seq, y = r.get(g)?.seq;
541
- return i !== void 0 && y !== void 0 ? i - y : 0;
542
- }, "sortKeys");
543
- let h = d.sort(f);
544
- u === "BT" && (o && Hr(h, r, a), h = h.reverse()), h.forEach(($) => {
545
- const g = r.get($);
546
- if (!g)
547
- throw new Error(`Commit not found for key ${$}`);
548
- o && (a = Yr(g, u, a, w));
549
- const i = Kr(g, a, o);
550
- if (s) {
551
- const y = jr(g), x = g.customType ?? g.type, _ = b.get(g.branch)?.index ?? 0;
552
- Nr(n, g, i, y, _, x), Sr(e, g, i, a), Wr(e, g, i, a);
553
- }
554
- u === "TB" || u === "BT" ? w.set(g.id, { x: i.x, y: i.posWithOffset }) : w.set(g.id, { x: i.posWithOffset, y: i.y }), a = u === "BT" && o ? a + k : a + k + L, a > B && (B = a);
555
- });
556
- }, "drawCommits"), Ur = /* @__PURE__ */ l((t, r, s, n, e) => {
557
- const d = (u === "TB" || u === "BT" ? s.x < n.x : s.y < n.y) ? r.branch : t.branch, o = /* @__PURE__ */ l((h) => h.branch === d, "isOnBranchToGetCurve"), f = /* @__PURE__ */ l((h) => h.seq > t.seq && h.seq < r.seq, "isBetweenCommits");
558
- return [...e.values()].some((h) => f(h) && o(h));
559
- }, "shouldRerouteArrow"), G = /* @__PURE__ */ l((t, r, s = 0) => {
560
- const n = t + Math.abs(t - r) / 2;
561
- if (s > 5)
562
- return n;
563
- if (q.every((d) => Math.abs(d - n) >= 10))
564
- return q.push(n), n;
565
- const a = Math.abs(t - r);
566
- return G(t, r - a / 5, s + 1);
567
- }, "findLane"), Vr = /* @__PURE__ */ l((t, r, s, n) => {
568
- const e = w.get(r.id), a = w.get(s.id);
569
- if (e === void 0 || a === void 0)
570
- throw new Error(`Commit positions not found for commits ${r.id} and ${s.id}`);
571
- const d = Ur(r, s, e, a, n);
572
- let o = "", f = "", h = 0, $ = 0, g = b.get(s.branch)?.index;
573
- s.type === p.MERGE && r.id !== s.parents[0] && (g = b.get(r.branch)?.index);
574
- let i;
575
- if (d) {
576
- o = "A 10 10, 0, 0, 0,", f = "A 10 10, 0, 0, 1,", h = 10, $ = 10;
577
- const y = e.y < a.y ? G(e.y, a.y) : G(a.y, e.y), x = e.x < a.x ? G(e.x, a.x) : G(a.x, e.x);
578
- u === "TB" ? e.x < a.x ? i = `M ${e.x} ${e.y} L ${x - h} ${e.y} ${f} ${x} ${e.y + $} L ${x} ${a.y - h} ${o} ${x + $} ${a.y} L ${a.x} ${a.y}` : (g = b.get(r.branch)?.index, i = `M ${e.x} ${e.y} L ${x + h} ${e.y} ${o} ${x} ${e.y + $} L ${x} ${a.y - h} ${f} ${x - $} ${a.y} L ${a.x} ${a.y}`) : u === "BT" ? e.x < a.x ? i = `M ${e.x} ${e.y} L ${x - h} ${e.y} ${o} ${x} ${e.y - $} L ${x} ${a.y + h} ${f} ${x + $} ${a.y} L ${a.x} ${a.y}` : (g = b.get(r.branch)?.index, i = `M ${e.x} ${e.y} L ${x + h} ${e.y} ${f} ${x} ${e.y - $} L ${x} ${a.y + h} ${o} ${x - $} ${a.y} L ${a.x} ${a.y}`) : e.y < a.y ? i = `M ${e.x} ${e.y} L ${e.x} ${y - h} ${o} ${e.x + $} ${y} L ${a.x - h} ${y} ${f} ${a.x} ${y + $} L ${a.x} ${a.y}` : (g = b.get(r.branch)?.index, i = `M ${e.x} ${e.y} L ${e.x} ${y + h} ${f} ${e.x + $} ${y} L ${a.x - h} ${y} ${o} ${a.x} ${y - $} L ${a.x} ${a.y}`);
579
- } else
580
- o = "A 20 20, 0, 0, 0,", f = "A 20 20, 0, 0, 1,", h = 20, $ = 20, u === "TB" ? (e.x < a.x && (s.type === p.MERGE && r.id !== s.parents[0] ? i = `M ${e.x} ${e.y} L ${e.x} ${a.y - h} ${o} ${e.x + $} ${a.y} L ${a.x} ${a.y}` : i = `M ${e.x} ${e.y} L ${a.x - h} ${e.y} ${f} ${a.x} ${e.y + $} L ${a.x} ${a.y}`), e.x > a.x && (o = "A 20 20, 0, 0, 0,", f = "A 20 20, 0, 0, 1,", h = 20, $ = 20, s.type === p.MERGE && r.id !== s.parents[0] ? i = `M ${e.x} ${e.y} L ${e.x} ${a.y - h} ${f} ${e.x - $} ${a.y} L ${a.x} ${a.y}` : i = `M ${e.x} ${e.y} L ${a.x + h} ${e.y} ${o} ${a.x} ${e.y + $} L ${a.x} ${a.y}`), e.x === a.x && (i = `M ${e.x} ${e.y} L ${a.x} ${a.y}`)) : u === "BT" ? (e.x < a.x && (s.type === p.MERGE && r.id !== s.parents[0] ? i = `M ${e.x} ${e.y} L ${e.x} ${a.y + h} ${f} ${e.x + $} ${a.y} L ${a.x} ${a.y}` : i = `M ${e.x} ${e.y} L ${a.x - h} ${e.y} ${o} ${a.x} ${e.y - $} L ${a.x} ${a.y}`), e.x > a.x && (o = "A 20 20, 0, 0, 0,", f = "A 20 20, 0, 0, 1,", h = 20, $ = 20, s.type === p.MERGE && r.id !== s.parents[0] ? i = `M ${e.x} ${e.y} L ${e.x} ${a.y + h} ${o} ${e.x - $} ${a.y} L ${a.x} ${a.y}` : i = `M ${e.x} ${e.y} L ${a.x - h} ${e.y} ${o} ${a.x} ${e.y - $} L ${a.x} ${a.y}`), e.x === a.x && (i = `M ${e.x} ${e.y} L ${a.x} ${a.y}`)) : (e.y < a.y && (s.type === p.MERGE && r.id !== s.parents[0] ? i = `M ${e.x} ${e.y} L ${a.x - h} ${e.y} ${f} ${a.x} ${e.y + $} L ${a.x} ${a.y}` : i = `M ${e.x} ${e.y} L ${e.x} ${a.y - h} ${o} ${e.x + $} ${a.y} L ${a.x} ${a.y}`), e.y > a.y && (s.type === p.MERGE && r.id !== s.parents[0] ? i = `M ${e.x} ${e.y} L ${a.x - h} ${e.y} ${o} ${a.x} ${e.y - $} L ${a.x} ${a.y}` : i = `M ${e.x} ${e.y} L ${e.x} ${a.y + h} ${f} ${e.x + $} ${a.y} L ${a.x} ${a.y}`), e.y === a.y && (i = `M ${e.x} ${e.y} L ${a.x} ${a.y}`));
581
- if (i === void 0)
582
- throw new Error("Line definition not found");
583
- t.append("path").attr("d", i).attr("class", "arrow arrow" + g % M);
584
- }, "drawArrow"), Xr = /* @__PURE__ */ l((t, r) => {
585
- const s = t.append("g").attr("class", "commit-arrows");
586
- [...r.keys()].forEach((n) => {
587
- const e = r.get(n);
588
- e.parents && e.parents.length > 0 && e.parents.forEach((a) => {
589
- Vr(s, r.get(a), e, r);
590
- });
591
- });
592
- }, "drawArrows"), Jr = /* @__PURE__ */ l((t, r) => {
593
- const s = t.append("g");
594
- r.forEach((n, e) => {
595
- const a = e % M, d = b.get(n.name)?.pos;
596
- if (d === void 0)
597
- throw new Error(`Position not found for branch ${n.name}`);
598
- const o = s.append("line");
599
- o.attr("x1", 0), o.attr("y1", d), o.attr("x2", B), o.attr("y2", d), o.attr("class", "branch branch" + a), u === "TB" ? (o.attr("y1", O), o.attr("x1", d), o.attr("y2", B), o.attr("x2", d)) : u === "BT" && (o.attr("y1", B), o.attr("x1", d), o.attr("y2", O), o.attr("x2", d)), q.push(d);
600
- const f = n.name, h = W(f), $ = s.insert("rect"), i = s.insert("g").attr("class", "branchLabel").insert("g").attr("class", "label branch-label" + a);
601
- i.node().appendChild(h);
602
- const y = h.getBBox();
603
- $.attr("class", "branchLabelBkg label" + a).attr("rx", 4).attr("ry", 4).attr("x", -y.width - 4 - (v?.rotateCommitLabel === !0 ? 30 : 0)).attr("y", -y.height / 2 + 8).attr("width", y.width + 18).attr("height", y.height + 4), i.attr(
604
- "transform",
605
- "translate(" + (-y.width - 14 - (v?.rotateCommitLabel === !0 ? 30 : 0)) + ", " + (d - y.height / 2 - 1) + ")"
606
- ), u === "TB" ? ($.attr("x", d - y.width / 2 - 10).attr("y", 0), i.attr("transform", "translate(" + (d - y.width / 2 - 5) + ", 0)")) : u === "BT" ? ($.attr("x", d - y.width / 2 - 10).attr("y", B), i.attr("transform", "translate(" + (d - y.width / 2 - 5) + ", " + B + ")")) : $.attr("transform", "translate(-19, " + (d - y.height / 2) + ")");
607
- });
608
- }, "drawBranches"), Qr = /* @__PURE__ */ l(function(t, r, s, n, e) {
609
- return b.set(t, { pos: r, index: s }), r += 50 + (e ? 40 : 0) + (u === "TB" || u === "BT" ? n.width / 2 : 0), r;
610
- }, "setBranchPosition"), Zr = /* @__PURE__ */ l(function(t, r, s, n) {
611
- if (Ar(), m.debug("in gitgraph renderer", t + `
612
- `, "id:", r, s), !v)
613
- throw new Error("GitGraph config not found");
614
- const e = v.rotateCommitLabel ?? !1, a = n.db;
615
- R = a.getCommits();
616
- const d = a.getBranchesAsObjArray();
617
- u = a.getDirection();
618
- const o = rr(`[id="${r}"]`);
619
- let f = 0;
620
- d.forEach((h, $) => {
621
- const g = W(h.name), i = o.append("g"), y = i.insert("g").attr("class", "branchLabel"), x = y.insert("g").attr("class", "label branch-label");
622
- x.node()?.appendChild(g);
623
- const _ = g.getBBox();
624
- f = Qr(h.name, f, $, _, e), x.remove(), y.remove(), i.remove();
625
- }), D(o, R, !1), v.showBranches && Jr(o, d), Xr(o, R), D(o, R, !0), er.insertTitle(
626
- o,
627
- "gitTitleText",
628
- v.titleTopMargin ?? 0,
629
- a.getDiagramTitle()
630
- ), tr(
631
- void 0,
632
- o,
633
- v.diagramPadding,
634
- v.useMaxWidth
635
- );
636
- }, "draw"), re = {
637
- draw: Zr
638
- }, ee = /* @__PURE__ */ l((t) => `
639
- .commit-id,
640
- .commit-msg,
641
- .branch-label {
642
- fill: lightgrey;
643
- color: lightgrey;
644
- font-family: 'trebuchet ms', verdana, arial, sans-serif;
645
- font-family: var(--mermaid-font-family);
646
- }
647
- ${[0, 1, 2, 3, 4, 5, 6, 7].map(
648
- (r) => `
649
- .branch-label${r} { fill: ${t["gitBranchLabel" + r]}; }
650
- .commit${r} { stroke: ${t["git" + r]}; fill: ${t["git" + r]}; }
651
- .commit-highlight${r} { stroke: ${t["gitInv" + r]}; fill: ${t["gitInv" + r]}; }
652
- .label${r} { fill: ${t["git" + r]}; }
653
- .arrow${r} { stroke: ${t["git" + r]}; }
654
- `
655
- ).join(`
656
- `)}
657
-
658
- .branch {
659
- stroke-width: 1;
660
- stroke: ${t.lineColor};
661
- stroke-dasharray: 2;
662
- }
663
- .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}
664
- .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }
665
- .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}
666
- .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }
667
- .tag-hole { fill: ${t.textColor}; }
668
-
669
- .commit-merge {
670
- stroke: ${t.primaryColor};
671
- fill: ${t.primaryColor};
672
- }
673
- .commit-reverse {
674
- stroke: ${t.primaryColor};
675
- fill: ${t.primaryColor};
676
- stroke-width: 3;
677
- }
678
- .commit-highlight-outer {
679
- }
680
- .commit-highlight-inner {
681
- stroke: ${t.primaryColor};
682
- fill: ${t.primaryColor};
683
- }
684
-
685
- .arrow { stroke-width: 8; stroke-linecap: round; fill: none}
686
- .gitTitleText {
687
- text-anchor: middle;
688
- font-size: 18px;
689
- fill: ${t.textColor};
690
- }
691
- `, "getStyles"), te = ee, ce = {
692
- parser: Or,
693
- db: S,
694
- renderer: re,
695
- styles: te
696
- };
697
- export {
698
- ce as diagram
699
- };