mirror of
https://github.com/amitwh/markdown-converter.git
synced 2026-10-01 09:19:34 +05:30
v4.9.4 shipped three interaction bugs in the Flow Chart panel that combined to make it look broken at runtime: (1) .flowchart-preview-render had no min-height, so the Mermaid SVG clipped to 0 when the sidebar flex column shrank; (2) the canvas + preview hosts inherited the body.theme-concreteinfo dark theme, producing dark-on-dark nodes; (3) .flowchart-node.selected only set a 2px stroke on the rect's existing dark fill, which was effectively invisible. Fix: styles-sidebar.css adds min-height: 120px on .flowchart-preview-render; forces a light background on .flowchart-canvas-host / .flowchart-preview-host with !important so theme inheritance cannot override it; forces explicit white fills and dark strokes on .flowchart-node rect/polygon/text and .flowchart-edge so labels read against any background; selection now changes fill (#e3f0ff) AND bumps stroke-width to 3 on both nodes and edges. renderer.js renderFlowChartMermaid now always initializes Mermaid with theme: 'default' regardless of body class — keeps the Mermaid SVG light to match the CSS-forced canvas surface. Three new CSS regression tests in tests/flowchart-panel.test.js read the shipped stylesheet and assert the three structural invariants (non-zero min-height on render target, !important light background on canvas+preview hosts, fill + stroke-width >= 3 on .flowchart-node.selected). Tradeoff: the flowchart surface is now always light, diverging from body theme. Visibility of a working editor is the priority per user direction. Amit Haridas
1213 lines
24 KiB
CSS
1213 lines
24 KiB
CSS
/* Sidebar */
|
|
.main-content {
|
|
display: flex;
|
|
flex: 1;
|
|
overflow: hidden;
|
|
min-height: 0;
|
|
}
|
|
|
|
.sidebar {
|
|
display: flex;
|
|
flex-shrink: 0;
|
|
height: 100%;
|
|
transition: width 0.2s ease;
|
|
}
|
|
|
|
.sidebar.collapsed {
|
|
width: 48px;
|
|
}
|
|
|
|
.sidebar:not(.collapsed) {
|
|
width: 328px; /* 48px icons + 280px panel */
|
|
}
|
|
|
|
.sidebar-icons {
|
|
display: flex;
|
|
flex-direction: column;
|
|
width: 48px;
|
|
background: var(--gray-100, #f3f4f6);
|
|
border-right: 1px solid var(--gray-200, #e5e7eb);
|
|
padding: 8px 0;
|
|
gap: 4px;
|
|
align-items: center;
|
|
}
|
|
|
|
.sidebar-icon {
|
|
width: 36px;
|
|
height: 36px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border: none;
|
|
background: transparent;
|
|
border-radius: 8px;
|
|
cursor: pointer;
|
|
color: var(--gray-500, #6b7280);
|
|
transition: all 0.15s ease;
|
|
}
|
|
|
|
.sidebar-icon:hover {
|
|
background: var(--gray-200, #e5e7eb);
|
|
color: var(--gray-700, #374151);
|
|
}
|
|
|
|
.sidebar-icon.active {
|
|
background: var(--gray-200, #e5e7eb);
|
|
color: var(--primary-dark, #5661b3);
|
|
box-shadow: inset 3px 0 0 var(--primary-dark, #5661b3);
|
|
}
|
|
|
|
.sidebar-icon:focus-visible {
|
|
outline: 2px solid var(--primary-dark, #5661b3);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
.sidebar-panel {
|
|
width: 280px;
|
|
background: var(--gray-50, #f9fafb);
|
|
border-right: 1px solid var(--gray-200, #e5e7eb);
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.sidebar.collapsed .sidebar-panel {
|
|
display: none;
|
|
}
|
|
|
|
.sidebar-panel-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 12px 16px;
|
|
border-bottom: 1px solid var(--gray-200, #e5e7eb);
|
|
font-weight: 600;
|
|
font-size: 13px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
color: var(--gray-600, #4b5563);
|
|
}
|
|
|
|
.sidebar-panel-close {
|
|
background: none;
|
|
border: none;
|
|
font-size: 18px;
|
|
cursor: pointer;
|
|
color: var(--gray-400, #9ca3af);
|
|
padding: 0 4px;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.sidebar-panel-close:hover {
|
|
background: var(--gray-200, #e5e7eb);
|
|
color: var(--gray-600, #4b5563);
|
|
}
|
|
|
|
.sidebar-panel-close:focus-visible {
|
|
outline: 2px solid var(--primary-dark, #5661b3);
|
|
outline-offset: 2px;
|
|
}
|
|
|
|
.sidebar-panel-content {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 12px;
|
|
}
|
|
|
|
/* Dark theme support */
|
|
body[class*='dark'] .sidebar-icons,
|
|
body[class*='dark'] .sidebar-panel {
|
|
background: #1e1e1e;
|
|
border-color: #333;
|
|
}
|
|
|
|
body[class*='dark'] .sidebar-icon {
|
|
color: #888;
|
|
}
|
|
|
|
body[class*='dark'] .sidebar-icon:hover {
|
|
background: #333;
|
|
color: #ccc;
|
|
}
|
|
|
|
body[class*='dark'] .sidebar-icon.active {
|
|
background: #333;
|
|
color: #8b9aff;
|
|
box-shadow: inset 3px 0 0 #8b9aff;
|
|
}
|
|
|
|
body[class*='dark'] .sidebar-panel-header {
|
|
border-color: #333;
|
|
color: #ccc;
|
|
}
|
|
|
|
/* Panel list items (templates, etc.) */
|
|
.panel-list-item {
|
|
padding: 10px 12px;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
margin-bottom: 4px;
|
|
}
|
|
.panel-list-item:hover {
|
|
background: var(--gray-200, #e5e7eb);
|
|
}
|
|
.panel-list-item-title {
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
color: var(--gray-800, #1f2937);
|
|
}
|
|
.panel-list-item-desc {
|
|
font-size: 11px;
|
|
color: var(--gray-500, #6b7280);
|
|
margin-top: 2px;
|
|
}
|
|
|
|
body[class*='dark'] .panel-list-item:hover {
|
|
background: #333;
|
|
}
|
|
body[class*='dark'] .panel-list-item-title {
|
|
color: #ddd;
|
|
}
|
|
body[class*='dark'] .panel-list-item-desc {
|
|
color: #888;
|
|
}
|
|
|
|
/* Explorer Panel */
|
|
.explorer-toolbar {
|
|
display: flex;
|
|
gap: 4px;
|
|
margin-bottom: 8px;
|
|
}
|
|
.explorer-path {
|
|
flex: 1;
|
|
padding: 6px 8px;
|
|
border: 1px solid var(--gray-300, #d1d5db);
|
|
border-radius: 6px;
|
|
font-size: 12px;
|
|
background: white;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
.explorer-browse-btn {
|
|
border: 1px solid var(--gray-300, #d1d5db);
|
|
border-radius: 6px;
|
|
background: white;
|
|
cursor: pointer;
|
|
padding: 4px 8px;
|
|
}
|
|
.tree-item {
|
|
padding: 3px 0;
|
|
cursor: pointer;
|
|
font-size: 13px;
|
|
user-select: none;
|
|
}
|
|
.tree-item:hover {
|
|
background: var(--gray-100, #f3f4f6);
|
|
border-radius: 4px;
|
|
}
|
|
.tree-icon {
|
|
margin-right: 4px;
|
|
font-size: 12px;
|
|
}
|
|
.tree-children {
|
|
padding-left: 16px;
|
|
}
|
|
.tree-folder.collapsed .tree-children {
|
|
display: none;
|
|
}
|
|
.tree-name {
|
|
font-size: 13px;
|
|
}
|
|
|
|
/* Git Panel */
|
|
.git-section {
|
|
margin-bottom: 16px;
|
|
}
|
|
.git-section-title {
|
|
font-size: 11px;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.05em;
|
|
color: var(--gray-500);
|
|
margin-bottom: 8px;
|
|
}
|
|
.git-file {
|
|
display: flex;
|
|
align-items: center;
|
|
padding: 4px 6px;
|
|
border-radius: 4px;
|
|
font-size: 13px;
|
|
gap: 6px;
|
|
}
|
|
.git-file:hover {
|
|
background: var(--gray-100, #f3f4f6);
|
|
}
|
|
.git-file-status {
|
|
font-weight: 700;
|
|
font-family: monospace;
|
|
width: 16px;
|
|
text-align: center;
|
|
}
|
|
.git-file-name {
|
|
flex: 1;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
.git-stage-btn {
|
|
border: none;
|
|
background: var(--gray-200);
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
width: 22px;
|
|
height: 22px;
|
|
}
|
|
.git-commit-input {
|
|
width: 100%;
|
|
padding: 8px;
|
|
border: 1px solid var(--gray-300);
|
|
border-radius: 6px;
|
|
font-size: 13px;
|
|
font-family: inherit;
|
|
resize: vertical;
|
|
box-sizing: border-box;
|
|
}
|
|
.git-commit-btn {
|
|
width: 100%;
|
|
margin-top: 8px;
|
|
padding: 8px;
|
|
background: var(--primary-dark, #5661b3);
|
|
color: white;
|
|
border: none;
|
|
border-radius: 6px;
|
|
font-size: 13px;
|
|
cursor: pointer;
|
|
}
|
|
.git-commit-btn:hover {
|
|
opacity: 0.9;
|
|
}
|
|
.git-log-entry {
|
|
padding: 6px 0;
|
|
border-bottom: 1px solid var(--gray-100);
|
|
}
|
|
.git-log-msg {
|
|
font-size: 13px;
|
|
}
|
|
.git-log-meta {
|
|
font-size: 11px;
|
|
color: var(--gray-500);
|
|
margin-top: 2px;
|
|
}
|
|
.git-info {
|
|
font-size: 13px;
|
|
color: var(--gray-500);
|
|
padding: 8px 0;
|
|
}
|
|
.git-loading {
|
|
font-size: 13px;
|
|
color: var(--gray-400);
|
|
}
|
|
.git-diff-btn {
|
|
border: none;
|
|
background: var(--gray-200);
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 11px;
|
|
padding: 2px 6px;
|
|
}
|
|
.git-diff-view {
|
|
margin-top: 8px;
|
|
max-height: 240px;
|
|
overflow: auto;
|
|
padding: 8px;
|
|
background: var(--gray-100, #f3f4f6);
|
|
border-radius: 6px;
|
|
font-size: 12px;
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
}
|
|
.git-branch-item {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 4px 6px;
|
|
border-radius: 4px;
|
|
font-size: 13px;
|
|
gap: 6px;
|
|
}
|
|
.git-branch-item:hover {
|
|
background: var(--gray-100, #f3f4f6);
|
|
}
|
|
.git-branch-current {
|
|
font-weight: 600;
|
|
}
|
|
.git-branch-name {
|
|
flex: 1;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
.git-checkout-btn {
|
|
border: none;
|
|
background: var(--gray-200);
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 11px;
|
|
padding: 2px 6px;
|
|
}
|
|
.git-branch-new {
|
|
display: flex;
|
|
gap: 4px;
|
|
margin-top: 8px;
|
|
}
|
|
.git-branch-input {
|
|
flex: 1;
|
|
padding: 6px 8px;
|
|
border: 1px solid var(--gray-300);
|
|
border-radius: 6px;
|
|
font-size: 13px;
|
|
box-sizing: border-box;
|
|
}
|
|
.git-branch-create-btn {
|
|
border: none;
|
|
background: var(--gray-200);
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
font-size: 12px;
|
|
padding: 6px 8px;
|
|
}
|
|
.git-remote-actions {
|
|
display: flex;
|
|
gap: 8px;
|
|
margin-top: 8px;
|
|
}
|
|
.git-push-btn,
|
|
.git-pull-btn {
|
|
flex: 1;
|
|
padding: 8px;
|
|
background: var(--primary-dark, #5661b3);
|
|
color: white;
|
|
border: none;
|
|
border-radius: 6px;
|
|
font-size: 13px;
|
|
cursor: pointer;
|
|
}
|
|
.git-push-btn:hover,
|
|
.git-pull-btn:hover {
|
|
opacity: 0.9;
|
|
}
|
|
.git-remote-status {
|
|
font-size: 12px;
|
|
color: var(--gray-500);
|
|
margin-top: 6px;
|
|
min-height: 14px;
|
|
}
|
|
|
|
/* Snippets Panel */
|
|
.snippets-toolbar {
|
|
display: flex;
|
|
gap: 4px;
|
|
margin-bottom: 8px;
|
|
}
|
|
.snippets-search {
|
|
flex: 1;
|
|
padding: 6px 10px;
|
|
border: 1px solid var(--gray-300);
|
|
border-radius: 6px;
|
|
font-size: 13px;
|
|
}
|
|
.snippets-add-btn {
|
|
width: 32px;
|
|
border: 1px solid var(--gray-300);
|
|
border-radius: 6px;
|
|
background: white;
|
|
font-size: 18px;
|
|
cursor: pointer;
|
|
}
|
|
.snippet-item {
|
|
padding: 8px;
|
|
border: 1px solid var(--gray-200);
|
|
border-radius: 6px;
|
|
margin-bottom: 6px;
|
|
}
|
|
.snippet-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 4px;
|
|
}
|
|
.snippet-name {
|
|
font-size: 13px;
|
|
font-weight: 500;
|
|
}
|
|
.snippet-lang {
|
|
font-size: 11px;
|
|
background: var(--gray-100);
|
|
padding: 2px 6px;
|
|
border-radius: 4px;
|
|
color: var(--gray-500);
|
|
}
|
|
.snippet-preview {
|
|
font-size: 12px;
|
|
background: var(--gray-50);
|
|
padding: 6px;
|
|
border-radius: 4px;
|
|
margin: 4px 0;
|
|
overflow: hidden;
|
|
max-height: 60px;
|
|
}
|
|
.snippet-preview code {
|
|
font-family: 'JetBrains Mono', monospace;
|
|
}
|
|
.snippet-actions {
|
|
display: flex;
|
|
gap: 4px;
|
|
}
|
|
.snippet-insert {
|
|
font-size: 12px;
|
|
padding: 4px 8px;
|
|
border: 1px solid var(--gray-300);
|
|
border-radius: 4px;
|
|
background: white;
|
|
cursor: pointer;
|
|
}
|
|
.snippet-delete {
|
|
font-size: 14px;
|
|
padding: 4px 8px;
|
|
border: 1px solid var(--gray-300);
|
|
border-radius: 4px;
|
|
background: white;
|
|
cursor: pointer;
|
|
color: #ef4444;
|
|
}
|
|
|
|
/* Dark theme for sidebar panels */
|
|
body[class*='dark'] .explorer-path,
|
|
body[class*='dark'] .explorer-browse-btn,
|
|
body[class*='dark'] .snippets-search,
|
|
body[class*='dark'] .snippets-add-btn,
|
|
body[class*='dark'] .snippet-insert,
|
|
body[class*='dark'] .snippet-delete {
|
|
background: #2d2d2d;
|
|
border-color: #444;
|
|
color: #ccc;
|
|
}
|
|
body[class*='dark'] .git-commit-input,
|
|
body[class*='dark'] .git-branch-input {
|
|
background: #2d2d2d;
|
|
border-color: #444;
|
|
color: #ccc;
|
|
}
|
|
body[class*='dark'] .git-diff-view {
|
|
background: #2d2d2d;
|
|
color: #ccc;
|
|
}
|
|
body[class*='dark'] .snippet-item {
|
|
border-color: #444;
|
|
}
|
|
body[class*='dark'] .snippet-preview {
|
|
background: #2d2d2d;
|
|
}
|
|
body[class*='dark'] .tree-item:hover,
|
|
body[class*='dark'] .git-file:hover,
|
|
body[class*='dark'] .git-branch-item:hover {
|
|
background: #333;
|
|
}
|
|
|
|
/* Outline Panel */
|
|
.outline-panel {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
}
|
|
.outline-list {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 4px 0;
|
|
}
|
|
.outline-item {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 4px 12px;
|
|
cursor: pointer;
|
|
font-size: 13px;
|
|
color: var(--text-secondary, #6b7280);
|
|
transition:
|
|
background 0.15s,
|
|
color 0.15s;
|
|
border-left: 2px solid transparent;
|
|
}
|
|
.outline-item:hover {
|
|
background: var(--bg-tertiary, #f3f4f6);
|
|
color: var(--text-primary, #1f2937);
|
|
}
|
|
.outline-item.active {
|
|
color: var(--accent-blue, #3b82f6);
|
|
background: rgba(59, 130, 246, 0.08);
|
|
border-left-color: var(--accent-blue, #3b82f6);
|
|
font-weight: 600;
|
|
}
|
|
.outline-level-1 {
|
|
padding-left: 12px;
|
|
}
|
|
.outline-level-2 {
|
|
padding-left: 24px;
|
|
}
|
|
.outline-level-3 {
|
|
padding-left: 36px;
|
|
}
|
|
.outline-level-4 {
|
|
padding-left: 48px;
|
|
}
|
|
.outline-level-5 {
|
|
padding-left: 56px;
|
|
}
|
|
.outline-level-6 {
|
|
padding-left: 64px;
|
|
}
|
|
.outline-text {
|
|
flex: 1;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
.outline-badge {
|
|
font-size: 10px;
|
|
opacity: 0.5;
|
|
margin-left: 8px;
|
|
flex-shrink: 0;
|
|
}
|
|
.outline-empty {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 32px 16px;
|
|
color: var(--text-muted, #9ca3af);
|
|
text-align: center;
|
|
}
|
|
.outline-empty p {
|
|
margin: 4px 0;
|
|
}
|
|
.outline-hint {
|
|
font-family: monospace;
|
|
font-size: 12px;
|
|
opacity: 0.7;
|
|
}
|
|
.outline-footer {
|
|
padding: 8px 12px;
|
|
border-top: 1px solid var(--border-color, #e5e7eb);
|
|
font-size: 11px;
|
|
color: var(--text-muted, #9ca3af);
|
|
}
|
|
|
|
/* Outline dark mode */
|
|
body[class*='dark'] .outline-item {
|
|
color: #9ca3af;
|
|
}
|
|
body[class*='dark'] .outline-item:hover {
|
|
background: #374151;
|
|
color: #e5e7eb;
|
|
}
|
|
body[class*='dark'] .outline-item.active {
|
|
color: #8b9aff;
|
|
background: rgba(139, 154, 255, 0.1);
|
|
border-left-color: #8b9aff;
|
|
}
|
|
body[class*='dark'] .outline-empty {
|
|
color: #6b7280;
|
|
}
|
|
body[class*='dark'] .outline-footer {
|
|
border-color: #333;
|
|
color: #6b7280;
|
|
}
|
|
|
|
/* ================================
|
|
* Plugin panels (writing-studio + AI Assistant)
|
|
* ================================ */
|
|
|
|
/* Generic plugin panel scaffold */
|
|
.ws-panel {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
padding: 12px;
|
|
font-size: 13px;
|
|
}
|
|
.ws-section {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
.ws-heading {
|
|
margin: 0;
|
|
font-size: 12px;
|
|
font-weight: 600;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.04em;
|
|
color: var(--text-muted, #6b7280);
|
|
}
|
|
.ws-btn {
|
|
padding: 5px 10px;
|
|
border: 1px solid var(--border-color, #d1d5db);
|
|
border-radius: 4px;
|
|
background: var(--bg-primary, #fff);
|
|
color: inherit;
|
|
cursor: pointer;
|
|
font-size: 12px;
|
|
}
|
|
.ws-btn:hover {
|
|
background: var(--bg-secondary, #f3f4f6);
|
|
}
|
|
.ws-btn-primary {
|
|
background: #4a90d9;
|
|
border-color: #4a90d9;
|
|
color: #fff;
|
|
}
|
|
.ws-btn-primary:hover {
|
|
background: #3a7bc8;
|
|
}
|
|
.ws-btn-sm {
|
|
padding: 3px 8px;
|
|
font-size: 11px;
|
|
}
|
|
.ws-btn:disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
.ws-muted {
|
|
color: var(--text-muted, #9ca3af);
|
|
font-size: 12px;
|
|
}
|
|
.ws-stat-row {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
font-size: 12px;
|
|
}
|
|
.ws-pct {
|
|
font-weight: 600;
|
|
color: #4a90d9;
|
|
}
|
|
.ws-progress-bar {
|
|
height: 8px;
|
|
border-radius: 4px;
|
|
background: var(--bg-secondary, #e5e7eb);
|
|
overflow: hidden;
|
|
}
|
|
.ws-progress-fill {
|
|
height: 100%;
|
|
background: linear-gradient(90deg, #4a90d9, #6aa8e8);
|
|
transition: width 0.3s ease;
|
|
}
|
|
.ws-snapshot-list,
|
|
.ws-issues-list {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
.ws-snapshot-item,
|
|
.ws-issue-item {
|
|
border: 1px solid var(--border-color, #e5e7eb);
|
|
border-radius: 6px;
|
|
padding: 8px;
|
|
}
|
|
.ws-snapshot-header,
|
|
.ws-issue-type {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
font-size: 11px;
|
|
color: var(--text-muted, #6b7280);
|
|
}
|
|
.ws-issue-type {
|
|
font-weight: 700;
|
|
color: #c06040;
|
|
}
|
|
.ws-issue-text {
|
|
margin-top: 4px;
|
|
font-size: 12px;
|
|
}
|
|
.ws-issue-suggestion {
|
|
margin-top: 2px;
|
|
font-size: 12px;
|
|
color: #2e7d32;
|
|
}
|
|
.ws-issue-actions {
|
|
display: flex;
|
|
gap: 6px;
|
|
margin-top: 6px;
|
|
}
|
|
|
|
/* Writing heatmap (Goals panel) */
|
|
.ws-heatmap {
|
|
display: grid;
|
|
grid-template-rows: repeat(7, 10px);
|
|
grid-auto-flow: column;
|
|
grid-auto-columns: 10px;
|
|
gap: 2px;
|
|
}
|
|
.ws-heatmap-cell {
|
|
width: 10px;
|
|
height: 10px;
|
|
border-radius: 2px;
|
|
background: var(--bg-secondary, #ebedf0);
|
|
}
|
|
.ws-heatmap-cell.l1 {
|
|
background: #9be9a8;
|
|
}
|
|
.ws-heatmap-cell.l2 {
|
|
background: #40c463;
|
|
}
|
|
.ws-heatmap-cell.l3 {
|
|
background: #30a14c;
|
|
}
|
|
.ws-heatmap-cell.l4 {
|
|
background: #216e39;
|
|
}
|
|
|
|
/* AI Chat panel */
|
|
.ai-chat-panel {
|
|
height: 100%;
|
|
}
|
|
.ai-chat-status {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 8px;
|
|
}
|
|
.ai-chat-badge {
|
|
font-size: 11px;
|
|
padding: 2px 8px;
|
|
border-radius: 10px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
.ai-chat-badge-ok {
|
|
background: rgba(46, 125, 50, 0.12);
|
|
color: #2e7d32;
|
|
}
|
|
.ai-chat-badge-off {
|
|
background: rgba(192, 96, 64, 0.12);
|
|
color: #c06040;
|
|
}
|
|
.ai-chat-messages {
|
|
flex: 1;
|
|
min-height: 200px;
|
|
max-height: 45vh;
|
|
overflow-y: auto;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
padding: 4px 0;
|
|
}
|
|
.ai-chat-msg {
|
|
border-radius: 8px;
|
|
padding: 6px 10px;
|
|
font-size: 12px;
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
}
|
|
.ai-chat-msg-user {
|
|
background: rgba(74, 144, 217, 0.12);
|
|
align-self: flex-end;
|
|
max-width: 90%;
|
|
}
|
|
.ai-chat-msg-assistant {
|
|
background: var(--bg-secondary, #f3f4f6);
|
|
align-self: flex-start;
|
|
max-width: 95%;
|
|
}
|
|
.ai-chat-msg-busy {
|
|
color: var(--text-muted, #9ca3af);
|
|
font-style: italic;
|
|
}
|
|
.ai-chat-msg-role {
|
|
font-size: 10px;
|
|
font-weight: 700;
|
|
text-transform: uppercase;
|
|
color: var(--text-muted, #9ca3af);
|
|
margin-bottom: 2px;
|
|
}
|
|
.ai-chat-composer {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
.ai-chat-composer textarea {
|
|
width: 100%;
|
|
resize: vertical;
|
|
min-height: 56px;
|
|
padding: 8px;
|
|
border: 1px solid var(--border-color, #d1d5db);
|
|
border-radius: 6px;
|
|
font: inherit;
|
|
background: var(--bg-primary, #fff);
|
|
color: inherit;
|
|
box-sizing: border-box;
|
|
}
|
|
.ai-chat-actions,
|
|
.ai-chat-footer {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
gap: 8px;
|
|
}
|
|
.ai-chat-footer {
|
|
justify-content: flex-start;
|
|
}
|
|
|
|
/* AI settings/input modal overlays */
|
|
.ai-settings-overlay {
|
|
position: fixed;
|
|
inset: 0;
|
|
background: rgba(0, 0, 0, 0.5);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
z-index: 10000;
|
|
}
|
|
.ai-settings-dialog {
|
|
background: var(--bg-primary, #fff);
|
|
color: var(--text-primary, #222);
|
|
border-radius: 8px;
|
|
padding: 20px;
|
|
width: 380px;
|
|
max-width: 90vw;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 10px;
|
|
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
|
|
}
|
|
.ai-settings-dialog h3 {
|
|
margin: 0 0 4px;
|
|
}
|
|
.ai-settings-dialog label {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
font-size: 12px;
|
|
}
|
|
.ai-settings-dialog input,
|
|
.ai-settings-dialog select {
|
|
padding: 6px 8px;
|
|
border: 1px solid var(--border-color, #d1d5db);
|
|
border-radius: 4px;
|
|
font: inherit;
|
|
background: var(--bg-primary, #fff);
|
|
color: inherit;
|
|
}
|
|
.ai-settings-note {
|
|
font-size: 11px;
|
|
color: var(--text-muted, #9ca3af);
|
|
margin: 0;
|
|
}
|
|
.ai-settings-actions {
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
gap: 8px;
|
|
}
|
|
|
|
/* Dark mode adjustments for plugin panels */
|
|
body[class*='dark'] .ws-btn {
|
|
background: #374151;
|
|
border-color: #4b5563;
|
|
color: #e5e7eb;
|
|
}
|
|
body[class*='dark'] .ws-btn:hover {
|
|
background: #4b5563;
|
|
}
|
|
body[class*='dark'] .ai-chat-msg-assistant {
|
|
background: #374151;
|
|
}
|
|
body[class*='dark'] .ai-chat-composer textarea,
|
|
body[class*='dark'] .ai-settings-dialog input,
|
|
body[class*='dark'] .ai-settings-dialog select {
|
|
background: #1f2937;
|
|
border-color: #4b5563;
|
|
color: #e5e7eb;
|
|
}
|
|
body[class*='dark'] .ai-settings-dialog {
|
|
background: #1f2937;
|
|
color: #e5e7eb;
|
|
}
|
|
|
|
/* Wiki links in the preview (knowledge-base mode) */
|
|
.preview-content a.wiki-link {
|
|
color: #8b5cf6;
|
|
text-decoration: none;
|
|
border-bottom: 1px dashed #8b5cf6;
|
|
}
|
|
.preview-content a.wiki-link:hover {
|
|
background: rgba(139, 92, 246, 0.1);
|
|
}
|
|
body[class*='dark'] .preview-content a.wiki-link {
|
|
color: #a78bfa;
|
|
border-bottom-color: #a78bfa;
|
|
}
|
|
/* Resolved comments fade but stay visible */
|
|
.ws-issue-item.comment-resolved {
|
|
opacity: 0.55;
|
|
}
|
|
|
|
/* Goals panel: stat cards + 30-day bar chart (writing-studio) */
|
|
.ws-stat-grid {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 8px;
|
|
}
|
|
.ws-stat-card {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
border: 1px solid var(--border-color, #e5e7eb);
|
|
border-radius: 6px;
|
|
padding: 10px 6px;
|
|
}
|
|
.ws-stat-value {
|
|
font-size: 18px;
|
|
font-weight: 700;
|
|
}
|
|
.ws-stat-label {
|
|
font-size: 11px;
|
|
color: var(--text-muted, #9ca3af);
|
|
}
|
|
.ws-chart {
|
|
display: flex;
|
|
align-items: flex-end;
|
|
gap: 2px;
|
|
height: 64px;
|
|
}
|
|
.ws-bar {
|
|
flex: 1;
|
|
min-width: 3px;
|
|
background: #9cbfe8;
|
|
border-radius: 2px 2px 0 0;
|
|
}
|
|
.ws-bar-met {
|
|
background: #2e7d32;
|
|
}
|
|
|
|
/* History panel diff modal */
|
|
.history-diff-dialog {
|
|
width: 640px;
|
|
max-height: 80vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
.history-diff-body {
|
|
overflow: auto;
|
|
border: 1px solid var(--border-color, #e5e7eb);
|
|
border-radius: 6px;
|
|
padding: 8px;
|
|
font-family: 'JetBrains Mono', 'Fira Code', monospace;
|
|
font-size: 12px;
|
|
line-height: 1.5;
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
flex: 1;
|
|
min-height: 200px;
|
|
}
|
|
.history-diff-line {
|
|
padding: 0 4px;
|
|
border-radius: 2px;
|
|
}
|
|
.history-diff-added {
|
|
background: rgba(46, 125, 50, 0.12);
|
|
color: #2e7d32;
|
|
}
|
|
.history-diff-removed {
|
|
background: rgba(198, 40, 40, 0.1);
|
|
color: #c62828;
|
|
}
|
|
.history-diff-unchanged {
|
|
color: var(--text-secondary, inherit);
|
|
opacity: 0.75;
|
|
}
|
|
|
|
/* === Flow Chart Editor panel === */
|
|
.flowchart-panel {
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex: 1;
|
|
min-height: 0;
|
|
outline: none;
|
|
}
|
|
.flowchart-toolbar {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 6px 8px;
|
|
border-bottom: 1px solid var(--border-color, #444);
|
|
}
|
|
.flowchart-insert-btn {
|
|
padding: 4px 10px;
|
|
border: 1px solid var(--accent, #4a9eff);
|
|
background: var(--accent, #4a9eff);
|
|
color: var(--accent-fg, #fff);
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 12px;
|
|
}
|
|
.flowchart-status {
|
|
margin-left: auto;
|
|
font-size: 11px;
|
|
color: var(--text-muted, #888);
|
|
}
|
|
.flowchart-split {
|
|
display: flex;
|
|
flex: 1;
|
|
min-height: 0;
|
|
}
|
|
.flowchart-canvas-host {
|
|
flex: 7;
|
|
min-width: 0;
|
|
position: relative;
|
|
background: var(--bg-secondary, #1e1e1e);
|
|
}
|
|
.flowchart-canvas-host svg.flowchart-canvas {
|
|
width: 100%;
|
|
height: 100%;
|
|
display: block;
|
|
cursor: crosshair;
|
|
}
|
|
.flowchart-preview-host {
|
|
flex: 3;
|
|
min-width: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
border-left: 1px solid var(--border-color, #444);
|
|
}
|
|
.flowchart-preview-source {
|
|
flex: 1;
|
|
margin: 0;
|
|
padding: 8px;
|
|
font-family: var(--mono-font, monospace);
|
|
font-size: 11px;
|
|
overflow: auto;
|
|
white-space: pre;
|
|
border-bottom: 1px solid var(--border-color, #444);
|
|
}
|
|
.flowchart-preview-render {
|
|
flex: 1;
|
|
/* Non-zero CSS height guarantees the Mermaid-rendered SVG has room to lay
|
|
* out — without this, flex children in a collapsed parent can compute to 0
|
|
* height and mermaid's <svg> ends up invisible even though it parsed and
|
|
* attached to the DOM. */
|
|
min-height: 120px;
|
|
padding: 8px;
|
|
overflow: auto;
|
|
}
|
|
/* v4.9.5 — force light, readable surfaces inside the flowchart canvas and
|
|
* preview regardless of the project's theme class on <body>. The flowchart
|
|
* is a focused editor surface (similar to the PDF viewer) and the previous
|
|
* "inherit body theme" approach left users with dark-on-dark rectangles and
|
|
* dark-on-dark Mermaid SVG output, both effectively invisible. Keeping this
|
|
* surface light trades theme consistency for guaranteed visibility — the
|
|
* user has been explicit that WORKING > consistent with body theme. */
|
|
.flowchart-canvas-host,
|
|
.flowchart-preview-host {
|
|
background: #fafafa !important;
|
|
color: #1f2328 !important;
|
|
}
|
|
.flowchart-node rect,
|
|
.flowchart-node polygon {
|
|
fill: #ffffff !important;
|
|
stroke: #1f2328 !important;
|
|
stroke-width: 1.25;
|
|
}
|
|
.flowchart-node text {
|
|
fill: #1f2328 !important;
|
|
}
|
|
.flowchart-edge {
|
|
stroke: #1f2328 !important;
|
|
stroke-width: 1.25;
|
|
}
|
|
.flowchart-node {
|
|
cursor: grab;
|
|
}
|
|
/* v4.9.5 — selection highlight: prior to this rule set, `.selected` only
|
|
* painted a 2px stroke on a near-black fill — barely visible against the
|
|
* dark canvas. Add a fill change AND bump stroke-width so the highlight is
|
|
* unmissable. Same logic for edges. */
|
|
.flowchart-node.selected rect,
|
|
.flowchart-node.selected polygon {
|
|
fill: #e3f0ff !important;
|
|
stroke: #4a9eff !important;
|
|
stroke-width: 3;
|
|
}
|
|
.flowchart-edge.selected {
|
|
stroke: #4a9eff !important;
|
|
stroke-width: 3;
|
|
}
|
|
.flowchart-label-input {
|
|
font-size: 13px;
|
|
text-align: center;
|
|
border: 1px solid var(--accent, #4a9eff);
|
|
background: var(--bg-primary, #fff);
|
|
color: inherit;
|
|
z-index: 100;
|
|
}
|
|
|
|
/* Takeover mode — the Flow Chart panel promotes itself to fill the main
|
|
* area, hiding the editor-container so the canvas + preview split the full
|
|
* window width instead of the 280px sidebar. Toggled by the maximize
|
|
* button in src/sidebar/flowchart-panel.js (adds/removes
|
|
* `.flowchart-takeover` on `.main-content`). Restore on second click or on
|
|
* panel destroy(). */
|
|
.main-content.flowchart-takeover .editor-container {
|
|
display: none;
|
|
}
|
|
.main-content.flowchart-takeover .sidebar {
|
|
width: auto;
|
|
flex: 1;
|
|
}
|
|
.main-content.flowchart-takeover .sidebar:not(.collapsed) {
|
|
/* The takeover is only meaningful with the flowchart panel open, so the
|
|
* 48px collapsed-state width doesn't apply. Force the wide layout. */
|
|
width: auto;
|
|
}
|
|
.main-content.flowchart-takeover .sidebar-panel {
|
|
flex: 1;
|
|
width: auto;
|
|
}
|
|
.main-content.flowchart-takeover .sidebar-panel-content {
|
|
padding: 0;
|
|
}
|
|
/* The panel itself should fill the panel-content column instead of being
|
|
* constrained by the normal 12px padding-block flow. */
|
|
.main-content.flowchart-takeover .flowchart-panel {
|
|
height: 100%;
|
|
}
|
|
|
|
/* Maximize button — small icon+label pill in the panel toolbar. */
|
|
.flowchart-maximize-btn {
|
|
margin-left: 8px;
|
|
padding: 4px 10px;
|
|
border: 1px solid var(--border-color, #444);
|
|
background: var(--bg-primary, #fff);
|
|
color: inherit;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
font-size: 12px;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
}
|
|
.flowchart-maximize-btn:hover {
|
|
border-color: var(--accent, #4a9eff);
|
|
color: var(--accent, #4a9eff);
|
|
}
|
|
.flowchart-maximize-btn:focus-visible {
|
|
outline: 2px solid var(--accent, #4a9eff);
|
|
outline-offset: 2px;
|
|
}
|
|
.flowchart-maximize-btn.active {
|
|
background: var(--accent, #4a9eff);
|
|
border-color: var(--accent, #4a9eff);
|
|
color: var(--accent-fg, #fff);
|
|
}
|
|
.flowchart-maximize-icon {
|
|
font-size: 14px;
|
|
line-height: 1;
|
|
}
|