feat: migrate to shadcn/ui

Install Tailwind CSS v4 + shadcn/ui with Radix UI primitives. Migrate all
UI components (Sidebar, NoteList, Editor tabs, Inspector, dialogs, palette)
from BEM CSS to Tailwind utility classes and shadcn components (Button,
Input, Dialog, Badge, etc.). Map theme system to shadcn CSS variables while
preserving BlockNote editor styles untouched. Remove 8 old CSS files.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
lucaronin
2026-02-16 16:56:44 +01:00
parent 4d33435bfd
commit 6989f44031
43 changed files with 3786 additions and 2173 deletions

View File

@@ -1,112 +1,3 @@
.editor {
background: var(--bg-primary);
color: var(--text-primary);
display: flex;
flex-direction: column;
flex: 1;
min-width: 0;
overflow: hidden;
}
.editor__placeholder {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
height: 100%;
text-align: center;
color: var(--text-muted);
gap: 8px;
}
.editor__placeholder p {
margin: 0;
font-size: 15px;
}
.editor__placeholder-hint {
font-size: 12px;
color: var(--text-faint);
}
.editor__drag-strip {
height: 48px;
flex-shrink: 0;
-webkit-app-region: drag;
app-region: drag;
}
/* Tab bar */
.editor__tab-bar {
display: flex;
background: var(--bg-card);
border-bottom: 1px solid var(--border-primary);
overflow-x: auto;
flex-shrink: 0;
-webkit-app-region: drag;
app-region: drag;
}
.editor__tab-bar::-webkit-scrollbar {
height: 0;
}
.editor__tab {
display: flex;
align-items: center;
gap: 6px;
padding: 7px 14px;
font-size: 12px;
color: var(--text-tertiary);
cursor: pointer;
border-right: 1px solid var(--border-primary);
white-space: nowrap;
max-width: 180px;
flex-shrink: 0;
transition: all 0.1s;
-webkit-app-region: no-drag;
app-region: no-drag;
}
.editor__tab:hover {
background: var(--bg-hover-subtle);
color: var(--text-secondary);
}
.editor__tab--active {
background: var(--bg-primary);
color: var(--text-primary);
border-bottom: 2px solid var(--accent-blue);
}
.editor__tab-title {
overflow: hidden;
text-overflow: ellipsis;
}
.editor__tab-close {
background: none;
border: none;
color: var(--text-muted);
cursor: pointer;
font-size: 14px;
padding: 0 2px;
line-height: 1;
border-radius: 3px;
opacity: 0;
transition: opacity 0.1s;
}
.editor__tab:hover .editor__tab-close,
.editor__tab--active .editor__tab-close {
opacity: 1;
}
.editor__tab-close:hover {
background: var(--bg-hover);
color: var(--text-primary);
}
/* Wikilink inline content */
.wikilink {
color: var(--accent-blue, #2196f3);
@@ -143,126 +34,6 @@
max-width: 760px;
}
/* Tab bar actions (diff toggle) */
.editor__tab-bar-actions {
display: flex;
align-items: center;
margin-left: auto;
padding: 0 8px;
-webkit-app-region: no-drag;
app-region: no-drag;
}
.editor__diff-toggle {
padding: 3px 10px;
font-size: 11px;
border: 1px solid var(--border-primary);
border-radius: 4px;
background: transparent;
color: var(--text-tertiary);
cursor: pointer;
transition: all 0.15s;
font-weight: 500;
}
.editor__diff-toggle:hover {
background: var(--bg-button);
color: var(--text-secondary);
}
.editor__diff-toggle--active {
background: var(--accent-blue-bg);
color: var(--accent-blue);
border-color: var(--accent-blue-bg);
}
.editor__diff-toggle:disabled {
opacity: 0.5;
cursor: default;
}
/* Diff view */
.editor__diff-container {
flex: 1;
overflow: auto;
}
.diff-view {
font-family: 'SF Mono', 'Menlo', 'Consolas', monospace;
font-size: 13px;
line-height: 1.6;
padding: 12px 0;
}
.diff-view__empty {
display: flex;
align-items: center;
justify-content: center;
height: 100%;
color: var(--text-muted);
font-size: 14px;
}
.diff-view__line {
display: flex;
padding: 0 16px;
min-height: 22px;
}
.diff-view__line-number {
width: 40px;
flex-shrink: 0;
text-align: right;
padding-right: 12px;
color: var(--text-faint);
user-select: none;
}
.diff-view__line-content {
flex: 1;
white-space: pre-wrap;
word-break: break-all;
padding: 0 8px;
}
.diff-view__line--added {
background: rgba(76, 175, 80, 0.12);
}
.diff-view__line--added .diff-view__line-content {
color: #4caf50;
}
.diff-view__line--removed {
background: rgba(244, 67, 54, 0.12);
}
.diff-view__line--removed .diff-view__line-content {
color: #f44336;
}
.diff-view__line--hunk {
background: rgba(33, 150, 243, 0.08);
}
.diff-view__line--hunk .diff-view__line-content {
color: var(--accent-blue, #2196f3);
font-style: italic;
}
.diff-view__line--header {
background: var(--bg-hover-subtle);
}
.diff-view__line--header .diff-view__line-content {
color: var(--text-muted);
font-weight: 600;
}
.diff-view__line--context .diff-view__line-content {
color: var(--text-secondary);
}
/* =============================================
Bear-style live preview: zero horizontal shift
============================================= */