@sksoftofficial/mindroot 1.0.3 → 1.0.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sksoftofficial/mindroot",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "description": "Long-term memory for AI agents: hybrid-searched memories over human-editable markdown notes. 100% local — offline ONNX embeddings, SQLite FTS5, MCP server, REST API, CLI, dashboard. No cloud, no API keys.",
5
5
  "homepage": "https://skbilisim.com/en/projects/mindroot",
6
6
  "type": "module",
@@ -44,7 +44,16 @@
44
44
  #gate { margin:auto; text-align:center; display:flex; flex-direction:column; gap:14px; width:min(420px, calc(100% - 32px)); padding:28px; background:var(--bg2); border:1px solid var(--border); border-radius:10px; box-shadow:0 12px 40px rgba(0,0,0,.28) }
45
45
  #gate input { width:100% }
46
46
  main { display:flex; flex:1; overflow:hidden }
47
- aside { position:relative; z-index:1; width:230px; background:var(--bg2); border-right:1px solid var(--border-soft); overflow-y:auto; padding:10px 8px; box-shadow:8px 0 20px rgba(0,0,0,.12) }
47
+ aside { position:relative; z-index:1; width:230px; background:var(--bg2); border-right:1px solid var(--border-soft); overflow-y:auto; padding:10px 14px; box-shadow:8px 0 20px rgba(0,0,0,.12); display:flex; flex-direction:column; gap:8px; transition:width 160ms ease-out }
48
+ .sidebar-toggle { flex:none; height:34px; padding:0; display:flex; align-items:center; justify-content:center }
49
+ .sidebar-toggle svg { width:17px; height:17px; stroke:currentColor; transition:transform 160ms ease-out }
50
+ @media (min-width:701px) {
51
+ aside.collapsed { width:56px; padding:10px 12px }
52
+ aside.collapsed .sidebar-toggle svg { transform:rotate(180deg) }
53
+ aside.collapsed .proj { padding:7px 0; text-align:center; font-size:0 }
54
+ aside.collapsed .proj::before { content:attr(data-initial); font-size:12px; line-height:inherit }
55
+ }
56
+ #projList { display:flex; flex-direction:column; gap:2px }
48
57
  .proj { padding:7px 10px; border-radius:5px; cursor:pointer; color:var(--dim) }
49
58
  .proj:hover { background:var(--hover); color:var(--fg) }
50
59
  .proj.active { background:var(--accent-soft); color:#f2b46f }
@@ -89,7 +98,7 @@
89
98
  .editor-document { min-width:0 }
90
99
  .editor-title { max-width:320px; color:var(--fg); font-size:13px; font-weight:600; overflow:hidden; text-overflow:ellipsis; white-space:nowrap }
91
100
  .editor-actions { justify-self:end }
92
- .viewmode { display:inline-flex; gap:0; padding:2px; background:#191919; border:1px solid var(--border); border-radius:6px }
101
+ .viewmode { display:inline-flex; gap:2px; padding:2px; background:#191919; border:1px solid var(--border); border-radius:6px }
93
102
  .viewmode button { padding:4px 10px; background:transparent; border-color:transparent }
94
103
  .viewmode button:hover { background:var(--hover); border-color:transparent }
95
104
  .viewmode button.on { background:var(--accent-soft); color:#f2b46f; border-color:transparent }
@@ -141,12 +150,13 @@
141
150
  .header-lock-label { display:none }
142
151
  main { flex-direction:column }
143
152
  aside { width:100%; max-height:112px; border-right:0; border-bottom:1px solid var(--border-soft); padding:7px 8px; box-shadow:0 8px 20px rgba(0,0,0,.12) }
144
- #projList { display:flex; gap:4px; overflow-x:auto }
153
+ #projList { flex-direction:row; gap:4px; overflow-x:auto }
145
154
  .proj { flex:none; white-space:nowrap }
146
155
  #content { padding:14px }
147
156
  .workspace-head { align-items:flex-start; flex-wrap:wrap; gap:8px; margin-bottom:12px; padding-bottom:10px }
148
157
  button, input { min-height:44px; touch-action:manipulation }
149
158
  .header-lock, .back-button { width:44px; height:44px }
159
+ .sidebar-toggle { display:none }
150
160
  .proj, .tab { min-height:44px; display:flex; align-items:center }
151
161
  .tab { padding:5px 8px }
152
162
  .delete-project { padding:5px 9px }
@@ -202,7 +212,14 @@
202
212
  </div>
203
213
 
204
214
  <main id="app" style="display:none">
205
- <aside><div id="projList"></div></aside>
215
+ <aside>
216
+ <button class="sidebar-toggle" type="button" title="Shrink menu" aria-label="Shrink menu" aria-expanded="true" onclick="toggleSidebar()">
217
+ <svg viewBox="0 0 24 24" fill="none" aria-hidden="true">
218
+ <path d="m14 7-5 5 5 5" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
219
+ </svg>
220
+ </button>
221
+ <div id="projList"></div>
222
+ </aside>
206
223
  <section id="content"></section>
207
224
  </main>
208
225
 
@@ -300,6 +317,7 @@ async function renderProjects() {
300
317
  for (const r of rows) {
301
318
  const div = document.createElement("div");
302
319
  div.className = "proj" + (r.slug === currentProject ? " active" : "");
320
+ div.dataset.initial = r.slug.slice(0, 2).toUpperCase();
303
321
  div.textContent = r.slug;
304
322
  div.title = r.docs + " notes, " + r.memories + " memories";
305
323
  div.onclick = () => selectProject(r.slug);
@@ -382,6 +400,24 @@ async function renderNotes(view) {
382
400
 
383
401
  let mdMode = localStorage.getItem("mindroot_mdmode") || "preview";
384
402
 
403
+ let sidebarCollapsed = localStorage.getItem("mindroot_sidebar") === "collapsed";
404
+ function toggleSidebar() { setSidebar(!sidebarCollapsed); }
405
+ function setSidebar(collapsed) {
406
+ sidebarCollapsed = collapsed;
407
+ localStorage.setItem("mindroot_sidebar", collapsed ? "collapsed" : "expanded");
408
+ applySidebar();
409
+ }
410
+ function applySidebar() {
411
+ const aside = document.querySelector("main aside");
412
+ const btn = $(".sidebar-toggle");
413
+ aside.classList.toggle("collapsed", sidebarCollapsed);
414
+ btn.setAttribute("aria-expanded", String(!sidebarCollapsed));
415
+ const label = sidebarCollapsed ? "Expand menu" : "Shrink menu";
416
+ btn.title = label;
417
+ btn.setAttribute("aria-label", label);
418
+ }
419
+ applySidebar();
420
+
385
421
  function renderMd(text) {
386
422
  if (window.marked && window.DOMPurify) {
387
423
  marked.setOptions({ gfm: true, breaks: true });