Changeset 0.22.9 (#151)

This commit is contained in:
2026-03-04 17:39:22 +00:00
parent 7e26a2a261
commit 6ed76fb2d3
27 changed files with 3392 additions and 3224 deletions

547
src/css/panels.css Normal file
View File

@@ -0,0 +1,547 @@
/* ── panels.css ──────────────────────────────
Side panel, preview, notes, graph, backlinks
──────────────────────────────────────────── */
/* ── Side Panel (Preview + Notes) ──────── */
/* ── Secondary Pane (was .side-panel, now .workspace-secondary) ── */
/* Layout handled by .workspace-secondary above; these are internal styles */
.side-panel-header {
display: flex; align-items: center; justify-content: space-between;
padding: 8px 12px; border-bottom: 1px solid var(--border);
background: var(--bg-raised); flex-shrink: 0;
}
.side-panel-actions {
display: flex; align-items: center; gap: 2px;
}
.side-panel-action-btn {
background: none; border: none; color: var(--text-3);
cursor: pointer; padding: 4px 6px; border-radius: var(--radius);
transition: all var(--transition); display: flex; align-items: center;
}
.side-panel-action-btn:hover { background: var(--bg-hover); color: var(--text); }
.side-panel-label {
font-size: 12px; font-family: var(--font); font-weight: 600;
color: var(--text-2); white-space: nowrap; font-style: normal;
}
.side-panel-btn {
background: none; border: none; color: var(--text-3);
cursor: pointer; padding: 4px 6px; border-radius: var(--radius);
transition: all var(--transition); display: flex; align-items: center;
}
.side-panel-btn:hover { background: var(--bg-hover); color: var(--text); }
.side-panel-close {
background: none; border: none; color: var(--text-3);
cursor: pointer; font-size: 16px; padding: 2px 6px;
border-radius: var(--radius); transition: all var(--transition);
}
.side-panel-close:hover { background: var(--bg-hover); color: var(--text); }
.side-panel-body {
flex: 1; overflow-y: auto; min-height: 0;
}
.side-panel-page { height: 100%; display: flex; flex-direction: column; }
.side-panel-empty {
display: flex; align-items: center; justify-content: center;
height: 100%; color: var(--text-3); font-size: 13px;
padding: 2rem; text-align: center;
}
.preview-frame {
flex: 1; width: 100%; border: none; background: var(--bg-surface);
}
.preview-empty {
display: flex; align-items: center; justify-content: center;
height: 100%; color: var(--text-3); font-size: 13px;
padding: 2rem; text-align: center;
}
/* Notes inside secondary pane */
.notes-actions-bar {
display: flex; align-items: center; gap: 8px;
padding: 8px 12px; border-bottom: 1px solid var(--border);
}
.workspace-secondary .notes-list, .side-panel .notes-list { padding: 4px 8px; }
.workspace-secondary .notes-editor, .side-panel .notes-editor { padding: 8px 12px; }
.workspace-secondary .note-read-content, .side-panel .note-read-content {
max-height: none; flex: 1; overflow-y: auto;
}
.workspace-secondary .notes-content-input, .side-panel .notes-content-input {
min-height: 150px;
}
.workspace-secondary #notesListView, .side-panel #notesListView {
flex: 1; overflow-y: auto; min-height: 0;
}
.workspace-secondary #notesEditorView, .side-panel #notesEditorView {
flex: 1; overflow-y: auto; min-height: 0;
}
/* Side panel overlay (mobile tap-to-close, mirrors sidebar-overlay) */
.side-panel-overlay {
display: none; position: fixed; inset: 0; z-index: 199;
background: var(--overlay);
}
/* Mobile: full-width overlay */
@media (max-width: 768px) {
.workspace-secondary.open {
position: fixed; top: 0; right: 0; bottom: 0;
width: 100vw; min-width: 100vw; z-index: 200;
}
.workspace-handle { display: none !important; }
/* Larger touch targets on mobile */
.side-panel-close { font-size: 20px; padding: 4px 10px; }
.side-panel-action-btn { padding: 6px 8px; }
.side-panel-header { padding: 10px 12px; }
}
/* Dual-view removed in workspace refactor (v0.22.0) — workspace
handles all pane placement via primary/secondary slots. */
.msg-text ul, .msg-text ol { margin: 0.4em 0; padding-left: 1.5em; }
.msg-text li { margin: 0.2em 0; }
.msg-text li > p { margin: 0.2em 0; }
.msg-text blockquote {
border-left: 3px solid var(--accent); padding: 0.25em 0.75em; margin: 0.5em 0;
color: var(--text-2); background: var(--accent-dim); border-radius: 0 var(--radius) var(--radius) 0;
}
.msg-text hr { border: none; border-top: 1px solid var(--border); margin: 0.75em 0; }
.msg-text table { border-collapse: collapse; width: 100%; margin: 0.5em 0; font-size: 13px; }
.msg-text th, .msg-text td { border: 1px solid var(--border); padding: 0.4em 0.7em; text-align: left; }
.msg-text th { background: var(--bg-raised); font-weight: 600; }
.msg-text h1, .msg-text h2, .msg-text h3, .msg-text h4 { margin: 0.75em 0 0.3em; font-weight: 600; }
.msg-text h1 { font-size: 1.4em; }
.msg-text h2 { font-size: 1.2em; }
.msg-text h3 { font-size: 1.05em; }
.msg-text a { color: var(--accent); }
.msg-text img { max-width: 100%; border-radius: var(--radius); }
/* Thinking blocks */
.thinking-block {
border: 1px solid var(--accent-dim); border-radius: var(--radius);
margin: 0.5rem 0; background: rgba(108,159,255,0.03);
}
.thinking-block summary {
padding: 0.4rem 0.75rem; cursor: pointer; font-size: 12px;
color: var(--text-3); user-select: none;
transition: color var(--transition);
}
.thinking-block summary:hover { color: var(--text-2); }
.thinking-block[open] summary { border-bottom: 1px solid rgba(108,159,255,0.08); }
.thinking-content {
padding: 0.5rem 0.75rem; font-size: 12px; color: var(--text-3);
max-height: 300px; overflow-y: auto; line-height: 1.6;
}
/* Tool activity indicators */
.msg-tools {
display: flex; flex-direction: column; gap: 4px;
margin-bottom: 0.5rem;
}
.tool-activity {
display: flex; align-items: center; gap: 6px;
font-size: 12px; color: var(--text-3);
background: var(--bg-raised); border: 1px solid var(--border);
padding: 4px 10px; border-radius: var(--radius);
animation: tool-fade-in 0.2s ease;
}
@keyframes tool-fade-in { from { opacity: 0; transform: translateY(-4px); } }
.tool-icon { font-size: 13px; }
.tool-name { font-family: var(--mono); font-size: 11px; color: var(--text-2); }
.tool-status { font-size: 11px; margin-left: auto; }
.tool-running { color: var(--warning); }
.tool-running::after {
content: ''; display: inline-block; width: 4px; height: 4px;
border-radius: 50%; background: var(--warning); margin-left: 4px;
animation: tool-pulse 1s infinite;
}
@keyframes tool-pulse { 0%,100% { opacity: 0.4; } 50% { opacity: 1; } }
.tool-done { color: var(--success); }
.tool-error { color: var(--danger); }
.tool-hint {
font-size: 11px; color: var(--text-3); margin-left: 6px;
max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tool-note-link {
background: none; border: none; color: var(--accent); cursor: pointer;
font-size: 11px; margin-left: 6px; padding: 0;
text-decoration: none;
transition: color var(--transition);
}
.tool-note-link:hover { color: var(--text); text-decoration: underline; }
/* Tool calls in message history (collapsed) */
.tool-call-block {
border: 1px solid var(--border); border-radius: var(--radius);
background: var(--bg-raised); font-size: 12px;
}
.tool-call-summary {
display: flex; align-items: center; gap: 6px;
padding: 4px 10px; cursor: pointer; user-select: none;
color: var(--text-3); list-style: none;
transition: color var(--transition);
}
.tool-call-summary::-webkit-details-marker { display: none; }
.tool-call-summary::before {
content: '▸'; font-size: 10px; color: var(--text-3);
transition: transform 0.15s ease;
}
.tool-call-block[open] .tool-call-summary::before { transform: rotate(90deg); }
.tool-call-summary:hover { color: var(--text-2); }
.tool-detail {
border-top: 1px solid var(--border); padding: 6px 10px;
display: flex; flex-direction: column; gap: 6px;
}
.tool-detail-label {
font-size: 10px; color: var(--text-3); text-transform: uppercase;
letter-spacing: 0.5px; font-weight: 600;
}
.tool-detail-pre {
margin: 2px 0 0; padding: 6px 8px;
background: var(--bg-surface); border-radius: 4px;
font-size: 11px; color: var(--text-2); white-space: pre-wrap;
word-break: break-all; max-height: 200px; overflow-y: auto;
}
/* Empty state */
.empty-state {
display: flex; flex-direction: column; align-items: center;
justify-content: center; height: 100%; color: var(--text-3); gap: 0.25rem;
}
.empty-logo { font-size: 3rem; margin-bottom: 0.5rem; }
.empty-logo-img { width: 64px; height: 64px; object-fit: contain; }
.empty-state h2 { font-size: 1.25rem; font-weight: 600; color: var(--text-2); }
.empty-state p { font-size: 0.85rem; }
/* Typing indicator */
.typing-dots { display: flex; gap: 4px; padding: 0.5rem 0; }
.typing-dots span {
width: 6px; height: 6px; border-radius: 50%; background: var(--text-3);
animation: dot-pulse 1.2s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.typing-dots span:nth-child(3) { animation-delay: 0.4s; }
@keyframes dot-pulse { 0%,60%,100% { opacity: 0.4; } 30% { opacity: 1; } }
/* ── Sidebar Notes Button ───────────────── */
.sidebar-notes-btn {
padding: 4px 8px; border-top: 1px solid var(--border);
flex-shrink: 0;
}
.sb-notes {
display: flex; align-items: center; gap: 8px; width: 100%;
padding: 8px 12px; background: none; border: none;
border-radius: var(--radius); color: var(--text-2);
cursor: pointer; font-size: 13px; font-family: var(--font);
transition: background var(--transition), color var(--transition);
}
.sb-notes:hover { background: var(--bg-hover); color: var(--text); }
.sidebar.collapsed .sidebar-notes-btn .sb-label { display: none; }
.sidebar.collapsed .sb-notes { justify-content: center; padding: 8px; }
/* ── Notes (inside side panel) ──────────── */
/* Notes toolbar and selection bar now live inside the side panel */
.notes-toolbar {
display: flex; gap: 8px; padding: 8px 12px;
border-bottom: 1px solid var(--border);
background: var(--bg-raised);
flex-wrap: wrap;
}
.notes-search-row {
padding: 8px 12px 4px;
}
.notes-search-input {
width: 100%; background: var(--input-bg); border: 1px solid var(--border);
border-radius: var(--radius); color: var(--text);
font-size: 13px; font-family: var(--font); padding: 6px 10px;
outline: none; transition: border-color var(--transition);
}
.notes-search-input:focus { border-color: var(--accent); }
.notes-filter-row {
display: flex; gap: 8px; padding: 0 12px 8px;
}
.notes-editor-header {
display: flex; align-items: center; gap: 6px;
padding: 8px 12px; border-bottom: 1px solid var(--border);
background: var(--bg-raised);
}
.notes-meta-row {
display: flex; gap: 8px; margin-bottom: 8px;
}
.notes-meta-row input { flex: 1; }
.notes-content-container { min-height: 200px; }
.notes-read-view { padding: 12px; }
.notes-search-wrap {
display: flex; align-items: center; gap: 6px; flex: 1;
background: var(--bg-surface); border: 1px solid var(--border);
border-radius: var(--radius); padding: 0 10px;
}
.notes-search-wrap svg { color: var(--text-3); flex-shrink: 0; }
.notes-search-wrap input {
flex: 1; background: none; border: none; color: var(--text);
font-size: 13px; font-family: var(--font); padding: 6px 0;
outline: none;
}
.notes-filter-select {
background: var(--bg-surface); border: 1px solid var(--border);
border-radius: var(--radius); color: var(--text); font-size: 12px;
padding: 4px 8px; font-family: var(--font); cursor: pointer;
max-width: 160px;
}
/* Notes toolbar and selection bar now live inside the side panel */
/* Selection bar */
.notes-selection-bar {
display: flex; align-items: center; gap: 10px;
padding: 6px 12px;
background: var(--accent-dim); border-bottom: 1px solid var(--border);
font-size: 12px;
}
.notes-select-all {
display: flex; align-items: center; gap: 6px;
color: var(--text-2); cursor: pointer; font-size: 12px;
}
.notes-select-all input { cursor: pointer; }
.notes-list { padding: 8px; }
.notes-empty, .notes-loading {
text-align: center; color: var(--text-3); padding: 2rem;
font-size: 13px;
}
.note-item {
display: flex; align-items: flex-start; gap: 8px;
padding: 10px 12px; border-radius: var(--radius);
cursor: pointer; border: 1px solid transparent;
transition: background var(--transition), border-color var(--transition);
}
.note-item:hover {
background: var(--bg-hover); border-color: var(--border);
}
.note-item.selected {
background: var(--accent-dim); border-color: var(--accent);
}
.note-select-col { flex-shrink: 0; padding-top: 2px; }
.note-checkbox { cursor: pointer; accent-color: var(--accent); }
.note-content-col { flex: 1; min-width: 0; }
.note-item-header {
display: flex; align-items: baseline; justify-content: space-between;
gap: 8px; margin-bottom: 2px;
}
.note-item-title {
font-size: 13px; font-weight: 600; color: var(--text);
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.note-item-time { font-size: 11px; color: var(--text-3); flex-shrink: 0; }
.note-preview {
font-size: 12px; color: var(--text-3); line-height: 1.4;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
max-height: 1.4em;
}
.note-headline {
font-size: 12px; color: var(--text-3); line-height: 1.4;
}
.note-headline mark {
background: var(--accent-dim); color: var(--accent);
padding: 0 2px; border-radius: 2px;
}
.note-item-meta {
display: flex; align-items: center; gap: 4px;
margin-top: 4px; flex-wrap: wrap;
}
.note-folder {
font-size: 11px; color: var(--text-3); font-family: var(--mono);
background: var(--bg-raised); padding: 1px 6px; border-radius: 3px;
}
.note-tag {
font-size: 10px; color: var(--purple); background: var(--purple-dim);
padding: 1px 6px; border-radius: 3px;
}
/* Notes editor */
.notes-editor { padding: 12px; }
.notes-editor-toolbar {
display: flex; align-items: center; justify-content: space-between;
margin-bottom: 8px;
}
/* Note read mode */
.note-read-title {
font-size: 18px; font-weight: 600; color: var(--text);
margin: 0 0 6px; line-height: 1.3;
}
.note-read-meta {
display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
margin-bottom: 12px;
}
.note-read-content {
font-size: var(--msg-font, 14px); line-height: 1.7;
max-height: 50vh; overflow-y: auto;
padding: 12px; background: var(--bg-surface);
border: 1px solid var(--border); border-radius: var(--radius);
}
.notes-back-btn {
background: none; border: none; color: var(--text-3);
cursor: pointer; font-size: 12px; font-family: var(--font);
padding: 4px 0; margin-bottom: 8px;
transition: color var(--transition);
}
.notes-back-btn:hover { color: var(--text); }
.notes-title-input {
font-size: 16px !important; font-weight: 600;
border: 1px solid var(--border) !important;
padding: 8px 10px !important;
}
.notes-folder-input, .notes-tags-input {
font-size: 12px !important; font-family: var(--mono);
}
.notes-content-input {
font-size: 13px !important; line-height: 1.6 !important;
min-height: 200px; resize: vertical;
font-family: var(--mono); border: 1px solid var(--border) !important;
}
.notes-editor input, .notes-editor textarea {
width: 100%; background: var(--bg-surface); color: var(--text);
border: 1px solid var(--border); border-radius: var(--radius);
padding: 6px 10px; font-family: var(--font); font-size: var(--msg-font, 14px);
outline: none; transition: border-color var(--transition);
}
.notes-editor input:focus, .notes-editor textarea:focus {
border-color: var(--accent);
}
.notes-editor-actions {
display: flex; gap: 8px; margin-top: 12px;
}
/* ── Note Backlinks ──────────────────────── */
.note-backlinks {
margin-top: 16px; border-top: 1px solid var(--border); padding-top: 12px;
}
.note-backlinks-header {
display: flex; align-items: center; gap: 8px;
font-size: 12px; color: var(--text-2); cursor: pointer;
padding: 4px 0; user-select: none;
}
.note-backlinks-header:hover { color: var(--text); }
.note-backlinks-header .badge {
background: var(--accent); color: var(--text-on-color); font-size: 10px;
padding: 1px 6px; border-radius: 10px;
}
.note-backlinks-list { margin-top: 6px; }
.note-backlink-item {
display: flex; align-items: center; gap: 8px;
padding: 6px 8px; border-radius: var(--radius); cursor: pointer;
font-size: 13px; transition: background var(--transition);
}
.note-backlink-item:hover { background: var(--bg-hover); }
.note-backlink-title { color: var(--accent); font-weight: 500; }
.note-backlink-folder { font-size: 11px; color: var(--text-3); }
/* ── Wikilink Chips (Read Mode) ──────────── */
.wikilink-chip {
display: inline-block; padding: 1px 6px; margin: 0 1px;
border-radius: 4px; cursor: pointer; font-size: 0.9em;
font-weight: 500; text-decoration: none; vertical-align: baseline;
background: rgba(var(--accent-rgb, 99, 102, 241), 0.15);
color: var(--accent, #6366f1);
transition: background var(--transition);
}
.wikilink-chip:hover {
background: rgba(var(--accent-rgb, 99, 102, 241), 0.25);
}
.wikilink-transclusion {
border-left: 2px solid var(--accent, #6366f1);
font-style: italic;
}
/* ── Transclusion Embeds ─────────────────── */
.transclusion-embed {
margin: 8px 0; border: 1px solid var(--border);
border-left: 3px solid var(--accent, #6366f1);
border-radius: var(--radius); overflow: hidden;
background: var(--bg-surface);
}
.transclusion-header {
padding: 6px 10px; background: var(--bg-2);
border-bottom: 1px solid var(--border); font-size: 12px;
}
.transclusion-content {
padding: 10px 12px; font-size: 13px; line-height: 1.5;
}
.transclusion-content .msg-text { margin: 0; }
/* ── Graph View ──────────────────────────── */
.notes-graph-view {
display: flex; flex-direction: column; height: 100%;
}
.notes-graph-toolbar {
display: flex; align-items: center; gap: 8px;
padding: 6px 10px; border-bottom: 1px solid var(--border);
background: var(--bg-surface); flex-shrink: 0;
}
.notes-graph-stats {
flex: 1; text-align: center; font-size: 11px; color: var(--text-3);
}
#noteGraphCanvas {
flex: 1; width: 100%; min-height: 200px;
background: var(--bg);
}
/* ── Daily Note Navigation ───────────────── */
.note-daily-nav {
display: flex; align-items: center; justify-content: center;
gap: 12px; padding: 6px 10px;
border-bottom: 1px solid var(--border); background: var(--bg-surface);
}
.note-daily-date {
font-size: 13px; font-weight: 500; color: var(--text);
min-width: 100px; text-align: center;
}
/* ── Save-to-Note Modal ──────────────────── */
.save-to-note-modal {
max-width: 460px; width: 90%;
}
.save-to-note-modal h3 { margin: 0 0 12px; font-size: 16px; }
.save-note-mode-toggle {
display: flex; gap: 16px; margin-bottom: 12px; font-size: 13px;
}
.save-note-mode-toggle label { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.save-note-preview {
max-height: 120px; overflow-y: auto; padding: 8px;
border: 1px solid var(--border); border-radius: var(--radius);
background: var(--bg); font-size: 12px; line-height: 1.5;
}
.save-note-search-results {
max-height: 160px; overflow-y: auto; margin-top: 4px;
border: 1px solid var(--border); border-radius: var(--radius);
background: var(--bg-surface);
}
.save-note-search-results:empty { display: none; }
.save-note-result {
padding: 6px 10px; cursor: pointer; font-size: 13px;
transition: background var(--transition);
}
.save-note-result:hover, .save-note-result.selected {
background: var(--bg-hover);
}
.save-note-result.selected {
border-left: 3px solid var(--accent); font-weight: 500;
}