Skip to content

AI media harness for planning, generating, and editing locally

TypeScript

Dress the scene editor from the tokens

Bitti8a398edbdac2
diff --git a/src/styles/generator.css b/src/styles/generator.css
index 67d699e..db29e0a 100644
--- a/src/styles/generator.css
+++ b/src/styles/generator.css
@@ -337,10 +337,6 @@
line-height: var(--leading-normal);
}
-.generator-heading .secondary-button {
- flex: 0 0 auto;
-}
-
/* --- Generation composer --------------------------------------------------- */
.generation-composer {
@@ -462,127 +458,574 @@
line-height: var(--leading-normal);
}
-/* --- Shot tags ------------------------------------------------------------- */
+/* --- The scene editor ------------------------------------------------------
-.shot-tags {
- margin-top: var(--space-4);
+ The main control on this screen. The lines the user writes are the largest
+ thing in it; everything else — the bar, the settings, the reference chips —
+ sits around them without competing for the eye.
+ ========================================================================== */
+
+.scene-editor {
+ display: flex;
+ flex-direction: column;
+ gap: var(--space-4);
}
-.shot-tags__lead {
- margin: 0 0 var(--space-2);
- color: var(--text-muted);
- font-size: var(--text-sm);
- line-height: var(--leading-normal);
+/* --- Length, and the bar the scene is split on ----------------------------- */
+
+.scene-bar {
+ padding: var(--space-4);
+ border: 1px solid var(--line);
+ border-radius: var(--radius-lg);
+ background: var(--panel);
}
-.shot-tag-group + .shot-tag-group {
- margin-top: var(--space-1);
+.scene-bar__head {
+ display: flex;
+ flex-wrap: wrap;
+ align-items: center;
+ justify-content: space-between;
+ gap: var(--space-2) var(--space-4);
+ margin-bottom: var(--space-3);
}
-/* One accordion row per group. Collapsed, it still reports what it holds —
- using the same terms the compiled prompt will carry, never a paraphrase. */
-.shot-tag-group__head {
- display: grid;
- grid-template-columns: minmax(0, auto) minmax(0, 1fr) 16px;
+.scene-bar__length {
+ display: flex;
align-items: center;
gap: var(--space-3);
- width: 100%;
min-height: var(--control-sm);
- padding: var(--space-2) var(--space-3);
+}
+
+.scene-bar__length > span {
+ color: var(--text-secondary);
+ font-size: var(--text-xs);
+ font-weight: var(--weight-semibold);
+ line-height: var(--leading-snug);
+}
+
+.scene-bar__length input[type="range"] {
+ width: 240px;
+ max-width: 44vw;
+ accent-color: var(--accent);
+}
+
+.scene-bar__length b {
+ min-width: 5ch;
+ color: var(--text-primary);
+ font-family: var(--font-mono);
+ font-size: var(--text-2xs);
+ font-weight: var(--weight-semibold);
+}
+
+.scene-bar__range {
+ color: var(--text-muted);
+ font-size: var(--text-xs);
+ line-height: var(--leading-snug);
+}
+
+/* One segment per shot, sized by how long it runs. The line between two of
+ them is the cut, and it is what gets dragged. */
+.scene-bar__track {
+ display: flex;
+ min-height: 56px;
border: 1px solid var(--line);
border-radius: var(--radius-md);
+ background: var(--panel-2);
+ overflow: hidden;
+ touch-action: none;
+}
+
+.scene-bar__shot {
+ position: relative;
+ min-width: 0;
+ display: flex;
+}
+
+.scene-bar__shot + .scene-bar__shot {
+ border-left: 1px solid var(--line-strong);
+}
+
+.scene-bar__shot--active {
+ background: var(--accent-soft);
+}
+
+.scene-bar__label {
+ flex: 1 1 auto;
+ min-width: 0;
+ display: flex;
+ flex-direction: column;
+ justify-content: center;
+ gap: var(--space-1);
+ padding: var(--space-2) var(--space-3);
+ border: 0;
color: var(--text-secondary);
- background: var(--panel);
+ background: none;
text-align: left;
cursor: pointer;
}
-.shot-tag-group__head:hover:not(:disabled) {
- border-color: var(--line-strong);
- background: var(--panel-2);
+.scene-bar__label:hover {
+ color: var(--text-primary);
+}
+
+.scene-bar__label b {
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ font-size: var(--text-xs);
+ font-weight: var(--weight-semibold);
+ line-height: var(--leading-snug);
+}
+
+.scene-bar__label em {
+ color: var(--text-faint);
+ font-family: var(--font-mono);
+ font-size: var(--text-2xs);
+ font-style: normal;
+ line-height: var(--leading-snug);
+}
+
+/* Wide enough to grab, drawn as the hairline it represents. */
+.scene-bar__handle {
+ position: absolute;
+ inset-block: 0;
+ left: calc(var(--space-3) * -1);
+ z-index: 1;
+ width: var(--space-5);
+ padding: 0;
+ border: 0;
+ background: none;
+ cursor: ew-resize;
}
-.shot-tag-group__head:disabled {
+.scene-bar__handle::before {
+ content: "";
+ position: absolute;
+ inset-block: var(--space-2);
+ left: 50%;
+ width: 2px;
+ border-radius: var(--radius-pill);
+ background: var(--line-strong);
+ transform: translateX(-50%);
+}
+
+.scene-bar__handle:hover::before,
+.scene-bar__handle:focus-visible::before {
+ background: var(--accent-bright);
+}
+
+.scene-bar__handle:disabled {
cursor: default;
- opacity: 0.6;
}
-.shot-tag-group__head b {
+/* --- The shots ------------------------------------------------------------- */
+
+.shot-list {
+ display: flex;
+ flex-direction: column;
+ gap: var(--space-3);
+ margin: 0;
+ padding: 0;
+ list-style: none;
+}
+
+.shot-card {
+ padding: var(--space-4);
+ border: 1px solid var(--line);
+ border-radius: var(--radius-lg);
+ background: var(--panel);
+}
+
+.shot-card--focused {
+ border-color: var(--accent);
+}
+
+.shot-card__head {
+ display: flex;
+ flex-wrap: wrap;
+ align-items: center;
+ gap: var(--space-3);
+ margin-bottom: var(--space-3);
+}
+
+.shot-card__head > b {
color: var(--text-primary);
font-size: var(--text-sm);
font-weight: var(--weight-semibold);
line-height: var(--leading-snug);
}
-.shot-tag-group__head > span {
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
+.shot-card__start {
+ display: flex;
+ align-items: center;
+ gap: var(--space-2);
+ margin-left: auto;
+}
+
+.shot-card__start > span {
color: var(--text-muted);
font-size: var(--text-xs);
line-height: var(--leading-snug);
}
-.shot-tag-group--open .shot-tag-group__head {
- border-color: var(--accent);
- border-bottom-left-radius: 0;
- border-bottom-right-radius: 0;
+.shot-card__start input {
+ width: 8ch;
+ height: var(--control-sm);
+ padding: 0 var(--space-2);
+ border: 1px solid var(--line);
+ border-radius: var(--radius-sm);
+ color: var(--text-primary);
+ background: var(--panel-2);
+ font-family: var(--font-mono);
+ font-size: var(--text-2xs);
}
-.shot-tag-group--open .shot-tag-group__head svg {
- transform: rotate(90deg);
+.shot-card__start input:disabled {
+ color: var(--text-faint);
+ cursor: default;
}
-.shot-tag-group__body {
- padding: var(--space-3);
- border: 1px solid var(--accent);
- border-top: 0;
- border-radius: 0 0 var(--radius-md) var(--radius-md);
- background: var(--panel);
+.shot-card__start em {
+ color: var(--text-faint);
+ font-family: var(--font-mono);
+ font-size: var(--text-2xs);
+ font-style: normal;
}
-.shot-tag-group__help {
- margin: 0 0 var(--space-3);
+.shot-card__remove {
+ display: grid;
+ place-items: center;
+ width: var(--control-sm);
+ height: var(--control-sm);
+ padding: 0;
+ border: 1px solid var(--line);
+ border-radius: var(--radius-sm);
color: var(--text-muted);
+ background: var(--panel-2);
+}
+
+.shot-card__remove:hover:not(:disabled) {
+ border-color: var(--danger);
+ color: var(--danger);
+}
+
+/* The line itself. Biggest type on the screen after the page title, because it
+ is the thing the whole screen exists to collect. */
+.shot-card__action {
+ display: block;
+}
+
+.shot-card__sublabel {
+ display: block;
+ margin-bottom: var(--space-2);
+ color: var(--text-secondary);
font-size: var(--text-xs);
+ font-weight: var(--weight-semibold);
+ line-height: var(--leading-snug);
+}
+
+.shot-card__action textarea {
+ width: 100%;
+ min-height: 104px;
+ padding: var(--space-3);
+ border: 1px solid var(--line-strong);
+ border-radius: var(--radius-md);
+ color: var(--text-primary);
+ background: var(--panel-2);
+ font-family: var(--font-sans);
+ font-size: var(--text-md);
line-height: var(--leading-normal);
+ resize: vertical;
+}
+
+.shot-card__action textarea:disabled {
+ color: var(--text-muted);
+ cursor: default;
+}
+
+/* The same line read back, with every reference as a control you can change. */
+.shot-readback {
+ display: flex;
+ flex-wrap: wrap;
+ align-items: center;
+ gap: var(--space-1);
+ margin: var(--space-3) 0 0;
+ padding: var(--space-2) var(--space-3);
+ border: 1px dashed var(--line-strong);
+ border-radius: var(--radius-md);
+ color: var(--text-secondary);
+ font-size: var(--text-sm);
+ line-height: var(--leading-normal);
+}
+
+.shot-readback__lead {
+ width: 100%;
+ color: var(--text-faint);
+ font-size: var(--text-2xs);
+ text-transform: uppercase;
+ letter-spacing: var(--tracking-label);
+}
+
+.shot-readback__text {
+ white-space: pre-wrap;
+}
+
+.shot-readback__token {
+ min-height: var(--control-sm);
+ max-width: 100%;
+ padding: 0 var(--space-2);
+ border: 1px solid var(--accent);
+ border-radius: var(--radius-pill);
+ color: var(--text-primary);
+ background: var(--accent-soft);
+ font-family: var(--font-sans);
+ font-size: var(--text-xs);
+ font-weight: var(--weight-semibold);
+ cursor: pointer;
}
-.shot-tag-group__options {
+.shot-readback__token--broken {
+ border-color: var(--danger);
+ background: color-mix(in srgb, var(--danger) 16%, transparent);
+}
+
+/* --- Settings on a shot ---------------------------------------------------- */
+
+.shot-settings {
+ margin-top: var(--space-3);
+ padding-top: var(--space-3);
+ border-top: 1px solid var(--line);
+}
+
+.shot-settings__chips {
display: flex;
flex-wrap: wrap;
gap: var(--space-2);
+ margin: 0 0 var(--space-3);
+ padding: 0;
+ list-style: none;
+}
+
+.shot-settings__none {
+ color: var(--text-faint);
+ font-size: var(--text-xs);
+ line-height: var(--leading-snug);
}
-.shot-tag {
+.setting-tag {
+ display: inline-flex;
+ align-items: center;
+ gap: var(--space-2);
min-height: var(--control-sm);
- padding: var(--space-2) var(--space-3);
- border: 1px solid var(--line);
+ padding: 0 var(--space-1) 0 var(--space-3);
+ border: 1px solid var(--line-strong);
border-radius: var(--radius-pill);
- color: var(--text-secondary);
background: var(--panel-2);
+}
+
+.setting-tag em {
+ color: var(--text-faint);
+ font-size: var(--text-2xs);
+ font-style: normal;
+ text-transform: uppercase;
+ letter-spacing: var(--tracking-label);
+}
+
+.setting-tag b {
+ color: var(--text-primary);
+ font-size: var(--text-xs);
+ font-weight: var(--weight-semibold);
+}
+
+.setting-tag button {
+ display: grid;
+ place-items: center;
+ width: var(--space-6);
+ height: var(--space-6);
+ padding: 0;
+ border: 0;
+ border-radius: var(--radius-pill);
+ color: var(--text-muted);
+ background: none;
+}
+
+.setting-tag button:hover:not(:disabled) {
+ color: var(--danger);
+}
+
+.shot-settings__add {
+ display: flex;
+ flex-wrap: wrap;
+ align-items: center;
+ gap: var(--space-2);
+}
+
+.shot-settings__add select,
+.scene-settings select {
+ height: var(--field-height);
+ max-width: 100%;
+ padding: 0 var(--space-3);
+ border: 1px solid var(--line);
+ border-radius: var(--radius-sm);
+ color: var(--text-primary);
+ background: var(--panel-2);
+ font-family: var(--font-sans);
+ font-size: var(--text-sm);
+}
+
+.shot-settings__help {
+ color: var(--text-muted);
font-size: var(--text-xs);
- font-weight: var(--weight-medium);
line-height: var(--leading-snug);
- cursor: pointer;
}
-.shot-tag:hover:not(:disabled) {
- border-color: var(--line-strong);
+/* --- What belongs to the whole scene --------------------------------------- */
+
+.scene-settings {
+ padding: var(--space-4);
+ border: 1px solid var(--line);
+ border-radius: var(--radius-lg);
+ background: var(--panel);
+}
+
+.scene-settings h3 {
+ margin: 0 0 var(--space-3);
color: var(--text-primary);
+ font-size: var(--text-sm);
+ font-weight: var(--weight-semibold);
+ line-height: var(--leading-snug);
}
-.shot-tag--on {
- border-color: var(--accent);
+.scene-settings__field {
+ display: block;
+}
+
+.scene-settings__field + .scene-settings__field {
+ margin-top: var(--space-4);
+}
+
+.scene-settings__field > span {
+ display: block;
+ margin-bottom: var(--space-2);
+ color: var(--text-secondary);
+ font-size: var(--text-xs);
+ font-weight: var(--weight-semibold);
+ line-height: var(--leading-snug);
+}
+
+.scene-settings__field textarea {
+ width: 100%;
+ min-height: 64px;
+ padding: var(--space-3);
+ border: 1px solid var(--line);
+ border-radius: var(--radius-md);
color: var(--text-primary);
+ background: var(--panel-2);
+ font-family: var(--font-sans);
+ font-size: var(--text-base);
+ line-height: var(--leading-normal);
+ resize: vertical;
+}
+
+.scene-settings__field small {
+ display: block;
+ margin-top: var(--space-2);
+ color: var(--text-muted);
+ font-size: var(--text-xs);
+ line-height: var(--leading-normal);
+}
+
+.scene-settings__field code {
+ font-family: var(--font-mono);
+ font-size: var(--text-2xs);
+}
+
+/* --- References that can be dropped into a line ---------------------------- */
+
+.reference-palette {
+ padding: var(--space-3) var(--space-4);
+ border: 1px solid var(--line);
+ border-radius: var(--radius-lg);
+ background: var(--panel);
+}
+
+.reference-palette__lead {
+ display: block;
+ color: var(--text-muted);
+ font-size: var(--text-xs);
+ line-height: var(--leading-normal);
+}
+
+.reference-palette ul {
+ display: flex;
+ flex-wrap: wrap;
+ gap: var(--space-2);
+ margin: var(--space-3) 0 0;
+ padding: 0;
+ list-style: none;
+}
+
+.reference-palette ul:empty {
+ margin: 0;
+}
+
+.reference-chip {
+ display: flex;
+ flex-direction: column;
+ gap: 2px;
+ min-height: var(--control-sm);
+ max-width: 26ch;
+ padding: var(--space-2) var(--space-3);
+ border: 1px solid var(--line-strong);
+ border-radius: var(--radius-md);
+ color: var(--text-primary);
+ background: var(--panel-2);
+ text-align: left;
+ cursor: grab;
+}
+
+.reference-chip:hover:not(:disabled) {
+ border-color: var(--accent-bright);
background: var(--accent-soft);
}
-.shot-tag:disabled {
+.reference-chip:disabled {
cursor: default;
opacity: 0.55;
}
+.reference-chip em {
+ color: var(--text-faint);
+ font-size: var(--text-2xs);
+ font-style: normal;
+ text-transform: uppercase;
+ letter-spacing: var(--tracking-label);
+}
+
+.reference-chip b {
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+ font-size: var(--text-xs);
+ font-weight: var(--weight-semibold);
+ line-height: var(--leading-snug);
+}
+
+.reference-palette__broken {
+ margin: var(--space-3) 0 0;
+ padding: var(--space-3);
+ border: 1px solid var(--danger);
+ border-radius: var(--radius-md);
+ color: var(--text-secondary);
+ background: color-mix(in srgb, var(--danger) 12%, transparent);
+ font-size: var(--text-xs);
+ line-height: var(--leading-normal);
+}
+
+.scene-editor__add {
+ align-self: flex-start;
+}
+
/* --- The compiled prompt --------------------------------------------------- */
/* Shown before anything is committed, and coloured by authorship, because the
@@ -674,24 +1117,6 @@
line-height: var(--leading-snug);
}
-.job-tags {
- padding: var(--space-4) 0;
- border-bottom: 1px solid var(--line);
-}
-
-.job-tags > span {
- display: block;
- margin-bottom: var(--space-2);
- color: var(--text-secondary);
- font-size: var(--text-xs);
- font-weight: var(--weight-semibold);
- line-height: var(--leading-snug);
-}
-
-.job-tags .shot-tags {
- margin-top: 0;
-}
-
/* Read-only facts about how every shot is made — deliberately not buttons,
because none of these values can be changed from here yet. */
@@ -1038,13 +1463,11 @@
background: var(--panel-2);
}
-.job-prompt,
.job-runtime-note {
padding: var(--space-4) 0;
border-bottom: 1px solid var(--line);
}
-.job-prompt > span,
.job-refs > span,
.job-runtime-note > span {
display: block;
@@ -1054,7 +1477,6 @@
line-height: var(--leading-snug);
}
-.job-prompt p,
.job-runtime-note p {
margin: var(--space-2) 0 0;
color: var(--text-secondary);