* Wrapper component that exits after rendering. * Uses useLayoutEffect to ensure we wait for React's commit phase to complete * before exiting. This is more robust than process.nextTick() for React 19's * async render cycle.
(t0)
| 16 | * async render cycle. |
| 17 | */ |
| 18 | function RenderOnceAndExit(t0) { |
| 19 | const $ = _c(5); |
| 20 | const { |
| 21 | children |
| 22 | } = t0; |
| 23 | const { |
| 24 | exit |
| 25 | } = useApp(); |
| 26 | let t1; |
| 27 | let t2; |
| 28 | if ($[0] !== exit) { |
| 29 | t1 = () => { |
| 30 | const timer = setTimeout(exit, 0); |
| 31 | return () => clearTimeout(timer); |
| 32 | }; |
| 33 | t2 = [exit]; |
| 34 | $[0] = exit; |
| 35 | $[1] = t1; |
| 36 | $[2] = t2; |
| 37 | } else { |
| 38 | t1 = $[1]; |
| 39 | t2 = $[2]; |
| 40 | } |
| 41 | useLayoutEffect(t1, t2); |
| 42 | let t3; |
| 43 | if ($[3] !== children) { |
| 44 | t3 = <>{children}</>; |
| 45 | $[3] = children; |
| 46 | $[4] = t3; |
| 47 | } else { |
| 48 | t3 = $[4]; |
| 49 | } |
| 50 | return t3; |
| 51 | } |
| 52 | |
| 53 | // DEC synchronized update markers used by terminals |
| 54 | const SYNC_START = '\x1B[?2026h'; |