texlite 0.21.0 → 0.23.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.
Files changed (316) hide show
  1. package/DESIGN.md +174 -22
  2. package/OPERATIONS.md +23 -3
  3. package/README.md +44 -37
  4. package/README.zh-CN.md +38 -31
  5. package/addon.md +76 -0
  6. package/dist/client/assets/AdminUsers-xuVuiwoh.js +1 -0
  7. package/dist/client/assets/AdminUsers-xuVuiwoh.js.br +0 -0
  8. package/dist/client/assets/AdminUsers-xuVuiwoh.js.gz +0 -0
  9. package/dist/client/assets/{AgentIcon-dCMgWJG-.css → AgentIcon-DJGGRJnV.css} +1 -1
  10. package/dist/client/assets/AgentIcon-DJGGRJnV.css.br +0 -0
  11. package/dist/client/assets/AgentIcon-DJGGRJnV.css.gz +0 -0
  12. package/dist/client/assets/{AgentManagement-0n1UkKZ5.js → AgentManagement-D-0hrv6f.js} +1 -1
  13. package/dist/client/assets/AgentManagement-D-0hrv6f.js.br +0 -0
  14. package/dist/client/assets/AgentManagement-D-0hrv6f.js.gz +0 -0
  15. package/dist/client/assets/AgentTerminal-DZo-22RN.js +2 -0
  16. package/dist/client/assets/AgentTerminal-DZo-22RN.js.br +0 -0
  17. package/dist/client/assets/AgentTerminal-DZo-22RN.js.gz +0 -0
  18. package/dist/client/assets/AgentTerminalSurface-CcC17_CY.js +16 -0
  19. package/dist/client/assets/AgentTerminalSurface-CcC17_CY.js.br +0 -0
  20. package/dist/client/assets/AgentTerminalSurface-CcC17_CY.js.gz +0 -0
  21. package/dist/client/assets/AvatarSettingsDialog-ChKrdDqp.js +1 -0
  22. package/dist/client/assets/AvatarSettingsDialog-ChKrdDqp.js.br +0 -0
  23. package/dist/client/assets/AvatarSettingsDialog-ChKrdDqp.js.gz +0 -0
  24. package/dist/client/assets/CitationBibtexEditor-BZIU4Lif.js +1 -0
  25. package/dist/client/assets/CitationLibraryDialog-DqO9e0GV.js +3 -0
  26. package/dist/client/assets/CitationLibraryDialog-DqO9e0GV.js.br +0 -0
  27. package/dist/client/assets/CitationLibraryDialog-DqO9e0GV.js.gz +0 -0
  28. package/dist/client/assets/CitationNotesPreview-D3CjBD0p.js +1 -0
  29. package/dist/client/assets/Dashboard-BYgqCgBM.js +5 -0
  30. package/dist/client/assets/Dashboard-BYgqCgBM.js.br +0 -0
  31. package/dist/client/assets/Dashboard-BYgqCgBM.js.gz +0 -0
  32. package/dist/client/assets/GitDialog-CA68baSd.js +4 -0
  33. package/dist/client/assets/GitDialog-CA68baSd.js.br +0 -0
  34. package/dist/client/assets/GitDialog-CA68baSd.js.gz +0 -0
  35. package/dist/client/assets/GitHubAccountDialog-CnxfR0JD.js +1 -0
  36. package/dist/client/assets/GitHubAccountDialog-CnxfR0JD.js.br +0 -0
  37. package/dist/client/assets/GitHubAccountDialog-CnxfR0JD.js.gz +0 -0
  38. package/dist/client/assets/HistoryDialog-c2EEaFsl.js +8 -0
  39. package/dist/client/assets/HistoryDialog-c2EEaFsl.js.br +0 -0
  40. package/dist/client/assets/HistoryDialog-c2EEaFsl.js.gz +0 -0
  41. package/dist/client/assets/InfoPopover-BJYnFn1P.js +1 -0
  42. package/dist/client/assets/LatexEditor-vNOVTIl7.js +25 -0
  43. package/dist/client/assets/LatexEditor-vNOVTIl7.js.br +0 -0
  44. package/dist/client/assets/LatexEditor-vNOVTIl7.js.gz +0 -0
  45. package/dist/client/assets/MarkdownContent-BeKi2gI5.js +36 -0
  46. package/dist/client/assets/MarkdownContent-BeKi2gI5.js.br +0 -0
  47. package/dist/client/assets/MarkdownContent-BeKi2gI5.js.gz +0 -0
  48. package/dist/client/assets/MarkdownPreview-BJPqGTcw.js +1 -0
  49. package/dist/client/assets/MarkdownPreview-BJPqGTcw.js.br +0 -0
  50. package/dist/client/assets/MarkdownPreview-BJPqGTcw.js.gz +0 -0
  51. package/dist/client/assets/{ProjectIconPickerDialog-DAiP7wVe.js → ProjectIconPickerDialog-ChiEUQ0g.js} +1 -1
  52. package/dist/client/assets/ProjectIconPickerDialog-ChiEUQ0g.js.br +0 -0
  53. package/dist/client/assets/ProjectIconPickerDialog-ChiEUQ0g.js.gz +0 -0
  54. package/dist/client/assets/ProjectSearchDialog-DxgjbnmY.js +1 -0
  55. package/dist/client/assets/ProjectSearchDialog-DxgjbnmY.js.br +0 -0
  56. package/dist/client/assets/ProjectSearchDialog-DxgjbnmY.js.gz +0 -0
  57. package/dist/client/assets/ProjectSettings-BwQTbXhh.js +4 -0
  58. package/dist/client/assets/ProjectSettings-BwQTbXhh.js.br +0 -0
  59. package/dist/client/assets/ProjectSettings-BwQTbXhh.js.gz +0 -0
  60. package/dist/client/assets/ProjectWorkspace-C2QAb-Fc.js +25 -0
  61. package/dist/client/assets/ProjectWorkspace-C2QAb-Fc.js.br +0 -0
  62. package/dist/client/assets/ProjectWorkspace-C2QAb-Fc.js.gz +0 -0
  63. package/dist/client/assets/{QuickOpenDialog-kW-97LBY.js → QuickOpenDialog-B7NTqOpu.js} +1 -1
  64. package/dist/client/assets/QuickOpenDialog-B7NTqOpu.js.br +0 -0
  65. package/dist/client/assets/QuickOpenDialog-B7NTqOpu.js.gz +0 -0
  66. package/dist/client/assets/{ReadOnlySource-B-ZZIpJq.js → ReadOnlySource-DIalHHvP.js} +2 -2
  67. package/dist/client/assets/SelectionHistoryDialog-BhOyneNx.js +3 -0
  68. package/dist/client/assets/SelectionHistoryDialog-BhOyneNx.js.br +0 -0
  69. package/dist/client/assets/SelectionHistoryDialog-BhOyneNx.js.gz +0 -0
  70. package/dist/client/assets/SharedProjectPage-s-khOyvB.js +2 -0
  71. package/dist/client/assets/SharedProjectPage-s-khOyvB.js.br +0 -0
  72. package/dist/client/assets/SharedProjectPage-s-khOyvB.js.gz +0 -0
  73. package/dist/client/assets/{SystemMetricsDialog-Dz_zxjfR.js → SystemMetricsDialog-Bycm88U1.js} +1 -1
  74. package/dist/client/assets/SystemMetricsDialog-Bycm88U1.js.br +0 -0
  75. package/dist/client/assets/SystemMetricsDialog-Bycm88U1.js.gz +0 -0
  76. package/dist/client/assets/TagManagementDialog-DwUAA8uC.js +1 -0
  77. package/dist/client/assets/TagManagementDialog-DwUAA8uC.js.br +0 -0
  78. package/dist/client/assets/TagManagementDialog-DwUAA8uC.js.gz +0 -0
  79. package/dist/client/assets/ThemeSwitcher-RSqZi7kx.js +1 -0
  80. package/dist/client/assets/TikzGalleryDialog-Bqzl2256.css +1 -0
  81. package/dist/client/assets/TikzGalleryDialog-Bqzl2256.css.br +0 -0
  82. package/dist/client/assets/TikzGalleryDialog-Bqzl2256.css.gz +0 -0
  83. package/dist/client/assets/TikzGalleryDialog-CLAmKmS6.js +1 -0
  84. package/dist/client/assets/TikzGalleryDialog-CLAmKmS6.js.br +0 -0
  85. package/dist/client/assets/TikzGalleryDialog-CLAmKmS6.js.gz +0 -0
  86. package/dist/client/assets/WordCountDialog-ByxE-RUs.js +1 -0
  87. package/dist/client/assets/WordCountDialog-ByxE-RUs.js.br +0 -0
  88. package/dist/client/assets/WordCountDialog-ByxE-RUs.js.gz +0 -0
  89. package/dist/client/assets/{bibtexFormatterWorker-B_jvobIv.js → bibtexFormatterWorker-Bp8kjjvw.js} +14 -14
  90. package/dist/client/assets/bibtexFormatterWorker-Bp8kjjvw.js.br +0 -0
  91. package/dist/client/assets/bibtexFormatterWorker-Bp8kjjvw.js.gz +0 -0
  92. package/dist/client/assets/bibtexMetadataWorker-CQozbzep.js +2 -0
  93. package/dist/client/assets/bibtexMetadataWorker-CQozbzep.js.br +0 -0
  94. package/dist/client/assets/bibtexMetadataWorker-CQozbzep.js.gz +0 -0
  95. package/dist/client/assets/bibtexNames-CPGbBJxd.js +1 -0
  96. package/dist/client/assets/bibtexReferences-xpSF8IXH.js +1 -0
  97. package/dist/client/assets/bot-ClmnQ29j.js +1 -0
  98. package/dist/client/assets/{chktex-CCcr_9m7.js → chktex-22lKGvKa.js} +2 -2
  99. package/dist/client/assets/citationAuthors-BWHXhKvT.js +1 -0
  100. package/dist/client/assets/citationAuthors-BWHXhKvT.js.br +0 -0
  101. package/dist/client/assets/citationAuthors-BWHXhKvT.js.gz +0 -0
  102. package/dist/client/assets/citationLibrary-DxGdbZEQ.js +1 -0
  103. package/dist/client/assets/citationLibrary-DxGdbZEQ.js.br +0 -0
  104. package/dist/client/assets/citationLibrary-DxGdbZEQ.js.gz +0 -0
  105. package/dist/client/assets/dist-Dxkdrap6.js +2 -0
  106. package/dist/client/assets/dist-Dxkdrap6.js.br +0 -0
  107. package/dist/client/assets/dist-Dxkdrap6.js.gz +0 -0
  108. package/dist/client/assets/editor-CkUEg2La.js +14 -0
  109. package/dist/client/assets/editor-CkUEg2La.js.br +0 -0
  110. package/dist/client/assets/editor-CkUEg2La.js.gz +0 -0
  111. package/dist/client/assets/editor-languages-kcWr1Z3Q.js +36 -0
  112. package/dist/client/assets/editor-languages-kcWr1Z3Q.js.br +0 -0
  113. package/dist/client/assets/editor-languages-kcWr1Z3Q.js.gz +0 -0
  114. package/dist/client/assets/editorThemeExtension-BWtZV1Af.js +1 -0
  115. package/dist/client/assets/editorThemeExtension-BWtZV1Af.js.br +0 -0
  116. package/dist/client/assets/editorThemeExtension-BWtZV1Af.js.gz +0 -0
  117. package/dist/client/assets/generatedParser-CZa2vsK6.js +1 -0
  118. package/dist/client/assets/generatedParser-CZa2vsK6.js.br +0 -0
  119. package/dist/client/assets/generatedParser-CZa2vsK6.js.gz +0 -0
  120. package/dist/client/assets/git-compare-arrows-158rS_vn.js +1 -0
  121. package/dist/client/assets/i18n-Wn96VbWM.js +13 -0
  122. package/dist/client/assets/i18n-Wn96VbWM.js.br +0 -0
  123. package/dist/client/assets/i18n-Wn96VbWM.js.gz +0 -0
  124. package/dist/client/assets/index-CemLYDYL.js +2 -0
  125. package/dist/client/assets/index-CemLYDYL.js.br +0 -0
  126. package/dist/client/assets/index-CemLYDYL.js.gz +0 -0
  127. package/dist/client/assets/index-DSF5eT29.css +1 -0
  128. package/dist/client/assets/index-DSF5eT29.css.br +0 -0
  129. package/dist/client/assets/index-DSF5eT29.css.gz +0 -0
  130. package/dist/client/assets/katex-Ca9qmXPj.js +257 -0
  131. package/dist/client/assets/katex-Ca9qmXPj.js.br +0 -0
  132. package/dist/client/assets/katex-Ca9qmXPj.js.gz +0 -0
  133. package/dist/client/assets/katex.min-VLoWtPY0.js +1 -0
  134. package/dist/client/assets/{latexFormatterWorker-BIDCSZPd.js → latexFormatterWorker-BWiogBYE.js} +1 -1
  135. package/dist/client/assets/latexFormatterWorker-BWiogBYE.js.br +0 -0
  136. package/dist/client/assets/latexFormatterWorker-BWiogBYE.js.gz +0 -0
  137. package/dist/client/assets/latexScanner-D9bMX44Y.js +6 -0
  138. package/dist/client/assets/latexScanner-D9bMX44Y.js.br +0 -0
  139. package/dist/client/assets/latexScanner-D9bMX44Y.js.gz +0 -0
  140. package/dist/client/assets/palette-8_-Y5XON.js +1 -0
  141. package/dist/client/assets/relativeTime-C-GTw3lA.js +1 -0
  142. package/dist/client/assets/relativeTime-C-GTw3lA.js.br +0 -0
  143. package/dist/client/assets/relativeTime-C-GTw3lA.js.gz +0 -0
  144. package/dist/client/assets/sourceCursorStore-Dpoi7PAL.js +1 -0
  145. package/dist/client/assets/sourceCursorStore-Dpoi7PAL.js.br +0 -0
  146. package/dist/client/assets/sourceCursorStore-Dpoi7PAL.js.gz +0 -0
  147. package/dist/client/assets/{spellCheck-D-tYd_ac.js → spellCheck-kxvnxrvw.js} +1 -1
  148. package/dist/client/assets/spellCheck-kxvnxrvw.js.br +0 -0
  149. package/dist/client/assets/spellCheck-kxvnxrvw.js.gz +0 -0
  150. package/dist/client/assets/{textLanguageSupport-Kz9ESEVW.js → textLanguageSupport-Ck8lMOWz.js} +1 -1
  151. package/dist/client/assets/{textLanguages-Dac6mieP.js → textLanguages-CwWstpJ5.js} +5 -5
  152. package/dist/client/assets/textLanguages-CwWstpJ5.js.br +0 -0
  153. package/dist/client/assets/textLanguages-CwWstpJ5.js.gz +0 -0
  154. package/dist/client/assets/useDeletionTransitions-Xlq7HabP.js +1 -0
  155. package/dist/client/assets/useDeletionTransitions-Xlq7HabP.js.br +0 -0
  156. package/dist/client/assets/useDeletionTransitions-Xlq7HabP.js.gz +0 -0
  157. package/dist/client/assets/{vimSupport-DWYaSMuX.js → vimSupport-C-WiMLjc.js} +6 -6
  158. package/dist/client/assets/vimSupport-C-WiMLjc.js.br +0 -0
  159. package/dist/client/assets/{vimSupport-DWYaSMuX.js.gz → vimSupport-C-WiMLjc.js.gz} +0 -0
  160. package/dist/client/index.html +3 -3
  161. package/dist/server/agentChanges.js +149 -0
  162. package/dist/server/agents/sessions.js +1 -1
  163. package/dist/server/agents/workspaces.js +21 -28
  164. package/dist/server/app.js +15 -6
  165. package/dist/server/boundedExpiringCache.js +69 -0
  166. package/dist/server/citationFolderTransfer.js +5 -5
  167. package/dist/server/citationInput.js +1 -0
  168. package/dist/server/cli.js +12 -1
  169. package/dist/server/collaboration.js +8 -4
  170. package/dist/server/config.js +10 -0
  171. package/dist/server/db.js +23 -0
  172. package/dist/server/editHistory.js +71 -12
  173. package/dist/server/git.js +58 -7
  174. package/dist/server/history.js +58 -9
  175. package/dist/server/i18n.js +12 -0
  176. package/dist/server/locales/zh-Hant.js +6 -0
  177. package/dist/server/projectReferences.js +110 -9
  178. package/dist/server/routes/auth.js +3 -0
  179. package/dist/server/routes/citations.js +28 -61
  180. package/dist/server/routes/comments.js +8 -3
  181. package/dist/server/routes/compile.js +56 -4
  182. package/dist/server/routes/projectGit.js +10 -0
  183. package/dist/server/routes/projectHistory.js +42 -0
  184. package/dist/server/routes/system.js +1 -0
  185. package/dist/server/routes/tikzGallery.js +38 -0
  186. package/dist/server/routes/users.js +2 -2
  187. package/dist/server/tikzEditorAddon.js +115 -0
  188. package/dist/server/tikzEditorRelease.js +9 -0
  189. package/dist/server/tikzGallery.js +63 -0
  190. package/dist/shared/bibtexBraces.js +20 -0
  191. package/dist/shared/bibtexNames.js +82 -0
  192. package/dist/shared/bibtexReferences.js +52 -12
  193. package/dist/shared/bibtexText.js +175 -0
  194. package/dist/shared/gitProtocol.js +2 -0
  195. package/dist/shared/historyProtocol.js +5 -0
  196. package/dist/shared/textDiff.js +36 -1
  197. package/dist/shared/tikzStandalone.js +15 -0
  198. package/package.json +2 -1
  199. package/templates/agents/AGENTS.md +12 -0
  200. package/texlite.config.example.json +4 -0
  201. package/dist/client/assets/AdminUsers-Cpj29JD6.js +0 -1
  202. package/dist/client/assets/AdminUsers-Cpj29JD6.js.br +0 -0
  203. package/dist/client/assets/AdminUsers-Cpj29JD6.js.gz +0 -0
  204. package/dist/client/assets/AgentIcon-dCMgWJG-.css.br +0 -0
  205. package/dist/client/assets/AgentIcon-dCMgWJG-.css.gz +0 -0
  206. package/dist/client/assets/AgentManagement-0n1UkKZ5.js.br +0 -0
  207. package/dist/client/assets/AgentManagement-0n1UkKZ5.js.gz +0 -0
  208. package/dist/client/assets/AgentTerminal-BbGH5iPx.js +0 -2
  209. package/dist/client/assets/AgentTerminal-BbGH5iPx.js.br +0 -0
  210. package/dist/client/assets/AgentTerminal-BbGH5iPx.js.gz +0 -0
  211. package/dist/client/assets/AgentTerminalSurface-CIouKd-C.js +0 -16
  212. package/dist/client/assets/AgentTerminalSurface-CIouKd-C.js.br +0 -0
  213. package/dist/client/assets/AgentTerminalSurface-CIouKd-C.js.gz +0 -0
  214. package/dist/client/assets/AvatarSettingsDialog-BjTx2yjQ.js +0 -1
  215. package/dist/client/assets/AvatarSettingsDialog-BjTx2yjQ.js.br +0 -0
  216. package/dist/client/assets/AvatarSettingsDialog-BjTx2yjQ.js.gz +0 -0
  217. package/dist/client/assets/CitationBibtexEditor-B4ITqbxl.js +0 -1
  218. package/dist/client/assets/CitationLibraryDialog-DDP3gXNt.js +0 -3
  219. package/dist/client/assets/CitationLibraryDialog-DDP3gXNt.js.br +0 -0
  220. package/dist/client/assets/CitationLibraryDialog-DDP3gXNt.js.gz +0 -0
  221. package/dist/client/assets/CitationNotesPreview-BjbIDOCl.js +0 -36
  222. package/dist/client/assets/CitationNotesPreview-BjbIDOCl.js.br +0 -0
  223. package/dist/client/assets/CitationNotesPreview-BjbIDOCl.js.gz +0 -0
  224. package/dist/client/assets/Dashboard-Dc3ANXhG.js +0 -5
  225. package/dist/client/assets/Dashboard-Dc3ANXhG.js.br +0 -0
  226. package/dist/client/assets/Dashboard-Dc3ANXhG.js.gz +0 -0
  227. package/dist/client/assets/GitDialog-CzLmo9Z_.js +0 -3
  228. package/dist/client/assets/GitDialog-CzLmo9Z_.js.br +0 -0
  229. package/dist/client/assets/GitDialog-CzLmo9Z_.js.gz +0 -0
  230. package/dist/client/assets/GitHubAccountDialog-DsQgHv-Z.js +0 -1
  231. package/dist/client/assets/GitHubAccountDialog-DsQgHv-Z.js.br +0 -0
  232. package/dist/client/assets/GitHubAccountDialog-DsQgHv-Z.js.gz +0 -0
  233. package/dist/client/assets/HistoryDialog-C4zmnE1s.js +0 -8
  234. package/dist/client/assets/HistoryDialog-C4zmnE1s.js.br +0 -0
  235. package/dist/client/assets/HistoryDialog-C4zmnE1s.js.gz +0 -0
  236. package/dist/client/assets/InfoPopover-Dkz742vJ.js +0 -1
  237. package/dist/client/assets/LatexEditor-BRPiyMbH.js +0 -25
  238. package/dist/client/assets/LatexEditor-BRPiyMbH.js.br +0 -0
  239. package/dist/client/assets/LatexEditor-BRPiyMbH.js.gz +0 -0
  240. package/dist/client/assets/ProjectIconPickerDialog-DAiP7wVe.js.br +0 -0
  241. package/dist/client/assets/ProjectIconPickerDialog-DAiP7wVe.js.gz +0 -0
  242. package/dist/client/assets/ProjectSearchDialog-B5a5mHXl.js +0 -1
  243. package/dist/client/assets/ProjectSearchDialog-B5a5mHXl.js.br +0 -0
  244. package/dist/client/assets/ProjectSearchDialog-B5a5mHXl.js.gz +0 -0
  245. package/dist/client/assets/ProjectSettings-CARW1k8M.js +0 -4
  246. package/dist/client/assets/ProjectSettings-CARW1k8M.js.br +0 -0
  247. package/dist/client/assets/ProjectSettings-CARW1k8M.js.gz +0 -0
  248. package/dist/client/assets/ProjectWorkspace-BQ3QGBVy.js +0 -31
  249. package/dist/client/assets/ProjectWorkspace-BQ3QGBVy.js.br +0 -0
  250. package/dist/client/assets/ProjectWorkspace-BQ3QGBVy.js.gz +0 -0
  251. package/dist/client/assets/QuickOpenDialog-kW-97LBY.js.br +0 -0
  252. package/dist/client/assets/QuickOpenDialog-kW-97LBY.js.gz +0 -0
  253. package/dist/client/assets/SelectionHistoryDialog-CmHcjD4T.js +0 -3
  254. package/dist/client/assets/SelectionHistoryDialog-CmHcjD4T.js.br +0 -0
  255. package/dist/client/assets/SelectionHistoryDialog-CmHcjD4T.js.gz +0 -0
  256. package/dist/client/assets/SharedProjectPage-BjhT-js7.js +0 -2
  257. package/dist/client/assets/SharedProjectPage-BjhT-js7.js.br +0 -0
  258. package/dist/client/assets/SharedProjectPage-BjhT-js7.js.gz +0 -0
  259. package/dist/client/assets/SystemMetricsDialog-Dz_zxjfR.js.br +0 -0
  260. package/dist/client/assets/SystemMetricsDialog-Dz_zxjfR.js.gz +0 -0
  261. package/dist/client/assets/TagManagementDialog-BIsAi9rh.js +0 -1
  262. package/dist/client/assets/TagManagementDialog-BIsAi9rh.js.br +0 -0
  263. package/dist/client/assets/TagManagementDialog-BIsAi9rh.js.gz +0 -0
  264. package/dist/client/assets/ThemeSwitcher-dp0oKTtC.js +0 -1
  265. package/dist/client/assets/ThemeSwitcher-dp0oKTtC.js.br +0 -0
  266. package/dist/client/assets/ThemeSwitcher-dp0oKTtC.js.gz +0 -0
  267. package/dist/client/assets/WordCountDialog-CJb1b8cD.js +0 -1
  268. package/dist/client/assets/WordCountDialog-CJb1b8cD.js.br +0 -0
  269. package/dist/client/assets/WordCountDialog-CJb1b8cD.js.gz +0 -0
  270. package/dist/client/assets/bibtexFormatterWorker-B_jvobIv.js.br +0 -0
  271. package/dist/client/assets/bibtexFormatterWorker-B_jvobIv.js.gz +0 -0
  272. package/dist/client/assets/citationLibrary-BzlqZiFU.js +0 -26
  273. package/dist/client/assets/citationLibrary-BzlqZiFU.js.br +0 -0
  274. package/dist/client/assets/citationLibrary-BzlqZiFU.js.gz +0 -0
  275. package/dist/client/assets/clipboard-CslquMx4.js +0 -1
  276. package/dist/client/assets/editor-fyrvjoqA.js +0 -14
  277. package/dist/client/assets/editor-fyrvjoqA.js.br +0 -0
  278. package/dist/client/assets/editor-fyrvjoqA.js.gz +0 -0
  279. package/dist/client/assets/editor-languages-D1a-K8dK.js +0 -36
  280. package/dist/client/assets/editor-languages-D1a-K8dK.js.br +0 -0
  281. package/dist/client/assets/editor-languages-D1a-K8dK.js.gz +0 -0
  282. package/dist/client/assets/editorThemeExtension-BpJbXyCP.js +0 -1
  283. package/dist/client/assets/editorThemeExtension-BpJbXyCP.js.br +0 -0
  284. package/dist/client/assets/editorThemeExtension-BpJbXyCP.js.gz +0 -0
  285. package/dist/client/assets/eye-BnslGpqB.js +0 -1
  286. package/dist/client/assets/i18n-DNTfpttY.js +0 -13
  287. package/dist/client/assets/i18n-DNTfpttY.js.br +0 -0
  288. package/dist/client/assets/i18n-DNTfpttY.js.gz +0 -0
  289. package/dist/client/assets/index-CfSDaTd4.js +0 -2
  290. package/dist/client/assets/index-CfSDaTd4.js.br +0 -0
  291. package/dist/client/assets/index-CfSDaTd4.js.gz +0 -0
  292. package/dist/client/assets/index-PNFHDg2W.css +0 -1
  293. package/dist/client/assets/index-PNFHDg2W.css.br +0 -0
  294. package/dist/client/assets/index-PNFHDg2W.css.gz +0 -0
  295. package/dist/client/assets/katex-CBRBI6nR.js +0 -257
  296. package/dist/client/assets/katex-CBRBI6nR.js.br +0 -0
  297. package/dist/client/assets/katex-CBRBI6nR.js.gz +0 -0
  298. package/dist/client/assets/latexFormatterWorker-BIDCSZPd.js.br +0 -0
  299. package/dist/client/assets/latexFormatterWorker-BIDCSZPd.js.gz +0 -0
  300. package/dist/client/assets/relativeTime-DKEihsTa.js +0 -1
  301. package/dist/client/assets/relativeTime-DKEihsTa.js.br +0 -0
  302. package/dist/client/assets/relativeTime-DKEihsTa.js.gz +0 -0
  303. package/dist/client/assets/sourceCursorStore-QnrFw3Ft.js +0 -1
  304. package/dist/client/assets/sourceCursorStore-QnrFw3Ft.js.br +0 -0
  305. package/dist/client/assets/sourceCursorStore-QnrFw3Ft.js.gz +0 -0
  306. package/dist/client/assets/spellCheck-D-tYd_ac.js.br +0 -0
  307. package/dist/client/assets/spellCheck-D-tYd_ac.js.gz +0 -0
  308. package/dist/client/assets/textLanguages-Dac6mieP.js.br +0 -0
  309. package/dist/client/assets/textLanguages-Dac6mieP.js.gz +0 -0
  310. package/dist/client/assets/useDeletionTransitions-TAZINdHX.js +0 -1
  311. package/dist/client/assets/useDeletionTransitions-TAZINdHX.js.br +0 -0
  312. package/dist/client/assets/useDeletionTransitions-TAZINdHX.js.gz +0 -0
  313. package/dist/client/assets/vimSupport-DWYaSMuX.js.br +0 -0
  314. /package/dist/client/assets/{AgentIcon-DsoMeMA8.js → AgentIcon-qmglBc3M.js} +0 -0
  315. /package/dist/client/assets/{AgentIcon-DsoMeMA8.js.br → AgentIcon-qmglBc3M.js.br} +0 -0
  316. /package/dist/client/assets/{AgentIcon-DsoMeMA8.js.gz → AgentIcon-qmglBc3M.js.gz} +0 -0
package/DESIGN.md CHANGED
@@ -105,6 +105,22 @@ reference preserves the author's original formatting; importing inserts the
105
105
  selected entry at the current editor cursor and requires project write access.
106
106
  Each user owns a private library. Citation entries and color tags are scoped to
107
107
  the owning user; other users cannot list, search, import, edit, or delete them.
108
+ The browser's Lezer BibTeX parser derives the display venue (biblatex
109
+ `journaltitle`, `journal` or `booktitle`) together with title, authors and year
110
+ (`year`, or the year of biblatex's `date`); the client submits it on save.
111
+ Values have `@string` macros defined earlier in the same source expanded, and
112
+ a `.bib` import fills a `crossref` child's missing fields from a parent in the
113
+ same file; the saved BibTeX stays as written. Schema migration 21 stores the
114
+ venue, so citation cards read the field instead of reparsing BibTeX on every
115
+ render. Rows created before that migration, or saved before `journaltitle` and
116
+ `date` were read, keep a null venue or year until they are edited or saved
117
+ again; their cards derive both from the stored BibTeX (memoized per entry) so
118
+ they do not disappear, but library search matches the stored columns only.
119
+ Folder import re-parses every entry, so imported rows always carry them.
120
+ Stored title, author and venue columns are TeX as written. Cards and hover
121
+ previews show them through `src/shared/bibtexText.ts`, which drops protective
122
+ braces and converts common accents, special letters and TeX punctuation while
123
+ keeping math verbatim; DOI and URL are shown unchanged.
108
124
  The homepage keeps Projects as the default view and exposes the
109
125
  citation library as a separate management page beside the other management
110
126
  controls; the project workspace keeps a smaller `.bib` import dialog for
@@ -130,14 +146,25 @@ oversized folders are preserved and may shrink, but cannot gain new entries.
130
146
  All references and Unfiled are views, not folders, and have no 500-entry cap;
131
147
  the private library's total size is not limited by folder capacity.
132
148
  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
149
+ workflows use a separate controller: My library entries only offer Import into
150
+ the current file, and current-file entries only offer Save into the library. These are compact icon-only actions
135
151
  with accessible names, action/state tooltips and the shared saved-check feedback.
136
152
  Tag filters combine with folders, search and pagination, but project dialogs do
137
153
  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.
154
+ labelled Citation; the homepage keeps Citation library. Saving from the current
155
+ file only adds entries whose key is not in the library yet, into a chosen
156
+ destination folder; an entry already there shows as saved and is never changed
157
+ from the project dialog. A bounded, debounced key lookup returns only
158
+ key/id/revision metadata, never library text.
159
+ The project dialog opens a `.bib` file on its Current file tab, and any other
160
+ file on My library. It reads the current file once per opening: edits made
161
+ while it stays open are neither re-parsed nor re-compared, and reopening shows
162
+ them. My library is paginated by the server; Current file pages the parsed
163
+ entries in the browser (60 per page) with a local search and a library-status
164
+ filter, while the key lookup still covers the whole file so the counts are
165
+ exact. The folder sidebar filters My library only and is hidden on Current
166
+ file, whose save destination is a separate selector; entering Current file
167
+ without a destination offers the folder being browsed.
141
168
  Equality ignores platform line endings and outer whitespace, not differences
142
169
  inside an entry. Unchanged entries cannot be updated; changed ones still need
143
170
  the last-read revision. Source/file switches abort stale comparisons and
@@ -206,14 +233,21 @@ HTTP/LAN browsers without usable
206
233
  Clipboard API access. Save/import remain direct actions in project dialogs.
207
234
  Library rows use compact spacing and a single-line title with the full title
208
235
  available on hover.
209
- Library entries are checked in the browser with the `bibtex-tidy` JavaScript
210
- parser and formatter before a mutation request is sent. Citation keys are unique
236
+ Library entries are checked in the browser before a mutation request is sent,
237
+ using the same Lezer BibTeX grammar as the editor (`bibtex/entries.ts`). That
238
+ grammar alone decides what an entry is, where it begins and ends, and whether
239
+ the text is valid: a syntax error anywhere makes the whole document invalid, so
240
+ the library never accepts what the editor underlines, and never silently skips
241
+ a damaged entry. A single-entry write must be exactly one citeable entry with
242
+ nothing before or after it. `bibtex-tidy` only formats, and is bundled with the
243
+ formatter worker alone. Citation keys are unique
211
244
  per user without regard to letter case. Creating an existing key is rejected;
212
245
  updating an entry or its tags requires the revision last read by the client, so
213
246
  concurrent browser sessions report a conflict instead of silently overwriting
214
- newer content. Entry-text and tag-only mutations use separate endpoints, while
215
- the explicit save-from-`.bib` action can replace the stored entry without
216
- discarding its existing tags. The server retains only transport-level size and
247
+ newer content. Entry-text and tag-only mutations use separate endpoints.
248
+ `POST /api/citations` only creates entries, including saves from a project's
249
+ `.bib`; it never replaces an existing key, and the key lookup reports only
250
+ which keys exist. The server retains only transport-level size and
217
251
  field-shape limits; it does not reparse BibTeX syntax.
218
252
 
219
253
  TexLite is intentionally a single-instance application. The collaboration
@@ -905,9 +939,14 @@ payloads at once. This budget never shares or
905
939
  reduces the 128 MB recovery-snapshot budget. A too-large individual edit burst
906
940
  is omitted, and retention removes the oldest records; both deliberately create
907
941
  a visible history boundary rather than presenting an unsafe attribution. When selection history is viewed,
908
- adjacent records affecting the selection are consolidated into a bounded
909
- two-minute editing window. Its raw per-user records remain separate, while the
910
- timeline lists every contributor to that window. Each entry maps the selected
942
+ adjacent records affecting the selection are consolidated into one editing
943
+ session while no pause between them exceeds five minutes, up to a 30-minute
944
+ span; a longer continuous session is split so earlier states stay visible.
945
+ Coding-agent edits and direct edits never share a session entry, so an agent's
946
+ change can be compared on its own. When later edits only moved the selection
947
+ boundary and are folded into the state they left unchanged, the entry keeps the
948
+ agent flag of the older change that wrote the text. Raw per-user records remain separate, while
949
+ the timeline lists every contributor to that session. Each entry maps the selected
911
950
  passage backward through the durable edit chain and presents the resulting
912
951
  selected content, a semantic character-level comparison with the preceding
913
952
  older state, contributors, and latest edit time in reverse chronological order.
@@ -1174,6 +1213,59 @@ prefix coverage across scrolls. Pending scans are cancelled on disable/unmount,
1174
1213
  and their results apply only to the same immutable document. Ctrl/Cmd-click
1175
1214
  revalidates retained references against the current source when a scan is
1176
1215
  pending, including edits to later lines of multiline citation arguments.
1216
+ Hovering a citation key after a short stationary delay can preview the
1217
+ resolved BibTeX entry's key, type, title, authors, year, venue, DOI/URL and
1218
+ source location. Author lists, here and on citation library cards, follow
1219
+ biblatex's default truncation (`maxnames=3`, `minnames=1`): longer lists, and
1220
+ lists ending in `and others`, show the first author followed by "et al." and,
1221
+ when known, the author count (`citationAuthors.ts`). `src/shared/bibtexNames.ts`
1222
+ splits names at brace-depth-0 `and` on the TeX source; each shown name is then
1223
+ converted to readable text.
1224
+ The per-user, per-project editor preference defaults on.
1225
+ The workspace editor renders all CodeMirror tooltips (hover previews,
1226
+ completion, diagnostics) in a zero-size fixed layer in `<body>` instead of the
1227
+ isolated editor host, so a neighbouring PDF panel cannot cover a preview near
1228
+ the editor's right edge. The layer copies the editor font and sits at z-index
1229
+ 85: above workspace panels, below menus, drawers and dialogs, preserving why
1230
+ `.editor-host` is isolated. Editors inside dialogs keep their tooltips local.
1231
+ Obsolete requests are aborted when their tooltip closes. The server resolves
1232
+ only the main-document-aware target and reuses a metadata-keyed source snapshot
1233
+ across keys, so a project's LaTeX sources and directives are not re-read for
1234
+ every lookup. The snapshot cache is bounded by project count and bytes, and an
1235
+ unref'd timer aimed at the earliest expiry frees each entry when its 15-second
1236
+ lifetime ends, so an idle project's sources do not stay resident until another
1237
+ project displaces them. Each `.bib` file gets a separate key -> line/column
1238
+ index, not its content, reused while the file's size and modification time are
1239
+ unchanged, so an unchanged bibliography is neither re-read nor re-scanned on
1240
+ every hover; it is bounded by file count and bytes and freed after five minutes
1241
+ without use. Both caches share `boundedExpiringCache.ts`. The target also
1242
+ carries a `revision` (size and modification time) of the file that defines it,
1243
+ omitted when that metadata is unknown so nothing derived from it is reused. The browser then fetches the
1244
+ target `.bib` file and parses it with the editor's Lezer BibTeX grammar in a
1245
+ dedicated, lazily created metadata worker, caching the parsed entry map per
1246
+ project file for as long as the server reports the same revision. The bounded
1247
+ cache is shared by the whole page, so remounting the editor for another file or
1248
+ reconfiguring it after a preference change keeps it. Concurrent hovers share
1249
+ one fetch-and-parse per file revision; closing a tooltip only stops waiting, so
1250
+ a load that finishes after its hover moved on still fills the cache, and only
1251
+ the newest revision started for a path may do so. A shared download still
1252
+ cannot hang: it is aborted after 30 seconds, or 10 seconds after its last
1253
+ waiting hover closed unless another hover joins first. Parsing is not aborted;
1254
+ the metadata worker receives one request at a time and times out each parse
1255
+ after 30 seconds of its own work, so a huge file that times out fails alone and
1256
+ queued parses continue on a fresh worker. When the file cannot be loaded or
1257
+ parsed the hover still shows the target's location with a short notice, and a
1258
+ file that parses without the entry (for example one the editor reads as a
1259
+ syntax error) is reported as unreadable rather than unavailable. Hover never changes
1260
+ the source or opens the entry, so Ctrl/Cmd-click remains navigation.
1261
+
1262
+ Freshness comes from the server, not from a timer. The resolve and file
1263
+ requests are both consistent reads that flush live Yjs edits to disk first, and
1264
+ every hover re-resolves its target, so a "not found" answer is never cached and
1265
+ an entry added or edited moments ago is visible on the next hover. Only the
1266
+ fetch-and-parse of an unchanged `.bib` file is reused; a changed revision, a
1267
+ missing revision, or a failed load is never cached and simply refetches.
1268
+
1177
1269
  Automatic pairing applies its existing line-local insertion predicates before
1178
1270
  materializing a whole-document string. Only actual candidates need the full
1179
1271
  literal-state and matching-end checks; ordinary input and skipped non-candidate
@@ -1434,11 +1526,39 @@ Invalid snapshot changed-path metadata is reported as an error rather than an
1434
1526
  empty file list. File-backed root validation and icon lookup likewise preserve
1435
1527
  normal not-found results while allowing permission, I/O, and malformed generated
1436
1528
  resource errors to reach the server's error handler and logs.
1437
- Autosaves across authors are coalesced within a fixed two-minute project window.
1529
+ Autosaves across authors are coalesced within a fixed two-minute project window,
1530
+ but only with autosaves of the same kind: agent and human changes never share a
1531
+ snapshot, so the snapshot before an agent started remains a separate restore
1532
+ point. A coding agent's file writes are observed by separate source polls; one
1533
+ user's consecutive agent writes share a snapshot within the same window.
1438
1534
  A mixed-author snapshot has no single author attribution; selection edit history
1439
- retains the individual contributions independently. File
1535
+ retains the individual contributions independently.
1536
+ Schema migration 22 adds a `has_agent` flag to snapshots and edit segments.
1537
+ Coding agents are not told apart: the user who ran the task stays the author,
1538
+ and the interface adds "Coding Agent" after them ("Alice, Coding Agent"; a
1539
+ coalesced autosave without one author reads "Multiple authors, Coding Agent").
1540
+ Agent text enters the live room with an `agent` marker on its external origin;
1541
+ its edit segments are flagged and never merged with the same user's direct
1542
+ edits, so the segment flag is exact. A snapshot is flagged when changes it
1543
+ holds came from an agent: the autosave that persists agent text inherits the
1544
+ flag from its segments, and agent file writes and task recovery pass it
1545
+ directly. Because coalescing never crosses the flag, a flagged snapshot holds
1546
+ agent changes; it can still include human text the agent sync merged. Rows
1547
+ written before the migration cannot be classified and stay unflagged. File
1440
1548
  contents are complete SHA-256-addressed objects; unchanged files are reused
1441
- across manifests. By default, ordinary version count is unlimited (`history.maxVersions: 0`),
1549
+ across manifests. Under the storage budget nothing is removed. Over it,
1550
+ retention first thins older history so the budget covers a longer period:
1551
+ every version from the last 24 hours is kept, then the newest version of each
1552
+ server-local hour for the last week, then the newest of each server-local day;
1553
+ the latest version represents its own hour or day. Initial, labeled, restore
1554
+ and pre-restore checkpoint versions are never thinned. Only if the history is
1555
+ still over the budget are the oldest remaining versions removed. The
1556
+ snapshot timeline groups versions under local-day headers and folds runs of
1557
+ three or more plain automatic saves (no name, no agent changes) into one
1558
+ expandable row. Selecting a snapshot, or a fresh list load, opens the row that
1559
+ holds the selection; later list updates leave a row the user collapsed alone,
1560
+ and a row stays open while saves join either end.
1561
+ By default, ordinary version count is unlimited (`history.maxVersions: 0`),
1442
1562
  and retention is primarily governed by the soft storage limit (default 128 MiB of deduplicated
1443
1563
  objects plus snapshot row text and baseline manifests per project). This includes
1444
1564
  metadata for settings-only snapshots even when all file objects are reused.
@@ -1475,12 +1595,14 @@ account menu and encrypted in SQLite; it is never placed in a remote URL or
1475
1595
  command-line argument. A project's current owner supplies the credential for
1476
1596
  creating its GitHub repository and pushing. The remote URL and repository
1477
1597
  metadata remain project-specific. The local repository lives in the project
1478
- source directory, with temporary identity:
1479
-
1480
- ~~~text
1481
- user.name = project owner's username
1482
- user.email = <username>@texlite.com
1483
- ~~~
1598
+ source directory. The same account dialog also stores an optional Git author
1599
+ name and email (schema migration 20). Accounts without saved values default to
1600
+ the TexLite username and `<username>@texlite.com`; the owner can change both.
1601
+ TexLite resolves the project owner's effective identity when committing and
1602
+ injects it with per-command `-c user.name` / `-c user.email` overrides. The
1603
+ values are not written to the repository or the host's Git configuration.
1604
+ GitHub attributes a commit only when the configured email belongs to the
1605
+ GitHub account.
1484
1606
 
1485
1607
  For a fine-grained GitHub token in a trusted deployment, grant repository
1486
1608
  Administration and Contents read/write permissions. “All repositories” is the
@@ -1720,6 +1842,31 @@ save the agent version under `.texlite-agent-conflicts/<task-id>/`, then stop th
1720
1842
  task with a visible warning. Symlinks and unreadable files stop synchronization
1721
1843
  instead of being followed. Polling ends with execution, not browser attachment.
1722
1844
 
1845
+ A user reviews their own coding-agent changes manually. `GET
1846
+ /api/projects/:id/agent-changes` returns only the caller's flagged edit
1847
+ segments, mapped forward through the file's edit chain to the current source
1848
+ (`src/server/agentChanges.ts`). The chain already holds each replacement's
1849
+ complete text, so nothing new is stored: a later edit that replaces agent text
1850
+ drops it from the range, a chain gap (an unrecorded replacement, a restore, or
1851
+ retention) drops everything before it, and a chain that does not end at the
1852
+ current source yields nothing rather than misplaced ranges. Replacements from
1853
+ one write within 80 characters, and not separated by a blank line, are one
1854
+ change; each comes with its affected lines before and after the write when the
1855
+ agent's text still stands as written. The agent panel shows a review bar above
1856
+ the terminal with previous/next across files, "New content" and "Diff" tabs
1857
+ (the affected lines with the agent's text marked, and a line diff; Diff is the
1858
+ default and the chosen tab stays while moving between changes), "Mark
1859
+ reviewed" and "Mark all reviewed"; previous/next scrolls the editor without
1860
+ taking keyboard focus, and "Open in editor" moves focus there. Where the agent
1861
+ panel is available, a small agent button after each highlighted change opens
1862
+ the panel (if needed) and selects that change in the review without moving the
1863
+ editor. The editor highlights
1864
+ unreviewed agent text only on the exact source revision the ranges were
1865
+ computed for, and otherwise asks for a fresh result a bounded number of times.
1866
+ Which changes were reviewed is kept per user and project in browser storage,
1867
+ pruned to changes that still exist; the list refreshes on task events and every
1868
+ few seconds while one of the user's tasks runs. Reviewing never changes source.
1869
+
1723
1870
  Task context JSON and a compile log are exposed through `TEXLITE_PROJECT_CONTEXT`
1724
1871
  and `TEXLITE_COMPILE_LOG`; compile API completion refreshes this context. A CLI
1725
1872
  does not become sandboxed by running in a project, nor does this watcher impose
@@ -1751,6 +1898,11 @@ and full transcripts are not persisted by TexLite. Native CLI history can still
1751
1898
  exist in task-local or shared host state. Raw terminal replay is a bounded recent stream, not a
1752
1899
  complete saved terminal screen; very long full-screen sessions may need a redraw.
1753
1900
 
1901
+ xterm clears its selection on input, and a CLI with mouse reporting receives
1902
+ clicks and pointer movement as input. While text is selected, the surface
1903
+ withholds right clicks and pointer movement from xterm, and a right click opens
1904
+ TexLite's own Copy menu because the browser's menu does not reliably offer Copy.
1905
+
1754
1906
  Terminal appearance is separate from editor appearance. Its font, size and theme
1755
1907
  are browser-local preferences shared across projects and scoped to the
1756
1908
  deployment base path, without user/database or CLI configuration changes. The
package/OPERATIONS.md CHANGED
@@ -233,14 +233,15 @@ preferred.
233
233
  | --- | --- | --- |
234
234
  | `siteName` | `TexLite` | Site title. |
235
235
  | `adminEmail` | empty | Optional administrator contact address. |
236
- | `server.host` / `server.port` | `127.0.0.1` / `3000` | Keep localhost unless the deployment is separately secured. |
236
+ | `tikzGallery.enabled` / `tikzGallery.path` | `false` / `addon/texlite-tikz` | Optional figure gallery. A relative path is resolved from the configuration file. |
237
+ | `server.host` / `server.port` | `127.0.0.1` / `3000` | Use `0.0.0.0` to serve a trusted local network; keep localhost behind a tunnel or reverse proxy. |
237
238
  | `server.basePath` | `/` | Public URL mount point, such as `/texlite` or `/tools/texlite`. |
238
239
  | `storage.dataDir` | XDG data directory | Stores all persistent project data. |
239
240
  | `clientDir` | Installed package's `dist/client` | Normally changed only for development or a custom deployment. |
240
241
  | `sessionDays` | `14` | Login-session lifetime. |
241
242
  | `uploads.maxFileSizeMB` | `50` MB | Limit for uploads, ZIP entries, and attachments. |
242
243
  | `pdf.loadingStrategy` / `pdf.rangeThresholdMB` | `auto` / `2` MB | Uses full transfer through the threshold and allows PDF.js byte-range requests above it. Explicitly configured thresholds are preserved. |
243
- | `history.maxVersions` / `history.maxStorageMB` | `0` (unlimited) / `128` MiB | Per-project ordinary-version count (`0` = unlimited) and soft limit for deduplicated files plus snapshot metadata. Protected snapshots may exceed the limit; shared SQLite overhead is excluded. |
244
+ | `history.maxVersions` / `history.maxStorageMB` | `0` (unlimited) / `128` MiB | Per-project ordinary-version count (`0` = unlimited) and soft limit for deduplicated files plus snapshot metadata. Over the storage limit, older history is first thinned to one version per hour after a day and one per day after a week (named, restore and checkpoint snapshots are kept); only then are the oldest versions removed. Protected snapshots may exceed the limit; shared SQLite overhead is excluded. |
244
245
  | `editHistory.maxStorageMB` / `editHistory.maxSegments` | `64` MiB / `20000` | Independent per-project payload and segment-count caps for author-attributed selection edits. Retains the newest records within both limits and never consumes snapshot storage. Both settings are optional; existing explicit limits are preserved. |
245
246
  | `latex.latexmk` | `latexmk` | Host command. |
246
247
  | `latex.defaultEngine` | `xelatex` | Must appear in the allowed list. |
@@ -444,7 +445,8 @@ deletion) ends execution and synchronizes its last writes first.
444
445
 
445
446
  Task-specific CLI state stays under `dataDir/agent-tasks/<task-id>/state/`.
446
447
  `TEXLITE_PROJECT_CONTEXT` names a JSON file containing the source directory,
447
- configured main file, output directory and last compile result.
448
+ configured main file, output directory, last compile result and, when the TikZ
449
+ gallery add-on is enabled and ships one, the path of its `TIKZ.md` guide.
448
450
  `TEXLITE_COMPILE_LOG` names its log file; it is refreshed after compilation through
449
451
  TexLite. Ask the agent to read these paths when diagnosing a compile failure.
450
452
  There is no separate source copy or review/apply step.
@@ -588,6 +590,24 @@ renderer is bundled and loaded only when a terminal is opened. Linux PTY I/O and
588
590
  termination are covered by a local, deterministic test agent without any model
589
591
  calls; platform/native-agent login behavior should also be checked when deploying.
590
592
 
593
+ ### Copying terminal text
594
+
595
+ Drag across the text, right-click the selection and choose **Copy**. If dragging
596
+ selects nothing because the CLI captures the mouse, hold `Shift` while dragging
597
+ and release it before right-clicking. On macOS that override is not available,
598
+ so text in such a CLI cannot be selected this way.
599
+
600
+ `Ctrl+C` is not a copy shortcut here: it goes to the CLI, normally as an
601
+ interrupt. While text is selected, right clicks and pointer movement are not
602
+ reported to the CLI; a left click clears the selection and restores reporting.
603
+ Text that a CLI selects and copies on its own through OSC 52 does not reach the
604
+ system clipboard.
605
+
606
+ ## TikZ gallery add-on
607
+
608
+ The optional TikZ gallery is a beta feature. See [addon.md](addon.md) for
609
+ installation, configuration and use.
610
+
591
611
  ## Backup and security
592
612
 
593
613
  Back up the entire configured data directory, including `texlite.db`, its WAL
package/README.md CHANGED
@@ -60,31 +60,6 @@ texlite logs
60
60
  `start`, `stop`, `restart`, `status`, and `logs` use the PM2 runtime bundled
61
61
  with the npm package. Run `texlite help` for the complete command list.
62
62
 
63
- <details>
64
- <summary>How to access TexLite publicly</summary>
65
-
66
- Keep TexLite bound to `127.0.0.1` and use
67
- [TexLite Share](https://share.zhongpu.info/) when you need convenient,
68
- HTTPS-protected public access. TexLite Share is currently hosted in Hong Kong,
69
- so access from mainland China or regions outside Southeast Asia may be slower.
70
- With TexLite running locally on its default port, install and launch the tunnel
71
- client with:
72
-
73
- ```bash
74
- curl -fsSL https://raw.githubusercontent.com/ChenZhongPu/TexLite-Share/main/install-client.sh | bash
75
- ~/.local/bin/texlite-tunnel-client --server-url https://share.zhongpu.info
76
- ```
77
-
78
- For a non-default local port, specify the address explicitly:
79
-
80
- ```bash
81
- ~/.local/bin/texlite-tunnel-client \
82
- --server-url https://share.zhongpu.info \
83
- --local-addr 127.0.0.1:8080
84
- ```
85
-
86
- </details>
87
-
88
63
  ## A practical distinction from Overleaf
89
64
 
90
65
  [Overleaf](https://www.overleaf.com/about/features-overview) is a strong choice
@@ -161,23 +136,55 @@ for its user-facing configuration and operations guide.
161
136
  | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
162
137
  | Installation, configuration paths, effective defaults, environment overrides, service management, backups, and security boundaries | [Operations guide](OPERATIONS.md) |
163
138
  | Collaboration, source persistence, compilation isolation, history, and design trade-offs | [Design](DESIGN.md) |
139
+ | TikZ gallery add-on (beta) | [TikZ gallery add-on](addon.md) |
164
140
  | Testing an npm package before publication | [NPM testing guide](NPM_TESTING.md) |
165
141
  | Complete configuration starting point | [texlite.config.example.json](texlite.config.example.json) |
166
142
 
167
143
  ## Scope and security
168
144
 
169
- TexLite is a single-host application for trusted users. It is not a compiler
170
- sandbox: LaTeX and an enabled project `latexmkrc` can execute powerful local
171
- behaviour. Do not expose its service port directly.
172
-
173
- [TexLite Share](https://share.zhongpu.info/) provides the simplest
174
- TexLite-specific sharing path. Depending on the deployment environment, common
175
- alternatives include [Tailscale Serve](https://tailscale.com/docs/reference/tailscale-cli/serve)
176
- for a private tailnet, [Cloudflare Tunnel](https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/)
177
- for a managed public endpoint, and [frp](https://github.com/fatedier/frp) for a
178
- self-managed reverse tunnel. Whichever access layer is used, retain TexLite's
179
- authentication, enable HTTPS, restrict the audience, and remember that LaTeX
180
- compilation is not an untrusted-code sandbox.
145
+ TexLite is a single-host application for a small, trusted team. Accounts are
146
+ created by an administrator, and project access is enforced by the server. It
147
+ is not a compiler sandbox: LaTeX and an enabled project `latexmkrc` can run
148
+ powerful commands on the host, so only give accounts to people you trust.
149
+
150
+ **Within a local network.** TexLite listens on `127.0.0.1` by default, so only
151
+ the host itself can open it. To let colleagues on the same lab or office
152
+ network use it, set `server.host` to `0.0.0.0` in `texlite.config.json` (or
153
+ set `TEXLITE_HOST=0.0.0.0`) and run `texlite restart`. Others can then open
154
+ `http://<host-ip>:3000`; allow the port in the host firewall if needed.
155
+ `texlite config` prints the configuration file in use.
156
+
157
+ **Outside the local network.** Use a tunnel or a private network instead of
158
+ forwarding the port on your router. TexLite keeps listening on `127.0.0.1`, and
159
+ its own login still protects every project.
160
+
161
+ <details>
162
+ <summary><b>TexLite Share</b>: the simplest HTTPS link for TexLite</summary>
163
+
164
+ [TexLite Share](https://share.zhongpu.info/) is currently hosted in Hong Kong,
165
+ so access from mainland China or regions outside Southeast Asia may be slower.
166
+ With TexLite running locally on its default port, install and launch the tunnel
167
+ client:
168
+
169
+ ```bash
170
+ curl -fsSL https://raw.githubusercontent.com/ChenZhongPu/TexLite-Share/main/install-client.sh | bash
171
+ ~/.local/bin/texlite-tunnel-client --server-url https://share.zhongpu.info
172
+ ```
173
+
174
+ For a non-default local port, specify the address explicitly:
175
+
176
+ ```bash
177
+ ~/.local/bin/texlite-tunnel-client \
178
+ --server-url https://share.zhongpu.info \
179
+ --local-addr 127.0.0.1:8080
180
+ ```
181
+
182
+ </details>
183
+
184
+ Other common options include
185
+ [Tailscale Serve](https://tailscale.com/docs/reference/tailscale-cli/serve),
186
+ [Cloudflare Tunnel](https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/),
187
+ and [frp](https://github.com/fatedier/frp).
181
188
 
182
189
  ## License
183
190
 
package/README.zh-CN.md CHANGED
@@ -58,28 +58,6 @@ texlite logs
58
58
  `restart`、`status`、`logs` 使用 npm 包内置的 PM2 运行时;完整命令请执行
59
59
  `texlite help`。
60
60
 
61
- <details>
62
- <summary>如何公开访问 TexLite</summary>
63
-
64
- 建议让 TexLite 继续监听 `127.0.0.1`。如果需要方便、安全地公开访问,请使用
65
- [TexLite Share](https://share.zhongpu.info/)。TexLite Share 目前部署在香港,来自中国大陆或
66
- 东南亚以外地区的访问可能较慢。确保 TexLite 已在默认端口启动,然后安装并运行隧道客户端:
67
-
68
- ```bash
69
- curl -fsSL https://raw.githubusercontent.com/ChenZhongPu/TexLite-Share/main/install-client.sh | bash
70
- ~/.local/bin/texlite-tunnel-client --server-url https://share.zhongpu.info
71
- ```
72
-
73
- 如果 TexLite 使用非默认端口,请明确指定本地地址:
74
-
75
- ```bash
76
- ~/.local/bin/texlite-tunnel-client \
77
- --server-url https://share.zhongpu.info \
78
- --local-addr 127.0.0.1:8080
79
- ```
80
-
81
- </details>
82
-
83
61
  ## 与 Overleaf 的实际区别
84
62
 
85
63
  [Overleaf](https://www.overleaf.com/about/features-overview) 在团队需要其托管产品或更完整生态时
@@ -144,21 +122,50 @@ Docker 版的用户配置和日常运维请参见
144
122
  | -------------------------------------------------------------- | ---------------------------------------------------------- |
145
123
  | 安装、配置路径、生效默认值、环境变量、服务管理、备份与安全边界 | [运维指南(英文)](OPERATIONS.md) |
146
124
  | 协作、源码持久化、编译隔离、历史版本和设计权衡 | [设计文档(英文)](DESIGN.md) |
125
+ | TikZ 图库扩展(Beta) | [TikZ 图库扩展(英文)](addon.md) |
147
126
  | 发布前测试 npm 包 | [NPM 测试指南(英文)](NPM_TESTING.md) |
148
127
  | 完整配置起点 | [texlite.config.example.json](texlite.config.example.json) |
149
128
 
150
129
  ## 范围与安全
151
130
 
152
- TexLite 是一个面向可信用户的单宿主机应用,并非 LaTeX 编译沙箱:LaTeX 本身以及启用的
153
- 项目 `latexmkrc` 都可能执行强大的本机行为。
154
- 不要直接暴露其服务端口。
131
+ TexLite 是面向小型可信团队的单宿主机应用。账号由管理员创建,项目权限由服务端校验。
132
+ 它不是编译沙箱:LaTeX 本身以及启用的项目 `latexmkrc` 都可以在宿主机上执行强大的命令,
133
+ 因此只应给可信的人开设账号。
134
+
135
+ **局域网内使用。** TexLite 默认监听 `127.0.0.1`,只有本机可以访问。若要让同一实验室或
136
+ 办公网络中的同事使用,在 `texlite.config.json` 中把 `server.host` 设为 `0.0.0.0`
137
+ (或设置环境变量 `TEXLITE_HOST=0.0.0.0`),然后运行 `texlite restart`。其他人即可通过
138
+ `http://<宿主机 IP>:3000` 访问;如有需要,请在宿主机防火墙中放行该端口。
139
+ `texlite config` 会显示当前使用的配置文件。
140
+
141
+ **局域网外访问。** 请使用隧道或私有网络,不要在路由器上直接做端口转发。此时 TexLite
142
+ 继续监听 `127.0.0.1`,所有项目仍由 TexLite 自身的登录保护。
143
+
144
+ <details>
145
+ <summary><b>TexLite Share</b>:为 TexLite 提供最简单的 HTTPS 链接</summary>
146
+
147
+ [TexLite Share](https://share.zhongpu.info/) 目前部署在香港,来自中国大陆或东南亚以外
148
+ 地区的访问可能较慢。确保 TexLite 已在默认端口启动,然后安装并运行隧道客户端:
149
+
150
+ ```bash
151
+ curl -fsSL https://raw.githubusercontent.com/ChenZhongPu/TexLite-Share/main/install-client.sh | bash
152
+ ~/.local/bin/texlite-tunnel-client --server-url https://share.zhongpu.info
153
+ ```
154
+
155
+ 如果 TexLite 使用非默认端口,请明确指定本地地址:
156
+
157
+ ```bash
158
+ ~/.local/bin/texlite-tunnel-client \
159
+ --server-url https://share.zhongpu.info \
160
+ --local-addr 127.0.0.1:8080
161
+ ```
162
+
163
+ </details>
155
164
 
156
- [TexLite Share](https://share.zhongpu.info/) 是最简单、专门面向 TexLite 的分享方式。
157
- 根据部署环境,也可以使用 [Tailscale Serve](https://tailscale.com/docs/reference/tailscale-cli/serve)
158
- 构建私有 Tailnet,通过 [Cloudflare Tunnel](https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/)
159
- 提供托管的公网入口,或使用 [frp](https://github.com/fatedier/frp) 自行维护反向隧道。
160
- 无论采用哪一种访问层,都应保留 TexLite 登录认证、启用 HTTPS、限制访问范围,并注意
161
- LaTeX 编译环境并不是面向不可信代码的沙箱。
165
+ 其他常见选择包括
166
+ [Tailscale Serve](https://tailscale.com/docs/reference/tailscale-cli/serve)、
167
+ [Cloudflare Tunnel](https://developers.cloudflare.com/cloudflare-one/networks/connectors/cloudflare-tunnel/)
168
+ 和 [frp](https://github.com/fatedier/frp)。
162
169
 
163
170
  ## 许可证
164
171
 
package/addon.md ADDED
@@ -0,0 +1,76 @@
1
+ # TikZ gallery add-on
2
+
3
+ > **Beta.** The TikZ gallery is a beta feature. Its behavior, configuration and
4
+ > figure library may change between releases.
5
+
6
+ The gallery lets you browse editable TikZ and pgfplots figures and copy them into
7
+ a project. The figures live in a separate repository,
8
+ [texlite-tikz](https://github.com/ChenZhongPu/texlite-tikz), and are not shipped
9
+ with TexLite. The feature is off by default. See that repository for its figure
10
+ licenses and for how to add figures.
11
+
12
+ ## Install
13
+
14
+ Clone the add-on into `addon/` beside `texlite.config.json` (`texlite config`
15
+ prints `configPath`):
16
+
17
+ ~~~bash
18
+ cd <directory containing texlite.config.json>
19
+ git clone https://github.com/ChenZhongPu/texlite-tikz.git addon/texlite-tikz
20
+ ~~~
21
+
22
+ Enable it in the configuration, then run `texlite restart`:
23
+
24
+ ~~~json
25
+ {
26
+ "tikzGallery": { "enabled": true }
27
+ }
28
+ ~~~
29
+
30
+ To keep the add-on elsewhere, also set `tikzGallery.path`. A relative path is
31
+ resolved against the configuration file, and the default is `addon/texlite-tikz`.
32
+
33
+ `texlite doctor` reports how many figures it found. If it fails, either the
34
+ directory has no `catalog.json`, or the catalog format does not match this version
35
+ of TexLite, in which case update TexLite or the add-on.
36
+
37
+ ## Update or remove
38
+
39
+ Run `git pull` in the add-on directory to update it. No restart is needed.
40
+
41
+ To remove it, set `tikzGallery.enabled` to `false`, run `texlite restart` and delete
42
+ the directory. Importing copies a figure into the project, so figures already
43
+ imported are not affected.
44
+
45
+ ## Use the gallery
46
+
47
+ In a project you can edit, open the **⋯** menu of the file panel and choose
48
+ **TikZ gallery**. Figures are grouped as templates, examples, icons and data plots.
49
+ Searching icons covers every icon category. Choose a figure to see the packages it
50
+ requires, set **Save as**, and import it. The figure is a complete `standalone`
51
+ document that you can edit like any other source file.
52
+
53
+ ## Compile a figure to PDF
54
+
55
+ When the open `.tex` file is a standalone TikZ figure, **Compile to PDF** appears
56
+ above the editor. It compiles the figure and saves the PDF beside the source, ready
57
+ for `\includegraphics` in the main document. The engine chosen next to the button
58
+ applies only to figures, leaves the project's own engine unchanged, and is
59
+ remembered per project in this browser.
60
+
61
+ This button does not depend on the add-on. It works for any standalone TikZ figure
62
+ in a project you can edit.
63
+
64
+ ## Coding Agents
65
+
66
+ If the add-on includes `TIKZ.md`, Coding Agents read it for TikZ and pgfplots work
67
+ and may copy figures from the add-on, which they treat as read-only. The instruction
68
+ is in the `AGENTS.md` template that TexLite copies into a project only when the
69
+ project has none, so a project with an existing `AGENTS.md` needs the
70
+ "TikZ and pgfplots figures" section added by hand.
71
+
72
+ ## Security
73
+
74
+ Only the sources and previews listed in the add-on's catalog are served, and only
75
+ to signed-in users. Even so, treat the repository as you would any other software
76
+ you install on the host.
@@ -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-C-GTw3lA.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-Xlq7HabP.js";import{t as ae}from"./circle-check-CunlnBPw.js";import{t as oe}from"./InfoPopover-BJYnFn1P.js";import{t as c}from"./loader-circle-DKGyi5EK.js";import{t as l}from"./lock-keyhole-aC_QjKDi.js";import{t as se}from"./search-DjOWqLig.js";import{t as u}from"./user-plus-NNBQOWDP.js";import{g as d,h as ce,w as f,y as p}from"./index-CemLYDYL.js";import{t as le}from"./SuccessNotice-ubBtzzi_.js";var m={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`}]]};m.node;var ue=a(m),h={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`}]]};h.node;var g=a(h),_=e(t(),1),v=n();function y(e=10){let t=crypto.getRandomValues(new Uint8Array(e));return Array.from(t,e=>`ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz23456789!@#$%`[e%62]).join(``)}function b({currentUser:e,minPasswordLength:t,onBack:n}){let{t:a}=i(),[m,h]=(0,_.useState)([]),[b,de]=(0,_.useState)(null),[x,S]=(0,_.useState)(``),[C,w]=(0,_.useState)(1),[T,fe]=(0,_.useState)({page:1,pageSize:20,total:0,totalPages:0}),[E,pe]=(0,_.useState)(!0),[D,me]=(0,_.useState)(!1),[he,ge]=(0,_.useState)(0),[_e,O]=(0,_.useState)(``),k=le(),[A,j]=(0,_.useState)(!1),[M,N]=(0,_.useState)(``),[ve,P]=(0,_.useState)(!1),[F,I]=(0,_.useState)({username:``,displayName:``,password:``,role:`user`,canCreateProjects:!1}),[L,R]=(0,_.useState)(null),[z,B]=(0,_.useState)(``),[ye,V]=(0,_.useState)(null),[H,U]=(0,_.useState)(null),[W,G]=(0,_.useState)(!1),[K,be]=(0,_.useState)(!1),[xe,q]=(0,_.useState)(``),[J,Y]=(0,_.useState)(null),[X,Se]=(0,_.useState)(!1),[Ce,Z]=(0,_.useState)(``),Q=x.trim(),$=()=>ge(e=>e+1);(0,_.useEffect)(()=>{let e=new AbortController;V(null),pe(!0),me(!1),O(``);let t=window.setTimeout(()=>{let t=new URLSearchParams({page:String(C)});Q&&t.set(`q`,Q),f(`/api/admin/users?${t}`,{signal:e.signal}).then(t=>{e.signal.aborted||(h(t.users),de(t.summary),fe(t.pagination),w(t.pagination.page))}).catch(t=>{e.signal.aborted||(O(p(t)),me(!0))}).finally(()=>{e.signal.aborted||pe(!1)})},Q?200:0);return()=>{window.clearTimeout(t),e.abort()}},[Q,C,he]);let we=async()=>{if(!A){if(F.password.length<t)return N(a(`auth.passwordMinimum`,{count:t}));j(!0),N(``),k.clear();try{await f(`/api/admin/users`,{method:`POST`,body:JSON.stringify({username:F.username,displayName:F.displayName||F.username,password:F.password,role:F.role,canCreateProjects:F.canCreateProjects})}),P(!1),I({username:``,displayName:``,password:``,role:`user`,canCreateProjects:!1}),$(),k.show(`create`)}catch(e){N(p(e))}finally{j(!1)}}},Te=async e=>{Y({target:e,setting:e.role===`admin`?`demote`:`promote`}),Z(``)},Ee=async e=>{Y({target:e,setting:e.canCreateProjects?`denyProjectCreation`:`allowProjectCreation`}),Z(``)},De=async()=>{if(!J||X)return;let{target:e,setting:t}=J,n=t===`demote`?{role:`user`}:t===`promote`?{role:`admin`}:{canCreateProjects:t===`allowProjectCreation`};Se(!0),Z(``);try{await f(`/api/admin/users/${e.id}`,{method:`PATCH`,body:JSON.stringify(n)}),$(),Y(null)}catch(e){Z(p(e))}finally{Se(!1)}},Oe=async()=>{if(L&&z&&!A){if(z.length<t)return N(a(`auth.passwordMinimum`,{count:t}));j(!0),N(``),k.clear();try{await f(`/api/admin/users/${L.id}`,{method:`PATCH`,body:JSON.stringify({password:z})}),k.show(`reset:${L.id}`),R(null),B(``)}catch(e){N(p(e))}finally{j(!1)}}},ke=async()=>{if(H&&!K){be(!0),q(``);try{await f(`/api/admin/users/${H.id}`,{method:`DELETE`,body:JSON.stringify({deleteProjects:W})}),U(null),G(!1),$()}catch(e){q(p(e))}finally{be(!1)}}},Ae=[{key:`totalUsers`,detail:b?a(`users.summary.administrators`,{count:b.administrators}):``},{key:`projectCreators`,detail:b?a(`users.summary.ofUsers`,{count:b.totalUsers}):``},{key:`totalProjects`,detail:b?a(`users.summary.projectOwners`,{count:b.projectOwners}):``}];return(0,v.jsxs)(`section`,{className:`admin-users-page management-page`,children:[(0,v.jsxs)(`div`,{className:`section-title`,children:[(0,v.jsxs)(`div`,{children:[(0,v.jsxs)(`h1`,{children:[(0,v.jsx)(ee,{"aria-hidden":!0,size:25}),a(`users.manage`)]}),(0,v.jsx)(`p`,{className:`muted`,children:a(`users.onlyAdmin`)})]}),(0,v.jsxs)(`button`,{type:`button`,className:`dashboard-back-button`,onClick:n,children:[(0,v.jsx)(ne,{size:14}),a(`navigation.backToProjects`)]})]}),(0,v.jsxs)(`div`,{className:`admin-user-layout`,children:[(0,v.jsx)(`dl`,{className:`admin-user-summary`,"aria-label":a(`users.overview`),children:Ae.map(({key:e,detail:t})=>(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`dt`,{children:a(`users.summary.${e}`)}),(0,v.jsxs)(`dd`,{className:b?.[e]===0?`admin-user-zero`:void 0,children:[(0,v.jsx)(`strong`,{children:b?.[e]??`—`}),t&&(0,v.jsx)(`span`,{children:t})]})]},e))}),(0,v.jsxs)(`div`,{className:`admin-user-content`,children:[(0,v.jsxs)(`div`,{className:`admin-user-toolbar`,children:[(0,v.jsxs)(`div`,{className:`admin-user-filters`,children:[(0,v.jsxs)(`div`,{className:`admin-user-search`,role:`search`,children:[(0,v.jsx)(se,{"aria-hidden":!0,size:16}),(0,v.jsx)(`input`,{role:`searchbox`,"aria-label":a(`users.searchPlaceholder`),placeholder:a(`users.searchPlaceholder`),value:x,onChange:e=>{S(e.target.value),w(1)}}),x&&(0,v.jsx)(`button`,{type:`button`,"aria-label":a(`users.clearSearch`),title:a(`users.clearSearch`),onClick:()=>{S(``),w(1)},children:(0,v.jsx)(s,{"aria-hidden":!0,size:14})})]}),Q&&!E&&!D&&(0,v.jsx)(`span`,{className:`admin-user-count`,role:`status`,children:a(`users.total`,{count:T.total})})]}),(0,v.jsxs)(`button`,{className:`primary icon-button admin-user-add`,onClick:()=>{k.clear(),N(``),P(!0)},children:[(0,v.jsx)(u,{"aria-hidden":!0,size:15}),(0,v.jsx)(`span`,{role:`status`,children:a(k.message===`create`?`common.done`:`users.add`)})]})]}),_e&&(0,v.jsx)(`p`,{className:`error`,role:`alert`,children:_e}),(0,v.jsx)(`div`,{className:`table-card admin-user-table`,"aria-busy":E,children:(0,v.jsxs)(`table`,{children:[(0,v.jsx)(`thead`,{children:(0,v.jsxs)(`tr`,{children:[(0,v.jsx)(`th`,{children:a(`common.user`)}),(0,v.jsx)(`th`,{children:a(`users.role`)}),(0,v.jsx)(`th`,{children:a(`users.createProjects`)}),(0,v.jsx)(`th`,{children:a(`users.ownedProjects`)}),(0,v.jsx)(`th`,{children:a(`users.actions`)})]})}),(0,v.jsx)(`tbody`,{children:E?(0,v.jsx)(`tr`,{children:(0,v.jsx)(`td`,{colSpan:5,className:`admin-user-list-state`,children:(0,v.jsxs)(`span`,{role:`status`,children:[(0,v.jsx)(c,{className:`spin`,size:16}),a(`common.loading`)]})})}):D?(0,v.jsx)(`tr`,{children:(0,v.jsxs)(`td`,{colSpan:5,className:`admin-user-list-state`,children:[(0,v.jsx)(`span`,{children:a(`users.loadFailed`)}),(0,v.jsx)(`button`,{type:`button`,onClick:$,children:a(`common.retry`)})]})}):m.length===0?(0,v.jsx)(`tr`,{children:(0,v.jsx)(`td`,{colSpan:5,className:`admin-user-list-state`,children:a(Q?`users.noMatches`:`users.empty`)})}):m.map(t=>{let n=t.id===e.id,r=A||X,i=ye===t.id,o=k.message===`reset:${t.id}`;return(0,v.jsxs)(`tr`,{children:[(0,v.jsx)(`td`,{children:(0,v.jsxs)(`div`,{className:`admin-user-identity`,children:[(0,v.jsx)(re,{userId:t.id,name:t.displayName,username:t.username,avatarStyle:t.avatarStyle,className:`admin-user-avatar`}),(0,v.jsxs)(`div`,{children:[(0,v.jsx)(`strong`,{children:t.displayName}),(0,v.jsxs)(`small`,{children:[`@`,t.username]})]})]})}),(0,v.jsx)(`td`,{children:n?(0,v.jsxs)(`span`,{className:`admin-user-badge`,title:a(`users.selfProtected`),children:[(0,v.jsx)(l,{size:12,"aria-hidden":!0}),a(`common.admin`)]}):(0,v.jsxs)(`select`,{className:`admin-user-role`,"aria-label":a(`users.roleFor`,{username:t.username}),value:t.role,disabled:r,onChange:()=>void Te(t),children:[(0,v.jsx)(`option`,{value:`user`,children:a(`common.user`)}),(0,v.jsx)(`option`,{value:`admin`,children:a(`common.admin`)})]})}),(0,v.jsx)(`td`,{children:t.role===`admin`?(0,v.jsxs)(`span`,{className:`admin-user-locked`,title:a(`users.adminCreation`),children:[(0,v.jsx)(l,{size:12,"aria-hidden":!0}),a(`users.alwaysAllowed`)]}):(0,v.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 Ee(t),children:(0,v.jsx)(`span`,{})})}),(0,v.jsx)(`td`,{className:t.ownedProjects?void 0:`admin-user-zero`,children:t.ownedProjects??0}),(0,v.jsx)(`td`,{children:(0,v.jsxs)(`div`,{className:`admin-user-actions`,children:[(0,v.jsxs)(`div`,{className:`admin-user-action-items`,id:`user-actions-${t.id}`,hidden:!i,children:[(0,v.jsxs)(`button`,{type:`button`,className:`icon-button`,disabled:r,title:a(o?`common.done`:`users.resetPassword`),"aria-label":a(`users.resetPassword`),onClick:()=>{k.clear(),R(t),B(``),N(``)},children:[o?(0,v.jsx)(ae,{className:`admin-user-action-confirmation`,"aria-hidden":!0,size:15}):(0,v.jsx)(g,{"aria-hidden":!0,size:15}),(0,v.jsx)(`span`,{className:`sr-only`,role:`status`,children:o?a(`common.done`):``})]}),!n&&(0,v.jsx)(`button`,{type:`button`,className:`icon-button danger-text`,disabled:r,title:a(`users.deleteTitle`),"aria-label":a(`users.deleteTitle`),onClick:()=>{U(t),G(!1),q(``)},children:(0,v.jsx)(te,{size:15,"aria-hidden":!0})})]}),(0,v.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:()=>V(i?null:t.id),children:(0,v.jsx)(ie,{size:17,"aria-hidden":!0})})]})})]},t.id)})})]})}),T.totalPages>1&&(0,v.jsxs)(`nav`,{className:`project-pagination admin-user-pagination`,"aria-label":a(`users.pagination`),children:[(0,v.jsxs)(`button`,{type:`button`,disabled:E||D||T.page<=1,onClick:()=>w(T.page-1),children:[(0,v.jsx)(r,{size:15}),a(`users.previousPage`)]}),(0,v.jsx)(`span`,{children:a(`users.pageOf`,{page:T.page,totalPages:T.totalPages})}),(0,v.jsxs)(`button`,{type:`button`,disabled:E||D||T.page>=T.totalPages,onClick:()=>w(T.page+1),children:[a(`users.nextPage`),(0,v.jsx)(o,{size:15})]})]})]})]}),(0,v.jsxs)(d,{className:`management-dialog`,open:ve,title:a(`users.add`),onOpenChange:e=>{A||P(e)},footer:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(`button`,{className:`icon-button`,disabled:A,onClick:()=>P(!1),children:[(0,v.jsx)(s,{"aria-hidden":!0,size:14}),a(`common.cancel`)]}),(0,v.jsxs)(`button`,{className:`primary icon-button`,disabled:A||!F.username.trim()||F.password.length<t,onClick:()=>void we(),children:[(0,v.jsx)(u,{"aria-hidden":!0,size:14}),a(`users.createUser`)]})]}),children:[M&&(0,v.jsx)(`p`,{className:`error`,role:`alert`,children:M}),(0,v.jsxs)(`fieldset`,{className:`admin-user-form form-stack`,disabled:A,children:[(0,v.jsxs)(`label`,{className:`form-field`,children:[a(`auth.username`),(0,v.jsx)(`input`,{value:F.username,onChange:e=>I({...F,username:e.target.value})})]}),(0,v.jsxs)(`label`,{className:`form-field`,children:[a(`users.displayName`),(0,v.jsx)(`input`,{value:F.displayName,onChange:e=>I({...F,displayName:e.target.value})})]}),(0,v.jsxs)(`div`,{className:`form-field`,children:[(0,v.jsxs)(`div`,{className:`user-password-heading`,children:[(0,v.jsx)(`label`,{htmlFor:`new-user-password`,children:a(`users.initialPassword`)}),(0,v.jsx)(oe,{content:a(`users.addDescription`)})]}),(0,v.jsxs)(`span`,{className:`password-generator`,children:[(0,v.jsx)(`input`,{id:`new-user-password`,minLength:t,autoComplete:`new-password`,value:F.password,onChange:e=>I({...F,password:e.target.value})}),(0,v.jsxs)(`button`,{type:`button`,title:a(`users.generatePassword`),onClick:()=>I({...F,password:y()}),children:[(0,v.jsx)(ue,{size:15}),a(`users.randomPassword`)]})]}),(0,v.jsx)(`small`,{className:`field-hint`,children:a(`auth.passwordMinimum`,{count:t})})]}),(0,v.jsxs)(`label`,{className:`form-field`,children:[a(`users.role`),(0,v.jsxs)(`select`,{value:F.role,onChange:e=>I({...F,role:e.target.value}),children:[(0,v.jsx)(`option`,{value:`user`,children:a(`common.user`)}),(0,v.jsx)(`option`,{value:`admin`,children:a(`common.admin`)})]})]}),(0,v.jsxs)(`label`,{className:`checkbox-field`,children:[(0,v.jsx)(`input`,{type:`checkbox`,checked:F.canCreateProjects||F.role===`admin`,disabled:F.role===`admin`,onChange:e=>I({...F,canCreateProjects:e.target.checked})}),` `,a(`users.allowCreate`)]})]})]}),(0,v.jsxs)(d,{className:`management-dialog`,open:!!L,title:a(`users.resetPassword`),description:a(`users.resetDescription`,{username:L?.username??``}),onOpenChange:e=>{!e&&!A&&R(null)},footer:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(`button`,{className:`icon-button`,disabled:A,onClick:()=>R(null),children:[(0,v.jsx)(s,{"aria-hidden":!0,size:14}),a(`common.cancel`)]}),(0,v.jsxs)(`button`,{className:`primary icon-button`,disabled:A||z.length<t,onClick:()=>void Oe(),children:[(0,v.jsx)(g,{"aria-hidden":!0,size:14}),a(`users.reset`)]})]}),children:[M&&(0,v.jsx)(`p`,{className:`error`,role:`alert`,children:M}),(0,v.jsxs)(`label`,{className:`form-field`,children:[a(`auth.newPassword`),(0,v.jsxs)(`span`,{className:`password-generator`,children:[(0,v.jsx)(`input`,{disabled:A,autoFocus:!0,minLength:t,autoComplete:`new-password`,value:z,onChange:e=>B(e.target.value)}),(0,v.jsxs)(`button`,{type:`button`,disabled:A,onClick:()=>B(y()),children:[(0,v.jsx)(ue,{size:15}),a(`users.randomPassword`)]})]}),(0,v.jsx)(`small`,{className:`field-hint`,children:a(`auth.passwordMinimum`,{count:t})})]})]}),(0,v.jsx)(d,{className:`management-dialog`,open:!!H,title:a(`users.deleteTitle`),description:a(`users.deleteDescription`,{username:H?.username??``}),onOpenChange:e=>{!e&&!K&&(U(null),q(``))},footer:(0,v.jsxs)(v.Fragment,{children:[(0,v.jsxs)(`button`,{className:`icon-button`,disabled:K,onClick:()=>{U(null),q(``)},children:[(0,v.jsx)(s,{"aria-hidden":!0,size:14}),a(`common.cancel`)]}),(0,v.jsxs)(`button`,{className:`danger icon-button`,disabled:K,"aria-busy":K,onClick:()=>void ke(),children:[K?(0,v.jsx)(c,{className:`spin`,"aria-hidden":!0,size:14}):(0,v.jsx)(te,{"aria-hidden":!0,size:14}),a(K?`common.loading`:`users.deleteTitle`)]})]}),children:(0,v.jsxs)(v.Fragment,{children:[xe&&(0,v.jsx)(`p`,{className:`error dialog-error`,children:xe}),(0,v.jsxs)(`fieldset`,{className:`choice-group`,disabled:K,children:[(0,v.jsx)(`legend`,{children:a(`users.ownedChoice`,{count:H?.ownedProjects??0})}),(0,v.jsxs)(`label`,{children:[(0,v.jsx)(`input`,{type:`radio`,checked:!W,onChange:()=>G(!1)}),` `,a(`users.transferProjects`)]}),(0,v.jsxs)(`label`,{children:[(0,v.jsx)(`input`,{type:`radio`,checked:W,onChange:()=>G(!0)}),` `,a(`users.deleteProjects`)]})]})]})}),(0,v.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:Ce,onCancel:()=>{X||(Y(null),Z(``))},onConfirm:()=>void De()})]})}export{b as AdminUsers};