@gluestack-style/animation-resolver
Advanced tools
Comparing version 1.0.3-alpha.0 to 1.0.3-alpha.1
@@ -155,3 +155,2 @@ "use strict"; | ||
Component.isAnimatedComponent)) { | ||
// this.#childrenExitPropsMap = deepClone(styledObj); | ||
const resolvedAnimatedProps = this.updateStyledObject(styledObj, shouldUpdateConfig, ignoreKeys); | ||
@@ -187,3 +186,3 @@ const resolvedStyledObjectWithAnimatedProps = (0, _utils.deepMerge)(styledObj, resolvedAnimatedProps); | ||
(0, _utils.setObjectKeyValue)(this.#childrenExitPropsMap, [...keyPath, prop], styledObject[prop]); | ||
this.#childrenExitPropsMap = (0, _utils.setObjectKeyValue)(this.#childrenExitPropsMap, [...keyPath, prop], styledObject[prop]); | ||
} | ||
@@ -228,4 +227,4 @@ const value = styledObject[prop]; | ||
Component.isAnimatedComponent)) { | ||
var _Component$displayNam3; | ||
let AnimatedComponent = this.componentDriver.engine[// @ts-ignore | ||
var _this$componentDriver, _Component$displayNam3; | ||
let AnimatedComponent = this === null || this === void 0 || (_this$componentDriver = this.componentDriver) === null || _this$componentDriver === void 0 ? void 0 : _this$componentDriver.engine[// @ts-ignore | ||
(_Component$displayNam3 = Component.displayName) === null || _Component$displayNam3 === void 0 ? void 0 : _Component$displayNam3.replace('Gluestack-AnimatedResolver-Animated', '')]; | ||
@@ -239,3 +238,5 @@ if (AnimatedComponent) { | ||
const styledConfig = this.#childrenExitPropsMap; | ||
this.#childrenExitPropsMap = {}; | ||
// this.#childrenExitPropsMap = {}; | ||
const NewComponent = /*#__PURE__*/_react.default.forwardRef((props, ref) => { | ||
@@ -275,3 +276,3 @@ var _this$config6; | ||
// @ts-ignore | ||
const [resolvedAnimatedStyledWithStyledObject,,,] = this.inputMiddleWare(mergedAnimatedProps, true, false, Component); | ||
const [resolvedAnimatedStyledWithStyledObject,,,] = this.inputMiddleWare(mergedAnimatedProps, false, false, Component); | ||
let isState = false; | ||
@@ -283,3 +284,6 @@ Object.keys((restProps === null || restProps === void 0 ? void 0 : restProps.states) ?? {}).forEach(state => { | ||
resolvedAnimatedStyledWithStyledObject === null || resolvedAnimatedStyledWithStyledObject === void 0 ? void 0 : resolvedAnimatedStyledWithStyledObject.props : {}; | ||
return /*#__PURE__*/_react.default.createElement(AnimatedComponent, _extends({}, rest, animatedProps, { | ||
const propsTobeApplied = (0, _utils.deepMerge)(rest, { | ||
...animatedProps | ||
}); | ||
return /*#__PURE__*/_react.default.createElement(AnimatedComponent, _extends({}, propsTobeApplied, { | ||
ref: ref | ||
@@ -289,3 +293,3 @@ })); | ||
if (NewComponent) { | ||
var _Component$styled, _AnimatedComponent, _AnimatedComponent2, _AnimatedComponent3; | ||
var _Component$styled; | ||
//@ts-ignore | ||
@@ -299,14 +303,13 @@ NewComponent.styled = {}; | ||
...(Component === null || Component === void 0 || (_Component$styled = Component.styled) === null || _Component$styled === void 0 ? void 0 : _Component$styled.config), | ||
...styledConfig | ||
...this.#childrenExitPropsMap | ||
}; | ||
//@ts-ignore | ||
NewComponent.isStyledComponent = (_AnimatedComponent = AnimatedComponent) === null || _AnimatedComponent === void 0 ? void 0 : _AnimatedComponent.isStyledComponent; | ||
NewComponent.isStyledComponent = Component === null || Component === void 0 ? void 0 : Component.isStyledComponent; | ||
//@ts-ignore | ||
NewComponent.isComposedComponent = (_AnimatedComponent2 = AnimatedComponent) === null || _AnimatedComponent2 === void 0 ? void 0 : _AnimatedComponent2.isComposedComponent; | ||
NewComponent.displayName = (_AnimatedComponent3 = AnimatedComponent) === null || _AnimatedComponent3 === void 0 ? void 0 : _AnimatedComponent3.displayName; | ||
NewComponent.isComposedComponent = Component === null || Component === void 0 ? void 0 : Component.isComposedComponent; | ||
NewComponent.displayName = Component === null || Component === void 0 ? void 0 : Component.displayName; | ||
return NewComponent; | ||
} | ||
} else { | ||
return Component; | ||
} | ||
return Component; | ||
} | ||
@@ -313,0 +316,0 @@ } |
@@ -132,3 +132,2 @@ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
Component.isAnimatedComponent)) { | ||
// this.#childrenExitPropsMap = deepClone(styledObj); | ||
const resolvedAnimatedProps = this.updateStyledObject(styledObj, shouldUpdateConfig, ignoreKeys); | ||
@@ -164,3 +163,3 @@ const resolvedStyledObjectWithAnimatedProps = deepMerge(styledObj, resolvedAnimatedProps); | ||
setObjectKeyValue(this.#childrenExitPropsMap, [...keyPath, prop], styledObject[prop]); | ||
this.#childrenExitPropsMap = setObjectKeyValue(this.#childrenExitPropsMap, [...keyPath, prop], styledObject[prop]); | ||
} | ||
@@ -205,4 +204,4 @@ const value = styledObject[prop]; | ||
Component.isAnimatedComponent)) { | ||
var _Component$displayNam3; | ||
let AnimatedComponent = this.componentDriver.engine[// @ts-ignore | ||
var _this$componentDriver, _Component$displayNam3; | ||
let AnimatedComponent = this === null || this === void 0 || (_this$componentDriver = this.componentDriver) === null || _this$componentDriver === void 0 ? void 0 : _this$componentDriver.engine[// @ts-ignore | ||
(_Component$displayNam3 = Component.displayName) === null || _Component$displayNam3 === void 0 ? void 0 : _Component$displayNam3.replace('Gluestack-AnimatedResolver-Animated', '')]; | ||
@@ -216,3 +215,5 @@ if (AnimatedComponent) { | ||
const styledConfig = this.#childrenExitPropsMap; | ||
this.#childrenExitPropsMap = {}; | ||
// this.#childrenExitPropsMap = {}; | ||
const NewComponent = /*#__PURE__*/React.forwardRef((props, ref) => { | ||
@@ -252,3 +253,3 @@ var _this$config6; | ||
// @ts-ignore | ||
const [resolvedAnimatedStyledWithStyledObject,,,] = this.inputMiddleWare(mergedAnimatedProps, true, false, Component); | ||
const [resolvedAnimatedStyledWithStyledObject,,,] = this.inputMiddleWare(mergedAnimatedProps, false, false, Component); | ||
let isState = false; | ||
@@ -260,3 +261,6 @@ Object.keys((restProps === null || restProps === void 0 ? void 0 : restProps.states) ?? {}).forEach(state => { | ||
resolvedAnimatedStyledWithStyledObject === null || resolvedAnimatedStyledWithStyledObject === void 0 ? void 0 : resolvedAnimatedStyledWithStyledObject.props : {}; | ||
return /*#__PURE__*/React.createElement(AnimatedComponent, _extends({}, rest, animatedProps, { | ||
const propsTobeApplied = deepMerge(rest, { | ||
...animatedProps | ||
}); | ||
return /*#__PURE__*/React.createElement(AnimatedComponent, _extends({}, propsTobeApplied, { | ||
ref: ref | ||
@@ -266,3 +270,3 @@ })); | ||
if (NewComponent) { | ||
var _Component$styled, _AnimatedComponent, _AnimatedComponent2, _AnimatedComponent3; | ||
var _Component$styled; | ||
//@ts-ignore | ||
@@ -276,14 +280,13 @@ NewComponent.styled = {}; | ||
...(Component === null || Component === void 0 || (_Component$styled = Component.styled) === null || _Component$styled === void 0 ? void 0 : _Component$styled.config), | ||
...styledConfig | ||
...this.#childrenExitPropsMap | ||
}; | ||
//@ts-ignore | ||
NewComponent.isStyledComponent = (_AnimatedComponent = AnimatedComponent) === null || _AnimatedComponent === void 0 ? void 0 : _AnimatedComponent.isStyledComponent; | ||
NewComponent.isStyledComponent = Component === null || Component === void 0 ? void 0 : Component.isStyledComponent; | ||
//@ts-ignore | ||
NewComponent.isComposedComponent = (_AnimatedComponent2 = AnimatedComponent) === null || _AnimatedComponent2 === void 0 ? void 0 : _AnimatedComponent2.isComposedComponent; | ||
NewComponent.displayName = (_AnimatedComponent3 = AnimatedComponent) === null || _AnimatedComponent3 === void 0 ? void 0 : _AnimatedComponent3.displayName; | ||
NewComponent.isComposedComponent = Component === null || Component === void 0 ? void 0 : Component.isComposedComponent; | ||
NewComponent.displayName = Component === null || Component === void 0 ? void 0 : Component.displayName; | ||
return NewComponent; | ||
} | ||
} else { | ||
return Component; | ||
} | ||
return Component; | ||
} | ||
@@ -290,0 +293,0 @@ } |
{ | ||
"name": "@gluestack-style/animation-resolver", | ||
"version": "1.0.3-alpha.0", | ||
"version": "1.0.3-alpha.1", | ||
"description": "A gluestack-style plugin for resolving animation properties, utilizing animation libraries.", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
182116