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,1370 +0,0 @@
1
- import { g as te } from "./chunk-55IACEB6-DXacNZbO.js";
2
- import { s as ee } from "./chunk-QN33PNHL-3GERZBRm.js";
3
- import { _ as u, l as b, c as w, r as se, u as ie, a as re, b as ae, g as ne, s as oe, p as le, q as ce, T as he, k as U, y as ue } from "./mermaid.core-gFR0XUlD.js";
4
- var vt = (function() {
5
- var t = /* @__PURE__ */ u(function(Y, o, c, n) {
6
- for (c = c || {}, n = Y.length; n--; c[Y[n]] = o) ;
7
- return c;
8
- }, "o"), e = [1, 2], s = [1, 3], a = [1, 4], r = [2, 4], h = [1, 9], d = [1, 11], S = [1, 16], f = [1, 17], T = [1, 18], _ = [1, 19], m = [1, 33], A = [1, 20], v = [1, 21], p = [1, 22], k = [1, 23], R = [1, 24], L = [1, 26], $ = [1, 27], I = [1, 28], P = [1, 29], st = [1, 30], it = [1, 31], rt = [1, 32], at = [1, 35], nt = [1, 36], ot = [1, 37], lt = [1, 38], H = [1, 34], y = [1, 4, 5, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 41, 45, 48, 51, 52, 53, 54, 57], ct = [1, 4, 5, 14, 15, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 39, 40, 41, 45, 48, 51, 52, 53, 54, 57], xt = [4, 5, 16, 17, 19, 21, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 41, 45, 48, 51, 52, 53, 54, 57], gt = {
9
- trace: /* @__PURE__ */ u(function() {
10
- }, "trace"),
11
- yy: {},
12
- symbols_: { error: 2, start: 3, SPACE: 4, NL: 5, SD: 6, document: 7, line: 8, statement: 9, classDefStatement: 10, styleStatement: 11, cssClassStatement: 12, idStatement: 13, DESCR: 14, "-->": 15, HIDE_EMPTY: 16, scale: 17, WIDTH: 18, COMPOSIT_STATE: 19, STRUCT_START: 20, STRUCT_STOP: 21, STATE_DESCR: 22, AS: 23, ID: 24, FORK: 25, JOIN: 26, CHOICE: 27, CONCURRENT: 28, note: 29, notePosition: 30, NOTE_TEXT: 31, direction: 32, acc_title: 33, acc_title_value: 34, acc_descr: 35, acc_descr_value: 36, acc_descr_multiline_value: 37, CLICK: 38, STRING: 39, HREF: 40, classDef: 41, CLASSDEF_ID: 42, CLASSDEF_STYLEOPTS: 43, DEFAULT: 44, style: 45, STYLE_IDS: 46, STYLEDEF_STYLEOPTS: 47, class: 48, CLASSENTITY_IDS: 49, STYLECLASS: 50, direction_tb: 51, direction_bt: 52, direction_rl: 53, direction_lr: 54, eol: 55, ";": 56, EDGE_STATE: 57, STYLE_SEPARATOR: 58, left_of: 59, right_of: 60, $accept: 0, $end: 1 },
13
- terminals_: { 2: "error", 4: "SPACE", 5: "NL", 6: "SD", 14: "DESCR", 15: "-->", 16: "HIDE_EMPTY", 17: "scale", 18: "WIDTH", 19: "COMPOSIT_STATE", 20: "STRUCT_START", 21: "STRUCT_STOP", 22: "STATE_DESCR", 23: "AS", 24: "ID", 25: "FORK", 26: "JOIN", 27: "CHOICE", 28: "CONCURRENT", 29: "note", 31: "NOTE_TEXT", 33: "acc_title", 34: "acc_title_value", 35: "acc_descr", 36: "acc_descr_value", 37: "acc_descr_multiline_value", 38: "CLICK", 39: "STRING", 40: "HREF", 41: "classDef", 42: "CLASSDEF_ID", 43: "CLASSDEF_STYLEOPTS", 44: "DEFAULT", 45: "style", 46: "STYLE_IDS", 47: "STYLEDEF_STYLEOPTS", 48: "class", 49: "CLASSENTITY_IDS", 50: "STYLECLASS", 51: "direction_tb", 52: "direction_bt", 53: "direction_rl", 54: "direction_lr", 56: ";", 57: "EDGE_STATE", 58: "STYLE_SEPARATOR", 59: "left_of", 60: "right_of" },
14
- productions_: [0, [3, 2], [3, 2], [3, 2], [7, 0], [7, 2], [8, 2], [8, 1], [8, 1], [9, 1], [9, 1], [9, 1], [9, 1], [9, 2], [9, 3], [9, 4], [9, 1], [9, 2], [9, 1], [9, 4], [9, 3], [9, 6], [9, 1], [9, 1], [9, 1], [9, 1], [9, 4], [9, 4], [9, 1], [9, 2], [9, 2], [9, 1], [9, 5], [9, 5], [10, 3], [10, 3], [11, 3], [12, 3], [32, 1], [32, 1], [32, 1], [32, 1], [55, 1], [55, 1], [13, 1], [13, 1], [13, 3], [13, 3], [30, 1], [30, 1]],
15
- performAction: /* @__PURE__ */ u(function(o, c, n, g, E, i, J) {
16
- var l = i.length - 1;
17
- switch (E) {
18
- case 3:
19
- return g.setRootDoc(i[l]), i[l];
20
- case 4:
21
- this.$ = [];
22
- break;
23
- case 5:
24
- i[l] != "nl" && (i[l - 1].push(i[l]), this.$ = i[l - 1]);
25
- break;
26
- case 6:
27
- case 7:
28
- this.$ = i[l];
29
- break;
30
- case 8:
31
- this.$ = "nl";
32
- break;
33
- case 12:
34
- this.$ = i[l];
35
- break;
36
- case 13:
37
- const q = i[l - 1];
38
- q.description = g.trimColon(i[l]), this.$ = q;
39
- break;
40
- case 14:
41
- this.$ = { stmt: "relation", state1: i[l - 2], state2: i[l] };
42
- break;
43
- case 15:
44
- const Tt = g.trimColon(i[l]);
45
- this.$ = { stmt: "relation", state1: i[l - 3], state2: i[l - 1], description: Tt };
46
- break;
47
- case 19:
48
- this.$ = { stmt: "state", id: i[l - 3], type: "default", description: "", doc: i[l - 1] };
49
- break;
50
- case 20:
51
- var B = i[l], W = i[l - 2].trim();
52
- if (i[l].match(":")) {
53
- var ut = i[l].split(":");
54
- B = ut[0], W = [W, ut[1]];
55
- }
56
- this.$ = { stmt: "state", id: B, type: "default", description: W };
57
- break;
58
- case 21:
59
- this.$ = { stmt: "state", id: i[l - 3], type: "default", description: i[l - 5], doc: i[l - 1] };
60
- break;
61
- case 22:
62
- this.$ = { stmt: "state", id: i[l], type: "fork" };
63
- break;
64
- case 23:
65
- this.$ = { stmt: "state", id: i[l], type: "join" };
66
- break;
67
- case 24:
68
- this.$ = { stmt: "state", id: i[l], type: "choice" };
69
- break;
70
- case 25:
71
- this.$ = { stmt: "state", id: g.getDividerId(), type: "divider" };
72
- break;
73
- case 26:
74
- this.$ = { stmt: "state", id: i[l - 1].trim(), note: { position: i[l - 2].trim(), text: i[l].trim() } };
75
- break;
76
- case 29:
77
- this.$ = i[l].trim(), g.setAccTitle(this.$);
78
- break;
79
- case 30:
80
- case 31:
81
- this.$ = i[l].trim(), g.setAccDescription(this.$);
82
- break;
83
- case 32:
84
- this.$ = {
85
- stmt: "click",
86
- id: i[l - 3],
87
- url: i[l - 2],
88
- tooltip: i[l - 1]
89
- };
90
- break;
91
- case 33:
92
- this.$ = {
93
- stmt: "click",
94
- id: i[l - 3],
95
- url: i[l - 1],
96
- tooltip: ""
97
- };
98
- break;
99
- case 34:
100
- case 35:
101
- this.$ = { stmt: "classDef", id: i[l - 1].trim(), classes: i[l].trim() };
102
- break;
103
- case 36:
104
- this.$ = { stmt: "style", id: i[l - 1].trim(), styleClass: i[l].trim() };
105
- break;
106
- case 37:
107
- this.$ = { stmt: "applyClass", id: i[l - 1].trim(), styleClass: i[l].trim() };
108
- break;
109
- case 38:
110
- g.setDirection("TB"), this.$ = { stmt: "dir", value: "TB" };
111
- break;
112
- case 39:
113
- g.setDirection("BT"), this.$ = { stmt: "dir", value: "BT" };
114
- break;
115
- case 40:
116
- g.setDirection("RL"), this.$ = { stmt: "dir", value: "RL" };
117
- break;
118
- case 41:
119
- g.setDirection("LR"), this.$ = { stmt: "dir", value: "LR" };
120
- break;
121
- case 44:
122
- case 45:
123
- this.$ = { stmt: "state", id: i[l].trim(), type: "default", description: "" };
124
- break;
125
- case 46:
126
- this.$ = { stmt: "state", id: i[l - 2].trim(), classes: [i[l].trim()], type: "default", description: "" };
127
- break;
128
- case 47:
129
- this.$ = { stmt: "state", id: i[l - 2].trim(), classes: [i[l].trim()], type: "default", description: "" };
130
- break;
131
- }
132
- }, "anonymous"),
133
- table: [{ 3: 1, 4: e, 5: s, 6: a }, { 1: [3] }, { 3: 5, 4: e, 5: s, 6: a }, { 3: 6, 4: e, 5: s, 6: a }, t([1, 4, 5, 16, 17, 19, 22, 24, 25, 26, 27, 28, 29, 33, 35, 37, 38, 41, 45, 48, 51, 52, 53, 54, 57], r, { 7: 7 }), { 1: [2, 1] }, { 1: [2, 2] }, { 1: [2, 3], 4: h, 5: d, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: S, 17: f, 19: T, 22: _, 24: m, 25: A, 26: v, 27: p, 28: k, 29: R, 32: 25, 33: L, 35: $, 37: I, 38: P, 41: st, 45: it, 48: rt, 51: at, 52: nt, 53: ot, 54: lt, 57: H }, t(y, [2, 5]), { 9: 39, 10: 12, 11: 13, 12: 14, 13: 15, 16: S, 17: f, 19: T, 22: _, 24: m, 25: A, 26: v, 27: p, 28: k, 29: R, 32: 25, 33: L, 35: $, 37: I, 38: P, 41: st, 45: it, 48: rt, 51: at, 52: nt, 53: ot, 54: lt, 57: H }, t(y, [2, 7]), t(y, [2, 8]), t(y, [2, 9]), t(y, [2, 10]), t(y, [2, 11]), t(y, [2, 12], { 14: [1, 40], 15: [1, 41] }), t(y, [2, 16]), { 18: [1, 42] }, t(y, [2, 18], { 20: [1, 43] }), { 23: [1, 44] }, t(y, [2, 22]), t(y, [2, 23]), t(y, [2, 24]), t(y, [2, 25]), { 30: 45, 31: [1, 46], 59: [1, 47], 60: [1, 48] }, t(y, [2, 28]), { 34: [1, 49] }, { 36: [1, 50] }, t(y, [2, 31]), { 13: 51, 24: m, 57: H }, { 42: [1, 52], 44: [1, 53] }, { 46: [1, 54] }, { 49: [1, 55] }, t(ct, [2, 44], { 58: [1, 56] }), t(ct, [2, 45], { 58: [1, 57] }), t(y, [2, 38]), t(y, [2, 39]), t(y, [2, 40]), t(y, [2, 41]), t(y, [2, 6]), t(y, [2, 13]), { 13: 58, 24: m, 57: H }, t(y, [2, 17]), t(xt, r, { 7: 59 }), { 24: [1, 60] }, { 24: [1, 61] }, { 23: [1, 62] }, { 24: [2, 48] }, { 24: [2, 49] }, t(y, [2, 29]), t(y, [2, 30]), { 39: [1, 63], 40: [1, 64] }, { 43: [1, 65] }, { 43: [1, 66] }, { 47: [1, 67] }, { 50: [1, 68] }, { 24: [1, 69] }, { 24: [1, 70] }, t(y, [2, 14], { 14: [1, 71] }), { 4: h, 5: d, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: S, 17: f, 19: T, 21: [1, 72], 22: _, 24: m, 25: A, 26: v, 27: p, 28: k, 29: R, 32: 25, 33: L, 35: $, 37: I, 38: P, 41: st, 45: it, 48: rt, 51: at, 52: nt, 53: ot, 54: lt, 57: H }, t(y, [2, 20], { 20: [1, 73] }), { 31: [1, 74] }, { 24: [1, 75] }, { 39: [1, 76] }, { 39: [1, 77] }, t(y, [2, 34]), t(y, [2, 35]), t(y, [2, 36]), t(y, [2, 37]), t(ct, [2, 46]), t(ct, [2, 47]), t(y, [2, 15]), t(y, [2, 19]), t(xt, r, { 7: 78 }), t(y, [2, 26]), t(y, [2, 27]), { 5: [1, 79] }, { 5: [1, 80] }, { 4: h, 5: d, 8: 8, 9: 10, 10: 12, 11: 13, 12: 14, 13: 15, 16: S, 17: f, 19: T, 21: [1, 81], 22: _, 24: m, 25: A, 26: v, 27: p, 28: k, 29: R, 32: 25, 33: L, 35: $, 37: I, 38: P, 41: st, 45: it, 48: rt, 51: at, 52: nt, 53: ot, 54: lt, 57: H }, t(y, [2, 32]), t(y, [2, 33]), t(y, [2, 21])],
134
- defaultActions: { 5: [2, 1], 6: [2, 2], 47: [2, 48], 48: [2, 49] },
135
- parseError: /* @__PURE__ */ u(function(o, c) {
136
- if (c.recoverable)
137
- this.trace(o);
138
- else {
139
- var n = new Error(o);
140
- throw n.hash = c, n;
141
- }
142
- }, "parseError"),
143
- parse: /* @__PURE__ */ u(function(o) {
144
- var c = this, n = [0], g = [], E = [null], i = [], J = this.table, l = "", B = 0, W = 0, ut = 2, q = 1, Tt = i.slice.call(arguments, 1), D = Object.create(this.lexer), V = { yy: {} };
145
- for (var Et in this.yy)
146
- Object.prototype.hasOwnProperty.call(this.yy, Et) && (V.yy[Et] = this.yy[Et]);
147
- D.setInput(o, V.yy), V.yy.lexer = D, V.yy.parser = this, typeof D.yylloc > "u" && (D.yylloc = {});
148
- var _t = D.yylloc;
149
- i.push(_t);
150
- var Qt = D.options && D.options.ranges;
151
- typeof V.yy.parseError == "function" ? this.parseError = V.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
152
- function Zt(O) {
153
- n.length = n.length - 2 * O, E.length = E.length - O, i.length = i.length - O;
154
- }
155
- u(Zt, "popStack");
156
- function Lt() {
157
- var O;
158
- return O = g.pop() || D.lex() || q, typeof O != "number" && (O instanceof Array && (g = O, O = g.pop()), O = c.symbols_[O] || O), O;
159
- }
160
- u(Lt, "lex");
161
- for (var x, M, N, mt, z = {}, dt, F, It, ft; ; ) {
162
- if (M = n[n.length - 1], this.defaultActions[M] ? N = this.defaultActions[M] : ((x === null || typeof x > "u") && (x = Lt()), N = J[M] && J[M][x]), typeof N > "u" || !N.length || !N[0]) {
163
- var bt = "";
164
- ft = [];
165
- for (dt in J[M])
166
- this.terminals_[dt] && dt > ut && ft.push("'" + this.terminals_[dt] + "'");
167
- D.showPosition ? bt = "Parse error on line " + (B + 1) + `:
168
- ` + D.showPosition() + `
169
- Expecting ` + ft.join(", ") + ", got '" + (this.terminals_[x] || x) + "'" : bt = "Parse error on line " + (B + 1) + ": Unexpected " + (x == q ? "end of input" : "'" + (this.terminals_[x] || x) + "'"), this.parseError(bt, {
170
- text: D.match,
171
- token: this.terminals_[x] || x,
172
- line: D.yylineno,
173
- loc: _t,
174
- expected: ft
175
- });
176
- }
177
- if (N[0] instanceof Array && N.length > 1)
178
- throw new Error("Parse Error: multiple actions possible at state: " + M + ", token: " + x);
179
- switch (N[0]) {
180
- case 1:
181
- n.push(x), E.push(D.yytext), i.push(D.yylloc), n.push(N[1]), x = null, W = D.yyleng, l = D.yytext, B = D.yylineno, _t = D.yylloc;
182
- break;
183
- case 2:
184
- if (F = this.productions_[N[1]][1], z.$ = E[E.length - F], z._$ = {
185
- first_line: i[i.length - (F || 1)].first_line,
186
- last_line: i[i.length - 1].last_line,
187
- first_column: i[i.length - (F || 1)].first_column,
188
- last_column: i[i.length - 1].last_column
189
- }, Qt && (z._$.range = [
190
- i[i.length - (F || 1)].range[0],
191
- i[i.length - 1].range[1]
192
- ]), mt = this.performAction.apply(z, [
193
- l,
194
- W,
195
- B,
196
- V.yy,
197
- N[1],
198
- E,
199
- i
200
- ].concat(Tt)), typeof mt < "u")
201
- return mt;
202
- F && (n = n.slice(0, -1 * F * 2), E = E.slice(0, -1 * F), i = i.slice(0, -1 * F)), n.push(this.productions_[N[1]][0]), E.push(z.$), i.push(z._$), It = J[n[n.length - 2]][n[n.length - 1]], n.push(It);
203
- break;
204
- case 3:
205
- return !0;
206
- }
207
- }
208
- return !0;
209
- }, "parse")
210
- }, qt = /* @__PURE__ */ (function() {
211
- var Y = {
212
- EOF: 1,
213
- parseError: /* @__PURE__ */ u(function(c, n) {
214
- if (this.yy.parser)
215
- this.yy.parser.parseError(c, n);
216
- else
217
- throw new Error(c);
218
- }, "parseError"),
219
- // resets the lexer, sets new input
220
- setInput: /* @__PURE__ */ u(function(o, c) {
221
- return this.yy = c || this.yy || {}, this._input = o, this._more = this._backtrack = this.done = !1, this.yylineno = this.yyleng = 0, this.yytext = this.matched = this.match = "", this.conditionStack = ["INITIAL"], this.yylloc = {
222
- first_line: 1,
223
- first_column: 0,
224
- last_line: 1,
225
- last_column: 0
226
- }, this.options.ranges && (this.yylloc.range = [0, 0]), this.offset = 0, this;
227
- }, "setInput"),
228
- // consumes and returns one char from the input
229
- input: /* @__PURE__ */ u(function() {
230
- var o = this._input[0];
231
- this.yytext += o, this.yyleng++, this.offset++, this.match += o, this.matched += o;
232
- var c = o.match(/(?:\r\n?|\n).*/g);
233
- return c ? (this.yylineno++, this.yylloc.last_line++) : this.yylloc.last_column++, this.options.ranges && this.yylloc.range[1]++, this._input = this._input.slice(1), o;
234
- }, "input"),
235
- // unshifts one char (or a string) into the input
236
- unput: /* @__PURE__ */ u(function(o) {
237
- var c = o.length, n = o.split(/(?:\r\n?|\n)/g);
238
- this._input = o + this._input, this.yytext = this.yytext.substr(0, this.yytext.length - c), this.offset -= c;
239
- var g = this.match.split(/(?:\r\n?|\n)/g);
240
- this.match = this.match.substr(0, this.match.length - 1), this.matched = this.matched.substr(0, this.matched.length - 1), n.length - 1 && (this.yylineno -= n.length - 1);
241
- var E = this.yylloc.range;
242
- return this.yylloc = {
243
- first_line: this.yylloc.first_line,
244
- last_line: this.yylineno + 1,
245
- first_column: this.yylloc.first_column,
246
- last_column: n ? (n.length === g.length ? this.yylloc.first_column : 0) + g[g.length - n.length].length - n[0].length : this.yylloc.first_column - c
247
- }, this.options.ranges && (this.yylloc.range = [E[0], E[0] + this.yyleng - c]), this.yyleng = this.yytext.length, this;
248
- }, "unput"),
249
- // When called from action, caches matched text and appends it on next action
250
- more: /* @__PURE__ */ u(function() {
251
- return this._more = !0, this;
252
- }, "more"),
253
- // When called from action, signals the lexer that this rule fails to match the input, so the next matching rule (regex) should be tested instead.
254
- reject: /* @__PURE__ */ u(function() {
255
- if (this.options.backtrack_lexer)
256
- this._backtrack = !0;
257
- else
258
- return this.parseError("Lexical error on line " + (this.yylineno + 1) + `. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
259
- ` + this.showPosition(), {
260
- text: "",
261
- token: null,
262
- line: this.yylineno
263
- });
264
- return this;
265
- }, "reject"),
266
- // retain first n characters of the match
267
- less: /* @__PURE__ */ u(function(o) {
268
- this.unput(this.match.slice(o));
269
- }, "less"),
270
- // displays already matched input, i.e. for error messages
271
- pastInput: /* @__PURE__ */ u(function() {
272
- var o = this.matched.substr(0, this.matched.length - this.match.length);
273
- return (o.length > 20 ? "..." : "") + o.substr(-20).replace(/\n/g, "");
274
- }, "pastInput"),
275
- // displays upcoming input, i.e. for error messages
276
- upcomingInput: /* @__PURE__ */ u(function() {
277
- var o = this.match;
278
- return o.length < 20 && (o += this._input.substr(0, 20 - o.length)), (o.substr(0, 20) + (o.length > 20 ? "..." : "")).replace(/\n/g, "");
279
- }, "upcomingInput"),
280
- // displays the character position where the lexing error occurred, i.e. for error messages
281
- showPosition: /* @__PURE__ */ u(function() {
282
- var o = this.pastInput(), c = new Array(o.length + 1).join("-");
283
- return o + this.upcomingInput() + `
284
- ` + c + "^";
285
- }, "showPosition"),
286
- // test the lexed token: return FALSE when not a match, otherwise return token
287
- test_match: /* @__PURE__ */ u(function(o, c) {
288
- var n, g, E;
289
- if (this.options.backtrack_lexer && (E = {
290
- yylineno: this.yylineno,
291
- yylloc: {
292
- first_line: this.yylloc.first_line,
293
- last_line: this.last_line,
294
- first_column: this.yylloc.first_column,
295
- last_column: this.yylloc.last_column
296
- },
297
- yytext: this.yytext,
298
- match: this.match,
299
- matches: this.matches,
300
- matched: this.matched,
301
- yyleng: this.yyleng,
302
- offset: this.offset,
303
- _more: this._more,
304
- _input: this._input,
305
- yy: this.yy,
306
- conditionStack: this.conditionStack.slice(0),
307
- done: this.done
308
- }, this.options.ranges && (E.yylloc.range = this.yylloc.range.slice(0))), g = o[0].match(/(?:\r\n?|\n).*/g), g && (this.yylineno += g.length), this.yylloc = {
309
- first_line: this.yylloc.last_line,
310
- last_line: this.yylineno + 1,
311
- first_column: this.yylloc.last_column,
312
- last_column: g ? g[g.length - 1].length - g[g.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + o[0].length
313
- }, this.yytext += o[0], this.match += o[0], this.matches = o, this.yyleng = this.yytext.length, this.options.ranges && (this.yylloc.range = [this.offset, this.offset += this.yyleng]), this._more = !1, this._backtrack = !1, this._input = this._input.slice(o[0].length), this.matched += o[0], n = this.performAction.call(this, this.yy, this, c, this.conditionStack[this.conditionStack.length - 1]), this.done && this._input && (this.done = !1), n)
314
- return n;
315
- if (this._backtrack) {
316
- for (var i in E)
317
- this[i] = E[i];
318
- return !1;
319
- }
320
- return !1;
321
- }, "test_match"),
322
- // return next match in input
323
- next: /* @__PURE__ */ u(function() {
324
- if (this.done)
325
- return this.EOF;
326
- this._input || (this.done = !0);
327
- var o, c, n, g;
328
- this._more || (this.yytext = "", this.match = "");
329
- for (var E = this._currentRules(), i = 0; i < E.length; i++)
330
- if (n = this._input.match(this.rules[E[i]]), n && (!c || n[0].length > c[0].length)) {
331
- if (c = n, g = i, this.options.backtrack_lexer) {
332
- if (o = this.test_match(n, E[i]), o !== !1)
333
- return o;
334
- if (this._backtrack) {
335
- c = !1;
336
- continue;
337
- } else
338
- return !1;
339
- } else if (!this.options.flex)
340
- break;
341
- }
342
- return c ? (o = this.test_match(c, E[g]), o !== !1 ? o : !1) : this._input === "" ? this.EOF : this.parseError("Lexical error on line " + (this.yylineno + 1) + `. Unrecognized text.
343
- ` + this.showPosition(), {
344
- text: "",
345
- token: null,
346
- line: this.yylineno
347
- });
348
- }, "next"),
349
- // return next match that has a token
350
- lex: /* @__PURE__ */ u(function() {
351
- var c = this.next();
352
- return c || this.lex();
353
- }, "lex"),
354
- // activates a new lexer condition state (pushes the new lexer condition state onto the condition stack)
355
- begin: /* @__PURE__ */ u(function(c) {
356
- this.conditionStack.push(c);
357
- }, "begin"),
358
- // pop the previously active lexer condition state off the condition stack
359
- popState: /* @__PURE__ */ u(function() {
360
- var c = this.conditionStack.length - 1;
361
- return c > 0 ? this.conditionStack.pop() : this.conditionStack[0];
362
- }, "popState"),
363
- // produce the lexer rule set which is active for the currently active lexer condition state
364
- _currentRules: /* @__PURE__ */ u(function() {
365
- return this.conditionStack.length && this.conditionStack[this.conditionStack.length - 1] ? this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules : this.conditions.INITIAL.rules;
366
- }, "_currentRules"),
367
- // return the currently active lexer condition state; when an index argument is provided it produces the N-th previous condition state, if available
368
- topState: /* @__PURE__ */ u(function(c) {
369
- return c = this.conditionStack.length - 1 - Math.abs(c || 0), c >= 0 ? this.conditionStack[c] : "INITIAL";
370
- }, "topState"),
371
- // alias for begin(condition)
372
- pushState: /* @__PURE__ */ u(function(c) {
373
- this.begin(c);
374
- }, "pushState"),
375
- // return the number of states currently on the stack
376
- stateStackSize: /* @__PURE__ */ u(function() {
377
- return this.conditionStack.length;
378
- }, "stateStackSize"),
379
- options: { "case-insensitive": !0 },
380
- performAction: /* @__PURE__ */ u(function(c, n, g, E) {
381
- switch (g) {
382
- case 0:
383
- return 38;
384
- case 1:
385
- return 40;
386
- case 2:
387
- return 39;
388
- case 3:
389
- return 44;
390
- case 4:
391
- return 51;
392
- case 5:
393
- return 52;
394
- case 6:
395
- return 53;
396
- case 7:
397
- return 54;
398
- case 8:
399
- break;
400
- case 9:
401
- break;
402
- case 10:
403
- return 5;
404
- case 11:
405
- break;
406
- case 12:
407
- break;
408
- case 13:
409
- break;
410
- case 14:
411
- break;
412
- case 15:
413
- return this.pushState("SCALE"), 17;
414
- case 16:
415
- return 18;
416
- case 17:
417
- this.popState();
418
- break;
419
- case 18:
420
- return this.begin("acc_title"), 33;
421
- case 19:
422
- return this.popState(), "acc_title_value";
423
- case 20:
424
- return this.begin("acc_descr"), 35;
425
- case 21:
426
- return this.popState(), "acc_descr_value";
427
- case 22:
428
- this.begin("acc_descr_multiline");
429
- break;
430
- case 23:
431
- this.popState();
432
- break;
433
- case 24:
434
- return "acc_descr_multiline_value";
435
- case 25:
436
- return this.pushState("CLASSDEF"), 41;
437
- case 26:
438
- return this.popState(), this.pushState("CLASSDEFID"), "DEFAULT_CLASSDEF_ID";
439
- case 27:
440
- return this.popState(), this.pushState("CLASSDEFID"), 42;
441
- case 28:
442
- return this.popState(), 43;
443
- case 29:
444
- return this.pushState("CLASS"), 48;
445
- case 30:
446
- return this.popState(), this.pushState("CLASS_STYLE"), 49;
447
- case 31:
448
- return this.popState(), 50;
449
- case 32:
450
- return this.pushState("STYLE"), 45;
451
- case 33:
452
- return this.popState(), this.pushState("STYLEDEF_STYLES"), 46;
453
- case 34:
454
- return this.popState(), 47;
455
- case 35:
456
- return this.pushState("SCALE"), 17;
457
- case 36:
458
- return 18;
459
- case 37:
460
- this.popState();
461
- break;
462
- case 38:
463
- this.pushState("STATE");
464
- break;
465
- case 39:
466
- return this.popState(), n.yytext = n.yytext.slice(0, -8).trim(), 25;
467
- case 40:
468
- return this.popState(), n.yytext = n.yytext.slice(0, -8).trim(), 26;
469
- case 41:
470
- return this.popState(), n.yytext = n.yytext.slice(0, -10).trim(), 27;
471
- case 42:
472
- return this.popState(), n.yytext = n.yytext.slice(0, -8).trim(), 25;
473
- case 43:
474
- return this.popState(), n.yytext = n.yytext.slice(0, -8).trim(), 26;
475
- case 44:
476
- return this.popState(), n.yytext = n.yytext.slice(0, -10).trim(), 27;
477
- case 45:
478
- return 51;
479
- case 46:
480
- return 52;
481
- case 47:
482
- return 53;
483
- case 48:
484
- return 54;
485
- case 49:
486
- this.pushState("STATE_STRING");
487
- break;
488
- case 50:
489
- return this.pushState("STATE_ID"), "AS";
490
- case 51:
491
- return this.popState(), "ID";
492
- case 52:
493
- this.popState();
494
- break;
495
- case 53:
496
- return "STATE_DESCR";
497
- case 54:
498
- return 19;
499
- case 55:
500
- this.popState();
501
- break;
502
- case 56:
503
- return this.popState(), this.pushState("struct"), 20;
504
- case 57:
505
- break;
506
- case 58:
507
- return this.popState(), 21;
508
- case 59:
509
- break;
510
- case 60:
511
- return this.begin("NOTE"), 29;
512
- case 61:
513
- return this.popState(), this.pushState("NOTE_ID"), 59;
514
- case 62:
515
- return this.popState(), this.pushState("NOTE_ID"), 60;
516
- case 63:
517
- this.popState(), this.pushState("FLOATING_NOTE");
518
- break;
519
- case 64:
520
- return this.popState(), this.pushState("FLOATING_NOTE_ID"), "AS";
521
- case 65:
522
- break;
523
- case 66:
524
- return "NOTE_TEXT";
525
- case 67:
526
- return this.popState(), "ID";
527
- case 68:
528
- return this.popState(), this.pushState("NOTE_TEXT"), 24;
529
- case 69:
530
- return this.popState(), n.yytext = n.yytext.substr(2).trim(), 31;
531
- case 70:
532
- return this.popState(), n.yytext = n.yytext.slice(0, -8).trim(), 31;
533
- case 71:
534
- return 6;
535
- case 72:
536
- return 6;
537
- case 73:
538
- return 16;
539
- case 74:
540
- return 57;
541
- case 75:
542
- return 24;
543
- case 76:
544
- return n.yytext = n.yytext.trim(), 14;
545
- case 77:
546
- return 15;
547
- case 78:
548
- return 28;
549
- case 79:
550
- return 58;
551
- case 80:
552
- return 5;
553
- case 81:
554
- return "INVALID";
555
- }
556
- }, "anonymous"),
557
- rules: [/^(?:click\b)/i, /^(?:href\b)/i, /^(?:"[^"]*")/i, /^(?:default\b)/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:[^\}]%%[^\n]*)/i, /^(?:[\n]+)/i, /^(?:[\s]+)/i, /^(?:((?!\n)\s)+)/i, /^(?:#[^\n]*)/i, /^(?:%[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:accTitle\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*:\s*)/i, /^(?:(?!\n||)*[^\n]*)/i, /^(?:accDescr\s*\{\s*)/i, /^(?:[\}])/i, /^(?:[^\}]*)/i, /^(?:classDef\s+)/i, /^(?:DEFAULT\s+)/i, /^(?:\w+\s+)/i, /^(?:[^\n]*)/i, /^(?:class\s+)/i, /^(?:(\w+)+((,\s*\w+)*))/i, /^(?:[^\n]*)/i, /^(?:style\s+)/i, /^(?:[\w,]+\s+)/i, /^(?:[^\n]*)/i, /^(?:scale\s+)/i, /^(?:\d+)/i, /^(?:\s+width\b)/i, /^(?:state\s+)/i, /^(?:.*<<fork>>)/i, /^(?:.*<<join>>)/i, /^(?:.*<<choice>>)/i, /^(?:.*\[\[fork\]\])/i, /^(?:.*\[\[join\]\])/i, /^(?:.*\[\[choice\]\])/i, /^(?:.*direction\s+TB[^\n]*)/i, /^(?:.*direction\s+BT[^\n]*)/i, /^(?:.*direction\s+RL[^\n]*)/i, /^(?:.*direction\s+LR[^\n]*)/i, /^(?:["])/i, /^(?:\s*as\s+)/i, /^(?:[^\n\{]*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n\s\{]+)/i, /^(?:\n)/i, /^(?:\{)/i, /^(?:%%(?!\{)[^\n]*)/i, /^(?:\})/i, /^(?:[\n])/i, /^(?:note\s+)/i, /^(?:left of\b)/i, /^(?:right of\b)/i, /^(?:")/i, /^(?:\s*as\s*)/i, /^(?:["])/i, /^(?:[^"]*)/i, /^(?:[^\n]*)/i, /^(?:\s*[^:\n\s\-]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:[\s\S]*?end note\b)/i, /^(?:stateDiagram\s+)/i, /^(?:stateDiagram-v2\s+)/i, /^(?:hide empty description\b)/i, /^(?:\[\*\])/i, /^(?:[^:\n\s\-\{]+)/i, /^(?:\s*:[^:\n;]+)/i, /^(?:-->)/i, /^(?:--)/i, /^(?::::)/i, /^(?:$)/i, /^(?:.)/i],
558
- conditions: { LINE: { rules: [12, 13], inclusive: !1 }, struct: { rules: [12, 13, 25, 29, 32, 38, 45, 46, 47, 48, 57, 58, 59, 60, 74, 75, 76, 77, 78], inclusive: !1 }, FLOATING_NOTE_ID: { rules: [67], inclusive: !1 }, FLOATING_NOTE: { rules: [64, 65, 66], inclusive: !1 }, NOTE_TEXT: { rules: [69, 70], inclusive: !1 }, NOTE_ID: { rules: [68], inclusive: !1 }, NOTE: { rules: [61, 62, 63], inclusive: !1 }, STYLEDEF_STYLEOPTS: { rules: [], inclusive: !1 }, STYLEDEF_STYLES: { rules: [34], inclusive: !1 }, STYLE_IDS: { rules: [], inclusive: !1 }, STYLE: { rules: [33], inclusive: !1 }, CLASS_STYLE: { rules: [31], inclusive: !1 }, CLASS: { rules: [30], inclusive: !1 }, CLASSDEFID: { rules: [28], inclusive: !1 }, CLASSDEF: { rules: [26, 27], inclusive: !1 }, acc_descr_multiline: { rules: [23, 24], inclusive: !1 }, acc_descr: { rules: [21], inclusive: !1 }, acc_title: { rules: [19], inclusive: !1 }, SCALE: { rules: [16, 17, 36, 37], inclusive: !1 }, ALIAS: { rules: [], inclusive: !1 }, STATE_ID: { rules: [51], inclusive: !1 }, STATE_STRING: { rules: [52, 53], inclusive: !1 }, FORK_STATE: { rules: [], inclusive: !1 }, STATE: { rules: [12, 13, 39, 40, 41, 42, 43, 44, 49, 50, 54, 55, 56], inclusive: !1 }, ID: { rules: [12, 13], inclusive: !1 }, INITIAL: { rules: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 18, 20, 22, 25, 29, 32, 35, 38, 56, 60, 71, 72, 73, 74, 75, 76, 77, 79, 80, 81], inclusive: !0 } }
559
- };
560
- return Y;
561
- })();
562
- gt.lexer = qt;
563
- function ht() {
564
- this.yy = {};
565
- }
566
- return u(ht, "Parser"), ht.prototype = gt, gt.Parser = ht, new ht();
567
- })();
568
- vt.parser = vt;
569
- var Be = vt, de = "TB", Yt = "TB", Ot = "dir", X = "state", K = "root", Ct = "relation", fe = "classDef", pe = "style", Se = "applyClass", tt = "default", Gt = "divider", Bt = "fill:none", Vt = "fill: #333", Mt = "c", Ut = "text", jt = "normal", Dt = "rect", kt = "rectWithTitle", ye = "stateStart", ge = "stateEnd", Rt = "divider", Nt = "roundedWithTitle", Te = "note", Ee = "noteGroup", et = "statediagram", _e = "state", me = `${et}-${_e}`, Ht = "transition", be = "note", De = "note-edge", ke = `${Ht} ${De}`, ve = `${et}-${be}`, Ce = "cluster", Ae = `${et}-${Ce}`, xe = "cluster-alt", Le = `${et}-${xe}`, Wt = "parent", zt = "note", Ie = "state", At = "----", Oe = `${At}${zt}`, wt = `${At}${Wt}`, Kt = /* @__PURE__ */ u((t, e = Yt) => {
570
- if (!t.doc)
571
- return e;
572
- let s = e;
573
- for (const a of t.doc)
574
- a.stmt === "dir" && (s = a.value);
575
- return s;
576
- }, "getDir"), Re = /* @__PURE__ */ u(function(t, e) {
577
- return e.db.getClasses();
578
- }, "getClasses"), Ne = /* @__PURE__ */ u(async function(t, e, s, a) {
579
- b.info("REF0:"), b.info("Drawing state diagram (v2)", e);
580
- const { securityLevel: r, state: h, layout: d } = w();
581
- a.db.extract(a.db.getRootDocV2());
582
- const S = a.db.getData(), f = te(e, r);
583
- S.type = a.type, S.layoutAlgorithm = d, S.nodeSpacing = h?.nodeSpacing || 50, S.rankSpacing = h?.rankSpacing || 50, S.markers = ["barb"], S.diagramId = e, await se(S, f);
584
- const T = 8;
585
- try {
586
- (typeof a.db.getLinks == "function" ? a.db.getLinks() : /* @__PURE__ */ new Map()).forEach((m, A) => {
587
- const v = typeof A == "string" ? A : typeof A?.id == "string" ? A.id : "";
588
- if (!v) {
589
- b.warn("⚠️ Invalid or missing stateId from key:", JSON.stringify(A));
590
- return;
591
- }
592
- const p = f.node()?.querySelectorAll("g");
593
- let k;
594
- if (p?.forEach((I) => {
595
- I.textContent?.trim() === v && (k = I);
596
- }), !k) {
597
- b.warn("⚠️ Could not find node matching text:", v);
598
- return;
599
- }
600
- const R = k.parentNode;
601
- if (!R) {
602
- b.warn("⚠️ Node has no parent, cannot wrap:", v);
603
- return;
604
- }
605
- const L = document.createElementNS("http://www.w3.org/2000/svg", "a"), $ = m.url.replace(/^"+|"+$/g, "");
606
- if (L.setAttributeNS("http://www.w3.org/1999/xlink", "xlink:href", $), L.setAttribute("target", "_blank"), m.tooltip) {
607
- const I = m.tooltip.replace(/^"+|"+$/g, "");
608
- L.setAttribute("title", I);
609
- }
610
- R.replaceChild(L, k), L.appendChild(k), b.info("🔗 Wrapped node in <a> tag for:", v, m.url);
611
- });
612
- } catch (_) {
613
- b.error("❌ Error injecting clickable links:", _);
614
- }
615
- ie.insertTitle(
616
- f,
617
- "statediagramTitleText",
618
- h?.titleTopMargin ?? 25,
619
- a.db.getDiagramTitle()
620
- ), ee(f, T, et, h?.useMaxWidth ?? !0);
621
- }, "draw"), Ve = {
622
- getClasses: Re,
623
- draw: Ne,
624
- getDir: Kt
625
- }, St = /* @__PURE__ */ new Map(), G = 0;
626
- function yt(t = "", e = 0, s = "", a = At) {
627
- const r = s !== null && s.length > 0 ? `${a}${s}` : "";
628
- return `${Ie}-${t}${r}-${e}`;
629
- }
630
- u(yt, "stateDomId");
631
- var we = /* @__PURE__ */ u((t, e, s, a, r, h, d, S) => {
632
- b.trace("items", e), e.forEach((f) => {
633
- switch (f.stmt) {
634
- case X:
635
- Z(t, f, s, a, r, h, d, S);
636
- break;
637
- case tt:
638
- Z(t, f, s, a, r, h, d, S);
639
- break;
640
- case Ct:
641
- {
642
- Z(
643
- t,
644
- f.state1,
645
- s,
646
- a,
647
- r,
648
- h,
649
- d,
650
- S
651
- ), Z(
652
- t,
653
- f.state2,
654
- s,
655
- a,
656
- r,
657
- h,
658
- d,
659
- S
660
- );
661
- const T = {
662
- id: "edge" + G,
663
- start: f.state1.id,
664
- end: f.state2.id,
665
- arrowhead: "normal",
666
- arrowTypeEnd: "arrow_barb",
667
- style: Bt,
668
- labelStyle: "",
669
- label: U.sanitizeText(f.description ?? "", w()),
670
- arrowheadStyle: Vt,
671
- labelpos: Mt,
672
- labelType: Ut,
673
- thickness: jt,
674
- classes: Ht,
675
- look: d
676
- };
677
- r.push(T), G++;
678
- }
679
- break;
680
- }
681
- });
682
- }, "setupDoc"), $t = /* @__PURE__ */ u((t, e = Yt) => {
683
- let s = e;
684
- if (t.doc)
685
- for (const a of t.doc)
686
- a.stmt === "dir" && (s = a.value);
687
- return s;
688
- }, "getDir");
689
- function Q(t, e, s) {
690
- if (!e.id || e.id === "</join></fork>" || e.id === "</choice>")
691
- return;
692
- e.cssClasses && (Array.isArray(e.cssCompiledStyles) || (e.cssCompiledStyles = []), e.cssClasses.split(" ").forEach((r) => {
693
- const h = s.get(r);
694
- h && (e.cssCompiledStyles = [...e.cssCompiledStyles ?? [], ...h.styles]);
695
- }));
696
- const a = t.find((r) => r.id === e.id);
697
- a ? Object.assign(a, e) : t.push(e);
698
- }
699
- u(Q, "insertOrUpdateNode");
700
- function Xt(t) {
701
- return t?.classes?.join(" ") ?? "";
702
- }
703
- u(Xt, "getClassesFromDbInfo");
704
- function Jt(t) {
705
- return t?.styles ?? [];
706
- }
707
- u(Jt, "getStylesFromDbInfo");
708
- var Z = /* @__PURE__ */ u((t, e, s, a, r, h, d, S) => {
709
- const f = e.id, T = s.get(f), _ = Xt(T), m = Jt(T), A = w();
710
- if (b.info("dataFetcher parsedItem", e, T, m), f !== "root") {
711
- let v = Dt;
712
- e.start === !0 ? v = ye : e.start === !1 && (v = ge), e.type !== tt && (v = e.type), St.get(f) || St.set(f, {
713
- id: f,
714
- shape: v,
715
- description: U.sanitizeText(f, A),
716
- cssClasses: `${_} ${me}`,
717
- cssStyles: m
718
- });
719
- const p = St.get(f);
720
- e.description && (Array.isArray(p.description) ? (p.shape = kt, p.description.push(e.description)) : p.description?.length && p.description.length > 0 ? (p.shape = kt, p.description === f ? p.description = [e.description] : p.description = [p.description, e.description]) : (p.shape = Dt, p.description = e.description), p.description = U.sanitizeTextOrArray(p.description, A)), p.description?.length === 1 && p.shape === kt && (p.type === "group" ? p.shape = Nt : p.shape = Dt), !p.type && e.doc && (b.info("Setting cluster for XCX", f, $t(e)), p.type = "group", p.isGroup = !0, p.dir = $t(e), p.shape = e.type === Gt ? Rt : Nt, p.cssClasses = `${p.cssClasses} ${Ae} ${h ? Le : ""}`);
721
- const k = {
722
- labelStyle: "",
723
- shape: p.shape,
724
- label: p.description,
725
- cssClasses: p.cssClasses,
726
- cssCompiledStyles: [],
727
- cssStyles: p.cssStyles,
728
- id: f,
729
- dir: p.dir,
730
- domId: yt(f, G),
731
- type: p.type,
732
- isGroup: p.type === "group",
733
- padding: 8,
734
- rx: 10,
735
- ry: 10,
736
- look: d
737
- };
738
- if (k.shape === Rt && (k.label = ""), t && t.id !== "root" && (b.trace("Setting node ", f, " to be child of its parent ", t.id), k.parentId = t.id), k.centerLabel = !0, e.note) {
739
- const R = {
740
- labelStyle: "",
741
- shape: Te,
742
- label: e.note.text,
743
- cssClasses: ve,
744
- // useHtmlLabels: false,
745
- cssStyles: [],
746
- cssCompiledStyles: [],
747
- id: f + Oe + "-" + G,
748
- domId: yt(f, G, zt),
749
- type: p.type,
750
- isGroup: p.type === "group",
751
- padding: A.flowchart?.padding,
752
- look: d,
753
- position: e.note.position
754
- }, L = f + wt, $ = {
755
- labelStyle: "",
756
- shape: Ee,
757
- label: e.note.text,
758
- cssClasses: p.cssClasses,
759
- cssStyles: [],
760
- id: f + wt,
761
- domId: yt(f, G, Wt),
762
- type: "group",
763
- isGroup: !0,
764
- padding: 16,
765
- //getConfig().flowchart.padding
766
- look: d,
767
- position: e.note.position
768
- };
769
- G++, $.id = L, R.parentId = L, Q(a, $, S), Q(a, R, S), Q(a, k, S);
770
- let I = f, P = R.id;
771
- e.note.position === "left of" && (I = R.id, P = f), r.push({
772
- id: I + "-" + P,
773
- start: I,
774
- end: P,
775
- arrowhead: "none",
776
- arrowTypeEnd: "",
777
- style: Bt,
778
- labelStyle: "",
779
- classes: ke,
780
- arrowheadStyle: Vt,
781
- labelpos: Mt,
782
- labelType: Ut,
783
- thickness: jt,
784
- look: d
785
- });
786
- } else
787
- Q(a, k, S);
788
- }
789
- e.doc && (b.trace("Adding nodes children "), we(e, e.doc, s, a, r, !h, d, S));
790
- }, "dataFetcher"), $e = /* @__PURE__ */ u(() => {
791
- St.clear(), G = 0;
792
- }, "reset"), C = {
793
- START_NODE: "[*]",
794
- START_TYPE: "start",
795
- END_NODE: "[*]",
796
- END_TYPE: "end",
797
- COLOR_KEYWORD: "color",
798
- FILL_KEYWORD: "fill",
799
- BG_FILL: "bgFill",
800
- STYLECLASS_SEP: ","
801
- }, Pt = /* @__PURE__ */ u(() => /* @__PURE__ */ new Map(), "newClassesList"), Ft = /* @__PURE__ */ u(() => ({
802
- relations: [],
803
- states: /* @__PURE__ */ new Map(),
804
- documents: {}
805
- }), "newDoc"), pt = /* @__PURE__ */ u((t) => JSON.parse(JSON.stringify(t)), "clone"), j, Me = (j = class {
806
- constructor(e) {
807
- this.version = e, this.nodes = [], this.edges = [], this.rootDoc = [], this.classes = Pt(), this.documents = { root: Ft() }, this.currentDocument = this.documents.root, this.startEndCount = 0, this.dividerCnt = 0, this.links = /* @__PURE__ */ new Map(), this.getAccTitle = re, this.setAccTitle = ae, this.getAccDescription = ne, this.setAccDescription = oe, this.setDiagramTitle = le, this.getDiagramTitle = ce, this.clear(), this.setRootDoc = this.setRootDoc.bind(this), this.getDividerId = this.getDividerId.bind(this), this.setDirection = this.setDirection.bind(this), this.trimColon = this.trimColon.bind(this);
808
- }
809
- /**
810
- * Convert all of the statements (stmts) that were parsed into states and relationships.
811
- * This is done because a state diagram may have nested sections,
812
- * where each section is a 'document' and has its own set of statements.
813
- * Ex: the section within a fork has its own statements, and incoming and outgoing statements
814
- * refer to the fork as a whole (document).
815
- * See the parser grammar: the definition of a document is a document then a 'line', where a line can be a statement.
816
- * This will push the statement into the list of statements for the current document.
817
- */
818
- extract(e) {
819
- this.clear(!0);
820
- for (const r of Array.isArray(e) ? e : e.doc)
821
- switch (r.stmt) {
822
- case X:
823
- this.addState(r.id.trim(), r.type, r.doc, r.description, r.note);
824
- break;
825
- case Ct:
826
- this.addRelation(r.state1, r.state2, r.description);
827
- break;
828
- case fe:
829
- this.addStyleClass(r.id.trim(), r.classes);
830
- break;
831
- case pe:
832
- this.handleStyleDef(r);
833
- break;
834
- case Se:
835
- this.setCssClass(r.id.trim(), r.styleClass);
836
- break;
837
- case "click":
838
- this.addLink(r.id, r.url, r.tooltip);
839
- break;
840
- }
841
- const s = this.getStates(), a = w();
842
- $e(), Z(
843
- void 0,
844
- this.getRootDocV2(),
845
- s,
846
- this.nodes,
847
- this.edges,
848
- !0,
849
- a.look,
850
- this.classes
851
- );
852
- for (const r of this.nodes)
853
- if (Array.isArray(r.label)) {
854
- if (r.description = r.label.slice(1), r.isGroup && r.description.length > 0)
855
- throw new Error(
856
- `Group nodes can only have label. Remove the additional description for node [${r.id}]`
857
- );
858
- r.label = r.label[0];
859
- }
860
- }
861
- handleStyleDef(e) {
862
- const s = e.id.trim().split(","), a = e.styleClass.split(",");
863
- for (const r of s) {
864
- let h = this.getState(r);
865
- if (!h) {
866
- const d = r.trim();
867
- this.addState(d), h = this.getState(d);
868
- }
869
- h && (h.styles = a.map((d) => d.replace(/;/g, "")?.trim()));
870
- }
871
- }
872
- setRootDoc(e) {
873
- b.info("Setting root doc", e), this.rootDoc = e, this.version === 1 ? this.extract(e) : this.extract(this.getRootDocV2());
874
- }
875
- docTranslator(e, s, a) {
876
- if (s.stmt === Ct) {
877
- this.docTranslator(e, s.state1, !0), this.docTranslator(e, s.state2, !1);
878
- return;
879
- }
880
- if (s.stmt === X && (s.id === C.START_NODE ? (s.id = e.id + (a ? "_start" : "_end"), s.start = a) : s.id = s.id.trim()), s.stmt !== K && s.stmt !== X || !s.doc)
881
- return;
882
- const r = [];
883
- let h = [];
884
- for (const d of s.doc)
885
- if (d.type === Gt) {
886
- const S = pt(d);
887
- S.doc = pt(h), r.push(S), h = [];
888
- } else
889
- h.push(d);
890
- if (r.length > 0 && h.length > 0) {
891
- const d = {
892
- stmt: X,
893
- id: he(),
894
- type: "divider",
895
- doc: pt(h)
896
- };
897
- r.push(pt(d)), s.doc = r;
898
- }
899
- s.doc.forEach((d) => this.docTranslator(s, d, !0));
900
- }
901
- getRootDocV2() {
902
- return this.docTranslator(
903
- { id: K, stmt: K },
904
- { id: K, stmt: K, doc: this.rootDoc },
905
- !0
906
- ), { id: K, doc: this.rootDoc };
907
- }
908
- /**
909
- * Function called by parser when a node definition has been found.
910
- *
911
- * @param descr - description for the state. Can be a string or a list or strings
912
- * @param classes - class styles to apply to this state. Can be a string (1 style) or an array of styles. If it's just 1 class, convert it to an array of that 1 class.
913
- * @param styles - styles to apply to this state. Can be a string (1 style) or an array of styles. If it's just 1 style, convert it to an array of that 1 style.
914
- * @param textStyles - text styles to apply to this state. Can be a string (1 text test) or an array of text styles. If it's just 1 text style, convert it to an array of that 1 text style.
915
- */
916
- addState(e, s = tt, a = void 0, r = void 0, h = void 0, d = void 0, S = void 0, f = void 0) {
917
- const T = e?.trim();
918
- if (!this.currentDocument.states.has(T))
919
- b.info("Adding state ", T, r), this.currentDocument.states.set(T, {
920
- stmt: X,
921
- id: T,
922
- descriptions: [],
923
- type: s,
924
- doc: a,
925
- note: h,
926
- classes: [],
927
- styles: [],
928
- textStyles: []
929
- });
930
- else {
931
- const _ = this.currentDocument.states.get(T);
932
- if (!_)
933
- throw new Error(`State not found: ${T}`);
934
- _.doc || (_.doc = a), _.type || (_.type = s);
935
- }
936
- if (r && (b.info("Setting state description", T, r), (Array.isArray(r) ? r : [r]).forEach((m) => this.addDescription(T, m.trim()))), h) {
937
- const _ = this.currentDocument.states.get(T);
938
- if (!_)
939
- throw new Error(`State not found: ${T}`);
940
- _.note = h, _.note.text = U.sanitizeText(_.note.text, w());
941
- }
942
- d && (b.info("Setting state classes", T, d), (Array.isArray(d) ? d : [d]).forEach((m) => this.setCssClass(T, m.trim()))), S && (b.info("Setting state styles", T, S), (Array.isArray(S) ? S : [S]).forEach((m) => this.setStyle(T, m.trim()))), f && (b.info("Setting state styles", T, S), (Array.isArray(f) ? f : [f]).forEach((m) => this.setTextStyle(T, m.trim())));
943
- }
944
- clear(e) {
945
- this.nodes = [], this.edges = [], this.documents = { root: Ft() }, this.currentDocument = this.documents.root, this.startEndCount = 0, this.classes = Pt(), e || (this.links = /* @__PURE__ */ new Map(), ue());
946
- }
947
- getState(e) {
948
- return this.currentDocument.states.get(e);
949
- }
950
- getStates() {
951
- return this.currentDocument.states;
952
- }
953
- logDocuments() {
954
- b.info("Documents = ", this.documents);
955
- }
956
- getRelations() {
957
- return this.currentDocument.relations;
958
- }
959
- /**
960
- * Adds a clickable link to a state.
961
- */
962
- addLink(e, s, a) {
963
- this.links.set(e, { url: s, tooltip: a }), b.warn("Adding link", e, s, a);
964
- }
965
- /**
966
- * Get all registered links.
967
- */
968
- getLinks() {
969
- return this.links;
970
- }
971
- /**
972
- * If the id is a start node ( [*] ), then return a new id constructed from
973
- * the start node name and the current start node count.
974
- * else return the given id
975
- */
976
- startIdIfNeeded(e = "") {
977
- return e === C.START_NODE ? (this.startEndCount++, `${C.START_TYPE}${this.startEndCount}`) : e;
978
- }
979
- /**
980
- * If the id is a start node ( [*] ), then return the start type ('start')
981
- * else return the given type
982
- */
983
- startTypeIfNeeded(e = "", s = tt) {
984
- return e === C.START_NODE ? C.START_TYPE : s;
985
- }
986
- /**
987
- * If the id is an end node ( [*] ), then return a new id constructed from
988
- * the end node name and the current start_end node count.
989
- * else return the given id
990
- */
991
- endIdIfNeeded(e = "") {
992
- return e === C.END_NODE ? (this.startEndCount++, `${C.END_TYPE}${this.startEndCount}`) : e;
993
- }
994
- /**
995
- * If the id is an end node ( [*] ), then return the end type
996
- * else return the given type
997
- *
998
- */
999
- endTypeIfNeeded(e = "", s = tt) {
1000
- return e === C.END_NODE ? C.END_TYPE : s;
1001
- }
1002
- addRelationObjs(e, s, a = "") {
1003
- const r = this.startIdIfNeeded(e.id.trim()), h = this.startTypeIfNeeded(e.id.trim(), e.type), d = this.startIdIfNeeded(s.id.trim()), S = this.startTypeIfNeeded(s.id.trim(), s.type);
1004
- this.addState(
1005
- r,
1006
- h,
1007
- e.doc,
1008
- e.description,
1009
- e.note,
1010
- e.classes,
1011
- e.styles,
1012
- e.textStyles
1013
- ), this.addState(
1014
- d,
1015
- S,
1016
- s.doc,
1017
- s.description,
1018
- s.note,
1019
- s.classes,
1020
- s.styles,
1021
- s.textStyles
1022
- ), this.currentDocument.relations.push({
1023
- id1: r,
1024
- id2: d,
1025
- relationTitle: U.sanitizeText(a, w())
1026
- });
1027
- }
1028
- /**
1029
- * Add a relation between two items. The items may be full objects or just the string id of a state.
1030
- */
1031
- addRelation(e, s, a) {
1032
- if (typeof e == "object" && typeof s == "object")
1033
- this.addRelationObjs(e, s, a);
1034
- else if (typeof e == "string" && typeof s == "string") {
1035
- const r = this.startIdIfNeeded(e.trim()), h = this.startTypeIfNeeded(e), d = this.endIdIfNeeded(s.trim()), S = this.endTypeIfNeeded(s);
1036
- this.addState(r, h), this.addState(d, S), this.currentDocument.relations.push({
1037
- id1: r,
1038
- id2: d,
1039
- relationTitle: a ? U.sanitizeText(a, w()) : void 0
1040
- });
1041
- }
1042
- }
1043
- addDescription(e, s) {
1044
- const a = this.currentDocument.states.get(e), r = s.startsWith(":") ? s.replace(":", "").trim() : s;
1045
- a?.descriptions?.push(U.sanitizeText(r, w()));
1046
- }
1047
- cleanupLabel(e) {
1048
- return e.startsWith(":") ? e.slice(2).trim() : e.trim();
1049
- }
1050
- getDividerId() {
1051
- return this.dividerCnt++, `divider-id-${this.dividerCnt}`;
1052
- }
1053
- /**
1054
- * Called when the parser comes across a (style) class definition
1055
- * @example classDef my-style fill:#f96;
1056
- *
1057
- * @param id - the id of this (style) class
1058
- * @param styleAttributes - the string with 1 or more style attributes (each separated by a comma)
1059
- */
1060
- addStyleClass(e, s = "") {
1061
- this.classes.has(e) || this.classes.set(e, { id: e, styles: [], textStyles: [] });
1062
- const a = this.classes.get(e);
1063
- s && a && s.split(C.STYLECLASS_SEP).forEach((r) => {
1064
- const h = r.replace(/([^;]*);/, "$1").trim();
1065
- if (RegExp(C.COLOR_KEYWORD).exec(r)) {
1066
- const S = h.replace(C.FILL_KEYWORD, C.BG_FILL).replace(C.COLOR_KEYWORD, C.FILL_KEYWORD);
1067
- a.textStyles.push(S);
1068
- }
1069
- a.styles.push(h);
1070
- });
1071
- }
1072
- getClasses() {
1073
- return this.classes;
1074
- }
1075
- /**
1076
- * Add a (style) class or css class to a state with the given id.
1077
- * If the state isn't already in the list of known states, add it.
1078
- * Might be called by parser when a style class or CSS class should be applied to a state
1079
- *
1080
- * @param itemIds - The id or a list of ids of the item(s) to apply the css class to
1081
- * @param cssClassName - CSS class name
1082
- */
1083
- setCssClass(e, s) {
1084
- e.split(",").forEach((a) => {
1085
- let r = this.getState(a);
1086
- if (!r) {
1087
- const h = a.trim();
1088
- this.addState(h), r = this.getState(h);
1089
- }
1090
- r?.classes?.push(s);
1091
- });
1092
- }
1093
- /**
1094
- * Add a style to a state with the given id.
1095
- * @example style stateId fill:#f9f,stroke:#333,stroke-width:4px
1096
- * where 'style' is the keyword
1097
- * stateId is the id of a state
1098
- * the rest of the string is the styleText (all of the attributes to be applied to the state)
1099
- *
1100
- * @param itemId - The id of item to apply the style to
1101
- * @param styleText - the text of the attributes for the style
1102
- */
1103
- setStyle(e, s) {
1104
- this.getState(e)?.styles?.push(s);
1105
- }
1106
- /**
1107
- * Add a text style to a state with the given id
1108
- *
1109
- * @param itemId - The id of item to apply the css class to
1110
- * @param cssClassName - CSS class name
1111
- */
1112
- setTextStyle(e, s) {
1113
- this.getState(e)?.textStyles?.push(s);
1114
- }
1115
- /**
1116
- * Finds the direction statement in the root document.
1117
- * @returns the direction statement if present
1118
- */
1119
- getDirectionStatement() {
1120
- return this.rootDoc.find((e) => e.stmt === Ot);
1121
- }
1122
- getDirection() {
1123
- return this.getDirectionStatement()?.value ?? de;
1124
- }
1125
- setDirection(e) {
1126
- const s = this.getDirectionStatement();
1127
- s ? s.value = e : this.rootDoc.unshift({ stmt: Ot, value: e });
1128
- }
1129
- trimColon(e) {
1130
- return e.startsWith(":") ? e.slice(1).trim() : e.trim();
1131
- }
1132
- getData() {
1133
- const e = w();
1134
- return {
1135
- nodes: this.nodes,
1136
- edges: this.edges,
1137
- other: {},
1138
- config: e,
1139
- direction: Kt(this.getRootDocV2())
1140
- };
1141
- }
1142
- getConfig() {
1143
- return w().state;
1144
- }
1145
- }, u(j, "StateDB"), j.relationType = {
1146
- AGGREGATION: 0,
1147
- EXTENSION: 1,
1148
- COMPOSITION: 2,
1149
- DEPENDENCY: 3
1150
- }, j), Pe = /* @__PURE__ */ u((t) => `
1151
- defs #statediagram-barbEnd {
1152
- fill: ${t.transitionColor};
1153
- stroke: ${t.transitionColor};
1154
- }
1155
- g.stateGroup text {
1156
- fill: ${t.nodeBorder};
1157
- stroke: none;
1158
- font-size: 10px;
1159
- }
1160
- g.stateGroup text {
1161
- fill: ${t.textColor};
1162
- stroke: none;
1163
- font-size: 10px;
1164
-
1165
- }
1166
- g.stateGroup .state-title {
1167
- font-weight: bolder;
1168
- fill: ${t.stateLabelColor};
1169
- }
1170
-
1171
- g.stateGroup rect {
1172
- fill: ${t.mainBkg};
1173
- stroke: ${t.nodeBorder};
1174
- }
1175
-
1176
- g.stateGroup line {
1177
- stroke: ${t.lineColor};
1178
- stroke-width: 1;
1179
- }
1180
-
1181
- .transition {
1182
- stroke: ${t.transitionColor};
1183
- stroke-width: 1;
1184
- fill: none;
1185
- }
1186
-
1187
- .stateGroup .composit {
1188
- fill: ${t.background};
1189
- border-bottom: 1px
1190
- }
1191
-
1192
- .stateGroup .alt-composit {
1193
- fill: #e0e0e0;
1194
- border-bottom: 1px
1195
- }
1196
-
1197
- .state-note {
1198
- stroke: ${t.noteBorderColor};
1199
- fill: ${t.noteBkgColor};
1200
-
1201
- text {
1202
- fill: ${t.noteTextColor};
1203
- stroke: none;
1204
- font-size: 10px;
1205
- }
1206
- }
1207
-
1208
- .stateLabel .box {
1209
- stroke: none;
1210
- stroke-width: 0;
1211
- fill: ${t.mainBkg};
1212
- opacity: 0.5;
1213
- }
1214
-
1215
- .edgeLabel .label rect {
1216
- fill: ${t.labelBackgroundColor};
1217
- opacity: 0.5;
1218
- }
1219
- .edgeLabel {
1220
- background-color: ${t.edgeLabelBackground};
1221
- p {
1222
- background-color: ${t.edgeLabelBackground};
1223
- }
1224
- rect {
1225
- opacity: 0.5;
1226
- background-color: ${t.edgeLabelBackground};
1227
- fill: ${t.edgeLabelBackground};
1228
- }
1229
- text-align: center;
1230
- }
1231
- .edgeLabel .label text {
1232
- fill: ${t.transitionLabelColor || t.tertiaryTextColor};
1233
- }
1234
- .label div .edgeLabel {
1235
- color: ${t.transitionLabelColor || t.tertiaryTextColor};
1236
- }
1237
-
1238
- .stateLabel text {
1239
- fill: ${t.stateLabelColor};
1240
- font-size: 10px;
1241
- font-weight: bold;
1242
- }
1243
-
1244
- .node circle.state-start {
1245
- fill: ${t.specialStateColor};
1246
- stroke: ${t.specialStateColor};
1247
- }
1248
-
1249
- .node .fork-join {
1250
- fill: ${t.specialStateColor};
1251
- stroke: ${t.specialStateColor};
1252
- }
1253
-
1254
- .node circle.state-end {
1255
- fill: ${t.innerEndBackground};
1256
- stroke: ${t.background};
1257
- stroke-width: 1.5
1258
- }
1259
- .end-state-inner {
1260
- fill: ${t.compositeBackground || t.background};
1261
- // stroke: ${t.background};
1262
- stroke-width: 1.5
1263
- }
1264
-
1265
- .node rect {
1266
- fill: ${t.stateBkg || t.mainBkg};
1267
- stroke: ${t.stateBorder || t.nodeBorder};
1268
- stroke-width: 1px;
1269
- }
1270
- .node polygon {
1271
- fill: ${t.mainBkg};
1272
- stroke: ${t.stateBorder || t.nodeBorder};;
1273
- stroke-width: 1px;
1274
- }
1275
- #statediagram-barbEnd {
1276
- fill: ${t.lineColor};
1277
- }
1278
-
1279
- .statediagram-cluster rect {
1280
- fill: ${t.compositeTitleBackground};
1281
- stroke: ${t.stateBorder || t.nodeBorder};
1282
- stroke-width: 1px;
1283
- }
1284
-
1285
- .cluster-label, .nodeLabel {
1286
- color: ${t.stateLabelColor};
1287
- // line-height: 1;
1288
- }
1289
-
1290
- .statediagram-cluster rect.outer {
1291
- rx: 5px;
1292
- ry: 5px;
1293
- }
1294
- .statediagram-state .divider {
1295
- stroke: ${t.stateBorder || t.nodeBorder};
1296
- }
1297
-
1298
- .statediagram-state .title-state {
1299
- rx: 5px;
1300
- ry: 5px;
1301
- }
1302
- .statediagram-cluster.statediagram-cluster .inner {
1303
- fill: ${t.compositeBackground || t.background};
1304
- }
1305
- .statediagram-cluster.statediagram-cluster-alt .inner {
1306
- fill: ${t.altBackground ? t.altBackground : "#efefef"};
1307
- }
1308
-
1309
- .statediagram-cluster .inner {
1310
- rx:0;
1311
- ry:0;
1312
- }
1313
-
1314
- .statediagram-state rect.basic {
1315
- rx: 5px;
1316
- ry: 5px;
1317
- }
1318
- .statediagram-state rect.divider {
1319
- stroke-dasharray: 10,10;
1320
- fill: ${t.altBackground ? t.altBackground : "#efefef"};
1321
- }
1322
-
1323
- .note-edge {
1324
- stroke-dasharray: 5;
1325
- }
1326
-
1327
- .statediagram-note rect {
1328
- fill: ${t.noteBkgColor};
1329
- stroke: ${t.noteBorderColor};
1330
- stroke-width: 1px;
1331
- rx: 0;
1332
- ry: 0;
1333
- }
1334
- .statediagram-note rect {
1335
- fill: ${t.noteBkgColor};
1336
- stroke: ${t.noteBorderColor};
1337
- stroke-width: 1px;
1338
- rx: 0;
1339
- ry: 0;
1340
- }
1341
-
1342
- .statediagram-note text {
1343
- fill: ${t.noteTextColor};
1344
- }
1345
-
1346
- .statediagram-note .nodeLabel {
1347
- color: ${t.noteTextColor};
1348
- }
1349
- .statediagram .edgeLabel {
1350
- color: red; // ${t.noteTextColor};
1351
- }
1352
-
1353
- #dependencyStart, #dependencyEnd {
1354
- fill: ${t.lineColor};
1355
- stroke: ${t.lineColor};
1356
- stroke-width: 1;
1357
- }
1358
-
1359
- .statediagramTitleText {
1360
- text-anchor: middle;
1361
- font-size: 18px;
1362
- fill: ${t.textColor};
1363
- }
1364
- `, "getStyles"), Ue = Pe;
1365
- export {
1366
- Me as S,
1367
- Be as a,
1368
- Ve as b,
1369
- Ue as s
1370
- };