source dump of claude code
at main 134 lines 2.8 kB view raw
1/** 2 * Yoga enums — ported from yoga-layout/src/generated/YGEnums.ts 3 * Kept as `const` objects (not TS enums) per repo convention. 4 * Values match upstream exactly so callers don't change. 5 */ 6 7export const Align = { 8 Auto: 0, 9 FlexStart: 1, 10 Center: 2, 11 FlexEnd: 3, 12 Stretch: 4, 13 Baseline: 5, 14 SpaceBetween: 6, 15 SpaceAround: 7, 16 SpaceEvenly: 8, 17} as const 18export type Align = (typeof Align)[keyof typeof Align] 19 20export const BoxSizing = { 21 BorderBox: 0, 22 ContentBox: 1, 23} as const 24export type BoxSizing = (typeof BoxSizing)[keyof typeof BoxSizing] 25 26export const Dimension = { 27 Width: 0, 28 Height: 1, 29} as const 30export type Dimension = (typeof Dimension)[keyof typeof Dimension] 31 32export const Direction = { 33 Inherit: 0, 34 LTR: 1, 35 RTL: 2, 36} as const 37export type Direction = (typeof Direction)[keyof typeof Direction] 38 39export const Display = { 40 Flex: 0, 41 None: 1, 42 Contents: 2, 43} as const 44export type Display = (typeof Display)[keyof typeof Display] 45 46export const Edge = { 47 Left: 0, 48 Top: 1, 49 Right: 2, 50 Bottom: 3, 51 Start: 4, 52 End: 5, 53 Horizontal: 6, 54 Vertical: 7, 55 All: 8, 56} as const 57export type Edge = (typeof Edge)[keyof typeof Edge] 58 59export const Errata = { 60 None: 0, 61 StretchFlexBasis: 1, 62 AbsolutePositionWithoutInsetsExcludesPadding: 2, 63 AbsolutePercentAgainstInnerSize: 4, 64 All: 2147483647, 65 Classic: 2147483646, 66} as const 67export type Errata = (typeof Errata)[keyof typeof Errata] 68 69export const ExperimentalFeature = { 70 WebFlexBasis: 0, 71} as const 72export type ExperimentalFeature = 73 (typeof ExperimentalFeature)[keyof typeof ExperimentalFeature] 74 75export const FlexDirection = { 76 Column: 0, 77 ColumnReverse: 1, 78 Row: 2, 79 RowReverse: 3, 80} as const 81export type FlexDirection = (typeof FlexDirection)[keyof typeof FlexDirection] 82 83export const Gutter = { 84 Column: 0, 85 Row: 1, 86 All: 2, 87} as const 88export type Gutter = (typeof Gutter)[keyof typeof Gutter] 89 90export const Justify = { 91 FlexStart: 0, 92 Center: 1, 93 FlexEnd: 2, 94 SpaceBetween: 3, 95 SpaceAround: 4, 96 SpaceEvenly: 5, 97} as const 98export type Justify = (typeof Justify)[keyof typeof Justify] 99 100export const MeasureMode = { 101 Undefined: 0, 102 Exactly: 1, 103 AtMost: 2, 104} as const 105export type MeasureMode = (typeof MeasureMode)[keyof typeof MeasureMode] 106 107export const Overflow = { 108 Visible: 0, 109 Hidden: 1, 110 Scroll: 2, 111} as const 112export type Overflow = (typeof Overflow)[keyof typeof Overflow] 113 114export const PositionType = { 115 Static: 0, 116 Relative: 1, 117 Absolute: 2, 118} as const 119export type PositionType = (typeof PositionType)[keyof typeof PositionType] 120 121export const Unit = { 122 Undefined: 0, 123 Point: 1, 124 Percent: 2, 125 Auto: 3, 126} as const 127export type Unit = (typeof Unit)[keyof typeof Unit] 128 129export const Wrap = { 130 NoWrap: 0, 131 Wrap: 1, 132 WrapReverse: 2, 133} as const 134export type Wrap = (typeof Wrap)[keyof typeof Wrap]