Skip to content

Commit b9ea86e

Browse files
committed
refactor(iocraft): colocate 15 type-only exports (drop unused)
TextWeight, TextAlign, TextWrap, TextStyle, DisplayType, PositionType, OverflowType, BorderEdges, CustomBorderChars, MixedTextContentSection, BoxProps, TextProps, MixedTextProps, FragmentProps, Element — all defined but consumed only inside iocraft.mts. External callers only import Box, Text, print (runtime functions). BorderStyle stays exported (test fixture uses it).
1 parent 17fa376 commit b9ea86e

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

packages/cli/src/util/terminal/iocraft.mts

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ export function MixedText(props: MixedTextProps): Element {
280280
* Text({ children: 'Light', weight: 'light' })
281281
* ```
282282
*/
283-
export type TextWeight = 'normal' | 'bold' | 'light'
283+
type TextWeight = 'normal' | 'bold' | 'light'
284284

285285
/**
286286
* Text alignment options for horizontal positioning.
@@ -292,7 +292,7 @@ export type TextWeight = 'normal' | 'bold' | 'light'
292292
* Text({ children: 'Right aligned', align: 'right' })
293293
* ```
294294
*/
295-
export type TextAlign = 'left' | 'center' | 'right'
295+
type TextAlign = 'left' | 'center' | 'right'
296296

297297
/**
298298
* Text wrapping behavior for long text content.
@@ -303,7 +303,7 @@ export type TextAlign = 'left' | 'center' | 'right'
303303
* Text({ children: 'No wrapping', wrap: 'nowrap' })
304304
* ```
305305
*/
306-
export type TextWrap = 'wrap' | 'nowrap'
306+
type TextWrap = 'wrap' | 'nowrap'
307307

308308
/**
309309
* Text styling options for visual appearance.
@@ -321,7 +321,7 @@ export type TextWrap = 'wrap' | 'nowrap'
321321
* Text({ children: 'Pink', color: '213' }) // Bare number also works
322322
* ```
323323
*/
324-
export interface TextStyle {
324+
interface TextStyle {
325325
/**
326326
* Apply bold styling to text.
327327
*/
@@ -362,7 +362,7 @@ export interface TextStyle {
362362
* Box({ display: 'none' }) // Hides the element
363363
* ```
364364
*/
365-
export type DisplayType = 'flex' | 'none'
365+
type DisplayType = 'flex' | 'none'
366366

367367
/**
368368
* Position type for element positioning in layout.
@@ -373,7 +373,7 @@ export type DisplayType = 'flex' | 'none'
373373
* Box({ position: 'absolute', top: 0, left: 0 }) // Absolute positioning
374374
* ```
375375
*/
376-
export type PositionType = 'relative' | 'absolute'
376+
type PositionType = 'relative' | 'absolute'
377377

378378
/**
379379
* Overflow behavior for content that exceeds container bounds.
@@ -385,7 +385,7 @@ export type PositionType = 'relative' | 'absolute'
385385
* Box({ overflowX: 'hidden', overflowY: 'visible' }) // Per-axis control
386386
* ```
387387
*/
388-
export type OverflowType = 'visible' | 'hidden'
388+
type OverflowType = 'visible' | 'hidden'
389389

390390
/**
391391
* Border edges configuration for selective border rendering.
@@ -396,7 +396,7 @@ export type OverflowType = 'visible' | 'hidden'
396396
* Box({ borderEdges: { left: false, right: false } }) // Hide left/right
397397
* ```
398398
*/
399-
export interface BorderEdges {
399+
interface BorderEdges {
400400
/**
401401
* Show border on bottom edge.
402402
*/
@@ -434,7 +434,7 @@ export interface BorderEdges {
434434
* })
435435
* ```
436436
*/
437-
export interface CustomBorderChars {
437+
interface CustomBorderChars {
438438
/**
439439
* Bottom border character.
440440
*/
@@ -507,7 +507,7 @@ export type BorderStyle =
507507
* })
508508
* ```
509509
*/
510-
export interface MixedTextContentSection {
510+
interface MixedTextContentSection {
511511
/**
512512
* Text color (named colors, hex, or ANSI codes)
513513
*/
@@ -560,7 +560,7 @@ export interface MixedTextContentSection {
560560
* })
561561
* ```
562562
*/
563-
export interface BoxProps {
563+
interface BoxProps {
564564
/**
565565
* Align flex lines when there's extra space on the cross axis.
566566
*/
@@ -789,7 +789,7 @@ export interface BoxProps {
789789
* })
790790
* ```
791791
*/
792-
export interface TextProps extends TextStyle {
792+
interface TextProps extends TextStyle {
793793
/**
794794
* Horizontal text alignment (left, center, right)
795795
*/
@@ -817,7 +817,7 @@ export interface TextProps extends TextStyle {
817817
* })
818818
* ```
819819
*/
820-
export interface MixedTextProps {
820+
interface MixedTextProps {
821821
/**
822822
* Horizontal text alignment.
823823
*/
@@ -842,7 +842,7 @@ export interface MixedTextProps {
842842
* })
843843
* ```
844844
*/
845-
export interface FragmentProps {
845+
interface FragmentProps {
846846
/**
847847
* Child elements to group.
848848
*/
@@ -854,7 +854,7 @@ export interface FragmentProps {
854854
* ComponentNode directly because we need to support all properties when
855855
* building elements.
856856
*/
857-
export interface Element {
857+
interface Element {
858858
type: 'Text' | 'View' | 'MixedText' | 'Fragment'
859859
children?: Element[] | undefined
860860

0 commit comments

Comments
 (0)