@nextclaw/ui 0.25.4 → 0.26.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/CHANGELOG.md +33 -0
- package/dist/.vite/manifest.json +1146 -1390
- package/dist/assets/{abnfDiagram-VRR7QNED-DX_u5BBX.js → abnfDiagram-VRR7QNED-Bjrmb5-o.js} +1 -1
- package/dist/assets/account-panel-C1S3xtUB.js +1 -0
- package/dist/assets/{aiden0z-pptx-renderer.es-C-E9e5yB.js → aiden0z-pptx-renderer.es-DO4DCX3e.js} +1 -1
- package/dist/assets/api-D9e9cHtW.js +20 -0
- package/dist/assets/app-presenter-provider-J9IgTbc9.js +124 -0
- package/dist/assets/appearance-settings-page-BljTr6nB.js +1 -0
- package/dist/assets/{arc-Cxwa624o.js → arc-g4XaP3S4.js} +1 -1
- package/dist/assets/architecture-TIHT7OUA-BWywYH_m.js +1 -0
- package/dist/assets/{architectureDiagram-ZJ3FMSHR-D8mCj0H1.js → architectureDiagram-ZJ3FMSHR-CAP7YDux.js} +1 -1
- package/dist/assets/{blockDiagram-677ZJIJ3-CbGC1IHl.js → blockDiagram-677ZJIJ3-DhaP0zUG.js} +1 -1
- package/dist/assets/{book-open-xqEj1OLE.js → book-open-vxpV2eSM.js} +1 -1
- package/dist/assets/{c4Diagram-LMCZKHZV-BQhGC1Vc.js → c4Diagram-LMCZKHZV-DHCQJJkD.js} +1 -1
- package/dist/assets/card-D9NYhSdf.js +1 -0
- package/dist/assets/channel-1nKIAEXr.js +1 -0
- package/dist/assets/channels-list-page-BiHA1zZd.js +8 -0
- package/dist/assets/chunk-2Q5K7J3B-CAwv72v4.js +1 -0
- package/dist/assets/{chunk-32BRIVSS-B74ZZwYG.js → chunk-32BRIVSS-BcQlxl4v.js} +1 -1
- package/dist/assets/{chunk-52WLFC77-BvmxW_f_.js → chunk-52WLFC77-ClPpG-2S.js} +1 -1
- package/dist/assets/{chunk-5FCAYU7R-DQvBRnwL.js → chunk-5FCAYU7R-B_qmYOdX.js} +1 -1
- package/dist/assets/{chunk-5HE753X5-CDIH0_y3.js → chunk-5HE753X5-DTO-V56q.js} +1 -1
- package/dist/assets/{chunk-5JV3BV7I-CcevlKd-.js → chunk-5JV3BV7I-CU1SOaaG.js} +1 -1
- package/dist/assets/{chunk-5TONJI2A-_3dxVdnY.js → chunk-5TONJI2A-CzSDkWNa.js} +1 -1
- package/dist/assets/{chunk-5VM5RSS4-pGO5vvo-.js → chunk-5VM5RSS4-ChkfqIRE.js} +1 -1
- package/dist/assets/{chunk-7BUUIJ7U-DEKF5uAN.js → chunk-7BUUIJ7U-Du3Ozi62.js} +1 -1
- package/dist/assets/{chunk-BIQX33UG-CjBFgq2r.js → chunk-BIQX33UG-C-HVafHB.js} +1 -1
- package/dist/assets/{chunk-C7G6YPKG-e_K9OGTz.js → chunk-C7G6YPKG-BSjZ86D0.js} +1 -1
- package/dist/assets/{chunk-CQNSW5MT-C2IiHyHz.js → chunk-CQNSW5MT-1D1W2lF6.js} +1 -1
- package/dist/assets/{chunk-CYSBUYHQ-DCC6KmGp.js → chunk-CYSBUYHQ-ISpyj_lK.js} +1 -1
- package/dist/assets/{chunk-EMLP6XTP-BYGgekQ0.js → chunk-EMLP6XTP-Cp8iUBt2.js} +1 -1
- package/dist/assets/{chunk-EX3LRPZG-FGcwuVsA.js → chunk-EX3LRPZG-BN5RzF5j.js} +1 -1
- package/dist/assets/{chunk-FWX5IMBZ-CV3Ih_Os.js → chunk-FWX5IMBZ-DecJDW4r.js} +2 -2
- package/dist/assets/{chunk-HOUHSVGY-CXpq_hfV.js → chunk-HOUHSVGY-BE_XNgGk.js} +1 -1
- package/dist/assets/{chunk-ICXQ74PX-CZIpjupq.js → chunk-ICXQ74PX-BFOKMkWV.js} +1 -1
- package/dist/assets/{chunk-JG7HCLWE-CdgwBpW7.js → chunk-JG7HCLWE-DL-pl8VB.js} +1 -1
- package/dist/assets/{chunk-JWPE2WC7-BPjAZpOQ.js → chunk-JWPE2WC7-B-bcwfmh.js} +1 -1
- package/dist/assets/{chunk-MOJQB5TN-DbJDm8to.js → chunk-MOJQB5TN-BC0taFro.js} +1 -1
- package/dist/assets/{chunk-MOZMSUNE-BUa1fqKn.js → chunk-MOZMSUNE-RrhfU6MO.js} +1 -1
- package/dist/assets/{chunk-OGEWGWER-CtnzLgRu.js → chunk-OGEWGWER-TuI7SR7i.js} +1 -1
- package/dist/assets/{chunk-OSBZ3O6U-fUgdpTUM.js → chunk-OSBZ3O6U-C5jMBKlU.js} +1 -1
- package/dist/assets/{chunk-PUDLZKDR-CtDWZT9-.js → chunk-PUDLZKDR-C5lMBn0K.js} +1 -1
- package/dist/assets/{chunk-Q4XR5HBZ-BxnK2qxr.js → chunk-Q4XR5HBZ-B-kzUbwT.js} +1 -1
- package/dist/assets/{chunk-QBLGF6JB-CH4UKoCF.js → chunk-QBLGF6JB-CRb_WAEj.js} +1 -1
- package/dist/assets/{chunk-R7FJI6CG-BxwFoF1v.js → chunk-R7FJI6CG-De6Y7ozO.js} +1 -1
- package/dist/assets/{chunk-RYQCIY6F-DpHAmq7O.js → chunk-RYQCIY6F-Igv92q8k.js} +1 -1
- package/dist/assets/{chunk-U6XO7XAA-BjH2VUHU.js → chunk-U6XO7XAA-bCjRshkT.js} +1 -1
- package/dist/assets/{chunk-V7JOEXUC-DKJZ3HGj.js → chunk-V7JOEXUC-0J1s_Kgq.js} +1 -1
- package/dist/assets/chunk-VAUOI2AC-DnaryNw2.js +1 -0
- package/dist/assets/{chunk-VR4S4FIN-Cf-o2GtI.js → chunk-VR4S4FIN-DX6lXnNx.js} +1 -1
- package/dist/assets/{chunk-WYO6CB5R-zeNXGm20.js → chunk-WYO6CB5R-DLqMXfFC.js} +3 -3
- package/dist/assets/chunk-XXDRQBXY-BToo1uqb.js +1 -0
- package/dist/assets/{chunk-YOTPTUD7-Ck87Kqxe.js → chunk-YOTPTUD7-CY4obsV0.js} +1 -1
- package/dist/assets/{chunk-ZGVPDNZ5-BbfK6Bfd.js → chunk-ZGVPDNZ5-BleImZKe.js} +1 -1
- package/dist/assets/{chunk-ZIRB5QZD-BDpzh4Yl.js → chunk-ZIRB5QZD-C1TfdjpX.js} +1 -1
- package/dist/assets/{circle-dashed-CU3yApvP.js → circle-dashed-CEEssYIw.js} +1 -1
- package/dist/assets/classDiagram-OUVF2IWQ-D_TusZGx.js +1 -0
- package/dist/assets/classDiagram-v2-EOCWNBFH-B1NFZTmS.js +1 -0
- package/dist/assets/client-C6YQx7A-.js +1 -0
- package/dist/assets/config-split-page-DKPelvjR.js +1 -0
- package/dist/assets/confirm-dialog-BCGeh61X.js +1 -0
- package/dist/assets/{cose-bilkent-JH36ORCC-CQfMxKCT.js → cose-bilkent-JH36ORCC-CVgUHXkj.js} +1 -1
- package/dist/assets/createLucideIcon-CF8U9dh7.js +1 -0
- package/dist/assets/cynefin-VYW2F7L2-CJZSs5s_.js +1 -0
- package/dist/assets/{cynefinDiagram-TSTJHNR4-CxFTiC-p.js → cynefinDiagram-TSTJHNR4-cdfImbfI.js} +1 -1
- package/dist/assets/{dagre-CaBNMcB1.js → dagre-CHNN9L9I.js} +1 -1
- package/dist/assets/{dagre-VKFMJZFB-S_7Hc7bI.js → dagre-VKFMJZFB-PscaENwr.js} +1 -1
- package/dist/assets/desktop-capabilities-page-BENHdKfk.js +1 -0
- package/dist/assets/desktop-update-config-BJMTQMRS.js +1 -0
- package/dist/assets/{diagram-FQU43EPY-C7zENvFb.js → diagram-FQU43EPY-CH_wye41.js} +1 -1
- package/dist/assets/{diagram-G47NLZAW-DqYTCqZA.js → diagram-G47NLZAW-Dtjpmi6D.js} +1 -1
- package/dist/assets/{diagram-NH7WQ7WH-BfSJtXRc.js → diagram-NH7WQ7WH-UdjLHyaz.js} +1 -1
- package/dist/assets/{diagram-OA4YK3LP-CFO-j67H.js → diagram-OA4YK3LP-DYsToEaL.js} +1 -1
- package/dist/assets/{diagram-WEI45ONY-DBQDbTaJ.js → diagram-WEI45ONY-CA7kuIer.js} +1 -1
- package/dist/assets/dialog-DQXou6pg.js +5 -0
- package/dist/assets/dist-CiC9Fd9J.js +1 -0
- package/dist/assets/doc-browser-CCYS_csH.js +1 -0
- package/dist/assets/doc-browser-context-CPLWVFLd.js +1 -0
- package/dist/assets/{docx-preview-B4-aDfvO.js → docx-preview-D--EsUWi.js} +1 -1
- package/dist/assets/{ebnfDiagram-CCIWWBDH-CfDNIXFN.js → ebnfDiagram-CCIWWBDH-BrjaoOuq.js} +1 -1
- package/dist/assets/{erDiagram-Q63AITRT-D95rFXMM.js → erDiagram-Q63AITRT-nZQa2kCM.js} +1 -1
- package/dist/assets/es2015-DHRpDU-q.js +41 -0
- package/dist/assets/eventmodeling-45OFAUF4-rc7kUq4V.js +1 -0
- package/dist/assets/extensions-CsWT7x3v.js +1 -0
- package/dist/assets/{eye-C84inPcV.js → eye-DJtw5KJ5.js} +1 -1
- package/dist/assets/flowDiagram-23GEKE2U-DAjaeGO8.js +1 -0
- package/dist/assets/form-actions-DDQk0END.js +1 -0
- package/dist/assets/{ganttDiagram-NO4QXBWP-Bawg0P0r.js → ganttDiagram-NO4QXBWP-CyFZHIHN.js} +1 -1
- package/dist/assets/gitGraph-TEB2WS4Q-Ce0gf6ps.js +1 -0
- package/dist/assets/{gitGraphDiagram-IHSO6WYX-BbKh9nbL.js → gitGraphDiagram-IHSO6WYX-Dfpq3z2M.js} +1 -1
- package/dist/assets/{i18n-20rSH40D.js → i18n-BjPkAKMQ.js} +2 -2
- package/dist/assets/info-DKCQHKI2-Cp-Tr78m.js +1 -0
- package/dist/assets/{infoDiagram-FWYZ7A6U-DPffZXYh.js → infoDiagram-FWYZ7A6U-Diiz0k1E.js} +1 -1
- package/dist/assets/{ishikawaDiagram-FXEZZL3T-CBMsLwZ2.js → ishikawaDiagram-FXEZZL3T-B3R3SN4M.js} +1 -1
- package/dist/assets/{journeyDiagram-5HDEW3XC-Mz5U4OzU.js → journeyDiagram-5HDEW3XC-DFOLKiNv.js} +1 -1
- package/dist/assets/{kanban-definition-HUTT4EX6-FXZq2k19.js → kanban-definition-HUTT4EX6-BMXpDp3g.js} +1 -1
- package/dist/assets/katex-B4FQSo9k.js +1 -0
- package/dist/assets/keyboard-shortcuts-settings-page-hqTP7akj.js +1 -0
- package/dist/assets/{line-BZwCgT9K.js → line-64_FhCoJ.js} +1 -1
- package/dist/assets/{linear-CTe9mKUw.js → linear-aF1fg7bK.js} +1 -1
- package/dist/assets/loader-circle-B-4WwzBj.js +1 -0
- package/dist/assets/login-page-BUwshAq4.js +1 -0
- package/dist/assets/login-page-CdlI6B8e.js +1 -0
- package/dist/assets/main-BVYdyT60.css +1 -0
- package/dist/assets/main-DYEALeoQ.js +2 -0
- package/dist/assets/main-i18n-catalog.config-1o2hjZ0m.js +1 -0
- package/dist/assets/{map-Ci48ZwAp.js → map-BC3Amra3.js} +1 -1
- package/dist/assets/mcp-marketplace-page-CRRQT6SP.js +1 -0
- package/dist/assets/{mermaid-parser.core-CzPD3U_z.js → mermaid-parser.core-DdMcZwnE.js} +2 -2
- package/dist/assets/{mermaid.core-geIMNPbV.js → mermaid.core-BHdiEBbI.js} +3 -3
- package/dist/assets/{mindmap-definition-LN4V7U3C-xqlKxsr_.js → mindmap-definition-LN4V7U3C-CtHVaZyV.js} +1 -1
- package/dist/assets/model-config-page-BSsHOhV7.js +1 -0
- package/dist/assets/navigation-history-CyawyVz0.js +1 -0
- package/dist/assets/navigation-link-D-fxdv0i.js +3 -0
- package/dist/assets/{ordinal-MxnX8yhv.js → ordinal-6b3jw4cz.js} +1 -1
- package/dist/assets/packet-7NZHBO7P-BOJuCraS.js +1 -0
- package/dist/assets/panel-app-i18n-catalog.config-kQO7QAwH.js +1 -0
- package/dist/assets/panelStandalone-BeI0Ndsx.js +2 -0
- package/dist/assets/{pegDiagram-2B236MQR-D50MFTN1.js → pegDiagram-2B236MQR-BtbG3Bgu.js} +1 -1
- package/dist/assets/pie-RZYD4A2V-D-FEO81x.js +1 -0
- package/dist/assets/{pieDiagram-ENE6RG2P-CpA13oiC.js → pieDiagram-ENE6RG2P-FmLl2hzN.js} +1 -1
- package/dist/assets/privacy-settings-page-pW_1naDz.js +1 -0
- package/dist/assets/projects-k6SLda_A.js +1 -0
- package/dist/assets/provider-models-mVzuEQBS.js +1 -0
- package/dist/assets/provider-scoped-model-input-CVbtT8L9.js +1 -0
- package/dist/assets/providers-config-page-rBlVrHkb.js +1 -0
- package/dist/assets/{puzzle-D6gulz7u.js → puzzle-kKiVft9-.js} +1 -1
- package/dist/assets/pwa-BgGM4kkY.js +1 -0
- package/dist/assets/{quadrantDiagram-ABIIQ3AL-CYCgaj4l.js → quadrantDiagram-ABIIQ3AL-7-OzMNpF.js} +1 -1
- package/dist/assets/radar-I7S5WNFK-Bq3eK1vK.js +1 -0
- package/dist/assets/railroad-3IZDKUUU-C3uZ1esg.js +1 -0
- package/dist/assets/railroad-abnf-AHOZXSZD-D3iZd1KT.js +1 -0
- package/dist/assets/railroad-ebnf-EBAXGLYW-Dl0FWqZu.js +1 -0
- package/dist/assets/railroad-peg-LSFZ7HO6-B51SbzGp.js +1 -0
- package/dist/assets/{railroadDiagram-RFXS5EU6-4LKDGlXN.js → railroadDiagram-RFXS5EU6-B_UVtLJO.js} +1 -1
- package/dist/assets/{refresh-cw-h9Xq3LY3.js → refresh-cw-BeG0y6yZ.js} +1 -1
- package/dist/assets/remote-wYWqir2w.js +1 -0
- package/dist/assets/{requirementDiagram-TGXJPOKE-CxNOU0JH.js → requirementDiagram-TGXJPOKE-D8TO2YeZ.js} +1 -1
- package/dist/assets/{rotate-cw-B6xm41Wn.js → rotate-cw-Ci2dcTO5.js} +1 -1
- package/dist/assets/runtime-config-page-DCXN0nkS.js +1 -0
- package/dist/assets/{sankeyDiagram-HTMAVEWB-DbCBDe2S.js → sankeyDiagram-HTMAVEWB-CUzIcq0B.js} +1 -1
- package/dist/assets/{save-fff_WpY2.js → save-Cr895abt.js} +1 -1
- package/dist/assets/search-config-page-CNQd481d.js +1 -0
- package/dist/assets/secrets-config-page--q7M58L8.js +3 -0
- package/dist/assets/security-config-CJb2pK2O.js +1 -0
- package/dist/assets/select-Bq-UmfCK.js +1 -0
- package/dist/assets/{sequenceDiagram-DBY2YBRQ-DA6W2BS_.js → sequenceDiagram-DBY2YBRQ-kqJzXbwu.js} +1 -1
- package/dist/assets/service-apps-panel-iLLEByRF.js +1 -0
- package/dist/assets/{settings-2-CE3ELQyk.js → settings-2-IodCcaXd.js} +1 -1
- package/dist/assets/{sizeCapture-X5ZJPWSS-T_q_d_VW.js → sizeCapture-X5ZJPWSS-D9ISogq1.js} +1 -1
- package/dist/assets/{src-CYpUlx-4.js → src-Bc0PoUJ1.js} +1 -1
- package/dist/assets/{stateDiagram-2N3HPSRC-mi8z2G0a.js → stateDiagram-2N3HPSRC-CqH5xc9W.js} +1 -1
- package/dist/assets/stateDiagram-v2-6OUMAXLB-CcOGfDdx.js +1 -0
- package/dist/assets/status-dot-DUYSKRCU.js +1 -0
- package/dist/assets/{swimlanes-5IMT3BWC-DkBEhWE4.js → swimlanes-5IMT3BWC-mwejV-rW.js} +2 -2
- package/dist/assets/swimlanesDiagram-G3AALYLV-BMI2k8RZ.js +8 -0
- package/dist/assets/tag-chip-CQU51ST3.js +1 -0
- package/dist/assets/theme-provider-D-zZkXxS.js +1 -0
- package/dist/assets/{timeline-definition-FHXFAJF6-BoFmqBw1.js → timeline-definition-FHXFAJF6-CuikIDlX.js} +1 -1
- package/dist/assets/trash-2-BDdqDh6E.js +1 -0
- package/dist/assets/treeView-QDETBFTQ-C0_07QI1.js +1 -0
- package/dist/assets/treemap-6X3UGDF4-Djpx6ccG.js +1 -0
- package/dist/assets/use-config-Bxx7DdaL.js +1 -0
- package/dist/assets/{use-desktop-capabilities-BkuRd2cY.js → use-desktop-capabilities-BTgdFgJy.js} +1 -1
- package/dist/assets/use-viewport-layout-CDcca0YL.js +1 -0
- package/dist/assets/{vennDiagram-L72KCM5P-BlZ3Or5U.js → vennDiagram-L72KCM5P-BD0P0qHh.js} +1 -1
- package/dist/assets/wardley-OPB4EBWU-DZVFxu81.js +1 -0
- package/dist/assets/{wardleyDiagram-EHGQE667-yDfr33i3.js → wardleyDiagram-EHGQE667-C6ma3t5D.js} +1 -1
- package/dist/assets/x-LUUwl8rK.js +1 -0
- package/dist/assets/{xychartDiagram-FW5EYKEG-mIXwIGAQ.js → xychartDiagram-FW5EYKEG-D7E40NBk.js} +1 -1
- package/dist/index.html +37 -54
- package/dist/panel-standalone.html +11 -15
- package/package.json +5 -5
- package/src/app/components/layout/__tests__/app-layout.test.tsx +8 -0
- package/src/app/components/layout/app-layout.tsx +18 -46
- package/src/app/configs/__tests__/app-navigation.config.test.ts +4 -0
- package/src/app/configs/app-navigation.config.ts +2 -0
- package/src/app/configs/page-resource-renderers.config.ts +13 -0
- package/src/app/index.tsx +4 -0
- package/src/app/presenters/app.presenter.ts +13 -2
- package/src/features/agents/components/__tests__/agents-page.test.tsx +4 -0
- package/src/features/agents/components/agent-details-dialog.tsx +3 -0
- package/src/features/agents/components/agents-page.tsx +7 -3
- package/src/features/apps/components/app-package-card.tsx +2 -2
- package/src/features/chat/components/conversation/chat-conversation-content.tsx +32 -19
- package/src/features/chat/components/conversation/chat-conversation-header-section.tsx +1 -0
- package/src/features/chat/components/conversation/chat-conversation-header.tsx +1 -1
- package/src/features/chat/components/conversation/chat-conversation-panel.tsx +2 -2
- package/src/features/chat/components/conversation/chat-conversation-workspace-section.tsx +1 -0
- package/src/features/chat/components/layout/__tests__/chat-page-shell.test.tsx +7 -6
- package/src/features/chat/components/layout/__tests__/chat-sidebar-toolbar.test.tsx +14 -12
- package/src/features/chat/components/layout/chat-page-shell.tsx +33 -64
- package/src/features/chat/components/layout/chat-sidebar-desktop-layout.tsx +8 -4
- package/src/features/chat/components/layout/chat-sidebar-toolbar.tsx +64 -256
- package/src/features/chat/components/layout/chat-sidebar.tsx +8 -30
- package/src/features/chat/components/providers/chat-runtime.provider.tsx +62 -0
- package/src/features/chat/features/conversation/components/__tests__/floating-session-conversation.test.tsx +70 -0
- package/src/features/chat/features/conversation/components/floating-session-conversation.tsx +27 -0
- package/src/features/chat/features/conversation/components/session-conversation-area.tsx +1 -0
- package/src/features/chat/features/conversation/components/session-conversation-panel-tab.tsx +25 -0
- package/src/features/chat/features/conversation/hooks/use-chat-composer-reference-intent.ts +2 -1
- package/src/features/chat/features/message/components/__tests__/chat-inline-panel-app-card.test.tsx +2 -1
- package/src/features/chat/features/message/components/__tests__/chat-message-assistant-header.container.test.tsx +3 -0
- package/src/features/chat/features/message/components/__tests__/chat-message-list-skill-preview.container.test.tsx +3 -0
- package/src/features/chat/features/message/components/__tests__/chat-message-list.container.test.tsx +3 -0
- package/src/features/chat/features/message/hooks/use-chat-inline-token-actions.ts +7 -3
- package/src/features/chat/features/session/components/__tests__/chat-sidebar-session-item.test.tsx +20 -0
- package/src/features/chat/features/session/components/chat-mobile-session-row.tsx +61 -0
- package/src/features/chat/features/session/components/chat-sidebar-project-groups.tsx +0 -35
- package/src/features/chat/features/session/components/chat-sidebar-session-entry.tsx +2 -0
- package/src/features/chat/features/session/components/chat-sidebar-session-item.tsx +13 -5
- package/src/features/chat/features/session/components/chat-sidebar-session-list.tsx +5 -3
- package/src/features/chat/features/session/components/session-header/__tests__/chat-session-header-actions.test.tsx +8 -0
- package/src/features/chat/features/session/components/session-header/chat-session-header-actions.tsx +3 -0
- package/src/features/chat/features/session/components/session-header/chat-session-more-actions-menu.tsx +6 -0
- package/src/features/chat/features/session/utils/chat-session-route.utils.ts +12 -0
- package/src/features/chat/features/workspace/components/__tests__/chat-session-child-sessions.test.tsx +28 -0
- package/src/features/chat/features/workspace/components/__tests__/chat-session-workspace-file-preview.test.tsx +9 -0
- package/src/features/chat/features/workspace/components/__tests__/chat-session-workspace-panel-content.test.tsx +6 -2
- package/src/features/chat/features/workspace/components/__tests__/chat-session-workspace-panel.test.tsx +49 -12
- package/src/features/chat/features/workspace/components/chat-session-workspace-file-preview.tsx +13 -6
- package/src/features/chat/features/workspace/components/chat-session-workspace-panel-content.tsx +6 -0
- package/src/features/chat/features/workspace/components/chat-session-workspace-panel-nav.tsx +21 -36
- package/src/features/chat/features/workspace/components/chat-session-workspace-panel.tsx +40 -31
- package/src/features/chat/features/workspace/components/child-sessions/chat-session-child-sessions.tsx +6 -1
- package/src/features/chat/features/workspace/components/project-files/workspace-directory-tree.tsx +2 -2
- package/src/features/chat/features/workspace/components/project-files/workspace-project-files-toolbar.tsx +2 -2
- package/src/features/chat/features/workspace/utils/__tests__/chat-workspace-panel-view-model.utils.test.ts +27 -0
- package/src/features/chat/features/workspace/utils/__tests__/workspace-file-panel-route.utils.test.ts +94 -0
- package/src/features/chat/features/workspace/utils/chat-workspace-file-tab-persistence.utils.ts +2 -0
- package/src/features/chat/features/workspace/utils/chat-workspace-file-tab.utils.ts +15 -0
- package/src/features/chat/features/workspace/utils/chat-workspace-panel-view-model.utils.ts +11 -0
- package/src/features/chat/features/workspace/utils/workspace-file-panel-route.utils.ts +147 -0
- package/src/features/chat/index.ts +20 -4
- package/src/features/chat/managers/__tests__/chat-completion-notification.manager.test.ts +8 -0
- package/src/features/chat/managers/__tests__/chat-thread-workspace.manager.test.ts +7 -2
- package/src/features/chat/managers/__tests__/session-surface.manager.test.ts +45 -0
- package/src/features/chat/managers/chat-completion-notification.manager.ts +5 -0
- package/src/features/chat/managers/chat-composer-intent.manager.ts +16 -0
- package/src/features/chat/managers/chat-thread.manager.ts +18 -27
- package/src/features/chat/managers/session-surface.manager.ts +46 -0
- package/src/features/chat/pages/__tests__/ncp-chat-page.test.tsx +23 -5
- package/src/features/chat/pages/ncp-chat-page.tsx +6 -86
- package/src/features/chat/presenters/chat.presenter.ts +2 -1
- package/src/features/chat/stores/__tests__/chat-thread.store.test.ts +2 -2
- package/src/features/chat/stores/chat-thread.store.ts +7 -1
- package/src/features/chat/stores/floating-session.store.ts +11 -0
- package/src/features/cron/components/__tests__/cron-config.test.tsx +4 -0
- package/src/features/cron/components/cron-job-detail-dialog.tsx +3 -1
- package/src/features/cron/components/cron-job-row.tsx +5 -1
- package/src/features/inbox/components/inbox-reader-dialog.test.tsx +3 -0
- package/src/features/inbox/components/inbox-reader-dialog.tsx +3 -0
- package/src/features/inbox/pages/inbox-page.test.ts +3 -0
- package/src/features/inbox/pages/inbox-page.tsx +3 -0
- package/src/features/marketplace/components/__tests__/marketplace-page-detail.test.tsx +5 -1
- package/src/features/marketplace/components/__tests__/marketplace-page.test.tsx +3 -0
- package/src/features/marketplace/components/curated-shelves/__tests__/marketplace-curated-scene-route.test.tsx +2 -0
- package/src/features/marketplace/components/marketplace-list-card.tsx +4 -0
- package/src/features/marketplace/components/mcp/__tests__/mcp-marketplace-page.test.tsx +2 -0
- package/src/features/marketplace/components/mcp/mcp-marketplace-card.tsx +3 -0
- package/src/features/notifications/components/__tests__/app-notification-toast.test.tsx +19 -0
- package/src/features/notifications/components/app-notification-toast.tsx +33 -15
- package/src/features/notifications/managers/app-notification.manager.ts +2 -0
- package/src/features/panel-apps/components/__tests__/panel-app-list-item.test.tsx +11 -4
- package/src/features/panel-apps/components/__tests__/panel-app-toolbar.test.tsx +11 -5
- package/src/features/panel-apps/components/panel-app-main-sidebar-menu-item.tsx +5 -38
- package/src/features/panel-apps/index.ts +1 -1
- package/src/features/projects/components/project-materials.test.tsx +2 -0
- package/src/features/projects/components/project-skills.tsx +7 -3
- package/src/features/projects/components/work/project-work-item-drawer.test.tsx +2 -0
- package/src/features/projects/components/work/project-work-item-drawer.tsx +3 -1
- package/src/features/right-panel-resources/components/__tests__/page-resource-icon.test.tsx +67 -0
- package/src/features/right-panel-resources/components/__tests__/page-resource-sidebar-nav.test.tsx +158 -0
- package/src/features/right-panel-resources/components/__tests__/system-object-resource.test.tsx +42 -0
- package/src/features/right-panel-resources/components/current-page-actions.tsx +36 -0
- package/src/features/right-panel-resources/components/page-resource-actions-menu.tsx +71 -0
- package/src/features/right-panel-resources/components/page-resource-icon.tsx +245 -0
- package/src/features/right-panel-resources/components/page-resource-sidebar-nav.tsx +122 -0
- package/src/features/right-panel-resources/components/system-object-resource.tsx +100 -0
- package/src/features/right-panel-resources/components/workspace-file-resource.tsx +56 -0
- package/src/features/right-panel-resources/configs/right-panel-resource-routes.config.ts +46 -3
- package/src/features/right-panel-resources/hooks/use-page-resource-actions.ts +137 -0
- package/src/features/right-panel-resources/index.ts +22 -8
- package/src/features/right-panel-resources/managers/__tests__/page-resource.manager.test.ts +149 -0
- package/src/features/right-panel-resources/managers/page-resource.manager.ts +342 -0
- package/src/features/right-panel-resources/pages/resource-page.tsx +114 -0
- package/src/features/right-panel-resources/stores/page-navigation.store.ts +55 -0
- package/src/features/right-panel-resources/types/page-resource.types.ts +11 -0
- package/src/features/right-panel-resources/utils/__tests__/right-panel-resource-route-resolver.utils.test.ts +10 -0
- package/src/features/right-panel-resources/utils/page-resource-identity.utils.ts +61 -0
- package/src/features/right-panel-resources/utils/right-panel-resource-uri.utils.ts +2 -6
- package/src/features/service-apps/components/__tests__/service-apps-panel.test.tsx +2 -0
- package/src/features/service-apps/components/service-app-list-item.tsx +5 -1
- package/src/features/settings/pages/providers-config-page.tsx +2 -2
- package/src/features/side-dock/components/__tests__/side-dock.test.tsx +9 -8
- package/src/features/side-dock/components/side-dock.tsx +14 -47
- package/src/features/side-dock/managers/side-dock.manager.ts +2 -0
- package/src/platforms/desktop/components/__tests__/desktop-app-shell.test.tsx +3 -0
- package/src/platforms/desktop/components/desktop-app-shell.tsx +5 -14
- package/src/platforms/mobile/components/__tests__/mobile-app-shell.test.tsx +1 -0
- package/src/platforms/mobile/components/__tests__/mobile-bottom-nav.test.tsx +3 -2
- package/src/platforms/mobile/components/mobile-app-shell.tsx +5 -4
- package/src/platforms/mobile/components/mobile-bottom-nav.tsx +7 -7
- package/src/platforms/mobile/components/mobile-topbar.tsx +4 -4
- package/src/shared/components/doc-browser/__tests__/doc-browser-context.test.tsx +4 -3
- package/src/shared/components/doc-browser/__tests__/doc-browser-tab-strip.test.tsx +0 -5
- package/src/shared/components/doc-browser/__tests__/doc-browser.test.tsx +57 -73
- package/src/shared/components/doc-browser/__tests__/resource-link-interceptor.test.tsx +104 -0
- package/src/shared/components/doc-browser/doc-browser-context.tsx +5 -1
- package/src/shared/components/doc-browser/doc-browser-panel-parts.tsx +1 -1
- package/src/shared/components/doc-browser/doc-browser-tab-strip.tsx +6 -118
- package/src/shared/components/doc-browser/doc-browser.tsx +30 -194
- package/src/shared/components/doc-browser/hooks/use-doc-browser-scroll-restoration.ts +1 -1
- package/src/shared/components/doc-browser/managers/doc-browser.manager.ts +11 -1
- package/src/shared/components/doc-browser/stores/doc-browser.store.ts +3 -7
- package/src/shared/components/doc-browser/types/doc-browser.types.ts +8 -1
- package/src/shared/components/doc-browser/use-doc-link-interceptor.ts +30 -32
- package/src/shared/components/doc-browser/utils/doc-browser-state.utils.ts +6 -6
- package/src/shared/components/ui/context-menu/__tests__/context-menu.test.tsx +22 -0
- package/src/shared/components/ui/context-menu/context-menu.tsx +18 -10
- package/src/shared/components/workbench/__tests__/workbench-surface.manager.test.ts +70 -0
- package/src/shared/components/workbench/__tests__/workbench-surface.test.tsx +111 -0
- package/src/shared/components/workbench/managers/workbench-surface.manager.ts +120 -0
- package/src/shared/components/workbench/stores/workbench-surface.store.ts +83 -0
- package/src/shared/components/workbench/types/workbench-surface.types.ts +32 -0
- package/src/shared/components/workbench/utils/workbench-surface-geometry.utils.ts +46 -0
- package/src/shared/components/workbench/workbench-surface-toolbar.tsx +102 -0
- package/src/shared/components/workbench/workbench-surface.tsx +401 -0
- package/src/shared/hooks/use-panel-app-scroll-restoration.test.tsx +19 -0
- package/src/shared/hooks/use-panel-app-scroll-restoration.ts +8 -6
- package/src/shared/hooks/use-scroll-restoration.test.tsx +39 -2
- package/src/shared/hooks/use-scroll-restoration.ts +33 -33
- package/src/shared/lib/api/marketplace.types.ts +1 -0
- package/src/shared/lib/i18n/locales/en-US/chat.json +38 -0
- package/src/shared/lib/i18n/locales/en-US/doc-browser.json +1 -1
- package/src/shared/lib/i18n/locales/zh-CN/chat.json +38 -0
- package/src/shared/lib/navigation-history/index.ts +1 -0
- package/src/shared/lib/navigation-history/navigation-history.utils.ts +1 -1
- package/src/shared/lib/navigation-history/scroll-restoration.manager.test.ts +11 -0
- package/src/shared/lib/navigation-history/scroll-restoration.manager.ts +36 -7
- package/src/shared/lib/navigation-history/view-memory-storage.store.test.ts +37 -0
- package/src/shared/lib/navigation-history/view-memory-storage.store.ts +21 -0
- package/src/shared/lib/ui-document-title/index.ts +1 -0
- package/dist/assets/account-panel-BW4GbzQd.js +0 -1
- package/dist/assets/api-DqzQ-_3w.js +0 -13
- package/dist/assets/app-data-C54N2p8b.js +0 -1
- package/dist/assets/app-presenter-provider-CBZ_-ewx.js +0 -115
- package/dist/assets/appearance-settings-page-C-uZ2Wkf.js +0 -1
- package/dist/assets/architecture-TIHT7OUA-DEt0Abz9.js +0 -1
- package/dist/assets/boxes-D6uPnkGo.js +0 -1
- package/dist/assets/card-BhfAZv5L.js +0 -1
- package/dist/assets/channel-CxQkbwRD.js +0 -1
- package/dist/assets/channels-list-page-Bv7CVSqV.js +0 -8
- package/dist/assets/chevron-down-BL-yMYcX.js +0 -1
- package/dist/assets/chunk-2Q5K7J3B-ClVhziok.js +0 -1
- package/dist/assets/chunk-VAUOI2AC-DZQxkIsv.js +0 -1
- package/dist/assets/chunk-XXDRQBXY-BkExtw5C.js +0 -1
- package/dist/assets/circle-alert-lSa3LRvS.js +0 -1
- package/dist/assets/classDiagram-OUVF2IWQ-Bd6apBb-.js +0 -1
- package/dist/assets/classDiagram-v2-EOCWNBFH-CYxUZGCI.js +0 -1
- package/dist/assets/client-BtGBwLTs.js +0 -1
- package/dist/assets/config-split-page-DqAXKLmG.js +0 -1
- package/dist/assets/confirm-dialog-BTKCWMn6.js +0 -1
- package/dist/assets/createLucideIcon-BNKf0_kc.js +0 -1
- package/dist/assets/cynefin-VYW2F7L2-CV0bFLH9.js +0 -1
- package/dist/assets/desktop-capabilities-page-zLzCSB7A.js +0 -1
- package/dist/assets/desktop-update-config-PmofcFf6.js +0 -1
- package/dist/assets/dialog-Xe73hpQz.js +0 -5
- package/dist/assets/dist-BiIcnf9j.js +0 -1
- package/dist/assets/dist-C5I0v8Qn.js +0 -1
- package/dist/assets/dist-czPa8xFO.js +0 -1
- package/dist/assets/doc-browser-BJrre2S_.js +0 -1
- package/dist/assets/doc-browser-BPqA-zQx.js +0 -1
- package/dist/assets/doc-browser-context-TILuCY5c.js +0 -1
- package/dist/assets/ellipsis-C5YXdOUx.js +0 -1
- package/dist/assets/es2015-cuwbYI-l.js +0 -41
- package/dist/assets/eventmodeling-45OFAUF4-BzkLWWdP.js +0 -1
- package/dist/assets/extensions-CVUFK6Jj.js +0 -1
- package/dist/assets/flowDiagram-23GEKE2U-ukkCsB0j.js +0 -1
- package/dist/assets/form-actions-BRESe-m_.js +0 -1
- package/dist/assets/gitGraph-TEB2WS4Q-BYFhT0Q5.js +0 -1
- package/dist/assets/i18n-provider-BPRq6S7O.js +0 -1
- package/dist/assets/info-DKCQHKI2-CTmlJdcH.js +0 -1
- package/dist/assets/katex-DbZC06Q5.js +0 -1
- package/dist/assets/keyboard-shortcuts-settings-page-CScSXYS4.js +0 -1
- package/dist/assets/loader-circle-K1BDdHR5.js +0 -1
- package/dist/assets/login-page-Dlyvp-81.js +0 -1
- package/dist/assets/login-page-f8qQ4xKY.js +0 -1
- package/dist/assets/logo-badge-C-5-zim6.js +0 -1
- package/dist/assets/main-D2dWy8fM.css +0 -1
- package/dist/assets/main-DMNmwcJE.js +0 -2
- package/dist/assets/main-i18n-catalog.config-DZ-5ollN.js +0 -1
- package/dist/assets/mcp-marketplace-page-FfIfEo6w.js +0 -10
- package/dist/assets/mcp-marketplace-page-sH7VptN_.js +0 -1
- package/dist/assets/model-config-page-Bcm6-pCX.js +0 -1
- package/dist/assets/navigation-link-BAQjgx2F.js +0 -3
- package/dist/assets/packet-7NZHBO7P-BbrI0ZlN.js +0 -1
- package/dist/assets/panel-app-i18n-catalog.config-p3qAY_Eq.js +0 -1
- package/dist/assets/panelStandalone-By-6dDXS.js +0 -2
- package/dist/assets/pie-RZYD4A2V-B7zE1ZIr.js +0 -1
- package/dist/assets/plus-LA8-jpxP.js +0 -1
- package/dist/assets/popover-NkrFlWHp.js +0 -1
- package/dist/assets/privacy-settings-page-B1sHLAc1.js +0 -1
- package/dist/assets/projects-Voql-cvx.js +0 -1
- package/dist/assets/provider-models-hrHMcHqg.js +0 -1
- package/dist/assets/provider-scoped-model-input-BQsugx1v.js +0 -1
- package/dist/assets/providers-config-page-BDEdHJbw.js +0 -1
- package/dist/assets/pwa-CzqfYjFx.js +0 -1
- package/dist/assets/radar-I7S5WNFK-1X_q11Ed.js +0 -1
- package/dist/assets/railroad-3IZDKUUU-CIXnuFyE.js +0 -1
- package/dist/assets/railroad-abnf-AHOZXSZD-D6ImKl2r.js +0 -1
- package/dist/assets/railroad-ebnf-EBAXGLYW-2j9d3twU.js +0 -1
- package/dist/assets/railroad-peg-LSFZ7HO6-DMVaJGbm.js +0 -1
- package/dist/assets/remote-BekqL5nA.js +0 -1
- package/dist/assets/runtime-config-page-BH9uF4u_.js +0 -1
- package/dist/assets/search-CUe41wjm.js +0 -1
- package/dist/assets/search-config-page-DWKlMHgH.js +0 -1
- package/dist/assets/secrets-config-page-DiQL088Y.js +0 -3
- package/dist/assets/security-config-DmTDKKY4.js +0 -1
- package/dist/assets/select-CG5YWnwe.js +0 -1
- package/dist/assets/service-apps-panel-CEnyYsQp.js +0 -1
- package/dist/assets/skeleton-Drvn83YW.js +0 -1
- package/dist/assets/stateDiagram-v2-6OUMAXLB-OlIMT57r.js +0 -1
- package/dist/assets/swimlanesDiagram-G3AALYLV-sLThrh07.js +0 -8
- package/dist/assets/tabs-BuE0qKMh.js +0 -1
- package/dist/assets/tag-chip-B1AYPOKL.js +0 -1
- package/dist/assets/theme-provider-DzvAi3pe.js +0 -1
- package/dist/assets/tooltip-DYcuWhuP.js +0 -1
- package/dist/assets/trash-2-BPPYt2NV.js +0 -1
- package/dist/assets/treeView-QDETBFTQ-CCFyazDE.js +0 -1
- package/dist/assets/treemap-6X3UGDF4-D6wvq1Hz.js +0 -1
- package/dist/assets/use-config-BEdbtpD4.js +0 -1
- package/dist/assets/use-panel-app-scroll-restoration-ZnicIfo3.js +0 -1
- package/dist/assets/use-viewport-layout-BS18drMT.js +0 -1
- package/dist/assets/utils-CBZPzC_b.js +0 -8
- package/dist/assets/wardley-OPB4EBWU-BRzaRyFf.js +0 -1
- package/dist/assets/x-DdXOqLnX.js +0 -1
- package/src/features/panel-apps/components/__tests__/panel-app-main-sidebar-nav.test.tsx +0 -219
- package/src/features/panel-apps/components/panel-app-main-sidebar-nav.tsx +0 -258
- package/src/shared/components/doc-browser/utils/doc-browser-floating-panel.utils.ts +0 -83
- /package/dist/assets/{array-D0DyKZdT.js → array-B0sEvCP9.js} +0 -0
- /package/dist/assets/{chunk-KEIR6QF5-CuZFOa6q.js → chunk-KEIR6QF5-BeO7fxDQ.js} +0 -0
- /package/dist/assets/{chunk-Y2CYZVJY-Frut-1TF.js → chunk-Y2CYZVJY-JQfgEV36.js} +0 -0
- /package/dist/assets/{config-hints-B_C9DAp5.js → config-hints-D3OuwoEY.js} +0 -0
- /package/dist/assets/{cytoscape.esm-BibuhnZD.js → cytoscape.esm-CzJ9uXgi.js} +0 -0
- /package/dist/assets/{defaultLocale-q7sRUXPc.js → defaultLocale-USmzX3VG.js} +0 -0
- /package/dist/assets/{dist-DhMddrrH.js → dist-BYF6XVna.js} +0 -0
- /package/dist/assets/{graphlib-BM63WsW3.js → graphlib-DEFMkHdW.js} +0 -0
- /package/dist/assets/{host-capabilities-B107nwS3.js → host-capabilities-C0MmWd3M.js} +0 -0
- /package/dist/assets/{init-CRMkf9sL.js → init-04ErALoz.js} +0 -0
- /package/dist/assets/{jszip.min-6thm2J_a.js → jszip.min-BnQ5NRy2.js} +0 -0
- /package/dist/assets/{katex-B26hhTOT.js → katex-CsAM73R9.js} +0 -0
- /package/dist/assets/{middleware-0o3JF3tS.js → middleware-CAXxl-af.js} +0 -0
- /package/dist/assets/{panel-app-B39rJPj8.js → panel-app-2EACRB8p.js} +0 -0
- /package/dist/assets/{path-BFMmafCM.js → path-CzxQ9n2G.js} +0 -0
- /package/dist/assets/{rough.esm-5Tjchx1D.js → rough.esm-pT9fdsW3.js} +0 -0
- /package/dist/assets/{xlsx-BC8ibjXK.js → xlsx-BRpCSiE4.js} +0 -0
|
@@ -1,219 +0,0 @@
|
|
|
1
|
-
import { render, screen } from "@testing-library/react";
|
|
2
|
-
import userEvent from "@testing-library/user-event";
|
|
3
|
-
import { MemoryRouter } from "react-router-dom";
|
|
4
|
-
import { beforeEach, describe, expect, it, vi } from "vitest";
|
|
5
|
-
import { viewportLayoutManager } from "@/app/managers/viewport-layout.manager";
|
|
6
|
-
import { useViewportLayoutStore } from "@/app/stores/viewport-layout.store";
|
|
7
|
-
import {
|
|
8
|
-
getMainSidebarPanelApps,
|
|
9
|
-
PanelAppMainSidebarNav,
|
|
10
|
-
} from "@/features/panel-apps/components/panel-app-main-sidebar-nav";
|
|
11
|
-
import type { PanelAppEntryView } from "@/shared/lib/api";
|
|
12
|
-
|
|
13
|
-
const mocks = vi.hoisted(() => ({
|
|
14
|
-
entries: [] as PanelAppEntryView[],
|
|
15
|
-
mutate: vi.fn(),
|
|
16
|
-
}));
|
|
17
|
-
|
|
18
|
-
vi.mock("@/features/panel-apps/hooks/use-panel-apps", () => ({
|
|
19
|
-
usePanelApps: () => ({ data: { entries: mocks.entries } }),
|
|
20
|
-
useUpdatePanelAppPreferences: () => ({
|
|
21
|
-
isPending: false,
|
|
22
|
-
mutate: mocks.mutate,
|
|
23
|
-
}),
|
|
24
|
-
}));
|
|
25
|
-
|
|
26
|
-
function createEntry(
|
|
27
|
-
overrides: Partial<PanelAppEntryView> = {},
|
|
28
|
-
): PanelAppEntryView {
|
|
29
|
-
return {
|
|
30
|
-
appId: "demo",
|
|
31
|
-
clientDeclared: false,
|
|
32
|
-
clientGranted: false,
|
|
33
|
-
contentPath: "/api/panel-apps/demo/content",
|
|
34
|
-
createdAt: "2026-08-19T00:00:00.000Z",
|
|
35
|
-
favorite: false,
|
|
36
|
-
fileName: "demo.panel.html",
|
|
37
|
-
id: "demo",
|
|
38
|
-
kind: "single-file",
|
|
39
|
-
mainSidebar: false,
|
|
40
|
-
openCount: 0,
|
|
41
|
-
sizeBytes: 10,
|
|
42
|
-
title: "Demo",
|
|
43
|
-
updatedAt: "2026-08-19T00:00:00.000Z",
|
|
44
|
-
...overrides,
|
|
45
|
-
};
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
describe("PanelAppMainSidebarNav", () => {
|
|
49
|
-
beforeEach(() => {
|
|
50
|
-
window.localStorage.clear();
|
|
51
|
-
viewportLayoutManager.resetForTests();
|
|
52
|
-
mocks.entries = [];
|
|
53
|
-
mocks.mutate.mockReset();
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
it("projects only manually added apps in persisted order", () => {
|
|
57
|
-
const entries = [
|
|
58
|
-
createEntry({ appId: "hidden", title: "Hidden" }),
|
|
59
|
-
createEntry({
|
|
60
|
-
appId: "second",
|
|
61
|
-
mainSidebar: true,
|
|
62
|
-
mainSidebarOrder: 1,
|
|
63
|
-
title: "Second",
|
|
64
|
-
}),
|
|
65
|
-
createEntry({
|
|
66
|
-
appId: "first",
|
|
67
|
-
mainSidebar: true,
|
|
68
|
-
mainSidebarOrder: 0,
|
|
69
|
-
title: "First",
|
|
70
|
-
}),
|
|
71
|
-
];
|
|
72
|
-
|
|
73
|
-
expect(
|
|
74
|
-
getMainSidebarPanelApps(entries).map((entry) => entry.appId),
|
|
75
|
-
).toEqual(["first", "second"]);
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
it("renders stable app routes and hides unbound apps", () => {
|
|
79
|
-
mocks.entries = [
|
|
80
|
-
createEntry({
|
|
81
|
-
appId: "publisher.todo",
|
|
82
|
-
mainSidebar: true,
|
|
83
|
-
title: "Todo",
|
|
84
|
-
}),
|
|
85
|
-
createEntry({ appId: "hidden", title: "Hidden" }),
|
|
86
|
-
];
|
|
87
|
-
|
|
88
|
-
render(
|
|
89
|
-
<MemoryRouter initialEntries={["/apps/panel/publisher.todo"]}>
|
|
90
|
-
<PanelAppMainSidebarNav isCollapsed={false} />
|
|
91
|
-
</MemoryRouter>,
|
|
92
|
-
);
|
|
93
|
-
|
|
94
|
-
const link = screen.getByRole("link", { name: "Todo" });
|
|
95
|
-
expect(link.getAttribute("href")).toBe("/apps/panel/publisher.todo");
|
|
96
|
-
expect(link.getAttribute("aria-current")).toBe("page");
|
|
97
|
-
expect(screen.queryByText("Hidden")).toBeNull();
|
|
98
|
-
const groupButton = screen.getByRole("button", { name: "Collapse apps" });
|
|
99
|
-
expect(groupButton.getAttribute("aria-expanded")).toBe("true");
|
|
100
|
-
expect(groupButton.className).toContain("text-[13px]");
|
|
101
|
-
expect(groupButton.className).toContain("font-medium");
|
|
102
|
-
expect(groupButton.className).not.toContain("text-[11px]");
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
it("collapses the ordered app group and persists the device layout preference", async () => {
|
|
106
|
-
const user = userEvent.setup();
|
|
107
|
-
mocks.entries = [
|
|
108
|
-
createEntry({
|
|
109
|
-
appId: "first",
|
|
110
|
-
mainSidebar: true,
|
|
111
|
-
mainSidebarOrder: 0,
|
|
112
|
-
title: "First",
|
|
113
|
-
}),
|
|
114
|
-
createEntry({
|
|
115
|
-
appId: "second",
|
|
116
|
-
mainSidebar: true,
|
|
117
|
-
mainSidebarOrder: 1,
|
|
118
|
-
title: "Second",
|
|
119
|
-
}),
|
|
120
|
-
];
|
|
121
|
-
|
|
122
|
-
render(
|
|
123
|
-
<MemoryRouter>
|
|
124
|
-
<PanelAppMainSidebarNav isCollapsed={false} />
|
|
125
|
-
</MemoryRouter>,
|
|
126
|
-
);
|
|
127
|
-
|
|
128
|
-
await user.click(screen.getByRole("button", { name: "Collapse apps" }));
|
|
129
|
-
|
|
130
|
-
expect(screen.queryByRole("link", { name: "First" })).toBeNull();
|
|
131
|
-
expect(screen.queryByRole("link", { name: "Second" })).toBeNull();
|
|
132
|
-
expect(
|
|
133
|
-
screen
|
|
134
|
-
.getByRole("button", { name: "Expand apps" })
|
|
135
|
-
.getAttribute("aria-expanded"),
|
|
136
|
-
).toBe("false");
|
|
137
|
-
expect(
|
|
138
|
-
useViewportLayoutStore.getState().isMainSidebarAppGroupCollapsed,
|
|
139
|
-
).toBe(true);
|
|
140
|
-
const persisted = JSON.parse(
|
|
141
|
-
window.localStorage.getItem("nextclaw.app.viewport-layout") ?? "{}",
|
|
142
|
-
) as { state?: { isMainSidebarAppGroupCollapsed?: boolean } };
|
|
143
|
-
expect(persisted.state?.isMainSidebarAppGroupCollapsed).toBe(true);
|
|
144
|
-
});
|
|
145
|
-
|
|
146
|
-
it("removes an expanded entry from its hover actions without nesting the button in the link", async () => {
|
|
147
|
-
const user = userEvent.setup();
|
|
148
|
-
mocks.entries = [
|
|
149
|
-
createEntry({
|
|
150
|
-
appId: "publisher.todo",
|
|
151
|
-
mainSidebar: true,
|
|
152
|
-
title: "Todo",
|
|
153
|
-
}),
|
|
154
|
-
];
|
|
155
|
-
|
|
156
|
-
render(
|
|
157
|
-
<MemoryRouter initialEntries={["/apps/panel/publisher.todo"]}>
|
|
158
|
-
<PanelAppMainSidebarNav isCollapsed={false} />
|
|
159
|
-
</MemoryRouter>,
|
|
160
|
-
);
|
|
161
|
-
|
|
162
|
-
const link = screen.getByRole("link", { name: "Todo" });
|
|
163
|
-
const menuButton = screen.getByRole("button", {
|
|
164
|
-
name: "More panel app actions: Todo",
|
|
165
|
-
});
|
|
166
|
-
expect(link.contains(menuButton)).toBe(false);
|
|
167
|
-
expect(menuButton.className).toContain("group-hover/panel-app:opacity-100");
|
|
168
|
-
|
|
169
|
-
await user.click(menuButton);
|
|
170
|
-
await user.click(
|
|
171
|
-
screen.getByRole("button", { name: "Remove from main sidebar" }),
|
|
172
|
-
);
|
|
173
|
-
|
|
174
|
-
expect(mocks.mutate).toHaveBeenCalledWith({
|
|
175
|
-
id: "demo",
|
|
176
|
-
preferences: { mainSidebar: false },
|
|
177
|
-
});
|
|
178
|
-
expect(link.getAttribute("aria-current")).toBe("page");
|
|
179
|
-
});
|
|
180
|
-
|
|
181
|
-
it("aggregates collapsed-rail apps behind one navigation menu", async () => {
|
|
182
|
-
const user = userEvent.setup();
|
|
183
|
-
mocks.entries = [
|
|
184
|
-
createEntry({
|
|
185
|
-
appId: "publisher.todo",
|
|
186
|
-
mainSidebar: true,
|
|
187
|
-
title: "Todo",
|
|
188
|
-
}),
|
|
189
|
-
createEntry({
|
|
190
|
-
appId: "publisher.notes",
|
|
191
|
-
mainSidebar: true,
|
|
192
|
-
title: "Notes",
|
|
193
|
-
}),
|
|
194
|
-
];
|
|
195
|
-
|
|
196
|
-
render(
|
|
197
|
-
<MemoryRouter>
|
|
198
|
-
<PanelAppMainSidebarNav isCollapsed />
|
|
199
|
-
</MemoryRouter>,
|
|
200
|
-
);
|
|
201
|
-
|
|
202
|
-
expect(screen.queryByRole("link", { name: "Todo" })).toBeNull();
|
|
203
|
-
expect(
|
|
204
|
-
screen.queryByRole("button", { name: "More panel app actions: Todo" }),
|
|
205
|
-
).toBeNull();
|
|
206
|
-
await user.click(screen.getByRole("button", { name: "Apps" }));
|
|
207
|
-
expect(screen.getByRole("link", { name: "Todo" })).toBeTruthy();
|
|
208
|
-
expect(screen.getByRole("link", { name: "Notes" })).toBeTruthy();
|
|
209
|
-
});
|
|
210
|
-
|
|
211
|
-
it("renders no section when no app was manually added", () => {
|
|
212
|
-
const { container } = render(
|
|
213
|
-
<MemoryRouter>
|
|
214
|
-
<PanelAppMainSidebarNav isCollapsed={false} />
|
|
215
|
-
</MemoryRouter>,
|
|
216
|
-
);
|
|
217
|
-
expect(container.firstChild).toBeNull();
|
|
218
|
-
});
|
|
219
|
-
});
|
|
@@ -1,258 +0,0 @@
|
|
|
1
|
-
import { useMemo, useState } from "react";
|
|
2
|
-
import { ChevronDown, LayoutGrid, MoreVertical } from "lucide-react";
|
|
3
|
-
import { useLocation } from "react-router-dom";
|
|
4
|
-
import { viewportLayoutManager } from "@/app/managers/viewport-layout.manager";
|
|
5
|
-
import {
|
|
6
|
-
SIDEBAR_RAIL_ACTIVE_SURFACE_CLASS,
|
|
7
|
-
SIDEBAR_RAIL_CONTROL_CLASS,
|
|
8
|
-
SIDEBAR_RAIL_ICON_CLASS,
|
|
9
|
-
SIDEBAR_RAIL_SURFACE_CLASS,
|
|
10
|
-
} from "@/app/components/layout/sidebar-rail.styles";
|
|
11
|
-
import { SidebarNavLinkItem } from "@/app/components/layout/sidebar-items";
|
|
12
|
-
import { useViewportLayoutStore } from "@/app/stores/viewport-layout.store";
|
|
13
|
-
import { PanelAppIcon } from "@/features/panel-apps/components/panel-app-icon";
|
|
14
|
-
import { PanelAppMainSidebarMenuItem } from "@/features/panel-apps/components/panel-app-main-sidebar-menu-item";
|
|
15
|
-
import { usePanelApps } from "@/features/panel-apps/hooks/use-panel-apps";
|
|
16
|
-
import { IconActionButton } from "@/shared/components/ui/actions/icon-action-button";
|
|
17
|
-
import {
|
|
18
|
-
Popover,
|
|
19
|
-
PopoverContent,
|
|
20
|
-
PopoverTrigger,
|
|
21
|
-
} from "@/shared/components/ui/popover";
|
|
22
|
-
import {
|
|
23
|
-
Tooltip,
|
|
24
|
-
TooltipContent,
|
|
25
|
-
TooltipProvider,
|
|
26
|
-
TooltipTrigger,
|
|
27
|
-
} from "@/shared/components/ui/tooltip";
|
|
28
|
-
import type { PanelAppEntryView } from "@/shared/lib/api";
|
|
29
|
-
import { t } from "@/shared/lib/i18n";
|
|
30
|
-
import { cn } from "@/shared/lib/utils";
|
|
31
|
-
|
|
32
|
-
const MAIN_SIDEBAR_FALLBACK_ORDER = Number.MAX_SAFE_INTEGER;
|
|
33
|
-
|
|
34
|
-
export function getMainSidebarPanelApps(
|
|
35
|
-
entries: readonly PanelAppEntryView[],
|
|
36
|
-
): PanelAppEntryView[] {
|
|
37
|
-
return entries
|
|
38
|
-
.filter((entry) => entry.mainSidebar)
|
|
39
|
-
.sort(
|
|
40
|
-
(left, right) =>
|
|
41
|
-
(left.mainSidebarOrder ?? MAIN_SIDEBAR_FALLBACK_ORDER) -
|
|
42
|
-
(right.mainSidebarOrder ?? MAIN_SIDEBAR_FALLBACK_ORDER) ||
|
|
43
|
-
left.title.localeCompare(right.title),
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export function PanelAppMainSidebarNav({
|
|
48
|
-
isCollapsed,
|
|
49
|
-
}: {
|
|
50
|
-
isCollapsed: boolean;
|
|
51
|
-
}) {
|
|
52
|
-
const panelApps = usePanelApps();
|
|
53
|
-
const entries = useMemo(
|
|
54
|
-
() => getMainSidebarPanelApps(panelApps.data?.entries ?? []),
|
|
55
|
-
[panelApps.data?.entries],
|
|
56
|
-
);
|
|
57
|
-
const isGroupCollapsed = useViewportLayoutStore(
|
|
58
|
-
(state) => state.isMainSidebarAppGroupCollapsed,
|
|
59
|
-
);
|
|
60
|
-
|
|
61
|
-
if (entries.length === 0) {
|
|
62
|
-
return null;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
if (isCollapsed) {
|
|
66
|
-
return <PanelAppMainSidebarRailMenu entries={entries} />;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
return (
|
|
70
|
-
<div
|
|
71
|
-
className="mt-1 border-t border-border/50 px-3 pt-1"
|
|
72
|
-
data-testid="panel-app-main-sidebar-nav"
|
|
73
|
-
>
|
|
74
|
-
<PanelAppMainSidebarGroupHeader
|
|
75
|
-
entries={entries}
|
|
76
|
-
isCollapsed={isGroupCollapsed}
|
|
77
|
-
/>
|
|
78
|
-
{!isGroupCollapsed ? (
|
|
79
|
-
<ul className="mt-0.5 space-y-0.5">
|
|
80
|
-
{entries.map((entry) => (
|
|
81
|
-
<PanelAppMainSidebarNavItem key={entry.appId} entry={entry} />
|
|
82
|
-
))}
|
|
83
|
-
</ul>
|
|
84
|
-
) : null}
|
|
85
|
-
</div>
|
|
86
|
-
);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
function getPanelAppTarget(appId: string): string {
|
|
90
|
-
return `/apps/panel/${encodeURIComponent(appId)}`;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
function useHasActivePanelApp(entries: readonly PanelAppEntryView[]): boolean {
|
|
94
|
-
const { pathname } = useLocation();
|
|
95
|
-
return entries.some((entry) => pathname === getPanelAppTarget(entry.appId));
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
function PanelAppMainSidebarGroupHeader({
|
|
99
|
-
entries,
|
|
100
|
-
isCollapsed,
|
|
101
|
-
}: {
|
|
102
|
-
entries: readonly PanelAppEntryView[];
|
|
103
|
-
isCollapsed: boolean;
|
|
104
|
-
}) {
|
|
105
|
-
const isActive = useHasActivePanelApp(entries);
|
|
106
|
-
const actionLabel = isCollapsed
|
|
107
|
-
? t("panelAppsMainSidebarGroupExpand")
|
|
108
|
-
: t("panelAppsMainSidebarGroupCollapse");
|
|
109
|
-
return (
|
|
110
|
-
<button
|
|
111
|
-
type="button"
|
|
112
|
-
aria-label={actionLabel}
|
|
113
|
-
aria-expanded={!isCollapsed}
|
|
114
|
-
className={cn(
|
|
115
|
-
"flex w-full items-center gap-2.5 rounded-lg px-2.5 py-1.5 text-left text-[13px] font-medium text-muted-foreground transition-colors hover:bg-gray-200/60 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border",
|
|
116
|
-
isCollapsed && isActive && "bg-gray-200/80 text-gray-900",
|
|
117
|
-
)}
|
|
118
|
-
onClick={viewportLayoutManager.toggleMainSidebarAppGroupCollapsed}
|
|
119
|
-
>
|
|
120
|
-
<ChevronDown
|
|
121
|
-
aria-hidden="true"
|
|
122
|
-
className={cn(
|
|
123
|
-
"h-3.5 w-3.5 shrink-0 transition-transform",
|
|
124
|
-
isCollapsed && "-rotate-90",
|
|
125
|
-
)}
|
|
126
|
-
/>
|
|
127
|
-
<span className="min-w-0 flex-1 truncate">
|
|
128
|
-
{t("panelAppsMainSidebarGroup")}
|
|
129
|
-
</span>
|
|
130
|
-
<span className="text-[11px] font-medium text-muted-foreground">
|
|
131
|
-
{entries.length}
|
|
132
|
-
</span>
|
|
133
|
-
</button>
|
|
134
|
-
);
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
function PanelAppMainSidebarRailMenu({
|
|
138
|
-
entries,
|
|
139
|
-
}: {
|
|
140
|
-
entries: PanelAppEntryView[];
|
|
141
|
-
}) {
|
|
142
|
-
const [isOpen, setIsOpen] = useState(false);
|
|
143
|
-
const isActive = useHasActivePanelApp(entries);
|
|
144
|
-
const label = t("panelAppsMainSidebarGroup");
|
|
145
|
-
return (
|
|
146
|
-
<div
|
|
147
|
-
className="mt-1 flex justify-center border-t border-border/50 pt-1"
|
|
148
|
-
data-testid="panel-app-main-sidebar-nav"
|
|
149
|
-
>
|
|
150
|
-
<Popover open={isOpen} onOpenChange={setIsOpen}>
|
|
151
|
-
<TooltipProvider delayDuration={250}>
|
|
152
|
-
<Tooltip disableHoverableContent>
|
|
153
|
-
<TooltipTrigger asChild>
|
|
154
|
-
<PopoverTrigger asChild>
|
|
155
|
-
<IconActionButton
|
|
156
|
-
icon={<LayoutGrid className={SIDEBAR_RAIL_ICON_CLASS} />}
|
|
157
|
-
label={label}
|
|
158
|
-
tooltip={false}
|
|
159
|
-
className={cn(
|
|
160
|
-
SIDEBAR_RAIL_CONTROL_CLASS,
|
|
161
|
-
isActive
|
|
162
|
-
? SIDEBAR_RAIL_ACTIVE_SURFACE_CLASS
|
|
163
|
-
: SIDEBAR_RAIL_SURFACE_CLASS,
|
|
164
|
-
)}
|
|
165
|
-
/>
|
|
166
|
-
</PopoverTrigger>
|
|
167
|
-
</TooltipTrigger>
|
|
168
|
-
<TooltipContent side="right" className="text-xs">
|
|
169
|
-
{label}
|
|
170
|
-
</TooltipContent>
|
|
171
|
-
</Tooltip>
|
|
172
|
-
</TooltipProvider>
|
|
173
|
-
<PopoverContent
|
|
174
|
-
side="right"
|
|
175
|
-
align="start"
|
|
176
|
-
className="w-60 rounded-xl p-2"
|
|
177
|
-
>
|
|
178
|
-
<div className="flex items-center justify-between px-2 py-1 text-xs font-semibold text-muted-foreground">
|
|
179
|
-
<span>{label}</span>
|
|
180
|
-
<span className="font-medium text-muted-foreground/60">
|
|
181
|
-
{entries.length}
|
|
182
|
-
</span>
|
|
183
|
-
</div>
|
|
184
|
-
<ul className="mt-1 space-y-0.5">
|
|
185
|
-
{entries.map((entry) => (
|
|
186
|
-
<PanelAppMainSidebarNavItem
|
|
187
|
-
key={entry.appId}
|
|
188
|
-
entry={entry}
|
|
189
|
-
onNavigate={() => setIsOpen(false)}
|
|
190
|
-
/>
|
|
191
|
-
))}
|
|
192
|
-
</ul>
|
|
193
|
-
</PopoverContent>
|
|
194
|
-
</Popover>
|
|
195
|
-
</div>
|
|
196
|
-
);
|
|
197
|
-
}
|
|
198
|
-
|
|
199
|
-
function PanelAppMainSidebarNavItem({
|
|
200
|
-
entry,
|
|
201
|
-
onNavigate,
|
|
202
|
-
}: {
|
|
203
|
-
entry: PanelAppEntryView;
|
|
204
|
-
onNavigate?: () => void;
|
|
205
|
-
}) {
|
|
206
|
-
const [isMenuOpen, setIsMenuOpen] = useState(false);
|
|
207
|
-
const linkItem = (
|
|
208
|
-
<SidebarNavLinkItem
|
|
209
|
-
to={getPanelAppTarget(entry.appId)}
|
|
210
|
-
label={entry.title}
|
|
211
|
-
iconNode={
|
|
212
|
-
<PanelAppIcon
|
|
213
|
-
icon={entry.icon}
|
|
214
|
-
title={entry.title}
|
|
215
|
-
className="h-full w-full text-[13px]"
|
|
216
|
-
imageClassName="rounded-[3px]"
|
|
217
|
-
/>
|
|
218
|
-
}
|
|
219
|
-
density="compact"
|
|
220
|
-
className="rounded-lg py-1.5 pl-5 pr-9"
|
|
221
|
-
/>
|
|
222
|
-
);
|
|
223
|
-
const link = onNavigate ? (
|
|
224
|
-
<div onClick={onNavigate}>{linkItem}</div>
|
|
225
|
-
) : (
|
|
226
|
-
linkItem
|
|
227
|
-
);
|
|
228
|
-
const menuLabel = `${t("panelAppsMoreActions")}: ${entry.title}`;
|
|
229
|
-
return (
|
|
230
|
-
<li>
|
|
231
|
-
<div className="group/panel-app relative">
|
|
232
|
-
{link}
|
|
233
|
-
<Popover open={isMenuOpen} onOpenChange={setIsMenuOpen}>
|
|
234
|
-
<PopoverTrigger asChild>
|
|
235
|
-
<button
|
|
236
|
-
type="button"
|
|
237
|
-
aria-label={menuLabel}
|
|
238
|
-
className={cn(
|
|
239
|
-
"absolute right-1 top-1/2 z-[1] -translate-y-1/2 rounded-md p-1 text-muted-foreground/70 transition-[color,background-color,opacity] hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-border",
|
|
240
|
-
isMenuOpen
|
|
241
|
-
? "pointer-events-auto opacity-100"
|
|
242
|
-
: "pointer-events-none opacity-0 group-hover/panel-app:pointer-events-auto group-hover/panel-app:opacity-100 group-focus-within/panel-app:pointer-events-auto group-focus-within/panel-app:opacity-100",
|
|
243
|
-
)}
|
|
244
|
-
>
|
|
245
|
-
<MoreVertical className="h-4 w-4" />
|
|
246
|
-
</button>
|
|
247
|
-
</PopoverTrigger>
|
|
248
|
-
<PopoverContent align="end" className="w-48 rounded-xl p-1.5">
|
|
249
|
-
<PanelAppMainSidebarMenuItem
|
|
250
|
-
entry={entry}
|
|
251
|
-
onSelect={() => setIsMenuOpen(false)}
|
|
252
|
-
/>
|
|
253
|
-
</PopoverContent>
|
|
254
|
-
</Popover>
|
|
255
|
-
</div>
|
|
256
|
-
</li>
|
|
257
|
-
);
|
|
258
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
export type FloatingPanelRect = { x: number; y: number; w: number; h: number };
|
|
2
|
-
export type FloatingPanelResizeEdge =
|
|
3
|
-
| 'left'
|
|
4
|
-
| 'right'
|
|
5
|
-
| 'top'
|
|
6
|
-
| 'bottom'
|
|
7
|
-
| 'top-left'
|
|
8
|
-
| 'top-right'
|
|
9
|
-
| 'bottom-left'
|
|
10
|
-
| 'bottom-right';
|
|
11
|
-
|
|
12
|
-
const FLOATING_PANEL_MARGIN = 40;
|
|
13
|
-
const FLOATING_PANEL_MIN_WIDTH = 360;
|
|
14
|
-
const FLOATING_PANEL_MIN_HEIGHT = 400;
|
|
15
|
-
|
|
16
|
-
function clamp(value: number, min: number, max: number): number {
|
|
17
|
-
return Math.min(max, Math.max(min, value));
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
function resizeEdgeIncludes(
|
|
21
|
-
edge: FloatingPanelResizeEdge,
|
|
22
|
-
side: 'left' | 'right' | 'top' | 'bottom',
|
|
23
|
-
): boolean {
|
|
24
|
-
return edge.split('-').includes(side);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export function createInitialFloatingPanelRect(): FloatingPanelRect {
|
|
28
|
-
return {
|
|
29
|
-
x: Math.max(FLOATING_PANEL_MARGIN, window.innerWidth - 520),
|
|
30
|
-
y: 80,
|
|
31
|
-
w: 480,
|
|
32
|
-
h: 600,
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
export function moveFloatingPanelRect(
|
|
37
|
-
startRect: FloatingPanelRect,
|
|
38
|
-
dx: number,
|
|
39
|
-
dy: number,
|
|
40
|
-
): FloatingPanelRect {
|
|
41
|
-
return {
|
|
42
|
-
...startRect,
|
|
43
|
-
x: clamp(
|
|
44
|
-
startRect.x + dx,
|
|
45
|
-
FLOATING_PANEL_MARGIN,
|
|
46
|
-
window.innerWidth - FLOATING_PANEL_MARGIN - startRect.w,
|
|
47
|
-
),
|
|
48
|
-
y: clamp(
|
|
49
|
-
startRect.y + dy,
|
|
50
|
-
FLOATING_PANEL_MARGIN,
|
|
51
|
-
window.innerHeight - FLOATING_PANEL_MARGIN - startRect.h,
|
|
52
|
-
),
|
|
53
|
-
};
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export function resizeFloatingPanelRect(
|
|
57
|
-
edge: FloatingPanelResizeEdge,
|
|
58
|
-
startRect: FloatingPanelRect,
|
|
59
|
-
dx: number,
|
|
60
|
-
dy: number,
|
|
61
|
-
): FloatingPanelRect {
|
|
62
|
-
const startRight = startRect.x + startRect.w;
|
|
63
|
-
const startBottom = startRect.y + startRect.h;
|
|
64
|
-
const nextLeft = resizeEdgeIncludes(edge, 'left')
|
|
65
|
-
? clamp(startRect.x + dx, FLOATING_PANEL_MARGIN, startRight - FLOATING_PANEL_MIN_WIDTH)
|
|
66
|
-
: startRect.x;
|
|
67
|
-
const nextRight = resizeEdgeIncludes(edge, 'right')
|
|
68
|
-
? clamp(startRight + dx, nextLeft + FLOATING_PANEL_MIN_WIDTH, window.innerWidth - FLOATING_PANEL_MARGIN)
|
|
69
|
-
: startRight;
|
|
70
|
-
const nextTop = resizeEdgeIncludes(edge, 'top')
|
|
71
|
-
? clamp(startRect.y + dy, FLOATING_PANEL_MARGIN, startBottom - FLOATING_PANEL_MIN_HEIGHT)
|
|
72
|
-
: startRect.y;
|
|
73
|
-
const nextBottom = resizeEdgeIncludes(edge, 'bottom')
|
|
74
|
-
? clamp(startBottom + dy, nextTop + FLOATING_PANEL_MIN_HEIGHT, window.innerHeight - FLOATING_PANEL_MARGIN)
|
|
75
|
-
: startBottom;
|
|
76
|
-
|
|
77
|
-
return {
|
|
78
|
-
x: nextLeft,
|
|
79
|
-
y: nextTop,
|
|
80
|
-
w: nextRight - nextLeft,
|
|
81
|
-
h: nextBottom - nextTop,
|
|
82
|
-
};
|
|
83
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|