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,444 +0,0 @@
1
- import { _ as w, ar as F, as as Y, at as _, au as H, l as r, c as V, av as z, aw as U, ag as $, al as q, ah as P, af as K, ax as Q, ay as W, az as Z } from "./mermaid.core-gFR0XUlD.js";
2
- import { G as B } from "./graph-DPcK91G3.js";
3
- import { l as I } from "./layout-CdLdvj1j.js";
4
- import { i as b } from "./_baseUniq-B-N2NQ50.js";
5
- import { c as L } from "./clone-Cde_NQ8V.js";
6
- import { m as A } from "./_basePickBy-DnQN8w3y.js";
7
- function h(e) {
8
- var t = {
9
- options: {
10
- directed: e.isDirected(),
11
- multigraph: e.isMultigraph(),
12
- compound: e.isCompound()
13
- },
14
- nodes: ee(e),
15
- edges: ne(e)
16
- };
17
- return b(e.graph()) || (t.value = L(e.graph())), t;
18
- }
19
- function ee(e) {
20
- return A(e.nodes(), function(t) {
21
- var n = e.node(t), a = e.parent(t), i = { v: t };
22
- return b(n) || (i.value = n), b(a) || (i.parent = a), i;
23
- });
24
- }
25
- function ne(e) {
26
- return A(e.edges(), function(t) {
27
- var n = e.edge(t), a = { v: t.v, w: t.w };
28
- return b(t.name) || (a.name = t.name), b(n) || (a.value = n), a;
29
- });
30
- }
31
- var d = /* @__PURE__ */ new Map(), y = /* @__PURE__ */ new Map(), J = /* @__PURE__ */ new Map(), te = /* @__PURE__ */ w(() => {
32
- y.clear(), J.clear(), d.clear();
33
- }, "clear"), D = /* @__PURE__ */ w((e, t) => {
34
- const n = y.get(t) || [];
35
- return r.trace("In isDescendant", t, " ", e, " = ", n.includes(e)), n.includes(e);
36
- }, "isDescendant"), se = /* @__PURE__ */ w((e, t) => {
37
- const n = y.get(t) || [];
38
- return r.info("Descendants of ", t, " is ", n), r.info("Edge is ", e), e.v === t || e.w === t ? !1 : n ? n.includes(e.v) || D(e.v, t) || D(e.w, t) || n.includes(e.w) : (r.debug("Tilt, ", t, ",not in descendants"), !1);
39
- }, "edgeInCluster"), G = /* @__PURE__ */ w((e, t, n, a) => {
40
- r.warn(
41
- "Copying children of ",
42
- e,
43
- "root",
44
- a,
45
- "data",
46
- t.node(e),
47
- a
48
- );
49
- const i = t.children(e) || [];
50
- e !== a && i.push(e), r.warn("Copying (nodes) clusterId", e, "nodes", i), i.forEach((o) => {
51
- if (t.children(o).length > 0)
52
- G(o, t, n, a);
53
- else {
54
- const l = t.node(o);
55
- r.info("cp ", o, " to ", a, " with parent ", e), n.setNode(o, l), a !== t.parent(o) && (r.warn("Setting parent", o, t.parent(o)), n.setParent(o, t.parent(o))), e !== a && o !== e ? (r.debug("Setting parent", o, e), n.setParent(o, e)) : (r.info("In copy ", e, "root", a, "data", t.node(e), a), r.debug(
56
- "Not Setting parent for node=",
57
- o,
58
- "cluster!==rootId",
59
- e !== a,
60
- "node!==clusterId",
61
- o !== e
62
- ));
63
- const u = t.edges(o);
64
- r.debug("Copying Edges", u), u.forEach((c) => {
65
- r.info("Edge", c);
66
- const m = t.edge(c.v, c.w, c.name);
67
- r.info("Edge data", m, a);
68
- try {
69
- se(c, a) ? (r.info("Copying as ", c.v, c.w, m, c.name), n.setEdge(c.v, c.w, m, c.name), r.info("newGraph edges ", n.edges(), n.edge(n.edges()[0]))) : r.info(
70
- "Skipping copy of edge ",
71
- c.v,
72
- "-->",
73
- c.w,
74
- " rootId: ",
75
- a,
76
- " clusterId:",
77
- e
78
- );
79
- } catch (v) {
80
- r.error(v);
81
- }
82
- });
83
- }
84
- r.debug("Removing node", o), t.removeNode(o);
85
- });
86
- }, "copy"), R = /* @__PURE__ */ w((e, t) => {
87
- const n = t.children(e);
88
- let a = [...n];
89
- for (const i of n)
90
- J.set(i, e), a = [...a, ...R(i, t)];
91
- return a;
92
- }, "extractDescendants"), re = /* @__PURE__ */ w((e, t, n) => {
93
- const a = e.edges().filter((c) => c.v === t || c.w === t), i = e.edges().filter((c) => c.v === n || c.w === n), o = a.map((c) => ({ v: c.v === t ? n : c.v, w: c.w === t ? t : c.w })), l = i.map((c) => ({ v: c.v, w: c.w }));
94
- return o.filter((c) => l.some((m) => c.v === m.v && c.w === m.w));
95
- }, "findCommonEdges"), C = /* @__PURE__ */ w((e, t, n) => {
96
- const a = t.children(e);
97
- if (r.trace("Searching children of id ", e, a), a.length < 1)
98
- return e;
99
- let i;
100
- for (const o of a) {
101
- const l = C(o, t, n), u = re(t, n, l);
102
- if (l)
103
- if (u.length > 0)
104
- i = l;
105
- else
106
- return l;
107
- }
108
- return i;
109
- }, "findNonClusterChild"), k = /* @__PURE__ */ w((e) => !d.has(e) || !d.get(e).externalConnections ? e : d.has(e) ? d.get(e).id : e, "getAnchorId"), ie = /* @__PURE__ */ w((e, t) => {
110
- if (!e || t > 10) {
111
- r.debug("Opting out, no graph ");
112
- return;
113
- } else
114
- r.debug("Opting in, graph ");
115
- e.nodes().forEach(function(n) {
116
- e.children(n).length > 0 && (r.warn(
117
- "Cluster identified",
118
- n,
119
- " Replacement id in edges: ",
120
- C(n, e, n)
121
- ), y.set(n, R(n, e)), d.set(n, { id: C(n, e, n), clusterData: e.node(n) }));
122
- }), e.nodes().forEach(function(n) {
123
- const a = e.children(n), i = e.edges();
124
- a.length > 0 ? (r.debug("Cluster identified", n, y), i.forEach((o) => {
125
- const l = D(o.v, n), u = D(o.w, n);
126
- l ^ u && (r.warn("Edge: ", o, " leaves cluster ", n), r.warn("Descendants of XXX ", n, ": ", y.get(n)), d.get(n).externalConnections = !0);
127
- })) : r.debug("Not a cluster ", n, y);
128
- });
129
- for (let n of d.keys()) {
130
- const a = d.get(n).id, i = e.parent(a);
131
- i !== n && d.has(i) && !d.get(i).externalConnections && (d.get(n).id = i);
132
- }
133
- e.edges().forEach(function(n) {
134
- const a = e.edge(n);
135
- r.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(n)), r.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(e.edge(n)));
136
- let i = n.v, o = n.w;
137
- if (r.warn(
138
- "Fix XXX",
139
- d,
140
- "ids:",
141
- n.v,
142
- n.w,
143
- "Translating: ",
144
- d.get(n.v),
145
- " --- ",
146
- d.get(n.w)
147
- ), d.get(n.v) || d.get(n.w)) {
148
- if (r.warn("Fixing and trying - removing XXX", n.v, n.w, n.name), i = k(n.v), o = k(n.w), e.removeEdge(n.v, n.w, n.name), i !== n.v) {
149
- const l = e.parent(i);
150
- d.get(l).externalConnections = !0, a.fromCluster = n.v;
151
- }
152
- if (o !== n.w) {
153
- const l = e.parent(o);
154
- d.get(l).externalConnections = !0, a.toCluster = n.w;
155
- }
156
- r.warn("Fix Replacing with XXX", i, o, n.name), e.setEdge(i, o, a, n.name);
157
- }
158
- }), r.warn("Adjusted Graph", h(e)), T(e, 0), r.trace(d);
159
- }, "adjustClustersAndEdges"), T = /* @__PURE__ */ w((e, t) => {
160
- if (r.warn("extractor - ", t, h(e), e.children("D")), t > 10) {
161
- r.error("Bailing out");
162
- return;
163
- }
164
- let n = e.nodes(), a = !1;
165
- for (const i of n) {
166
- const o = e.children(i);
167
- a = a || o.length > 0;
168
- }
169
- if (!a) {
170
- r.debug("Done, no node has children", e.nodes());
171
- return;
172
- }
173
- r.debug("Nodes = ", n, t);
174
- for (const i of n)
175
- if (r.debug(
176
- "Extracting node",
177
- i,
178
- d,
179
- d.has(i) && !d.get(i).externalConnections,
180
- !e.parent(i),
181
- e.node(i),
182
- e.children("D"),
183
- " Depth ",
184
- t
185
- ), !d.has(i))
186
- r.debug("Not a cluster", i, t);
187
- else if (!d.get(i).externalConnections && e.children(i) && e.children(i).length > 0) {
188
- r.warn(
189
- "Cluster without external connections, without a parent and with children",
190
- i,
191
- t
192
- );
193
- let l = e.graph().rankdir === "TB" ? "LR" : "TB";
194
- d.get(i)?.clusterData?.dir && (l = d.get(i).clusterData.dir, r.warn("Fixing dir", d.get(i).clusterData.dir, l));
195
- const u = new B({
196
- multigraph: !0,
197
- compound: !0
198
- }).setGraph({
199
- rankdir: l,
200
- nodesep: 50,
201
- ranksep: 50,
202
- marginx: 8,
203
- marginy: 8
204
- }).setDefaultEdgeLabel(function() {
205
- return {};
206
- });
207
- r.warn("Old graph before copy", h(e)), G(i, e, u, i), e.setNode(i, {
208
- clusterNode: !0,
209
- id: i,
210
- clusterData: d.get(i).clusterData,
211
- label: d.get(i).label,
212
- graph: u
213
- }), r.warn("New graph after copy node: (", i, ")", h(u)), r.debug("Old graph after copy", h(e));
214
- } else
215
- r.warn(
216
- "Cluster ** ",
217
- i,
218
- " **not meeting the criteria !externalConnections:",
219
- !d.get(i).externalConnections,
220
- " no parent: ",
221
- !e.parent(i),
222
- " children ",
223
- e.children(i) && e.children(i).length > 0,
224
- e.children("D"),
225
- t
226
- ), r.debug(d);
227
- n = e.nodes(), r.warn("New list of nodes", n);
228
- for (const i of n) {
229
- const o = e.node(i);
230
- r.warn(" Now next level", i, o), o?.clusterNode && T(o.graph, t + 1);
231
- }
232
- }, "extractor"), M = /* @__PURE__ */ w((e, t) => {
233
- if (t.length === 0)
234
- return [];
235
- let n = Object.assign([], t);
236
- return t.forEach((a) => {
237
- const i = e.children(a), o = M(e, i);
238
- n = [...n, ...o];
239
- }), n;
240
- }, "sorter"), oe = /* @__PURE__ */ w((e) => M(e, e.children()), "sortNodesByHierarchy"), j = /* @__PURE__ */ w(async (e, t, n, a, i, o) => {
241
- r.warn("Graph in recursive render:XAX", h(t), i);
242
- const l = t.graph().rankdir;
243
- r.trace("Dir in recursive render - dir:", l);
244
- const u = e.insert("g").attr("class", "root");
245
- t.nodes() ? r.info("Recursive render XXX", t.nodes()) : r.info("No nodes found for", t), t.edges().length > 0 && r.info("Recursive edges", t.edge(t.edges()[0]));
246
- const c = u.insert("g").attr("class", "clusters"), m = u.insert("g").attr("class", "edgePaths"), v = u.insert("g").attr("class", "edgeLabels"), X = u.insert("g").attr("class", "nodes");
247
- await Promise.all(
248
- t.nodes().map(async function(f) {
249
- const s = t.node(f);
250
- if (i !== void 0) {
251
- const g = JSON.parse(JSON.stringify(i.clusterData));
252
- r.trace(
253
- `Setting data for parent cluster XXX
254
- Node.id = `,
255
- f,
256
- `
257
- data=`,
258
- g.height,
259
- `
260
- Parent cluster`,
261
- i.height
262
- ), t.setNode(i.id, g), t.parent(f) || (r.trace("Setting parent", f, i.id), t.setParent(f, i.id, g));
263
- }
264
- if (r.info("(Insert) Node XXX" + f + ": " + JSON.stringify(t.node(f))), s?.clusterNode) {
265
- r.info("Cluster identified XBX", f, s.width, t.node(f));
266
- const { ranksep: g, nodesep: E } = t.graph();
267
- s.graph.setGraph({
268
- ...s.graph.graph(),
269
- ranksep: g + 25,
270
- nodesep: E
271
- });
272
- const N = await j(
273
- X,
274
- s.graph,
275
- n,
276
- a,
277
- t.node(f),
278
- o
279
- ), x = N.elem;
280
- z(s, x), s.diff = N.diff || 0, r.info(
281
- "New compound node after recursive render XAX",
282
- f,
283
- "width",
284
- // node,
285
- s.width,
286
- "height",
287
- s.height
288
- // node.x,
289
- // node.y
290
- ), U(x, s);
291
- } else
292
- t.children(f).length > 0 ? (r.trace(
293
- "Cluster - the non recursive path XBX",
294
- f,
295
- s.id,
296
- s,
297
- s.width,
298
- "Graph:",
299
- t
300
- ), r.trace(C(s.id, t)), d.set(s.id, { id: C(s.id, t), node: s })) : (r.trace("Node - the non recursive path XAX", f, X, t.node(f), l), await $(X, t.node(f), { config: o, dir: l }));
301
- })
302
- ), await (/* @__PURE__ */ w(async () => {
303
- const f = t.edges().map(async function(s) {
304
- const g = t.edge(s.v, s.w, s.name);
305
- r.info("Edge " + s.v + " -> " + s.w + ": " + JSON.stringify(s)), r.info("Edge " + s.v + " -> " + s.w + ": ", s, " ", JSON.stringify(t.edge(s))), r.info(
306
- "Fix",
307
- d,
308
- "ids:",
309
- s.v,
310
- s.w,
311
- "Translating: ",
312
- d.get(s.v),
313
- d.get(s.w)
314
- ), await Z(v, g);
315
- });
316
- await Promise.all(f);
317
- }, "processEdges"))(), r.info("Graph before layout:", JSON.stringify(h(t))), r.info("############################################# XXX"), r.info("### Layout ### XXX"), r.info("############################################# XXX"), I(t), r.info("Graph after layout:", JSON.stringify(h(t)));
318
- let O = 0, { subGraphTitleTotalMargin: S } = q(o);
319
- return await Promise.all(
320
- oe(t).map(async function(f) {
321
- const s = t.node(f);
322
- if (r.info(
323
- "Position XBX => " + f + ": (" + s.x,
324
- "," + s.y,
325
- ") width: ",
326
- s.width,
327
- " height: ",
328
- s.height
329
- ), s?.clusterNode)
330
- s.y += S, r.info(
331
- "A tainted cluster node XBX1",
332
- f,
333
- s.id,
334
- s.width,
335
- s.height,
336
- s.x,
337
- s.y,
338
- t.parent(f)
339
- ), d.get(s.id).node = s, P(s);
340
- else if (t.children(f).length > 0) {
341
- r.info(
342
- "A pure cluster node XBX1",
343
- f,
344
- s.id,
345
- s.x,
346
- s.y,
347
- s.width,
348
- s.height,
349
- t.parent(f)
350
- ), s.height += S, t.node(s.parentId);
351
- const g = s?.padding / 2 || 0, E = s?.labelBBox?.height || 0, N = E - g || 0;
352
- r.debug("OffsetY", N, "labelHeight", E, "halfPadding", g), await K(c, s), d.get(s.id).node = s;
353
- } else {
354
- const g = t.node(s.parentId);
355
- s.y += S / 2, r.info(
356
- "A regular node XBX1 - using the padding",
357
- s.id,
358
- "parent",
359
- s.parentId,
360
- s.width,
361
- s.height,
362
- s.x,
363
- s.y,
364
- "offsetY",
365
- s.offsetY,
366
- "parent",
367
- g,
368
- g?.offsetY,
369
- s
370
- ), P(s);
371
- }
372
- })
373
- ), t.edges().forEach(function(f) {
374
- const s = t.edge(f);
375
- r.info("Edge " + f.v + " -> " + f.w + ": " + JSON.stringify(s), s), s.points.forEach((x) => x.y += S / 2);
376
- const g = t.node(f.v);
377
- var E = t.node(f.w);
378
- const N = Q(m, s, d, n, g, E, a);
379
- W(s, N);
380
- }), t.nodes().forEach(function(f) {
381
- const s = t.node(f);
382
- r.info(f, s.type, s.diff), s.isGroup && (O = s.diff);
383
- }), r.warn("Returning from recursive render XAX", u, O), { elem: u, diff: O };
384
- }, "recursiveRender"), ge = /* @__PURE__ */ w(async (e, t) => {
385
- const n = new B({
386
- multigraph: !0,
387
- compound: !0
388
- }).setGraph({
389
- rankdir: e.direction,
390
- nodesep: e.config?.nodeSpacing || e.config?.flowchart?.nodeSpacing || e.nodeSpacing,
391
- ranksep: e.config?.rankSpacing || e.config?.flowchart?.rankSpacing || e.rankSpacing,
392
- marginx: 8,
393
- marginy: 8
394
- }).setDefaultEdgeLabel(function() {
395
- return {};
396
- }), a = t.select("g");
397
- F(a, e.markers, e.type, e.diagramId), Y(), _(), H(), te(), e.nodes.forEach((o) => {
398
- n.setNode(o.id, { ...o }), o.parentId && n.setParent(o.id, o.parentId);
399
- }), r.debug("Edges:", e.edges), e.edges.forEach((o) => {
400
- if (o.start === o.end) {
401
- const l = o.start, u = l + "---" + l + "---1", c = l + "---" + l + "---2", m = n.node(l);
402
- n.setNode(u, {
403
- domId: u,
404
- id: u,
405
- parentId: m.parentId,
406
- labelStyle: "",
407
- label: "",
408
- padding: 0,
409
- shape: "labelRect",
410
- // shape: 'rect',
411
- style: "",
412
- width: 10,
413
- height: 10
414
- }), n.setParent(u, m.parentId), n.setNode(c, {
415
- domId: c,
416
- id: c,
417
- parentId: m.parentId,
418
- labelStyle: "",
419
- padding: 0,
420
- // shape: 'rect',
421
- shape: "labelRect",
422
- label: "",
423
- style: "",
424
- width: 10,
425
- height: 10
426
- }), n.setParent(c, m.parentId);
427
- const v = structuredClone(o), X = structuredClone(o), p = structuredClone(o);
428
- v.label = "", v.arrowTypeEnd = "none", v.id = l + "-cyclic-special-1", X.arrowTypeStart = "none", X.arrowTypeEnd = "none", X.id = l + "-cyclic-special-mid", p.label = "", m.isGroup && (v.fromCluster = l, p.toCluster = l), p.id = l + "-cyclic-special-2", p.arrowTypeStart = "none", n.setEdge(l, u, v, l + "-cyclic-special-0"), n.setEdge(u, c, X, l + "-cyclic-special-1"), n.setEdge(c, l, p, l + "-cyc<lic-special-2");
429
- } else
430
- n.setEdge(o.start, o.end, { ...o }, o.id);
431
- }), r.warn("Graph at first:", JSON.stringify(h(n))), ie(n), r.warn("Graph after XAX:", JSON.stringify(h(n)));
432
- const i = V();
433
- await j(
434
- a,
435
- n,
436
- e.type,
437
- e.diagramId,
438
- void 0,
439
- i
440
- );
441
- }, "render");
442
- export {
443
- ge as render
444
- };
@@ -1,4 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./mermaid.core-DBwAx_jp.cjs"),P=require("./graph-DIbblrZP.cjs"),R=require("./layout-Byuh8f-J.cjs"),N=require("./_baseUniq-Cc_zbSif.cjs"),M=require("./clone-DCNjWuM2.cjs"),O=require("./_basePickBy-a-kPMlkg.cjs");function m(e){var o={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:q(e),edges:j(e)};return N.isUndefined(e.graph())||(o.value=M.clone(e.graph())),o}function q(e){return O.map(e.nodes(),function(o){var n=e.node(o),l=e.parent(o),r={v:o};return N.isUndefined(n)||(r.value=n),N.isUndefined(l)||(r.parent=l),r})}function j(e){return O.map(e.edges(),function(o){var n=e.edge(o),l={v:o.v,w:o.w};return N.isUndefined(o.name)||(l.name=o.name),N.isUndefined(n)||(l.value=n),l})}var a=new Map,y=new Map,k=new Map,U=t.__name(()=>{y.clear(),k.clear(),a.clear()},"clear"),S=t.__name((e,o)=>{const n=y.get(o)||[];return t.log.trace("In isDescendant",o," ",e," = ",n.includes(e)),n.includes(e)},"isDescendant"),F=t.__name((e,o)=>{const n=y.get(o)||[];return t.log.info("Descendants of ",o," is ",n),t.log.info("Edge is ",e),e.v===o||e.w===o?!1:n?n.includes(e.v)||S(e.v,o)||S(e.w,o)||n.includes(e.w):(t.log.debug("Tilt, ",o,",not in descendants"),!1)},"edgeInCluster"),B=t.__name((e,o,n,l)=>{t.log.warn("Copying children of ",e,"root",l,"data",o.node(e),l);const r=o.children(e)||[];e!==l&&r.push(e),t.log.warn("Copying (nodes) clusterId",e,"nodes",r),r.forEach(s=>{if(o.children(s).length>0)B(s,o,n,l);else{const d=o.node(s);t.log.info("cp ",s," to ",l," with parent ",e),n.setNode(s,d),l!==o.parent(s)&&(t.log.warn("Setting parent",s,o.parent(s)),n.setParent(s,o.parent(s))),e!==l&&s!==e?(t.log.debug("Setting parent",s,e),n.setParent(s,e)):(t.log.info("In copy ",e,"root",l,"data",o.node(e),l),t.log.debug("Not Setting parent for node=",s,"cluster!==rootId",e!==l,"node!==clusterId",s!==e));const g=o.edges(s);t.log.debug("Copying Edges",g),g.forEach(c=>{t.log.info("Edge",c);const w=o.edge(c.v,c.w,c.name);t.log.info("Edge data",w,l);try{F(c,l)?(t.log.info("Copying as ",c.v,c.w,w,c.name),n.setEdge(c.v,c.w,w,c.name),t.log.info("newGraph edges ",n.edges(),n.edge(n.edges()[0]))):t.log.info("Skipping copy of edge ",c.v,"-->",c.w," rootId: ",l," clusterId:",e)}catch(h){t.log.error(h)}})}t.log.debug("Removing node",s),o.removeNode(s)})},"copy"),A=t.__name((e,o)=>{const n=o.children(e);let l=[...n];for(const r of n)k.set(r,e),l=[...l,...A(r,o)];return l},"extractDescendants"),Y=t.__name((e,o,n)=>{const l=e.edges().filter(c=>c.v===o||c.w===o),r=e.edges().filter(c=>c.v===n||c.w===n),s=l.map(c=>({v:c.v===o?n:c.v,w:c.w===o?o:c.w})),d=r.map(c=>({v:c.v,w:c.w}));return s.filter(c=>d.some(w=>c.v===w.v&&c.w===w.w))},"findCommonEdges"),b=t.__name((e,o,n)=>{const l=o.children(e);if(t.log.trace("Searching children of id ",e,l),l.length<1)return e;let r;for(const s of l){const d=b(s,o,n),g=Y(o,n,d);if(d)if(g.length>0)r=d;else return d}return r},"findNonClusterChild"),D=t.__name(e=>!a.has(e)||!a.get(e).externalConnections?e:a.has(e)?a.get(e).id:e,"getAnchorId"),H=t.__name((e,o)=>{if(!e||o>10){t.log.debug("Opting out, no graph ");return}else t.log.debug("Opting in, graph ");e.nodes().forEach(function(n){e.children(n).length>0&&(t.log.warn("Cluster identified",n," Replacement id in edges: ",b(n,e,n)),y.set(n,A(n,e)),a.set(n,{id:b(n,e,n),clusterData:e.node(n)}))}),e.nodes().forEach(function(n){const l=e.children(n),r=e.edges();l.length>0?(t.log.debug("Cluster identified",n,y),r.forEach(s=>{const d=S(s.v,n),g=S(s.w,n);d^g&&(t.log.warn("Edge: ",s," leaves cluster ",n),t.log.warn("Descendants of XXX ",n,": ",y.get(n)),a.get(n).externalConnections=!0)})):t.log.debug("Not a cluster ",n,y)});for(let n of a.keys()){const l=a.get(n).id,r=e.parent(l);r!==n&&a.has(r)&&!a.get(r).externalConnections&&(a.get(n).id=r)}e.edges().forEach(function(n){const l=e.edge(n);t.log.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(n)),t.log.warn("Edge "+n.v+" -> "+n.w+": "+JSON.stringify(e.edge(n)));let r=n.v,s=n.w;if(t.log.warn("Fix XXX",a,"ids:",n.v,n.w,"Translating: ",a.get(n.v)," --- ",a.get(n.w)),a.get(n.v)||a.get(n.w)){if(t.log.warn("Fixing and trying - removing XXX",n.v,n.w,n.name),r=D(n.v),s=D(n.w),e.removeEdge(n.v,n.w,n.name),r!==n.v){const d=e.parent(r);a.get(d).externalConnections=!0,l.fromCluster=n.v}if(s!==n.w){const d=e.parent(s);a.get(d).externalConnections=!0,l.toCluster=n.w}t.log.warn("Fix Replacing with XXX",r,s,n.name),e.setEdge(r,s,l,n.name)}}),t.log.warn("Adjusted Graph",m(e)),J(e,0),t.log.trace(a)},"adjustClustersAndEdges"),J=t.__name((e,o)=>{if(t.log.warn("extractor - ",o,m(e),e.children("D")),o>10){t.log.error("Bailing out");return}let n=e.nodes(),l=!1;for(const r of n){const s=e.children(r);l=l||s.length>0}if(!l){t.log.debug("Done, no node has children",e.nodes());return}t.log.debug("Nodes = ",n,o);for(const r of n)if(t.log.debug("Extracting node",r,a,a.has(r)&&!a.get(r).externalConnections,!e.parent(r),e.node(r),e.children("D")," Depth ",o),!a.has(r))t.log.debug("Not a cluster",r,o);else if(!a.get(r).externalConnections&&e.children(r)&&e.children(r).length>0){t.log.warn("Cluster without external connections, without a parent and with children",r,o);let d=e.graph().rankdir==="TB"?"LR":"TB";a.get(r)?.clusterData?.dir&&(d=a.get(r).clusterData.dir,t.log.warn("Fixing dir",a.get(r).clusterData.dir,d));const g=new P.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:d,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});t.log.warn("Old graph before copy",m(e)),B(r,e,g,r),e.setNode(r,{clusterNode:!0,id:r,clusterData:a.get(r).clusterData,label:a.get(r).label,graph:g}),t.log.warn("New graph after copy node: (",r,")",m(g)),t.log.debug("Old graph after copy",m(e))}else t.log.warn("Cluster ** ",r," **not meeting the criteria !externalConnections:",!a.get(r).externalConnections," no parent: ",!e.parent(r)," children ",e.children(r)&&e.children(r).length>0,e.children("D"),o),t.log.debug(a);n=e.nodes(),t.log.warn("New list of nodes",n);for(const r of n){const s=e.node(r);t.log.warn(" Now next level",r,s),s?.clusterNode&&J(s.graph,o+1)}},"extractor"),T=t.__name((e,o)=>{if(o.length===0)return[];let n=Object.assign([],o);return o.forEach(l=>{const r=e.children(l),s=T(e,r);n=[...n,...s]}),n},"sorter"),V=t.__name(e=>T(e,e.children()),"sortNodesByHierarchy"),G=t.__name(async(e,o,n,l,r,s)=>{t.log.warn("Graph in recursive render:XAX",m(o),r);const d=o.graph().rankdir;t.log.trace("Dir in recursive render - dir:",d);const g=e.insert("g").attr("class","root");o.nodes()?t.log.info("Recursive render XXX",o.nodes()):t.log.info("No nodes found for",o),o.edges().length>0&&t.log.info("Recursive edges",o.edge(o.edges()[0]));const c=g.insert("g").attr("class","clusters"),w=g.insert("g").attr("class","edgePaths"),h=g.insert("g").attr("class","edgeLabels"),v=g.insert("g").attr("class","nodes");await Promise.all(o.nodes().map(async function(f){const i=o.node(f);if(r!==void 0){const u=JSON.parse(JSON.stringify(r.clusterData));t.log.trace(`Setting data for parent cluster XXX
2
- Node.id = `,f,`
3
- data=`,u.height,`
4
- Parent cluster`,r.height),o.setNode(r.id,u),o.parent(f)||(t.log.trace("Setting parent",f,r.id),o.setParent(f,r.id,u))}if(t.log.info("(Insert) Node XXX"+f+": "+JSON.stringify(o.node(f))),i?.clusterNode){t.log.info("Cluster identified XBX",f,i.width,o.node(f));const{ranksep:u,nodesep:E}=o.graph();i.graph.setGraph({...i.graph.graph(),ranksep:u+25,nodesep:E});const p=await G(v,i.graph,n,l,o.node(f),s),_=p.elem;t.updateNodeBounds(i,_),i.diff=p.diff||0,t.log.info("New compound node after recursive render XAX",f,"width",i.width,"height",i.height),t.setNodeElem(_,i)}else o.children(f).length>0?(t.log.trace("Cluster - the non recursive path XBX",f,i.id,i,i.width,"Graph:",o),t.log.trace(b(i.id,o)),a.set(i.id,{id:b(i.id,o),node:i})):(t.log.trace("Node - the non recursive path XAX",f,v,o.node(f),d),await t.insertNode(v,o.node(f),{config:s,dir:d}))})),await t.__name(async()=>{const f=o.edges().map(async function(i){const u=o.edge(i.v,i.w,i.name);t.log.info("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(i)),t.log.info("Edge "+i.v+" -> "+i.w+": ",i," ",JSON.stringify(o.edge(i))),t.log.info("Fix",a,"ids:",i.v,i.w,"Translating: ",a.get(i.v),a.get(i.w)),await t.insertEdgeLabel(h,u)});await Promise.all(f)},"processEdges")(),t.log.info("Graph before layout:",JSON.stringify(m(o))),t.log.info("############################################# XXX"),t.log.info("### Layout ### XXX"),t.log.info("############################################# XXX"),R.layout(o),t.log.info("Graph after layout:",JSON.stringify(m(o)));let x=0,{subGraphTitleTotalMargin:C}=t.getSubGraphTitleMargins(s);return await Promise.all(V(o).map(async function(f){const i=o.node(f);if(t.log.info("Position XBX => "+f+": ("+i.x,","+i.y,") width: ",i.width," height: ",i.height),i?.clusterNode)i.y+=C,t.log.info("A tainted cluster node XBX1",f,i.id,i.width,i.height,i.x,i.y,o.parent(f)),a.get(i.id).node=i,t.positionNode(i);else if(o.children(f).length>0){t.log.info("A pure cluster node XBX1",f,i.id,i.x,i.y,i.width,i.height,o.parent(f)),i.height+=C,o.node(i.parentId);const u=i?.padding/2||0,E=i?.labelBBox?.height||0,p=E-u||0;t.log.debug("OffsetY",p,"labelHeight",E,"halfPadding",u),await t.insertCluster(c,i),a.get(i.id).node=i}else{const u=o.node(i.parentId);i.y+=C/2,t.log.info("A regular node XBX1 - using the padding",i.id,"parent",i.parentId,i.width,i.height,i.x,i.y,"offsetY",i.offsetY,"parent",u,u?.offsetY,i),t.positionNode(i)}})),o.edges().forEach(function(f){const i=o.edge(f);t.log.info("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(i),i),i.points.forEach(_=>_.y+=C/2);const u=o.node(f.v);var E=o.node(f.w);const p=t.insertEdge(w,i,a,n,u,E,l);t.positionEdgeLabel(i,p)}),o.nodes().forEach(function(f){const i=o.node(f);t.log.info(f,i.type,i.diff),i.isGroup&&(x=i.diff)}),t.log.warn("Returning from recursive render XAX",g,x),{elem:g,diff:x}},"recursiveRender"),z=t.__name(async(e,o)=>{const n=new P.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:e.direction,nodesep:e.config?.nodeSpacing||e.config?.flowchart?.nodeSpacing||e.nodeSpacing,ranksep:e.config?.rankSpacing||e.config?.flowchart?.rankSpacing||e.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),l=o.select("g");t.markers_default(l,e.markers,e.type,e.diagramId),t.clear2(),t.clear$1(),t.clear$2(),U(),e.nodes.forEach(s=>{n.setNode(s.id,{...s}),s.parentId&&n.setParent(s.id,s.parentId)}),t.log.debug("Edges:",e.edges),e.edges.forEach(s=>{if(s.start===s.end){const d=s.start,g=d+"---"+d+"---1",c=d+"---"+d+"---2",w=n.node(d);n.setNode(g,{domId:g,id:g,parentId:w.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),n.setParent(g,w.parentId),n.setNode(c,{domId:c,id:c,parentId:w.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),n.setParent(c,w.parentId);const h=structuredClone(s),v=structuredClone(s),X=structuredClone(s);h.label="",h.arrowTypeEnd="none",h.id=d+"-cyclic-special-1",v.arrowTypeStart="none",v.arrowTypeEnd="none",v.id=d+"-cyclic-special-mid",X.label="",w.isGroup&&(h.fromCluster=d,X.toCluster=d),X.id=d+"-cyclic-special-2",X.arrowTypeStart="none",n.setEdge(d,g,h,d+"-cyclic-special-0"),n.setEdge(g,c,v,d+"-cyclic-special-1"),n.setEdge(c,d,X,d+"-cyc<lic-special-2")}else n.setEdge(s.start,s.end,{...s},s.id)}),t.log.warn("Graph at first:",JSON.stringify(m(n))),H(n),t.log.warn("Graph after XAX:",JSON.stringify(m(n)));const r=t.getConfig2();await G(l,n,e.type,e.diagramId,void 0,r)},"render");exports.render=z;
@@ -1,171 +0,0 @@
1
- function J(n) {
2
- return Math.abs(n = Math.round(n)) >= 1e21 ? n.toLocaleString("en").replace(/,/g, "") : n.toString(10);
3
- }
4
- function j(n, t) {
5
- if (!isFinite(n) || n === 0) return null;
6
- var e = (n = t ? n.toExponential(t - 1) : n.toExponential()).indexOf("e"), i = n.slice(0, e);
7
- return [
8
- i.length > 1 ? i[0] + i.slice(2) : i,
9
- +n.slice(e + 1)
10
- ];
11
- }
12
- function K(n) {
13
- return n = j(Math.abs(n)), n ? n[1] : NaN;
14
- }
15
- function Q(n, t) {
16
- return function(e, i) {
17
- for (var o = e.length, a = [], c = 0, h = n[0], M = 0; o > 0 && h > 0 && (M + h + 1 > i && (h = Math.max(1, i - M)), a.push(e.substring(o -= h, o + h)), !((M += h + 1) > i)); )
18
- h = n[c = (c + 1) % n.length];
19
- return a.reverse().join(t);
20
- };
21
- }
22
- function V(n) {
23
- return function(t) {
24
- return t.replace(/[0-9]/g, function(e) {
25
- return n[+e];
26
- });
27
- };
28
- }
29
- var W = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
30
- function $(n) {
31
- if (!(t = W.exec(n))) throw new Error("invalid format: " + n);
32
- var t;
33
- return new L({
34
- fill: t[1],
35
- align: t[2],
36
- sign: t[3],
37
- symbol: t[4],
38
- zero: t[5],
39
- width: t[6],
40
- comma: t[7],
41
- precision: t[8] && t[8].slice(1),
42
- trim: t[9],
43
- type: t[10]
44
- });
45
- }
46
- $.prototype = L.prototype;
47
- function L(n) {
48
- this.fill = n.fill === void 0 ? " " : n.fill + "", this.align = n.align === void 0 ? ">" : n.align + "", this.sign = n.sign === void 0 ? "-" : n.sign + "", this.symbol = n.symbol === void 0 ? "" : n.symbol + "", this.zero = !!n.zero, this.width = n.width === void 0 ? void 0 : +n.width, this.comma = !!n.comma, this.precision = n.precision === void 0 ? void 0 : +n.precision, this.trim = !!n.trim, this.type = n.type === void 0 ? "" : n.type + "";
49
- }
50
- L.prototype.toString = function() {
51
- return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
52
- };
53
- function _(n) {
54
- n: for (var t = n.length, e = 1, i = -1, o; e < t; ++e)
55
- switch (n[e]) {
56
- case ".":
57
- i = o = e;
58
- break;
59
- case "0":
60
- i === 0 && (i = e), o = e;
61
- break;
62
- default:
63
- if (!+n[e]) break n;
64
- i > 0 && (i = 0);
65
- break;
66
- }
67
- return i > 0 ? n.slice(0, i) + n.slice(o + 1) : n;
68
- }
69
- var N;
70
- function v(n, t) {
71
- var e = j(n, t);
72
- if (!e) return N = void 0, n.toPrecision(t);
73
- var i = e[0], o = e[1], a = o - (N = Math.max(-8, Math.min(8, Math.floor(o / 3))) * 3) + 1, c = i.length;
74
- return a === c ? i : a > c ? i + new Array(a - c + 1).join("0") : a > 0 ? i.slice(0, a) + "." + i.slice(a) : "0." + new Array(1 - a).join("0") + j(n, Math.max(0, t + a - 1))[0];
75
- }
76
- function X(n, t) {
77
- var e = j(n, t);
78
- if (!e) return n + "";
79
- var i = e[0], o = e[1];
80
- return o < 0 ? "0." + new Array(-o).join("0") + i : i.length > o + 1 ? i.slice(0, o + 1) + "." + i.slice(o + 1) : i + new Array(o - i.length + 2).join("0");
81
- }
82
- const O = {
83
- "%": (n, t) => (n * 100).toFixed(t),
84
- b: (n) => Math.round(n).toString(2),
85
- c: (n) => n + "",
86
- d: J,
87
- e: (n, t) => n.toExponential(t),
88
- f: (n, t) => n.toFixed(t),
89
- g: (n, t) => n.toPrecision(t),
90
- o: (n) => Math.round(n).toString(8),
91
- p: (n, t) => X(n * 100, t),
92
- r: X,
93
- s: v,
94
- X: (n) => Math.round(n).toString(16).toUpperCase(),
95
- x: (n) => Math.round(n).toString(16)
96
- };
97
- function R(n) {
98
- return n;
99
- }
100
- var U = Array.prototype.map, Y = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
101
- function nn(n) {
102
- var t = n.grouping === void 0 || n.thousands === void 0 ? R : Q(U.call(n.grouping, Number), n.thousands + ""), e = n.currency === void 0 ? "" : n.currency[0] + "", i = n.currency === void 0 ? "" : n.currency[1] + "", o = n.decimal === void 0 ? "." : n.decimal + "", a = n.numerals === void 0 ? R : V(U.call(n.numerals, String)), c = n.percent === void 0 ? "%" : n.percent + "", h = n.minus === void 0 ? "−" : n.minus + "", M = n.nan === void 0 ? "NaN" : n.nan + "";
103
- function T(f, g) {
104
- f = $(f);
105
- var b = f.fill, p = f.align, m = f.sign, w = f.symbol, S = f.zero, E = f.width, F = f.comma, y = f.precision, C = f.trim, d = f.type;
106
- d === "n" ? (F = !0, d = "g") : O[d] || (y === void 0 && (y = 12), C = !0, d = "g"), (S || b === "0" && p === "=") && (S = !0, b = "0", p = "=");
107
- var q = (g && g.prefix !== void 0 ? g.prefix : "") + (w === "$" ? e : w === "#" && /[boxX]/.test(d) ? "0" + d.toLowerCase() : ""), B = (w === "$" ? i : /[%p]/.test(d) ? c : "") + (g && g.suffix !== void 0 ? g.suffix : ""), D = O[d], H = /[defgprs%]/.test(d);
108
- y = y === void 0 ? 6 : /[gprs]/.test(d) ? Math.max(1, Math.min(21, y)) : Math.max(0, Math.min(20, y));
109
- function G(r) {
110
- var l = q, u = B, x, I, k;
111
- if (d === "c")
112
- u = D(r) + u, r = "";
113
- else {
114
- r = +r;
115
- var P = r < 0 || 1 / r < 0;
116
- if (r = isNaN(r) ? M : D(Math.abs(r), y), C && (r = _(r)), P && +r == 0 && m !== "+" && (P = !1), l = (P ? m === "(" ? m : h : m === "-" || m === "(" ? "" : m) + l, u = (d === "s" && !isNaN(r) && N !== void 0 ? Y[8 + N / 3] : "") + u + (P && m === "(" ? ")" : ""), H) {
117
- for (x = -1, I = r.length; ++x < I; )
118
- if (k = r.charCodeAt(x), 48 > k || k > 57) {
119
- u = (k === 46 ? o + r.slice(x + 1) : r.slice(x)) + u, r = r.slice(0, x);
120
- break;
121
- }
122
- }
123
- }
124
- F && !S && (r = t(r, 1 / 0));
125
- var z = l.length + r.length + u.length, s = z < E ? new Array(E - z + 1).join(b) : "";
126
- switch (F && S && (r = t(s + r, s.length ? E - u.length : 1 / 0), s = ""), p) {
127
- case "<":
128
- r = l + r + u + s;
129
- break;
130
- case "=":
131
- r = l + s + r + u;
132
- break;
133
- case "^":
134
- r = s.slice(0, z = s.length >> 1) + l + r + u + s.slice(z);
135
- break;
136
- default:
137
- r = s + l + r + u;
138
- break;
139
- }
140
- return a(r);
141
- }
142
- return G.toString = function() {
143
- return f + "";
144
- }, G;
145
- }
146
- function Z(f, g) {
147
- var b = Math.max(-8, Math.min(8, Math.floor(K(g) / 3))) * 3, p = Math.pow(10, -b), m = T((f = $(f), f.type = "f", f), { suffix: Y[8 + b / 3] });
148
- return function(w) {
149
- return m(p * w);
150
- };
151
- }
152
- return {
153
- format: T,
154
- formatPrefix: Z
155
- };
156
- }
157
- var A, tn, rn;
158
- en({
159
- thousands: ",",
160
- grouping: [3],
161
- currency: ["$", ""]
162
- });
163
- function en(n) {
164
- return A = nn(n), tn = A.format, rn = A.formatPrefix, A;
165
- }
166
- export {
167
- rn as a,
168
- tn as b,
169
- K as e,
170
- $ as f
171
- };
@@ -1 +0,0 @@
1
- "use strict";function K(n){return Math.abs(n=Math.round(n))>=1e21?n.toLocaleString("en").replace(/,/g,""):n.toString(10)}function j(n,t){if(!isFinite(n)||n===0)return null;var e=(n=t?n.toExponential(t-1):n.toExponential()).indexOf("e"),i=n.slice(0,e);return[i.length>1?i[0]+i.slice(2):i,+n.slice(e+1)]}function Z(n){return n=j(Math.abs(n)),n?n[1]:NaN}function Q(n,t){return function(e,i){for(var o=e.length,a=[],c=0,m=n[0],M=0;o>0&&m>0&&(M+m+1>i&&(m=Math.max(1,i-M)),a.push(e.substring(o-=m,o+m)),!((M+=m+1)>i));)m=n[c=(c+1)%n.length];return a.reverse().join(t)}}function V(n){return function(t){return t.replace(/[0-9]/g,function(e){return n[+e]})}}var W=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function N(n){if(!(t=W.exec(n)))throw new Error("invalid format: "+n);var t;return new L({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}N.prototype=L.prototype;function L(n){this.fill=n.fill===void 0?" ":n.fill+"",this.align=n.align===void 0?">":n.align+"",this.sign=n.sign===void 0?"-":n.sign+"",this.symbol=n.symbol===void 0?"":n.symbol+"",this.zero=!!n.zero,this.width=n.width===void 0?void 0:+n.width,this.comma=!!n.comma,this.precision=n.precision===void 0?void 0:+n.precision,this.trim=!!n.trim,this.type=n.type===void 0?"":n.type+""}L.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function _(n){n:for(var t=n.length,e=1,i=-1,o;e<t;++e)switch(n[e]){case".":i=o=e;break;case"0":i===0&&(i=e),o=e;break;default:if(!+n[e])break n;i>0&&(i=0);break}return i>0?n.slice(0,i)+n.slice(o+1):n}var E;function v(n,t){var e=j(n,t);if(!e)return E=void 0,n.toPrecision(t);var i=e[0],o=e[1],a=o-(E=Math.max(-8,Math.min(8,Math.floor(o/3)))*3)+1,c=i.length;return a===c?i:a>c?i+new Array(a-c+1).join("0"):a>0?i.slice(0,a)+"."+i.slice(a):"0."+new Array(1-a).join("0")+j(n,Math.max(0,t+a-1))[0]}function X(n,t){var e=j(n,t);if(!e)return n+"";var i=e[0],o=e[1];return o<0?"0."+new Array(-o).join("0")+i:i.length>o+1?i.slice(0,o+1)+"."+i.slice(o+1):i+new Array(o-i.length+2).join("0")}const O={"%":(n,t)=>(n*100).toFixed(t),b:n=>Math.round(n).toString(2),c:n=>n+"",d:K,e:(n,t)=>n.toExponential(t),f:(n,t)=>n.toFixed(t),g:(n,t)=>n.toPrecision(t),o:n=>Math.round(n).toString(8),p:(n,t)=>X(n*100,t),r:X,s:v,X:n=>Math.round(n).toString(16).toUpperCase(),x:n=>Math.round(n).toString(16)};function R(n){return n}var U=Array.prototype.map,Y=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function nn(n){var t=n.grouping===void 0||n.thousands===void 0?R:Q(U.call(n.grouping,Number),n.thousands+""),e=n.currency===void 0?"":n.currency[0]+"",i=n.currency===void 0?"":n.currency[1]+"",o=n.decimal===void 0?".":n.decimal+"",a=n.numerals===void 0?R:V(U.call(n.numerals,String)),c=n.percent===void 0?"%":n.percent+"",m=n.minus===void 0?"−":n.minus+"",M=n.nan===void 0?"NaN":n.nan+"";function T(f,g){f=N(f);var x=f.fill,p=f.align,h=f.sign,w=f.symbol,S=f.zero,F=f.width,$=f.comma,y=f.precision,C=f.trim,d=f.type;d==="n"?($=!0,d="g"):O[d]||(y===void 0&&(y=12),C=!0,d="g"),(S||x==="0"&&p==="=")&&(S=!0,x="0",p="=");var B=(g&&g.prefix!==void 0?g.prefix:"")+(w==="$"?e:w==="#"&&/[boxX]/.test(d)?"0"+d.toLowerCase():""),H=(w==="$"?i:/[%p]/.test(d)?c:"")+(g&&g.suffix!==void 0?g.suffix:""),D=O[d],J=/[defgprs%]/.test(d);y=y===void 0?6:/[gprs]/.test(d)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y));function G(r){var l=B,u=H,b,I,k;if(d==="c")u=D(r)+u,r="";else{r=+r;var P=r<0||1/r<0;if(r=isNaN(r)?M:D(Math.abs(r),y),C&&(r=_(r)),P&&+r==0&&h!=="+"&&(P=!1),l=(P?h==="("?h:m:h==="-"||h==="("?"":h)+l,u=(d==="s"&&!isNaN(r)&&E!==void 0?Y[8+E/3]:"")+u+(P&&h==="("?")":""),J){for(b=-1,I=r.length;++b<I;)if(k=r.charCodeAt(b),48>k||k>57){u=(k===46?o+r.slice(b+1):r.slice(b))+u,r=r.slice(0,b);break}}}$&&!S&&(r=t(r,1/0));var z=l.length+r.length+u.length,s=z<F?new Array(F-z+1).join(x):"";switch($&&S&&(r=t(s+r,s.length?F-u.length:1/0),s=""),p){case"<":r=l+r+u+s;break;case"=":r=l+s+r+u;break;case"^":r=s.slice(0,z=s.length>>1)+l+r+u+s.slice(z);break;default:r=s+l+r+u;break}return a(r)}return G.toString=function(){return f+""},G}function q(f,g){var x=Math.max(-8,Math.min(8,Math.floor(Z(g)/3)))*3,p=Math.pow(10,-x),h=T((f=N(f),f.type="f",f),{suffix:Y[8+x/3]});return function(w){return h(p*w)}}return{format:T,formatPrefix:q}}var A;exports.format=void 0;exports.formatPrefix=void 0;tn({thousands:",",grouping:[3],currency:["$",""]});function tn(n){return A=nn(n),exports.format=A.format,exports.formatPrefix=A.formatPrefix,A}exports.exponent=Z;exports.formatSpecifier=N;