dsh-mnemon-source-documents 0.5.2 → 0.5.4

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/README.md CHANGED
@@ -1,39 +1,28 @@
1
1
  # dsh-mnemon-source-documents
2
2
 
3
- An ordinary, self-contained Source plugin. It owns its configuration, storage,
4
- projection, read/write semantics and tests; Core supplies no private controller.
5
-
6
- Install declared dependencies, then run `pnpm verify`. For unreleased SDK work,
7
- install the packed `dsh-mnemon` artifact as the development peer. This directory
8
- has no dependency on the parent repository's tsconfig, test helpers or source.
9
-
10
- Configure `dataDir` explicitly to reuse existing data. Otherwise storage is scoped
11
- to the stable Source instance id under `~/.mnemon/sources/`. The default Mnemon
12
- bundle supplies the existing storage paths without changing existing user data.
13
-
14
- This package does not auto-mount a default instance. The Starter or a user's
15
- Profile explicitly mounts its Entry. The same module can be mounted again with
16
- another Entry id and configuration; no default Strategy is installed here.
17
-
18
- ## Source-owned Client
19
-
20
- The optional ./client entry is a normal DSH Client module. This package owns
21
- its pages, browser API adapter, Host management operations, and tests. It only
22
- imports the public dsh-mnemon/client helpers; it never receives a Host Context,
23
- raw RPC transport, credentials, or an LLM View grant.
24
-
25
- The default distribution loads these same Client plugins through DSH. Each page
26
- uses Source-scoped read/mutate operations. Optional Agent-assisted cross-Source
27
- maintenance is advertised by the Host through the same scoped page client; it
28
- is not silently installed by a Source. There is one Slot owner per Source page,
29
- not a second fallback registration or copied default implementation.
30
-
31
- pnpm verify checks Host behavior and real Source-backed page interactions, then
32
- builds both Host and browser artifacts plus their public declarations. Client
33
- tests load the installed Core's browser artifact using dsh-mnemon/testing; they
34
- have no dependency on Core's repository sources or configuration files.
35
-
36
- An explicit dataDir names one document authority, even when the caller's cwd
37
- changes. The default Host adapter maps workspace/global storage as before.
38
- Standalone archival retains content locally; it does not claim cross-Source
39
- LLM distillation. Creating a document through management does not need an Agent.
3
+ Owns managed Markdown, search, revisions and local archiving. It requires a workspace identity even when storage is shared globally.
4
+
5
+ ## Use
6
+
7
+ The `dsh-mnemon` Starter installs and mounts this Source by default. The package alone does not activate an instance or select a Strategy.
8
+
9
+ For a custom Profile, mount an explicit Entry after the Host's `ctx.mnemonMemory` service is available:
10
+
11
+ ```yaml
12
+ - id: personal-documents
13
+ name: dsh-mnemon-source-documents
14
+ config:
15
+ dataDir: /absolute/path/to/personal-memory
16
+ ```
17
+
18
+ Choose an existing data authority deliberately. Without `dataDir`, each stable Source instance uses an isolated directory under `~/.mnemon/sources/`; the default Starter supplies the existing product paths. Replacing the default Source or adding a second instance requires an explicit selection Strategy, not a second implicit default role.
19
+
20
+ Manual management can create a document without a model, but it still needs a workspace in the request scope. Standalone archiving retains content locally; cross-Source LLM distillation is an optional Host workflow.
21
+
22
+ ## Source-owned UI and tests
23
+
24
+ The optional `./client` entry is an ordinary DSH Client plugin. This package owns its pages and `presentation/` resources and uses `dsh-mnemon/client` for the shared frame and scoped management client. It never receives a Host Context, credentials or another Source's controller.
25
+
26
+ From a source checkout, install the declared dependencies and run `pnpm verify` to check Host behavior, Source-backed page interactions and Host/browser artifacts. Unreleased SDK work consumes a packed `dsh-mnemon` peer, not repository aliases or copied root tests.
27
+
28
+ [Plugin development](https://github.com/omdsh-dev/dsh-mnemon/blob/main/docs/en/development/extensions.md) · [中文指南](https://github.com/omdsh-dev/dsh-mnemon/blob/main/docs/zh-CN/development/extensions.md)
package/lib/client.js CHANGED
@@ -30,6 +30,199 @@ window.__ModuleLoader__.load({
30
30
  react = __toESM(react, 1);
31
31
  let dsh_mnemon_client = require("dsh-mnemon/client");
32
32
  let react_jsx_runtime = require("react/jsx-runtime");
33
+ //#region presentation/locales.json
34
+ var zh = {
35
+ "nav.documents": "档案",
36
+ "documents.title": "项目档案",
37
+ "documents.description": "在当前工作区维护结构化的项目文档。活跃档案参与近场检索;达到 10 MB 上限前,最久未使用的档案会先在 Mnemon 中建立索引,再迁入归档。",
38
+ "documents.capacity": "{used} / {limit}",
39
+ "documents.refresh": "刷新",
40
+ "documents.summary": "档案存储摘要",
41
+ "documents.active": "活跃档案",
42
+ "documents.activeHint": "近场检索范围",
43
+ "documents.archivedCount": "归档",
44
+ "documents.archivedHint": "不占活跃容量",
45
+ "documents.activeCapacity": "活跃容量",
46
+ "documents.capacityHint": "按实际 UTF-8 文件大小计算",
47
+ "documents.searchAria": "检索项目档案",
48
+ "documents.searchPlaceholder": "搜索设计、调查、流程或交接记录…",
49
+ "documents.search": "检索",
50
+ "documents.scope": "档案范围",
51
+ "documents.new": "新建档案",
52
+ "documents.newTitle": "创建托管档案",
53
+ "documents.editTitle": "编辑活跃档案",
54
+ "documents.editorHint": "控制层会生成 frontmatter、哈希与修订号;原项目文件始终只读。",
55
+ "documents.managedCopy": "托管副本",
56
+ "documents.name": "标题",
57
+ "documents.routing": "检索说明",
58
+ "documents.sources": "来源路径",
59
+ "documents.sourcesPlaceholder": "src/index.ts, docs/architecture.md",
60
+ "documents.markdown": "Markdown 内容",
61
+ "documents.saving": "保存中…",
62
+ "documents.create": "创建档案",
63
+ "documents.save": "保存修订",
64
+ "documents.created": "已创建活跃档案。",
65
+ "documents.createdAfterArchive": "已先迁移 {count} 份旧档案,再创建活跃档案。",
66
+ "documents.updated": "已保存新的档案修订。",
67
+ "documents.updatedAfterArchive": "已先迁移 {count} 份旧档案,再保存修订。",
68
+ "documents.archived": "已建立 Mnemon 冷索引并归档;关联记忆空间:{spaces}",
69
+ "documents.list": "项目档案列表",
70
+ "documents.activeList": "活跃目录",
71
+ "documents.archiveList": "归档目录",
72
+ "documents.noDescription": "暂无检索说明。",
73
+ "documents.missing": "文件缺失",
74
+ "documents.emptyActive": "还没有活跃档案",
75
+ "documents.emptyActiveText": "复杂对话达到活动评分门槛后会自动审阅并整理档案,也可以在上方手动创建。",
76
+ "documents.emptyArchived": "还没有归档",
77
+ "documents.emptyArchivedText": "只有完成 Mnemon 索引的档案才会迁移到这里。",
78
+ "documents.reader": "档案阅读器",
79
+ "documents.selectTitle": "选择一份档案",
80
+ "documents.selectText": "在左侧查看活跃项目知识或沿 Mnemon 引用打开归档原文。",
81
+ "documents.coldArchive": "归档原文",
82
+ "documents.edit": "编辑",
83
+ "documents.path": "托管路径",
84
+ "documents.revision": "修订",
85
+ "documents.hash": "内容哈希",
86
+ "documents.size": "文件大小",
87
+ "documents.archiveReceipt": "Mnemon 冷索引回执",
88
+ "documents.archiveTitle": "迁入归档",
89
+ "documents.archiveDescription": "先由受限的独立任务 Agent 写入可检索的 Mnemon 摘要和精确路径,成功后才移动原文。",
90
+ "documents.archive": "归档",
91
+ "documents.archiveConfirm": "确认建立 Mnemon 索引并迁移这份档案?",
92
+ "documents.archiving": "索引并迁移中…",
93
+ "documents.archiveNow": "确认归档",
94
+ "documents.footnote": "`.mnemon/documents/index.json` 是控制面事实源;active 总量固定不超过 10 MB,archived 不计入上限,项目源文件不会被修改。"
95
+ };
96
+ var en = {
97
+ "nav.documents": "Documents",
98
+ "documents.title": "Project Documents",
99
+ "documents.description": "Maintain structured project documents in the current workspace. Active documents support near-field search; before the 10 MB limit is exceeded, the least-recently-used document is indexed in Mnemon and moved to the archive.",
100
+ "documents.capacity": "{used} / {limit}",
101
+ "documents.refresh": "Refresh",
102
+ "documents.summary": "Document storage summary",
103
+ "documents.active": "Active",
104
+ "documents.activeHint": "Near-field search scope",
105
+ "documents.archivedCount": "Archive",
106
+ "documents.archivedHint": "Excluded from active capacity",
107
+ "documents.activeCapacity": "Active capacity",
108
+ "documents.capacityHint": "Measured from actual UTF-8 files",
109
+ "documents.searchAria": "Search project documents",
110
+ "documents.searchPlaceholder": "Search designs, investigations, procedures, or handoffs…",
111
+ "documents.search": "Search",
112
+ "documents.scope": "Document scope",
113
+ "documents.new": "New document",
114
+ "documents.newTitle": "Create managed document",
115
+ "documents.editTitle": "Edit active document",
116
+ "documents.editorHint": "The control plane generates frontmatter, hashes, and revisions. Project source files stay read only.",
117
+ "documents.managedCopy": "Managed copy",
118
+ "documents.name": "Title",
119
+ "documents.routing": "Retrieval description",
120
+ "documents.sources": "Source paths",
121
+ "documents.sourcesPlaceholder": "src/index.ts, docs/architecture.md",
122
+ "documents.markdown": "Markdown content",
123
+ "documents.saving": "Saving…",
124
+ "documents.create": "Create document",
125
+ "documents.save": "Save revision",
126
+ "documents.created": "Active document created.",
127
+ "documents.createdAfterArchive": "Archived {count} older document(s), then created the active document.",
128
+ "documents.updated": "New document revision saved.",
129
+ "documents.updatedAfterArchive": "Archived {count} older document(s), then saved the revision.",
130
+ "documents.archived": "Mnemon cold index created and document archived; Memory Spaces: {spaces}",
131
+ "documents.list": "Project document list",
132
+ "documents.activeList": "Active directory",
133
+ "documents.archiveList": "Archive directory",
134
+ "documents.noDescription": "No retrieval description.",
135
+ "documents.missing": "File missing",
136
+ "documents.emptyActive": "No active documents yet",
137
+ "documents.emptyActiveText": "Complex work is reviewed after it reaches the activity-score gate, or you can create a Document above.",
138
+ "documents.emptyArchived": "No archives yet",
139
+ "documents.emptyArchivedText": "Only documents with a completed Mnemon index are moved here.",
140
+ "documents.reader": "Document reader",
141
+ "documents.selectTitle": "Select a document",
142
+ "documents.selectText": "Read active project knowledge or follow a Mnemon reference to an archived original.",
143
+ "documents.coldArchive": "Archived original",
144
+ "documents.edit": "Edit",
145
+ "documents.path": "Managed path",
146
+ "documents.revision": "Revision",
147
+ "documents.hash": "Content hash",
148
+ "documents.size": "File size",
149
+ "documents.archiveReceipt": "Mnemon cold-index receipt",
150
+ "documents.archiveTitle": "Move to archive",
151
+ "documents.archiveDescription": "A restricted independent task Agent first stores a searchable Mnemon summary and exact path. The original moves only after that succeeds.",
152
+ "documents.archive": "Archive",
153
+ "documents.archiveConfirm": "Create the Mnemon index and archive this document?",
154
+ "documents.archiving": "Indexing and moving…",
155
+ "documents.archiveNow": "Confirm archive",
156
+ "documents.footnote": "`.mnemon/documents/index.json` is the control-plane source of truth. active stays at or below 10 MB, archived is excluded, and project source files are never modified."
157
+ };
158
+ //#endregion
159
+ //#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:9px;margin-bottom:12px;display:grid}.IIa07q_documentSummary article{border:1px solid var(--mn-line);background:var(--mn-layer-1);border-radius:11px;min-width:0;min-height:91px;padding:13px 14px}.IIa07q_documentSummary article>span{color:var(--mn-faint);font-size:9px;display:block}.IIa07q_documentSummary article>strong{font:650 21px/1 var(--mn-code);margin:7px 0 4px;display:block}.IIa07q_documentSummary article>small{color:var(--mn-muted);font-size:9px}.IIa07q_documentCapacity>div{background:var(--mn-layer-2);border-radius:999px;height:4px;margin:7px 0 6px;overflow:hidden}.IIa07q_documentCapacity>div i{border-radius:inherit;background:var(--mn-accent);height:100%;transition:width .3s;display:block}.IIa07q_documentToolbar{border:1px solid var(--mn-line);background:var(--mn-layer-1);border-radius:11px;align-items:center;gap:9px;margin-bottom:12px;padding:9px;display:flex}.IIa07q_documentToolbar form{flex:1;grid-template-columns:20px minmax(0,1fr) auto;align-items:center;gap:5px;min-width:260px;padding-left:8px;display:grid}.IIa07q_documentToolbar form>span{color:var(--mn-faint);font:15px var(--mn-code)}.IIa07q_documentToolbar input,.IIa07q_documentEditor input,.IIa07q_documentEditor textarea{border:1px solid var(--mn-line);background:var(--mn-input);border-radius:8px;outline:0;width:100%;padding:8px 10px}.IIa07q_documentToolbar input{background:0 0;border-color:#0000;height:34px}.IIa07q_documentToolbar input:focus,.IIa07q_documentEditor input:focus,.IIa07q_documentEditor textarea:focus{border-color:var(--mn-accent)}.IIa07q_documentToolbar>div{border:1px solid var(--mn-line);background:var(--mn-layer-2);border-radius:8px;align-items:center;gap:3px;padding:3px;display:flex}.IIa07q_documentToolbar>div button{min-height:32px;color:var(--mn-muted);cursor:pointer;background:0 0;border:0;border-radius:6px;padding:0 10px;font-size:10.5px}.IIa07q_documentToolbar>div button[data-active]{color:var(--mn-text);background:var(--mn-layer-1);box-shadow:0 1px 3px color-mix(in srgb, var(--mn-text) 8%, transparent)}.IIa07q_documentToolbar>div b{color:var(--mn-faint);font:600 9px var(--mn-code);margin-left:4px}.IIa07q_documentWorkspace{grid-template-columns:minmax(250px,310px) minmax(0,1fr);gap:10px;min-height:590px;display:grid}.IIa07q_documentList,.IIa07q_documentReader{border:1px solid var(--mn-line);background:var(--mn-layer-1);border-radius:11px;min-width:0;overflow:hidden}.IIa07q_documentList{align-self:stretch}.IIa07q_documentList>header{border-bottom:1px solid var(--mn-line);min-height:42px;color:var(--mn-faint);justify-content:space-between;align-items:center;padding:0 12px;font-size:9px;display:flex}.IIa07q_documentList>header code{color:var(--mn-accent)}.IIa07q_documentList>button{--mn-provider-color:var(--mn-faint);border:1px solid var(--mn-line);width:calc(100% - 16px);color:var(--mn-text);background:linear-gradient(90deg, color-mix(in srgb, var(--mn-provider-color) 5%, var(--mn-layer-1)), var(--mn-layer-1) 34%);box-shadow:inset 3px 0 0 color-mix(in srgb, var(--mn-provider-color) 55%, transparent);text-align:left;cursor:pointer;border-radius:8px;margin:8px 8px 0;padding:11px 11px 10px 14px;transition:border-color .15s,background-color .15s,box-shadow .15s;display:block}.IIa07q_documentList>button:hover{--mn-provider-color:var(--mn-accent);border-color:color-mix(in srgb, var(--mn-accent) 28%, var(--mn-line))}.IIa07q_documentList>button[data-selected]{--mn-provider-color:var(--mn-accent);border-color:color-mix(in srgb, var(--mn-accent) 38%, var(--mn-line));background:linear-gradient(90deg, color-mix(in srgb, var(--mn-accent) 7%, var(--mn-layer-1)), var(--mn-layer-1) 38%);box-shadow:inset 3px 0 0 color-mix(in srgb, var(--mn-accent) 78%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--mn-accent) 8%, transparent)}.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:12px;overflow:hidden}.IIa07q_documentList>button time{color:var(--mn-faint);font:8px var(--mn-code);flex:none}.IIa07q_documentList>button p{min-height:30px;color:var(--mn-muted);-webkit-line-clamp:2;-webkit-box-orient:vertical;margin:6px 0 9px;font-size:10px;line-height:1.5;display:-webkit-box;overflow:hidden}.IIa07q_documentList>button footer{color:var(--mn-faint);align-items:center;gap:8px;font-size:9px;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:22px;display:grid}.IIa07q_documentListEmpty>span{color:var(--mn-accent);font:28px var(--mn-code);opacity:.6;margin-bottom:6px}.IIa07q_documentListEmpty p{color:var(--mn-faint);margin:0;font-size:10px}.IIa07q_documentReader{padding:clamp(16px,2vw,22px)}.IIa07q_documentReader>.IIa07q_emptyState{background:0 0;border:0;height:100%}.IIa07q_documentDetail>header{border-bottom:1px solid var(--mn-line);justify-content:space-between;align-items:flex-start;gap:18px;padding-bottom:15px;display:flex}.IIa07q_documentDetail>header span{color:var(--mn-accent);font:650 9px var(--mn-code);letter-spacing:.08em;text-transform:uppercase}.IIa07q_documentDetail>header h3{margin:5px 0 3px;font-size:18px}.IIa07q_documentDetail>header p{color:var(--mn-muted);margin:0;font-size:11px}.IIa07q_documentDetail>dl{border-top:1px solid var(--mn-line);border-left:1px solid var(--mn-line);grid-template-columns:2fr .45fr .8fr .55fr;margin:13px 0;display:grid}.IIa07q_documentDetail>dl>div{border-right:1px solid var(--mn-line);border-bottom:1px solid var(--mn-line);min-width:0;padding:8px 9px}.IIa07q_documentDetail dt{color:var(--mn-faint);margin-bottom:3px;font-size:8px}.IIa07q_documentDetail dd{text-overflow:ellipsis;white-space:nowrap;margin:0;font-size:9px;overflow:hidden}.IIa07q_documentSources{flex-wrap:wrap;align-items:center;gap:5px;margin:11px 0;display:flex}.IIa07q_documentSources>span{color:var(--mn-faint);margin-right:4px;font-size:9px}.IIa07q_documentSources code,.IIa07q_documentArchiveReceipt code{color:var(--mn-muted);background:var(--mn-layer-2);border-radius:5px;padding:3px 6px;font-size:8px}.IIa07q_markdownBody{overflow-wrap:anywhere;border:1px solid var(--mn-line);min-height:310px;color:var(--mn-text);background:color-mix(in srgb, var(--mn-layer-2) 30%, var(--mn-layer-1));border-radius:10px;margin:16px 0 0;padding:clamp(18px,2.5vw,28px);font-size:13px;line-height:1.78}.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);letter-spacing:-.015em;margin:1.55em 0 .65em;line-height:1.3}.IIa07q_markdownBody h1{border-bottom:1px solid var(--mn-line);padding-bottom:.35em;font-size:1.75em}.IIa07q_markdownBody h2{border-bottom:1px solid var(--mn-line);padding-bottom:.3em;font-size:1.42em}.IIa07q_markdownBody h3{font-size:1.18em}.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:3px solid var(--mn-accent);color:var(--mn-muted);background:color-mix(in srgb, var(--mn-accent) 4%, transparent);margin-inline:0;padding:.15em 1em}.IIa07q_markdownBody code{color:var(--mn-text);background:var(--mn-layer-2);font:.88em/1.55 var(--mn-code);border-radius:5px;padding:.15em .38em}.IIa07q_markdownBody pre{border:1px solid var(--mn-line);background:var(--mn-layer-2);border-radius:9px;max-width:100%;padding:14px 16px;overflow:auto}.IIa07q_markdownBody pre code{background:0 0;padding:0;font-size:11px}.IIa07q_markdownBody a{color:var(--mn-accent);text-underline-offset:3px;text-decoration-thickness:1px}.IIa07q_markdownBody hr{border:0;border-top:1px 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:1px solid var(--mn-line);text-align:left;vertical-align:top;padding:8px 10px}.IIa07q_markdownBody th{background:var(--mn-layer-2);font-weight:600}.IIa07q_markdownBody img{border-radius:8px;max-width:100%;height:auto}.IIa07q_documentArchiveReceipt{border:1px solid color-mix(in srgb, var(--mn-success) 28%, var(--mn-line));background:color-mix(in srgb, var(--mn-success) 5%, transparent);border-radius:9px;margin:12px 0;padding:11px 12px}.IIa07q_documentArchiveReceipt p{color:var(--mn-muted);margin:4px 0 8px;font-size:10px}.IIa07q_documentArchiveReceipt div{flex-wrap:wrap;gap:5px;display:flex}.IIa07q_documentDanger{border-top:1px solid var(--mn-line);justify-content:flex-end;align-items:center;gap:7px;min-height:57px;margin-top:13px;padding-top:12px;display:flex}.IIa07q_documentDanger>div{margin-right:auto}.IIa07q_documentDanger strong{font-size:11px;display:block}.IIa07q_documentDanger p{color:var(--mn-faint);margin:2px 0 0;font-size:9px}.IIa07q_documentDanger>span{color:var(--mn-danger);margin-right:auto;font-size:10px}.IIa07q_documentEditor{border:1px solid var(--mn-line);background:linear-gradient(135deg, color-mix(in srgb, var(--mn-accent) 5%, var(--mn-layer-1)), var(--mn-layer-1) 55%);border-radius:11px;margin-bottom:12px;padding:15px}.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:18px;margin-bottom:12px;display:flex}.IIa07q_documentEditor h3{margin:0;font-size:14px}.IIa07q_documentEditor header p{color:var(--mn-muted);margin:2px 0 0;font-size:10px}.IIa07q_documentEditor header>span,.IIa07q_documentEditor header>code{color:var(--mn-accent);font:650 9px var(--mn-code)}.IIa07q_documentEditor label{color:var(--mn-faint);gap:4px;margin-top:9px;font-size:9px;display:grid}.IIa07q_documentEditor textarea{resize:vertical;line-height:1.65}.IIa07q_documentEditorMeta{grid-template-columns:.8fr 1.2fr;gap:9px;display:grid}.IIa07q_documentEditorMeta label{margin:0}.IIa07q_documentEditor footer{justify-content:flex-end;gap:7px;margin-top:11px;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))}}@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_markdownBody{padding:16px;font-size:12.5px}}";
161
+ const id$1 = "dsh-mnemon-source-documents/presentation/page.module.css";
162
+ if (typeof document !== "undefined") {
163
+ let tag = document.querySelector("style[data-plugin-css=" + JSON.stringify(id$1) + "]");
164
+ if (!tag) {
165
+ tag = document.createElement("style");
166
+ tag.dataset.pluginCss = id$1;
167
+ document.head.appendChild(tag);
168
+ }
169
+ if (tag.textContent !== css$2) tag.textContent = css$2;
170
+ }
171
+ var page_module_css_default = {
172
+ "documentArchiveReceipt": "IIa07q_documentArchiveReceipt",
173
+ "documentCapacity": "IIa07q_documentCapacity",
174
+ "documentDanger": "IIa07q_documentDanger",
175
+ "documentDetail": "IIa07q_documentDetail",
176
+ "documentEditor": "IIa07q_documentEditor",
177
+ "documentEditorMeta": "IIa07q_documentEditorMeta",
178
+ "documentList": "IIa07q_documentList",
179
+ "documentListEmpty": "IIa07q_documentListEmpty",
180
+ "documentReader": "IIa07q_documentReader",
181
+ "documentSources": "IIa07q_documentSources",
182
+ "documentSummary": "IIa07q_documentSummary",
183
+ "documentToolbar": "IIa07q_documentToolbar",
184
+ "documentWorkspace": "IIa07q_documentWorkspace",
185
+ "emptyState": "IIa07q_emptyState",
186
+ "markdownBody": "IIa07q_markdownBody"
187
+ };
188
+ //#endregion
189
+ //#region \0source-css:/home/runner/work/dsh-mnemon/dsh-mnemon/plugins/dsh-mnemon-source-documents/presentation/sidebar.module.css.mjs
190
+ const css$1 = "._Bh55G_shell ._Bh55G_modal form[class*=documentEditor]{background:0 0;border:0;border-radius:0;margin:0;padding:0}._Bh55G_shell ._Bh55G_modal form[class*=documentEditor]>header{display:none}._Bh55G_shell [class*=documentEditor] label{color:var(--dsw-alias-label-secondary);gap:5px;font-size:12px;font-weight:500}._Bh55G_shell [class*=documentEditor] input,._Bh55G_shell [class*=documentEditor] textarea{border:1px solid var(--dsw-alias-border-l2);min-height:34px;color:var(--dsw-alias-label-primary);background:var(--dsw-specific-input-major);border-radius:8px;padding:7px 10px;font-size:13px;font-weight:400}._Bh55G_shell [class*=documentList]>button p,._Bh55G_shell [class*=documentDetail]>header p,._Bh55G_shell [class*=documentArchiveReceipt] p{font-size:12px}._Bh55G_shell [class*=documentSummary] article>span,._Bh55G_shell [class*=documentSummary] article>small,._Bh55G_shell [class*=documentList]>header,._Bh55G_shell [class*=documentList]>button time,._Bh55G_shell [class*=documentList]>button footer,._Bh55G_shell [class*=documentDetail] dt,._Bh55G_shell [class*=documentSources]>span{font-size:11px}._Bh55G_shell [class*=documentToolbar]>div button,._Bh55G_shell [class*=documentDetail] dd,._Bh55G_shell [class*=documentDanger] p{font-size:12px}._Bh55G_shell [class*=documentList]>button strong{font-size:13px}._Bh55G_shell [class*=documentWorkspace]{align-items:stretch;height:clamp(520px,100dvh - 220px,760px);min-height:520px}._Bh55G_shell [class*=documentList],._Bh55G_shell [class*=documentReader]{overscroll-behavior:contain;scrollbar-gutter:stable;min-height:0;overflow-y:auto}@media (width<=760px){._Bh55G_shell [class*=documentWorkspace]{height:auto;min-height:0}._Bh55G_shell [class*=documentList]{scrollbar-gutter:auto;overflow-y:auto}._Bh55G_shell [class*=documentReader]{scrollbar-gutter:auto;overflow:visible}}";
191
+ const id = "dsh-mnemon-source-documents/presentation/sidebar.module.css";
192
+ if (typeof document !== "undefined") {
193
+ let tag = document.querySelector("style[data-plugin-css=" + JSON.stringify(id) + "]");
194
+ if (!tag) {
195
+ tag = document.createElement("style");
196
+ tag.dataset.pluginCss = id;
197
+ document.head.appendChild(tag);
198
+ }
199
+ if (tag.textContent !== css$1) tag.textContent = css$1;
200
+ }
201
+ var sidebar_module_css_default = {
202
+ "modal": "_Bh55G_modal",
203
+ "shell": "_Bh55G_shell"
204
+ };
205
+ //#endregion
206
+ //#region src/client/presentation.ts
207
+ const css = {
208
+ ...dsh_mnemon_client.memoryPageStyles,
209
+ ...page_module_css_default
210
+ };
211
+ const sidebarCss = {
212
+ ...dsh_mnemon_client.memorySidebarStyles,
213
+ ...sidebar_module_css_default
214
+ };
215
+ function useT() {
216
+ const fallback = (0, dsh_mnemon_client.useT)();
217
+ const locale = (0, dsh_mnemon_client.useLocale)();
218
+ return (0, react.useMemo)(() => (key, params) => {
219
+ const dictionary = locale.startsWith("en") ? en : zh;
220
+ if (!Object.hasOwn(dictionary, key)) return fallback(key, params);
221
+ const text = dictionary[key];
222
+ return params === void 0 ? text : text.replace(/\{(\w+)\}/g, (match, name) => name in params ? String(params[name]) : match);
223
+ }, [locale, fallback]);
224
+ }
225
+ //#endregion
33
226
  //#region ../../node_modules/.pnpm/markdown-to-jsx@7.7.17_react@18.3.1/node_modules/markdown-to-jsx/dist/index.module.js
34
227
  function n() {
35
228
  return n = Object.assign ? Object.assign.bind() : function(r) {
@@ -952,7 +1145,7 @@ window.__ModuleLoader__.load({
952
1145
  /** Render managed Markdown without raw HTML and with a deliberately small link surface. */
953
1146
  function DocumentMarkdown(props) {
954
1147
  return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
955
- className: dsh_mnemon_client.memoryPageStyles.markdownBody,
1148
+ className: css.markdownBody,
956
1149
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(index_module_default, {
957
1150
  options: {
958
1151
  disableParsingRawHTML: true,
@@ -973,7 +1166,7 @@ window.__ModuleLoader__.load({
973
1166
  });
974
1167
  }
975
1168
  function DocumentsPage(props) {
976
- const t = (0, dsh_mnemon_client.useT)();
1169
+ const t = useT();
977
1170
  const locale = (0, dsh_mnemon_client.useLocale)();
978
1171
  const documentCreateFormId = (0, react.useId)();
979
1172
  const documentEditFormId = (0, react.useId)();
@@ -1164,12 +1357,12 @@ window.__ModuleLoader__.load({
1164
1357
  const archivedCount = snapshot?.archivedCount ?? 0;
1165
1358
  const composer = /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("form", {
1166
1359
  id: documentCreateFormId,
1167
- className: dsh_mnemon_client.memoryPageStyles.documentEditor,
1360
+ className: css.documentEditor,
1168
1361
  onSubmit: (event) => void create(event),
1169
1362
  children: [
1170
1363
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t("documents.newTitle") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("documents.editorHint") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("documents.managedCopy") })] }),
1171
1364
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1172
- className: dsh_mnemon_client.memoryPageStyles.documentEditorMeta,
1365
+ className: css.documentEditorMeta,
1173
1366
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [t("documents.name"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
1174
1367
  value: title,
1175
1368
  onChange: (event) => setTitle(event.target.value),
@@ -1194,12 +1387,12 @@ window.__ModuleLoader__.load({
1194
1387
  });
1195
1388
  const editComposer = selected === null ? null : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("form", {
1196
1389
  id: documentEditFormId,
1197
- className: dsh_mnemon_client.memoryPageStyles.documentEditor,
1390
+ className: css.documentEditor,
1198
1391
  onSubmit: (event) => void update(event),
1199
1392
  children: [
1200
1393
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("h3", { children: t("documents.editTitle") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("documents.editorHint") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: selected.id })] }),
1201
1394
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1202
- className: dsh_mnemon_client.memoryPageStyles.documentEditorMeta,
1395
+ className: css.documentEditorMeta,
1203
1396
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", { children: [t("documents.name"), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
1204
1397
  value: title,
1205
1398
  onChange: (event) => setTitle(event.target.value),
@@ -1221,8 +1414,8 @@ window.__ModuleLoader__.load({
1221
1414
  })] })
1222
1415
  ]
1223
1416
  });
1224
- const documentEditActionClass = (0, dsh_mnemon_client.appearanceClass)(dsh_mnemon_client.memoryPageStyles.ghostButton, (0, dsh_mnemon_client.appearanceClass)(dsh_mnemon_client.memorySidebarStyles.itemActionButton, dsh_mnemon_client.memorySidebarStyles.itemEditAction));
1225
- const documentArchiveActionClass = (0, dsh_mnemon_client.appearanceClass)(dsh_mnemon_client.memoryPageStyles.dangerButton, (0, dsh_mnemon_client.appearanceClass)(dsh_mnemon_client.memorySidebarStyles.itemActionButton, dsh_mnemon_client.memorySidebarStyles.itemDangerAction));
1417
+ const documentEditActionClass = (0, dsh_mnemon_client.appearanceClass)(css.ghostButton, (0, dsh_mnemon_client.appearanceClass)(sidebarCss.itemActionButton, sidebarCss.itemEditAction));
1418
+ const documentArchiveActionClass = (0, dsh_mnemon_client.appearanceClass)(css.dangerButton, (0, dsh_mnemon_client.appearanceClass)(sidebarCss.itemActionButton, sidebarCss.itemDangerAction));
1226
1419
  const visibleItems = items.slice(0, visibleLimit);
1227
1420
  const selectDocument = (documentId) => {
1228
1421
  if (selectedId === documentId) return;
@@ -1232,7 +1425,7 @@ window.__ModuleLoader__.load({
1232
1425
  setConfirmArchive(false);
1233
1426
  };
1234
1427
  return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1235
- className: dsh_mnemon_client.memoryPageStyles.page,
1428
+ className: css.page,
1236
1429
  children: [
1237
1430
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(dsh_mnemon_client.PageHeader, {
1238
1431
  title: t("documents.title"),
@@ -1243,29 +1436,29 @@ window.__ModuleLoader__.load({
1243
1436
  }),
1244
1437
  action: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1245
1438
  type: "button",
1246
- className: dsh_mnemon_client.memoryPageStyles.secondaryButton,
1439
+ className: css.secondaryButton,
1247
1440
  disabled: loading,
1248
1441
  onClick: () => void display(query, status),
1249
1442
  children: t("documents.refresh")
1250
1443
  }), props.writeEnabled && (props.canCreate ?? props.sessionId !== void 0) && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1251
1444
  type: "button",
1252
- className: dsh_mnemon_client.memoryPageStyles.primaryButton,
1445
+ className: css.primaryButton,
1253
1446
  onClick: startComposer,
1254
1447
  children: t("documents.new")
1255
1448
  })] })
1256
1449
  }),
1257
1450
  error !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1258
- className: dsh_mnemon_client.memoryPageStyles.inlineError,
1451
+ className: css.inlineError,
1259
1452
  role: "alert",
1260
1453
  children: error
1261
1454
  }),
1262
1455
  notice !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1263
- className: dsh_mnemon_client.memoryPageStyles.runtimeNotice,
1456
+ className: css.runtimeNotice,
1264
1457
  role: "status",
1265
1458
  children: notice
1266
1459
  }),
1267
1460
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
1268
- className: dsh_mnemon_client.memoryPageStyles.documentSummary,
1461
+ className: css.documentSummary,
1269
1462
  "aria-label": t("documents.summary"),
1270
1463
  children: [
1271
1464
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", { children: [
@@ -1279,7 +1472,7 @@ window.__ModuleLoader__.load({
1279
1472
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("small", { children: t("documents.archivedHint") })
1280
1473
  ] }),
1281
1474
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", {
1282
- className: dsh_mnemon_client.memoryPageStyles.documentCapacity,
1475
+ className: css.documentCapacity,
1283
1476
  children: [
1284
1477
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("documents.activeCapacity") }),
1285
1478
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: snapshot === null ? "—" : `${usage.toFixed(1)}%` }),
@@ -1290,7 +1483,7 @@ window.__ModuleLoader__.load({
1290
1483
  ]
1291
1484
  }),
1292
1485
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("section", {
1293
- className: dsh_mnemon_client.memoryPageStyles.documentToolbar,
1486
+ className: css.documentToolbar,
1294
1487
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("form", {
1295
1488
  onSubmit: (event) => {
1296
1489
  event.preventDefault();
@@ -1309,7 +1502,7 @@ window.__ModuleLoader__.load({
1309
1502
  }),
1310
1503
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1311
1504
  type: "submit",
1312
- className: dsh_mnemon_client.memoryPageStyles.secondaryButton,
1505
+ className: css.secondaryButton,
1313
1506
  children: t("documents.search")
1314
1507
  })
1315
1508
  ]
@@ -1338,9 +1531,9 @@ window.__ModuleLoader__.load({
1338
1531
  })]
1339
1532
  }),
1340
1533
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1341
- className: dsh_mnemon_client.memoryPageStyles.documentWorkspace,
1534
+ className: css.documentWorkspace,
1342
1535
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("aside", {
1343
- className: dsh_mnemon_client.memoryPageStyles.documentList,
1536
+ className: css.documentList,
1344
1537
  "aria-label": t("documents.list"),
1345
1538
  children: [
1346
1539
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: status === "active" ? t("documents.activeList") : t("documents.archiveList") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: items.length })] }),
@@ -1370,7 +1563,7 @@ window.__ModuleLoader__.load({
1370
1563
  onMore: () => setVisibleLimit((value) => value + pageSize)
1371
1564
  }),
1372
1565
  !loading && items.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1373
- className: dsh_mnemon_client.memoryPageStyles.documentListEmpty,
1566
+ className: css.documentListEmpty,
1374
1567
  children: [
1375
1568
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: "▤" }),
1376
1569
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: status === "active" ? t("documents.emptyActive") : t("documents.emptyArchived") }),
@@ -1378,13 +1571,13 @@ window.__ModuleLoader__.load({
1378
1571
  ]
1379
1572
  }),
1380
1573
  loading && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
1381
- className: dsh_mnemon_client.memoryPageStyles.loading,
1574
+ className: css.loading,
1382
1575
  children: t("common.loading")
1383
1576
  })
1384
1577
  ]
1385
1578
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("section", {
1386
1579
  ref: readerRef,
1387
- className: dsh_mnemon_client.memoryPageStyles.documentReader,
1580
+ className: css.documentReader,
1388
1581
  "aria-label": t("documents.reader"),
1389
1582
  "data-scroll-region": "",
1390
1583
  children: selected === null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(dsh_mnemon_client.EmptyState, {
@@ -1392,7 +1585,7 @@ window.__ModuleLoader__.load({
1392
1585
  title: t("documents.selectTitle"),
1393
1586
  children: t("documents.selectText")
1394
1587
  }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("article", {
1395
- className: dsh_mnemon_client.memoryPageStyles.documentDetail,
1588
+ className: css.documentDetail,
1396
1589
  children: [
1397
1590
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("header", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [
1398
1591
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: selected.status === "active" ? t("documents.active") : t("documents.coldArchive") }),
@@ -1411,11 +1604,11 @@ window.__ModuleLoader__.load({
1411
1604
  /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("documents.size") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", { children: (0, dsh_mnemon_client.humanBytes)(selected.sizeBytes) })] })
1412
1605
  ] }),
1413
1606
  selected.sourcePaths.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1414
- className: dsh_mnemon_client.memoryPageStyles.documentSources,
1607
+ className: css.documentSources,
1415
1608
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("documents.sources") }), selected.sourcePaths.map((path) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("code", { children: path }, path))]
1416
1609
  }),
1417
1610
  selected.status === "archived" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1418
- className: dsh_mnemon_client.memoryPageStyles.documentArchiveReceipt,
1611
+ className: css.documentArchiveReceipt,
1419
1612
  children: [
1420
1613
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("documents.archiveReceipt") }),
1421
1614
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: selected.archiveSummary }),
@@ -1424,7 +1617,7 @@ window.__ModuleLoader__.load({
1424
1617
  }),
1425
1618
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)(DocumentMarkdown, { content: selected.content }),
1426
1619
  props.writeEnabled && selected.status === "active" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("footer", {
1427
- className: dsh_mnemon_client.memoryPageStyles.documentDanger,
1620
+ className: css.documentDanger,
1428
1621
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: t("documents.archiveTitle") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("documents.archiveDescription") })] }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1429
1622
  type: "button",
1430
1623
  className: documentArchiveActionClass,
@@ -1437,7 +1630,7 @@ window.__ModuleLoader__.load({
1437
1630
  })]
1438
1631
  }),
1439
1632
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
1440
- className: dsh_mnemon_client.memoryPageStyles.runtimeFootnote,
1633
+ className: css.runtimeFootnote,
1441
1634
  children: t("documents.footnote")
1442
1635
  }),
1443
1636
  composing && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(dsh_mnemon_client.SidebarModal, {
@@ -1446,18 +1639,18 @@ window.__ModuleLoader__.load({
1446
1639
  busy: saving,
1447
1640
  onClose: resetComposer,
1448
1641
  footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1449
- className: dsh_mnemon_client.memoryPageStyles.modalFooterActions,
1642
+ className: css.modalFooterActions,
1450
1643
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1451
1644
  type: "button",
1452
1645
  "data-dialog-close": true,
1453
- className: dsh_mnemon_client.memoryPageStyles.ghostButton,
1646
+ className: css.ghostButton,
1454
1647
  disabled: saving,
1455
1648
  onClick: resetComposer,
1456
1649
  children: t("common.cancel")
1457
1650
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1458
1651
  type: "submit",
1459
1652
  form: documentCreateFormId,
1460
- className: dsh_mnemon_client.memoryPageStyles.primaryButton,
1653
+ className: css.primaryButton,
1461
1654
  disabled: saving || title.trim() === "" || content.trim() === "",
1462
1655
  children: saving ? t("documents.saving") : t("documents.create")
1463
1656
  })]
@@ -1470,18 +1663,18 @@ window.__ModuleLoader__.load({
1470
1663
  busy: saving,
1471
1664
  onClose: () => setEditing(false),
1472
1665
  footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1473
- className: dsh_mnemon_client.memoryPageStyles.modalFooterActions,
1666
+ className: css.modalFooterActions,
1474
1667
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1475
1668
  type: "button",
1476
1669
  "data-dialog-close": true,
1477
- className: dsh_mnemon_client.memoryPageStyles.ghostButton,
1670
+ className: css.ghostButton,
1478
1671
  disabled: saving,
1479
1672
  onClick: () => setEditing(false),
1480
1673
  children: t("common.cancel")
1481
1674
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1482
1675
  type: "submit",
1483
1676
  form: documentEditFormId,
1484
- className: dsh_mnemon_client.memoryPageStyles.primaryButton,
1677
+ className: css.primaryButton,
1485
1678
  disabled: saving,
1486
1679
  children: saving ? t("documents.saving") : t("documents.save")
1487
1680
  })]
@@ -1494,27 +1687,27 @@ window.__ModuleLoader__.load({
1494
1687
  busy: saving,
1495
1688
  onClose: () => setConfirmArchive(false),
1496
1689
  footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1497
- className: dsh_mnemon_client.memoryPageStyles.modalFooterActions,
1690
+ className: css.modalFooterActions,
1498
1691
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1499
1692
  type: "button",
1500
1693
  "data-dialog-close": true,
1501
1694
  "data-autofocus": true,
1502
- className: dsh_mnemon_client.memoryPageStyles.ghostButton,
1695
+ className: css.ghostButton,
1503
1696
  disabled: saving,
1504
1697
  onClick: () => setConfirmArchive(false),
1505
1698
  children: t("common.cancel")
1506
1699
  }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
1507
1700
  type: "button",
1508
- className: dsh_mnemon_client.memoryPageStyles.dangerSolidButton,
1701
+ className: css.dangerSolidButton,
1509
1702
  disabled: saving,
1510
1703
  onClick: () => void archive(),
1511
1704
  children: saving ? t("documents.archiving") : t("documents.archiveNow")
1512
1705
  })]
1513
1706
  }),
1514
1707
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1515
- className: dsh_mnemon_client.memoryPageStyles.bodyDeleteConfirm,
1708
+ className: css.bodyDeleteConfirm,
1516
1709
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", { children: t("documents.archiveDescription") }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
1517
- className: dsh_mnemon_client.memoryPageStyles.bodyDeleteSummary,
1710
+ className: css.bodyDeleteSummary,
1518
1711
  children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("strong", { children: selected.title }), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", { children: [
1519
1712
  selected.relativePath,
1520
1713
  " · ",
@@ -0,0 +1,6 @@
1
+ import { type MnemonKey } from 'dsh-mnemon/client';
2
+ import type labels from 'dsh-mnemon-source-documents/presentation/locales.json';
3
+ export type SourceKey = keyof typeof labels.zh;
4
+ export declare const css: Readonly<Record<string, string>>;
5
+ export declare const sidebarCss: Readonly<Record<string, string>>;
6
+ export declare function useT(): (key: SourceKey | MnemonKey, params?: Record<string, unknown>) => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-mnemon-source-documents",
3
- "version": "0.5.2",
3
+ "version": "0.5.4",
4
4
  "description": "Self-contained documents Source for Composable View Memory.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -20,11 +20,15 @@
20
20
  "./contracts": {
21
21
  "types": "./lib/contracts.d.ts",
22
22
  "default": "./lib/contracts.js"
23
- }
23
+ },
24
+ "./presentation/locales.json": "./presentation/locales.json",
25
+ "./presentation/page.module.css": "./presentation/page.module.css",
26
+ "./presentation/sidebar.module.css": "./presentation/sidebar.module.css"
24
27
  },
25
28
  "files": [
26
29
  "lib",
27
- "README.md"
30
+ "README.md",
31
+ "presentation"
28
32
  ],
29
33
  "dsh": {
30
34
  "client": {
@@ -58,13 +62,14 @@
58
62
  "@types/node": "^22.0.0",
59
63
  "@types/react": "^18.3.0",
60
64
  "@types/react-dom": "^18.3.0",
61
- "dsh-mnemon": "^0.5.2",
65
+ "dsh-mnemon": "^0.5.4",
62
66
  "jsdom": "^26.0.0",
63
67
  "react": "^18.2.0",
64
68
  "react-dom": "^18.2.0",
65
69
  "tsdown": "^0.22.0",
66
70
  "typescript": "^5.9.0",
67
- "vitest": "^3.2.0"
71
+ "vitest": "^3.2.0",
72
+ "lightningcss": "^1.33.0"
68
73
  },
69
74
  "peerDependenciesMeta": {
70
75
  "react": {
@@ -0,0 +1,126 @@
1
+ {
2
+ "zh": {
3
+ "nav.documents": "档案",
4
+ "documents.title": "项目档案",
5
+ "documents.description": "在当前工作区维护结构化的项目文档。活跃档案参与近场检索;达到 10 MB 上限前,最久未使用的档案会先在 Mnemon 中建立索引,再迁入归档。",
6
+ "documents.capacity": "{used} / {limit}",
7
+ "documents.refresh": "刷新",
8
+ "documents.summary": "档案存储摘要",
9
+ "documents.active": "活跃档案",
10
+ "documents.activeHint": "近场检索范围",
11
+ "documents.archivedCount": "归档",
12
+ "documents.archivedHint": "不占活跃容量",
13
+ "documents.activeCapacity": "活跃容量",
14
+ "documents.capacityHint": "按实际 UTF-8 文件大小计算",
15
+ "documents.searchAria": "检索项目档案",
16
+ "documents.searchPlaceholder": "搜索设计、调查、流程或交接记录…",
17
+ "documents.search": "检索",
18
+ "documents.scope": "档案范围",
19
+ "documents.new": "新建档案",
20
+ "documents.newTitle": "创建托管档案",
21
+ "documents.editTitle": "编辑活跃档案",
22
+ "documents.editorHint": "控制层会生成 frontmatter、哈希与修订号;原项目文件始终只读。",
23
+ "documents.managedCopy": "托管副本",
24
+ "documents.name": "标题",
25
+ "documents.routing": "检索说明",
26
+ "documents.sources": "来源路径",
27
+ "documents.sourcesPlaceholder": "src/index.ts, docs/architecture.md",
28
+ "documents.markdown": "Markdown 内容",
29
+ "documents.saving": "保存中…",
30
+ "documents.create": "创建档案",
31
+ "documents.save": "保存修订",
32
+ "documents.created": "已创建活跃档案。",
33
+ "documents.createdAfterArchive": "已先迁移 {count} 份旧档案,再创建活跃档案。",
34
+ "documents.updated": "已保存新的档案修订。",
35
+ "documents.updatedAfterArchive": "已先迁移 {count} 份旧档案,再保存修订。",
36
+ "documents.archived": "已建立 Mnemon 冷索引并归档;关联记忆空间:{spaces}",
37
+ "documents.list": "项目档案列表",
38
+ "documents.activeList": "活跃目录",
39
+ "documents.archiveList": "归档目录",
40
+ "documents.noDescription": "暂无检索说明。",
41
+ "documents.missing": "文件缺失",
42
+ "documents.emptyActive": "还没有活跃档案",
43
+ "documents.emptyActiveText": "复杂对话达到活动评分门槛后会自动审阅并整理档案,也可以在上方手动创建。",
44
+ "documents.emptyArchived": "还没有归档",
45
+ "documents.emptyArchivedText": "只有完成 Mnemon 索引的档案才会迁移到这里。",
46
+ "documents.reader": "档案阅读器",
47
+ "documents.selectTitle": "选择一份档案",
48
+ "documents.selectText": "在左侧查看活跃项目知识或沿 Mnemon 引用打开归档原文。",
49
+ "documents.coldArchive": "归档原文",
50
+ "documents.edit": "编辑",
51
+ "documents.path": "托管路径",
52
+ "documents.revision": "修订",
53
+ "documents.hash": "内容哈希",
54
+ "documents.size": "文件大小",
55
+ "documents.archiveReceipt": "Mnemon 冷索引回执",
56
+ "documents.archiveTitle": "迁入归档",
57
+ "documents.archiveDescription": "先由受限的独立任务 Agent 写入可检索的 Mnemon 摘要和精确路径,成功后才移动原文。",
58
+ "documents.archive": "归档",
59
+ "documents.archiveConfirm": "确认建立 Mnemon 索引并迁移这份档案?",
60
+ "documents.archiving": "索引并迁移中…",
61
+ "documents.archiveNow": "确认归档",
62
+ "documents.footnote": "`.mnemon/documents/index.json` 是控制面事实源;active 总量固定不超过 10 MB,archived 不计入上限,项目源文件不会被修改。"
63
+ },
64
+ "en": {
65
+ "nav.documents": "Documents",
66
+ "documents.title": "Project Documents",
67
+ "documents.description": "Maintain structured project documents in the current workspace. Active documents support near-field search; before the 10 MB limit is exceeded, the least-recently-used document is indexed in Mnemon and moved to the archive.",
68
+ "documents.capacity": "{used} / {limit}",
69
+ "documents.refresh": "Refresh",
70
+ "documents.summary": "Document storage summary",
71
+ "documents.active": "Active",
72
+ "documents.activeHint": "Near-field search scope",
73
+ "documents.archivedCount": "Archive",
74
+ "documents.archivedHint": "Excluded from active capacity",
75
+ "documents.activeCapacity": "Active capacity",
76
+ "documents.capacityHint": "Measured from actual UTF-8 files",
77
+ "documents.searchAria": "Search project documents",
78
+ "documents.searchPlaceholder": "Search designs, investigations, procedures, or handoffs…",
79
+ "documents.search": "Search",
80
+ "documents.scope": "Document scope",
81
+ "documents.new": "New document",
82
+ "documents.newTitle": "Create managed document",
83
+ "documents.editTitle": "Edit active document",
84
+ "documents.editorHint": "The control plane generates frontmatter, hashes, and revisions. Project source files stay read only.",
85
+ "documents.managedCopy": "Managed copy",
86
+ "documents.name": "Title",
87
+ "documents.routing": "Retrieval description",
88
+ "documents.sources": "Source paths",
89
+ "documents.sourcesPlaceholder": "src/index.ts, docs/architecture.md",
90
+ "documents.markdown": "Markdown content",
91
+ "documents.saving": "Saving…",
92
+ "documents.create": "Create document",
93
+ "documents.save": "Save revision",
94
+ "documents.created": "Active document created.",
95
+ "documents.createdAfterArchive": "Archived {count} older document(s), then created the active document.",
96
+ "documents.updated": "New document revision saved.",
97
+ "documents.updatedAfterArchive": "Archived {count} older document(s), then saved the revision.",
98
+ "documents.archived": "Mnemon cold index created and document archived; Memory Spaces: {spaces}",
99
+ "documents.list": "Project document list",
100
+ "documents.activeList": "Active directory",
101
+ "documents.archiveList": "Archive directory",
102
+ "documents.noDescription": "No retrieval description.",
103
+ "documents.missing": "File missing",
104
+ "documents.emptyActive": "No active documents yet",
105
+ "documents.emptyActiveText": "Complex work is reviewed after it reaches the activity-score gate, or you can create a Document above.",
106
+ "documents.emptyArchived": "No archives yet",
107
+ "documents.emptyArchivedText": "Only documents with a completed Mnemon index are moved here.",
108
+ "documents.reader": "Document reader",
109
+ "documents.selectTitle": "Select a document",
110
+ "documents.selectText": "Read active project knowledge or follow a Mnemon reference to an archived original.",
111
+ "documents.coldArchive": "Archived original",
112
+ "documents.edit": "Edit",
113
+ "documents.path": "Managed path",
114
+ "documents.revision": "Revision",
115
+ "documents.hash": "Content hash",
116
+ "documents.size": "File size",
117
+ "documents.archiveReceipt": "Mnemon cold-index receipt",
118
+ "documents.archiveTitle": "Move to archive",
119
+ "documents.archiveDescription": "A restricted independent task Agent first stores a searchable Mnemon summary and exact path. The original moves only after that succeeds.",
120
+ "documents.archive": "Archive",
121
+ "documents.archiveConfirm": "Create the Mnemon index and archive this document?",
122
+ "documents.archiving": "Indexing and moving…",
123
+ "documents.archiveNow": "Confirm archive",
124
+ "documents.footnote": "`.mnemon/documents/index.json` is the control-plane source of truth. active stays at or below 10 MB, archived is excluded, and project source files are never modified."
125
+ }
126
+ }
@@ -0,0 +1,139 @@
1
+ .documentSummary { display: grid; grid-template-columns: .7fr .7fr 1.6fr; gap: 9px; margin-bottom: 12px; }
2
+ .documentSummary article { min-width: 0; min-height: 91px; padding: 13px 14px; border: 1px solid var(--mn-line); border-radius: 11px; background: var(--mn-layer-1); }
3
+ .documentSummary article > span { display: block; color: var(--mn-faint); font-size: 9px; }
4
+ .documentSummary article > strong { display: block; margin: 7px 0 4px; font: 650 21px/1 var(--mn-code); }
5
+ .documentSummary article > small { color: var(--mn-muted); font-size: 9px; }
6
+ .documentCapacity > div { height: 4px; margin: 7px 0 6px; overflow: hidden; border-radius: 999px; background: var(--mn-layer-2); }
7
+ .documentCapacity > div i { display: block; height: 100%; border-radius: inherit; background: var(--mn-accent); transition: width .3s ease; }
8
+
9
+ .documentToolbar { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; padding: 9px; border: 1px solid var(--mn-line); border-radius: 11px; background: var(--mn-layer-1); }
10
+ .documentToolbar form { display: grid; min-width: 260px; flex: 1; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: center; gap: 5px; padding-left: 8px; }
11
+ .documentToolbar form > span { color: var(--mn-faint); font: 15px var(--mn-code); }
12
+ .documentToolbar input,
13
+ .documentEditor input,
14
+ .documentEditor textarea { width: 100%; border: 1px solid var(--mn-line); border-radius: 8px; outline: 0; padding: 8px 10px; background: var(--mn-input); }
15
+ .documentToolbar input { height: 34px; border-color: transparent; background: transparent; }
16
+ .documentToolbar input:focus,
17
+ .documentEditor input:focus,
18
+ .documentEditor textarea:focus { border-color: var(--mn-accent); }
19
+ .documentToolbar > div { display: flex; align-items: center; gap: 3px; padding: 3px; border: 1px solid var(--mn-line); border-radius: 8px; background: var(--mn-layer-2); }
20
+ .documentToolbar > div button { min-height: 32px; border: 0; border-radius: 6px; padding: 0 10px; color: var(--mn-muted); background: transparent; font-size: 10.5px; cursor: pointer; }
21
+ .documentToolbar > div button[data-active] { color: var(--mn-text); background: var(--mn-layer-1); box-shadow: 0 1px 3px color-mix(in srgb, var(--mn-text) 8%, transparent); }
22
+ .documentToolbar > div b { margin-left: 4px; color: var(--mn-faint); font: 600 9px var(--mn-code); }
23
+
24
+ .documentWorkspace { display: grid; min-height: 590px; grid-template-columns: minmax(250px, 310px) minmax(0, 1fr); gap: 10px; }
25
+ .documentList,
26
+ .documentReader { min-width: 0; overflow: hidden; border: 1px solid var(--mn-line); border-radius: 11px; background: var(--mn-layer-1); }
27
+ .documentList { align-self: stretch; }
28
+ .documentList > header { display: flex; min-height: 42px; align-items: center; justify-content: space-between; padding: 0 12px; border-bottom: 1px solid var(--mn-line); color: var(--mn-faint); font-size: 9px; }
29
+ .documentList > header code { color: var(--mn-accent); }
30
+ .documentList > button { --mn-provider-color: var(--mn-faint); display: block; width: calc(100% - 16px); margin: 8px 8px 0; border: 1px solid var(--mn-line); border-radius: 8px; padding: 11px 11px 10px 14px; color: var(--mn-text); background: linear-gradient(90deg, color-mix(in srgb, var(--mn-provider-color) 5%, var(--mn-layer-1)), var(--mn-layer-1) 34%); box-shadow: inset 3px 0 0 color-mix(in srgb, var(--mn-provider-color) 55%, transparent); text-align: left; cursor: pointer; transition: border-color .15s, background-color .15s, box-shadow .15s; }
31
+ .documentList > button:hover { --mn-provider-color: var(--mn-accent); border-color: color-mix(in srgb, var(--mn-accent) 28%, var(--mn-line)); }
32
+ .documentList > button[data-selected] { --mn-provider-color: var(--mn-accent); border-color: color-mix(in srgb, var(--mn-accent) 38%, var(--mn-line)); background: linear-gradient(90deg, color-mix(in srgb, var(--mn-accent) 7%, var(--mn-layer-1)), var(--mn-layer-1) 38%); box-shadow: inset 3px 0 0 color-mix(in srgb, var(--mn-accent) 78%, transparent), inset 0 0 0 1px color-mix(in srgb, var(--mn-accent) 8%, transparent); }
33
+ .documentList > button > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
34
+ .documentList > button strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
35
+ .documentList > button time { flex: 0 0 auto; color: var(--mn-faint); font: 8px var(--mn-code); }
36
+ .documentList > button p { display: -webkit-box; min-height: 30px; margin: 6px 0 9px; overflow: hidden; color: var(--mn-muted); font-size: 10px; line-height: 1.5; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
37
+ .documentList > button footer { display: flex; align-items: center; gap: 8px; color: var(--mn-faint); font-size: 9px; }
38
+ .documentList > button footer code { margin-left: auto; }
39
+ .documentList > button footer em { color: var(--mn-danger); font-style: normal; }
40
+ .documentListEmpty { display: grid; min-height: 230px; place-items: center; align-content: center; gap: 4px; padding: 22px; color: var(--mn-muted); text-align: center; }
41
+ .documentListEmpty > span { margin-bottom: 6px; color: var(--mn-accent); font: 28px var(--mn-code); opacity: .6; }
42
+ .documentListEmpty p { margin: 0; color: var(--mn-faint); font-size: 10px; }
43
+
44
+ .documentReader { padding: clamp(16px, 2vw, 22px); }
45
+ .documentReader > .emptyState { height: 100%; border: 0; background: transparent; }
46
+ .documentDetail > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 15px; border-bottom: 1px solid var(--mn-line); }
47
+ .documentDetail > header span { color: var(--mn-accent); font: 650 9px var(--mn-code); letter-spacing: .08em; text-transform: uppercase; }
48
+ .documentDetail > header h3 { margin: 5px 0 3px; font-size: 18px; }
49
+ .documentDetail > header p { margin: 0; color: var(--mn-muted); font-size: 11px; }
50
+ .documentDetail > dl { display: grid; grid-template-columns: 2fr .45fr .8fr .55fr; margin: 13px 0; border-top: 1px solid var(--mn-line); border-left: 1px solid var(--mn-line); }
51
+ .documentDetail > dl > div { min-width: 0; padding: 8px 9px; border-right: 1px solid var(--mn-line); border-bottom: 1px solid var(--mn-line); }
52
+ .documentDetail dt { margin-bottom: 3px; color: var(--mn-faint); font-size: 8px; }
53
+ .documentDetail dd { margin: 0; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
54
+ .documentSources { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin: 11px 0; }
55
+ .documentSources > span { margin-right: 4px; color: var(--mn-faint); font-size: 9px; }
56
+ .documentSources code,
57
+ .documentArchiveReceipt code { padding: 3px 6px; border-radius: 5px; color: var(--mn-muted); background: var(--mn-layer-2); font-size: 8px; }
58
+ .markdownBody { min-height: 310px; margin: 16px 0 0; overflow-wrap: anywhere; padding: clamp(18px, 2.5vw, 28px); border: 1px solid var(--mn-line); border-radius: 10px; color: var(--mn-text); background: color-mix(in srgb, var(--mn-layer-2) 30%, var(--mn-layer-1)); font-size: 13px; line-height: 1.78; }
59
+ .markdownBody > :first-child { margin-top: 0; }
60
+ .markdownBody > :last-child { margin-bottom: 0; }
61
+ .markdownBody h1,
62
+ .markdownBody h2,
63
+ .markdownBody h3,
64
+ .markdownBody h4 { margin: 1.55em 0 .65em; color: var(--mn-text); line-height: 1.3; letter-spacing: -.015em; }
65
+ .markdownBody h1 { padding-bottom: .35em; border-bottom: 1px solid var(--mn-line); font-size: 1.75em; }
66
+ .markdownBody h2 { padding-bottom: .3em; border-bottom: 1px solid var(--mn-line); font-size: 1.42em; }
67
+ .markdownBody h3 { font-size: 1.18em; }
68
+ .markdownBody p,
69
+ .markdownBody ul,
70
+ .markdownBody ol,
71
+ .markdownBody blockquote,
72
+ .markdownBody table,
73
+ .markdownBody pre { margin: .85em 0; }
74
+ .markdownBody ul,
75
+ .markdownBody ol { padding-left: 1.6em; }
76
+ .markdownBody li + li { margin-top: .3em; }
77
+ .markdownBody blockquote { margin-inline: 0; padding: .15em 1em; border-left: 3px solid var(--mn-accent); color: var(--mn-muted); background: color-mix(in srgb, var(--mn-accent) 4%, transparent); }
78
+ .markdownBody code { padding: .15em .38em; border-radius: 5px; color: var(--mn-text); background: var(--mn-layer-2); font: .88em/1.55 var(--mn-code); }
79
+ .markdownBody pre { max-width: 100%; overflow: auto; padding: 14px 16px; border: 1px solid var(--mn-line); border-radius: 9px; background: var(--mn-layer-2); }
80
+ .markdownBody pre code { padding: 0; background: transparent; font-size: 11px; }
81
+ .markdownBody a { color: var(--mn-accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
82
+ .markdownBody hr { margin: 1.8em 0; border: 0; border-top: 1px solid var(--mn-line); }
83
+ .markdownBody table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; }
84
+ .markdownBody th,
85
+ .markdownBody td { padding: 8px 10px; border: 1px solid var(--mn-line); text-align: left; vertical-align: top; }
86
+ .markdownBody th { background: var(--mn-layer-2); font-weight: 600; }
87
+ .markdownBody img { max-width: 100%; height: auto; border-radius: 8px; }
88
+ .documentArchiveReceipt { margin: 12px 0; padding: 11px 12px; border: 1px solid color-mix(in srgb, var(--mn-success) 28%, var(--mn-line)); border-radius: 9px; background: color-mix(in srgb, var(--mn-success) 5%, transparent); }
89
+ .documentArchiveReceipt p { margin: 4px 0 8px; color: var(--mn-muted); font-size: 10px; }
90
+ .documentArchiveReceipt div { display: flex; flex-wrap: wrap; gap: 5px; }
91
+ .documentDanger { display: flex; min-height: 57px; align-items: center; justify-content: flex-end; gap: 7px; margin-top: 13px; padding-top: 12px; border-top: 1px solid var(--mn-line); }
92
+ .documentDanger > div { margin-right: auto; }
93
+ .documentDanger strong { display: block; font-size: 11px; }
94
+ .documentDanger p { margin: 2px 0 0; color: var(--mn-faint); font-size: 9px; }
95
+ .documentDanger > span { margin-right: auto; color: var(--mn-danger); font-size: 10px; }
96
+
97
+ .documentEditor { margin-bottom: 12px; padding: 15px; border: 1px solid var(--mn-line); border-radius: 11px; background: linear-gradient(135deg, color-mix(in srgb, var(--mn-accent) 5%, var(--mn-layer-1)), var(--mn-layer-1) 55%); }
98
+ .documentReader > .documentEditor { margin: 0; border: 0; padding: 0; background: transparent; }
99
+ .documentEditor > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
100
+ .documentEditor h3 { margin: 0; font-size: 14px; }
101
+ .documentEditor header p { margin: 2px 0 0; color: var(--mn-muted); font-size: 10px; }
102
+ .documentEditor header > span,
103
+ .documentEditor header > code { color: var(--mn-accent); font: 650 9px var(--mn-code); }
104
+ .documentEditor label { display: grid; gap: 4px; margin-top: 9px; color: var(--mn-faint); font-size: 9px; }
105
+ .documentEditor textarea { resize: vertical; line-height: 1.65; }
106
+ .documentEditorMeta { display: grid; grid-template-columns: .8fr 1.2fr; gap: 9px; }
107
+ .documentEditorMeta label { margin: 0; }
108
+ .documentEditor footer { display: flex; justify-content: flex-end; gap: 7px; margin-top: 11px; }
109
+
110
+ @media (max-width: 1000px) {
111
+ .documentWorkspace { grid-template-columns: minmax(220px, 270px) minmax(0, 1fr); }
112
+ .documentDetail > dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
113
+ }
114
+
115
+ @media (max-width: 760px) {
116
+ .documentSummary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
117
+ .documentCapacity { grid-column: 1 / -1; }
118
+ .documentToolbar { align-items: stretch; flex-direction: column; }
119
+ .documentToolbar form { min-width: 0; }
120
+ .documentToolbar > div,
121
+ .documentToolbar > button { width: 100%; }
122
+ .documentToolbar > div button { flex: 1; }
123
+ .documentWorkspace { min-height: 0; grid-template-columns: 1fr; }
124
+ .documentList { max-height: 330px; overflow: auto; -webkit-overflow-scrolling: touch; }
125
+ .documentReader { min-height: 430px; }
126
+ .documentEditorMeta { grid-template-columns: 1fr; }
127
+ }
128
+
129
+ @media (max-width: 520px) {
130
+ .documentDetail > header,
131
+ .documentDanger { align-items: flex-start; flex-direction: column; }
132
+ .documentDetail > header > div:last-child,
133
+ .documentDetail > header button { width: 100%; }
134
+ .documentDanger > div,
135
+ .documentDanger > span { margin-right: 0; }
136
+ .documentDanger > button { width: 100%; }
137
+ .documentDetail > dl { grid-template-columns: 1fr; }
138
+ .markdownBody { padding: 16px; font-size: 12.5px; }
139
+ }
@@ -0,0 +1,63 @@
1
+ .shell .modal form[class*='documentEditor'] {
2
+ margin: 0;
3
+ padding: 0;
4
+ border: 0;
5
+ border-radius: 0;
6
+ background: transparent;
7
+ }
8
+ .shell .modal form[class*='documentEditor'] > header { display: none; }
9
+
10
+ .shell [class*='documentEditor'] label {
11
+ gap: 5px;
12
+ color: var(--dsw-alias-label-secondary);
13
+ font-size: 12px;
14
+ font-weight: 500;
15
+ }
16
+
17
+ .shell [class*='documentEditor'] input,
18
+ .shell [class*='documentEditor'] textarea {
19
+ min-height: 34px;
20
+ border: 1px solid var(--dsw-alias-border-l2);
21
+ border-radius: 8px;
22
+ padding: 7px 10px;
23
+ color: var(--dsw-alias-label-primary);
24
+ background: var(--dsw-specific-input-major);
25
+ font-size: 13px;
26
+ font-weight: 400;
27
+ }
28
+
29
+ .shell [class*='documentList'] > button p,
30
+ .shell [class*='documentDetail'] > header p,
31
+ .shell [class*='documentArchiveReceipt'] p { font-size: 12px; }
32
+
33
+ .shell [class*='documentSummary'] article > span,
34
+ .shell [class*='documentSummary'] article > small,
35
+ .shell [class*='documentList'] > header,
36
+ .shell [class*='documentList'] > button time,
37
+ .shell [class*='documentList'] > button footer,
38
+ .shell [class*='documentDetail'] dt,
39
+ .shell [class*='documentSources'] > span { font-size: 11px; }
40
+
41
+ .shell [class*='documentToolbar'] > div button,
42
+ .shell [class*='documentDetail'] dd,
43
+ .shell [class*='documentDanger'] p { font-size: 12px; }
44
+
45
+ .shell [class*='documentList'] > button strong { font-size: 13px; }
46
+ .shell [class*='documentWorkspace'] {
47
+ height: clamp(520px, calc(100dvh - 220px), 760px);
48
+ min-height: 520px;
49
+ align-items: stretch;
50
+ }
51
+ .shell [class*='documentList'],
52
+ .shell [class*='documentReader'] {
53
+ min-height: 0;
54
+ overflow-y: auto;
55
+ overscroll-behavior: contain;
56
+ scrollbar-gutter: stable;
57
+ }
58
+
59
+ @media (max-width: 760px) {
60
+ .shell [class*='documentWorkspace'] { height: auto; min-height: 0; }
61
+ .shell [class*='documentList'] { overflow-y: auto; scrollbar-gutter: auto; }
62
+ .shell [class*='documentReader'] { overflow: visible; scrollbar-gutter: auto; }
63
+ }