MCPcopy Create free account
hub / github.com/codeaashu/claude-code / StyledText

Function StyledText

src/ink/Ansi.tsx:233–291  ·  view source on GitHub ↗
(t0)

Source from the content-addressed store, hash-verified

231
232// Wrapper component that handles bold/dim mutual exclusivity for Text
233function StyledText(t0) {
234 const $ = _c(14);
235 let bold;
236 let children;
237 let dim;
238 let rest;
239 if ($[0] !== t0) {
240 ({
241 bold,
242 dim,
243 children,
244 ...rest
245 } = t0);
246 $[0] = t0;
247 $[1] = bold;
248 $[2] = children;
249 $[3] = dim;
250 $[4] = rest;
251 } else {
252 bold = $[1];
253 children = $[2];
254 dim = $[3];
255 rest = $[4];
256 }
257 if (dim) {
258 let t1;
259 if ($[5] !== children || $[6] !== rest) {
260 t1 = <Text {...rest} dim={true}>{children}</Text>;
261 $[5] = children;
262 $[6] = rest;
263 $[7] = t1;
264 } else {
265 t1 = $[7];
266 }
267 return t1;
268 }
269 if (bold) {
270 let t1;
271 if ($[8] !== children || $[9] !== rest) {
272 t1 = <Text {...rest} bold={true}>{children}</Text>;
273 $[8] = children;
274 $[9] = rest;
275 $[10] = t1;
276 } else {
277 t1 = $[10];
278 }
279 return t1;
280 }
281 let t1;
282 if ($[11] !== children || $[12] !== rest) {
283 t1 = <Text {...rest}>{children}</Text>;
284 $[11] = children;
285 $[12] = rest;
286 $[13] = t1;
287 } else {
288 t1 = $[13];
289 }
290 return t1;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected