texlite 0.19.2 → 0.21.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/DESIGN.md +276 -9
- package/OPERATIONS.md +7 -4
- package/README.md +9 -6
- package/README.zh-CN.md +8 -5
- package/dist/client/assets/AdminUsers-Cpj29JD6.js +1 -0
- package/dist/client/assets/AdminUsers-Cpj29JD6.js.br +0 -0
- package/dist/client/assets/AdminUsers-Cpj29JD6.js.gz +0 -0
- package/dist/client/assets/AgentIcon-DsoMeMA8.js +1 -0
- package/dist/client/assets/AgentIcon-DsoMeMA8.js.br +0 -0
- package/dist/client/assets/AgentIcon-DsoMeMA8.js.gz +0 -0
- package/dist/client/assets/AgentIcon-dCMgWJG-.css +1 -0
- package/dist/client/assets/AgentIcon-dCMgWJG-.css.br +0 -0
- package/dist/client/assets/AgentIcon-dCMgWJG-.css.gz +0 -0
- package/dist/client/assets/AgentManagement-0n1UkKZ5.js +1 -0
- package/dist/client/assets/AgentManagement-0n1UkKZ5.js.br +0 -0
- package/dist/client/assets/AgentManagement-0n1UkKZ5.js.gz +0 -0
- package/dist/client/assets/AgentTerminal-BbGH5iPx.js +2 -0
- package/dist/client/assets/AgentTerminal-BbGH5iPx.js.br +0 -0
- package/dist/client/assets/AgentTerminal-BbGH5iPx.js.gz +0 -0
- package/dist/client/assets/{AgentTerminalSurface-C11baRxh.js → AgentTerminalSurface-CIouKd-C.js} +2 -2
- package/dist/client/assets/AgentTerminalSurface-CIouKd-C.js.br +0 -0
- package/dist/client/assets/AgentTerminalSurface-CIouKd-C.js.gz +0 -0
- package/dist/client/assets/AvatarSettingsDialog-BjTx2yjQ.js +1 -0
- package/dist/client/assets/AvatarSettingsDialog-BjTx2yjQ.js.br +0 -0
- package/dist/client/assets/AvatarSettingsDialog-BjTx2yjQ.js.gz +0 -0
- package/dist/client/assets/CitationBibtexEditor-B4ITqbxl.js +1 -0
- package/dist/client/assets/CitationLibraryDialog-DDP3gXNt.js +3 -0
- package/dist/client/assets/CitationLibraryDialog-DDP3gXNt.js.br +0 -0
- package/dist/client/assets/CitationLibraryDialog-DDP3gXNt.js.gz +0 -0
- package/dist/client/assets/CitationNotesPreview-BjbIDOCl.js +36 -0
- package/dist/client/assets/CitationNotesPreview-BjbIDOCl.js.br +0 -0
- package/dist/client/assets/CitationNotesPreview-BjbIDOCl.js.gz +0 -0
- package/dist/client/assets/Dashboard-Dc3ANXhG.js +5 -0
- package/dist/client/assets/Dashboard-Dc3ANXhG.js.br +0 -0
- package/dist/client/assets/Dashboard-Dc3ANXhG.js.gz +0 -0
- package/dist/client/assets/GitDialog-CzLmo9Z_.js +3 -0
- package/dist/client/assets/GitDialog-CzLmo9Z_.js.br +0 -0
- package/dist/client/assets/GitDialog-CzLmo9Z_.js.gz +0 -0
- package/dist/client/assets/GitHubAccountDialog-DsQgHv-Z.js +1 -0
- package/dist/client/assets/GitHubAccountDialog-DsQgHv-Z.js.br +0 -0
- package/dist/client/assets/GitHubAccountDialog-DsQgHv-Z.js.gz +0 -0
- package/dist/client/assets/GitHubIcon-CExJn0AV.js +1 -0
- package/dist/client/assets/HistoryDialog-C4zmnE1s.js +8 -0
- package/dist/client/assets/HistoryDialog-C4zmnE1s.js.br +0 -0
- package/dist/client/assets/HistoryDialog-C4zmnE1s.js.gz +0 -0
- package/dist/client/assets/InfoPopover-Dkz742vJ.js +1 -0
- package/dist/client/assets/LatexEditor-BRPiyMbH.js +25 -0
- package/dist/client/assets/LatexEditor-BRPiyMbH.js.br +0 -0
- package/dist/client/assets/LatexEditor-BRPiyMbH.js.gz +0 -0
- package/dist/client/assets/PdfPreview-CIOM7sbu.js +1 -0
- package/dist/client/assets/PdfPreview-CIOM7sbu.js.br +0 -0
- package/dist/client/assets/PdfPreview-CIOM7sbu.js.gz +0 -0
- package/dist/client/assets/ProjectIconPickerDialog-DAiP7wVe.js +1 -0
- package/dist/client/assets/ProjectIconPickerDialog-DAiP7wVe.js.br +0 -0
- package/dist/client/assets/ProjectIconPickerDialog-DAiP7wVe.js.gz +0 -0
- package/dist/client/assets/ProjectSearchDialog-B5a5mHXl.js +1 -0
- package/dist/client/assets/ProjectSearchDialog-B5a5mHXl.js.br +0 -0
- package/dist/client/assets/ProjectSearchDialog-B5a5mHXl.js.gz +0 -0
- package/dist/client/assets/ProjectSettings-CARW1k8M.js +4 -0
- package/dist/client/assets/ProjectSettings-CARW1k8M.js.br +0 -0
- package/dist/client/assets/ProjectSettings-CARW1k8M.js.gz +0 -0
- package/dist/client/assets/ProjectWorkspace-BQ3QGBVy.js +31 -0
- package/dist/client/assets/ProjectWorkspace-BQ3QGBVy.js.br +0 -0
- package/dist/client/assets/ProjectWorkspace-BQ3QGBVy.js.gz +0 -0
- package/dist/client/assets/QuickOpenDialog-kW-97LBY.js +1 -0
- package/dist/client/assets/QuickOpenDialog-kW-97LBY.js.br +0 -0
- package/dist/client/assets/QuickOpenDialog-kW-97LBY.js.gz +0 -0
- package/dist/client/assets/ReadOnlySource-B-ZZIpJq.js +2 -0
- package/dist/client/assets/SaveButton-wiTpGLho.js +1 -0
- package/dist/client/assets/{SelectionHistoryDialog-cDxbuXmO.js → SelectionHistoryDialog-CmHcjD4T.js} +2 -2
- package/dist/client/assets/SelectionHistoryDialog-CmHcjD4T.js.br +0 -0
- package/dist/client/assets/SelectionHistoryDialog-CmHcjD4T.js.gz +0 -0
- package/dist/client/assets/SharedProjectPage-BOGGeyBG.css +1 -0
- package/dist/client/assets/SharedProjectPage-BjhT-js7.js +2 -0
- package/dist/client/assets/SharedProjectPage-BjhT-js7.js.br +0 -0
- package/dist/client/assets/SharedProjectPage-BjhT-js7.js.gz +0 -0
- package/dist/client/assets/SystemMetricsDialog-Dz_zxjfR.js +1 -0
- package/dist/client/assets/SystemMetricsDialog-Dz_zxjfR.js.br +0 -0
- package/dist/client/assets/SystemMetricsDialog-Dz_zxjfR.js.gz +0 -0
- package/dist/client/assets/{TagColorSelect-D-zwdawC.js → TagColorSelect-e-Tq5V3H.js} +1 -1
- package/dist/client/assets/TagManagementDialog-BIsAi9rh.js +1 -0
- package/dist/client/assets/TagManagementDialog-BIsAi9rh.js.br +0 -0
- package/dist/client/assets/TagManagementDialog-BIsAi9rh.js.gz +0 -0
- package/dist/client/assets/TagMarquee-BLmCTTCt.js +1 -0
- package/dist/client/assets/ThemeSwitcher-dp0oKTtC.js +1 -0
- package/dist/client/assets/ThemeSwitcher-dp0oKTtC.js.br +0 -0
- package/dist/client/assets/ThemeSwitcher-dp0oKTtC.js.gz +0 -0
- package/dist/client/assets/WordCountDialog-CJb1b8cD.js +1 -0
- package/dist/client/assets/WordCountDialog-CJb1b8cD.js.br +0 -0
- package/dist/client/assets/WordCountDialog-CJb1b8cD.js.gz +0 -0
- package/dist/client/assets/arrow-down-C_4f1E-E.js +1 -0
- package/dist/client/assets/check-Dw16EqG-.js +1 -0
- package/dist/client/assets/chevron-up-BHaMUEEA.js +1 -0
- package/dist/client/assets/{chktex-Dm6IIkcR.js → chktex-CCcr_9m7.js} +1 -1
- package/dist/client/assets/circle-check-CunlnBPw.js +1 -0
- package/dist/client/assets/clipboard-CslquMx4.js +1 -0
- package/dist/client/assets/clock-3-DztJubz_.js +1 -0
- package/dist/client/assets/createLucideIcon-CDYIzuiB.js +1 -0
- package/dist/client/assets/createLucideIcon-CDYIzuiB.js.br +0 -0
- package/dist/client/assets/createLucideIcon-CDYIzuiB.js.gz +0 -0
- package/dist/client/assets/dist-B_WjsTVV.js +1 -0
- package/dist/client/assets/dist-B_WjsTVV.js.br +0 -0
- package/dist/client/assets/dist-B_WjsTVV.js.gz +0 -0
- package/dist/client/assets/dist-C9O-A_C4.js +1 -0
- package/dist/client/assets/dist-C9O-A_C4.js.br +0 -0
- package/dist/client/assets/dist-C9O-A_C4.js.gz +0 -0
- package/dist/client/assets/dist-DdUqlCPw.js +1 -0
- package/dist/client/assets/dist-DdUqlCPw.js.br +0 -0
- package/dist/client/assets/dist-DdUqlCPw.js.gz +0 -0
- package/dist/client/assets/editor-fyrvjoqA.js +14 -0
- package/dist/client/assets/editor-fyrvjoqA.js.br +0 -0
- package/dist/client/assets/editor-fyrvjoqA.js.gz +0 -0
- package/dist/client/assets/editor-languages-D1a-K8dK.js +36 -0
- package/dist/client/assets/editor-languages-D1a-K8dK.js.br +0 -0
- package/dist/client/assets/editor-languages-D1a-K8dK.js.gz +0 -0
- package/dist/client/assets/editorThemeExtension-BpJbXyCP.js +1 -0
- package/dist/client/assets/editorThemeExtension-BpJbXyCP.js.br +0 -0
- package/dist/client/assets/editorThemeExtension-BpJbXyCP.js.gz +0 -0
- package/dist/client/assets/es2015-D2UDOM09.js +41 -0
- package/dist/client/assets/es2015-D2UDOM09.js.br +0 -0
- package/dist/client/assets/es2015-D2UDOM09.js.gz +0 -0
- package/dist/client/assets/eye-BnslGpqB.js +1 -0
- package/dist/client/assets/hard-drive-CXlummIE.js +1 -0
- package/dist/client/assets/i18n-DNTfpttY.js +13 -0
- package/dist/client/assets/i18n-DNTfpttY.js.br +0 -0
- package/dist/client/assets/i18n-DNTfpttY.js.gz +0 -0
- package/dist/client/assets/index-CfSDaTd4.js +2 -0
- package/dist/client/assets/index-CfSDaTd4.js.br +0 -0
- package/dist/client/assets/index-CfSDaTd4.js.gz +0 -0
- package/dist/client/assets/index-PNFHDg2W.css +1 -0
- package/dist/client/assets/index-PNFHDg2W.css.br +0 -0
- package/dist/client/assets/index-PNFHDg2W.css.gz +0 -0
- package/dist/client/assets/katex-CBRBI6nR.js +257 -0
- package/dist/client/assets/katex-CBRBI6nR.js.br +0 -0
- package/dist/client/assets/katex-CBRBI6nR.js.gz +0 -0
- package/dist/client/assets/katex-CvRo0776.css +1 -0
- package/dist/client/assets/katex-CvRo0776.css.br +0 -0
- package/dist/client/assets/{katex-DDK6mlKN.css.gz → katex-CvRo0776.css.gz} +0 -0
- package/dist/client/assets/library-big-B8e_Fiql.js +1 -0
- package/dist/client/assets/loader-circle-DKGyi5EK.js +1 -0
- package/dist/client/assets/lock-keyhole-aC_QjKDi.js +1 -0
- package/dist/client/assets/minimize-2-CkBmeGXp.js +1 -0
- package/dist/client/assets/minus-DrpwqY8Y.js +1 -0
- package/dist/client/assets/plus-Cei21TlT.js +1 -0
- package/dist/client/assets/refresh-cw-IqExWG6S.js +1 -0
- package/dist/client/assets/relativeTime-DKEihsTa.js +1 -0
- package/dist/client/assets/relativeTime-DKEihsTa.js.br +0 -0
- package/dist/client/assets/relativeTime-DKEihsTa.js.gz +0 -0
- package/dist/client/assets/search-DjOWqLig.js +1 -0
- package/dist/client/assets/sourceCursorStore-QnrFw3Ft.js +1 -0
- package/dist/client/assets/sourceCursorStore-QnrFw3Ft.js.br +0 -0
- package/dist/client/assets/sourceCursorStore-QnrFw3Ft.js.gz +0 -0
- package/dist/client/assets/{spellCheck-DiNvmZKv.js → spellCheck-D-tYd_ac.js} +1 -1
- package/dist/client/assets/spellCheck-D-tYd_ac.js.br +0 -0
- package/dist/client/assets/spellCheck-D-tYd_ac.js.gz +0 -0
- package/dist/client/assets/terminal-DD9WJ56e.js +1 -0
- package/dist/client/assets/{textLanguageSupport-DIXngcZX.js → textLanguageSupport-Kz9ESEVW.js} +1 -1
- package/dist/client/assets/textLanguages-Dac6mieP.js +78 -0
- package/dist/client/assets/textLanguages-Dac6mieP.js.br +0 -0
- package/dist/client/assets/textLanguages-Dac6mieP.js.gz +0 -0
- package/dist/client/assets/type-CKe1tHHo.js +1 -0
- package/dist/client/assets/useDeletionTransitions-TAZINdHX.js +1 -0
- package/dist/client/assets/useDeletionTransitions-TAZINdHX.js.br +0 -0
- package/dist/client/assets/useDeletionTransitions-TAZINdHX.js.gz +0 -0
- package/dist/client/assets/useTranslation-DwkoADSz.js +1 -0
- package/dist/client/assets/useTranslation-DwkoADSz.js.br +0 -0
- package/dist/client/assets/useTranslation-DwkoADSz.js.gz +0 -0
- package/dist/client/assets/user-plus-NNBQOWDP.js +1 -0
- package/dist/client/assets/{vimSupport-RdD-E-Eh.js → vimSupport-DWYaSMuX.js} +6 -6
- package/dist/client/assets/vimSupport-DWYaSMuX.js.br +0 -0
- package/dist/client/assets/vimSupport-DWYaSMuX.js.gz +0 -0
- package/dist/client/index.html +9 -4
- package/dist/server/app.js +9 -1
- package/dist/server/byteRange.js +19 -0
- package/dist/server/citationCollections.js +163 -0
- package/dist/server/citationFolderTransfer.js +74 -0
- package/dist/server/citationInput.js +34 -0
- package/dist/server/collaboration.js +77 -16
- package/dist/server/commentMentions.js +6 -1
- package/dist/server/commentSuggestions.js +143 -0
- package/dist/server/db.js +81 -0
- package/dist/server/i18n.js +12 -0
- package/dist/server/locales/zh-Hant.js +8 -0
- package/dist/server/projectPreview.js +129 -0
- package/dist/server/projectReplace.js +67 -0
- package/dist/server/projectSearch.js +72 -0
- package/dist/server/routes/citations.js +84 -55
- package/dist/server/routes/commentSuggestions.js +154 -0
- package/dist/server/routes/comments.js +17 -1
- package/dist/server/routes/compile.js +1 -19
- package/dist/server/routes/projectSearch.js +72 -0
- package/dist/server/routes/projectShared.js +3 -0
- package/dist/server/routes/projectViewLinks.js +238 -0
- package/dist/server/routes/projects.js +11 -3
- package/dist/server/viewLinkTokens.js +49 -0
- package/dist/server/viewLinks.js +25 -0
- package/dist/shared/citationCollections.js +29 -0
- package/dist/shared/citationContent.js +4 -0
- package/dist/shared/citationTransfer.js +7 -0
- package/dist/shared/comments.js +2 -1
- package/dist/shared/projectCatalog.js +1 -1
- package/dist/shared/projectSearch.js +17 -0
- package/dist/shared/projectViewLinks.js +20 -0
- package/dist/shared/suggestionMessages.js +41 -0
- package/dist/shared/updates.js +1 -1
- package/package.json +9 -1
- package/dist/client/assets/AdminUsers-D5vhK_Ae.js +0 -1
- package/dist/client/assets/AdminUsers-D5vhK_Ae.js.br +0 -0
- package/dist/client/assets/AdminUsers-D5vhK_Ae.js.gz +0 -0
- package/dist/client/assets/AgentIcon-C97W4Mt-.js +0 -1
- package/dist/client/assets/AgentIcon-C97W4Mt-.js.br +0 -0
- package/dist/client/assets/AgentIcon-C97W4Mt-.js.gz +0 -0
- package/dist/client/assets/AgentIcon-DxrC-zx_.css +0 -1
- package/dist/client/assets/AgentIcon-DxrC-zx_.css.br +0 -0
- package/dist/client/assets/AgentIcon-DxrC-zx_.css.gz +0 -0
- package/dist/client/assets/AgentManagement-D6I_GDL_.js +0 -1
- package/dist/client/assets/AgentManagement-D6I_GDL_.js.br +0 -0
- package/dist/client/assets/AgentManagement-D6I_GDL_.js.gz +0 -0
- package/dist/client/assets/AgentTerminal-fsHpIB_c.js +0 -2
- package/dist/client/assets/AgentTerminal-fsHpIB_c.js.br +0 -0
- package/dist/client/assets/AgentTerminal-fsHpIB_c.js.gz +0 -0
- package/dist/client/assets/AgentTerminalSurface-C11baRxh.js.br +0 -0
- package/dist/client/assets/AgentTerminalSurface-C11baRxh.js.gz +0 -0
- package/dist/client/assets/AvatarSettingsDialog-B80aSza0.js +0 -1
- package/dist/client/assets/AvatarSettingsDialog-B80aSza0.js.br +0 -0
- package/dist/client/assets/AvatarSettingsDialog-B80aSza0.js.gz +0 -0
- package/dist/client/assets/CitationLibraryDialog-DE7W81FW.js +0 -1
- package/dist/client/assets/CitationLibraryDialog-DE7W81FW.js.br +0 -0
- package/dist/client/assets/CitationLibraryDialog-DE7W81FW.js.gz +0 -0
- package/dist/client/assets/Dashboard-DAPwKNNH.js +0 -5
- package/dist/client/assets/Dashboard-DAPwKNNH.js.br +0 -0
- package/dist/client/assets/Dashboard-DAPwKNNH.js.gz +0 -0
- package/dist/client/assets/GitDialog-BzyA_IgU.js +0 -3
- package/dist/client/assets/GitDialog-BzyA_IgU.js.br +0 -0
- package/dist/client/assets/GitDialog-BzyA_IgU.js.gz +0 -0
- package/dist/client/assets/GitHubAccountDialog-tigrQQNz.js +0 -1
- package/dist/client/assets/GitHubAccountDialog-tigrQQNz.js.br +0 -0
- package/dist/client/assets/GitHubAccountDialog-tigrQQNz.js.gz +0 -0
- package/dist/client/assets/GitHubIcon-BqDow-CN.js +0 -1
- package/dist/client/assets/HistoryDialog-407q3Fe6.js +0 -8
- package/dist/client/assets/HistoryDialog-407q3Fe6.js.br +0 -0
- package/dist/client/assets/HistoryDialog-407q3Fe6.js.gz +0 -0
- package/dist/client/assets/LatexEditor-BYiVPD_b.js +0 -101
- package/dist/client/assets/LatexEditor-BYiVPD_b.js.br +0 -0
- package/dist/client/assets/LatexEditor-BYiVPD_b.js.gz +0 -0
- package/dist/client/assets/PdfPreview-Bbzop29j.js +0 -1
- package/dist/client/assets/PdfPreview-Bbzop29j.js.br +0 -0
- package/dist/client/assets/PdfPreview-Bbzop29j.js.gz +0 -0
- package/dist/client/assets/ProjectIconPickerDialog-CsT5Pj4j.js +0 -1
- package/dist/client/assets/ProjectIconPickerDialog-CsT5Pj4j.js.br +0 -0
- package/dist/client/assets/ProjectIconPickerDialog-CsT5Pj4j.js.gz +0 -0
- package/dist/client/assets/ProjectSettings-BfvAiyC6.js +0 -4
- package/dist/client/assets/ProjectSettings-BfvAiyC6.js.br +0 -0
- package/dist/client/assets/ProjectSettings-BfvAiyC6.js.gz +0 -0
- package/dist/client/assets/ProjectWorkspace-DHVcaXR0.js +0 -30
- package/dist/client/assets/ProjectWorkspace-DHVcaXR0.js.br +0 -0
- package/dist/client/assets/ProjectWorkspace-DHVcaXR0.js.gz +0 -0
- package/dist/client/assets/QuickOpenDialog-DKq9iNJ5.js +0 -1
- package/dist/client/assets/QuickOpenDialog-DKq9iNJ5.js.br +0 -0
- package/dist/client/assets/QuickOpenDialog-DKq9iNJ5.js.gz +0 -0
- package/dist/client/assets/SaveButton-C8W1DGzx.js +0 -1
- package/dist/client/assets/SelectionHistoryDialog-cDxbuXmO.js.br +0 -0
- package/dist/client/assets/SelectionHistoryDialog-cDxbuXmO.js.gz +0 -0
- package/dist/client/assets/SystemMetricsDialog-GZbYEHna.js +0 -1
- package/dist/client/assets/SystemMetricsDialog-GZbYEHna.js.br +0 -0
- package/dist/client/assets/SystemMetricsDialog-GZbYEHna.js.gz +0 -0
- package/dist/client/assets/TagManagementDialog-BN3tlXuW.js +0 -1
- package/dist/client/assets/TagManagementDialog-BN3tlXuW.js.br +0 -0
- package/dist/client/assets/TagManagementDialog-BN3tlXuW.js.gz +0 -0
- package/dist/client/assets/WordCountDialog-C4okQWS3.js +0 -1
- package/dist/client/assets/WordCountDialog-C4okQWS3.js.br +0 -0
- package/dist/client/assets/WordCountDialog-C4okQWS3.js.gz +0 -0
- package/dist/client/assets/arrow-down-BiIGj4-X.js +0 -1
- package/dist/client/assets/check-DfWHdQ1s.js +0 -1
- package/dist/client/assets/chevron-up-lyMKml7P.js +0 -1
- package/dist/client/assets/circle-check-DjXwnxuR.js +0 -1
- package/dist/client/assets/clock-3-D-XeFtkK.js +0 -1
- package/dist/client/assets/dist-ByqeNQqT.js +0 -1
- package/dist/client/assets/dist-ByqeNQqT.js.br +0 -0
- package/dist/client/assets/dist-ByqeNQqT.js.gz +0 -0
- package/dist/client/assets/dist-Dxkdrap6.js +0 -2
- package/dist/client/assets/dist-Dxkdrap6.js.br +0 -0
- package/dist/client/assets/dist-Dxkdrap6.js.gz +0 -0
- package/dist/client/assets/editor-languages-C6EDWlLD.js +0 -36
- package/dist/client/assets/editor-languages-C6EDWlLD.js.br +0 -0
- package/dist/client/assets/editor-languages-C6EDWlLD.js.gz +0 -0
- package/dist/client/assets/editor-oR9RlWUz.js +0 -14
- package/dist/client/assets/editor-oR9RlWUz.js.br +0 -0
- package/dist/client/assets/editor-oR9RlWUz.js.gz +0 -0
- package/dist/client/assets/eye-BvCLgqrq.js +0 -1
- package/dist/client/assets/hard-drive-Crh-l_oh.js +0 -1
- package/dist/client/assets/i18n-O9QnEo2t.js +0 -13
- package/dist/client/assets/i18n-O9QnEo2t.js.br +0 -0
- package/dist/client/assets/i18n-O9QnEo2t.js.gz +0 -0
- package/dist/client/assets/index-7d5TfVNx.css +0 -1
- package/dist/client/assets/index-7d5TfVNx.css.br +0 -0
- package/dist/client/assets/index-7d5TfVNx.css.gz +0 -0
- package/dist/client/assets/index-DFEpXxLs.js +0 -42
- package/dist/client/assets/index-DFEpXxLs.js.br +0 -0
- package/dist/client/assets/index-DFEpXxLs.js.gz +0 -0
- package/dist/client/assets/info-g1IBvVg6.js +0 -1
- package/dist/client/assets/katex-Bd0sKoun.js +0 -257
- package/dist/client/assets/katex-Bd0sKoun.js.br +0 -0
- package/dist/client/assets/katex-Bd0sKoun.js.gz +0 -0
- package/dist/client/assets/katex-DDK6mlKN.css +0 -1
- package/dist/client/assets/katex-DDK6mlKN.css.br +0 -0
- package/dist/client/assets/minimize-2-BHKmubQs.js +0 -1
- package/dist/client/assets/minus-BmWzkFwz.js +0 -1
- package/dist/client/assets/plus-CoYCCEFJ.js +0 -1
- package/dist/client/assets/refresh-cw-Di6Huxb4.js +0 -1
- package/dist/client/assets/relativeTime-CFNodf1I.js +0 -1
- package/dist/client/assets/relativeTime-CFNodf1I.js.br +0 -0
- package/dist/client/assets/relativeTime-CFNodf1I.js.gz +0 -0
- package/dist/client/assets/search-l36unLLS.js +0 -1
- package/dist/client/assets/spellCheck-DiNvmZKv.js.br +0 -0
- package/dist/client/assets/spellCheck-DiNvmZKv.js.gz +0 -0
- package/dist/client/assets/tags-yjr9KRc8.js +0 -1
- package/dist/client/assets/terminal-P09ZGT83.js +0 -1
- package/dist/client/assets/type-C7rzXWVU.js +0 -1
- package/dist/client/assets/user-plus-CqyV7OV4.js +0 -1
- package/dist/client/assets/vimSupport-RdD-E-Eh.js.br +0 -0
- package/dist/client/assets/vimSupport-RdD-E-Eh.js.gz +0 -0
package/DESIGN.md
CHANGED
|
@@ -67,7 +67,7 @@ variables, rich-text tags, language detection, persistence, and API headers.
|
|
|
67
67
|
### Project catalog
|
|
68
68
|
|
|
69
69
|
The homepage places All projects, Owned by me and Shared with me tabs below the
|
|
70
|
-
page title. Ownership is filtered on the server before pagination (
|
|
70
|
+
page title. Ownership is filtered on the server before pagination (32 projects
|
|
71
71
|
per page), preserving the existing list/grid views, search, private tags,
|
|
72
72
|
sorting and per-user archive filter. Each response includes counts for all three
|
|
73
73
|
categories under the current search and tag conditions, including both active
|
|
@@ -83,6 +83,20 @@ same view before revalidation. Obsolete requests are aborted and ignored, and
|
|
|
83
83
|
rows from a previous category are not shown while its replacement is loading.
|
|
84
84
|
Successful catalog mutations revalidate the currently selected view.
|
|
85
85
|
|
|
86
|
+
Grid cards use a paper illustration containing the main document's title and
|
|
87
|
+
opening abstract text. Unavailable fields use neutral bars; genuinely empty
|
|
88
|
+
documents show blank paper. Grid catalog requests opt into bounded metadata
|
|
89
|
+
reads for every visible project, including tagged projects. The server reads
|
|
90
|
+
at most the first 64 KiB, extracts only complete title/abstract constructs,
|
|
91
|
+
and limits each field to 240 Unicode characters. Reads are asynchronous,
|
|
92
|
+
coalesced and cached by file metadata, with at most 128 entries; includes are
|
|
93
|
+
not traversed and no TeX is executed. Unread mentions precede unresolved-comment
|
|
94
|
+
badges at the thumbnail's top right; private tags sit at its bottom left.
|
|
95
|
+
Single-line titles and relative-modification metadata occupy fixed caption
|
|
96
|
+
slots, with owner/creation/modification details in the title tooltip. The open,
|
|
97
|
+
mention and action-menu buttons are independent keyboard targets. List layout
|
|
98
|
+
and its labels remain unchanged.
|
|
99
|
+
|
|
86
100
|
### Citation library
|
|
87
101
|
|
|
88
102
|
The citation library is stored in SQLite and is independent of project source
|
|
@@ -96,6 +110,94 @@ citation library as a separate management page beside the other management
|
|
|
96
110
|
controls; the project workspace keeps a smaller `.bib` import dialog for
|
|
97
111
|
in-context writing. Library results are server-filtered and paginated with 60
|
|
98
112
|
entries per page by default (the API accepts a bounded page-size override).
|
|
113
|
+
Migration 18 adds private, single-level citation folders and a many-to-many
|
|
114
|
+
entry/folder relation. A folder represents a paper or research topic; the same
|
|
115
|
+
entry can belong to several folders without copying its BibTeX. All references
|
|
116
|
+
and Unfiled are built-in views. Folder counts are library-wide, independent of
|
|
117
|
+
search, tag filters and pagination. Existing references remain unfiled on
|
|
118
|
+
upgrade. By default, folder deletion removes only placements, not entries or their tags.
|
|
119
|
+
The delete confirmation offers an unchecked option to also delete references
|
|
120
|
+
exclusive to that folder, including their notes. References linked to other
|
|
121
|
+
folders are kept. `DELETE .../collections/:id?deleteReferences=true` performs
|
|
122
|
+
both deletions in one authenticated, user-scoped SQLite transaction; omitting
|
|
123
|
+
the flag (or using `false`) retains references. Tag definitions and project
|
|
124
|
+
`.bib` files are never removed by this operation.
|
|
125
|
+
Each user-created folder holds at most 500 references, enforced inside the
|
|
126
|
+
server's placement transactions for new saves and folder reassignment. A full
|
|
127
|
+
folder still permits edits and retaining existing memberships. Failed additions
|
|
128
|
+
leave content, notes, tags, revisions and other memberships unchanged. Existing
|
|
129
|
+
oversized folders are preserved and may shrink, but cannot gain new entries.
|
|
130
|
+
All references and Unfiled are views, not folders, and have no 500-entry cap;
|
|
131
|
+
the private library's total size is not limited by folder capacity.
|
|
132
|
+
The dashboard page and project import dialog share folder navigation. Project
|
|
133
|
+
workflows use a separate controller and render only Import on library entries
|
|
134
|
+
and Save/Update on current-file entries. These are compact icon-only actions
|
|
135
|
+
with accessible names, action/state tooltips and the shared saved-check feedback.
|
|
136
|
+
Tag filters combine with folders, search and pagination, but project dialogs do
|
|
137
|
+
not expose tag or entry management controls. The workspace's compact entry is
|
|
138
|
+
labelled Citation; the homepage keeps Citation library. New saves require a destination folder; updates preserve
|
|
139
|
+
existing folder placements. A bounded, debounced comparison request returns
|
|
140
|
+
only key/id/revision and content-equality metadata, never full library text.
|
|
141
|
+
Equality ignores platform line endings and outer whitespace, not differences
|
|
142
|
+
inside an entry. Unchanged entries cannot be updated; changed ones still need
|
|
143
|
+
the last-read revision. Source/file switches abort stale comparisons and
|
|
144
|
+
ignore late save feedback. This is an explicit copy into/out of a `.bib`, not
|
|
145
|
+
automatic bidirectional sync.
|
|
146
|
+
Folder assignment uses the entry revision to reject concurrent stale changes.
|
|
147
|
+
Only the owning user can manage, filter or export a folder, including when
|
|
148
|
+
another account is an administrator. Export streams every member's stored
|
|
149
|
+
BibTeX in citation-key order, without the list's search or pagination limits,
|
|
150
|
+
as a UTF-8 `.bib` download. Export is available only in each folder's overflow
|
|
151
|
+
menu, not as a separate list-toolbar button. No external citation service is involved.
|
|
152
|
+
Migration 19 adds private Markdown notes to each library entry, initially empty.
|
|
153
|
+
Add and edit forms share three accessible tabs: BibTeX, Notes, and Notes preview.
|
|
154
|
+
Switching tabs preserves both drafts; preview renders the current unsaved notes.
|
|
155
|
+
The BibTeX tab loads a compact CodeMirror editor on demand, reusing the project's
|
|
156
|
+
Lezer BibTeX parser and syntax palettes. It keeps local undo history across tab
|
|
157
|
+
and theme changes; external form updates do not echo back as user edits.
|
|
158
|
+
Saving temporarily makes the editor read-only. The form adds no collaboration,
|
|
159
|
+
lint, completion or spelling services, and Tab still leaves the input normally.
|
|
160
|
+
Save is disabled until either field changes. Notes are limited to 64 KB of UTF-8 text and use the same revision
|
|
161
|
+
check as BibTeX edits. Saving updates from a project's `.bib` without a `notes`
|
|
162
|
+
field preserves the existing notes. Notes never enter the project's `.bib` or
|
|
163
|
+
the ordinary `.bib` export. The entry menu's Show/Hide notes action expands or
|
|
164
|
+
collapses notes directly below that entry, not in a modal. Multiple entries may
|
|
165
|
+
stay expanded independently, and ordinary refreshes keep their expansion state
|
|
166
|
+
while displaying the latest saved notes. Each panel has a fixed header/close
|
|
167
|
+
control and an internally scrolling body capped at 320px or 45vh, whichever is
|
|
168
|
+
smaller. The Markdown renderer loads on demand, with GFM tables/lists, HTML disabled and default safe-URL
|
|
169
|
+
handling; notes retain the site's light/dark palette. The same renderer serves
|
|
170
|
+
the form's preview tab. `remark-math` parses `$...$` inline math and `$$...$$`
|
|
171
|
+
display math; React components render its math nodes using the editor's KaTeX
|
|
172
|
+
version, with trusted commands disabled and bounded expansion/size. Code spans
|
|
173
|
+
and ordinary fenced code remain literal, and malformed formulas do not break
|
|
174
|
+
the rest of a note. A scoped npm override keeps micromark's transitive KaTeX
|
|
175
|
+
on the same version as the application's renderer.
|
|
176
|
+
|
|
177
|
+
Export BibTeX with notes, also in the folder menu, downloads one portable
|
|
178
|
+
`*.texlite-citations.json` file (`format: texlite-citation-folder`, `version: 1`).
|
|
179
|
+
It contains entries' BibTeX, display metadata and Markdown notes, but no folder
|
|
180
|
+
name, user IDs, tags or database memberships. The Import row at the top
|
|
181
|
+
of the sidebar's folder list accepts a single `.bib` file or TexLite `.json`
|
|
182
|
+
export, by dropping it or browsing for it, with a preview before submission.
|
|
183
|
+
Its clickable info explains naming, replacement and tag handling. The import
|
|
184
|
+
form requires a destination folder name and defaults to the selected filename
|
|
185
|
+
without its extension or the export-specific `.texlite-citations` JSON suffix,
|
|
186
|
+
up to 80 characters. The user can edit it before import;
|
|
187
|
+
any name embedded in a JSON file is ignored. A `.bib` import uses empty notes;
|
|
188
|
+
JSON preserves the exported notes. The destination name is sent only in the
|
|
189
|
+
import request, separately from the portable file content.
|
|
190
|
+
Both paths validate the chosen file and its BibTeX in the browser;
|
|
191
|
+
the server independently enforces authentication, shapes and byte limits.
|
|
192
|
+
Imports and both export formats support at most 500 entries per transfer.
|
|
193
|
+
Imports and JSON-with-notes exports also have a 16 MB limit; oversized exports fail instead
|
|
194
|
+
of downloading a partial file. Import is one SQLite transaction: it creates a
|
|
195
|
+
new private folder, appending `-1`, `-2`, etc. when the name is already used.
|
|
196
|
+
Matching citation keys replace that user's BibTeX and notes and increment the
|
|
197
|
+
entry revision, retaining existing tags and other folder placements. Incoming
|
|
198
|
+
tag fields are ignored, even for direct API requests. Repeated
|
|
199
|
+
keys within a file use the last entry. Other users' libraries are untouched.
|
|
200
|
+
Malformed input or a database failure leaves no partially imported folder.
|
|
99
201
|
Entry management actions live in an accessible, portalled overflow menu, with
|
|
100
202
|
deletion separated from ordinary actions and still requiring confirmation.
|
|
101
203
|
Copy BibTeX remains a direct button, preserves the full entry text and shows a
|
|
@@ -344,6 +446,70 @@ read/edit members, excluding the owner and hiding zero. This is unrelated to
|
|
|
344
446
|
online presence. Initial counts come with project metadata; successful share
|
|
345
447
|
form loads and member changes update the badge without reloading the workspace.
|
|
346
448
|
|
|
449
|
+
Owners can also create **read-only links** from a separate tab in Share. These
|
|
450
|
+
are anonymous reading capabilities, not read-only members: visitors can browse
|
|
451
|
+
source files, images and the current compiled PDF, but cannot comment, edit,
|
|
452
|
+
compile, inspect history/Git or use agents. They do not join Yjs, consume a
|
|
453
|
+
collaborator slot or appear in presence/member counts. The reader has no live
|
|
454
|
+
editing subscription; Refresh fetches the latest saved files and published PDF.
|
|
455
|
+
Its appearance uses the normal workspace's topbar frame, layout menu, outline,
|
|
456
|
+
file-icon/tree styles, editor font defaults and PDF header. Files/source/PDF
|
|
457
|
+
panels can be resized, the file tree can be collapsed, and the outline stays
|
|
458
|
+
bound to the configured main document (including local inputs). Share, Git,
|
|
459
|
+
Terminal, snapshots, comments and compile remain visible but disabled; none
|
|
460
|
+
mount authenticated workflows. Reader settings change only browser language
|
|
461
|
+
and theme. Narrow screens start with the editor-only layout.
|
|
462
|
+
|
|
463
|
+
Migration 15 adds `project_view_links` with a project foreign key (cascade on
|
|
464
|
+
deletion), label, SHA-256 token hash and creation/expiry timestamps. Revoking a
|
|
465
|
+
link deletes its row and removes it from the owner's list. Migration 16 removes
|
|
466
|
+
previously revoked records and the obsolete revocation column; active and
|
|
467
|
+
expired links are preserved. Repeated owner revocation requests are idempotent. A
|
|
468
|
+
link defaults to seven days; the owner can explicitly choose no expiry. Each
|
|
469
|
+
project can have only one unexpired link, including a link with no expiry. An
|
|
470
|
+
immediate database transaction checks for an active link before inserting, so
|
|
471
|
+
concurrent creates cannot bypass this rule. Copying always returns the same
|
|
472
|
+
address without changing the token or expiry. Create is hidden while an active
|
|
473
|
+
link exists and becomes available after expiry or revocation. A
|
|
474
|
+
256-bit independent random token travels in the `/share/:id#token` URL
|
|
475
|
+
fragment, not the HTTP page URL. The browser exchanges it in a POST body
|
|
476
|
+
for an HttpOnly, SameSite=Strict cookie scoped to that link's base-path-aware
|
|
477
|
+
`/api/shared/:id` namespace, then removes the fragment. No login session or user
|
|
478
|
+
record is created, and no token is persisted in browser storage.
|
|
479
|
+
|
|
480
|
+
Migration 17 adds AES-256-GCM encrypted tokens for repeated owner copying, while
|
|
481
|
+
the SHA-256 hash remains the guest authorization check. Ciphertexts are bound
|
|
482
|
+
to the project/link ids using authenticated associated data; the independent
|
|
483
|
+
`view-link-token.key` is generated with mode 0600 in the data directory. Only
|
|
484
|
+
the actual owner's no-store management response returns recoverable link
|
|
485
|
+
addresses. Guest responses never contain a token, hash or ciphertext. Each link
|
|
486
|
+
row displays its address and a reusable Copy button with brief success feedback.
|
|
487
|
+
The sharing dialog no longer displays the administrator-created-users notice.
|
|
488
|
+
|
|
489
|
+
Link management offers Copy and Delete. To replace a link, delete it and create
|
|
490
|
+
a new one. Existing hash-only links stay valid, but cannot be copied because the
|
|
491
|
+
old secret cannot be reconstructed from its hash. Missing keys or corrupt
|
|
492
|
+
ciphertext likewise leave deletion controls accessible; delete and recreate
|
|
493
|
+
to regain copying. Back up the key with the database.
|
|
494
|
+
|
|
495
|
+
Every guest metadata/source/image/PDF request, including HEAD and byte ranges,
|
|
496
|
+
checks link existence, token hash and expiry in the database. Guest responses are
|
|
497
|
+
private/no-store, no-referrer and noindex; uploaded SVGs have a sandbox CSP.
|
|
498
|
+
PDF URLs are pinned to the current published run to avoid mixing Range bytes;
|
|
499
|
+
older compile versions and output/log directories are not exposed. A changed
|
|
500
|
+
published run requires Refresh. Existing authenticated project, compilation,
|
|
501
|
+
Agent and WebSocket routes accept only normal account sessions, never view
|
|
502
|
+
tokens. Anonymous Yjs updates are rejected before joining a room.
|
|
503
|
+
|
|
504
|
+
Revocation takes effect on the next server request. The viewer also
|
|
505
|
+
rechecks access every 30 seconds while visible and on returning to the tab,
|
|
506
|
+
and clears source/PDF at expiry or on rejection. Revocation cannot erase content
|
|
507
|
+
already copied or downloaded. Sharing deliberately exposes the source tree:
|
|
508
|
+
owners should remove project-local secrets before giving a link to anyone.
|
|
509
|
+
Only the current owner can list, create or revoke links; transfer keeps
|
|
510
|
+
existing links under the new owner's control. Links never grant member-management
|
|
511
|
+
or ownership rights.
|
|
512
|
+
|
|
347
513
|
The owner-only share form uses one editable user combobox: opening it lists
|
|
348
514
|
available users, and typing filters by display name or username. Candidates
|
|
349
515
|
exclude the owner and existing members. The popup is at most 240 px tall,
|
|
@@ -385,6 +551,71 @@ and time; deleting that user retains the timestamp and displays “Deleted User
|
|
|
385
551
|
Schema migration 4 adds nullable columns without guessing metadata for existing
|
|
386
552
|
resolved comments. This stores the current resolution, not an activity log.
|
|
387
553
|
|
|
554
|
+
### Suggested changes
|
|
555
|
+
|
|
556
|
+
A source comment can optionally carry one replacement suggestion. The note
|
|
557
|
+
remains the discussion's primary content; an empty note becomes “Suggested
|
|
558
|
+
change” in the author's language. Ordinary comments have no reviewer. Only
|
|
559
|
+
replacement suggestions require a reviewer. Read-only members may
|
|
560
|
+
propose changes, but only the assigned reviewer with current write access may
|
|
561
|
+
accept or reject them. The comment author cannot be their own reviewer, even
|
|
562
|
+
if they own the project. Enabling an edit defaults its reviewer to the project
|
|
563
|
+
owner when they are not the author; otherwise the author must choose another
|
|
564
|
+
writable member. The reviewer stays fixed after submission; there is no
|
|
565
|
+
change-reviewer control. The author may edit the replacement while it is still
|
|
566
|
+
pending and no accepted update is being persisted. An empty replacement means
|
|
567
|
+
deleting the selected passage. Saving a changed replacement renews the review
|
|
568
|
+
notification without changing the original source, reviewer or discussion.
|
|
569
|
+
Identical-save retries do not renew it again.
|
|
570
|
+
|
|
571
|
+
Suggestions are collapsed attachments, not a separate discussion list. Opening
|
|
572
|
+
one shows an inline source diff, compacting unchanged context without hiding
|
|
573
|
+
edits. Preview differences are word-oriented and never supply source offsets
|
|
574
|
+
or patches to the acceptance endpoint. Existing comment authors attach
|
|
575
|
+
suggestions through the comment's more-actions menu. The new-comment modal
|
|
576
|
+
places read-only original source first, keeps the optional edit switch off by
|
|
577
|
+
default, and presents the reviewer at the bottom only while the edit switch is
|
|
578
|
+
enabled. Turning it off submits an ordinary comment without reviewer metadata
|
|
579
|
+
or a review request. Its live status
|
|
580
|
+
describes the actual payload: comment, edit, or both. Opening unchanged edit
|
|
581
|
+
controls does not create a suggestion. Review requests reuse
|
|
582
|
+
personal unread notifications with a distinct `review` kind; an explicit mention
|
|
583
|
+
of the same reviewer does not create a duplicate notification. Reading a review
|
|
584
|
+
request does not decide it. Accepting or rejecting clears that review request,
|
|
585
|
+
but leaves the discussion open and preserves other mention notifications.
|
|
586
|
+
A discussion with a pending suggestion cannot be resolved.
|
|
587
|
+
|
|
588
|
+
Edits and review decisions include the replacement text the user actually saw
|
|
589
|
+
as a compare-and-swap precondition. The server compares it under the project
|
|
590
|
+
write lock; acceptance checks again after cold-room preparation. A stale save
|
|
591
|
+
cannot overwrite a newer draft, and a stale decision cannot accept or reject
|
|
592
|
+
an unseen replacement. Conflicts trigger a discussion refresh without retrying
|
|
593
|
+
the write or discarding typed edits. Decided suggestions and journaled pending
|
|
594
|
+
applications cannot be edited. This content-based precondition needs no schema
|
|
595
|
+
version or extra database field.
|
|
596
|
+
|
|
597
|
+
Creation binds the selection to a source hash. Acceptance runs in the project
|
|
598
|
+
write queue, flushes preceding edits, checks current reviewer permissions and
|
|
599
|
+
requires the anchored source to match the saved original exactly. Edits outside
|
|
600
|
+
the passage can move its anchor; changed or lost source cannot be patched
|
|
601
|
+
fuzzily. Acceptance applies a targeted Yjs delete/insert, leaving unrelated
|
|
602
|
+
content and connected collaborators intact. The accepting reviewer is the
|
|
603
|
+
source-edit author. Rejection does not change source. Deleting a discussion
|
|
604
|
+
after acceptance does not undo the applied change.
|
|
605
|
+
|
|
606
|
+
Schema migration 12 adds a suggestion table and the notification kind without
|
|
607
|
+
changing existing comments. Migration 14 reverses the comment-level reviewer
|
|
608
|
+
layout introduced by development migration 13: it preserves suggestion
|
|
609
|
+
assignments, decisions, recovery receipts and notifications while removing
|
|
610
|
+
plain-comment reviewer assignments and their review requests.
|
|
611
|
+
Before applying a change, the service persists its
|
|
612
|
+
Yjs base and journals the exact CRDT update and replacement-range positions in
|
|
613
|
+
SQLite. An interrupted application can replay that same update idempotently;
|
|
614
|
+
it becomes accepted only after source/state/anchor persistence succeeds. A
|
|
615
|
+
missing recovery base fails explicitly rather than guessing and duplicating
|
|
616
|
+
the replacement. This recovery receipt is separate from ordinary anchor-save
|
|
617
|
+
bookkeeping and from the comment's resolution attribution.
|
|
618
|
+
|
|
388
619
|
The source-pin button opens an independent current-comment view: only that Open
|
|
389
620
|
thread in the active source file is shown and highlighted, without status,
|
|
390
621
|
scope, participant, unread or sorting controls. Saved review filters do not
|
|
@@ -765,6 +996,35 @@ temporary ZIP under the consistent-read barrier before the HTTP download starts.
|
|
|
765
996
|
|
|
766
997
|
## Editor, files, and navigation
|
|
767
998
|
|
|
999
|
+
The file-tree overflow menu opens project-wide search in a lazy-loaded modal.
|
|
1000
|
+
Search is literal, with case-sensitive and whole-word options, and groups source
|
|
1001
|
+
previews by file. Selecting a match opens that file at its line and column.
|
|
1002
|
+
The authenticated endpoint checks project access and reads under the existing
|
|
1003
|
+
consistent-read barrier, flushing server-received collaborative edits first.
|
|
1004
|
+
Only shared-classifier text paths with valid UTF-8 text content are scanned;
|
|
1005
|
+
binary and unknown types are excluded. Searches are bounded to 500 files,
|
|
1006
|
+
32 MiB total and 500 matches, with an explicit incomplete-results notice.
|
|
1007
|
+
Per-file limits match collaborative-file limits. Case-sensitive and whole-word
|
|
1008
|
+
matching default to on. Writers can preview literal replacements (red deletions
|
|
1009
|
+
and green insertions only for a nonempty replacement), replace one exact match,
|
|
1010
|
+
or confirm replacement across all displayed results. Each occurrence is a separate
|
|
1011
|
+
row labelled with its line and column; only that occurrence is highlighted in
|
|
1012
|
+
its surrounding source preview. Read-only members
|
|
1013
|
+
only see search. Truncated results disable replacement until the search is
|
|
1014
|
+
narrowed. Each target includes its searched source hash and exact UTF-16 ranges.
|
|
1015
|
+
The server validates ranges against the search pattern, rejecting duplicates,
|
|
1016
|
+
overlaps and locations that are not complete matches before editing anything.
|
|
1017
|
+
The write queue flushes current drafts, validates every target before mutation,
|
|
1018
|
+
then applies exact attributed Yjs edits in one synchronous transaction. Stale
|
|
1019
|
+
sources and active formatting leases reject the operation; normal persistence
|
|
1020
|
+
updates anchors, edit history, snapshots and collaborators without a reload.
|
|
1021
|
+
After replacement, the modal immediately revalidates results in the background
|
|
1022
|
+
without clearing the current list. Stable file/location keys preserve scroll and
|
|
1023
|
+
collapsed groups; replacement remains disabled until fresh hashes arrive. A
|
|
1024
|
+
failed refresh keeps the previous results visible but non-replaceable. New
|
|
1025
|
+
search criteria still clear obsolete results and debounce for 350 ms. Success
|
|
1026
|
+
feedback sits in the footer so it does not shift the result list.
|
|
1027
|
+
|
|
768
1028
|
Workspace resizing uses `react-resizable-panels` v4 (`Group`, `Panel`,
|
|
769
1029
|
`Separator`). Constraints use explicit percentage strings; numbers in v4
|
|
770
1030
|
would mean pixels. The editor and preview share the space remaining after the
|
|
@@ -776,8 +1036,12 @@ use default sizes; older browser records are left untouched. Blocked browser
|
|
|
776
1036
|
storage also falls back to usable defaults. File-panel collapse state follows `onResize`.
|
|
777
1037
|
Source comments sit at the left edge of the preview region, immediately beside
|
|
778
1038
|
the editor. They do not add an outer resizable panel or change the editor/file
|
|
779
|
-
widths. A 760 px preview-container breakpoint switches between
|
|
780
|
-
|
|
1039
|
+
widths. A 760 px preview-container breakpoint switches between an inline review
|
|
1040
|
+
column and a drawer over the PDF; closing it restores the preview. A right-edge
|
|
1041
|
+
separator resizes either presentation from 280 to 640 px (360 px by default),
|
|
1042
|
+
capped by the container and reserving at least 320 px for an inline PDF. Its
|
|
1043
|
+
browser-local preference is scoped to the deployment, not stored in the project.
|
|
1044
|
+
Arrow/Home/End keys resize it too; double-click restores the default width.
|
|
781
1045
|
The PDF stays mounted, and a stable portal host preserves review filters and
|
|
782
1046
|
reply forms across responsive changes. Editor-only mode falls back to an
|
|
783
1047
|
adjacent resizable context pane; settings keep their existing right-hand pane.
|
|
@@ -1045,8 +1309,10 @@ Compilation follows this sequence:
|
|
|
1045
1309
|
request can finish.
|
|
1046
1310
|
|
|
1047
1311
|
The previous successful PDF remains visible during a new compile. The latest
|
|
1048
|
-
published bundle is recovered after a restart
|
|
1049
|
-
|
|
1312
|
+
published bundle is recovered after a restart independently of collaboration
|
|
1313
|
+
startup. Once project access metadata is available, the workspace applies the
|
|
1314
|
+
current permission and starts collaboration without waiting for compile
|
|
1315
|
+
metadata, a PDF, or file indexing. PDF requests support range responses for
|
|
1050
1316
|
PDF.js and expose the successful compile time and artifact size. The default
|
|
1051
1317
|
automatic loading policy uses a complete, cache-friendly response through 2 MB
|
|
1052
1318
|
and enables PDF.js byte-range loading above that threshold; deployments can
|
|
@@ -1239,6 +1505,7 @@ The default data layout is:
|
|
|
1239
1505
|
├── texlite.db-wal
|
|
1240
1506
|
├── texlite.db-shm
|
|
1241
1507
|
├── git-token.key
|
|
1508
|
+
├── view-link-token.key
|
|
1242
1509
|
├── tmp/ and trash/
|
|
1243
1510
|
└── projects/
|
|
1244
1511
|
└── <project-id>/
|
|
@@ -1250,10 +1517,10 @@ The default data layout is:
|
|
|
1250
1517
|
└── history/
|
|
1251
1518
|
~~~
|
|
1252
1519
|
|
|
1253
|
-
Back up `texlite.db`, `git-token.key`, and `projects/`
|
|
1254
|
-
SQLite WAL files in a live filesystem backup or use a SQLite-aware backup
|
|
1255
|
-
procedure. The
|
|
1256
|
-
|
|
1520
|
+
Back up `texlite.db`, `git-token.key`, `view-link-token.key`, and `projects/`
|
|
1521
|
+
together. Include the SQLite WAL files in a live filesystem backup or use a SQLite-aware backup
|
|
1522
|
+
procedure. The encryption keys are required to recover saved GitHub credentials
|
|
1523
|
+
and copy existing read-only links, respectively.
|
|
1257
1524
|
|
|
1258
1525
|
TexLite opens SQLite with WAL mode and `synchronous=NORMAL`. This avoids a
|
|
1259
1526
|
full WAL fsync on most small metadata writes while preserving SQLite's atomic
|
package/OPERATIONS.md
CHANGED
|
@@ -219,7 +219,7 @@ Relative paths are resolved from the configuration file. The default data
|
|
|
219
219
|
directory is `$XDG_DATA_HOME/texlite`, or `~/.local/share/texlite` when
|
|
220
220
|
`XDG_DATA_HOME` is unset. Set `storage.dataDir` or `TEXLITE_DATA_DIR` to move
|
|
221
221
|
it. The data directory contains the SQLite database, project sources, compiled
|
|
222
|
-
output, history objects, and
|
|
222
|
+
output, history objects, and encryption keys for GitHub tokens and read-only links.
|
|
223
223
|
|
|
224
224
|
Use [texlite.config.example.json](texlite.config.example.json) as a complete
|
|
225
225
|
starting point. It omits `storage.dataDir`, so copied configurations retain the
|
|
@@ -591,9 +591,12 @@ calls; platform/native-agent login behavior should also be checked when deployin
|
|
|
591
591
|
## Backup and security
|
|
592
592
|
|
|
593
593
|
Back up the entire configured data directory, including `texlite.db`, its WAL
|
|
594
|
-
files, `git-token.key`, and `projects/`.
|
|
595
|
-
|
|
596
|
-
|
|
594
|
+
files, `git-token.key`, `view-link-token.key`, and `projects/`. Saved GitHub tokens
|
|
595
|
+
and copying existing read-only links require their corresponding encryption
|
|
596
|
+
keys. Losing `view-link-token.key` does not invalidate distributed reader links,
|
|
597
|
+
but the owner must delete the link and create a new one to regain copying.
|
|
598
|
+
For an online copy of SQLite, include WAL files or use a SQLite-aware backup
|
|
599
|
+
method.
|
|
597
600
|
|
|
598
601
|
TexLite is designed for trusted users on localhost. Shell escape is disabled by
|
|
599
602
|
default and compile jobs have timeouts and concurrency limits, but LaTeX itself
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# TexLite
|
|
6
6
|
|
|
7
7
|
A lightweight self-hosted alternative to Overleaf for _small, trusted_ research
|
|
8
|
-
teams. Use your existing LaTeX distribution, with no heavyweight service stack.
|
|
8
|
+
teams. Use your existing LaTeX distribution and coding agents, with no heavyweight service stack.
|
|
9
9
|
|
|
10
10
|
[](https://github.com/SWUFE-DB-Group/TexLite/actions/workflows/ci.yml)
|
|
11
11
|
[](https://www.npmjs.com/package/texlite)
|
|
@@ -21,8 +21,7 @@ https://github.com/user-attachments/assets/c2b277ab-7cab-4f2b-8684-358fd9fefe8f
|
|
|
21
21
|
|
|
22
22
|
## Why TexLite
|
|
23
23
|
|
|
24
|
-
- **Own the writing environment.** Use the host's TeX installation and keep
|
|
25
|
-
sources, history, and compiled output in one local data directory.
|
|
24
|
+
- **Own the writing environment.** Use the host's TeX installation and coding agents; keep sources, history, and compiled output in one local data directory.
|
|
26
25
|
- **Collaborate without a large stack.** The default deployment is one Node.js
|
|
27
26
|
process, SQLite, and local files—plus real-time editing and source-level
|
|
28
27
|
comments for a small trusted team.
|
|
@@ -97,6 +96,7 @@ a narrower self-hosted use case:
|
|
|
97
96
|
follows a more involved [Docker deployment path](https://docs.overleaf.com/on-premises/getting-started/what-is-the-overleaf-toolkit), and
|
|
98
97
|
several functionalities, such as source comments, are [Server Pro features](https://docs.overleaf.com/on-premises/user-and-project-management/roles-and-permissions).
|
|
99
98
|
_If you do not mind a heftier Docker image, [we have one ready too](#docker-deployment) :)_
|
|
99
|
+
- TexLite can run host-installed Coding Agent CLIs (e.g., Claude Code, Codex, OpenCode) directly in a project terminal. Agents can inspect and edit project files, while the team chooses the models and workflows; this goes beyond a built-in AI chat interface.
|
|
100
100
|
|
|
101
101
|
Self-hosting does not make every document compile faster: that still depends on
|
|
102
102
|
the host and the document. It does give the team control over capacity, TeX
|
|
@@ -110,7 +110,11 @@ shared browser writing, not a replacement for a personal IDE.
|
|
|
110
110
|
## What the writing workflow includes
|
|
111
111
|
|
|
112
112
|
- Projects with folders, ZIP import/export, tags, sharing, ownership transfer,
|
|
113
|
-
archiving, and a private per-user citation library
|
|
113
|
+
archiving, and a private per-user citation library with topic folders, tags,
|
|
114
|
+
Markdown notes, and folder-wide BibTeX export with optional notes for sharing.
|
|
115
|
+
Import `.bib` files or TexLite JSON exports.
|
|
116
|
+
- Owner-managed read-only links for anonymous readers, with expiry, rotation
|
|
117
|
+
and revocation. Readers can view source and existing PDFs without joining collaboration.
|
|
114
118
|
- CodeMirror editing with LaTeX/BibTeX highlighting, folding, completion,
|
|
115
119
|
optional Vim mode, formatting, spelling/grammar/ChkTeX assistance, search/replace,
|
|
116
120
|
and source/PDF SyncTeX navigation.
|
|
@@ -123,8 +127,7 @@ shared browser writing, not a replacement for a personal IDE.
|
|
|
123
127
|
- Per-project history and owner-only Git/GitHub backup. Git is optional and is
|
|
124
128
|
checked only when its integration is used.
|
|
125
129
|
- Optional browser terminals for host-installed coding agents, enabled by an
|
|
126
|
-
administrator.
|
|
127
|
-
project. See [external agent terminals](OPERATIONS.md#external-agent-terminals).
|
|
130
|
+
administrator. See [external agent terminals](OPERATIONS.md#external-agent-terminals).
|
|
128
131
|
|
|
129
132
|
<a id="docker-deployment"></a>
|
|
130
133
|
|
package/README.zh-CN.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
# TexLite
|
|
6
6
|
|
|
7
7
|
面向*小型、可信*研究团队的轻量自托管 Overleaf 替代方案。直接使用现有的 LaTeX
|
|
8
|
-
|
|
8
|
+
发行版和 Coding Agents,无需沉重的服务栈。
|
|
9
9
|
|
|
10
10
|
[](https://github.com/SWUFE-DB-Group/TexLite/actions/workflows/ci.yml)
|
|
11
11
|
[](https://www.npmjs.com/package/texlite)
|
|
@@ -21,7 +21,7 @@ https://github.com/user-attachments/assets/c2b277ab-7cab-4f2b-8684-358fd9fefe8f
|
|
|
21
21
|
|
|
22
22
|
## 为什么选择 TexLite
|
|
23
23
|
|
|
24
|
-
- **掌控写作环境。** 直接使用宿主机 TeX
|
|
24
|
+
- **掌控写作环境。** 直接使用宿主机 TeX 环境和 Coding Agents,并将源码、历史版本和编译产物保存在
|
|
25
25
|
一个本地数据目录中。
|
|
26
26
|
- **无需庞大服务栈即可协作。** 默认部署只有一个 Node.js 进程、SQLite 和本地文件,
|
|
27
27
|
同时提供实时编辑和源码级批注,适合少量可信协作者。
|
|
@@ -89,6 +89,7 @@ curl -fsSL https://raw.githubusercontent.com/ChenZhongPu/TexLite-Share/main/inst
|
|
|
89
89
|
- Overleaf 开源 [Community Edition](https://github.com/overleaf/overleaf) 的
|
|
90
90
|
[Docker 部署路径](https://docs.overleaf.com/on-premises/getting-started/what-is-the-overleaf-toolkit) 更复杂,且源码批注等高级功能 [仅限 Server Pro](https://docs.overleaf.com/on-premises/user-and-project-management/roles-and-permissions)。
|
|
91
91
|
*如果不介意一个更庞大的 Docker 镜像,[我们也准备好了](#docker-deployment) :)*
|
|
92
|
+
- TexLite 可在项目终端中直接运行宿主机安装的 Coding Agent CLI(比如Claude Code、Codex、OpenCode),让 agent 读取和编辑项目文件,由团队自主选择模型和工作流,而不局限于内建的 AI 聊天界面。
|
|
92
93
|
|
|
93
94
|
自托管并不保证每份文档都编译得更快,速度仍取决于宿主机和文档本身;它带来的是对容量、
|
|
94
95
|
TeX 更新、数据位置与协作工作流的掌控。
|
|
@@ -99,7 +100,10 @@ TeX 更新、数据位置与协作工作流的掌控。
|
|
|
99
100
|
|
|
100
101
|
## 核心写作工作流
|
|
101
102
|
|
|
102
|
-
- 项目支持文件夹、ZIP
|
|
103
|
+
- 项目支持文件夹、ZIP 导入/导出、标签、分享、所有权转让、归档和私有的个人引用库;引用库支持主题文件夹、标签、Markdown 笔记及整文件夹 BibTeX 导出,也可携带笔记导出并分享给其他用户。
|
|
104
|
+
支持导入 `.bib` 文件或 TexLite JSON 导出文件。
|
|
105
|
+
- 所有者可创建免登录的只读链接,设置有效期、轮换或撤销;访客可查看源码和已有 PDF,
|
|
106
|
+
不加入协作列表。
|
|
103
107
|
- 基于 CodeMirror 的编辑器提供 LaTeX/BibTeX 高亮、折叠、补全、可选 Vim 模式、格式化、
|
|
104
108
|
拼写/语法/ChkTeX 辅助、搜索替换及源码/PDF SyncTeX 跳转。
|
|
105
109
|
- 基于 Yjs 的协同源码编辑支持活动会话、源码锚定批注、回复、解决状态,以及让审阅者
|
|
@@ -108,8 +112,7 @@ TeX 更新、数据位置与协作工作流的掌控。
|
|
|
108
112
|
可下载产物以及可选的项目级 `latexmkrc`。
|
|
109
113
|
- 每个项目拥有历史版本和仅所有者可用的 Git/GitHub 备份;Git 是可选依赖,仅在使用
|
|
110
114
|
集成时才检查。
|
|
111
|
-
- 可选的网页终端可调用服务器上安装的代码 agent
|
|
112
|
-
每个项目同时只能运行一个任务。参见[外部 agent 终端](OPERATIONS.md#external-agent-terminals)。
|
|
115
|
+
- 可选的网页终端可调用服务器上安装的代码 agent,由管理员启用。参见[外部 agent 终端](OPERATIONS.md#external-agent-terminals)。
|
|
113
116
|
|
|
114
117
|
<a id="docker-deployment"></a>
|
|
115
118
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t,t as n}from"./react-DUEFWlB7.js";import{_ as r}from"./relativeTime-DKEihsTa.js";import{t as i}from"./useTranslation-DwkoADSz.js";import{t as a}from"./createLucideIcon-CDYIzuiB.js";import{H as o,S as ee,T as te,U as ne,d as re,x as s,z as ie}from"./useDeletionTransitions-TAZINdHX.js";import{t as ae}from"./circle-check-CunlnBPw.js";import{t as oe}from"./loader-circle-DKGyi5EK.js";import{t as c}from"./lock-keyhole-aC_QjKDi.js";import{t as se}from"./search-DjOWqLig.js";import{t as l}from"./user-plus-NNBQOWDP.js";import{c as ce,f as u,h as d,l as f}from"./index-CfSDaTd4.js";import{t as le}from"./SuccessNotice-ubBtzzi_.js";var p={name:`dices`,size:24,node:[[`rect`,{width:`12`,height:`12`,x:`2`,y:`10`,rx:`2`,ry:`2`,key:`6agr2n`}],[`path`,{d:`m17.92 14 3.5-3.5a2.24 2.24 0 0 0 0-3l-5-4.92a2.24 2.24 0 0 0-3 0L10 6`,key:`1o487t`}],[`path`,{d:`M6 18h.01`,key:`uhywen`}],[`path`,{d:`M10 14h.01`,key:`ssrbsk`}],[`path`,{d:`M15 6h.01`,key:`cblpky`}],[`path`,{d:`M18 9h.01`,key:`2061c0`}]]};p.node;var ue=a(p),m={name:`key-round`,size:24,node:[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]};m.node;var de=a(m),h=e(t(),1),g=n();function fe(e=10){let t=crypto.getRandomValues(new Uint8Array(e));return Array.from(t,e=>`ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789!@#$%`[e%62]).join(``)}function _({currentUser:e,minPasswordLength:t,onBack:n}){let{t:a}=i(),[p,m]=(0,h.useState)([]),[_,pe]=(0,h.useState)(null),[v,y]=(0,h.useState)(``),[b,x]=(0,h.useState)(1),[S,me]=(0,h.useState)({page:1,pageSize:20,total:0,totalPages:0}),[C,he]=(0,h.useState)(!0),[w,T]=(0,h.useState)(!1),[ge,_e]=(0,h.useState)(0),[E,D]=(0,h.useState)(``),O=le(),[k,A]=(0,h.useState)(!1),[j,M]=(0,h.useState)(``),[ve,N]=(0,h.useState)(!1),[P,F]=(0,h.useState)({username:``,displayName:``,password:``,role:`user`,canCreateProjects:!1}),[I,L]=(0,h.useState)(null),[R,z]=(0,h.useState)(``),[ye,B]=(0,h.useState)(null),[V,H]=(0,h.useState)(null),[U,W]=(0,h.useState)(!1),[G,K]=(0,h.useState)(!1),[be,q]=(0,h.useState)(``),[J,Y]=(0,h.useState)(null),[X,xe]=(0,h.useState)(!1),[Se,Z]=(0,h.useState)(``),Q=v.trim(),$=()=>_e(e=>e+1);(0,h.useEffect)(()=>{let e=new AbortController;B(null),he(!0),T(!1),D(``);let t=window.setTimeout(()=>{let t=new URLSearchParams({page:String(b)});Q&&t.set(`q`,Q),d(`/api/admin/users?${t}`,{signal:e.signal}).then(t=>{e.signal.aborted||(m(t.users),pe(t.summary),me(t.pagination),x(t.pagination.page))}).catch(t=>{e.signal.aborted||(D(u(t)),T(!0))}).finally(()=>{e.signal.aborted||he(!1)})},Q?200:0);return()=>{window.clearTimeout(t),e.abort()}},[Q,b,ge]);let Ce=async()=>{if(!k){if(P.password.length<t)return M(a(`auth.passwordMinimum`,{count:t}));A(!0),M(``),O.clear();try{await d(`/api/admin/users`,{method:`POST`,body:JSON.stringify({username:P.username,displayName:P.displayName||P.username,password:P.password,role:P.role,canCreateProjects:P.canCreateProjects})}),N(!1),F({username:``,displayName:``,password:``,role:`user`,canCreateProjects:!1}),$(),O.show(`create`)}catch(e){M(u(e))}finally{A(!1)}}},we=async e=>{Y({target:e,setting:e.role===`admin`?`demote`:`promote`}),Z(``)},Te=async e=>{Y({target:e,setting:e.canCreateProjects?`denyProjectCreation`:`allowProjectCreation`}),Z(``)},Ee=async()=>{if(!J||X)return;let{target:e,setting:t}=J,n=t===`demote`?{role:`user`}:t===`promote`?{role:`admin`}:{canCreateProjects:t===`allowProjectCreation`};xe(!0),Z(``);try{await d(`/api/admin/users/${e.id}`,{method:`PATCH`,body:JSON.stringify(n)}),$(),Y(null)}catch(e){Z(u(e))}finally{xe(!1)}},De=async()=>{if(I&&R&&!k){if(R.length<t)return M(a(`auth.passwordMinimum`,{count:t}));A(!0),M(``),O.clear();try{await d(`/api/admin/users/${I.id}`,{method:`PATCH`,body:JSON.stringify({password:R})}),O.show(`reset:${I.id}`),L(null),z(``)}catch(e){M(u(e))}finally{A(!1)}}},Oe=async()=>{if(V&&!G){K(!0),q(``);try{await d(`/api/admin/users/${V.id}`,{method:`DELETE`,body:JSON.stringify({deleteProjects:U})}),H(null),W(!1),$()}catch(e){q(u(e))}finally{K(!1)}}},ke=[{key:`totalUsers`,detail:_?a(`users.summary.administrators`,{count:_.administrators}):``},{key:`projectCreators`,detail:_?a(`users.summary.ofUsers`,{count:_.totalUsers}):``},{key:`totalProjects`,detail:_?a(`users.summary.projectOwners`,{count:_.projectOwners}):``}];return(0,g.jsxs)(`section`,{className:`admin-users-page management-page`,children:[(0,g.jsxs)(`div`,{className:`section-title`,children:[(0,g.jsxs)(`div`,{children:[(0,g.jsxs)(`h1`,{children:[(0,g.jsx)(ee,{"aria-hidden":!0,size:25}),a(`users.manage`)]}),(0,g.jsx)(`p`,{className:`muted`,children:a(`users.onlyAdmin`)})]}),(0,g.jsxs)(`button`,{type:`button`,className:`dashboard-back-button`,onClick:n,children:[(0,g.jsx)(ne,{size:14}),a(`navigation.backToProjects`)]})]}),(0,g.jsxs)(`div`,{className:`admin-user-layout`,children:[(0,g.jsx)(`dl`,{className:`admin-user-summary`,"aria-label":a(`users.overview`),children:ke.map(({key:e,detail:t})=>(0,g.jsxs)(`div`,{children:[(0,g.jsx)(`dt`,{children:a(`users.summary.${e}`)}),(0,g.jsxs)(`dd`,{className:_?.[e]===0?`admin-user-zero`:void 0,children:[(0,g.jsx)(`strong`,{children:_?.[e]??`—`}),t&&(0,g.jsx)(`span`,{children:t})]})]},e))}),(0,g.jsxs)(`div`,{className:`admin-user-content`,children:[(0,g.jsxs)(`div`,{className:`admin-user-toolbar`,children:[(0,g.jsxs)(`div`,{className:`admin-user-filters`,children:[(0,g.jsxs)(`div`,{className:`admin-user-search`,role:`search`,children:[(0,g.jsx)(se,{"aria-hidden":!0,size:16}),(0,g.jsx)(`input`,{role:`searchbox`,"aria-label":a(`users.searchPlaceholder`),placeholder:a(`users.searchPlaceholder`),value:v,onChange:e=>{y(e.target.value),x(1)}}),v&&(0,g.jsx)(`button`,{type:`button`,"aria-label":a(`users.clearSearch`),title:a(`users.clearSearch`),onClick:()=>{y(``),x(1)},children:(0,g.jsx)(s,{"aria-hidden":!0,size:14})})]}),Q&&!C&&!w&&(0,g.jsx)(`span`,{className:`admin-user-count`,role:`status`,children:a(`users.total`,{count:S.total})})]}),(0,g.jsxs)(`button`,{className:`primary icon-button admin-user-add`,onClick:()=>{O.clear(),M(``),N(!0)},children:[(0,g.jsx)(l,{"aria-hidden":!0,size:15}),(0,g.jsx)(`span`,{role:`status`,children:a(O.message===`create`?`common.done`:`users.add`)})]})]}),E&&(0,g.jsx)(`p`,{className:`error`,role:`alert`,children:E}),(0,g.jsx)(`div`,{className:`table-card admin-user-table`,"aria-busy":C,children:(0,g.jsxs)(`table`,{children:[(0,g.jsx)(`thead`,{children:(0,g.jsxs)(`tr`,{children:[(0,g.jsx)(`th`,{children:a(`common.user`)}),(0,g.jsx)(`th`,{children:a(`users.role`)}),(0,g.jsx)(`th`,{children:a(`users.createProjects`)}),(0,g.jsx)(`th`,{children:a(`users.ownedProjects`)}),(0,g.jsx)(`th`,{children:a(`users.actions`)})]})}),(0,g.jsx)(`tbody`,{children:C?(0,g.jsx)(`tr`,{children:(0,g.jsx)(`td`,{colSpan:5,className:`admin-user-list-state`,children:(0,g.jsxs)(`span`,{role:`status`,children:[(0,g.jsx)(oe,{className:`spin`,size:16}),a(`common.loading`)]})})}):w?(0,g.jsx)(`tr`,{children:(0,g.jsxs)(`td`,{colSpan:5,className:`admin-user-list-state`,children:[(0,g.jsx)(`span`,{children:a(`users.loadFailed`)}),(0,g.jsx)(`button`,{type:`button`,onClick:$,children:a(`common.retry`)})]})}):p.length===0?(0,g.jsx)(`tr`,{children:(0,g.jsx)(`td`,{colSpan:5,className:`admin-user-list-state`,children:a(Q?`users.noMatches`:`users.empty`)})}):p.map(t=>{let n=t.id===e.id,r=k||X,i=ye===t.id,o=O.message===`reset:${t.id}`;return(0,g.jsxs)(`tr`,{children:[(0,g.jsx)(`td`,{children:(0,g.jsxs)(`div`,{className:`admin-user-identity`,children:[(0,g.jsx)(re,{userId:t.id,name:t.displayName,username:t.username,avatarStyle:t.avatarStyle,className:`admin-user-avatar`}),(0,g.jsxs)(`div`,{children:[(0,g.jsx)(`strong`,{children:t.displayName}),(0,g.jsxs)(`small`,{children:[`@`,t.username]})]})]})}),(0,g.jsx)(`td`,{children:n?(0,g.jsxs)(`span`,{className:`admin-user-badge`,title:a(`users.selfProtected`),children:[(0,g.jsx)(c,{size:12,"aria-hidden":!0}),a(`common.admin`)]}):(0,g.jsxs)(`select`,{className:`admin-user-role`,"aria-label":a(`users.roleFor`,{username:t.username}),value:t.role,disabled:r,onChange:()=>void we(t),children:[(0,g.jsx)(`option`,{value:`user`,children:a(`common.user`)}),(0,g.jsx)(`option`,{value:`admin`,children:a(`common.admin`)})]})}),(0,g.jsx)(`td`,{children:t.role===`admin`?(0,g.jsxs)(`span`,{className:`admin-user-locked`,title:a(`users.adminCreation`),children:[(0,g.jsx)(c,{size:12,"aria-hidden":!0}),a(`users.alwaysAllowed`)]}):(0,g.jsx)(`button`,{type:`button`,className:`admin-user-switch`,role:`switch`,"aria-checked":t.canCreateProjects,"aria-label":a(`users.creationFor`,{username:t.username}),disabled:r,onClick:()=>void Te(t),children:(0,g.jsx)(`span`,{})})}),(0,g.jsx)(`td`,{className:t.ownedProjects?void 0:`admin-user-zero`,children:t.ownedProjects??0}),(0,g.jsx)(`td`,{children:(0,g.jsxs)(`div`,{className:`admin-user-actions`,children:[(0,g.jsxs)(`div`,{className:`admin-user-action-items`,id:`user-actions-${t.id}`,hidden:!i,children:[(0,g.jsxs)(`button`,{type:`button`,className:`icon-button`,disabled:r,title:a(o?`common.done`:`users.resetPassword`),"aria-label":a(`users.resetPassword`),onClick:()=>{O.clear(),L(t),z(``),M(``)},children:[o?(0,g.jsx)(ae,{className:`admin-user-action-confirmation`,"aria-hidden":!0,size:15}):(0,g.jsx)(de,{"aria-hidden":!0,size:15}),(0,g.jsx)(`span`,{className:`sr-only`,role:`status`,children:o?a(`common.done`):``})]}),!n&&(0,g.jsx)(`button`,{type:`button`,className:`icon-button danger-text`,disabled:r,title:a(`users.deleteTitle`),"aria-label":a(`users.deleteTitle`),onClick:()=>{H(t),W(!1),q(``)},children:(0,g.jsx)(te,{size:15,"aria-hidden":!0})})]}),(0,g.jsx)(`button`,{type:`button`,className:`icon-button admin-user-action-toggle`,disabled:r,"aria-label":a(`users.actionsFor`,{username:t.username}),"aria-expanded":i,"aria-controls":`user-actions-${t.id}`,onClick:()=>B(i?null:t.id),children:(0,g.jsx)(ie,{size:17,"aria-hidden":!0})})]})})]},t.id)})})]})}),S.totalPages>1&&(0,g.jsxs)(`nav`,{className:`project-pagination admin-user-pagination`,"aria-label":a(`users.pagination`),children:[(0,g.jsxs)(`button`,{type:`button`,disabled:C||w||S.page<=1,onClick:()=>x(S.page-1),children:[(0,g.jsx)(r,{size:15}),a(`users.previousPage`)]}),(0,g.jsx)(`span`,{children:a(`users.pageOf`,{page:S.page,totalPages:S.totalPages})}),(0,g.jsxs)(`button`,{type:`button`,disabled:C||w||S.page>=S.totalPages,onClick:()=>x(S.page+1),children:[a(`users.nextPage`),(0,g.jsx)(o,{size:15})]})]})]})]}),(0,g.jsxs)(f,{className:`management-dialog`,open:ve,title:a(`users.add`),description:a(`users.addDescription`),onOpenChange:e=>{k||N(e)},footer:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`button`,{className:`icon-button`,disabled:k,onClick:()=>N(!1),children:[(0,g.jsx)(s,{"aria-hidden":!0,size:14}),a(`common.cancel`)]}),(0,g.jsxs)(`button`,{className:`primary icon-button`,disabled:k||!P.username.trim()||P.password.length<t,onClick:()=>void Ce(),children:[(0,g.jsx)(l,{"aria-hidden":!0,size:14}),a(`users.createUser`)]})]}),children:[j&&(0,g.jsx)(`p`,{className:`error`,role:`alert`,children:j}),(0,g.jsxs)(`fieldset`,{className:`admin-user-form form-stack`,disabled:k,children:[(0,g.jsxs)(`label`,{className:`form-field`,children:[a(`auth.username`),(0,g.jsx)(`input`,{value:P.username,onChange:e=>F({...P,username:e.target.value})})]}),(0,g.jsxs)(`label`,{className:`form-field`,children:[a(`users.displayName`),(0,g.jsx)(`input`,{value:P.displayName,onChange:e=>F({...P,displayName:e.target.value})})]}),(0,g.jsxs)(`label`,{className:`form-field`,children:[a(`users.initialPassword`),(0,g.jsxs)(`span`,{className:`password-generator`,children:[(0,g.jsx)(`input`,{minLength:t,autoComplete:`new-password`,value:P.password,onChange:e=>F({...P,password:e.target.value})}),(0,g.jsxs)(`button`,{type:`button`,title:a(`users.generatePassword`),onClick:()=>F({...P,password:fe()}),children:[(0,g.jsx)(ue,{size:15}),a(`users.randomPassword`)]})]}),(0,g.jsx)(`small`,{className:`field-hint`,children:a(`auth.passwordMinimum`,{count:t})})]}),(0,g.jsxs)(`label`,{className:`form-field`,children:[a(`users.role`),(0,g.jsxs)(`select`,{value:P.role,onChange:e=>F({...P,role:e.target.value}),children:[(0,g.jsx)(`option`,{value:`user`,children:a(`common.user`)}),(0,g.jsx)(`option`,{value:`admin`,children:a(`common.admin`)})]})]}),(0,g.jsxs)(`label`,{className:`checkbox-field`,children:[(0,g.jsx)(`input`,{type:`checkbox`,checked:P.canCreateProjects||P.role===`admin`,disabled:P.role===`admin`,onChange:e=>F({...P,canCreateProjects:e.target.checked})}),` `,a(`users.allowCreate`)]})]})]}),(0,g.jsxs)(f,{className:`management-dialog`,open:!!I,title:a(`users.resetPassword`),description:a(`users.resetDescription`,{username:I?.username??``}),onOpenChange:e=>{!e&&!k&&L(null)},footer:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`button`,{className:`icon-button`,disabled:k,onClick:()=>L(null),children:[(0,g.jsx)(s,{"aria-hidden":!0,size:14}),a(`common.cancel`)]}),(0,g.jsxs)(`button`,{className:`primary icon-button`,disabled:k||R.length<t,onClick:()=>void De(),children:[(0,g.jsx)(de,{"aria-hidden":!0,size:14}),a(`users.reset`)]})]}),children:[j&&(0,g.jsx)(`p`,{className:`error`,role:`alert`,children:j}),(0,g.jsxs)(`label`,{className:`form-field`,children:[a(`auth.newPassword`),(0,g.jsxs)(`span`,{className:`password-generator`,children:[(0,g.jsx)(`input`,{disabled:k,autoFocus:!0,minLength:t,autoComplete:`new-password`,value:R,onChange:e=>z(e.target.value)}),(0,g.jsxs)(`button`,{type:`button`,disabled:k,onClick:()=>z(fe()),children:[(0,g.jsx)(ue,{size:15}),a(`users.randomPassword`)]})]}),(0,g.jsx)(`small`,{className:`field-hint`,children:a(`auth.passwordMinimum`,{count:t})})]})]}),(0,g.jsx)(f,{className:`management-dialog`,open:!!V,title:a(`users.deleteTitle`),description:a(`users.deleteDescription`,{username:V?.username??``}),onOpenChange:e=>{!e&&!G&&(H(null),q(``))},footer:(0,g.jsxs)(g.Fragment,{children:[(0,g.jsxs)(`button`,{className:`icon-button`,disabled:G,onClick:()=>{H(null),q(``)},children:[(0,g.jsx)(s,{"aria-hidden":!0,size:14}),a(`common.cancel`)]}),(0,g.jsxs)(`button`,{className:`danger icon-button`,disabled:G,"aria-busy":G,onClick:()=>void Oe(),children:[G?(0,g.jsx)(oe,{className:`spin`,"aria-hidden":!0,size:14}):(0,g.jsx)(te,{"aria-hidden":!0,size:14}),a(G?`common.loading`:`users.deleteTitle`)]})]}),children:(0,g.jsxs)(g.Fragment,{children:[be&&(0,g.jsx)(`p`,{className:`error dialog-error`,children:be}),(0,g.jsxs)(`fieldset`,{className:`choice-group`,disabled:G,children:[(0,g.jsx)(`legend`,{children:a(`users.ownedChoice`,{count:V?.ownedProjects??0})}),(0,g.jsxs)(`label`,{children:[(0,g.jsx)(`input`,{type:`radio`,checked:!U,onChange:()=>W(!1)}),` `,a(`users.transferProjects`)]}),(0,g.jsxs)(`label`,{children:[(0,g.jsx)(`input`,{type:`radio`,checked:U,onChange:()=>W(!0)}),` `,a(`users.deleteProjects`)]})]})]})}),(0,g.jsx)(ce,{open:!!J,title:a(`userConfirmations.${J?.setting??`demote`}Title`),description:a(`userConfirmations.${J?.setting??`demote`}Description`,{username:J?.target.username??``}),confirmLabel:a(`userConfirmations.${J?.setting??`demote`}Confirm`),danger:J?.setting!==`promote`&&J?.setting!==`allowProjectCreation`,busy:X,error:Se,onCancel:()=>{X||(Y(null),Z(``))},onConfirm:()=>void Ee()})]})}export{_ as AdminUsers};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./react-DUEFWlB7.js";import{t}from"./createLucideIcon-CDYIzuiB.js";var n={name:`circle-off`,size:24,node:[[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8.35 2.69A10 10 0 0 1 21.3 15.65`,key:`1pfsoa`}],[`path`,{d:`M19.08 19.08A10 10 0 1 1 4.92 4.92`,key:`1ablyi`}]]};n.node;var r=t(n),i={codex:`Codex`,opencode:`OpenCode`,claude:`Claude Code`},a=65536;function o(e){let t=[];for(let n=0;n<e.length;){let r=Math.min(e.length,n+a),i=e.charCodeAt(r-1);r<e.length&&i>=55296&&i<=56319&&r--,t.push(e.slice(n,r)),n=r}return t}var s=e(),c={codex:{path:`M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z`},opencode:{path:`M16 6H8v12h8V6zm4 16H4V2h16v20z`},claude:{color:`#D97757`,path:`M20.998 10.949H24v3.102h-3v3.028h-1.487V20H18v-2.921h-1.487V20H15v-2.921H9V20H7.488v-2.921H6V20H4.487v-2.921H3V14.05H0V10.95h3V5h17.998v5.949zM6 10.949h1.488V8.102H6v2.847zm10.51 0H18V8.102h-1.49v2.847z`}};function l({agent:e,size:t=18}){let n=c[e];return(0,s.jsx)(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,width:t,height:t,className:`agent-identity-icon`,fill:n.color??`currentColor`,"aria-hidden":`true`,focusable:`false`,children:(0,s.jsx)(`path`,{d:n.path,fillRule:`evenodd`,clipRule:`evenodd`})})}export{r as i,i as n,o as r,l as t};
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.agent-management{gap:20px;min-width:0;padding-bottom:28px;display:grid}.agent-management .section-title{margin-bottom:0}.agent-management h1{align-items:center;gap:10px;display:flex}.agent-management button,.agent-terminal-panel button{border:1px solid var(--ui-border,#d4ddd7);background:var(--ui-surface,#fff);color:var(--ui-text,#273a2f);cursor:pointer;border-radius:6px;justify-content:center;align-items:center;gap:5px;padding:6px 10px;font-size:12px;display:inline-flex}.agent-management button:hover:not(:disabled),.agent-terminal-panel button:hover:not(:disabled){background:var(--ui-hover,#edf4ef)}.agent-management button:disabled,.agent-terminal-panel button:disabled{opacity:.45;cursor:default}.agent-management button.primary,.agent-terminal-panel button.primary{background:var(--ui-accent,#176b44);color:var(--ui-surface,#fff);border-color:#0000}.agent-management button.primary:hover:not(:disabled),.agent-terminal-panel button.primary:hover:not(:disabled){background:color-mix(in srgb, var(--ui-accent,#176b44), #000 12%)}.agent-management input:not([type=checkbox]),.agent-management select,.agent-terminal-panel input:not([type=checkbox]){border:1px solid var(--ui-border,#d4ddd7);background:var(--ui-surface,#fff);min-width:0;color:var(--ui-text,#273a2f);border-radius:6px;padding:7px 9px;font-size:12px}.agent-policy-card{border:1px solid var(--ui-border,#d8e1db);background:var(--ui-surface,#fff);border-radius:12px;padding:20px}.agent-policy-heading,.agent-policy-actions{align-items:center;gap:10px;display:flex}.agent-policy-heading{flex-wrap:wrap;justify-content:space-between}.agent-policy-heading strong{font-size:14px}.agent-policy-title{align-items:center;gap:5px;display:inline-flex}.agent-management .agent-policy-help{width:24px;height:24px;color:var(--ui-muted,#788178);background:0 0;border:0;border-radius:50%;flex:none;padding:0}.agent-policy-help:focus-visible{outline:2px solid var(--ui-accent,#176b44);outline-offset:2px}.agent-catalog{grid-template-columns:repeat(auto-fill,minmax(min(100%,220px),1fr));gap:12px;margin-top:18px;display:grid}.agent-catalog-item{border:1px solid var(--ui-border,#d8e1db);cursor:pointer;border-radius:8px;align-items:flex-start;gap:10px;min-width:0;padding:14px;display:flex}.agent-catalog-item input{accent-color:#23704c;flex:none;margin:3px 0 0}.agent-catalog-details{overflow-wrap:anywhere;min-width:0}.agent-catalog-item strong{align-items:center;gap:8px;font-size:14px;display:flex}.agent-identity{align-items:center;gap:7px;display:inline-flex}.agent-identity-icon{flex:none}.agent-catalog-item small{color:var(--ui-muted,#788178);margin-top:6px;font-size:11px;display:block}.agent-catalog-item.unavailable{opacity:.6}.agent-list-controls{flex-wrap:wrap;align-items:center;gap:9px;display:flex}.agent-list-reminder{border:1px solid var(--ui-border,#d8e1db);background:var(--ui-subtle,#f3f6f3);color:var(--ui-warning,#805a24);border-radius:8px;align-items:flex-start;gap:7px;margin:0;padding:10px 12px;font-size:12px;line-height:1.5;display:flex}.agent-list-reminder>svg,.agent-execution-reminder>svg{flex:none;margin-top:2px}.agent-list-controls>input{flex:130px;max-width:220px}.agent-list-controls small{color:var(--ui-muted,#788178)}.agent-toolbar-spacer{flex:1}.agent-bulk-actions{align-items:center;gap:10px;font-size:12px;display:flex}.agent-table-scroll{min-width:0;overflow-x:auto}.agent-task-table{border-collapse:collapse;width:100%;min-width:760px}.agent-task-table th{white-space:nowrap}.agent-task-table td{vertical-align:middle;font-size:12px}.agent-task-table td small{margin-top:5px;display:block}.agent-task-table tr.selected{background:var(--ui-accent-bg,#eaf3ed)}.agent-task-name{text-overflow:ellipsis;white-space:nowrap;vertical-align:middle;max-width:230px;display:inline-block;overflow:hidden}.agent-task-table .agent-table-time{color:var(--ui-muted,#788178);white-space:nowrap;font-variant-numeric:tabular-nums;font-size:11px}.agent-table-time time,.agent-table-user{cursor:default;border-radius:3px}.agent-table-time time:focus-visible,.agent-table-user:focus-visible{outline:2px solid var(--ui-accent,#176b44);outline-offset:3px}.agent-time-heading{align-items:center;gap:5px;display:inline-flex}.agent-state-badge{background:var(--ui-hover,#eef2ef);color:var(--ui-muted,#788178);white-space:nowrap;border-radius:5px;padding:4px 7px;font-size:11px;display:inline-block}.agent-state-badge.running,.agent-state-badge.starting{background:var(--ui-accent-bg,#eaf3ed);color:var(--ui-accent,#236544)}.agent-state-badge.failed{color:var(--ui-danger,#a33c36)}.agent-row-actions{white-space:nowrap}.agent-action-confirmation{color:var(--ui-info,#2563b4)}.agent-management button.agent-danger,.agent-terminal-panel button.agent-danger{color:var(--ui-danger,#a33c36)}.agent-management .project-pagination{margin-top:0}.agent-delete-item{border-bottom:1px solid var(--ui-border,#d8e1db);gap:6px;padding:12px 0;font-size:13px;display:grid}.agent-delete-item small{color:var(--ui-muted,#788178)}.agent-delete-item:last-child{border-bottom:0}.agent-terminal-panel{background:var(--ui-surface,#fafbf9);min-width:0;height:100%;color:var(--ui-text,#273a2f);flex-direction:column;display:flex;overflow:hidden}.agent-terminal-heading{border-bottom:1px solid var(--ui-border,#d8e1db);flex:none;align-items:center;gap:6px;padding:6px 8px;display:flex}.agent-terminal-heading>strong{align-items:center;gap:5px;font-size:11px;font-weight:600;display:flex}.agent-terminal-panel .agent-session-help{width:22px;height:22px;color:var(--ui-muted,#788178);background:0 0;border:0;border-radius:50%;flex:none;padding:0}.agent-session-help:focus-visible{outline:2px solid var(--ui-accent,#176b44);outline-offset:2px}.agent-task-tabs{flex:1;gap:4px;min-width:0;display:flex;overflow-x:auto}.agent-task-tabs button{background:0 0;border-color:#0000;flex:none;max-width:210px;padding:5px 7px;font-size:11px}.agent-task-tabs button>span:not(.agent-state-dot){text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.agent-task-tabs button.active{border-color:var(--ui-accent-border,#b4d0be);background:var(--ui-accent-bg,#eaf3ed)}.agent-task-tabs small{color:var(--ui-muted,#788178);font-size:10px}.agent-state-dot{background:var(--ui-muted,#8b948d);border-radius:50%;flex:none;width:5px;height:5px}.agent-state-dot.running{background:#389c68;box-shadow:0 0 0 2px #389c6818}.agent-task-toolbar{border-bottom:1px solid var(--ui-border,#d8e1db);flex-wrap:wrap;flex:none;align-items:center;gap:5px;padding:5px 8px;display:flex}.agent-task-toolbar button{padding:4px 6px;font-size:11px}.agent-task-state{color:var(--ui-muted,#788178);padding-left:4px;font-size:10px}.agent-task-create{flex-wrap:wrap;flex:none;gap:7px;padding:8px;display:flex}.agent-task-create input{flex:120px}.agent-terminal-panel .agent-select-trigger{justify-content:flex-start;min-width:150px;max-width:100%;padding:7px 9px}.agent-select-trigger>span{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.agent-select-trigger>svg:last-child{color:var(--ui-muted,#788178);flex:none;margin-left:auto}.agent-select-trigger:focus-visible{outline:2px solid var(--ui-accent,#176b44);outline-offset:2px}.agent-select-options{z-index:120;min-width:max(200px, var(--radix-dropdown-menu-trigger-width));max-width:calc(100vw - 16px);max-height:var(--radix-dropdown-menu-content-available-height);border:1px solid var(--ui-border,#cbd5ce);background:var(--ui-raised,#fff);color:var(--ui-text,#273a2f);border-radius:8px;padding:4px;overflow-y:auto;box-shadow:0 8px 24px #071c2426}.agent-select-option{cursor:pointer;user-select:none;border-radius:5px;outline:none;align-items:center;gap:9px;min-height:34px;padding:7px 9px;font-size:12px;display:flex}.agent-select-option[data-highlighted]{background:var(--ui-hover,#edf4ef)}.agent-select-option[data-disabled]{opacity:.5;cursor:default}.agent-select-label{flex-direction:column;flex:1;gap:3px;min-width:0;display:flex}.agent-select-label small{color:var(--ui-muted,#788178);font-size:10px}.agent-select-check{color:var(--ui-accent,#176b44);flex:none;margin-left:auto;display:flex}.agent-terminal-body{background:var(--terminal-bg);min-height:0;color:var(--terminal-fg);flex:1;overflow:hidden}.agent-terminal-surface{background:var(--terminal-bg);height:100%;color:var(--terminal-fg);flex-direction:column;display:flex;overflow:hidden}.agent-xterm{background:var(--terminal-bg);flex:1;min-width:0;min-height:0;padding:7px 5px;overflow:hidden}.agent-xterm .xterm{height:100%}.agent-terminal-status{background:var(--ui-surface,#fafbf9);color:var(--ui-muted,#788178);flex:none;justify-content:space-between;align-items:center;gap:8px;padding:5px 10px;font-size:11px;display:flex}.agent-execution-reminder{border-top:1px solid var(--ui-border,#d8e1db);color:var(--ui-muted,#788178);flex:none;align-items:flex-start;gap:6px;margin:0;padding:5px 10px;font-size:11px;line-height:1.5;display:flex}.agent-task-empty{text-align:center;min-height:90px;color:var(--ui-muted,#788178);flex-direction:column;justify-content:center;align-items:center;gap:9px;padding:28px 20px 36px;display:flex}.agent-terminal-body .agent-task-empty{height:100%;color:var(--terminal-muted)}.agent-task-empty strong{color:var(--ui-text,#273a2f);font-size:13px}.agent-terminal-body .agent-task-empty strong{color:var(--terminal-fg)}.agent-task-empty p{max-width:470px;margin:0;font-size:12px;line-height:1.6}.agent-inline-error,.agent-inline-warning{flex:none;align-items:center;gap:6px;margin:0;padding:6px 10px;font-size:11px;display:flex}.agent-inline-error{justify-content:space-between}.agent-inline-warning{border-block:1px solid var(--ui-danger-border,#e9b6b0);background:var(--ui-danger-bg,#fff3f1);color:var(--ui-danger,#b3261e);align-items:flex-start;line-height:1.5}.agent-inline-warning>svg{flex:none;margin-top:1px}@media (width<=900px){.agent-terminal-heading>strong{font-size:0}}@media (width<=1250px){.agent-management .agent-table-scroll{background:0 0;border:0;border-radius:0;overflow:visible}.agent-task-table{min-width:0;display:block}.agent-task-table thead{margin-bottom:8px;display:block}.agent-task-table thead tr{display:block}.agent-task-table thead th{clip-path:inset(50%);width:1px;height:1px;padding:0;position:absolute;overflow:hidden}.agent-task-table thead th:first-child{clip-path:none;background:0 0;border:0;align-items:center;gap:8px;width:auto;height:auto;padding:0;display:inline-flex;position:static;overflow:visible}.agent-task-table thead th:first-child:after{content:attr(data-label);color:var(--ui-muted,#788178);font-size:11px;font-weight:400}.agent-task-table tbody{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;display:grid}.agent-task-table tbody tr{border:1px solid var(--ui-border,#d8e1db);background:var(--ui-surface,#fff);border-radius:10px;grid-template-rows:auto auto 1fr auto auto;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 12px;min-width:0;padding:14px;display:grid;position:relative}.agent-task-table tbody td{overflow-wrap:anywhere;border:0;min-width:0;padding:0}.agent-task-table tbody td[data-label]:before{content:attr(data-label);color:var(--ui-muted,#788178);margin-bottom:5px;font-size:10px;line-height:1.4;display:block}.agent-task-table .agent-task-selection{position:absolute;top:12px;right:12px}.agent-task-table .agent-task-selection input{width:18px;height:18px;margin:0}.agent-task-table .agent-table-task{grid-column:1/-1;padding-right:28px}.agent-task-table .agent-task-name{white-space:normal;overflow-wrap:anywhere;max-width:100%;display:block}.agent-task-table .agent-project-name{-webkit-line-clamp:2;-webkit-box-orient:vertical;max-height:3em;line-height:1.5;display:-webkit-box;overflow:hidden}.agent-task-table .agent-table-task strong{font-size:13px;line-height:1.5}.agent-task-table .agent-table-time{white-space:normal;grid-column:1/-1}.agent-task-table .agent-row-actions{border-top:1px solid var(--ui-border,#d8e1db);grid-column:1/-1;justify-content:flex-end;gap:8px;padding-top:10px;display:flex}.agent-task-table .agent-row-actions button{min-height:44px;margin:0}.agent-task-table .agent-row-actions .agent-icon-button{min-width:44px}.agent-bulk-actions{flex-wrap:wrap}}@media (width<=600px){.agent-task-table tbody{grid-template-columns:minmax(0,1fr)}.agent-list-controls>input{max-width:none}}@media (width<=550px){.agent-policy-card{padding:13px}}
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{i as t,t as n}from"./react-DUEFWlB7.js";import{_ as r,r as i,u as a}from"./relativeTime-DKEihsTa.js";import{t as ee}from"./useTranslation-DwkoADSz.js";import{t as te}from"./arrow-down-C_4f1E-E.js";import{E as o,H as ne,T as s,U as re,c,w as ie}from"./useDeletionTransitions-TAZINdHX.js";import{t as l}from"./circle-check-CunlnBPw.js";import{i as u,n as d,t as f}from"./AgentIcon-DsoMeMA8.js";import{t as ae}from"./InfoPopover-Dkz742vJ.js";import{t as p}from"./loader-circle-DKGyi5EK.js";import{t as m}from"./refresh-cw-IqExWG6S.js";import{t as oe}from"./SaveButton-wiTpGLho.js";import{f as h,h as g,l as se}from"./index-CfSDaTd4.js";import{t as ce}from"./SuccessNotice-ubBtzzi_.js";var _=e(t(),1),v=n();function y({user:e,onBack:t}){let{t:n,i18n:y}=ee(),{showExecutionReminder:le}=a(),b=e.role===`admin`,x=b?`/api/admin/agent-tasks`:`/api/agent-tasks`,[S,C]=(0,_.useState)(null),[w,T]=(0,_.useState)({allowed:[]}),[E,ue]=(0,_.useState)({tasks:[],page:1,pageSize:50,total:0}),[D,O]=(0,_.useState)(1),[k,de]=(0,_.useState)(``),[A,fe]=(0,_.useState)(``),[j,pe]=(0,_.useState)(``),[M,me]=(0,_.useState)(``),[he,N]=(0,_.useState)(0),[P,F]=(0,_.useState)(!0),[I,L]=(0,_.useState)(!1),R=(0,_.useRef)(!1),z=(0,_.useRef)(!0),[B,V]=(0,_.useState)(``),H=ce(),[U,W]=(0,_.useState)(new Set),[G,K]=(0,_.useState)([]),[q,J]=(0,_.useState)({});(0,_.useEffect)(()=>(z.current=!0,()=>{z.current=!1}),[]),(0,_.useEffect)(()=>{let e=new AbortController;return g(b?`/api/admin/agents`:`/api/agents`,{signal:e.signal}).then(e=>{C(e),T(e.policy)}).catch(t=>{e.signal.aborted||V(h(t))}),()=>e.abort()},[b]),(0,_.useEffect)(()=>{let e,t=!1,n=()=>{if(document.visibilityState===`hidden`)return;e?.abort(),e=new AbortController;let n=e,r=new URLSearchParams({page:String(D)});k&&r.set(`state`,k),A&&r.set(`agent`,A),j.trim()&&r.set(`project`,j.trim()),M.trim()&&r.set(`user`,M.trim()),g(`${x}?${r}`,{signal:n.signal}).then(e=>{!t&&!n.signal.aborted&&(ue(e),F(!1))}).catch(e=>{!t&&!n.signal.aborted&&(V(h(e)),F(!1))})},r=window.setTimeout(n,150),i=window.setInterval(n,5e3);return window.addEventListener(`focus`,n),()=>{t=!0,e?.abort(),window.clearTimeout(r),window.clearInterval(i),window.removeEventListener(`focus`,n)}},[x,D,k,A,j,M,he]);let Y=async e=>{if(!R.current){R.current=!0,L(!0),V(``),H.clear();try{await e()}catch(e){z.current&&V(h(e))}finally{R.current=!1,i(),z.current&&(L(!1),N(e=>e+1))}}},X=async(e,t)=>{let r=await Promise.allSettled(e.map(e=>g(`${x}/${e.id}${t===`stop`?`/stop`:``}`,{method:t===`stop`?`POST`:`DELETE`}))),i={},a=[];r.forEach((t,n)=>{t.status===`rejected`&&(i[e[n].id]=h(t.reason),a.push(e[n]))}),J(i),W(new Set(a.map(e=>e.id))),t===`delete`&&K(a),a.length?V(n(`agents.operationFailed`)):t===`stop`&&e.length===1&&H.show(`stop:${e[0].id}`)},Z=e=>{V(``),J({}),K(e)},Q=(e,t)=>{e(t),O(1),W(new Set)},$=E.tasks.filter(e=>U.has(e.id));return(0,v.jsxs)(`section`,{className:`agent-management management-page`,children:[(0,v.jsxs)(`div`,{className:`section-title`,children:[(0,v.jsxs)(`div`,{children:[(0,v.jsxs)(`h1`,{children:[(0,v.jsx)(o,{size:25}),n(b?`agents.title`:`agents.tasks`)]}),(0,v.jsx)(`p`,{children:n(b?`agents.description`:`agents.personalDescription`)})]}),(0,v.jsxs)(`button`,{type:`button`,className:`dashboard-back-button`,onClick:t,children:[(0,v.jsx)(re,{size:14}),n(`navigation.backToProjects`)]})]}),B&&!G.length&&(0,v.jsx)(`p`,{className:`error`,role:`alert`,children:B}),b&&(0,v.jsxs)(`section`,{className:`agent-policy-card`,children:[(0,v.jsxs)(`div`,{className:`agent-policy-heading`,children:[(0,v.jsxs)(`div`,{className:`agent-policy-title`,children:[(0,v.jsx)(`strong`,{children:n(`agents.allowedAgents`)}),(0,v.jsx)(ae,{className:`agent-policy-help`,content:n(`agents.usageHint`),size:15})]}),(0,v.jsxs)(`div`,{className:`agent-policy-actions`,children:[(0,v.jsxs)(`button`,{disabled:I,onClick:()=>void Y(async()=>{let e=await g(`/api/admin/agents/refresh`,{method:`POST`});C(e),H.show(`detect`)}),children:[(0,v.jsx)(m,{size:14}),(0,v.jsx)(`span`,{role:`status`,children:n(H.message===`detect`?`common.done`:`agents.detection`)})]}),(0,v.jsx)(oe,{saving:I,feedback:H.message===`policy`?n(`editor.saved`):``,disabled:!S,onClick:()=>void Y(async()=>{let e=await g(`/api/admin/agents`,{method:`PATCH`,body:JSON.stringify(w)});C(e),T(e.policy),H.show(`policy`),window.dispatchEvent(new Event(`texlite:agents-policy`))}),children:n(`common.save`)})]})]}),(0,v.jsx)(`div`,{className:`agent-catalog`,children:S?.agents.map(e=>(0,v.jsxs)(`label`,{className:`agent-catalog-item${e.installed?``:` unavailable`}`,children:[(0,v.jsx)(`input`,{type:`checkbox`,"aria-label":`${n(`agents.allowed`)} ${e.label}`,disabled:I,checked:w.allowed.includes(e.id),onChange:t=>T(n=>({...n,allowed:t.target.checked?[...n.allowed,e.id]:n.allowed.filter(t=>t!==e.id)}))}),(0,v.jsxs)(`div`,{className:`agent-catalog-details`,children:[(0,v.jsxs)(`strong`,{children:[(0,v.jsx)(f,{agent:e.id}),e.label]}),(0,v.jsx)(`small`,{children:e.installed?`${n(`agents.installed`)} · ${e.version??n(`agents.unknown`)}`:n(`agents.notInstalled`)})]})]},e.id))}),S&&!S.ptyAvailable&&(0,v.jsx)(`p`,{className:`error`,children:n(`agents.ptyUnavailable`)})]}),le&&(0,v.jsxs)(`p`,{className:`agent-list-reminder`,children:[(0,v.jsx)(ie,{size:14,"aria-hidden":`true`}),(0,v.jsx)(`span`,{children:n(`agents.endReminder`)})]}),(0,v.jsxs)(`div`,{className:`agent-list-controls`,children:[(0,v.jsxs)(`select`,{"aria-label":n(`agents.state`),value:k,onChange:e=>Q(de,e.target.value),children:[(0,v.jsx)(`option`,{value:``,children:n(`agents.all`)}),(0,v.jsx)(`option`,{value:`running`,children:n(`agents.running`)}),(0,v.jsx)(`option`,{value:`cleanup`,children:n(`agents.cleanup`)})]}),(0,v.jsxs)(`select`,{"aria-label":n(`agents.agent`),value:A,onChange:e=>Q(fe,e.target.value),children:[(0,v.jsx)(`option`,{value:``,children:n(`agents.agent`)}),Object.entries(d).map(([e,t])=>(0,v.jsx)(`option`,{value:e,children:t},e))]}),(0,v.jsx)(`input`,{"aria-label":n(`agents.projectFilter`),placeholder:n(`agents.projectFilter`),value:j,onChange:e=>Q(pe,e.target.value)}),b&&(0,v.jsx)(`input`,{"aria-label":n(`agents.userFilter`),placeholder:n(`agents.userFilter`),value:M,onChange:e=>Q(me,e.target.value)}),(0,v.jsx)(`span`,{className:`agent-toolbar-spacer`}),(0,v.jsx)(`small`,{children:n(`agents.taskCount`,{count:E.total})}),(0,v.jsx)(`button`,{"aria-label":n(`agents.refresh`),disabled:I,onClick:()=>N(e=>e+1),children:(0,v.jsx)(m,{size:14})})]}),$.length>0&&(0,v.jsxs)(`div`,{className:`agent-bulk-actions`,children:[(0,v.jsx)(`span`,{children:n(`agents.selected`,{count:$.length})}),(0,v.jsxs)(`button`,{disabled:I,onClick:()=>void Y(()=>X($,`stop`)),children:[(0,v.jsx)(u,{size:13}),n(`agents.batchEnd`)]}),(0,v.jsxs)(`button`,{className:`agent-danger`,disabled:I,onClick:()=>Z($),children:[(0,v.jsx)(s,{size:13}),n(`agents.batchDelete`)]})]}),(0,v.jsxs)(`div`,{className:`agent-table-scroll table-card`,children:[(0,v.jsxs)(`table`,{className:`agent-task-table`,role:`table`,children:[(0,v.jsx)(`thead`,{children:(0,v.jsxs)(`tr`,{children:[(0,v.jsx)(`th`,{"data-label":n(`agents.all`),children:(0,v.jsx)(`input`,{type:`checkbox`,"aria-label":n(`agents.all`),checked:E.tasks.length>0&&E.tasks.every(e=>U.has(e.id)),onChange:e=>W(new Set(e.target.checked?E.tasks.map(e=>e.id):[]))})}),(0,v.jsx)(`th`,{children:n(`agents.task`)}),(0,v.jsx)(`th`,{children:n(`agents.project`)}),b&&(0,v.jsx)(`th`,{children:n(`agents.user`)}),(0,v.jsx)(`th`,{children:n(`agents.agent`)}),(0,v.jsx)(`th`,{children:n(`agents.state`)}),(0,v.jsx)(`th`,{scope:`col`,"aria-sort":`descending`,children:(0,v.jsxs)(`span`,{className:`agent-time-heading`,children:[n(`agents.updated`),(0,v.jsx)(te,{size:12,"aria-hidden":`true`})]})}),(0,v.jsx)(`th`,{children:n(`agents.actions`)})]})}),(0,v.jsx)(`tbody`,{children:E.tasks.map(e=>(0,v.jsxs)(`tr`,{className:U.has(e.id)?`selected`:``,children:[(0,v.jsx)(`td`,{className:`agent-task-selection`,children:(0,v.jsx)(`input`,{type:`checkbox`,"aria-label":e.title,checked:U.has(e.id),onChange:t=>W(n=>{let r=new Set(n);return t.target.checked?r.add(e.id):r.delete(e.id),r})})}),(0,v.jsx)(`td`,{className:`agent-table-task`,children:(0,v.jsx)(`strong`,{className:`agent-task-name`,title:e.title,children:e.title})}),(0,v.jsx)(`td`,{"data-label":n(`agents.project`),children:(0,v.jsx)(`span`,{className:`agent-task-name agent-project-name`,title:e.projectId,children:e.projectName})}),b&&(0,v.jsx)(`td`,{"data-label":n(`agents.user`),children:(0,v.jsx)(`span`,{className:`agent-table-user`,tabIndex:e.userUsername?0:void 0,"data-tooltip":e.userUsername?`@${e.userUsername}`:void 0,children:e.userName})}),(0,v.jsx)(`td`,{"data-label":n(`agents.agent`),children:(0,v.jsxs)(`span`,{className:`agent-identity`,children:[(0,v.jsx)(f,{agent:e.agentId,size:15}),d[e.agentId]]})}),(0,v.jsxs)(`td`,{"data-label":n(`agents.state`),children:[(0,v.jsx)(`span`,{className:`agent-state-badge ${e.state}`,children:n(`agents.state_${e.state}`)}),e.cleanupState!==`none`&&(0,v.jsx)(`small`,{className:`error`,children:n(`agents.cleanup`)}),e.errorCode&&!q[e.id]&&(0,v.jsx)(`small`,{className:`error`,children:n(`errors.codes.${e.errorCode}`,{defaultValue:n(`agents.taskUnavailable`)})}),q[e.id]&&!G.length&&(0,v.jsx)(`small`,{className:`error`,children:q[e.id]})]}),(0,v.jsx)(`td`,{className:`agent-table-time`,"data-label":n(`agents.updated`),children:(0,v.jsx)(`time`,{dateTime:e.updatedAt,tabIndex:0,"data-tooltip":n(`agents.createdTooltip`,{created:c(e.createdAt,y.resolvedLanguage)}),children:c(e.updatedAt,y.resolvedLanguage,{year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`})})}),(0,v.jsxs)(`td`,{className:`agent-row-actions`,children:[(0,v.jsxs)(`button`,{type:`button`,className:`agent-icon-button`,title:n(`agents.end`),"aria-label":n(`agents.end`),disabled:I||![`running`,`starting`,`stopping`].includes(e.state),onClick:()=>void Y(()=>X([e],`stop`)),children:[H.message===`stop:${e.id}`?(0,v.jsx)(l,{className:`agent-action-confirmation`,size:14,"aria-hidden":`true`}):(0,v.jsx)(u,{size:14,"aria-hidden":`true`}),(0,v.jsx)(`span`,{className:`sr-only`,role:`status`,children:n(H.message===`stop:${e.id}`?`common.done`:`agents.end`)})]}),(0,v.jsx)(`button`,{className:`agent-icon-button agent-danger`,title:n(`agents.delete`),"aria-label":n(`agents.delete`),disabled:I,onClick:()=>Z([e]),children:(0,v.jsx)(s,{size:14})})]})]},e.id))})]}),!E.tasks.length&&(0,v.jsxs)(`div`,{className:`agent-task-empty`,children:[P?(0,v.jsx)(p,{size:24,className:`spin`}):(0,v.jsx)(o,{size:28}),(0,v.jsx)(`strong`,{children:n(P?`common.loading`:`agents.noTasks`)}),!P&&(0,v.jsx)(`p`,{children:n(`agents.noTasksHint`)})]})]}),(0,v.jsxs)(`nav`,{className:`project-pagination agent-pagination`,"aria-label":n(`agents.tasks`),children:[(0,v.jsxs)(`button`,{type:`button`,disabled:I||E.page<=1,onClick:()=>{O(E.page-1),W(new Set)},children:[(0,v.jsx)(r,{size:14,"aria-hidden":`true`}),n(`agents.previous`)]}),(0,v.jsx)(`span`,{children:n(`common.pageOf`,{page:E.page,totalPages:Math.max(1,Math.ceil(E.total/E.pageSize))})}),(0,v.jsxs)(`button`,{type:`button`,disabled:I||E.page*E.pageSize>=E.total,onClick:()=>{O(E.page+1),W(new Set)},children:[n(`agents.next`),(0,v.jsx)(ne,{size:14,"aria-hidden":`true`})]})]}),(0,v.jsxs)(se,{className:`management-dialog`,open:G.length>0,title:n(`agents.delete`),description:n(`agents.bulkDeleteDescription`),onOpenChange:e=>{!e&&!I&&K([])},footer:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsx)(`button`,{disabled:I,onClick:()=>K([]),children:n(`common.cancel`)}),(0,v.jsxs)(`button`,{className:`danger`,disabled:I,onClick:()=>void Y(()=>X(G,`delete`)),children:[I&&(0,v.jsx)(p,{size:14,className:`spin`}),n(`agents.delete`)]})]}),children:[G.length>1&&(0,v.jsx)(`p`,{children:n(`agents.selected`,{count:G.length})}),G.filter(e=>G.length===1||q[e.id]).map(e=>(0,v.jsxs)(`div`,{className:`agent-delete-item`,children:[(0,v.jsx)(`strong`,{children:e.title}),(0,v.jsxs)(`small`,{children:[e.projectName,` · `,e.userName,` · `,d[e.agentId]]}),q[e.id]&&(0,v.jsx)(`p`,{className:`error`,role:`alert`,children:q[e.id]})]},e.id))]})]})}export{y as AgentManagement};
|
|
Binary file
|
|
Binary file
|