@saluzi/saluzi-edu 0.2.59 → 0.2.60

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 (147) hide show
  1. package/dist/cli.js +225 -119
  2. package/dist/guide/guide-data.json +5 -1
  3. package/dist/parade/web/cube.js +370 -79
  4. package/dist/parade/web/index.html +172 -41
  5. package/dist/rcs-web/assets/{AdminPanel-CbcZ7Vnr.js → AdminPanel-BMgxq2d0.js} +1 -1
  6. package/dist/rcs-web/assets/Claim-DRJ_CmK0.js +1 -0
  7. package/{packages/remote-control-server/web/dist/assets/Dashboard-BZGcSCFY.js → dist/rcs-web/assets/Dashboard-CablTsf3.js} +2 -2
  8. package/{packages/remote-control-server/web/dist/assets/Join-B_e3BKa3.js → dist/rcs-web/assets/Join-a80j0Uiw.js} +1 -1
  9. package/dist/rcs-web/assets/{Login-u6CGGkoD.js → Login-DclVxA4Q.js} +1 -1
  10. package/dist/rcs-web/assets/{Register-C4Fk0ibc.js → Register-DizfWHKb.js} +1 -1
  11. package/dist/rcs-web/assets/{SessionDetail-Bd1YgozL.js → SessionDetail-CJoBz0DU.js} +14 -14
  12. package/dist/rcs-web/assets/{SessionVisibilityBadge-BHKxlh8U.js → SessionVisibilityBadge-Bp4kZdZ4.js} +1 -1
  13. package/dist/rcs-web/assets/{Setup-DReCE0zx.js → Setup-DIw3Qc5x.js} +1 -1
  14. package/dist/rcs-web/assets/{ShareLanding-qE1U0WKZ.js → ShareLanding-CmyujISc.js} +1 -1
  15. package/dist/rcs-web/assets/{TeamCreate-BgwgZP4a.js → TeamCreate-fq5PdqO_.js} +1 -1
  16. package/dist/rcs-web/assets/{TeamDetail-BHCvnI2t.js → TeamDetail-haFVDL0P.js} +2 -2
  17. package/dist/rcs-web/assets/{TeamList-B7uC8lDV.js → TeamList-CR63fSv_.js} +1 -1
  18. package/dist/rcs-web/assets/{TeamSettings-DtgvrKEE.js → TeamSettings-BlXY05zK.js} +1 -1
  19. package/dist/rcs-web/assets/{UserSearchInput-dgxhGWfJ.js → UserSearchInput-Cpg_A_Py.js} +1 -1
  20. package/dist/rcs-web/assets/{UserSettings-Zyjam23-.js → UserSettings-BzHH2wQ6.js} +1 -1
  21. package/dist/rcs-web/assets/{arc-DgC_wPAg.js → arc-cULKnhNn.js} +1 -1
  22. package/dist/rcs-web/assets/{architectureDiagram-3BPJPVTR-BnnCRJZs.js → architectureDiagram-3BPJPVTR-CXLnNGBR.js} +1 -1
  23. package/{packages/remote-control-server/web/dist/assets/blockDiagram-GPEHLZMM-CvpYdvcP.js → dist/rcs-web/assets/blockDiagram-GPEHLZMM-BPQU9CvK.js} +1 -1
  24. package/dist/rcs-web/assets/{c4Diagram-AAUBKEIU-DNK__-3d.js → c4Diagram-AAUBKEIU-x76XWolr.js} +1 -1
  25. package/dist/rcs-web/assets/channel-DVf9sV9K.js +1 -0
  26. package/dist/rcs-web/assets/{chunk-2J33WTMH-5JQBz2na.js → chunk-2J33WTMH-C2xuSz2p.js} +1 -1
  27. package/dist/rcs-web/assets/{chunk-4BX2VUAB-YJh8d73x.js → chunk-4BX2VUAB-BPsGJ9Ky.js} +1 -1
  28. package/dist/rcs-web/assets/{chunk-55IACEB6-U5c5GQZN.js → chunk-55IACEB6-DV5Xxy86.js} +1 -1
  29. package/{packages/remote-control-server/web/dist/assets/chunk-727SXJPM-ifGCid_3.js → dist/rcs-web/assets/chunk-727SXJPM-dwWMJ2pm.js} +1 -1
  30. package/dist/rcs-web/assets/{chunk-AQP2D5EJ-DxqPH2_Q.js → chunk-AQP2D5EJ-CkxHIiMh.js} +1 -1
  31. package/dist/rcs-web/assets/{chunk-FMBD7UC4-dDtjQRPo.js → chunk-FMBD7UC4-CyuNPJ-2.js} +1 -1
  32. package/dist/rcs-web/assets/{chunk-ND2GUHAM-0UF6vhhE.js → chunk-ND2GUHAM-L7in2-8e.js} +1 -1
  33. package/dist/rcs-web/assets/{chunk-QZHKN3VN-CfZ4xcBz.js → chunk-QZHKN3VN-xFEPbqY9.js} +1 -1
  34. package/dist/rcs-web/assets/classDiagram-4FO5ZUOK-DfHzlu2X.js +1 -0
  35. package/dist/rcs-web/assets/classDiagram-v2-Q7XG4LA2-DfHzlu2X.js +1 -0
  36. package/dist/rcs-web/assets/{code-block-IT6T5CEO-B4B0UrXo.js → code-block-IT6T5CEO-hkRn_BN_.js} +1 -1
  37. package/dist/rcs-web/assets/{copy-_OW0eGyp.js → copy-B8rXAtFb.js} +1 -1
  38. package/dist/rcs-web/assets/{cose-bilkent-S5V4N54A-B19xQvnh.js → cose-bilkent-S5V4N54A-DSZFWhhn.js} +1 -1
  39. package/dist/rcs-web/assets/{dagre-BM42HDAG-5JJnjI1B.js → dagre-BM42HDAG-B5wjmFJL.js} +1 -1
  40. package/dist/rcs-web/assets/{diagram-2AECGRRQ-BY2NR7vr.js → diagram-2AECGRRQ-CGeTqGVq.js} +1 -1
  41. package/dist/rcs-web/assets/{diagram-5GNKFQAL-3zC3GraP.js → diagram-5GNKFQAL-B9-2D-Y8.js} +1 -1
  42. package/dist/rcs-web/assets/{diagram-KO2AKTUF-T1Jt5zH3.js → diagram-KO2AKTUF-BVCQ5UyX.js} +1 -1
  43. package/dist/rcs-web/assets/{diagram-LMA3HP47-ehrkQG1e.js → diagram-LMA3HP47-Cj4gFMtD.js} +1 -1
  44. package/dist/rcs-web/assets/{diagram-OG6HWLK6-D8ZJlGs0.js → diagram-OG6HWLK6-BBpaH0il.js} +1 -1
  45. package/dist/rcs-web/assets/{erDiagram-TEJ5UH35-Ckn1pY7G.js → erDiagram-TEJ5UH35-DS19qy_q.js} +1 -1
  46. package/dist/rcs-web/assets/{flowDiagram-I6XJVG4X-C1xnAOfH.js → flowDiagram-I6XJVG4X-D9WY3n6O.js} +1 -1
  47. package/{packages/remote-control-server/web/dist/assets/ganttDiagram-6RSMTGT7-Dw8qOfCT.js → dist/rcs-web/assets/ganttDiagram-6RSMTGT7-BNOSopT7.js} +1 -1
  48. package/{packages/remote-control-server/web/dist/assets/gitGraphDiagram-PVQCEYII-Cg3La45a.js → dist/rcs-web/assets/gitGraphDiagram-PVQCEYII-WBmYjFoA.js} +1 -1
  49. package/dist/rcs-web/assets/{infoDiagram-5YYISTIA-CGH2aXpd.js → infoDiagram-5YYISTIA-D3l4nC2Y.js} +1 -1
  50. package/dist/rcs-web/assets/{ishikawaDiagram-YF4QCWOH-x89F9Igr.js → ishikawaDiagram-YF4QCWOH-BYDxMH9Q.js} +1 -1
  51. package/{packages/remote-control-server/web/dist/assets/journeyDiagram-JHISSGLW-Ckd_pKi0.js → dist/rcs-web/assets/journeyDiagram-JHISSGLW-BSD6AEvb.js} +1 -1
  52. package/dist/rcs-web/assets/{kanban-definition-UN3LZRKU-D2dEXdru.js → kanban-definition-UN3LZRKU-DtqGr_PI.js} +1 -1
  53. package/dist/rcs-web/assets/{linear-CexxJrg8.js → linear-CaKAAJC6.js} +1 -1
  54. package/dist/rcs-web/assets/{main-L9iyf39T.js → main-Dk8hyS_b.js} +7 -7
  55. package/dist/rcs-web/assets/{mermaid-VLURNSYL-BomP37Br.js → mermaid-VLURNSYL-f6St46tQ.js} +4 -4
  56. package/dist/rcs-web/assets/{mermaid.core-BxkfDFm_.js → mermaid.core-DWc0M-5V.js} +5 -5
  57. package/dist/rcs-web/assets/{mindmap-definition-RKZ34NQL-HVsZx8Je.js → mindmap-definition-RKZ34NQL-D0RkeEqx.js} +1 -1
  58. package/dist/rcs-web/assets/{pieDiagram-4H26LBE5-D0U9q74D.js → pieDiagram-4H26LBE5-YlDnS5wa.js} +1 -1
  59. package/{packages/remote-control-server/web/dist/assets/quadrantDiagram-W4KKPZXB-CWPBZMPj.js → dist/rcs-web/assets/quadrantDiagram-W4KKPZXB-CZcVTIBE.js} +1 -1
  60. package/dist/rcs-web/assets/{requirementDiagram-4Y6WPE33-CiQbIN_P.js → requirementDiagram-4Y6WPE33-BUn0r08O.js} +1 -1
  61. package/{packages/remote-control-server/web/dist/assets/sankeyDiagram-5OEKKPKP-Bw66fXM0.js → dist/rcs-web/assets/sankeyDiagram-5OEKKPKP-Dr_ywHhs.js} +1 -1
  62. package/dist/rcs-web/assets/{sequenceDiagram-3UESZ5HK-lv5WhGb6.js → sequenceDiagram-3UESZ5HK-Bts1oven.js} +1 -1
  63. package/dist/rcs-web/assets/{stateDiagram-AJRCARHV-BLRRpX3g.js → stateDiagram-AJRCARHV-DFbylE7U.js} +1 -1
  64. package/dist/rcs-web/assets/{stateDiagram-v2-BHNVJYJU-B-5gzDu6.js → stateDiagram-v2-BHNVJYJU-Bzl4YDMv.js} +1 -1
  65. package/{packages/remote-control-server/web/dist/assets/timeline-definition-PNZ67QCA-DO8oVMVA.js → dist/rcs-web/assets/timeline-definition-PNZ67QCA-BtqngM31.js} +1 -1
  66. package/dist/rcs-web/assets/{vennDiagram-CIIHVFJN-D2RbeAHj.js → vennDiagram-CIIHVFJN-D1hGAcgx.js} +1 -1
  67. package/dist/rcs-web/assets/{wardleyDiagram-YWT4CUSO-D8D1cIXp.js → wardleyDiagram-YWT4CUSO-Cf3_zw3F.js} +1 -1
  68. package/{packages/remote-control-server/web/dist/assets/xychartDiagram-2RQKCTM6-Bzk5AxMb.js → dist/rcs-web/assets/xychartDiagram-2RQKCTM6-BuQiwlY7.js} +1 -1
  69. package/dist/rcs-web/index.html +1 -1
  70. package/package.json +1 -1
  71. package/packages/remote-control-server/src/__tests__/event-bus.test.ts +50 -0
  72. package/packages/remote-control-server/src/__tests__/routes.test.ts +100 -0
  73. package/packages/remote-control-server/src/routes/web/sessions.ts +64 -1
  74. package/packages/remote-control-server/src/transport/event-bus.ts +9 -0
  75. package/packages/remote-control-server/web/dist/assets/{AdminPanel-CbcZ7Vnr.js → AdminPanel-BMgxq2d0.js} +1 -1
  76. package/packages/remote-control-server/web/dist/assets/Claim-DRJ_CmK0.js +1 -0
  77. package/{dist/rcs-web/assets/Dashboard-BZGcSCFY.js → packages/remote-control-server/web/dist/assets/Dashboard-CablTsf3.js} +2 -2
  78. package/{dist/rcs-web/assets/Join-B_e3BKa3.js → packages/remote-control-server/web/dist/assets/Join-a80j0Uiw.js} +1 -1
  79. package/packages/remote-control-server/web/dist/assets/{Login-u6CGGkoD.js → Login-DclVxA4Q.js} +1 -1
  80. package/packages/remote-control-server/web/dist/assets/{Register-C4Fk0ibc.js → Register-DizfWHKb.js} +1 -1
  81. package/packages/remote-control-server/web/dist/assets/{SessionDetail-Bd1YgozL.js → SessionDetail-CJoBz0DU.js} +14 -14
  82. package/packages/remote-control-server/web/dist/assets/{SessionVisibilityBadge-BHKxlh8U.js → SessionVisibilityBadge-Bp4kZdZ4.js} +1 -1
  83. package/packages/remote-control-server/web/dist/assets/{Setup-DReCE0zx.js → Setup-DIw3Qc5x.js} +1 -1
  84. package/packages/remote-control-server/web/dist/assets/{ShareLanding-qE1U0WKZ.js → ShareLanding-CmyujISc.js} +1 -1
  85. package/packages/remote-control-server/web/dist/assets/{TeamCreate-BgwgZP4a.js → TeamCreate-fq5PdqO_.js} +1 -1
  86. package/packages/remote-control-server/web/dist/assets/{TeamDetail-BHCvnI2t.js → TeamDetail-haFVDL0P.js} +2 -2
  87. package/packages/remote-control-server/web/dist/assets/{TeamList-B7uC8lDV.js → TeamList-CR63fSv_.js} +1 -1
  88. package/packages/remote-control-server/web/dist/assets/{TeamSettings-DtgvrKEE.js → TeamSettings-BlXY05zK.js} +1 -1
  89. package/packages/remote-control-server/web/dist/assets/{UserSearchInput-dgxhGWfJ.js → UserSearchInput-Cpg_A_Py.js} +1 -1
  90. package/packages/remote-control-server/web/dist/assets/{UserSettings-Zyjam23-.js → UserSettings-BzHH2wQ6.js} +1 -1
  91. package/packages/remote-control-server/web/dist/assets/{arc-DgC_wPAg.js → arc-cULKnhNn.js} +1 -1
  92. package/packages/remote-control-server/web/dist/assets/{architectureDiagram-3BPJPVTR-BnnCRJZs.js → architectureDiagram-3BPJPVTR-CXLnNGBR.js} +1 -1
  93. package/{dist/rcs-web/assets/blockDiagram-GPEHLZMM-CvpYdvcP.js → packages/remote-control-server/web/dist/assets/blockDiagram-GPEHLZMM-BPQU9CvK.js} +1 -1
  94. package/packages/remote-control-server/web/dist/assets/{c4Diagram-AAUBKEIU-DNK__-3d.js → c4Diagram-AAUBKEIU-x76XWolr.js} +1 -1
  95. package/packages/remote-control-server/web/dist/assets/channel-DVf9sV9K.js +1 -0
  96. package/packages/remote-control-server/web/dist/assets/{chunk-2J33WTMH-5JQBz2na.js → chunk-2J33WTMH-C2xuSz2p.js} +1 -1
  97. package/packages/remote-control-server/web/dist/assets/{chunk-4BX2VUAB-YJh8d73x.js → chunk-4BX2VUAB-BPsGJ9Ky.js} +1 -1
  98. package/packages/remote-control-server/web/dist/assets/{chunk-55IACEB6-U5c5GQZN.js → chunk-55IACEB6-DV5Xxy86.js} +1 -1
  99. package/{dist/rcs-web/assets/chunk-727SXJPM-ifGCid_3.js → packages/remote-control-server/web/dist/assets/chunk-727SXJPM-dwWMJ2pm.js} +1 -1
  100. package/packages/remote-control-server/web/dist/assets/{chunk-AQP2D5EJ-DxqPH2_Q.js → chunk-AQP2D5EJ-CkxHIiMh.js} +1 -1
  101. package/packages/remote-control-server/web/dist/assets/{chunk-FMBD7UC4-dDtjQRPo.js → chunk-FMBD7UC4-CyuNPJ-2.js} +1 -1
  102. package/packages/remote-control-server/web/dist/assets/{chunk-ND2GUHAM-0UF6vhhE.js → chunk-ND2GUHAM-L7in2-8e.js} +1 -1
  103. package/packages/remote-control-server/web/dist/assets/{chunk-QZHKN3VN-CfZ4xcBz.js → chunk-QZHKN3VN-xFEPbqY9.js} +1 -1
  104. package/packages/remote-control-server/web/dist/assets/classDiagram-4FO5ZUOK-DfHzlu2X.js +1 -0
  105. package/packages/remote-control-server/web/dist/assets/classDiagram-v2-Q7XG4LA2-DfHzlu2X.js +1 -0
  106. package/packages/remote-control-server/web/dist/assets/{code-block-IT6T5CEO-B4B0UrXo.js → code-block-IT6T5CEO-hkRn_BN_.js} +1 -1
  107. package/packages/remote-control-server/web/dist/assets/{copy-_OW0eGyp.js → copy-B8rXAtFb.js} +1 -1
  108. package/packages/remote-control-server/web/dist/assets/{cose-bilkent-S5V4N54A-B19xQvnh.js → cose-bilkent-S5V4N54A-DSZFWhhn.js} +1 -1
  109. package/packages/remote-control-server/web/dist/assets/{dagre-BM42HDAG-5JJnjI1B.js → dagre-BM42HDAG-B5wjmFJL.js} +1 -1
  110. package/packages/remote-control-server/web/dist/assets/{diagram-2AECGRRQ-BY2NR7vr.js → diagram-2AECGRRQ-CGeTqGVq.js} +1 -1
  111. package/packages/remote-control-server/web/dist/assets/{diagram-5GNKFQAL-3zC3GraP.js → diagram-5GNKFQAL-B9-2D-Y8.js} +1 -1
  112. package/packages/remote-control-server/web/dist/assets/{diagram-KO2AKTUF-T1Jt5zH3.js → diagram-KO2AKTUF-BVCQ5UyX.js} +1 -1
  113. package/packages/remote-control-server/web/dist/assets/{diagram-LMA3HP47-ehrkQG1e.js → diagram-LMA3HP47-Cj4gFMtD.js} +1 -1
  114. package/packages/remote-control-server/web/dist/assets/{diagram-OG6HWLK6-D8ZJlGs0.js → diagram-OG6HWLK6-BBpaH0il.js} +1 -1
  115. package/packages/remote-control-server/web/dist/assets/{erDiagram-TEJ5UH35-Ckn1pY7G.js → erDiagram-TEJ5UH35-DS19qy_q.js} +1 -1
  116. package/packages/remote-control-server/web/dist/assets/{flowDiagram-I6XJVG4X-C1xnAOfH.js → flowDiagram-I6XJVG4X-D9WY3n6O.js} +1 -1
  117. package/{dist/rcs-web/assets/ganttDiagram-6RSMTGT7-Dw8qOfCT.js → packages/remote-control-server/web/dist/assets/ganttDiagram-6RSMTGT7-BNOSopT7.js} +1 -1
  118. package/{dist/rcs-web/assets/gitGraphDiagram-PVQCEYII-Cg3La45a.js → packages/remote-control-server/web/dist/assets/gitGraphDiagram-PVQCEYII-WBmYjFoA.js} +1 -1
  119. package/packages/remote-control-server/web/dist/assets/{infoDiagram-5YYISTIA-CGH2aXpd.js → infoDiagram-5YYISTIA-D3l4nC2Y.js} +1 -1
  120. package/packages/remote-control-server/web/dist/assets/{ishikawaDiagram-YF4QCWOH-x89F9Igr.js → ishikawaDiagram-YF4QCWOH-BYDxMH9Q.js} +1 -1
  121. package/{dist/rcs-web/assets/journeyDiagram-JHISSGLW-Ckd_pKi0.js → packages/remote-control-server/web/dist/assets/journeyDiagram-JHISSGLW-BSD6AEvb.js} +1 -1
  122. package/packages/remote-control-server/web/dist/assets/{kanban-definition-UN3LZRKU-D2dEXdru.js → kanban-definition-UN3LZRKU-DtqGr_PI.js} +1 -1
  123. package/packages/remote-control-server/web/dist/assets/{linear-CexxJrg8.js → linear-CaKAAJC6.js} +1 -1
  124. package/packages/remote-control-server/web/dist/assets/{main-L9iyf39T.js → main-Dk8hyS_b.js} +7 -7
  125. package/packages/remote-control-server/web/dist/assets/{mermaid-VLURNSYL-BomP37Br.js → mermaid-VLURNSYL-f6St46tQ.js} +4 -4
  126. package/packages/remote-control-server/web/dist/assets/{mermaid.core-BxkfDFm_.js → mermaid.core-DWc0M-5V.js} +5 -5
  127. package/packages/remote-control-server/web/dist/assets/{mindmap-definition-RKZ34NQL-HVsZx8Je.js → mindmap-definition-RKZ34NQL-D0RkeEqx.js} +1 -1
  128. package/packages/remote-control-server/web/dist/assets/{pieDiagram-4H26LBE5-D0U9q74D.js → pieDiagram-4H26LBE5-YlDnS5wa.js} +1 -1
  129. package/{dist/rcs-web/assets/quadrantDiagram-W4KKPZXB-CWPBZMPj.js → packages/remote-control-server/web/dist/assets/quadrantDiagram-W4KKPZXB-CZcVTIBE.js} +1 -1
  130. package/packages/remote-control-server/web/dist/assets/{requirementDiagram-4Y6WPE33-CiQbIN_P.js → requirementDiagram-4Y6WPE33-BUn0r08O.js} +1 -1
  131. package/{dist/rcs-web/assets/sankeyDiagram-5OEKKPKP-Bw66fXM0.js → packages/remote-control-server/web/dist/assets/sankeyDiagram-5OEKKPKP-Dr_ywHhs.js} +1 -1
  132. package/packages/remote-control-server/web/dist/assets/{sequenceDiagram-3UESZ5HK-lv5WhGb6.js → sequenceDiagram-3UESZ5HK-Bts1oven.js} +1 -1
  133. package/packages/remote-control-server/web/dist/assets/{stateDiagram-AJRCARHV-BLRRpX3g.js → stateDiagram-AJRCARHV-DFbylE7U.js} +1 -1
  134. package/packages/remote-control-server/web/dist/assets/{stateDiagram-v2-BHNVJYJU-B-5gzDu6.js → stateDiagram-v2-BHNVJYJU-Bzl4YDMv.js} +1 -1
  135. package/{dist/rcs-web/assets/timeline-definition-PNZ67QCA-DO8oVMVA.js → packages/remote-control-server/web/dist/assets/timeline-definition-PNZ67QCA-BtqngM31.js} +1 -1
  136. package/packages/remote-control-server/web/dist/assets/{vennDiagram-CIIHVFJN-D2RbeAHj.js → vennDiagram-CIIHVFJN-D1hGAcgx.js} +1 -1
  137. package/packages/remote-control-server/web/dist/assets/{wardleyDiagram-YWT4CUSO-D8D1cIXp.js → wardleyDiagram-YWT4CUSO-Cf3_zw3F.js} +1 -1
  138. package/{dist/rcs-web/assets/xychartDiagram-2RQKCTM6-Bzk5AxMb.js → packages/remote-control-server/web/dist/assets/xychartDiagram-2RQKCTM6-BuQiwlY7.js} +1 -1
  139. package/packages/remote-control-server/web/dist/index.html +1 -1
  140. package/dist/rcs-web/assets/Claim-CN3D3Ku6.js +0 -1
  141. package/dist/rcs-web/assets/channel-DB6b62-p.js +0 -1
  142. package/dist/rcs-web/assets/classDiagram-4FO5ZUOK-DkXLqlKv.js +0 -1
  143. package/dist/rcs-web/assets/classDiagram-v2-Q7XG4LA2-DkXLqlKv.js +0 -1
  144. package/packages/remote-control-server/web/dist/assets/Claim-CN3D3Ku6.js +0 -1
  145. package/packages/remote-control-server/web/dist/assets/channel-DB6b62-p.js +0 -1
  146. package/packages/remote-control-server/web/dist/assets/classDiagram-4FO5ZUOK-DkXLqlKv.js +0 -1
  147. package/packages/remote-control-server/web/dist/assets/classDiagram-v2-Q7XG4LA2-DkXLqlKv.js +0 -1
@@ -15,6 +15,11 @@
15
15
  --text: #e7e3f4;
16
16
  --text-dim: #9b94b8;
17
17
  --text-faint: #5c5575;
18
+ /* --ui-scale is set by cube.js: multiplier on design px. All visual
19
+ dimensions below use calc(Npx * var(--ui-scale)) so the UI grows with
20
+ the window. Functional elements (resize handles, ctx menu, close btn,
21
+ ws status) stay fixed for usability. */
22
+ --ui-scale: 1;
18
23
  }
19
24
  * { margin: 0; padding: 0; box-sizing: border-box; }
20
25
  html, body {
@@ -33,12 +38,17 @@
33
38
  }
34
39
 
35
40
  /* ---- Left: cube stage ----
36
- Use flex-basis instead of fixed px so the stage scales with the window.
37
- The cube is a CSS 3D transform element — three faces (body + ::before
38
- + ::after) form a visible cube. Rotates when .rotating class is applied
39
- (driven by runningCount + cubeMode in cube.js). */
41
+ flex-basis is a percentage so the stage scales with the window. The cube
42
+ is a CSS 3D transform element — three faces (body + ::before + ::after)
43
+ form a visible cube. Rotates when .rotating is applied (driven by
44
+ runningCount + cubeMode in cube.js).
45
+
46
+ preserve-3d constraint: .cube has transform-style: preserve-3d, so NEVER
47
+ apply filter/opacity (<1) to .cube itself — grouping properties flatten
48
+ 3D subtrees. All glow/dim effects live on #cube-stage (whose own subtree
49
+ composites before being filtered) or animate leaf colors only. */
40
50
  #cube-stage {
41
- flex: 0 0 43%; /* ~95px of 220px, but proportional so it scales */
51
+ flex: 0 0 43%;
42
52
  height: 100%;
43
53
  position: relative;
44
54
  background:
@@ -48,13 +58,44 @@
48
58
  align-items: center;
49
59
  justify-content: center;
50
60
  border-right: 1px solid var(--border);
51
- perspective: 200px;
61
+ perspective: calc(200px * var(--ui-scale));
62
+ /* Idle: slightly dim, transitions back smoothly when rotation stops. */
63
+ filter: brightness(0.96);
64
+ transition: filter 0.35s ease;
65
+ }
66
+ /* Rotating: glow pulse on the STAGE (grouping here is safe — the cube's
67
+ internal 3D composition finishes before the stage-level filter applies). */
68
+ #cube-stage.rotating {
69
+ animation: stage-glow 1.4s ease-in-out infinite alternate;
70
+ }
71
+ @keyframes stage-glow {
72
+ from { filter: brightness(1) drop-shadow(0 0 0 rgba(139, 92, 246, 0)); }
73
+ to { filter: brightness(1.15) drop-shadow(0 0 calc(12px * var(--ui-scale)) var(--purple-glow)); }
74
+ }
75
+ /* Halo behind the cube — pulses while rotating. */
76
+ #cube-stage::before {
77
+ content: '';
78
+ position: absolute;
79
+ width: calc(90px * var(--ui-scale));
80
+ height: calc(90px * var(--ui-scale));
81
+ border-radius: 50%;
82
+ background: radial-gradient(circle, var(--purple-glow) 0%, transparent 65%);
83
+ opacity: 0;
84
+ transition: opacity 0.4s ease;
85
+ pointer-events: none;
86
+ }
87
+ #cube-stage.rotating::before {
88
+ animation: halo-pulse 1.4s ease-in-out infinite alternate;
89
+ }
90
+ @keyframes halo-pulse {
91
+ from { opacity: 0.3; }
92
+ to { opacity: 0.85; }
52
93
  }
53
94
  /* CSS 3D cube: body is the front face, ::before is the right face,
54
95
  ::after is the top face. Half-size translates position them at 90°. */
55
96
  .cube {
56
- width: 22px;
57
- height: 22px;
97
+ width: calc(22px * var(--ui-scale));
98
+ height: calc(22px * var(--ui-scale));
58
99
  position: relative;
59
100
  transform-style: preserve-3d;
60
101
  transform: rotateX(-28deg) rotateY(45deg);
@@ -62,7 +103,7 @@
62
103
  border: 1px solid #8B5CF6;
63
104
  }
64
105
  .cube.rotating {
65
- animation: cube-spin 8s linear infinite;
106
+ animation: cube-spin 2.8s linear infinite;
66
107
  }
67
108
  .cube::before,
68
109
  .cube::after {
@@ -71,12 +112,12 @@
71
112
  inset: 0;
72
113
  }
73
114
  .cube::before {
74
- transform: rotateY(90deg) translateZ(11px);
115
+ transform: rotateY(90deg) translateZ(calc(11px * var(--ui-scale)));
75
116
  background: rgba(167, 139, 250, 0.55);
76
117
  border: 1px solid #a78bfa;
77
118
  }
78
119
  .cube::after {
79
- transform: rotateX(90deg) translateZ(11px);
120
+ transform: rotateX(90deg) translateZ(calc(11px * var(--ui-scale)));
80
121
  background: rgba(109, 40, 217, 0.4);
81
122
  border: 1px solid #6d28d9;
82
123
  }
@@ -86,14 +127,16 @@
86
127
  }
87
128
  @media (prefers-reduced-motion: reduce) {
88
129
  .cube.rotating { animation: none; }
130
+ #cube-stage.rotating { animation: none; }
131
+ #cube-stage.rotating::before { animation: none; opacity: 0.5; }
89
132
  }
90
133
  /* Subtle ring frame around the cube */
91
134
  #cube-stage::after {
92
135
  content: '';
93
136
  position: absolute;
94
- inset: 14px;
137
+ inset: calc(14px * var(--ui-scale));
95
138
  border: 1px solid rgba(139, 92, 246, 0.12);
96
- border-radius: 8px;
139
+ border-radius: calc(8px * var(--ui-scale));
97
140
  pointer-events: none;
98
141
  }
99
142
 
@@ -101,10 +144,10 @@
101
144
  #panel {
102
145
  flex: 1;
103
146
  height: 100%;
104
- padding: 12px 14px 10px;
147
+ padding: calc(12px * var(--ui-scale)) calc(14px * var(--ui-scale)) calc(10px * var(--ui-scale));
105
148
  display: flex;
106
149
  flex-direction: column;
107
- gap: 8px;
150
+ gap: calc(8px * var(--ui-scale));
108
151
  background: linear-gradient(180deg, var(--bg-elev) 0%, var(--bg) 100%);
109
152
  position: relative;
110
153
  }
@@ -113,11 +156,11 @@
113
156
  #counts-row {
114
157
  display: flex;
115
158
  align-items: baseline;
116
- gap: 8px;
159
+ gap: calc(8px * var(--ui-scale));
117
160
  flex-shrink: 0;
118
161
  }
119
162
  #running-count {
120
- font-size: 28px;
163
+ font-size: calc(28px * var(--ui-scale));
121
164
  font-weight: 700;
122
165
  line-height: 1;
123
166
  color: var(--purple-soft);
@@ -125,25 +168,25 @@
125
168
  font-variant-numeric: tabular-nums;
126
169
  }
127
170
  #counts-sep {
128
- font-size: 14px;
171
+ font-size: calc(14px * var(--ui-scale));
129
172
  color: var(--text-faint);
130
173
  font-weight: 300;
131
174
  }
132
175
  #waiting-pill {
133
176
  display: inline-flex;
134
177
  align-items: center;
135
- gap: 4px;
136
- padding: 2px 7px;
137
- border-radius: 9px;
178
+ gap: calc(4px * var(--ui-scale));
179
+ padding: calc(2px * var(--ui-scale)) calc(7px * var(--ui-scale));
180
+ border-radius: calc(9px * var(--ui-scale));
138
181
  background: rgba(251, 191, 36, 0.12);
139
182
  color: var(--amber);
140
- font-size: 11px;
183
+ font-size: calc(11px * var(--ui-scale));
141
184
  font-weight: 600;
142
185
  line-height: 1.3;
143
186
  font-variant-numeric: tabular-nums;
144
187
  }
145
188
  #waiting-pill .dot {
146
- width: 5px; height: 5px;
189
+ width: calc(5px * var(--ui-scale)); height: calc(5px * var(--ui-scale));
147
190
  border-radius: 50%;
148
191
  background: var(--amber);
149
192
  box-shadow: 0 0 4px var(--amber);
@@ -156,23 +199,23 @@
156
199
  overflow: hidden;
157
200
  display: flex;
158
201
  flex-direction: column;
159
- gap: 3px;
202
+ gap: calc(3px * var(--ui-scale));
160
203
  min-height: 0;
161
204
  position: relative;
162
205
  }
163
206
  #sessions-inner {
164
207
  display: flex;
165
208
  flex-direction: column;
166
- gap: 3px;
209
+ gap: calc(3px * var(--ui-scale));
167
210
  min-height: 0;
168
211
  will-change: transform;
169
212
  }
170
213
  /* Custom scrollbar: invisible by default, fades in on hover/scroll */
171
214
  #scrollbar-track {
172
215
  position: absolute;
173
- right: 12px;
174
- width: 4px;
175
- border-radius: 2px;
216
+ right: calc(12px * var(--ui-scale));
217
+ width: calc(4px * var(--ui-scale));
218
+ border-radius: calc(2px * var(--ui-scale));
176
219
  z-index: 50;
177
220
  opacity: 0;
178
221
  transition: opacity 0.3s ease;
@@ -185,8 +228,8 @@
185
228
  #scrollbar-thumb {
186
229
  position: absolute;
187
230
  width: 100%;
188
- min-height: 16px;
189
- border-radius: 2px;
231
+ min-height: calc(16px * var(--ui-scale));
232
+ border-radius: calc(2px * var(--ui-scale));
190
233
  background: rgba(139, 92, 246, 0.35);
191
234
  transition: background 0.15s ease;
192
235
  }
@@ -195,10 +238,10 @@
195
238
  background: rgba(139, 92, 246, 0.6);
196
239
  }
197
240
  .session-row {
198
- font-size: 10.5px;
241
+ font-size: calc(10.5px * var(--ui-scale));
199
242
  line-height: 1.35;
200
243
  color: var(--text-dim);
201
- padding: 2px 0 2px 14px;
244
+ padding: calc(2px * var(--ui-scale)) 0 calc(2px * var(--ui-scale)) calc(14px * var(--ui-scale));
202
245
  position: relative;
203
246
  font-variant-numeric: tabular-nums;
204
247
  display: flex;
@@ -215,7 +258,7 @@
215
258
  position: absolute;
216
259
  left: 0; top: 50%;
217
260
  transform: translateY(-50%);
218
- width: 12px; height: 12px;
261
+ width: calc(12px * var(--ui-scale)); height: calc(12px * var(--ui-scale));
219
262
  cursor: pointer;
220
263
  display: flex;
221
264
  align-items: center;
@@ -226,15 +269,15 @@
226
269
  }
227
270
  .session-jump::before {
228
271
  content: '';
229
- width: 4px; height: 4px;
272
+ width: calc(4px * var(--ui-scale)); height: calc(4px * var(--ui-scale));
230
273
  border-radius: 50%;
231
274
  background: var(--purple);
232
275
  transition: all 0.15s ease;
233
276
  }
234
277
  .session-jump:hover {
235
278
  color: var(--purple-soft);
236
- font-size: 12px;
237
- left: -3px;
279
+ font-size: calc(12px * var(--ui-scale));
280
+ left: calc(-3px * var(--ui-scale));
238
281
  }
239
282
  .session-jump:hover::before {
240
283
  content: '\25B8';
@@ -252,12 +295,39 @@
252
295
  .session-row.blocked { color: #c9a96a; }
253
296
  .session-row.idle { color: var(--text-faint); font-style: italic; }
254
297
  .session-empty {
255
- font-size: 10px;
298
+ font-size: calc(10px * var(--ui-scale));
256
299
  color: var(--text-faint);
257
300
  font-style: italic;
258
- padding-left: 14px;
301
+ padding-left: calc(14px * var(--ui-scale));
259
302
  }
260
303
 
304
+ /* ---- Detail mode session rows: state badge + 2-line prompt + full-row hit ---- */
305
+ .session-badge { display: none; }
306
+ body[data-mode='detail'] .session-badge {
307
+ display: inline-block;
308
+ flex-shrink: 0;
309
+ font-size: calc(8px * var(--ui-scale));
310
+ font-weight: 700;
311
+ letter-spacing: 0.5px;
312
+ line-height: 1;
313
+ padding: calc(2px * var(--ui-scale)) calc(4px * var(--ui-scale));
314
+ border-radius: calc(3px * var(--ui-scale));
315
+ margin-right: calc(6px * var(--ui-scale));
316
+ font-style: normal;
317
+ }
318
+ .session-badge.run { background: rgba(139, 92, 246, 0.18); color: var(--purple-soft); }
319
+ .session-badge.block { background: rgba(251, 191, 36, 0.15); color: var(--amber); }
320
+ .session-badge.idle { background: rgba(155, 148, 184, 0.12); color: var(--text-faint); }
321
+ body[data-mode='detail'] .session-text {
322
+ white-space: normal;
323
+ display: -webkit-box;
324
+ -webkit-box-orient: vertical;
325
+ -webkit-line-clamp: 2;
326
+ }
327
+ body[data-mode='detail'] .session-row { cursor: pointer; }
328
+ body[data-mode='detail'] .session-row:hover { color: var(--text); }
329
+ body[data-mode='detail'] #cube-stage { flex: 0 0 36%; }
330
+
261
331
  /* Jump feedback: ripple wave sweeping from left to right across the row */
262
332
  .session-row.jumping {
263
333
  position: relative;
@@ -284,13 +354,30 @@
284
354
  }
285
355
 
286
356
  #more-line {
287
- font-size: 9px;
357
+ font-size: calc(9px * var(--ui-scale));
288
358
  color: var(--text-faint);
289
359
  flex-shrink: 0;
290
360
  text-align: right;
291
361
  padding-top: 1px;
292
362
  }
293
363
 
364
+ /* ---- Display modes ----
365
+ logo: cube only. mini: cube + counts. standard: default (all).
366
+ detail: large detail layout (badge/2-line/row-click rules above). */
367
+ body[data-mode='logo'] #panel { display: none; }
368
+ body[data-mode='logo'] #cube-stage { flex: 1 1 100%; border-right: none; }
369
+ body[data-mode='mini'] #sessions,
370
+ body[data-mode='mini'] #more-line,
371
+ body[data-mode='mini'] #scrollbar-track { display: none; }
372
+ body[data-mode='mini'] #panel { justify-content: center; }
373
+
374
+ /* Mode-switch fade (replayed by re-adding body.mode-swap in cube.js) */
375
+ body.mode-swap #panel { animation: mode-fade 0.25s ease; }
376
+ body.mode-swap #cube-stage { animation: mode-fade 0.25s ease; }
377
+ @keyframes mode-fade {
378
+ from { opacity: 0; }
379
+ }
380
+
294
381
  /* WS status indicator — small dot in bottom-right corner */
295
382
  #ws-status {
296
383
  position: fixed;
@@ -342,8 +429,21 @@
342
429
  border-radius: 6px;
343
430
  z-index: 9999;
344
431
  padding: 3px;
345
- min-width: 80px;
432
+ min-width: 132px;
346
433
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
434
+ transform-origin: top left;
435
+ animation: menu-in 0.12s ease;
436
+ }
437
+ @keyframes menu-in {
438
+ from { opacity: 0; transform: scale(0.96); }
439
+ }
440
+ #ctx-menu .ctx-label {
441
+ padding: 4px 12px 2px;
442
+ font-size: 9px;
443
+ letter-spacing: 1px;
444
+ text-transform: uppercase;
445
+ color: var(--text-faint);
446
+ cursor: default;
347
447
  }
348
448
  #ctx-menu .ctx-item {
349
449
  padding: 5px 12px;
@@ -357,6 +457,31 @@
357
457
  background: var(--purple);
358
458
  color: #fff;
359
459
  }
460
+ #ctx-menu .ctx-sep {
461
+ height: 1px;
462
+ background: var(--border);
463
+ margin: 3px 6px;
464
+ }
465
+ /* View-mode radio bullets */
466
+ #ctx-menu .ctx-view::before {
467
+ content: '';
468
+ display: inline-block;
469
+ width: 9px; height: 9px;
470
+ border-radius: 50%;
471
+ border: 1px solid var(--text-faint);
472
+ margin-right: 7px;
473
+ vertical-align: -1px;
474
+ box-sizing: border-box;
475
+ }
476
+ #ctx-menu .ctx-view.active::before {
477
+ border-color: var(--purple);
478
+ background: var(--purple);
479
+ box-shadow: inset 0 0 0 2px var(--bg-elev);
480
+ }
481
+ #ctx-menu .ctx-view.active {
482
+ color: var(--purple-soft);
483
+ }
484
+ #ctx-menu .ctx-view.active:hover { color: #fff; }
360
485
 
361
486
  /* ---- Close button (top-right corner) ---- */
362
487
  #close-btn {
@@ -408,7 +533,13 @@
408
533
  <div id="more-line"></div>
409
534
  </div>
410
535
  <div id="ctx-menu">
411
- <div class="ctx-item" id="ctx-mode">Static</div>
536
+ <div class="ctx-label">View</div>
537
+ <div class="ctx-item ctx-view" data-view="logo">Cube only</div>
538
+ <div class="ctx-item ctx-view" data-view="mini">Cube + counts</div>
539
+ <div class="ctx-item ctx-view" data-view="standard">Standard</div>
540
+ <div class="ctx-item ctx-view" data-view="detail">Detail</div>
541
+ <div class="ctx-sep"></div>
542
+ <div class="ctx-item" id="ctx-mode">Rotation: Dynamic</div>
412
543
  </div>
413
544
  <div id="close-btn" title="Close parade">×</div>
414
545
  <div id="ws-status" title="WS: connecting"></div>
@@ -1 +1 @@
1
- import{e as d,j as e}from"./vendor-DE_-CLIE.js";import{ai as c,aj as o,I as m,ad as s,a7 as l,x as u}from"./main-L9iyf39T.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function j(){c();const[a,i]=d.useState([]),{myTeams:r,isLoading:x}=o(),n=d.useCallback(async()=>{try{const t=await m();i(t||[])}catch(t){console.error("Admin: failed to load sessions",t)}},[]);return d.useEffect(()=>{n()},[n]),e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsxs("div",{className:"mx-auto max-w-5xl px-4 py-8",children:[e.jsx("h1",{className:"mb-6 font-display text-2xl font-semibold text-text-primary",children:s("admin.title")}),e.jsxs("section",{className:"mb-10",children:[e.jsxs("h2",{className:"mb-4 font-display text-lg font-semibold text-text-primary",children:[s("admin.teams")," (",r.length,")"]}),x?e.jsx("div",{className:"rounded-xl border border-border bg-surface-1 p-4 text-center text-text-muted",children:s("common.loading")}):r.length===0?e.jsx("div",{className:"rounded-xl border border-border bg-surface-1 p-4 text-center text-text-muted",children:s("admin.noTeams")}):e.jsx("div",{className:"space-y-2",children:r.map(t=>e.jsxs("a",{href:`/teams/${t.slug}`,className:"flex items-center justify-between rounded-xl border border-border bg-surface-1 px-4 py-3 no-underline transition-colors hover:border-border-light hover:bg-surface-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("span",{className:"font-medium text-text-primary",children:t.name}),e.jsx("span",{className:"ml-2 text-xs text-text-muted",children:t.slug})]}),e.jsx("span",{className:"text-xs text-text-muted",children:l(new Date(t.created_at).getTime()/1e3)})]},t.id))})]}),e.jsxs("section",{children:[e.jsxs("h2",{className:"mb-4 font-display text-lg font-semibold text-text-primary",children:[s("admin.sessions")," (",a.length,")"]}),a.length===0?e.jsx("div",{className:"rounded-xl border border-border bg-surface-1 p-4 text-center text-text-muted",children:s("admin.noSessions")}):e.jsx("div",{className:"space-y-2",children:a.map(t=>e.jsxs("a",{href:`/code/${t.id}`,className:"flex items-center justify-between rounded-xl border border-border bg-surface-1 px-4 py-3 no-underline transition-colors hover:border-border-light hover:bg-surface-2",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"truncate font-medium text-text-primary",children:t.title||t.id}),e.jsx("span",{className:"rounded-full bg-surface-2 px-2 py-0.5 text-xs text-text-muted",children:t.source||"unknown"})]}),e.jsx("div",{className:"truncate text-xs text-text-muted",children:t.id})]}),e.jsxs("div",{className:"ml-4 flex items-center gap-3",children:[e.jsx(u,{status:t.status}),e.jsx("span",{className:"text-xs text-text-muted",children:l(t.updated_at||t.created_at)})]})]},t.id))})]})]})})}export{j as AdminPanel};
1
+ import{e as d,j as e}from"./vendor-DE_-CLIE.js";import{ak as c,al as o,J as m,af as s,a8 as l,x as u}from"./main-Dk8hyS_b.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function j(){c();const[a,i]=d.useState([]),{myTeams:r,isLoading:x}=o(),n=d.useCallback(async()=>{try{const t=await m();i(t||[])}catch(t){console.error("Admin: failed to load sessions",t)}},[]);return d.useEffect(()=>{n()},[n]),e.jsx("div",{className:"flex-1 overflow-y-auto",children:e.jsxs("div",{className:"mx-auto max-w-5xl px-4 py-8",children:[e.jsx("h1",{className:"mb-6 font-display text-2xl font-semibold text-text-primary",children:s("admin.title")}),e.jsxs("section",{className:"mb-10",children:[e.jsxs("h2",{className:"mb-4 font-display text-lg font-semibold text-text-primary",children:[s("admin.teams")," (",r.length,")"]}),x?e.jsx("div",{className:"rounded-xl border border-border bg-surface-1 p-4 text-center text-text-muted",children:s("common.loading")}):r.length===0?e.jsx("div",{className:"rounded-xl border border-border bg-surface-1 p-4 text-center text-text-muted",children:s("admin.noTeams")}):e.jsx("div",{className:"space-y-2",children:r.map(t=>e.jsxs("a",{href:`/teams/${t.slug}`,className:"flex items-center justify-between rounded-xl border border-border bg-surface-1 px-4 py-3 no-underline transition-colors hover:border-border-light hover:bg-surface-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("span",{className:"font-medium text-text-primary",children:t.name}),e.jsx("span",{className:"ml-2 text-xs text-text-muted",children:t.slug})]}),e.jsx("span",{className:"text-xs text-text-muted",children:l(new Date(t.created_at).getTime()/1e3)})]},t.id))})]}),e.jsxs("section",{children:[e.jsxs("h2",{className:"mb-4 font-display text-lg font-semibold text-text-primary",children:[s("admin.sessions")," (",a.length,")"]}),a.length===0?e.jsx("div",{className:"rounded-xl border border-border bg-surface-1 p-4 text-center text-text-muted",children:s("admin.noSessions")}):e.jsx("div",{className:"space-y-2",children:a.map(t=>e.jsxs("a",{href:`/code/${t.id}`,className:"flex items-center justify-between rounded-xl border border-border bg-surface-1 px-4 py-3 no-underline transition-colors hover:border-border-light hover:bg-surface-2",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"truncate font-medium text-text-primary",children:t.title||t.id}),e.jsx("span",{className:"rounded-full bg-surface-2 px-2 py-0.5 text-xs text-text-muted",children:t.source||"unknown"})]}),e.jsx("div",{className:"truncate text-xs text-text-muted",children:t.id})]}),e.jsxs("div",{className:"ml-4 flex items-center gap-3",children:[e.jsx(u,{status:t.status}),e.jsx("span",{className:"text-xs text-text-muted",children:l(t.updated_at||t.created_at)})]})]},t.id))})]})]})})}export{j as AdminPanel};
@@ -0,0 +1 @@
1
+ import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{E as u,J as f}from"./main-Dk8hyS_b.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";const v=2e3,N=3e4;function E(){const c=window.location.pathname.split("/"),i=c[c.length-1]||"",[s,n]=r.useState("idle"),[m,l]=r.useState(null),[a,d]=r.useState(null);return r.useEffect(()=>{if(!i||!i.startsWith("clm_")){l("Invalid claim token"),n("error");return}n("claiming"),u(i).then(t=>{d(t.environment_id),n("waiting")}).catch(t=>{l(t instanceof Error?t.message:"Claim failed"),n("error")})},[i]),r.useEffect(()=>{if(s!=="waiting"||!a)return;let t=!1;const x=Date.now(),o=setInterval(()=>{if(Date.now()-x>N){clearInterval(o),t||n("timeout");return}f().then(h=>{t||(h||[]).some(p=>p.environment_id===a)&&(clearInterval(o),window.location.href="/code/")}).catch(()=>{})},v);return()=>{t=!0,clearInterval(o)}},[s,a]),s==="claiming"?e.jsx("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:e.jsx("p",{className:"text-sm text-text-muted",children:"Claiming environment..."})}):s==="error"?e.jsxs("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:[e.jsx("p",{className:"text-sm text-destructive",children:m}),e.jsx("a",{href:"/code",className:"mt-4 inline-block text-accent hover:underline",children:"Back to dashboard"})]}):s==="waiting"||s==="timeout"?e.jsxs("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:[e.jsxs("header",{className:"mb-10",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold tracking-tight text-text-primary",children:"Environment claimed"}),e.jsx("p",{className:"mt-2 text-sm text-text-muted",children:"You are now the owner of this environment."})]}),e.jsxs("div",{className:"space-y-4",children:[a&&e.jsx("p",{className:"font-mono text-xs text-text-muted",children:a}),s==="waiting"?e.jsxs("p",{className:"text-sm text-text-muted",children:["Waiting for the worker to create a session",e.jsx("span",{className:"animate-pulse",children:"…"})]}):e.jsx("p",{className:"text-sm text-text-muted",children:"The worker has not created a session yet — it may be offline or stopped. The session will appear on the dashboard once the worker connects."}),e.jsx("a",{href:"/code",className:"inline-block rounded-md bg-accent px-4 py-2 text-sm font-medium text-white hover:bg-accent/90 transition-colors",children:"Go to dashboard"})]})]}):e.jsx("div",{className:"px-6 py-16 sm:px-10 sm:py-20",children:e.jsx("p",{className:"text-sm text-text-muted",children:"Claiming environment..."})})}export{E as Claim};
@@ -1,6 +1,6 @@
1
- import{j as e,e as o}from"./vendor-DE_-CLIE.js";import{a4 as O,a3 as _,aj as T,ah as E,x as P,ai as L,ad as a,a7 as A,q as $,s as H,e as W,r as V,d as F,aa as q,F as J,I as R,J as U,H as Z}from"./main-L9iyf39T.js";import{g as D}from"./workerType-Bd-zteMi.js";import{S as z,D as G,a as K,c as Q,d as X,b as Y}from"./SessionVisibilityBadge-BHKxlh8U.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";/**
1
+ import{j as e,e as o}from"./vendor-DE_-CLIE.js";import{a5 as O,a4 as _,al as E,aj as T,x as F,ak as L,af as a,a8 as A,q as $,s as W,e as H,r as V,d as P,ab as q,G,J,K,I as R}from"./main-Dk8hyS_b.js";import{g as D}from"./workerType-Bd-zteMi.js";import{S as U,D as Z,a as z,c as Q,d as X,b as Y}from"./SessionVisibilityBadge-Bp4kZdZ4.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";/**
2
2
  * @license lucide-react v0.555.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const ee=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],te=O("folder",ee);function se({teamName:n,className:x}){return n?e.jsx("span",{className:_("inline-flex items-center rounded-full border border-border/60 bg-surface-2 px-2 py-0.5 text-xs text-text-muted",x),children:n}):null}function re({environments:n,onSelectEnvironment:x}){const{activeTeam:f}=T(),{user:u}=E(),i=o.useMemo(()=>(u==null?void 0:u.role)==="admin"?n:f?n.filter(r=>r.team_id===f.id):n.filter(r=>!r.team_id),[n,f,u]);return!i||i.length===0?e.jsx("div",{className:"rounded-xl border border-border bg-surface-1 p-8 text-center text-text-muted",children:"No active environments"}):e.jsx("div",{className:"space-y-2",children:i.map(r=>{const c=r.worker_type==="acp",b=D(r.worker_type),p=b.fullLabel,g=b.colorClass;return e.jsxs("button",{type:"button",onClick:()=>x==null?void 0:x(r),disabled:c,className:`flex w-full items-center justify-between rounded-xl border border-border bg-surface-1 px-4 py-3 text-left transition-colors ${c?"cursor-default opacity-80":"hover:border-border-light cursor-pointer"}`,children:[e.jsx("div",{className:"flex items-center gap-3",children:e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium text-text-primary",children:r.machine_name||r.id}),e.jsx("span",{className:`rounded-full px-2 py-0.5 text-xs font-medium ${g}`,children:p}),e.jsx(se,{teamName:r.team_name??null})]}),e.jsx("div",{className:"text-sm text-text-muted",children:r.directory||""})]})}),e.jsxs("div",{className:"text-right",children:[e.jsx(P,{status:r.status}),e.jsx("div",{className:"mt-1 text-xs text-text-muted",children:r.branch||""})]})]},r.id)})})}function ae({sessions:n,environments:x,onSelect:f,onDelete:u}){L();const{activeTeam:i,myTeams:r}=T(),{user:c}=E(),b=o.useMemo(()=>{const t=new Map;for(const m of r)t.set(m.id,m.name);return t},[r]),p=o.useMemo(()=>(c==null?void 0:c.role)==="admin"?n:i?n.filter(t=>t.owner_type==="team"&&t.owner_id===i.id):n.filter(t=>t.owner_type==="user"||t.access_level==="write"||t.access_level==="read"),[n,i,c]),{mySessions:g,sharedSessions:v}=o.useMemo(()=>{const t=[],m=[];for(const d of p)i?t.push(d):d.access_level==="write"||d.access_level==="read"?m.push(d):t.push(d);return{mySessions:t,sharedSessions:m}},[p,i]),y=new Map;for(const t of x??[])t!=null&&t.id&&t.worker_type&&y.set(t.id,t.worker_type);const l=(t,m)=>(m.updated_at||0)-(t.updated_at||0);function h(t){const m=!!u&&t.access_level!=="write"&&t.access_level!=="read";return e.jsxs("div",{className:"group flex w-full items-center justify-between rounded-xl border border-border bg-surface-1 px-4 py-3 text-left transition-colors hover:border-border-light hover:bg-surface-2",children:[e.jsxs("button",{type:"button",onClick:()=>f(t.id),className:"min-w-0 flex-1 text-left",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"truncate font-medium text-text-primary",children:t.title||t.id}),t.visibility&&e.jsx(z,{visibility:t.visibility||"private"}),(()=>{var k;let d=t.source==="acp"?"acp":(k=t.environment)==null?void 0:k.worker_type;!d&&t.environment_id&&(d=y.get(t.environment_id));const j=D(d);return e.jsx("span",{className:`rounded-full px-2 py-0.5 text-xs font-medium ${j.colorClass}`,children:j.fullLabel})})()]}),e.jsxs("div",{className:"flex items-center gap-2 truncate text-xs text-text-muted",children:[e.jsx("span",{className:"truncate font-mono",children:t.id}),t.owner_type==="team"&&t.owner_id&&e.jsxs("span",{className:"inline-flex items-center gap-2 truncate",children:[e.jsx("span",{className:"text-text-muted/40",children:"|"}),e.jsx("span",{className:"truncate",children:b.get(t.owner_id)||t.owner_id})]})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(P,{status:t.status}),e.jsx("span",{className:"text-xs text-text-muted",children:A(t.created_at||t.updated_at)}),m&&e.jsx("button",{type:"button",onClick:d=>{d.stopPropagation(),u(t.id)},className:"rounded p-1 text-text-muted opacity-0 transition-all hover:text-status-error group-hover:opacity-100",title:"Delete session",children:e.jsx("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]},t.id)}if(p.length===0)return e.jsx("div",{className:"rounded-xl border border-border bg-surface-1 p-8 text-center text-text-muted",children:"No sessions"});const N=[...g].sort(l),w=[...v].sort(l);return e.jsxs("div",{className:"space-y-4",children:[N.length>0&&e.jsxs("section",{className:"space-y-2",children:[!i&&w.length>0&&e.jsx("h3",{className:"px-1 text-xs font-medium uppercase tracking-wide text-text-muted",children:a("session.mySessions")}),N.map(h)]}),w.length>0&&e.jsxs("section",{className:"space-y-2",children:[e.jsx("h3",{className:"px-1 text-xs font-medium uppercase tracking-wide text-text-muted",children:a("session.sharedWithMe")}),w.map(h)]})]})}function ne({open:n,environments:x,onClose:f,onCreated:u}){L();const{activeTeam:i}=T(),{user:r}=E(),[c,b]=o.useState(""),[p,g]=o.useState(""),[v,y]=o.useState("same-dir"),[l,h]=o.useState(""),[N,w]=o.useState(!1),[t,m]=o.useState(!1),d=o.useMemo(()=>(r==null?void 0:r.role)==="admin"?x:i?x.filter(s=>s.team_id===i.id):x.filter(s=>!s.team_id),[x,i,r]);o.useEffect(()=>{n&&(b(""),g(""),y("same-dir"),h(""),m(!1))},[n]);const j=d.find(s=>s.id===p)||null,k=j?d.findIndex(s=>s.id===j.id)+1:null,B=async()=>{w(!0),h("");try{const s={};c.trim()&&(s.title=c.trim()),p&&(s.environment_id=p),s.spawn_mode=v;const S=q();S&&(s.team_id=S);const C=await J(s);u(C)}catch(s){h(s instanceof Error?s.message:a("dialog.createFailed"))}finally{w(!1)}};return e.jsx(G,{open:n,onOpenChange:s=>{s||f()},children:e.jsxs(K,{className:"max-w-md rounded-2xl border-border bg-surface-1 p-6 shadow-2xl",children:[e.jsx(Q,{children:e.jsx(X,{className:"font-display text-lg font-semibold text-text-primary",children:a("dialog.newSession")})}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm text-text-secondary",children:a("dialog.titleOptional")}),e.jsx("input",{type:"text",value:c,onChange:s=>b(s.target.value),placeholder:a("dialog.titlePlaceholder"),className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm text-text-secondary",children:a("dialog.environment")}),e.jsxs($,{open:t,onOpenChange:m,children:[e.jsx(H,{asChild:!0,children:e.jsxs("button",{type:"button",className:"flex w-full items-center justify-between rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary hover:border-border-light focus:border-brand focus:outline-none transition-colors",children:[e.jsx("span",{className:_("flex items-center gap-2 truncate",!j&&"text-text-muted"),children:j?e.jsxs(e.Fragment,{children:[k!==null&&e.jsxs("span",{className:"shrink-0 rounded bg-surface-3 px-1.5 py-0.5 text-[10px] font-mono text-text-muted",children:["#",k]}),e.jsx("span",{className:"truncate",children:j.machine_name||j.id}),e.jsx("span",{className:"shrink-0 text-text-muted",children:"·"}),e.jsx("span",{className:"shrink-0 text-text-muted",children:D(j.worker_type).shortLabel})]}):e.jsx("span",{children:a("dialog.none")})}),e.jsx(W,{className:"h-4 w-4 shrink-0 text-text-muted"})]})}),e.jsxs(V,{align:"start",className:"max-h-80 w-80 overflow-y-auto rounded-lg border-border bg-surface-1 p-1 shadow-xl",children:[e.jsxs("button",{type:"button",onClick:()=>{g(""),m(!1)},className:"flex w-full items-center justify-between rounded-md px-3 py-2 text-sm text-text-secondary hover:bg-surface-2 transition-colors",children:[e.jsx("span",{children:a("dialog.none")}),!p&&e.jsx(F,{className:"h-3.5 w-3.5 text-brand"})]}),d.length===0?e.jsx("p",{className:"px-3 py-2 text-xs text-text-muted",children:a("dialog.envEmpty")}):e.jsx("div",{className:"space-y-1 pt-1",children:d.map((s,S)=>{const C=D(s.worker_type),M=!!s.team_id,I=s.id===p;return e.jsxs("button",{type:"button",onClick:()=>{g(s.id),m(!1)},className:_("flex w-full flex-col gap-1.5 rounded-md px-3 py-2 text-left transition-colors",I?"bg-brand/10":"hover:bg-surface-2"),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"shrink-0 rounded bg-surface-3 px-1.5 py-0.5 text-[10px] font-mono text-text-muted",children:["#",S+1]}),e.jsx("span",{className:"truncate font-medium text-text-primary",children:s.machine_name||s.id}),e.jsx("span",{className:_("shrink-0 rounded-full px-2 py-0.5 text-[10px] font-medium",C.colorClass),children:C.shortLabel}),e.jsx("span",{className:_("shrink-0 rounded-full border px-2 py-0.5 text-[10px] font-medium",M?"border-border/60 bg-surface-2 text-text-muted":"border-brand/30 bg-brand/10 text-brand"),children:M?`${a("dialog.envTeam")}: ${s.team_name||s.team_id}`:a("dialog.envPersonal")}),I&&e.jsx(F,{className:"ml-auto h-3.5 w-3.5 shrink-0 text-brand"})]}),s.directory&&e.jsxs("div",{className:"flex items-center gap-1.5 truncate text-xs text-text-muted",children:[e.jsx(te,{className:"h-3 w-3 shrink-0"}),e.jsx("span",{className:"truncate font-mono",children:s.directory}),s.branch&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-text-muted/40",children:"·"}),e.jsx("span",{className:"truncate",children:s.branch})]})]})]},s.id)})})]})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm text-text-secondary",children:a("dialog.workspaceMode")}),e.jsxs("select",{value:v,onChange:s=>y(s.target.value),className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary focus:border-brand focus:outline-none",children:[e.jsx("option",{value:"same-dir",children:a("dialog.sameDir")}),e.jsx("option",{value:"worktree",children:a("dialog.worktree")})]})]}),l&&e.jsx("div",{className:"text-sm text-status-error",children:l})]}),e.jsxs(Y,{children:[e.jsx("button",{onClick:f,className:"rounded-lg border border-border px-4 py-2 text-sm text-text-secondary hover:bg-surface-2 transition-colors",children:a("common.cancel")}),e.jsx("button",{onClick:B,disabled:N,className:"rounded-lg bg-brand px-4 py-2 text-sm font-medium text-white hover:bg-brand-light disabled:opacity-50 transition-colors",children:N?a("common.creating"):a("common.create")})]})]})})}function me({onNavigateSession:n}){L();const[x,f]=o.useState([]),[u,i]=o.useState([]),[r,c]=o.useState(!1),b=o.useCallback(async()=>{try{const[l,h]=await Promise.all([R(),U()]);f(l||[]),i(h||[])}catch(l){console.error("Dashboard render error:",l)}},[]);o.useEffect(()=>{b();const l=setInterval(b,1e4);return()=>clearInterval(l)},[b]);const p=l=>{c(!1),n(l.id)},g=o.useCallback(l=>{},[]),v=o.useCallback(l=>{n(l)},[n]),y=o.useCallback(async l=>{if(window.confirm(a("dashboard.confirmDelete").replace("{id}",l)))try{await Z(l),f(h=>h.filter(N=>N.id!==l))}catch(h){alert(h instanceof Error?h.message:a("dashboard.deleteFailed"))}},[]);return e.jsx("div",{className:"px-6 py-12 sm:px-10 sm:py-16",children:e.jsxs("div",{children:[e.jsx("h1",{className:"sr-only",children:a("dashboard.title")}),e.jsxs("section",{className:"mb-16",children:[e.jsx("h2",{className:"mb-6 text-sm font-medium text-text-primary",children:a("dashboard.environments")}),e.jsx(re,{environments:u,onSelectEnvironment:g})]}),e.jsxs("section",{children:[e.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[e.jsx("h2",{className:"text-sm font-medium text-text-primary",children:a("dashboard.sessions")}),e.jsx("button",{onClick:()=>c(!0),className:"rounded-md bg-accent px-3 py-1.5 text-sm font-medium text-white hover:bg-accent/90 transition-colors",children:a("dashboard.newSession")})]}),e.jsx(ae,{sessions:x,environments:u,onSelect:v,onDelete:y})]}),e.jsx(ne,{open:r,environments:u,onClose:()=>c(!1),onCreated:p})]})})}export{me as Dashboard};
6
+ */const ee=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],te=O("folder",ee);function se({teamName:n,className:x}){return n?e.jsx("span",{className:_("inline-flex items-center rounded-full border border-border/60 bg-surface-2 px-2 py-0.5 text-xs text-text-muted",x),children:n}):null}function re({environments:n,onSelectEnvironment:x}){const{activeTeam:b}=E(),{user:u}=T(),i=o.useMemo(()=>(u==null?void 0:u.role)==="admin"?n:b?n.filter(r=>r.team_id===b.id):n.filter(r=>!r.team_id),[n,b,u]);return!i||i.length===0?e.jsx("div",{className:"rounded-xl border border-border bg-surface-1 p-8 text-center text-text-muted",children:"No active environments"}):e.jsx("div",{className:"space-y-2",children:i.map(r=>{const c=r.worker_type==="acp",p=D(r.worker_type),h=p.fullLabel,g=p.colorClass;return e.jsxs("button",{type:"button",onClick:()=>x==null?void 0:x(r),disabled:c,className:`flex w-full items-center justify-between rounded-xl border border-border bg-surface-1 px-4 py-3 text-left transition-colors ${c?"cursor-default opacity-80":"hover:border-border-light cursor-pointer"}`,children:[e.jsx("div",{className:"flex items-center gap-3",children:e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium text-text-primary",children:r.machine_name||r.id}),e.jsx("span",{className:`rounded-full px-2 py-0.5 text-xs font-medium ${g}`,children:h}),e.jsx(se,{teamName:r.team_name??null})]}),e.jsx("div",{className:"text-sm text-text-muted",children:r.directory||""})]})}),e.jsxs("div",{className:"text-right",children:[e.jsx(F,{status:r.status}),e.jsx("div",{className:"mt-1 text-xs text-text-muted",children:r.branch||""})]})]},r.id)})})}function ae({sessions:n,environments:x,onSelect:b,onDelete:u}){L();const{activeTeam:i,myTeams:r}=E(),{user:c}=T(),p=o.useMemo(()=>{const t=new Map;for(const m of r)t.set(m.id,m.name);return t},[r]),h=o.useMemo(()=>(c==null?void 0:c.role)==="admin"?n:i?n.filter(t=>t.owner_type==="team"&&t.owner_id===i.id):n.filter(t=>t.owner_type==="user"||t.access_level==="write"||t.access_level==="read"),[n,i,c]),{mySessions:g,sharedSessions:w}=o.useMemo(()=>{const t=[],m=[];for(const d of h)i?t.push(d):d.access_level==="write"||d.access_level==="read"?m.push(d):t.push(d);return{mySessions:t,sharedSessions:m}},[h,i]),y=new Map;for(const t of x??[])t!=null&&t.id&&t.worker_type&&y.set(t.id,t.worker_type);const l=(t,m)=>(m.updated_at||0)-(t.updated_at||0);function f(t){const m=!!u&&t.access_level!=="write"&&t.access_level!=="read";return e.jsxs("div",{className:"group flex w-full items-center justify-between rounded-xl border border-border bg-surface-1 px-4 py-3 text-left transition-colors hover:border-border-light hover:bg-surface-2",children:[e.jsxs("button",{type:"button",onClick:()=>b(t.id),className:"min-w-0 flex-1 text-left",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"truncate font-medium text-text-primary",children:t.title||t.id}),t.visibility&&e.jsx(U,{visibility:t.visibility||"private"}),(()=>{var k;let d=t.source==="acp"?"acp":(k=t.environment)==null?void 0:k.worker_type;!d&&t.environment_id&&(d=y.get(t.environment_id));const j=D(d);return e.jsx("span",{className:`rounded-full px-2 py-0.5 text-xs font-medium ${j.colorClass}`,children:j.fullLabel})})()]}),e.jsxs("div",{className:"flex items-center gap-2 truncate text-xs text-text-muted",children:[e.jsx("span",{className:"truncate font-mono",children:t.id}),t.owner_type==="team"&&t.owner_id&&e.jsxs("span",{className:"inline-flex items-center gap-2 truncate",children:[e.jsx("span",{className:"text-text-muted/40",children:"|"}),e.jsx("span",{className:"truncate",children:p.get(t.owner_id)||t.owner_id})]})]})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(F,{status:t.status}),e.jsx("span",{className:"text-xs text-text-muted",children:A(t.created_at||t.updated_at)}),m&&e.jsx("button",{type:"button",onClick:d=>{d.stopPropagation(),u(t.id)},className:"rounded p-1 text-text-muted opacity-0 transition-all hover:text-status-error group-hover:opacity-100",title:"Delete session",children:e.jsx("svg",{className:"h-4 w-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M6 18L18 6M6 6l12 12"})})})]})]},t.id)}if(h.length===0)return e.jsx("div",{className:"rounded-xl border border-border bg-surface-1 p-8 text-center text-text-muted",children:"No sessions"});const N=[...g].sort(l),v=[...w].sort(l);return e.jsxs("div",{className:"space-y-4",children:[N.length>0&&e.jsxs("section",{className:"space-y-2",children:[!i&&v.length>0&&e.jsx("h3",{className:"px-1 text-xs font-medium uppercase tracking-wide text-text-muted",children:a("session.mySessions")}),N.map(f)]}),v.length>0&&e.jsxs("section",{className:"space-y-2",children:[e.jsx("h3",{className:"px-1 text-xs font-medium uppercase tracking-wide text-text-muted",children:a("session.sharedWithMe")}),v.map(f)]})]})}function ne({open:n,environments:x,onClose:b,onCreated:u}){L();const{activeTeam:i}=E(),{user:r}=T(),[c,p]=o.useState(""),[h,g]=o.useState(""),[w,y]=o.useState("same-dir"),[l,f]=o.useState(""),[N,v]=o.useState(!1),[t,m]=o.useState(!1),d=o.useMemo(()=>(r==null?void 0:r.role)==="admin"?x:i?x.filter(s=>s.team_id===i.id):x.filter(s=>!s.team_id),[x,i,r]);o.useEffect(()=>{n&&(p(""),g(""),y("same-dir"),f(""),m(!1))},[n]);const j=d.find(s=>s.id===h)||null,k=j?d.findIndex(s=>s.id===j.id)+1:null,B=async()=>{v(!0),f("");try{const s={};c.trim()&&(s.title=c.trim()),h&&(s.environment_id=h),s.spawn_mode=w;const S=q();S&&(s.team_id=S);const C=await G(s);u(C)}catch(s){f(s instanceof Error?s.message:a("dialog.createFailed"))}finally{v(!1)}};return e.jsx(Z,{open:n,onOpenChange:s=>{s||b()},children:e.jsxs(z,{className:"max-w-md rounded-2xl border-border bg-surface-1 p-6 shadow-2xl",children:[e.jsx(Q,{children:e.jsx(X,{className:"font-display text-lg font-semibold text-text-primary",children:a("dialog.newSession")})}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm text-text-secondary",children:a("dialog.titleOptional")}),e.jsx("input",{type:"text",value:c,onChange:s=>p(s.target.value),placeholder:a("dialog.titlePlaceholder"),className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm text-text-secondary",children:a("dialog.environment")}),e.jsxs($,{open:t,onOpenChange:m,children:[e.jsx(W,{asChild:!0,children:e.jsxs("button",{type:"button",className:"flex w-full items-center justify-between rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary hover:border-border-light focus:border-brand focus:outline-none transition-colors",children:[e.jsx("span",{className:_("flex items-center gap-2 truncate",!j&&"text-text-muted"),children:j?e.jsxs(e.Fragment,{children:[k!==null&&e.jsxs("span",{className:"shrink-0 rounded bg-surface-3 px-1.5 py-0.5 text-[10px] font-mono text-text-muted",children:["#",k]}),e.jsx("span",{className:"truncate",children:j.machine_name||j.id}),e.jsx("span",{className:"shrink-0 text-text-muted",children:"·"}),e.jsx("span",{className:"shrink-0 text-text-muted",children:D(j.worker_type).shortLabel})]}):e.jsx("span",{children:a("dialog.none")})}),e.jsx(H,{className:"h-4 w-4 shrink-0 text-text-muted"})]})}),e.jsxs(V,{align:"start",className:"max-h-80 w-80 overflow-y-auto rounded-lg border-border bg-surface-1 p-1 shadow-xl",children:[e.jsxs("button",{type:"button",onClick:()=>{g(""),m(!1)},className:"flex w-full items-center justify-between rounded-md px-3 py-2 text-sm text-text-secondary hover:bg-surface-2 transition-colors",children:[e.jsx("span",{children:a("dialog.none")}),!h&&e.jsx(P,{className:"h-3.5 w-3.5 text-brand"})]}),d.length===0?e.jsx("p",{className:"px-3 py-2 text-xs text-text-muted",children:a("dialog.envEmpty")}):e.jsx("div",{className:"space-y-1 pt-1",children:d.map((s,S)=>{const C=D(s.worker_type),M=!!s.team_id,I=s.id===h;return e.jsxs("button",{type:"button",onClick:()=>{g(s.id),m(!1)},className:_("flex w-full flex-col gap-1.5 rounded-md px-3 py-2 text-left transition-colors",I?"bg-brand/10":"hover:bg-surface-2"),children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"shrink-0 rounded bg-surface-3 px-1.5 py-0.5 text-[10px] font-mono text-text-muted",children:["#",S+1]}),e.jsx("span",{className:"truncate font-medium text-text-primary",children:s.machine_name||s.id}),e.jsx("span",{className:_("shrink-0 rounded-full px-2 py-0.5 text-[10px] font-medium",C.colorClass),children:C.shortLabel}),e.jsx("span",{className:_("shrink-0 rounded-full border px-2 py-0.5 text-[10px] font-medium",M?"border-border/60 bg-surface-2 text-text-muted":"border-brand/30 bg-brand/10 text-brand"),children:M?`${a("dialog.envTeam")}: ${s.team_name||s.team_id}`:a("dialog.envPersonal")}),I&&e.jsx(P,{className:"ml-auto h-3.5 w-3.5 shrink-0 text-brand"})]}),s.directory&&e.jsxs("div",{className:"flex items-center gap-1.5 truncate text-xs text-text-muted",children:[e.jsx(te,{className:"h-3 w-3 shrink-0"}),e.jsx("span",{className:"truncate font-mono",children:s.directory}),s.branch&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"text-text-muted/40",children:"·"}),e.jsx("span",{className:"truncate",children:s.branch})]})]})]},s.id)})})]})]})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm text-text-secondary",children:a("dialog.workspaceMode")}),e.jsxs("select",{value:w,onChange:s=>y(s.target.value),className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary focus:border-brand focus:outline-none",children:[e.jsx("option",{value:"same-dir",children:a("dialog.sameDir")}),e.jsx("option",{value:"worktree",children:a("dialog.worktree")})]})]}),l&&e.jsx("div",{className:"text-sm text-status-error",children:l})]}),e.jsxs(Y,{children:[e.jsx("button",{onClick:b,className:"rounded-lg border border-border px-4 py-2 text-sm text-text-secondary hover:bg-surface-2 transition-colors",children:a("common.cancel")}),e.jsx("button",{onClick:B,disabled:N,className:"rounded-lg bg-brand px-4 py-2 text-sm font-medium text-white hover:bg-brand-light disabled:opacity-50 transition-colors",children:N?a("common.creating"):a("common.create")})]})]})})}function me({onNavigateSession:n}){L();const[x,b]=o.useState([]),[u,i]=o.useState([]),[r,c]=o.useState(!1),p=o.useCallback(async()=>{try{const[l,f]=await Promise.all([J(),K()]);b(l||[]),i(f||[])}catch(l){console.error("Dashboard render error:",l)}},[]);o.useEffect(()=>{p();const l=setInterval(p,5e3);return window.addEventListener("focus",p),()=>{clearInterval(l),window.removeEventListener("focus",p)}},[p]);const h=l=>{c(!1),n(l.id)},g=o.useCallback(l=>{},[]),w=o.useCallback(l=>{n(l)},[n]),y=o.useCallback(async l=>{if(window.confirm(a("dashboard.confirmDelete").replace("{id}",l)))try{await R(l),b(f=>f.filter(N=>N.id!==l))}catch(f){alert(f instanceof Error?f.message:a("dashboard.deleteFailed"))}},[]);return e.jsx("div",{className:"px-6 py-12 sm:px-10 sm:py-16",children:e.jsxs("div",{children:[e.jsx("h1",{className:"sr-only",children:a("dashboard.title")}),e.jsxs("section",{className:"mb-16",children:[e.jsx("h2",{className:"mb-6 text-sm font-medium text-text-primary",children:a("dashboard.environments")}),e.jsx(re,{environments:u,onSelectEnvironment:g})]}),e.jsxs("section",{children:[e.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[e.jsx("h2",{className:"text-sm font-medium text-text-primary",children:a("dashboard.sessions")}),e.jsx("button",{onClick:()=>c(!0),className:"rounded-md bg-accent px-3 py-1.5 text-sm font-medium text-white hover:bg-accent/90 transition-colors",children:a("dashboard.newSession")})]}),e.jsx(ae,{sessions:x,environments:u,onSelect:w,onDelete:y})]}),e.jsx(ne,{open:r,environments:u,onClose:()=>c(!1),onCreated:h})]})})}export{me as Dashboard};
@@ -1 +1 @@
1
- import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{ah as v,ad as t}from"./main-L9iyf39T.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function E({onSuccess:h,onInvalidInvite:l}){const{join:b}=v(),[u,f]=r.useState(""),[d,j]=r.useState(""),[o,w]=r.useState(""),[c,g]=r.useState(""),[m,n]=r.useState(""),[x,p]=r.useState(!1);r.useEffect(()=>{const a=new URLSearchParams(window.location.search).get("invite");a?f(a):l()},[l]);const y=async s=>{if(s.preventDefault(),n(""),o.length<8){n(t("auth.setup.passwordTooShort"));return}if(o!==c){n(t("auth.setup.passwordMismatch"));return}p(!0);try{await b(u,d,o),h()}catch(a){const i=a instanceof Error?a.message:"Join failed";if(i.includes("Invalid invitation")||i.includes("expired")||i.includes("already used")){l();return}n(i)}finally{p(!1)}};return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-surface-0 px-4",children:e.jsxs("div",{className:"w-full max-w-sm space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold text-text-primary",children:t("auth.join.title")}),e.jsx("p",{className:"mt-2 text-sm text-text-muted",children:t("auth.join.welcome")}),e.jsx("p",{className:"mt-1 text-sm text-text-muted",children:t("auth.join.description")})]}),e.jsxs("form",{onSubmit:y,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.join.username")}),e.jsx("input",{type:"text",value:d,onChange:s=>j(s.target.value),required:!0,autoComplete:"username",autoFocus:!0,className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.join.password")}),e.jsx("input",{type:"password",value:o,onChange:s=>w(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.join.confirmPassword")}),e.jsx("input",{type:"password",value:c,onChange:s=>g(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),m&&e.jsx("p",{className:"text-sm text-status-error",children:m}),e.jsx("button",{type:"submit",disabled:x||!u,className:"w-full rounded-lg bg-brand px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-brand-light disabled:cursor-not-allowed disabled:opacity-50",children:x?t("common.loading"):t("auth.join.submit")})]})]})})}export{E as Join};
1
+ import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{aj as v,af as t}from"./main-Dk8hyS_b.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function E({onSuccess:b,onInvalidInvite:l}){const{join:f}=v(),[u,h]=r.useState(""),[d,j]=r.useState(""),[o,w]=r.useState(""),[c,g]=r.useState(""),[m,n]=r.useState(""),[x,p]=r.useState(!1);r.useEffect(()=>{const a=new URLSearchParams(window.location.search).get("invite");a?h(a):l()},[l]);const y=async s=>{if(s.preventDefault(),n(""),o.length<8){n(t("auth.setup.passwordTooShort"));return}if(o!==c){n(t("auth.setup.passwordMismatch"));return}p(!0);try{await f(u,d,o),b()}catch(a){const i=a instanceof Error?a.message:"Join failed";if(i.includes("Invalid invitation")||i.includes("expired")||i.includes("already used")){l();return}n(i)}finally{p(!1)}};return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-surface-0 px-4",children:e.jsxs("div",{className:"w-full max-w-sm space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold text-text-primary",children:t("auth.join.title")}),e.jsx("p",{className:"mt-2 text-sm text-text-muted",children:t("auth.join.welcome")}),e.jsx("p",{className:"mt-1 text-sm text-text-muted",children:t("auth.join.description")})]}),e.jsxs("form",{onSubmit:y,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.join.username")}),e.jsx("input",{type:"text",value:d,onChange:s=>j(s.target.value),required:!0,autoComplete:"username",autoFocus:!0,className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.join.password")}),e.jsx("input",{type:"password",value:o,onChange:s=>w(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.join.confirmPassword")}),e.jsx("input",{type:"password",value:c,onChange:s=>g(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),m&&e.jsx("p",{className:"text-sm text-status-error",children:m}),e.jsx("button",{type:"submit",disabled:x||!u,className:"w-full rounded-lg bg-brand px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-brand-light disabled:cursor-not-allowed disabled:opacity-50",children:x?t("common.loading"):t("auth.join.submit")})]})]})})}export{E as Join};
@@ -1 +1 @@
1
- import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{ah as f,ad as t}from"./main-L9iyf39T.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function N({onSuccess:d,onNavigateRegister:c}){const{login:m,registrationAllowed:x}=f(),[a,p]=r.useState(""),[o,b]=r.useState(""),[l,n]=r.useState(""),[i,u]=r.useState(!1),h=async s=>{s.preventDefault(),n(""),u(!0);try{await m(a,o),d()}catch{n(t("auth.login.failed"))}finally{u(!1)}};return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-surface-0 px-4",children:e.jsxs("div",{className:"w-full max-w-sm space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold text-text-primary",children:t("auth.login.title")}),e.jsx("p",{className:"mt-2 text-sm text-text-muted",children:t("auth.login.description")})]}),e.jsxs("form",{onSubmit:h,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.login.username")}),e.jsx("input",{type:"text",value:a,onChange:s=>p(s.target.value),required:!0,autoComplete:"username",autoFocus:!0,className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.login.password")}),e.jsx("input",{type:"password",value:o,onChange:s=>b(s.target.value),required:!0,autoComplete:"current-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),l&&e.jsx("p",{className:"text-sm text-status-error",children:l}),e.jsx("button",{type:"submit",disabled:i,className:"w-full rounded-lg bg-brand px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-brand-light disabled:cursor-not-allowed disabled:opacity-50",children:i?t("common.loading"):t("auth.login.submit")})]}),x&&e.jsx("button",{type:"button",onClick:c,className:"w-full text-center text-sm text-text-muted hover:text-text-primary transition-colors",children:t("auth.login.register")})]})})}export{N as Login};
1
+ import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{aj as f,af as t}from"./main-Dk8hyS_b.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function N({onSuccess:d,onNavigateRegister:c}){const{login:m,registrationAllowed:x}=f(),[a,p]=r.useState(""),[o,b]=r.useState(""),[l,n]=r.useState(""),[i,u]=r.useState(!1),h=async s=>{s.preventDefault(),n(""),u(!0);try{await m(a,o),d()}catch{n(t("auth.login.failed"))}finally{u(!1)}};return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-surface-0 px-4",children:e.jsxs("div",{className:"w-full max-w-sm space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold text-text-primary",children:t("auth.login.title")}),e.jsx("p",{className:"mt-2 text-sm text-text-muted",children:t("auth.login.description")})]}),e.jsxs("form",{onSubmit:h,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.login.username")}),e.jsx("input",{type:"text",value:a,onChange:s=>p(s.target.value),required:!0,autoComplete:"username",autoFocus:!0,className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.login.password")}),e.jsx("input",{type:"password",value:o,onChange:s=>b(s.target.value),required:!0,autoComplete:"current-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),l&&e.jsx("p",{className:"text-sm text-status-error",children:l}),e.jsx("button",{type:"submit",disabled:i,className:"w-full rounded-lg bg-brand px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-brand-light disabled:cursor-not-allowed disabled:opacity-50",children:i?t("common.loading"):t("auth.login.submit")})]}),x&&e.jsx("button",{type:"button",onClick:c,className:"w-full text-center text-sm text-text-muted hover:text-text-primary transition-colors",children:t("auth.login.register")})]})})}export{N as Login};
@@ -1 +1 @@
1
- import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{ah as y,ad as t}from"./main-L9iyf39T.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function S({onSuccess:m,onBack:x}){const{register:p}=y(),[n,b]=r.useState(""),[a,h]=r.useState(""),[l,f]=r.useState(""),[i,o]=r.useState(""),[u,d]=r.useState(!1),g=async s=>{if(s.preventDefault(),o(""),a.length<8){o(t("auth.setup.passwordTooShort"));return}if(a!==l){o(t("auth.setup.passwordMismatch"));return}d(!0);try{await p(n,a),m()}catch(c){o(c instanceof Error?c.message:t("auth.register.failed"))}finally{d(!1)}};return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-surface-0 px-4",children:e.jsxs("div",{className:"w-full max-w-sm space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold text-text-primary",children:t("auth.register.title")}),e.jsx("p",{className:"mt-2 text-sm text-text-muted",children:t("auth.register.description")})]}),e.jsxs("form",{onSubmit:g,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.login.username")}),e.jsx("input",{type:"text",value:n,onChange:s=>b(s.target.value),required:!0,autoComplete:"username",autoFocus:!0,className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.login.password")}),e.jsx("input",{type:"password",value:a,onChange:s=>h(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.join.confirmPassword")}),e.jsx("input",{type:"password",value:l,onChange:s=>f(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),i&&e.jsx("p",{className:"text-sm text-status-error",children:i}),e.jsx("button",{type:"submit",disabled:u,className:"w-full rounded-lg bg-brand px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-brand-light disabled:cursor-not-allowed disabled:opacity-50",children:u?t("common.loading"):t("auth.register.submit")})]}),e.jsx("button",{type:"button",onClick:x,className:"w-full text-center text-sm text-text-muted hover:text-text-primary transition-colors",children:t("auth.register.backToLogin")})]})})}export{S as Register};
1
+ import{e as r,j as e}from"./vendor-DE_-CLIE.js";import{aj as y,af as t}from"./main-Dk8hyS_b.js";import"./shiki-mEP5vQQu.js";import"./motion-BILbV7YQ.js";function S({onSuccess:m,onBack:x}){const{register:p}=y(),[n,b]=r.useState(""),[a,h]=r.useState(""),[l,f]=r.useState(""),[i,o]=r.useState(""),[u,d]=r.useState(!1),g=async s=>{if(s.preventDefault(),o(""),a.length<8){o(t("auth.setup.passwordTooShort"));return}if(a!==l){o(t("auth.setup.passwordMismatch"));return}d(!0);try{await p(n,a),m()}catch(c){o(c instanceof Error?c.message:t("auth.register.failed"))}finally{d(!1)}};return e.jsx("div",{className:"flex min-h-screen items-center justify-center bg-surface-0 px-4",children:e.jsxs("div",{className:"w-full max-w-sm space-y-6",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("h1",{className:"font-display text-2xl font-semibold text-text-primary",children:t("auth.register.title")}),e.jsx("p",{className:"mt-2 text-sm text-text-muted",children:t("auth.register.description")})]}),e.jsxs("form",{onSubmit:g,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.login.username")}),e.jsx("input",{type:"text",value:n,onChange:s=>b(s.target.value),required:!0,autoComplete:"username",autoFocus:!0,className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.login.password")}),e.jsx("input",{type:"password",value:a,onChange:s=>h(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"mb-1 block text-sm font-medium text-text-secondary",children:t("auth.join.confirmPassword")}),e.jsx("input",{type:"password",value:l,onChange:s=>f(s.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded-lg border border-border bg-surface-2 px-3 py-2 text-sm text-text-primary placeholder:text-text-muted focus:border-brand focus:outline-none"})]}),i&&e.jsx("p",{className:"text-sm text-status-error",children:i}),e.jsx("button",{type:"submit",disabled:u,className:"w-full rounded-lg bg-brand px-4 py-2 text-sm font-medium text-white transition-colors hover:bg-brand-light disabled:cursor-not-allowed disabled:opacity-50",children:u?t("common.loading"):t("auth.register.submit")})]}),e.jsx("button",{type:"button",onClick:x,className:"w-full text-center text-sm text-text-muted hover:text-text-primary transition-colors",children:t("auth.register.backToLogin")})]})})}export{S as Register};