Files
openmotion/packages/design-system/studio-editor.css
open-design-crew[bot] 47a7e650b9 perf(studio,api): optimize timeline thumbnails, sidebar covers, SnapDOM capture, and filmstrip caching (#1128)
* feat(studio): stabilize sidebar loading, add per-item error reload, and cache timeline snapshots

* fix(timeline): inherit duration for untimed root clips, distinguish save failure banners, and block direct canvas splits

* fix(timeline): block splitting canvas-wrapper clips across preview, UI, and edit-core

* fix(timeline): preserve split sub-composition source and seed right-half fallback filmstrips

* feat(studio): add zero-slice sprite thumbnails, 0ms sidebar hover scrub, and native drilled-in media routing

* fix(studio): pin Root composition card cover to master timeline's earliest scene across sub-composition switches

* fix(studio): refresh sidebar covers on sub-composition edits and track trimmed root playback window

* fix(studio): evenly space left dock icon navigation tabs and refine active pill proportion

* fix(studio): match sidebar cover to first visible opening frame and restore live hover playback

* perf(studio): tighten visual filmstrip deps, SnapDOM capture, and S3 write-back gate (Phase 3)

* refactor(studio): modularize composition capture cache, revision registry, and lazy editor dep reads (Phase 4)

* fix(studio,api,edit-core): resolve P0/P1 findings from independent review

* refactor(studio): deduplicate CompositionsTab near-viewport hook via shared useNearViewport

* fix(studio): keep bare relative media paths root-relative unless sibling exists in fileTree

* fix(studio): skip hidden child clips when selecting Root composition cover

---------

Co-authored-by: 罗高 <luogao@users.noreply.github.com>
2026-11-26 17:13:32 +08:00

174 lines
5.6 KiB
CSS

/* Editor-only Studio presentation (loaded lazily with the Motion project editor). */
@import "./studio/editor-workspace.css";
@import "./studio/audio-assets.css";
@import "./studio/media-quick-actions.css";
@import "./studio/propertyPanelControls.css";
/* Shared placement feedback: crisp target geometry and a readable live readout. */
.motion-placement-outline {
border: 2px solid var(--motion-accent);
border-radius: var(--motion-radius-sm);
background: var(--motion-accent-soft);
}
.motion-placement-label {
position: absolute;
z-index: 65;
display: flex;
align-items: center;
gap: var(--motion-space-8);
padding: var(--motion-space-4) var(--motion-space-8);
border: 1px solid var(--motion-border);
border-radius: var(--motion-radius-sm);
background: var(--motion-raised);
color: var(--motion-strong);
box-shadow: var(--motion-shadow-sm);
font-size: var(--motion-text-xs);
line-height: 1;
white-space: nowrap;
pointer-events: none;
overflow: hidden;
}
.motion-placement-label strong { font-family: var(--motion-font-mono); font-weight: var(--motion-weight-medium); font-variant-numeric: tabular-nums; }
.motion-placement-label[data-snapped] { border-color: var(--motion-accent); }
/* Frameless preview-stage breathing brand mark (also bundled so deploy cache never drops it). */
.motion-preview-loading {
position: absolute;
inset: 0;
z-index: 30;
display: grid;
place-items: center;
pointer-events: none;
user-select: none;
opacity: 0;
animation: motion-preview-loading-enter var(--motion-duration-fast) var(--motion-ease-out) 60ms forwards;
}
.motion-preview-loading-mark {
display: block;
width: var(--motion-space-40);
height: var(--motion-space-40);
background: var(--motion-accent);
-webkit-mask: url('./brand/loading-mark.svg') center / contain no-repeat;
mask: url('./brand/loading-mark.svg') center / contain no-repeat;
animation: motion-preview-mark-breathe var(--motion-duration-loading) var(--motion-ease-standard) infinite alternate;
}
@container composition-preview (max-width: 280px) or (max-height: 160px) {
.motion-preview-loading-mark {
width: min(var(--motion-space-24), 20cqmin);
height: min(var(--motion-space-24), 20cqmin);
}
.motion-preview-loading-copy {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
}
}
@keyframes motion-preview-loading-enter {
to { opacity: 1; }
}
@keyframes motion-preview-mark-breathe {
from { opacity: 0.92; transform: scale(1); }
to { opacity: 0.42; transform: scale(0.92); }
}
/* Compact transport status indicators: media buffering hint & persistent asset-retry pill. */
.motion-player-buffering {
display: inline-flex;
align-items: center;
gap: var(--motion-space-4);
min-width: 0;
white-space: nowrap;
color: var(--motion-muted);
font: var(--motion-weight-medium) var(--motion-text-xs)/1 var(--motion-font-sans);
}
.motion-player-asset-pill {
display: inline-flex;
align-items: center;
gap: var(--motion-space-4);
max-width: 100%;
min-width: 0;
padding: var(--motion-space-2) var(--motion-space-8);
border-radius: var(--motion-radius-full);
background: var(--motion-warning-soft);
color: var(--motion-warning);
font: var(--motion-weight-medium) var(--motion-text-xs)/1.3 var(--motion-font-sans);
cursor: pointer;
transition: opacity var(--motion-duration-fast) var(--motion-ease-out);
}
.motion-player-asset-pill:hover:not(:disabled) {
opacity: 0.88;
}
.motion-player-asset-pill:disabled {
cursor: default;
opacity: 0.65;
}
/* Per-item bottom-right load-error indicator with one-click reload (clips, asset cards, comp cards). */
.motion-item-error-badge {
position: absolute;
right: var(--motion-space-4);
bottom: var(--motion-space-4);
z-index: 25;
display: inline-flex;
align-items: center;
justify-content: center;
gap: var(--motion-space-2);
min-width: var(--motion-space-20);
height: var(--motion-space-20);
padding: 0 var(--motion-space-6);
border: 1px solid color-mix(in srgb, var(--motion-danger) 55%, transparent);
border-radius: var(--motion-radius-full);
background: var(--motion-danger-soft);
color: var(--motion-danger);
box-shadow: var(--motion-shadow-xs);
pointer-events: auto;
cursor: pointer;
line-height: 1;
transition: background-color var(--motion-duration-fast) var(--motion-ease-out),
border-color var(--motion-duration-fast) var(--motion-ease-out),
transform var(--motion-duration-fast) var(--motion-ease-out);
}
.motion-item-error-badge.is-inline {
position: relative;
right: auto;
bottom: auto;
flex-shrink: 0;
}
.motion-item-error-badge.is-compact {
padding: 0 var(--motion-space-4);
}
.motion-item-error-badge.is-compact .motion-item-error-badge__reload {
display: none;
}
.motion-item-error-badge.is-compact:is(:hover, :focus-visible) .motion-item-error-badge__alert {
display: none;
}
.motion-item-error-badge.is-compact:is(:hover, :focus-visible) .motion-item-error-badge__reload {
display: inline-flex;
}
.motion-item-error-badge:not([data-reloading="true"]):not(:disabled):is(:hover, :focus-visible) {
background: color-mix(in srgb, var(--motion-danger) 24%, var(--motion-danger-soft));
border-color: var(--motion-danger);
color: var(--motion-danger);
}
.motion-item-error-badge:is([data-reloading="true"], :disabled) {
cursor: default;
opacity: 0.75;
}
@media (prefers-reduced-motion: reduce) {
.motion-item-error-badge {
transition: none;
}
.motion-preview-loading {
opacity: 1;
animation: none;
}
.motion-preview-loading-mark {
opacity: 0.85;
animation: none;
}
}