{"code":"import * as tslib_1 from \"tslib\";\r\nimport React from 'react';\r\nimport Spring from 'simple-performant-harmonic-oscillator';\r\nimport { AUTO_PROPERTIES, RESIZE_PROPERTIES } from './helpers/domStyleProperties';\r\nimport getConfig from './helpers/getConfig';\r\nimport getUnits from './helpers/getUnits';\r\nimport handleForwardedRef from './helpers/handleForwardedRef';\r\nimport reconciler from './helpers/reconciler';\r\nimport { ChildRegisterContext } from './springyGroups/childRegisterContext';\r\nvar springyDOMMap = new Map();\r\nvar SpringyDOMElement = /** @class */ (function (_super) {\r\n    tslib_1.__extends(SpringyDOMElement, _super);\r\n    function SpringyDOMElement() {\r\n        var _this = _super !== null && _super.apply(this, arguments) || this;\r\n        _this._reconcileUpdate = { values: {} };\r\n        _this._ref = null;\r\n        _this._resizeObserver = null;\r\n        _this._isSecondRender = false;\r\n        _this._needsSecondRender = false;\r\n        _this._springMap = new Map();\r\n        _this._removalBlocked = false;\r\n        _this._transitionOutCloneElement = null;\r\n        return _this;\r\n    }\r\n    SpringyDOMElement.prototype.render = function () {\r\n        var _this = this;\r\n        var cleanProps = tslib_1.__assign({}, this.props);\r\n        delete cleanProps.forwardedRef;\r\n        delete cleanProps.ComponentToWrap;\r\n        delete cleanProps.configMap;\r\n        delete cleanProps.styleOnExit;\r\n        delete cleanProps.globalUniqueIDForSpringReuse;\r\n        delete cleanProps.onSpringyPropertyValueAtRest;\r\n        delete cleanProps.onSpringyPropertyValueUpdate;\r\n        delete cleanProps.springyOrderedIndex;\r\n        delete cleanProps.springyStyle;\r\n        delete cleanProps.instanceRef;\r\n        if (this.props.globalUniqueIDForSpringReuse) {\r\n            this._checkAndTakeOverExistingSpringyDOM(this.props.globalUniqueIDForSpringReuse);\r\n        }\r\n        this._processSpringyStyle();\r\n        var ComponentToWrap = this.props.ComponentToWrap;\r\n        return (React.createElement(ComponentToWrap, tslib_1.__assign({}, cleanProps, { ref: function (ref) {\r\n                _this._ref = ref;\r\n                handleForwardedRef(ref, _this.props.forwardedRef);\r\n                if (_this.props.instanceRef) {\r\n                    handleForwardedRef(_this, _this.props.instanceRef);\r\n                }\r\n            } }),\r\n            \" \",\r\n            this.props.children && (React.createElement(SecondRenderGuard, { isSecondRender: this._isSecondRender }, this.props.children))));\r\n    };\r\n    SpringyDOMElement.prototype.componentDidMount = function () {\r\n        if (this.context) {\r\n            this.context.registerChild(this);\r\n            if (this.props.springyOrderedIndex != null) {\r\n                this.context.registerChildIndex(this, this.props.springyOrderedIndex);\r\n            }\r\n        }\r\n        if (!this._isSecondRender && this._needsSecondRender) {\r\n            this._rerenderToUseTrueSize();\r\n        }\r\n    };\r\n    SpringyDOMElement.prototype.componentDidUpdate = function (prevProps) {\r\n        if (this.context) {\r\n            if (prevProps.springyOrderedIndex !== null && prevProps.springyOrderedIndex != this.props.springyOrderedIndex) {\r\n                this.context.unregisterChildIndex(this, prevProps.springyOrderedIndex);\r\n                if (this.props.springyOrderedIndex != null) {\r\n                    this.context.registerChildIndex(this, this.props.springyOrderedIndex);\r\n                }\r\n            }\r\n        }\r\n        if (!this._isSecondRender && this._needsSecondRender) {\r\n            this._rerenderToUseTrueSize();\r\n        }\r\n    };\r\n    SpringyDOMElement.prototype.componentWillUnmount = function () {\r\n        this._killResizeObserver();\r\n        this._handleOnExitIfExists();\r\n    };\r\n    SpringyDOMElement.prototype.blockRemoval = function () {\r\n        var _this = this;\r\n        this._removalBlocked = true;\r\n        return function () {\r\n            _this._removalBlocked = false;\r\n            if (_this._springMap.size === 0 && _this._transitionOutCloneElement) {\r\n                _this._transitionOutCloneElement.remove();\r\n                if (_this.props.globalUniqueIDForSpringReuse && springyDOMMap.get(_this.props.globalUniqueIDForSpringReuse) === _this) {\r\n                    springyDOMMap.delete(_this.props.globalUniqueIDForSpringReuse);\r\n                }\r\n            }\r\n        };\r\n    };\r\n    SpringyDOMElement.prototype.getSpringForProperty = function (property) {\r\n        return this._springMap.get(property);\r\n    };\r\n    SpringyDOMElement.prototype.isUnmounting = function () {\r\n        return Boolean(this._transitionOutCloneElement);\r\n    };\r\n    SpringyDOMElement.prototype.setSpringToValueForProperty = function (property, toValue, overridingFromValue, customValueMapper) {\r\n        this._setupOrUpdateSpringForProperty(property, toValue, overridingFromValue);\r\n        if (customValueMapper) {\r\n            var spring = this.getSpringForProperty(property);\r\n            if (!spring)\r\n                throw new Error('spring should have been created');\r\n            spring.setValueMapper(customValueMapper);\r\n        }\r\n    };\r\n    SpringyDOMElement.prototype.getDOMNode = function () {\r\n        return this._ref;\r\n    };\r\n    SpringyDOMElement.prototype._checkAndTakeOverExistingSpringyDOM = function (globalUniqueIDForSpringReuse) {\r\n        var e_1, _a;\r\n        var existingSpringyDOM = springyDOMMap.get(globalUniqueIDForSpringReuse);\r\n        if (existingSpringyDOM) {\r\n            var springMap = existingSpringyDOM._springMap;\r\n            if (springMap) {\r\n                try {\r\n                    for (var springMap_1 = tslib_1.__values(springMap), springMap_1_1 = springMap_1.next(); !springMap_1_1.done; springMap_1_1 = springMap_1.next()) {\r\n                        var _b = tslib_1.__read(springMap_1_1.value, 2), property = _b[0], spring = _b[1];\r\n                        var springClone = spring.clone();\r\n                        spring.end();\r\n                        this._listenToSpring(springClone, property);\r\n                    }\r\n                }\r\n                catch (e_1_1) { e_1 = { error: e_1_1 }; }\r\n                finally {\r\n                    try {\r\n                        if (springMap_1_1 && !springMap_1_1.done && (_a = springMap_1.return)) _a.call(springMap_1);\r\n                    }\r\n                    finally { if (e_1) throw e_1.error; }\r\n                }\r\n            }\r\n            if (existingSpringyDOM._transitionOutCloneElement)\r\n                existingSpringyDOM._transitionOutCloneElement.remove();\r\n        }\r\n        springyDOMMap.set(globalUniqueIDForSpringReuse, this);\r\n    };\r\n    SpringyDOMElement.prototype._processSpringyStyle = function () {\r\n        var springyStyle = this.props.springyStyle;\r\n        var configMap = this.props.configMap;\r\n        if (!springyStyle && !configMap) {\r\n            this._killResizeObserver();\r\n            return;\r\n        }\r\n        if (!springyStyle) {\r\n            springyStyle = {}; // we have a configMap, so we'll have an artificial springyStyle object\r\n            //put the springyStyle value for this property to the onEnterToValue\r\n            // we do this BEFORE th flipAutoPropsIfNecessary so that allows the config map\r\n            // to have \"auto\" as a onEnterToValue value\r\n            for (var property in configMap) {\r\n                if (configMap[property].onEnterToValue != null) {\r\n                    springyStyle[property] = configMap[property].onEnterToValue;\r\n                }\r\n                else if ((configMap[property].onEnterFromValue != null || configMap[property].onEnterFromValueOffset != null) &&\r\n                    AUTO_PROPERTIES.includes(property)) {\r\n                    springyStyle[property] = 'auto'; //default to auto\r\n                }\r\n            }\r\n        }\r\n        this._dealWithPotentialResizeObserver(springyStyle);\r\n        this._flipAutoPropsIfNecessary(springyStyle);\r\n        for (var property in springyStyle) {\r\n            this._setupOrUpdateSpringForProperty(property, springyStyle[property]);\r\n        }\r\n    };\r\n    SpringyDOMElement.prototype._flipAutoPropsIfNecessary = function (springyStyle) {\r\n        var propsThatAreSpringy = Object.keys(springyStyle);\r\n        var springyPropsThatCanBeAuto = propsThatAreSpringy.filter(function (property) { return AUTO_PROPERTIES.includes(property); });\r\n        if (springyPropsThatCanBeAuto.length === 0)\r\n            return;\r\n        var propsThatAreAuto = Object.keys(springyStyle)\r\n            .filter(function (property) {\r\n            return springyStyle[property] === 'auto' &&\r\n                springyPropsThatCanBeAuto.includes(property);\r\n        });\r\n        if (propsThatAreAuto.length === 0)\r\n            return;\r\n        if (!this._isSecondRender) {\r\n            this._needsSecondRender = true;\r\n            return;\r\n        }\r\n        if (!this._ref)\r\n            return;\r\n        // apply latest styles\r\n        reconciler(this._ref, tslib_1.__assign({}, this.props.style), springyStyle);\r\n        // get the computed styles and clean up\r\n        var computedStyle = getComputedStyle(this._ref);\r\n        propsThatAreAuto.forEach(function (property) {\r\n            springyStyle[property] = parseFloat(computedStyle.getPropertyValue(property)); //use target value for mutable prop\r\n        });\r\n    };\r\n    SpringyDOMElement.prototype._setupOrUpdateSpringForProperty = function (property, propValue, overridingFromValue) {\r\n        if (propValue == 'auto')\r\n            return;\r\n        var configMap = this.props.configMap;\r\n        var spring = this._springMap.get(property);\r\n        var toValue = propValue != null ?\r\n            propValue :\r\n            configMap && configMap[property] && configMap[property].onEnterToValue;\r\n        // we don't have a target toValue, then don't do anything\r\n        if (toValue == null || typeof toValue === 'string')\r\n            return null;\r\n        // spring has already been initialized and we're just updating values\r\n        if (spring != null) {\r\n            if (configMap) {\r\n                var config = getConfig(configMap[property], spring.getToValue(), toValue);\r\n                spring.setBounciness(config.bounciness);\r\n                spring.setSpeed(config.speed);\r\n            }\r\n            spring.setToValue(propValue);\r\n            if (overridingFromValue != null)\r\n                spring.setCurrentValue(overridingFromValue);\r\n        }\r\n        else {\r\n            var fromValue = overridingFromValue != null ? overridingFromValue : //if we have an overridingFromValue use that\r\n                configMap == null || configMap[property] == null ? propValue : // if we don't have a then use propValue\r\n                    configMap[property].onEnterFromValue != null ? configMap[property].onEnterFromValue : // if we have an onEnterFromValue use that\r\n                        configMap[property].onEnterFromValueOffset != null ? // if have an onEnterFromValueOffset use that\r\n                            propValue + configMap[property].onEnterFromValueOffset : propValue; // use propValue\r\n            spring = new Spring(configMap ? getConfig(configMap[property], fromValue, toValue) : {}, { fromValue: fromValue, toValue: toValue });\r\n            this._listenToSpring(spring, property);\r\n            if (fromValue === toValue) {\r\n                this._updateValueForProperty(property, toValue);\r\n            }\r\n        }\r\n    };\r\n    SpringyDOMElement.prototype._listenToSpring = function (spring, property) {\r\n        var _this = this;\r\n        spring.onUpdate(function (value) {\r\n            _this._updateValueForProperty(property, value);\r\n            if (_this.props.onSpringyPropertyValueUpdate)\r\n                _this.props.onSpringyPropertyValueUpdate(property, value);\r\n        });\r\n        spring.onAtRest(function (value) {\r\n            if (_this.props.onSpringyPropertyValueAtRest)\r\n                _this.props.onSpringyPropertyValueAtRest(property, value);\r\n        });\r\n        this._springMap.set(property, spring);\r\n    };\r\n    SpringyDOMElement.prototype._updateValueForProperty = function (property, value) {\r\n        var _this = this;\r\n        this._reconcileUpdate.values[property] = \"\" + value + getUnits(this.props.configMap, property);\r\n        if (!this._reconcileUpdate.scheduled) {\r\n            this._reconcileUpdate.scheduled = Promise.resolve().then(function () {\r\n                reconciler(_this._ref, tslib_1.__assign({}, _this.props.style), _this._reconcileUpdate.values);\r\n                _this._reconcileUpdate.scheduled = null;\r\n            });\r\n        }\r\n    };\r\n    SpringyDOMElement.prototype._dealWithPotentialResizeObserver = function (springyStyle) {\r\n        var _this = this;\r\n        if (!this._ref)\r\n            return;\r\n        var propsThatAreSpringy = Object.keys(springyStyle);\r\n        var springyPropsThatCanBeAuto = propsThatAreSpringy.filter(function (property) { return AUTO_PROPERTIES.includes(property); });\r\n        var resizableSpringyAutoProperties = springyPropsThatCanBeAuto.filter(function (property) { return RESIZE_PROPERTIES.includes(property); });\r\n        if (resizableSpringyAutoProperties.length === 0) {\r\n            this._killResizeObserver();\r\n            return;\r\n        }\r\n        if (this._resizeObserver) {\r\n            //we already have one\r\n            return;\r\n        }\r\n        if (window.ResizeObserver) {\r\n            this._resizeObserver = new window.ResizeObserver(function (entries) {\r\n                var springyStyle = _this.props.springyStyle;\r\n                var propsThatAreAutoAndResizable = Object.keys(springyStyle)\r\n                    .filter(function (property) {\r\n                    return springyStyle[property] === 'auto' &&\r\n                        RESIZE_PROPERTIES.includes(property);\r\n                });\r\n                if (propsThatAreAutoAndResizable.length > 0 && !_this._isSecondRender && !_this._needsSecondRender) {\r\n                    _this._rerenderToUseTrueSize();\r\n                }\r\n            });\r\n            this._resizeObserver.observe(this._ref);\r\n        }\r\n    };\r\n    SpringyDOMElement.prototype._rerenderToUseTrueSize = function () {\r\n        var _this = this;\r\n        this._isSecondRender = true;\r\n        this.forceUpdate(function () {\r\n            _this._needsSecondRender = false;\r\n            _this._isSecondRender = false;\r\n        });\r\n    };\r\n    SpringyDOMElement.prototype._killResizeObserver = function () {\r\n        if (this._resizeObserver) {\r\n            this._resizeObserver.disconnect();\r\n            this._resizeObserver = null;\r\n        }\r\n    };\r\n    SpringyDOMElement.prototype._handleOnExitIfExists = function () {\r\n        var _this = this;\r\n        var e_2, _a;\r\n        var configMap = this.props.configMap;\r\n        if (!configMap || !this._ref)\r\n            return;\r\n        var propertiesWithOnExitToValue = Object.keys(configMap).filter(function (property) { return configMap[property].onExitToValue != null; });\r\n        if (propertiesWithOnExitToValue.length === 0) {\r\n            this._cleanUpSprings();\r\n            return;\r\n        }\r\n        var lastStyle = tslib_1.__assign({}, this.props.style);\r\n        var clone = this._transitionOutCloneElement = this._ref.cloneNode(true); //true = deep clone\r\n        clone.style.pointerEvents = 'none';\r\n        this._ref.insertAdjacentElement('beforebegin', clone);\r\n        this._ref.remove();\r\n        var fromValues = {};\r\n        var propertiesWithOnExitFromValue = propertiesWithOnExitToValue.filter(function (property) { return configMap[property].onExitFromValue != null; });\r\n        var propertiesWithoutOnExitFromValue = propertiesWithOnExitToValue.filter(function (property) { return configMap[property].onExitFromValue == null; });\r\n        propertiesWithOnExitFromValue.forEach(function (property) {\r\n            fromValues[property] = configMap[property].onExitFromValue;\r\n        });\r\n        var computedStyle = getComputedStyle(clone);\r\n        //we set width and height to computed value because we're make make the element\r\n        // position absolute which may change height and width\r\n        clone.style.width = computedStyle.getPropertyValue('width');\r\n        clone.style.height = computedStyle.getPropertyValue('height');\r\n        if (this.props.styleOnExit) {\r\n            var styleOnExit = this.props.styleOnExit;\r\n            if (typeof styleOnExit === 'function') {\r\n                styleOnExit = styleOnExit(clone);\r\n            }\r\n            reconciler(clone, lastStyle, styleOnExit);\r\n        }\r\n        propertiesWithoutOnExitFromValue.forEach(function (property) {\r\n            fromValues[property] = parseFloat(computedStyle.getPropertyValue(property)); //use target value for mutable prop\r\n        });\r\n        clone.insertAdjacentElement('beforebegin', this._ref);\r\n        var existingUpdate = { values: {} };\r\n        var _loop_1 = function (property) {\r\n            var config = configMap[property];\r\n            var springConfig = getConfig(config, fromValues[property], config.onExitToValue);\r\n            var spring = new Spring(springConfig, { fromValue: fromValues[property], toValue: config.onExitToValue });\r\n            this_1._springMap.set(property, spring);\r\n            spring.onUpdate(function (value) {\r\n                existingUpdate.values[property] = \"\" + value + getUnits(configMap, property);\r\n                if (!existingUpdate.scheduled) {\r\n                    existingUpdate.scheduled = Promise.resolve().then(function () {\r\n                        reconciler(clone, lastStyle, existingUpdate.values);\r\n                        existingUpdate.scheduled = null;\r\n                    });\r\n                }\r\n            });\r\n            var cleanUp = function () {\r\n                _this._springMap.delete(property);\r\n                spring.end();\r\n                if (_this._springMap.size === 0) {\r\n                    if (!_this._removalBlocked) {\r\n                        clone.remove();\r\n                        if (_this.props.globalUniqueIDForSpringReuse && springyDOMMap.get(_this.props.globalUniqueIDForSpringReuse) === _this) {\r\n                            springyDOMMap.delete(_this.props.globalUniqueIDForSpringReuse);\r\n                        }\r\n                    }\r\n                    _this._cleanUpSprings();\r\n                }\r\n            };\r\n            spring.onAtRest(cleanUp);\r\n            spring.onEnd(cleanUp);\r\n        };\r\n        var this_1 = this;\r\n        try {\r\n            for (var propertiesWithOnExitToValue_1 = tslib_1.__values(propertiesWithOnExitToValue), propertiesWithOnExitToValue_1_1 = propertiesWithOnExitToValue_1.next(); !propertiesWithOnExitToValue_1_1.done; propertiesWithOnExitToValue_1_1 = propertiesWithOnExitToValue_1.next()) {\r\n                var property = propertiesWithOnExitToValue_1_1.value;\r\n                _loop_1(property);\r\n            }\r\n        }\r\n        catch (e_2_1) { e_2 = { error: e_2_1 }; }\r\n        finally {\r\n            try {\r\n                if (propertiesWithOnExitToValue_1_1 && !propertiesWithOnExitToValue_1_1.done && (_a = propertiesWithOnExitToValue_1.return)) _a.call(propertiesWithOnExitToValue_1);\r\n            }\r\n            finally { if (e_2) throw e_2.error; }\r\n        }\r\n    };\r\n    SpringyDOMElement.prototype._cleanUpSprings = function () {\r\n        var e_3, _a;\r\n        try {\r\n            for (var _b = tslib_1.__values(this._springMap.values()), _c = _b.next(); !_c.done; _c = _b.next()) {\r\n                var spring = _c.value;\r\n                spring.end();\r\n            }\r\n        }\r\n        catch (e_3_1) { e_3 = { error: e_3_1 }; }\r\n        finally {\r\n            try {\r\n                if (_c && !_c.done && (_a = _b.return)) _a.call(_b);\r\n            }\r\n            finally { if (e_3) throw e_3.error; }\r\n        }\r\n        this._springMap.clear();\r\n        if (this.context) {\r\n            this.context.unregisterChild(this);\r\n            if (this.props.springyOrderedIndex != null) {\r\n                this.context.unregisterChildIndex(this, this.props.springyOrderedIndex);\r\n            }\r\n        }\r\n    };\r\n    SpringyDOMElement.contextType = ChildRegisterContext;\r\n    return SpringyDOMElement;\r\n}(React.PureComponent));\r\nexport default SpringyDOMElement;\r\n/*\r\n   only render children on the first render\r\n*/\r\nvar SecondRenderGuard = /** @class */ (function (_super) {\r\n    tslib_1.__extends(SecondRenderGuard, _super);\r\n    function SecondRenderGuard() {\r\n        return _super !== null && _super.apply(this, arguments) || this;\r\n    }\r\n    SecondRenderGuard.prototype.shouldComponentUpdate = function (nextProps) {\r\n        return !nextProps.isSecondRender;\r\n    };\r\n    SecondRenderGuard.prototype.render = function () {\r\n        return this.props.children;\r\n    };\r\n    return SecondRenderGuard;\r\n}(React.Component));\r\n//# sourceMappingURL=SpringyDOMElement.js.map","map":"{\"version\":3,\"file\":\"SpringyDOMElement.js\",\"sourceRoot\":\"\",\"sources\":[\"../../../src/SpringyDOMElement.tsx\"],\"names\":[],\"mappings\":\";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,uCAAuC,CAAC;AAI3D,OAAO,EAAC,eAAe,EAAE,iBAAiB,EAAC,MAAM,8BAA8B,CAAC;AAChF,OAAO,SAAS,MAAM,qBAAqB,CAAC;AAC5C,OAAO,QAAQ,MAAM,oBAAoB,CAAC;AAC1C,OAAO,kBAAkB,MAAM,8BAA8B,CAAC;AAC9D,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAC,oBAAoB,EAAC,MAAM,sCAAsC,CAAC;AAS1E,IAAM,aAAa,GAAmC,IAAI,GAAG,EAAE,CAAC;AAEhE;IAA+C,6CAAyC;IAAxF;Q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ARG,iDAAqB,GAArB,UAAsB,SAAS;QAC3B,OAAO,CAAC,SAAS,CAAC,cAAc,CAAC;IACrC,CAAC;IAED,kCAAM,GAAN;QACI,OAAO,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;IAC/B,CAAC;IAEL,wBAAC;AAAD,CAAC,AATD,CAAgC,KAAK,CAAC,SAAS,GAS9C\"}","dts":{"name":"/Users/omarismail/development/react-spho/src/SpringyDOMElement.d.ts","writeByteOrderMark":false,"text":"import React from 'react';\r\nimport Spring from 'simple-performant-harmonic-oscillator';\r\nimport { InternalSpringyProps } from './types';\r\ndeclare type ReconcileScheduler = {\r\n    values: {\r\n        [key: string]: string;\r\n    };\r\n    scheduled?: Promise<void> | null;\r\n};\r\ndeclare type CustomValueMapper = (value: number) => number;\r\nexport default class SpringyDOMElement extends React.PureComponent<InternalSpringyProps> {\r\n    static contextType: React.Context<{\r\n        registerChild: (child: SpringyDOMElement) => any;\r\n        unregisterChild: (child: SpringyDOMElement) => any;\r\n        registerChildIndex: (child: SpringyDOMElement, index: number) => any;\r\n        unregisterChildIndex: (child: SpringyDOMElement, index: number) => any;\r\n    }>;\r\n    _reconcileUpdate: ReconcileScheduler;\r\n    _ref: HTMLElement | null;\r\n    _resizeObserver: ResizeObserver | null;\r\n    _isSecondRender: boolean;\r\n    _needsSecondRender: boolean;\r\n    _springMap: Map<string, Spring>;\r\n    _removalBlocked: boolean;\r\n    _transitionOutCloneElement: HTMLElement | null;\r\n    render(): JSX.Element;\r\n    componentDidMount(): void;\r\n    componentDidUpdate(prevProps: InternalSpringyProps): void;\r\n    componentWillUnmount(): void;\r\n    blockRemoval(): () => void;\r\n    getSpringForProperty(property: string): Spring | null;\r\n    isUnmounting(): boolean;\r\n    setSpringToValueForProperty(property: string, toValue: number | 'auto', overridingFromValue?: number, customValueMapper?: CustomValueMapper): void;\r\n    getDOMNode(): HTMLElement | null;\r\n    _checkAndTakeOverExistingSpringyDOM(globalUniqueIDForSpringReuse: any): void;\r\n    _processSpringyStyle(): void;\r\n    _flipAutoPropsIfNecessary(springyStyle: {\r\n        [key: string]: number | 'auto';\r\n    }): void;\r\n    _setupOrUpdateSpringForProperty(property: string, propValue: number | 'auto', overridingFromValue?: number): any;\r\n    _listenToSpring(spring: Spring, property: string): void;\r\n    _updateValueForProperty(property: string, value: number): void;\r\n    _dealWithPotentialResizeObserver(springyStyle: {\r\n        [key: string]: number | 'auto';\r\n    }): void;\r\n    _rerenderToUseTrueSize(): void;\r\n    _killResizeObserver(): void;\r\n    _handleOnExitIfExists(): void;\r\n    _cleanUpSprings(): void;\r\n}\r\nexport {};\r\n"}}
