v1.9.3
Summary: - fixes a but where `auto` was passed to properties that don't support auto as a value - fixes errors in flow typing - Re-adds accidentally removed scripts to package.json Reviewed By: emilsjolander, arcanis Differential Revision: D6999447 fbshipit-source-id: df66976c74c4af082a1ca0527e3e1ce54bdeb732
This commit is contained in:
committed by
Facebook Github Bot
parent
d617ab6662
commit
ae9703712a
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "yoga-layout",
|
"name": "yoga-layout",
|
||||||
"version": "1.9.0",
|
"version": "1.9.3",
|
||||||
"description": "Yoga is a cross-platform layout engine enabling maximum collaboration within your team by implementing an API many designers are familiar with, and opening it up to developers across different platforms.",
|
"description": "Yoga is a cross-platform layout engine enabling maximum collaboration within your team by implementing an API many designers are familiar with, and opening it up to developers across different platforms.",
|
||||||
"license": "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
"repository": {
|
"repository": {
|
||||||
@@ -13,6 +13,10 @@
|
|||||||
"platform": "all"
|
"platform": "all"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"which": "which",
|
||||||
|
"autogypi": "autogypi",
|
||||||
|
"node-gyp": "node-gyp",
|
||||||
|
"emcc-path": "emcc-path",
|
||||||
"is-monolithic": "test \"$(basename \"$(pwd)\")\" = javascript",
|
"is-monolithic": "test \"$(basename \"$(pwd)\")\" = javascript",
|
||||||
"copy-sources": "! npm -s run is-monolithic || (rsync -r --checksum --delete ../yoga/ sources/yoga/)",
|
"copy-sources": "! npm -s run is-monolithic || (rsync -r --checksum --delete ../yoga/ sources/yoga/)",
|
||||||
"build:node": "npm run copy-sources && autogypi && node-gyp configure build",
|
"build:node": "npm run copy-sources && autogypi && node-gyp configure build",
|
||||||
|
@@ -52,3 +52,5 @@ export type {
|
|||||||
Yoga$PositionType,
|
Yoga$PositionType,
|
||||||
Yoga$ExperimentalFeature,
|
Yoga$ExperimentalFeature,
|
||||||
} from './YGEnums.js';
|
} from './YGEnums.js';
|
||||||
|
|
||||||
|
export type {Yoga$Node, Yoga$Config} from './entry-common';
|
||||||
|
@@ -113,104 +113,105 @@ class Value {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
declare class Yoga$Config {
|
export type Yoga$Config = {
|
||||||
isExperimentalFeatureEnabled(feature: Yoga$ExperimentalFeature): boolean;
|
isExperimentalFeatureEnabled(feature: Yoga$ExperimentalFeature): boolean,
|
||||||
setExperimentalFeatureEnabled(
|
setExperimentalFeatureEnabled(
|
||||||
feature: Yoga$ExperimentalFeature,
|
feature: Yoga$ExperimentalFeature,
|
||||||
enabled: boolean,
|
enabled: boolean,
|
||||||
): void;
|
): void,
|
||||||
setPointScaleFactor(factor: number): void;
|
setPointScaleFactor(factor: number): void,
|
||||||
}
|
};
|
||||||
declare class Yoga$Node {
|
|
||||||
|
export type Yoga$Node = {
|
||||||
calculateLayout(
|
calculateLayout(
|
||||||
width?: number,
|
width?: number,
|
||||||
height?: number,
|
height?: number,
|
||||||
direction?: Yoga$Direction,
|
direction?: Yoga$Direction,
|
||||||
): void;
|
): void,
|
||||||
copyStyle(node: Yoga$Node): void;
|
copyStyle(node: Yoga$Node): void,
|
||||||
free(): void;
|
free(): void,
|
||||||
freeRecursive(): void;
|
freeRecursive(): void,
|
||||||
getAlignContent(): Yoga$Align;
|
getAlignContent(): Yoga$Align,
|
||||||
getAlignItems(): Yoga$Align;
|
getAlignItems(): Yoga$Align,
|
||||||
getAlignSelf(): Yoga$Align;
|
getAlignSelf(): Yoga$Align,
|
||||||
getAspectRatio(): number;
|
getAspectRatio(): number,
|
||||||
getBorder(edge: Yoga$Edge): number;
|
getBorder(edge: Yoga$Edge): number,
|
||||||
getChild(index: number): Yoga$Node;
|
getChild(index: number): Yoga$Node,
|
||||||
getChildCount(): number;
|
getChildCount(): number,
|
||||||
getComputedBorder(edge: Yoga$Edge): number;
|
getComputedBorder(edge: Yoga$Edge): number,
|
||||||
getComputedBottom(): number;
|
getComputedBottom(): number,
|
||||||
getComputedHeight(): number;
|
getComputedHeight(): number,
|
||||||
getComputedLayout(): Layout;
|
getComputedLayout(): Layout,
|
||||||
getComputedLeft(): number;
|
getComputedLeft(): number,
|
||||||
getComputedMargin(edge: Yoga$Edge): number;
|
getComputedMargin(edge: Yoga$Edge): number,
|
||||||
getComputedPadding(edge: Yoga$Edge): number;
|
getComputedPadding(edge: Yoga$Edge): number,
|
||||||
getComputedRight(): number;
|
getComputedRight(): number,
|
||||||
getComputedTop(): number;
|
getComputedTop(): number,
|
||||||
getComputedWidth(): number;
|
getComputedWidth(): number,
|
||||||
getDisplay(): Yoga$Display;
|
getDisplay(): Yoga$Display,
|
||||||
getFlexBasis(): number;
|
getFlexBasis(): number,
|
||||||
getFlexDirection(): Yoga$FlexDirection;
|
getFlexDirection(): Yoga$FlexDirection,
|
||||||
getFlexGrow(): number;
|
getFlexGrow(): number,
|
||||||
getFlexShrink(): number;
|
getFlexShrink(): number,
|
||||||
getFlexWrap(): Yoga$FlexWrap;
|
getFlexWrap(): Yoga$FlexWrap,
|
||||||
getHeight(): Value;
|
getHeight(): Value,
|
||||||
getJustifyContent(): Yoga$JustifyContent;
|
getJustifyContent(): Yoga$JustifyContent,
|
||||||
getMargin(edge: Yoga$Edge): Value;
|
getMargin(edge: Yoga$Edge): Value,
|
||||||
getMaxHeight(): Value;
|
getMaxHeight(): Value,
|
||||||
getMaxWidth(): Value;
|
getMaxWidth(): Value,
|
||||||
getMinHeight(): Value;
|
getMinHeight(): Value,
|
||||||
getMinWidth(): Value;
|
getMinWidth(): Value,
|
||||||
getOverflow(): Yoga$Overflow;
|
getOverflow(): Yoga$Overflow,
|
||||||
getPadding(edge: Yoga$Edge): Value;
|
getPadding(edge: Yoga$Edge): Value,
|
||||||
getParent(): ?Yoga$Node;
|
getParent(): ?Yoga$Node,
|
||||||
getPosition(edge: Yoga$Edge): Value;
|
getPosition(edge: Yoga$Edge): Value,
|
||||||
getPositionType(): Yoga$PositionType;
|
getPositionType(): Yoga$PositionType,
|
||||||
getWidth(): Value;
|
getWidth(): Value,
|
||||||
insertChild(child: Yoga$Node, index: number): void;
|
insertChild(child: Yoga$Node, index: number): void,
|
||||||
isDirty(): boolean;
|
isDirty(): boolean,
|
||||||
markDirty(): void;
|
markDirty(): void,
|
||||||
removeChild(child: Yoga$Node): void;
|
removeChild(child: Yoga$Node): void,
|
||||||
reset(): void;
|
reset(): void,
|
||||||
setAlignContent(alignContent: Yoga$Align): void;
|
setAlignContent(alignContent: Yoga$Align): void,
|
||||||
setAlignItems(alignItems: Yoga$Align): void;
|
setAlignItems(alignItems: Yoga$Align): void,
|
||||||
setAlignSelf(alignSelf: Yoga$Align): void;
|
setAlignSelf(alignSelf: Yoga$Align): void,
|
||||||
setAspectRatio(aspectRatio: number): void;
|
setAspectRatio(aspectRatio: number): void,
|
||||||
setBorder(edge: Yoga$Edge, borderWidth: number): void;
|
setBorder(edge: Yoga$Edge, borderWidth: number): void,
|
||||||
setDisplay(display: Yoga$Display): void;
|
setDisplay(display: Yoga$Display): void,
|
||||||
setFlex(flex: number): void;
|
setFlex(flex: number): void,
|
||||||
setFlexBasis(flexBasis: number | string): void;
|
setFlexBasis(flexBasis: number | string): void,
|
||||||
setFlexBasisPercent(flexBasis: number): void;
|
setFlexBasisPercent(flexBasis: number): void,
|
||||||
setFlexDirection(flexDirection: Yoga$FlexDirection): void;
|
setFlexDirection(flexDirection: Yoga$FlexDirection): void,
|
||||||
setFlexGrow(flexGrow: number): void;
|
setFlexGrow(flexGrow: number): void,
|
||||||
setFlexShrink(flexShrink: number): void;
|
setFlexShrink(flexShrink: number): void,
|
||||||
setFlexWrap(flexWrap: Yoga$FlexWrap): void;
|
setFlexWrap(flexWrap: Yoga$FlexWrap): void,
|
||||||
setHeight(height: number | string): void;
|
setHeight(height: number | string): void,
|
||||||
setHeightAuto(): void;
|
setHeightAuto(): void,
|
||||||
setHeightPercent(height: number): void;
|
setHeightPercent(height: number): void,
|
||||||
setJustifyContent(justifyContent: Yoga$JustifyContent): void;
|
setJustifyContent(justifyContent: Yoga$JustifyContent): void,
|
||||||
setMargin(edge: Yoga$Edge, margin: number): void;
|
setMargin(edge: Yoga$Edge, margin: number): void,
|
||||||
setMarginAuto(edge: Yoga$Edge): void;
|
setMarginAuto(edge: Yoga$Edge): void,
|
||||||
setMarginPercent(edge: Yoga$Edge, margin: number): void;
|
setMarginPercent(edge: Yoga$Edge, margin: number): void,
|
||||||
setMaxHeight(maxHeight: number | string): void;
|
setMaxHeight(maxHeight: number | string): void,
|
||||||
setMaxHeightPercent(maxHeight: number): void;
|
setMaxHeightPercent(maxHeight: number): void,
|
||||||
setMaxWidth(maxWidth: number | string): void;
|
setMaxWidth(maxWidth: number | string): void,
|
||||||
setMaxWidthPercent(maxWidth: number): void;
|
setMaxWidthPercent(maxWidth: number): void,
|
||||||
setMeasureFunc(measureFunc: ?Function): void;
|
setMeasureFunc(measureFunc: ?Function): void,
|
||||||
setMinHeight(minHeight: number | string): void;
|
setMinHeight(minHeight: number | string): void,
|
||||||
setMinHeightPercent(minHeight: number): void;
|
setMinHeightPercent(minHeight: number): void,
|
||||||
setMinWidth(minWidth: number | string): void;
|
setMinWidth(minWidth: number | string): void,
|
||||||
setMinWidthPercent(minWidth: number): void;
|
setMinWidthPercent(minWidth: number): void,
|
||||||
setOverflow(overflow: Yoga$Overflow): void;
|
setOverflow(overflow: Yoga$Overflow): void,
|
||||||
setPadding(edge: Yoga$Edge, padding: number | string): void;
|
setPadding(edge: Yoga$Edge, padding: number | string): void,
|
||||||
setPaddingPercent(edge: Yoga$Edge, padding: number): void;
|
setPaddingPercent(edge: Yoga$Edge, padding: number): void,
|
||||||
setPosition(edge: Yoga$Edge, position: number | string): void;
|
setPosition(edge: Yoga$Edge, position: number | string): void,
|
||||||
setPositionPercent(edge: Yoga$Edge, position: number): void;
|
setPositionPercent(edge: Yoga$Edge, position: number): void,
|
||||||
setPositionType(positionType: Yoga$PositionType): void;
|
setPositionType(positionType: Yoga$PositionType): void,
|
||||||
setWidth(width: number | string): void;
|
setWidth(width: number | string): void,
|
||||||
setWidthAuto(): void;
|
setWidthAuto(): void,
|
||||||
setWidthPercent(width: number): void;
|
setWidthPercent(width: number): void,
|
||||||
unsetMeasureFun(): void;
|
unsetMeasureFun(): void,
|
||||||
}
|
};
|
||||||
|
|
||||||
type Yoga = {
|
type Yoga = {
|
||||||
Config: {
|
Config: {
|
||||||
@@ -276,6 +277,9 @@ module.exports = (bind: any, lib: any): Yoga => {
|
|||||||
? CONSTANTS.UNIT_PERCENT
|
? CONSTANTS.UNIT_PERCENT
|
||||||
: CONSTANTS.UNIT_POINT;
|
: CONSTANTS.UNIT_POINT;
|
||||||
asNumber = parseFloat(value);
|
asNumber = parseFloat(value);
|
||||||
|
if (!Number.isNaN(value) && Number.isNaN(asNumber)) {
|
||||||
|
throw new Error(`Invalid value ${value} for ${fnName}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!methods[unit])
|
if (!methods[unit])
|
||||||
|
@@ -27,3 +27,5 @@ export type {
|
|||||||
Yoga$PositionType,
|
Yoga$PositionType,
|
||||||
Yoga$ExperimentalFeature,
|
Yoga$ExperimentalFeature,
|
||||||
} from './YGEnums.js';
|
} from './YGEnums.js';
|
||||||
|
|
||||||
|
export type {Yoga$Node, Yoga$Config} from './entry-common';
|
||||||
|
Reference in New Issue
Block a user