{"version":3,"sources":["../src/tree.js"],"names":["createStringTreeNode","value","type","createNumberTreeNode","createReactElementTreeNode","displayName","props","defaultProps","childrens","createReactFragmentTreeNode","key"],"mappings":";;;;;;AACA;;AAqCO,IAAMA,sDAAuB,SAAvBA,oBAAuB,CAACC,KAAD;AAAA,SAAoC;AACtEC,UAAM,QADgE;AAEtED;AAFsE,GAApC;AAAA,CAA7B;;AAKA,IAAME,sDAAuB,SAAvBA,oBAAuB,CAACF,KAAD;AAAA,SAAoC;AACtEC,UAAM,QADgE;AAEtED;AAFsE,GAApC;AAAA,CAA7B;;AAKA,IAAMG,kEAA6B,SAA7BA,0BAA6B,CACxCC,WADwC,EAExCC,KAFwC,EAGxCC,YAHwC,EAIxCC,SAJwC;AAAA,SAKd;AAC1BN,UAAM,cADoB;AAE1BG,4BAF0B;AAG1BC,gBAH0B;AAI1BC,8BAJ0B;AAK1BC;AAL0B,GALc;AAAA,CAAnC;;AAaA,IAAMC,oEAA8B,SAA9BA,2BAA8B,CACzCC,GADyC,EAEzCF,SAFyC;AAAA,SAGd;AAC3BN,UAAM,eADqB;AAE3BQ,YAF2B;AAG3BF;AAH2B,GAHc;AAAA,CAApC","file":"tree.js","sourcesContent":["/* @flow */\n/* eslint-disable no-use-before-define */\n\nimport type { Key } from 'react';\n\ntype PropsType = { [key: string]: any };\ntype DefaultPropsType = { [key: string]: any };\n\nexport type StringTreeNode = {|\n type: 'string',\n value: string,\n|};\n\nexport type NumberTreeNode = {|\n type: 'number',\n value: number,\n|};\n\nexport type ReactElementTreeNode = {|\n type: 'ReactElement',\n displayName: string,\n props: PropsType,\n defaultProps: DefaultPropsType,\n childrens: TreeNode[],\n|};\n\nexport type ReactFragmentTreeNode = {|\n type: 'ReactFragment',\n key: ?Key,\n childrens: TreeNode[],\n|};\n\nexport type TreeNode =\n | StringTreeNode\n | NumberTreeNode\n | ReactElementTreeNode\n | ReactFragmentTreeNode;\n\nexport const createStringTreeNode = (value: string): StringTreeNode => ({\n type: 'string',\n value,\n});\n\nexport const createNumberTreeNode = (value: number): NumberTreeNode => ({\n type: 'number',\n value,\n});\n\nexport const createReactElementTreeNode = (\n displayName: string,\n props: PropsType,\n defaultProps: DefaultPropsType,\n childrens: TreeNode[]\n): ReactElementTreeNode => ({\n type: 'ReactElement',\n displayName,\n props,\n defaultProps,\n childrens,\n});\n\nexport const createReactFragmentTreeNode = (\n key: ?Key,\n childrens: TreeNode[]\n): ReactFragmentTreeNode => ({\n type: 'ReactFragment',\n key,\n childrens,\n});\n"]}