{"version":3,"sources":["../src/index.js"],"names":["reactElementToJsxString","element","filterProps","showDefaultProps","showFunctions","functionValue","tabStop","useBooleanShorthandSyntax","useFragmentShortSyntax","sortProps","maxInlineAttributesLineLength","displayName","Error","options"],"mappings":";;;;;;AAEA;;;;AACA;;;;;;AAIA,IAAMA,0BAA0B,SAA1BA,uBAA0B,CAC9BC,OAD8B,EAc3B;AAAA,iFADU,EACV;AAAA,8BAXDC,WAWC;AAAA,MAXDA,WAWC,oCAXa,EAWb;AAAA,mCAVDC,gBAUC;AAAA,MAVDA,gBAUC,yCAVkB,IAUlB;AAAA,gCATDC,aASC;AAAA,MATDA,aASC,sCATe,KASf;AAAA,MARDC,aAQC,QARDA,aAQC;AAAA,0BAPDC,OAOC;AAAA,MAPDA,OAOC,gCAPS,CAOT;AAAA,mCANDC,yBAMC;AAAA,MANDA,yBAMC,yCAN2B,IAM3B;AAAA,mCALDC,sBAKC;AAAA,MALDA,sBAKC,yCALwB,IAKxB;AAAA,4BAJDC,SAIC;AAAA,MAJDA,SAIC,kCAJW,IAIX;AAAA,MAHDC,6BAGC,QAHDA,6BAGC;AAAA,MAFDC,WAEC,QAFDA,WAEC;;AACH,MAAI,CAACV,OAAL,EAAc;AACZ,UAAM,IAAIW,KAAJ,CAAU,sDAAV,CAAN;AACD;;AAED,MAAMC,UAAU;AACdX,4BADc;AAEdC,sCAFc;AAGdC,gCAHc;AAIdC,gCAJc;AAKdC,oBALc;AAMdC,wDANc;AAOdC,kDAPc;AAQdC,wBARc;AASdC,gEATc;AAUdC;AAVc,GAAhB;;AAaA,SAAO,0BAAW,iCAAkBV,OAAlB,EAA2BY,OAA3B,CAAX,EAAgDA,OAAhD,CAAP;AACD,CAjCD;;kBAmCeb,uB","file":"index.js","sourcesContent":["/* @flow */\n\nimport formatTree from './formatter/formatTree';\nimport parseReactElement from './parser/parseReactElement';\nimport type { Element as ReactElement } from 'react';\nimport type { Options } from './options';\n\nconst reactElementToJsxString = (\n element: ReactElement,\n {\n filterProps = [],\n showDefaultProps = true,\n showFunctions = false,\n functionValue,\n tabStop = 2,\n useBooleanShorthandSyntax = true,\n useFragmentShortSyntax = true,\n sortProps = true,\n maxInlineAttributesLineLength,\n displayName,\n }: Options = {}\n) => {\n if (!element) {\n throw new Error('react-element-to-jsx-string: Expected a ReactElement');\n }\n\n const options = {\n filterProps,\n showDefaultProps,\n showFunctions,\n functionValue,\n tabStop,\n useBooleanShorthandSyntax,\n useFragmentShortSyntax,\n sortProps,\n maxInlineAttributesLineLength,\n displayName,\n };\n\n return formatTree(parseReactElement(element, options), options);\n};\n\nexport default reactElementToJsxString;\n"]}