MCPcopy Create free account
hub / github.com/adobe/react-spectrum / cellScaleKeyframes

Function cellScaleKeyframes

packages/@react-spectrum/ai/src/loader/react.tsx:144–162  ·  view source on GitHub ↗
(name, c, total)

Source from the content-addressed store, hash-verified

142// center, so no layout shift). The entrance completes ENT_LEAD frames before
143// the cell settles; the exit starts as the cell begins to fall away.
144function cellScaleKeyframes(name, c, total) {
145 const inEnd = c.stagger + DROP_SETTLE - ENT_LEAD;
146 const inStart = inEnd - ENT_DUR;
147 const outStart = exitStartOf(c);
148 const outEnd = outStart + EXIT_DUR;
149 return emitKeyframes(
150 name,
151 [
152 {f: 0, decl: sc(0)},
153 {f: inStart, decl: sc(ENT_FLOOR), ease: EASE.scaleIn},
154 {f: inEnd, decl: sc(1)},
155 {f: outStart, decl: sc(1), ease: EASE.scaleOut},
156 {f: outEnd, decl: sc(EXIT_FLOOR)},
157 {f: outStart + EXIT_FALL, decl: sc(0)},
158 {f: total, decl: sc(0)}
159 ],
160 total
161 );
162}
163
164// Group opacity envelope for the whole loader, applied once to the cell-grid
165// container so overlapping cells never stack their alpha.

Callers 1

keyframesForFunction · 0.85

Calls 3

exitStartOfFunction · 0.85
emitKeyframesFunction · 0.85
scFunction · 0.85

Tested by

no test coverage detected