dorkos 0.122.0 → 0.124.0
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.
- package/dist/bin/cli.js +914 -333
- package/dist/browser/native/package-manifest.json +1 -1
- package/dist/browser/source-manifest.json +1 -1
- package/dist/client/assets/{AboutPage-ClN3P9B8.js → AboutPage-BH8Ndn3e.js} +1 -1
- package/dist/client/assets/{ActivityErrorState-B2lq1pyE.js → ActivityErrorState-K5Mew9EX.js} +1 -1
- package/dist/client/assets/{ActivityPage-htTkSy18.js → ActivityPage-BB20L5HU.js} +1 -1
- package/dist/client/assets/{ActivityRow-BqV0B1T0.js → ActivityRow-C5O7rnmS.js} +1 -1
- package/dist/client/assets/{AdapterIcon-DlkN0YJo.js → AdapterIcon-Bmybvrzb.js} +1 -1
- package/dist/client/assets/{AdapterSetupWizard-RyNPjSmU.js → AdapterSetupWizard-CkdV7Hhh.js} +2 -2
- package/dist/client/assets/{AgentOptionRow-DSievGfL.js → AgentOptionRow-BA2cDa7r.js} +1 -1
- package/dist/client/assets/{AgentPicker-BCtWrhsA.js → AgentPicker-CsIIPGZJ.js} +1 -1
- package/dist/client/assets/{AgentRequestCard-BHIHWNRz.js → AgentRequestCard-0fOxvaoe.js} +3 -3
- package/dist/client/assets/{AppearancePage-B2eduuT0.js → AppearancePage-XOjkkoli.js} +1 -1
- package/dist/client/assets/{ApplyToOverridesDialog-C7G2t3X2.js → ApplyToOverridesDialog-CoO6V1G4.js} +1 -1
- package/dist/client/assets/{AttentionSignalRow-_8thTHYX.js → AttentionSignalRow-CjjZobp7.js} +1 -1
- package/dist/client/assets/{BaseTanStackRouterDevtoolsPanel-B-iktbLX-WpZU5xiO.js → BaseTanStackRouterDevtoolsPanel-B-iktbLX-9TVHyRPJ.js} +1 -1
- package/dist/client/assets/{BindingDialog-BAwbHFq3.js → BindingDialog-DLoAQauL.js} +1 -1
- package/dist/client/assets/{BlintzCanvas-BEtRmEbL.js → BlintzCanvas-CYHsXAcY.js} +3 -3
- package/dist/client/assets/{CanvasCsvContent--6i2ETyZ.js → CanvasCsvContent--Gr7Fe_U.js} +1 -1
- package/dist/client/assets/{CanvasFileContent-C86nyLbI.js → CanvasFileContent-estXyAbr.js} +2 -2
- package/dist/client/assets/{CanvasModel3dContent-wYHHAovt.js → CanvasModel3dContent-CkOo930M.js} +2 -2
- package/dist/client/assets/{ChatAppsOff-2Wvch1rr.js → ChatAppsOff-D4L1zJVN.js} +1 -1
- package/dist/client/assets/{CodeMirrorDiff-s1TWguZ8.js → CodeMirrorDiff-DY_6ju-z.js} +1 -1
- package/dist/client/assets/{CodeMirrorEditor-1ndoTbcZ.js → CodeMirrorEditor-BUoDBsBv.js} +1 -1
- package/dist/client/assets/{CommitmentList-BK97ndab.js → CommitmentList-wDkcVP9c.js} +1 -1
- package/dist/client/assets/{CommitmentsPage-_nd37gVX.js → CommitmentsPage-CzSM6b8R.js} +1 -1
- package/dist/client/assets/{ComputerResourceView-C2Broer4.js → ComputerResourceView-cERD9H2L.js} +1 -1
- package/dist/client/assets/{ComputerViewer-DgG7t2KZ.js → ComputerViewer-rMcfbk2_.js} +1 -1
- package/dist/client/assets/{ConnectionAccessLists-Pbo2lft8.js → ConnectionAccessLists-f7QeQbQo.js} +1 -1
- package/dist/client/assets/{ConnectionsPage-Dm2d9owX.js → ConnectionsPage-BmjtA6pw.js} +2 -2
- package/dist/client/assets/{ConventionPage-BUltejHJ.js → ConventionPage-CH-ah6nI.js} +1 -1
- package/dist/client/assets/{ExtensionPageRoute-DAomCiMw.js → ExtensionPageRoute-CJIxa6ST.js} +2 -2
- package/dist/client/assets/{FloatingTanStackRouterDevtools-CqogiFob-5fT29ZEV.js → FloatingTanStackRouterDevtools-CqogiFob-BP7EJ2JL.js} +1 -1
- package/dist/client/assets/HandlePage-Cg8H3mQS.js +1 -0
- package/dist/client/assets/{HeartbeatPage-BW0X4YAL.js → HeartbeatPage-BUsf-qrU.js} +1 -1
- package/dist/client/assets/{KeyEntry-ClqAj0dS.js → KeyEntry-C2kWdN8q.js} +1 -1
- package/dist/client/assets/{LexicalField-CbswpPQ7.js → LexicalField-CR8ulsI_.js} +1 -1
- package/dist/client/assets/{ManagesPage-Daqs8hys.js → ManagesPage-DTtsIOGi.js} +1 -1
- package/dist/client/assets/{Marketplace-BNMIm8g_.js → Marketplace-iaV5XAzv.js} +2 -2
- package/dist/client/assets/{MarketplaceSourcesView-B4WpzVpr.js → MarketplaceSourcesView-6tgzUfFj.js} +1 -1
- package/dist/client/assets/{McpAppFrame-Dbg_Ni39.js → McpAppFrame-C7eYYdI9.js} +1 -1
- package/dist/client/assets/McpSigninBody-BDyGbJ7I.js +1 -0
- package/dist/client/assets/{Model3dViewer-DT8x0h7T.js → Model3dViewer-BujDNuVS.js} +1 -1
- package/dist/client/assets/NamePage-Bx8T98OF.js +1 -0
- package/dist/client/assets/{NewDirectMessageMenu-BbehZd6I.js → NewDirectMessageMenu-D4e-z2Jt.js} +1 -1
- package/dist/client/assets/{NotificationsPage-B9zEN26O.js → NotificationsPage-CkDeTaJp.js} +1 -1
- package/dist/client/assets/{OpenMeshSwitch-D-AYDXjH.js → OpenMeshSwitch-CtbOt3r5.js} +2 -2
- package/dist/client/assets/OperatorIdentityForm-Vr4qZnmM.js +1 -0
- package/dist/client/assets/PermissionHistory-DzU1rf2B.js +1 -0
- package/dist/client/assets/{PermissionsPage-CKfDf5Pj.js → PermissionsPage-f4QaX8oM.js} +1 -1
- package/dist/client/assets/{PersonalityPopover-CHPTuHIH.js → PersonalityPopover-BkZruwF-.js} +1 -1
- package/dist/client/assets/PhotoPage-CmrOIRjf.js +1 -0
- package/dist/client/assets/{PreviewRefusedNotice-BuVUhjq3.js → PreviewRefusedNotice-BXC2K0tx.js} +1 -1
- package/dist/client/assets/{ProfileFields-DimHNpR4.js → ProfileFields-BebX5oiv.js} +1 -1
- package/dist/client/assets/{ProfilePanelContainer-FRZ5Px2L.js → ProfilePanelContainer-DZoL65zQ.js} +1 -1
- package/dist/client/assets/{ProfileRolePicker-UWhM5yuR.js → ProfileRolePicker-D9H7wsuT.js} +1 -1
- package/dist/client/assets/{PromptSuggestionChips-DQaDSd7Y.js → PromptSuggestionChips-B5fDmc-g.js} +1 -1
- package/dist/client/assets/{ReportsToPopover-BOuCM8il.js → ReportsToPopover-uVYhSqj7.js} +1 -1
- package/dist/client/assets/{RoomSurface-Dhv-LkWz.js → RoomSurface-Bg5WV4Ep.js} +7 -7
- package/dist/client/assets/{RoomsPage-glKYJBpq.js → RoomsPage-yflYFulU.js} +1 -1
- package/dist/client/assets/{RunsOnPopover-BvxoHUeo.js → RunsOnPopover-DtGrX1Vq.js} +1 -1
- package/dist/client/assets/{RuntimeConnectFlow-CgB_X5wo.js → RuntimeConnectFlow-DjReuQ-T.js} +1 -1
- package/dist/client/assets/{RuntimeSetupDialog-r1Ss_YQW.js → RuntimeSetupDialog-Cr4GRi8c.js} +1 -1
- package/dist/client/assets/SeenDevices-SPWkdzoK.js +19 -0
- package/dist/client/assets/{SessionsPage-CFLDx-aF.js → SessionsPage-BWu-en78.js} +1 -1
- package/dist/client/assets/SettingsDialog-_dEXUhHe.js +12 -0
- package/dist/client/assets/{SkillsPage-CUQZ4I_r.js → SkillsPage-BdUb9SZy.js} +1 -1
- package/dist/client/assets/TaskDialogWrapper-qYJPEoSR.js +1 -0
- package/dist/client/assets/{TasksEmptyState-B4TjUm8G.js → TasksEmptyState-Bgcg9vxF.js} +2 -2
- package/dist/client/assets/{TasksPage-D_vFBDA1.js → TasksPage-Ch5W2WQS.js} +1 -1
- package/dist/client/assets/{TeamComputerEntry-EQ1fjMRb.js → TeamComputerEntry-CPwSIMRw.js} +1 -1
- package/dist/client/assets/ToolsPage-Idimrn3o.js +2 -0
- package/dist/client/assets/{TopologyGraph-DsPEpDjt.js → TopologyGraph-I4_mkMHM.js} +14 -14
- package/dist/client/assets/{TourHost-D1z2mH5S.js → TourHost-BPaSwh9I.js} +1 -1
- package/dist/client/assets/{UnlinkDialog-q-6B4Ftt.js → UnlinkDialog-BUWZUu5P.js} +1 -1
- package/dist/client/assets/{WidgetErrorCard-BYMiUiAf.js → WidgetErrorCard-cS8yMCxU.js} +3 -3
- package/dist/client/assets/_shell-ClVN2pUj.js +80 -0
- package/dist/client/assets/{_shell._home-D-8JcUYq.js → _shell._home-DCA5k-jb.js} +1 -1
- package/dist/client/assets/{_shell._home.activity-xJKxWbtL.js → _shell._home.activity-BX4nFLna.js} +1 -1
- package/dist/client/assets/{_shell._home.index-C74gh1aE.js → _shell._home.index-C8t8cw72.js} +1 -1
- package/dist/client/assets/{_shell._home.tasks-Bh8jwRYJ.js → _shell._home.tasks-BgUeEvhK.js} +1 -1
- package/dist/client/assets/{_shell._home.workspaces-BKkUl6wW.js → _shell._home.workspaces-BPBdnkRt.js} +1 -1
- package/dist/client/assets/_shell.channels-CX4kki7G.js +10 -0
- package/dist/client/assets/_shell.connections-0vP7g7E4.js +1 -0
- package/dist/client/assets/{_shell.feedback-requests-Cdbl3oKj.js → _shell.feedback-requests-TsuaO4eR.js} +2 -2
- package/dist/client/assets/_shell.marketplace-CiL6YRbl.js +1 -0
- package/dist/client/assets/_shell.marketplace_.sources-C0sI8e21.js +1 -0
- package/dist/client/assets/_shell.session-_hhBvFc6.js +63 -0
- package/dist/client/assets/{_shell.team-Consxq97.js → _shell.team-Bm6cOBhR.js} +4 -4
- package/dist/client/assets/_shell.x._extensionId-BWy5v1YE.js +1 -0
- package/dist/client/assets/_shell.x._extensionId_._-BWy5v1YE.js +1 -0
- package/dist/client/assets/{abnfDiagram-WEYOIA3C-DXTlLd8s.js → abnfDiagram-WEYOIA3C-CrvoN15x.js} +1 -1
- package/dist/client/assets/{access-copy-B1SlOYEi.js → access-copy-B3yNZ7Gz.js} +1 -1
- package/dist/client/assets/{arc-B3IW5TXq.js → arc-CuT6QA_y.js} +1 -1
- package/dist/client/assets/{architectureDiagram-ZHVYKT53-Bx-4szWe.js → architectureDiagram-ZHVYKT53-CPXCZ9H4.js} +1 -1
- package/dist/client/assets/{banner-RKoWGrEp.js → banner-DRumuw3F.js} +1 -1
- package/dist/client/assets/{blockDiagram-RJAE7QA3-D_B3EDQ1.js → blockDiagram-RJAE7QA3-CM0rka9p.js} +1 -1
- package/dist/client/assets/{c4Diagram-XDPPPE54-CSBl4ROD.js → c4Diagram-XDPPPE54-D4j2cXRy.js} +1 -1
- package/dist/client/assets/{card-DTMhLU7B.js → card-B3CtfC3R.js} +1 -1
- package/dist/client/assets/channel-DjBlTcCV.js +1 -0
- package/dist/client/assets/{chunk-2E7WHVMD-QSgLcVHQ.js → chunk-2E7WHVMD-KGyqhVpO.js} +1 -1
- package/dist/client/assets/{chunk-2Q5K7J3B-CAEYyBSj.js → chunk-2Q5K7J3B-Dl0BHoqK.js} +1 -1
- package/dist/client/assets/{chunk-4EMNKR2T-CQ_90aiz.js → chunk-4EMNKR2T-Da7vH6Kv.js} +1 -1
- package/dist/client/assets/{chunk-55XCU76K-jsUyUA3N.js → chunk-55XCU76K-DgBUEROO.js} +1 -1
- package/dist/client/assets/{chunk-5VM5RSS4-JHkf15PA.js → chunk-5VM5RSS4-BQ4mn-_I.js} +1 -1
- package/dist/client/assets/{chunk-JWPE2WC7-BT-3krv8.js → chunk-JWPE2WC7-8LPR3mXf.js} +1 -1
- package/dist/client/assets/{chunk-VQ5W62QI-CJP11I5o.js → chunk-VQ5W62QI-BkIVXi4W.js} +1 -1
- package/dist/client/assets/{chunk-XXDRQBXY-BpqBecnj.js → chunk-XXDRQBXY-DQXJx06h.js} +1 -1
- package/dist/client/assets/{chunk-ZCHMQSOR-BLb4KcT4.js → chunk-ZCHMQSOR-DzCE7qlD.js} +2 -2
- package/dist/client/assets/{classDiagram-v2-4MYWR3UA-DwLyYGkw.js → classDiagram-v2-4MYWR3UA-C_cZra7c.js} +1 -1
- package/dist/client/assets/{command-DDSiiJlP.js → command-CDKbyppr.js} +1 -1
- package/dist/client/assets/{cose-bilkent-JH36ORCC-CxYTET88.js → cose-bilkent-JH36ORCC-DlXHdGwT.js} +1 -1
- package/dist/client/assets/{cpu--56q_Ey0.js → cpu-B7xLO7jn.js} +1 -1
- package/dist/client/assets/{cynefin-EF2NZ3EQ-9fHLZRHz.js → cynefin-EF2NZ3EQ-HhP4ArLc.js} +1 -1
- package/dist/client/assets/{cynefinDiagram-WF24UDRP-DpfQecff.js → cynefinDiagram-WF24UDRP-D4GgWnZV.js} +1 -1
- package/dist/client/assets/{dagre-NK4GIZVX-DuV6buEQ.js → dagre-NK4GIZVX-SZ_OI2Zi.js} +1 -1
- package/dist/client/assets/{diagram-CBK3MWTC-B-A9Sx5n.js → diagram-CBK3MWTC-BN-_Ja5m.js} +1 -1
- package/dist/client/assets/{diagram-I5XIIV2D-Ds5Hq9aV.js → diagram-I5XIIV2D-t7AK6xnL.js} +1 -1
- package/dist/client/assets/{diagram-ODIL2UCW-UUfSjM-R.js → diagram-ODIL2UCW-C1V7szSc.js} +1 -1
- package/dist/client/assets/{diagram-PFBEJUXE-CUzSSYf9.js → diagram-PFBEJUXE-DPtraQ2g.js} +1 -1
- package/dist/client/assets/{diagram-RJA3I4VV-Cgp6U3q1.js → diagram-RJA3I4VV-D2XNRB2b.js} +1 -1
- package/dist/client/assets/{diagram-TYUNFSNR-BxVgzMNE.js → diagram-TYUNFSNR-BieaRy38.js} +1 -1
- package/dist/client/assets/{ebnfDiagram-V4P3TTPT-BgDiHzoi.js → ebnfDiagram-V4P3TTPT-Bwki86UY.js} +1 -1
- package/dist/client/assets/{elk-QONTBCTQ-BCCN6mFs.js → elk-QONTBCTQ-WEXSAyHB.js} +1 -1
- package/dist/client/assets/{empty-state-BsA3jcrO.js → empty-state-J-UJ0BUU.js} +1 -1
- package/dist/client/assets/{erDiagram-KYQIGQAA-5RkmUbLz.js → erDiagram-KYQIGQAA-DIKASnoc.js} +1 -1
- package/dist/client/assets/{execution-config-CRkSeCj7.js → execution-config-ILQiJAmy.js} +1 -1
- package/dist/client/assets/{file-Bg_qGvWR.js → file-D40js1Zx.js} +1 -1
- package/dist/client/assets/{file-exclamation-point-BWsLZQVN.js → file-exclamation-point-Dg3ZpiAe.js} +1 -1
- package/dist/client/assets/{file-text-DQThCdY3.js → file-text-DgdvRfMk.js} +1 -1
- package/dist/client/assets/{find-latest-widget-fence-DFpYPIlS.js → find-latest-widget-fence-D4kBWC_1.js} +1 -1
- package/dist/client/assets/{flowDiagram-IUGLLWBU-C2FFT_4u.js → flowDiagram-IUGLLWBU-CoavNw0M.js} +1 -1
- package/dist/client/assets/{form-DjMe15QR.js → form-DlPwEgQH.js} +1 -1
- package/dist/client/assets/{format-cron-Bo3D4N9C.js → format-cron-BrK8RzgT.js} +1 -1
- package/dist/client/assets/{ganttDiagram-R7GPNTJY-BHG-HNDj.js → ganttDiagram-R7GPNTJY-DccKAz7f.js} +1 -1
- package/dist/client/assets/{git-branch-CJ1NlVLY.js → git-branch-BpxhecMq.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-PDYL7XHY-D4bvs6_J.js → gitGraphDiagram-PDYL7XHY-DEbo_dgQ.js} +1 -1
- package/dist/client/assets/{graph-D8MBmHRU.js → graph-DROgI3M3.js} +1 -1
- package/dist/client/assets/{heart-Beze5rli.js → heart-c7u4Ezxt.js} +1 -1
- package/dist/client/assets/{highlighted-body-KPVGNVTW-B-za1R0D.js → highlighted-body-KPVGNVTW-CrATNdTR.js} +1 -1
- package/dist/client/assets/image-lightbox-DE_fHkw-.js +1 -0
- package/dist/client/assets/{image-off-dQCXn9D_.js → image-off-BExgZjfM.js} +2 -2
- package/dist/client/assets/{index-Dbt6ttQb.js → index-2wezsLA_.js} +1 -1
- package/dist/client/assets/index-7jby-RRg.js +1 -0
- package/dist/client/assets/{index-CocSe_I3.js → index-AzyLwYS_.js} +3 -3
- package/dist/client/assets/{index-dnaC3n0i.js → index-B3eeEDWj.js} +4 -4
- package/dist/client/assets/{index-C38pc-JE.js → index-BEkYBuOq.js} +1 -1
- package/dist/client/assets/index-BGqvci3k.js +1 -0
- package/dist/client/assets/{index-BJv8b9cZ.js → index-BVqSmajJ.js} +1 -1
- package/dist/client/assets/{index-Bk6YahnN.js → index-Be0OJLWK.js} +1 -1
- package/dist/client/assets/{index-BTfwunle.js → index-BizvylBV.js} +1 -1
- package/dist/client/assets/{index-CPxcbKL6.js → index-BkoMsjtM.js} +2 -2
- package/dist/client/assets/{index-CxWJDJW7.js → index-BlyoyIck.js} +1 -1
- package/dist/client/assets/{index-hKY0860x.js → index-BqIHtiaE.js} +1 -1
- package/dist/client/assets/{index-DfSOcv9s.js → index-C5or4L_3.js} +1 -1
- package/dist/client/assets/{index-CDm1XkU1.js → index-C7B3eSOP.js} +1 -1
- package/dist/client/assets/{index-vNaWkS8Y.js → index-CD8aw6Jb.js} +1 -1
- package/dist/client/assets/{index-D4mYlxG0.js → index-CT_pFeX_.js} +1 -1
- package/dist/client/assets/{index-BPa0ZczY.js → index-CYy1cjtq.js} +1 -1
- package/dist/client/assets/{index-DFN-GU8r.js → index-CZmqtJWZ.js} +1 -1
- package/dist/client/assets/{index-BMhblg3s.js → index-CbHCZsbE.js} +1 -1
- package/dist/client/assets/{index-Ds-LCBb6.js → index-Ccf1XBTs.js} +1 -1
- package/dist/client/assets/index-Cga0qx1T.js +1033 -0
- package/dist/client/assets/{index-CU-gekzq.js → index-CqPRAM_6.js} +1 -1
- package/dist/client/assets/index-Ct4At33X.js +1 -0
- package/dist/client/assets/{index-CMlVfxJv.js → index-D0eJtRlK.js} +1 -1
- package/dist/client/assets/{index-D_KBdkA4.js → index-D150FXCC.js} +22 -20
- package/dist/client/assets/{index-BqwfU5a7.js → index-D3YeRrne.js} +1 -1
- package/dist/client/assets/index-DCJQGDZk.js +1 -0
- package/dist/client/assets/{index-C9qjJR0B.js → index-DDgOoXP1.js} +1 -1
- package/dist/client/assets/{index-DpX_xwGs.js → index-DINk1YfD.js} +1 -1
- package/dist/client/assets/{index-CAGOE4EU.js → index-DITPwUa9.js} +3 -3
- package/dist/client/assets/{index-DnfhvN3q.js → index-DNGNMW3c.js} +1 -1
- package/dist/client/assets/{index-DNlhbCX_.js → index-DT7pv2iW.js} +1 -1
- package/dist/client/assets/{index-CrflCTqO.css → index-DUZrTFYD.css} +1 -1
- package/dist/client/assets/{index-B3VKw60l.js → index-DaZ1I8s-.js} +1 -1
- package/dist/client/assets/{index-yDf4EVDy.js → index-DeRDq7bD.js} +1 -1
- package/dist/client/assets/{index-BTVsyrd0.js → index-DhHobJd3.js} +1 -1
- package/dist/client/assets/{index-CodC2rG4.js → index-DksjixUS.js} +1 -1
- package/dist/client/assets/{index-CGVRWEpN.js → index-DswGXheF.js} +1 -1
- package/dist/client/assets/{index-BaocSCDH.js → index-DxiRRZRo.js} +1 -1
- package/dist/client/assets/index-F-vqXYqa.js +1 -0
- package/dist/client/assets/{index-B3ybVnXe.js → index-InEBtYxw.js} +7 -7
- package/dist/client/assets/{index-DqD-Sg0W.js → index-J3Hh1MnL.js} +1 -1
- package/dist/client/assets/{index-BMktWriw.js → index-dyAahqKe.js} +1 -1
- package/dist/client/assets/{index-Ckv0K82u.js → index-mwf7ZNk2.js} +1 -1
- package/dist/client/assets/{index.esm-Ruqz-OsH.js → index.esm-BFJ9SG0n.js} +1 -1
- package/dist/client/assets/{infoDiagram-MVDRKAX5-CmDlX3lx.js → infoDiagram-MVDRKAX5-VL8q5pKx.js} +1 -1
- package/dist/client/assets/{inline-code-plzdKGm9.js → inline-code-BE9ckzPs.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-HPEHV2GE-DZFRAvrx.js → ishikawaDiagram-HPEHV2GE-BLKkPYF-.js} +1 -1
- package/dist/client/assets/{journeyDiagram-BOSHW7O7-B140KXYu.js → journeyDiagram-BOSHW7O7-CSYpRobu.js} +1 -1
- package/dist/client/assets/{kanban-definition-FNSA4HC5-QCZgRJic.js → kanban-definition-FNSA4HC5-HilAqtZo.js} +1 -1
- package/dist/client/assets/{layers-Br3LALac.js → layers-Cm7coqdo.js} +1 -1
- package/dist/client/assets/{lightbulb-CeJgUDoT.js → lightbulb-DqdWS75d.js} +1 -1
- package/dist/client/assets/{link-2-BXcZwTAC.js → link-2-CDJapTSa.js} +1 -1
- package/dist/client/assets/{list-runtime-types-CqKIrt9D.js → list-runtime-types-CP82p1u4.js} +1 -1
- package/dist/client/assets/{markdown-content-BKbjOTI2.js → markdown-content-m_qereFc.js} +1 -1
- package/dist/client/assets/{mention-pill-B-FgNE6o.js → mention-pill-DV5HIG5Q.js} +1 -1
- package/dist/client/assets/{mermaid.core-Br9hJ7FR.js → mermaid.core-zxW6MBr-.js} +4 -4
- package/dist/client/assets/{message-square-off-Co0W--np.js → message-square-off-YVtpbaJ0.js} +1 -1
- package/dist/client/assets/{mindmap-definition-6OY57UG3-BxjSZAec.js → mindmap-definition-6OY57UG3-IAYemvOg.js} +1 -1
- package/dist/client/assets/{more-details-BsdCkGTg.js → more-details-ReA2ZFBn.js} +1 -1
- package/dist/client/assets/{owner-notice-BxltHzJH.js → owner-notice-M4hn_1ep.js} +1 -1
- package/dist/client/assets/{package-DPgmy9lP.js → package-CUuTl39E.js} +1 -1
- package/dist/client/assets/{page-container-HokGbFg_.js → page-container-BnmNikNZ.js} +1 -1
- package/dist/client/assets/{paperclip-BDnApT-_.js → paperclip-C6fYq5Zf.js} +1 -1
- package/dist/client/assets/{path-input-C22n3ghr.js → path-input-DHn9-XaE.js} +1 -1
- package/dist/client/assets/{pegDiagram-ECIUJNBX-utA2pUiu.js → pegDiagram-ECIUJNBX-CojaUwe7.js} +1 -1
- package/dist/client/assets/{pieDiagram-GNMPY74T-DjEry_VP.js → pieDiagram-GNMPY74T-CjP3pw6V.js} +1 -1
- package/dist/client/assets/{plug-tLTAmXis.js → plug-DHQcxt7N.js} +1 -1
- package/dist/client/assets/primer-trigger-BmV5wjek.js +3 -0
- package/dist/client/assets/{profile-errors-Dvm4O6MR.js → profile-errors-BSCuj3rT.js} +1 -1
- package/dist/client/assets/{progress-BduTwXMX.js → progress-4FQQfnS6.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-D57K4MC3-DO9NgnEq.js → quadrantDiagram-D57K4MC3-OP0Z8zcR.js} +1 -1
- package/dist/client/assets/{query-error-state-puwJHnzi.js → query-error-state-BkUdxenP.js} +1 -1
- package/dist/client/assets/{radio-DR4E05zZ.js → radio-ta5Bw763.js} +1 -1
- package/dist/client/assets/{railroadDiagram-Y72NRBL7-BTilAS9p.js → railroadDiagram-Y72NRBL7-CT3NCb9b.js} +1 -1
- package/dist/client/assets/registry-Dc102rws.js +1 -0
- package/dist/client/assets/{relay-trace-schemas-DwqIIDB9.js → relay-trace-schemas-DwUuyxao.js} +2 -2
- package/dist/client/assets/{requirementDiagram-EQYSW5RA-C6rzY7GK.js → requirementDiagram-EQYSW5RA-tde4lYGp.js} +1 -1
- package/dist/client/assets/{room-files-source-Duo4oiqX.js → room-files-source-CZWhaaOy.js} +2 -2
- package/dist/client/assets/{rotate-ccw-clock-RJuoRE3k.js → rotate-ccw-clock-RfbbgUa4.js} +1 -1
- package/dist/client/assets/{rotate-cw-C0EpbK5k.js → rotate-cw-B3rB_YSw.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-SY24JHO5-BqpJRY1t.js → sankeyDiagram-SY24JHO5-sdCzIA7-.js} +1 -1
- package/dist/client/assets/{scroll-area-07T90PR6.js → scroll-area-B4WB7Q40.js} +1 -1
- package/dist/client/assets/{search-x-DQabogEL.js → search-x-DCUmWW2_.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-BLEHNHQU-BHfzZpFt.js → sequenceDiagram-BLEHNHQU-DvzTJcKu.js} +1 -1
- package/dist/client/assets/{shield-x-Cuo1GTv4.js → shield-x-CANziVLc.js} +1 -1
- package/dist/client/assets/signed-in-DctJ2IWe.js +1 -0
- package/dist/client/assets/{sizeCapture-INFHLROL-U0MO-4ua.js → sizeCapture-INFHLROL-DuDA7TKE.js} +1 -1
- package/dist/client/assets/{soul-file-wKTqbR0Y.js → soul-file-Co_8f1qw.js} +1 -1
- package/dist/client/assets/{stateDiagram-v2-A6IESKWZ-fzo1sDsX.js → stateDiagram-v2-A6IESKWZ-BJPX5JTC.js} +1 -1
- package/dist/client/assets/{swimlanes-B3ENRKFQ-B7QcCUBU.js → swimlanes-B3ENRKFQ-CiLSffGv.js} +1 -1
- package/dist/client/assets/swimlanesDiagram-AYQRV4AK-Dv1-QS9J.js +8 -0
- package/dist/client/assets/{table-BjHA85BX.js → table-BSAvOYPp.js} +1 -1
- package/dist/client/assets/{terminal-qfxxVZaa.js → terminal-6CdY-T1V.js} +1 -1
- package/dist/client/assets/{timeline-definition-JXYKGLGB-okVlmef4.js → timeline-definition-JXYKGLGB-5oq8sl82.js} +1 -1
- package/dist/client/assets/{trust-posture-BmW0KVP6.js → trust-posture-D-Yjm6ot.js} +1 -1
- package/dist/client/assets/{unplug-BYKBdSMl.js → unplug-Bq_1WdV7.js} +1 -1
- package/dist/client/assets/{unverified-catalog-notice-CQHA4Cst.js → unverified-catalog-notice-CEzu54YH.js} +1 -1
- package/dist/client/assets/{use-adapter-catalog-rB4qQQ5D.js → use-adapter-catalog-Tn3ZbPAj.js} +1 -1
- package/dist/client/assets/{use-bindings-DiFC7kWg.js → use-bindings-Bz9YRgO7.js} +1 -1
- package/dist/client/assets/{use-composer-prefs-DHY5vJ0l.js → use-composer-prefs-D9oKJSQN.js} +1 -1
- package/dist/client/assets/{use-connector-management-CoinXIID.js → use-connector-management-CLYFraXN.js} +1 -1
- package/dist/client/assets/{use-deep-link-scroll-Cm8BRFAE.js → use-deep-link-scroll-DkS713kG.js} +1 -1
- package/dist/client/assets/{use-delete-binding-FtM6qPfF.js → use-delete-binding-CukKpHBK.js} +1 -1
- package/dist/client/assets/{use-dev-links-TQFCV3vk.js → use-dev-links-DQ32IcGe.js} +1 -1
- package/dist/client/assets/{use-external-adapter-catalog-Lx8LZDAa.js → use-external-adapter-catalog-D-FO_XW6.js} +1 -1
- package/dist/client/assets/{use-full-activity-feed-CmcBAvUM.js → use-full-activity-feed-BNxcyb1j.js} +1 -1
- package/dist/client/assets/use-is-below-desktop-gTvJDvw4.js +1 -0
- package/dist/client/assets/use-is-hub-B1vPpkYU.js +1 -0
- package/dist/client/assets/{use-jump-back-in-V8G_6fYj.js → use-jump-back-in-Bibj5tVk.js} +3 -3
- package/dist/client/assets/{use-local-browser-CbS4typW.js → use-local-browser-xg7WXAVK.js} +1 -1
- package/dist/client/assets/{use-mesh-topology-DZ1qMT3J.js → use-mesh-topology-BgCSFw8s.js} +1 -1
- package/dist/client/assets/{use-mounted-ref-DUbNzP-m.js → use-mounted-ref-qRbdZfOU.js} +1 -1
- package/dist/client/assets/{use-notification-prefs-BAsICJ96.js → use-notification-prefs-B-4kZR7I.js} +1 -1
- package/dist/client/assets/{use-panel-tab-placements-ymrpuL_s.js → use-panel-tab-placements-CCq-mZlY.js} +1 -1
- package/dist/client/assets/use-pending-read-C8L_v4Zw.js +1 -0
- package/dist/client/assets/{use-personality-commit-rJOmDgC2.js → use-personality-commit-DwSisUfF.js} +1 -1
- package/dist/client/assets/{use-promo-activation-BKeBloMI.js → use-promo-activation-Botoso6l.js} +3 -3
- package/dist/client/assets/{use-promo-dismissals-Cio8QMjL.js → use-promo-dismissals-RJXp-r_J.js} +1 -1
- package/dist/client/assets/{use-pulse-freshness-DZkMVbSM.js → use-pulse-freshness-B3390hGg.js} +1 -1
- package/dist/client/assets/{use-relay-config-CbZQKFhZ.js → use-relay-config-BV0xcLwS.js} +1 -1
- package/dist/client/assets/{use-room-follow-claim-DbJIsuWz.js → use-room-follow-claim-Du4hKHIJ.js} +1 -1
- package/dist/client/assets/{use-roving-tab-list-B4nZ7trj.js → use-roving-tab-list-g2hO6Ruz.js} +1 -1
- package/dist/client/assets/{use-session-canvas-sAwc2L1A.js → use-session-canvas-i30oMO_Q.js} +3 -3
- package/dist/client/assets/{use-session-diagnostics-0gcI762B.js → use-session-diagnostics-a4b83F5J.js} +2 -2
- package/dist/client/assets/{use-unclaimed-chats-BWIqOrvs.js → use-unclaimed-chats-B92om889.js} +1 -1
- package/dist/client/assets/use-update-config-Tbn3SodN.js +1 -0
- package/dist/client/assets/{useMutationState-C9Q5lRej.js → useMutationState-DdOGdpjP.js} +1 -1
- package/dist/client/assets/{usecaseDiagram-WPOLBNNX-CMjVaeX9.js → usecaseDiagram-WPOLBNNX-Di5pJvcw.js} +1 -1
- package/dist/client/assets/{vennDiagram-Q3Y3IDCW-BajZBf0H.js → vennDiagram-Q3Y3IDCW-K7KAf26T.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-IVAIDKWA-BN4xF6JT.js → wardleyDiagram-IVAIDKWA-DVTaxQt9.js} +1 -1
- package/dist/client/assets/{xychartDiagram-4URNHDU4-Cy0Z9a28.js → xychartDiagram-4URNHDU4-x-lSJm_B.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/drizzle/20261018123612_session_route.sql +1 -0
- package/dist/drizzle/20261018210140_remote_command_agent_computer_kind.sql +21 -0
- package/dist/drizzle/20261019142317_turn_marks.sql +3 -0
- package/dist/drizzle/meta/20261018123612_snapshot.json +14027 -0
- package/dist/drizzle/meta/20261018210140_snapshot.json +14027 -0
- package/dist/drizzle/meta/20261019142317_snapshot.json +14048 -0
- package/dist/drizzle/meta/_journal.json +21 -0
- package/dist/server/index.js +25295 -21133
- package/dist/server/index.js.map +2 -2
- package/package.json +5 -5
- package/dist/client/assets/HandlePage-BoBFGnUB.js +0 -1
- package/dist/client/assets/McpSigninBody-ZmmY1BZ4.js +0 -1
- package/dist/client/assets/NamePage-bC_9FOtD.js +0 -1
- package/dist/client/assets/OperatorIdentityForm-BdAqzVEG.js +0 -1
- package/dist/client/assets/PermissionHistory-IOgLQ7qN.js +0 -1
- package/dist/client/assets/PhotoPage-BOe3xwyN.js +0 -1
- package/dist/client/assets/PresetPicker-BcKF2ds8.js +0 -19
- package/dist/client/assets/SettingsDialog-BT5rYJUm.js +0 -12
- package/dist/client/assets/TaskDialogWrapper-DWpxyxBb.js +0 -1
- package/dist/client/assets/ToolsPage-CyNXCe2l.js +0 -2
- package/dist/client/assets/_shell-scIpUrVY.js +0 -80
- package/dist/client/assets/_shell.channels-B2A1G9n8.js +0 -10
- package/dist/client/assets/_shell.connections-eDlPXmuG.js +0 -1
- package/dist/client/assets/_shell.marketplace-FHQpZxgB.js +0 -1
- package/dist/client/assets/_shell.marketplace_.sources-DXv90Z-v.js +0 -1
- package/dist/client/assets/_shell.session-BNeYm91q.js +0 -63
- package/dist/client/assets/_shell.x._extensionId-DirEl_qN.js +0 -1
- package/dist/client/assets/_shell.x._extensionId_._-DirEl_qN.js +0 -1
- package/dist/client/assets/channel-BlEJg4XA.js +0 -1
- package/dist/client/assets/image-lightbox-a4gqhNXS.js +0 -1
- package/dist/client/assets/index--vwACals.js +0 -1
- package/dist/client/assets/index-BydIKjk5.js +0 -1
- package/dist/client/assets/index-D18FqQKB.js +0 -1
- package/dist/client/assets/index-DBdO-_iL.js +0 -1023
- package/dist/client/assets/index-DLdpa3d4.js +0 -1
- package/dist/client/assets/index-vieeLeZH.js +0 -1
- package/dist/client/assets/primer-trigger-CfVHNFbe.js +0 -3
- package/dist/client/assets/registry-B3Ss4ItQ.js +0 -1
- package/dist/client/assets/shield-check-DbbCy17l.js +0 -6
- package/dist/client/assets/signed-in-CFtA8gTK.js +0 -1
- package/dist/client/assets/swimlanesDiagram-AYQRV4AK-CgZZnzbW.js +0 -8
- package/dist/client/assets/use-is-below-desktop-BB9kHnYm.js +0 -1
- package/dist/client/assets/use-is-hub-ab4UGRdN.js +0 -1
- package/dist/client/assets/use-pending-read-BkCvAuX4.js +0 -1
- package/dist/client/assets/use-update-config-DTL7WyZV.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var De=Object.defineProperty;var Ie=(t,n,s)=>n in t?De(t,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[n]=s;var U=(t,n,s)=>Ie(t,typeof n!="symbol"?n+"":n,s);import{W as N,a1 as P,
|
|
1
|
+
var De=Object.defineProperty;var Ie=(t,n,s)=>n in t?De(t,n,{enumerable:!0,configurable:!0,writable:!0,value:s}):t[n]=s;var U=(t,n,s)=>Ie(t,typeof n!="symbol"?n+"":n,s);import{W as N,a1 as P,ie as ze,r as f,aM as Me,ig as X,aK as Se,j as e,hO as O,ih as Te,g as B,ii as H,ij as V,G as F,ik as Ae,il as Fe,X as Oe,im as _e,B as C,dA as Ee,ar as T,aN as Le,io as Ue,fu as $e,ip as Pe,iq as Be,ir as He,is as Ve,it as Ye,iu as Z,J as Ke,a3 as We,h7 as ne,aW as y,iv as qe,iw as Ge,ix as Je,a7 as ee,iy as Qe,iz as Xe,iA as Ze}from"./index-Cga0qx1T.js";import{u as et}from"./use-roving-tab-list-g2hO6Ruz.js";import{F as se,c as tt,d as te,e as nt,R as st,C as ae}from"./use-session-canvas-i30oMO_Q.js";import{f as un,g as mn,h as pn,b as hn,i as fn}from"./use-session-canvas-i30oMO_Q.js";import{A as at}from"./McpAppFrame-C7eYYdI9.js";import{F as ot}from"./file-D40js1Zx.js";import{F as oe}from"./file-text-DgdvRfMk.js";import{R as rt}from"./rotate-cw-B3rB_YSw.js";import{u as it}from"./use-room-follow-claim-Du4hKHIJ.js";import{c as lt,F as ct}from"./room-files-source-CZWhaaOy.js";import"./query-keys-DeYqUDia.js";import"./index.esm-BFJ9SG0n.js";import"./WidgetErrorCard-cS8yMCxU.js";import"./index-F-vqXYqa.js";import"./card-B3CtfC3R.js";import"./progress-4FQQfnS6.js";import"./markdown-content-m_qereFc.js";import"./table-BSAvOYPp.js";import"./terminal-6CdY-T1V.js";import"./package-CUuTl39E.js";import"./heart-c7u4Ezxt.js";import"./git-branch-BpxhecMq.js";import"./more-details-ReA2ZFBn.js";import"./file-exclamation-point-Dg3ZpiAe.js";/**
|
|
2
2
|
* @license lucide-react v1.48.0 - ISC
|
|
3
3
|
*
|
|
4
4
|
* This source code is licensed under the ISC license.
|
|
@@ -33,6 +33,6 @@ var De=Object.defineProperty;var Ie=(t,n,s)=>n in t?De(t,n,{enumerable:!0,config
|
|
|
33
33
|
*
|
|
34
34
|
* This source code is licensed under the ISC license.
|
|
35
35
|
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/const pe={name:"table",size:24,node:[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]};pe.node;const ft=N(pe);function xt(t){const n=P(),{roomId:s,viewerAuthorId:r,documentId:i,url:u,readScrollY:m,subscribe:d}=t,a=ze(s,r),b=f.useRef({roomId:s,documentId:i,url:u,readScrollY:m});b.current={roomId:s,documentId:i,url:u,readScrollY:m};const x=f.useRef(null),p=f.useRef(0);f.useEffect(()=>{if(!a||s===null||i===null)return;const j=()=>{x.current=null,p.current=Date.now();const g=b.current;if(g.roomId===null||g.documentId===null)return;const R=g.roomId,E={documentId:g.documentId,...g.url!==void 0?{url:g.url}:{},...g.readScrollY?{scrollY:Math.max(0,Math.round(g.readScrollY()))}:{}};n.publishRoomView(R,E).then(L=>{!L.followed&&r!==null&&Se.getState().noteNobodyFollowing(R,r)}).catch(()=>{})},k=()=>{if(x.current!==null)return;const g=Date.now()-p.current;if(g>=X){j();return}x.current=setTimeout(j,X-g)};k();const c=d==null?void 0:d(k),_=setInterval(k,Me);return()=>{clearInterval(_),c==null||c()}},[n,a,s,r,i,u,d]),f.useEffect(()=>()=>{x.current!==null&&clearTimeout(x.current)},[])}const yt={url:O,markdown:oe,json:le,image:ht,pdf:ot,widget:Te,mcp_app:at,file:se,model3d:dt,audio:ut,video:mt,csv:ft,browser:O,diff:pt},vt="after:absolute after:inset-x-0 after:-inset-y-2 md:after:hidden";function Y(t){return t==="browser"?"browser-panel":"canvas-panel"}const gt={canvas:"Open canvas documents",browser:"Open browser pages"};function K(t){return`canvas-tab-${t}`}const bt=3;function jt(t){const n=t.map(r=>r.displayName);if(n.length===0)return null;if(n.length===1)return`${n[0]} is looking at this.`;if(n.length===2)return`${n[0]} and ${n[1]} are looking at this.`;const s=n.length-2;return`${n[0]}, ${n[1]} and ${s} ${s===1?"other":"others"} are looking at this.`}function kt({watchers:t}){const n=jt(t);if(n===null)return null;const s=t.slice(0,bt),r=t.length-s.length;return e.jsxs(e.Fragment,{children:[e.jsxs("span",{"data-slot":"canvas-tab-watchers","aria-hidden":!0,className:"flex shrink-0 -space-x-1",children:[s.map(i=>e.jsx(B,{size:"xs",className:"ring-background text-3xs size-3.5 ring-1",kind:i.kind,color:i.color??V(i.id),emoji:i.emoji,imageUrl:i.imageUrl,badge:null,fallback:H(i.displayName)},i.id)),r>0&&e.jsxs("span",{className:"bg-muted text-muted-foreground ring-background text-3xs flex size-3.5 shrink-0 items-center justify-center rounded-full ring-1",children:["+",r]})]}),e.jsx("span",{className:"sr-only",children:n})]})}function he({view:t,documents:n,activeDocumentId:s,onActivate:r,onClose:i,onPin:u}){const m=Y(t),{getTabProps:d}=et({orderedIds:n.map(a=>a.id),activeId:s,onActivate:a=>r(a),onClose:a=>i(a),getFallbackFocus:()=>document.getElementById(m)});return n.length===0?null:e.jsx("div",{role:"tablist","aria-label":gt[t],className:"flex items-stretch gap-1 overflow-x-auto border-b px-2 py-1",children:n.map(a=>{const b=yt[a.contentType],x=a.id===s,p=a.author;return e.jsxs("div",{role:"presentation",className:"group relative flex shrink-0",children:[e.jsxs("button",{type:"button",role:"tab","aria-selected":x,id:K(a.id),"aria-controls":x?m:void 0,...d(a.id),className:
|
|
36
|
+
*/const pe={name:"table",size:24,node:[["path",{d:"M12 3v18",key:"108xh3"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M3 9h18",key:"1pudct"}],["path",{d:"M3 15h18",key:"5xshup"}]]};pe.node;const ft=N(pe);function xt(t){const n=P(),{roomId:s,viewerAuthorId:r,documentId:i,url:u,readScrollY:m,subscribe:d}=t,a=ze(s,r),b=f.useRef({roomId:s,documentId:i,url:u,readScrollY:m});b.current={roomId:s,documentId:i,url:u,readScrollY:m};const x=f.useRef(null),p=f.useRef(0);f.useEffect(()=>{if(!a||s===null||i===null)return;const j=()=>{x.current=null,p.current=Date.now();const g=b.current;if(g.roomId===null||g.documentId===null)return;const R=g.roomId,E={documentId:g.documentId,...g.url!==void 0?{url:g.url}:{},...g.readScrollY?{scrollY:Math.max(0,Math.round(g.readScrollY()))}:{}};n.publishRoomView(R,E).then(L=>{!L.followed&&r!==null&&Se.getState().noteNobodyFollowing(R,r)}).catch(()=>{})},k=()=>{if(x.current!==null)return;const g=Date.now()-p.current;if(g>=X){j();return}x.current=setTimeout(j,X-g)};k();const c=d==null?void 0:d(k),_=setInterval(k,Me);return()=>{clearInterval(_),c==null||c()}},[n,a,s,r,i,u,d]),f.useEffect(()=>()=>{x.current!==null&&clearTimeout(x.current)},[])}const yt={url:O,markdown:oe,json:le,image:ht,pdf:ot,widget:Te,mcp_app:at,file:se,model3d:dt,audio:ut,video:mt,csv:ft,browser:O,diff:pt},vt="after:absolute after:inset-x-0 after:-inset-y-2 md:after:hidden";function Y(t){return t==="browser"?"browser-panel":"canvas-panel"}const gt={canvas:"Open canvas documents",browser:"Open browser pages"};function K(t){return`canvas-tab-${t}`}const bt=3;function jt(t){const n=t.map(r=>r.displayName);if(n.length===0)return null;if(n.length===1)return`${n[0]} is looking at this.`;if(n.length===2)return`${n[0]} and ${n[1]} are looking at this.`;const s=n.length-2;return`${n[0]}, ${n[1]} and ${s} ${s===1?"other":"others"} are looking at this.`}function kt({watchers:t}){const n=jt(t);if(n===null)return null;const s=t.slice(0,bt),r=t.length-s.length;return e.jsxs(e.Fragment,{children:[e.jsxs("span",{"data-slot":"canvas-tab-watchers","aria-hidden":!0,className:"flex shrink-0 -space-x-1",children:[s.map(i=>e.jsx(B,{size:"xs",className:"ring-background text-3xs size-3.5 ring-1",kind:i.kind,color:i.color??V(i.id),emoji:i.emoji,imageUrl:i.imageUrl,badge:null,fallback:H(i.displayName)},i.id)),r>0&&e.jsxs("span",{className:"bg-muted text-muted-foreground ring-background text-3xs flex size-3.5 shrink-0 items-center justify-center rounded-full ring-1",children:["+",r]})]}),e.jsx("span",{className:"sr-only",children:n})]})}function he({view:t,documents:n,activeDocumentId:s,onActivate:r,onClose:i,onPin:u}){const m=Y(t),{getTabProps:d}=et({orderedIds:n.map(a=>a.id),activeId:s,onActivate:a=>r(a),onClose:a=>i(a),getFallbackFocus:()=>document.getElementById(m)});return n.length===0?null:e.jsx("div",{role:"tablist","aria-label":gt[t],className:"flex items-stretch gap-1 overflow-x-auto border-b px-2 py-1",children:n.map(a=>{const b=yt[a.contentType],x=a.id===s,p=a.author;return e.jsxs("div",{role:"presentation",className:"group relative flex shrink-0",children:[e.jsxs("button",{type:"button",role:"tab","aria-selected":x,id:K(a.id),"aria-controls":x?m:void 0,...d(a.id),className:F("focus-ring flex items-center gap-1.5 rounded-md py-3 pl-2 text-xs transition-colors md:py-1",u?"pr-12":"pr-7",x?"bg-muted text-foreground":"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),children:[p&&e.jsx(B,{"aria-hidden":!0,size:"xs",className:"text-3xs size-3.5 shrink-0",kind:p.kind,color:p.color??V(p.id),emoji:p.emoji,imageUrl:p.imageUrl,badge:null,fallback:H(p.displayName)}),e.jsx(b,{className:"size-3.5 shrink-0"}),e.jsx("span",{className:"max-w-40 truncate font-medium",children:a.sourceLabel}),a.watchers&&a.watchers.length>0&&e.jsx(kt,{watchers:a.watchers}),a.unread&&e.jsx("span",{"data-slot":"canvas-tab-unread","aria-hidden":!0,className:"bg-primary size-1.5 shrink-0 rounded-full"})]}),u&&e.jsx("button",{type:"button",tabIndex:-1,onClick:()=>u(a.id,!a.pinned),"aria-label":a.pinned?`Unpin ${a.sourceLabel}`:`Pin ${a.sourceLabel}`,className:F("focus-ring hover:bg-background/80 absolute top-1/2 right-6 -translate-y-1/2 rounded-sm p-1.5 transition-opacity md:p-0.5",a.pinned?"opacity-100":"opacity-0 group-hover:opacity-60"),children:a.pinned?e.jsx(Ae,{className:"size-3"}):e.jsx(Fe,{className:"size-3"})}),e.jsx("button",{type:"button",tabIndex:-1,onClick:()=>i(a.id),"aria-label":`Close ${a.sourceLabel}`,className:F("focus-ring hover:bg-background/80 absolute top-1/2 right-1 -translate-y-1/2 rounded-sm p-1.5 opacity-60 transition-opacity group-hover:opacity-100 md:p-0.5",vt),children:e.jsx(Oe,{className:"size-3"})})]},a.id)})})}function wt({error:t,onRetry:n}){const s=_e(t);return e.jsxs("div",{className:"text-muted-foreground flex h-full flex-col items-center justify-center gap-3 p-8 text-center",children:[e.jsx("p",{children:"This tab hit a problem"}),s?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm",children:"The app may have updated. Reloading usually fixes it."}),e.jsx(C,{type:"button",size:"sm",onClick:()=>window.location.reload(),children:"Reload DorkOS"})]}):e.jsxs(C,{type:"button",variant:"outline",size:"sm",onClick:n,children:[e.jsx(rt,{className:"size-4"}),"Try again"]})]})}class fe extends f.Component{constructor(){super(...arguments);U(this,"state",{error:null,retryKey:0});U(this,"handleRetry",()=>{this.setState(s=>({error:null,retryKey:s.retryKey+1}))})}static getDerivedStateFromError(s){return{error:s}}componentDidCatch(s,r){console.error(`[Canvas] Document viewer error (${this.props.documentId}):`,s,r)}render(){const{error:s,retryKey:r}=this.state;return s?e.jsx(wt,{error:s,onRetry:this.handleRetry}):e.jsx(f.Fragment,{children:this.props.children},r)}}function Ct({onReload:t,onKeepMine:n}){return e.jsxs("div",{role:"status",className:"border-border/60 bg-muted/40 mx-2 mt-2 space-y-2 rounded-md border px-3 py-2 text-sm",children:[e.jsx("p",{children:"Your agent changed this while you were editing. Your edit is safe."}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsx(C,{type:"button",variant:"outline",size:"sm",onClick:t,children:"Reload"}),e.jsx(C,{type:"button",variant:"ghost",size:"sm",onClick:n,children:"Keep mine"})]}),e.jsx("p",{className:"text-muted-foreground text-xs",children:"Reload shows its version and ends your edit. Keep mine discards it."})]})}const Nt={canvas:{heading:"A blank canvas",blurb:"Your agent can show documents, data and files here.",actions:[{icon:oe,label:"Markdown",description:"Render a document",action:()=>({type:"markdown",content:`# Untitled
|
|
37
37
|
|
|
38
|
-
Start writing…`,title:"Document"})},{icon:le,label:"JSON",description:"Inspect structured data",action:()=>({type:"json",data:{message:"Your data here"},title:"JSON data"})}]},browser:{heading:"No page open",blurb:"This tab shows web pages: your files, dev servers, or sites from your agent.",actions:[{icon:O,label:"Web page",description:"Open a page, then type any address",action:()=>({type:"url",url:Ue.site,title:"Web Page"})}]}};function $(t,n,s,r){return t.split("").reduce((u,m)=>u+m.charCodeAt(0),0)*(n+1)*7%(r-s)+s}function xe({view:t,onAction:n}){const s=Ee(),r=f.useId(),i=Nt[t],u=f.useMemo(()=>Array.from({length:6},(m,d)=>({x:$(r,d*3,10,90),y:$(r,d*3+1,10,80),size:$(r,d*3+2,24,56),delay:d*.4})),[r]);return e.jsxs("div",{className:"relative flex h-full flex-col items-center justify-center overflow-hidden px-6",children:[!s&&u.map((m,d)=>e.jsx(T.div,{className:"border-border/40 absolute rounded-lg border",style:{left:`${m.x}%`,top:`${m.y}%`,width:m.size,height:m.size},initial:{opacity:0,scale:.6,rotate:-10},animate:{opacity:[0,.15,.08,.15],scale:[.6,1,.9,1],rotate:[-10,0,5,0]},transition:{duration:8,delay:m.delay,repeat:1/0,repeatType:"reverse",ease:"easeInOut"}},d)),e.jsxs(T.div,{className:"relative z-10 flex max-w-sm flex-col items-center gap-6 text-center",initial:s?!1:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.4,ease:"easeOut"},children:[e.jsx(T.div,{className:"bg-muted/50 text-muted-foreground flex size-14 items-center justify-center rounded-2xl",initial:s?!1:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{duration:.3,delay:.1},children:t==="browser"?e.jsx(O,{className:"size-7"}):e.jsx(Le,{className:"size-7"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h2",{className:"text-lg font-semibold tracking-tight",children:i.heading}),e.jsxs("p",{className:"text-muted-foreground text-sm leading-relaxed",children:[i.blurb,e.jsx("br",{}),"Or pick a starting point below."]})]}),e.jsx(T.div,{className:"mt-2 flex w-full flex-col gap-2",initial:"hidden",animate:"visible",variants:s?{}:{visible:{transition:{staggerChildren:.08,delayChildren:.25}}},children:i.actions.map(({icon:m,label:d,description:a,action:b})=>e.jsxs(T.button,{variants:s?{}:{hidden:{opacity:0,y:8},visible:{opacity:1,y:0}},transition:{duration:.25},className:"border-border hover:bg-accent/50 flex items-center gap-3 rounded-lg border px-4 py-3 text-left transition-colors",onClick:()=>n(b()),children:[e.jsx(m,{className:"text-muted-foreground size-4 shrink-0"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("span",{className:"text-sm font-medium",children:d}),e.jsx("span",{className:"text-muted-foreground ml-2 text-xs",children:a})]})]},d))})]})]})}function Rt({sourceLabel:t,people:n,following:s,onFollow:r,onStopFollowing:i,onDiscuss:u,discussing:m=!1}){const d=n.find(a=>a.id===s)??null;return t===void 0&&n.length===0&&u===void 0?null:e.jsxs("div",{className:"text-muted-foreground flex items-center gap-2 border-b px-3 py-1 text-xs",children:[t!==void 0&&e.jsx("span",{className:"min-w-0 flex-1 truncate",children:t}),t===void 0&&e.jsx("span",{className:"flex-1"}),u&&e.jsxs(C,{type:"button",variant:"ghost",size:"sm",className:"h-6 gap-1 px-1.5",disabled:m,onClick:u,children:[e.jsx($e,{className:"size-3.5"}),"Discuss"]}),n.length>0&&e.jsxs(Pe,{children:[e.jsx(Be,{asChild:!0,children:e.jsxs(C,{type:"button",variant:"ghost",size:"sm",className:A("h-6 gap-1 px-1.5",d&&"text-foreground"),children:[e.jsx(He,{className:"size-3.5"}),d?`Following ${d.displayName}`:"Follow"]})}),e.jsxs(Ve,{align:"end",children:[e.jsx(Ye,{children:"Follow somebody’s browser"}),n.map(a=>e.jsxs(Z,{onSelect:()=>a.id===s?i():r(a.id),children:[e.jsx(B,{"aria-hidden":!0,size:"xs",className:"size-4 shrink-0 text-[9px]",kind:a.kind,color:a.color??V(a.id),emoji:a.emoji,imageUrl:a.imageUrl,badge:null,fallback:H(a.displayName)}),e.jsx("span",{className:"min-w-0 flex-1 truncate",children:a.displayName}),a.id===s&&e.jsx(Ke,{className:"size-3.5 shrink-0"})]},a.id)),d&&e.jsx(Z,{onSelect:i,children:"Stop following"})]})]})]})}function Dt({roomId:t,document:n,reading:s}){const r=P(),i=We(),[u,m]=f.useState(null),d=f.useMemo(()=>lt({transport:r,queryClient:i,roomId:t}),[r,i,t]);return e.jsxs("div",{className:"flex h-full items-start justify-center p-6",children:[e.jsxs("div",{className:"bg-card shadow-soft w-full max-w-md space-y-3 rounded-lg border p-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(se,{className:"text-muted-foreground size-4 shrink-0"}),e.jsx("span",{className:"truncate text-sm font-medium",children:n.title||s.sourcePath})]}),e.jsx("p",{className:"text-muted-foreground font-mono text-xs break-all",children:s.sourcePath}),s.kind==="elsewhere"?e.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:s.sentence}):e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:"A room file. Each save is recorded with your name."}),e.jsx(C,{type:"button",size:"sm",onClick:()=>m(s.sourcePath),children:"Open file"})]})]}),s.kind==="room-file"&&e.jsx(ct,{source:d,path:u,onClose:()=>m(null)})]})}const It=["image","pdf","audio","video","csv","model3d"];function zt(t){return/^(https?:|data:)/.test(t)}function Mt(t){if(t.type==="file"||t.type==="diff")return t.sourcePath;if(t.type==="markdown")return t.sourcePath??null;if(It.includes(t.type)){const n=t.src;return zt(n)?null:n}return null}function St(t){return t.type==="file"||t.type==="diff"||t.type==="markdown"}function Tt(t){const n=/^(?:in )?(.+?)['’]s /.exec(t.sourceLabel??"");return(n==null?void 0:n[1])??"another member"}function Ft(t){const n=Mt(t.content);if(n===null)return{kind:"inline"};if(t.treeKind==="room-main"||t.treeKind===void 0)return St(t.content)?{kind:"room-file",sourcePath:n}:{kind:"elsewhere",sourcePath:n,sentence:"This file is in the room’s files. Open it from Files in the Room tab."};if(t.content.type==="diff"&&t.treeKind==="worktree"&&typeof t.aheadOfMain=="number"&&t.aheadOfMain>0)return{kind:"worktree-diff",sourcePath:n,content:t.content};if(t.content.type==="markdown")return{kind:"inline"};const s=Tt(t);return{kind:"elsewhere",sourcePath:n,sentence:`${s.charAt(0).toUpperCase()}${s.slice(1)}’s project isn’t open to you. Ask them to share it, or open your copy.`}}function At(t){return t.title||t.contentType}function Ot({roomId:t,document:n,onUpdate:s}){const r=Ft(n);return r.kind==="worktree-diff"?e.jsx(Xe,{roomId:t,content:r.content,documentId:n.id,authorId:n.authorId}):r.kind!=="inline"?e.jsx(Dt,{roomId:t,document:n,reading:r}):n.content.type==="markdown"?e.jsx(st,{roomId:t,document:n,content:n.content,onSave:s}):e.jsx(ae,{documentId:n.id,content:n.content,onContentChange:()=>{}})}function ye({roomId:t,view:n}){var J;const s=ne(),r=y(o=>o.roomCanvasDocuments[t]),i=y(o=>{var l;return((l=o.roomCanvasActive[t])==null?void 0:l[n])??null}),u=y(o=>{var l;return(l=o.roomCanvasUnread[t])==null?void 0:l[n]}),m=y(o=>o.activateRoomCanvasDocument),d=y(o=>o.clearRoomCanvasUnread),a=y(o=>o.roomCanvasPresence[t]),b=tt(t),x=qe(t),p=P(),j=((J=x.data)==null?void 0:J.viewerAuthorId)??null,k=y(o=>o.roomCanvasEditing[t]??null),c=Je(o=>o.openThread),[_,g]=f.useState(!1),R=n==="browser"?t:null,{following:E,follow:L,stop:ge}=it(R),w=Ge(R),I=f.useRef(null),F=f.useCallback(async(o,l)=>{try{return await l(),!0}catch(M){return ee.error(o,{description:te(M)}),!1}},[]),z=f.useMemo(()=>Qe(r??[],n),[r,n]),v=z.find(o=>o.id===i)??null,W=(u==null?void 0:u.length)??0;f.useEffect(()=>{W>0&&d(t,n)},[W,d,t,n]);const be=f.useMemo(()=>{var G;const o=new Map(((G=x.data)==null?void 0:G.members.map(h=>[h.author.id,h.author]))??[]),l=h=>({id:h.id,displayName:h.displayName,kind:h.kind,...h.emoji?{emoji:h.emoji}:{},...h.color?{color:h.color}:{},...h.imageUrl?{imageUrl:h.imageUrl}:{}}),M=new Map;for(const[h,S]of Object.entries(a??{})){if(h===j)continue;const D=o.get(h);if(!D)continue;const Q=M.get(S);Q?Q.push(l(D)):M.set(S,[l(D)])}return z.map(h=>{const S=o.get(h.authorId),D=M.get(h.id);return{id:h.id,sourceLabel:At(h),contentType:h.content.type,pinned:h.pinned,unread:(u==null?void 0:u.includes(h.id))??!1,...S?{author:l(S)}:{},...D?{watchers:D}:{}}})},[z,x.data,u,a,j]);nt(t,(v==null?void 0:v.id)??null);const je=f.useMemo(()=>{var o;return(((o=x.data)==null?void 0:o.members)??[]).map(l=>l.author).filter(l=>l.kind==="human"&&l.id!==j).map(l=>({id:l.id,displayName:l.displayName,kind:l.kind,emoji:l.emoji,color:l.color,imageUrl:l.imageUrl}))},[x.data,j]),ke=y(o=>{if(i===null)return;const l=o.browserHistories[i];return l?l.stack[l.cursor]:void 0}),we=f.useCallback(()=>{var o;return((o=I.current)==null?void 0:o.scrollTop)??0},[]),Ce=f.useCallback(o=>{const l=I.current;return l?(l.addEventListener("scroll",o,{passive:!0}),()=>l.removeEventListener("scroll",o)):()=>{}},[]);xt({roomId:R,viewerAuthorId:j,documentId:i,url:ke,readScrollY:we,subscribe:Ce});const q=f.useMemo(()=>z.map(o=>o.id).join("\0"),[z]);f.useEffect(()=>{if(!(w===null||k!==null)&&q.split("\0").includes(w.documentId)){if(w.documentId!==i){m(t,w.documentId);return}w.scrollY!==void 0&&I.current&&(I.current.scrollTop=w.scrollY)}},[w,k,i,q,m,t]);const Ne=f.useCallback(()=>{v!==null&&(g(!0),p.discussCanvasDocument(t,v.id).then(o=>c(t,o.threadRootEntryId,!1)).catch(o=>{ee.error("Couldn’t start a discussion.",{description:te(o)})}).finally(()=>g(!1)))},[v,p,t,c]),Re=Y(n);return e.jsxs(e.Fragment,{children:[!s&&e.jsx(he,{view:n,documents:be,activeDocumentId:i,onActivate:o=>m(t,o),onClose:o=>void F("Couldn’t take that off the canvas.",()=>b.close(o)),onPin:(o,l)=>void F(l?"Couldn’t pin that.":"Couldn’t unpin that.",()=>b.pin(o,l))}),e.jsx(Rt,{sourceLabel:v==null?void 0:v.sourceLabel,people:n==="browser"?je:[],following:E,onFollow:L,onStopFollowing:ge,onDiscuss:v===null?void 0:Ne,discussing:_}),e.jsx("div",{id:Re,ref:I,tabIndex:-1,className:"min-h-0 flex-1 overflow-auto focus-visible:outline-none",...!s&&v?{role:"tabpanel","aria-labelledby":K(v.id)}:{},children:v?e.jsx(fe,{documentId:v.id,children:e.jsx(Ot,{roomId:t,document:v,onUpdate:(o,l)=>F("Couldn’t save that for the room.",()=>b.update(o,l))})},v.id):e.jsx(xe,{view:n,onAction:o=>void F("Couldn’t put that on the canvas.",()=>b.open(o))})})]})}function ve({view:t}){const n=ne(),s=y(c=>c.openDocuments),r=y(c=>t==="browser"?c.activeBrowserDocumentId:c.activeCanvasDocumentId),i=y(c=>c.activateCanvasDocument),u=y(c=>c.closeCanvasDocument),m=y(c=>c.setDocumentContent),d=y(c=>c.openCanvasDocument),a=y(c=>c.applyHeldUpdate),b=y(c=>c.discardHeldUpdate),x=Ze(s,t),p=x.find(c=>c.id===r)??null,j=x.map(c=>({id:c.id,sourceLabel:c.sourceLabel,contentType:c.content.type})),k=Y(t);return e.jsxs(e.Fragment,{children:[!n&&e.jsx(he,{view:t,documents:j,activeDocumentId:r,onActivate:i,onClose:u}),(p==null?void 0:p.heldUpdate)&&e.jsx(Ct,{onReload:()=>a(p.id),onKeepMine:()=>b(p.id)}),e.jsx("div",{id:k,tabIndex:-1,className:"min-h-0 flex-1 overflow-auto focus-visible:outline-none",...!n&&p?{role:"tabpanel","aria-labelledby":K(p.id)}:{},children:p?e.jsx(fe,{documentId:p.id,children:e.jsx(ae,{documentId:p.id,content:p.content,onContentChange:c=>m(p.id,c)})},p.id):e.jsx(xe,{view:t,onAction:d})})]})}function rn(){const t=y(n=>n.roomCanvasLiveRoomId);return e.jsx("div",{"data-slot":"canvas",className:"flex h-full flex-col overflow-hidden",children:t?e.jsx(ye,{roomId:t,view:"canvas"}):e.jsx(ve,{view:"canvas"})})}function ln(){const t=y(n=>n.roomCanvasLiveRoomId);return e.jsx("div",{"data-slot":"browser",className:"flex h-full flex-col overflow-hidden",children:t?e.jsx(ye,{roomId:t,view:"browser"}):e.jsx(ve,{view:"browser"})})}export{ln as BrowserContent,rn as CanvasContent,un as CanvasWidgetContent,mn as resetSessionCanvasImport,pn as useDevtoolsBridge,hn as useDocChannel,fn as useSessionCanvas};
|
|
38
|
+
Start writing…`,title:"Document"})},{icon:le,label:"JSON",description:"Inspect structured data",action:()=>({type:"json",data:{message:"Your data here"},title:"JSON data"})}]},browser:{heading:"No page open",blurb:"This tab shows web pages: your files, dev servers, or sites from your agent.",actions:[{icon:O,label:"Web page",description:"Open a page, then type any address",action:()=>({type:"url",url:Ue.site,title:"Web Page"})}]}};function $(t,n,s,r){return t.split("").reduce((u,m)=>u+m.charCodeAt(0),0)*(n+1)*7%(r-s)+s}function xe({view:t,onAction:n}){const s=Ee(),r=f.useId(),i=Nt[t],u=f.useMemo(()=>Array.from({length:6},(m,d)=>({x:$(r,d*3,10,90),y:$(r,d*3+1,10,80),size:$(r,d*3+2,24,56),delay:d*.4})),[r]);return e.jsxs("div",{className:"relative flex h-full flex-col items-center justify-center overflow-hidden px-6",children:[!s&&u.map((m,d)=>e.jsx(T.div,{className:"border-border/40 absolute rounded-lg border",style:{left:`${m.x}%`,top:`${m.y}%`,width:m.size,height:m.size},initial:{opacity:0,scale:.6,rotate:-10},animate:{opacity:[0,.15,.08,.15],scale:[.6,1,.9,1],rotate:[-10,0,5,0]},transition:{duration:8,delay:m.delay,repeat:1/0,repeatType:"reverse",ease:"easeInOut"}},d)),e.jsxs(T.div,{className:"relative z-10 flex max-w-sm flex-col items-center gap-6 text-center",initial:s?!1:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.4,ease:"easeOut"},children:[e.jsx(T.div,{className:"bg-muted/50 text-muted-foreground flex size-14 items-center justify-center rounded-2xl",initial:s?!1:{opacity:0,scale:.8},animate:{opacity:1,scale:1},transition:{duration:.3,delay:.1},children:t==="browser"?e.jsx(O,{className:"size-7"}):e.jsx(Le,{className:"size-7"})}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("h2",{className:"text-lg font-semibold tracking-tight",children:i.heading}),e.jsxs("p",{className:"text-muted-foreground text-sm leading-relaxed",children:[i.blurb,e.jsx("br",{}),"Or pick a starting point below."]})]}),e.jsx(T.div,{className:"mt-2 flex w-full flex-col gap-2",initial:"hidden",animate:"visible",variants:s?{}:{visible:{transition:{staggerChildren:.08,delayChildren:.25}}},children:i.actions.map(({icon:m,label:d,description:a,action:b})=>e.jsxs(T.button,{variants:s?{}:{hidden:{opacity:0,y:8},visible:{opacity:1,y:0}},transition:{duration:.25},className:"border-border hover:bg-accent/50 flex items-center gap-3 rounded-lg border px-4 py-3 text-left transition-colors",onClick:()=>n(b()),children:[e.jsx(m,{className:"text-muted-foreground size-4 shrink-0"}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("span",{className:"text-sm font-medium",children:d}),e.jsx("span",{className:"text-muted-foreground ml-2 text-xs",children:a})]})]},d))})]})]})}function Rt({sourceLabel:t,people:n,following:s,onFollow:r,onStopFollowing:i,onDiscuss:u,discussing:m=!1}){const d=n.find(a=>a.id===s)??null;return t===void 0&&n.length===0&&u===void 0?null:e.jsxs("div",{className:"text-muted-foreground flex items-center gap-2 border-b px-3 py-1 text-xs",children:[t!==void 0&&e.jsx("span",{className:"min-w-0 flex-1 truncate",children:t}),t===void 0&&e.jsx("span",{className:"flex-1"}),u&&e.jsxs(C,{type:"button",variant:"ghost",size:"sm",className:"h-6 gap-1 px-1.5",disabled:m,onClick:u,children:[e.jsx($e,{className:"size-3.5"}),"Discuss"]}),n.length>0&&e.jsxs(Pe,{children:[e.jsx(Be,{asChild:!0,children:e.jsxs(C,{type:"button",variant:"ghost",size:"sm",className:F("h-6 gap-1 px-1.5",d&&"text-foreground"),children:[e.jsx(He,{className:"size-3.5"}),d?`Following ${d.displayName}`:"Follow"]})}),e.jsxs(Ve,{align:"end",children:[e.jsx(Ye,{children:"Follow somebody’s browser"}),n.map(a=>e.jsxs(Z,{onSelect:()=>a.id===s?i():r(a.id),children:[e.jsx(B,{"aria-hidden":!0,size:"xs",className:"size-4 shrink-0 text-[9px]",kind:a.kind,color:a.color??V(a.id),emoji:a.emoji,imageUrl:a.imageUrl,badge:null,fallback:H(a.displayName)}),e.jsx("span",{className:"min-w-0 flex-1 truncate",children:a.displayName}),a.id===s&&e.jsx(Ke,{className:"size-3.5 shrink-0"})]},a.id)),d&&e.jsx(Z,{onSelect:i,children:"Stop following"})]})]})]})}function Dt({roomId:t,document:n,reading:s}){const r=P(),i=We(),[u,m]=f.useState(null),d=f.useMemo(()=>lt({transport:r,queryClient:i,roomId:t}),[r,i,t]);return e.jsxs("div",{className:"flex h-full items-start justify-center p-6",children:[e.jsxs("div",{className:"bg-card shadow-soft w-full max-w-md space-y-3 rounded-lg border p-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(se,{className:"text-muted-foreground size-4 shrink-0"}),e.jsx("span",{className:"truncate text-sm font-medium",children:n.title||s.sourcePath})]}),e.jsx("p",{className:"text-muted-foreground font-mono text-xs break-all",children:s.sourcePath}),s.kind==="elsewhere"?e.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:s.sentence}):e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:"A room file. Each save is recorded with your name."}),e.jsx(C,{type:"button",size:"sm",onClick:()=>m(s.sourcePath),children:"Open file"})]})]}),s.kind==="room-file"&&e.jsx(ct,{source:d,path:u,onClose:()=>m(null)})]})}const It=["image","pdf","audio","video","csv","model3d"];function zt(t){return/^(https?:|data:)/.test(t)}function Mt(t){if(t.type==="file"||t.type==="diff")return t.sourcePath;if(t.type==="markdown")return t.sourcePath??null;if(It.includes(t.type)){const n=t.src;return zt(n)?null:n}return null}function St(t){return t.type==="file"||t.type==="diff"||t.type==="markdown"}function Tt(t){const n=/^(?:in )?(.+?)['’]s /.exec(t.sourceLabel??"");return(n==null?void 0:n[1])??"another member"}function At(t){const n=Mt(t.content);if(n===null)return{kind:"inline"};if(t.treeKind==="room-main"||t.treeKind===void 0)return St(t.content)?{kind:"room-file",sourcePath:n}:{kind:"elsewhere",sourcePath:n,sentence:"This file is in the room’s files. Open it from Files in the Room tab."};if(t.content.type==="diff"&&t.treeKind==="worktree"&&typeof t.aheadOfMain=="number"&&t.aheadOfMain>0)return{kind:"worktree-diff",sourcePath:n,content:t.content};if(t.content.type==="markdown")return{kind:"inline"};const s=Tt(t);return{kind:"elsewhere",sourcePath:n,sentence:`${s.charAt(0).toUpperCase()}${s.slice(1)}’s project isn’t open to you. Ask them to share it, or open your copy.`}}function Ft(t){return t.title||t.contentType}function Ot({roomId:t,document:n,onUpdate:s}){const r=At(n);return r.kind==="worktree-diff"?e.jsx(Xe,{roomId:t,content:r.content,documentId:n.id,authorId:n.authorId}):r.kind!=="inline"?e.jsx(Dt,{roomId:t,document:n,reading:r}):n.content.type==="markdown"?e.jsx(st,{roomId:t,document:n,content:n.content,onSave:s}):e.jsx(ae,{documentId:n.id,content:n.content,onContentChange:()=>{}})}function ye({roomId:t,view:n}){var G;const s=ne(),r=y(o=>o.roomCanvasDocuments[t]),i=y(o=>{var l;return((l=o.roomCanvasActive[t])==null?void 0:l[n])??null}),u=y(o=>{var l;return(l=o.roomCanvasUnread[t])==null?void 0:l[n]}),m=y(o=>o.activateRoomCanvasDocument),d=y(o=>o.clearRoomCanvasUnread),a=y(o=>o.roomCanvasPresence[t]),b=tt(t),x=qe(t),p=P(),j=((G=x.data)==null?void 0:G.viewerAuthorId)??null,k=y(o=>o.roomCanvasEditing[t]??null),c=Ge(o=>o.openThread),[_,g]=f.useState(!1),R=n==="browser"?t:null,{following:E,follow:L,stop:ge}=it(R),w=Je(R),I=f.useRef(null),A=f.useCallback(async(o,l)=>{try{return await l(),!0}catch(M){return ee.error(o,{description:te(M)}),!1}},[]),z=f.useMemo(()=>Qe(r??[],n),[r,n]),v=z.find(o=>o.id===i)??null,W=(u==null?void 0:u.length)??0;f.useEffect(()=>{W>0&&d(t,n)},[W,d,t,n]);const be=f.useMemo(()=>{var J;const o=new Map(((J=x.data)==null?void 0:J.members.map(h=>[h.author.id,h.author]))??[]),l=h=>({id:h.id,displayName:h.displayName,kind:h.kind,...h.emoji?{emoji:h.emoji}:{},...h.color?{color:h.color}:{},...h.imageUrl?{imageUrl:h.imageUrl}:{}}),M=new Map;for(const[h,S]of Object.entries(a??{})){if(h===j)continue;const D=o.get(h);if(!D)continue;const Q=M.get(S);Q?Q.push(l(D)):M.set(S,[l(D)])}return z.map(h=>{const S=o.get(h.authorId),D=M.get(h.id);return{id:h.id,sourceLabel:Ft(h),contentType:h.content.type,pinned:h.pinned,unread:(u==null?void 0:u.includes(h.id))??!1,...S?{author:l(S)}:{},...D?{watchers:D}:{}}})},[z,x.data,u,a,j]);nt(t,(v==null?void 0:v.id)??null);const je=f.useMemo(()=>{var o;return(((o=x.data)==null?void 0:o.members)??[]).map(l=>l.author).filter(l=>l.kind==="human"&&l.id!==j).map(l=>({id:l.id,displayName:l.displayName,kind:l.kind,emoji:l.emoji,color:l.color,imageUrl:l.imageUrl}))},[x.data,j]),ke=y(o=>{if(i===null)return;const l=o.browserHistories[i];return l?l.stack[l.cursor]:void 0}),we=f.useCallback(()=>{var o;return((o=I.current)==null?void 0:o.scrollTop)??0},[]),Ce=f.useCallback(o=>{const l=I.current;return l?(l.addEventListener("scroll",o,{passive:!0}),()=>l.removeEventListener("scroll",o)):()=>{}},[]);xt({roomId:R,viewerAuthorId:j,documentId:i,url:ke,readScrollY:we,subscribe:Ce});const q=f.useMemo(()=>z.map(o=>o.id).join("\0"),[z]);f.useEffect(()=>{if(!(w===null||k!==null)&&q.split("\0").includes(w.documentId)){if(w.documentId!==i){m(t,w.documentId);return}w.scrollY!==void 0&&I.current&&(I.current.scrollTop=w.scrollY)}},[w,k,i,q,m,t]);const Ne=f.useCallback(()=>{v!==null&&(g(!0),p.discussCanvasDocument(t,v.id).then(o=>c(t,o.threadRootEntryId,!1)).catch(o=>{ee.error("Couldn’t start a discussion.",{description:te(o)})}).finally(()=>g(!1)))},[v,p,t,c]),Re=Y(n);return e.jsxs(e.Fragment,{children:[!s&&e.jsx(he,{view:n,documents:be,activeDocumentId:i,onActivate:o=>m(t,o),onClose:o=>void A("Couldn’t take that off the canvas.",()=>b.close(o)),onPin:(o,l)=>void A(l?"Couldn’t pin that.":"Couldn’t unpin that.",()=>b.pin(o,l))}),e.jsx(Rt,{sourceLabel:v==null?void 0:v.sourceLabel,people:n==="browser"?je:[],following:E,onFollow:L,onStopFollowing:ge,onDiscuss:v===null?void 0:Ne,discussing:_}),e.jsx("div",{id:Re,ref:I,tabIndex:-1,className:"min-h-0 flex-1 overflow-auto focus-visible:outline-none",...!s&&v?{role:"tabpanel","aria-labelledby":K(v.id)}:{},children:v?e.jsx(fe,{documentId:v.id,children:e.jsx(Ot,{roomId:t,document:v,onUpdate:(o,l)=>A("Couldn’t save that for the room.",()=>b.update(o,l))})},v.id):e.jsx(xe,{view:n,onAction:o=>void A("Couldn’t put that on the canvas.",()=>b.open(o))})})]})}function ve({view:t}){const n=ne(),s=y(c=>c.openDocuments),r=y(c=>t==="browser"?c.activeBrowserDocumentId:c.activeCanvasDocumentId),i=y(c=>c.activateCanvasDocument),u=y(c=>c.closeCanvasDocument),m=y(c=>c.setDocumentContent),d=y(c=>c.openCanvasDocument),a=y(c=>c.applyHeldUpdate),b=y(c=>c.discardHeldUpdate),x=Ze(s,t),p=x.find(c=>c.id===r)??null,j=x.map(c=>({id:c.id,sourceLabel:c.sourceLabel,contentType:c.content.type})),k=Y(t);return e.jsxs(e.Fragment,{children:[!n&&e.jsx(he,{view:t,documents:j,activeDocumentId:r,onActivate:i,onClose:u}),(p==null?void 0:p.heldUpdate)&&e.jsx(Ct,{onReload:()=>a(p.id),onKeepMine:()=>b(p.id)}),e.jsx("div",{id:k,tabIndex:-1,className:"min-h-0 flex-1 overflow-auto focus-visible:outline-none",...!n&&p?{role:"tabpanel","aria-labelledby":K(p.id)}:{},children:p?e.jsx(fe,{documentId:p.id,children:e.jsx(ae,{documentId:p.id,content:p.content,onContentChange:c=>m(p.id,c)})},p.id):e.jsx(xe,{view:t,onAction:d})})]})}function rn(){const t=y(n=>n.roomCanvasLiveRoomId);return e.jsx("div",{"data-slot":"canvas",className:"flex h-full flex-col overflow-hidden",children:t?e.jsx(ye,{roomId:t,view:"canvas"}):e.jsx(ve,{view:"canvas"})})}function ln(){const t=y(n=>n.roomCanvasLiveRoomId);return e.jsx("div",{"data-slot":"browser",className:"flex h-full flex-col overflow-hidden",children:t?e.jsx(ye,{roomId:t,view:"browser"}):e.jsx(ve,{view:"browser"})})}export{ln as BrowserContent,rn as CanvasContent,un as CanvasWidgetContent,mn as resetSessionCanvasImport,pn as useDevtoolsBridge,hn as useDocChannel,fn as useSessionCanvas};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as c,j as Ce}from"./index-DBdO-_iL.js";import{a4 as xe,a5 as Ee,a6 as _e,a7 as Te,a8 as Oe,a9 as $e,aa as Le,ab as Me,ac as We,ad as Be,ae as Ne,af as Ke,ag as we,ah as De,q as Y,ai as He,aj as Se,ak as Ie,al as je,am as Ae,an as Ue,ao as ze,ap as Ge,aq as Re,$ as Fe,Z as pe,ar as Pe,E as g,as as Ve,t as a,at as qe,au as Je,S as Ye,av as Ze}from"./index-CocSe_I3.js";function ie(){return ie=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ie.apply(null,arguments)}function Qe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var ce=function(t){t===void 0&&(t={});var r=t,n=r.crosshairCursor,h=n===void 0?!1:n,o=[];t.closeBracketsKeymap!==!1&&(o=o.concat(xe)),t.defaultKeymap!==!1&&(o=o.concat(Ee)),t.searchKeymap!==!1&&(o=o.concat(_e)),t.historyKeymap!==!1&&(o=o.concat(Te)),t.foldKeymap!==!1&&(o=o.concat(Oe)),t.completionKeymap!==!1&&(o=o.concat($e)),t.lintKeymap!==!1&&(o=o.concat(Le));var i=[];return t.lineNumbers!==!1&&i.push(Me()),t.highlightActiveLineGutter!==!1&&i.push(We()),t.highlightSpecialChars!==!1&&i.push(Be()),t.history!==!1&&i.push(Ne()),t.foldGutter!==!1&&i.push(Ke()),t.drawSelection!==!1&&i.push(we()),t.dropCursor!==!1&&i.push(De()),t.allowMultipleSelections!==!1&&i.push(Y.allowMultipleSelections.of(!0)),t.indentOnInput!==!1&&i.push(He()),t.syntaxHighlighting!==!1&&i.push(Se(Pe,{fallback:!0})),t.bracketMatching!==!1&&i.push(Ie()),t.closeBrackets!==!1&&i.push(je()),t.autocompletion!==!1&&i.push(Ae()),t.rectangularSelection!==!1&&i.push(Ue()),h!==!1&&i.push(ze()),t.highlightActiveLine!==!1&&i.push(Ge()),t.highlightSelectionMatches!==!1&&i.push(Re()),t.tabSize&&typeof t.tabSize=="number"&&i.push(Fe.of(" ".repeat(t.tabSize))),i.concat([pe.of(o.flat())]).filter(Boolean)};const Xe="#e5c07b",he="#e06c75",et="#56b6c2",tt="#ffffff",J="#abb2bf",re="#7d8799",at="#61afef",it="#98c379",ue="#d19a66",rt="#c678dd",nt="#21252b",de="#2c313a",fe="#282c34",ee="#353a42",ot="#3E4451",me="#528bff",st=g.theme({"&":{color:J,backgroundColor:fe},".cm-content":{caretColor:me},".cm-cursor, .cm-dropCursor":{borderLeftColor:me},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ot},".cm-panels":{backgroundColor:nt,color:J},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:fe,color:re,border:"none"},".cm-activeLineGutter":{backgroundColor:de},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:ee},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:ee,borderBottomColor:ee},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:de,color:J}}},{dark:!0}),lt=Ve.define([{tag:a.keyword,color:rt},{tag:[a.name,a.deleted,a.character,a.propertyName,a.macroName],color:he},{tag:[a.function(a.variableName),a.labelName],color:at},{tag:[a.color,a.constant(a.name),a.standard(a.name)],color:ue},{tag:[a.definition(a.name),a.separator],color:J},{tag:[a.typeName,a.className,a.number,a.changed,a.annotation,a.modifier,a.self,a.namespace],color:Xe},{tag:[a.operator,a.operatorKeyword,a.url,a.escape,a.regexp,a.link,a.special(a.string)],color:et},{tag:[a.meta,a.comment],color:re},{tag:a.strong,fontWeight:"bold"},{tag:a.emphasis,fontStyle:"italic"},{tag:a.strikethrough,textDecoration:"line-through"},{tag:a.link,color:re,textDecoration:"underline"},{tag:a.heading,fontWeight:"bold",color:he},{tag:[a.atom,a.bool,a.special(a.variableName)],color:ue},{tag:[a.processingInstruction,a.string,a.inserted],color:it},{tag:a.invalid,color:tt}]),ct=[st,Se(lt)];var ht=g.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),ut=function(t){t===void 0&&(t={});var r=t,n=r.indentWithTab,h=n===void 0?!0:n,o=r.editable,i=o===void 0?!0:o,b=r.readOnly,_=b===void 0?!1:b,v=r.theme,S=v===void 0?"light":v,p=r.placeholder,y=p===void 0?"":p,m=r.basicSetup,u=m===void 0?!0:m,l=[];switch(h&&l.unshift(pe.of([qe])),u&&(typeof u=="boolean"?l.unshift(ce()):l.unshift(ce(u))),y&&l.unshift(Je(y)),S){case"light":l.push(ht);break;case"dark":l.push(ct);break;case"none":break;default:l.push(S);break}return i===!1&&l.push(g.editable.of(!1)),_&&l.push(Y.readOnly.of(!0)),[...l]},dt=e=>({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map(t=>e.state.sliceDoc(t.from,t.to)),selectedText:e.state.selection.ranges.some(t=>!t.empty)});class ft{constructor(t,r){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=r,this.timeoutMS=r,this.callbacks.push(t)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var t=this.callbacks.slice();this.callbacks.length=0,t.forEach(r=>{try{r()}catch(n){console.error("TimeoutLatch callback error:",n)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}}class ge{constructor(){this.interval=null,this.latches=new Set}add(t){this.latches.add(t),this.start()}remove(t){this.latches.delete(t),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(t=>{t.tick(),t.isDone&&this.remove(t)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}}var te=null,mt=()=>typeof window>"u"?new ge:(te||(te=new ge),te),gt=g.theme({"& .cm-scroller":{height:"100% !important"}}),be=null,ae=null;function bt(e,t,r,n,h,o){if(!e&&!t&&!r&&!n&&!h&&!o)return null;var i=JSON.stringify({height:e,minHeight:t,maxHeight:r,width:n,minWidth:h,maxWidth:o});return i===be||(be=i,ae=g.theme({"&":{height:e,minHeight:t,maxHeight:r,width:n,minWidth:h,maxWidth:o}})),ae}var ve=Ze.define(),vt=200,St=[];function pt(e){var t=e.value,r=e.selection,n=e.onChange,h=e.onStatistics,o=e.onCreateEditor,i=e.onUpdate,b=e.extensions,_=b===void 0?St:b,v=e.autoFocus,S=e.theme,p=S===void 0?"light":S,y=e.height,m=y===void 0?null:y,u=e.minHeight,l=u===void 0?null:u,W=e.maxHeight,B=W===void 0?null:W,N=e.width,K=N===void 0?null:N,w=e.minWidth,D=w===void 0?null:w,H=e.maxWidth,I=H===void 0?null:H,j=e.placeholder,A=j===void 0?"":j,U=e.editable,z=U===void 0?!0:U,G=e.readOnly,T=G===void 0?!1:G,k=e.indentWithTab,O=k===void 0?!0:k,$=e.basicSetup,R=$===void 0?!0:$,F=e.root,L=e.initialState,P=c.useState(),C=P[0],ne=P[1],oe=c.useState(),s=oe[0],V=oe[1],se=c.useState(),Z=se[0],Q=se[1],d=c.useState(()=>({current:null}))[0],q=c.useState(()=>({current:null}))[0],le=bt(m,l,B,K,D,I),ye=g.updateListener.of(f=>{if(f.docChanged&&typeof n=="function"&&!f.transactions.some(X=>X.annotation(ve))){d.current?d.current.reset():(d.current=new ft(()=>{if(q.current){var X=q.current;q.current=null,X()}d.current=null},vt),mt().add(d.current));var x=f.state.doc,E=x.toString();n(E,f)}h&&h(dt(f))}),ke=ut({theme:p,editable:z,readOnly:T,placeholder:A,indentWithTab:O,basicSetup:R}),M=[ye,...le?[le]:[],gt,...ke];return i&&typeof i=="function"&&M.push(g.updateListener.of(i)),M=M.concat(_),c.useLayoutEffect(()=>{if(C&&!Z){var f={doc:t,selection:r,extensions:M},x=L?Y.fromJSON(L.json,f,L.fields):Y.create(f);if(Q(x),!s){var E=new g({state:x,parent:C,root:F});V(E),o&&o(E,x)}}return()=>{s&&(Q(void 0),V(void 0))}},[C,Z]),c.useEffect(()=>{e.container&&ne(e.container)},[e.container]),c.useEffect(()=>()=>{s&&(s.destroy(),V(void 0)),d.current&&(d.current.cancel(),d.current=null)},[s]),c.useEffect(()=>{v&&s&&s.focus()},[v,s]),c.useEffect(()=>{s&&s.dispatch({effects:Ye.reconfigure.of(M)})},[p,_,m,l,B,K,D,I,A,z,T,O,R,n,i]),c.useEffect(()=>{if(t!==void 0){var f=s?s.state.doc.toString():"";if(s&&t!==f){var x=d.current&&!d.current.isDone,E=()=>{s&&t!==s.state.doc.toString()&&s.dispatch({changes:{from:0,to:s.state.doc.toString().length,insert:t||""},annotations:[ve.of(!0)]})};x?q.current=E:E()}}},[t,s]),{state:Z,setState:Q,view:s,setView:V,container:C,setContainer:ne}}var yt=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],kt=c.forwardRef((e,t)=>{var r=e.className,n=e.value,h=n===void 0?"":n,o=e.selection,i=e.extensions,b=i===void 0?[]:i,_=e.onChange,v=e.onStatistics,S=e.onCreateEditor,p=e.onUpdate,y=e.autoFocus,m=e.theme,u=m===void 0?"light":m,l=e.height,W=e.minHeight,B=e.maxHeight,N=e.width,K=e.minWidth,w=e.maxWidth,D=e.basicSetup,H=e.placeholder,I=e.indentWithTab,j=e.editable,A=e.readOnly,U=e.root,z=e.initialState,G=Qe(e,yt),T=c.useRef(null),k=pt({root:U,value:h,autoFocus:y,theme:u,height:l,minHeight:W,maxHeight:B,width:N,minWidth:K,maxWidth:w,basicSetup:D,placeholder:H,indentWithTab:I,editable:j,readOnly:A,selection:o,onChange:_,onStatistics:v,onCreateEditor:S,onUpdate:p,extensions:b,initialState:z}),O=k.state,$=k.view,R=k.container,F=k.setContainer;c.useImperativeHandle(t,()=>({editor:T.current,state:O,view:$}),[T,R,O,$]);var L=c.useCallback(C=>{T.current=C,F(C)},[F]);if(typeof h!="string")throw new Error("value must be typeof string but got "+typeof h);var P=typeof u=="string"?"cm-theme-"+u:"cm-theme";return Ce.jsx("div",ie({ref:L,className:""+P+(r?" "+r:"")},G))});kt.displayName="CodeMirror";export{kt as R};
|
|
1
|
+
import{r as c,j as Ce}from"./index-Cga0qx1T.js";import{a4 as xe,a5 as Ee,a6 as _e,a7 as Te,a8 as Oe,a9 as $e,aa as Le,ab as Me,ac as We,ad as Be,ae as Ne,af as Ke,ag as we,ah as De,q as Y,ai as He,aj as Se,ak as Ie,al as je,am as Ae,an as Ue,ao as ze,ap as Ge,aq as Re,$ as Fe,Z as pe,ar as Pe,E as g,as as Ve,t as a,at as qe,au as Je,S as Ye,av as Ze}from"./index-AzyLwYS_.js";function ie(){return ie=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},ie.apply(null,arguments)}function Qe(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}var ce=function(t){t===void 0&&(t={});var r=t,n=r.crosshairCursor,h=n===void 0?!1:n,o=[];t.closeBracketsKeymap!==!1&&(o=o.concat(xe)),t.defaultKeymap!==!1&&(o=o.concat(Ee)),t.searchKeymap!==!1&&(o=o.concat(_e)),t.historyKeymap!==!1&&(o=o.concat(Te)),t.foldKeymap!==!1&&(o=o.concat(Oe)),t.completionKeymap!==!1&&(o=o.concat($e)),t.lintKeymap!==!1&&(o=o.concat(Le));var i=[];return t.lineNumbers!==!1&&i.push(Me()),t.highlightActiveLineGutter!==!1&&i.push(We()),t.highlightSpecialChars!==!1&&i.push(Be()),t.history!==!1&&i.push(Ne()),t.foldGutter!==!1&&i.push(Ke()),t.drawSelection!==!1&&i.push(we()),t.dropCursor!==!1&&i.push(De()),t.allowMultipleSelections!==!1&&i.push(Y.allowMultipleSelections.of(!0)),t.indentOnInput!==!1&&i.push(He()),t.syntaxHighlighting!==!1&&i.push(Se(Pe,{fallback:!0})),t.bracketMatching!==!1&&i.push(Ie()),t.closeBrackets!==!1&&i.push(je()),t.autocompletion!==!1&&i.push(Ae()),t.rectangularSelection!==!1&&i.push(Ue()),h!==!1&&i.push(ze()),t.highlightActiveLine!==!1&&i.push(Ge()),t.highlightSelectionMatches!==!1&&i.push(Re()),t.tabSize&&typeof t.tabSize=="number"&&i.push(Fe.of(" ".repeat(t.tabSize))),i.concat([pe.of(o.flat())]).filter(Boolean)};const Xe="#e5c07b",he="#e06c75",et="#56b6c2",tt="#ffffff",J="#abb2bf",re="#7d8799",at="#61afef",it="#98c379",ue="#d19a66",rt="#c678dd",nt="#21252b",de="#2c313a",fe="#282c34",ee="#353a42",ot="#3E4451",me="#528bff",st=g.theme({"&":{color:J,backgroundColor:fe},".cm-content":{caretColor:me},".cm-cursor, .cm-dropCursor":{borderLeftColor:me},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ot},".cm-panels":{backgroundColor:nt,color:J},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:fe,color:re,border:"none"},".cm-activeLineGutter":{backgroundColor:de},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:ee},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:ee,borderBottomColor:ee},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:de,color:J}}},{dark:!0}),lt=Ve.define([{tag:a.keyword,color:rt},{tag:[a.name,a.deleted,a.character,a.propertyName,a.macroName],color:he},{tag:[a.function(a.variableName),a.labelName],color:at},{tag:[a.color,a.constant(a.name),a.standard(a.name)],color:ue},{tag:[a.definition(a.name),a.separator],color:J},{tag:[a.typeName,a.className,a.number,a.changed,a.annotation,a.modifier,a.self,a.namespace],color:Xe},{tag:[a.operator,a.operatorKeyword,a.url,a.escape,a.regexp,a.link,a.special(a.string)],color:et},{tag:[a.meta,a.comment],color:re},{tag:a.strong,fontWeight:"bold"},{tag:a.emphasis,fontStyle:"italic"},{tag:a.strikethrough,textDecoration:"line-through"},{tag:a.link,color:re,textDecoration:"underline"},{tag:a.heading,fontWeight:"bold",color:he},{tag:[a.atom,a.bool,a.special(a.variableName)],color:ue},{tag:[a.processingInstruction,a.string,a.inserted],color:it},{tag:a.invalid,color:tt}]),ct=[st,Se(lt)];var ht=g.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),ut=function(t){t===void 0&&(t={});var r=t,n=r.indentWithTab,h=n===void 0?!0:n,o=r.editable,i=o===void 0?!0:o,b=r.readOnly,_=b===void 0?!1:b,v=r.theme,S=v===void 0?"light":v,p=r.placeholder,y=p===void 0?"":p,m=r.basicSetup,u=m===void 0?!0:m,l=[];switch(h&&l.unshift(pe.of([qe])),u&&(typeof u=="boolean"?l.unshift(ce()):l.unshift(ce(u))),y&&l.unshift(Je(y)),S){case"light":l.push(ht);break;case"dark":l.push(ct);break;case"none":break;default:l.push(S);break}return i===!1&&l.push(g.editable.of(!1)),_&&l.push(Y.readOnly.of(!0)),[...l]},dt=e=>({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map(t=>e.state.sliceDoc(t.from,t.to)),selectedText:e.state.selection.ranges.some(t=>!t.empty)});class ft{constructor(t,r){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=r,this.timeoutMS=r,this.callbacks.push(t)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var t=this.callbacks.slice();this.callbacks.length=0,t.forEach(r=>{try{r()}catch(n){console.error("TimeoutLatch callback error:",n)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}}class ge{constructor(){this.interval=null,this.latches=new Set}add(t){this.latches.add(t),this.start()}remove(t){this.latches.delete(t),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(t=>{t.tick(),t.isDone&&this.remove(t)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}}var te=null,mt=()=>typeof window>"u"?new ge:(te||(te=new ge),te),gt=g.theme({"& .cm-scroller":{height:"100% !important"}}),be=null,ae=null;function bt(e,t,r,n,h,o){if(!e&&!t&&!r&&!n&&!h&&!o)return null;var i=JSON.stringify({height:e,minHeight:t,maxHeight:r,width:n,minWidth:h,maxWidth:o});return i===be||(be=i,ae=g.theme({"&":{height:e,minHeight:t,maxHeight:r,width:n,minWidth:h,maxWidth:o}})),ae}var ve=Ze.define(),vt=200,St=[];function pt(e){var t=e.value,r=e.selection,n=e.onChange,h=e.onStatistics,o=e.onCreateEditor,i=e.onUpdate,b=e.extensions,_=b===void 0?St:b,v=e.autoFocus,S=e.theme,p=S===void 0?"light":S,y=e.height,m=y===void 0?null:y,u=e.minHeight,l=u===void 0?null:u,W=e.maxHeight,B=W===void 0?null:W,N=e.width,K=N===void 0?null:N,w=e.minWidth,D=w===void 0?null:w,H=e.maxWidth,I=H===void 0?null:H,j=e.placeholder,A=j===void 0?"":j,U=e.editable,z=U===void 0?!0:U,G=e.readOnly,T=G===void 0?!1:G,k=e.indentWithTab,O=k===void 0?!0:k,$=e.basicSetup,R=$===void 0?!0:$,F=e.root,L=e.initialState,P=c.useState(),C=P[0],ne=P[1],oe=c.useState(),s=oe[0],V=oe[1],se=c.useState(),Z=se[0],Q=se[1],d=c.useState(()=>({current:null}))[0],q=c.useState(()=>({current:null}))[0],le=bt(m,l,B,K,D,I),ye=g.updateListener.of(f=>{if(f.docChanged&&typeof n=="function"&&!f.transactions.some(X=>X.annotation(ve))){d.current?d.current.reset():(d.current=new ft(()=>{if(q.current){var X=q.current;q.current=null,X()}d.current=null},vt),mt().add(d.current));var x=f.state.doc,E=x.toString();n(E,f)}h&&h(dt(f))}),ke=ut({theme:p,editable:z,readOnly:T,placeholder:A,indentWithTab:O,basicSetup:R}),M=[ye,...le?[le]:[],gt,...ke];return i&&typeof i=="function"&&M.push(g.updateListener.of(i)),M=M.concat(_),c.useLayoutEffect(()=>{if(C&&!Z){var f={doc:t,selection:r,extensions:M},x=L?Y.fromJSON(L.json,f,L.fields):Y.create(f);if(Q(x),!s){var E=new g({state:x,parent:C,root:F});V(E),o&&o(E,x)}}return()=>{s&&(Q(void 0),V(void 0))}},[C,Z]),c.useEffect(()=>{e.container&&ne(e.container)},[e.container]),c.useEffect(()=>()=>{s&&(s.destroy(),V(void 0)),d.current&&(d.current.cancel(),d.current=null)},[s]),c.useEffect(()=>{v&&s&&s.focus()},[v,s]),c.useEffect(()=>{s&&s.dispatch({effects:Ye.reconfigure.of(M)})},[p,_,m,l,B,K,D,I,A,z,T,O,R,n,i]),c.useEffect(()=>{if(t!==void 0){var f=s?s.state.doc.toString():"";if(s&&t!==f){var x=d.current&&!d.current.isDone,E=()=>{s&&t!==s.state.doc.toString()&&s.dispatch({changes:{from:0,to:s.state.doc.toString().length,insert:t||""},annotations:[ve.of(!0)]})};x?q.current=E:E()}}},[t,s]),{state:Z,setState:Q,view:s,setView:V,container:C,setContainer:ne}}var yt=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],kt=c.forwardRef((e,t)=>{var r=e.className,n=e.value,h=n===void 0?"":n,o=e.selection,i=e.extensions,b=i===void 0?[]:i,_=e.onChange,v=e.onStatistics,S=e.onCreateEditor,p=e.onUpdate,y=e.autoFocus,m=e.theme,u=m===void 0?"light":m,l=e.height,W=e.minHeight,B=e.maxHeight,N=e.width,K=e.minWidth,w=e.maxWidth,D=e.basicSetup,H=e.placeholder,I=e.indentWithTab,j=e.editable,A=e.readOnly,U=e.root,z=e.initialState,G=Qe(e,yt),T=c.useRef(null),k=pt({root:U,value:h,autoFocus:y,theme:u,height:l,minHeight:W,maxHeight:B,width:N,minWidth:K,maxWidth:w,basicSetup:D,placeholder:H,indentWithTab:I,editable:j,readOnly:A,selection:o,onChange:_,onStatistics:v,onCreateEditor:S,onUpdate:p,extensions:b,initialState:z}),O=k.state,$=k.view,R=k.container,F=k.setContainer;c.useImperativeHandle(t,()=>({editor:T.current,state:O,view:$}),[T,R,O,$]);var L=c.useCallback(C=>{T.current=C,F(C)},[F]);if(typeof h!="string")throw new Error("value must be typeof string but got "+typeof h);var P=typeof u=="string"?"cm-theme-"+u:"cm-theme";return Ce.jsx("div",ie({ref:L,className:""+P+(r?" "+r:"")},G))});kt.displayName="CodeMirror";export{kt as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n,r as u,a1 as oe,a3 as re,aW as F,B as E,I as ae,eo as ce,c6 as le,gt as ie,gu as de,gv as ue}from"./index-DBdO-_iL.js";import{u as he,L as z}from"./use-local-browser-CbS4typW.js";const G={embedded:"DorkOS browser","new-window":"New browser window"},me={embedded:"Browse here. Saved logins stay separate from your usual browser.","new-window":"Opens on the computer running DorkOS. Saved logins stay separate."};function we({value:t,onChange:s,capabilities:r,disabled:i}){var d;const a={embedded:!!(r!=null&&r.embedded)&&!!((d=window.electronAPI)!=null&&d.localBrowser),"new-window":!!(r!=null&&r.newWindow)};return n.jsxs("fieldset",{disabled:i,className:"space-y-2",children:[n.jsx("legend",{className:"sr-only",children:"Browser"}),Object.keys(G).map(l=>{var e;return n.jsxs("label",{className:"bg-muted/40 flex items-start gap-2 rounded-lg p-3",children:[n.jsx("input",{type:"radio",name:"local-browser-mode",value:l,checked:t===l,disabled:!a[l],onChange:()=>s(l),className:"mt-1"}),n.jsxs("span",{className:"min-w-0 space-y-1",children:[n.jsx("span",{className:"block text-sm font-medium",children:G[l]}),n.jsx("span",{className:"text-muted-foreground block text-xs",children:me[l]}),!a[l]&&n.jsx("span",{className:"text-muted-foreground block text-xs",children:((e=r==null?void 0:r.unavailableReasons)==null?void 0:e[l])??(l==="embedded"?"Requires the DorkOS desktop app.":"Available on your DorkOS computer.")})]})]},l)})]})}function pe(t,s,r,i){u.useEffect(()=>{var m,L;const a=(m=window.electronAPI)==null?void 0:m.localBrowser;if(!a||!s||!r)return;let d=!1,l=!1,e="",h=0,v=!1;const q=[];for(let c=(L=t.current)==null?void 0:L.parentElement;c;c=c.parentElement){const w=getComputedStyle(c);/(hidden|clip|auto|scroll)/.test(`${w.overflowX} ${w.overflowY}`)&&q.push(c)}const j=()=>{v=[...document.querySelectorAll('[role="dialog"][aria-modal="true"], [role="alertdialog"], [role="menu"], [data-radix-popper-content-wrapper]')].some(c=>!c.contains(t.current)&&c.getClientRects().length>0&&!c.hidden),R()},R=()=>{var T;if(d||l)return;const c=(T=t.current)==null?void 0:T.getBoundingClientRect();let w=(c==null?void 0:c.x)??0,p=(c==null?void 0:c.y)??0,A=w+((c==null?void 0:c.width)??0),x=p+((c==null?void 0:c.height)??0);for(const _ of q){const b=_.getBoundingClientRect();w=Math.max(w,b.x),p=Math.max(p,b.y),A=Math.min(A,b.x+b.width),x=Math.min(x,b.y+b.height)}const I=Math.max(0,A-w),g=Math.max(0,x-p),k=!!c&&!v&&document.visibilityState!=="hidden"&&I>0&&g>0,D={connectionId:s,x:w,y:p,width:I,height:g,visible:k},B=JSON.stringify(D);B!==e&&(e=B,a.setBounds(D).catch(()=>{d||(l=!0,i())}))},O=()=>{R(),!d&&!l&&(h=requestAnimationFrame(O))},C=new MutationObserver(j);return C.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-state","hidden","aria-modal","style","class"]}),j(),O(),()=>{d=!0,C.disconnect(),cancelAnimationFrame(h),a.setBounds({connectionId:s,x:0,y:0,width:0,height:0,visible:!1}).catch(()=>{})}},[t,s,r,i])}const ee={stale_page:"Page changed. Read it again before continuing.",navigation_uncertain:"Check what happened before continuing.",uncertain:"Check what happened before continuing.",paused:"Agent paused. Resume when ready.",busy:"Browser is busy. Wait a moment.",browser_download:"Couldn’t download the browser. Check your connection and try again.",cancelled:"Browser setup stopped. Open it again to continue.",focus_unavailable:"This tab stopped responding. Choose it again."},fe=["Free some space, then open the browser again.","Check folder permissions, then open the browser again."];function ge(t){const s=t;return(s==null?void 0:s.code)==="busy"&&s.message==="The browser is still closing. Wait before opening it again."?"The browser is still closing. Wait, then try again.":(s==null?void 0:s.code)==="busy"&&s.message==="Restart DorkOS to finish closing this browser."?"Restart DorkOS to finish closing this browser.":(s==null?void 0:s.code)==="browser_storage"?fe.find(i=>i===s.message)??"Couldn’t save the browser. Check free space and folder permissions.":(s!=null&&s.code&&Object.hasOwn(ee,s.code)?ee[s.code]:void 0)??"Couldn’t reach the browser. Reconnect and try again."}function xe(t){const s=u.useRef(null),r=u.useRef(null),i=a=>{r.current=document.activeElement===a?{action:a,interrupted:!1}:null};return u.useEffect(()=>{const a=l=>{const e=r.current;e&&l.target!==e.action&&!(l.type==="focusin"&&l.target===document.body)&&(e.interrupted=!0)},d=()=>{r.current&&(r.current.interrupted=!0)};return document.addEventListener("pointerdown",a,!0),document.addEventListener("keydown",a,!0),document.addEventListener("focusin",a,!0),window.addEventListener("blur",d),()=>{r.current=null,document.removeEventListener("pointerdown",a,!0),document.removeEventListener("keydown",a,!0),document.removeEventListener("focusin",a,!0),window.removeEventListener("blur",d)}},[]),u.useEffect(()=>{if(t||!r.current)return;const a=r.current;if(r.current=null,!a.interrupted&&document.activeElement===document.body&&document.hasFocus()){const d=s.current;d&&!d.disabled&&d.focus()}},[t]),{openButton:s,rememberFocus:i}}function be({preparation:t}){const s=t.stage==="checking"?"Checking browser files…":t.stage==="launching"?"Opening the browser…":t.component==="chromium"?"Downloading the browser…":t.component==="headless-shell"?"Downloading browser support…":t.component==="ffmpeg"?"Downloading video support…":"Downloading browser files…",r=t.component==="chromium"?"Browser download":t.component==="headless-shell"?"Browser support download":"Video support download",i=t.stage==="downloading"&&t.component&&t.percent!==null&&Number.isFinite(t.percent)&&t.percent>=0&&t.percent<=100?t.percent:null;return n.jsxs("div",{className:"space-y-1 text-xs","aria-live":"polite",children:[n.jsx("p",{children:s}),i!==null&&n.jsxs(n.Fragment,{children:[n.jsx("progress",{"aria-label":r,max:100,value:i,className:"w-full"}),n.jsxs("p",{children:[i,"%"]})]})]})}function ye({visible:t=!0,sessionId:s=null,agentName:r=null}){var J,X,Z;const i=oe(),a=re(),{state:d,capabilities:l}=he(),e=d.data,h=l.data,v=(J=d.error??l.error)==null?void 0:J.code,q=v==="local_only"?"Open DorkOS on your computer to use its browser.":v==="owner_only"?"Only this DorkOS owner can choose its browser.":"Couldn’t reach the browser. Reconnect and try again.",j=F(o=>o.localBrowserChoice),R=F(o=>o.localBrowserChoiceIssue),O=F(o=>o.setLocalBrowserChoice),C=!j&&R!==null,[m,L]=u.useState(!1),[c,w]=u.useState(!1),[p,A]=u.useState(null),[x,I]=u.useState(!1),g=u.useRef(0),k=u.useRef(null),[D,B]=u.useState(null),[T,_]=u.useState(null),[b,K]=u.useState(!1),U=u.useRef(null),S=(e==null?void 0:e.status)==="connected",W=!!(e!=null&&e.sessionId)&&e.sessionId!==s,f=S&&e.mode?e.mode:(j==null?void 0:j.mode)??(h!=null&&h.embedded&&((X=window.electronAPI)!=null&&X.localBrowser)?"embedded":"new-window"),Q=e==null?void 0:e.tabs.find(o=>o.id===e.selectedTabId),ne=u.useCallback(()=>K(!0),[]);u.useEffect(()=>()=>{g.current+=1},[]),pe(U,(e==null?void 0:e.connectionId)??null,t&&S&&!d.isError&&!W&&f==="embedded"&&!b,ne);const N=async(o,P=!1)=>{const y=++g.current;L(!0),w(P),B(null);try{if(P&&(await a.cancelQueries({queryKey:z}),y!==g.current))return!1;const M=await o();return y!==g.current||(await a.cancelQueries({queryKey:z}),y!==g.current)?!1:(a.setQueryData(z,M),!0)}catch(M){return y!==g.current||B(ge(M)),!1}finally{y===g.current&&(L(!1),w(!1))}},Y=()=>{O({mode:f}),A({sessionId:s,mode:f,previousConnectionId:(e==null?void 0:e.connectionId)??null,startedAt:Date.now()}),K(!1);const o=N(()=>i.openLocalBrowser({mode:f,...s?{sessionId:s}:{}}),!0);k.current=o,o.finally(()=>{k.current===o&&(k.current=null)})},se=async()=>{const o=k.current;I(!0);try{await N(()=>i.disconnectLocalBrowser())&&await a.invalidateQueries({queryKey:z}),await o}finally{I(!1)}},$=h&&(f==="embedded"?h.embedded&&!!((Z=window.electronAPI)!=null&&Z.localBrowser):h.newWindow),{openButton:te,rememberFocus:V}=xe(m||x||S||C||!$),H=c&&!x&&p&&(e!=null&&e.preparation)&&e.status==="disconnected"&&e.sessionId===p.sessionId&&e.mode===p.mode&&e.connectionId&&e.connectionId!==p.previousConnectionId&&d.dataUpdatedAt>=p.startedAt?e.preparation:null;return n.jsxs("section",{"aria-label":"Local browser","data-slot":"local-browser-panel",className:"flex h-full min-h-0 flex-col gap-3 p-3",children:[n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[n.jsx("h3",{className:"text-sm font-medium",children:S?G[f]:"Browser"}),n.jsx("span",{role:"status",className:"text-muted-foreground text-xs",children:x?"Cancelling…":c?"Preparing browser":m?"Updating…":(e==null?void 0:e.status)==="closed"?"Browser closed":S?e.paused?"Agent paused":"Connected":"Disconnected"})]}),c&&n.jsx(E,{size:"sm",variant:"outline",onClick:o=>{V(o.currentTarget),se()},children:"Cancel"}),H&&n.jsx(be,{preparation:H}),(D||d.isError||l.isError)&&n.jsx("p",{role:"alert",className:"text-sm",children:D??q}),(d.isError||l.isError)&&v!=="local_only"&&v!=="owner_only"&&n.jsx(E,{size:"sm",variant:"outline",onClick:()=>{d.refetch(),l.refetch()},children:"Reconnect"}),!S&&n.jsxs("div",{className:"min-h-0 space-y-3 overflow-y-auto",children:[R&&n.jsx("p",{className:"text-muted-foreground text-xs",children:C?"Choose a browser. The saved choice couldn’t be read.":"Browser choice couldn’t be saved. It lasts until this window closes."}),n.jsx(we,{value:C?null:f,onChange:o=>{O({mode:o})},capabilities:h,disabled:m||x}),(e==null?void 0:e.status)==="closed"&&n.jsx("p",{className:"text-muted-foreground text-xs",children:"Open it again to reconnect. Saved logins are kept."}),n.jsx(E,{ref:te,disabled:m||x||C||!$,onClick:Y,children:e!=null&&e.mode?"Reconnect":"Open browser"})]}),S&&n.jsxs(n.Fragment,{children:[W&&n.jsx("p",{className:"text-muted-foreground text-xs",children:"Shared with another chat. Disconnect to use it here."}),!e.sessionId&&n.jsx("p",{className:"text-muted-foreground text-xs",children:"Only you can use this page. Open from an agent chat to share it."}),n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsx(E,{size:"sm",variant:"outline",disabled:m,onClick:()=>void N(()=>e.paused?i.resumeLocalBrowser():i.pauseLocalBrowser()),children:e.paused?"Resume agent":"Pause agent"}),n.jsx(E,{size:"sm",variant:"ghost",disabled:m,onClick:o=>{V(o.currentTarget),N(()=>i.disconnectLocalBrowser())},children:"Disconnect"})]}),n.jsxs("label",{className:"text-sm",children:[e.sessionId?W?"Shared with another chat":`Shared with ${r||"this chat’s agent"}`:"Browser tab",n.jsxs("select",{className:"bg-muted/40 mt-1 block w-full rounded-md p-2",value:e.selectedTabId??"",disabled:m,onChange:o=>{_(null),N(()=>i.selectLocalBrowserTab(o.target.value))},children:[!e.selectedTabId&&n.jsx("option",{value:"",children:"Choose a tab"}),e.tabs.map(o=>n.jsx("option",{value:o.id,children:o.title||(o.url==="about:blank"?"New tab":o.url)},o.id))]})]}),Q&&n.jsxs("form",{className:"flex gap-2",onSubmit:o=>{o.preventDefault();const P=T??Q.url;try{const y=new URL(P);if(!["http:","https:"].includes(y.protocol))throw new Error("unsupported");N(()=>i.navigateLocalBrowser(y.href)).then(M=>{M&&_(null)})}catch{B("Enter a full web address, starting with https:// or http://.")}},children:[n.jsx(ae,{"aria-label":"Web address",value:T??Q.url,onChange:o=>_(o.target.value),className:"min-w-0"}),n.jsx(E,{size:"sm",variant:"outline",type:"submit",disabled:m,children:"Go"})]}),e.paused&&n.jsxs("div",{className:"text-muted-foreground space-y-1 text-xs",children:[n.jsx("p",{children:"Pause stops new actions. An action already started may finish."}),n.jsx("p",{children:"Your mouse and keyboard still work."})]}),f!=="embedded"&&n.jsx("p",{className:"text-muted-foreground text-sm",children:"This page is in the separate browser window."}),f==="embedded"&&n.jsx("p",{className:"text-muted-foreground text-xs",children:"This page stays in the right panel."}),f==="embedded"&&!W&&n.jsx("p",{className:"text-muted-foreground text-xs",children:e.sessionId?"Extra windows are for you. Your agent stays on this page.":"Extra windows are for you."}),f==="embedded"&&n.jsx("div",{ref:U,"data-slot":"native-browser-surface",className:"bg-muted/20 relative min-h-48 flex-1 rounded-lg",children:b&&n.jsxs("div",{className:"space-y-2 p-3",children:[n.jsx("p",{role:"alert",className:"text-sm",children:"Couldn’t show the page. Reconnect to try again."}),n.jsx(E,{size:"sm",variant:"outline",onClick:Y,disabled:m,children:"Reconnect"})]})})]})]})}function Ce(){const t=ce({select:h=>h.location.pathname}),[s]=le(),r=t==="/session"?s:null,{data:i}=ie(r,{enabled:!!r,nameOnly:!0}),{data:a}=de((i==null?void 0:i.cwd)??null),d=u.useContext(ue),l=F(h=>h.rightPanelOpen),e=F(h=>h.activeRightPanelTab);return n.jsx(ye,{visible:d&&l&&e==="local-browser",sessionId:t==="/session"?s:null,agentName:t==="/session"?a==null?void 0:a.name:null},t==="/session"?`chat:${s??""}`:"human-only")}export{Ce as LocalBrowserContent,ye as LocalBrowserPanel};
|
|
1
|
+
import{j as n,r as u,a1 as oe,a3 as re,aW as F,B as E,I as ae,er as ce,c8 as le,gw as ie,gx as de,gy as ue}from"./index-Cga0qx1T.js";import{u as he,L as z}from"./use-local-browser-xg7WXAVK.js";const G={embedded:"DorkOS browser","new-window":"New browser window"},me={embedded:"Browse here. Saved logins stay separate from your usual browser.","new-window":"Opens on the computer running DorkOS. Saved logins stay separate."};function we({value:t,onChange:s,capabilities:r,disabled:i}){var d;const a={embedded:!!(r!=null&&r.embedded)&&!!((d=window.electronAPI)!=null&&d.localBrowser),"new-window":!!(r!=null&&r.newWindow)};return n.jsxs("fieldset",{disabled:i,className:"space-y-2",children:[n.jsx("legend",{className:"sr-only",children:"Browser"}),Object.keys(G).map(l=>{var e;return n.jsxs("label",{className:"bg-muted/40 flex items-start gap-2 rounded-lg p-3",children:[n.jsx("input",{type:"radio",name:"local-browser-mode",value:l,checked:t===l,disabled:!a[l],onChange:()=>s(l),className:"mt-1"}),n.jsxs("span",{className:"min-w-0 space-y-1",children:[n.jsx("span",{className:"block text-sm font-medium",children:G[l]}),n.jsx("span",{className:"text-muted-foreground block text-xs",children:me[l]}),!a[l]&&n.jsx("span",{className:"text-muted-foreground block text-xs",children:((e=r==null?void 0:r.unavailableReasons)==null?void 0:e[l])??(l==="embedded"?"Requires the DorkOS desktop app.":"Available on your DorkOS computer.")})]})]},l)})]})}function pe(t,s,r,i){u.useEffect(()=>{var m,L;const a=(m=window.electronAPI)==null?void 0:m.localBrowser;if(!a||!s||!r)return;let d=!1,l=!1,e="",h=0,v=!1;const q=[];for(let c=(L=t.current)==null?void 0:L.parentElement;c;c=c.parentElement){const w=getComputedStyle(c);/(hidden|clip|auto|scroll)/.test(`${w.overflowX} ${w.overflowY}`)&&q.push(c)}const j=()=>{v=[...document.querySelectorAll('[role="dialog"][aria-modal="true"], [role="alertdialog"], [role="menu"], [data-radix-popper-content-wrapper]')].some(c=>!c.contains(t.current)&&c.getClientRects().length>0&&!c.hidden),R()},R=()=>{var T;if(d||l)return;const c=(T=t.current)==null?void 0:T.getBoundingClientRect();let w=(c==null?void 0:c.x)??0,p=(c==null?void 0:c.y)??0,A=w+((c==null?void 0:c.width)??0),x=p+((c==null?void 0:c.height)??0);for(const _ of q){const b=_.getBoundingClientRect();w=Math.max(w,b.x),p=Math.max(p,b.y),A=Math.min(A,b.x+b.width),x=Math.min(x,b.y+b.height)}const I=Math.max(0,A-w),g=Math.max(0,x-p),k=!!c&&!v&&document.visibilityState!=="hidden"&&I>0&&g>0,D={connectionId:s,x:w,y:p,width:I,height:g,visible:k},B=JSON.stringify(D);B!==e&&(e=B,a.setBounds(D).catch(()=>{d||(l=!0,i())}))},O=()=>{R(),!d&&!l&&(h=requestAnimationFrame(O))},C=new MutationObserver(j);return C.observe(document.body,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["data-state","hidden","aria-modal","style","class"]}),j(),O(),()=>{d=!0,C.disconnect(),cancelAnimationFrame(h),a.setBounds({connectionId:s,x:0,y:0,width:0,height:0,visible:!1}).catch(()=>{})}},[t,s,r,i])}const ee={stale_page:"Page changed. Read it again before continuing.",navigation_uncertain:"Check what happened before continuing.",uncertain:"Check what happened before continuing.",paused:"Agent paused. Resume when ready.",busy:"Browser is busy. Wait a moment.",browser_download:"Couldn’t download the browser. Check your connection and try again.",cancelled:"Browser setup stopped. Open it again to continue.",focus_unavailable:"This tab stopped responding. Choose it again."},fe=["Free some space, then open the browser again.","Check folder permissions, then open the browser again."];function ge(t){const s=t;return(s==null?void 0:s.code)==="busy"&&s.message==="The browser is still closing. Wait before opening it again."?"The browser is still closing. Wait, then try again.":(s==null?void 0:s.code)==="busy"&&s.message==="Restart DorkOS to finish closing this browser."?"Restart DorkOS to finish closing this browser.":(s==null?void 0:s.code)==="browser_storage"?fe.find(i=>i===s.message)??"Couldn’t save the browser. Check free space and folder permissions.":(s!=null&&s.code&&Object.hasOwn(ee,s.code)?ee[s.code]:void 0)??"Couldn’t reach the browser. Reconnect and try again."}function xe(t){const s=u.useRef(null),r=u.useRef(null),i=a=>{r.current=document.activeElement===a?{action:a,interrupted:!1}:null};return u.useEffect(()=>{const a=l=>{const e=r.current;e&&l.target!==e.action&&!(l.type==="focusin"&&l.target===document.body)&&(e.interrupted=!0)},d=()=>{r.current&&(r.current.interrupted=!0)};return document.addEventListener("pointerdown",a,!0),document.addEventListener("keydown",a,!0),document.addEventListener("focusin",a,!0),window.addEventListener("blur",d),()=>{r.current=null,document.removeEventListener("pointerdown",a,!0),document.removeEventListener("keydown",a,!0),document.removeEventListener("focusin",a,!0),window.removeEventListener("blur",d)}},[]),u.useEffect(()=>{if(t||!r.current)return;const a=r.current;if(r.current=null,!a.interrupted&&document.activeElement===document.body&&document.hasFocus()){const d=s.current;d&&!d.disabled&&d.focus()}},[t]),{openButton:s,rememberFocus:i}}function be({preparation:t}){const s=t.stage==="checking"?"Checking browser files…":t.stage==="launching"?"Opening the browser…":t.component==="chromium"?"Downloading the browser…":t.component==="headless-shell"?"Downloading browser support…":t.component==="ffmpeg"?"Downloading video support…":"Downloading browser files…",r=t.component==="chromium"?"Browser download":t.component==="headless-shell"?"Browser support download":"Video support download",i=t.stage==="downloading"&&t.component&&t.percent!==null&&Number.isFinite(t.percent)&&t.percent>=0&&t.percent<=100?t.percent:null;return n.jsxs("div",{className:"space-y-1 text-xs","aria-live":"polite",children:[n.jsx("p",{children:s}),i!==null&&n.jsxs(n.Fragment,{children:[n.jsx("progress",{"aria-label":r,max:100,value:i,className:"w-full"}),n.jsxs("p",{children:[i,"%"]})]})]})}function ye({visible:t=!0,sessionId:s=null,agentName:r=null}){var J,X,Z;const i=oe(),a=re(),{state:d,capabilities:l}=he(),e=d.data,h=l.data,v=(J=d.error??l.error)==null?void 0:J.code,q=v==="local_only"?"Open DorkOS on your computer to use its browser.":v==="owner_only"?"Only this DorkOS owner can choose its browser.":"Couldn’t reach the browser. Reconnect and try again.",j=F(o=>o.localBrowserChoice),R=F(o=>o.localBrowserChoiceIssue),O=F(o=>o.setLocalBrowserChoice),C=!j&&R!==null,[m,L]=u.useState(!1),[c,w]=u.useState(!1),[p,A]=u.useState(null),[x,I]=u.useState(!1),g=u.useRef(0),k=u.useRef(null),[D,B]=u.useState(null),[T,_]=u.useState(null),[b,K]=u.useState(!1),U=u.useRef(null),S=(e==null?void 0:e.status)==="connected",W=!!(e!=null&&e.sessionId)&&e.sessionId!==s,f=S&&e.mode?e.mode:(j==null?void 0:j.mode)??(h!=null&&h.embedded&&((X=window.electronAPI)!=null&&X.localBrowser)?"embedded":"new-window"),Q=e==null?void 0:e.tabs.find(o=>o.id===e.selectedTabId),ne=u.useCallback(()=>K(!0),[]);u.useEffect(()=>()=>{g.current+=1},[]),pe(U,(e==null?void 0:e.connectionId)??null,t&&S&&!d.isError&&!W&&f==="embedded"&&!b,ne);const N=async(o,P=!1)=>{const y=++g.current;L(!0),w(P),B(null);try{if(P&&(await a.cancelQueries({queryKey:z}),y!==g.current))return!1;const M=await o();return y!==g.current||(await a.cancelQueries({queryKey:z}),y!==g.current)?!1:(a.setQueryData(z,M),!0)}catch(M){return y!==g.current||B(ge(M)),!1}finally{y===g.current&&(L(!1),w(!1))}},Y=()=>{O({mode:f}),A({sessionId:s,mode:f,previousConnectionId:(e==null?void 0:e.connectionId)??null,startedAt:Date.now()}),K(!1);const o=N(()=>i.openLocalBrowser({mode:f,...s?{sessionId:s}:{}}),!0);k.current=o,o.finally(()=>{k.current===o&&(k.current=null)})},se=async()=>{const o=k.current;I(!0);try{await N(()=>i.disconnectLocalBrowser())&&await a.invalidateQueries({queryKey:z}),await o}finally{I(!1)}},$=h&&(f==="embedded"?h.embedded&&!!((Z=window.electronAPI)!=null&&Z.localBrowser):h.newWindow),{openButton:te,rememberFocus:V}=xe(m||x||S||C||!$),H=c&&!x&&p&&(e!=null&&e.preparation)&&e.status==="disconnected"&&e.sessionId===p.sessionId&&e.mode===p.mode&&e.connectionId&&e.connectionId!==p.previousConnectionId&&d.dataUpdatedAt>=p.startedAt?e.preparation:null;return n.jsxs("section",{"aria-label":"Local browser","data-slot":"local-browser-panel",className:"flex h-full min-h-0 flex-col gap-3 p-3",children:[n.jsxs("div",{className:"flex items-center justify-between gap-2",children:[n.jsx("h3",{className:"text-sm font-medium",children:S?G[f]:"Browser"}),n.jsx("span",{role:"status",className:"text-muted-foreground text-xs",children:x?"Cancelling…":c?"Preparing browser":m?"Updating…":(e==null?void 0:e.status)==="closed"?"Browser closed":S?e.paused?"Agent paused":"Connected":"Disconnected"})]}),c&&n.jsx(E,{size:"sm",variant:"outline",onClick:o=>{V(o.currentTarget),se()},children:"Cancel"}),H&&n.jsx(be,{preparation:H}),(D||d.isError||l.isError)&&n.jsx("p",{role:"alert",className:"text-sm",children:D??q}),(d.isError||l.isError)&&v!=="local_only"&&v!=="owner_only"&&n.jsx(E,{size:"sm",variant:"outline",onClick:()=>{d.refetch(),l.refetch()},children:"Reconnect"}),!S&&n.jsxs("div",{className:"min-h-0 space-y-3 overflow-y-auto",children:[R&&n.jsx("p",{className:"text-muted-foreground text-xs",children:C?"Choose a browser. The saved choice couldn’t be read.":"Browser choice couldn’t be saved. It lasts until this window closes."}),n.jsx(we,{value:C?null:f,onChange:o=>{O({mode:o})},capabilities:h,disabled:m||x}),(e==null?void 0:e.status)==="closed"&&n.jsx("p",{className:"text-muted-foreground text-xs",children:"Open it again to reconnect. Saved logins are kept."}),n.jsx(E,{ref:te,disabled:m||x||C||!$,onClick:Y,children:e!=null&&e.mode?"Reconnect":"Open browser"})]}),S&&n.jsxs(n.Fragment,{children:[W&&n.jsx("p",{className:"text-muted-foreground text-xs",children:"Shared with another chat. Disconnect to use it here."}),!e.sessionId&&n.jsx("p",{className:"text-muted-foreground text-xs",children:"Only you can use this page. Open from an agent chat to share it."}),n.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[n.jsx(E,{size:"sm",variant:"outline",disabled:m,onClick:()=>void N(()=>e.paused?i.resumeLocalBrowser():i.pauseLocalBrowser()),children:e.paused?"Resume agent":"Pause agent"}),n.jsx(E,{size:"sm",variant:"ghost",disabled:m,onClick:o=>{V(o.currentTarget),N(()=>i.disconnectLocalBrowser())},children:"Disconnect"})]}),n.jsxs("label",{className:"text-sm",children:[e.sessionId?W?"Shared with another chat":`Shared with ${r||"this chat’s agent"}`:"Browser tab",n.jsxs("select",{className:"bg-muted/40 mt-1 block w-full rounded-md p-2",value:e.selectedTabId??"",disabled:m,onChange:o=>{_(null),N(()=>i.selectLocalBrowserTab(o.target.value))},children:[!e.selectedTabId&&n.jsx("option",{value:"",children:"Choose a tab"}),e.tabs.map(o=>n.jsx("option",{value:o.id,children:o.title||(o.url==="about:blank"?"New tab":o.url)},o.id))]})]}),Q&&n.jsxs("form",{className:"flex gap-2",onSubmit:o=>{o.preventDefault();const P=T??Q.url;try{const y=new URL(P);if(!["http:","https:"].includes(y.protocol))throw new Error("unsupported");N(()=>i.navigateLocalBrowser(y.href)).then(M=>{M&&_(null)})}catch{B("Enter a full web address, starting with https:// or http://.")}},children:[n.jsx(ae,{"aria-label":"Web address",value:T??Q.url,onChange:o=>_(o.target.value),className:"min-w-0"}),n.jsx(E,{size:"sm",variant:"outline",type:"submit",disabled:m,children:"Go"})]}),e.paused&&n.jsxs("div",{className:"text-muted-foreground space-y-1 text-xs",children:[n.jsx("p",{children:"Pause stops new actions. An action already started may finish."}),n.jsx("p",{children:"Your mouse and keyboard still work."})]}),f!=="embedded"&&n.jsx("p",{className:"text-muted-foreground text-sm",children:"This page is in the separate browser window."}),f==="embedded"&&n.jsx("p",{className:"text-muted-foreground text-xs",children:"This page stays in the right panel."}),f==="embedded"&&!W&&n.jsx("p",{className:"text-muted-foreground text-xs",children:e.sessionId?"Extra windows are for you. Your agent stays on this page.":"Extra windows are for you."}),f==="embedded"&&n.jsx("div",{ref:U,"data-slot":"native-browser-surface",className:"bg-muted/20 relative min-h-48 flex-1 rounded-lg",children:b&&n.jsxs("div",{className:"space-y-2 p-3",children:[n.jsx("p",{role:"alert",className:"text-sm",children:"Couldn’t show the page. Reconnect to try again."}),n.jsx(E,{size:"sm",variant:"outline",onClick:Y,disabled:m,children:"Reconnect"})]})})]})]})}function Ce(){const t=ce({select:h=>h.location.pathname}),[s]=le(),r=t==="/session"?s:null,{data:i}=ie(r,{enabled:!!r,nameOnly:!0}),{data:a}=de((i==null?void 0:i.cwd)??null),d=u.useContext(ue),l=F(h=>h.rightPanelOpen),e=F(h=>h.activeRightPanelTab);return n.jsx(ye,{visible:d&&l&&e==="local-browser",sessionId:t==="/session"?s:null,agentName:t==="/session"?a==null?void 0:a.name:null},t==="/session"?`chat:${s??""}`:"human-only")}export{Ce as LocalBrowserContent,ye as LocalBrowserPanel};
|