mirror of
https://github.com/jparkerweb/plan2code.git
synced 2026-11-17 04:45:33 -08:00
211 lines
7.6 KiB
CSS
211 lines
7.6 KiB
CSS
/* The Notebook: the top bar button, the dialog, the tab bar and the pictures.
|
|
The editor's own look is notepad-editor.css, inside its shadow root. */
|
|
|
|
/* The top bar's Notebook button: drawn and lit like the Subagents button. */
|
|
.notepad-btn { border-color: var(--rule-2); color: var(--ink-2); display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
|
|
/* `hidden` loses to the display above without this (agent-less sessions hide it). */
|
|
.notepad-btn[hidden] { display: none; }
|
|
.btn.notepad-btn { padding: 0 8px; align-self: stretch; }
|
|
.notepad-btn .notepad-label { font-size: 13px; line-height: 1; }
|
|
.notepad-btn .np-band { fill: var(--ink-2); stroke: none; }
|
|
.notepad-btn:hover:not(:disabled) .np-band { fill: var(--accent); }
|
|
.notepad-btn:disabled .np-band { fill: var(--ink-3); }
|
|
.notepad-btn svg { width: 16px; height: 16px; display: block; }
|
|
.notepad-btn .np-page,
|
|
.notepad-btn .np-ring,
|
|
.notepad-btn .np-line { fill: none; stroke: var(--ink-2); stroke-width: 1.2; stroke-linecap: round; }
|
|
.notepad-btn .np-page { stroke-width: 1.3; }
|
|
.notepad-btn:hover:not(:disabled) { color: var(--accent); border-color: var(--accent-line); }
|
|
.notepad-btn:hover:not(:disabled) .np-page,
|
|
.notepad-btn:hover:not(:disabled) .np-ring,
|
|
.notepad-btn:hover:not(:disabled) .np-line { stroke: var(--accent); }
|
|
.notepad-btn:disabled .np-page,
|
|
.notepad-btn:disabled .np-ring,
|
|
.notepad-btn:disabled .np-line { stroke: var(--ink-3); }
|
|
|
|
/* The Notebook dialog: large, with the editor taking whatever height the
|
|
title, the pictures and the actions leave. Only the editor scrolls. */
|
|
.modal.notepad {
|
|
width: min(1200px, 90vw);
|
|
height: min(900px, 85vh);
|
|
max-width: none;
|
|
max-height: none;
|
|
flex-direction: column;
|
|
}
|
|
.modal.notepad[open] { display: flex; }
|
|
.modal.notepad h2 { flex: none; }
|
|
.modal.notepad .modal-blurb { flex: none; margin-bottom: 12px; }
|
|
.modal.notepad .modal-blurb .private-note { font-weight: 700; color: var(--accent); }
|
|
.notepad-editor {
|
|
flex: 1 1 auto;
|
|
min-height: 0;
|
|
border: 1px solid var(--rule-2);
|
|
border-radius: 0;
|
|
overflow: hidden;
|
|
background: var(--panel);
|
|
}
|
|
.notepad-editor:focus-within { border-color: var(--accent-line); }
|
|
/* The open tab's last send from the dashboard, muted under the editor. */
|
|
.notepad-sent { flex: none; margin: 6px 0 0; font-size: 12.5px; color: var(--ink-3); }
|
|
.notepad-sent[hidden] { display: none; }
|
|
/* The pictures under the editor: the Add image button, then the thumbnails,
|
|
wrapping. Capped at two rows, so 200 pictures never squeeze the editor
|
|
away; the strip scrolls instead. The whole region lights while pictures are
|
|
dragged over the dialog. */
|
|
.notepad-images {
|
|
flex: none;
|
|
display: flex;
|
|
align-items: flex-start;
|
|
gap: 10px;
|
|
margin-top: 12px;
|
|
padding: 6px;
|
|
border: 1px dashed transparent;
|
|
border-radius: 8px;
|
|
}
|
|
.notepad-add { flex: none; }
|
|
.notepad-strip {
|
|
flex: 1 1 auto;
|
|
min-width: 0;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
max-height: 176px;
|
|
overflow-y: auto;
|
|
margin: 0;
|
|
padding: 0;
|
|
list-style: none;
|
|
}
|
|
.modal.notepad.is-drop .notepad-images {
|
|
border-color: var(--accent);
|
|
background: var(--accent-soft);
|
|
}
|
|
|
|
/* One thumbnail: the picture is a button that opens the picview (the shared
|
|
.attach-open in shell.css), with the tray's round X in its corner, and the
|
|
inline delete question or the upload state laid over it. */
|
|
.notepad-thumb.attach-thumb { width: 88px; height: 88px; }
|
|
.notepad-thumb .attach-overlay p { margin: 0; padding: 0 4px; }
|
|
.notepad-thumb .attach-overlay .btn.tiny { margin: 0; padding: 1px 6px; font-size: 10.5px; }
|
|
.notepad-ask {
|
|
background: color-mix(in srgb, var(--panel) 92%, transparent);
|
|
color: var(--ink); font-size: 10.5px; font-weight: 600; text-align: center;
|
|
}
|
|
.notepad-ask-row { display: flex; gap: 4px; }
|
|
|
|
.modal.notepad .modal-actions { flex: none; align-items: center; margin-top: 14px; }
|
|
.notepad-status { margin: 0 auto 0 0; min-height: 1.4em; font-size: 12.5px; color: var(--ink-3); }
|
|
.notepad-status.is-problem { color: var(--warn); }
|
|
|
|
/* The tab bar: a scrolling row of tabs, each its name and an x, with the
|
|
current one marked, then New tab. A double-click renames, the x deletes and
|
|
a drag moves; the questions open in the small dialogs below. */
|
|
.notepad-tabbar { flex: none; display: flex; align-items: flex-end; gap: 8px; margin-bottom: -1px; position: relative; z-index: 1; }
|
|
.notepad-tabs { flex: 1 1 auto; min-width: 0; display: flex; gap: 4px; overflow-x: auto; padding-bottom: 0; }
|
|
.notepad-tabwrap {
|
|
flex: none;
|
|
max-width: 240px;
|
|
display: flex;
|
|
align-items: center;
|
|
border: 1px solid var(--rule-2);
|
|
border-radius: 8px 8px 0 0;
|
|
background: var(--panel-2);
|
|
color: var(--ink-2);
|
|
}
|
|
.notepad-tabwrap:hover { color: var(--accent); border-color: var(--accent-line); }
|
|
.notepad-tabwrap:has(.notepad-tab[aria-selected="true"]) {
|
|
background: var(--accent-soft);
|
|
border-color: var(--accent);
|
|
border-bottom-color: var(--panel);
|
|
color: var(--ink);
|
|
}
|
|
.notepad-tab {
|
|
flex: 0 1 auto;
|
|
min-width: 0;
|
|
padding: 6px 4px 6px 12px;
|
|
border: 0;
|
|
background: none;
|
|
color: inherit;
|
|
font: inherit;
|
|
font-size: 13px;
|
|
line-height: 1.2;
|
|
cursor: pointer;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
.notepad-tab[aria-selected="true"] { font-weight: 600; }
|
|
.notepad-sent-badge {
|
|
flex: none;
|
|
margin: 0 2px 0 2px;
|
|
padding: 1px 5px;
|
|
border: 1px solid var(--accent-line);
|
|
border-radius: 999px;
|
|
background: var(--accent-soft);
|
|
color: var(--accent);
|
|
font-size: 10.5px;
|
|
font-weight: 600;
|
|
line-height: 1.3;
|
|
white-space: nowrap;
|
|
}
|
|
.notepad-tab-x {
|
|
flex: none;
|
|
width: 20px;
|
|
height: 20px;
|
|
margin-right: 6px;
|
|
padding: 0;
|
|
border: 0;
|
|
border-radius: 4px;
|
|
background: none;
|
|
color: inherit;
|
|
font: inherit;
|
|
font-size: 16px;
|
|
line-height: 1;
|
|
cursor: pointer;
|
|
opacity: 0.6;
|
|
}
|
|
.notepad-tabwrap:hover .notepad-tab-x,
|
|
.notepad-tabwrap:has(.notepad-tab[aria-selected="true"]) .notepad-tab-x,
|
|
.notepad-tab-x:focus-visible { opacity: 1; }
|
|
.notepad-tab-x:hover { background: var(--panel); color: var(--warn); }
|
|
.notepad-tab:focus-visible,
|
|
.notepad-tab-x:focus-visible,
|
|
.notepad-tab-new:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
|
|
.notepad-tabwrap:has(.is-dragging) { opacity: 0.5; }
|
|
.notepad-tabwrap:has(.is-drop-before) { box-shadow: -3px 0 0 0 var(--accent); }
|
|
.notepad-tabs.is-drop-end { box-shadow: inset -3px 0 0 0 var(--accent); }
|
|
.notepad-tab-new { flex: none; margin-bottom: 4px; }
|
|
|
|
/* The name and delete questions: small dialogs over the Notebook, never a
|
|
browser prompt. The empty state sits where the editor would. */
|
|
.notepad-empty {
|
|
flex: none;
|
|
margin: 0 0 10px;
|
|
padding: 10px 12px;
|
|
border: 1px solid var(--rule-2);
|
|
border-radius: 8px;
|
|
background: var(--panel-2);
|
|
}
|
|
.notepad-empty[hidden] { display: none; }
|
|
.modal.notepad-sub { width: min(420px, calc(100vw - 32px)); }
|
|
.modal.notepad-sub h2 { margin: 0 0 10px; }
|
|
.notepad-name-form input {
|
|
display: block;
|
|
width: 100%;
|
|
padding: 6px 8px;
|
|
border: 1px solid var(--rule-2);
|
|
border-radius: 6px;
|
|
background: var(--panel);
|
|
color: var(--ink);
|
|
font: inherit;
|
|
}
|
|
.notepad-name-form input:focus-visible { outline: 2px solid var(--accent); outline-offset: 0; }
|
|
.notepad-name-error { min-height: 1.2em; margin: 6px 0 0; }
|
|
.notepad-name-error:not(:empty) { color: var(--warn); }
|
|
.modal.notepad-delete { border-color: var(--warn); }
|
|
.notepad-delete p { margin: 0 0 8px; }
|
|
.notepad-empty { text-align: center; padding: 28px 12px; }
|
|
.notepad-empty p { margin: 0 0 12px; color: var(--ink-2); }
|
|
/* Editor and pictures together, so the empty state hides both at once. */
|
|
.notepad-body { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
|
|
.notepad-body[hidden] { display: none; }
|