dsh-mnemon-source-documents 0.5.7 → 0.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/client.js
CHANGED
|
@@ -34,9 +34,8 @@ window.__ModuleLoader__.load({
|
|
|
34
34
|
var zh = {
|
|
35
35
|
"nav.documents": "档案",
|
|
36
36
|
"documents.title": "项目档案",
|
|
37
|
-
"documents.description": "
|
|
37
|
+
"documents.description": "当前工作区的项目文档:先检索,再按需阅读全文;接近容量上限时,最久未用的档案会归档。",
|
|
38
38
|
"documents.capacity": "{used} / {limit}",
|
|
39
|
-
"documents.refresh": "刷新",
|
|
40
39
|
"documents.summary": "档案存储摘要",
|
|
41
40
|
"documents.active": "活跃档案",
|
|
42
41
|
"documents.activeHint": "近场检索范围",
|
|
@@ -96,9 +95,8 @@ window.__ModuleLoader__.load({
|
|
|
96
95
|
var en = {
|
|
97
96
|
"nav.documents": "Documents",
|
|
98
97
|
"documents.title": "Project Documents",
|
|
99
|
-
"documents.description": "
|
|
98
|
+
"documents.description": "Project documents for this workspace: searched first, read in full when needed; near the limit the least-used ones are archived.",
|
|
100
99
|
"documents.capacity": "{used} / {limit}",
|
|
101
|
-
"documents.refresh": "Refresh",
|
|
102
100
|
"documents.summary": "Document storage summary",
|
|
103
101
|
"documents.active": "Active",
|
|
104
102
|
"documents.activeHint": "Near-field search scope",
|
|
@@ -157,7 +155,7 @@ window.__ModuleLoader__.load({
|
|
|
157
155
|
};
|
|
158
156
|
//#endregion
|
|
159
157
|
//#region \0source-css:/home/runner/work/dsh-mnemon/dsh-mnemon/plugins/dsh-mnemon-source-documents/presentation/page.module.css.mjs
|
|
160
|
-
const css$2 = ".IIa07q_documentSummary{grid-template-columns:.7fr .7fr 1.6fr;gap:12px;margin-bottom:12px;display:grid}.IIa07q_documentSummary article{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);min-width:0;min-height:92px;padding:14px 16px}.IIa07q_documentSummary article>span{color:var(--mn-faint);font-size:12px;line-height:18px;display:block}.IIa07q_documentSummary article>strong{font-variant-numeric:tabular-nums;margin:4px 0 2px;font-size:20px;font-weight:500;line-height:28px;display:block}.IIa07q_documentSummary article>small{color:var(--mn-faint);font-size:12px;line-height:18px}.IIa07q_documentCapacity>div{background:var(--mn-fill);border-radius:999px;height:4px;margin:8px 0 6px;overflow:hidden}.IIa07q_documentCapacity>div i{border-radius:inherit;background:var(--dsw-alias-brand-primary);height:100%;transition:width .3s;display:block}.IIa07q_documentToolbar{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);align-items:center;gap:8px;margin-bottom:12px;padding:8px;display:flex}.IIa07q_documentToolbar form{flex:1;grid-template-columns:20px minmax(0,1fr) auto;align-items:center;gap:6px;min-width:260px;padding-left:8px;display:grid}.IIa07q_documentToolbar form>span{color:var(--mn-faint);font-size:15px;line-height:1}.IIa07q_documentToolbar input,.IIa07q_documentEditor input,.IIa07q_documentEditor textarea{border:.5px solid var(--mn-field-line);border-radius:var(--dsw-radius-md);width:100%;color:var(--mn-text);background:var(--mn-input);outline:0;padding:6px 10px;font-size:13px;line-height:20px}.IIa07q_documentToolbar input{background:0 0;border-color:#0000;height:32px}.IIa07q_documentToolbar input::placeholder{color:var(--dsw-alias-label-dimmed)}.IIa07q_documentToolbar input:focus,.IIa07q_documentEditor input:focus,.IIa07q_documentEditor textarea:focus{border-color:var(--mn-accent)}.IIa07q_documentToolbar>div{border-radius:var(--dsw-radius-md);background:var(--mn-hover);align-items:center;gap:2px;padding:3px;display:flex}.IIa07q_documentToolbar>div button{border-radius:var(--dsw-radius-sm);min-height:28px;color:var(--mn-muted);cursor:pointer;background:0 0;border:0;padding:0 12px;font-size:13px;font-weight:500;line-height:20px}.IIa07q_documentToolbar>div button:hover{color:var(--mn-text)}.IIa07q_documentToolbar>div button[data-active]{color:var(--mn-text);background:var(--mn-layer-1);box-shadow:var(--dsw-elevation-soft)}.IIa07q_documentToolbar>div b{color:var(--mn-faint);font-variant-numeric:tabular-nums;margin-left:6px;font-size:12px;font-weight:400}.IIa07q_documentWorkspace{grid-template-columns:minmax(250px,310px) minmax(0,1fr);gap:12px;min-height:590px;display:grid}.IIa07q_documentList,.IIa07q_documentReader{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);min-width:0;overflow:hidden}.IIa07q_documentList{align-self:stretch}.IIa07q_documentList>header{border-bottom:.5px solid var(--mn-line);min-height:44px;color:var(--mn-faint);justify-content:space-between;align-items:center;padding:0 14px;font-size:12px;line-height:18px;display:flex}.IIa07q_documentList>header code{color:var(--mn-muted)}.IIa07q_documentList>button{--mn-provider-color:var(--mn-faint);border-radius:var(--dsw-radius-md);width:calc(100% - 12px);color:var(--mn-text);text-align:left;cursor:pointer;background:0 0;border:0;margin:6px 6px 0;padding:10px 12px;transition:background-color .15s;display:block}.IIa07q_documentList>button:hover{background:var(--mn-hover)}.IIa07q_documentList>button[data-selected]{background:var(--mn-fill)}.IIa07q_documentList>button>div{justify-content:space-between;align-items:baseline;gap:12px;display:flex}.IIa07q_documentList>button strong{text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:500;line-height:20px;overflow:hidden}.IIa07q_documentList>button time{color:var(--mn-faint);font-variant-numeric:tabular-nums;flex:none;font-size:11px}.IIa07q_documentList>button p{min-height:36px;color:var(--mn-faint);-webkit-line-clamp:2;-webkit-box-orient:vertical;margin:4px 0 6px;font-size:12px;line-height:18px;display:-webkit-box;overflow:hidden}.IIa07q_documentList>button footer{color:var(--mn-faint);align-items:center;gap:8px;font-size:11px;line-height:16px;display:flex}.IIa07q_documentList>button footer code{margin-left:auto}.IIa07q_documentList>button footer em{color:var(--mn-danger);font-style:normal}.IIa07q_documentListEmpty{min-height:230px;color:var(--mn-muted);text-align:center;align-content:center;place-items:center;gap:4px;padding:24px;display:grid}.IIa07q_documentListEmpty>span{color:var(--mn-faint);margin-bottom:6px;font-size:24px;line-height:1}.IIa07q_documentListEmpty p{color:var(--mn-faint);margin:0;font-size:12px;line-height:18px}.IIa07q_documentReader{padding:clamp(16px,2vw,24px)}.IIa07q_documentReader>.IIa07q_emptyState{background:0 0;border:0;height:100%}.IIa07q_documentDetail>header{border-bottom:.5px solid var(--mn-line);justify-content:space-between;align-items:flex-start;gap:16px;padding-bottom:14px;display:flex}.IIa07q_documentDetail>header span{color:var(--mn-faint);font-size:12px;line-height:18px}.IIa07q_documentDetail>header h3{margin:2px 0;font-size:16px;font-weight:500;line-height:24px}.IIa07q_documentDetail>header p{color:var(--mn-faint);margin:0;font-size:12px;line-height:18px}.IIa07q_documentDetail>dl{border:.5px solid var(--mn-line);border-radius:var(--dsw-radius-md);grid-template-columns:2fr .45fr .8fr .55fr;margin:12px 0;display:grid;overflow:hidden}.IIa07q_documentDetail>dl>div{min-width:0;padding:8px 10px}.IIa07q_documentDetail>dl>div+div{border-left:.5px solid var(--mn-line)}.IIa07q_documentDetail dt{color:var(--mn-faint);margin-bottom:2px;font-size:11px;line-height:16px}.IIa07q_documentDetail dd{text-overflow:ellipsis;white-space:nowrap;margin:0;font-size:12px;line-height:18px;overflow:hidden}.IIa07q_documentSources{flex-wrap:wrap;align-items:center;gap:6px;margin:12px 0;display:flex}.IIa07q_documentSources>span{color:var(--mn-faint);margin-right:4px;font-size:12px}.IIa07q_documentSources code,.IIa07q_documentArchiveReceipt code{color:var(--mn-muted);background:var(--mn-fill);border-radius:999px;padding:1px 8px;font-size:11px;line-height:17px}.IIa07q_markdownBody{overflow-wrap:anywhere;border:.5px solid var(--mn-line);border-radius:var(--dsw-radius-md);min-height:310px;color:var(--mn-text);margin:16px 0 0;padding:clamp(16px,2.5vw,28px);font-size:14px;line-height:1.75}.IIa07q_markdownBody>:first-child{margin-top:0}.IIa07q_markdownBody>:last-child{margin-bottom:0}.IIa07q_markdownBody h1,.IIa07q_markdownBody h2,.IIa07q_markdownBody h3,.IIa07q_markdownBody h4{color:var(--mn-text);margin:1.5em 0 .6em;font-weight:500;line-height:1.35}.IIa07q_markdownBody h1{border-bottom:.5px solid var(--mn-line);padding-bottom:.35em;font-size:1.6em}.IIa07q_markdownBody h2{border-bottom:.5px solid var(--mn-line);padding-bottom:.3em;font-size:1.35em}.IIa07q_markdownBody h3{font-size:1.15em}.IIa07q_markdownBody p,.IIa07q_markdownBody ul,.IIa07q_markdownBody ol,.IIa07q_markdownBody blockquote,.IIa07q_markdownBody table,.IIa07q_markdownBody pre{margin:.85em 0}.IIa07q_markdownBody ul,.IIa07q_markdownBody ol{padding-left:1.6em}.IIa07q_markdownBody li+li{margin-top:.3em}.IIa07q_markdownBody blockquote{border-left:2px solid var(--mn-line-strong);color:var(--mn-muted);margin-inline:0;padding:.1em 1em}.IIa07q_markdownBody code{border-radius:var(--dsw-radius-xs);color:var(--mn-text);background:var(--dsw-alias-markdown-inline-code,var(--mn-fill));font:.88em/1.55 var(--mn-code);padding:.15em .4em}.IIa07q_markdownBody pre{border-radius:var(--dsw-radius-md);background:var(--dsw-alias-markdown-code-block,var(--mn-fill));max-width:100%;padding:12px 16px;overflow:auto}.IIa07q_markdownBody pre code{background:0 0;padding:0;font-size:12px}.IIa07q_markdownBody a{color:var(--dsw-alias-link,var(--mn-accent));text-underline-offset:3px;text-decoration-thickness:1px}.IIa07q_markdownBody hr{border:0;border-top:.5px solid var(--mn-line);margin:1.8em 0}.IIa07q_markdownBody table{border-collapse:collapse;max-width:100%;display:block;overflow-x:auto}.IIa07q_markdownBody th,.IIa07q_markdownBody td{border:.5px solid var(--mn-line);text-align:left;vertical-align:top;padding:8px 10px}.IIa07q_markdownBody th{background:var(--mn-fill);font-weight:500}.IIa07q_markdownBody img{border-radius:var(--dsw-radius-sm);max-width:100%;height:auto}.IIa07q_documentArchiveReceipt{border-radius:var(--dsw-radius-md);background:color-mix(in srgb, var(--mn-success) 8%, transparent);margin:12px 0;padding:10px 12px}.IIa07q_documentArchiveReceipt p{color:var(--mn-muted);margin:2px 0 8px;font-size:12px;line-height:18px}.IIa07q_documentArchiveReceipt div{flex-wrap:wrap;gap:6px;display:flex}.IIa07q_documentDanger{border-top:.5px solid var(--mn-line);justify-content:flex-end;align-items:center;gap:8px;min-height:56px;margin-top:12px;padding-top:12px;display:flex}.IIa07q_documentDanger>div{margin-right:auto}.IIa07q_documentDanger strong{font-size:13px;font-weight:500;line-height:20px;display:block}.IIa07q_documentDanger p{color:var(--mn-faint);margin:2px 0 0;font-size:12px;line-height:18px}.IIa07q_documentDanger>span{color:var(--mn-danger);margin-right:auto;font-size:12px}.IIa07q_documentEditor{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);margin-bottom:12px;padding:16px}.IIa07q_documentReader>.IIa07q_documentEditor{background:0 0;border:0;margin:0;padding:0}.IIa07q_documentEditor>header{justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:12px;display:flex}.IIa07q_documentEditor h3{margin:0;font-size:14px;font-weight:500;line-height:22px}.IIa07q_documentEditor header p{color:var(--mn-faint);margin:2px 0 0;font-size:12px;line-height:18px}.IIa07q_documentEditor header>span,.IIa07q_documentEditor header>code{color:var(--mn-muted);background:var(--mn-fill);border-radius:999px;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.IIa07q_documentEditor label{color:var(--mn-muted);gap:6px;margin-top:12px;font-size:12px;font-weight:500;line-height:18px;display:grid}.IIa07q_documentEditor textarea{resize:vertical;line-height:1.65}.IIa07q_documentEditorMeta{grid-template-columns:.8fr 1.2fr;gap:12px;display:grid}.IIa07q_documentEditorMeta label{margin:0}.IIa07q_documentEditor footer{justify-content:flex-end;gap:8px;margin-top:12px;display:flex}@media (width<=1000px){.IIa07q_documentWorkspace{grid-template-columns:minmax(220px,270px) minmax(0,1fr)}.IIa07q_documentDetail>dl{grid-template-columns:repeat(2,minmax(0,1fr))}.IIa07q_documentDetail>dl>div+div{border-left:0}.IIa07q_documentDetail>dl>div:nth-child(2n){border-left:.5px solid var(--mn-line)}.IIa07q_documentDetail>dl>div:nth-child(n+3){border-top:.5px solid var(--mn-line)}}@media (width<=760px){.IIa07q_documentSummary{grid-template-columns:repeat(2,minmax(0,1fr))}.IIa07q_documentCapacity{grid-column:1/-1}.IIa07q_documentToolbar{flex-direction:column;align-items:stretch}.IIa07q_documentToolbar form{min-width:0}.IIa07q_documentToolbar>div,.IIa07q_documentToolbar>button{width:100%}.IIa07q_documentToolbar>div button{flex:1}.IIa07q_documentWorkspace{grid-template-columns:1fr;min-height:0}.IIa07q_documentList{-webkit-overflow-scrolling:touch;max-height:330px;overflow:auto}.IIa07q_documentReader{min-height:430px}.IIa07q_documentEditorMeta{grid-template-columns:1fr}}@media (width<=520px){.IIa07q_documentDetail>header,.IIa07q_documentDanger{flex-direction:column;align-items:flex-start}.IIa07q_documentDetail>header>div:last-child,.IIa07q_documentDetail>header button{width:100%}.IIa07q_documentDanger>div,.IIa07q_documentDanger>span{margin-right:0}.IIa07q_documentDanger>button{width:100%}.IIa07q_documentDetail>dl{grid-template-columns:1fr}.IIa07q_documentDetail>dl>div:nth-child(2n){border-left:0}.IIa07q_documentDetail>dl>div+div{border-top:.5px solid var(--mn-line)}.IIa07q_markdownBody{padding:16px;font-size:13px}}";
|
|
158
|
+
const css$2 = ".IIa07q_documentSummary{grid-template-columns:.7fr .7fr 1.6fr;gap:12px;margin-bottom:12px;display:grid}.IIa07q_documentSummary article{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);min-width:0;min-height:92px;padding:14px 16px}.IIa07q_documentSummary article>span{color:var(--mn-faint);font-size:12px;line-height:18px;display:block}.IIa07q_documentSummary article>strong{font-variant-numeric:tabular-nums;margin:4px 0 2px;font-size:20px;font-weight:500;line-height:28px;display:block}.IIa07q_documentSummary article>small{color:var(--mn-faint);font-size:12px;line-height:18px}.IIa07q_documentCapacity>div{background:var(--mn-fill);border-radius:999px;height:4px;margin:8px 0 6px;overflow:hidden}.IIa07q_documentCapacity>div i{border-radius:inherit;background:var(--dsw-alias-brand-primary);height:100%;transition:width .3s;display:block}.IIa07q_documentToolbar{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);align-items:center;gap:8px;margin-bottom:12px;padding:8px;display:flex}.IIa07q_documentToolbar form{flex:1;align-items:center;gap:8px;min-width:260px;display:flex}.IIa07q_documentSearch{flex:1}.IIa07q_documentEditor input,.IIa07q_documentEditor textarea{border:.5px solid var(--mn-field-line);border-radius:var(--dsw-radius-md);width:100%;color:var(--mn-text);background:var(--mn-input);outline:0;padding:6px 10px;font-size:13px;line-height:20px}.IIa07q_documentEditor input:focus,.IIa07q_documentEditor textarea:focus{border-color:var(--mn-accent)}.IIa07q_documentToolbar>div{border-radius:var(--dsw-radius-md);background:var(--mn-hover);align-items:center;gap:2px;padding:3px;display:flex}.IIa07q_documentToolbar>div button{border-radius:var(--dsw-radius-sm);min-height:28px;color:var(--mn-muted);cursor:pointer;background:0 0;border:0;padding:0 12px;font-size:13px;font-weight:500;line-height:20px}.IIa07q_documentToolbar>div button:hover{color:var(--mn-text)}.IIa07q_documentToolbar>div button[data-active]{color:var(--mn-text);background:var(--mn-layer-1);box-shadow:var(--dsw-elevation-soft)}.IIa07q_documentToolbar>div b{color:var(--mn-faint);font-variant-numeric:tabular-nums;margin-left:6px;font-size:12px;font-weight:400}.IIa07q_documentWorkspace{grid-template-columns:minmax(250px,310px) minmax(0,1fr);gap:12px;min-height:590px;display:grid}.IIa07q_documentList,.IIa07q_documentReader{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);min-width:0;overflow:hidden}.IIa07q_documentList{align-self:stretch}.IIa07q_documentList>header{border-bottom:.5px solid var(--mn-line);min-height:44px;color:var(--mn-faint);justify-content:space-between;align-items:center;padding:0 14px;font-size:12px;line-height:18px;display:flex}.IIa07q_documentList>header code{color:var(--mn-muted)}.IIa07q_documentList>button{--mn-provider-color:var(--mn-faint);border-radius:var(--dsw-radius-md);width:calc(100% - 12px);color:var(--mn-text);text-align:left;cursor:pointer;background:0 0;border:0;margin:6px 6px 0;padding:10px 12px;transition:background-color .15s;display:block}.IIa07q_documentList>button:hover{background:var(--mn-hover)}.IIa07q_documentList>button[data-selected]{background:var(--mn-fill)}.IIa07q_documentList>button>div{justify-content:space-between;align-items:baseline;gap:12px;display:flex}.IIa07q_documentList>button strong{text-overflow:ellipsis;white-space:nowrap;font-size:13px;font-weight:500;line-height:20px;overflow:hidden}.IIa07q_documentList>button time{color:var(--mn-faint);font-variant-numeric:tabular-nums;flex:none;font-size:11px}.IIa07q_documentList>button p{color:var(--mn-faint);-webkit-line-clamp:2;-webkit-box-orient:vertical;margin:4px 0 6px;font-size:12px;line-height:18px;display:-webkit-box;overflow:hidden}.IIa07q_documentList>button footer{color:var(--mn-faint);align-items:center;gap:8px;font-size:11px;line-height:16px;display:flex}.IIa07q_documentList>button footer code{margin-left:auto}.IIa07q_documentList>button footer em{color:var(--mn-danger);font-style:normal}.IIa07q_documentListEmpty{min-height:230px;color:var(--mn-muted);text-align:center;align-content:center;place-items:center;gap:4px;padding:24px;display:grid}.IIa07q_documentListEmpty>span{color:var(--mn-faint);margin-bottom:6px;font-size:24px;line-height:1}.IIa07q_documentListEmpty p{color:var(--mn-faint);margin:0;font-size:12px;line-height:18px}.IIa07q_documentReader{padding:clamp(16px,2vw,24px)}.IIa07q_documentReader>.IIa07q_emptyState{background:0 0;border:0;height:100%}.IIa07q_documentDetail>header{border-bottom:.5px solid var(--mn-line);justify-content:space-between;align-items:flex-start;gap:16px;padding-bottom:14px;display:flex}.IIa07q_documentDetail>header span{color:var(--mn-faint);font-size:12px;line-height:18px}.IIa07q_documentDetail>header h3{margin:2px 0;font-size:16px;font-weight:500;line-height:24px}.IIa07q_documentDetail>header p{color:var(--mn-faint);margin:0;font-size:12px;line-height:18px}.IIa07q_documentDetail>dl{border:.5px solid var(--mn-line);border-radius:var(--dsw-radius-md);grid-template-columns:2fr .45fr .8fr .55fr;margin:12px 0;display:grid;overflow:hidden}.IIa07q_documentDetail>dl>div{min-width:0;padding:8px 10px}.IIa07q_documentDetail>dl>div+div{border-left:.5px solid var(--mn-line)}.IIa07q_documentDetail dt{color:var(--mn-faint);margin-bottom:2px;font-size:11px;line-height:16px}.IIa07q_documentDetail dd{text-overflow:ellipsis;white-space:nowrap;margin:0;font-size:12px;line-height:18px;overflow:hidden}.IIa07q_documentSources{flex-wrap:wrap;align-items:center;gap:6px;margin:12px 0;display:flex}.IIa07q_documentSources>span{color:var(--mn-faint);margin-right:4px;font-size:12px}.IIa07q_documentSources code,.IIa07q_documentArchiveReceipt code{color:var(--mn-muted);background:var(--mn-fill);border-radius:999px;padding:1px 8px;font-size:11px;line-height:17px}.IIa07q_markdownBody{overflow-wrap:anywhere;border:.5px solid var(--mn-line);border-radius:var(--dsw-radius-md);min-height:310px;color:var(--mn-text);margin:16px 0 0;padding:clamp(16px,2.5vw,28px);font-size:14px;line-height:1.75}.IIa07q_markdownBody>:first-child{margin-top:0}.IIa07q_markdownBody>:last-child{margin-bottom:0}.IIa07q_markdownBody h1,.IIa07q_markdownBody h2,.IIa07q_markdownBody h3,.IIa07q_markdownBody h4{color:var(--mn-text);margin:1.5em 0 .6em;font-weight:500;line-height:1.35}.IIa07q_markdownBody h1{border-bottom:.5px solid var(--mn-line);padding-bottom:.35em;font-size:1.6em}.IIa07q_markdownBody h2{border-bottom:.5px solid var(--mn-line);padding-bottom:.3em;font-size:1.35em}.IIa07q_markdownBody h3{font-size:1.15em}.IIa07q_markdownBody p,.IIa07q_markdownBody ul,.IIa07q_markdownBody ol,.IIa07q_markdownBody blockquote,.IIa07q_markdownBody table,.IIa07q_markdownBody pre{margin:.85em 0}.IIa07q_markdownBody ul,.IIa07q_markdownBody ol{padding-left:1.6em}.IIa07q_markdownBody li+li{margin-top:.3em}.IIa07q_markdownBody blockquote{border-left:2px solid var(--mn-line-strong);color:var(--mn-muted);margin-inline:0;padding:.1em 1em}.IIa07q_markdownBody code{border-radius:var(--dsw-radius-xs);color:var(--mn-text);background:var(--dsw-alias-markdown-inline-code,var(--mn-fill));font:.88em/1.55 var(--mn-code);padding:.15em .4em}.IIa07q_markdownBody pre{border-radius:var(--dsw-radius-md);background:var(--dsw-alias-markdown-code-block,var(--mn-fill));max-width:100%;padding:12px 16px;overflow:auto}.IIa07q_markdownBody pre code{background:0 0;padding:0;font-size:12px}.IIa07q_markdownBody a{color:var(--dsw-alias-link,var(--mn-accent));text-underline-offset:3px;text-decoration-thickness:1px}.IIa07q_markdownBody hr{border:0;border-top:.5px solid var(--mn-line);margin:1.8em 0}.IIa07q_markdownBody table{border-collapse:collapse;max-width:100%;display:block;overflow-x:auto}.IIa07q_markdownBody th,.IIa07q_markdownBody td{border:.5px solid var(--mn-line);text-align:left;vertical-align:top;padding:8px 10px}.IIa07q_markdownBody th{background:var(--mn-fill);font-weight:500}.IIa07q_markdownBody img{border-radius:var(--dsw-radius-sm);max-width:100%;height:auto}.IIa07q_documentArchiveReceipt{border-radius:var(--dsw-radius-md);background:color-mix(in srgb, var(--mn-success) 8%, transparent);margin:12px 0;padding:10px 12px}.IIa07q_documentArchiveReceipt p{color:var(--mn-muted);margin:2px 0 8px;font-size:12px;line-height:18px}.IIa07q_documentArchiveReceipt div{flex-wrap:wrap;gap:6px;display:flex}.IIa07q_documentDanger{border-top:.5px solid var(--mn-line);justify-content:flex-end;align-items:center;gap:8px;min-height:56px;margin-top:12px;padding-top:12px;display:flex}.IIa07q_documentDanger>div{margin-right:auto}.IIa07q_documentDanger strong{font-size:13px;font-weight:500;line-height:20px;display:block}.IIa07q_documentDanger p{color:var(--mn-faint);margin:2px 0 0;font-size:12px;line-height:18px}.IIa07q_documentDanger>span{color:var(--mn-danger);margin-right:auto;font-size:12px}.IIa07q_documentEditor{border:.5px solid var(--mn-card-line);border-radius:var(--dsw-radius-lg);margin-bottom:12px;padding:16px}.IIa07q_documentReader>.IIa07q_documentEditor{background:0 0;border:0;margin:0;padding:0}.IIa07q_documentEditor>header{justify-content:space-between;align-items:flex-start;gap:16px;margin-bottom:12px;display:flex}.IIa07q_documentEditor h3{margin:0;font-size:14px;font-weight:500;line-height:22px}.IIa07q_documentEditor header p{color:var(--mn-faint);margin:2px 0 0;font-size:12px;line-height:18px}.IIa07q_documentEditor header>span,.IIa07q_documentEditor header>code{color:var(--mn-muted);background:var(--mn-fill);border-radius:999px;padding:1px 8px;font-size:11px;font-weight:500;line-height:17px}.IIa07q_documentEditor label{color:var(--mn-muted);gap:6px;margin-top:12px;font-size:12px;font-weight:500;line-height:18px;display:grid}.IIa07q_documentEditor textarea{resize:vertical;line-height:1.65}.IIa07q_documentEditorMeta{grid-template-columns:.8fr 1.2fr;gap:12px;display:grid}.IIa07q_documentEditorMeta label{margin:0}.IIa07q_documentEditor footer{justify-content:flex-end;gap:8px;margin-top:12px;display:flex}@media (width<=1000px){.IIa07q_documentWorkspace{grid-template-columns:minmax(220px,270px) minmax(0,1fr)}.IIa07q_documentDetail>dl{grid-template-columns:repeat(2,minmax(0,1fr))}.IIa07q_documentDetail>dl>div+div{border-left:0}.IIa07q_documentDetail>dl>div:nth-child(2n){border-left:.5px solid var(--mn-line)}.IIa07q_documentDetail>dl>div:nth-child(n+3){border-top:.5px solid var(--mn-line)}}@media (width<=760px){.IIa07q_documentSummary{grid-template-columns:repeat(2,minmax(0,1fr))}.IIa07q_documentCapacity{grid-column:1/-1}.IIa07q_documentToolbar{flex-direction:column;align-items:stretch}.IIa07q_documentToolbar form{min-width:0}.IIa07q_documentToolbar>div,.IIa07q_documentToolbar>button{width:100%}.IIa07q_documentToolbar>div button{flex:1}.IIa07q_documentWorkspace{grid-template-columns:1fr;min-height:0}.IIa07q_documentList{-webkit-overflow-scrolling:touch;max-height:330px;overflow:auto}.IIa07q_documentReader{min-height:430px}.IIa07q_documentEditorMeta{grid-template-columns:1fr}}@media (width<=520px){.IIa07q_documentDetail>header,.IIa07q_documentDanger{flex-direction:column;align-items:flex-start}.IIa07q_documentDetail>header>div:last-child,.IIa07q_documentDetail>header button{width:100%}.IIa07q_documentDanger>div,.IIa07q_documentDanger>span{margin-right:0}.IIa07q_documentDanger>button{width:100%}.IIa07q_documentDetail>dl{grid-template-columns:1fr}.IIa07q_documentDetail>dl>div:nth-child(2n){border-left:0}.IIa07q_documentDetail>dl>div+div{border-top:.5px solid var(--mn-line)}.IIa07q_markdownBody{padding:16px;font-size:13px}}";
|
|
161
159
|
const id$1 = "dsh-mnemon-source-documents/presentation/page.module.css";
|
|
162
160
|
if (typeof document !== "undefined") {
|
|
163
161
|
let tag = document.querySelector("style[data-plugin-css=" + JSON.stringify(id$1) + "]");
|
|
@@ -178,6 +176,7 @@ window.__ModuleLoader__.load({
|
|
|
178
176
|
"documentList": "IIa07q_documentList",
|
|
179
177
|
"documentListEmpty": "IIa07q_documentListEmpty",
|
|
180
178
|
"documentReader": "IIa07q_documentReader",
|
|
179
|
+
"documentSearch": "IIa07q_documentSearch",
|
|
181
180
|
"documentSources": "IIa07q_documentSources",
|
|
182
181
|
"documentSummary": "IIa07q_documentSummary",
|
|
183
182
|
"documentToolbar": "IIa07q_documentToolbar",
|
|
@@ -1175,7 +1174,7 @@ window.__ModuleLoader__.load({
|
|
|
1175
1174
|
const [snapshot, setSnapshot] = (0, react.useState)(null);
|
|
1176
1175
|
const [items, setItems] = (0, react.useState)([]);
|
|
1177
1176
|
const [visibleLimit, setVisibleLimit] = (0, react.useState)(pageSize);
|
|
1178
|
-
const [selectedId, setSelectedId] = (0, react.useState)(null);
|
|
1177
|
+
const [selectedId, setSelectedId] = (0, react.useState)(props.documentId ?? null);
|
|
1179
1178
|
const [selected, setSelected] = (0, react.useState)(null);
|
|
1180
1179
|
const [status, setStatus] = (0, react.useState)("active");
|
|
1181
1180
|
const [query, setQuery] = (0, react.useState)("");
|
|
@@ -1434,18 +1433,12 @@ window.__ModuleLoader__.load({
|
|
|
1434
1433
|
used: (0, dsh_mnemon_client.humanBytes)(snapshot.activeBytes),
|
|
1435
1434
|
limit: (0, dsh_mnemon_client.humanBytes)(snapshot.limitBytes)
|
|
1436
1435
|
}),
|
|
1437
|
-
|
|
1438
|
-
type: "button",
|
|
1439
|
-
className: css.secondaryButton,
|
|
1440
|
-
disabled: loading,
|
|
1441
|
-
onClick: () => void display(query, status),
|
|
1442
|
-
children: t("documents.refresh")
|
|
1443
|
-
}), props.writeEnabled && (props.canCreate ?? props.sessionId !== void 0) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1436
|
+
...props.writeEnabled && (props.canCreate ?? props.sessionId !== void 0) ? { action: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1444
1437
|
type: "button",
|
|
1445
1438
|
className: css.primaryButton,
|
|
1446
1439
|
onClick: startComposer,
|
|
1447
1440
|
children: t("documents.new")
|
|
1448
|
-
})
|
|
1441
|
+
}) } : {}
|
|
1449
1442
|
}),
|
|
1450
1443
|
error !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
1451
1444
|
className: css.inlineError,
|
|
@@ -1489,23 +1482,17 @@ window.__ModuleLoader__.load({
|
|
|
1489
1482
|
event.preventDefault();
|
|
1490
1483
|
display(query, status);
|
|
1491
1484
|
},
|
|
1492
|
-
children: [
|
|
1493
|
-
|
|
1494
|
-
|
|
1495
|
-
|
|
1496
|
-
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1504
|
-
type: "submit",
|
|
1505
|
-
className: css.secondaryButton,
|
|
1506
|
-
children: t("documents.search")
|
|
1507
|
-
})
|
|
1508
|
-
]
|
|
1485
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(dsh_mnemon_client.SearchField, {
|
|
1486
|
+
className: css.documentSearch,
|
|
1487
|
+
label: t("documents.searchAria"),
|
|
1488
|
+
value: query,
|
|
1489
|
+
onChange: (event) => setQuery(event.target.value),
|
|
1490
|
+
placeholder: t("documents.searchPlaceholder")
|
|
1491
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1492
|
+
type: "submit",
|
|
1493
|
+
className: css.secondaryButton,
|
|
1494
|
+
children: t("documents.search")
|
|
1495
|
+
})]
|
|
1509
1496
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1510
1497
|
role: "group",
|
|
1511
1498
|
"aria-label": t("documents.scope"),
|
|
@@ -1548,11 +1535,7 @@ window.__ModuleLoader__.load({
|
|
|
1548
1535
|
children: new Date(document.createdAt).toLocaleDateString(locale)
|
|
1549
1536
|
})] }),
|
|
1550
1537
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: document.description || document.excerpt || t("documents.noDescription") }),
|
|
1551
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("footer", { children: [
|
|
1552
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: (0, dsh_mnemon_client.humanBytes)(document.sizeBytes) }),
|
|
1553
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: document.id.slice(0, 8) }),
|
|
1554
|
-
document.healthy === false && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("em", { children: t("documents.missing") })
|
|
1555
|
-
] })
|
|
1538
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("footer", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: (0, dsh_mnemon_client.humanBytes)(document.sizeBytes) }), document.healthy === false && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("em", { children: t("documents.missing") })] })
|
|
1556
1539
|
]
|
|
1557
1540
|
}, document.id)),
|
|
1558
1541
|
!loading && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(dsh_mnemon_client.ProgressiveFooter, {
|
|
@@ -1643,7 +1626,7 @@ window.__ModuleLoader__.load({
|
|
|
1643
1626
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1644
1627
|
type: "button",
|
|
1645
1628
|
"data-dialog-close": true,
|
|
1646
|
-
className: css.
|
|
1629
|
+
className: css.secondaryButton,
|
|
1647
1630
|
disabled: saving,
|
|
1648
1631
|
onClick: resetComposer,
|
|
1649
1632
|
children: t("common.cancel")
|
|
@@ -1667,7 +1650,7 @@ window.__ModuleLoader__.load({
|
|
|
1667
1650
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1668
1651
|
type: "button",
|
|
1669
1652
|
"data-dialog-close": true,
|
|
1670
|
-
className: css.
|
|
1653
|
+
className: css.secondaryButton,
|
|
1671
1654
|
disabled: saving,
|
|
1672
1655
|
onClick: () => setEditing(false),
|
|
1673
1656
|
children: t("common.cancel")
|
|
@@ -1692,7 +1675,7 @@ window.__ModuleLoader__.load({
|
|
|
1692
1675
|
type: "button",
|
|
1693
1676
|
"data-dialog-close": true,
|
|
1694
1677
|
"data-autofocus": true,
|
|
1695
|
-
className: css.
|
|
1678
|
+
className: css.secondaryButton,
|
|
1696
1679
|
disabled: saving,
|
|
1697
1680
|
onClick: () => setConfirmArchive(false),
|
|
1698
1681
|
children: t("common.cancel")
|
|
@@ -1738,8 +1721,17 @@ window.__ModuleLoader__.load({
|
|
|
1738
1721
|
function DocumentsSourceView(props) {
|
|
1739
1722
|
const client = (0, react.useMemo)(() => props.management === void 0 ? void 0 : documentsPageClient(props.management), [props.management]);
|
|
1740
1723
|
const [revision, setRevision] = (0, react.useState)(0);
|
|
1724
|
+
const refreshKey = (0, react.useRef)(props.refreshKey);
|
|
1725
|
+
(0, react.useEffect)(() => {
|
|
1726
|
+
if (refreshKey.current === props.refreshKey) return;
|
|
1727
|
+
refreshKey.current = props.refreshKey;
|
|
1728
|
+
setRevision((value) => value + 1);
|
|
1729
|
+
}, [props.refreshKey]);
|
|
1741
1730
|
if (client === void 0) return null;
|
|
1731
|
+
const navigation = props.navigationInput;
|
|
1732
|
+
const focus = typeof navigation === "object" && navigation !== null && !Array.isArray(navigation) && typeof navigation.seed === "string" && navigation.seed !== "" ? navigation : void 0;
|
|
1742
1733
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DocumentsPage, {
|
|
1734
|
+
...focus === void 0 ? {} : { documentId: focus.seed },
|
|
1743
1735
|
canCreate: true,
|
|
1744
1736
|
client,
|
|
1745
1737
|
revision,
|
|
@@ -1748,7 +1740,7 @@ window.__ModuleLoader__.load({
|
|
|
1748
1740
|
setRevision((value) => value + 1);
|
|
1749
1741
|
props.onRefresh?.();
|
|
1750
1742
|
}
|
|
1751
|
-
});
|
|
1743
|
+
}, typeof focus?.nonce === "number" ? focus.nonce : 0);
|
|
1752
1744
|
}
|
|
1753
1745
|
function DocumentsSourcePage(props) {
|
|
1754
1746
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(dsh_mnemon_client.MemorySourcePageFrame, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-mnemon-source-documents",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.8",
|
|
4
4
|
"description": "Self-contained documents Source for Composable View Memory.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
},
|
|
53
53
|
"peerDependencies": {
|
|
54
54
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
55
|
-
"dsh-mnemon": "^0.5.
|
|
55
|
+
"dsh-mnemon": "^0.5.19",
|
|
56
56
|
"react": "^18.2.0"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@types/node": "^22.0.0",
|
|
62
62
|
"@types/react": "^18.3.0",
|
|
63
63
|
"@types/react-dom": "^18.3.0",
|
|
64
|
-
"dsh-mnemon": "^0.5.
|
|
64
|
+
"dsh-mnemon": "^0.5.19",
|
|
65
65
|
"jsdom": "^26.0.0",
|
|
66
66
|
"react": "^18.2.0",
|
|
67
67
|
"react-dom": "^18.2.0",
|
|
@@ -2,9 +2,8 @@
|
|
|
2
2
|
"zh": {
|
|
3
3
|
"nav.documents": "档案",
|
|
4
4
|
"documents.title": "项目档案",
|
|
5
|
-
"documents.description": "
|
|
5
|
+
"documents.description": "当前工作区的项目文档:先检索,再按需阅读全文;接近容量上限时,最久未用的档案会归档。",
|
|
6
6
|
"documents.capacity": "{used} / {limit}",
|
|
7
|
-
"documents.refresh": "刷新",
|
|
8
7
|
"documents.summary": "档案存储摘要",
|
|
9
8
|
"documents.active": "活跃档案",
|
|
10
9
|
"documents.activeHint": "近场检索范围",
|
|
@@ -64,9 +63,8 @@
|
|
|
64
63
|
"en": {
|
|
65
64
|
"nav.documents": "Documents",
|
|
66
65
|
"documents.title": "Project Documents",
|
|
67
|
-
"documents.description": "
|
|
66
|
+
"documents.description": "Project documents for this workspace: searched first, read in full when needed; near the limit the least-used ones are archived.",
|
|
68
67
|
"documents.capacity": "{used} / {limit}",
|
|
69
|
-
"documents.refresh": "Refresh",
|
|
70
68
|
"documents.summary": "Document storage summary",
|
|
71
69
|
"documents.active": "Active",
|
|
72
70
|
"documents.activeHint": "Near-field search scope",
|
|
@@ -7,14 +7,10 @@
|
|
|
7
7
|
.documentCapacity > div i { display: block; height: 100%; border-radius: inherit; background: var(--dsw-alias-brand-primary); transition: width .3s ease; }
|
|
8
8
|
|
|
9
9
|
.documentToolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 8px; border: .5px solid var(--mn-card-line); border-radius: var(--dsw-radius-lg); }
|
|
10
|
-
.documentToolbar form { display:
|
|
11
|
-
.
|
|
12
|
-
.documentToolbar input,
|
|
10
|
+
.documentToolbar form { display: flex; min-width: 260px; flex: 1; align-items: center; gap: 8px; }
|
|
11
|
+
.documentSearch { flex: 1; }
|
|
13
12
|
.documentEditor input,
|
|
14
13
|
.documentEditor textarea { width: 100%; border: .5px solid var(--mn-field-line); border-radius: var(--dsw-radius-md); outline: 0; padding: 6px 10px; color: var(--mn-text); background: var(--mn-input); font-size: 13px; line-height: 20px; }
|
|
15
|
-
.documentToolbar input { height: 32px; border-color: transparent; background: transparent; }
|
|
16
|
-
.documentToolbar input::placeholder { color: var(--dsw-alias-label-dimmed); }
|
|
17
|
-
.documentToolbar input:focus,
|
|
18
14
|
.documentEditor input:focus,
|
|
19
15
|
.documentEditor textarea:focus { border-color: var(--mn-accent); }
|
|
20
16
|
/* Filter, as the DSH SegmentedControl. */
|
|
@@ -36,7 +32,7 @@
|
|
|
36
32
|
.documentList > button > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
|
|
37
33
|
.documentList > button strong { overflow: hidden; font-size: 13px; font-weight: 500; line-height: 20px; text-overflow: ellipsis; white-space: nowrap; }
|
|
38
34
|
.documentList > button time { flex: 0 0 auto; color: var(--mn-faint); font-size: 11px; font-variant-numeric: tabular-nums; }
|
|
39
|
-
.documentList > button p { display: -webkit-box;
|
|
35
|
+
.documentList > button p { display: -webkit-box; margin: 4px 0 6px; overflow: hidden; color: var(--mn-faint); font-size: 12px; line-height: 18px; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
|
|
40
36
|
.documentList > button footer { display: flex; align-items: center; gap: 8px; color: var(--mn-faint); font-size: 11px; line-height: 16px; }
|
|
41
37
|
.documentList > button footer code { margin-left: auto; }
|
|
42
38
|
.documentList > button footer em { color: var(--mn-danger); font-style: normal; }
|