mirror of
https://github.com/nexu-io/openmotion.git
synced 2026-12-02 00:59:38 +08:00
* feat(studio): unify shell and editor opening loading into one seamless cover Host a single persistent opening cover inside MotionApp across shell route resolution, ArtifactViewer Suspense loading, and EditorAssetLoadingOverlay readiness so entering, refreshing, or switching projects never flickers between two loading screens or resets the brand mark animation. Unify pre-JS HTML splash and MotionLoading copy to 'Preparing project assets', move cover styles into frame-1 studio-shell.css with matching breathing motion, carry the 4s escape hatch timer across phases, and add unit regressions for single-node continuity, error suppression, and direct project switches. * Clean up unreachable EditorLoading fallback and duplicate cover animation --------- Co-authored-by: 罗高 <luogao@users.noreply.github.com>
81 lines
2.7 KiB
CSS
81 lines
2.7 KiB
CSS
/* Shared by the pre-JavaScript shell and React loading boundaries. */
|
|
html, body, #root { margin: 0; width: 100%; height: 100%; }
|
|
.motion-loading {
|
|
display: grid;
|
|
place-items: center;
|
|
align-content: center;
|
|
gap: var(--motion-space-16);
|
|
flex: 1;
|
|
width: 100%;
|
|
height: 100%;
|
|
min-height: 0;
|
|
box-sizing: border-box;
|
|
padding: var(--motion-space-24);
|
|
border-radius: inherit;
|
|
background: var(--motion-bg);
|
|
color: var(--motion-text);
|
|
}
|
|
.motion-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;
|
|
}
|
|
.motion-loading .motion-loading-mark {
|
|
animation: motion-preview-mark-breathe var(--motion-duration-loading) var(--motion-ease-standard) infinite alternate;
|
|
}
|
|
.motion-loading[data-overlay] { position: absolute; inset: 0; background: transparent; }
|
|
.motion-loading-label {
|
|
color: var(--motion-muted);
|
|
font: var(--motion-text-sm)/var(--motion-leading-body) var(--motion-font-sans);
|
|
text-align: center;
|
|
}
|
|
/* The first paint has the same narrow inset as the ready workspace. */
|
|
#root > .motion-loading { width: calc(100% - var(--motion-space-8)); height: calc(100% - var(--motion-space-8)); margin: var(--motion-space-4); border-radius: var(--motion-radius-step-10); }
|
|
body:has(#root > .motion-loading) { background: var(--motion-shell); }
|
|
|
|
/* Frameless preview-stage first-frame indicator: gentle breathing brand mark, no card or text. */
|
|
.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;
|
|
}
|
|
@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); }
|
|
}
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.motion-loading .motion-loading-mark {
|
|
opacity: 0.9;
|
|
animation: none;
|
|
}
|
|
.motion-preview-loading {
|
|
opacity: 1;
|
|
animation: none;
|
|
}
|
|
.motion-preview-loading-mark {
|
|
opacity: 0.85;
|
|
animation: none;
|
|
}
|
|
}
|