dragonflight/services/premiere-plugin-uxp/styles.css
Claude f1a3d6a24a fix(premiere-plugin-uxp): v2.0.1 — replace unsupported CSS + surface load count
The v2.0.0 grid stayed empty in Premiere 26 because UXP's CSS engine
doesn't support `grid-template-columns: repeat(auto-fill, minmax(...))`
or `aspect-ratio`. Cards rendered with 0 height and the flex column
collapsed, so the actions row stuck to the top of the pane.

Switch to flex-wrap with fixed-width (140px) cards and explicit 80px
thumb heights — both work in UXP's stripped CSS.

Also fix the /auth/me response shape — it returns the user fields
directly, not wrapped in `{ user: ... }`. Header now shows
"display_name @ host" instead of falling back to bare host.

Add a toast on each library load reporting "Loaded N assets (total M)"
so we can tell empty-grid (zero assets) from CSS-broken-grid (cards
exist but invisible) at a glance.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-28 00:35:04 -04:00

216 lines
6.3 KiB
CSS

/* Dragonflight UXP panel — design tokens mirror the web UI's dark theme. */
:root {
--bg-0: #0e0f12;
--bg-1: #16181d;
--bg-2: #1c1f25;
--bg-3: #232730;
--border: #2a2f3a;
--text-1: #e6e8ec;
--text-2: #b6bac3;
--text-3: #7e848f;
--accent: #4f7cff;
--accent-hover: #6a91ff;
--danger: #e25c5c;
--danger-soft: #3a1d20;
--ok: #4ec07a;
}
* { box-sizing: border-box; }
html, body {
margin: 0;
padding: 0;
background: var(--bg-0);
color: var(--text-1);
font: 12px/1.4 system-ui, -apple-system, "Segoe UI", sans-serif;
height: 100%;
overflow: hidden;
}
#root { height: 100%; display: flex; flex-direction: column; }
.pane { display: flex; flex-direction: column; height: 100%; padding: 12px; }
.pane.hidden { display: none; }
/* ── connect screen ──────────────────────────────────────────────── */
.brand { text-align: center; margin: 12px 0 18px; }
.brand-title { font-size: 18px; font-weight: 600; color: var(--text-1); }
.brand-tag {
font-size: 9.5px;
font-weight: 600;
color: var(--text-3);
margin-top: 4px;
letter-spacing: 0.08em;
text-transform: uppercase;
}
.label {
display: block;
font-size: 9.5px;
font-weight: 600;
color: var(--text-2);
letter-spacing: 0.06em;
text-transform: uppercase;
margin: 8px 0 4px;
}
input[type="text"],
input[type="password"],
input[type="search"] {
width: 100%;
background: var(--bg-3);
color: var(--text-1);
border: 1px solid var(--border);
border-radius: 4px;
padding: 6px 8px;
font-size: 12px;
outline: none;
}
input:focus { border-color: var(--accent); }
/* ── buttons ─────────────────────────────────────────────────────── */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
font-size: 12px;
font-weight: 600;
padding: 7px 12px;
border: 1px solid transparent;
border-radius: 4px;
cursor: pointer;
background: var(--bg-3);
color: var(--text-1);
user-select: none;
}
.btn:disabled { opacity: 0.45; cursor: default; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:not(:disabled):hover { background: var(--accent-hover); }
.btn-secondary { background: var(--bg-3); color: var(--text-1); border-color: var(--border); }
.btn-link { background: transparent; color: var(--text-3); padding: 4px 6px; font-weight: 500; }
.btn-link:hover { color: var(--text-1); }
.btn-icon { padding: 4px 8px; background: var(--bg-3); border: 1px solid var(--border); }
.btn-icon:hover { background: var(--bg-2); }
#connect-btn { margin-top: 14px; width: 100%; padding: 8px; }
/* ── status / dot indicators ─────────────────────────────────────── */
.status { font-size: 11px; margin-top: 8px; min-height: 16px; }
.status.error { color: var(--danger); }
.status.muted { color: var(--text-3); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 6px; }
.dot-ok { background: var(--ok); }
.dot-bad { background: var(--danger); }
/* ── connected bar ───────────────────────────────────────────────── */
.connected-bar {
display: flex;
align-items: center;
gap: 6px;
padding: 6px 8px;
background: var(--bg-1);
border: 1px solid var(--border);
border-radius: 4px;
margin-bottom: 10px;
}
.connected-host { font-family: ui-monospace, Menlo, monospace; font-size: 11px; color: var(--text-2); flex: 1; }
.library-controls { display: flex; gap: 6px; margin-bottom: 8px; }
.library-controls input { flex: 1; }
/* ── asset grid ──────────────────────────────────────────────────── */
/* UXP's CSS engine doesn't support `grid-template-columns: repeat(auto-fill,…)`
or `aspect-ratio` reliably. Use flex-wrap with fixed-width cards + explicit
thumb height so cards always have visible size. */
.asset-grid {
flex: 1 1 auto;
min-height: 0; /* allow shrinking inside flex column */
overflow-y: auto;
display: flex;
flex-wrap: wrap;
gap: 6px;
padding: 2px;
align-content: flex-start;
}
.asset-card {
flex: 0 0 140px;
background: var(--bg-2);
border: 1px solid var(--border);
border-radius: 4px;
overflow: hidden;
cursor: pointer;
display: flex;
flex-direction: column;
}
.asset-card:hover { border-color: var(--text-3); }
.asset-card.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.asset-thumb {
width: 100%;
height: 80px;
object-fit: cover;
background: var(--bg-3);
display: block;
}
.asset-thumb-placeholder {
width: 100%;
height: 80px;
background: var(--bg-3);
display: flex;
align-items: center;
justify-content: center;
color: var(--text-3);
font-size: 10px;
}
.asset-name {
font-size: 11px;
padding: 4px 6px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
color: var(--text-1);
}
.empty { padding: 24px; text-align: center; }
.muted { color: var(--text-3); }
/* ── actions / progress / toast ──────────────────────────────────── */
.actions {
border-top: 1px solid var(--border);
padding-top: 8px;
margin-top: 8px;
}
.selected-info { font-size: 11px; margin-bottom: 6px; min-height: 16px; }
.action-row { display: flex; gap: 6px; }
.action-row .btn { flex: 1; }
.progress-row { margin-top: 8px; }
.progress-bar {
height: 6px;
background: var(--bg-3);
border-radius: 3px;
overflow: hidden;
}
#progress-fill {
height: 100%;
background: var(--accent);
width: 0%;
transition: width 120ms linear;
}
.progress-label { font-size: 10.5px; color: var(--text-3); margin-top: 4px; }
.toast {
margin-top: 8px;
padding: 6px 8px;
border-radius: 4px;
font-size: 11px;
background: var(--bg-2);
border: 1px solid var(--border);
color: var(--text-1);
}
.toast.ok { border-color: var(--ok); color: var(--text-1); }
.toast.error { border-color: var(--danger); color: var(--text-1); background: var(--danger-soft); }
.hidden { display: none !important; }