Summary: I wanna repeat the constants export in `yoga-wasm-web`, to achieve ```js import { ALIGN_CENTER } from "yoga-layout"; ``` And I failed. it is impossible because `rollup` and other tools can't transform commonjs `module.exports = { WHATEVER: 1 }` into ECMAScript modules. however, they can work with separate exports like `exports.WHATEVER = 1` and this PR transforms yoga constants into this convertible format This doesn't change anything for the yoga package, but it makes it possible to reexport constants without any modification and hacks, like this ```js export * from "./javascript/src_js/generated/YGEnums.js"; ``` [discussion in yoga-layout-wasm](https://github.com/shuding/yoga-wasm-web/pull/15) Pull Request resolved: https://github.com/facebook/yoga/pull/1229 Reviewed By: NickGerleman Differential Revision: D43437177 Pulled By: rshest fbshipit-source-id: bfe1404d1b48779f404e6510f2aafadd7fd4e774
93 lines
2.3 KiB
JavaScript
93 lines
2.3 KiB
JavaScript
/**
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
// @generated by enums.py
|
|
|
|
exports.ALIGN_AUTO = 0;
|
|
exports.ALIGN_FLEX_START = 1;
|
|
exports.ALIGN_CENTER = 2;
|
|
exports.ALIGN_FLEX_END = 3;
|
|
exports.ALIGN_STRETCH = 4;
|
|
exports.ALIGN_BASELINE = 5;
|
|
exports.ALIGN_SPACE_BETWEEN = 6;
|
|
exports.ALIGN_SPACE_AROUND = 7;
|
|
|
|
exports.DIMENSION_WIDTH = 0;
|
|
exports.DIMENSION_HEIGHT = 1;
|
|
|
|
exports.DIRECTION_INHERIT = 0;
|
|
exports.DIRECTION_LTR = 1;
|
|
exports.DIRECTION_RTL = 2;
|
|
|
|
exports.DISPLAY_FLEX = 0;
|
|
exports.DISPLAY_NONE = 1;
|
|
|
|
exports.EDGE_LEFT = 0;
|
|
exports.EDGE_TOP = 1;
|
|
exports.EDGE_RIGHT = 2;
|
|
exports.EDGE_BOTTOM = 3;
|
|
exports.EDGE_START = 4;
|
|
exports.EDGE_END = 5;
|
|
exports.EDGE_HORIZONTAL = 6;
|
|
exports.EDGE_VERTICAL = 7;
|
|
exports.EDGE_ALL = 8;
|
|
|
|
exports.EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS = 0;
|
|
exports.EXPERIMENTAL_FEATURE_ABSOLUTE_PERCENTAGE_AGAINST_PADDING_EDGE = 1;
|
|
exports.EXPERIMENTAL_FEATURE_FIX_ABSOLUTE_TRAILING_COLUMN_MARGIN = 2;
|
|
|
|
exports.FLEX_DIRECTION_COLUMN = 0;
|
|
exports.FLEX_DIRECTION_COLUMN_REVERSE = 1;
|
|
exports.FLEX_DIRECTION_ROW = 2;
|
|
exports.FLEX_DIRECTION_ROW_REVERSE = 3;
|
|
|
|
exports.GUTTER_COLUMN = 0;
|
|
exports.GUTTER_ROW = 1;
|
|
exports.GUTTER_ALL = 2;
|
|
|
|
exports.JUSTIFY_FLEX_START = 0;
|
|
exports.JUSTIFY_CENTER = 1;
|
|
exports.JUSTIFY_FLEX_END = 2;
|
|
exports.JUSTIFY_SPACE_BETWEEN = 3;
|
|
exports.JUSTIFY_SPACE_AROUND = 4;
|
|
exports.JUSTIFY_SPACE_EVENLY = 5;
|
|
|
|
exports.LOG_LEVEL_ERROR = 0;
|
|
exports.LOG_LEVEL_WARN = 1;
|
|
exports.LOG_LEVEL_INFO = 2;
|
|
exports.LOG_LEVEL_DEBUG = 3;
|
|
exports.LOG_LEVEL_VERBOSE = 4;
|
|
exports.LOG_LEVEL_FATAL = 5;
|
|
|
|
exports.MEASURE_MODE_UNDEFINED = 0;
|
|
exports.MEASURE_MODE_EXACTLY = 1;
|
|
exports.MEASURE_MODE_AT_MOST = 2;
|
|
|
|
exports.NODE_TYPE_DEFAULT = 0;
|
|
exports.NODE_TYPE_TEXT = 1;
|
|
|
|
exports.OVERFLOW_VISIBLE = 0;
|
|
exports.OVERFLOW_HIDDEN = 1;
|
|
exports.OVERFLOW_SCROLL = 2;
|
|
|
|
exports.POSITION_TYPE_STATIC = 0;
|
|
exports.POSITION_TYPE_RELATIVE = 1;
|
|
exports.POSITION_TYPE_ABSOLUTE = 2;
|
|
|
|
exports.PRINT_OPTIONS_LAYOUT = 1;
|
|
exports.PRINT_OPTIONS_STYLE = 2;
|
|
exports.PRINT_OPTIONS_CHILDREN = 4;
|
|
|
|
exports.UNIT_UNDEFINED = 0;
|
|
exports.UNIT_POINT = 1;
|
|
exports.UNIT_PERCENT = 2;
|
|
exports.UNIT_AUTO = 3;
|
|
|
|
exports.WRAP_NO_WRAP = 0;
|
|
exports.WRAP_WRAP = 1;
|
|
exports.WRAP_WRAP_REVERSE = 2;
|