Ports the Editor Composer's $variables to Easy Gen: a "$ Variables" toggle in the header opens a collapsible name/value editor docked above the prompt bar. Same project.variables field the Editor writes, so nothing backend-side is new — movie_editor/server.py already forwards it on every generate and Studio resolves it dead-last inside refine_v2 (after shortcut expansion AND after the scene split), which is what makes a $var work inside a shortcut's replacement while a value containing a comma or trigger word can never move a scene cut. - easy_store: projectVariables/setProjectVariables (leading $ stripped on store) - easy_variables.js: rows + Add/Remove, count badge, live hint for undeclared names and self-referencing loops (cycle detection mirrors resolve_variables) - rows rebuild only on add/remove/project-change, so typing never loses focus Co-Authored-By: Claude <noreply@anthropic.com>
122 lines
6.1 KiB
CSS
122 lines
6.1 KiB
CSS
/* Easy Gen layout on top of the Editor's shared styles.css (design tokens,
|
|
.btn/.modal/.sw-*/.welcome-* rules) — big preview, prompt bar, nothing else. */
|
|
|
|
html, body.easy-body {
|
|
margin: 0; height: 100%; background: var(--ink-0); color: var(--text);
|
|
font-family: var(--font-ui);
|
|
}
|
|
|
|
.easy-app {
|
|
height: 100vh; display: flex; flex-direction: column;
|
|
}
|
|
|
|
.easy-top {
|
|
height: var(--menubar-h); flex: none; display: flex; align-items: center; gap: 14px;
|
|
padding: 0 16px; border-bottom: 1px solid var(--line); background: var(--ink-1);
|
|
}
|
|
.easy-project-name { color: var(--muted); font-size: 13px; }
|
|
.easy-top .easy-health-chip { margin-left: auto; }
|
|
a.brand { text-decoration: none; color: inherit; }
|
|
a.brand:hover .brand-sub { color: var(--amber-2); }
|
|
|
|
.easy-preview {
|
|
flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center;
|
|
background: var(--ink-0); position: relative; padding: 24px;
|
|
}
|
|
.easy-preview-inner {
|
|
width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
|
|
}
|
|
.easy-preview-inner img, .easy-preview-inner video {
|
|
max-width: 100%; max-height: 100%; border-radius: var(--radius); box-shadow: var(--shadow);
|
|
background: #000;
|
|
}
|
|
.easy-preview-empty {
|
|
color: var(--faint); font-size: 14px; font-family: var(--font-display);
|
|
}
|
|
.easy-preview-error { color: var(--danger); max-width: 60ch; text-align: center; white-space: pre-wrap; }
|
|
|
|
.easy-preview-close {
|
|
position: absolute; top: 34px; right: 34px; width: 28px; height: 28px; padding: 0;
|
|
border-radius: 50%; background: rgba(12,11,9,.72); border: 1px solid var(--line);
|
|
color: var(--text); font-size: 13px; cursor: pointer; display: flex; align-items: center; justify-content: center;
|
|
backdrop-filter: blur(2px); transition: border-color .12s, color .12s;
|
|
}
|
|
.easy-preview-close[hidden] { display: none; } /* class display:flex above would otherwise beat [hidden] */
|
|
.easy-preview-close:hover { border-color: var(--danger); color: var(--danger); }
|
|
.easy-preview-badge {
|
|
position: absolute; top: 34px; left: 34px; padding: 4px 10px; border-radius: 999px;
|
|
background: rgba(12,11,9,.72); border: 1px solid var(--line); color: var(--muted);
|
|
font-size: 11.5px; letter-spacing: .3px; backdrop-filter: blur(2px);
|
|
}
|
|
|
|
.easy-progress {
|
|
position: absolute; left: 24px; right: 24px; bottom: 24px;
|
|
background: var(--ink-1); border: 1px solid var(--line); border-radius: var(--radius);
|
|
padding: 10px 14px; box-shadow: var(--shadow);
|
|
}
|
|
.easy-progress-bar {
|
|
height: 6px; border-radius: 4px; background: linear-gradient(90deg, var(--amber), var(--amber-2));
|
|
width: 0%; transition: width .2s ease; margin-bottom: 6px;
|
|
}
|
|
.easy-progress-label { font-size: 12px; color: var(--muted); font-family: var(--font-mono); }
|
|
|
|
.easy-bar {
|
|
flex: none; display: flex; align-items: flex-end; gap: 12px;
|
|
padding: 14px 16px; border-top: 1px solid var(--line); background: var(--ink-1);
|
|
}
|
|
.easy-upload-btn, .easy-gallery-btn { flex: none; align-self: stretch; padding: 0 16px; }
|
|
.easy-prompt {
|
|
flex: 1; resize: none; background: var(--ink-2); border: 1px solid var(--line);
|
|
border-radius: var(--radius); color: var(--text); font: 14px/1.4 var(--font-ui);
|
|
padding: 10px 12px;
|
|
}
|
|
.easy-prompt:focus { outline: none; border-color: var(--amber); }
|
|
.easy-actions { flex: none; display: flex; flex-direction: column; align-items: stretch; gap: 6px; }
|
|
.easy-generate-btn { padding: 10px 26px; font-size: 14px; }
|
|
.easy-advanced-btn { align-self: center; }
|
|
|
|
/* Prompt $name variables — collapsible strip docked above the prompt bar. */
|
|
.easy-vars {
|
|
flex: none; max-height: 38vh; overflow: auto;
|
|
padding: 12px 16px; border-top: 1px solid var(--line); background: var(--ink-1);
|
|
}
|
|
.easy-vars[hidden] { display: none; }
|
|
.easy-vars-hint { color: var(--muted); font-size: 12px; line-height: 1.5; margin-bottom: 8px; }
|
|
.easy-vars-hint.easy-var-warn { color: var(--amber); }
|
|
.easy-vars-empty { color: var(--faint); font-size: 12px; }
|
|
.easy-var-list { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
|
|
.easy-var-row { display: flex; gap: 6px; align-items: center; width: 100%; }
|
|
.easy-var-dollar { color: var(--amber); font-family: var(--font-mono); opacity: .8; }
|
|
.easy-var-eq { color: var(--muted); }
|
|
.easy-var-in {
|
|
background: var(--ink-2); border: 1px solid var(--line); border-radius: var(--radius);
|
|
color: var(--text); font: 13px/1.4 var(--font-ui); padding: 6px 9px; min-width: 0;
|
|
}
|
|
.easy-var-in:focus { outline: none; border-color: var(--amber); }
|
|
.easy-var-name { flex: 0 0 22%; font-family: var(--font-mono); }
|
|
.easy-var-val { flex: 1; }
|
|
.easy-var-row .btn { flex: 0 0 auto; }
|
|
#easy-vars-btn.easy-vars-warn { color: var(--amber); border-color: var(--amber); }
|
|
|
|
.es-io-controls { display: flex; align-items: center; gap: 8px; }
|
|
.es-io-mode { background: var(--ink-2); border: 1px solid var(--line); color: var(--text);
|
|
border-radius: 6px; font-size: 12px; padding: 4px 6px; }
|
|
|
|
.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
|
|
.gal-cell { cursor: pointer; border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
|
|
background: var(--ink-2); transition: border-color .15s; }
|
|
.gal-cell:hover { border-color: var(--amber); }
|
|
.gal-thumb { position: relative; aspect-ratio: 1 / 1; background: var(--ink-0); display: flex; align-items: center; justify-content: center; }
|
|
.gal-thumb img, .gal-thumb video { width: 100%; height: 100%; object-fit: cover; }
|
|
.gal-name { padding: 6px 8px; font-size: 11.5px; color: var(--muted); white-space: nowrap;
|
|
overflow: hidden; text-overflow: ellipsis; }
|
|
|
|
.gal-pin-btn { position: absolute; top: 4px; right: 4px; z-index: 2; width: 22px; height: 22px;
|
|
border-radius: 6px; background: rgba(10, 9, 7, .72); border: 1px solid var(--line);
|
|
filter: grayscale(1); font-size: 12px; cursor: pointer; display: flex; align-items: center;
|
|
justify-content: center; padding: 0; }
|
|
.gal-pin-btn:hover { filter: none; }
|
|
.gal-pin-btn.active { filter: none; background: var(--amber-soft); border-color: var(--amber); }
|
|
.gal-pin-badge { position: absolute; top: 4px; left: 4px; z-index: 2; font-size: 10.5px;
|
|
background: rgba(10, 9, 7, .72); border-radius: 4px; padding: 1px 4px; line-height: 1.4; }
|