feat: peg AI inline suggestions to granular text spans, add autosave revision history with restore, fix focus mode, and make PS logo background transparent

This commit is contained in:
Schwitzz
2026-10-30 12:49:43 -05:00
parent f40f23dcb9
commit 951aa81055
11 changed files with 1093 additions and 424 deletions
+116 -6
View File
@@ -144,17 +144,16 @@ body {
}
.ps-sidebar-logo-only {
width: 68px;
height: 68px;
border-radius: 12px;
width: 88px;
height: auto;
background: transparent;
display: block;
flex-shrink: 0;
transition: width 0.16s ease, height 0.16s ease;
}
.ps-sidebar.is-collapsed .ps-sidebar-logo-only {
width: 44px;
height: 44px;
border-radius: 9px;
width: 48px;
height: auto;
}
.ps-sidebar-toggle {
@@ -1278,5 +1277,116 @@ body {
::-webkit-scrollbar-thumb { background: var(--ps-border); border-radius: 5px; border: 2px solid var(--ps-bg); }
::-webkit-scrollbar-thumb:hover { background: var(--ps-text-muted); }
/* ---- Sidebar Autosave Revisions ---- */
.ps-sidebar-revisions {
margin-top: 8px;
padding-top: 8px;
border-top: 1px solid var(--ps-border);
display: flex;
flex-direction: column;
gap: 6px;
}
.ps-sidebar-revisions-sub {
font-size: 11.5px;
font-weight: 600;
color: var(--ps-text);
padding: 0 4px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.ps-sidebar-revisions-list {
display: flex;
flex-direction: column;
gap: 4px;
max-height: 220px;
overflow-y: auto;
}
.ps-sidebar-rev-item {
display: flex;
align-items: center;
justify-content: space-between;
gap: 6px;
padding: 5px 7px;
border-radius: 6px;
background: var(--ps-surface-2);
border: 1px solid var(--ps-border);
font-size: 11px;
}
.ps-sidebar-rev-info {
display: flex;
flex-direction: column;
min-width: 0;
}
.ps-sidebar-rev-num {
font-family: var(--ps-font-mono);
font-weight: 700;
color: var(--ps-text);
font-size: 11px;
}
.ps-sidebar-rev-meta {
font-size: 10px;
color: var(--ps-text-muted);
white-space: nowrap;
}
.ps-sidebar-rev-current {
font-size: 10px;
font-weight: 700;
padding: 2px 6px;
border-radius: 999px;
background: color-mix(in srgb, var(--ps-success) 16%, transparent);
color: var(--ps-success);
white-space: nowrap;
}
.ps-sidebar-rev-restore {
border: 1px solid color-mix(in srgb, var(--ps-accent) 55%, var(--ps-border));
background: color-mix(in srgb, var(--ps-accent) 14%, transparent);
color: var(--ps-accent);
border-radius: 6px;
padding: 2px 7px;
font-family: var(--ps-font-ui);
font-size: 10.5px;
font-weight: 600;
cursor: pointer;
white-space: nowrap;
transition: background 0.12s, color 0.12s;
}
.ps-sidebar-rev-restore:hover {
background: var(--ps-accent);
color: var(--ps-accent-contrast);
}
/* ---- Focus Mode: Dim Surrounding UI Chrome, Keep Writing Pane Bright ---- */
.ps-app.is-focus-mode .ps-sidebar,
.ps-app.is-focus-mode .ps-topbar,
.ps-app.is-focus-mode .ps-writing-toolbar,
.ps-app.is-focus-mode .ps-context-rail,
.ps-app.is-focus-mode .ps-writing-status,
.ps-app.is-focus-mode .ps-ai-sidebar {
opacity: 0.18;
filter: saturate(0.45);
transition: opacity 0.22s ease, filter 0.22s ease;
}
.ps-app.is-focus-mode .ps-sidebar:hover,
.ps-app.is-focus-mode .ps-sidebar:focus-within,
.ps-app.is-focus-mode .ps-topbar:hover,
.ps-app.is-focus-mode .ps-topbar:focus-within,
.ps-app.is-focus-mode .ps-writing-toolbar:hover,
.ps-app.is-focus-mode .ps-writing-toolbar:focus-within,
.ps-app.is-focus-mode .ps-context-rail:hover,
.ps-app.is-focus-mode .ps-context-rail:focus-within,
.ps-app.is-focus-mode .ps-writing-status:hover,
.ps-app.is-focus-mode .ps-ai-sidebar:hover,
.ps-app.is-focus-mode .ps-ai-sidebar:focus-within {
opacity: 0.96;
filter: saturate(1);
}
.ps-app.is-focus-mode .ps-editor-scroll,
.ps-app.is-focus-mode .ps-editor-writing,
.ps-app.is-focus-mode .ProseMirror {
opacity: 1 !important;
filter: none !important;
}
/* ---- Focus visible ---- */
:focus-visible { outline: 2px solid var(--ps-accent); outline-offset: 2px; }