INNER CODE UNIT · TypeScript
availableWidth
remotion-dev/remotion · .pi/extensions/vercel-deployment/index.ts:220
const availableWidth = Math.max(0, Math.floor(width));
if (availableWidth === 0) {
return [''];
}
const status =
deployment.state === 'ready'
? {color: 'success' as const, symbol: '✓'}
: deployment.state === 'pending'
? {color: 'warning' as const, symbol: '…'}
: deployment.state === 'failed'
? {color: 'error' as const, symbol: '×'}
: {color: 'dim' as const, symbol: '·'};
const fullLabel = `Vercel ${status.symbol} ${PREVIEW_LABEL}`;
if ([...fullLabel].length <= availableWidth) {
const line = `${theme.fg('dim', 'Vercel')} ${theme.fg(
status.color,
status.symbol,