2017-01-04 04:33:39 -08:00
|
|
|
/**
|
2022-09-29 22:25:24 -07:00
|
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
2017-01-04 04:33:39 -08:00
|
|
|
*
|
2018-02-16 18:24:55 -08:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2017-01-04 04:33:39 -08:00
|
|
|
*/
|
|
|
|
|
2022-09-29 22:25:24 -07:00
|
|
|
// @generated by enums.py
|
|
|
|
|
|
|
|
// @flow
|
|
|
|
// @format
|
2018-01-18 07:55:50 -08:00
|
|
|
const CONSTANTS = {
|
2017-02-11 08:32:48 -08:00
|
|
|
ALIGN_COUNT: 8,
|
2017-02-03 04:21:50 -08:00
|
|
|
ALIGN_AUTO: 0,
|
|
|
|
ALIGN_FLEX_START: 1,
|
|
|
|
ALIGN_CENTER: 2,
|
|
|
|
ALIGN_FLEX_END: 3,
|
|
|
|
ALIGN_STRETCH: 4,
|
|
|
|
ALIGN_BASELINE: 5,
|
2017-02-11 08:32:48 -08:00
|
|
|
ALIGN_SPACE_BETWEEN: 6,
|
|
|
|
ALIGN_SPACE_AROUND: 7,
|
2017-01-04 04:33:39 -08:00
|
|
|
|
2017-02-03 04:21:50 -08:00
|
|
|
DIMENSION_COUNT: 2,
|
|
|
|
DIMENSION_WIDTH: 0,
|
|
|
|
DIMENSION_HEIGHT: 1,
|
2017-01-04 04:33:39 -08:00
|
|
|
|
2017-02-03 04:21:50 -08:00
|
|
|
DIRECTION_COUNT: 3,
|
|
|
|
DIRECTION_INHERIT: 0,
|
|
|
|
DIRECTION_LTR: 1,
|
|
|
|
DIRECTION_RTL: 2,
|
2017-01-04 04:33:39 -08:00
|
|
|
|
2017-02-06 09:31:22 -08:00
|
|
|
DISPLAY_COUNT: 2,
|
|
|
|
DISPLAY_FLEX: 0,
|
|
|
|
DISPLAY_NONE: 1,
|
|
|
|
|
2017-01-04 04:33:39 -08:00
|
|
|
EDGE_COUNT: 9,
|
|
|
|
EDGE_LEFT: 0,
|
|
|
|
EDGE_TOP: 1,
|
|
|
|
EDGE_RIGHT: 2,
|
|
|
|
EDGE_BOTTOM: 3,
|
|
|
|
EDGE_START: 4,
|
|
|
|
EDGE_END: 5,
|
|
|
|
EDGE_HORIZONTAL: 6,
|
|
|
|
EDGE_VERTICAL: 7,
|
|
|
|
EDGE_ALL: 8,
|
|
|
|
|
2017-04-28 06:13:51 -07:00
|
|
|
EXPERIMENTAL_FEATURE_COUNT: 1,
|
2017-04-27 07:09:24 -07:00
|
|
|
EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS: 0,
|
2017-01-04 04:33:39 -08:00
|
|
|
|
2017-02-03 04:21:50 -08:00
|
|
|
FLEX_DIRECTION_COUNT: 4,
|
|
|
|
FLEX_DIRECTION_COLUMN: 0,
|
|
|
|
FLEX_DIRECTION_COLUMN_REVERSE: 1,
|
|
|
|
FLEX_DIRECTION_ROW: 2,
|
|
|
|
FLEX_DIRECTION_ROW_REVERSE: 3,
|
2017-01-04 04:33:39 -08:00
|
|
|
|
Add YGGutter Enum
Summary:
This adds the YGGutter enum, used to choose between row/column gap variants (row-gap, column-gap, gap).
This used later in changes from https://github.com/facebook/yoga/pull/1116, in the APIs which deal with setting gap on style on yoga node.
Note the original PR called this `YGGap`, but this ending up leading to a couple public method signatures that could appear ambiguous:
1. `SetGap(YGGap gap, float gapLength)`: Enums like `YGAlign` are the vaues for an `align` prop. `YGGap` controls the variant of the gap (like `YGEdge` does for left/right/top/bottom variants). So the enum reads as if it is the `gapValue`, and it looks like we have two of the same parameter.
2. `SetGap(YGGap gapDirection, float gap)`: This is misleading, because the direction gaps flow is the cross-axis of flex-direction.
3. `GetGap(YGGap gap)`: `gap` is the variant, but looks like an out param.
The [CSS Box Alignment](https://www.w3.org/TR/css-align-3/#column-row-gap) spec refers to these gaps as "Gutters", which removes the ambiguity.
Changelog:
[General][Added] - Add YGGutter Enum
Reviewed By: yungsters
Differential Revision: D39922412
fbshipit-source-id: 4b0baf800fecb3d03560a4267c7fb4c4330fd39e
2022-09-29 22:25:24 -07:00
|
|
|
GUTTER_COUNT: 3,
|
|
|
|
GUTTER_COLUMN: 0,
|
|
|
|
GUTTER_ROW: 1,
|
|
|
|
GUTTER_ALL: 2,
|
|
|
|
|
2017-11-27 03:40:01 -08:00
|
|
|
JUSTIFY_COUNT: 6,
|
2017-01-04 04:33:39 -08:00
|
|
|
JUSTIFY_FLEX_START: 0,
|
|
|
|
JUSTIFY_CENTER: 1,
|
|
|
|
JUSTIFY_FLEX_END: 2,
|
|
|
|
JUSTIFY_SPACE_BETWEEN: 3,
|
|
|
|
JUSTIFY_SPACE_AROUND: 4,
|
2017-11-27 03:40:01 -08:00
|
|
|
JUSTIFY_SPACE_EVENLY: 5,
|
2017-01-04 04:33:39 -08:00
|
|
|
|
2017-05-03 09:22:35 -07:00
|
|
|
LOG_LEVEL_COUNT: 6,
|
2017-01-04 04:33:39 -08:00
|
|
|
LOG_LEVEL_ERROR: 0,
|
|
|
|
LOG_LEVEL_WARN: 1,
|
|
|
|
LOG_LEVEL_INFO: 2,
|
|
|
|
LOG_LEVEL_DEBUG: 3,
|
|
|
|
LOG_LEVEL_VERBOSE: 4,
|
2017-05-03 09:22:35 -07:00
|
|
|
LOG_LEVEL_FATAL: 5,
|
2017-01-04 04:33:39 -08:00
|
|
|
|
2017-02-03 04:21:50 -08:00
|
|
|
MEASURE_MODE_COUNT: 3,
|
|
|
|
MEASURE_MODE_UNDEFINED: 0,
|
|
|
|
MEASURE_MODE_EXACTLY: 1,
|
|
|
|
MEASURE_MODE_AT_MOST: 2,
|
2017-01-04 04:33:39 -08:00
|
|
|
|
2017-05-11 08:09:30 -07:00
|
|
|
NODE_TYPE_COUNT: 2,
|
|
|
|
NODE_TYPE_DEFAULT: 0,
|
|
|
|
NODE_TYPE_TEXT: 1,
|
|
|
|
|
2017-01-04 04:33:39 -08:00
|
|
|
OVERFLOW_COUNT: 3,
|
|
|
|
OVERFLOW_VISIBLE: 0,
|
|
|
|
OVERFLOW_HIDDEN: 1,
|
|
|
|
OVERFLOW_SCROLL: 2,
|
|
|
|
|
2022-09-29 22:25:24 -07:00
|
|
|
POSITION_TYPE_COUNT: 3,
|
|
|
|
POSITION_TYPE_STATIC: 0,
|
|
|
|
POSITION_TYPE_RELATIVE: 1,
|
|
|
|
POSITION_TYPE_ABSOLUTE: 2,
|
2017-01-04 04:33:39 -08:00
|
|
|
|
2017-02-03 04:21:50 -08:00
|
|
|
PRINT_OPTIONS_COUNT: 3,
|
|
|
|
PRINT_OPTIONS_LAYOUT: 1,
|
|
|
|
PRINT_OPTIONS_STYLE: 2,
|
|
|
|
PRINT_OPTIONS_CHILDREN: 4,
|
2017-01-04 04:33:39 -08:00
|
|
|
|
2017-02-14 14:26:09 -08:00
|
|
|
UNIT_COUNT: 4,
|
2017-01-04 04:33:39 -08:00
|
|
|
UNIT_UNDEFINED: 0,
|
2017-02-14 14:26:13 -08:00
|
|
|
UNIT_POINT: 1,
|
2017-01-04 04:33:39 -08:00
|
|
|
UNIT_PERCENT: 2,
|
2017-02-14 14:26:09 -08:00
|
|
|
UNIT_AUTO: 3,
|
2017-01-04 04:33:39 -08:00
|
|
|
|
2017-02-15 13:35:24 -08:00
|
|
|
WRAP_COUNT: 3,
|
2017-02-03 04:21:50 -08:00
|
|
|
WRAP_NO_WRAP: 0,
|
|
|
|
WRAP_WRAP: 1,
|
2017-02-15 13:35:24 -08:00
|
|
|
WRAP_WRAP_REVERSE: 2,
|
2017-01-04 04:33:39 -08:00
|
|
|
};
|
2018-01-18 07:55:50 -08:00
|
|
|
export type Yoga$Align =
|
|
|
|
| typeof CONSTANTS.ALIGN_AUTO
|
2022-09-29 22:25:24 -07:00
|
|
|
| typeof CONSTANTS.ALIGN_FLEX_START
|
2018-01-18 07:55:50 -08:00
|
|
|
| typeof CONSTANTS.ALIGN_CENTER
|
|
|
|
| typeof CONSTANTS.ALIGN_FLEX_END
|
2022-09-29 22:25:24 -07:00
|
|
|
| typeof CONSTANTS.ALIGN_STRETCH
|
|
|
|
| typeof CONSTANTS.ALIGN_BASELINE
|
2018-01-18 07:55:50 -08:00
|
|
|
| typeof CONSTANTS.ALIGN_SPACE_BETWEEN
|
2022-09-29 22:25:24 -07:00
|
|
|
| typeof CONSTANTS.ALIGN_SPACE_AROUND;
|
2018-01-18 07:55:50 -08:00
|
|
|
|
2022-09-29 22:25:24 -07:00
|
|
|
export type Yoga$Dimension =
|
|
|
|
| typeof CONSTANTS.DIMENSION_WIDTH
|
|
|
|
| typeof CONSTANTS.DIMENSION_HEIGHT;
|
2018-01-18 07:55:50 -08:00
|
|
|
|
|
|
|
export type Yoga$Direction =
|
|
|
|
| typeof CONSTANTS.DIRECTION_INHERIT
|
|
|
|
| typeof CONSTANTS.DIRECTION_LTR
|
|
|
|
| typeof CONSTANTS.DIRECTION_RTL;
|
|
|
|
|
2022-09-29 22:25:24 -07:00
|
|
|
export type Yoga$Display =
|
|
|
|
| typeof CONSTANTS.DISPLAY_FLEX
|
|
|
|
| typeof CONSTANTS.DISPLAY_NONE;
|
2018-01-18 07:55:50 -08:00
|
|
|
|
|
|
|
export type Yoga$Edge =
|
|
|
|
| typeof CONSTANTS.EDGE_LEFT
|
|
|
|
| typeof CONSTANTS.EDGE_TOP
|
|
|
|
| typeof CONSTANTS.EDGE_RIGHT
|
|
|
|
| typeof CONSTANTS.EDGE_BOTTOM
|
|
|
|
| typeof CONSTANTS.EDGE_START
|
|
|
|
| typeof CONSTANTS.EDGE_END
|
|
|
|
| typeof CONSTANTS.EDGE_HORIZONTAL
|
|
|
|
| typeof CONSTANTS.EDGE_VERTICAL
|
|
|
|
| typeof CONSTANTS.EDGE_ALL;
|
|
|
|
|
2022-09-29 22:25:24 -07:00
|
|
|
export type Yoga$ExperimentalFeature =
|
|
|
|
| typeof CONSTANTS.EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS;
|
2018-01-18 07:55:50 -08:00
|
|
|
|
2022-09-29 22:25:24 -07:00
|
|
|
export type Yoga$FlexDirection =
|
|
|
|
| typeof CONSTANTS.FLEX_DIRECTION_COLUMN
|
|
|
|
| typeof CONSTANTS.FLEX_DIRECTION_COLUMN_REVERSE
|
|
|
|
| typeof CONSTANTS.FLEX_DIRECTION_ROW
|
|
|
|
| typeof CONSTANTS.FLEX_DIRECTION_ROW_REVERSE;
|
|
|
|
|
Add YGGutter Enum
Summary:
This adds the YGGutter enum, used to choose between row/column gap variants (row-gap, column-gap, gap).
This used later in changes from https://github.com/facebook/yoga/pull/1116, in the APIs which deal with setting gap on style on yoga node.
Note the original PR called this `YGGap`, but this ending up leading to a couple public method signatures that could appear ambiguous:
1. `SetGap(YGGap gap, float gapLength)`: Enums like `YGAlign` are the vaues for an `align` prop. `YGGap` controls the variant of the gap (like `YGEdge` does for left/right/top/bottom variants). So the enum reads as if it is the `gapValue`, and it looks like we have two of the same parameter.
2. `SetGap(YGGap gapDirection, float gap)`: This is misleading, because the direction gaps flow is the cross-axis of flex-direction.
3. `GetGap(YGGap gap)`: `gap` is the variant, but looks like an out param.
The [CSS Box Alignment](https://www.w3.org/TR/css-align-3/#column-row-gap) spec refers to these gaps as "Gutters", which removes the ambiguity.
Changelog:
[General][Added] - Add YGGutter Enum
Reviewed By: yungsters
Differential Revision: D39922412
fbshipit-source-id: 4b0baf800fecb3d03560a4267c7fb4c4330fd39e
2022-09-29 22:25:24 -07:00
|
|
|
export type Yoga$Gutter =
|
|
|
|
| typeof CONSTANTS.GUTTER_COLUMN
|
|
|
|
| typeof CONSTANTS.GUTTER_ROW
|
|
|
|
| typeof CONSTANTS.GUTTER_ALL;
|
|
|
|
|
2022-09-29 22:25:24 -07:00
|
|
|
export type Yoga$Justify =
|
|
|
|
| typeof CONSTANTS.JUSTIFY_FLEX_START
|
|
|
|
| typeof CONSTANTS.JUSTIFY_CENTER
|
|
|
|
| typeof CONSTANTS.JUSTIFY_FLEX_END
|
|
|
|
| typeof CONSTANTS.JUSTIFY_SPACE_BETWEEN
|
|
|
|
| typeof CONSTANTS.JUSTIFY_SPACE_AROUND
|
|
|
|
| typeof CONSTANTS.JUSTIFY_SPACE_EVENLY;
|
|
|
|
|
|
|
|
export type Yoga$LogLevel =
|
|
|
|
| typeof CONSTANTS.LOG_LEVEL_ERROR
|
|
|
|
| typeof CONSTANTS.LOG_LEVEL_WARN
|
|
|
|
| typeof CONSTANTS.LOG_LEVEL_INFO
|
|
|
|
| typeof CONSTANTS.LOG_LEVEL_DEBUG
|
|
|
|
| typeof CONSTANTS.LOG_LEVEL_VERBOSE
|
|
|
|
| typeof CONSTANTS.LOG_LEVEL_FATAL;
|
|
|
|
|
|
|
|
export type Yoga$MeasureMode =
|
|
|
|
| typeof CONSTANTS.MEASURE_MODE_UNDEFINED
|
|
|
|
| typeof CONSTANTS.MEASURE_MODE_EXACTLY
|
|
|
|
| typeof CONSTANTS.MEASURE_MODE_AT_MOST;
|
|
|
|
|
|
|
|
export type Yoga$NodeType =
|
|
|
|
| typeof CONSTANTS.NODE_TYPE_DEFAULT
|
|
|
|
| typeof CONSTANTS.NODE_TYPE_TEXT;
|
2018-01-18 07:55:50 -08:00
|
|
|
|
|
|
|
export type Yoga$Overflow =
|
2022-09-29 22:25:24 -07:00
|
|
|
| typeof CONSTANTS.OVERFLOW_VISIBLE
|
2018-01-18 07:55:50 -08:00
|
|
|
| typeof CONSTANTS.OVERFLOW_HIDDEN
|
2022-09-29 22:25:24 -07:00
|
|
|
| typeof CONSTANTS.OVERFLOW_SCROLL;
|
2018-01-18 07:55:50 -08:00
|
|
|
|
|
|
|
export type Yoga$PositionType =
|
2022-09-29 22:25:24 -07:00
|
|
|
| typeof CONSTANTS.POSITION_TYPE_STATIC
|
|
|
|
| typeof CONSTANTS.POSITION_TYPE_RELATIVE
|
|
|
|
| typeof CONSTANTS.POSITION_TYPE_ABSOLUTE;
|
|
|
|
|
|
|
|
export type Yoga$PrintOptions =
|
|
|
|
| typeof CONSTANTS.PRINT_OPTIONS_LAYOUT
|
|
|
|
| typeof CONSTANTS.PRINT_OPTIONS_STYLE
|
|
|
|
| typeof CONSTANTS.PRINT_OPTIONS_CHILDREN;
|
2018-01-18 07:55:50 -08:00
|
|
|
|
2022-09-29 22:25:24 -07:00
|
|
|
export type Yoga$Unit =
|
|
|
|
| typeof CONSTANTS.UNIT_UNDEFINED
|
|
|
|
| typeof CONSTANTS.UNIT_POINT
|
|
|
|
| typeof CONSTANTS.UNIT_PERCENT
|
|
|
|
| typeof CONSTANTS.UNIT_AUTO;
|
|
|
|
|
|
|
|
export type Yoga$Wrap =
|
|
|
|
| typeof CONSTANTS.WRAP_NO_WRAP
|
|
|
|
| typeof CONSTANTS.WRAP_WRAP
|
|
|
|
| typeof CONSTANTS.WRAP_WRAP_REVERSE;
|
2018-01-18 07:55:50 -08:00
|
|
|
|
2018-01-19 11:25:26 -08:00
|
|
|
module.exports = CONSTANTS;
|