diff --git a/docs/static/js/main.4bef6311.chunk.js.map b/docs/static/js/main.4bef6311.chunk.js.map index 068bab95..fc85ee81 100644 --- a/docs/static/js/main.4bef6311.chunk.js.map +++ b/docs/static/js/main.4bef6311.chunk.js.map @@ -1 +1 @@ -{"version":3,"sources":["assets/image/logo.png","components/logo.jsx","components/coder.jsx","components/result-alert.jsx","service/message/message.js","service/convert/css/decls.js","service/utils/num.js","service/convert/css/split-mapping.js","service/convert/css/split-cssattr.js","service/convert/css/avatar.js","service/convert/css/parse.js","service/convert/flutter/template.js","service/convert/flutter/code-arr.js","service/convert/flutter/transform/unit.js","service/utils/unit.js","service/convert/flutter/transform/color.js","service/convert/flutter/transform/border.js","service/convert/flutter/transform/boxshadow.js","service/convert/flutter/transform/transform.js","service/utils/arr.js","service/convert/flutter/transform/font-weight.js","service/convert/flutter/transform/font-family.js","service/utils/str.js","service/convert/flutter/transform/constraints.js","service/convert/flutter/transform/border-radius.js","service/utils/camel.js","service/convert/flutter/transform/axis-alignment.js","service/convert/flutter/transform/marginpadding.js","service/convert/flutter/transform/background-image.js","service/utils/pos.js","service/convert/flutter/transform.js","service/convert/flutter/widget.js","service/convert/flutter/filter.js","service/convert/flutter/parse.js","service/convert/converter.js","components/operating-area.jsx","App.js","index.js"],"names":["module","exports","__webpack_require__","p","Logo","react_default","a","createElement","className","alt","src","logo","width","style","padding","href","rel","target","require","Coder","editor","data","value","this","props","onChange","react_codemirror2","options","Object","assign","theme","tabSize","lineNumbers","bind","React","Component","ResultAlert","message","config","duration","maxCount","first","showMessage","type","msg","success","error","Message","Decls","classCallCheck","decls","_ref","key","val","_ref$valueList","valueList","_ref$data","push","length","func","forEach","decl","index","add","i","splice","defaultVal","cloneDecls","clone","isNone","trim","toNum","isNumber","r","exec","concat","parseFloat","toNumber","toRadian","fl","arguments","undefined","radian","toString","replace","Math","PI","ppo","floor","toRound","n","d","pow","round","SPLIT_MAPPING","background","border-radius","text-decoration","border","margin","font","splitByMainStyle","mainStyle","css","subStyles","getVal","allStyle","getAllStyle","$","removeClass","removeAttr","addValToDecls","remove","getStyleVal","getAvatarStyle","splitCssAttr","parseCssDecls","root","Promise","resolve","reject","walkDecls","list","postcss","space","prop","setTimeout","PROP","CHILDREN","DECO","CONTAINER","TEXT","CENTER","ROW","COLUMN","POSITIONED","TRANSFORM","OPACITY","CodeArr","arr","lines","code","getIndexOf","enabled","indexOf","tabs","tag","newCode","cloneLines","nspace","join","getTabs","split","line","toFunit","test","isNumerical","isPercentage","isPixel","isInteger","isEm","isRem","isPt","toFColor","c16","color","hex","e","toFBorder","toColor","createBoxShadow","toArray","x","y","offset","blurRadius","rgbas","replaceRbga2Sign","str","replaceSign2Rgba","slice","toBoxShadow","shadows","shadowStr","findFromProp","name","formatVal","strArr","newVal","toFTransform","sign","RegExp","split2Arr","skew","scale","rotate","translate","matrixval","toFFontWeight","toFFontFamily","toConstraints","bcVal","maxWidth","minWidth","maxHeight","minHeight","toFBorderRadius","tl","tr","br","bl","toCamel","$0","$1","toUpperCase","toAxisAlignment","toFMarginPadding","top","right","bottom","left","createLineGradient","end","colors","c1","c2","getEnd","createRadialGradient","angle","cos","sin","createBgImage","size","repeat","position","result","toNameVal","toDecorationImage","String","match","inSplitStyles","transfromToCamelKey","transform","mainStyleKey","camelKey","Widget","children","parent","id","uuid","template","codeString","prop2","decoration","codelines","child","loop","addChild","depth","okey","oval","_transform","_transform2","_transform3","codeArr","getDepth","childStr","replaceTag","isNull","TAG","childToCodeString","propToCodeString","prop2ToCodeString","decorationToCodeString","selfToCodeString","clearAllPseudoTags","clearBlankLines","WidgetManager","cache","isFlex","_ref3","parseFlutter","widget","widgetManager","isPositioned","get","setProp","addChildTo","_ref2","isOpacity","_ref4","alignItems","justifyContent","isCenter","_ref5","isRow","_ref6","isColumn","_ref7","isTransform","isText","setProp2","isDecoration","setDecoration","getRoot","convert2Flutter","asyncToGenerator","regenerator_default","mark","_callee","ast","flutterStyle","wrap","_context","prev","next","process","sent","abrupt","t0","dumpLogError","stop","_x","apply","err","console","log","stack","OperatingArea","_this","_super","call","cssOptions","mode","dartOptions","cssVal","dartVal","convertAndUpdateDartCoder","updateCoder","_callee2","_context2","_callee3","_context3","setState","result_alert","row","col","span","coder","codeChangeHadler","es_button","onClick","clearBtnClickHandler","convertBtnClickHandler","Content","Layout","App","layout","components_logo","operating_area","ReactDOM","render","src_App","document","getElementById"],"mappings":"6JAAAA,EAAAC,QAAiBC,EAAAC,EAAuB,iSCwBzBC,EArBF,WACX,OACEC,EAAAC,EAAAC,cAAA,OAAKC,UAAU,QACbH,EAAAC,EAAAC,cAAA,OAAKC,UAAU,SACbH,EAAAC,EAAAC,cAAA,OAAKE,IAAI,GAAGC,IAAKC,IAAMC,MAAO,MADhC,uCAGAP,EAAAC,EAAAC,cAAA,iCAEEF,EAAAC,EAAAC,cAAA,KACEM,MAAO,CAAEC,QAAS,GAClBC,KAAK,oCACLC,IAAI,sBACJC,OAAO,UAJT,wGCRRC,EAAQ,KACRA,EAAQ,KACRA,EAAQ,KACRA,EAAQ,KACRA,EAAQ,SA0BOC,gKAvBb,SAASC,EAAQC,EAAMC,GACrBC,KAAKC,MAAMC,UAAYF,KAAKC,MAAMC,SAASH,yBAG7C,WACE,OACEjB,EAAAC,EAAAC,cAACmB,EAAA,aAAD,CACElB,UAAU,cACVc,MAAOC,KAAKC,MAAMF,OAAS,GAC3BK,QAASC,OAAOC,OACd,CACEC,MAAO,UACPC,QAAS,EACTC,aAAa,GAEfT,KAAKC,MAAMG,SAEbF,SAAUF,KAAKE,SAASQ,KAAKV,eAlBjBW,IAAMC,sCCMXC,8JAXb,WACE,OACE/B,EAAAC,EAAAC,cAAA,WAGM,aANc2B,IAAMC,oBCDhCE,IAAQC,OAAO,CACbC,SAAU,EACVC,SAAU,IAGZ,IAAIC,GAAQ,EACNC,EAAc,SAACC,EAAMC,GACrBH,EACFA,GAAQ,EAIG,YAATE,EAAoBN,IAAQQ,QAAQD,GACnCP,IAAQS,MAAMF,IAYNG,EATC,CACdF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ACLoT,QAASxU,KAAK0U,uBAAuBhU,KAAKV,OAF5C,oBAlFkBW,IAAMC,WCA1B+T,WAAYC,IAAZD,SAgBOE,OAdf,WACE,OACE/V,EAAAC,EAAAC,cAAA,OAAKC,UAAU,OACbH,EAAAC,EAAAC,cAAC8V,EAAA,EAAD,KACEhW,EAAAC,EAAAC,cAAC2V,GAAD,KACE7V,EAAAC,EAAAC,cAAC+V,EAAD,MACAjW,EAAAC,EAAAC,cAACgW,GAAD,MACAlW,EAAAC,EAAAC,cAAA,OAAKiP,GAAG,eCVlBgH,IAASC,OAAOpW,EAAAC,EAAAC,cAACmW,GAAD,MAASC,SAASC,eAAe","file":"static/js/main.4bef6311.chunk.js","sourcesContent":["module.exports = __webpack_public_path__ + \"static/media/logo.5857ad01.png\";","import React from \"react\";\nimport logo from \"../assets/image/logo.png\";\n\nconst Logo = () => {\n return (\n
\n
\n \"\" Convert css style to flutter style\n
\n
\n Source code is here\n \n https://github.com/flutterkit/c2f\n \n
\n
\n );\n};\n\nexport default Logo;\n","import React from \"react\";\nimport { UnControlled as CodeMirror } from \"react-codemirror2\";\n\nrequire(\"codemirror/lib/codemirror.css\");\nrequire(\"codemirror/theme/material.css\");\nrequire(\"codemirror/theme/monokai.css\");\nrequire(\"codemirror/mode/css/css.js\");\nrequire(\"codemirror/mode/dart/dart.js\");\n\nclass Coder extends React.Component {\n onChange(editor, data, value) {\n this.props.onChange && this.props.onChange(value);\n }\n\n render() {\n return (\n \n );\n }\n}\n\nexport default Coder;\n","import React from \"react\";\nimport { Alert } from \"antd\";\n\nclass ResultAlert extends React.Component {\n render() {\n return (\n
\n {false ? (\n \n ) : null}\n
\n );\n }\n}\n\nexport default ResultAlert;\n","import { message } from \"antd\";\n\nmessage.config({\n duration: 1,\n maxCount: 3\n});\n\nlet first = true;\nconst showMessage = (type, msg) => {\n if (first) {\n first = false;\n return;\n }\n\n if (type === \"success\") message.success(msg);\n else message.error(msg);\n};\n\nconst Message = {\n success(msg) {\n showMessage(\"success\", msg);\n },\n error(msg) {\n showMessage(\"error\", msg);\n }\n};\n\nexport default Message;\n","import clone from \"lodash/clone\";\n\nclass Decls {\n constructor() {\n this.decls = [];\n }\n\n add({ key, val, valueList = null, data = null }) {\n this.decls.push({ data, valueList, key, val });\n }\n\n isNull() {\n return this.decls.length === 0;\n }\n\n forEach(func) {\n this.decls.forEach((decl, index) => func(decl, index));\n }\n\n merge(decls) {\n for (let key in decls) {\n this.add({\n key,\n val: decls[key]\n });\n }\n }\n\n remove(key) {\n for (let i = this.decls.length - 1; i >= 0; i--) {\n if (this.decls[i][\"key\"] === key) {\n this.decls.splice(i, 1);\n }\n }\n }\n\n getVal(key, defaultVal) {\n let val = null;\n this.decls.forEach(decl => {\n if (decl.key === key) val = decl.val;\n });\n\n return val || defaultVal;\n }\n\n clone() {\n const cloneDecls = new Decls();\n cloneDecls.decls = clone(this.decls);\n\n return cloneDecls;\n }\n}\n\nexport default Decls;\n","import ppo from \"ppo\";\nimport toNumber from \"lodash/toNumber\";\nimport isNumber from \"lodash/isNumber\";\n\nconst isMulti = key => {\n if (key.indexOf(\"|\") > 0) return true;\n else return false;\n};\n\nconst findSimilarNumber = (n, rule) => {\n if (rule[n + \"\"]) return n;\n\n const nums = [];\n for (let key in rule) {\n nums.push(parseInt(key));\n }\n nums.sort((n1, n2) => n2 - n1);\n\n for (let i = 0; i < nums.length; i++) {\n const num = nums[i];\n if (n > num) return num;\n }\n\n return 0;\n};\n\nconst isNone = val => {\n if (!val) return true;\n\n if (typeof val === \"string\") {\n if (val.trim() === \"\") return true;\n if (val === \"null\") return true;\n if (val === \"none\") return true;\n if (val === \"inhert\") return true;\n }\n\n return false;\n};\n\nconst toNum = val => {\n if (isNumber(val)) return val;\n\n const r = /([-0-9.]+)[a-zA-Z%]/gi.exec(`${val}c`);\n if (r && r.length >= 2) {\n val = r[1];\n val = isNumber(val) ? val : parseFloat(val);\n return val;\n } else {\n return toNumber(val);\n }\n};\n\nconst toRadian = (val, fl = 3) => {\n let radian = val.toString().replace(/deg$/g, \"\");\n radian = (radian * Math.PI) / 180;\n return ppo.floor(radian, fl);\n};\n\nconst toRound = (val, n = 3) => {\n const d = Math.pow(10, n);\n const num = Math.round(val * d);\n return num / d;\n};\n\nexport { isMulti, isNone, toNum, findSimilarNumber, toRadian, toRound };\n","const SPLIT_MAPPING = {\n background: [\n \"background-color\",\n \"background-image\",\n \"background-position\",\n \"background-size\",\n \"background-repeat\"\n ],\n\n \"border-radius\": [\n \"border-top-left-radius\",\n \"border-top-right-radius\",\n \"border-bottom-right-radius\",\n \"border-bottom-left-radius\"\n ],\n\n \"text-decoration\": [\n \"text-decoration-line\",\n \"text-decoration-style\",\n \"text-decoration-color\"\n ],\n\n border: [\"border-width\", \"border-style\", \"border-color\"],\n\n padding: [\"padding-top\", \"padding-right\", \"padding-bottom\", \"padding-left\"],\n\n margin: [\"margin-top\", \"margin-right\", \"margin-bottom\", \"margin-left\"],\n\n font: [\n \"font-style\",\n \"font-weight\",\n \"font-size\",\n \"font-family\"\n ]\n};\n\nexport default SPLIT_MAPPING;\n","////////////////////////////////////////////////////////////////\n//\n// Jquery is used here because it is a nice style parser.\n//\n////////////////////////////////////////////////////////////////\n\nimport { isNone } from \"../../utils/num\";\nimport SPLIT_MAPPING from \"./split-mapping\";\nimport { getAvatarStyle, setAvatarStyle } from \"./avatar\";\n\nconst splitCssAttr = decls => {\n if (!decls) return null;\n\n let cloneDecls = decls.clone();\n for (let mainStyle in SPLIT_MAPPING) {\n cloneDecls = splitByMainStyle(cloneDecls, mainStyle, SPLIT_MAPPING[mainStyle]);\n }\n\n return cloneDecls;\n};\n\nconst splitByMainStyle = (decls, mainStyle, subStyles = []) => {\n const val = decls.getVal(mainStyle);\n if (val) {\n const allStyle = getAllStyle(decls);\n setAvatarStyle(allStyle);\n subStyles.forEach(style => addValToDecls(decls, style));\n decls.remove(mainStyle);\n }\n\n return decls;\n};\n\nconst addValToDecls = (decls, key) => {\n const val = getStyleVal(decls, key);\n if (!isNone(val)) decls.add({ key, val });\n};\n\nconst getStyleVal = (decls, key) => {\n let val = getAvatarStyle(key);\n if (isNone(val)) val = decls.getVal(key);\n return val;\n};\n\nconst getAllStyle = decls => {\n const style = {};\n decls.forEach(decl => {\n const key = decl[\"key\"];\n const val = decl[\"val\"];\n style[key] = val;\n });\n return style;\n};\n\nexport default splitCssAttr;\n","import $ from \"jquery\";\n\nconst setAvatarStyle = css => {\n $(\"#avator\")\n .removeClass()\n .removeAttr(\"style\")\n .css(css);\n};\n\nconst getAvatarStyle = key => {\n return $(\"#avator\").css(key);\n};\n\nexport { getAvatarStyle, setAvatarStyle };\n","import postcss from \"postcss\";\nimport Decls from \"./decls\";\nimport splitCssAttr from \"./split-cssattr\";\n\nconst parseCssDecls = root => {\n if (!root) return null;\n\n return new Promise(function (resolve, reject) {\n const decls = new Decls();\n\n root.walkDecls(decl => {\n const list = postcss.list.space(decl.value);\n\n decls.add({\n key: decl.prop,\n val: decl.value,\n data: decl,\n valueList: list\n });\n });\n\n\n setTimeout((decls) => {\n decls = splitCssAttr(decls);\n resolve(decls)\n }, 80, decls);\n });\n};\n\nexport default parseCssDecls;\n","const PROP = \"<-prop->\";\nconst PROP2 = \"<-prop2->\";\nconst CLASS = \"<-class->\";\nconst CHILDREN = \"<-children->\";\nconst DECO = \"<-decoration->\";\nconst TAB = \"<-tab->\";\nconst REAL_SPACE = \" \";\n\nconst CONTAINER = `\n Container(\n ${CHILDREN}\n ${PROP}\n ${DECO}\n),\n`.trim();\n\nconst TEXT = `\n Text(\n \"Hello World\",\n style: TextStyle(\n ${PROP}\n ),\n ${PROP2}\n),\n`.trim();\n\nconst CENTER = `\n Center(\n ${CHILDREN}\n),\n`.trim();\n\nconst ROW = `\n ROW(\n ${CHILDREN}\n ${PROP}\n),\n`.trim();\n\nconst COLUMN = `\n COLUMN(\n ${CHILDREN}\n ${PROP}\n),\n`.trim();\n\nconst POSITIONED = `\n Positioned(\n ${CHILDREN}\n ${PROP}\n),`;\n\nconst TRANSFORM = `\n Transform(\n ${CHILDREN}\n ${PROP}\n),`;\n\nconst OPACITY = `\n Opacity(\n ${CHILDREN}\n ${PROP}\n),`;\n\nexport {\n CONTAINER,\n TEXT,\n CHILDREN,\n DECO,\n CLASS,\n PROP,\n PROP2,\n CENTER,\n TAB,\n ROW,\n COLUMN,\n POSITIONED,\n TRANSFORM,\n OPACITY,\n REAL_SPACE\n};\n","/////////////////////////////////////////////////////////\n//\n//\tCodeArr\n//\t[\n// \"new Container(\" ,\n//\t \" child: new Text(\" ,\n//\t \" \"Hello World\",\"\n// ]\n//\n/////////////////////////////////////////////////////////\nimport { TAB } from \"./template\";\nimport clone from \"lodash/clone\";\n\nclass CodeArr {\n constructor(arr) {\n this.lines = arr || [];\n }\n\n add(key, code) {\n const index = this.getIndexOf(key);\n if (index > -1) {\n this.lines[index] = code;\n } else {\n this.lines.push(code);\n }\n this.enabled = true;\n }\n\n isNull() {\n return this.lines.length === 0;\n }\n\n getIndexOf(key) {\n for (let i = 0; i < this.lines.length; i++) {\n if (this.lines[i].indexOf(`${key}:`) > -1) return i;\n }\n return -1;\n }\n\n getTabs(n) {\n let tabs = \"\";\n for (let i = 0; i < n; i++) tabs += TAB;\n return tabs;\n }\n\n replaceTag(tag, newCode) {\n const cloneLines = clone(this.lines);\n\n for (let i = 0; i < this.lines.length; i++) {\n const code = this.lines[i];\n if (code.indexOf(tag) > -1) {\n cloneLines.splice(i, 0, newCode);\n }\n }\n this.lines = cloneLines;\n }\n\n toString(nspace = 0) {\n if (nspace === 0) {\n return this.lines.join(\"\\n\");\n } else {\n const tabs = this.getTabs(nspace);\n const str = this.lines.join(\"\\n\");\n const arr = str.split(/\\n/g);\n arr.forEach((line, index) => (arr[index] = tabs + line));\n\n return arr.join(\"\\n\");\n }\n }\n}\n\nexport default CodeArr;\n","import isNumber from \"lodash/isNumber\";\nimport isInteger from \"lodash/isInteger\";\nimport { toNum } from \"../../../utils/num\";\nimport { isNumerical, isPercentage, isPixel, isEm, isRem, isPt } from \"../../../utils/unit\";\n\nconst toFunit = val => {\n if (isNumber(val)) return val;\n\n val += \"\";\n\n // like \"250\"\n if (isNumerical(val)) {\n return toNum(val);\n }\n\n // like 50%\n else if (isPercentage(val)) {\n val = toNum(val) / 100;\n return `_parent_ * ${val} // percentage of parent width. like 'MediaQuery.of(context).size.width * 0.2'`;\n }\n\n // like 120px\n else if (isPixel(val)) {\n val = toNum(val);\n val = isInteger(val) ? `${val}.0` : `${val}`;\n return val;\n }\n\n // like 3.2em\n else if (isEm(val)) {\n val = toNum(val);\n return `_parent_font_width_ * ${val} // https://www.w3.org/Style/Examples/007/units`;\n }\n\n // like 10rem\n else if (isRem(val)) {\n val = toNum(val);\n return `_root_font_width_ * ${val} // https://www.w3.org/Style/Examples/007/units`;\n }\n\n // like 12pt\n else if (isPt(val)) {\n val = toNum(val);\n return `${val} * 72 / _dpi_ // pt = px * dpi / 72`;\n } else {\n return 0;\n }\n};\n\nexport default toFunit;\n","const isNumerical = val => /^([0-9]+)$/gi.test(val.toString());\n\nconst isPercentage = val => /([0-9]+)%$/gi.test(val);\n\nconst isPixel = val => /([0-9]+)(px|dpx)$/gi.test(val);\n\nconst isEm = val => /([0-9]+)em$/gi.test(val);\n\nconst isRem = val => /([0-9]+)rem$/gi.test(val);\n\nconst isPt = val => /([0-9]+)pt$/gi.test(val);\n\nexport { isNumerical, isPercentage, isPixel, isPt, isEm, isRem };\n","import color from \"color\";\n\nconst toFColor = val => {\n try {\n val = typeof val === \"string\" ? val.trim() : val;\n const c16 = color(val)\n .hex()\n .replace(/^#/, \"0x\");\n\n return `Color(${c16}00)`;\n } catch (e) {\n const c16 = (val + \"\").replace(/^#/, \"0x\");\n return `Color(${c16}00)`;\n }\n};\n\nexport default toFColor;\n","import toFunit from \"./unit\";\nimport toColor from \"./color\";\n\nconst toFBorder = (val, decls) => {\n let width = decls.getVal(\"border-width\", \"1px\");\n let color = decls.getVal(\"border-color\", \"blue\");\n let style = decls.getVal(\"border-style\", \"solid\");\n\n width = toFunit(width);\n color = toColor(color);\n\n return `\nBorder.all(\n color: ${color},\n width: ${width},\n style: BorderStyle.${style}\n)`.trim();\n};\n\nexport default toFBorder;\n","import trim from \"lodash/trim\";\nimport toFunit from \"./unit\";\nimport toColor from \"./color\";\n\n// 0 2px 4px rgba(0, 0, 0, 0.8);\nconst toBoxShadow = val => {\n let shadows = \"\";\n val = replaceRbga2Sign(val);\n const arr = val.split(\",\");\n for (let i = 0; i < arr.length; i++) {\n const shadowStr = replaceSign2Rgba(trim(arr[i]));\n const shadow = createBoxShadow(shadowStr);\n shadows += \"\\n\" + shadow;\n }\n\n return `\n[\n${shadows}\n]`.trim();\n};\n\nconst createBoxShadow = val => {\n val = toArray(val);\n const x = toFunit(val[0]);\n const y = toFunit(val[1]);\n const offset = `Offset(${x}, ${y})`;\n const color = toColor(val[3] || \"#000000\");\n const blurRadius = toFunit(val[2] || 10);\n\n return `\n BoxShadow (\n color: ${color},\n offset: ${offset},\n blurRadius: ${blurRadius},\n ),`;\n};\n\n/// replaceRbga2Sign and replaceSign2Rgba\nlet i = 0;\nconst rgbas = {};\nconst replaceRbga2Sign = str => {\n return str.replace(/rgba?\\((\\d+),\\s*(\\d+),\\s*(\\d+)(?:,\\s*(\\d+(?:\\.\\d+)?))?\\)/gi, val => {\n const key = `__${i++}__`;\n rgbas[key] = val;\n return key;\n });\n};\n\nconst replaceSign2Rgba = str => {\n for (let key in rgbas) {\n str = str.replace(key, rgbas[key]);\n }\n return str;\n};\n\nconst toArray = val => {\n let arr = val.trim().split(\" \");\n if (arr.length > 4) {\n let str = \"\";\n for (let i = 3; i < arr.length; i++) {\n str += arr[i];\n }\n\n arr = arr.slice(0, 4);\n arr[3] = str;\n }\n\n return arr;\n};\n\nexport default toBoxShadow;\n","import trim from \"lodash/trim\";\nimport { split2Arr } from \"../../../utils/arr\";\nimport { toNum, toRadian } from \"../../../utils/num\";\n\n// skewX(25deg) rotate3d(180deg,0,1) scale3d(2,2,1) translate3d(10px,10px,0px);\nconst toFTransform = val => {\n val = trim(val);\n if (/^matrix/gi.test(val)) {\n return val.replace(\"matrix\", \"Matrix4\");\n } else {\n const arr = split2Arr(val);\n\n let skew = findFromProp(\"skew\", arr);\n let scale = findFromProp(\"scale\", arr);\n let rotate = findFromProp(\"rotate\", arr);\n let translate = findFromProp(\"translate\", arr);\n\n let matrixval = \"\";\n skew = formatVal(\"skew\", skew);\n scale = formatVal(\"scale\", scale);\n rotate = formatVal(\"rotate\", rotate);\n translate = formatVal(\"translate\", translate);\n\n if (skew) matrixval += `${skew}..`;\n if (scale) matrixval += `${scale}..`;\n if (rotate) matrixval += `${rotate}..`;\n if (translate) matrixval += `${translate}..`;\n matrixval = matrixval.replace(/\\.\\.$/g, \"\");\n\n return `Matrix4.${matrixval}`;\n }\n};\n\nconst findFromProp = (name, arr) => {\n for (let i = 0; i < arr.length; i++) {\n if (arr[i].indexOf(name) > -1) {\n return arr[i];\n }\n }\n return null;\n};\n\nconst formatVal = (key, val) => {\n if (!val) return null;\n\n const r = /[a-zA-Z]+\\((.*)\\)/.exec(val);\n if (r && r.length >= 2) {\n let str = r[1];\n let strArr = str.split(\",\");\n let arr = [];\n\n if (key === \"rotate\") {\n const radian = toRadian(str);\n val = val.replace(str, radian);\n } else {\n strArr.forEach(n => {\n n = toNum(n);\n arr.push(n);\n });\n const newVal = arr.join(\",\");\n val = val.replace(\"3d\", \"\").replace(str, newVal);\n }\n }\n\n return val;\n};\n\nexport default toFTransform;\n","const split2Arr = (val, sign = \")\") => {\n const arr = val.split(`${sign} `);\n for (let i = 0; i < arr.length; i++) {\n const str = arr[i];\n const reg = new RegExp(`\\\\${sign}$`, \"gi\");\n if (!reg.test(str)) arr[i] = str + sign;\n }\n return arr;\n};\n\nexport { split2Arr };\n","//import toNumber from \"lodash/toNumber\";\n\nconst toFFontWeight = val => {\n if (val === \"bold\" || val === \"normal\") {\n return `FontWeight.${val}`;\n } else if (/^[1-9]00/.test(val + \"\")) {\n return `FontWeight.w${val}`;\n } else {\n return `FontWeight.normal`;\n }\n};\n\nexport default toFFontWeight;\n","import { addQuotes } from \"../../../utils/str\";\n\nconst toFFontFamily = val => {\n if (/^(\"|')/gi.test(val) && !/(\"|')$/gi.test(val)) {\n val = val.replace(/'/g, '\"');\n val = val.split('\"')[1];\n }\n\n return addQuotes(val);\n};\n\nexport default toFFontFamily;\n","const addQuotes = str => {\n if (!/^(\"|')/gi.test(str)) {\n str = `\"${str}\"`;\n }\n return str;\n};\n\nconst getLast = str => {\n return str.charAt(str.length - 1);\n};\n\nexport { addQuotes, getLast };\n","import toFunit from \"./unit\";\n\nconst toConstraints = (val, decls) => {\n let bcVal = \"\";\n let maxWidth = decls.getVal(\"max-width\");\n let minWidth = decls.getVal(\"min-width\");\n let maxHeight = decls.getVal(\"max-height\");\n let minHeight = decls.getVal(\"min-height\");\n\n if (maxWidth) {\n bcVal += `maxWidth: ${toFunit(maxWidth)}`;\n }\n\n if (minWidth) {\n bcVal += `, minWidth: ${toFunit(minWidth)}`;\n }\n\n if (maxHeight) {\n bcVal += `, maxHeight: ${toFunit(maxHeight)}`;\n }\n\n if (minHeight) {\n bcVal += `, minHeight: ${toFunit(minHeight)}`;\n }\n\n bcVal = bcVal.replace(/^,/g, \"\");\n return `BoxConstraints(${bcVal})`;\n};\n\nexport default toConstraints;\n","import toFunit from \"./unit\";\n\nconst toFBorderRadius = (val, decls) => {\n let tl = decls.getVal(\"border-top-left-radius\", 0);\n let tr = decls.getVal(\"border-top-right-radius\", 0);\n let br = decls.getVal(\"border-bottom-right-radius\", 0);\n let bl = decls.getVal(\"border-bottom-left-radius\", 0);\n\n if (tl === tr && tr === br && br === bl) {\n if (tl === \"50%\") {\n return `BoxShape.circle`;\n } else {\n return `BorderRadius.all(const Radius.circular(${toFunit(tl)}))`;\n }\n } else {\n let tl = toFunit(val[0]);\n let tr = toFunit(val[1]);\n let br = toFunit(val[2]);\n let bl = toFunit(val[3]);\n\n tl = `topLeft: Radius.circular(${tl})`;\n tr = `topRight: Radius.circular(${tr})`;\n br = `bottomRight: Radius.circular(${br})`;\n bl = `bottomLeft: Radius.circular(${bl})`;\n\n return `BorderRadius.only(${tl}, ${tr}, ${br}, ${bl})`;\n }\n};\n\nexport default toFBorderRadius;\n","const toCamel = val => {\n let re = /-(\\w)/g;\n return val.replace(re, function ($0, $1) {\n return $1.toUpperCase();\n });\n};\n\nexport default toCamel;\n","import toCamel from \"../../../utils/camel\";\n\nconst toAxisAlignment = val => {\n val = val.replace(/flex-/, \"\");\n return `${toCamel(val)}`;\n};\n\nexport default toAxisAlignment;\n","import toFunit from \"./unit\";\n\nconst toFMarginPadding = (key, val, decls) => {\n let top = decls.getVal(`${key}-top`, 0);\n let right = decls.getVal(`${key}-right`, 0);\n let bottom = decls.getVal(`${key}-bottom`, 0);\n let left = decls.getVal(`${key}-left`, 0);\n\n if (top === right && right === bottom && bottom === left) {\n top = toFunit(top);\n\n return `const EdgeInsets.all(${top})`;\n } else {\n top = toFunit(top);\n right = toFunit(right);\n bottom = toFunit(bottom);\n left = toFunit(left);\n\n return `const EdgeInsets.only(top: ${top}, right: ${right}, bottom: ${bottom}, left: ${left})`;\n }\n};\n\nexport default toFMarginPadding;\n","import toColor from \"./color\";\nimport toCamel from \"../../../utils/camel\";\nimport { toNameVal } from \"../../../utils/pos\";\nimport { toRound, toRadian } from \"../../../utils/num\";\n\nconst toDecorationImage = (val, decls) => {\n val = String(val);\n\n /// background-image = linear-gradient\n if (/^linear-gradient/gi.test(val)) {\n return createLineGradient(val, decls);\n }\n\n if (/^radial-gradient/gi.test(val)) {\n return createRadialGradient(val, decls);\n }\n\n /// background-image - a.jpg\n else {\n return createBgImage(val, decls);\n }\n};\n\nconst createLineGradient = (val, decls) => {\n const colors = [];\n let end;\n const arr = val\n .replace(/^[a-zA-Z]+-gradient/gi, \"\")\n .replace(\"(\", \"\")\n .replace(\")\", \"\")\n .split(\",\");\n\n if (arr.length > 2) {\n const d = arr[0];\n end = d.replace(\"to\", \"\").trim();\n for (let i = 1; i < arr.length; i++) {\n colors.push(toColor(arr[i]));\n }\n } else {\n end = \"bottom\";\n const c1 = arr[0];\n const c2 = arr[1] || arr[0];\n colors.push(toColor(c1));\n colors.push(toColor(c2));\n }\n\n return `\nLinearGradient(\n begin: Alignment(0.0, 0.0),\n end: ${getEnd(end)},\n colors: [${colors}],\n)`.trim();\n};\n\nconst createRadialGradient = (val, decls) => {\n const colors = [];\n const arr = val\n .replace(/^[a-zA-Z]+-gradient/gi, \"\")\n .replace(\"(\", \"\")\n .replace(\")\", \"\")\n .split(\",\");\n\n for (let i = 0; i < arr.length; i++) {\n if (/^(circle|farthest|closest|ellipse)/.test(arr[i])) continue;\n colors.push(toColor(arr[i]));\n }\n\n return `\nRadialGradient(\n colors: [${colors}]\n)`.trim();\n};\n\nconst getEnd = end => {\n let angle;\n let n = 20;\n if (end === \"right\") {\n angle = toRadian(90, n);\n } else if (end === \"top\") {\n angle = toRadian(0, n);\n } else if (end === \"left\") {\n angle = toRadian(-90, n);\n } else if (end === \"bottom\") {\n angle = toRadian(180, n);\n } else {\n angle = toRadian(end, n);\n }\n\n angle -= Math.PI / 2;\n const x = toRound(Math.cos(angle));\n const y = toRound(Math.sin(angle));\n return `Alignment(${x}, ${y})`;\n};\n\nconst createBgImage = (val, decls) => {\n val = val.replace(/^url\\(/g, \"\").replace(/\\)$/g, \"\");\n if (!/^('|\")/.test(val)) val = `\"${val}\"`;\n\n const size = decls.getVal(\"background-size\", \"cover\");\n let repeat = decls.getVal(\"background-repeat\", \"no-repeat\");\n repeat = toCamel(repeat);\n let position = decls.getVal(\"background-position\", \"center\");\n position = toNameVal(position);\n\n return `\nDecorationImage(\n image: ExactAssetImage(${val}),\n fit: BoxFit.${size},\n repeat: ImageRepeat.${repeat},\n)`.trim();\n};\n\nexport default toDecorationImage;\n","import toCamel from \"./camel\";\n\nconst isPercentage = val => {\n if (val.indexOf(\"%\") > 0) {\n return true;\n }\n return false;\n};\n\nconst isName = val => {\n const keynames = \"left|center|bottom|top|right\".split(\"|\");\n for (let i = 0; i < keynames.length; i++) {\n if (val.indexOf(keynames[i]) === 0) {\n return true;\n }\n }\n return false;\n};\n\n// 0% 50% -> leftCenter\n// center left -> centerLeft\nconst toNameVal = val => {\n let result = \"\";\n if (isPercentage(val)) {\n const arr = val.split(\" \");\n for (let i = 0; i < arr.length; i++) {\n if (i === 0) {\n if (arr[i] === \"0%\") {\n result += \"top\";\n } else if (arr[i] === \"50%\") {\n result += \"center\";\n } else {\n result += \"bottom\";\n }\n } else {\n if (arr[i] === \"0%\") {\n result += \"-left\";\n } else if (arr[i] === \"50%\") {\n result += \"-center\";\n } else {\n result += \"-right\";\n }\n }\n }\n } else {\n result.replace(/\\s/gi, \"-\");\n }\n\n result = toCamel(result);\n result = result === \"centerCenter\" ? \"center\" : result;\n return result;\n};\n\nexport { isPercentage, isName, toNameVal };\n","import toFunit from \"./transform/unit\";\nimport toFColor from \"./transform/color\";\nimport toFBorder from \"./transform/border\";\nimport toBoxShadow from \"./transform/boxshadow\";\nimport toFTransform from \"./transform/transform\";\nimport toFFontWeight from \"./transform/font-weight\";\nimport toFFontFamily from \"./transform/font-family\";\nimport toConstraints from \"./transform/constraints\";\nimport toFBorderRadius from \"./transform/border-radius\";\nimport toAxisAlignment from \"./transform/axis-alignment\";\nimport toFMarginPadding from \"./transform/marginpadding\";\nimport toDecorationImage from \"./transform/background-image\";\nimport SPLIT_MAPPING from \"../css/split-mapping\";\nimport toCamel from \"../../utils/camel\";\n\nconst transform = (key, val, decls) => {\n const result = { key: null, val };\n\n switch (true) {\n // background-image color ------------------------\n case match(key, \"background-image\"):\n result[\"key\"] = /^[a-zA-Z]+-gradient/gi.test(val) ? \"gradient\" : \"image\";\n result[\"val\"] = toDecorationImage(val, decls);\n break;\n\n case match(key, \"background-color\", \"color\"):\n result[\"val\"] = toFColor(val);\n if (val === \"rgba(0, 0, 0, 0)\") {\n result[\"key\"] = null;\n } else {\n result[\"key\"] = \"color\";\n }\n\n break;\n\n // width & height ------------------------\n case match(key, \"width\", \"height\"):\n result[\"key\"] = key;\n result[\"val\"] = toFunit(val);\n break;\n\n // left & right ------------------------\n case match(key, \"top\", \"right\", \"left\", \"bottom\"):\n result[\"key\"] = key;\n result[\"val\"] = toFunit(val);\n break;\n\n // max-width & min-width ------------------------\n case match(key, \"max-width\", \"min-width\"):\n case match(key, \"max-height\", \"min-height\"):\n result[\"key\"] = \"constraints\";\n result[\"val\"] = toConstraints(val, decls);\n break;\n\n // text decoration style ------------------------\n case match(key, \"text-decoration-line\"):\n result[\"val\"] = `TextDecoration.${toCamel(val)}`;\n break;\n\n case match(key, \"text-decoration-color\"):\n result[\"val\"] = toFColor(val);\n break;\n\n case match(key, \"text-decoration-style\"):\n result[\"val\"] = `TextDecorationStyle.${val}`;\n break;\n\n case match(key, \"text-align\"):\n result[\"val\"] = `TextAlign.${val}`;\n break;\n\n case match(key, \"font-style\"):\n result[\"val\"] = `FontStyle.${val}`;\n break;\n\n case match(key, \"font-weight\"):\n result[\"val\"] = toFFontWeight(val);\n break;\n\n case match(key, \"font-size\"):\n case match(key, \"letter-spacing\"):\n result[\"val\"] = toFunit(val);\n break;\n\n case match(key, \"font-family\"):\n result[\"val\"] = toFFontFamily(val);\n break;\n\n // padding margin ------------------------\n case match(key, \"padding\", \"margin\"):\n const mainStyleKey = key.replace(/-[a-zA-Z]+$/, \"\");\n result[\"key\"] = mainStyleKey;\n result[\"val\"] = toFMarginPadding(mainStyleKey, val, decls);\n break;\n\n // align items ------------------------\n case match(key, \"justify-content\"):\n result[\"key\"] = \"mainAxisAlignment\";\n result[\"val\"] = `MainAxisAlignment.${toAxisAlignment(val)}`;\n break;\n\n case match(key, \"align-items\"):\n result[\"key\"] = \"crossAxisAlignment\";\n result[\"val\"] = `CrossAxisAlignment.${toAxisAlignment(val)}`;\n break;\n\n // transform ------------------------\n case match(key, \"transform\"):\n result[\"key\"] = \"transform\";\n result[\"val\"] = toFTransform(val);\n break;\n\n // border related ------------------------\n case match(key, \"border-radius\"):\n result[\"val\"] = toFBorderRadius(val, decls);\n result[\"key\"] =\n result[\"val\"] === \"BoxShape.circle\" ? \"shape\" : \"borderRadius\";\n break;\n\n case match(key, \"border\"):\n result[\"key\"] = \"border\";\n result[\"val\"] = toFBorder(val, decls);\n break;\n\n // box-shadow ------------------------\n case match(key, \"box-shadow\"):\n result[\"key\"] = \"boxShadow\";\n result[\"val\"] = toBoxShadow(val);\n break;\n\n // opacity ------------------------\n case match(key, \"opacity\"):\n result[\"key\"] = key;\n result[\"val\"] = val;\n break;\n\n default:\n // Didn't match any test\n break;\n }\n\n // to camel key\n const camelKey = transfromToCamelKey(key);\n if (camelKey) result[\"key\"] = camelKey;\n\n return result;\n};\n\n/////////////////////////////////////////////////////////\n//\n//\tmatch key\n//\n/////////////////////////////////////////////////////////\nconst match = (key, ...rest) => {\n for (let i = 0; i < rest.length; i++) {\n if (key === rest[i]) return true;\n if (inSplitStyles(key, rest[i])) return true;\n }\n\n return false;\n};\n\nconst inSplitStyles = (key, sign) => {\n const subStyles = SPLIT_MAPPING[sign];\n if (!subStyles) return null;\n\n for (let i = 0; i < subStyles.length; i++) {\n if (key === subStyles[i]) return sign;\n }\n return null;\n};\n\n/////////////////////////////////////////////////////////\n//\n//\ttransfrom camel key\n//\n/////////////////////////////////////////////////////////\nconst transfromToCamelKey = key => {\n if (key === \"letter-spacing\") {\n return toCamel(key);\n }\n\n if (/^font-[a-zA-Z]+/gi.test(key) || /^text-[a-zA-Z]+/gi.test(key)) {\n return toCamel(key);\n }\n\n if (/^text-decoration.*/gi.test(key)) {\n return toCamel(key.replace(/^text-/gi, \"\"));\n }\n\n return null;\n};\n\nexport default transform;\n","import ppo from \"ppo\";\nimport CodeArr from \"./code-arr\";\nimport transform from \"./transform\";\nimport {\n CONTAINER,\n TEXT,\n CHILDREN,\n TAB,\n ROW,\n COLUMN,\n CLASS,\n PROP,\n PROP2,\n DECO,\n OPACITY,\n POSITIONED,\n TRANSFORM,\n REAL_SPACE,\n CENTER\n} from \"./template\";\n\nclass Widget {\n constructor(type) {\n this.children = [];\n this.type = type;\n this.decls = null;\n this.parent = null;\n this.id = ppo.uuid();\n\n switch (type) {\n case \"container\":\n this.template = CONTAINER;\n break;\n\n case \"position\":\n this.template = POSITIONED;\n break;\n\n case \"transform\":\n this.template = TRANSFORM;\n break;\n\n case \"opacity\":\n this.template = OPACITY;\n break;\n\n case \"text\":\n this.template = TEXT;\n break;\n\n case \"center\":\n this.template = CENTER;\n break;\n\n case \"row\":\n this.template = ROW;\n break;\n\n case \"column\":\n this.template = COLUMN;\n break;\n\n default:\n this.template = CONTAINER;\n }\n\n this.codeString = \"\";\n this.prop = new CodeArr();\n this.prop2 = new CodeArr();\n this.decoration = new CodeArr();\n this.codelines = new CodeArr(this.template.split(/\\n/g));\n }\n\n addChild(child) {\n if (this.children.indexOf(child) < 0) {\n this.children.push(child);\n child.parent = this;\n }\n }\n\n addChildTo(parent) {\n if (this.parent === parent) return;\n\n const loop = target => {\n if (!target.parent) {\n parent.addChild(target);\n } else {\n loop(target.parent);\n }\n };\n\n this.root = parent;\n loop(this);\n }\n\n getRoot() {\n return this.root || this;\n }\n\n getDepth() {\n let depth = 0;\n const loop = target => {\n if (target.parent) {\n depth++;\n loop(target.parent);\n }\n };\n loop(this);\n\n return depth;\n }\n\n /// set prop --------------------------------\n setProp(okey, oval) {\n let { key, val } = transform(okey, oval, this.decls);\n if (!key) return;\n\n const code =\n this.type === \"text\" ? ` ${key}: ${val},` : `${key}: ${val},`;\n this.prop.add(key, code);\n }\n\n /// set prop2 --------------------------------\n setProp2(okey, oval) {\n let { key, val } = transform(okey, oval, this.decls);\n if (!key) return;\n const code = this.type === \"text\" ? ` ${key}: ${val},` : `${key}: ${val},`;\n this.prop2.add(key, code);\n }\n\n /// set Decoration --------------------------------\n setDecoration(okey, oval) {\n let { key, val } = transform(okey, oval, this.decls);\n if (!key) return;\n\n const code = `${key}: ${val},`;\n this.decoration.add(key, code);\n }\n\n clearAllPseudoTags() {\n this.codeString = this.codeString\n .replace(new RegExp(CHILDREN, \"g\"), \"\")\n .replace(new RegExp(CLASS, \"g\"), \"\")\n .replace(new RegExp(PROP, \"g\"), \"\")\n .replace(new RegExp(PROP2, \"g\"), \"\")\n .replace(new RegExp(DECO, \"g\"), \"\")\n .replace(new RegExp(TAB, \"g\"), REAL_SPACE);\n }\n\n clearBlankLines() {\n const codeArr = this.codeString.split(/\\n/g);\n for (let i = codeArr.length - 1; i >= 0; i--) {\n const line = codeArr[i].trim();\n if (!line) codeArr.splice(i, 1);\n }\n\n this.codeString = codeArr.join(\"\\n\");\n }\n\n /// Convert various elements to CodeString ----------------------------\n selfToCodeString() {\n const depth = this.getDepth();\n //const tabs = child.codelines.getTabs(depth);\n\n this.codeString = this.codelines.toString(depth);\n }\n\n childToCodeString(child) {\n const childStr = child.toString().trim();\n this.replaceTag(CHILDREN, ` child: ${childStr}`);\n }\n\n propToCodeString() {\n if (this.prop.isNull()) return;\n const nspace = this.type === \"text\" ? 0 : 1;\n this.replaceTag(PROP, this.prop.toString(nspace));\n }\n\n prop2ToCodeString() {\n if (this.prop2.isNull()) return;\n this.replaceTag(PROP2, this.prop2.toString(0));\n }\n\n decorationToCodeString() {\n if (this.decoration.isNull()) return;\n\n let decoration = this.decoration.toString(2);\n decoration = ` decoration: BoxDecoration(\n${decoration}\n )`;\n\n this.replaceTag(DECO, decoration);\n }\n\n replaceTag(TAG, code) {\n this.codelines.replaceTag(TAG, code);\n }\n\n toString() {\n if (this.children.length > 0) {\n if (this.children.length === 1) {\n const child = this.children[0];\n this.childToCodeString(child);\n } else {\n for (let i = 0; i < this.children; i++) {}\n }\n }\n\n // merge code string\n this.propToCodeString();\n this.prop2ToCodeString();\n this.decorationToCodeString();\n this.selfToCodeString();\n this.clearAllPseudoTags();\n this.clearBlankLines();\n\n return this.codeString || \"\";\n }\n}\n\nclass WidgetManager {\n constructor() {\n this.cache = {};\n }\n\n get({ type, target }) {\n const { cache } = this;\n const key = `_${target}.${type}`;\n if (!cache[key]) cache[key] = new Widget(type);\n return cache[key];\n }\n}\n\nexport { Widget, WidgetManager };\n","/////////////////////////////////////////////////////////\n//\n//\tFilter Func\n//\n/////////////////////////////////////////////////////////\nconst isText = key => {\n if (key.indexOf(\"font\") === 0) {\n return true;\n } else if (key.indexOf(\"text-\") === 0) {\n return true;\n } else if (key === \"color\" || key === \"letter-spacing\") {\n return true;\n } else {\n return false;\n }\n};\n\nconst isDecoration = key => {\n if (\n key === \"background-image\" ||\n key === \"background-color\" ||\n key === \"border\" ||\n key === \"box-shadow\"\n ) {\n return true;\n } else if (key.indexOf(\"border\") >= 0) {\n return true;\n } else {\n return false;\n }\n};\n\nconst isPositioned = ({ key, val, decls }) => {\n const position = decls.getVal(\"position\");\n const hasPosition = position === \"absolute\" || position === \"fixed\";\n\n const isTLRBAttr =\n hasPosition &&\n (key === \"top\" || key === \"left\" || key === \"right\" || key === \"bottom\");\n const isPositionAttr =\n key === \"position\" && (val === \"absolute\" || val === \"fixed\");\n\n if (isTLRBAttr || isPositionAttr) {\n return true;\n }\n return false;\n};\n\nconst isOpacity = ({ key, val, decls }) => {\n if (key === \"opacity\") return true;\n return false;\n};\n\nconst isFlex = ({ key, val, decls }) => {\n if (/^flex/.test(key)) return true;\n if (key === \"display\" && /flex/gi.test(val)) return true;\n if (key === \"justify-content\" || key === \"align-items\") return true;\n return false;\n};\n\nconst isCenter = ({ key, val, decls }) => {\n if (isFlex({ key, val, decls })) {\n const alignItems = decls.getVal(\"align-items\");\n const justifyContent = decls.getVal(\"justify-content\");\n if (alignItems === \"center\" && justifyContent === \"center\") return true;\n }\n return false;\n};\n\nconst isRow = ({ key, val, decls }) => {\n if (isFlex({ key, val, decls })) {\n const direction = decls.getVal(\"flex-direction\", \"row\");\n if (direction === \"row\") return true;\n }\n return false;\n};\n\nconst isColumn = ({ key, val, decls }) => {\n if (isFlex({ key, val, decls })) {\n const direction = decls.getVal(\"flex-direction\", \"row\");\n if (direction === \"column\") return true;\n }\n return false;\n};\n\nconst isTransform = ({ key, val, decls }) => {\n if (key && /transform$/gi.test(key)) return true;\n return false;\n};\n\nexport {\n isText,\n isDecoration,\n isPositioned,\n isOpacity,\n isTransform,\n isFlex,\n isColumn,\n isCenter,\n isRow\n};\n","import { Widget, WidgetManager } from \"./widget\";\nimport {\n isRow,\n isCenter,\n isColumn,\n isText,\n isDecoration,\n isPositioned,\n isOpacity,\n isTransform\n} from \"./filter\";\n\nconst parseFlutter = decls => {\n if (!decls || decls.isNull()) return \"\";\n\n let widget = new Widget(\"container\");\n widget.decls = decls;\n const widgetManager = new WidgetManager();\n\n decls.forEach((decl, index) => {\n let key = decl[\"key\"];\n let val = decl[\"val\"];\n\n /// parent widget ---------------------------------------------\n // Positioned\n if (isPositioned({ key, val, decls })) {\n const parent = widgetManager.get({ target: \"parent\", type: \"position\" });\n parent.setProp(key, val);\n widget.addChildTo(parent);\n }\n\n // Opacity\n else if (isOpacity({ key, val, decls })) {\n const parent = widgetManager.get({ target: \"parent\", type: \"opacity\" });\n parent.setProp(key, val);\n widget.addChildTo(parent);\n }\n\n // Flex isCenter\n else if (isCenter({ key, val, decls })) {\n const parent = widgetManager.get({ target: \"parent\", type: \"center\" });\n parent.setProp(key, val);\n widget.addChildTo(parent);\n }\n\n // Flex Row\n else if (isRow({ key, val, decls })) {\n const parent = widgetManager.get({ target: \"parent\", type: \"row\" });\n parent.setProp(key, val);\n widget.addChildTo(parent);\n }\n\n // Flex Column\n else if (isColumn({ key, val, decls })) {\n const parent = widgetManager.get({ target: \"parent\", type: \"column\" });\n parent.setProp(key, val);\n widget.addChildTo(parent);\n }\n\n // Transform\n else if (isTransform({ key, val, decls })) {\n const parent = widgetManager.get({ target: \"parent\", type: \"transform\" });\n parent.setProp(key, val);\n widget.addChildTo(parent);\n }\n\n /// child widget ---------------------------------------------\n // text\n else if (isText(key)) {\n const child = widgetManager.get({ target: \"child\", type: \"text\" });\n const keys = [\"text-align\"];\n if (keys.indexOf(key) > -1) {\n child.setProp2(key, val);\n } else {\n child.setProp(key, val);\n }\n widget.addChild(child);\n }\n\n /// self widget ---------------------------------------------\n // decoration\n else if (isDecoration(key)) {\n widget.setDecoration(key, val);\n }\n\n // prop\n else {\n widget.setProp(key, val);\n }\n });\n\n return widget.getRoot().toString();\n};\n\nexport default parseFlutter;\n","import postcss from \"postcss\";\nimport Message from \"../message/message\";\nimport parseCssDecls from \"./css/parse\";\nimport parseFlutter from \"./flutter/parse\";\n\nconst convert2Flutter = async css => {\n try {\n const ast = await postcss([\n require(\"postcss-transform-shortcut\")({})\n // require(\"postcss-short-border-radius\")()\n ]).process(css);\n\n const decls = await parseCssDecls(ast.root);\n const flutterStyle = parseFlutter(decls);\n\n if (flutterStyle !== \"\") Message.success(\"Has been converted successfully!\");\n\n return flutterStyle;\n } catch (err) {\n const msg = dumpLogError(err);\n Message.error(msg);\n\n return \"\";\n }\n};\n\nconst dumpLogError = err => {\n let msg;\n if (typeof err === \"object\") {\n if (err.message) {\n msg = \"C2F - Message: \" + err.message;\n console.log(`\\n ${msg}`);\n }\n if (err.stack) {\n msg = msg || \"C2F - Convert css 2 flutter error !\";\n console.log(\"\\nC2F - Stacktrace:\");\n console.log(\"====================\");\n console.log(err.stack);\n }\n } else {\n msg = \"C2F - Convert css 2 flutter error !\";\n console.log(\"C2F - dumpError :: argument is not an object\");\n }\n\n return msg;\n};\n\nexport default convert2Flutter;\n","import React from \"react\";\nimport Coder from \"./coder\";\nimport { Row, Col, Button } from \"antd\";\nimport ResultAlert from \"./result-alert\";\nimport Message from \"../service/message/message\";\nimport convert2Flutter from \"../service/convert/converter\";\n\nclass OperatingArea extends React.Component {\n constructor(props) {\n super(props);\n\n this.cssOptions = {\n mode: \"css\"\n //theme: 'monokai'\n };\n\n this.dartOptions = {\n mode: \"dart\"\n };\n\n this.cssVal = \"\";\n this.dartVal = \"\";\n }\n\n async componentDidMount() {\n this.cssVal = `\nbackground-color: #e0e0e0;\nwidth: 320px;\nheight: 240px;\nborder:5px solid red;\nfont: 900 24px Georgia;\npadding: 2px 10px;\nmargin: 3px;\nborder-radius: 10px;\ntext-decoration: underline wavy red;\n `.trim();\n\n await this.convertAndUpdateDartCoder();\n }\n\n clearBtnClickHandler(e) {\n this.updateCoder({ cssVal: \"\", dartVal: \"\" });\n Message.success(\"Cleared successfully\");\n }\n\n async convertBtnClickHandler(e) {\n await this.convertAndUpdateDartCoder();\n }\n\n codeChangeHadler(value) {\n this.cssVal = value;\n }\n\n async convertAndUpdateDartCoder() {\n const dartVal = await convert2Flutter(this.cssVal);\n this.updateCoder({ dartVal });\n }\n\n updateCoder({ cssVal, dartVal }) {\n if (dartVal !== undefined && dartVal !== null) this.dartVal = dartVal;\n if (cssVal !== undefined && cssVal !== null) this.cssVal = cssVal;\n\n this.setState({});\n }\n\n render() {\n return (\n
\n \n \n \n
Css
\n \n \n\n \n
Flutter
\n \n \n
\n\n \n \n \n Convert\n \n \n
\n );\n }\n}\n\nexport default OperatingArea;\n","import React from \"react\";\nimport { Layout } from \"antd\";\nimport Logo from \"./components/logo\";\nimport OperatingArea from \"./components/operating-area\";\n\nimport \"./App.css\";\n\nconst { Content } = Layout;\n\nfunction App() {\n return (\n
\n \n \n \n \n
\n
\n
\n
\n );\n}\n\nexport default App;\n","import React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport \"./index.css\";\nimport App from \"./App\";\n// import * as serviceWorker from './serviceWorker';\n\nReactDOM.render(, document.getElementById(\"root\"));\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\n// serviceWorker.register();\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["assets/image/logo.png","components/logo.jsx","components/coder.jsx","components/result-alert.jsx","service/message/message.js","service/convert/css/decls.js","service/utils/num.js","service/convert/css/split-mapping.js","service/convert/css/split-cssattr.js","service/convert/css/avatar.js","service/convert/css/parse.js","service/convert/flutter/template.js","service/convert/flutter/code-arr.js","service/convert/flutter/transform/unit.js","service/utils/unit.js","service/convert/flutter/transform/color.js","service/convert/flutter/transform/border.js","service/convert/flutter/transform/boxshadow.js","service/convert/flutter/transform/transform.js","service/utils/arr.js","service/convert/flutter/transform/font-weight.js","service/convert/flutter/transform/font-family.js","service/utils/str.js","service/convert/flutter/transform/constraints.js","service/convert/flutter/transform/border-radius.js","service/utils/camel.js","service/convert/flutter/transform/axis-alignment.js","service/convert/flutter/transform/marginpadding.js","service/convert/flutter/transform/background-image.js","service/utils/pos.js","service/convert/flutter/transform.js","service/convert/flutter/widget.js","service/convert/flutter/filter.js","service/convert/flutter/parse.js","service/convert/converter.js","components/operating-area.jsx","App.js","index.js"],"names":["module","exports","__webpack_require__","p","Logo","react_default","a","createElement","className","alt","src","logo","width","style","padding","href","rel","target","require","Coder","editor","data","value","this","props","onChange","react_codemirror2","options","Object","assign","theme","tabSize","lineNumbers","bind","React","Component","ResultAlert","message","config","duration","maxCount","first","showMessage","type","msg","success","error","Message","Decls","classCallCheck","decls","_ref","key","val","_ref$valueList","valueList","_ref$data","push","length","func","forEach","decl","index","add","i","splice","defaultVal","cloneDecls","clone","isNone","trim","toNum","isNumber","r","exec","concat","parseFloat","toNumber","toRadian","fl","arguments","undefined","radian","toString","replace","Math","PI","ppo","floor","toRound","n","d","pow","round","SPLIT_MAPPING","background","border-radius","text-decoration","border","margin","font","splitByMainStyle","mainStyle","css","subStyles","getVal","allStyle","getAllStyle","$","removeClass","removeAttr","addValToDecls","remove","getStyleVal","getAvatarStyle","splitCssAttr","parseCssDecls","root","Promise","resolve","reject","walkDecls","list","postcss","space","prop","setTimeout","PROP","CHILDREN","DECO","CONTAINER","TEXT","CENTER","ROW","COLUMN","POSITIONED","TRANSFORM","OPACITY","CodeArr","arr","lines","code","getIndexOf","enabled","indexOf","tabs","tag","newCode","cloneLines","nspace","join","getTabs","split","line","toFunit","test","isNumerical","isPercentage","isPixel","isInteger","isEm","isRem","isPt","toFColor","c16","color","hex","e","toFBorder","toColor","createBoxShadow","toArray","x","y","offset","blurRadius","rgbas","replaceRbga2Sign","str","replaceSign2Rgba","slice","toBoxShadow","shadows","shadowStr","findFromProp","name","formatVal","strArr","newVal","toFTransform","sign","RegExp","split2Arr","skew","scale","rotate","translate","matrixval","toFFontWeight","toFFontFamily","toConstraints","bcVal","maxWidth","minWidth","maxHeight","minHeight","toFBorderRadius","tl","tr","br","bl","toCamel","$0","$1","toUpperCase","toAxisAlignment","toFMarginPadding","top","right","bottom","left","createLineGradient","end","colors","c1","c2","getEnd","createRadialGradient","angle","cos","sin","createBgImage","size","repeat","position","result","toNameVal","toDecorationImage","String","match","inSplitStyles","transfromToCamelKey","transform","mainStyleKey","camelKey","Widget","children","parent","id","uuid","template","codeString","prop2","decoration","codelines","child","loop","addChild","depth","okey","oval","_transform","_transform2","_transform3","codeArr","getDepth","childStr","replaceTag","isNull","TAG","childToCodeString","propToCodeString","prop2ToCodeString","decorationToCodeString","selfToCodeString","clearAllPseudoTags","clearBlankLines","WidgetManager","cache","isFlex","_ref3","parseFlutter","widget","widgetManager","isPositioned","get","setProp","addChildTo","_ref2","isOpacity","_ref4","alignItems","justifyContent","isCenter","_ref5","isRow","_ref6","isColumn","_ref7","isTransform","isText","setProp2","isDecoration","setDecoration","getRoot","convert2Flutter","asyncToGenerator","regenerator_default","mark","_callee","ast","flutterStyle","wrap","_context","prev","next","process","sent","abrupt","t0","dumpLogError","stop","_x","apply","err","console","log","stack","OperatingArea","_this","_super","call","cssOptions","mode","dartOptions","cssVal","dartVal","convertAndUpdateDartCoder","updateCoder","_callee2","_context2","_callee3","_context3","setState","result_alert","row","col","span","coder","codeChangeHadler","es_button","onClick","clearBtnClickHandler","convertBtnClickHandler","Content","Layout","App","layout","components_logo","operating_area","ReactDOM","render","src_App","document","getElementById"],"mappings":"6JAAAA,EAAAC,QAAiBC,EAAAC,EAAuB,iSCwBzBC,EArBF,WACX,OACEC,EAAAC,EAAAC,cAAA,OAAKC,UAAU,QACbH,EAAAC,EAAAC,cAAA,OAAKC,U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C,cAACmW,GAAD,MAASC,SAASC,eAAe","file":"static/js/main.4bef6311.chunk.js","sourcesContent":["module.exports = __webpack_public_path__ + \"static/media/logo.5857ad01.png\";","import React from \"react\";\nimport logo from \"../assets/image/logo.png\";\n\nconst Logo = () => {\n return (\n
\n
\n \"\" Convert css style to flutter style\n
\n
\n Source code is here\n \n https://github.com/drawcall/c2f\n \n
\n
\n );\n};\n\nexport default Logo;\n","import React from \"react\";\nimport { UnControlled as CodeMirror } from \"react-codemirror2\";\n\nrequire(\"codemirror/lib/codemirror.css\");\nrequire(\"codemirror/theme/material.css\");\nrequire(\"codemirror/theme/monokai.css\");\nrequire(\"codemirror/mode/css/css.js\");\nrequire(\"codemirror/mode/dart/dart.js\");\n\nclass Coder extends React.Component {\n onChange(editor, data, value) {\n this.props.onChange && this.props.onChange(value);\n }\n\n render() {\n return (\n \n );\n }\n}\n\nexport default Coder;\n","import React from \"react\";\nimport { Alert } from \"antd\";\n\nclass ResultAlert extends React.Component {\n render() {\n return (\n
\n {false ? (\n \n ) : null}\n
\n );\n }\n}\n\nexport default ResultAlert;\n","import { message } from \"antd\";\n\nmessage.config({\n duration: 1,\n maxCount: 3\n});\n\nlet first = true;\nconst showMessage = (type, msg) => {\n if (first) {\n first = false;\n return;\n }\n\n if (type === \"success\") message.success(msg);\n else message.error(msg);\n};\n\nconst Message = {\n success(msg) {\n showMessage(\"success\", msg);\n },\n error(msg) {\n showMessage(\"error\", msg);\n }\n};\n\nexport default Message;\n","import clone from \"lodash/clone\";\n\nclass Decls {\n constructor() {\n this.decls = [];\n }\n\n add({ key, val, valueList = null, data = null }) {\n this.decls.push({ data, valueList, key, val });\n }\n\n isNull() {\n return this.decls.length === 0;\n }\n\n forEach(func) {\n this.decls.forEach((decl, index) => func(decl, index));\n }\n\n merge(decls) {\n for (let key in decls) {\n this.add({\n key,\n val: decls[key]\n });\n }\n }\n\n remove(key) {\n for (let i = this.decls.length - 1; i >= 0; i--) {\n if (this.decls[i][\"key\"] === key) {\n this.decls.splice(i, 1);\n }\n }\n }\n\n getVal(key, defaultVal) {\n let val = null;\n this.decls.forEach(decl => {\n if (decl.key === key) val = decl.val;\n });\n\n return val || defaultVal;\n }\n\n clone() {\n const cloneDecls = new Decls();\n cloneDecls.decls = clone(this.decls);\n\n return cloneDecls;\n }\n}\n\nexport default Decls;\n","import ppo from \"ppo\";\nimport toNumber from \"lodash/toNumber\";\nimport isNumber from \"lodash/isNumber\";\n\nconst isMulti = key => {\n if (key.indexOf(\"|\") > 0) return true;\n else return false;\n};\n\nconst findSimilarNumber = (n, rule) => {\n if (rule[n + \"\"]) return n;\n\n const nums = [];\n for (let key in rule) {\n nums.push(parseInt(key));\n }\n nums.sort((n1, n2) => n2 - n1);\n\n for (let i = 0; i < nums.length; i++) {\n const num = nums[i];\n if (n > num) return num;\n }\n\n return 0;\n};\n\nconst isNone = val => {\n if (!val) return true;\n\n if (typeof val === \"string\") {\n if (val.trim() === \"\") return true;\n if (val === \"null\") return true;\n if (val === \"none\") return true;\n if (val === \"inhert\") return true;\n }\n\n return false;\n};\n\nconst toNum = val => {\n if (isNumber(val)) return val;\n\n const r = /([-0-9.]+)[a-zA-Z%]/gi.exec(`${val}c`);\n if (r && r.length >= 2) {\n val = r[1];\n val = isNumber(val) ? val : parseFloat(val);\n return val;\n } else {\n return toNumber(val);\n }\n};\n\nconst toRadian = (val, fl = 3) => {\n let radian = val.toString().replace(/deg$/g, \"\");\n radian = (radian * Math.PI) / 180;\n return ppo.floor(radian, fl);\n};\n\nconst toRound = (val, n = 3) => {\n const d = Math.pow(10, n);\n const num = Math.round(val * d);\n return num / d;\n};\n\nexport { isMulti, isNone, toNum, findSimilarNumber, toRadian, toRound };\n","const SPLIT_MAPPING = {\n background: [\n \"background-color\",\n \"background-image\",\n \"background-position\",\n \"background-size\",\n \"background-repeat\"\n ],\n\n \"border-radius\": [\n \"border-top-left-radius\",\n \"border-top-right-radius\",\n \"border-bottom-right-radius\",\n \"border-bottom-left-radius\"\n ],\n\n \"text-decoration\": [\n \"text-decoration-line\",\n \"text-decoration-style\",\n \"text-decoration-color\"\n ],\n\n border: [\"border-width\", \"border-style\", \"border-color\"],\n\n padding: [\"padding-top\", \"padding-right\", \"padding-bottom\", \"padding-left\"],\n\n margin: [\"margin-top\", \"margin-right\", \"margin-bottom\", \"margin-left\"],\n\n font: [\n \"font-style\",\n \"font-weight\",\n \"font-size\",\n \"font-family\"\n ]\n};\n\nexport default SPLIT_MAPPING;\n","////////////////////////////////////////////////////////////////\n//\n// Jquery is used here because it is a nice style parser.\n//\n////////////////////////////////////////////////////////////////\n\nimport { isNone } from \"../../utils/num\";\nimport SPLIT_MAPPING from \"./split-mapping\";\nimport { getAvatarStyle, setAvatarStyle } from \"./avatar\";\n\nconst splitCssAttr = decls => {\n if (!decls) return null;\n\n let cloneDecls = decls.clone();\n for (let mainStyle in SPLIT_MAPPING) {\n cloneDecls = splitByMainStyle(cloneDecls, mainStyle, SPLIT_MAPPING[mainStyle]);\n }\n\n return cloneDecls;\n};\n\nconst splitByMainStyle = (decls, mainStyle, subStyles = []) => {\n const val = decls.getVal(mainStyle);\n if (val) {\n const allStyle = getAllStyle(decls);\n setAvatarStyle(allStyle);\n subStyles.forEach(style => addValToDecls(decls, style));\n decls.remove(mainStyle);\n }\n\n return decls;\n};\n\nconst addValToDecls = (decls, key) => {\n const val = getStyleVal(decls, key);\n if (!isNone(val)) decls.add({ key, val });\n};\n\nconst getStyleVal = (decls, key) => {\n let val = getAvatarStyle(key);\n if (isNone(val)) val = decls.getVal(key);\n return val;\n};\n\nconst getAllStyle = decls => {\n const style = {};\n decls.forEach(decl => {\n const key = decl[\"key\"];\n const val = decl[\"val\"];\n style[key] = val;\n });\n return style;\n};\n\nexport default splitCssAttr;\n","import $ from \"jquery\";\n\nconst setAvatarStyle = css => {\n $(\"#avator\")\n .removeClass()\n .removeAttr(\"style\")\n .css(css);\n};\n\nconst getAvatarStyle = key => {\n return $(\"#avator\").css(key);\n};\n\nexport { getAvatarStyle, setAvatarStyle };\n","import postcss from \"postcss\";\nimport Decls from \"./decls\";\nimport splitCssAttr from \"./split-cssattr\";\n\nconst parseCssDecls = root => {\n if (!root) return null;\n\n return new Promise(function (resolve, reject) {\n const decls = new Decls();\n\n root.walkDecls(decl => {\n const list = postcss.list.space(decl.value);\n\n decls.add({\n key: decl.prop,\n val: decl.value,\n data: decl,\n valueList: list\n });\n });\n\n\n setTimeout((decls) => {\n decls = splitCssAttr(decls);\n resolve(decls)\n }, 80, decls);\n });\n};\n\nexport default parseCssDecls;\n","const PROP = \"<-prop->\";\nconst PROP2 = \"<-prop2->\";\nconst CLASS = \"<-class->\";\nconst CHILDREN = \"<-children->\";\nconst DECO = \"<-decoration->\";\nconst TAB = \"<-tab->\";\nconst REAL_SPACE = \" \";\n\nconst CONTAINER = `\n Container(\n ${CHILDREN}\n ${PROP}\n ${DECO}\n),\n`.trim();\n\nconst TEXT = `\n Text(\n \"Hello World\",\n style: TextStyle(\n ${PROP}\n ),\n ${PROP2}\n),\n`.trim();\n\nconst CENTER = `\n Center(\n ${CHILDREN}\n),\n`.trim();\n\nconst ROW = `\n ROW(\n ${CHILDREN}\n ${PROP}\n),\n`.trim();\n\nconst COLUMN = `\n COLUMN(\n ${CHILDREN}\n ${PROP}\n),\n`.trim();\n\nconst POSITIONED = `\n Positioned(\n ${CHILDREN}\n ${PROP}\n),`;\n\nconst TRANSFORM = `\n Transform(\n ${CHILDREN}\n ${PROP}\n),`;\n\nconst OPACITY = `\n Opacity(\n ${CHILDREN}\n ${PROP}\n),`;\n\nexport {\n CONTAINER,\n TEXT,\n CHILDREN,\n DECO,\n CLASS,\n PROP,\n PROP2,\n CENTER,\n TAB,\n ROW,\n COLUMN,\n POSITIONED,\n TRANSFORM,\n OPACITY,\n REAL_SPACE\n};\n","/////////////////////////////////////////////////////////\n//\n//\tCodeArr\n//\t[\n// \"new Container(\" ,\n//\t \" child: new Text(\" ,\n//\t \" \"Hello World\",\"\n// ]\n//\n/////////////////////////////////////////////////////////\nimport { TAB } from \"./template\";\nimport clone from \"lodash/clone\";\n\nclass CodeArr {\n constructor(arr) {\n this.lines = arr || [];\n }\n\n add(key, code) {\n const index = this.getIndexOf(key);\n if (index > -1) {\n this.lines[index] = code;\n } else {\n this.lines.push(code);\n }\n this.enabled = true;\n }\n\n isNull() {\n return this.lines.length === 0;\n }\n\n getIndexOf(key) {\n for (let i = 0; i < this.lines.length; i++) {\n if (this.lines[i].indexOf(`${key}:`) > -1) return i;\n }\n return -1;\n }\n\n getTabs(n) {\n let tabs = \"\";\n for (let i = 0; i < n; i++) tabs += TAB;\n return tabs;\n }\n\n replaceTag(tag, newCode) {\n const cloneLines = clone(this.lines);\n\n for (let i = 0; i < this.lines.length; i++) {\n const code = this.lines[i];\n if (code.indexOf(tag) > -1) {\n cloneLines.splice(i, 0, newCode);\n }\n }\n this.lines = cloneLines;\n }\n\n toString(nspace = 0) {\n if (nspace === 0) {\n return this.lines.join(\"\\n\");\n } else {\n const tabs = this.getTabs(nspace);\n const str = this.lines.join(\"\\n\");\n const arr = str.split(/\\n/g);\n arr.forEach((line, index) => (arr[index] = tabs + line));\n\n return arr.join(\"\\n\");\n }\n }\n}\n\nexport default CodeArr;\n","import isNumber from \"lodash/isNumber\";\nimport isInteger from \"lodash/isInteger\";\nimport { toNum } from \"../../../utils/num\";\nimport { isNumerical, isPercentage, isPixel, isEm, isRem, isPt } from \"../../../utils/unit\";\n\nconst toFunit = val => {\n if (isNumber(val)) return val;\n\n val += \"\";\n\n // like \"250\"\n if (isNumerical(val)) {\n return toNum(val);\n }\n\n // like 50%\n else if (isPercentage(val)) {\n val = toNum(val) / 100;\n return `_parent_ * ${val} // percentage of parent width. like 'MediaQuery.of(context).size.width * 0.2'`;\n }\n\n // like 120px\n else if (isPixel(val)) {\n val = toNum(val);\n val = isInteger(val) ? `${val}.0` : `${val}`;\n return val;\n }\n\n // like 3.2em\n else if (isEm(val)) {\n val = toNum(val);\n return `_parent_font_width_ * ${val} // https://www.w3.org/Style/Examples/007/units`;\n }\n\n // like 10rem\n else if (isRem(val)) {\n val = toNum(val);\n return `_root_font_width_ * ${val} // https://www.w3.org/Style/Examples/007/units`;\n }\n\n // like 12pt\n else if (isPt(val)) {\n val = toNum(val);\n return `${val} * 72 / _dpi_ // pt = px * dpi / 72`;\n } else {\n return 0;\n }\n};\n\nexport default toFunit;\n","const isNumerical = val => /^([0-9]+)$/gi.test(val.toString());\n\nconst isPercentage = val => /([0-9]+)%$/gi.test(val);\n\nconst isPixel = val => /([0-9]+)(px|dpx)$/gi.test(val);\n\nconst isEm = val => /([0-9]+)em$/gi.test(val);\n\nconst isRem = val => /([0-9]+)rem$/gi.test(val);\n\nconst isPt = val => /([0-9]+)pt$/gi.test(val);\n\nexport { isNumerical, isPercentage, isPixel, isPt, isEm, isRem };\n","import color from \"color\";\n\nconst toFColor = val => {\n try {\n val = typeof val === \"string\" ? val.trim() : val;\n const c16 = color(val)\n .hex()\n .replace(/^#/, \"0x\");\n\n return `Color(${c16}00)`;\n } catch (e) {\n const c16 = (val + \"\").replace(/^#/, \"0x\");\n return `Color(${c16}00)`;\n }\n};\n\nexport default toFColor;\n","import toFunit from \"./unit\";\nimport toColor from \"./color\";\n\nconst toFBorder = (val, decls) => {\n let width = decls.getVal(\"border-width\", \"1px\");\n let color = decls.getVal(\"border-color\", \"blue\");\n let style = decls.getVal(\"border-style\", \"solid\");\n\n width = toFunit(width);\n color = toColor(color);\n\n return `\nBorder.all(\n color: ${color},\n width: ${width},\n style: BorderStyle.${style}\n)`.trim();\n};\n\nexport default toFBorder;\n","import trim from \"lodash/trim\";\nimport toFunit from \"./unit\";\nimport toColor from \"./color\";\n\n// 0 2px 4px rgba(0, 0, 0, 0.8);\nconst toBoxShadow = val => {\n let shadows = \"\";\n val = replaceRbga2Sign(val);\n const arr = val.split(\",\");\n for (let i = 0; i < arr.length; i++) {\n const shadowStr = replaceSign2Rgba(trim(arr[i]));\n const shadow = createBoxShadow(shadowStr);\n shadows += \"\\n\" + shadow;\n }\n\n return `\n[\n${shadows}\n]`.trim();\n};\n\nconst createBoxShadow = val => {\n val = toArray(val);\n const x = toFunit(val[0]);\n const y = toFunit(val[1]);\n const offset = `Offset(${x}, ${y})`;\n const color = toColor(val[3] || \"#000000\");\n const blurRadius = toFunit(val[2] || 10);\n\n return `\n BoxShadow (\n color: ${color},\n offset: ${offset},\n blurRadius: ${blurRadius},\n ),`;\n};\n\n/// replaceRbga2Sign and replaceSign2Rgba\nlet i = 0;\nconst rgbas = {};\nconst replaceRbga2Sign = str => {\n return str.replace(/rgba?\\((\\d+),\\s*(\\d+),\\s*(\\d+)(?:,\\s*(\\d+(?:\\.\\d+)?))?\\)/gi, val => {\n const key = `__${i++}__`;\n rgbas[key] = val;\n return key;\n });\n};\n\nconst replaceSign2Rgba = str => {\n for (let key in rgbas) {\n str = str.replace(key, rgbas[key]);\n }\n return str;\n};\n\nconst toArray = val => {\n let arr = val.trim().split(\" \");\n if (arr.length > 4) {\n let str = \"\";\n for (let i = 3; i < arr.length; i++) {\n str += arr[i];\n }\n\n arr = arr.slice(0, 4);\n arr[3] = str;\n }\n\n return arr;\n};\n\nexport default toBoxShadow;\n","import trim from \"lodash/trim\";\nimport { split2Arr } from \"../../../utils/arr\";\nimport { toNum, toRadian } from \"../../../utils/num\";\n\n// skewX(25deg) rotate3d(180deg,0,1) scale3d(2,2,1) translate3d(10px,10px,0px);\nconst toFTransform = val => {\n val = trim(val);\n if (/^matrix/gi.test(val)) {\n return val.replace(\"matrix\", \"Matrix4\");\n } else {\n const arr = split2Arr(val);\n\n let skew = findFromProp(\"skew\", arr);\n let scale = findFromProp(\"scale\", arr);\n let rotate = findFromProp(\"rotate\", arr);\n let translate = findFromProp(\"translate\", arr);\n\n let matrixval = \"\";\n skew = formatVal(\"skew\", skew);\n scale = formatVal(\"scale\", scale);\n rotate = formatVal(\"rotate\", rotate);\n translate = formatVal(\"translate\", translate);\n\n if (skew) matrixval += `${skew}..`;\n if (scale) matrixval += `${scale}..`;\n if (rotate) matrixval += `${rotate}..`;\n if (translate) matrixval += `${translate}..`;\n matrixval = matrixval.replace(/\\.\\.$/g, \"\");\n\n return `Matrix4.${matrixval}`;\n }\n};\n\nconst findFromProp = (name, arr) => {\n for (let i = 0; i < arr.length; i++) {\n if (arr[i].indexOf(name) > -1) {\n return arr[i];\n }\n }\n return null;\n};\n\nconst formatVal = (key, val) => {\n if (!val) return null;\n\n const r = /[a-zA-Z]+\\((.*)\\)/.exec(val);\n if (r && r.length >= 2) {\n let str = r[1];\n let strArr = str.split(\",\");\n let arr = [];\n\n if (key === \"rotate\") {\n const radian = toRadian(str);\n val = val.replace(str, radian);\n } else {\n strArr.forEach(n => {\n n = toNum(n);\n arr.push(n);\n });\n const newVal = arr.join(\",\");\n val = val.replace(\"3d\", \"\").replace(str, newVal);\n }\n }\n\n return val;\n};\n\nexport default toFTransform;\n","const split2Arr = (val, sign = \")\") => {\n const arr = val.split(`${sign} `);\n for (let i = 0; i < arr.length; i++) {\n const str = arr[i];\n const reg = new RegExp(`\\\\${sign}$`, \"gi\");\n if (!reg.test(str)) arr[i] = str + sign;\n }\n return arr;\n};\n\nexport { split2Arr };\n","//import toNumber from \"lodash/toNumber\";\n\nconst toFFontWeight = val => {\n if (val === \"bold\" || val === \"normal\") {\n return `FontWeight.${val}`;\n } else if (/^[1-9]00/.test(val + \"\")) {\n return `FontWeight.w${val}`;\n } else {\n return `FontWeight.normal`;\n }\n};\n\nexport default toFFontWeight;\n","import { addQuotes } from \"../../../utils/str\";\n\nconst toFFontFamily = val => {\n if (/^(\"|')/gi.test(val) && !/(\"|')$/gi.test(val)) {\n val = val.replace(/'/g, '\"');\n val = val.split('\"')[1];\n }\n\n return addQuotes(val);\n};\n\nexport default toFFontFamily;\n","const addQuotes = str => {\n if (!/^(\"|')/gi.test(str)) {\n str = `\"${str}\"`;\n }\n return str;\n};\n\nconst getLast = str => {\n return str.charAt(str.length - 1);\n};\n\nexport { addQuotes, getLast };\n","import toFunit from \"./unit\";\n\nconst toConstraints = (val, decls) => {\n let bcVal = \"\";\n let maxWidth = decls.getVal(\"max-width\");\n let minWidth = decls.getVal(\"min-width\");\n let maxHeight = decls.getVal(\"max-height\");\n let minHeight = decls.getVal(\"min-height\");\n\n if (maxWidth) {\n bcVal += `maxWidth: ${toFunit(maxWidth)}`;\n }\n\n if (minWidth) {\n bcVal += `, minWidth: ${toFunit(minWidth)}`;\n }\n\n if (maxHeight) {\n bcVal += `, maxHeight: ${toFunit(maxHeight)}`;\n }\n\n if (minHeight) {\n bcVal += `, minHeight: ${toFunit(minHeight)}`;\n }\n\n bcVal = bcVal.replace(/^,/g, \"\");\n return `BoxConstraints(${bcVal})`;\n};\n\nexport default toConstraints;\n","import toFunit from \"./unit\";\n\nconst toFBorderRadius = (val, decls) => {\n let tl = decls.getVal(\"border-top-left-radius\", 0);\n let tr = decls.getVal(\"border-top-right-radius\", 0);\n let br = decls.getVal(\"border-bottom-right-radius\", 0);\n let bl = decls.getVal(\"border-bottom-left-radius\", 0);\n\n if (tl === tr && tr === br && br === bl) {\n if (tl === \"50%\") {\n return `BoxShape.circle`;\n } else {\n return `BorderRadius.all(const Radius.circular(${toFunit(tl)}))`;\n }\n } else {\n let tl = toFunit(val[0]);\n let tr = toFunit(val[1]);\n let br = toFunit(val[2]);\n let bl = toFunit(val[3]);\n\n tl = `topLeft: Radius.circular(${tl})`;\n tr = `topRight: Radius.circular(${tr})`;\n br = `bottomRight: Radius.circular(${br})`;\n bl = `bottomLeft: Radius.circular(${bl})`;\n\n return `BorderRadius.only(${tl}, ${tr}, ${br}, ${bl})`;\n }\n};\n\nexport default toFBorderRadius;\n","const toCamel = val => {\n let re = /-(\\w)/g;\n return val.replace(re, function ($0, $1) {\n return $1.toUpperCase();\n });\n};\n\nexport default toCamel;\n","import toCamel from \"../../../utils/camel\";\n\nconst toAxisAlignment = val => {\n val = val.replace(/flex-/, \"\");\n return `${toCamel(val)}`;\n};\n\nexport default toAxisAlignment;\n","import toFunit from \"./unit\";\n\nconst toFMarginPadding = (key, val, decls) => {\n let top = decls.getVal(`${key}-top`, 0);\n let right = decls.getVal(`${key}-right`, 0);\n let bottom = decls.getVal(`${key}-bottom`, 0);\n let left = decls.getVal(`${key}-left`, 0);\n\n if (top === right && right === bottom && bottom === left) {\n top = toFunit(top);\n\n return `const EdgeInsets.all(${top})`;\n } else {\n top = toFunit(top);\n right = toFunit(right);\n bottom = toFunit(bottom);\n left = toFunit(left);\n\n return `const EdgeInsets.only(top: ${top}, right: ${right}, bottom: ${bottom}, left: ${left})`;\n }\n};\n\nexport default toFMarginPadding;\n","import toColor from \"./color\";\nimport toCamel from \"../../../utils/camel\";\nimport { toNameVal } from \"../../../utils/pos\";\nimport { toRound, toRadian } from \"../../../utils/num\";\n\nconst toDecorationImage = (val, decls) => {\n val = String(val);\n\n /// background-image = linear-gradient\n if (/^linear-gradient/gi.test(val)) {\n return createLineGradient(val, decls);\n }\n\n if (/^radial-gradient/gi.test(val)) {\n return createRadialGradient(val, decls);\n }\n\n /// background-image - a.jpg\n else {\n return createBgImage(val, decls);\n }\n};\n\nconst createLineGradient = (val, decls) => {\n const colors = [];\n let end;\n const arr = val\n .replace(/^[a-zA-Z]+-gradient/gi, \"\")\n .replace(\"(\", \"\")\n .replace(\")\", \"\")\n .split(\",\");\n\n if (arr.length > 2) {\n const d = arr[0];\n end = d.replace(\"to\", \"\").trim();\n for (let i = 1; i < arr.length; i++) {\n colors.push(toColor(arr[i]));\n }\n } else {\n end = \"bottom\";\n const c1 = arr[0];\n const c2 = arr[1] || arr[0];\n colors.push(toColor(c1));\n colors.push(toColor(c2));\n }\n\n return `\nLinearGradient(\n begin: Alignment(0.0, 0.0),\n end: ${getEnd(end)},\n colors: [${colors}],\n)`.trim();\n};\n\nconst createRadialGradient = (val, decls) => {\n const colors = [];\n const arr = val\n .replace(/^[a-zA-Z]+-gradient/gi, \"\")\n .replace(\"(\", \"\")\n .replace(\")\", \"\")\n .split(\",\");\n\n for (let i = 0; i < arr.length; i++) {\n if (/^(circle|farthest|closest|ellipse)/.test(arr[i])) continue;\n colors.push(toColor(arr[i]));\n }\n\n return `\nRadialGradient(\n colors: [${colors}]\n)`.trim();\n};\n\nconst getEnd = end => {\n let angle;\n let n = 20;\n if (end === \"right\") {\n angle = toRadian(90, n);\n } else if (end === \"top\") {\n angle = toRadian(0, n);\n } else if (end === \"left\") {\n angle = toRadian(-90, n);\n } else if (end === \"bottom\") {\n angle = toRadian(180, n);\n } else {\n angle = toRadian(end, n);\n }\n\n angle -= Math.PI / 2;\n const x = toRound(Math.cos(angle));\n const y = toRound(Math.sin(angle));\n return `Alignment(${x}, ${y})`;\n};\n\nconst createBgImage = (val, decls) => {\n val = val.replace(/^url\\(/g, \"\").replace(/\\)$/g, \"\");\n if (!/^('|\")/.test(val)) val = `\"${val}\"`;\n\n const size = decls.getVal(\"background-size\", \"cover\");\n let repeat = decls.getVal(\"background-repeat\", \"no-repeat\");\n repeat = toCamel(repeat);\n let position = decls.getVal(\"background-position\", \"center\");\n position = toNameVal(position);\n\n return `\nDecorationImage(\n image: ExactAssetImage(${val}),\n fit: BoxFit.${size},\n repeat: ImageRepeat.${repeat},\n)`.trim();\n};\n\nexport default toDecorationImage;\n","import toCamel from \"./camel\";\n\nconst isPercentage = val => {\n if (val.indexOf(\"%\") > 0) {\n return true;\n }\n return false;\n};\n\nconst isName = val => {\n const keynames = \"left|center|bottom|top|right\".split(\"|\");\n for (let i = 0; i < keynames.length; i++) {\n if (val.indexOf(keynames[i]) === 0) {\n return true;\n }\n }\n return false;\n};\n\n// 0% 50% -> leftCenter\n// center left -> centerLeft\nconst toNameVal = val => {\n let result = \"\";\n if (isPercentage(val)) {\n const arr = val.split(\" \");\n for (let i = 0; i < arr.length; i++) {\n if (i === 0) {\n if (arr[i] === \"0%\") {\n result += \"top\";\n } else if (arr[i] === \"50%\") {\n result += \"center\";\n } else {\n result += \"bottom\";\n }\n } else {\n if (arr[i] === \"0%\") {\n result += \"-left\";\n } else if (arr[i] === \"50%\") {\n result += \"-center\";\n } else {\n result += \"-right\";\n }\n }\n }\n } else {\n result.replace(/\\s/gi, \"-\");\n }\n\n result = toCamel(result);\n result = result === \"centerCenter\" ? \"center\" : result;\n return result;\n};\n\nexport { isPercentage, isName, toNameVal };\n","import toFunit from \"./transform/unit\";\nimport toFColor from \"./transform/color\";\nimport toFBorder from \"./transform/border\";\nimport toBoxShadow from \"./transform/boxshadow\";\nimport toFTransform from \"./transform/transform\";\nimport toFFontWeight from \"./transform/font-weight\";\nimport toFFontFamily from \"./transform/font-family\";\nimport toConstraints from \"./transform/constraints\";\nimport toFBorderRadius from \"./transform/border-radius\";\nimport toAxisAlignment from \"./transform/axis-alignment\";\nimport toFMarginPadding from \"./transform/marginpadding\";\nimport toDecorationImage from \"./transform/background-image\";\nimport SPLIT_MAPPING from \"../css/split-mapping\";\nimport toCamel from \"../../utils/camel\";\n\nconst transform = (key, val, decls) => {\n const result = { key: null, val };\n\n switch (true) {\n // background-image color ------------------------\n case match(key, \"background-image\"):\n result[\"key\"] = /^[a-zA-Z]+-gradient/gi.test(val) ? \"gradient\" : \"image\";\n result[\"val\"] = toDecorationImage(val, decls);\n break;\n\n case match(key, \"background-color\", \"color\"):\n result[\"val\"] = toFColor(val);\n if (val === \"rgba(0, 0, 0, 0)\") {\n result[\"key\"] = null;\n } else {\n result[\"key\"] = \"color\";\n }\n\n break;\n\n // width & height ------------------------\n case match(key, \"width\", \"height\"):\n result[\"key\"] = key;\n result[\"val\"] = toFunit(val);\n break;\n\n // left & right ------------------------\n case match(key, \"top\", \"right\", \"left\", \"bottom\"):\n result[\"key\"] = key;\n result[\"val\"] = toFunit(val);\n break;\n\n // max-width & min-width ------------------------\n case match(key, \"max-width\", \"min-width\"):\n case match(key, \"max-height\", \"min-height\"):\n result[\"key\"] = \"constraints\";\n result[\"val\"] = toConstraints(val, decls);\n break;\n\n // text decoration style ------------------------\n case match(key, \"text-decoration-line\"):\n result[\"val\"] = `TextDecoration.${toCamel(val)}`;\n break;\n\n case match(key, \"text-decoration-color\"):\n result[\"val\"] = toFColor(val);\n break;\n\n case match(key, \"text-decoration-style\"):\n result[\"val\"] = `TextDecorationStyle.${val}`;\n break;\n\n case match(key, \"text-align\"):\n result[\"val\"] = `TextAlign.${val}`;\n break;\n\n case match(key, \"font-style\"):\n result[\"val\"] = `FontStyle.${val}`;\n break;\n\n case match(key, \"font-weight\"):\n result[\"val\"] = toFFontWeight(val);\n break;\n\n case match(key, \"font-size\"):\n case match(key, \"letter-spacing\"):\n result[\"val\"] = toFunit(val);\n break;\n\n case match(key, \"font-family\"):\n result[\"val\"] = toFFontFamily(val);\n break;\n\n // padding margin ------------------------\n case match(key, \"padding\", \"margin\"):\n const mainStyleKey = key.replace(/-[a-zA-Z]+$/, \"\");\n result[\"key\"] = mainStyleKey;\n result[\"val\"] = toFMarginPadding(mainStyleKey, val, decls);\n break;\n\n // align items ------------------------\n case match(key, \"justify-content\"):\n result[\"key\"] = \"mainAxisAlignment\";\n result[\"val\"] = `MainAxisAlignment.${toAxisAlignment(val)}`;\n break;\n\n case match(key, \"align-items\"):\n result[\"key\"] = \"crossAxisAlignment\";\n result[\"val\"] = `CrossAxisAlignment.${toAxisAlignment(val)}`;\n break;\n\n // transform ------------------------\n case match(key, \"transform\"):\n result[\"key\"] = \"transform\";\n result[\"val\"] = toFTransform(val);\n break;\n\n // border related ------------------------\n case match(key, \"border-radius\"):\n result[\"val\"] = toFBorderRadius(val, decls);\n result[\"key\"] =\n result[\"val\"] === \"BoxShape.circle\" ? \"shape\" : \"borderRadius\";\n break;\n\n case match(key, \"border\"):\n result[\"key\"] = \"border\";\n result[\"val\"] = toFBorder(val, decls);\n break;\n\n // box-shadow ------------------------\n case match(key, \"box-shadow\"):\n result[\"key\"] = \"boxShadow\";\n result[\"val\"] = toBoxShadow(val);\n break;\n\n // opacity ------------------------\n case match(key, \"opacity\"):\n result[\"key\"] = key;\n result[\"val\"] = val;\n break;\n\n default:\n // Didn't match any test\n break;\n }\n\n // to camel key\n const camelKey = transfromToCamelKey(key);\n if (camelKey) result[\"key\"] = camelKey;\n\n return result;\n};\n\n/////////////////////////////////////////////////////////\n//\n//\tmatch key\n//\n/////////////////////////////////////////////////////////\nconst match = (key, ...rest) => {\n for (let i = 0; i < rest.length; i++) {\n if (key === rest[i]) return true;\n if (inSplitStyles(key, rest[i])) return true;\n }\n\n return false;\n};\n\nconst inSplitStyles = (key, sign) => {\n const subStyles = SPLIT_MAPPING[sign];\n if (!subStyles) return null;\n\n for (let i = 0; i < subStyles.length; i++) {\n if (key === subStyles[i]) return sign;\n }\n return null;\n};\n\n/////////////////////////////////////////////////////////\n//\n//\ttransfrom camel key\n//\n/////////////////////////////////////////////////////////\nconst transfromToCamelKey = key => {\n if (key === \"letter-spacing\") {\n return toCamel(key);\n }\n\n if (/^font-[a-zA-Z]+/gi.test(key) || /^text-[a-zA-Z]+/gi.test(key)) {\n return toCamel(key);\n }\n\n if (/^text-decoration.*/gi.test(key)) {\n return toCamel(key.replace(/^text-/gi, \"\"));\n }\n\n return null;\n};\n\nexport default transform;\n","import ppo from \"ppo\";\nimport CodeArr from \"./code-arr\";\nimport transform from \"./transform\";\nimport {\n CONTAINER,\n TEXT,\n CHILDREN,\n TAB,\n ROW,\n COLUMN,\n CLASS,\n PROP,\n PROP2,\n DECO,\n OPACITY,\n POSITIONED,\n TRANSFORM,\n REAL_SPACE,\n CENTER\n} from \"./template\";\n\nclass Widget {\n constructor(type) {\n this.children = [];\n this.type = type;\n this.decls = null;\n this.parent = null;\n this.id = ppo.uuid();\n\n switch (type) {\n case \"container\":\n this.template = CONTAINER;\n break;\n\n case \"position\":\n this.template = POSITIONED;\n break;\n\n case \"transform\":\n this.template = TRANSFORM;\n break;\n\n case \"opacity\":\n this.template = OPACITY;\n break;\n\n case \"text\":\n this.template = TEXT;\n break;\n\n case \"center\":\n this.template = CENTER;\n break;\n\n case \"row\":\n this.template = ROW;\n break;\n\n case \"column\":\n this.template = COLUMN;\n break;\n\n default:\n this.template = CONTAINER;\n }\n\n this.codeString = \"\";\n this.prop = new CodeArr();\n this.prop2 = new CodeArr();\n this.decoration = new CodeArr();\n this.codelines = new CodeArr(this.template.split(/\\n/g));\n }\n\n addChild(child) {\n if (this.children.indexOf(child) < 0) {\n this.children.push(child);\n child.parent = this;\n }\n }\n\n addChildTo(parent) {\n if (this.parent === parent) return;\n\n const loop = target => {\n if (!target.parent) {\n parent.addChild(target);\n } else {\n loop(target.parent);\n }\n };\n\n this.root = parent;\n loop(this);\n }\n\n getRoot() {\n return this.root || this;\n }\n\n getDepth() {\n let depth = 0;\n const loop = target => {\n if (target.parent) {\n depth++;\n loop(target.parent);\n }\n };\n loop(this);\n\n return depth;\n }\n\n /// set prop --------------------------------\n setProp(okey, oval) {\n let { key, val } = transform(okey, oval, this.decls);\n if (!key) return;\n\n const code =\n this.type === \"text\" ? ` ${key}: ${val},` : `${key}: ${val},`;\n this.prop.add(key, code);\n }\n\n /// set prop2 --------------------------------\n setProp2(okey, oval) {\n let { key, val } = transform(okey, oval, this.decls);\n if (!key) return;\n const code = this.type === \"text\" ? ` ${key}: ${val},` : `${key}: ${val},`;\n this.prop2.add(key, code);\n }\n\n /// set Decoration --------------------------------\n setDecoration(okey, oval) {\n let { key, val } = transform(okey, oval, this.decls);\n if (!key) return;\n\n const code = `${key}: ${val},`;\n this.decoration.add(key, code);\n }\n\n clearAllPseudoTags() {\n this.codeString = this.codeString\n .replace(new RegExp(CHILDREN, \"g\"), \"\")\n .replace(new RegExp(CLASS, \"g\"), \"\")\n .replace(new RegExp(PROP, \"g\"), \"\")\n .replace(new RegExp(PROP2, \"g\"), \"\")\n .replace(new RegExp(DECO, \"g\"), \"\")\n .replace(new RegExp(TAB, \"g\"), REAL_SPACE);\n }\n\n clearBlankLines() {\n const codeArr = this.codeString.split(/\\n/g);\n for (let i = codeArr.length - 1; i >= 0; i--) {\n const line = codeArr[i].trim();\n if (!line) codeArr.splice(i, 1);\n }\n\n this.codeString = codeArr.join(\"\\n\");\n }\n\n /// Convert various elements to CodeString ----------------------------\n selfToCodeString() {\n const depth = this.getDepth();\n //const tabs = child.codelines.getTabs(depth);\n\n this.codeString = this.codelines.toString(depth);\n }\n\n childToCodeString(child) {\n const childStr = child.toString().trim();\n this.replaceTag(CHILDREN, ` child: ${childStr}`);\n }\n\n propToCodeString() {\n if (this.prop.isNull()) return;\n const nspace = this.type === \"text\" ? 0 : 1;\n this.replaceTag(PROP, this.prop.toString(nspace));\n }\n\n prop2ToCodeString() {\n if (this.prop2.isNull()) return;\n this.replaceTag(PROP2, this.prop2.toString(0));\n }\n\n decorationToCodeString() {\n if (this.decoration.isNull()) return;\n\n let decoration = this.decoration.toString(2);\n decoration = ` decoration: BoxDecoration(\n${decoration}\n )`;\n\n this.replaceTag(DECO, decoration);\n }\n\n replaceTag(TAG, code) {\n this.codelines.replaceTag(TAG, code);\n }\n\n toString() {\n if (this.children.length > 0) {\n if (this.children.length === 1) {\n const child = this.children[0];\n this.childToCodeString(child);\n } else {\n for (let i = 0; i < this.children; i++) {}\n }\n }\n\n // merge code string\n this.propToCodeString();\n this.prop2ToCodeString();\n this.decorationToCodeString();\n this.selfToCodeString();\n this.clearAllPseudoTags();\n this.clearBlankLines();\n\n return this.codeString || \"\";\n }\n}\n\nclass WidgetManager {\n constructor() {\n this.cache = {};\n }\n\n get({ type, target }) {\n const { cache } = this;\n const key = `_${target}.${type}`;\n if (!cache[key]) cache[key] = new Widget(type);\n return cache[key];\n }\n}\n\nexport { Widget, WidgetManager };\n","/////////////////////////////////////////////////////////\n//\n//\tFilter Func\n//\n/////////////////////////////////////////////////////////\nconst isText = key => {\n if (key.indexOf(\"font\") === 0) {\n return true;\n } else if (key.indexOf(\"text-\") === 0) {\n return true;\n } else if (key === \"color\" || key === \"letter-spacing\") {\n return true;\n } else {\n return false;\n }\n};\n\nconst isDecoration = key => {\n if (\n key === \"background-image\" ||\n key === \"background-color\" ||\n key === \"border\" ||\n key === \"box-shadow\"\n ) {\n return true;\n } else if (key.indexOf(\"border\") >= 0) {\n return true;\n } else {\n return false;\n }\n};\n\nconst isPositioned = ({ key, val, decls }) => {\n const position = decls.getVal(\"position\");\n const hasPosition = position === \"absolute\" || position === \"fixed\";\n\n const isTLRBAttr =\n hasPosition &&\n (key === \"top\" || key === \"left\" || key === \"right\" || key === \"bottom\");\n const isPositionAttr =\n key === \"position\" && (val === \"absolute\" || val === \"fixed\");\n\n if (isTLRBAttr || isPositionAttr) {\n return true;\n }\n return false;\n};\n\nconst isOpacity = ({ key, val, decls }) => {\n if (key === \"opacity\") return true;\n return false;\n};\n\nconst isFlex = ({ key, val, decls }) => {\n if (/^flex/.test(key)) return true;\n if (key === \"display\" && /flex/gi.test(val)) return true;\n if (key === \"justify-content\" || key === \"align-items\") return true;\n return false;\n};\n\nconst isCenter = ({ key, val, decls }) => {\n if (isFlex({ key, val, decls })) {\n const alignItems = decls.getVal(\"align-items\");\n const justifyContent = decls.getVal(\"justify-content\");\n if (alignItems === \"center\" && justifyContent === \"center\") return true;\n }\n return false;\n};\n\nconst isRow = ({ key, val, decls }) => {\n if (isFlex({ key, val, decls })) {\n const direction = decls.getVal(\"flex-direction\", \"row\");\n if (direction === \"row\") return true;\n }\n return false;\n};\n\nconst isColumn = ({ key, val, decls }) => {\n if (isFlex({ key, val, decls })) {\n const direction = decls.getVal(\"flex-direction\", \"row\");\n if (direction === \"column\") return true;\n }\n return false;\n};\n\nconst isTransform = ({ key, val, decls }) => {\n if (key && /transform$/gi.test(key)) return true;\n return false;\n};\n\nexport {\n isText,\n isDecoration,\n isPositioned,\n isOpacity,\n isTransform,\n isFlex,\n isColumn,\n isCenter,\n isRow\n};\n","import { Widget, WidgetManager } from \"./widget\";\nimport {\n isRow,\n isCenter,\n isColumn,\n isText,\n isDecoration,\n isPositioned,\n isOpacity,\n isTransform\n} from \"./filter\";\n\nconst parseFlutter = decls => {\n if (!decls || decls.isNull()) return \"\";\n\n let widget = new Widget(\"container\");\n widget.decls = decls;\n const widgetManager = new WidgetManager();\n\n decls.forEach((decl, index) => {\n let key = decl[\"key\"];\n let val = decl[\"val\"];\n\n /// parent widget ---------------------------------------------\n // Positioned\n if (isPositioned({ key, val, decls })) {\n const parent = widgetManager.get({ target: \"parent\", type: \"position\" });\n parent.setProp(key, val);\n widget.addChildTo(parent);\n }\n\n // Opacity\n else if (isOpacity({ key, val, decls })) {\n const parent = widgetManager.get({ target: \"parent\", type: \"opacity\" });\n parent.setProp(key, val);\n widget.addChildTo(parent);\n }\n\n // Flex isCenter\n else if (isCenter({ key, val, decls })) {\n const parent = widgetManager.get({ target: \"parent\", type: \"center\" });\n parent.setProp(key, val);\n widget.addChildTo(parent);\n }\n\n // Flex Row\n else if (isRow({ key, val, decls })) {\n const parent = widgetManager.get({ target: \"parent\", type: \"row\" });\n parent.setProp(key, val);\n widget.addChildTo(parent);\n }\n\n // Flex Column\n else if (isColumn({ key, val, decls })) {\n const parent = widgetManager.get({ target: \"parent\", type: \"column\" });\n parent.setProp(key, val);\n widget.addChildTo(parent);\n }\n\n // Transform\n else if (isTransform({ key, val, decls })) {\n const parent = widgetManager.get({ target: \"parent\", type: \"transform\" });\n parent.setProp(key, val);\n widget.addChildTo(parent);\n }\n\n /// child widget ---------------------------------------------\n // text\n else if (isText(key)) {\n const child = widgetManager.get({ target: \"child\", type: \"text\" });\n const keys = [\"text-align\"];\n if (keys.indexOf(key) > -1) {\n child.setProp2(key, val);\n } else {\n child.setProp(key, val);\n }\n widget.addChild(child);\n }\n\n /// self widget ---------------------------------------------\n // decoration\n else if (isDecoration(key)) {\n widget.setDecoration(key, val);\n }\n\n // prop\n else {\n widget.setProp(key, val);\n }\n });\n\n return widget.getRoot().toString();\n};\n\nexport default parseFlutter;\n","import postcss from \"postcss\";\nimport Message from \"../message/message\";\nimport parseCssDecls from \"./css/parse\";\nimport parseFlutter from \"./flutter/parse\";\n\nconst convert2Flutter = async css => {\n try {\n const ast = await postcss([\n require(\"postcss-transform-shortcut\")({})\n // require(\"postcss-short-border-radius\")()\n ]).process(css);\n\n const decls = await parseCssDecls(ast.root);\n const flutterStyle = parseFlutter(decls);\n\n if (flutterStyle !== \"\") Message.success(\"Has been converted successfully!\");\n\n return flutterStyle;\n } catch (err) {\n const msg = dumpLogError(err);\n Message.error(msg);\n\n return \"\";\n }\n};\n\nconst dumpLogError = err => {\n let msg;\n if (typeof err === \"object\") {\n if (err.message) {\n msg = \"C2F - Message: \" + err.message;\n console.log(`\\n ${msg}`);\n }\n if (err.stack) {\n msg = msg || \"C2F - Convert css 2 flutter error !\";\n console.log(\"\\nC2F - Stacktrace:\");\n console.log(\"====================\");\n console.log(err.stack);\n }\n } else {\n msg = \"C2F - Convert css 2 flutter error !\";\n console.log(\"C2F - dumpError :: argument is not an object\");\n }\n\n return msg;\n};\n\nexport default convert2Flutter;\n","import React from \"react\";\nimport Coder from \"./coder\";\nimport { Row, Col, Button } from \"antd\";\nimport ResultAlert from \"./result-alert\";\nimport Message from \"../service/message/message\";\nimport convert2Flutter from \"../service/convert/converter\";\n\nclass OperatingArea extends React.Component {\n constructor(props) {\n super(props);\n\n this.cssOptions = {\n mode: \"css\"\n //theme: 'monokai'\n };\n\n this.dartOptions = {\n mode: \"dart\"\n };\n\n this.cssVal = \"\";\n this.dartVal = \"\";\n }\n\n async componentDidMount() {\n this.cssVal = `\nbackground-color: #e0e0e0;\nwidth: 320px;\nheight: 240px;\nborder:5px solid red;\nfont: 900 24px Georgia;\npadding: 2px 10px;\nmargin: 3px;\nborder-radius: 10px;\ntext-decoration: underline wavy red;\n `.trim();\n\n await this.convertAndUpdateDartCoder();\n }\n\n clearBtnClickHandler(e) {\n this.updateCoder({ cssVal: \"\", dartVal: \"\" });\n Message.success(\"Cleared successfully\");\n }\n\n async convertBtnClickHandler(e) {\n await this.convertAndUpdateDartCoder();\n }\n\n codeChangeHadler(value) {\n this.cssVal = value;\n }\n\n async convertAndUpdateDartCoder() {\n const dartVal = await convert2Flutter(this.cssVal);\n this.updateCoder({ dartVal });\n }\n\n updateCoder({ cssVal, dartVal }) {\n if (dartVal !== undefined && dartVal !== null) this.dartVal = dartVal;\n if (cssVal !== undefined && cssVal !== null) this.cssVal = cssVal;\n\n this.setState({});\n }\n\n render() {\n return (\n
\n \n \n \n
Css
\n \n \n\n \n
Flutter
\n \n \n
\n\n \n \n \n Convert\n \n \n
\n );\n }\n}\n\nexport default OperatingArea;\n","import React from \"react\";\nimport { Layout } from \"antd\";\nimport Logo from \"./components/logo\";\nimport OperatingArea from \"./components/operating-area\";\n\nimport \"./App.css\";\n\nconst { Content } = Layout;\n\nfunction App() {\n return (\n
\n \n \n \n \n
\n
\n
\n
\n );\n}\n\nexport default App;\n","import React from \"react\";\nimport ReactDOM from \"react-dom\";\nimport \"./index.css\";\nimport App from \"./App\";\n// import * as serviceWorker from './serviceWorker';\n\nReactDOM.render(, document.getElementById(\"root\"));\n\n// If you want your app to work offline and load faster, you can change\n// unregister() to register() below. Note this comes with some pitfalls.\n// Learn more about service workers: https://bit.ly/CRA-PWA\n// serviceWorker.register();\n"],"sourceRoot":""}