prefect 3.6.14.dev1__py3-none-any.whl → 3.6.14.dev2__py3-none-any.whl

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 (228) hide show
  1. prefect/_build_info.py +3 -3
  2. prefect/_observers.py +20 -8
  3. prefect/cli/server.py +18 -3
  4. prefect/deployments/runner.py +448 -8
  5. prefect/flows.py +162 -34
  6. prefect/runner/runner.py +48 -0
  7. prefect/server/orchestration/global_policy.py +4 -2
  8. prefect/server/ui-v2/assets/{artifact-card-DkgEVahF.js → artifact-card-D41jcvLX.js} +2 -2
  9. prefect/server/ui-v2/assets/{artifact-card-DkgEVahF.js.map → artifact-card-D41jcvLX.js.map} +1 -1
  10. prefect/server/ui-v2/assets/{artifact._id-C7yJhkKY.js → artifact._id-CYMvBFBb.js} +2 -2
  11. prefect/server/ui-v2/assets/{artifact._id-C7yJhkKY.js.map → artifact._id-CYMvBFBb.js.map} +1 -1
  12. prefect/server/ui-v2/assets/{automation-wizard-BLI4sqs9.js → automation-wizard-DHsWJ8JS.js} +2 -2
  13. prefect/server/ui-v2/assets/{automation-wizard-BLI4sqs9.js.map → automation-wizard-DHsWJ8JS.js.map} +1 -1
  14. prefect/server/ui-v2/assets/{automation._id-OLes3du9.js → automation._id-CCroE1-1.js} +2 -2
  15. prefect/server/ui-v2/assets/{automation._id-OLes3du9.js.map → automation._id-CCroE1-1.js.map} +1 -1
  16. prefect/server/ui-v2/assets/{automation_._id.edit-QrSzkDDB.js → automation_._id.edit-BgpDmMq7.js} +2 -2
  17. prefect/server/ui-v2/assets/{automation_._id.edit-QrSzkDDB.js.map → automation_._id.edit-BgpDmMq7.js.map} +1 -1
  18. prefect/server/ui-v2/assets/{automations-header-BoJc9HK8.js → automations-header-BEZXZmli.js} +2 -2
  19. prefect/server/ui-v2/assets/{automations-header-BoJc9HK8.js.map → automations-header-BEZXZmli.js.map} +1 -1
  20. prefect/server/ui-v2/assets/{base-job-template-form-section-Br6s0jNS.js → base-job-template-form-section-BubT4OHj.js} +2 -2
  21. prefect/server/ui-v2/assets/{base-job-template-form-section-Br6s0jNS.js.map → base-job-template-form-section-BubT4OHj.js.map} +1 -1
  22. prefect/server/ui-v2/assets/{block-type-details-BSbBP-Nm.js → block-type-details-DCWuBOwb.js} +2 -2
  23. prefect/server/ui-v2/assets/{block-type-details-BSbBP-Nm.js.map → block-type-details-DCWuBOwb.js.map} +1 -1
  24. prefect/server/ui-v2/assets/{block-type-logo-DNFERTyH.js → block-type-logo-SZMe2NdY.js} +2 -2
  25. prefect/server/ui-v2/assets/{block-type-logo-DNFERTyH.js.map → block-type-logo-SZMe2NdY.js.map} +1 -1
  26. prefect/server/ui-v2/assets/{block._id-DO6Hulrv.js → block._id-B6_kwTZ-.js} +2 -2
  27. prefect/server/ui-v2/assets/{block._id-DO6Hulrv.js.map → block._id-B6_kwTZ-.js.map} +1 -1
  28. prefect/server/ui-v2/assets/{block_._id.edit-BWF0TQvv.js → block_._id.edit-Bjg9WgY6.js} +2 -2
  29. prefect/server/ui-v2/assets/{block_._id.edit-BWF0TQvv.js.map → block_._id.edit-Bjg9WgY6.js.map} +1 -1
  30. prefect/server/ui-v2/assets/{catalog-BlaqZP0r.js → catalog-Bv8x-rIx.js} +2 -2
  31. prefect/server/ui-v2/assets/{catalog-BlaqZP0r.js.map → catalog-Bv8x-rIx.js.map} +1 -1
  32. prefect/server/ui-v2/assets/{catalog_._slug-BZWiMtjq.js → catalog_._slug-2GldfHc0.js} +2 -2
  33. prefect/server/ui-v2/assets/{catalog_._slug-BZWiMtjq.js.map → catalog_._slug-2GldfHc0.js.map} +1 -1
  34. prefect/server/ui-v2/assets/{catalog_._slug_.create-oHffbeMs.js → catalog_._slug_.create-Bjt7az95.js} +2 -2
  35. prefect/server/ui-v2/assets/{catalog_._slug_.create-oHffbeMs.js.map → catalog_._slug_.create-Bjt7az95.js.map} +1 -1
  36. prefect/server/ui-v2/assets/{collapsible-D45P93xU.js → collapsible-BT0EnMmT.js} +2 -2
  37. prefect/server/ui-v2/assets/{collapsible-D45P93xU.js.map → collapsible-BT0EnMmT.js.map} +1 -1
  38. prefect/server/ui-v2/assets/{concurrency-limit._id-B6oyPVya.js → concurrency-limit._id-Ba5Uof4l.js} +2 -2
  39. prefect/server/ui-v2/assets/{concurrency-limit._id-B6oyPVya.js.map → concurrency-limit._id-Ba5Uof4l.js.map} +1 -1
  40. prefect/server/ui-v2/assets/{create-CcYMd6w6.js → create-DK8Cy1hG.js} +2 -2
  41. prefect/server/ui-v2/assets/{create-CcYMd6w6.js.map → create-DK8Cy1hG.js.map} +1 -1
  42. prefect/server/ui-v2/assets/{create-DK1WvDhf.js → create-Ds8Lheyk.js} +2 -2
  43. prefect/server/ui-v2/assets/{create-DK1WvDhf.js.map → create-Ds8Lheyk.js.map} +1 -1
  44. prefect/server/ui-v2/assets/cronstrue-C72j5NDa.js +2 -0
  45. prefect/server/ui-v2/assets/cronstrue-C72j5NDa.js.map +1 -0
  46. prefect/server/ui-v2/assets/{data-table-B_iyrrTm.js → data-table-B6bdz5Zj.js} +2 -2
  47. prefect/server/ui-v2/assets/{data-table-B_iyrrTm.js.map → data-table-B6bdz5Zj.js.map} +1 -1
  48. prefect/server/ui-v2/assets/{delete-confirmation-dialog-7GKqeKy1.js → delete-confirmation-dialog-CV8ITEEW.js} +2 -2
  49. prefect/server/ui-v2/assets/{delete-confirmation-dialog-7GKqeKy1.js.map → delete-confirmation-dialog-CV8ITEEW.js.map} +1 -1
  50. prefect/server/ui-v2/assets/{deployment-action-header-DrvnfE9Y.js → deployment-action-header-DpjOcab0.js} +2 -2
  51. prefect/server/ui-v2/assets/{deployment-action-header-DrvnfE9Y.js.map → deployment-action-header-DpjOcab0.js.map} +1 -1
  52. prefect/server/ui-v2/assets/{deployment-form-DsAij22s.js → deployment-form-CjIPPnwV.js} +3 -3
  53. prefect/server/ui-v2/assets/{deployment-form-DsAij22s.js.map → deployment-form-CjIPPnwV.js.map} +1 -1
  54. prefect/server/ui-v2/assets/{deployment-links-BwqfKWQX.js → deployment-links--VkBo9wV.js} +2 -2
  55. prefect/server/ui-v2/assets/{deployment-links-BwqfKWQX.js.map → deployment-links--VkBo9wV.js.map} +1 -1
  56. prefect/server/ui-v2/assets/{deployment._id-E5e5s6bO.js → deployment._id-CW00MZGG.js} +2 -2
  57. prefect/server/ui-v2/assets/{deployment._id-E5e5s6bO.js.map → deployment._id-CW00MZGG.js.map} +1 -1
  58. prefect/server/ui-v2/assets/{deployment._id-U6KrtWw0.js → deployment._id-DjYh9IiR.js} +2 -2
  59. prefect/server/ui-v2/assets/{deployment._id-U6KrtWw0.js.map → deployment._id-DjYh9IiR.js.map} +1 -1
  60. prefect/server/ui-v2/assets/deployment_._id.duplicate-18ZQHHgI.js +2 -0
  61. prefect/server/ui-v2/assets/{deployment_._id.duplicate-C_kNyCA9.js.map → deployment_._id.duplicate-18ZQHHgI.js.map} +1 -1
  62. prefect/server/ui-v2/assets/deployment_._id.edit-C9H0Teuv.js +2 -0
  63. prefect/server/ui-v2/assets/{deployment_._id.edit-BP8pfTOR.js.map → deployment_._id.edit-C9H0Teuv.js.map} +1 -1
  64. prefect/server/ui-v2/assets/{deployment_._id.run-Di3-4Mtk.js → deployment_._id.run-CwHYw8j1.js} +2 -2
  65. prefect/server/ui-v2/assets/{deployment_._id.run-Di3-4Mtk.js.map → deployment_._id.run-CwHYw8j1.js.map} +1 -1
  66. prefect/server/ui-v2/assets/{dropdown-menu-iS8iJMpx.js → dropdown-menu-BYgkpoqb.js} +2 -2
  67. prefect/server/ui-v2/assets/{dropdown-menu-iS8iJMpx.js.map → dropdown-menu-BYgkpoqb.js.map} +1 -1
  68. prefect/server/ui-v2/assets/{event._eventDate._eventId-CG15qDSZ.js → event._eventDate._eventId-mPwFHce2.js} +2 -2
  69. prefect/server/ui-v2/assets/{event._eventDate._eventId-CG15qDSZ.js.map → event._eventDate._eventId-mPwFHce2.js.map} +1 -1
  70. prefect/server/ui-v2/assets/flow-run-graph-BMp5vJJa.js +2 -0
  71. prefect/server/ui-v2/assets/flow-run-graph-BMp5vJJa.js.map +1 -0
  72. prefect/server/ui-v2/assets/{flow-run._id-D_eAHZ5z.js → flow-run._id-CafHaMND.js} +2 -2
  73. prefect/server/ui-v2/assets/{flow-run._id-D_eAHZ5z.js.map → flow-run._id-CafHaMND.js.map} +1 -1
  74. prefect/server/ui-v2/assets/flow-run._id-CelqqA9P.js +4 -0
  75. prefect/server/ui-v2/assets/flow-run._id-CelqqA9P.js.map +1 -0
  76. prefect/server/ui-v2/assets/{flow-run._id-wco0Q19f.js → flow-run._id-hVuHWXbi.js} +2 -2
  77. prefect/server/ui-v2/assets/{flow-run._id-wco0Q19f.js.map → flow-run._id-hVuHWXbi.js.map} +1 -1
  78. prefect/server/ui-v2/assets/{flow-runs-pagination-DzGHOht3.js → flow-runs-pagination-CqjL9gOj.js} +2 -2
  79. prefect/server/ui-v2/assets/{flow-runs-pagination-DzGHOht3.js.map → flow-runs-pagination-CqjL9gOj.js.map} +1 -1
  80. prefect/server/ui-v2/assets/{flow._id-Dn2so3rK.js → flow._id-C1Djus0m.js} +2 -2
  81. prefect/server/ui-v2/assets/{flow._id-Dn2so3rK.js.map → flow._id-C1Djus0m.js.map} +1 -1
  82. prefect/server/ui-v2/assets/{form-rC8pxeRl.js → form-z_RaFdEo.js} +2 -2
  83. prefect/server/ui-v2/assets/{form-rC8pxeRl.js.map → form-z_RaFdEo.js.map} +1 -1
  84. prefect/server/ui-v2/assets/{header-CuAwmJ64.js → header-B-PvVnN7.js} +2 -2
  85. prefect/server/ui-v2/assets/{header-CuAwmJ64.js.map → header-B-PvVnN7.js.map} +1 -1
  86. prefect/server/ui-v2/assets/{header-C0zV3WDn.js → header-BSXYXvPS.js} +2 -2
  87. prefect/server/ui-v2/assets/{header-C0zV3WDn.js.map → header-BSXYXvPS.js.map} +1 -1
  88. prefect/server/ui-v2/assets/{header-C6ko3O7G.js → header-CKVO4oLE.js} +2 -2
  89. prefect/server/ui-v2/assets/{header-C6ko3O7G.js.map → header-CKVO4oLE.js.map} +1 -1
  90. prefect/server/ui-v2/assets/{index-CotXErTe.js → index-B5zctA6A.js} +2 -2
  91. prefect/server/ui-v2/assets/{index-CotXErTe.js.map → index-B5zctA6A.js.map} +1 -1
  92. prefect/server/ui-v2/assets/{index-k2161reF.js → index-BCzGofA2.js} +2 -2
  93. prefect/server/ui-v2/assets/{index-k2161reF.js.map → index-BCzGofA2.js.map} +1 -1
  94. prefect/server/ui-v2/assets/{index-BdgomKuA.js → index-BOuQzuoR.js} +2 -2
  95. prefect/server/ui-v2/assets/{index-BdgomKuA.js.map → index-BOuQzuoR.js.map} +1 -1
  96. prefect/server/ui-v2/assets/{index-pE_31vXF.js → index-BQOxk1xu.js} +2 -2
  97. prefect/server/ui-v2/assets/{index-pE_31vXF.js.map → index-BQOxk1xu.js.map} +1 -1
  98. prefect/server/ui-v2/assets/{index-Benf9xn3.js → index-BU1Y-wgo.js} +2 -2
  99. prefect/server/ui-v2/assets/{index-Benf9xn3.js.map → index-BU1Y-wgo.js.map} +1 -1
  100. prefect/server/ui-v2/assets/{index-CYpFLd7y.js → index-BxGluvOD.js} +2 -2
  101. prefect/server/ui-v2/assets/{index-CYpFLd7y.js.map → index-BxGluvOD.js.map} +1 -1
  102. prefect/server/ui-v2/assets/{index-CcVSC2pV.js → index-CAbBPipD.js} +2 -2
  103. prefect/server/ui-v2/assets/{index-CcVSC2pV.js.map → index-CAbBPipD.js.map} +1 -1
  104. prefect/server/ui-v2/assets/index-CHwhYh-B.js +2 -0
  105. prefect/server/ui-v2/assets/{index-BYQ1P2TC.js.map → index-CHwhYh-B.js.map} +1 -1
  106. prefect/server/ui-v2/assets/{index-0g8aAM30.js → index-CIKCrLeZ.js} +2 -2
  107. prefect/server/ui-v2/assets/{index-0g8aAM30.js.map → index-CIKCrLeZ.js.map} +1 -1
  108. prefect/server/ui-v2/assets/{index-fhrsIceD.js → index-CLUjhc4A.js} +2 -2
  109. prefect/server/ui-v2/assets/{index-fhrsIceD.js.map → index-CLUjhc4A.js.map} +1 -1
  110. prefect/server/ui-v2/assets/index-CX5uU1zd.js +2 -0
  111. prefect/server/ui-v2/assets/index-CX5uU1zd.js.map +1 -0
  112. prefect/server/ui-v2/assets/{index-DwkedbVy.js → index-CXVePXfG.js} +2 -2
  113. prefect/server/ui-v2/assets/{index-DwkedbVy.js.map → index-CXVePXfG.js.map} +1 -1
  114. prefect/server/ui-v2/assets/{index-DB2qeheX.js → index-D-ZIgaBw.js} +2 -2
  115. prefect/server/ui-v2/assets/{index-DB2qeheX.js.map → index-D-ZIgaBw.js.map} +1 -1
  116. prefect/server/ui-v2/assets/{index-D8fZaZa7.js → index-D10Svo9k.js} +2 -2
  117. prefect/server/ui-v2/assets/{index-D8fZaZa7.js.map → index-D10Svo9k.js.map} +1 -1
  118. prefect/server/ui-v2/assets/{index-CEStyUb-.js → index-D2EEipYt.js} +2 -2
  119. prefect/server/ui-v2/assets/{index-CEStyUb-.js.map → index-D2EEipYt.js.map} +1 -1
  120. prefect/server/ui-v2/assets/{index-BIqzfifB.js → index-DV5fpxXB.js} +2 -2
  121. prefect/server/ui-v2/assets/{index-BIqzfifB.js.map → index-DV5fpxXB.js.map} +1 -1
  122. prefect/server/ui-v2/assets/{index-C3D0Re7U.js → index-FHRYGk_R.js} +2 -2
  123. prefect/server/ui-v2/assets/{index-C3D0Re7U.js.map → index-FHRYGk_R.js.map} +1 -1
  124. prefect/server/ui-v2/assets/{index-CCs20W5W.js → index-IGxqySze.js} +2 -2
  125. prefect/server/ui-v2/assets/{index-CCs20W5W.js.map → index-IGxqySze.js.map} +1 -1
  126. prefect/server/ui-v2/assets/{index-BKbBu9gL.js → index-P2xc38Yh.js} +2 -2
  127. prefect/server/ui-v2/assets/{index-BKbBu9gL.js.map → index-P2xc38Yh.js.map} +1 -1
  128. prefect/server/ui-v2/assets/index-Yzhlw6-Q.js +17 -0
  129. prefect/server/ui-v2/assets/index-Yzhlw6-Q.js.map +1 -0
  130. prefect/server/ui-v2/assets/{index-BjsWjEUO.js → index-n7YFiQkB.js} +2 -2
  131. prefect/server/ui-v2/assets/{index-BjsWjEUO.js.map → index-n7YFiQkB.js.map} +1 -1
  132. prefect/server/ui-v2/assets/{json-input-C9dkBSdc.js → json-input-Dlzy_XLK.js} +2 -2
  133. prefect/server/ui-v2/assets/{json-input-C9dkBSdc.js.map → json-input-Dlzy_XLK.js.map} +1 -1
  134. prefect/server/ui-v2/assets/{key._key-BBVH44_R.js → key._key-DN_txnIw.js} +2 -2
  135. prefect/server/ui-v2/assets/{key._key-BBVH44_R.js.map → key._key-DN_txnIw.js.map} +1 -1
  136. prefect/server/ui-v2/assets/{lazy-markdown-BoMKGRXo.js → lazy-markdown-CPQjrQrX.js} +2 -2
  137. prefect/server/ui-v2/assets/{lazy-markdown-BoMKGRXo.js.map → lazy-markdown-CPQjrQrX.js.map} +1 -1
  138. prefect/server/ui-v2/assets/{login-BmmIDesJ.js → login-BsnFlv-8.js} +2 -2
  139. prefect/server/ui-v2/assets/{login-BmmIDesJ.js.map → login-BsnFlv-8.js.map} +1 -1
  140. prefect/server/ui-v2/assets/{markdown-input-C6P8cYT1.js → markdown-input-b0zl1NLl.js} +2 -2
  141. prefect/server/ui-v2/assets/{markdown-input-C6P8cYT1.js.map → markdown-input-b0zl1NLl.js.map} +1 -1
  142. prefect/server/ui-v2/assets/{python-example-snippet-DPumgTpL.js → python-example-snippet-W9Z_3hjQ.js} +3 -3
  143. prefect/server/ui-v2/assets/{python-example-snippet-DPumgTpL.js.map → python-example-snippet-W9Z_3hjQ.js.map} +1 -1
  144. prefect/server/ui-v2/assets/{python-input-DX4uV8MF.js → python-input-EKDBgTDE.js} +2 -2
  145. prefect/server/ui-v2/assets/{python-input-DX4uV8MF.js.map → python-input-EKDBgTDE.js.map} +1 -1
  146. prefect/server/ui-v2/assets/{radio-group-DeNK-Ob0.js → radio-group-BMeznoY8.js} +2 -2
  147. prefect/server/ui-v2/assets/{radio-group-DeNK-Ob0.js.map → radio-group-BMeznoY8.js.map} +1 -1
  148. prefect/server/ui-v2/assets/{route-error-state-C9CbByMx.js → route-error-state-BGOi4dn-.js} +2 -2
  149. prefect/server/ui-v2/assets/{route-error-state-C9CbByMx.js.map → route-error-state-BGOi4dn-.js.map} +1 -1
  150. prefect/server/ui-v2/assets/{schema-form-B45xnsnK.js → schema-form-BHWTZ8Sy.js} +2 -2
  151. prefect/server/ui-v2/assets/{schema-form-B45xnsnK.js.map → schema-form-BHWTZ8Sy.js.map} +1 -1
  152. prefect/server/ui-v2/assets/{schema-form-input-string-format-datetime-BJj81bu-.js → schema-form-input-string-format-datetime-hWIr4wQr.js} +4 -4
  153. prefect/server/ui-v2/assets/{schema-form-input-string-format-datetime-BJj81bu-.js.map → schema-form-input-string-format-datetime-hWIr4wQr.js.map} +1 -1
  154. prefect/server/ui-v2/assets/{settings-CbkeWqQ9.js → settings-DVSPGBen.js} +2 -2
  155. prefect/server/ui-v2/assets/{settings-CbkeWqQ9.js.map → settings-DVSPGBen.js.map} +1 -1
  156. prefect/server/ui-v2/assets/{sort-filter-DM7SvBB0.js → sort-filter-MiwMjIYc.js} +2 -2
  157. prefect/server/ui-v2/assets/{sort-filter-DM7SvBB0.js.map → sort-filter-MiwMjIYc.js.map} +1 -1
  158. prefect/server/ui-v2/assets/{table-CEPo6xb_.js → table-BJkw82b1.js} +2 -2
  159. prefect/server/ui-v2/assets/{table-CEPo6xb_.js.map → table-BJkw82b1.js.map} +1 -1
  160. prefect/server/ui-v2/assets/{tags-input-DJiZSVHp.js → tags-input-1KkWhGJZ.js} +2 -2
  161. prefect/server/ui-v2/assets/{tags-input-DJiZSVHp.js.map → tags-input-1KkWhGJZ.js.map} +1 -1
  162. prefect/server/ui-v2/assets/{task-run-concurrency-limits-reset-dialog-vJEkvqWp.js → task-run-concurrency-limits-reset-dialog-ClBlDic_.js} +2 -2
  163. prefect/server/ui-v2/assets/{task-run-concurrency-limits-reset-dialog-vJEkvqWp.js.map → task-run-concurrency-limits-reset-dialog-ClBlDic_.js.map} +1 -1
  164. prefect/server/ui-v2/assets/{task-run._id-BCnDnXrL.js → task-run._id-48TwMBP1.js} +2 -2
  165. prefect/server/ui-v2/assets/{task-run._id-BCnDnXrL.js.map → task-run._id-48TwMBP1.js.map} +1 -1
  166. prefect/server/ui-v2/assets/{task-run._id-ByJw1K82.js → task-run._id-BmK7HGNl.js} +2 -2
  167. prefect/server/ui-v2/assets/{task-run._id-ByJw1K82.js.map → task-run._id-BmK7HGNl.js.map} +1 -1
  168. prefect/server/ui-v2/assets/{task-runs-pagination-DbjB6XnY.js → task-runs-pagination-DA4izCRv.js} +2 -2
  169. prefect/server/ui-v2/assets/{task-runs-pagination-DbjB6XnY.js.map → task-runs-pagination-DA4izCRv.js.map} +1 -1
  170. prefect/server/ui-v2/assets/{textarea-BX8KbLGx.js → textarea-BqtBNhJB.js} +2 -2
  171. prefect/server/ui-v2/assets/{textarea-BX8KbLGx.js.map → textarea-BqtBNhJB.js.map} +1 -1
  172. prefect/server/ui-v2/assets/{timezone-select-TBj2n6Ox.js → timezone-select-BgD_PENN.js} +2 -2
  173. prefect/server/ui-v2/assets/{timezone-select-TBj2n6Ox.js.map → timezone-select-BgD_PENN.js.map} +1 -1
  174. prefect/server/ui-v2/assets/{toggle-group-D7mfSUim.js → toggle-group-ChA-JYQB.js} +2 -2
  175. prefect/server/ui-v2/assets/{toggle-group-D7mfSUim.js.map → toggle-group-ChA-JYQB.js.map} +1 -1
  176. prefect/server/ui-v2/assets/{use-delete-automation-confirmation-dialog-BpBSjz60.js → use-delete-automation-confirmation-dialog-Da1iWNZ_.js} +2 -2
  177. prefect/server/ui-v2/assets/{use-delete-automation-confirmation-dialog-BpBSjz60.js.map → use-delete-automation-confirmation-dialog-Da1iWNZ_.js.map} +1 -1
  178. prefect/server/ui-v2/assets/{use-delete-block-document-confirmation-dialog-BjKsNw6b.js → use-delete-block-document-confirmation-dialog-DfrxGSyY.js} +2 -2
  179. prefect/server/ui-v2/assets/{use-delete-block-document-confirmation-dialog-BjKsNw6b.js.map → use-delete-block-document-confirmation-dialog-DfrxGSyY.js.map} +1 -1
  180. prefect/server/ui-v2/assets/{use-flow-runs-selected-rows-B_BlBMic.js → use-flow-runs-selected-rows-CYOsQ-Df.js} +2 -2
  181. prefect/server/ui-v2/assets/{use-flow-runs-selected-rows-B_BlBMic.js.map → use-flow-runs-selected-rows-CYOsQ-Df.js.map} +1 -1
  182. prefect/server/ui-v2/assets/{use-get-artifacts-flow-task-runs-BfE433bC.js → use-get-artifacts-flow-task-runs-C0V3_gYz.js} +2 -2
  183. prefect/server/ui-v2/assets/{use-get-artifacts-flow-task-runs-BfE433bC.js.map → use-get-artifacts-flow-task-runs-C0V3_gYz.js.map} +1 -1
  184. prefect/server/ui-v2/assets/{use-quick-run-qrtcF-DD.js → use-quick-run-CgM0EheE.js} +2 -2
  185. prefect/server/ui-v2/assets/{use-quick-run-qrtcF-DD.js.map → use-quick-run-CgM0EheE.js.map} +1 -1
  186. prefect/server/ui-v2/assets/{use-stepper-CVy1_GBw.js → use-stepper-CSAs1T4U.js} +2 -2
  187. prefect/server/ui-v2/assets/{use-stepper-CVy1_GBw.js.map → use-stepper-CSAs1T4U.js.map} +1 -1
  188. prefect/server/ui-v2/assets/{utilities-D5-00wjP.js → utilities-DqaYuzh1.js} +2 -2
  189. prefect/server/ui-v2/assets/{utilities-D5-00wjP.js.map → utilities-DqaYuzh1.js.map} +1 -1
  190. prefect/server/ui-v2/assets/{vendor-date-7GxEwcQM.js → vendor-date-JS-ReHrg.js} +2 -2
  191. prefect/server/ui-v2/assets/{vendor-date-7GxEwcQM.js.map → vendor-date-JS-ReHrg.js.map} +1 -1
  192. prefect/server/ui-v2/assets/{vendor-graphs-R8z6S3Jg.js → vendor-graphs-BRVnayIy.js} +2 -2
  193. prefect/server/ui-v2/assets/{vendor-graphs-R8z6S3Jg.js.map → vendor-graphs-BRVnayIy.js.map} +1 -1
  194. prefect/server/ui-v2/assets/{vendor-radix-CznP1SOq.js → vendor-radix-BZJHvSaq.js} +9 -9
  195. prefect/server/ui-v2/assets/{vendor-radix-CznP1SOq.js.map → vendor-radix-BZJHvSaq.js.map} +1 -1
  196. prefect/server/ui-v2/assets/{work-pool-filter-D8MkTbSW.js → work-pool-filter-T6dM4jKE.js} +2 -2
  197. prefect/server/ui-v2/assets/{work-pool-filter-D8MkTbSW.js.map → work-pool-filter-T6dM4jKE.js.map} +1 -1
  198. prefect/server/ui-v2/assets/{work-pool-queue-toggle-CbI7Gfu5.js → work-pool-queue-toggle-CdUw2mAH.js} +2 -2
  199. prefect/server/ui-v2/assets/{work-pool-queue-toggle-CbI7Gfu5.js.map → work-pool-queue-toggle-CdUw2mAH.js.map} +1 -1
  200. prefect/server/ui-v2/assets/{work-pool._workPoolName-CCzzgVV2.js → work-pool._workPoolName-DD8gh9X-.js} +2 -2
  201. prefect/server/ui-v2/assets/{work-pool._workPoolName-CCzzgVV2.js.map → work-pool._workPoolName-DD8gh9X-.js.map} +1 -1
  202. prefect/server/ui-v2/assets/{work-pool_._workPoolName.edit-BAgiuU_j.js → work-pool_._workPoolName.edit-mmnZTSTy.js} +2 -2
  203. prefect/server/ui-v2/assets/{work-pool_._workPoolName.edit-BAgiuU_j.js.map → work-pool_._workPoolName.edit-mmnZTSTy.js.map} +1 -1
  204. prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue._workQueueName-BUawWJEy.js → work-pool_._workPoolName.queue._workQueueName-fbwQqkVN.js} +2 -2
  205. prefect/server/ui-v2/assets/{work-pool_._workPoolName.queue._workQueueName-BUawWJEy.js.map → work-pool_._workPoolName.queue._workQueueName-fbwQqkVN.js.map} +1 -1
  206. prefect/server/ui-v2/assets/{work-queue-icon-text-D_G_UCJX.js → work-queue-icon-text-YyKOH96e.js} +2 -2
  207. prefect/server/ui-v2/assets/{work-queue-icon-text-D_G_UCJX.js.map → work-queue-icon-text-YyKOH96e.js.map} +1 -1
  208. prefect/server/ui-v2/index.html +3 -3
  209. prefect/settings/models/runner.py +11 -0
  210. prefect/tasks.py +30 -4
  211. {prefect-3.6.14.dev1.dist-info → prefect-3.6.14.dev2.dist-info}/METADATA +1 -1
  212. {prefect-3.6.14.dev1.dist-info → prefect-3.6.14.dev2.dist-info}/RECORD +215 -215
  213. prefect/server/ui-v2/assets/cronstrue-WDy4rv2V.js +0 -2
  214. prefect/server/ui-v2/assets/cronstrue-WDy4rv2V.js.map +0 -1
  215. prefect/server/ui-v2/assets/deployment_._id.duplicate-C_kNyCA9.js +0 -2
  216. prefect/server/ui-v2/assets/deployment_._id.edit-BP8pfTOR.js +0 -2
  217. prefect/server/ui-v2/assets/flow-run-graph-B1vF1w0Z.js +0 -2
  218. prefect/server/ui-v2/assets/flow-run-graph-B1vF1w0Z.js.map +0 -1
  219. prefect/server/ui-v2/assets/flow-run._id-BHY61H6u.js +0 -4
  220. prefect/server/ui-v2/assets/flow-run._id-BHY61H6u.js.map +0 -1
  221. prefect/server/ui-v2/assets/index-BYQ1P2TC.js +0 -2
  222. prefect/server/ui-v2/assets/index-Cd7pM9pk.js +0 -17
  223. prefect/server/ui-v2/assets/index-Cd7pM9pk.js.map +0 -1
  224. prefect/server/ui-v2/assets/index-DvKYj8ko.js +0 -2
  225. prefect/server/ui-v2/assets/index-DvKYj8ko.js.map +0 -1
  226. {prefect-3.6.14.dev1.dist-info → prefect-3.6.14.dev2.dist-info}/WHEEL +0 -0
  227. {prefect-3.6.14.dev1.dist-info → prefect-3.6.14.dev2.dist-info}/entry_points.txt +0 -0
  228. {prefect-3.6.14.dev1.dist-info → prefect-3.6.14.dev2.dist-info}/licenses/LICENSE +0 -0
@@ -1,2 +1,2 @@
1
- import{j as o}from"./vendor-tanstack-BK8oseNA.js";import{s}from"./index-Cd7pM9pk.js";import{R as i}from"./route-error-state-C9CbByMx.js";import{W as m}from"./header-C6ko3O7G.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-CznP1SOq.js";import"./vendor-recharts-D4imLXNl.js";import"./vendor-forms-DxqqmhL5.js";import"./vendor-date-7GxEwcQM.js";function E({error:e,reset:t}){const r=s(e,"Failed to load work pools");if(r.type!=="server-error"&&r.type!=="client-error")throw e;return o.jsxs("div",{className:"flex flex-col gap-4",children:[o.jsx(m,{}),o.jsx(i,{error:r,onRetry:t})]})}export{E as errorComponent};
2
- //# sourceMappingURL=index-BjsWjEUO.js.map
1
+ import{j as o}from"./vendor-tanstack-BK8oseNA.js";import{s}from"./index-Yzhlw6-Q.js";import{R as i}from"./route-error-state-BGOi4dn-.js";import{W as m}from"./header-CKVO4oLE.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-BZJHvSaq.js";import"./vendor-recharts-D4imLXNl.js";import"./vendor-forms-DxqqmhL5.js";import"./vendor-date-JS-ReHrg.js";function E({error:e,reset:t}){const r=s(e,"Failed to load work pools");if(r.type!=="server-error"&&r.type!=="client-error")throw e;return o.jsxs("div",{className:"flex flex-col gap-4",children:[o.jsx(m,{}),o.jsx(i,{error:r,onRetry:t})]})}export{E as errorComponent};
2
+ //# sourceMappingURL=index-n7YFiQkB.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index-BjsWjEUO.js","sources":["../../src/routes/work-pools/index.tsx?tsr-split=errorComponent"],"sourcesContent":["import { useSuspenseQuery } from \"@tanstack/react-query\";\nimport type { ErrorComponentProps } from \"@tanstack/react-router\";\nimport { createFileRoute } from \"@tanstack/react-router\";\nimport { useMemo, useState } from \"react\";\nimport { categorizeError } from \"@/api/error-utils\";\nimport {\n\tbuildCountWorkPoolsQuery,\n\tbuildFilterWorkPoolsQuery,\n} from \"@/api/work-pools\";\nimport { SearchInput } from \"@/components/ui/input\";\nimport { RouteErrorState } from \"@/components/ui/route-error-state\";\nimport { WorkPoolsEmptyState } from \"@/components/work-pools/empty-state\";\nimport { WorkPoolsPageHeader } from \"@/components/work-pools/header\";\nimport { WorkPoolCard } from \"@/components/work-pools/work-pool-card/work-pool-card\";\nimport { pluralize } from \"@/utils\";\n\nfunction WorkPoolsErrorComponent({ error, reset }: ErrorComponentProps) {\n\tconst serverError = categorizeError(error, \"Failed to load work pools\");\n\n\t// Only handle API errors (server-error, client-error) at route level\n\t// Let network errors and unknown errors bubble up to root error component\n\tif (\n\t\tserverError.type !== \"server-error\" &&\n\t\tserverError.type !== \"client-error\"\n\t) {\n\t\tthrow error;\n\t}\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<WorkPoolsPageHeader />\n\t\t\t<RouteErrorState error={serverError} onRetry={reset} />\n\t\t</div>\n\t);\n}\n\nexport const Route = createFileRoute(\"/work-pools/\")({\n\tcomponent: RouteComponent,\n\terrorComponent: WorkPoolsErrorComponent,\n\tloader: ({ context }) => {\n\t\tvoid context.queryClient.ensureQueryData(buildCountWorkPoolsQuery());\n\t\tvoid context.queryClient.ensureQueryData(\n\t\t\tbuildFilterWorkPoolsQuery({\n\t\t\t\tlimit: 200,\n\t\t\t\toffset: 0,\n\t\t\t}),\n\t\t);\n\t},\n\twrapInSuspense: true,\n});\n\nfunction RouteComponent() {\n\tconst [searchTerm, setSearchTerm] = useState(\"\");\n\n\tconst { data: workPoolCount = 0 } = useSuspenseQuery(\n\t\tbuildCountWorkPoolsQuery(),\n\t);\n\n\tconst { data: workPools = [] } = useSuspenseQuery(\n\t\tbuildFilterWorkPoolsQuery({\n\t\t\tlimit: 200,\n\t\t\toffset: 0,\n\t\t}),\n\t);\n\n\tconst filteredWorkPools = useMemo(() => {\n\t\treturn workPools.filter((workPool) =>\n\t\t\t[\n\t\t\t\tworkPool.name,\n\t\t\t\tworkPool.description,\n\t\t\t\tworkPool.type,\n\t\t\t\tJSON.stringify(workPool.base_job_template),\n\t\t\t\tworkPool.id,\n\t\t\t\tworkPool.default_queue_id,\n\t\t\t\tworkPool.status,\n\t\t\t]\n\t\t\t\t.join(\" \")\n\t\t\t\t.toLowerCase()\n\t\t\t\t.includes(searchTerm.toLowerCase()),\n\t\t);\n\t}, [workPools, searchTerm]);\n\n\tconst handleSearchChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n\t\tsetSearchTerm(event.target.value);\n\t};\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<WorkPoolsPageHeader />\n\t\t\t{workPoolCount < 1 ? (\n\t\t\t\t<WorkPoolsEmptyState />\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<div className=\"flex items-end justify-between\">\n\t\t\t\t\t\t<div className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t{workPoolCount} {pluralize(workPoolCount, \"work pool\")}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t<SearchInput\n\t\t\t\t\t\t\t\tplaceholder=\"Search work pools...\"\n\t\t\t\t\t\t\t\tvalue={searchTerm}\n\t\t\t\t\t\t\t\tonChange={handleSearchChange}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t{filteredWorkPools.map((workPool) => (\n\t\t\t\t\t\t\t<WorkPoolCard key={workPool.id} workPool={workPool} />\n\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t</>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n"],"names":["WorkPoolsErrorComponent","error","reset","serverError","categorizeError","type","jsxs","jsx","WorkPoolsPageHeader","RouteErrorState"],"mappings":"mWAgBA,SAASA,EAAwB,CAAEC,MAAAA,EAAOC,MAAAA,CAA2B,EAAG,CACvE,MAAMC,EAAcC,EAAgBH,EAAO,2BAA2B,EAItE,GACCE,EAAYE,OAAS,gBACrBF,EAAYE,OAAS,eAErB,MAAMJ,EAGP,OACCK,EAAAA,KAAC,MAAA,CAAI,UAAU,sBACd,SAAA,CAAAC,EAAAA,IAACC,EAAA,EAAmB,EACpBD,EAAAA,IAACE,EAAA,CAAgB,MAAON,EAAa,QAASD,CAAAA,CAAM,CAAA,EACrD,CAEF"}
1
+ {"version":3,"file":"index-n7YFiQkB.js","sources":["../../src/routes/work-pools/index.tsx?tsr-split=errorComponent"],"sourcesContent":["import { useSuspenseQuery } from \"@tanstack/react-query\";\nimport type { ErrorComponentProps } from \"@tanstack/react-router\";\nimport { createFileRoute } from \"@tanstack/react-router\";\nimport { useMemo, useState } from \"react\";\nimport { categorizeError } from \"@/api/error-utils\";\nimport {\n\tbuildCountWorkPoolsQuery,\n\tbuildFilterWorkPoolsQuery,\n} from \"@/api/work-pools\";\nimport { SearchInput } from \"@/components/ui/input\";\nimport { RouteErrorState } from \"@/components/ui/route-error-state\";\nimport { WorkPoolsEmptyState } from \"@/components/work-pools/empty-state\";\nimport { WorkPoolsPageHeader } from \"@/components/work-pools/header\";\nimport { WorkPoolCard } from \"@/components/work-pools/work-pool-card/work-pool-card\";\nimport { pluralize } from \"@/utils\";\n\nfunction WorkPoolsErrorComponent({ error, reset }: ErrorComponentProps) {\n\tconst serverError = categorizeError(error, \"Failed to load work pools\");\n\n\t// Only handle API errors (server-error, client-error) at route level\n\t// Let network errors and unknown errors bubble up to root error component\n\tif (\n\t\tserverError.type !== \"server-error\" &&\n\t\tserverError.type !== \"client-error\"\n\t) {\n\t\tthrow error;\n\t}\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<WorkPoolsPageHeader />\n\t\t\t<RouteErrorState error={serverError} onRetry={reset} />\n\t\t</div>\n\t);\n}\n\nexport const Route = createFileRoute(\"/work-pools/\")({\n\tcomponent: RouteComponent,\n\terrorComponent: WorkPoolsErrorComponent,\n\tloader: ({ context }) => {\n\t\tvoid context.queryClient.ensureQueryData(buildCountWorkPoolsQuery());\n\t\tvoid context.queryClient.ensureQueryData(\n\t\t\tbuildFilterWorkPoolsQuery({\n\t\t\t\tlimit: 200,\n\t\t\t\toffset: 0,\n\t\t\t}),\n\t\t);\n\t},\n\twrapInSuspense: true,\n});\n\nfunction RouteComponent() {\n\tconst [searchTerm, setSearchTerm] = useState(\"\");\n\n\tconst { data: workPoolCount = 0 } = useSuspenseQuery(\n\t\tbuildCountWorkPoolsQuery(),\n\t);\n\n\tconst { data: workPools = [] } = useSuspenseQuery(\n\t\tbuildFilterWorkPoolsQuery({\n\t\t\tlimit: 200,\n\t\t\toffset: 0,\n\t\t}),\n\t);\n\n\tconst filteredWorkPools = useMemo(() => {\n\t\treturn workPools.filter((workPool) =>\n\t\t\t[\n\t\t\t\tworkPool.name,\n\t\t\t\tworkPool.description,\n\t\t\t\tworkPool.type,\n\t\t\t\tJSON.stringify(workPool.base_job_template),\n\t\t\t\tworkPool.id,\n\t\t\t\tworkPool.default_queue_id,\n\t\t\t\tworkPool.status,\n\t\t\t]\n\t\t\t\t.join(\" \")\n\t\t\t\t.toLowerCase()\n\t\t\t\t.includes(searchTerm.toLowerCase()),\n\t\t);\n\t}, [workPools, searchTerm]);\n\n\tconst handleSearchChange = (event: React.ChangeEvent<HTMLInputElement>) => {\n\t\tsetSearchTerm(event.target.value);\n\t};\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<WorkPoolsPageHeader />\n\t\t\t{workPoolCount < 1 ? (\n\t\t\t\t<WorkPoolsEmptyState />\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t<div className=\"flex items-end justify-between\">\n\t\t\t\t\t\t<div className=\"text-sm text-muted-foreground\">\n\t\t\t\t\t\t\t{workPoolCount} {pluralize(workPoolCount, \"work pool\")}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div className=\"flex gap-2\">\n\t\t\t\t\t\t\t<SearchInput\n\t\t\t\t\t\t\t\tplaceholder=\"Search work pools...\"\n\t\t\t\t\t\t\t\tvalue={searchTerm}\n\t\t\t\t\t\t\t\tonChange={handleSearchChange}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t{filteredWorkPools.map((workPool) => (\n\t\t\t\t\t\t\t<WorkPoolCard key={workPool.id} workPool={workPool} />\n\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t</>\n\t\t\t)}\n\t\t</div>\n\t);\n}\n"],"names":["WorkPoolsErrorComponent","error","reset","serverError","categorizeError","type","jsxs","jsx","WorkPoolsPageHeader","RouteErrorState"],"mappings":"mWAgBA,SAASA,EAAwB,CAAEC,MAAAA,EAAOC,MAAAA,CAA2B,EAAG,CACvE,MAAMC,EAAcC,EAAgBH,EAAO,2BAA2B,EAItE,GACCE,EAAYE,OAAS,gBACrBF,EAAYE,OAAS,eAErB,MAAMJ,EAGP,OACCK,EAAAA,KAAC,MAAA,CAAI,UAAU,sBACd,SAAA,CAAAC,EAAAA,IAACC,EAAA,EAAmB,EACpBD,EAAAA,IAACE,EAAA,CAAgB,MAAON,EAAa,QAASD,CAAAA,CAAM,CAAA,EACrD,CAEF"}
@@ -1,2 +1,2 @@
1
- import{c as g,r as c,j as o}from"./vendor-tanstack-BK8oseNA.js";import{u as x,j as b,E as j}from"./vendor-codemirror-CXN7nd_v.js";import{z as v,aW as y,q as C,I as w,y as E}from"./index-Cd7pM9pk.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-CznP1SOq.js";import"./vendor-recharts-D4imLXNl.js";import"./vendor-forms-DxqqmhL5.js";import"./vendor-date-7GxEwcQM.js";const N=[b(),j.lineWrapping],z=g.forwardRef(({className:l,value:s,onChange:u,copy:p=!1,onBlur:I,disabled:r,hideLineNumbers:h=!1,...f},i)=>{const e=c.useRef(null),{resolvedTheme:m}=v();let n;r&&(n={lineNumbers:!h,highlightActiveLine:!1,foldGutter:!1,highlightActiveLineGutter:!1});const{setContainer:a}=x({container:e.current,extensions:N,value:s,onChange:u,indentWithTab:!1,editable:!r,basicSetup:n,theme:m==="dark"?"dark":"light",height:"100%"});c.useEffect(()=>{e.current&&a(e.current)},[a]);const d=t=>{E.success("Copied to clipboard"),navigator.clipboard.writeText(t)};return o.jsx("div",{className:y("rounded-md border shadow-xs overflow-hidden focus-within:outline-hidden focus-within:ring-1 focus-within:ring-ring relative",l),ref:t=>{e.current=t,typeof i=="function"?i(t):i&&(i.current=t)},...f,children:p&&s&&o.jsx(C,{onClick:()=>d(s),variant:"ghost",size:"icon",className:"absolute top-0 right-0 z-10","aria-label":"copy",children:o.jsx(w,{id:"Copy",className:"size-2"})})})});z.displayName="JsonInput";export{z as JsonInput};
2
- //# sourceMappingURL=json-input-C9dkBSdc.js.map
1
+ import{c as g,r as c,j as o}from"./vendor-tanstack-BK8oseNA.js";import{u as x,j as b,E as j}from"./vendor-codemirror-CXN7nd_v.js";import{z as v,aW as y,q as C,I as w,y as E}from"./index-Yzhlw6-Q.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-BZJHvSaq.js";import"./vendor-recharts-D4imLXNl.js";import"./vendor-forms-DxqqmhL5.js";import"./vendor-date-JS-ReHrg.js";const N=[b(),j.lineWrapping],z=g.forwardRef(({className:l,value:s,onChange:u,copy:p=!1,onBlur:I,disabled:r,hideLineNumbers:h=!1,...f},i)=>{const e=c.useRef(null),{resolvedTheme:m}=v();let n;r&&(n={lineNumbers:!h,highlightActiveLine:!1,foldGutter:!1,highlightActiveLineGutter:!1});const{setContainer:a}=x({container:e.current,extensions:N,value:s,onChange:u,indentWithTab:!1,editable:!r,basicSetup:n,theme:m==="dark"?"dark":"light",height:"100%"});c.useEffect(()=>{e.current&&a(e.current)},[a]);const d=t=>{E.success("Copied to clipboard"),navigator.clipboard.writeText(t)};return o.jsx("div",{className:y("rounded-md border shadow-xs overflow-hidden focus-within:outline-hidden focus-within:ring-1 focus-within:ring-ring relative",l),ref:t=>{e.current=t,typeof i=="function"?i(t):i&&(i.current=t)},...f,children:p&&s&&o.jsx(C,{onClick:()=>d(s),variant:"ghost",size:"icon",className:"absolute top-0 right-0 z-10","aria-label":"copy",children:o.jsx(w,{id:"Copy",className:"size-2"})})})});z.displayName="JsonInput";export{z as JsonInput};
2
+ //# sourceMappingURL=json-input-Dlzy_XLK.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"json-input-C9dkBSdc.js","sources":["../../src/components/ui/json-input.tsx"],"sourcesContent":["import { json } from \"@codemirror/lang-json\";\nimport {\n\ttype BasicSetupOptions,\n\tEditorView,\n\tuseCodeMirror,\n} from \"@uiw/react-codemirror\";\nimport { useTheme } from \"next-themes\";\nimport React, { useEffect, useRef } from \"react\";\nimport { toast } from \"sonner\";\nimport { cn } from \"@/utils\";\nimport { Button } from \"./button\";\nimport { Icon } from \"./icons\";\n\nconst extensions = [json(), EditorView.lineWrapping];\n\ntype JsonInputProps = React.ComponentProps<\"div\"> & {\n\tvalue?: string;\n\tonChange?: (value: string) => void;\n\tonBlur?: () => void;\n\tdisabled?: boolean;\n\tclassName?: string;\n\thideLineNumbers?: boolean;\n\tcopy?: boolean;\n};\n\n// the JsonInput's types for onChange are probably wrong but this makes it work\nexport type JsonInputOnChange = React.FormEventHandler<HTMLDivElement> &\n\t((value: string) => void);\n\nexport const JsonInput = React.forwardRef<HTMLDivElement, JsonInputProps>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\tcopy = false,\n\t\t\tonBlur,\n\t\t\tdisabled,\n\t\t\thideLineNumbers = false,\n\t\t\t...props\n\t\t},\n\t\tforwardedRef,\n\t) => {\n\t\tconst editor = useRef<HTMLDivElement | null>(null);\n\t\tconst { resolvedTheme } = useTheme();\n\t\t// Setting `basicSetup` messes up the tab order. We only change the basic setup\n\t\t// if the input is disabled, so we leave it undefined to maintain the tab order.\n\t\tlet basicSetup: BasicSetupOptions | undefined;\n\t\tif (disabled) {\n\t\t\tbasicSetup = {\n\t\t\t\tlineNumbers: !hideLineNumbers,\n\t\t\t\thighlightActiveLine: false,\n\t\t\t\tfoldGutter: false,\n\t\t\t\thighlightActiveLineGutter: false,\n\t\t\t};\n\t\t}\n\t\tconst { setContainer } = useCodeMirror({\n\t\t\tcontainer: editor.current,\n\t\t\textensions,\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\tonBlur,\n\t\t\tindentWithTab: false,\n\t\t\teditable: !disabled,\n\t\t\tbasicSetup,\n\t\t\ttheme: resolvedTheme === \"dark\" ? \"dark\" : \"light\",\n\t\t\theight: \"100%\",\n\t\t});\n\n\t\tuseEffect(() => {\n\t\t\tif (editor.current) {\n\t\t\t\tsetContainer(editor.current);\n\t\t\t}\n\t\t}, [setContainer]);\n\n\t\tconst handleCopy = (_value: string) => {\n\t\t\ttoast.success(\"Copied to clipboard\");\n\t\t\tvoid navigator.clipboard.writeText(_value);\n\t\t};\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"rounded-md border shadow-xs overflow-hidden focus-within:outline-hidden focus-within:ring-1 focus-within:ring-ring relative\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tref={(node) => {\n\t\t\t\t\teditor.current = node;\n\t\t\t\t\tif (typeof forwardedRef === \"function\") {\n\t\t\t\t\t\tforwardedRef(node);\n\t\t\t\t\t} else if (forwardedRef) {\n\t\t\t\t\t\tforwardedRef.current = node;\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{copy && value && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tonClick={() => handleCopy(value)}\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\tclassName=\"absolute top-0 right-0 z-10\"\n\t\t\t\t\t\taria-label=\"copy\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon id=\"Copy\" className=\"size-2\" />\n\t\t\t\t\t</Button>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t},\n);\n\nJsonInput.displayName = \"JsonInput\";\n"],"names":["extensions","json","EditorView","JsonInput","React","className","value","onChange","copy","onBlur","disabled","hideLineNumbers","props","forwardedRef","editor","useRef","resolvedTheme","useTheme","basicSetup","setContainer","useCodeMirror","useEffect","handleCop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EAEA1B,EAAU,YAAc"}
1
+ {"version":3,"file":"json-input-Dlzy_XLK.js","sources":["../../src/components/ui/json-input.tsx"],"sourcesContent":["import { json } from \"@codemirror/lang-json\";\nimport {\n\ttype BasicSetupOptions,\n\tEditorView,\n\tuseCodeMirror,\n} from \"@uiw/react-codemirror\";\nimport { useTheme } from \"next-themes\";\nimport React, { useEffect, useRef } from \"react\";\nimport { toast } from \"sonner\";\nimport { cn } from \"@/utils\";\nimport { Button } from \"./button\";\nimport { Icon } from \"./icons\";\n\nconst extensions = [json(), EditorView.lineWrapping];\n\ntype JsonInputProps = React.ComponentProps<\"div\"> & {\n\tvalue?: string;\n\tonChange?: (value: string) => void;\n\tonBlur?: () => void;\n\tdisabled?: boolean;\n\tclassName?: string;\n\thideLineNumbers?: boolean;\n\tcopy?: boolean;\n};\n\n// the JsonInput's types for onChange are probably wrong but this makes it work\nexport type JsonInputOnChange = React.FormEventHandler<HTMLDivElement> &\n\t((value: string) => void);\n\nexport const JsonInput = React.forwardRef<HTMLDivElement, JsonInputProps>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\tcopy = false,\n\t\t\tonBlur,\n\t\t\tdisabled,\n\t\t\thideLineNumbers = false,\n\t\t\t...props\n\t\t},\n\t\tforwardedRef,\n\t) => {\n\t\tconst editor = useRef<HTMLDivElement | null>(null);\n\t\tconst { resolvedTheme } = useTheme();\n\t\t// Setting `basicSetup` messes up the tab order. We only change the basic setup\n\t\t// if the input is disabled, so we leave it undefined to maintain the tab order.\n\t\tlet basicSetup: BasicSetupOptions | undefined;\n\t\tif (disabled) {\n\t\t\tbasicSetup = {\n\t\t\t\tlineNumbers: !hideLineNumbers,\n\t\t\t\thighlightActiveLine: false,\n\t\t\t\tfoldGutter: false,\n\t\t\t\thighlightActiveLineGutter: false,\n\t\t\t};\n\t\t}\n\t\tconst { setContainer } = useCodeMirror({\n\t\t\tcontainer: editor.current,\n\t\t\textensions,\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\tonBlur,\n\t\t\tindentWithTab: false,\n\t\t\teditable: !disabled,\n\t\t\tbasicSetup,\n\t\t\ttheme: resolvedTheme === \"dark\" ? \"dark\" : \"light\",\n\t\t\theight: \"100%\",\n\t\t});\n\n\t\tuseEffect(() => {\n\t\t\tif (editor.current) {\n\t\t\t\tsetContainer(editor.current);\n\t\t\t}\n\t\t}, [setContainer]);\n\n\t\tconst handleCopy = (_value: string) => {\n\t\t\ttoast.success(\"Copied to clipboard\");\n\t\t\tvoid navigator.clipboard.writeText(_value);\n\t\t};\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"rounded-md border shadow-xs overflow-hidden focus-within:outline-hidden focus-within:ring-1 focus-within:ring-ring relative\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tref={(node) => {\n\t\t\t\t\teditor.current = node;\n\t\t\t\t\tif (typeof forwardedRef === \"function\") {\n\t\t\t\t\t\tforwardedRef(node);\n\t\t\t\t\t} else if (forwardedRef) {\n\t\t\t\t\t\tforwardedRef.current = node;\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{copy && value && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tonClick={() => handleCopy(value)}\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\tclassName=\"absolute top-0 right-0 z-10\"\n\t\t\t\t\t\taria-label=\"copy\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon id=\"Copy\" className=\"size-2\" />\n\t\t\t\t\t</Button>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t},\n);\n\nJsonInput.displayName = \"JsonInput\";\n"],"names":["extensions","json","EditorView","JsonInput","React","className","value","onChange","copy","onBlur","disabled","hideLineNumbers","props","forwardedRef","editor","useRef","resolvedTheme","useTheme","basicSetup","setContainer","useCodeMirror","useEff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,CACD,EAEA1B,EAAU,YAAc"}
@@ -1,2 +1,2 @@
1
- import{j as e,r as c,L as i,p as m}from"./vendor-tanstack-BK8oseNA.js";import{aW as n,D as x,I as f,al as r,B as p,g as h,h as o,bs as b,bB as j,C as v,aM as g,dt as y,bv as N}from"./index-Cd7pM9pk.js";import{u as w}from"./use-get-artifacts-flow-task-runs-BfE433bC.js";import{L as k}from"./lazy-markdown-BoMKGRXo.js";import{az as C,aA as _,aB as M,aC as T,aD as z,aE as B}from"./vendor-radix-CznP1SOq.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-recharts-D4imLXNl.js";import"./vendor-forms-DxqqmhL5.js";import"./vendor-date-7GxEwcQM.js";function L({className:t,...s}){return e.jsx(C,{"data-slot":"menubar",className:n("bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",t),...s})}function A({...t}){return e.jsx(_,{"data-slot":"menubar-menu",...t})}function D({...t}){return e.jsx(B,{"data-slot":"menubar-portal",...t})}function E({className:t,...s}){return e.jsx(M,{"data-slot":"menubar-trigger",className:n("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",t),...s})}function I({className:t,align:s="start",alignOffset:a=-4,sideOffset:d=8,...u}){return e.jsx(D,{children:e.jsx(T,{"data-slot":"menubar-content",align:s,alignOffset:a,sideOffset:d,className:n("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[12rem] overflow-hidden rounded-md border p-1 shadow-md",t),...u})})}function R({className:t,inset:s,variant:a="default",...d}){return e.jsx(z,{"data-slot":"menubar-item","data-inset":s,"data-variant":a,className:n("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/40 data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:!text-destructive-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...d})}const S=({artifactKey:t,pageHeader:s})=>{const a=c.useCallback(()=>{navigator.clipboard.writeText(t)},[t]);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(F,{artifactKey:t}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(x,{id:"artifacts-guide",label:"Documentation"}),e.jsx(L,{children:e.jsxs(A,{children:[e.jsx(E,{className:"px-1",children:e.jsx(f,{id:"EllipsisVertical"})}),e.jsx(I,{children:e.jsx(R,{onClick:a,children:"Copy Id"})})]})})]})]}),s&&e.jsxs("div",{className:"",children:[e.jsx(r,{variant:"h2",className:"my-4 font-bold prose lg:prose-xl",children:e.jsx(k,{children:s})}),e.jsx("hr",{})]})]})},F=({artifactKey:t})=>e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(p,{children:e.jsxs(h,{children:[e.jsx(o,{children:e.jsx(b,{to:"/artifacts",className:"text-xl font-semibold",children:"Artifacts"})}),e.jsx(j,{}),e.jsx(o,{className:"text-xl font-semibold",children:t})]})})}),$=({artifact:t})=>{const s=c.useMemo(()=>t.id?.split("-")[0],[t.id]);return e.jsxs(v,{"data-testid":`timeline-card-${t.id}`,className:"flex flex-col p-4 m-2 transition-transform hover:translate-x-2 grow",children:[e.jsx(i,{to:"/artifacts/artifact/$id",params:{id:t.id??""},children:e.jsx(r,{variant:"body",className:"font-bold text-blue-700 hover:underline",children:s})}),t.flow_run&&e.jsxs(r,{variant:"bodySmall",children:["Flow run:"," ",e.jsx(i,{className:"text-blue-700 hover:underline",to:"/runs/flow-run/$id",params:{id:t.flow_run_id??""},children:t.flow_run?.name})]}),t.task_run&&e.jsxs(r,{variant:"bodySmall",children:["Task run:"," ",e.jsx(i,{className:"text-blue-700 hover:underline",to:"/runs/task-run/$id",params:{id:t.task_run_id??""},children:t.task_run?.name})]})]})},P=({artifact:t})=>{const[s,a]=g(t.created??"","dateTime").split(" at ");return e.jsxs("div",{"data-testid":`timeline-row-${t.id}`,className:"flex",children:[e.jsxs("div",{className:"flex flex-col items-end justify-items-start pt-4",style:{width:"128px"},children:[e.jsx(r,{variant:"body",children:a}),e.jsx(r,{variant:"bodySmall",className:"text-muted-foreground",children:s})]}),e.jsx("div",{className:"w-10 flex flex-col",children:e.jsx("div",{className:"w-5 h-full border-r border-gray-200",children:e.jsx("div",{className:"size-4 rounded-full bg-white my-5 mx-auto border-2",style:{margin:"20px calc(50% + 2px)"}})})}),e.jsx("div",{className:"grow mt-1",children:e.jsx($,{artifact:t})})]})},H=({artifacts:t})=>e.jsxs("div",{children:[t.map(s=>e.jsx(P,{artifact:s},s.id)),e.jsxs("div",{className:"flex border-b",children:[e.jsx("div",{className:"flex flex-col items-end justify-items-start pt-4",style:{width:"128px",height:"88px"}}),e.jsx("div",{className:"w-10 flex flex-col",children:e.jsx("div",{className:"w-5 h-full border-r border-gray-200 pt-3",children:e.jsx("div",{className:"size-8 rounded-full bg-white my-5 mx-auto border-2 flex justify-center items-center",style:{margin:"20px calc(50% - 6px)"},children:e.jsx("div",{className:"size-4 rounded-full border-2 border-black relative"})})})}),e.jsx("div",{style:{padding:"33px 0 0 5px"},children:e.jsxs(r,{variant:"bodyLarge",children:["Created ",e.jsx("span",{className:"font-bold",children:t[0].key})]})})]})]}),Q=({artifactKey:t,artifacts:s})=>e.jsxs("div",{children:[e.jsx(S,{artifactKey:t,pageHeader:s[0]?.description??void 0}),e.jsx(H,{artifacts:s})]}),l=t=>({artifacts:{operator:"and_",key:{like_:t}},sort:"CREATED_DESC",offset:0});function Y(){const{key:t}=y.useParams(),{data:s}=m(N(l(t))),a=w(l(t));return e.jsx("div",{children:e.jsx(Q,{artifactKey:t,artifacts:a??s})})}export{Y as component};
2
- //# sourceMappingURL=key._key-BBVH44_R.js.map
1
+ import{j as e,r as c,L as i,p as m}from"./vendor-tanstack-BK8oseNA.js";import{aW as n,D as x,I as f,al as r,B as p,g as h,h as o,bs as b,bB as j,C as v,aM as g,dt as y,bv as N}from"./index-Yzhlw6-Q.js";import{u as w}from"./use-get-artifacts-flow-task-runs-C0V3_gYz.js";import{L as k}from"./lazy-markdown-CPQjrQrX.js";import{aA as C,aB as _,aC as M,aD as T,aE as z,aF as B}from"./vendor-radix-BZJHvSaq.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-recharts-D4imLXNl.js";import"./vendor-forms-DxqqmhL5.js";import"./vendor-date-JS-ReHrg.js";function L({className:t,...s}){return e.jsx(C,{"data-slot":"menubar",className:n("bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs",t),...s})}function A({...t}){return e.jsx(_,{"data-slot":"menubar-menu",...t})}function D({...t}){return e.jsx(B,{"data-slot":"menubar-portal",...t})}function E({className:t,...s}){return e.jsx(M,{"data-slot":"menubar-trigger",className:n("focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none",t),...s})}function I({className:t,align:s="start",alignOffset:a=-4,sideOffset:d=8,...u}){return e.jsx(D,{children:e.jsx(T,{"data-slot":"menubar-content",align:s,alignOffset:a,sideOffset:d,className:n("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[12rem] overflow-hidden rounded-md border p-1 shadow-md",t),...u})})}function R({className:t,inset:s,variant:a="default",...d}){return e.jsx(z,{"data-slot":"menubar-item","data-inset":s,"data-variant":a,className:n("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/40 data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:!text-destructive-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...d})}const F=({artifactKey:t,pageHeader:s})=>{const a=c.useCallback(()=>{navigator.clipboard.writeText(t)},[t]);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(S,{artifactKey:t}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(x,{id:"artifacts-guide",label:"Documentation"}),e.jsx(L,{children:e.jsxs(A,{children:[e.jsx(E,{className:"px-1",children:e.jsx(f,{id:"EllipsisVertical"})}),e.jsx(I,{children:e.jsx(R,{onClick:a,children:"Copy Id"})})]})})]})]}),s&&e.jsxs("div",{className:"",children:[e.jsx(r,{variant:"h2",className:"my-4 font-bold prose lg:prose-xl",children:e.jsx(k,{children:s})}),e.jsx("hr",{})]})]})},S=({artifactKey:t})=>e.jsx("div",{className:"flex items-center gap-2",children:e.jsx(p,{children:e.jsxs(h,{children:[e.jsx(o,{children:e.jsx(b,{to:"/artifacts",className:"text-xl font-semibold",children:"Artifacts"})}),e.jsx(j,{}),e.jsx(o,{className:"text-xl font-semibold",children:t})]})})}),$=({artifact:t})=>{const s=c.useMemo(()=>t.id?.split("-")[0],[t.id]);return e.jsxs(v,{"data-testid":`timeline-card-${t.id}`,className:"flex flex-col p-4 m-2 transition-transform hover:translate-x-2 grow",children:[e.jsx(i,{to:"/artifacts/artifact/$id",params:{id:t.id??""},children:e.jsx(r,{variant:"body",className:"font-bold text-blue-700 hover:underline",children:s})}),t.flow_run&&e.jsxs(r,{variant:"bodySmall",children:["Flow run:"," ",e.jsx(i,{className:"text-blue-700 hover:underline",to:"/runs/flow-run/$id",params:{id:t.flow_run_id??""},children:t.flow_run?.name})]}),t.task_run&&e.jsxs(r,{variant:"bodySmall",children:["Task run:"," ",e.jsx(i,{className:"text-blue-700 hover:underline",to:"/runs/task-run/$id",params:{id:t.task_run_id??""},children:t.task_run?.name})]})]})},P=({artifact:t})=>{const[s,a]=g(t.created??"","dateTime").split(" at ");return e.jsxs("div",{"data-testid":`timeline-row-${t.id}`,className:"flex",children:[e.jsxs("div",{className:"flex flex-col items-end justify-items-start pt-4",style:{width:"128px"},children:[e.jsx(r,{variant:"body",children:a}),e.jsx(r,{variant:"bodySmall",className:"text-muted-foreground",children:s})]}),e.jsx("div",{className:"w-10 flex flex-col",children:e.jsx("div",{className:"w-5 h-full border-r border-gray-200",children:e.jsx("div",{className:"size-4 rounded-full bg-white my-5 mx-auto border-2",style:{margin:"20px calc(50% + 2px)"}})})}),e.jsx("div",{className:"grow mt-1",children:e.jsx($,{artifact:t})})]})},H=({artifacts:t})=>e.jsxs("div",{children:[t.map(s=>e.jsx(P,{artifact:s},s.id)),e.jsxs("div",{className:"flex border-b",children:[e.jsx("div",{className:"flex flex-col items-end justify-items-start pt-4",style:{width:"128px",height:"88px"}}),e.jsx("div",{className:"w-10 flex flex-col",children:e.jsx("div",{className:"w-5 h-full border-r border-gray-200 pt-3",children:e.jsx("div",{className:"size-8 rounded-full bg-white my-5 mx-auto border-2 flex justify-center items-center",style:{margin:"20px calc(50% - 6px)"},children:e.jsx("div",{className:"size-4 rounded-full border-2 border-black relative"})})})}),e.jsx("div",{style:{padding:"33px 0 0 5px"},children:e.jsxs(r,{variant:"bodyLarge",children:["Created ",e.jsx("span",{className:"font-bold",children:t[0].key})]})})]})]}),Q=({artifactKey:t,artifacts:s})=>e.jsxs("div",{children:[e.jsx(F,{artifactKey:t,pageHeader:s[0]?.description??void 0}),e.jsx(H,{artifacts:s})]}),l=t=>({artifacts:{operator:"and_",key:{like_:t}},sort:"CREATED_DESC",offset:0});function Y(){const{key:t}=y.useParams(),{data:s}=m(N(l(t))),a=w(l(t));return e.jsx("div",{children:e.jsx(Q,{artifactKey:t,artifacts:a??s})})}export{Y as component};
2
+ //# sourceMappingURL=key._key-DN_txnIw.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"key._key-BBVH44_R.js","sources":["../../src/components/ui/menubar.tsx","../../src/components/artifacts/key/artifacts-key-header.tsx","../../src/components/artifacts/key/timeline/timelineCard.tsx","../../src/components/artifacts/key/timeline/timelineRow.tsx","../../src/components/artifacts/key/timeline/timelineContainer.tsx","../../src/components/artifacts/key/artifacts-key-page.tsx","../../src/routes/artifacts/key.$key.tsx?tsr-split=component"],"sourcesContent":["import * as MenubarPrimitive from \"@radix-ui/react-menubar\";\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from \"lucide-react\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\nfunction Menubar({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.Root>) {\n\treturn (\n\t\t<MenubarPrimitive.Root\n\t\t\tdata-slot=\"menubar\"\n\t\t\tclassName={cn(\n\t\t\t\t\"bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction MenubarMenu({\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.Menu>) {\n\treturn <MenubarPrimitive.Menu data-slot=\"menubar-menu\" {...props} />;\n}\n\nfunction MenubarGroup({\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.Group>) {\n\treturn <MenubarPrimitive.Group data-slot=\"menubar-group\" {...props} />;\n}\n\nfunction MenubarPortal({\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.Portal>) {\n\treturn <MenubarPrimitive.Portal data-slot=\"menubar-portal\" {...props} />;\n}\n\nfunction MenubarRadioGroup({\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.RadioGroup>) {\n\treturn (\n\t\t<MenubarPrimitive.RadioGroup data-slot=\"menubar-radio-group\" {...props} />\n\t);\n}\n\nfunction MenubarTrigger({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.Trigger>) {\n\treturn (\n\t\t<MenubarPrimitive.Trigger\n\t\t\tdata-slot=\"menubar-trigger\"\n\t\t\tclassName={cn(\n\t\t\t\t\"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction MenubarContent({\n\tclassName,\n\talign = \"start\",\n\talignOffset = -4,\n\tsideOffset = 8,\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.Content>) {\n\treturn (\n\t\t<MenubarPortal>\n\t\t\t<MenubarPrimitive.Content\n\t\t\t\tdata-slot=\"menubar-content\"\n\t\t\t\talign={align}\n\t\t\t\talignOffset={alignOffset}\n\t\t\t\tsideOffset={sideOffset}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[12rem] overflow-hidden rounded-md border p-1 shadow-md\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</MenubarPortal>\n\t);\n}\n\nfunction MenubarItem({\n\tclassName,\n\tinset,\n\tvariant = \"default\",\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.Item> & {\n\tinset?: boolean;\n\tvariant?: \"default\" | \"destructive\";\n}) {\n\treturn (\n\t\t<MenubarPrimitive.Item\n\t\t\tdata-slot=\"menubar-item\"\n\t\t\tdata-inset={inset}\n\t\t\tdata-variant={variant}\n\t\t\tclassName={cn(\n\t\t\t\t\"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/40 data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:!text-destructive-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction MenubarCheckboxItem({\n\tclassName,\n\tchildren,\n\tchecked,\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.CheckboxItem>) {\n\treturn (\n\t\t<MenubarPrimitive.CheckboxItem\n\t\t\tdata-slot=\"menubar-checkbox-item\"\n\t\t\tclassName={cn(\n\t\t\t\t\"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tchecked={checked}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n\t\t\t\t<MenubarPrimitive.ItemIndicator>\n\t\t\t\t\t<CheckIcon className=\"size-4\" />\n\t\t\t\t</MenubarPrimitive.ItemIndicator>\n\t\t\t</span>\n\t\t\t{children}\n\t\t</MenubarPrimitive.CheckboxItem>\n\t);\n}\n\nfunction MenubarRadioItem({\n\tclassName,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.RadioItem>) {\n\treturn (\n\t\t<MenubarPrimitive.RadioItem\n\t\t\tdata-slot=\"menubar-radio-item\"\n\t\t\tclassName={cn(\n\t\t\t\t\"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n\t\t\t\t<MenubarPrimitive.ItemIndicator>\n\t\t\t\t\t<CircleIcon className=\"size-2 fill-current\" />\n\t\t\t\t</MenubarPrimitive.ItemIndicator>\n\t\t\t</span>\n\t\t\t{children}\n\t\t</MenubarPrimitive.RadioItem>\n\t);\n}\n\nfunction MenubarLabel({\n\tclassName,\n\tinset,\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.Label> & {\n\tinset?: boolean;\n}) {\n\treturn (\n\t\t<MenubarPrimitive.Label\n\t\t\tdata-slot=\"menubar-label\"\n\t\t\tdata-inset={inset}\n\t\t\tclassName={cn(\n\t\t\t\t\"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction MenubarSeparator({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.Separator>) {\n\treturn (\n\t\t<MenubarPrimitive.Separator\n\t\t\tdata-slot=\"menubar-separator\"\n\t\t\tclassName={cn(\"bg-border -mx-1 my-1 h-px\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction MenubarShortcut({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"span\">) {\n\treturn (\n\t\t<span\n\t\t\tdata-slot=\"menubar-shortcut\"\n\t\t\tclassName={cn(\n\t\t\t\t\"text-muted-foreground ml-auto text-xs tracking-widest\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction MenubarSub({\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.Sub>) {\n\treturn <MenubarPrimitive.Sub data-slot=\"menubar-sub\" {...props} />;\n}\n\nfunction MenubarSubTrigger({\n\tclassName,\n\tinset,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.SubTrigger> & {\n\tinset?: boolean;\n}) {\n\treturn (\n\t\t<MenubarPrimitive.SubTrigger\n\t\t\tdata-slot=\"menubar-sub-trigger\"\n\t\t\tdata-inset={inset}\n\t\t\tclassName={cn(\n\t\t\t\t\"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[inset]:pl-8\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t<ChevronRightIcon className=\"ml-auto h-4 w-4\" />\n\t\t</MenubarPrimitive.SubTrigger>\n\t);\n}\n\nfunction MenubarSubContent({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.SubContent>) {\n\treturn (\n\t\t<MenubarPrimitive.SubContent\n\t\t\tdata-slot=\"menubar-sub-content\"\n\t\t\tclassName={cn(\n\t\t\t\t\"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tMenubar,\n\tMenubarPortal,\n\tMenubarMenu,\n\tMenubarTrigger,\n\tMenubarContent,\n\tMenubarGroup,\n\tMenubarSeparator,\n\tMenubarLabel,\n\tMenubarItem,\n\tMenubarShortcut,\n\tMenubarCheckboxItem,\n\tMenubarRadioGroup,\n\tMenubarRadioItem,\n\tMenubarSub,\n\tMenubarSubTrigger,\n\tMenubarSubContent,\n};\n","import { useCallback } from \"react\";\nimport {\n\tBreadcrumb,\n\tBreadcrumbItem,\n\tBreadcrumbLink,\n\tBreadcrumbList,\n\tBreadcrumbSeparator,\n} from \"@/components/ui/breadcrumb\";\nimport { DocsLink } from \"@/components/ui/docs-link\";\nimport { Icon } from \"@/components/ui/icons\";\nimport { LazyMarkdown } from \"@/components/ui/lazy-markdown\";\nimport {\n\tMenubar,\n\tMenubarContent,\n\tMenubarItem,\n\tMenubarMenu,\n\tMenubarTrigger,\n} from \"@/components/ui/menubar\";\nimport { Typography } from \"@/components/ui/typography\";\n\ntype ArtifactsKeyHeaderProps = {\n\tartifactKey: string;\n\tpageHeader?: string;\n};\n\nexport const ArtifactsKeyHeader = ({\n\tartifactKey,\n\tpageHeader,\n}: ArtifactsKeyHeaderProps) => {\n\tconst handleCopyId = useCallback(() => {\n\t\tvoid navigator.clipboard.writeText(artifactKey);\n\t}, [artifactKey]);\n\n\treturn (\n\t\t<>\n\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t<Header artifactKey={artifactKey} />\n\t\t\t\t<div className=\"flex items-center space-x-2\">\n\t\t\t\t\t<DocsLink id=\"artifacts-guide\" label=\"Documentation\" />\n\t\t\t\t\t{/* <Button variant=\"outline\" className=\"px-1\"><Icon id=\"EllipsisVertical\" /></Button> */}\n\t\t\t\t\t<Menubar>\n\t\t\t\t\t\t<MenubarMenu>\n\t\t\t\t\t\t\t<MenubarTrigger className=\"px-1\">\n\t\t\t\t\t\t\t\t<Icon id=\"EllipsisVertical\" />\n\t\t\t\t\t\t\t</MenubarTrigger>\n\t\t\t\t\t\t\t<MenubarContent>\n\t\t\t\t\t\t\t\t<MenubarItem onClick={handleCopyId}>Copy Id</MenubarItem>\n\t\t\t\t\t\t\t</MenubarContent>\n\t\t\t\t\t\t</MenubarMenu>\n\t\t\t\t\t</Menubar>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t{pageHeader && (\n\t\t\t\t<div className=\"\">\n\t\t\t\t\t<Typography variant=\"h2\" className=\"my-4 font-bold prose lg:prose-xl\">\n\t\t\t\t\t\t<LazyMarkdown>{pageHeader}</LazyMarkdown>\n\t\t\t\t\t</Typography>\n\t\t\t\t\t<hr />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</>\n\t);\n};\n\nconst Header = ({ artifactKey }: ArtifactsKeyHeaderProps) => (\n\t<div className=\"flex items-center gap-2\">\n\t\t<Breadcrumb>\n\t\t\t<BreadcrumbList>\n\t\t\t\t<BreadcrumbItem>\n\t\t\t\t\t<BreadcrumbLink to=\"/artifacts\" className=\"text-xl font-semibold\">\n\t\t\t\t\t\tArtifacts\n\t\t\t\t\t</BreadcrumbLink>\n\t\t\t\t</BreadcrumbItem>\n\t\t\t\t<BreadcrumbSeparator />\n\t\t\t\t<BreadcrumbItem className=\"text-xl font-semibold\">\n\t\t\t\t\t{artifactKey}\n\t\t\t\t</BreadcrumbItem>\n\t\t\t</BreadcrumbList>\n\t\t</Breadcrumb>\n\t</div>\n);\n","import { Link } from \"@tanstack/react-router\";\nimport { useMemo } from \"react\";\nimport type { ArtifactWithFlowRunAndTaskRun } from \"@/api/artifacts\";\nimport { Card } from \"@/components/ui/card\";\nimport { Typography } from \"@/components/ui/typography\";\n\nexport type ArtifactTimelineCardProps = {\n\tartifact: ArtifactWithFlowRunAndTaskRun;\n};\n\nexport const ArtifactTimelineCard = ({\n\tartifact,\n}: ArtifactTimelineCardProps) => {\n\tconst artifactTitle = useMemo(() => {\n\t\treturn artifact.id?.split(\"-\")[0];\n\t}, [artifact.id]);\n\n\treturn (\n\t\t<Card\n\t\t\tdata-testid={`timeline-card-${artifact.id}`}\n\t\t\tclassName=\"flex flex-col p-4 m-2 transition-transform hover:translate-x-2 grow\"\n\t\t>\n\t\t\t<Link to=\"/artifacts/artifact/$id\" params={{ id: artifact.id ?? \"\" }}>\n\t\t\t\t<Typography\n\t\t\t\t\tvariant=\"body\"\n\t\t\t\t\tclassName=\"font-bold text-blue-700 hover:underline\"\n\t\t\t\t>\n\t\t\t\t\t{artifactTitle}\n\t\t\t\t</Typography>\n\t\t\t</Link>\n\t\t\t{artifact.flow_run && (\n\t\t\t\t<Typography variant=\"bodySmall\">\n\t\t\t\t\tFlow run:{\" \"}\n\t\t\t\t\t<Link\n\t\t\t\t\t\tclassName=\"text-blue-700 hover:underline\"\n\t\t\t\t\t\tto={\"/runs/flow-run/$id\"}\n\t\t\t\t\t\tparams={{ id: artifact.flow_run_id ?? \"\" }}\n\t\t\t\t\t>\n\t\t\t\t\t\t{artifact.flow_run?.name}\n\t\t\t\t\t</Link>\n\t\t\t\t</Typography>\n\t\t\t)}\n\t\t\t{artifact.task_run && (\n\t\t\t\t<Typography variant=\"bodySmall\">\n\t\t\t\t\tTask run:{\" \"}\n\t\t\t\t\t<Link\n\t\t\t\t\t\tclassName=\"text-blue-700 hover:underline\"\n\t\t\t\t\t\tto={\"/runs/task-run/$id\"}\n\t\t\t\t\t\tparams={{ id: artifact.task_run_id ?? \"\" }}\n\t\t\t\t\t>\n\t\t\t\t\t\t{artifact.task_run?.name}\n\t\t\t\t\t</Link>\n\t\t\t\t</Typography>\n\t\t\t)}\n\t\t</Card>\n\t);\n};\n","import type { ArtifactWithFlowRunAndTaskRun } from \"@/api/artifacts\";\nimport { Typography } from \"@/components/ui/typography\";\nimport { formatDate } from \"@/utils/date\";\nimport { ArtifactTimelineCard } from \"./timelineCard\";\n\nexport type TimelineRowProps = {\n\tartifact: ArtifactWithFlowRunAndTaskRun;\n};\n\nexport const TimelineRow = ({ artifact }: TimelineRowProps) => {\n\tconst [date, time] = formatDate(artifact.created ?? \"\", \"dateTime\").split(\n\t\t\" at \",\n\t);\n\treturn (\n\t\t<div data-testid={`timeline-row-${artifact.id}`} className=\"flex\">\n\t\t\t<div\n\t\t\t\tclassName=\"flex flex-col items-end justify-items-start pt-4\"\n\t\t\t\tstyle={{ width: \"128px\" }}\n\t\t\t>\n\t\t\t\t<Typography variant=\"body\">{time}</Typography>\n\t\t\t\t<Typography variant=\"bodySmall\" className=\"text-muted-foreground\">\n\t\t\t\t\t{date}\n\t\t\t\t</Typography>\n\t\t\t</div>\n\t\t\t<div className=\"w-10 flex flex-col\">\n\t\t\t\t<div className=\"w-5 h-full border-r border-gray-200\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName=\"size-4 rounded-full bg-white my-5 mx-auto border-2\"\n\t\t\t\t\t\tstyle={{ margin: \"20px calc(50% + 2px)\" }}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div className=\"grow mt-1\">\n\t\t\t\t<ArtifactTimelineCard artifact={artifact} />\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n","import type { ArtifactWithFlowRunAndTaskRun } from \"@/api/artifacts\";\nimport { Typography } from \"@/components/ui/typography\";\nimport { TimelineRow } from \"./timelineRow\";\n\nexport type TimelineContainerProps = {\n\tartifacts: ArtifactWithFlowRunAndTaskRun[];\n};\n\nexport const TimelineContainer = ({ artifacts }: TimelineContainerProps) => {\n\treturn (\n\t\t<div>\n\t\t\t{artifacts.map((artifact) => (\n\t\t\t\t<TimelineRow key={artifact.id} artifact={artifact} />\n\t\t\t))}\n\t\t\t<div className=\"flex border-b\">\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"flex flex-col items-end justify-items-start pt-4\"\n\t\t\t\t\tstyle={{ width: \"128px\", height: \"88px\" }}\n\t\t\t\t/>\n\t\t\t\t<div className=\"w-10 flex flex-col\">\n\t\t\t\t\t<div className=\"w-5 h-full border-r border-gray-200 pt-3\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName=\"size-8 rounded-full bg-white my-5 mx-auto border-2 flex justify-center items-center\"\n\t\t\t\t\t\t\tstyle={{ margin: \"20px calc(50% - 6px)\" }}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div className=\"size-4 rounded-full border-2 border-black relative\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div style={{ padding: \"33px 0 0 5px\" }}>\n\t\t\t\t\t<Typography variant=\"bodyLarge\">\n\t\t\t\t\t\tCreated <span className=\"font-bold\">{artifacts[0].key}</span>\n\t\t\t\t\t</Typography>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n","import type { ArtifactWithFlowRunAndTaskRun } from \"@/api/artifacts\";\nimport { ArtifactsKeyHeader } from \"./artifacts-key-header\";\nimport { TimelineContainer } from \"./timeline/timelineContainer\";\n\ntype ArtifactsKeyPageProps = {\n\tartifactKey: string;\n\tartifacts: ArtifactWithFlowRunAndTaskRun[];\n};\n\nexport const ArtifactsKeyPage = ({\n\tartifactKey,\n\tartifacts,\n}: ArtifactsKeyPageProps) => {\n\treturn (\n\t\t<div>\n\t\t\t<ArtifactsKeyHeader\n\t\t\t\tartifactKey={artifactKey}\n\t\t\t\tpageHeader={artifacts[0]?.description ?? undefined}\n\t\t\t/>\n\t\t\t<TimelineContainer artifacts={artifacts} />\n\t\t</div>\n\t);\n};\n","import { useSuspenseQuery } from \"@tanstack/react-query\";\nimport { createFileRoute } from \"@tanstack/react-router\";\nimport { type ArtifactsFilter, buildListArtifactsQuery } from \"@/api/artifacts\";\nimport { useFilterArtifactsFlowTaskRuns } from \"@/api/artifacts/use-get-artifacts-flow-task-runs/use-get-artifacts-flow-task-runs\";\nimport { ArtifactsKeyPage } from \"@/components/artifacts/key/artifacts-key-page\";\n\nconst buildFilterBody = (key: string): ArtifactsFilter => ({\n\tartifacts: {\n\t\toperator: \"and_\", // Logical operator for combining filters\n\t\tkey: {\n\t\t\tlike_: key, // Filter by artifact name\n\t\t},\n\t},\n\tsort: \"CREATED_DESC\",\n\toffset: 0,\n});\n\nexport const Route = createFileRoute(\"/artifacts/key/$key\")({\n\tcomponent: RouteComponent,\n\tloader: async ({ context, params }) => {\n\t\tconst { key } = params;\n\n\t\tconst artifacts = await context.queryClient.ensureQueryData(\n\t\t\tbuildListArtifactsQuery(buildFilterBody(key)),\n\t\t);\n\n\t\treturn { artifacts };\n\t},\n\twrapInSuspense: true,\n});\n\nfunction RouteComponent() {\n\tconst { key } = Route.useParams();\n\n\tconst { data: artifacts } = useSuspenseQuery(\n\t\tbuildListArtifactsQuery(buildFilterBody(key)),\n\t);\n\n\tconst artifactWithMetadata = useFilterArtifactsFlowTaskRuns(\n\t\tbuildFilterBody(key),\n\t);\n\treturn (\n\t\t<div>\n\t\t\t<ArtifactsKeyPage\n\t\t\t\tartifactKey={key} // can't use \"key\" as it is a reserved word\n\t\t\t\tartifacts={artifactWithMetadata ?? artifacts}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n"],"names":["Menubar","className","props","jsx","MenubarPrimitive.Root","cn","MenubarMenu","MenubarPrimitive.Menu","MenubarPortal","MenubarPrimitive.Portal","MenubarTrigger","MenubarPrimitive.Trigger","MenubarContent","align","alignOffset","sideOffset","MenubarPrimitive.Content","MenubarItem","inset","variant","MenubarPrimitive.Item","ArtifactsKeyHeader","artifactKey","pageHeader","handleCopyId","useCallback","jsxs","Fragment","Header","DocsLink","Icon","Typography","LazyMarkdown","Breadcrumb","BreadcrumbList","BreadcrumbItem","BreadcrumbLink","BreadcrumbSeparator","ArtifactTimelineCard","artifact","artifactTitle","useMemo","Card","Link","TimelineRow","date","time","formatDate","TimelineContainer","artifacts","ArtifactsKeyPage","buildFilterBody","key","operator","like_","sort","offset","RouteComponent","Route","useParams","data","useSuspenseQuery","buildListArtifactsQuery","artifactWithMetadata","useFilterArtifactsFlowTaskRuns"],"mappings":"miBAMA,SAASA,EAAQ,CAChB,UAAAC,EACA,GAAGC,CACJ,EAAuD,CACtD,OACCC,EAAAA,IAACC,EAAA,CACA,YAAU,UACV,UAAWC,EACV,4EACAJ,CAAA,EAEA,GAAGC,CAAA,CAAA,CAGP,CAEA,SAASI,EAAY,CACpB,GAAGJ,CACJ,EAAuD,CACtD,aAAQK,EAAA,CAAsB,YAAU,eAAgB,GAAGL,EAAO,CACnE,CAQA,SAASM,EAAc,CACtB,GAAGN,CACJ,EAAyD,CACxD,aAAQO,EAAA,CAAwB,YAAU,iBAAkB,GAAGP,EAAO,CACvE,CAUA,SAASQ,EAAe,CACvB,UAAAT,EACA,GAAGC,CACJ,EAA0D,CACzD,OACCC,EAAAA,IAACQ,EAAA,CACA,YAAU,kBACV,UAAWN,EACV,0MACAJ,CAAA,EAEA,GAAGC,CAAA,CAAA,CAGP,CAEA,SAASU,EAAe,CACvB,UAAAX,EACA,MAAAY,EAAQ,QACR,YAAAC,EAAc,GACd,WAAAC,EAAa,EACb,GAAGb,CACJ,EAA0D,CACzD,aACEM,EAAA,CACA,SAAAL,EAAAA,IAACa,EAAA,CACA,YAAU,kBACV,MAAAH,EACA,YAAAC,EACA,WAAAC,EACA,UAAWV,EACV,yZACAJ,CAAA,EAEA,GAAGC,CAAA,CAAA,EAEN,CAEF,CAEA,SAASe,EAAY,CACpB,UAAAhB,EACA,MAAAiB,EACA,QAAAC,EAAU,UACV,GAAGjB,CACJ,EAGG,CACF,OACCC,EAAAA,IAACiB,EAAA,CACA,YAAU,eACV,aAAYF,EACZ,eAAcC,EACd,UAAWd,EACV,+oBACAJ,CAAA,EAEA,GAAGC,CAAA,CAAA,CAG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,MAAA,CACA,SAAA,CAAA9C,EAAAA,IAACkB,EAAA,CACA,YAAAC,EACA,WAAY2B,EAAU,CAAC,GAAG,aAAe,MAAA,CAAA,EAE1C9C,MAAC6C,GAAkB,UAAAC,CAAA,CAAsB,CAAA,EAC1C,ECdIE,EAAmBC,IAAkC,CAC1DH,UAAW,CACVI,SAAU,OACVD,IAAK,CACJE,MAAOF,CAAAA,CACR,EAEDG,KAAM,eACNC,OAAQ,CACT,GAgBA,SAASC,GAAiB,CACzB,KAAM,CAAEL,IAAAA,CAAAA,EAAQM,EAAMC,UAAAA,EAEhB,CAAEC,KAAMX,CAAAA,EAAcY,EAC3BC,EAAwBX,EAAgBC,CAAG,CAAC,CAC7C,EAEMW,EAAuBC,EAC5Bb,EAAgBC,CAAG,CACpB,EACA,aACE,MAAA,CACA,SAAAjD,EAAAA,IAAC+C,EAAA,CACA,YAAaE,EACb,UAAWW,GAAwBd,CAAAA,CAAAA,EAErC,CAEF"}
1
+ {"version":3,"file":"key._key-DN_txnIw.js","sources":["../../src/components/ui/menubar.tsx","../../src/components/artifacts/key/artifacts-key-header.tsx","../../src/components/artifacts/key/timeline/timelineCard.tsx","../../src/components/artifacts/key/timeline/timelineRow.tsx","../../src/components/artifacts/key/timeline/timelineContainer.tsx","../../src/components/artifacts/key/artifacts-key-page.tsx","../../src/routes/artifacts/key.$key.tsx?tsr-split=component"],"sourcesContent":["import * as MenubarPrimitive from \"@radix-ui/react-menubar\";\nimport { CheckIcon, ChevronRightIcon, CircleIcon } from \"lucide-react\";\nimport type * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\nfunction Menubar({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.Root>) {\n\treturn (\n\t\t<MenubarPrimitive.Root\n\t\t\tdata-slot=\"menubar\"\n\t\t\tclassName={cn(\n\t\t\t\t\"bg-background flex h-9 items-center gap-1 rounded-md border p-1 shadow-xs\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction MenubarMenu({\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.Menu>) {\n\treturn <MenubarPrimitive.Menu data-slot=\"menubar-menu\" {...props} />;\n}\n\nfunction MenubarGroup({\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.Group>) {\n\treturn <MenubarPrimitive.Group data-slot=\"menubar-group\" {...props} />;\n}\n\nfunction MenubarPortal({\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.Portal>) {\n\treturn <MenubarPrimitive.Portal data-slot=\"menubar-portal\" {...props} />;\n}\n\nfunction MenubarRadioGroup({\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.RadioGroup>) {\n\treturn (\n\t\t<MenubarPrimitive.RadioGroup data-slot=\"menubar-radio-group\" {...props} />\n\t);\n}\n\nfunction MenubarTrigger({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.Trigger>) {\n\treturn (\n\t\t<MenubarPrimitive.Trigger\n\t\t\tdata-slot=\"menubar-trigger\"\n\t\t\tclassName={cn(\n\t\t\t\t\"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex items-center rounded-sm px-2 py-1 text-sm font-medium outline-hidden select-none\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction MenubarContent({\n\tclassName,\n\talign = \"start\",\n\talignOffset = -4,\n\tsideOffset = 8,\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.Content>) {\n\treturn (\n\t\t<MenubarPortal>\n\t\t\t<MenubarPrimitive.Content\n\t\t\t\tdata-slot=\"menubar-content\"\n\t\t\t\talign={align}\n\t\t\t\talignOffset={alignOffset}\n\t\t\t\tsideOffset={sideOffset}\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[12rem] overflow-hidden rounded-md border p-1 shadow-md\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\t{...props}\n\t\t\t/>\n\t\t</MenubarPortal>\n\t);\n}\n\nfunction MenubarItem({\n\tclassName,\n\tinset,\n\tvariant = \"default\",\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.Item> & {\n\tinset?: boolean;\n\tvariant?: \"default\" | \"destructive\";\n}) {\n\treturn (\n\t\t<MenubarPrimitive.Item\n\t\t\tdata-slot=\"menubar-item\"\n\t\t\tdata-inset={inset}\n\t\t\tdata-variant={variant}\n\t\t\tclassName={cn(\n\t\t\t\t\"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/40 data-[variant=destructive]:focus:text-destructive-foreground data-[variant=destructive]:*:[svg]:!text-destructive-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction MenubarCheckboxItem({\n\tclassName,\n\tchildren,\n\tchecked,\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.CheckboxItem>) {\n\treturn (\n\t\t<MenubarPrimitive.CheckboxItem\n\t\t\tdata-slot=\"menubar-checkbox-item\"\n\t\t\tclassName={cn(\n\t\t\t\t\"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tchecked={checked}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n\t\t\t\t<MenubarPrimitive.ItemIndicator>\n\t\t\t\t\t<CheckIcon className=\"size-4\" />\n\t\t\t\t</MenubarPrimitive.ItemIndicator>\n\t\t\t</span>\n\t\t\t{children}\n\t\t</MenubarPrimitive.CheckboxItem>\n\t);\n}\n\nfunction MenubarRadioItem({\n\tclassName,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.RadioItem>) {\n\treturn (\n\t\t<MenubarPrimitive.RadioItem\n\t\t\tdata-slot=\"menubar-radio-item\"\n\t\t\tclassName={cn(\n\t\t\t\t\"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-xs py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n\t\t\t\t<MenubarPrimitive.ItemIndicator>\n\t\t\t\t\t<CircleIcon className=\"size-2 fill-current\" />\n\t\t\t\t</MenubarPrimitive.ItemIndicator>\n\t\t\t</span>\n\t\t\t{children}\n\t\t</MenubarPrimitive.RadioItem>\n\t);\n}\n\nfunction MenubarLabel({\n\tclassName,\n\tinset,\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.Label> & {\n\tinset?: boolean;\n}) {\n\treturn (\n\t\t<MenubarPrimitive.Label\n\t\t\tdata-slot=\"menubar-label\"\n\t\t\tdata-inset={inset}\n\t\t\tclassName={cn(\n\t\t\t\t\"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction MenubarSeparator({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.Separator>) {\n\treturn (\n\t\t<MenubarPrimitive.Separator\n\t\t\tdata-slot=\"menubar-separator\"\n\t\t\tclassName={cn(\"bg-border -mx-1 my-1 h-px\", className)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction MenubarShortcut({\n\tclassName,\n\t...props\n}: React.ComponentProps<\"span\">) {\n\treturn (\n\t\t<span\n\t\t\tdata-slot=\"menubar-shortcut\"\n\t\t\tclassName={cn(\n\t\t\t\t\"text-muted-foreground ml-auto text-xs tracking-widest\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nfunction MenubarSub({\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.Sub>) {\n\treturn <MenubarPrimitive.Sub data-slot=\"menubar-sub\" {...props} />;\n}\n\nfunction MenubarSubTrigger({\n\tclassName,\n\tinset,\n\tchildren,\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.SubTrigger> & {\n\tinset?: boolean;\n}) {\n\treturn (\n\t\t<MenubarPrimitive.SubTrigger\n\t\t\tdata-slot=\"menubar-sub-trigger\"\n\t\t\tdata-inset={inset}\n\t\t\tclassName={cn(\n\t\t\t\t\"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-none select-none data-[inset]:pl-8\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t<ChevronRightIcon className=\"ml-auto h-4 w-4\" />\n\t\t</MenubarPrimitive.SubTrigger>\n\t);\n}\n\nfunction MenubarSubContent({\n\tclassName,\n\t...props\n}: React.ComponentProps<typeof MenubarPrimitive.SubContent>) {\n\treturn (\n\t\t<MenubarPrimitive.SubContent\n\t\t\tdata-slot=\"menubar-sub-content\"\n\t\t\tclassName={cn(\n\t\t\t\t\"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] overflow-hidden rounded-md border p-1 shadow-lg\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t/>\n\t);\n}\n\nexport {\n\tMenubar,\n\tMenubarPortal,\n\tMenubarMenu,\n\tMenubarTrigger,\n\tMenubarContent,\n\tMenubarGroup,\n\tMenubarSeparator,\n\tMenubarLabel,\n\tMenubarItem,\n\tMenubarShortcut,\n\tMenubarCheckboxItem,\n\tMenubarRadioGroup,\n\tMenubarRadioItem,\n\tMenubarSub,\n\tMenubarSubTrigger,\n\tMenubarSubContent,\n};\n","import { useCallback } from \"react\";\nimport {\n\tBreadcrumb,\n\tBreadcrumbItem,\n\tBreadcrumbLink,\n\tBreadcrumbList,\n\tBreadcrumbSeparator,\n} from \"@/components/ui/breadcrumb\";\nimport { DocsLink } from \"@/components/ui/docs-link\";\nimport { Icon } from \"@/components/ui/icons\";\nimport { LazyMarkdown } from \"@/components/ui/lazy-markdown\";\nimport {\n\tMenubar,\n\tMenubarContent,\n\tMenubarItem,\n\tMenubarMenu,\n\tMenubarTrigger,\n} from \"@/components/ui/menubar\";\nimport { Typography } from \"@/components/ui/typography\";\n\ntype ArtifactsKeyHeaderProps = {\n\tartifactKey: string;\n\tpageHeader?: string;\n};\n\nexport const ArtifactsKeyHeader = ({\n\tartifactKey,\n\tpageHeader,\n}: ArtifactsKeyHeaderProps) => {\n\tconst handleCopyId = useCallback(() => {\n\t\tvoid navigator.clipboard.writeText(artifactKey);\n\t}, [artifactKey]);\n\n\treturn (\n\t\t<>\n\t\t\t<div className=\"flex items-center justify-between\">\n\t\t\t\t<Header artifactKey={artifactKey} />\n\t\t\t\t<div className=\"flex items-center space-x-2\">\n\t\t\t\t\t<DocsLink id=\"artifacts-guide\" label=\"Documentation\" />\n\t\t\t\t\t{/* <Button variant=\"outline\" className=\"px-1\"><Icon id=\"EllipsisVertical\" /></Button> */}\n\t\t\t\t\t<Menubar>\n\t\t\t\t\t\t<MenubarMenu>\n\t\t\t\t\t\t\t<MenubarTrigger className=\"px-1\">\n\t\t\t\t\t\t\t\t<Icon id=\"EllipsisVertical\" />\n\t\t\t\t\t\t\t</MenubarTrigger>\n\t\t\t\t\t\t\t<MenubarContent>\n\t\t\t\t\t\t\t\t<MenubarItem onClick={handleCopyId}>Copy Id</MenubarItem>\n\t\t\t\t\t\t\t</MenubarContent>\n\t\t\t\t\t\t</MenubarMenu>\n\t\t\t\t\t</Menubar>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t{pageHeader && (\n\t\t\t\t<div className=\"\">\n\t\t\t\t\t<Typography variant=\"h2\" className=\"my-4 font-bold prose lg:prose-xl\">\n\t\t\t\t\t\t<LazyMarkdown>{pageHeader}</LazyMarkdown>\n\t\t\t\t\t</Typography>\n\t\t\t\t\t<hr />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</>\n\t);\n};\n\nconst Header = ({ artifactKey }: ArtifactsKeyHeaderProps) => (\n\t<div className=\"flex items-center gap-2\">\n\t\t<Breadcrumb>\n\t\t\t<BreadcrumbList>\n\t\t\t\t<BreadcrumbItem>\n\t\t\t\t\t<BreadcrumbLink to=\"/artifacts\" className=\"text-xl font-semibold\">\n\t\t\t\t\t\tArtifacts\n\t\t\t\t\t</BreadcrumbLink>\n\t\t\t\t</BreadcrumbItem>\n\t\t\t\t<BreadcrumbSeparator />\n\t\t\t\t<BreadcrumbItem className=\"text-xl font-semibold\">\n\t\t\t\t\t{artifactKey}\n\t\t\t\t</BreadcrumbItem>\n\t\t\t</BreadcrumbList>\n\t\t</Breadcrumb>\n\t</div>\n);\n","import { Link } from \"@tanstack/react-router\";\nimport { useMemo } from \"react\";\nimport type { ArtifactWithFlowRunAndTaskRun } from \"@/api/artifacts\";\nimport { Card } from \"@/components/ui/card\";\nimport { Typography } from \"@/components/ui/typography\";\n\nexport type ArtifactTimelineCardProps = {\n\tartifact: ArtifactWithFlowRunAndTaskRun;\n};\n\nexport const ArtifactTimelineCard = ({\n\tartifact,\n}: ArtifactTimelineCardProps) => {\n\tconst artifactTitle = useMemo(() => {\n\t\treturn artifact.id?.split(\"-\")[0];\n\t}, [artifact.id]);\n\n\treturn (\n\t\t<Card\n\t\t\tdata-testid={`timeline-card-${artifact.id}`}\n\t\t\tclassName=\"flex flex-col p-4 m-2 transition-transform hover:translate-x-2 grow\"\n\t\t>\n\t\t\t<Link to=\"/artifacts/artifact/$id\" params={{ id: artifact.id ?? \"\" }}>\n\t\t\t\t<Typography\n\t\t\t\t\tvariant=\"body\"\n\t\t\t\t\tclassName=\"font-bold text-blue-700 hover:underline\"\n\t\t\t\t>\n\t\t\t\t\t{artifactTitle}\n\t\t\t\t</Typography>\n\t\t\t</Link>\n\t\t\t{artifact.flow_run && (\n\t\t\t\t<Typography variant=\"bodySmall\">\n\t\t\t\t\tFlow run:{\" \"}\n\t\t\t\t\t<Link\n\t\t\t\t\t\tclassName=\"text-blue-700 hover:underline\"\n\t\t\t\t\t\tto={\"/runs/flow-run/$id\"}\n\t\t\t\t\t\tparams={{ id: artifact.flow_run_id ?? \"\" }}\n\t\t\t\t\t>\n\t\t\t\t\t\t{artifact.flow_run?.name}\n\t\t\t\t\t</Link>\n\t\t\t\t</Typography>\n\t\t\t)}\n\t\t\t{artifact.task_run && (\n\t\t\t\t<Typography variant=\"bodySmall\">\n\t\t\t\t\tTask run:{\" \"}\n\t\t\t\t\t<Link\n\t\t\t\t\t\tclassName=\"text-blue-700 hover:underline\"\n\t\t\t\t\t\tto={\"/runs/task-run/$id\"}\n\t\t\t\t\t\tparams={{ id: artifact.task_run_id ?? \"\" }}\n\t\t\t\t\t>\n\t\t\t\t\t\t{artifact.task_run?.name}\n\t\t\t\t\t</Link>\n\t\t\t\t</Typography>\n\t\t\t)}\n\t\t</Card>\n\t);\n};\n","import type { ArtifactWithFlowRunAndTaskRun } from \"@/api/artifacts\";\nimport { Typography } from \"@/components/ui/typography\";\nimport { formatDate } from \"@/utils/date\";\nimport { ArtifactTimelineCard } from \"./timelineCard\";\n\nexport type TimelineRowProps = {\n\tartifact: ArtifactWithFlowRunAndTaskRun;\n};\n\nexport const TimelineRow = ({ artifact }: TimelineRowProps) => {\n\tconst [date, time] = formatDate(artifact.created ?? \"\", \"dateTime\").split(\n\t\t\" at \",\n\t);\n\treturn (\n\t\t<div data-testid={`timeline-row-${artifact.id}`} className=\"flex\">\n\t\t\t<div\n\t\t\t\tclassName=\"flex flex-col items-end justify-items-start pt-4\"\n\t\t\t\tstyle={{ width: \"128px\" }}\n\t\t\t>\n\t\t\t\t<Typography variant=\"body\">{time}</Typography>\n\t\t\t\t<Typography variant=\"bodySmall\" className=\"text-muted-foreground\">\n\t\t\t\t\t{date}\n\t\t\t\t</Typography>\n\t\t\t</div>\n\t\t\t<div className=\"w-10 flex flex-col\">\n\t\t\t\t<div className=\"w-5 h-full border-r border-gray-200\">\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName=\"size-4 rounded-full bg-white my-5 mx-auto border-2\"\n\t\t\t\t\t\tstyle={{ margin: \"20px calc(50% + 2px)\" }}\n\t\t\t\t\t/>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<div className=\"grow mt-1\">\n\t\t\t\t<ArtifactTimelineCard artifact={artifact} />\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n","import type { ArtifactWithFlowRunAndTaskRun } from \"@/api/artifacts\";\nimport { Typography } from \"@/components/ui/typography\";\nimport { TimelineRow } from \"./timelineRow\";\n\nexport type TimelineContainerProps = {\n\tartifacts: ArtifactWithFlowRunAndTaskRun[];\n};\n\nexport const TimelineContainer = ({ artifacts }: TimelineContainerProps) => {\n\treturn (\n\t\t<div>\n\t\t\t{artifacts.map((artifact) => (\n\t\t\t\t<TimelineRow key={artifact.id} artifact={artifact} />\n\t\t\t))}\n\t\t\t<div className=\"flex border-b\">\n\t\t\t\t<div\n\t\t\t\t\tclassName=\"flex flex-col items-end justify-items-start pt-4\"\n\t\t\t\t\tstyle={{ width: \"128px\", height: \"88px\" }}\n\t\t\t\t/>\n\t\t\t\t<div className=\"w-10 flex flex-col\">\n\t\t\t\t\t<div className=\"w-5 h-full border-r border-gray-200 pt-3\">\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName=\"size-8 rounded-full bg-white my-5 mx-auto border-2 flex justify-center items-center\"\n\t\t\t\t\t\t\tstyle={{ margin: \"20px calc(50% - 6px)\" }}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<div className=\"size-4 rounded-full border-2 border-black relative\" />\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t\t<div style={{ padding: \"33px 0 0 5px\" }}>\n\t\t\t\t\t<Typography variant=\"bodyLarge\">\n\t\t\t\t\t\tCreated <span className=\"font-bold\">{artifacts[0].key}</span>\n\t\t\t\t\t</Typography>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t</div>\n\t);\n};\n","import type { ArtifactWithFlowRunAndTaskRun } from \"@/api/artifacts\";\nimport { ArtifactsKeyHeader } from \"./artifacts-key-header\";\nimport { TimelineContainer } from \"./timeline/timelineContainer\";\n\ntype ArtifactsKeyPageProps = {\n\tartifactKey: string;\n\tartifacts: ArtifactWithFlowRunAndTaskRun[];\n};\n\nexport const ArtifactsKeyPage = ({\n\tartifactKey,\n\tartifacts,\n}: ArtifactsKeyPageProps) => {\n\treturn (\n\t\t<div>\n\t\t\t<ArtifactsKeyHeader\n\t\t\t\tartifactKey={artifactKey}\n\t\t\t\tpageHeader={artifacts[0]?.description ?? undefined}\n\t\t\t/>\n\t\t\t<TimelineContainer artifacts={artifacts} />\n\t\t</div>\n\t);\n};\n","import { useSuspenseQuery } from \"@tanstack/react-query\";\nimport { createFileRoute } from \"@tanstack/react-router\";\nimport { type ArtifactsFilter, buildListArtifactsQuery } from \"@/api/artifacts\";\nimport { useFilterArtifactsFlowTaskRuns } from \"@/api/artifacts/use-get-artifacts-flow-task-runs/use-get-artifacts-flow-task-runs\";\nimport { ArtifactsKeyPage } from \"@/components/artifacts/key/artifacts-key-page\";\n\nconst buildFilterBody = (key: string): ArtifactsFilter => ({\n\tartifacts: {\n\t\toperator: \"and_\", // Logical operator for combining filters\n\t\tkey: {\n\t\t\tlike_: key, // Filter by artifact name\n\t\t},\n\t},\n\tsort: \"CREATED_DESC\",\n\toffset: 0,\n});\n\nexport const Route = createFileRoute(\"/artifacts/key/$key\")({\n\tcomponent: RouteComponent,\n\tloader: async ({ context, params }) => {\n\t\tconst { key } = params;\n\n\t\tconst artifacts = await context.queryClient.ensureQueryData(\n\t\t\tbuildListArtifactsQuery(buildFilterBody(key)),\n\t\t);\n\n\t\treturn { artifacts };\n\t},\n\twrapInSuspense: true,\n});\n\nfunction RouteComponent() {\n\tconst { key } = Route.useParams();\n\n\tconst { data: artifacts } = useSuspenseQuery(\n\t\tbuildListArtifactsQuery(buildFilterBody(key)),\n\t);\n\n\tconst artifactWithMetadata = useFilterArtifactsFlowTaskRuns(\n\t\tbuildFilterBody(key),\n\t);\n\treturn (\n\t\t<div>\n\t\t\t<ArtifactsKeyPage\n\t\t\t\tartifactKey={key} // can't use \"key\" as it is a reserved word\n\t\t\t\tartifacts={artifactWithMetadata ?? artifacts}\n\t\t\t/>\n\t\t</div>\n\t);\n}\n"],"names":["Menubar","className","props","jsx","MenubarPrimitive.Root","cn","MenubarMenu","MenubarPrimitive.Menu","MenubarPortal","MenubarPrimitive.Portal","MenubarTrigger","MenubarPrimitive.Trigger","MenubarContent","align","alignOffset","sideOffset","MenubarPrimitive.Content","MenubarItem","inset","variant","MenubarPrimitive.Item","ArtifactsKeyHeader","artifactKey","pageHeader","handleCopyId","useCallback","jsxs","Fragment","Header","DocsLink","Icon","Typography","LazyMarkdown","Breadcrumb","BreadcrumbList","BreadcrumbItem","BreadcrumbLink","BreadcrumbSeparator","ArtifactTimelineCard","artifact","artifactTitle","useMemo","Card","Link","TimelineRow","date","time","formatDate","TimelineContainer","artifacts","ArtifactsKeyPage","buildFilterBody","key","operator","like_","sort","offset","RouteComponent","Route","useParams","data","useSuspenseQuery","buildListArtifactsQuery","artifactWithMetadata","useFilterArtifactsFlowTaskRuns"],"mappings":"miBAMA,SAASA,EAAQ,CAChB,UAAAC,EACA,GAAGC,CACJ,EAAuD,CACtD,OACCC,EAAAA,IAACC,EAAA,CACA,YAAU,UACV,UAAWC,EACV,4EACAJ,CAAA,EAEA,GAAGC,CAAA,CAAA,CAGP,CAEA,SAASI,EAAY,CACpB,GAAGJ,CACJ,EAAuD,CACtD,aAAQK,EAAA,CAAsB,YAAU,eAAgB,GAAGL,EAAO,CACnE,CAQA,SAASM,EAAc,CACtB,GAAGN,CACJ,EAAyD,CACxD,aAAQO,EAAA,CAAwB,YAAU,iBAAkB,GAAGP,EAAO,CACvE,CAUA,SAASQ,EAAe,CACvB,UAAAT,EACA,GAAGC,CACJ,EAA0D,CACzD,OACCC,EAAAA,IAACQ,EAAA,CACA,YAAU,kBACV,UAAWN,EACV,0MACAJ,CAAA,EAEA,GAAGC,CAAA,CAAA,CAGP,CAEA,SAASU,EAAe,CACvB,UAAAX,EACA,MAAAY,EAAQ,QACR,YAAAC,EAAc,GACd,WAAAC,EAAa,EACb,GAAGb,CACJ,EAA0D,CACzD,aACEM,EAAA,CACA,SAAAL,EAAAA,IAACa,EAAA,CACA,YAAU,kBACV,MAAAH,EACA,YAAAC,EACA,WAAAC,EACA,UAAWV,EACV,yZACAJ,CAAA,EAEA,GAAGC,CAAA,CAAA,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,KAACK,EAAA,CAAW,QAAQ,YAAY,SAAA,CAAA,iBACtB,OAAA,CAAK,UAAU,YAAa,SAAAkB,EAAU,CAAC,EAAE,GAAA,CAAI,CAAA,CAAA,CACvD,CAAA,CACD,CAAA,CAAA,CACD,CAAA,EACD,EC1BWC,EAAmB,CAAC,CAChC,YAAA5B,EACA,UAAA2B,CACD,WAEG,MAAA,CACA,SAAA,CAAA9C,EAAAA,IAACkB,EAAA,CACA,YAAAC,EACA,WAAY2B,EAAU,CAAC,GAAG,aAAe,MAAA,CAAA,EAE1C9C,MAAC6C,GAAkB,UAAAC,CAAA,CAAsB,CAAA,EAC1C,ECdIE,EAAmBC,IAAkC,CAC1DH,UAAW,CACVI,SAAU,OACVD,IAAK,CACJE,MAAOF,CAAAA,CACR,EAEDG,KAAM,eACNC,OAAQ,CACT,GAgBA,SAASC,GAAiB,CACzB,KAAM,CAAEL,IAAAA,CAAAA,EAAQM,EAAMC,UAAAA,EAEhB,CAAEC,KAAMX,CAAAA,EAAcY,EAC3BC,EAAwBX,EAAgBC,CAAG,CAAC,CAC7C,EAEMW,EAAuBC,EAC5Bb,EAAgBC,CAAG,CACpB,EACA,aACE,MAAA,CACA,SAAAjD,EAAAA,IAAC+C,EAAA,CACA,YAAaE,EACb,UAAWW,GAAwBd,CAAAA,CAAAA,EAErC,CAEF"}
@@ -1,3 +1,3 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/vendor-markdown-Bvx8iWBg.js","assets/vendor-tanstack-BK8oseNA.js","assets/vendor-react-Bce9NwRC.js"])))=>i.map(i=>d[i]);
2
- import{cc as r,b5 as _}from"./index-Cd7pM9pk.js";import{r as e,j as s}from"./vendor-tanstack-BK8oseNA.js";function f({children:a,...i}){const[o,u]=e.useState(null),[n,l]=e.useState(null);return e.useEffect(()=>{Promise.all([r(()=>import("./vendor-markdown-Bvx8iWBg.js").then(t=>t.i),__vite__mapDeps([0,1,2])),r(()=>import("./vendor-markdown-Bvx8iWBg.js").then(t=>t.a),__vite__mapDeps([0,1,2]))]).then(([t,m])=>{u(()=>t.default),l(()=>m.default)})},[]),!o||!n?s.jsx(_,{className:"min-h-[100px]"}):s.jsx(o,{remarkPlugins:[n],...i,children:a})}export{f as L};
3
- //# sourceMappingURL=lazy-markdown-BoMKGRXo.js.map
2
+ import{cc as r,b5 as _}from"./index-Yzhlw6-Q.js";import{r as e,j as s}from"./vendor-tanstack-BK8oseNA.js";function f({children:a,...i}){const[o,u]=e.useState(null),[n,l]=e.useState(null);return e.useEffect(()=>{Promise.all([r(()=>import("./vendor-markdown-Bvx8iWBg.js").then(t=>t.i),__vite__mapDeps([0,1,2])),r(()=>import("./vendor-markdown-Bvx8iWBg.js").then(t=>t.a),__vite__mapDeps([0,1,2]))]).then(([t,m])=>{u(()=>t.default),l(()=>m.default)})},[]),!o||!n?s.jsx(_,{className:"min-h-[100px]"}):s.jsx(o,{remarkPlugins:[n],...i,children:a})}export{f as L};
3
+ //# sourceMappingURL=lazy-markdown-CPQjrQrX.js.map
@@ -1 +1 @@
1
- {"version":3,"mappings":";0GAQO,SAASA,EAAa,CAAE,SAAAC,EAAU,GAAGC,GAA4B,CACvE,KAAM,CAACC,EAAWC,CAAY,EAC7BC,WAA8C,IAAI,EAC7C,CAACC,EAAQC,CAAS,EAAIF,WAE1B,IAAI,EAWN,OATAG,YAAU,IAAM,CACV,QAAQ,IAAI,CAAAC,EAAA,IAAC,OAAO,+BAAgB,OAAAC,KAAA,mCAAG,OAAO,+BAAY,wCAAC,CAAC,EAAE,KAClE,CAAC,CAACC,EAAIC,CAAG,IAAM,CACdR,EAAa,IAAMO,EAAG,OAAO,EAC7BJ,EAAU,IAAMK,EAAI,OAAO,CAC5B,EAEF,EAAG,EAAE,EAED,CAACT,GAAa,CAACG,EACXO,MAACC,EAAA,CAAS,UAAU,gBAAgB,EAI3CD,MAACV,GAAU,cAAe,CAACG,CAAM,EAAI,GAAGJ,EACtC,SAAAD,EACF,CAEF","names":["LazyMarkdown","children","props","Component","setComponent","useState","plugin","setPlugin","useEffect","__vitePreload","n","md","gfm","jsx","Skeleton"],"ignoreList":[],"sources":["../../src/components/ui/lazy-markdown.tsx"],"sourcesContent":["import { useEffect, useState } from \"react\";\nimport type { Options } from \"react-markdown\";\nimport { Skeleton } from \"@/components/ui/skeleton\";\n\ntype LazyMarkdownProps = Omit<Options, \"children\"> & {\n\tchildren: string;\n};\n\nexport function LazyMarkdown({ children, ...props }: LazyMarkdownProps) {\n\tconst [Component, setComponent] =\n\t\tuseState<React.ComponentType<Options> | null>(null);\n\tconst [plugin, setPlugin] = useState<\n\t\ttypeof import(\"remark-gfm\").default | null\n\t>(null);\n\n\tuseEffect(() => {\n\t\tvoid Promise.all([import(\"react-markdown\"), import(\"remark-gfm\")]).then(\n\t\t\t([md, gfm]) => {\n\t\t\t\tsetComponent(() => md.default);\n\t\t\t\tsetPlugin(() => gfm.default);\n\t\t\t},\n\t\t);\n\t}, []);\n\n\tif (!Component || !plugin) {\n\t\treturn <Skeleton className=\"min-h-[100px]\" />;\n\t}\n\n\treturn (\n\t\t<Component remarkPlugins={[plugin]} {...props}>\n\t\t\t{children}\n\t\t</Component>\n\t);\n}\n"],"file":"lazy-markdown-BoMKGRXo.js"}
1
+ {"version":3,"mappings":";0GAQO,SAASA,EAAa,CAAE,SAAAC,EAAU,GAAGC,GAA4B,CACvE,KAAM,CAACC,EAAWC,CAAY,EAC7BC,WAA8C,IAAI,EAC7C,CAACC,EAAQC,CAAS,EAAIF,WAE1B,IAAI,EAWN,OATAG,YAAU,IAAM,CACV,QAAQ,IAAI,CAAAC,EAAA,IAAC,OAAO,+BAAgB,OAAAC,KAAA,mCAAG,OAAO,+BAAY,wCAAC,CAAC,EAAE,KAClE,CAAC,CAACC,EAAIC,CAAG,IAAM,CACdR,EAAa,IAAMO,EAAG,OAAO,EAC7BJ,EAAU,IAAMK,EAAI,OAAO,CAC5B,EAEF,EAAG,EAAE,EAED,CAACT,GAAa,CAACG,EACXO,MAACC,EAAA,CAAS,UAAU,gBAAgB,EAI3CD,MAACV,GAAU,cAAe,CAACG,CAAM,EAAI,GAAGJ,EACtC,SAAAD,EACF,CAEF","names":["LazyMarkdown","children","props","Component","setComponent","useState","plugin","setPlugin","useEffect","__vitePreload","n","md","gfm","jsx","Skeleton"],"ignoreList":[],"sources":["../../src/components/ui/lazy-markdown.tsx"],"sourcesContent":["import { useEffect, useState } from \"react\";\nimport type { Options } from \"react-markdown\";\nimport { Skeleton } from \"@/components/ui/skeleton\";\n\ntype LazyMarkdownProps = Omit<Options, \"children\"> & {\n\tchildren: string;\n};\n\nexport function LazyMarkdown({ children, ...props }: LazyMarkdownProps) {\n\tconst [Component, setComponent] =\n\t\tuseState<React.ComponentType<Options> | null>(null);\n\tconst [plugin, setPlugin] = useState<\n\t\ttypeof import(\"remark-gfm\").default | null\n\t>(null);\n\n\tuseEffect(() => {\n\t\tvoid Promise.all([import(\"react-markdown\"), import(\"remark-gfm\")]).then(\n\t\t\t([md, gfm]) => {\n\t\t\t\tsetComponent(() => md.default);\n\t\t\t\tsetPlugin(() => gfm.default);\n\t\t\t},\n\t\t);\n\t}, []);\n\n\tif (!Component || !plugin) {\n\t\treturn <Skeleton className=\"min-h-[100px]\" />;\n\t}\n\n\treturn (\n\t\t<Component remarkPlugins={[plugin]} {...props}>\n\t\t\t{children}\n\t\t</Component>\n\t);\n}\n"],"file":"lazy-markdown-CPQjrQrX.js"}
@@ -1,2 +1,2 @@
1
- import{j as e,r as o,u as p,N as h}from"./vendor-tanstack-BK8oseNA.js";import{l as g,C as j,m as v,n as L,o as w,p as C,q as b,R as N,r as R,P as S}from"./index-Cd7pM9pk.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-CznP1SOq.js";import"./vendor-recharts-D4imLXNl.js";import"./vendor-forms-DxqqmhL5.js";import"./vendor-date-7GxEwcQM.js";function P({className:t="size-11"}){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 76 76",className:t,"aria-label":"Prefect Logo",children:[e.jsx("title",{children:"Prefect Logo"}),e.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M15.89 15.07 38 26.543v22.935l22.104-11.47.007.004V15.068l-.003.001L38 3.598z",clipRule:"evenodd"}),e.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M15.89 15.07 38 26.543v22.935l22.104-11.47.007.004V15.068l-.003.001L38 3.598z",clipRule:"evenodd"}),e.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M37.987 49.464 15.89 38v22.944l.013-.006L38 72.402V49.457z",clipRule:"evenodd"})]})}function u({redirectTo:t="/dashboard"}){const[s,d]=o.useState(""),[i,n]=o.useState(""),[r,l]=o.useState(!1),{login:f}=g(),m=p(),x=a=>{a.preventDefault(),!(r||!s.trim())&&(l(!0),n(""),f(s).then(c=>{c.success?m({to:t}):(n(c.error??"Authentication failed"),l(!1))}))};return e.jsx("div",{className:"flex items-center justify-center min-h-screen",children:e.jsxs(j,{className:"w-full max-w-[400px]",children:[e.jsxs(v,{className:"flex flex-col items-center gap-4",children:[e.jsx(P,{className:"size-16"}),e.jsx(L,{children:"Login"})]}),e.jsx(w,{children:e.jsxs("form",{onSubmit:x,className:"flex flex-col gap-4",children:[e.jsx(C,{type:"password",placeholder:"admin:pass",value:s,onChange:a=>d(a.target.value),autoFocus:!0,disabled:r}),i&&e.jsx("p",{className:"text-sm text-destructive",children:i}),e.jsx(b,{type:"submit",disabled:r,className:"w-full",children:r?"Logging in...":"Login"})]})})]})})}function I(){const{redirectTo:t}=N.useSearch(),s=R();return s?s.isLoading?e.jsx(S,{}):s.isAuthenticated?e.jsx(h,{to:t??"/dashboard",replace:!0}):e.jsx(u,{redirectTo:t}):e.jsx(u,{redirectTo:t})}export{I as component};
2
- //# sourceMappingURL=login-BmmIDesJ.js.map
1
+ import{j as e,r as o,u as p,N as h}from"./vendor-tanstack-BK8oseNA.js";import{l as g,C as j,m as v,n as L,o as w,p as C,q as b,R as N,r as R,P as S}from"./index-Yzhlw6-Q.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-BZJHvSaq.js";import"./vendor-recharts-D4imLXNl.js";import"./vendor-forms-DxqqmhL5.js";import"./vendor-date-JS-ReHrg.js";function P({className:t="size-11"}){return e.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 76 76",className:t,"aria-label":"Prefect Logo",children:[e.jsx("title",{children:"Prefect Logo"}),e.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M15.89 15.07 38 26.543v22.935l22.104-11.47.007.004V15.068l-.003.001L38 3.598z",clipRule:"evenodd"}),e.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M15.89 15.07 38 26.543v22.935l22.104-11.47.007.004V15.068l-.003.001L38 3.598z",clipRule:"evenodd"}),e.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M37.987 49.464 15.89 38v22.944l.013-.006L38 72.402V49.457z",clipRule:"evenodd"})]})}function u({redirectTo:t="/dashboard"}){const[s,d]=o.useState(""),[i,n]=o.useState(""),[r,l]=o.useState(!1),{login:f}=g(),m=p(),x=a=>{a.preventDefault(),!(r||!s.trim())&&(l(!0),n(""),f(s).then(c=>{c.success?m({to:t}):(n(c.error??"Authentication failed"),l(!1))}))};return e.jsx("div",{className:"flex items-center justify-center min-h-screen",children:e.jsxs(j,{className:"w-full max-w-[400px]",children:[e.jsxs(v,{className:"flex flex-col items-center gap-4",children:[e.jsx(P,{className:"size-16"}),e.jsx(L,{children:"Login"})]}),e.jsx(w,{children:e.jsxs("form",{onSubmit:x,className:"flex flex-col gap-4",children:[e.jsx(C,{type:"password",placeholder:"admin:pass",value:s,onChange:a=>d(a.target.value),autoFocus:!0,disabled:r}),i&&e.jsx("p",{className:"text-sm text-destructive",children:i}),e.jsx(b,{type:"submit",disabled:r,className:"w-full",children:r?"Logging in...":"Login"})]})})]})})}function I(){const{redirectTo:t}=N.useSearch(),s=R();return s?s.isLoading?e.jsx(S,{}):s.isAuthenticated?e.jsx(h,{to:t??"/dashboard",replace:!0}):e.jsx(u,{redirectTo:t}):e.jsx(u,{redirectTo:t})}export{I as component};
2
+ //# sourceMappingURL=login-BsnFlv-8.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"login-BmmIDesJ.js","sources":["../../src/components/ui/prefect-logo.tsx","../../src/components/auth/login-page.tsx","../../src/routes/login.tsx?tsr-split=component"],"sourcesContent":["interface PrefectLogoProps {\n\tclassName?: string;\n}\n\nexport function PrefectLogo({ className = \"size-11\" }: PrefectLogoProps) {\n\treturn (\n\t\t<svg\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\tfill=\"none\"\n\t\t\tviewBox=\"0 0 76 76\"\n\t\t\tclassName={className}\n\t\t\taria-label=\"Prefect Logo\"\n\t\t>\n\t\t\t<title>Prefect Logo</title>\n\t\t\t<path\n\t\t\t\tfill=\"currentColor\"\n\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\td=\"M15.89 15.07 38 26.543v22.935l22.104-11.47.007.004V15.068l-.003.001L38 3.598z\"\n\t\t\t\tclipRule=\"evenodd\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\tfill=\"currentColor\"\n\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\td=\"M15.89 15.07 38 26.543v22.935l22.104-11.47.007.004V15.068l-.003.001L38 3.598z\"\n\t\t\t\tclipRule=\"evenodd\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\tfill=\"currentColor\"\n\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\td=\"M37.987 49.464 15.89 38v22.944l.013-.006L38 72.402V49.457z\"\n\t\t\t\tclipRule=\"evenodd\"\n\t\t\t/>\n\t\t</svg>\n\t);\n}\n","import { useNavigate } from \"@tanstack/react-router\";\nimport { type FormEvent, useState } from \"react\";\nimport { useAuth } from \"@/auth\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { Input } from \"@/components/ui/input\";\nimport { PrefectLogo } from \"@/components/ui/prefect-logo\";\n\ninterface LoginPageProps {\n\tredirectTo?: string;\n}\n\nexport function LoginPage({ redirectTo = \"/dashboard\" }: LoginPageProps) {\n\tconst [password, setPassword] = useState(\"\");\n\tconst [error, setError] = useState(\"\");\n\tconst [isSubmitting, setIsSubmitting] = useState(false);\n\tconst { login } = useAuth();\n\tconst navigate = useNavigate();\n\n\tconst handleSubmit = (e: FormEvent) => {\n\t\te.preventDefault();\n\t\tif (isSubmitting || !password.trim()) return;\n\n\t\tsetIsSubmitting(true);\n\t\tsetError(\"\");\n\n\t\tvoid login(password).then((result) => {\n\t\t\tif (result.success) {\n\t\t\t\tvoid navigate({ to: redirectTo });\n\t\t\t} else {\n\t\t\t\tsetError(result.error ?? \"Authentication failed\");\n\t\t\t\tsetIsSubmitting(false);\n\t\t\t}\n\t\t});\n\t};\n\n\treturn (\n\t\t<div className=\"flex items-center justify-center min-h-screen\">\n\t\t\t<Card className=\"w-full max-w-[400px]\">\n\t\t\t\t<CardHeader className=\"flex flex-col items-center gap-4\">\n\t\t\t\t\t<PrefectLogo className=\"size-16\" />\n\t\t\t\t\t<CardTitle>Login</CardTitle>\n\t\t\t\t</CardHeader>\n\t\t\t\t<CardContent>\n\t\t\t\t\t<form onSubmit={handleSubmit} className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\tplaceholder=\"admin:pass\"\n\t\t\t\t\t\t\tvalue={password}\n\t\t\t\t\t\t\tonChange={(e) => setPassword(e.target.value)}\n\t\t\t\t\t\t\tautoFocus\n\t\t\t\t\t\t\tdisabled={isSubmitting}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{error && <p className=\"text-sm text-destructive\">{error}</p>}\n\t\t\t\t\t\t<Button type=\"submit\" disabled={isSubmitting} className=\"w-full\">\n\t\t\t\t\t\t\t{isSubmitting ? \"Logging in...\" : \"Login\"}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</form>\n\t\t\t\t</CardContent>\n\t\t\t</Card>\n\t\t</div>\n\t);\n}\n","import { createFileRoute, Navigate, redirect } from \"@tanstack/react-router\";\nimport { zodValidator } from \"@tanstack/zod-adapter\";\nimport { z } from \"zod\";\nimport { useAuthSafe } from \"@/auth\";\nimport { LoginPage } from \"@/components/auth/login-page\";\nimport { PrefectLoading } from \"@/components/ui/loading\";\n\nconst loginSearchSchema = z.object({\n\tredirectTo: z.string().optional(),\n});\n\nexport const Route = createFileRoute(\"/login\")({\n\tvalidateSearch: zodValidator(loginSearchSchema),\n\tbeforeLoad: ({ context, search }) => {\n\t\t// If already authenticated, redirect away from login page\n\t\tif (!context.auth.isLoading && context.auth.isAuthenticated) {\n\t\t\tredirect({ to: search.redirectTo ?? \"/dashboard\", throw: true });\n\t\t}\n\t},\n\tcomponent: LoginRouteComponent,\n});\n\nfunction LoginRouteComponent() {\n\tconst { redirectTo } = Route.useSearch();\n\tconst auth = useAuthSafe();\n\n\t// If auth context is not available (e.g., in tests), just render the login page\n\tif (!auth) {\n\t\treturn <LoginPage redirectTo={redirectTo} />;\n\t}\n\n\t// Show loading state while auth is initializing\n\tif (auth.isLoading) {\n\t\treturn <PrefectLoading />;\n\t}\n\n\t// Redirect to dashboard if already authenticated\n\t// (This handles the case where beforeLoad didn't catch it due to loading state)\n\tif (auth.isAuthenticated) {\n\t\treturn <Navigate to={redirectTo ?? \"/dashboard\"} replace={true} />;\n\t}\n\n\treturn <LoginPage redirectTo={redirectTo} />;\n}\n"],"names":["PrefectLogo","className","jsxs","jsx","LoginPage","redirectTo","password","setPassword","useState","error","setError","isSubmitting","setIsSubmitting","login","useAuth","navigate","useNavigate","handleSubmit","e","result","Card","CardHeader","CardTitle","CardContent","Input","Button","LoginRouteComponent","Route","useSearch","auth","useAuthSafe","isLoading","PrefectLoading","isAuthenticated","Navigate"],"mappings":"+VAIO,SAASA,EAAY,CAAE,UAAAC,EAAY,WAA+B,CACxE,OACCC,E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SAAUe,EAAc,UAAU,sBACvC,SAAA,CAAAd,EAAAA,IAACqB,EAAA,CACA,KAAK,WACL,YAAY,aACZ,MAAOlB,EACP,SAAWY,GAAMX,EAAYW,EAAE,OAAO,KAAK,EAC3C,UAAS,GACT,SAAUP,CAAA,CAAA,EAEVF,GAASN,EAAAA,IAAC,IAAA,CAAE,UAAU,2BAA4B,SAAAM,EAAM,EACzDN,EAAAA,IAACsB,EAAA,CAAO,KAAK,SAAS,SAAUd,EAAc,UAAU,SACtD,SAAAA,EAAe,gBAAkB,OAAA,CACnC,CAAA,CAAA,CACD,CAAA,CACD,CAAA,CAAA,CACD,CAAA,CACD,CAEF,CCxCA,SAASe,GAAsB,CAC9B,KAAM,CAAErB,WAAAA,CAAAA,EAAesB,EAAMC,UAAAA,EACvBC,EAAOC,EAAAA,EAGb,OAAKD,EAKDA,EAAKE,gBACAC,EAAA,EAAc,EAKnBH,EAAKI,sBACAC,EAAA,CAAS,GAAI7B,GAAc,aAAc,QAAS,GAAK,EAGzDF,MAACC,GAAU,WAAAC,EAAuB,EAdjCF,MAACC,GAAU,WAAAC,EAAuB,CAe3C"}
1
+ {"version":3,"file":"login-BsnFlv-8.js","sources":["../../src/components/ui/prefect-logo.tsx","../../src/components/auth/login-page.tsx","../../src/routes/login.tsx?tsr-split=component"],"sourcesContent":["interface PrefectLogoProps {\n\tclassName?: string;\n}\n\nexport function PrefectLogo({ className = \"size-11\" }: PrefectLogoProps) {\n\treturn (\n\t\t<svg\n\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\tfill=\"none\"\n\t\t\tviewBox=\"0 0 76 76\"\n\t\t\tclassName={className}\n\t\t\taria-label=\"Prefect Logo\"\n\t\t>\n\t\t\t<title>Prefect Logo</title>\n\t\t\t<path\n\t\t\t\tfill=\"currentColor\"\n\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\td=\"M15.89 15.07 38 26.543v22.935l22.104-11.47.007.004V15.068l-.003.001L38 3.598z\"\n\t\t\t\tclipRule=\"evenodd\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\tfill=\"currentColor\"\n\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\td=\"M15.89 15.07 38 26.543v22.935l22.104-11.47.007.004V15.068l-.003.001L38 3.598z\"\n\t\t\t\tclipRule=\"evenodd\"\n\t\t\t/>\n\t\t\t<path\n\t\t\t\tfill=\"currentColor\"\n\t\t\t\tfillRule=\"evenodd\"\n\t\t\t\td=\"M37.987 49.464 15.89 38v22.944l.013-.006L38 72.402V49.457z\"\n\t\t\t\tclipRule=\"evenodd\"\n\t\t\t/>\n\t\t</svg>\n\t);\n}\n","import { useNavigate } from \"@tanstack/react-router\";\nimport { type FormEvent, useState } from \"react\";\nimport { useAuth } from \"@/auth\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardContent, CardHeader, CardTitle } from \"@/components/ui/card\";\nimport { Input } from \"@/components/ui/input\";\nimport { PrefectLogo } from \"@/components/ui/prefect-logo\";\n\ninterface LoginPageProps {\n\tredirectTo?: string;\n}\n\nexport function LoginPage({ redirectTo = \"/dashboard\" }: LoginPageProps) {\n\tconst [password, setPassword] = useState(\"\");\n\tconst [error, setError] = useState(\"\");\n\tconst [isSubmitting, setIsSubmitting] = useState(false);\n\tconst { login } = useAuth();\n\tconst navigate = useNavigate();\n\n\tconst handleSubmit = (e: FormEvent) => {\n\t\te.preventDefault();\n\t\tif (isSubmitting || !password.trim()) return;\n\n\t\tsetIsSubmitting(true);\n\t\tsetError(\"\");\n\n\t\tvoid login(password).then((result) => {\n\t\t\tif (result.success) {\n\t\t\t\tvoid navigate({ to: redirectTo });\n\t\t\t} else {\n\t\t\t\tsetError(result.error ?? \"Authentication failed\");\n\t\t\t\tsetIsSubmitting(false);\n\t\t\t}\n\t\t});\n\t};\n\n\treturn (\n\t\t<div className=\"flex items-center justify-center min-h-screen\">\n\t\t\t<Card className=\"w-full max-w-[400px]\">\n\t\t\t\t<CardHeader className=\"flex flex-col items-center gap-4\">\n\t\t\t\t\t<PrefectLogo className=\"size-16\" />\n\t\t\t\t\t<CardTitle>Login</CardTitle>\n\t\t\t\t</CardHeader>\n\t\t\t\t<CardContent>\n\t\t\t\t\t<form onSubmit={handleSubmit} className=\"flex flex-col gap-4\">\n\t\t\t\t\t\t<Input\n\t\t\t\t\t\t\ttype=\"password\"\n\t\t\t\t\t\t\tplaceholder=\"admin:pass\"\n\t\t\t\t\t\t\tvalue={password}\n\t\t\t\t\t\t\tonChange={(e) => setPassword(e.target.value)}\n\t\t\t\t\t\t\tautoFocus\n\t\t\t\t\t\t\tdisabled={isSubmitting}\n\t\t\t\t\t\t/>\n\t\t\t\t\t\t{error && <p className=\"text-sm text-destructive\">{error}</p>}\n\t\t\t\t\t\t<Button type=\"submit\" disabled={isSubmitting} className=\"w-full\">\n\t\t\t\t\t\t\t{isSubmitting ? \"Logging in...\" : \"Login\"}\n\t\t\t\t\t\t</Button>\n\t\t\t\t\t</form>\n\t\t\t\t</CardContent>\n\t\t\t</Card>\n\t\t</div>\n\t);\n}\n","import { createFileRoute, Navigate, redirect } from \"@tanstack/react-router\";\nimport { zodValidator } from \"@tanstack/zod-adapter\";\nimport { z } from \"zod\";\nimport { useAuthSafe } from \"@/auth\";\nimport { LoginPage } from \"@/components/auth/login-page\";\nimport { PrefectLoading } from \"@/components/ui/loading\";\n\nconst loginSearchSchema = z.object({\n\tredirectTo: z.string().optional(),\n});\n\nexport const Route = createFileRoute(\"/login\")({\n\tvalidateSearch: zodValidator(loginSearchSchema),\n\tbeforeLoad: ({ context, search }) => {\n\t\t// If already authenticated, redirect away from login page\n\t\tif (!context.auth.isLoading && context.auth.isAuthenticated) {\n\t\t\tredirect({ to: search.redirectTo ?? \"/dashboard\", throw: true });\n\t\t}\n\t},\n\tcomponent: LoginRouteComponent,\n});\n\nfunction LoginRouteComponent() {\n\tconst { redirectTo } = Route.useSearch();\n\tconst auth = useAuthSafe();\n\n\t// If auth context is not available (e.g., in tests), just render the login page\n\tif (!auth) {\n\t\treturn <LoginPage redirectTo={redirectTo} />;\n\t}\n\n\t// Show loading state while auth is initializing\n\tif (auth.isLoading) {\n\t\treturn <PrefectLoading />;\n\t}\n\n\t// Redirect to dashboard if already authenticated\n\t// (This handles the case where beforeLoad didn't catch it due to loading state)\n\tif (auth.isAuthenticated) {\n\t\treturn <Navigate to={redirectTo ?? \"/dashboard\"} replace={true} />;\n\t}\n\n\treturn <LoginPage redirectTo={redirectTo} />;\n}\n"],"names":["PrefectLogo","className","jsxs","jsx","LoginPage","redirectTo","password","setPassword","useState","error","setError","isSubmitting","setIsSubmitting","login","useAuth","navigate","useNavigate","handleSubmit","e","result","Card","CardHeader","CardTitle","CardContent","Input","Button","LoginRouteComponent","Route","useSearch","auth","useAuthSafe","isLoading","PrefectLoading","isAuthenticated","Navigate"],"mappings":"+VAIO,SAASA,EAAY,CAAE,UAAAC,EAAY,WAA+B,CACxE,OACCC,EAAAA,KAAC,MAAA,CACA,MAAM,6BACN,KAAK,OACL,QAAQ,YACR,UAAAD,EACA,aAAW,eAEX,SAAA,CAAAE,EAAAA,IAAC,SAAM,SAAA,cAAA,CAAY,EACnBA,EAAAA,IAAC,OAAA,CACA,KAAK,eACL,SAAS,UACT,EAAE,gFACF,SAAS,SAAA,CAAA,EAEVA,EAAAA,IAAC,OAAA,CACA,KAAK,eACL,SAAS,UACT,EAAE,gFACF,SAAS,SAAA,CAAA,EAEVA,EAAAA,IAAC,OAAA,CACA,KAAK,eACL,SAAS,UACT,EAAE,6DACF,SAAS,SAAA,CAAA,CACV,CAAA,CAAA,CAGH,CCtBO,SAASC,EAAU,CAAE,WAAAC,EAAa,cAAgC,CACxE,KAAM,CAACC,EAAUC,CAAW,EAAIC,EAAAA,SAAS,EAAE,EACrC,CAACC,EAAOC,CAAQ,EAAIF,EAAAA,SAAS,EAAE,EAC/B,CAACG,EAAcC,CAAe,EAAIJ,EAAAA,SAAS,EAAK,EAChD,CAAE,MAAAK,CAAA,EAAUC,EAAA,EACZC,EAAWC,EAAA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,GAAU,WAAAC,EAAuB,CAe3C"}
@@ -1,2 +1,2 @@
1
- import{c as h,r as c,j as o}from"./vendor-tanstack-BK8oseNA.js";import{u as g,m as x,E as b}from"./vendor-codemirror-CXN7nd_v.js";import{aW as w,q as v,I as y,y as C}from"./index-Cd7pM9pk.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-CznP1SOq.js";import"./vendor-recharts-D4imLXNl.js";import"./vendor-forms-DxqqmhL5.js";import"./vendor-date-7GxEwcQM.js";const j=[x(),b.lineWrapping],E=h.forwardRef(({className:l,value:r,onChange:u,copy:p=!1,onBlur:N,disabled:s,hideLineNumbers:f=!1,...m},i)=>{const e=c.useRef(null);let n;s&&(n={lineNumbers:!f,highlightActiveLine:!1,foldGutter:!1,highlightActiveLineGutter:!1});const{setContainer:a}=g({container:e.current,extensions:j,value:r,onChange:u,indentWithTab:!1,editable:!s,basicSetup:n});c.useEffect(()=>{e.current&&a(e.current)},[a]);const d=t=>{C.success("Copied to clipboard"),navigator.clipboard.writeText(t)};return o.jsx("div",{className:w("rounded-md border shadow-xs overflow-hidden focus-within:outline-hidden focus-within:ring-1 focus-within:ring-ring relative",l),ref:t=>{e.current=t,typeof i=="function"?i(t):i&&(i.current=t)},...m,children:p&&r&&o.jsx(v,{onClick:()=>d(r),variant:"ghost",size:"icon",className:"absolute top-0 right-0 z-10","aria-label":"copy",children:o.jsx(y,{id:"Copy",className:"size-2"})})})});E.displayName="MarkdownInput";export{E as MarkdownInput};
2
- //# sourceMappingURL=markdown-input-C6P8cYT1.js.map
1
+ import{c as h,r as c,j as o}from"./vendor-tanstack-BK8oseNA.js";import{u as g,m as x,E as b}from"./vendor-codemirror-CXN7nd_v.js";import{aW as w,q as v,I as y,y as C}from"./index-Yzhlw6-Q.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-BZJHvSaq.js";import"./vendor-recharts-D4imLXNl.js";import"./vendor-forms-DxqqmhL5.js";import"./vendor-date-JS-ReHrg.js";const j=[x(),b.lineWrapping],E=h.forwardRef(({className:l,value:r,onChange:u,copy:p=!1,onBlur:N,disabled:s,hideLineNumbers:f=!1,...m},i)=>{const e=c.useRef(null);let n;s&&(n={lineNumbers:!f,highlightActiveLine:!1,foldGutter:!1,highlightActiveLineGutter:!1});const{setContainer:a}=g({container:e.current,extensions:j,value:r,onChange:u,indentWithTab:!1,editable:!s,basicSetup:n});c.useEffect(()=>{e.current&&a(e.current)},[a]);const d=t=>{C.success("Copied to clipboard"),navigator.clipboard.writeText(t)};return o.jsx("div",{className:w("rounded-md border shadow-xs overflow-hidden focus-within:outline-hidden focus-within:ring-1 focus-within:ring-ring relative",l),ref:t=>{e.current=t,typeof i=="function"?i(t):i&&(i.current=t)},...m,children:p&&r&&o.jsx(v,{onClick:()=>d(r),variant:"ghost",size:"icon",className:"absolute top-0 right-0 z-10","aria-label":"copy",children:o.jsx(y,{id:"Copy",className:"size-2"})})})});E.displayName="MarkdownInput";export{E as MarkdownInput};
2
+ //# sourceMappingURL=markdown-input-b0zl1NLl.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"markdown-input-C6P8cYT1.js","sources":["../../src/components/ui/markdown-input.tsx"],"sourcesContent":["import { markdown } from \"@codemirror/lang-markdown\";\nimport {\n\ttype BasicSetupOptions,\n\tEditorView,\n\tuseCodeMirror,\n} from \"@uiw/react-codemirror\";\nimport React, { useEffect, useRef } from \"react\";\nimport { toast } from \"sonner\";\nimport { cn } from \"@/utils\";\nimport { Button } from \"./button\";\nimport { Icon } from \"./icons\";\n\nconst extensions = [markdown(), EditorView.lineWrapping];\n\ntype MarkdownInputProps = React.ComponentProps<\"div\"> & {\n\tvalue?: string;\n\tonChange?: (value: string) => void;\n\tonBlur?: () => void;\n\tdisabled?: boolean;\n\tclassName?: string;\n\thideLineNumbers?: boolean;\n\tcopy?: boolean;\n};\n\nexport const MarkdownInput = React.forwardRef<\n\tHTMLDivElement,\n\tMarkdownInputProps\n>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\tcopy = false,\n\t\t\tonBlur,\n\t\t\tdisabled,\n\t\t\thideLineNumbers = false,\n\t\t\t...props\n\t\t},\n\t\tforwardedRef,\n\t) => {\n\t\tconst editor = useRef<HTMLDivElement | null>(null);\n\t\t// Setting `basicSetup` messes up the tab order. We only change the basic setup\n\t\t// if the input is disabled, so we leave it undefined to maintain the tab order.\n\t\tlet basicSetup: BasicSetupOptions | undefined;\n\t\tif (disabled) {\n\t\t\tbasicSetup = {\n\t\t\t\tlineNumbers: !hideLineNumbers,\n\t\t\t\thighlightActiveLine: false,\n\t\t\t\tfoldGutter: false,\n\t\t\t\thighlightActiveLineGutter: false,\n\t\t\t};\n\t\t}\n\t\tconst { setContainer } = useCodeMirror({\n\t\t\tcontainer: editor.current,\n\t\t\textensions,\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\tonBlur,\n\t\t\tindentWithTab: false,\n\t\t\teditable: !disabled,\n\t\t\tbasicSetup,\n\t\t});\n\n\t\tuseEffect(() => {\n\t\t\tif (editor.current) {\n\t\t\t\tsetContainer(editor.current);\n\t\t\t}\n\t\t}, [setContainer]);\n\n\t\tconst handleCopy = (_value: string) => {\n\t\t\ttoast.success(\"Copied to clipboard\");\n\t\t\tvoid navigator.clipboard.writeText(_value);\n\t\t};\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"rounded-md border shadow-xs overflow-hidden focus-within:outline-hidden focus-within:ring-1 focus-within:ring-ring relative\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tref={(node) => {\n\t\t\t\t\teditor.current = node;\n\t\t\t\t\tif (typeof forwardedRef === \"function\") {\n\t\t\t\t\t\tforwardedRef(node);\n\t\t\t\t\t} else if (forwardedRef) {\n\t\t\t\t\t\tforwardedRef.current = node;\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{copy && value && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tonClick={() => handleCopy(value)}\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\tclassName=\"absolute top-0 right-0 z-10\"\n\t\t\t\t\t\taria-label=\"copy\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon id=\"Copy\" className=\"size-2\" />\n\t\t\t\t\t</Button>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t},\n);\n\nMarkdownInput.displayName = \"MarkdownInput\";\n"],"names":["extensions","markdown","EditorView","MarkdownInput","React","className","value","onChange","copy","onBlur","disabled","hideLineNumbers","props","forwardedRef","editor","useRef","basicSetup","setContainer","useCodeMirror","useEffect","handleCopy","_value","toast","jsx","cn","node","Button","Icon"],"mappings":"iXAYA,MAAMA,EAAa,CAACC,IAAYC,EAAW,YAAY,EAY1CC,EAAgBC,EAAM,WAIlC,CACC,CACC,UAAAC,EACA,MAAAC,EACA,SAAAC,EACA,KAAAC,EAAO,GACP,OAAAC,EACA,SAAAC,EACA,gBAAAC,EAAkB,GAClB,GAAGC,CAAA,EAEJC,IACI,CACJ,MAAMC,EAASC,EAAAA,OAA8B,IAAI,EAGjD,IAAIC,EACAN,IACHM,EAAa,CACZ,YAAa,CAACL,EACd,oBAAqB,GACrB,WAAY,GACZ,0BAA2B,EAAA,GAG7B,KAAM,CAAE,aAAAM,CAAA,EAAiBC,EAAc,CACtC,UAAWJ,EAAO,QAClB,WAAAd,EACA,MAAAM,EACA,SAAAC,EAEA,cAAe,GACf,SAAU,CAACG,EACX,WAAAM,CAAA,CACA,EAEDG,EAAAA,UAAU,IAAM,CACXL,EAAO,SACVG,EAAaH,EAAO,OAAO,CAE7B,EAAG,CAACG,CAAY,CAAC,EAEjB,MAAMG,EAAcC,GAAmB,CACtCC,EAAM,QAAQ,qBAAqB,EAC9B,UAAU,UAAU,UAAUD,CAAM,CAC1C,EAEA,OACCE,EAAAA,IAAC,MAAA,CACA,UAAWC,EACV,8HACAnB,CAAA,EAED,IAAMoB,GAAS,CACdX,EAAO,QAAUW,EACb,OAAOZ,GAAiB,WAC3BA,EAAaY,CAAI,EACPZ,IACVA,EAAa,QAAUY,EAEzB,EACC,GAAGb,EAEH,YAAQN,GACRiB,EAAAA,IAACG,EAAA,CACA,QAAS,IAAMN,EAAWd,CAAK,EAC/B,QAAQ,QACR,KAAK,OACL,UAAU,8BACV,aAAW,OAEX,SAAAiB,EAAAA,IAACI,EAAA,CAAK,GAAG,OAAO,UAAU,QAAA,CAAS,CAAA,CAAA,CACpC,CAAA,CAIJ,CACD,EAEAxB,EAAc,YAAc"}
1
+ {"version":3,"file":"markdown-input-b0zl1NLl.js","sources":["../../src/components/ui/markdown-input.tsx"],"sourcesContent":["import { markdown } from \"@codemirror/lang-markdown\";\nimport {\n\ttype BasicSetupOptions,\n\tEditorView,\n\tuseCodeMirror,\n} from \"@uiw/react-codemirror\";\nimport React, { useEffect, useRef } from \"react\";\nimport { toast } from \"sonner\";\nimport { cn } from \"@/utils\";\nimport { Button } from \"./button\";\nimport { Icon } from \"./icons\";\n\nconst extensions = [markdown(), EditorView.lineWrapping];\n\ntype MarkdownInputProps = React.ComponentProps<\"div\"> & {\n\tvalue?: string;\n\tonChange?: (value: string) => void;\n\tonBlur?: () => void;\n\tdisabled?: boolean;\n\tclassName?: string;\n\thideLineNumbers?: boolean;\n\tcopy?: boolean;\n};\n\nexport const MarkdownInput = React.forwardRef<\n\tHTMLDivElement,\n\tMarkdownInputProps\n>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\tcopy = false,\n\t\t\tonBlur,\n\t\t\tdisabled,\n\t\t\thideLineNumbers = false,\n\t\t\t...props\n\t\t},\n\t\tforwardedRef,\n\t) => {\n\t\tconst editor = useRef<HTMLDivElement | null>(null);\n\t\t// Setting `basicSetup` messes up the tab order. We only change the basic setup\n\t\t// if the input is disabled, so we leave it undefined to maintain the tab order.\n\t\tlet basicSetup: BasicSetupOptions | undefined;\n\t\tif (disabled) {\n\t\t\tbasicSetup = {\n\t\t\t\tlineNumbers: !hideLineNumbers,\n\t\t\t\thighlightActiveLine: false,\n\t\t\t\tfoldGutter: false,\n\t\t\t\thighlightActiveLineGutter: false,\n\t\t\t};\n\t\t}\n\t\tconst { setContainer } = useCodeMirror({\n\t\t\tcontainer: editor.current,\n\t\t\textensions,\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\tonBlur,\n\t\t\tindentWithTab: false,\n\t\t\teditable: !disabled,\n\t\t\tbasicSetup,\n\t\t});\n\n\t\tuseEffect(() => {\n\t\t\tif (editor.current) {\n\t\t\t\tsetContainer(editor.current);\n\t\t\t}\n\t\t}, [setContainer]);\n\n\t\tconst handleCopy = (_value: string) => {\n\t\t\ttoast.success(\"Copied to clipboard\");\n\t\t\tvoid navigator.clipboard.writeText(_value);\n\t\t};\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"rounded-md border shadow-xs overflow-hidden focus-within:outline-hidden focus-within:ring-1 focus-within:ring-ring relative\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tref={(node) => {\n\t\t\t\t\teditor.current = node;\n\t\t\t\t\tif (typeof forwardedRef === \"function\") {\n\t\t\t\t\t\tforwardedRef(node);\n\t\t\t\t\t} else if (forwardedRef) {\n\t\t\t\t\t\tforwardedRef.current = node;\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{copy && value && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tonClick={() => handleCopy(value)}\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\tclassName=\"absolute top-0 right-0 z-10\"\n\t\t\t\t\t\taria-label=\"copy\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon id=\"Copy\" className=\"size-2\" />\n\t\t\t\t\t</Button>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t},\n);\n\nMarkdownInput.displayName = \"MarkdownInput\";\n"],"names":["extensions","markdown","EditorView","MarkdownInput","React","className","value","onChange","copy","onBlur","disabled","hideLineNumbers","props","forwardedRef","editor","useRef","basicSetup","setContainer","useCodeMirror","useEffect","handleCopy","_value","toast","jsx","cn","node","Button","Icon"],"mappings":"iXAYA,MAAMA,EAAa,CAACC,IAAYC,EAAW,YAAY,EAY1CC,EAAgBC,EAAM,WAIlC,CACC,CACC,UAAAC,EACA,MAAAC,EACA,SAAAC,EACA,KAAAC,EAAO,GACP,OAAAC,EACA,SAAAC,EACA,gBAAAC,EAAkB,GAClB,GAAGC,CAAA,EAEJC,IACI,CACJ,MAAMC,EAASC,EAAAA,OAA8B,IAAI,EAGjD,IAAIC,EACAN,IACHM,EAAa,CACZ,YAAa,CAACL,EACd,oBAAqB,GACrB,WAAY,GACZ,0BAA2B,EAAA,GAG7B,KAAM,CAAE,aAAAM,CAAA,EAAiBC,EAAc,CACtC,UAAWJ,EAAO,QAClB,WAAAd,EACA,MAAAM,EACA,SAAAC,EAEA,cAAe,GACf,SAAU,CAACG,EACX,WAAAM,CAAA,CACA,EAEDG,EAAAA,UAAU,IAAM,CACXL,EAAO,SACVG,EAAaH,EAAO,OAAO,CAE7B,EAAG,CAACG,CAAY,CAAC,EAEjB,MAAMG,EAAcC,GAAmB,CACtCC,EAAM,QAAQ,qBAAqB,EAC9B,UAAU,UAAU,UAAUD,CAAM,CAC1C,EAEA,OACCE,EAAAA,IAAC,MAAA,CACA,UAAWC,EACV,8HACAnB,CAAA,EAED,IAAMoB,GAAS,CACdX,EAAO,QAAUW,EACb,OAAOZ,GAAiB,WAC3BA,EAAaY,CAAI,EACPZ,IACVA,EAAa,QAAUY,EAEzB,EACC,GAAGb,EAEH,YAAQN,GACRiB,EAAAA,IAACG,EAAA,CACA,QAAS,IAAMN,EAAWd,CAAK,EAC/B,QAAQ,QACR,KAAK,OACL,UAAU,8BACV,aAAW,OAEX,SAAAiB,EAAAA,IAACI,EAAA,CAAK,GAAG,OAAO,UAAU,QAAA,CAAS,CAAA,CAAA,CACpC,CAAA,CAIJ,CACD,EAEAxB,EAAc,YAAc"}
@@ -1,3 +1,3 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/python-input-DX4uV8MF.js","assets/vendor-tanstack-BK8oseNA.js","assets/vendor-react-Bce9NwRC.js","assets/vendor-codemirror-CXN7nd_v.js","assets/index-Cd7pM9pk.js","assets/vendor-radix-CznP1SOq.js","assets/vendor-recharts-D4imLXNl.js","assets/vendor-forms-DxqqmhL5.js","assets/vendor-date-7GxEwcQM.js","assets/index-b9WBW430.css"])))=>i.map(i=>d[i]);
2
- import{j as e,r as s}from"./vendor-tanstack-BK8oseNA.js";import{b5 as p,cc as c}from"./index-Cd7pM9pk.js";const i=s.lazy(()=>c(()=>import("./python-input-DX4uV8MF.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(t=>({default:t.PythonInput})));function a({className:t,...n}){return e.jsx(s.Suspense,{fallback:e.jsx(p,{className:`min-h-[200px] ${t??""}`}),children:e.jsx(i,{className:t,...n})})}function h({codeExample:t,name:n}){const o=s.useMemo(()=>{const[,r=""]=t.match(/```python([\S\s]*?)```/)??[];return r.replace("BLOCK_NAME",n??"block-name").trim()},[t,n]);return e.jsx("div",{className:"flex flex-col gap-4",children:e.jsx(a,{className:"p-2",value:o,disabled:!0,copy:!0,hideLineNumbers:!0})})}export{h as P};
3
- //# sourceMappingURL=python-example-snippet-DPumgTpL.js.map
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/python-input-EKDBgTDE.js","assets/vendor-tanstack-BK8oseNA.js","assets/vendor-react-Bce9NwRC.js","assets/vendor-codemirror-CXN7nd_v.js","assets/index-Yzhlw6-Q.js","assets/vendor-radix-BZJHvSaq.js","assets/vendor-recharts-D4imLXNl.js","assets/vendor-forms-DxqqmhL5.js","assets/vendor-date-JS-ReHrg.js","assets/index-b9WBW430.css"])))=>i.map(i=>d[i]);
2
+ import{j as e,r as s}from"./vendor-tanstack-BK8oseNA.js";import{b5 as p,cc as c}from"./index-Yzhlw6-Q.js";const i=s.lazy(()=>c(()=>import("./python-input-EKDBgTDE.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(t=>({default:t.PythonInput})));function a({className:t,...n}){return e.jsx(s.Suspense,{fallback:e.jsx(p,{className:`min-h-[200px] ${t??""}`}),children:e.jsx(i,{className:t,...n})})}function h({codeExample:t,name:n}){const o=s.useMemo(()=>{const[,r=""]=t.match(/```python([\S\s]*?)```/)??[];return r.replace("BLOCK_NAME",n??"block-name").trim()},[t,n]);return e.jsx("div",{className:"flex flex-col gap-4",children:e.jsx(a,{className:"p-2",value:o,disabled:!0,copy:!0,hideLineNumbers:!0})})}export{h as P};
3
+ //# sourceMappingURL=python-example-snippet-W9Z_3hjQ.js.map
@@ -1 +1 @@
1
- {"version":3,"mappings":";0GAIA,MAAMA,EAAkBC,OAAK,IAAAC,EAAA,IAC5B,OAAO,4BAAgB,0CAAE,KAAMC,IAAS,CAAE,QAASA,EAAI,aAAc,CACtE,EAIO,SAASC,EAAgB,CAAE,UAAAC,EAAW,GAAGC,GAA+B,CAC9E,OACCC,MAACC,WAAA,CACA,SAAUD,MAACE,EAAA,CAAS,UAAW,iBAAiBJ,GAAa,EAAE,GAAI,EAEnE,SAAAE,MAACP,EAAA,CAAgB,UAAAK,EAAuB,GAAGC,CAAA,CAAO,GAGrD,CCXO,SAASI,EAAmB,CAClC,YAAAC,EACA,KAAAC,CACD,EAA4B,CAC3B,MAAMC,EAAUC,UAAQ,IAAM,CAC7B,KAAM,EAAGC,EAAiB,EAAE,EAC3BJ,EAAY,MAAM,wBAAwB,GAAK,GAKhD,OAJsBI,EAAe,QACpC,aACAH,GAAQ,cAEY,MACtB,EAAG,CAACD,EAAaC,CAAI,CAAC,EAEtB,OACCL,MAAC,OAAI,UAAU,sBACd,SAAAA,MAACS,EAAA,CACA,UAAU,MACV,MAAOH,EACP,SAAQ,GACR,KAAI,GACJ,gBAAe,KAEjB,CAEF","names":["PythonInputLazy","lazy","__vitePreload","mod","LazyPythonInput","className","props","jsx","Suspense","Skeleton","PythonBlockSnippet","codeExample","name","snippet","useMemo","genericSnippet","PythonInput"],"ignoreList":[],"sources":["../../src/components/ui/python-input-lazy.tsx","../../src/components/blocks/python-example-snippet.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\";\nimport { lazy, Suspense } from \"react\";\nimport { Skeleton } from \"@/components/ui/skeleton\";\n\nconst PythonInputLazy = lazy(() =>\n\timport(\"./python-input\").then((mod) => ({ default: mod.PythonInput })),\n);\n\ntype LazyPythonInputProps = ComponentProps<typeof PythonInputLazy>;\n\nexport function LazyPythonInput({ className, ...props }: LazyPythonInputProps) {\n\treturn (\n\t\t<Suspense\n\t\t\tfallback={<Skeleton className={`min-h-[200px] ${className ?? \"\"}`} />}\n\t\t>\n\t\t\t<PythonInputLazy className={className} {...props} />\n\t\t</Suspense>\n\t);\n}\n","import { useMemo } from \"react\";\nimport { LazyPythonInput as PythonInput } from \"@/components/ui/python-input-lazy\";\n\ntype PythonBlockSnippetProps = {\n\tcodeExample: string;\n\tname: string | undefined | null;\n};\nexport function PythonBlockSnippet({\n\tcodeExample,\n\tname,\n}: PythonBlockSnippetProps) {\n\tconst snippet = useMemo(() => {\n\t\tconst [, genericSnippet = \"\"] =\n\t\t\tcodeExample.match(/```python([\\S\\s]*?)```/) ?? [];\n\t\tconst customSnippet = genericSnippet.replace(\n\t\t\t\"BLOCK_NAME\",\n\t\t\tname ?? \"block-name\",\n\t\t);\n\t\treturn customSnippet.trim();\n\t}, [codeExample, name]);\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<PythonInput\n\t\t\t\tclassName=\"p-2\"\n\t\t\t\tvalue={snippet}\n\t\t\t\tdisabled\n\t\t\t\tcopy\n\t\t\t\thideLineNumbers\n\t\t\t/>\n\t\t</div>\n\t);\n}\n"],"file":"python-example-snippet-DPumgTpL.js"}
1
+ {"version":3,"mappings":";0GAIA,MAAMA,EAAkBC,OAAK,IAAAC,EAAA,IAC5B,OAAO,4BAAgB,0CAAE,KAAMC,IAAS,CAAE,QAASA,EAAI,aAAc,CACtE,EAIO,SAASC,EAAgB,CAAE,UAAAC,EAAW,GAAGC,GAA+B,CAC9E,OACCC,MAACC,WAAA,CACA,SAAUD,MAACE,EAAA,CAAS,UAAW,iBAAiBJ,GAAa,EAAE,GAAI,EAEnE,SAAAE,MAACP,EAAA,CAAgB,UAAAK,EAAuB,GAAGC,CAAA,CAAO,GAGrD,CCXO,SAASI,EAAmB,CAClC,YAAAC,EACA,KAAAC,CACD,EAA4B,CAC3B,MAAMC,EAAUC,UAAQ,IAAM,CAC7B,KAAM,EAAGC,EAAiB,EAAE,EAC3BJ,EAAY,MAAM,wBAAwB,GAAK,GAKhD,OAJsBI,EAAe,QACpC,aACAH,GAAQ,cAEY,MACtB,EAAG,CAACD,EAAaC,CAAI,CAAC,EAEtB,OACCL,MAAC,OAAI,UAAU,sBACd,SAAAA,MAACS,EAAA,CACA,UAAU,MACV,MAAOH,EACP,SAAQ,GACR,KAAI,GACJ,gBAAe,KAEjB,CAEF","names":["PythonInputLazy","lazy","__vitePreload","mod","LazyPythonInput","className","props","jsx","Suspense","Skeleton","PythonBlockSnippet","codeExample","name","snippet","useMemo","genericSnippet","PythonInput"],"ignoreList":[],"sources":["../../src/components/ui/python-input-lazy.tsx","../../src/components/blocks/python-example-snippet.tsx"],"sourcesContent":["import type { ComponentProps } from \"react\";\nimport { lazy, Suspense } from \"react\";\nimport { Skeleton } from \"@/components/ui/skeleton\";\n\nconst PythonInputLazy = lazy(() =>\n\timport(\"./python-input\").then((mod) => ({ default: mod.PythonInput })),\n);\n\ntype LazyPythonInputProps = ComponentProps<typeof PythonInputLazy>;\n\nexport function LazyPythonInput({ className, ...props }: LazyPythonInputProps) {\n\treturn (\n\t\t<Suspense\n\t\t\tfallback={<Skeleton className={`min-h-[200px] ${className ?? \"\"}`} />}\n\t\t>\n\t\t\t<PythonInputLazy className={className} {...props} />\n\t\t</Suspense>\n\t);\n}\n","import { useMemo } from \"react\";\nimport { LazyPythonInput as PythonInput } from \"@/components/ui/python-input-lazy\";\n\ntype PythonBlockSnippetProps = {\n\tcodeExample: string;\n\tname: string | undefined | null;\n};\nexport function PythonBlockSnippet({\n\tcodeExample,\n\tname,\n}: PythonBlockSnippetProps) {\n\tconst snippet = useMemo(() => {\n\t\tconst [, genericSnippet = \"\"] =\n\t\t\tcodeExample.match(/```python([\\S\\s]*?)```/) ?? [];\n\t\tconst customSnippet = genericSnippet.replace(\n\t\t\t\"BLOCK_NAME\",\n\t\t\tname ?? \"block-name\",\n\t\t);\n\t\treturn customSnippet.trim();\n\t}, [codeExample, name]);\n\n\treturn (\n\t\t<div className=\"flex flex-col gap-4\">\n\t\t\t<PythonInput\n\t\t\t\tclassName=\"p-2\"\n\t\t\t\tvalue={snippet}\n\t\t\t\tdisabled\n\t\t\t\tcopy\n\t\t\t\thideLineNumbers\n\t\t\t/>\n\t\t</div>\n\t);\n}\n"],"file":"python-example-snippet-W9Z_3hjQ.js"}
@@ -1,2 +1,2 @@
1
- import{c as d,r as c,j as s}from"./vendor-tanstack-BK8oseNA.js";import{u as g,p as x,E as y}from"./vendor-codemirror-CXN7nd_v.js";import{aW as b,q as v,I as C,y as j}from"./index-Cd7pM9pk.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-CznP1SOq.js";import"./vendor-recharts-D4imLXNl.js";import"./vendor-forms-DxqqmhL5.js";import"./vendor-date-7GxEwcQM.js";const w=[x(),y.lineWrapping],E=d.forwardRef(({className:l,value:o,onChange:p,copy:u=!1,onBlur:N,disabled:r,hideLineNumbers:h=!1,...f},i)=>{const e=c.useRef(null);let n;r&&(n={lineNumbers:!h,highlightActiveLine:!1,foldGutter:!1,highlightActiveLineGutter:!1});const{setContainer:a}=g({container:e.current,extensions:w,value:o,onChange:p,indentWithTab:!1,editable:!r,basicSetup:n});c.useEffect(()=>{e.current&&a(e.current)},[a]);const m=t=>{j.success("Copied to clipboard"),navigator.clipboard.writeText(t)};return s.jsx("div",{className:b("rounded-md border shadow-xs overflow-hidden focus-within:outline-hidden focus-within:ring-1 focus-within:ring-ring relative",l),ref:t=>{e.current=t,typeof i=="function"?i(t):i&&(i.current=t)},...f,children:u&&o&&s.jsx(v,{onClick:()=>m(o),variant:"ghost",size:"icon",className:"absolute top-0 right-0 z-10","aria-label":"copy",children:s.jsx(C,{id:"Copy",className:"size-2"})})})});E.displayName="PythonInput";export{E as PythonInput};
2
- //# sourceMappingURL=python-input-DX4uV8MF.js.map
1
+ import{c as d,r as c,j as s}from"./vendor-tanstack-BK8oseNA.js";import{u as g,p as x,E as y}from"./vendor-codemirror-CXN7nd_v.js";import{aW as b,q as v,I as C,y as j}from"./index-Yzhlw6-Q.js";import"./vendor-react-Bce9NwRC.js";import"./vendor-radix-BZJHvSaq.js";import"./vendor-recharts-D4imLXNl.js";import"./vendor-forms-DxqqmhL5.js";import"./vendor-date-JS-ReHrg.js";const w=[x(),y.lineWrapping],E=d.forwardRef(({className:l,value:o,onChange:p,copy:u=!1,onBlur:N,disabled:r,hideLineNumbers:h=!1,...f},i)=>{const e=c.useRef(null);let n;r&&(n={lineNumbers:!h,highlightActiveLine:!1,foldGutter:!1,highlightActiveLineGutter:!1});const{setContainer:a}=g({container:e.current,extensions:w,value:o,onChange:p,indentWithTab:!1,editable:!r,basicSetup:n});c.useEffect(()=>{e.current&&a(e.current)},[a]);const m=t=>{j.success("Copied to clipboard"),navigator.clipboard.writeText(t)};return s.jsx("div",{className:b("rounded-md border shadow-xs overflow-hidden focus-within:outline-hidden focus-within:ring-1 focus-within:ring-ring relative",l),ref:t=>{e.current=t,typeof i=="function"?i(t):i&&(i.current=t)},...f,children:u&&o&&s.jsx(v,{onClick:()=>m(o),variant:"ghost",size:"icon",className:"absolute top-0 right-0 z-10","aria-label":"copy",children:s.jsx(C,{id:"Copy",className:"size-2"})})})});E.displayName="PythonInput";export{E as PythonInput};
2
+ //# sourceMappingURL=python-input-EKDBgTDE.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"python-input-DX4uV8MF.js","sources":["../../src/components/ui/python-input.tsx"],"sourcesContent":["import { python } from \"@codemirror/lang-python\";\nimport {\n\ttype BasicSetupOptions,\n\tEditorView,\n\tuseCodeMirror,\n} from \"@uiw/react-codemirror\";\nimport React, { useEffect, useRef } from \"react\";\nimport { toast } from \"sonner\";\nimport { cn } from \"@/utils\";\nimport { Button } from \"./button\";\nimport { Icon } from \"./icons\";\n\nconst extensions = [python(), EditorView.lineWrapping];\n\ntype PythonInputProps = React.ComponentProps<\"div\"> & {\n\tvalue?: string;\n\tonChange?: (value: string) => void;\n\tonBlur?: () => void;\n\tdisabled?: boolean;\n\tclassName?: string;\n\thideLineNumbers?: boolean;\n\tcopy?: boolean;\n};\n\nexport const PythonInput = React.forwardRef<HTMLDivElement, PythonInputProps>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\tcopy = false,\n\t\t\tonBlur,\n\t\t\tdisabled,\n\t\t\thideLineNumbers = false,\n\t\t\t...props\n\t\t},\n\t\tforwardedRef,\n\t) => {\n\t\tconst editor = useRef<HTMLDivElement | null>(null);\n\t\t// Setting `basicSetup` messes up the tab order. We only change the basic setup\n\t\t// if the input is disabled, so we leave it undefined to maintain the tab order.\n\t\tlet basicSetup: BasicSetupOptions | undefined;\n\t\tif (disabled) {\n\t\t\tbasicSetup = {\n\t\t\t\tlineNumbers: !hideLineNumbers,\n\t\t\t\thighlightActiveLine: false,\n\t\t\t\tfoldGutter: false,\n\t\t\t\thighlightActiveLineGutter: false,\n\t\t\t};\n\t\t}\n\t\tconst { setContainer } = useCodeMirror({\n\t\t\tcontainer: editor.current,\n\t\t\textensions,\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\tonBlur,\n\t\t\tindentWithTab: false,\n\t\t\teditable: !disabled,\n\t\t\tbasicSetup,\n\t\t});\n\n\t\tuseEffect(() => {\n\t\t\tif (editor.current) {\n\t\t\t\tsetContainer(editor.current);\n\t\t\t}\n\t\t}, [setContainer]);\n\n\t\tconst handleCopy = (_value: string) => {\n\t\t\ttoast.success(\"Copied to clipboard\");\n\t\t\tvoid navigator.clipboard.writeText(_value);\n\t\t};\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"rounded-md border shadow-xs overflow-hidden focus-within:outline-hidden focus-within:ring-1 focus-within:ring-ring relative\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tref={(node) => {\n\t\t\t\t\teditor.current = node;\n\t\t\t\t\tif (typeof forwardedRef === \"function\") {\n\t\t\t\t\t\tforwardedRef(node);\n\t\t\t\t\t} else if (forwardedRef) {\n\t\t\t\t\t\tforwardedRef.current = node;\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{copy && value && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tonClick={() => handleCopy(value)}\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\tclassName=\"absolute top-0 right-0 z-10\"\n\t\t\t\t\t\taria-label=\"copy\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon id=\"Copy\" className=\"size-2\" />\n\t\t\t\t\t</Button>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t},\n);\n\nPythonInput.displayName = \"PythonInput\";\n"],"names":["extensions","python","EditorView","PythonInput","React","className","value","onChange","copy","onBlur","disabled","hideLineNumbers","props","forwardedRef","editor","useRef","basicSetup","setContainer","useCodeMirror","useEffect","handleCopy","_value","toast","jsx","cn","node","Button","Icon"],"mappings":"iXAYA,MAAMA,EAAa,CAACC,IAAUC,EAAW,YAAY,EAYxCC,EAAcC,EAAM,WAChC,CACC,CACC,UAAAC,EACA,MAAAC,EACA,SAAAC,EACA,KAAAC,EAAO,GACP,OAAAC,EACA,SAAAC,EACA,gBAAAC,EAAkB,GAClB,GAAGC,CAAA,EAEJC,IACI,CACJ,MAAMC,EAASC,EAAAA,OAA8B,IAAI,EAGjD,IAAIC,EACAN,IACHM,EAAa,CACZ,YAAa,CAACL,EACd,oBAAqB,GACrB,WAAY,GACZ,0BAA2B,EAAA,GAG7B,KAAM,CAAE,aAAAM,CAAA,EAAiBC,EAAc,CACtC,UAAWJ,EAAO,QAClB,WAAAd,EACA,MAAAM,EACA,SAAAC,EAEA,cAAe,GACf,SAAU,CAACG,EACX,WAAAM,CAAA,CACA,EAEDG,EAAAA,UAAU,IAAM,CACXL,EAAO,SACVG,EAAaH,EAAO,OAAO,CAE7B,EAAG,CAACG,CAAY,CAAC,EAEjB,MAAMG,EAAcC,GAAmB,CACtCC,EAAM,QAAQ,qBAAqB,EAC9B,UAAU,UAAU,UAAUD,CAAM,CAC1C,EAEA,OACCE,EAAAA,IAAC,MAAA,CACA,UAAWC,EACV,8HACAnB,CAAA,EAED,IAAMoB,GAAS,CACdX,EAAO,QAAUW,EACb,OAAOZ,GAAiB,WAC3BA,EAAaY,CAAI,EACPZ,IACVA,EAAa,QAAUY,EAEzB,EACC,GAAGb,EAEH,YAAQN,GACRiB,EAAAA,IAACG,EAAA,CACA,QAAS,IAAMN,EAAWd,CAAK,EAC/B,QAAQ,QACR,KAAK,OACL,UAAU,8BACV,aAAW,OAEX,SAAAiB,EAAAA,IAACI,EAAA,CAAK,GAAG,OAAO,UAAU,QAAA,CAAS,CAAA,CAAA,CACpC,CAAA,CAIJ,CACD,EAEAxB,EAAY,YAAc"}
1
+ {"version":3,"file":"python-input-EKDBgTDE.js","sources":["../../src/components/ui/python-input.tsx"],"sourcesContent":["import { python } from \"@codemirror/lang-python\";\nimport {\n\ttype BasicSetupOptions,\n\tEditorView,\n\tuseCodeMirror,\n} from \"@uiw/react-codemirror\";\nimport React, { useEffect, useRef } from \"react\";\nimport { toast } from \"sonner\";\nimport { cn } from \"@/utils\";\nimport { Button } from \"./button\";\nimport { Icon } from \"./icons\";\n\nconst extensions = [python(), EditorView.lineWrapping];\n\ntype PythonInputProps = React.ComponentProps<\"div\"> & {\n\tvalue?: string;\n\tonChange?: (value: string) => void;\n\tonBlur?: () => void;\n\tdisabled?: boolean;\n\tclassName?: string;\n\thideLineNumbers?: boolean;\n\tcopy?: boolean;\n};\n\nexport const PythonInput = React.forwardRef<HTMLDivElement, PythonInputProps>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\tcopy = false,\n\t\t\tonBlur,\n\t\t\tdisabled,\n\t\t\thideLineNumbers = false,\n\t\t\t...props\n\t\t},\n\t\tforwardedRef,\n\t) => {\n\t\tconst editor = useRef<HTMLDivElement | null>(null);\n\t\t// Setting `basicSetup` messes up the tab order. We only change the basic setup\n\t\t// if the input is disabled, so we leave it undefined to maintain the tab order.\n\t\tlet basicSetup: BasicSetupOptions | undefined;\n\t\tif (disabled) {\n\t\t\tbasicSetup = {\n\t\t\t\tlineNumbers: !hideLineNumbers,\n\t\t\t\thighlightActiveLine: false,\n\t\t\t\tfoldGutter: false,\n\t\t\t\thighlightActiveLineGutter: false,\n\t\t\t};\n\t\t}\n\t\tconst { setContainer } = useCodeMirror({\n\t\t\tcontainer: editor.current,\n\t\t\textensions,\n\t\t\tvalue,\n\t\t\tonChange,\n\t\t\tonBlur,\n\t\t\tindentWithTab: false,\n\t\t\teditable: !disabled,\n\t\t\tbasicSetup,\n\t\t});\n\n\t\tuseEffect(() => {\n\t\t\tif (editor.current) {\n\t\t\t\tsetContainer(editor.current);\n\t\t\t}\n\t\t}, [setContainer]);\n\n\t\tconst handleCopy = (_value: string) => {\n\t\t\ttoast.success(\"Copied to clipboard\");\n\t\t\tvoid navigator.clipboard.writeText(_value);\n\t\t};\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={cn(\n\t\t\t\t\t\"rounded-md border shadow-xs overflow-hidden focus-within:outline-hidden focus-within:ring-1 focus-within:ring-ring relative\",\n\t\t\t\t\tclassName,\n\t\t\t\t)}\n\t\t\t\tref={(node) => {\n\t\t\t\t\teditor.current = node;\n\t\t\t\t\tif (typeof forwardedRef === \"function\") {\n\t\t\t\t\t\tforwardedRef(node);\n\t\t\t\t\t} else if (forwardedRef) {\n\t\t\t\t\t\tforwardedRef.current = node;\n\t\t\t\t\t}\n\t\t\t\t}}\n\t\t\t\t{...props}\n\t\t\t>\n\t\t\t\t{copy && value && (\n\t\t\t\t\t<Button\n\t\t\t\t\t\tonClick={() => handleCopy(value)}\n\t\t\t\t\t\tvariant=\"ghost\"\n\t\t\t\t\t\tsize=\"icon\"\n\t\t\t\t\t\tclassName=\"absolute top-0 right-0 z-10\"\n\t\t\t\t\t\taria-label=\"copy\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<Icon id=\"Copy\" className=\"size-2\" />\n\t\t\t\t\t</Button>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t);\n\t},\n);\n\nPythonInput.displayName = \"PythonInput\";\n"],"names":["extensions","python","EditorView","PythonInput","React","className","value","onChange","copy","onBlur","disabled","hideLineNumbers","props","forwardedRef","editor","useRef","basicSetup","setContainer","useCodeMirror","useEffect","handleCopy","_value","toast","jsx","cn","node","Button","Icon"],"mappings":"iXAYA,MAAMA,EAAa,CAACC,IAAUC,EAAW,YAAY,EAYxCC,EAAcC,EAAM,WAChC,CACC,CACC,UAAAC,EACA,MAAAC,EACA,SAAAC,EACA,KAAAC,EAAO,GACP,OAAAC,EACA,SAAAC,EACA,gBAAAC,EAAkB,GAClB,GAAGC,CAAA,EAEJC,IACI,CACJ,MAAMC,EAASC,EAAAA,OAA8B,IAAI,EAGjD,IAAIC,EACAN,IACHM,EAAa,CACZ,YAAa,CAACL,EACd,oBAAqB,GACrB,WAAY,GACZ,0BAA2B,EAAA,GAG7B,KAAM,CAAE,aAAAM,CAAA,EAAiBC,EAAc,CACtC,UAAWJ,EAAO,QAClB,WAAAd,EACA,MAAAM,EACA,SAAAC,EAEA,cAAe,GACf,SAAU,CAACG,EACX,WAAAM,CAAA,CACA,EAEDG,EAAAA,UAAU,IAAM,CACXL,EAAO,SACVG,EAAaH,EAAO,OAAO,CAE7B,EAAG,CAACG,CAAY,CAAC,EAEjB,MAAMG,EAAcC,GAAmB,CACtCC,EAAM,QAAQ,qBAAqB,EAC9B,UAAU,UAAU,UAAUD,CAAM,CAC1C,EAEA,OACCE,EAAAA,IAAC,MAAA,CACA,UAAWC,EACV,8HACAnB,CAAA,EAED,IAAMoB,GAAS,CACdX,EAAO,QAAUW,EACb,OAAOZ,GAAiB,WAC3BA,EAAaY,CAAI,EACPZ,IACVA,EAAa,QAAUY,EAEzB,EACC,GAAGb,EAEH,YAAQN,GACRiB,EAAAA,IAACG,EAAA,CACA,QAAS,IAAMN,EAAWd,CAAK,EAC/B,QAAQ,QACR,KAAK,OACL,UAAU,8BACV,aAAW,OAEX,SAAAiB,EAAAA,IAACI,EAAA,CAAK,GAAG,OAAO,UAAU,QAAA,CAAS,CAAA,CAAA,CACpC,CAAA,CAIJ,CACD,EAEAxB,EAAY,YAAc"}
@@ -1,2 +1,2 @@
1
- import{r as o,j as r}from"./vendor-tanstack-BK8oseNA.js";import{aj as i,ak as t,al as l}from"./vendor-radix-CznP1SOq.js";import{aW as c,cV as n}from"./index-Cd7pM9pk.js";const d=o.forwardRef(({className:a,...s},e)=>r.jsx(i,{className:c("grid gap-2",a),...s,ref:e}));d.displayName=i.displayName;const m=o.forwardRef(({className:a,...s},e)=>r.jsx(t,{ref:e,className:c("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",a),...s,children:r.jsx(l,{className:"flex items-center justify-center",children:r.jsx(n,{className:"h-2.5 w-2.5 fill-current text-current"})})}));m.displayName=t.displayName;export{d as R,m as a};
2
- //# sourceMappingURL=radio-group-DeNK-Ob0.js.map
1
+ import{r as o,j as r}from"./vendor-tanstack-BK8oseNA.js";import{ak as i,al as t,am as l}from"./vendor-radix-BZJHvSaq.js";import{aW as c,cV as n}from"./index-Yzhlw6-Q.js";const d=o.forwardRef(({className:a,...s},e)=>r.jsx(i,{className:c("grid gap-2",a),...s,ref:e}));d.displayName=i.displayName;const m=o.forwardRef(({className:a,...s},e)=>r.jsx(t,{ref:e,className:c("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",a),...s,children:r.jsx(l,{className:"flex items-center justify-center",children:r.jsx(n,{className:"h-2.5 w-2.5 fill-current text-current"})})}));m.displayName=t.displayName;export{d as R,m as a};
2
+ //# sourceMappingURL=radio-group-BMeznoY8.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"radio-group-DeNK-Ob0.js","sources":["../../src/components/ui/radio-group.tsx"],"sourcesContent":["import * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\nimport { Circle } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\nconst RadioGroup = React.forwardRef<\n\tReact.ElementRef<typeof RadioGroupPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => {\n\treturn (\n\t\t<RadioGroupPrimitive.Root\n\t\t\tclassName={cn(\"grid gap-2\", className)}\n\t\t\t{...props}\n\t\t\tref={ref}\n\t\t/>\n\t);\n});\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName;\n\nconst RadioGroupItem = React.forwardRef<\n\tReact.ElementRef<typeof RadioGroupPrimitive.Item>,\n\tReact.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\n>(({ className, ...props }, ref) => {\n\treturn (\n\t\t<RadioGroupPrimitive.Item\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n\t\t\t\t<Circle className=\"h-2.5 w-2.5 fill-current text-current\" />\n\t\t\t</RadioGroupPrimitive.Indicator>\n\t\t</RadioGroupPrimitive.Item>\n\t);\n});\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;\n\nexport { RadioGroup, RadioGroupItem };\n"],"names":["RadioGroup","React.forwardRef","className","props","ref","jsx","RadioGroupPrimitive.Root","cn","RadioGroupItem","RadioGroupPrimitive.Item","RadioGroupPrimitive.Indicator","Circle"],"mappings":"0KAMA,MAAMA,EAAaC,EAAAA,WAGjB,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAA,EAASC,IAE1BC,EAAAA,IAACC,EAAA,CACA,UAAWC,EAAG,aAAcL,CAAS,EACpC,GAAGC,EACJ,IAAAC,CAAA,CAAA,CAGF,EACDJ,EAAW,YAAcM,EAAyB,YAElD,MAAME,EAAiBP,EAAAA,WAGrB,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAA,EAASC,IAE1BC,EAAAA,IAACI,EAAA,CACA,IAAAL,EACA,UAAWG,EACV,2OACAL,CAAA,EAEA,GAAGC,EAEJ,SAAAE,EAAAA,IAACK,EAAA,CAA8B,UAAU,mCACxC,SAAAL,EAAAA,IAACM,EAAA,CAAO,UAAU,uCAAA,CAAwC,CAAA,CAC3D,CAAA,CAAA,CAGF,EACDH,EAAe,YAAcC,EAAyB"}
1
+ {"version":3,"file":"radio-group-BMeznoY8.js","sources":["../../src/components/ui/radio-group.tsx"],"sourcesContent":["import * as RadioGroupPrimitive from \"@radix-ui/react-radio-group\";\nimport { Circle } from \"lucide-react\";\nimport * as React from \"react\";\n\nimport { cn } from \"@/utils\";\n\nconst RadioGroup = React.forwardRef<\n\tReact.ElementRef<typeof RadioGroupPrimitive.Root>,\n\tReact.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Root>\n>(({ className, ...props }, ref) => {\n\treturn (\n\t\t<RadioGroupPrimitive.Root\n\t\t\tclassName={cn(\"grid gap-2\", className)}\n\t\t\t{...props}\n\t\t\tref={ref}\n\t\t/>\n\t);\n});\nRadioGroup.displayName = RadioGroupPrimitive.Root.displayName;\n\nconst RadioGroupItem = React.forwardRef<\n\tReact.ElementRef<typeof RadioGroupPrimitive.Item>,\n\tReact.ComponentPropsWithoutRef<typeof RadioGroupPrimitive.Item>\n>(({ className, ...props }, ref) => {\n\treturn (\n\t\t<RadioGroupPrimitive.Item\n\t\t\tref={ref}\n\t\t\tclassName={cn(\n\t\t\t\t\"aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\t{...props}\n\t\t>\n\t\t\t<RadioGroupPrimitive.Indicator className=\"flex items-center justify-center\">\n\t\t\t\t<Circle className=\"h-2.5 w-2.5 fill-current text-current\" />\n\t\t\t</RadioGroupPrimitive.Indicator>\n\t\t</RadioGroupPrimitive.Item>\n\t);\n});\nRadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName;\n\nexport { RadioGroup, RadioGroupItem };\n"],"names":["RadioGroup","React.forwardRef","className","props","ref","jsx","RadioGroupPrimitive.Root","cn","RadioGroupItem","RadioGroupPrimitive.Item","RadioGroupPrimitive.Indicator","Circle"],"mappings":"0KAMA,MAAMA,EAAaC,EAAAA,WAGjB,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAA,EAASC,IAE1BC,EAAAA,IAACC,EAAA,CACA,UAAWC,EAAG,aAAcL,CAAS,EACpC,GAAGC,EACJ,IAAAC,CAAA,CAAA,CAGF,EACDJ,EAAW,YAAcM,EAAyB,YAElD,MAAME,EAAiBP,EAAAA,WAGrB,CAAC,CAAE,UAAAC,EAAW,GAAGC,CAAA,EAASC,IAE1BC,EAAAA,IAACI,EAAA,CACA,IAAAL,EACA,UAAWG,EACV,2OACAL,CAAA,EAEA,GAAGC,EAEJ,SAAAE,EAAAA,IAACK,EAAA,CAA8B,UAAU,mCACxC,SAAAL,EAAAA,IAACM,EAAA,CAAO,UAAU,uCAAA,CAAwC,CAAA,CAC3D,CAAA,CAAA,CAGF,EACDH,EAAe,YAAcC,EAAyB"}
@@ -1,2 +1,2 @@
1
- import{r as s,j as e}from"./vendor-tanstack-BK8oseNA.js";import{C as f,o as R,cd as h,q as g,ce as j,aW as p}from"./index-Cd7pM9pk.js";const N=5e3,v=3e4;function u(a){const t=N*2**a;return Math.min(t,v)}function E({error:a,onRetry:t}){const r=s.useRef(0),[m,l]=s.useState(u(0)/1e3),[c,n]=s.useState(!1),d=s.useCallback(()=>{n(!0),t(),r.current+=1;const i=u(r.current);l(i/1e3),setTimeout(()=>n(!1),500)},[t]),x=s.useCallback(()=>{n(!0),t(),r.current=0,l(u(0)/1e3),setTimeout(()=>n(!1),500)},[t]);return s.useEffect(()=>{const i=setInterval(()=>{l(o=>o<=1?(d(),o):o-1)},1e3);return()=>clearInterval(i)},[d]),e.jsx(f,{className:"mx-auto max-w-md",children:e.jsxs(R,{className:"flex flex-col items-center gap-4 pt-6 text-center",children:[e.jsx("div",{className:"rounded-full bg-destructive/10 p-3",children:e.jsx(h,{className:"size-8 text-destructive"})}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("h2",{className:"text-lg font-semibold",children:a.message}),a.details&&e.jsx("p",{className:"text-sm text-muted-foreground",children:a.details})]}),e.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.jsxs(g,{onClick:x,disabled:c,variant:"outline",className:"gap-2",children:[e.jsx(j,{className:p("size-4",c&&"animate-spin")}),c?"Retrying...":"Retry"]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Retrying in ",m,"s"]})]})]})})}export{E as R};
2
- //# sourceMappingURL=route-error-state-C9CbByMx.js.map
1
+ import{r as s,j as e}from"./vendor-tanstack-BK8oseNA.js";import{C as f,o as R,cd as h,q as g,ce as j,aW as p}from"./index-Yzhlw6-Q.js";const N=5e3,v=3e4;function u(a){const t=N*2**a;return Math.min(t,v)}function E({error:a,onRetry:t}){const r=s.useRef(0),[m,l]=s.useState(u(0)/1e3),[c,n]=s.useState(!1),d=s.useCallback(()=>{n(!0),t(),r.current+=1;const i=u(r.current);l(i/1e3),setTimeout(()=>n(!1),500)},[t]),x=s.useCallback(()=>{n(!0),t(),r.current=0,l(u(0)/1e3),setTimeout(()=>n(!1),500)},[t]);return s.useEffect(()=>{const i=setInterval(()=>{l(o=>o<=1?(d(),o):o-1)},1e3);return()=>clearInterval(i)},[d]),e.jsx(f,{className:"mx-auto max-w-md",children:e.jsxs(R,{className:"flex flex-col items-center gap-4 pt-6 text-center",children:[e.jsx("div",{className:"rounded-full bg-destructive/10 p-3",children:e.jsx(h,{className:"size-8 text-destructive"})}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("h2",{className:"text-lg font-semibold",children:a.message}),a.details&&e.jsx("p",{className:"text-sm text-muted-foreground",children:a.details})]}),e.jsxs("div",{className:"flex flex-col items-center gap-2",children:[e.jsxs(g,{onClick:x,disabled:c,variant:"outline",className:"gap-2",children:[e.jsx(j,{className:p("size-4",c&&"animate-spin")}),c?"Retrying...":"Retry"]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Retrying in ",m,"s"]})]})]})})}export{E as R};
2
+ //# sourceMappingURL=route-error-state-BGOi4dn-.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"route-error-state-C9CbByMx.js","sources":["../../src/components/ui/route-error-state.tsx"],"sourcesContent":["import { AlertCircle, RefreshCw } from \"lucide-react\";\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nimport type { ServerError } from \"@/api/error-utils\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardContent } from \"@/components/ui/card\";\nimport { cn } from \"@/utils\";\n\nconst BASE_RETRY_INTERVAL_MS = 5000;\nconst MAX_RETRY_INTERVAL_MS = 30000;\n\nfunction getRetryInterval(attempt: number): number {\n\tconst interval = BASE_RETRY_INTERVAL_MS * 2 ** attempt;\n\treturn Math.min(interval, MAX_RETRY_INTERVAL_MS);\n}\n\ntype RouteErrorStateProps = {\n\terror: ServerError;\n\tonRetry: () => void;\n};\n\nexport function RouteErrorState({ error, onRetry }: RouteErrorStateProps) {\n\tconst retryAttemptRef = useRef(0);\n\tconst [secondsUntilRetry, setSecondsUntilRetry] = useState(\n\t\tgetRetryInterval(0) / 1000,\n\t);\n\tconst [isRetrying, setIsRetrying] = useState(false);\n\n\tconst handleAutoRetry = useCallback(() => {\n\t\tsetIsRetrying(true);\n\t\tonRetry();\n\t\tretryAttemptRef.current += 1;\n\t\tconst nextInterval = getRetryInterval(retryAttemptRef.current);\n\t\tsetSecondsUntilRetry(nextInterval / 1000);\n\t\tsetTimeout(() => setIsRetrying(false), 500);\n\t}, [onRetry]);\n\n\tconst handleManualRetry = useCallback(() => {\n\t\tsetIsRetrying(true);\n\t\tonRetry();\n\t\tretryAttemptRef.current = 0;\n\t\tsetSecondsUntilRetry(getRetryInterval(0) / 1000);\n\t\tsetTimeout(() => setIsRetrying(false), 500);\n\t}, [onRetry]);\n\n\tuseEffect(() => {\n\t\tconst interval = setInterval(() => {\n\t\t\tsetSecondsUntilRetry((prev) => {\n\t\t\t\tif (prev <= 1) {\n\t\t\t\t\thandleAutoRetry();\n\t\t\t\t\treturn prev;\n\t\t\t\t}\n\t\t\t\treturn prev - 1;\n\t\t\t});\n\t\t}, 1000);\n\n\t\treturn () => clearInterval(interval);\n\t}, [handleAutoRetry]);\n\n\treturn (\n\t\t<Card className=\"mx-auto max-w-md\">\n\t\t\t<CardContent className=\"flex flex-col items-center gap-4 pt-6 text-center\">\n\t\t\t\t<div className=\"rounded-full bg-destructive/10 p-3\">\n\t\t\t\t\t<AlertCircle className=\"size-8 text-destructive\" />\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"space-y-1\">\n\t\t\t\t\t<h2 className=\"text-lg font-semibold\">{error.message}</h2>\n\t\t\t\t\t{error.details && (\n\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">{error.details}</p>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"flex flex-col items-center gap-2\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tonClick={handleManualRetry}\n\t\t\t\t\t\tdisabled={isRetrying}\n\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\tclassName=\"gap-2\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<RefreshCw className={cn(\"size-4\", isRetrying && \"animate-spin\")} />\n\t\t\t\t\t\t{isRetrying ? \"Retrying...\" : \"Retry\"}\n\t\t\t\t\t</Button>\n\n\t\t\t\t\t<p className=\"text-xs text-muted-foreground\">\n\t\t\t\t\t\tRetrying in {secondsUntilRetry}s\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n}\n"],"names":["BASE_RETRY_INTERVAL_MS","MAX_RETRY_INTERVAL_MS","getRetryInterval","attempt","interval","RouteErrorState","error","onRetry","retryAttemptRef","useRef","secondsUntilRetry","setSecondsUntilRetry","useState","isRetrying","setIsRetrying","handleAutoRetry","useCallback","nextInterval","handleManualRetry","useEffect","prev","Card","jsxs","CardContent","jsx","AlertCircle","Button","RefreshCw","cn"],"mappings":"uIAOA,MAAMA,EAAyB,IACzBC,EAAwB,IAE9B,SAASC,EAAiBC,EAAyB,CAClD,MAAMC,EAAWJ,EAAyB,GAAKG,EAC/C,OAAO,KAAK,IAAIC,EAAUH,CAAqB,CAChD,CAOO,SAASI,EAAgB,CAAE,MAAAC,EAAO,QAAAC,GAAiC,CACzE,MAAMC,EAAkBC,EAAAA,OAAO,CA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,QAASR,EACT,SAAUL,EACV,QAAQ,UACR,UAAU,QAEV,SAAA,CAAAW,MAACG,GAAU,UAAWC,EAAG,SAAUf,GAAc,cAAc,EAAG,EACjEA,EAAa,cAAgB,OAAA,CAAA,CAAA,EAG/BS,EAAAA,KAAC,IAAA,CAAE,UAAU,gCAAgC,SAAA,CAAA,eAC/BZ,EAAkB,GAAA,CAAA,CAChC,CAAA,CAAA,CACD,CAAA,CAAA,CACD,CAAA,CACD,CAEF"}
1
+ {"version":3,"file":"route-error-state-BGOi4dn-.js","sources":["../../src/components/ui/route-error-state.tsx"],"sourcesContent":["import { AlertCircle, RefreshCw } from \"lucide-react\";\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nimport type { ServerError } from \"@/api/error-utils\";\nimport { Button } from \"@/components/ui/button\";\nimport { Card, CardContent } from \"@/components/ui/card\";\nimport { cn } from \"@/utils\";\n\nconst BASE_RETRY_INTERVAL_MS = 5000;\nconst MAX_RETRY_INTERVAL_MS = 30000;\n\nfunction getRetryInterval(attempt: number): number {\n\tconst interval = BASE_RETRY_INTERVAL_MS * 2 ** attempt;\n\treturn Math.min(interval, MAX_RETRY_INTERVAL_MS);\n}\n\ntype RouteErrorStateProps = {\n\terror: ServerError;\n\tonRetry: () => void;\n};\n\nexport function RouteErrorState({ error, onRetry }: RouteErrorStateProps) {\n\tconst retryAttemptRef = useRef(0);\n\tconst [secondsUntilRetry, setSecondsUntilRetry] = useState(\n\t\tgetRetryInterval(0) / 1000,\n\t);\n\tconst [isRetrying, setIsRetrying] = useState(false);\n\n\tconst handleAutoRetry = useCallback(() => {\n\t\tsetIsRetrying(true);\n\t\tonRetry();\n\t\tretryAttemptRef.current += 1;\n\t\tconst nextInterval = getRetryInterval(retryAttemptRef.current);\n\t\tsetSecondsUntilRetry(nextInterval / 1000);\n\t\tsetTimeout(() => setIsRetrying(false), 500);\n\t}, [onRetry]);\n\n\tconst handleManualRetry = useCallback(() => {\n\t\tsetIsRetrying(true);\n\t\tonRetry();\n\t\tretryAttemptRef.current = 0;\n\t\tsetSecondsUntilRetry(getRetryInterval(0) / 1000);\n\t\tsetTimeout(() => setIsRetrying(false), 500);\n\t}, [onRetry]);\n\n\tuseEffect(() => {\n\t\tconst interval = setInterval(() => {\n\t\t\tsetSecondsUntilRetry((prev) => {\n\t\t\t\tif (prev <= 1) {\n\t\t\t\t\thandleAutoRetry();\n\t\t\t\t\treturn prev;\n\t\t\t\t}\n\t\t\t\treturn prev - 1;\n\t\t\t});\n\t\t}, 1000);\n\n\t\treturn () => clearInterval(interval);\n\t}, [handleAutoRetry]);\n\n\treturn (\n\t\t<Card className=\"mx-auto max-w-md\">\n\t\t\t<CardContent className=\"flex flex-col items-center gap-4 pt-6 text-center\">\n\t\t\t\t<div className=\"rounded-full bg-destructive/10 p-3\">\n\t\t\t\t\t<AlertCircle className=\"size-8 text-destructive\" />\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"space-y-1\">\n\t\t\t\t\t<h2 className=\"text-lg font-semibold\">{error.message}</h2>\n\t\t\t\t\t{error.details && (\n\t\t\t\t\t\t<p className=\"text-sm text-muted-foreground\">{error.details}</p>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\n\t\t\t\t<div className=\"flex flex-col items-center gap-2\">\n\t\t\t\t\t<Button\n\t\t\t\t\t\tonClick={handleManualRetry}\n\t\t\t\t\t\tdisabled={isRetrying}\n\t\t\t\t\t\tvariant=\"outline\"\n\t\t\t\t\t\tclassName=\"gap-2\"\n\t\t\t\t\t>\n\t\t\t\t\t\t<RefreshCw className={cn(\"size-4\", isRetrying && \"animate-spin\")} />\n\t\t\t\t\t\t{isRetrying ? \"Retrying...\" : \"Retry\"}\n\t\t\t\t\t</Button>\n\n\t\t\t\t\t<p className=\"text-xs text-muted-foreground\">\n\t\t\t\t\t\tRetrying in {secondsUntilRetry}s\n\t\t\t\t\t</p>\n\t\t\t\t</div>\n\t\t\t</CardContent>\n\t\t</Card>\n\t);\n}\n"],"names":["BASE_RETRY_INTERVAL_MS","MAX_RETRY_INTERVAL_MS","getRetryInterval","attempt","interval","RouteErrorState","error","onRetry","retryAttemptRef","useRef","secondsUntilRetry","setSecondsUntilRetry","useState","isRetrying","setIsRetrying","handleAutoRetry","useCallback","nextInterval","handleManualRetry","useEffect","prev","Card","jsxs","CardContent","jsx","AlertCircle","Button","RefreshCw","cn"],"mappings":"uIAOA,MAAMA,EAAyB,IACzBC,EAAwB,IAE9B,SAASC,EAAiBC,EAAyB,CAClD,MAAMC,EAAWJ,EAAyB,GAAKG,EAC/C,OAAO,KAAK,IAAIC,EAAUH,CAAqB,CAChD,CAOO,SAASI,EAAgB,CAAE,MAAAC,EAAO,QAAAC,GAAiC,CACzE,MAAMC,EAAkBC,EAAAA,OAAO,CAAC,EAC1B,CAACC,EAAmBC,CAAoB,EAAIC,EAAAA,SACjDV,EAAiB,CAAC,EAAI,GAAA,EAEjB,CAACW,EAAYC,CAAa,EAAIF,EAAAA,SAAS,EAAK,EAE5CG,EAAkBC,EAAAA,YAAY,IAAM,CACzCF,EAAc,EAAI,EAClBP,EAAA,EACAC,EAAgB,SAAW,EAC3B,MAAMS,EAAef,EAAiBM,EAAgB,OAAO,EAC7DG,EAAqBM,EAAe,GAAI,EACxC,WAAW,IAAMH,EAAc,EAAK,EAAG,GAAG,CAC3C,EAAG,CAACP,CAAO,CAAC,EAENW,EAAoBF,EAAAA,YAAY,IAAM,CAC3CF,EAAc,EAAI,EAClBP,EAAA,EACAC,EAAgB,QAAU,EAC1BG,EAAqBT,EAAiB,CAAC,EAAI,GAAI,EAC/C,WAAW,IAAMY,EAAc,EAAK,EAAG,GAAG,CAC3C,EAAG,CAACP,CAAO,CAAC,EAEZY,OAAAA,EAAAA,UAAU,IAAM,CACf,MAAMf,EAAW,YAAY,IAAM,CAClCO,EAAsBS,GACjBA,GAAQ,GACXL,EAAA,EACOK,GAEDA,EAAO,CACd,CACF,EAAG,GAAI,EAEP,MAAO,IAAM,cAAchB,CAAQ,CACpC,EAAG,CAACW,C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