feat(editor): implement US-EDITOR-UX with global block selection, redesigned slash menu (favorites & preview), contextual placeholders, smart paste extended, turn into and undo/redo toasts
This commit is contained in:
@@ -2497,6 +2497,318 @@ html.font-system * {
|
||||
color: var(--muted-foreground);
|
||||
}
|
||||
|
||||
/* Sélection premium de blocs */
|
||||
.block-selected {
|
||||
background-color: hsl(var(--accent) / 0.3) !important;
|
||||
outline: 1.5px solid hsl(var(--accent) / 0.5) !important;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
|
||||
transition: background-color 0.15s ease, outline 0.15s ease;
|
||||
}
|
||||
|
||||
/* ============================================
|
||||
Slash Menu Preview & Favorites — Premium Design
|
||||
============================================ */
|
||||
.notion-slash-preview {
|
||||
position: fixed;
|
||||
z-index: 9999;
|
||||
width: 280px;
|
||||
background: var(--popover);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05), 0 12px 40px rgba(0, 0, 0, 0.1);
|
||||
padding: 12px;
|
||||
animation: preview-enter 0.25s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
pointer-events: none;
|
||||
backdrop-filter: blur(10px);
|
||||
}
|
||||
|
||||
.dark .notion-slash-preview {
|
||||
background: rgba(20, 20, 20, 0.85);
|
||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3), 0 12px 40px rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
@keyframes preview-enter {
|
||||
from {
|
||||
opacity: 0;
|
||||
transform: translateY(2px) scale(0.97);
|
||||
}
|
||||
to {
|
||||
opacity: 1;
|
||||
transform: translateY(0) scale(1);
|
||||
}
|
||||
}
|
||||
|
||||
.slash-preview-box {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.slash-preview-title {
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: var(--foreground);
|
||||
letter-spacing: 0.02em;
|
||||
border-bottom: 1px solid var(--border);
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
|
||||
.slash-preview-tip {
|
||||
font-size: 10.5px;
|
||||
color: var(--muted-foreground);
|
||||
line-height: 1.4;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Miniatures de preview interactives */
|
||||
.slash-preview-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
gap: 3px;
|
||||
background: var(--muted);
|
||||
padding: 6px;
|
||||
border-radius: 6px;
|
||||
border: 1px dashed var(--border);
|
||||
}
|
||||
|
||||
.slash-preview-grid-header {
|
||||
height: 14px;
|
||||
background: hsl(var(--primary) / 0.2);
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.slash-preview-grid-cell {
|
||||
height: 14px;
|
||||
background: var(--background);
|
||||
border-radius: 2px;
|
||||
}
|
||||
|
||||
.slash-preview-db {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 3px;
|
||||
background: var(--muted);
|
||||
padding: 6px;
|
||||
border-radius: 6px;
|
||||
border: 1px dashed var(--border);
|
||||
}
|
||||
|
||||
.slash-preview-db-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
font-size: 9px;
|
||||
height: 16px;
|
||||
background: var(--background);
|
||||
padding: 0 4px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.slash-preview-db-row.header {
|
||||
background: hsl(var(--primary) / 0.15);
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.badge {
|
||||
font-size: 8px;
|
||||
padding: 1px 4px;
|
||||
border-radius: 10px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.badge-todo {
|
||||
background: hsl(200 80% 50% / 0.15);
|
||||
color: hsl(200 80% 40%);
|
||||
}
|
||||
|
||||
.badge-done {
|
||||
background: hsl(120 80% 50% / 0.15);
|
||||
color: hsl(120 80% 35%);
|
||||
}
|
||||
|
||||
.slash-preview-chart {
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
height: 48px;
|
||||
background: var(--muted);
|
||||
padding: 6px 12px;
|
||||
border-radius: 6px;
|
||||
border: 1px dashed var(--border);
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.chart-bar {
|
||||
flex: 1;
|
||||
background: linear-gradient(to top, hsl(var(--primary)), hsl(var(--primary) / 0.5));
|
||||
border-radius: 2px 2px 0 0;
|
||||
min-height: 4px;
|
||||
transition: height 0.3s ease;
|
||||
}
|
||||
|
||||
.slash-preview-live {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
background: var(--muted);
|
||||
padding: 8px;
|
||||
border-radius: 6px;
|
||||
border: 1px dashed var(--border);
|
||||
}
|
||||
|
||||
.live-note {
|
||||
font-size: 9px;
|
||||
background: var(--background);
|
||||
border: 1px solid var(--border);
|
||||
padding: 2px 6px;
|
||||
border-radius: 4px;
|
||||
font-weight: 500;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
|
||||
}
|
||||
|
||||
.live-sync-line {
|
||||
flex: 1;
|
||||
height: 1px;
|
||||
border-top: 1.5px dotted hsl(var(--primary) / 0.6);
|
||||
margin: 0 6px;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.live-sync-line::after {
|
||||
content: '⚡';
|
||||
position: absolute;
|
||||
font-size: 8px;
|
||||
top: -6px;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
|
||||
.slash-preview-excalidraw {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 48px;
|
||||
background: var(--muted);
|
||||
border-radius: 6px;
|
||||
border: 1px dashed var(--border);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.excalidraw-circle {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
border: 1.5px solid hsl(var(--foreground));
|
||||
border-radius: 50%;
|
||||
position: absolute;
|
||||
left: 30%;
|
||||
}
|
||||
|
||||
.excalidraw-rect {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border: 1.5px solid hsl(var(--foreground));
|
||||
border-radius: 3px;
|
||||
position: absolute;
|
||||
right: 30%;
|
||||
}
|
||||
|
||||
.excalidraw-arrow {
|
||||
width: 24px;
|
||||
height: 1.5px;
|
||||
background: hsl(var(--primary));
|
||||
position: absolute;
|
||||
transform: rotate(-15deg);
|
||||
}
|
||||
|
||||
.excalidraw-arrow::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: -2.5px;
|
||||
border-top: 3px solid transparent;
|
||||
border-bottom: 3px solid transparent;
|
||||
border-left: 5px solid hsl(var(--primary));
|
||||
}
|
||||
|
||||
.slash-preview-slides {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 48px;
|
||||
background: var(--muted);
|
||||
border-radius: 6px;
|
||||
border: 1px dashed var(--border);
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.slide-item {
|
||||
width: 32px;
|
||||
height: 22px;
|
||||
background: var(--background);
|
||||
border: 1.5px solid var(--border);
|
||||
border-radius: 3px;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.slide-item.active {
|
||||
border-color: hsl(var(--primary));
|
||||
background: hsl(var(--primary) / 0.1);
|
||||
opacity: 1;
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.slash-preview-code {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
background: #1e1e1e;
|
||||
padding: 6px;
|
||||
border-radius: 6px;
|
||||
height: 48px;
|
||||
}
|
||||
|
||||
.code-dot {
|
||||
width: 4px;
|
||||
height: 4px;
|
||||
border-radius: 50%;
|
||||
display: inline-block;
|
||||
margin-right: 2px;
|
||||
}
|
||||
|
||||
.code-dot.red { background: #ff5f56; }
|
||||
.code-dot.yellow { background: #ffbd2e; }
|
||||
.code-dot.green { background: #27c93f; }
|
||||
|
||||
.code-line {
|
||||
height: 4px;
|
||||
border-radius: 2px;
|
||||
width: 60%;
|
||||
}
|
||||
|
||||
.code-line.green { background: #a9ff68; width: 45%; }
|
||||
.code-line.blue { background: #54b2ff; width: 70%; }
|
||||
|
||||
/* Style des éléments favoris */
|
||||
.notion-slash-item-favorite {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.notion-slash-item-favorite::after {
|
||||
content: '★';
|
||||
position: absolute;
|
||||
right: 12px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%);
|
||||
color: #ffb700;
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.dark .notion-slash-item-favorite::after {
|
||||
color: #ffd260;
|
||||
}
|
||||
|
||||
|
||||
/* ============================================
|
||||
Note Card Rich Text Preview
|
||||
============================================ */
|
||||
|
||||
Reference in New Issue
Block a user