@adoptai/genui-components 0.1.32

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 (554) hide show
  1. package/README.md +56 -0
  2. package/dist/builders/BuilderForm.d.ts +25 -0
  3. package/dist/builders/BuilderForm.d.ts.map +1 -0
  4. package/dist/builders/BuilderRecap.d.ts +12 -0
  5. package/dist/builders/BuilderRecap.d.ts.map +1 -0
  6. package/dist/builders/ContextSlot.d.ts +6 -0
  7. package/dist/builders/ContextSlot.d.ts.map +1 -0
  8. package/dist/builders/EscalationCard.d.ts +12 -0
  9. package/dist/builders/EscalationCard.d.ts.map +1 -0
  10. package/dist/builders/FieldRenderer.d.ts +12 -0
  11. package/dist/builders/FieldRenderer.d.ts.map +1 -0
  12. package/dist/builders/FormBuilder.d.ts +13 -0
  13. package/dist/builders/FormBuilder.d.ts.map +1 -0
  14. package/dist/builders/StepperBuilder.d.ts +20 -0
  15. package/dist/builders/StepperBuilder.d.ts.map +1 -0
  16. package/dist/builders/fields.d.ts +27 -0
  17. package/dist/builders/fields.d.ts.map +1 -0
  18. package/dist/builders/hooks.d.ts +22 -0
  19. package/dist/builders/hooks.d.ts.map +1 -0
  20. package/dist/builders/index.d.ts +20 -0
  21. package/dist/builders/index.d.ts.map +1 -0
  22. package/dist/builders/resolver.d.ts +10 -0
  23. package/dist/builders/resolver.d.ts.map +1 -0
  24. package/dist/builders/schemas.d.ts +130 -0
  25. package/dist/builders/schemas.d.ts.map +1 -0
  26. package/dist/builders/validateBuilder.d.ts +10 -0
  27. package/dist/builders/validateBuilder.d.ts.map +1 -0
  28. package/dist/composites/aging-report/resolver.cjs +339 -0
  29. package/dist/composites/aging-report/resolver.cjs.map +1 -0
  30. package/dist/composites/aging-report/resolver.d.ts +3 -0
  31. package/dist/composites/aging-report/resolver.d.ts.map +1 -0
  32. package/dist/composites/aging-report/resolver.js +337 -0
  33. package/dist/composites/aging-report/resolver.js.map +1 -0
  34. package/dist/composites/alert/resolver.cjs +510 -0
  35. package/dist/composites/alert/resolver.cjs.map +1 -0
  36. package/dist/composites/alert/resolver.d.ts +3 -0
  37. package/dist/composites/alert/resolver.d.ts.map +1 -0
  38. package/dist/composites/alert/resolver.js +508 -0
  39. package/dist/composites/alert/resolver.js.map +1 -0
  40. package/dist/composites/allocation-donut/resolver.cjs +363 -0
  41. package/dist/composites/allocation-donut/resolver.cjs.map +1 -0
  42. package/dist/composites/allocation-donut/resolver.d.ts +3 -0
  43. package/dist/composites/allocation-donut/resolver.d.ts.map +1 -0
  44. package/dist/composites/allocation-donut/resolver.js +361 -0
  45. package/dist/composites/allocation-donut/resolver.js.map +1 -0
  46. package/dist/composites/amortization-table/resolver.cjs +692 -0
  47. package/dist/composites/amortization-table/resolver.cjs.map +1 -0
  48. package/dist/composites/amortization-table/resolver.d.ts +3 -0
  49. package/dist/composites/amortization-table/resolver.d.ts.map +1 -0
  50. package/dist/composites/amortization-table/resolver.js +690 -0
  51. package/dist/composites/amortization-table/resolver.js.map +1 -0
  52. package/dist/composites/area-chart/resolver.cjs +334 -0
  53. package/dist/composites/area-chart/resolver.cjs.map +1 -0
  54. package/dist/composites/area-chart/resolver.d.ts +3 -0
  55. package/dist/composites/area-chart/resolver.d.ts.map +1 -0
  56. package/dist/composites/area-chart/resolver.js +332 -0
  57. package/dist/composites/area-chart/resolver.js.map +1 -0
  58. package/dist/composites/audit-trail/resolver.cjs +564 -0
  59. package/dist/composites/audit-trail/resolver.cjs.map +1 -0
  60. package/dist/composites/audit-trail/resolver.d.ts +3 -0
  61. package/dist/composites/audit-trail/resolver.d.ts.map +1 -0
  62. package/dist/composites/audit-trail/resolver.js +562 -0
  63. package/dist/composites/audit-trail/resolver.js.map +1 -0
  64. package/dist/composites/balance-sheet/resolver.cjs +475 -0
  65. package/dist/composites/balance-sheet/resolver.cjs.map +1 -0
  66. package/dist/composites/balance-sheet/resolver.d.ts +3 -0
  67. package/dist/composites/balance-sheet/resolver.d.ts.map +1 -0
  68. package/dist/composites/balance-sheet/resolver.js +469 -0
  69. package/dist/composites/balance-sheet/resolver.js.map +1 -0
  70. package/dist/composites/bullet-chart/resolver.cjs +300 -0
  71. package/dist/composites/bullet-chart/resolver.cjs.map +1 -0
  72. package/dist/composites/bullet-chart/resolver.d.ts +3 -0
  73. package/dist/composites/bullet-chart/resolver.d.ts.map +1 -0
  74. package/dist/composites/bullet-chart/resolver.js +298 -0
  75. package/dist/composites/bullet-chart/resolver.js.map +1 -0
  76. package/dist/composites/cash-flow-statement/resolver.cjs +757 -0
  77. package/dist/composites/cash-flow-statement/resolver.cjs.map +1 -0
  78. package/dist/composites/cash-flow-statement/resolver.d.ts +3 -0
  79. package/dist/composites/cash-flow-statement/resolver.d.ts.map +1 -0
  80. package/dist/composites/cash-flow-statement/resolver.js +751 -0
  81. package/dist/composites/cash-flow-statement/resolver.js.map +1 -0
  82. package/dist/composites/chart-of-accounts/resolver.cjs +603 -0
  83. package/dist/composites/chart-of-accounts/resolver.cjs.map +1 -0
  84. package/dist/composites/chart-of-accounts/resolver.d.ts +3 -0
  85. package/dist/composites/chart-of-accounts/resolver.d.ts.map +1 -0
  86. package/dist/composites/chart-of-accounts/resolver.js +601 -0
  87. package/dist/composites/chart-of-accounts/resolver.js.map +1 -0
  88. package/dist/composites/cited-answer/resolver.cjs +829 -0
  89. package/dist/composites/cited-answer/resolver.cjs.map +1 -0
  90. package/dist/composites/cited-answer/resolver.d.ts +3 -0
  91. package/dist/composites/cited-answer/resolver.d.ts.map +1 -0
  92. package/dist/composites/cited-answer/resolver.js +827 -0
  93. package/dist/composites/cited-answer/resolver.js.map +1 -0
  94. package/dist/composites/combo-chart/resolver.cjs +402 -0
  95. package/dist/composites/combo-chart/resolver.cjs.map +1 -0
  96. package/dist/composites/combo-chart/resolver.d.ts +3 -0
  97. package/dist/composites/combo-chart/resolver.d.ts.map +1 -0
  98. package/dist/composites/combo-chart/resolver.js +400 -0
  99. package/dist/composites/combo-chart/resolver.js.map +1 -0
  100. package/dist/composites/comparative-bar-chart/resolver.cjs +366 -0
  101. package/dist/composites/comparative-bar-chart/resolver.cjs.map +1 -0
  102. package/dist/composites/comparative-bar-chart/resolver.d.ts +3 -0
  103. package/dist/composites/comparative-bar-chart/resolver.d.ts.map +1 -0
  104. package/dist/composites/comparative-bar-chart/resolver.js +364 -0
  105. package/dist/composites/comparative-bar-chart/resolver.js.map +1 -0
  106. package/dist/composites/compliance-checklist/resolver.cjs +618 -0
  107. package/dist/composites/compliance-checklist/resolver.cjs.map +1 -0
  108. package/dist/composites/compliance-checklist/resolver.d.ts +3 -0
  109. package/dist/composites/compliance-checklist/resolver.d.ts.map +1 -0
  110. package/dist/composites/compliance-checklist/resolver.js +616 -0
  111. package/dist/composites/compliance-checklist/resolver.js.map +1 -0
  112. package/dist/composites/connect-integration/resolver.d.ts +3 -0
  113. package/dist/composites/connect-integration/resolver.d.ts.map +1 -0
  114. package/dist/composites/data-table/resolver.cjs +324 -0
  115. package/dist/composites/data-table/resolver.cjs.map +1 -0
  116. package/dist/composites/data-table/resolver.d.ts +3 -0
  117. package/dist/composites/data-table/resolver.d.ts.map +1 -0
  118. package/dist/composites/data-table/resolver.js +322 -0
  119. package/dist/composites/data-table/resolver.js.map +1 -0
  120. package/dist/composites/depreciation-schedule/resolver.cjs +726 -0
  121. package/dist/composites/depreciation-schedule/resolver.cjs.map +1 -0
  122. package/dist/composites/depreciation-schedule/resolver.d.ts +3 -0
  123. package/dist/composites/depreciation-schedule/resolver.d.ts.map +1 -0
  124. package/dist/composites/depreciation-schedule/resolver.js +724 -0
  125. package/dist/composites/depreciation-schedule/resolver.js.map +1 -0
  126. package/dist/composites/document-preview/ExcelViewer.d.ts +8 -0
  127. package/dist/composites/document-preview/ExcelViewer.d.ts.map +1 -0
  128. package/dist/composites/document-preview/PdfViewer.d.ts +10 -0
  129. package/dist/composites/document-preview/PdfViewer.d.ts.map +1 -0
  130. package/dist/composites/document-preview/resolver.cjs +1036 -0
  131. package/dist/composites/document-preview/resolver.cjs.map +1 -0
  132. package/dist/composites/document-preview/resolver.d.ts +3 -0
  133. package/dist/composites/document-preview/resolver.d.ts.map +1 -0
  134. package/dist/composites/document-preview/resolver.js +1011 -0
  135. package/dist/composites/document-preview/resolver.js.map +1 -0
  136. package/dist/composites/document-preview/useFullscreen.d.ts +8 -0
  137. package/dist/composites/document-preview/useFullscreen.d.ts.map +1 -0
  138. package/dist/composites/download-card/resolver.cjs +1831 -0
  139. package/dist/composites/download-card/resolver.cjs.map +1 -0
  140. package/dist/composites/download-card/resolver.d.ts +3 -0
  141. package/dist/composites/download-card/resolver.d.ts.map +1 -0
  142. package/dist/composites/download-card/resolver.js +1804 -0
  143. package/dist/composites/download-card/resolver.js.map +1 -0
  144. package/dist/composites/engagement-pipeline/resolver.cjs +834 -0
  145. package/dist/composites/engagement-pipeline/resolver.cjs.map +1 -0
  146. package/dist/composites/engagement-pipeline/resolver.d.ts +3 -0
  147. package/dist/composites/engagement-pipeline/resolver.d.ts.map +1 -0
  148. package/dist/composites/engagement-pipeline/resolver.js +828 -0
  149. package/dist/composites/engagement-pipeline/resolver.js.map +1 -0
  150. package/dist/composites/entity-card-grid/resolver.cjs +444 -0
  151. package/dist/composites/entity-card-grid/resolver.cjs.map +1 -0
  152. package/dist/composites/entity-card-grid/resolver.d.ts +3 -0
  153. package/dist/composites/entity-card-grid/resolver.d.ts.map +1 -0
  154. package/dist/composites/entity-card-grid/resolver.js +442 -0
  155. package/dist/composites/entity-card-grid/resolver.js.map +1 -0
  156. package/dist/composites/escalation-card/resolver.cjs +359 -0
  157. package/dist/composites/escalation-card/resolver.cjs.map +1 -0
  158. package/dist/composites/escalation-card/resolver.d.ts +3 -0
  159. package/dist/composites/escalation-card/resolver.d.ts.map +1 -0
  160. package/dist/composites/escalation-card/resolver.js +357 -0
  161. package/dist/composites/escalation-card/resolver.js.map +1 -0
  162. package/dist/composites/file-browser/resolver.cjs +440 -0
  163. package/dist/composites/file-browser/resolver.cjs.map +1 -0
  164. package/dist/composites/file-browser/resolver.d.ts +3 -0
  165. package/dist/composites/file-browser/resolver.d.ts.map +1 -0
  166. package/dist/composites/file-browser/resolver.js +438 -0
  167. package/dist/composites/file-browser/resolver.js.map +1 -0
  168. package/dist/composites/flow-canvas/DiagramStreamParser.d.ts +15 -0
  169. package/dist/composites/flow-canvas/DiagramStreamParser.d.ts.map +1 -0
  170. package/dist/composites/flow-canvas/ElementStreamParser.d.ts +19 -0
  171. package/dist/composites/flow-canvas/ElementStreamParser.d.ts.map +1 -0
  172. package/dist/composites/flow-canvas/ExcalidrawCanvas.d.ts +8 -0
  173. package/dist/composites/flow-canvas/ExcalidrawCanvas.d.ts.map +1 -0
  174. package/dist/composites/flow-canvas/FlowGraph.d.ts +11 -0
  175. package/dist/composites/flow-canvas/FlowGraph.d.ts.map +1 -0
  176. package/dist/composites/flow-canvas/layoutFlow.d.ts +18 -0
  177. package/dist/composites/flow-canvas/layoutFlow.d.ts.map +1 -0
  178. package/dist/composites/flow-canvas/parseMermaidFlow.d.ts +24 -0
  179. package/dist/composites/flow-canvas/parseMermaidFlow.d.ts.map +1 -0
  180. package/dist/composites/flow-canvas/resolver.cjs +1295 -0
  181. package/dist/composites/flow-canvas/resolver.cjs.map +1 -0
  182. package/dist/composites/flow-canvas/resolver.d.ts +12 -0
  183. package/dist/composites/flow-canvas/resolver.d.ts.map +1 -0
  184. package/dist/composites/flow-canvas/resolver.js +1287 -0
  185. package/dist/composites/flow-canvas/resolver.js.map +1 -0
  186. package/dist/composites/funnel-chart/resolver.cjs +315 -0
  187. package/dist/composites/funnel-chart/resolver.cjs.map +1 -0
  188. package/dist/composites/funnel-chart/resolver.d.ts +3 -0
  189. package/dist/composites/funnel-chart/resolver.d.ts.map +1 -0
  190. package/dist/composites/funnel-chart/resolver.js +313 -0
  191. package/dist/composites/funnel-chart/resolver.js.map +1 -0
  192. package/dist/composites/gauge-chart/resolver.cjs +294 -0
  193. package/dist/composites/gauge-chart/resolver.cjs.map +1 -0
  194. package/dist/composites/gauge-chart/resolver.d.ts +3 -0
  195. package/dist/composites/gauge-chart/resolver.d.ts.map +1 -0
  196. package/dist/composites/gauge-chart/resolver.js +292 -0
  197. package/dist/composites/gauge-chart/resolver.js.map +1 -0
  198. package/dist/composites/general-ledger/resolver.cjs +543 -0
  199. package/dist/composites/general-ledger/resolver.cjs.map +1 -0
  200. package/dist/composites/general-ledger/resolver.d.ts +3 -0
  201. package/dist/composites/general-ledger/resolver.d.ts.map +1 -0
  202. package/dist/composites/general-ledger/resolver.js +541 -0
  203. package/dist/composites/general-ledger/resolver.js.map +1 -0
  204. package/dist/composites/grouped-table/resolver.cjs +388 -0
  205. package/dist/composites/grouped-table/resolver.cjs.map +1 -0
  206. package/dist/composites/grouped-table/resolver.d.ts +3 -0
  207. package/dist/composites/grouped-table/resolver.d.ts.map +1 -0
  208. package/dist/composites/grouped-table/resolver.js +386 -0
  209. package/dist/composites/grouped-table/resolver.js.map +1 -0
  210. package/dist/composites/heatmap-table/resolver.cjs +380 -0
  211. package/dist/composites/heatmap-table/resolver.cjs.map +1 -0
  212. package/dist/composites/heatmap-table/resolver.d.ts +3 -0
  213. package/dist/composites/heatmap-table/resolver.d.ts.map +1 -0
  214. package/dist/composites/heatmap-table/resolver.js +378 -0
  215. package/dist/composites/heatmap-table/resolver.js.map +1 -0
  216. package/dist/composites/income-statement/resolver.cjs +583 -0
  217. package/dist/composites/income-statement/resolver.cjs.map +1 -0
  218. package/dist/composites/income-statement/resolver.d.ts +3 -0
  219. package/dist/composites/income-statement/resolver.d.ts.map +1 -0
  220. package/dist/composites/income-statement/resolver.js +577 -0
  221. package/dist/composites/income-statement/resolver.js.map +1 -0
  222. package/dist/composites/integrations-list/resolver.d.ts +3 -0
  223. package/dist/composites/integrations-list/resolver.d.ts.map +1 -0
  224. package/dist/composites/invoice-detail/resolver.cjs +1086 -0
  225. package/dist/composites/invoice-detail/resolver.cjs.map +1 -0
  226. package/dist/composites/invoice-detail/resolver.d.ts +3 -0
  227. package/dist/composites/invoice-detail/resolver.d.ts.map +1 -0
  228. package/dist/composites/invoice-detail/resolver.js +1084 -0
  229. package/dist/composites/invoice-detail/resolver.js.map +1 -0
  230. package/dist/composites/job-tracker/resolver.cjs +830 -0
  231. package/dist/composites/job-tracker/resolver.cjs.map +1 -0
  232. package/dist/composites/job-tracker/resolver.d.ts +3 -0
  233. package/dist/composites/job-tracker/resolver.d.ts.map +1 -0
  234. package/dist/composites/job-tracker/resolver.js +828 -0
  235. package/dist/composites/job-tracker/resolver.js.map +1 -0
  236. package/dist/composites/journal-entry/resolver.cjs +324 -0
  237. package/dist/composites/journal-entry/resolver.cjs.map +1 -0
  238. package/dist/composites/journal-entry/resolver.d.ts +3 -0
  239. package/dist/composites/journal-entry/resolver.d.ts.map +1 -0
  240. package/dist/composites/journal-entry/resolver.js +322 -0
  241. package/dist/composites/journal-entry/resolver.js.map +1 -0
  242. package/dist/composites/key-value-list/resolver.cjs +708 -0
  243. package/dist/composites/key-value-list/resolver.cjs.map +1 -0
  244. package/dist/composites/key-value-list/resolver.d.ts +3 -0
  245. package/dist/composites/key-value-list/resolver.d.ts.map +1 -0
  246. package/dist/composites/key-value-list/resolver.js +702 -0
  247. package/dist/composites/key-value-list/resolver.js.map +1 -0
  248. package/dist/composites/legal-test-result/resolver.cjs +666 -0
  249. package/dist/composites/legal-test-result/resolver.cjs.map +1 -0
  250. package/dist/composites/legal-test-result/resolver.d.ts +3 -0
  251. package/dist/composites/legal-test-result/resolver.d.ts.map +1 -0
  252. package/dist/composites/legal-test-result/resolver.js +664 -0
  253. package/dist/composites/legal-test-result/resolver.js.map +1 -0
  254. package/dist/composites/line-chart/resolver.cjs +344 -0
  255. package/dist/composites/line-chart/resolver.cjs.map +1 -0
  256. package/dist/composites/line-chart/resolver.d.ts +3 -0
  257. package/dist/composites/line-chart/resolver.d.ts.map +1 -0
  258. package/dist/composites/line-chart/resolver.js +342 -0
  259. package/dist/composites/line-chart/resolver.js.map +1 -0
  260. package/dist/composites/news-feed/resolver.cjs +539 -0
  261. package/dist/composites/news-feed/resolver.cjs.map +1 -0
  262. package/dist/composites/news-feed/resolver.d.ts +3 -0
  263. package/dist/composites/news-feed/resolver.d.ts.map +1 -0
  264. package/dist/composites/news-feed/resolver.js +537 -0
  265. package/dist/composites/news-feed/resolver.js.map +1 -0
  266. package/dist/composites/ops-dashboard/resolver.cjs +430 -0
  267. package/dist/composites/ops-dashboard/resolver.cjs.map +1 -0
  268. package/dist/composites/ops-dashboard/resolver.d.ts +3 -0
  269. package/dist/composites/ops-dashboard/resolver.d.ts.map +1 -0
  270. package/dist/composites/ops-dashboard/resolver.js +428 -0
  271. package/dist/composites/ops-dashboard/resolver.js.map +1 -0
  272. package/dist/composites/pipeline-preview/layout.d.ts +39 -0
  273. package/dist/composites/pipeline-preview/layout.d.ts.map +1 -0
  274. package/dist/composites/pipeline-preview/opMeta.d.ts +9 -0
  275. package/dist/composites/pipeline-preview/opMeta.d.ts.map +1 -0
  276. package/dist/composites/pipeline-preview/resolver.d.ts +3 -0
  277. package/dist/composites/pipeline-preview/resolver.d.ts.map +1 -0
  278. package/dist/composites/provenance-chain/resolver.cjs +797 -0
  279. package/dist/composites/provenance-chain/resolver.cjs.map +1 -0
  280. package/dist/composites/provenance-chain/resolver.d.ts +3 -0
  281. package/dist/composites/provenance-chain/resolver.d.ts.map +1 -0
  282. package/dist/composites/provenance-chain/resolver.js +795 -0
  283. package/dist/composites/provenance-chain/resolver.js.map +1 -0
  284. package/dist/composites/radar-chart/resolver.cjs +323 -0
  285. package/dist/composites/radar-chart/resolver.cjs.map +1 -0
  286. package/dist/composites/radar-chart/resolver.d.ts +3 -0
  287. package/dist/composites/radar-chart/resolver.d.ts.map +1 -0
  288. package/dist/composites/radar-chart/resolver.js +321 -0
  289. package/dist/composites/radar-chart/resolver.js.map +1 -0
  290. package/dist/composites/reconciliation-view/resolver.cjs +917 -0
  291. package/dist/composites/reconciliation-view/resolver.cjs.map +1 -0
  292. package/dist/composites/reconciliation-view/resolver.d.ts +3 -0
  293. package/dist/composites/reconciliation-view/resolver.d.ts.map +1 -0
  294. package/dist/composites/reconciliation-view/resolver.js +915 -0
  295. package/dist/composites/reconciliation-view/resolver.js.map +1 -0
  296. package/dist/composites/scatter-chart/resolver.cjs +357 -0
  297. package/dist/composites/scatter-chart/resolver.cjs.map +1 -0
  298. package/dist/composites/scatter-chart/resolver.d.ts +3 -0
  299. package/dist/composites/scatter-chart/resolver.d.ts.map +1 -0
  300. package/dist/composites/scatter-chart/resolver.js +355 -0
  301. package/dist/composites/scatter-chart/resolver.js.map +1 -0
  302. package/dist/composites/screener-table/resolver.cjs +372 -0
  303. package/dist/composites/screener-table/resolver.cjs.map +1 -0
  304. package/dist/composites/screener-table/resolver.d.ts +3 -0
  305. package/dist/composites/screener-table/resolver.d.ts.map +1 -0
  306. package/dist/composites/screener-table/resolver.js +370 -0
  307. package/dist/composites/screener-table/resolver.js.map +1 -0
  308. package/dist/composites/search-results/resolver.cjs +391 -0
  309. package/dist/composites/search-results/resolver.cjs.map +1 -0
  310. package/dist/composites/search-results/resolver.d.ts +3 -0
  311. package/dist/composites/search-results/resolver.d.ts.map +1 -0
  312. package/dist/composites/search-results/resolver.js +389 -0
  313. package/dist/composites/search-results/resolver.js.map +1 -0
  314. package/dist/composites/sparkline-table/resolver.cjs +361 -0
  315. package/dist/composites/sparkline-table/resolver.cjs.map +1 -0
  316. package/dist/composites/sparkline-table/resolver.d.ts +3 -0
  317. package/dist/composites/sparkline-table/resolver.d.ts.map +1 -0
  318. package/dist/composites/sparkline-table/resolver.js +359 -0
  319. package/dist/composites/sparkline-table/resolver.js.map +1 -0
  320. package/dist/composites/stacked-breakdown/resolver.cjs +397 -0
  321. package/dist/composites/stacked-breakdown/resolver.cjs.map +1 -0
  322. package/dist/composites/stacked-breakdown/resolver.d.ts +3 -0
  323. package/dist/composites/stacked-breakdown/resolver.d.ts.map +1 -0
  324. package/dist/composites/stacked-breakdown/resolver.js +395 -0
  325. package/dist/composites/stacked-breakdown/resolver.js.map +1 -0
  326. package/dist/composites/stat-grid/resolver.cjs +498 -0
  327. package/dist/composites/stat-grid/resolver.cjs.map +1 -0
  328. package/dist/composites/stat-grid/resolver.d.ts +3 -0
  329. package/dist/composites/stat-grid/resolver.d.ts.map +1 -0
  330. package/dist/composites/stat-grid/resolver.js +496 -0
  331. package/dist/composites/stat-grid/resolver.js.map +1 -0
  332. package/dist/composites/status-card/resolver.cjs +593 -0
  333. package/dist/composites/status-card/resolver.cjs.map +1 -0
  334. package/dist/composites/status-card/resolver.d.ts +3 -0
  335. package/dist/composites/status-card/resolver.d.ts.map +1 -0
  336. package/dist/composites/status-card/resolver.js +591 -0
  337. package/dist/composites/status-card/resolver.js.map +1 -0
  338. package/dist/composites/tabs-panel/resolver.cjs +564 -0
  339. package/dist/composites/tabs-panel/resolver.cjs.map +1 -0
  340. package/dist/composites/tabs-panel/resolver.d.ts +3 -0
  341. package/dist/composites/tabs-panel/resolver.d.ts.map +1 -0
  342. package/dist/composites/tabs-panel/resolver.js +562 -0
  343. package/dist/composites/tabs-panel/resolver.js.map +1 -0
  344. package/dist/composites/transaction-feed/resolver.cjs +830 -0
  345. package/dist/composites/transaction-feed/resolver.cjs.map +1 -0
  346. package/dist/composites/transaction-feed/resolver.d.ts +3 -0
  347. package/dist/composites/transaction-feed/resolver.d.ts.map +1 -0
  348. package/dist/composites/transaction-feed/resolver.js +828 -0
  349. package/dist/composites/transaction-feed/resolver.js.map +1 -0
  350. package/dist/composites/treemap-chart/resolver.cjs +323 -0
  351. package/dist/composites/treemap-chart/resolver.cjs.map +1 -0
  352. package/dist/composites/treemap-chart/resolver.d.ts +3 -0
  353. package/dist/composites/treemap-chart/resolver.d.ts.map +1 -0
  354. package/dist/composites/treemap-chart/resolver.js +321 -0
  355. package/dist/composites/treemap-chart/resolver.js.map +1 -0
  356. package/dist/composites/trial-balance/resolver.cjs +359 -0
  357. package/dist/composites/trial-balance/resolver.cjs.map +1 -0
  358. package/dist/composites/trial-balance/resolver.d.ts +3 -0
  359. package/dist/composites/trial-balance/resolver.d.ts.map +1 -0
  360. package/dist/composites/trial-balance/resolver.js +353 -0
  361. package/dist/composites/trial-balance/resolver.js.map +1 -0
  362. package/dist/composites/variance-analysis/resolver.cjs +310 -0
  363. package/dist/composites/variance-analysis/resolver.cjs.map +1 -0
  364. package/dist/composites/variance-analysis/resolver.d.ts +3 -0
  365. package/dist/composites/variance-analysis/resolver.d.ts.map +1 -0
  366. package/dist/composites/variance-analysis/resolver.js +308 -0
  367. package/dist/composites/variance-analysis/resolver.js.map +1 -0
  368. package/dist/composites/waterfall-chart/resolver.cjs +347 -0
  369. package/dist/composites/waterfall-chart/resolver.cjs.map +1 -0
  370. package/dist/composites/waterfall-chart/resolver.d.ts +3 -0
  371. package/dist/composites/waterfall-chart/resolver.d.ts.map +1 -0
  372. package/dist/composites/waterfall-chart/resolver.js +345 -0
  373. package/dist/composites/waterfall-chart/resolver.js.map +1 -0
  374. package/dist/index.cjs +18271 -0
  375. package/dist/index.cjs.map +1 -0
  376. package/dist/index.d.ts +52 -0
  377. package/dist/index.d.ts.map +1 -0
  378. package/dist/index.js +18184 -0
  379. package/dist/index.js.map +1 -0
  380. package/dist/renderer.cjs +17092 -0
  381. package/dist/renderer.cjs.map +1 -0
  382. package/dist/renderer.d.ts +7 -0
  383. package/dist/renderer.d.ts.map +1 -0
  384. package/dist/renderer.js +17064 -0
  385. package/dist/renderer.js.map +1 -0
  386. package/dist/resolver.cjs +17061 -0
  387. package/dist/resolver.cjs.map +1 -0
  388. package/dist/resolver.d.ts +6 -0
  389. package/dist/resolver.d.ts.map +1 -0
  390. package/dist/resolver.js +17033 -0
  391. package/dist/resolver.js.map +1 -0
  392. package/dist/schemas/aging-report.d.ts +74 -0
  393. package/dist/schemas/aging-report.d.ts.map +1 -0
  394. package/dist/schemas/alert.d.ts +39 -0
  395. package/dist/schemas/alert.d.ts.map +1 -0
  396. package/dist/schemas/allocation-donut.d.ts +53 -0
  397. package/dist/schemas/allocation-donut.d.ts.map +1 -0
  398. package/dist/schemas/amortization-table.d.ts +102 -0
  399. package/dist/schemas/amortization-table.d.ts.map +1 -0
  400. package/dist/schemas/area-chart.d.ts +61 -0
  401. package/dist/schemas/area-chart.d.ts.map +1 -0
  402. package/dist/schemas/audit-trail.d.ts +88 -0
  403. package/dist/schemas/audit-trail.d.ts.map +1 -0
  404. package/dist/schemas/balance-sheet.d.ts +170 -0
  405. package/dist/schemas/balance-sheet.d.ts.map +1 -0
  406. package/dist/schemas/buildRenderUITool.d.ts +7 -0
  407. package/dist/schemas/buildRenderUITool.d.ts.map +1 -0
  408. package/dist/schemas/bullet-chart.d.ts +58 -0
  409. package/dist/schemas/bullet-chart.d.ts.map +1 -0
  410. package/dist/schemas/cash-flow-statement.d.ts +165 -0
  411. package/dist/schemas/cash-flow-statement.d.ts.map +1 -0
  412. package/dist/schemas/chart-of-accounts.d.ts +93 -0
  413. package/dist/schemas/chart-of-accounts.d.ts.map +1 -0
  414. package/dist/schemas/cited-answer.d.ts +76 -0
  415. package/dist/schemas/cited-answer.d.ts.map +1 -0
  416. package/dist/schemas/coercePayload.d.ts +16 -0
  417. package/dist/schemas/coercePayload.d.ts.map +1 -0
  418. package/dist/schemas/combo-chart.d.ts +111 -0
  419. package/dist/schemas/combo-chart.d.ts.map +1 -0
  420. package/dist/schemas/comparative-bar-chart.d.ts +83 -0
  421. package/dist/schemas/comparative-bar-chart.d.ts.map +1 -0
  422. package/dist/schemas/compliance-checklist.d.ts +91 -0
  423. package/dist/schemas/compliance-checklist.d.ts.map +1 -0
  424. package/dist/schemas/connect-integration.d.ts +47 -0
  425. package/dist/schemas/connect-integration.d.ts.map +1 -0
  426. package/dist/schemas/data-table.d.ts +63 -0
  427. package/dist/schemas/data-table.d.ts.map +1 -0
  428. package/dist/schemas/depreciation-schedule.d.ts +125 -0
  429. package/dist/schemas/depreciation-schedule.d.ts.map +1 -0
  430. package/dist/schemas/document-preview.d.ts +128 -0
  431. package/dist/schemas/document-preview.d.ts.map +1 -0
  432. package/dist/schemas/download-card.d.ts +62 -0
  433. package/dist/schemas/download-card.d.ts.map +1 -0
  434. package/dist/schemas/engagement-pipeline.d.ts +119 -0
  435. package/dist/schemas/engagement-pipeline.d.ts.map +1 -0
  436. package/dist/schemas/entity-card-grid.d.ts +101 -0
  437. package/dist/schemas/entity-card-grid.d.ts.map +1 -0
  438. package/dist/schemas/escalation-card.d.ts +44 -0
  439. package/dist/schemas/escalation-card.d.ts.map +1 -0
  440. package/dist/schemas/file-browser.d.ts +81 -0
  441. package/dist/schemas/file-browser.d.ts.map +1 -0
  442. package/dist/schemas/flow-canvas.d.ts +58 -0
  443. package/dist/schemas/flow-canvas.d.ts.map +1 -0
  444. package/dist/schemas/funnel-chart.d.ts +53 -0
  445. package/dist/schemas/funnel-chart.d.ts.map +1 -0
  446. package/dist/schemas/gauge-chart.d.ts +58 -0
  447. package/dist/schemas/gauge-chart.d.ts.map +1 -0
  448. package/dist/schemas/general-ledger.d.ts +120 -0
  449. package/dist/schemas/general-ledger.d.ts.map +1 -0
  450. package/dist/schemas/grouped-table.d.ts +101 -0
  451. package/dist/schemas/grouped-table.d.ts.map +1 -0
  452. package/dist/schemas/heatmap-table.d.ts +76 -0
  453. package/dist/schemas/heatmap-table.d.ts.map +1 -0
  454. package/dist/schemas/income-statement.d.ts +170 -0
  455. package/dist/schemas/income-statement.d.ts.map +1 -0
  456. package/dist/schemas/index.cjs +3509 -0
  457. package/dist/schemas/index.cjs.map +1 -0
  458. package/dist/schemas/index.d.ts +5030 -0
  459. package/dist/schemas/index.d.ts.map +1 -0
  460. package/dist/schemas/index.js +3505 -0
  461. package/dist/schemas/index.js.map +1 -0
  462. package/dist/schemas/integrations-list.d.ts +62 -0
  463. package/dist/schemas/integrations-list.d.ts.map +1 -0
  464. package/dist/schemas/invoice-detail.d.ts +157 -0
  465. package/dist/schemas/invoice-detail.d.ts.map +1 -0
  466. package/dist/schemas/job-tracker.d.ts +114 -0
  467. package/dist/schemas/job-tracker.d.ts.map +1 -0
  468. package/dist/schemas/journal-entry.d.ts +90 -0
  469. package/dist/schemas/journal-entry.d.ts.map +1 -0
  470. package/dist/schemas/key-value-list.d.ts +108 -0
  471. package/dist/schemas/key-value-list.d.ts.map +1 -0
  472. package/dist/schemas/legal-test-result.d.ts +130 -0
  473. package/dist/schemas/legal-test-result.d.ts.map +1 -0
  474. package/dist/schemas/line-chart.d.ts +71 -0
  475. package/dist/schemas/line-chart.d.ts.map +1 -0
  476. package/dist/schemas/news-feed.d.ts +63 -0
  477. package/dist/schemas/news-feed.d.ts.map +1 -0
  478. package/dist/schemas/ops-dashboard.d.ts +92 -0
  479. package/dist/schemas/ops-dashboard.d.ts.map +1 -0
  480. package/dist/schemas/pipeline-preview.d.ts +209 -0
  481. package/dist/schemas/pipeline-preview.d.ts.map +1 -0
  482. package/dist/schemas/provenance-chain.d.ts +121 -0
  483. package/dist/schemas/provenance-chain.d.ts.map +1 -0
  484. package/dist/schemas/radar-chart.d.ts +70 -0
  485. package/dist/schemas/radar-chart.d.ts.map +1 -0
  486. package/dist/schemas/reconciliation-view.d.ts +156 -0
  487. package/dist/schemas/reconciliation-view.d.ts.map +1 -0
  488. package/dist/schemas/scatter-chart.d.ts +90 -0
  489. package/dist/schemas/scatter-chart.d.ts.map +1 -0
  490. package/dist/schemas/screener-table.d.ts +74 -0
  491. package/dist/schemas/screener-table.d.ts.map +1 -0
  492. package/dist/schemas/search-results.d.ts +87 -0
  493. package/dist/schemas/search-results.d.ts.map +1 -0
  494. package/dist/schemas/sparkline-table.d.ts +74 -0
  495. package/dist/schemas/sparkline-table.d.ts.map +1 -0
  496. package/dist/schemas/stacked-breakdown.d.ts +70 -0
  497. package/dist/schemas/stacked-breakdown.d.ts.map +1 -0
  498. package/dist/schemas/stat-grid.d.ts +55 -0
  499. package/dist/schemas/stat-grid.d.ts.map +1 -0
  500. package/dist/schemas/status-card.d.ts +84 -0
  501. package/dist/schemas/status-card.d.ts.map +1 -0
  502. package/dist/schemas/tabs-panel.d.ts +42 -0
  503. package/dist/schemas/tabs-panel.d.ts.map +1 -0
  504. package/dist/schemas/transaction-feed.d.ts +82 -0
  505. package/dist/schemas/transaction-feed.d.ts.map +1 -0
  506. package/dist/schemas/treemap-chart.d.ts +53 -0
  507. package/dist/schemas/treemap-chart.d.ts.map +1 -0
  508. package/dist/schemas/trial-balance.d.ts +85 -0
  509. package/dist/schemas/trial-balance.d.ts.map +1 -0
  510. package/dist/schemas/validatePayload.d.ts +10 -0
  511. package/dist/schemas/validatePayload.d.ts.map +1 -0
  512. package/dist/schemas/variance-analysis.d.ts +73 -0
  513. package/dist/schemas/variance-analysis.d.ts.map +1 -0
  514. package/dist/schemas/waterfall-chart.d.ts +53 -0
  515. package/dist/schemas/waterfall-chart.d.ts.map +1 -0
  516. package/dist/shared/ColumnSettingsPanel.d.ts +13 -0
  517. package/dist/shared/ColumnSettingsPanel.d.ts.map +1 -0
  518. package/dist/shared/ComponentActions.d.ts +20 -0
  519. package/dist/shared/ComponentActions.d.ts.map +1 -0
  520. package/dist/shared/FileCard.d.ts +35 -0
  521. package/dist/shared/FileCard.d.ts.map +1 -0
  522. package/dist/shared/Markdown.d.ts +22 -0
  523. package/dist/shared/Markdown.d.ts.map +1 -0
  524. package/dist/shared/PreviewModal.d.ts +19 -0
  525. package/dist/shared/PreviewModal.d.ts.map +1 -0
  526. package/dist/shared/ThemeContext.d.ts +18 -0
  527. package/dist/shared/ThemeContext.d.ts.map +1 -0
  528. package/dist/shared/brandIcons.d.ts +3 -0
  529. package/dist/shared/brandIcons.d.ts.map +1 -0
  530. package/dist/shared/downloadCSV.d.ts +5 -0
  531. package/dist/shared/downloadCSV.d.ts.map +1 -0
  532. package/dist/shared/fileType.d.ts +19 -0
  533. package/dist/shared/fileType.d.ts.map +1 -0
  534. package/dist/shared/theme.d.ts +48 -0
  535. package/dist/shared/theme.d.ts.map +1 -0
  536. package/dist/shared/useColumnVisibility.d.ts +13 -0
  537. package/dist/shared/useColumnVisibility.d.ts.map +1 -0
  538. package/dist/shared/useSeriesToggle.d.ts +8 -0
  539. package/dist/shared/useSeriesToggle.d.ts.map +1 -0
  540. package/dist/shared/viewers/CsvViewer.d.ts +13 -0
  541. package/dist/shared/viewers/CsvViewer.d.ts.map +1 -0
  542. package/dist/shared/viewers/DocxViewer.d.ts +8 -0
  543. package/dist/shared/viewers/DocxViewer.d.ts.map +1 -0
  544. package/dist/shared/viewers/PreviewHost.d.ts +17 -0
  545. package/dist/shared/viewers/PreviewHost.d.ts.map +1 -0
  546. package/dist/shared/viewers/TextViewer.d.ts +13 -0
  547. package/dist/shared/viewers/TextViewer.d.ts.map +1 -0
  548. package/dist/shared/viewers/decode.d.ts +14 -0
  549. package/dist/shared/viewers/decode.d.ts.map +1 -0
  550. package/dist/tool-definitions.json +4629 -0
  551. package/dist/types.d.ts +8 -0
  552. package/dist/types.d.ts.map +1 -0
  553. package/package.json +110 -0
  554. package/styles/contract.css +17 -0
@@ -0,0 +1,1295 @@
1
+ "use client";
2
+ 'use strict';
3
+
4
+ var React4 = require('react');
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+ var dagre = require('@dagrejs/dagre');
7
+ var reactDom = require('react-dom');
8
+ var react = require('@xyflow/react');
9
+ require('@xyflow/react/dist/style.css');
10
+ var htmlToImage = require('html-to-image');
11
+
12
+ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
13
+
14
+ var React4__default = /*#__PURE__*/_interopDefault(React4);
15
+ var dagre__default = /*#__PURE__*/_interopDefault(dagre);
16
+
17
+ var __defProp = Object.defineProperty;
18
+ var __defProps = Object.defineProperties;
19
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
20
+ var __getOwnPropNames = Object.getOwnPropertyNames;
21
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
22
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
23
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
24
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
25
+ var __spreadValues = (a, b) => {
26
+ for (var prop in b || (b = {}))
27
+ if (__hasOwnProp.call(b, prop))
28
+ __defNormalProp(a, prop, b[prop]);
29
+ if (__getOwnPropSymbols)
30
+ for (var prop of __getOwnPropSymbols(b)) {
31
+ if (__propIsEnum.call(b, prop))
32
+ __defNormalProp(a, prop, b[prop]);
33
+ }
34
+ return a;
35
+ };
36
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
37
+ var __esm = (fn, res) => function __init() {
38
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
39
+ };
40
+ var __export = (target, all) => {
41
+ for (var name in all)
42
+ __defProp(target, name, { get: all[name], enumerable: true });
43
+ };
44
+
45
+ // src/shared/theme.ts
46
+ var BORDER, MUTED, PAPER, ACCENT, ACCENT_SOFT, SECONDARY, CHART_PALETTE;
47
+ var init_theme = __esm({
48
+ "src/shared/theme.ts"() {
49
+ BORDER = "#dedede";
50
+ MUTED = "#777777";
51
+ PAPER = "#f6f6f6";
52
+ ACCENT = "#ff5000";
53
+ ACCENT_SOFT = "#cc4000";
54
+ SECONDARY = "#0364ff";
55
+ CHART_PALETTE = [
56
+ "#ff5000",
57
+ "#0364ff",
58
+ "#16a34a",
59
+ "#dc2626",
60
+ "#7c3aed",
61
+ "#0891b2",
62
+ "#f59e0b",
63
+ "#6366f1",
64
+ "#ec4899",
65
+ "#84cc16",
66
+ "#e11d48",
67
+ "#0ea5e9"
68
+ ];
69
+ }
70
+ });
71
+ function useTheme() {
72
+ return React4.useContext(GenUIThemeContext);
73
+ }
74
+ var DEFAULT_TOKENS, GenUIThemeContext;
75
+ var init_ThemeContext = __esm({
76
+ "src/shared/ThemeContext.tsx"() {
77
+ "use client";
78
+ init_theme();
79
+ DEFAULT_TOKENS = {
80
+ BORDER,
81
+ MUTED,
82
+ PAPER,
83
+ ACCENT,
84
+ ACCENT_SOFT,
85
+ SECONDARY,
86
+ CHART_PALETTE: [...CHART_PALETTE]
87
+ };
88
+ GenUIThemeContext = React4.createContext(DEFAULT_TOKENS);
89
+ }
90
+ });
91
+
92
+ // src/composites/flow-canvas/parseMermaidFlow.ts
93
+ function detectShape(rawNode) {
94
+ let m = rawNode.match(/^(\w+)\[(?:"|")?([^\]]*?)(?:"|")?\]$/);
95
+ const patterns = [
96
+ [/^(\w+)\[\((.+?)\)\]$/, "rounded"],
97
+ // ([label]) — stadium
98
+ [/^(\w+)\[\[(.+?)\]\]$/, "rect"],
99
+ // [[label]] — subroutine → rect
100
+ [/^(\w+)\[\((.+?)\)\]$/, "rounded"],
101
+ // [(label)] — cylinder approximation
102
+ [/^(\w+)\(\((.+?)\)\)$/, "circle"],
103
+ // ((label))
104
+ [/^(\w+)\(\[(.+?)\]\)$/, "rounded"],
105
+ // ([label])
106
+ [/^(\w+)\[(.+?)\]$/, "rect"],
107
+ // [label]
108
+ [/^(\w+)\{(.+?)\}$/, "diamond"]
109
+ // {label}
110
+ ];
111
+ for (const [re, shape] of patterns) {
112
+ m = rawNode.match(re);
113
+ if (m) return { id: m[1], label: unquote(m[2]), shape };
114
+ }
115
+ m = rawNode.match(/^(\w+)\[\((.+?)\)\]$/);
116
+ if (m) return { id: m[1], label: unquote(m[2]), shape: "cylinder" };
117
+ const bare = rawNode.match(/^(\w+)$/);
118
+ if (bare) return { id: bare[1], label: bare[1], shape: "rect" };
119
+ return { id: rawNode.replace(/\W/g, "_"), label: rawNode, shape: "rect" };
120
+ }
121
+ function unquote(s) {
122
+ return s.replace(/^["']|["']$/g, "").trim();
123
+ }
124
+ function splitEdge(line) {
125
+ let m = line.match(/^(.+?)\s*--+>\|([^|]*)\|\s*(.+)$/);
126
+ if (m) return { left: m[1].trim(), right: m[3].trim(), edgeLabel: m[2].trim() || void 0 };
127
+ m = line.match(/^(.+?)\s*---*>?\s+(.+)$/);
128
+ if (m) return { left: m[1].trim(), right: m[2].trim() };
129
+ return null;
130
+ }
131
+ function parseMermaidFlow(source) {
132
+ var _a, _b, _c;
133
+ const lines = source.split("\n").map((l) => l.trim()).filter((l) => l && !l.startsWith("%%"));
134
+ if (!lines.length) return null;
135
+ const header = lines[0].toLowerCase();
136
+ if (!header.startsWith("flowchart") && !header.startsWith("graph")) return null;
137
+ const directionMap = {
138
+ td: "TB",
139
+ tb: "TB",
140
+ lr: "LR",
141
+ rl: "RL",
142
+ bt: "BT"
143
+ };
144
+ const dirToken = (_b = (_a = header.split(/\s+/)[1]) == null ? void 0 : _a.toLowerCase()) != null ? _b : "td";
145
+ const direction = (_c = directionMap[dirToken]) != null ? _c : "TB";
146
+ const nodeMap = /* @__PURE__ */ new Map();
147
+ const edges = [];
148
+ function ensureNode(raw) {
149
+ const parsed = detectShape(raw);
150
+ if (!nodeMap.has(parsed.id)) {
151
+ nodeMap.set(parsed.id, parsed);
152
+ } else if (parsed.label !== parsed.id) {
153
+ const existing = nodeMap.get(parsed.id);
154
+ if (existing.label === existing.id) {
155
+ nodeMap.set(parsed.id, __spreadProps(__spreadValues({}, existing), { label: parsed.label, shape: parsed.shape }));
156
+ }
157
+ }
158
+ return parsed.id;
159
+ }
160
+ for (let i = 1; i < lines.length; i++) {
161
+ const line = lines[i];
162
+ if (line.startsWith("subgraph")) {
163
+ continue;
164
+ }
165
+ if (line === "end") {
166
+ continue;
167
+ }
168
+ const edgeParts = splitEdge(line);
169
+ if (edgeParts) {
170
+ let parts = [edgeParts.left];
171
+ let rest = edgeParts.right;
172
+ let chain = splitEdge(rest);
173
+ while (chain) {
174
+ parts.push(chain.left);
175
+ rest = chain.right;
176
+ chain = splitEdge(rest);
177
+ }
178
+ parts.push(rest);
179
+ for (let j = 0; j < parts.length - 1; j++) {
180
+ const srcId = ensureNode(parts[j]);
181
+ const dstId = ensureNode(parts[j + 1]);
182
+ edges.push({
183
+ source: srcId,
184
+ target: dstId,
185
+ label: j === 0 ? edgeParts.edgeLabel : void 0
186
+ });
187
+ }
188
+ continue;
189
+ }
190
+ if (line && !line.startsWith("style") && !line.startsWith("classDef") && !line.startsWith("class ")) {
191
+ ensureNode(line);
192
+ }
193
+ }
194
+ return {
195
+ direction,
196
+ nodes: Array.from(nodeMap.values()),
197
+ edges
198
+ };
199
+ }
200
+ var init_parseMermaidFlow = __esm({
201
+ "src/composites/flow-canvas/parseMermaidFlow.ts"() {
202
+ }
203
+ });
204
+ function reverseDir(dir) {
205
+ return dir === "LR" ? "RL" : dir === "RL" ? "LR" : dir === "TB" ? "BT" : "TB";
206
+ }
207
+ function measureBounds(nodes) {
208
+ let minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;
209
+ for (const n of nodes) {
210
+ const x2 = n.position.x + n.width;
211
+ const y2 = n.position.y + n.height;
212
+ if (n.position.x < minX) minX = n.position.x;
213
+ if (n.position.y < minY) minY = n.position.y;
214
+ if (x2 > maxX) maxX = x2;
215
+ if (y2 > maxY) maxY = y2;
216
+ }
217
+ return { w: maxX - minX + 40, h: maxY - minY + 40 };
218
+ }
219
+ function applySnake(nodes, direction, rowGap) {
220
+ const isHoriz = direction === "LR" || direction === "RL";
221
+ const primary = isHoriz ? "x" : "y";
222
+ const secondary = isHoriz ? "y" : "x";
223
+ const rankMap = /* @__PURE__ */ new Map();
224
+ for (const n of nodes) {
225
+ const key = Math.round(n.position[primary] / 2) * 2;
226
+ if (!rankMap.has(key)) rankMap.set(key, []);
227
+ rankMap.get(key).push(n);
228
+ }
229
+ const ranks = [...rankMap.keys()].sort((a, b) => a - b);
230
+ if (ranks.length <= 5) return;
231
+ const nodesPerRow = 5;
232
+ const primarySpan = ranks[ranks.length - 1] - ranks[0];
233
+ const rankStep = primarySpan / Math.max(ranks.length - 1, 1);
234
+ let secondaryOffset = 0;
235
+ for (let rowIdx = 0; rowIdx < Math.ceil(ranks.length / nodesPerRow); rowIdx++) {
236
+ const rowRanks = ranks.slice(rowIdx * nodesPerRow, (rowIdx + 1) * nodesPerRow);
237
+ const isReversed = rowIdx % 2 === 1;
238
+ const rowDir = isReversed ? reverseDir(direction) : direction;
239
+ let rowSecondaryMax = secondaryOffset;
240
+ for (let colIdx = 0; colIdx < rowRanks.length; colIdx++) {
241
+ const rank = rowRanks[colIdx];
242
+ const rankNodes = rankMap.get(rank);
243
+ const effectiveCol = isReversed ? nodesPerRow - 1 - colIdx : colIdx;
244
+ const newPrimary = effectiveCol * rankStep;
245
+ const minSec = Math.min(...rankNodes.map((n) => n.position[secondary]));
246
+ for (const n of rankNodes) {
247
+ const secOffset = n.position[secondary] - minSec;
248
+ const newPos = __spreadValues({}, n.position);
249
+ newPos[primary] = newPrimary;
250
+ newPos[secondary] = secondaryOffset + secOffset;
251
+ n.position = newPos;
252
+ n.data = __spreadProps(__spreadValues({}, n.data), { direction: rowDir });
253
+ const nodeSecSize = (isHoriz ? n.height : n.width) || 40;
254
+ rowSecondaryMax = Math.max(
255
+ rowSecondaryMax,
256
+ secondaryOffset + secOffset + nodeSecSize
257
+ );
258
+ }
259
+ }
260
+ secondaryOffset = rowSecondaryMax + rowGap;
261
+ }
262
+ }
263
+ function computeLayout(flow, nodeWidth = 148, nodeHeight = 40) {
264
+ const g = new dagre__default.default.graphlib.Graph();
265
+ g.setDefaultEdgeLabel(() => ({}));
266
+ g.setGraph({
267
+ rankdir: RANK_DIR[flow.direction],
268
+ ranksep: 60,
269
+ nodesep: 40,
270
+ marginx: 20,
271
+ marginy: 20
272
+ });
273
+ for (const node of flow.nodes) {
274
+ const w = node.shape === "diamond" ? nodeWidth + 40 : nodeWidth;
275
+ const h = node.shape === "diamond" ? nodeHeight + 24 : nodeHeight;
276
+ g.setNode(node.id, { width: w, height: h });
277
+ }
278
+ for (const edge of flow.edges) {
279
+ g.setEdge(edge.source, edge.target, {});
280
+ }
281
+ dagre__default.default.layout(g);
282
+ const nodes = flow.nodes.map((n) => {
283
+ const pos = g.node(n.id);
284
+ const w = n.shape === "diamond" ? nodeWidth + 40 : nodeWidth;
285
+ const h = n.shape === "diamond" ? nodeHeight + 24 : nodeHeight;
286
+ return {
287
+ id: n.id,
288
+ type: n.shape,
289
+ position: { x: pos.x - w / 2, y: pos.y - h / 2 },
290
+ data: { label: n.label, direction: flow.direction },
291
+ width: w,
292
+ height: h
293
+ };
294
+ });
295
+ const pre = measureBounds(nodes);
296
+ const isHoriz = flow.direction === "LR" || flow.direction === "RL";
297
+ const preRatio = isHoriz ? pre.w / Math.max(pre.h, 1) : pre.h / Math.max(pre.w, 1);
298
+ if (preRatio > SNAKE_RATIO && nodes.length > 4) {
299
+ applySnake(nodes, flow.direction, 60);
300
+ }
301
+ const { w: graphWidth, h: graphHeight } = measureBounds(nodes);
302
+ const edges = flow.edges.map((e, i) => ({
303
+ id: `e-${e.source}-${e.target}-${i}`,
304
+ source: e.source,
305
+ target: e.target,
306
+ label: e.label,
307
+ type: "smoothstep",
308
+ style: { stroke: "#c93d1e", strokeWidth: 1.75 },
309
+ labelStyle: {
310
+ fill: "#6b6b6b",
311
+ fontSize: 10,
312
+ fontFamily: "Plus Jakarta Sans, system-ui, sans-serif"
313
+ },
314
+ labelBgStyle: { fill: "#f8f8f7", fillOpacity: 0.92 },
315
+ labelBgPadding: [3, 5],
316
+ markerEnd: {
317
+ type: "arrowclosed",
318
+ color: "#c93d1e",
319
+ width: 16,
320
+ height: 16
321
+ }
322
+ }));
323
+ return { nodes, edges, graphWidth, graphHeight };
324
+ }
325
+ var RANK_DIR, SNAKE_RATIO;
326
+ var init_layoutFlow = __esm({
327
+ "src/composites/flow-canvas/layoutFlow.ts"() {
328
+ RANK_DIR = {
329
+ TB: "TB",
330
+ BT: "BT",
331
+ LR: "LR",
332
+ RL: "RL"
333
+ };
334
+ SNAKE_RATIO = 2.6;
335
+ }
336
+ });
337
+
338
+ // src/composites/flow-canvas/FlowGraph.tsx
339
+ var FlowGraph_exports = {};
340
+ __export(FlowGraph_exports, {
341
+ FlowGraph: () => FlowGraph
342
+ });
343
+ function themeVars(t) {
344
+ return {
345
+ // eslint-disable-next-line @typescript-eslint/consistent-type-assertions
346
+ ["--gx-accent"]: t.ACCENT,
347
+ ["--gx-border"]: t.BORDER,
348
+ ["--gx-muted"]: t.MUTED,
349
+ ["--gx-bg"]: "#ffffff",
350
+ ["--gx-bg-subtle"]: t.PAPER,
351
+ ["--gx-text"]: "var(--foreground)",
352
+ ["--gx-outline"]: "var(--foreground)",
353
+ ["--gx-font"]: "var(--font-sans, Figtree, system-ui, sans-serif)"
354
+ };
355
+ }
356
+ function Handles({ dir }) {
357
+ switch (dir) {
358
+ case "BT":
359
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
360
+ /* @__PURE__ */ jsxRuntime.jsx(react.Handle, { type: "target", position: react.Position.Bottom, style: hDot }),
361
+ /* @__PURE__ */ jsxRuntime.jsx(react.Handle, { type: "source", position: react.Position.Top, style: hDot })
362
+ ] });
363
+ case "LR":
364
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
365
+ /* @__PURE__ */ jsxRuntime.jsx(react.Handle, { type: "target", position: react.Position.Left, style: hDot }),
366
+ /* @__PURE__ */ jsxRuntime.jsx(react.Handle, { type: "source", position: react.Position.Right, style: hDot })
367
+ ] });
368
+ case "RL":
369
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
370
+ /* @__PURE__ */ jsxRuntime.jsx(react.Handle, { type: "target", position: react.Position.Right, style: hDot }),
371
+ /* @__PURE__ */ jsxRuntime.jsx(react.Handle, { type: "source", position: react.Position.Left, style: hDot })
372
+ ] });
373
+ default:
374
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
375
+ /* @__PURE__ */ jsxRuntime.jsx(react.Handle, { type: "target", position: react.Position.Top, style: hDot }),
376
+ /* @__PURE__ */ jsxRuntime.jsx(react.Handle, { type: "source", position: react.Position.Bottom, style: hDot })
377
+ ] });
378
+ }
379
+ }
380
+ function nodeClass(status) {
381
+ return "gx-flow-node" + (status ? ` gx-flow-${status}` : "");
382
+ }
383
+ function DoneBadge() {
384
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "gx-done-badge", "aria-hidden": "true", children: /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "9", height: "9", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "4", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M20 6 9 17l-5-5" }) }) });
385
+ }
386
+ function RectNode({ data }) {
387
+ var _a;
388
+ const s = data.status;
389
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: nodeClass(s), style: __spreadProps(__spreadValues({}, nodeBase), { borderRadius: "6px" }), children: [
390
+ /* @__PURE__ */ jsxRuntime.jsx(Handles, { dir: data.direction }),
391
+ s === "done" && /* @__PURE__ */ jsxRuntime.jsx(DoneBadge, {}),
392
+ String((_a = data.label) != null ? _a : "")
393
+ ] });
394
+ }
395
+ function RoundedNode({ data }) {
396
+ var _a;
397
+ const s = data.status;
398
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: nodeClass(s), style: __spreadProps(__spreadValues({}, nodeBase), { borderRadius: "999px" }), children: [
399
+ /* @__PURE__ */ jsxRuntime.jsx(Handles, { dir: data.direction }),
400
+ s === "done" && /* @__PURE__ */ jsxRuntime.jsx(DoneBadge, {}),
401
+ String((_a = data.label) != null ? _a : "")
402
+ ] });
403
+ }
404
+ function CircleNode({ data }) {
405
+ var _a;
406
+ const s = data.status;
407
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: nodeClass(s), style: __spreadProps(__spreadValues({}, nodeBase), { borderRadius: "50%", padding: "6px" }), children: [
408
+ /* @__PURE__ */ jsxRuntime.jsx(Handles, { dir: data.direction }),
409
+ s === "done" && /* @__PURE__ */ jsxRuntime.jsx(DoneBadge, {}),
410
+ String((_a = data.label) != null ? _a : "")
411
+ ] });
412
+ }
413
+ function DiamondNode({ data }) {
414
+ var _a;
415
+ const s = data.status;
416
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: nodeClass(s), style: { position: "relative", width: "100%", height: "100%", display: "flex", alignItems: "center", justifyContent: "center", border: "none", background: "transparent" }, children: [
417
+ /* @__PURE__ */ jsxRuntime.jsx(Handles, { dir: data.direction }),
418
+ s === "done" && /* @__PURE__ */ jsxRuntime.jsx(DoneBadge, {}),
419
+ /* @__PURE__ */ jsxRuntime.jsx("svg", { style: { position: "absolute", inset: 0, width: "100%", height: "100%", overflow: "visible" }, viewBox: "0 0 1 1", preserveAspectRatio: "none", children: /* @__PURE__ */ jsxRuntime.jsx("polygon", { className: "gx-flow-poly", points: "0.5,0.03 0.97,0.5 0.5,0.97 0.03,0.5", fill: "var(--gx-bg)", stroke: "var(--gx-outline)", strokeWidth: "1.5", vectorEffect: "non-scaling-stroke" }) }),
420
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { position: "relative", zIndex: 1, fontFamily: "var(--gx-font)", fontSize: "11px", fontWeight: 500, color: "var(--gx-text)", textAlign: "center", lineHeight: 1.25, userSelect: "none", padding: "0 22px", maxWidth: "100%" }, children: String((_a = data.label) != null ? _a : "") })
421
+ ] });
422
+ }
423
+ function CylinderNode({ data }) {
424
+ var _a;
425
+ const a = 5;
426
+ const s = data.status;
427
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: nodeClass(s), style: { position: "relative", width: "100%", height: "100%", border: "none", background: "transparent" }, children: [
428
+ /* @__PURE__ */ jsxRuntime.jsx(Handles, { dir: data.direction }),
429
+ s === "done" && /* @__PURE__ */ jsxRuntime.jsx(DoneBadge, {}),
430
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { position: "absolute", top: 0, left: 0, right: 0, height: a * 2, border: "1.5px solid var(--gx-outline)", borderRadius: "50%", background: "var(--gx-bg)", zIndex: 1 } }),
431
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { position: "absolute", inset: `${a}px 0`, border: "1.5px solid var(--gx-outline)", borderTop: "none", borderBottom: "none", background: "var(--gx-bg)", display: "flex", alignItems: "center", justifyContent: "center", fontFamily: "var(--gx-font)", fontSize: "12px", fontWeight: 500, color: "var(--gx-text)" }, children: String((_a = data.label) != null ? _a : "") }),
432
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { position: "absolute", bottom: 0, left: 0, right: 0, height: a * 2, border: "1.5px solid var(--gx-outline)", borderRadius: "50%", background: "var(--gx-bg)", zIndex: 1 } })
433
+ ] });
434
+ }
435
+ function FitBtn() {
436
+ const { fitView } = react.useReactFlow();
437
+ return /* @__PURE__ */ jsxRuntime.jsxs("button", { style: pillStyle, onClick: () => fitView({ padding: 0.1, duration: 300 }), onMouseEnter: onEnter, onMouseLeave: onLeave, children: [
438
+ /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "11", height: "11", viewBox: "0 0 11 11", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M1 4V1h3M7 1h3v3M10 7v3H7M4 10H1V7" }) }),
439
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Fit" })
440
+ ] });
441
+ }
442
+ function idealHeight(boxW, graphWidth, graphHeight) {
443
+ if (!graphWidth || !graphHeight || !boxW) return 300;
444
+ const ratio = graphWidth / graphHeight;
445
+ const h = Math.round(boxW / ratio);
446
+ return Math.max(220, Math.min(480, h));
447
+ }
448
+ async function getMermaid(t) {
449
+ const m = (await import('mermaid')).default;
450
+ const sig = `${t.ACCENT}|${t.BORDER}|${t.PAPER}|${t.MUTED}`;
451
+ if (!mermaidReady || mermaidSig !== sig) {
452
+ m.initialize({
453
+ startOnLoad: false,
454
+ logLevel: 5,
455
+ theme: "base",
456
+ themeVariables: {
457
+ primaryColor: "#ffffff",
458
+ primaryBorderColor: "#171717",
459
+ primaryTextColor: "#171717",
460
+ mainBkg: "#ffffff",
461
+ nodeBorder: "#171717",
462
+ lineColor: t.ACCENT,
463
+ secondaryColor: t.PAPER,
464
+ clusterBkg: t.PAPER,
465
+ clusterBorder: t.BORDER,
466
+ noteBkgColor: t.PAPER,
467
+ noteBorderColor: t.BORDER,
468
+ actorLineColor: t.ACCENT,
469
+ loopTextColor: t.MUTED,
470
+ fontFamily: "Figtree, system-ui, sans-serif",
471
+ fontSize: "12px"
472
+ }
473
+ });
474
+ mermaidReady = true;
475
+ mermaidSig = sig;
476
+ }
477
+ return m;
478
+ }
479
+ function MermaidFallback({ diagram, title }) {
480
+ const tokens = useTheme();
481
+ const [svg, setSvg] = React4.useState("");
482
+ const [err, setErr] = React4.useState(false);
483
+ const [full, setFull] = React4.useState(false);
484
+ const idRef = React4.useRef(0);
485
+ React4.useEffect(() => {
486
+ const id = ++renderSeq;
487
+ idRef.current = id;
488
+ setErr(false);
489
+ (async () => {
490
+ try {
491
+ const m = await getMermaid(tokens);
492
+ if (idRef.current !== id) return;
493
+ const { svg: out } = await m.render(`gx-mm-${id}`, diagram);
494
+ if (idRef.current !== id) return;
495
+ setSvg(out);
496
+ } catch (e) {
497
+ if (idRef.current === id) setErr(true);
498
+ }
499
+ })();
500
+ }, [diagram, tokens]);
501
+ if (err) {
502
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { height: "100%", overflow: "auto", padding: 20, fontSize: 12, fontFamily: "var(--font-sans)", display: "flex", flexDirection: "column", gap: 8 }, children: [
503
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: tokens.ACCENT, fontWeight: 500 }, children: "Diagram syntax error" }),
504
+ /* @__PURE__ */ jsxRuntime.jsx("pre", { style: { fontSize: 11, background: "#ffffff", border: `1px solid ${tokens.BORDER}`, borderRadius: 6, padding: "10px 12px", overflowX: "auto", whiteSpace: "pre-wrap", wordBreak: "break-word", color: "var(--foreground)", margin: 0 }, children: diagram })
505
+ ] });
506
+ }
507
+ if (!svg) {
508
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { style: { height: "100%", display: "flex", alignItems: "center", justifyContent: "center", color: tokens.MUTED, fontSize: 11, fontFamily: "var(--font-sans)", letterSpacing: "0.06em", textTransform: "uppercase" }, children: "rendering" });
509
+ }
510
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { position: "relative", height: "100%", overflow: "auto" }, children: [
511
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mermaid-output", dangerouslySetInnerHTML: { __html: svg } }),
512
+ /* @__PURE__ */ jsxRuntime.jsxs("button", { style: __spreadProps(__spreadValues({}, pillStyle), { position: "absolute", top: 10, right: 10, zIndex: 10 }), onClick: () => setFull(true), onMouseEnter: onEnter, onMouseLeave: onLeave, children: [
513
+ /* @__PURE__ */ jsxRuntime.jsx(ExpandIcon, {}),
514
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Expand" })
515
+ ] }),
516
+ full && typeof document !== "undefined" && reactDom.createPortal(
517
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: __spreadProps(__spreadValues({}, themeVars(tokens)), { position: "fixed", inset: 0, zIndex: 9999, background: "rgba(23,23,23,0.55)", display: "flex", alignItems: "center", justifyContent: "center", backdropFilter: "blur(6px)", WebkitBackdropFilter: "blur(6px)" }), onClick: (e) => {
518
+ if (e.target === e.currentTarget) setFull(false);
519
+ }, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { background: "#ffffff", borderRadius: 10, border: `1px solid ${tokens.BORDER}`, boxShadow: "0 8px 32px rgba(23,23,23,0.12)", width: "min(92vw,1280px)", height: "min(88vh,960px)", display: "flex", flexDirection: "column", overflow: "hidden" }, children: [
520
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: "8px 12px", borderBottom: `1px solid ${tokens.BORDER}`, display: "flex", alignItems: "center", justifyContent: "space-between", background: tokens.PAPER }, children: [
521
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontFamily: "var(--font-sans)", fontSize: 12, color: tokens.MUTED }, children: title != null ? title : "Diagram" }),
522
+ /* @__PURE__ */ jsxRuntime.jsxs("button", { style: __spreadProps(__spreadValues({}, pillStyle), { color: tokens.ACCENT }), onClick: () => setFull(false), children: [
523
+ /* @__PURE__ */ jsxRuntime.jsx(CloseIcon, {}),
524
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Close" })
525
+ ] })
526
+ ] }),
527
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1, overflow: "auto", display: "flex", alignItems: "center", justifyContent: "center", padding: 32 }, children: /* @__PURE__ */ jsxRuntime.jsx("div", { dangerouslySetInnerHTML: { __html: svg }, style: { maxWidth: "100%" } }) })
528
+ ] }) }),
529
+ document.body
530
+ )
531
+ ] });
532
+ }
533
+ function FullscreenModalInner({ nodes, edges, title, onClose }) {
534
+ const tokens = useTheme();
535
+ const [n, , onNC] = react.useNodesState(nodes);
536
+ const [e, , onEC] = react.useEdgesState(edges);
537
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { style: __spreadProps(__spreadValues({}, themeVars(tokens)), { position: "fixed", inset: 0, zIndex: 9999, background: "rgba(23,23,23,0.55)", display: "flex", alignItems: "center", justifyContent: "center", backdropFilter: "blur(6px)", WebkitBackdropFilter: "blur(6px)" }), onClick: (ev) => {
538
+ if (ev.target === ev.currentTarget) onClose();
539
+ }, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { background: "#ffffff", borderRadius: "10px", border: `1px solid ${tokens.BORDER}`, boxShadow: "0 8px 32px rgba(23,23,23,0.12)", width: "min(92vw,1280px)", height: "min(88vh,960px)", display: "flex", flexDirection: "column", overflow: "hidden" }, children: [
540
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { padding: "8px 12px", borderBottom: `1px solid ${tokens.BORDER}`, display: "flex", alignItems: "center", justifyContent: "space-between", background: tokens.PAPER, flexShrink: 0 }, children: [
541
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontFamily: "var(--font-sans)", fontSize: "12px", color: tokens.MUTED }, children: title != null ? title : "Diagram" }),
542
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", gap: "6px" }, children: [
543
+ /* @__PURE__ */ jsxRuntime.jsx(FitBtn, {}),
544
+ /* @__PURE__ */ jsxRuntime.jsxs("button", { style: __spreadProps(__spreadValues({}, pillStyle), { color: tokens.ACCENT }), onClick: onClose, children: [
545
+ /* @__PURE__ */ jsxRuntime.jsx(CloseIcon, {}),
546
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Close" })
547
+ ] })
548
+ ] })
549
+ ] }),
550
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { flex: 1, position: "relative" }, children: /* @__PURE__ */ jsxRuntime.jsx(react.ReactFlow, { nodes: n, edges: e, nodeTypes, onNodesChange: onNC, onEdgesChange: onEC, fitView: true, fitViewOptions: { padding: 0.1 }, nodesDraggable: false, nodesConnectable: false, elementsSelectable: false, panOnDrag: true, zoomOnScroll: true, minZoom: 0.15, maxZoom: 4, proOptions: { hideAttribution: true }, style: { background: tokens.PAPER, width: "100%", height: "100%" }, children: /* @__PURE__ */ jsxRuntime.jsx(react.Background, { variant: react.BackgroundVariant.Dots, gap: 20, size: 1, color: tokens.BORDER }) }) })
551
+ ] }) });
552
+ }
553
+ function FullscreenModal({ nodes, edges, title, onClose }) {
554
+ React4.useEffect(() => {
555
+ const h = (e) => {
556
+ if (e.key === "Escape") onClose();
557
+ };
558
+ window.addEventListener("keydown", h);
559
+ return () => window.removeEventListener("keydown", h);
560
+ }, [onClose]);
561
+ return reactDom.createPortal(
562
+ /* @__PURE__ */ jsxRuntime.jsx(react.ReactFlowProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(FullscreenModalInner, { nodes, edges, title, onClose }) }),
563
+ document.body
564
+ );
565
+ }
566
+ function usePrefersReducedMotion() {
567
+ const [reduced, setReduced] = React4.useState(false);
568
+ React4.useEffect(() => {
569
+ var _a;
570
+ if (typeof matchMedia === "undefined") return;
571
+ const mq = matchMedia("(prefers-reduced-motion: reduce)");
572
+ setReduced(mq.matches);
573
+ const h = () => setReduced(mq.matches);
574
+ (_a = mq.addEventListener) == null ? void 0 : _a.call(mq, "change", h);
575
+ return () => {
576
+ var _a2;
577
+ return (_a2 = mq.removeEventListener) == null ? void 0 : _a2.call(mq, "change", h);
578
+ };
579
+ }, []);
580
+ return reduced;
581
+ }
582
+ function topoOrder(nodeIds, edges) {
583
+ var _a, _b, _c, _d;
584
+ const indeg = new Map(nodeIds.map((id) => [id, 0]));
585
+ const adj = new Map(nodeIds.map((id) => [id, []]));
586
+ for (const e of edges) {
587
+ if (!indeg.has(e.target) || !adj.has(e.source)) continue;
588
+ indeg.set(e.target, ((_a = indeg.get(e.target)) != null ? _a : 0) + 1);
589
+ adj.get(e.source).push(e.target);
590
+ }
591
+ const queue = nodeIds.filter((id) => {
592
+ var _a2;
593
+ return ((_a2 = indeg.get(id)) != null ? _a2 : 0) === 0;
594
+ });
595
+ const seen = /* @__PURE__ */ new Set();
596
+ const order = [];
597
+ while (queue.length) {
598
+ const id = queue.shift();
599
+ if (seen.has(id)) continue;
600
+ seen.add(id);
601
+ order.push(id);
602
+ for (const t of (_b = adj.get(id)) != null ? _b : []) {
603
+ indeg.set(t, ((_c = indeg.get(t)) != null ? _c : 1) - 1);
604
+ if (((_d = indeg.get(t)) != null ? _d : 0) <= 0 && !seen.has(t)) queue.push(t);
605
+ }
606
+ }
607
+ for (const id of nodeIds) if (!seen.has(id)) order.push(id);
608
+ return order;
609
+ }
610
+ function useAutoplay(order, enabled) {
611
+ const reduced = usePrefersReducedMotion();
612
+ const [step, setStep] = React4.useState(0);
613
+ const key = order.join("|");
614
+ React4.useEffect(() => {
615
+ if (!enabled || reduced || order.length === 0) {
616
+ setStep(0);
617
+ return;
618
+ }
619
+ let s = 0;
620
+ setStep(0);
621
+ let timer;
622
+ const tick = () => {
623
+ s += 1;
624
+ if (s > order.length) {
625
+ s = 0;
626
+ setStep(0);
627
+ timer = setTimeout(tick, 850);
628
+ return;
629
+ }
630
+ setStep(s);
631
+ timer = setTimeout(tick, s === order.length ? 1100 : 850);
632
+ };
633
+ timer = setTimeout(tick, 850);
634
+ return () => clearTimeout(timer);
635
+ }, [enabled, reduced, key]);
636
+ return React4.useMemo(() => {
637
+ const m = {};
638
+ order.forEach((id, i) => {
639
+ m[id] = i < step ? "done" : i === step ? "active" : "pending";
640
+ });
641
+ if (step >= order.length) order.forEach((id) => m[id] = "done");
642
+ return m;
643
+ }, [order, step]);
644
+ }
645
+ function resolveStates(nodes, nodeStates) {
646
+ var _a, _b;
647
+ if (!nodeStates) return {};
648
+ const m = {};
649
+ for (const n of nodes) {
650
+ const label = (_a = n.data) == null ? void 0 : _a.label;
651
+ const st = (_b = nodeStates[n.id]) != null ? _b : label ? nodeStates[label] : void 0;
652
+ if (st) m[n.id] = st;
653
+ }
654
+ return m;
655
+ }
656
+ function Inner({ diagram, title, autoplay, nodeStates }) {
657
+ const tokens = useTheme();
658
+ const [full, setFull] = React4.useState(false);
659
+ const [focused, setFocused] = React4.useState(false);
660
+ const [boxW, setBoxW] = React4.useState(640);
661
+ const containerRef = React4.useRef(null);
662
+ const parsed = React4.useMemo(() => parseMermaidFlow(diagram), [diagram]);
663
+ const layout = React4.useMemo(() => parsed ? computeLayout(parsed) : null, [parsed]);
664
+ const themedEdges = React4.useMemo(
665
+ () => {
666
+ var _a;
667
+ return ((_a = layout == null ? void 0 : layout.edges) != null ? _a : []).map((e) => __spreadProps(__spreadValues({}, e), {
668
+ style: __spreadProps(__spreadValues({}, e.style), { stroke: tokens.ACCENT, strokeWidth: 1.75 }),
669
+ labelStyle: { fill: tokens.MUTED, fontSize: 10, fontFamily: "var(--font-sans, Figtree, system-ui, sans-serif)" },
670
+ labelBgStyle: { fill: "#ffffff", fillOpacity: 0.92 },
671
+ markerEnd: { type: "arrowclosed", color: tokens.ACCENT, width: 12, height: 12 }
672
+ }));
673
+ },
674
+ [layout, tokens.ACCENT, tokens.MUTED]
675
+ );
676
+ const order = React4.useMemo(
677
+ () => {
678
+ var _a, _b;
679
+ return topoOrder(((_a = layout == null ? void 0 : layout.nodes) != null ? _a : []).map((n) => n.id), (_b = layout == null ? void 0 : layout.edges) != null ? _b : []);
680
+ },
681
+ [layout]
682
+ );
683
+ const autoStatus = useAutoplay(order, !!autoplay);
684
+ const staticStatus = React4.useMemo(() => {
685
+ var _a;
686
+ return resolveStates((_a = layout == null ? void 0 : layout.nodes) != null ? _a : [], nodeStates);
687
+ }, [layout, nodeStates]);
688
+ const statusMap = autoplay ? autoStatus : staticStatus;
689
+ const displayNodes = React4.useMemo(
690
+ () => {
691
+ var _a;
692
+ return ((_a = layout == null ? void 0 : layout.nodes) != null ? _a : []).map((n) => __spreadProps(__spreadValues({}, n), { data: __spreadProps(__spreadValues({}, n.data), { status: statusMap[n.id] }) }));
693
+ },
694
+ [layout, statusMap]
695
+ );
696
+ const displayEdges = React4.useMemo(
697
+ () => themedEdges.map((e) => {
698
+ const ss = statusMap[e.source];
699
+ const ts = statusMap[e.target];
700
+ const flowing = ss === "done" && ts === "active";
701
+ const bothDone = ss === "done" && ts === "done";
702
+ const anyStatus = !!(ss || ts);
703
+ const lit = flowing || bothDone;
704
+ const stroke = lit || !anyStatus ? tokens.ACCENT : tokens.BORDER;
705
+ return __spreadProps(__spreadValues({}, e), {
706
+ animated: flowing,
707
+ style: __spreadProps(__spreadValues({}, e.style), { stroke, strokeWidth: flowing ? 2.25 : 1.75, opacity: anyStatus && !lit ? 0.5 : 1, transition: "stroke 0.3s ease, opacity 0.3s ease" }),
708
+ markerEnd: { type: "arrowclosed", color: stroke, width: 12, height: 12 }
709
+ });
710
+ }),
711
+ [themedEdges, statusMap, tokens.ACCENT, tokens.BORDER]
712
+ );
713
+ const [nodes, setNodes, onNC] = react.useNodesState(displayNodes);
714
+ const [edges, setEdges, onEC] = react.useEdgesState(displayEdges);
715
+ const rf = react.useReactFlow();
716
+ React4.useEffect(() => {
717
+ setNodes(displayNodes);
718
+ }, [displayNodes, setNodes]);
719
+ React4.useEffect(() => {
720
+ setEdges(displayEdges);
721
+ }, [displayEdges, setEdges]);
722
+ React4.useEffect(() => {
723
+ const id = requestAnimationFrame(() => {
724
+ try {
725
+ rf.fitView({ padding: 0.1 });
726
+ } catch (e) {
727
+ }
728
+ });
729
+ return () => cancelAnimationFrame(id);
730
+ }, [layout, rf]);
731
+ const handleClickOutside = React4.useCallback((e) => {
732
+ if (containerRef.current && !containerRef.current.contains(e.target)) setFocused(false);
733
+ }, []);
734
+ React4.useEffect(() => {
735
+ document.addEventListener("mousedown", handleClickOutside);
736
+ return () => document.removeEventListener("mousedown", handleClickOutside);
737
+ }, [handleClickOutside]);
738
+ React4.useEffect(() => {
739
+ const el = containerRef.current;
740
+ if (!el) return;
741
+ let raf = 0;
742
+ const measure = () => {
743
+ const w = el.clientWidth || 640;
744
+ setBoxW((prev) => Math.abs(prev - w) > 1 ? w : prev);
745
+ };
746
+ measure();
747
+ if (typeof ResizeObserver === "undefined") return;
748
+ const ro = new ResizeObserver(() => {
749
+ cancelAnimationFrame(raf);
750
+ raf = requestAnimationFrame(measure);
751
+ });
752
+ ro.observe(el);
753
+ return () => {
754
+ cancelAnimationFrame(raf);
755
+ ro.disconnect();
756
+ };
757
+ }, []);
758
+ if (!parsed || !layout) {
759
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { style: __spreadProps(__spreadValues({}, themeVars(tokens)), { height: 320 }), children: /* @__PURE__ */ jsxRuntime.jsx(MermaidFallback, { diagram, title }) });
760
+ }
761
+ const h = idealHeight(boxW, layout.graphWidth, layout.graphHeight);
762
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref: containerRef, style: __spreadProps(__spreadValues({}, themeVars(tokens)), { position: "relative", width: "100%", height: h }), onMouseDown: () => setFocused(true), children: [
763
+ /* @__PURE__ */ jsxRuntime.jsx("style", { children: FLOW_ANIM_CSS }),
764
+ /* @__PURE__ */ jsxRuntime.jsx(
765
+ react.ReactFlow,
766
+ {
767
+ nodes,
768
+ edges,
769
+ nodeTypes,
770
+ onNodesChange: onNC,
771
+ onEdgesChange: onEC,
772
+ fitView: true,
773
+ fitViewOptions: { padding: 0.1 },
774
+ nodesDraggable: false,
775
+ nodesConnectable: false,
776
+ elementsSelectable: false,
777
+ panOnDrag: true,
778
+ zoomOnScroll: focused,
779
+ preventScrolling: focused,
780
+ minZoom: 0.2,
781
+ maxZoom: 4,
782
+ proOptions: { hideAttribution: true },
783
+ style: { background: tokens.PAPER, width: "100%", height: "100%", borderRadius: 10 },
784
+ children: /* @__PURE__ */ jsxRuntime.jsx(react.Background, { variant: react.BackgroundVariant.Dots, gap: 20, size: 1, color: tokens.BORDER })
785
+ }
786
+ ),
787
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { position: "absolute", top: 10, right: 10, zIndex: 10, display: "flex", gap: 6 }, children: [
788
+ /* @__PURE__ */ jsxRuntime.jsx(FitBtn, {}),
789
+ /* @__PURE__ */ jsxRuntime.jsxs("button", { style: pillStyle, onClick: () => setFull(true), onMouseEnter: onEnter, onMouseLeave: onLeave, children: [
790
+ /* @__PURE__ */ jsxRuntime.jsx(ExpandIcon, {}),
791
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: "Expand" })
792
+ ] })
793
+ ] }),
794
+ full && typeof document !== "undefined" && /* @__PURE__ */ jsxRuntime.jsx(FullscreenModal, { nodes: displayNodes, edges: displayEdges, title, onClose: () => setFull(false) })
795
+ ] });
796
+ }
797
+ function FlowGraph({ diagram, title, autoplay, nodeStates }) {
798
+ return /* @__PURE__ */ jsxRuntime.jsx(react.ReactFlowProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(Inner, { diagram, title, autoplay, nodeStates }) });
799
+ }
800
+ var hDot, FLOW_ANIM_CSS, nodeBase, nodeTypes, pillStyle, onEnter, onLeave, ExpandIcon, CloseIcon, mermaidReady, mermaidSig, renderSeq;
801
+ var init_FlowGraph = __esm({
802
+ "src/composites/flow-canvas/FlowGraph.tsx"() {
803
+ "use client";
804
+ init_ThemeContext();
805
+ init_parseMermaidFlow();
806
+ init_layoutFlow();
807
+ hDot = {
808
+ width: 8,
809
+ height: 8,
810
+ background: "var(--gx-accent)",
811
+ border: "2px solid var(--gx-bg)",
812
+ borderRadius: "50%"
813
+ };
814
+ FLOW_ANIM_CSS = `
815
+ .gx-flow-node{transition:opacity .3s ease,box-shadow .35s ease,border-color .3s ease,background-color .3s ease;}
816
+ .gx-flow-pending{opacity:.45;}
817
+ .gx-flow-active{border-color:var(--gx-accent)!important;background-color:color-mix(in srgb,var(--gx-accent) 9%,#fff)!important;animation:gxFlowPulse 1.5s ease-in-out infinite;}
818
+ .gx-flow-done{border-color:var(--gx-accent)!important;background-color:color-mix(in srgb,var(--gx-accent) 15%,#fff)!important;}
819
+ .gx-flow-error{border-color:#dc2626!important;background-color:#fdecec!important;}
820
+ .gx-flow-poly{transition:stroke .3s ease,fill .3s ease;}
821
+ .gx-flow-active .gx-flow-poly{stroke:var(--gx-accent);fill:color-mix(in srgb,var(--gx-accent) 9%,#fff);}
822
+ .gx-flow-done .gx-flow-poly{stroke:var(--gx-accent);fill:color-mix(in srgb,var(--gx-accent) 15%,#fff);}
823
+ .gx-done-badge{position:absolute;top:-7px;right:-7px;width:15px;height:15px;border-radius:50%;background:var(--gx-accent);color:#fff;display:flex;align-items:center;justify-content:center;z-index:3;box-shadow:0 1px 2px rgba(0,0,0,.2);}
824
+ @keyframes gxFlowPulse{0%,100%{box-shadow:0 0 0 0 color-mix(in srgb,var(--gx-accent) 50%,transparent);}50%{box-shadow:0 0 0 7px color-mix(in srgb,var(--gx-accent) 0%,transparent);}}
825
+ @media (prefers-reduced-motion: reduce){.gx-flow-active{animation:none;}}
826
+ `;
827
+ nodeBase = {
828
+ position: "relative",
829
+ background: "var(--gx-bg)",
830
+ color: "var(--gx-text)",
831
+ border: "1.5px solid var(--gx-outline)",
832
+ fontFamily: "var(--gx-font)",
833
+ fontSize: "12px",
834
+ fontWeight: 500,
835
+ display: "flex",
836
+ alignItems: "center",
837
+ justifyContent: "center",
838
+ textAlign: "center",
839
+ padding: "8px 14px",
840
+ width: "100%",
841
+ height: "100%",
842
+ boxSizing: "border-box",
843
+ userSelect: "none",
844
+ lineHeight: 1.3
845
+ };
846
+ nodeTypes = {
847
+ rect: RectNode,
848
+ rounded: RoundedNode,
849
+ circle: CircleNode,
850
+ diamond: DiamondNode,
851
+ cylinder: CylinderNode
852
+ };
853
+ pillStyle = {
854
+ display: "flex",
855
+ alignItems: "center",
856
+ gap: "5px",
857
+ height: "26px",
858
+ padding: "0 10px",
859
+ background: "rgba(255,255,255,0.9)",
860
+ backdropFilter: "blur(10px)",
861
+ WebkitBackdropFilter: "blur(10px)",
862
+ border: "1px solid var(--gx-border)",
863
+ borderRadius: "100px",
864
+ cursor: "pointer",
865
+ color: "var(--gx-muted)",
866
+ fontSize: "11px",
867
+ fontFamily: "var(--gx-font)",
868
+ fontWeight: 500,
869
+ boxShadow: "0 1px 3px rgba(0,0,0,0.07)",
870
+ transition: "background 0.12s, color 0.12s"
871
+ };
872
+ onEnter = (e) => {
873
+ e.currentTarget.style.background = "var(--gx-bg)";
874
+ e.currentTarget.style.color = "var(--gx-text)";
875
+ };
876
+ onLeave = (e) => {
877
+ e.currentTarget.style.background = "rgba(255,255,255,0.9)";
878
+ e.currentTarget.style.color = "var(--gx-muted)";
879
+ };
880
+ ExpandIcon = () => /* @__PURE__ */ jsxRuntime.jsx("svg", { width: "11", height: "11", viewBox: "0 0 11 11", fill: "none", stroke: "currentColor", strokeWidth: "1.75", strokeLinecap: "round", children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M1 4V1h3M7 1h3v3M10 7v3H7M4 10H1V7" }) });
881
+ CloseIcon = () => /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "10", height: "10", viewBox: "0 0 10 10", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", children: [
882
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "1", y1: "1", x2: "9", y2: "9" }),
883
+ /* @__PURE__ */ jsxRuntime.jsx("line", { x1: "9", y1: "1", x2: "1", y2: "9" })
884
+ ] });
885
+ mermaidReady = false;
886
+ mermaidSig = "";
887
+ renderSeq = 0;
888
+ }
889
+ });
890
+
891
+ // src/shared/ColumnSettingsPanel.tsx
892
+ init_theme();
893
+ function ColumnSettingsPanel({ columns, hidden, onToggle, onShowAll, onHideAll }) {
894
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", gap: "6px", minWidth: "180px" }, children: [
895
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "space-between", paddingBottom: "4px", borderBottom: `1px solid ${BORDER}` }, children: [
896
+ /* @__PURE__ */ jsxRuntime.jsx(
897
+ "button",
898
+ {
899
+ onClick: onShowAll,
900
+ style: { background: "none", border: "none", cursor: "pointer", fontSize: "11px", color: ACCENT, fontWeight: 500, padding: 0 },
901
+ children: "Show all"
902
+ }
903
+ ),
904
+ /* @__PURE__ */ jsxRuntime.jsx(
905
+ "button",
906
+ {
907
+ onClick: onHideAll,
908
+ style: { background: "none", border: "none", cursor: "pointer", fontSize: "11px", color: MUTED, fontWeight: 500, padding: 0 },
909
+ children: "Hide all"
910
+ }
911
+ )
912
+ ] }),
913
+ columns.map((col) => /* @__PURE__ */ jsxRuntime.jsxs(
914
+ "label",
915
+ {
916
+ style: { display: "flex", alignItems: "center", gap: "8px", cursor: "pointer", fontSize: "12px", color: "var(--foreground)" },
917
+ children: [
918
+ /* @__PURE__ */ jsxRuntime.jsx(
919
+ "input",
920
+ {
921
+ type: "checkbox",
922
+ checked: !hidden.has(col.key),
923
+ onChange: () => onToggle(col.key),
924
+ style: { accentColor: ACCENT, width: "14px", height: "14px", margin: 0, cursor: "pointer" }
925
+ }
926
+ ),
927
+ col.label
928
+ ]
929
+ },
930
+ col.key
931
+ ))
932
+ ] });
933
+ }
934
+
935
+ // src/shared/ComponentActions.tsx
936
+ init_theme();
937
+ var DOT_COLOR = "#aaaaaa";
938
+ var DOT_HOVER = "#555555";
939
+ function ComponentActions({ children, onDownloadCSV, columnConfig, filename = "component" }) {
940
+ const [open, setOpen] = React4.useState(false);
941
+ const [view, setView] = React4.useState("main");
942
+ const contentRef = React4.useRef(null);
943
+ const menuRef = React4.useRef(null);
944
+ const btnRef = React4.useRef(null);
945
+ const close = React4.useCallback(() => {
946
+ setOpen(false);
947
+ setView("main");
948
+ }, []);
949
+ React4.useEffect(() => {
950
+ if (!open) return;
951
+ const handler = (e) => {
952
+ var _a, _b;
953
+ if ((_a = menuRef.current) == null ? void 0 : _a.contains(e.target)) return;
954
+ if ((_b = btnRef.current) == null ? void 0 : _b.contains(e.target)) return;
955
+ close();
956
+ };
957
+ document.addEventListener("mousedown", handler);
958
+ return () => document.removeEventListener("mousedown", handler);
959
+ }, [open, close]);
960
+ const handleDownloadPNG = React4.useCallback(async () => {
961
+ if (!contentRef.current) return;
962
+ try {
963
+ const url = await htmlToImage.toPng(contentRef.current, { backgroundColor: "white", pixelRatio: 2 });
964
+ const a = document.createElement("a");
965
+ a.href = url;
966
+ a.download = `${filename}.png`;
967
+ a.click();
968
+ } catch (e) {
969
+ }
970
+ close();
971
+ }, [filename, close]);
972
+ const handleCSV = React4.useCallback(() => {
973
+ onDownloadCSV == null ? void 0 : onDownloadCSV();
974
+ close();
975
+ }, [onDownloadCSV, close]);
976
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { width: "100%", display: "flex", flexDirection: "column" }, children: [
977
+ /* @__PURE__ */ jsxRuntime.jsx("div", { ref: contentRef, style: { width: "100%" }, children }),
978
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", justifyContent: "flex-end", marginTop: "4px", position: "relative", zIndex: 10, flexShrink: 0 }, children: [
979
+ /* @__PURE__ */ jsxRuntime.jsx(
980
+ "button",
981
+ {
982
+ ref: btnRef,
983
+ onClick: () => {
984
+ setOpen((o) => !o);
985
+ setView("main");
986
+ },
987
+ "aria-label": "Component actions",
988
+ style: {
989
+ background: "none",
990
+ border: "none",
991
+ cursor: "pointer",
992
+ padding: "4px 8px",
993
+ display: "flex",
994
+ gap: "3px",
995
+ alignItems: "center",
996
+ borderRadius: "6px",
997
+ transition: "background 0.15s"
998
+ },
999
+ onMouseEnter: (e) => {
1000
+ e.currentTarget.style.background = "#f2f2f2";
1001
+ e.currentTarget.querySelectorAll("circle").forEach((c) => c.style.fill = DOT_HOVER);
1002
+ },
1003
+ onMouseLeave: (e) => {
1004
+ e.currentTarget.style.background = "none";
1005
+ e.currentTarget.querySelectorAll("circle").forEach((c) => c.style.fill = DOT_COLOR);
1006
+ },
1007
+ children: /* @__PURE__ */ jsxRuntime.jsxs("svg", { width: "20", height: "6", viewBox: "0 0 20 6", children: [
1008
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "3", cy: "3", r: "2", style: { fill: DOT_COLOR, transition: "fill 0.15s" } }),
1009
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "10", cy: "3", r: "2", style: { fill: DOT_COLOR, transition: "fill 0.15s" } }),
1010
+ /* @__PURE__ */ jsxRuntime.jsx("circle", { cx: "17", cy: "3", r: "2", style: { fill: DOT_COLOR, transition: "fill 0.15s" } })
1011
+ ] })
1012
+ }
1013
+ ),
1014
+ open && /* @__PURE__ */ jsxRuntime.jsx(
1015
+ "div",
1016
+ {
1017
+ ref: menuRef,
1018
+ style: {
1019
+ position: "absolute",
1020
+ bottom: "100%",
1021
+ right: 0,
1022
+ marginBottom: "4px",
1023
+ background: "white",
1024
+ border: `1px solid ${BORDER}`,
1025
+ borderRadius: "0.75rem",
1026
+ boxShadow: "0 4px 12px rgba(0,0,0,0.06)",
1027
+ zIndex: 50,
1028
+ padding: view === "columns" ? "10px" : "4px",
1029
+ minWidth: view === "columns" ? "200px" : "160px"
1030
+ },
1031
+ children: view === "main" ? /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column" }, children: [
1032
+ columnConfig && /* @__PURE__ */ jsxRuntime.jsx(MenuButton, { label: "Customize columns", onClick: () => setView("columns") }),
1033
+ onDownloadCSV && /* @__PURE__ */ jsxRuntime.jsx(MenuButton, { label: "Download CSV", onClick: handleCSV }),
1034
+ /* @__PURE__ */ jsxRuntime.jsx(MenuButton, { label: "Download PNG", onClick: handleDownloadPNG })
1035
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
1036
+ /* @__PURE__ */ jsxRuntime.jsx(
1037
+ "button",
1038
+ {
1039
+ onClick: () => setView("main"),
1040
+ style: { background: "none", border: "none", cursor: "pointer", fontSize: "11px", color: MUTED, marginBottom: "6px", padding: 0 },
1041
+ children: "\u2190 Back"
1042
+ }
1043
+ ),
1044
+ /* @__PURE__ */ jsxRuntime.jsx(
1045
+ ColumnSettingsPanel,
1046
+ {
1047
+ columns: columnConfig.columns,
1048
+ hidden: columnConfig.hidden,
1049
+ onToggle: columnConfig.onToggle,
1050
+ onShowAll: columnConfig.onShowAll,
1051
+ onHideAll: columnConfig.onHideAll
1052
+ }
1053
+ )
1054
+ ] })
1055
+ }
1056
+ )
1057
+ ] })
1058
+ ] });
1059
+ }
1060
+ function MenuButton({ label, onClick }) {
1061
+ return /* @__PURE__ */ jsxRuntime.jsx(
1062
+ "button",
1063
+ {
1064
+ onClick,
1065
+ style: {
1066
+ background: "none",
1067
+ border: "none",
1068
+ cursor: "pointer",
1069
+ padding: "8px 12px",
1070
+ fontSize: "12.5px",
1071
+ color: "var(--foreground)",
1072
+ textAlign: "left",
1073
+ borderRadius: "8px",
1074
+ transition: "background 0.15s",
1075
+ whiteSpace: "nowrap"
1076
+ },
1077
+ onMouseEnter: (e) => e.currentTarget.style.background = "#f2f2f2",
1078
+ onMouseLeave: (e) => e.currentTarget.style.background = "none",
1079
+ children: label
1080
+ }
1081
+ );
1082
+ }
1083
+
1084
+ // src/composites/flow-canvas/resolver.tsx
1085
+ init_ThemeContext();
1086
+ var FlowGraph2 = React4__default.default.lazy(
1087
+ () => Promise.resolve().then(() => (init_FlowGraph(), FlowGraph_exports)).then((m) => ({ default: m.FlowGraph }))
1088
+ );
1089
+ function FlowCanvasRenderer({
1090
+ diagram,
1091
+ title,
1092
+ description,
1093
+ streaming = false,
1094
+ autoplay,
1095
+ nodeStates
1096
+ }) {
1097
+ const { ACCENT: ACCENT2, BORDER: BORDER2, MUTED: MUTED2, PAPER: PAPER2 } = useTheme();
1098
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { width: "100%", display: "flex", flexDirection: "column", gap: "8px" }, children: [
1099
+ (title || streaming) && /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "center", gap: "8px" }, children: [
1100
+ title && /* @__PURE__ */ jsxRuntime.jsx("p", { style: {
1101
+ fontFamily: "var(--font-serif)",
1102
+ fontSize: "15px",
1103
+ fontWeight: 600,
1104
+ color: "var(--foreground)",
1105
+ letterSpacing: "-0.005em",
1106
+ margin: 0
1107
+ }, children: title }),
1108
+ streaming && /* @__PURE__ */ jsxRuntime.jsx("span", { style: {
1109
+ display: "inline-block",
1110
+ width: "7px",
1111
+ height: "7px",
1112
+ borderRadius: "50%",
1113
+ background: ACCENT2,
1114
+ animation: "canvasPulse 1.2s ease-in-out infinite",
1115
+ flexShrink: 0
1116
+ } })
1117
+ ] }),
1118
+ description && !streaming && /* @__PURE__ */ jsxRuntime.jsx("p", { style: { fontSize: "12.5px", color: "#888888", margin: 0, fontFamily: "var(--font-sans)" }, children: description }),
1119
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: __spreadValues({
1120
+ width: "100%",
1121
+ borderRadius: "0.75rem",
1122
+ border: `1px solid ${BORDER2}`,
1123
+ boxShadow: "0 1px 2px rgba(0,0,0,0.03), 0 4px 12px rgba(0,0,0,0.05)",
1124
+ overflow: "hidden",
1125
+ background: "#ffffff",
1126
+ position: "relative"
1127
+ }, diagram ? {} : { height: "320px" }), children: diagram ? /* @__PURE__ */ jsxRuntime.jsx(React4.Suspense, { fallback: null, children: /* @__PURE__ */ jsxRuntime.jsx(FlowGraph2, { diagram, title, autoplay, nodeStates }) }) : /* @__PURE__ */ jsxRuntime.jsx("div", { style: {
1128
+ position: "absolute",
1129
+ inset: 0,
1130
+ display: "flex",
1131
+ alignItems: "center",
1132
+ justifyContent: "center"
1133
+ }, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { style: { display: "flex", flexDirection: "column", alignItems: "center", gap: "12px" }, children: [
1134
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { display: "flex", gap: "5px" }, children: [0, 1, 2].map((i) => /* @__PURE__ */ jsxRuntime.jsx("span", { style: {
1135
+ width: "6px",
1136
+ height: "6px",
1137
+ borderRadius: "50%",
1138
+ background: ACCENT2,
1139
+ display: "inline-block",
1140
+ animation: `bounce 1s ease-in-out ${i * 0.18}s infinite`
1141
+ } }, i)) }),
1142
+ /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontSize: "12px", color: "#888888", fontFamily: "var(--font-sans)" }, children: "Drawing diagram\u2026" })
1143
+ ] }) }) }),
1144
+ /* @__PURE__ */ jsxRuntime.jsx("style", { children: `
1145
+ @keyframes canvasPulse {
1146
+ 0%, 100% { opacity: 1; transform: scale(1); }
1147
+ 50% { opacity: 0.4; transform: scale(0.75); }
1148
+ }
1149
+
1150
+ /* \u2500\u2500 Mermaid output container \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
1151
+ /* Centering + padding handled by the shared Viewport; let the svg size
1152
+ naturally so fit-to-view can scale it. */
1153
+ .mermaid-output {
1154
+ display: flex;
1155
+ align-items: flex-start;
1156
+ justify-content: center;
1157
+ width: 100%;
1158
+ box-sizing: border-box;
1159
+ padding: 24px 20px;
1160
+ }
1161
+ .mermaid-output svg { display: block; max-width: 100%; height: auto; }
1162
+
1163
+ /* \u2500\u2500 All SVG text \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
1164
+ .mermaid-output text,
1165
+ .mermaid-output text tspan {
1166
+ font-family: Figtree, system-ui, sans-serif !important;
1167
+ font-size: 12px !important;
1168
+ fill: #111111 !important;
1169
+ }
1170
+
1171
+ /* \u2500\u2500 Flowchart: node shapes \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
1172
+ .mermaid-output .node rect,
1173
+ .mermaid-output .node circle,
1174
+ .mermaid-output .node ellipse,
1175
+ .mermaid-output .node polygon,
1176
+ .mermaid-output .node path {
1177
+ stroke: #111111 !important;
1178
+ stroke-width: 2 !important;
1179
+ }
1180
+
1181
+ /* \u2500\u2500 Edges / arrows \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
1182
+ .mermaid-output .edgePath .path,
1183
+ .mermaid-output .flowchart-link {
1184
+ stroke: ${ACCENT2} !important;
1185
+ stroke-width: 2 !important;
1186
+ }
1187
+ .mermaid-output marker path {
1188
+ fill: ${ACCENT2} !important;
1189
+ stroke: ${ACCENT2} !important;
1190
+ }
1191
+ .mermaid-output .edgeLabel rect {
1192
+ fill: #ffffff !important;
1193
+ stroke: none !important;
1194
+ }
1195
+ .mermaid-output .edgeLabel text,
1196
+ .mermaid-output .edgeLabel text tspan {
1197
+ fill: ${MUTED2} !important;
1198
+ font-size: 11px !important;
1199
+ }
1200
+
1201
+ /* \u2500\u2500 Clusters / subgraphs \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
1202
+ .mermaid-output .cluster rect {
1203
+ fill: ${PAPER2} !important;
1204
+ stroke: ${BORDER2} !important;
1205
+ stroke-width: 2 !important;
1206
+ }
1207
+ .mermaid-output .cluster text,
1208
+ .mermaid-output .cluster text tspan {
1209
+ font-size: 10px !important;
1210
+ font-weight: 600 !important;
1211
+ letter-spacing: 0.05em !important;
1212
+ fill: ${MUTED2} !important;
1213
+ text-transform: uppercase !important;
1214
+ }
1215
+
1216
+ /* \u2500\u2500 Sequence diagrams \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
1217
+ .mermaid-output .actor {
1218
+ fill: #ffffff !important;
1219
+ stroke: #111111 !important;
1220
+ stroke-width: 2 !important;
1221
+ }
1222
+ .mermaid-output line.actor-line {
1223
+ stroke: ${ACCENT2} !important;
1224
+ stroke-width: 1.5 !important;
1225
+ stroke-dasharray: 5 4 !important;
1226
+ }
1227
+ .mermaid-output .messageLine0,
1228
+ .mermaid-output .messageLine1 {
1229
+ stroke: ${ACCENT2} !important;
1230
+ stroke-width: 2 !important;
1231
+ }
1232
+ .mermaid-output .note {
1233
+ fill: #fef8e7 !important;
1234
+ stroke: #e0c97c !important;
1235
+ stroke-width: 2 !important;
1236
+ }
1237
+ .mermaid-output .activation0,
1238
+ .mermaid-output .activation1 {
1239
+ fill: #fef3c7 !important;
1240
+ stroke: ${ACCENT2} !important;
1241
+ stroke-width: 2 !important;
1242
+ }
1243
+ .mermaid-output .loopLine {
1244
+ stroke: ${BORDER2} !important;
1245
+ stroke-dasharray: 4 4 !important;
1246
+ }
1247
+
1248
+ /* \u2500\u2500 ER diagrams \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
1249
+ .mermaid-output .er.entityBox {
1250
+ fill: #ffffff !important;
1251
+ stroke: #111111 !important;
1252
+ stroke-width: 2 !important;
1253
+ }
1254
+ .mermaid-output .er.relationshipLine {
1255
+ stroke: ${ACCENT2} !important;
1256
+ stroke-width: 2 !important;
1257
+ }
1258
+ .mermaid-output .er.reltext tspan {
1259
+ fill: ${MUTED2} !important;
1260
+ font-size: 11px !important;
1261
+ }
1262
+
1263
+ /* \u2500\u2500 Class diagrams \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
1264
+ .mermaid-output g.classGroup rect {
1265
+ fill: #ffffff !important;
1266
+ stroke: #111111 !important;
1267
+ stroke-width: 2 !important;
1268
+ }
1269
+ .mermaid-output .relation {
1270
+ stroke: ${ACCENT2} !important;
1271
+ stroke-width: 2 !important;
1272
+ }
1273
+ ` })
1274
+ ] });
1275
+ }
1276
+ function FlowCanvasResolver(p) {
1277
+ var _a;
1278
+ const { ACCENT: ACCENT2, BORDER: BORDER2 } = useTheme();
1279
+ return /* @__PURE__ */ jsxRuntime.jsx(ComponentActions, { filename: (_a = p.title) != null ? _a : "flow-canvas", children: /* @__PURE__ */ jsxRuntime.jsx(
1280
+ FlowCanvasRenderer,
1281
+ {
1282
+ diagram: p.diagram,
1283
+ title: p.title,
1284
+ description: p.description,
1285
+ streaming: false,
1286
+ autoplay: p.autoplay,
1287
+ nodeStates: p.node_states
1288
+ }
1289
+ ) });
1290
+ }
1291
+
1292
+ exports.FlowCanvasRenderer = FlowCanvasRenderer;
1293
+ exports.FlowCanvasResolver = FlowCanvasResolver;
1294
+ //# sourceMappingURL=resolver.cjs.map
1295
+ //# sourceMappingURL=resolver.cjs.map