An open-source, privacy-first, self-hosted knowledge workspace where humans and AI agents work together 开源、隐私优先、自托管的知识工作空间,让人与智能体在此协作
TypeScript agentic-aiai-agentknowledge-baselocal-firstmarkdownmcpmindmapnote-takingself-hostedsiyuanworkspace
:sparkles: Preserve mind map fullscreen views and preview document layout https://github.com/siyuan-note/siyuan/issues/20694
Daniel820e6e2f1540
diff --git a/app/appearance/langs/ar.json b/app/appearance/langs/ar.jsonindex d72a2391d8..26ebe81d7c 100644--- a/app/appearance/langs/ar.json+++ b/app/appearance/langs/ar.json@@ -1,4 +1,5 @@{+ "listMindmapDocumentLayout": "تخطيط المستند","livePhoto": "صورة حية","livePhotoPreviewUnavailable": "تعذرت معاينة هذه الصورة الحية. تم الاحتفاظ بالملفات الأصلية.","livePhotoPairUnavailable": "لم يكتمل رفع الصورة الحية. يرجى استيرادها مجددًا.",diff --git a/app/appearance/langs/de.json b/app/appearance/langs/de.jsonindex 7bc3b93434..6fb875b7e2 100644--- a/app/appearance/langs/de.json+++ b/app/appearance/langs/de.json@@ -1,4 +1,5 @@{+ "listMindmapDocumentLayout": "Dokumentlayout","livePhoto": "Live Photo","livePhotoPreviewUnavailable": "Dieses Live Photo kann nicht wiedergegeben werden. Die Originaldateien bleiben erhalten.","livePhotoPairUnavailable": "Das Live Photo wurde nicht vollständig hochgeladen. Bitte erneut importieren.",diff --git a/app/appearance/langs/en.json b/app/appearance/langs/en.jsonindex df7a8f93fa..0853632158 100644--- a/app/appearance/langs/en.json+++ b/app/appearance/langs/en.json@@ -1,4 +1,5 @@{+ "listMindmapDocumentLayout": "Document layout","livePhoto": "Live Photo","livePhotoPreviewUnavailable": "This Live Photo cannot be previewed. The original files are preserved.","livePhotoPairUnavailable": "The Live Photo was not fully uploaded. Please import it again.",diff --git a/app/appearance/langs/es.json b/app/appearance/langs/es.jsonindex fe33140ec0..4dce4ca021 100644--- a/app/appearance/langs/es.json+++ b/app/appearance/langs/es.json@@ -1,4 +1,5 @@{+ "listMindmapDocumentLayout": "Diseño del documento","livePhoto": "Live Photo","livePhotoPreviewUnavailable": "No se puede reproducir esta Live Photo. Se conservan los archivos originales.","livePhotoPairUnavailable": "La Live Photo no se ha subido por completo. Vuelve a importarla.",diff --git a/app/appearance/langs/fr.json b/app/appearance/langs/fr.jsonindex 7986ff76d6..743910acaf 100644--- a/app/appearance/langs/fr.json+++ b/app/appearance/langs/fr.json@@ -1,4 +1,5 @@{+ "listMindmapDocumentLayout": "Disposition du document","livePhoto": "Live Photo","livePhotoPreviewUnavailable": "Impossible de lire cette Live Photo. Les fichiers originaux sont conservés.","livePhotoPairUnavailable": "La Live Photo n’a pas été entièrement envoyée. Veuillez la réimporter.",diff --git a/app/appearance/langs/he.json b/app/appearance/langs/he.jsonindex 590291e7fe..cd30b964b4 100644--- a/app/appearance/langs/he.json+++ b/app/appearance/langs/he.json@@ -1,4 +1,5 @@{+ "listMindmapDocumentLayout": "פריסת המסמך","livePhoto": "תמונה חיה","livePhotoPreviewUnavailable": "לא ניתן להציג תצוגה מקדימה של התמונה החיה. הקבצים המקוריים נשמרו.","livePhotoPairUnavailable": "העלאת התמונה החיה לא הושלמה. יש לייבא אותה שוב.",diff --git a/app/appearance/langs/hi.json b/app/appearance/langs/hi.jsonindex c5789bf212..7d99b4055a 100644--- a/app/appearance/langs/hi.json+++ b/app/appearance/langs/hi.json@@ -1,4 +1,5 @@{+ "listMindmapDocumentLayout": "दस्तावेज़ लेआउट","livePhoto": "लाइव फ़ोटो","livePhotoPreviewUnavailable": "इस लाइव फ़ोटो का पूर्वावलोकन नहीं हो सका। मूल फ़ाइलें सुरक्षित हैं।","livePhotoPairUnavailable": "लाइव फ़ोटो पूरी तरह अपलोड नहीं हुई। कृपया इसे फिर से आयात करें।",diff --git a/app/appearance/langs/id.json b/app/appearance/langs/id.jsonindex 51351cf68b..443156c90b 100644--- a/app/appearance/langs/id.json+++ b/app/appearance/langs/id.json@@ -1,4 +1,5 @@{+ "listMindmapDocumentLayout": "Tata letak dokumen","livePhoto": "Live Photo","livePhotoPreviewUnavailable": "Live Photo ini tidak dapat dipratinjau. File asli tetap tersimpan.","livePhotoPairUnavailable": "Live Photo belum terunggah sepenuhnya. Silakan impor kembali.",diff --git a/app/appearance/langs/it.json b/app/appearance/langs/it.jsonindex af18f4ef36..364033f87e 100644--- a/app/appearance/langs/it.json+++ b/app/appearance/langs/it.json@@ -1,4 +1,5 @@{+ "listMindmapDocumentLayout": "Layout del documento","livePhoto": "Live Photo","livePhotoPreviewUnavailable": "Impossibile riprodurre questa Live Photo. I file originali sono conservati.","livePhotoPairUnavailable": "La Live Photo non è stata caricata completamente. Importala di nuovo.",diff --git a/app/appearance/langs/ja.json b/app/appearance/langs/ja.jsonindex 6c3c5502f8..d0c7b9cc72 100644--- a/app/appearance/langs/ja.json+++ b/app/appearance/langs/ja.json@@ -1,4 +1,5 @@{+ "listMindmapDocumentLayout": "文書内のレイアウト","livePhoto": "Live Photo","livePhotoPreviewUnavailable": "この Live Photo を再生できません。元のファイルは保持されています。","livePhotoPairUnavailable": "Live Photo のアップロードが完了していません。もう一度インポートしてください。",diff --git a/app/appearance/langs/ko.json b/app/appearance/langs/ko.jsonindex e9dd8867a1..c9f62ee779 100644--- a/app/appearance/langs/ko.json+++ b/app/appearance/langs/ko.json@@ -1,4 +1,5 @@{+ "listMindmapDocumentLayout": "문서 레이아웃","livePhoto": "라이브 포토","livePhotoPreviewUnavailable": "이 라이브 포토를 미리 볼 수 없습니다. 원본 파일은 보존됩니다.","livePhotoPairUnavailable": "라이브 포토가 완전히 업로드되지 않았습니다. 다시 가져와 주세요.",diff --git a/app/appearance/langs/nl.json b/app/appearance/langs/nl.jsonindex 66e52f8682..4c8fe94bc1 100644--- a/app/appearance/langs/nl.json+++ b/app/appearance/langs/nl.json@@ -1,4 +1,5 @@{+ "listMindmapDocumentLayout": "Documentindeling","livePhoto": "Live Photo","livePhotoPreviewUnavailable": "Deze Live Photo kan niet worden afgespeeld. De oorspronkelijke bestanden blijven behouden.","livePhotoPairUnavailable": "De Live Photo is niet volledig geüpload. Importeer deze opnieuw.",diff --git a/app/appearance/langs/pl.json b/app/appearance/langs/pl.jsonindex 968ab92e6d..130fee11c3 100644--- a/app/appearance/langs/pl.json+++ b/app/appearance/langs/pl.json@@ -1,4 +1,5 @@{+ "listMindmapDocumentLayout": "Układ dokumentu","livePhoto": "Live Photo","livePhotoPreviewUnavailable": "Nie można odtworzyć tego zdjęcia Live Photo. Oryginalne pliki zostały zachowane.","livePhotoPairUnavailable": "Zdjęcie Live Photo nie zostało w pełni przesłane. Zaimportuj je ponownie.",diff --git a/app/appearance/langs/pt-BR.json b/app/appearance/langs/pt-BR.jsonindex 9f90a0a11e..64a9a23e59 100644--- a/app/appearance/langs/pt-BR.json+++ b/app/appearance/langs/pt-BR.json@@ -1,4 +1,5 @@{+ "listMindmapDocumentLayout": "Layout do documento","livePhoto": "Live Photo","livePhotoPreviewUnavailable": "Não foi possível reproduzir esta Live Photo. Os arquivos originais foram preservados.","livePhotoPairUnavailable": "A Live Photo não foi enviada por completo. Importe-a novamente.",diff --git a/app/appearance/langs/ru.json b/app/appearance/langs/ru.jsonindex 2eb7612322..5be830ebbd 100644--- a/app/appearance/langs/ru.json+++ b/app/appearance/langs/ru.json@@ -1,4 +1,5 @@{+ "listMindmapDocumentLayout": "Макет документа","livePhoto": "Живое фото","livePhotoPreviewUnavailable": "Не удалось воспроизвести это живое фото. Исходные файлы сохранены.","livePhotoPairUnavailable": "Живое фото загружено не полностью. Импортируйте его ещё раз.",diff --git a/app/appearance/langs/sk.json b/app/appearance/langs/sk.jsonindex 9a6d7ca346..68e70ac084 100644--- a/app/appearance/langs/sk.json+++ b/app/appearance/langs/sk.json@@ -1,4 +1,5 @@{+ "listMindmapDocumentLayout": "Rozloženie dokumentu","livePhoto": "Live Photo","livePhotoPreviewUnavailable": "Túto fotografiu Live Photo sa nepodarilo prehrať. Pôvodné súbory zostali zachované.","livePhotoPairUnavailable": "Fotografia Live Photo sa nenahrala úplne. Importujte ju znova.",diff --git a/app/appearance/langs/sr.json b/app/appearance/langs/sr.jsonindex 3f4f9f15a9..a51a86e032 100644--- a/app/appearance/langs/sr.json+++ b/app/appearance/langs/sr.json@@ -1,4 +1,5 @@{+ "listMindmapDocumentLayout": "Распоред документа","livePhoto": "Жива фотографија","livePhotoPreviewUnavailable": "Није могуће приказати ову живу фотографију. Оригиналне датотеке су сачуване.","livePhotoPairUnavailable": "Жива фотографија није у потпуности отпремљена. Увезите је поново.",diff --git a/app/appearance/langs/th.json b/app/appearance/langs/th.jsonindex 95b2e7cfbb..a4c55dcd4b 100644--- a/app/appearance/langs/th.json+++ b/app/appearance/langs/th.json@@ -1,4 +1,5 @@{+ "listMindmapDocumentLayout": "เค้าโครงเอกสาร","livePhoto": "ภาพถ่าย Live Photo","livePhotoPreviewUnavailable": "ไม่สามารถแสดงตัวอย่าง Live Photo นี้ได้ ไฟล์ต้นฉบับยังคงอยู่","livePhotoPairUnavailable": "อัปโหลด Live Photo ไม่ครบถ้วน โปรดนำเข้าอีกครั้ง",diff --git a/app/appearance/langs/tr.json b/app/appearance/langs/tr.jsonindex 34c5a6cd3a..8d169f31fe 100644--- a/app/appearance/langs/tr.json+++ b/app/appearance/langs/tr.json@@ -1,4 +1,5 @@{+ "listMindmapDocumentLayout": "Belge düzeni","livePhoto": "Canlı Fotoğraf","livePhotoPreviewUnavailable": "Bu Canlı Fotoğraf önizlenemiyor. Özgün dosyalar korunuyor.","livePhotoPairUnavailable": "Canlı Fotoğraf tamamen yüklenemedi. Lütfen yeniden içe aktarın.",diff --git a/app/appearance/langs/uk.json b/app/appearance/langs/uk.jsonindex 4c5d70b9df..6172ffc95c 100644--- a/app/appearance/langs/uk.json+++ b/app/appearance/langs/uk.json@@ -1,4 +1,5 @@{+ "listMindmapDocumentLayout": "Макет документа","livePhoto": "Живе фото","livePhotoPreviewUnavailable": "Не вдалося відтворити це живе фото. Оригінальні файли збережено.","livePhotoPairUnavailable": "Живе фото завантажено не повністю. Імпортуйте його ще раз.",diff --git a/app/appearance/langs/zh-CN.json b/app/appearance/langs/zh-CN.jsonindex a2afeb36ef..d0c8d2c495 100644--- a/app/appearance/langs/zh-CN.json+++ b/app/appearance/langs/zh-CN.json@@ -1,4 +1,5 @@{+ "listMindmapDocumentLayout": "文档布局","livePhoto": "实况照片","livePhotoPreviewUnavailable": "暂时无法播放这张实况照片,原始文件已保留。","livePhotoPairUnavailable": "实况照片未完整上传,请重新导入。",diff --git a/app/appearance/langs/zh-TW.json b/app/appearance/langs/zh-TW.jsonindex 2c880456ef..07b67e4740 100644--- a/app/appearance/langs/zh-TW.json+++ b/app/appearance/langs/zh-TW.json@@ -1,4 +1,5 @@{+ "listMindmapDocumentLayout": "文件版面","livePhoto": "原況照片","livePhotoPreviewUnavailable": "暫時無法播放這張原況照片,原始檔案已保留。","livePhotoPairUnavailable": "原況照片未完整上傳,請重新匯入。",diff --git a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-h361q1i/20200924093441-ft2rhps.sy b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-h361q1i/20200924093441-ft2rhps.syindex 28deda225a..46ebd39460 100644--- a/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-h361q1i/20200924093441-ft2rhps.sy+++ b/app/guide/20210808180117-6v0mkxr/20200923234011-ieuun1p/20210808180303-h361q1i/20200924093441-ft2rhps.sy@@ -8,7 +8,7 @@"title": "Formatting elements","title-img": "background-color:#269;background-image: linear-gradient(white 2px, transparent 2px),linear-gradient(90deg, white 2px, transparent 2px),linear-gradient(rgba(255,255,255,.3) 1px, transparent 1px),linear-gradient(90deg, rgba(255,255,255,.3) 1px, transparent 1px);background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;background-position:-2px -2px, -2px -2px, -1px -1px, -1px -1px;","type": "doc",- "updated": "20261018213321"+ "updated": "20261019142953"},"Children": [{@@ -1961,7 +1961,7 @@"HeadingLevel": 2,"Properties": {"id": "20210104091509-v1x69oc",- "updated": "20261018200107"+ "updated": "20261019142953"},"Children": [{@@ -2009,6 +2009,38 @@}]},+ {+ "ID": "20261019142953-4rt40w7",+ "Type": "NodeParagraph",+ "Properties": {+ "id": "20261019142953-4rt40w7",+ "updated": "20261019142953"+ },+ "Children": [+ {+ "Type": "NodeText",+ "Data": "Switching between the document and full screen preserves the map's center and zoom. Use "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "Toggle Fullscreen"+ },+ {+ "Type": "NodeText",+ "Data": " - "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "Document layout"+ },+ {+ "Type": "NodeText",+ "Data": " in the toolbar to show a centered frame matching the map viewport in the document. Pan and zoom while viewing this frame to preview the area that will appear after leaving full screen. Click the button again to hide the frame. The frame does not change the block's width or height."+ }+ ]+ },{"ID": "20261018163000-cvdncjc","Type": "NodeParagraph",diff --git a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-abz7w6k/20200825162036-4dx365o.sy b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-abz7w6k/20200825162036-4dx365o.syindex ac5043e718..68c4ee3178 100644--- a/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-abz7w6k/20200825162036-4dx365o.sy+++ b/app/guide/20210808180117-czj9bvb/20200812220555-lj3enxa/20210808180320-abz7w6k/20200825162036-4dx365o.sy@@ -8,7 +8,7 @@"title": "排版元素","title-img": "background-color: hsl(2, 57%, 40%);background-image: repeating-linear-gradient(transparent, transparent 50px, rgba(0,0,0,.4) 50px, rgba(0,0,0,.4) 53px, transparent 53px, transparent 63px, rgba(0,0,0,.4) 63px, rgba(0,0,0,.4) 66px, transparent 66px, transparent 116px, rgba(0,0,0,.5) 116px, rgba(0,0,0,.5) 166px, rgba(255,255,255,.2) 166px, rgba(255,255,255,.2) 169px, rgba(0,0,0,.5) 169px, rgba(0,0,0,.5) 179px, rgba(255,255,255,.2) 179px, rgba(255,255,255,.2) 182px, rgba(0,0,0,.5) 182px, rgba(0,0,0,.5) 232px, transparent 232px),repeating-linear-gradient(270deg, transparent, transparent 50px, rgba(0,0,0,.4) 50px, rgba(0,0,0,.4) 53px, transparent 53px, transparent 63px, rgba(0,0,0,.4) 63px, rgba(0,0,0,.4) 66px, transparent 66px, transparent 116px, rgba(0,0,0,.5) 116px, rgba(0,0,0,.5) 166px, rgba(255,255,255,.2) 166px, rgba(255,255,255,.2) 169px, rgba(0,0,0,.5) 169px, rgba(0,0,0,.5) 179px, rgba(255,255,255,.2) 179px, rgba(255,255,255,.2) 182px, rgba(0,0,0,.5) 182px, rgba(0,0,0,.5) 232px, transparent 232px),repeating-linear-gradient(125deg, transparent, transparent 2px, rgba(0,0,0,.2) 2px, rgba(0,0,0,.2) 3px, transparent 3px, transparent 5px, rgba(0,0,0,.2) 5px);","type": "doc",- "updated": "20261018213321"+ "updated": "20261019142953"},"Children": [{@@ -1964,7 +1964,7 @@"HeadingLevel": 2,"Properties": {"id": "20210104091228-wdpx6ev",- "updated": "20261018200107"+ "updated": "20261019142953"},"Children": [{@@ -2012,6 +2012,38 @@}]},+ {+ "ID": "20261019142953-m439ybs",+ "Type": "NodeParagraph",+ "Properties": {+ "id": "20261019142953-m439ybs",+ "updated": "20261019142953"+ },+ "Children": [+ {+ "Type": "NodeText",+ "Data": "文档与全屏之间切换时会保留脑图中心点和缩放比例。点击工具栏中的 "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "全屏切换"+ },+ {+ "Type": "NodeText",+ "Data": " - "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "文档布局"+ },+ {+ "Type": "NodeText",+ "Data": " 可显示居中的指示框,其大小与文档内脑图的可视区域相同。参照指示框平移、缩放画布,即可预览退出全屏后显示的范围;再次点击按钮可隐藏指示框。指示框不会改变脑图块的宽度或高度。"+ }+ ]+ },{"ID": "20261018163000-rtw5v99","Type": "NodeParagraph",diff --git a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226120854-dr1jfx2/20211226121319-emrk2yy.sy b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226120854-dr1jfx2/20211226121319-emrk2yy.syindex 0749b945f6..8a0ff1596e 100644--- a/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226120854-dr1jfx2/20211226121319-emrk2yy.sy+++ b/app/guide/20211226090932-5lcq56f/20211226115423-d5z1joq/20211226120854-dr1jfx2/20211226121319-emrk2yy.sy@@ -8,7 +8,7 @@"title": "排版元素","title-img": "background-color: hsl(2, 57%, 40%);background-image: repeating-linear-gradient(transparent, transparent 50px, rgba(0,0,0,.4) 50px, rgba(0,0,0,.4) 53px, transparent 53px, transparent 63px, rgba(0,0,0,.4) 63px, rgba(0,0,0,.4) 66px, transparent 66px, transparent 116px, rgba(0,0,0,.5) 116px, rgba(0,0,0,.5) 166px, rgba(255,255,255,.2) 166px, rgba(255,255,255,.2) 169px, rgba(0,0,0,.5) 169px, rgba(0,0,0,.5) 179px, rgba(255,255,255,.2) 179px, rgba(255,255,255,.2) 182px, rgba(0,0,0,.5) 182px, rgba(0,0,0,.5) 232px, transparent 232px),repeating-linear-gradient(270deg, transparent, transparent 50px, rgba(0,0,0,.4) 50px, rgba(0,0,0,.4) 53px, transparent 53px, transparent 63px, rgba(0,0,0,.4) 63px, rgba(0,0,0,.4) 66px, transparent 66px, transparent 116px, rgba(0,0,0,.5) 116px, rgba(0,0,0,.5) 166px, rgba(255,255,255,.2) 166px, rgba(255,255,255,.2) 169px, rgba(0,0,0,.5) 169px, rgba(0,0,0,.5) 179px, rgba(255,255,255,.2) 179px, rgba(255,255,255,.2) 182px, rgba(0,0,0,.5) 182px, rgba(0,0,0,.5) 232px, transparent 232px),repeating-linear-gradient(125deg, transparent, transparent 2px, rgba(0,0,0,.2) 2px, rgba(0,0,0,.2) 3px, transparent 3px, transparent 5px, rgba(0,0,0,.2) 5px);","type": "doc",- "updated": "20261018213321"+ "updated": "20261019142953"},"Children": [{@@ -1962,7 +1962,7 @@"HeadingLevel": 2,"Properties": {"id": "20211226122008-731sqd6",- "updated": "20261018200107"+ "updated": "20261019142953"},"Children": [{@@ -2010,6 +2010,38 @@}]},+ {+ "ID": "20261019142953-9ypjmtz",+ "Type": "NodeParagraph",+ "Properties": {+ "id": "20261019142953-9ypjmtz",+ "updated": "20261019142953"+ },+ "Children": [+ {+ "Type": "NodeText",+ "Data": "在文件與全螢幕之間切換時,會保留心智圖的中心點和縮放比例。點擊工具列中的 "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "全螢幕切換"+ },+ {+ "Type": "NodeText",+ "Data": " - "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "文件版面"+ },+ {+ "Type": "NodeText",+ "Data": " 可顯示置中的指示框,大小與文件內心智圖的可視區域相同。參照指示框平移、縮放畫布,即可預覽離開全螢幕後顯示的範圍;再次點擊按鈕可隱藏指示框。指示框不會變更心智圖區塊的寬度或高度。"+ }+ ]+ },{"ID": "20261018163000-byam24i","Type": "NodeParagraph",diff --git a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-hnu6o79/20240530101000-3qhz7br.sy b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-hnu6o79/20240530101000-3qhz7br.syindex 40595a3784..361d3ce107 100644--- a/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-hnu6o79/20240530101000-3qhz7br.sy+++ b/app/guide/20240530133126-axarxgx/20240530101000-4qitucx/20240530101000-hnu6o79/20240530101000-3qhz7br.sy@@ -9,7 +9,7 @@"title": "書式要素","title-img": "background-color:#269;background-image: linear-gradient(white 2px, transparent 2px),linear-gradient(90deg, white 2px, transparent 2px),linear-gradient(rgba(255,255,255,.3) 1px, transparent 1px),linear-gradient(90deg, rgba(255,255,255,.3) 1px, transparent 1px);background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px;background-position:-2px -2px, -2px -2px, -1px -1px, -1px -1px;","type": "doc",- "updated": "20261018213321"+ "updated": "20261019142953"},"Children": [{@@ -2090,7 +2090,7 @@"Properties": {"ID": "20240530101000-ch5e4vh","id": "20240530101000-1ev7xub",- "updated": "20261018200107"+ "updated": "20261019142953"},"Children": [{@@ -2138,6 +2138,38 @@}]},+ {+ "ID": "20261019142953-j4zhvo2",+ "Type": "NodeParagraph",+ "Properties": {+ "id": "20261019142953-j4zhvo2",+ "updated": "20261019142953"+ },+ "Children": [+ {+ "Type": "NodeText",+ "Data": "文書と全画面表示を切り替えても、マインドマップの中心と拡大率は維持されます。ツールバーの "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "禅モードの切り替え"+ },+ {+ "Type": "NodeText",+ "Data": " - "+ },+ {+ "Type": "NodeTextMark",+ "TextMarkType": "kbd",+ "TextMarkTextContent": "文書内のレイアウト"+ },+ {+ "Type": "NodeText",+ "Data": " を押すと、文書内のマインドマップ表示領域と同じ大きさの枠が中央に表示されます。枠を目安にキャンバスを移動・拡大縮小すると、全画面表示を終了した後の表示範囲を確認できます。もう一度押すと枠を非表示にします。この枠でブロックの幅や高さは変わりません。"+ }+ ]+ },{"ID": "20261018163000-qe8wgtd","Type": "NodeParagraph",diff --git a/app/src/assets/scss/protyle/_mindmap-view.scss b/app/src/assets/scss/protyle/_mindmap-view.scssindex d07472091a..99cc197b61 100644--- a/app/src/assets/scss/protyle/_mindmap-view.scss+++ b/app/src/assets/scss/protyle/_mindmap-view.scss@@ -239,6 +239,18 @@pointer-events: none;}+ &__document-frame {+ position: absolute;+ left: 50%;+ top: 50%;+ transform: translate(-50%, -50%);+ box-sizing: border-box;+ border: 2px dashed var(--b3-theme-primary);+ color: var(--b3-theme-primary);+ pointer-events: none;+ z-index: 4;+ }+&__viewport--summary {cursor: crosshair;}@@ -920,6 +932,7 @@min-height: 0;&__toolbar,+ &__document-frame,&__resize,&__inspector,&__tooltip,diff --git a/app/src/protyle/render/listMindmap/fullscreen.test.ts b/app/src/protyle/render/listMindmap/fullscreen.test.tsnew file mode 100644index 0000000000..0aca7bf400--- /dev/null+++ b/app/src/protyle/render/listMindmap/fullscreen.test.ts@@ -0,0 +1,194 @@+import * as assert from "node:assert/strict";+import {execFile} from "node:child_process";+import {mkdtempSync, readFileSync, rmSync, writeFileSync} from "node:fs";+import {tmpdir} from "node:os";+import * as path from "node:path";+import {promisify} from "node:util";+import test from "node:test";+import {ScriptTarget, transpileModule} from "typescript";++const browserCases = async (source: string, css: string) => {+ const check = require("node:assert/strict");+ const style = document.createElement("style");+ style.textContent = css;+ document.head.append(style);+ const api = new Function("Constants", "mathRender", "tabsRender", "destroyTabsRender", source ++ "; return {ListMindmapView, readListMindmap};")(+ {CUSTOM_SY_LIST_MINDMAP_DATA: "custom-sy-list-mindmap-data"}, () => {}, () => {}, () => {});+ const lute = Lute.New();+ lute.SetProtyleWYSIWYG(true);+ const frame = () => new Promise<void>(resolve => requestAnimationFrame(() => resolve()));+ const settle = async () => { await frame(); await frame(); await frame(); };+ for (const mobile of [false, true]) {+ for (const dark of [false, true]) {+ document.body.className = mobile ? "body--android" : "body--windows";+ const parent = document.createElement("div");+ parent.style.cssText = `width:${mobile ? 320 : 760}px;transform:translateX(5px);overflow:hidden`;+ const host = document.createElement("div");+ host.style.cssText = `--mindmap-view-height:${mobile ? 300 : 460}px;` ++ `--b3-theme-background:${dark ? "#222" : "#fff"};--b3-theme-primary:#3574f0;--b3-border-color:#888`;+ parent.append(host);+ document.body.append(parent);+ const holder = document.createElement("div");+ holder.innerHTML = lute.Md2BlockDOM("- Root\n" ++ Array.from({length: 12}, (_, index) => ` - Node ${index}\n`).join(""));+ const list = holder.firstElementChild;+ const originalSource = list.outerHTML;+ const view = new api.ListMindmapView({host, model: api.readListMindmap(list), onExit: () => {}});+ await settle();+ const viewport = host.querySelector<HTMLElement>(".mindmap-view__viewport");+ const guide = host.querySelector<HTMLElement>(".mindmap-view__document-frame");+ const center = () => [(viewport.clientWidth / 2 - view.offsetX) / view.scale,+ (viewport.clientHeight / 2 - view.offsetY) / view.scale];+ const equalCenter = (expected: number[]) => center().forEach((value, index) =>+ check.ok(Math.abs(value - expected[index]) < 1e-8, "mode changes preserve the logical center"));+ const button = (label: string) => host.querySelector<HTMLButtonElement>(`[aria-label="${label}"]`);+ const initialStyle = host.style.cssText;+ const size = [viewport.clientWidth, viewport.clientHeight];+ check.equal(button("listMindmapDocumentLayout").hidden, true);+ for (const scale of [.75, 1.25]) {+ view.zoomAt(scale);+ const documentCenter = center();+ const documentTransform = [view.scale, view.offsetX, view.offsetY];+ button("fullscreen").click();+ await settle();+ equalCenter(documentCenter);+ check.equal(view.scale, scale);+ check.equal(host.parentElement, document.body);+ check.equal(guide.hidden, true);+ button("listMindmapDocumentLayout").click();+ check.equal(button("listMindmapDocumentLayout").getAttribute("aria-pressed"), "true");+ check.equal(getComputedStyle(guide).pointerEvents, "none");+ const bounds = guide.getBoundingClientRect();+ const full = viewport.getBoundingClientRect();+ check.deepEqual([bounds.width, bounds.height], size);+ check.ok(Math.abs(bounds.left + bounds.width / 2 - full.left - full.width / 2) < 1);+ check.ok(Math.abs(bounds.top + bounds.height / 2 - full.top - full.height / 2) < 1);+ check.equal(getComputedStyle(guide).borderTopStyle, "dashed");+ button("listMindmapDocumentLayout").click();+ check.equal(guide.hidden, true);+ button("listMindmapDocumentLayout").click();+ button("exitFullscreen").click();+ await settle();+ equalCenter(documentCenter);+ check.deepEqual([view.scale, view.offsetX, view.offsetY], documentTransform,+ "an unchanged round trip restores the document transform");+ check.equal(guide.hidden, true);++ button("fullscreen").click();+ await settle();+ button("listMindmapDocumentLayout").click();+ if (mobile) {+ const touches = (distance: number) => [0, 1].map(index => new Touch({identifier: index,+ target: viewport, clientX: full.left + full.width / 2 + (index ? distance : -distance),+ clientY: full.top + full.height / 2}));+ viewport.dispatchEvent(new TouchEvent("touchstart", {touches: touches(50), cancelable: true}));+ viewport.dispatchEvent(new TouchEvent("touchmove", {touches: touches(60), cancelable: true}));+ viewport.dispatchEvent(new TouchEvent("touchend", {touches: [], cancelable: true}));+ check.ok(view.scale > scale, "two fingers can zoom through the document frame");+ } else {+ viewport.dispatchEvent(new WheelEvent("wheel", {deltaX: 12, deltaY: 8,+ bubbles: true, cancelable: true}));+ const slider = host.querySelector<HTMLInputElement>(".mindmap-view__zoom-actions input");+ slider.value = "150";+ slider.dispatchEvent(new Event("input", {bubbles: true}));+ check.equal(view.scale, 1.5);+ }+ const adjusted = center();+ const adjustedScale = view.scale;+ const root = host.querySelector<HTMLElement>(".mindmap-view__node");+ const preview = root.getBoundingClientRect();+ const previewPosition = [preview.left - bounds.left, preview.top - bounds.top];+ view.setReadOnly(true);+ check.equal(guide.hidden, false, "control refresh preserves the preview");+ check.equal(button("listMindmapDocumentLayout").getAttribute("aria-pressed"), "true");+ host.dispatchEvent(new KeyboardEvent("keydown", {key: "Escape", bubbles: true}));+ await settle();+ equalCenter(adjusted);+ check.equal(view.scale, adjustedScale);+ check.equal(host.parentElement, parent);+ check.equal(host.style.cssText, initialStyle);+ check.equal(guide.hidden, true);+ const restored = root.getBoundingClientRect();+ const documentBounds = viewport.getBoundingClientRect();+ check.ok(Math.abs(restored.left - documentBounds.left - previewPosition[0]) < 1 &&+ Math.abs(restored.top - documentBounds.top - previewPosition[1]) < 1,+ "the document matches the frame preview after pan and zoom");+ check.equal(list.outerHTML, originalSource);+ view.setReadOnly(false);+ }+ const rapid = center();+ button("fullscreen").click();+ button("exitFullscreen").click();+ await settle();+ equalCenter(rapid);+ button("fullscreen").click();+ await settle();+ button("listMindmapDocumentLayout").click();+ viewport.dispatchEvent(new WheelEvent("wheel", {deltaX: -100000, bubbles: true, cancelable: true}));+ const croppedCenter = center();+ button("exitFullscreen").click();+ await settle();+ equalCenter(croppedCenter);+ view.refreshLayout();+ await settle();+ equalCenter(croppedCenter);+ button("fullscreen").click();+ await settle();+ button("listMindmapDocumentLayout").click();+ view.setLocked(true);+ check.equal(guide.hidden, true, "locked maps hide the layout preview");+ check.equal(button("listMindmapDocumentLayout"), null);+ view.destroy();+ check.equal(host.parentElement, parent);+ check.equal(host.classList.contains("fullscreen"), false);+ check.equal(Array.from(parent.childNodes).some(node => node.nodeType === Node.COMMENT_NODE), false);+ parent.remove();+ }+ }+ return "Mindmap fullscreen cases passed";+};++test("fullscreen preserves the viewport and previews the document layout on desktop and touch screens", {+ skip: process.platform === "linux" && !process.env.DISPLAY && !process.env.WAYLAND_DISPLAY,+ timeout: 30000,+}, async () => {+ const source = ["../av/richTextValue.ts", "summary.ts", "connectors.ts", "model.ts", "fold.ts", "routing.ts", "pan.ts", "view.ts"]+ .map(file => transpileModule(readFileSync(path.join(__dirname, file), "utf8")+ .replace(/^import [\s\S]*?;\r?\n/gm, "").replace(/^export /gm, ""), {+ compilerOptions: {target: ScriptTarget.ES2021},+ }).outputText).join("\n");+ const css = ["business/_block.scss", "protyle/_mindmap-view.scss"].map(file => require("sass").compile(+ path.resolve(__dirname, "../../../assets/scss", file), {logger: require("sass").Logger.silent}).css).join("\n");+ const temporary = mkdtempSync(path.join(tmpdir(), "siyuan-mindmap-fullscreen-"));+ const script = path.join(temporary, "run.cjs");+ const lute = path.resolve(__dirname, "../../../../stage/protyle/js/lute/lute.min.js");+ writeFileSync(script, `const {app, BrowserWindow} = require("electron");+app.setPath("userData", ${JSON.stringify(path.join(temporary, "profile"))});+app.commandLine.appendSwitch("disable-gpu");+app.whenReady().then(async () => {+ const win = new BrowserWindow({show: false, webPreferences: {nodeIntegration: true, contextIsolation: false, offscreen: true}});+ try {+ await win.loadURL("data:text/html,<html><body></body></html>");+ await win.webContents.executeJavaScript(require("node:fs").readFileSync(${JSON.stringify(lute)}, "utf8"));+ console.log(await win.webContents.executeJavaScript(${JSON.stringify(+ `const __name = value => value; (${browserCases.toString()})(${JSON.stringify(source)}, ${JSON.stringify(css)})`)}));+ win.destroy();+ app.exit(0);+ } catch (error) {+ console.error(error);+ win.destroy();+ app.exit(1);+ }+});`, "utf8");+ const env = {...process.env};+ delete env.ELECTRON_RUN_AS_NODE;+ try {+ const result = await promisify(execFile)(require("electron") as unknown as string, [script], {+ env, timeout: 25000, windowsHide: true,+ });+ assert.match(result.stdout, /Mindmap fullscreen cases passed/);+ } finally {+ rmSync(temporary, {recursive: true, force: true});+ }+});diff --git a/app/src/protyle/render/listMindmap/model.test.ts b/app/src/protyle/render/listMindmap/model.test.tsindex 247bad2a18..8613db1c3d 100644--- a/app/src/protyle/render/listMindmap/model.test.ts+++ b/app/src/protyle/render/listMindmap/model.test.ts@@ -1469,6 +1469,9 @@ const browserCases = async (sourceCode: string, css: string, taskSource: string,check.equal(getComputedStyle(navigationToolbar).backgroundColor, "rgba(0, 0, 0, 0)","the unused toolbar area leaves the map visible");for (const control of Array.from(group.children)) {+ if ((control as HTMLElement).hidden) {+ continue;+ }const rect = control.getBoundingClientRect();check.ok(rect.left >= groupBounds.left && rect.right <= groupBounds.right + 1 &&rect.top >= groupBounds.top && rect.bottom <= groupBounds.bottom + 1,@@ -1951,6 +1954,9 @@ const browserCases = async (sourceCode: string, css: string, taskSource: string,toolbarZoom.focus();const bounds = host.getBoundingClientRect();for (const control of Array.from(toolbarGroup.children) as HTMLElement[]) {+ if (control.hidden) {+ continue;+ }const rect = control.getBoundingClientRect();check.ok(rect.left >= bounds.left && rect.right <= bounds.right,`toolbar control stays inside the map, width=${width}, fontSize=${fontSize}`);diff --git a/app/src/protyle/render/listMindmap/view.ts b/app/src/protyle/render/listMindmap/view.tsindex ed8036a1b3..5196514b1c 100644--- a/app/src/protyle/render/listMindmap/view.ts+++ b/app/src/protyle/render/listMindmap/view.ts@@ -187,6 +187,9 @@ export class ListMindmapView {private destroyed = false;private readonly resizeObserver: ResizeObserver;private fullscreenMarker?: Comment;+ private documentViewport?: {width: number, height: number};+ private viewportCenter?: {x: number, y: number};+ private readonly documentFrame = createElement("div", "mindmap-view__document-frame");private readonly disposers: (() => void)[] = [];private printTransform?: {scale: number, offsetX: number, offsetY: number};@@ -214,6 +217,9 @@ export class ListMindmapView {this.inspector.hidden = true;this.zoomLabel = createElement("span", "mindmap-view__zoom");this.viewport.append(this.canvas, this.world);+ this.documentFrame.hidden = true;+ this.documentFrame.setAttribute("aria-hidden", "true");+ this.viewport.append(this.documentFrame);this.tooltip.hidden = true;this.tooltip.setAttribute("role", "tooltip");this.colorProbe.setAttribute("aria-hidden", "true");@@ -644,6 +650,14 @@ export class ListMindmapView {zoomControl.append(this.zoomLabel, zoomActions);controls.append(zoomControl);add("fit", "listMindmapFit", "iconFocus", () => this.fit());+ add("documentLayout", "listMindmapDocumentLayout", "iconLayout", () => {+ this.documentFrame.hidden = !this.documentFrame.hidden;+ const button = this.buttons.get("documentLayout");+ button.classList.toggle("block__icon--active", !this.documentFrame.hidden);+ button.setAttribute("aria-pressed", String(!this.documentFrame.hidden));+ });+ this.buttons.get("documentLayout").hidden = !this.fullscreenMarker;+ this.buttons.get("documentLayout").setAttribute("aria-pressed", String(!this.documentFrame.hidden));add("fullscreen", "fullscreen", "iconFullscreen", () => this.toggleFullscreen());}@@ -1022,6 +1036,8 @@ export class ListMindmapView {if (!this.viewport.clientWidth || !this.viewport.clientHeight) {return;}+ const previousPositions = this.positions;+ const previousSummaries = this.summaryPositions;// 同一帧内先恢复测量,布局完成后再隐藏折叠后代,避免展开时读取到零尺寸。this.nodeElements.forEach(element => element.hidden = false);const makeLayoutNode = (id: string): ListMindmapLayoutNode => {@@ -1156,15 +1172,38 @@ export class ListMindmapView {this.model.nodes.get(this.foldAnchor.id)?.collapsed) === this.foldAnchor.collapsed) {this.foldAnchor = undefined;}+ const center = this.viewportCenter;+ this.viewportCenter = undefined;+ if (center && !this.initialFit) {+ this.offsetX = this.viewport.clientWidth / 2 - center.x * this.scale;+ this.offsetY = this.viewport.clientHeight / 2 - center.y * this.scale;+ }if (this.printTransform || this.options.printLayout) {this.fitPrint();} else if (this.initialFit) {this.initialFit = false;this.fit();+ } else if (center) {+ this.draw();} else {- const bounded = this.boundedPan(this.offsetX, this.offsetY);- this.offsetX = bounded.x;- this.offsetY = bounded.y;+ // 内容布局未变化时保留当前取景,避免全屏裁切后被尺寸通知重新拉回。+ const changed = previousPositions.size !== this.positions.size ||+ [...this.positions].some(([id, position]) => {+ const previous = previousPositions.get(id);+ return !previous || previous.x !== position.x || previous.y !== position.y ||+ previous.width !== position.width || previous.height !== position.height;+ }) || previousSummaries.size !== this.summaryPositions.size ||+ [...this.summaryPositions].some(([id, position]) => {+ const previous = previousSummaries.get(id);+ return !previous || previous.x !== position.x || previous.top !== position.top ||+ previous.bottom !== position.bottom || previous.labelX !== position.labelX ||+ previous.labelY !== position.labelY || previous.width !== position.width || previous.height !== position.height;+ });+ if (changed) {+ const bounded = this.boundedPan(this.offsetX, this.offsetY);+ this.offsetX = bounded.x;+ this.offsetY = bounded.y;+ }this.draw();}});@@ -3372,6 +3411,8 @@ export class ListMindmapView {if (this.destroyed || this.fullscreenMarker) {return;}+ this.documentViewport = {width: this.viewport.clientWidth, height: this.viewport.clientHeight};+ this.captureViewportCenter();// 移到独立容器,避免编辑器祖先的变换和裁剪改变全屏覆盖范围。this.fullscreenMarker = document.createComment("mindmap-view");this.options.host.before(this.fullscreenMarker);@@ -3387,6 +3428,7 @@ export class ListMindmapView {if (!this.fullscreenMarker) {return;}+ this.captureViewportCenter();this.options.onFullscreen?.(false, this.buttons.get("fullscreen"));this.options.host.classList.remove("fullscreen");this.fullscreenMarker.replaceWith(this.options.host);@@ -3404,10 +3446,31 @@ export class ListMindmapView {const button = this.buttons.get("fullscreen");button.setAttribute("aria-label", this.label(active ? "exitFullscreen" : "fullscreen"));button.querySelector("use").setAttribute("xlink:href", active ? "#iconFullscreenExit" : "#iconFullscreen");- this.initialFit = true;+ const layout = this.buttons.get("documentLayout");+ if (layout) {+ layout.hidden = !active;+ layout.classList.toggle("block__icon--active", !this.documentFrame.hidden && active);+ layout.setAttribute("aria-pressed", String(!this.documentFrame.hidden && active));+ }+ if (!active || this.locked) {+ this.documentFrame.hidden = true;+ }+ if (active && this.documentViewport) {+ this.documentFrame.style.width = `${this.documentViewport.width}px`;+ this.documentFrame.style.height = `${this.documentViewport.height}px`;+ }this.refreshLayout();};+ private captureViewportCenter() {+ if (!this.initialFit && !this.viewportCenter) {+ this.viewportCenter = {+ x: (this.viewport.clientWidth / 2 - this.offsetX) / this.scale,+ y: (this.viewport.clientHeight / 2 - this.offsetY) / this.scale,+ };+ }+ }+public destroy() {this.finishSummaryEdit?.(false);this.finishRelationEdit?.(false);