{"code":"import * as tslib_1 from \"tslib\";\r\nimport * as React from 'react';\r\nimport { forwardRef } from 'react';\r\nimport { PoseElement, PoseParentConsumer } from './components/PoseElement';\r\nimport supportedElements from './utils/supported-elements';\r\nimport { warning } from 'hey-listen';\r\nvar componentCache = new Map();\r\nvar createComponentFactory = function (key) {\r\n    var componentFactory = function (poseConfig) {\r\n        if (poseConfig === void 0) { poseConfig = {}; }\r\n        return forwardRef(function (_a, ref) {\r\n            var _b = _a.withParent, withParent = _b === void 0 ? true : _b, props = tslib_1.__rest(_a, [\"withParent\"]);\r\n            warning(props.innerRef === undefined, 'innerRef is deprecated. Please use ref instead.');\r\n            return !withParent || props.parentValues ? (React.createElement(PoseElement, tslib_1.__assign({ poseConfig: poseConfig, innerRef: ref, elementType: key }, props))) : (React.createElement(PoseParentConsumer, null, function (parentCtx) { return (React.createElement(PoseElement, tslib_1.__assign({ poseConfig: poseConfig, elementType: key, innerRef: ref }, props, parentCtx))); }));\r\n        });\r\n    };\r\n    componentCache.set(key, componentFactory);\r\n    return componentFactory;\r\n};\r\nvar getComponentFactory = function (key) {\r\n    return componentCache.has(key)\r\n        ? componentCache.get(key)\r\n        : createComponentFactory(key);\r\n};\r\nvar posed = (function (component) {\r\n    return getComponentFactory(component);\r\n});\r\nsupportedElements.reduce(function (acc, key) {\r\n    acc[key] = createComponentFactory(key);\r\n    return acc;\r\n}, posed);\r\nexport default posed;\r\n//# sourceMappingURL=posed.js.map","map":"{\"version\":3,\"file\":\"posed.js\",\"sourceRoot\":\"\",\"sources\":[\"src/posed.tsx\"],\"names\":[],\"mappings\":\";AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAC3E,OAAO,iBAAiB,MAAM,4BAA4B,CAAC;AAM3D,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAA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AAM,CAAC,UAAC,GAAG,EAAE,GAAG;IAChC,GAAG,CAAC,GAAG,CAAC,GAAG,sBAAsB,CAAC,GAAG,CAAC,CAAC;IACvC,OAAO,GAAG,CAAC;AACb,CAAC,EAAE,KAAK,CAAC,CAAC;AAEV,eAAe,KAAK,CAAC\"}","dts":{"name":"/Users/mattperry/Sites/popmotion/packages/react-pose/posed.d.ts","text":"import * as React from 'react';\r\nimport { PoseElementProps } from './components/PoseElement/types';\r\nimport { DomPopmotionConfig } from 'popmotion-pose';\r\ndeclare type DomPopmotionConfigFactory<T> = (props: PoseElementProps & T) => DomPopmotionConfig;\r\nexport declare type ComponentFactory<T> = (poseConfig?: DomPopmotionConfig | DomPopmotionConfigFactory<T>) => React.ComponentType<any>;\r\nexport declare type Posed = {\r\n    <T>(component: React.ComponentType<T>): ComponentFactory<T>;\r\n    [key: string]: ComponentFactory<React.HTMLProps<any>>;\r\n};\r\ndeclare const posed: Posed;\r\nexport default posed;\r\n"}}
