You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
10 KiB
1 line
10 KiB
{"ast":null,"code":"import normalizeColor from \"./compiler/normalizeColor\";\nimport normalizeValueWithProperty from \"./compiler/normalizeValueWithProperty\";\nvar emptyObject = {};\nvar defaultOffset = {\n height: 0,\n width: 0\n};\nexport var createBoxShadowValue = function createBoxShadowValue(style) {\n var shadowColor = style.shadowColor,\n shadowOffset = style.shadowOffset,\n shadowOpacity = style.shadowOpacity,\n shadowRadius = style.shadowRadius;\n var _ref = shadowOffset || defaultOffset,\n height = _ref.height,\n width = _ref.width;\n var offsetX = normalizeValueWithProperty(width);\n var offsetY = normalizeValueWithProperty(height);\n var blurRadius = normalizeValueWithProperty(shadowRadius || 0);\n var color = normalizeColor(shadowColor || 'black', shadowOpacity);\n if (color != null && offsetX != null && offsetY != null && blurRadius != null) {\n return offsetX + \" \" + offsetY + \" \" + blurRadius + \" \" + color;\n }\n};\nexport var createTextShadowValue = function createTextShadowValue(style) {\n var textShadowColor = style.textShadowColor,\n textShadowOffset = style.textShadowOffset,\n textShadowRadius = style.textShadowRadius;\n var _ref2 = textShadowOffset || defaultOffset,\n height = _ref2.height,\n width = _ref2.width;\n var radius = textShadowRadius || 0;\n var offsetX = normalizeValueWithProperty(width);\n var offsetY = normalizeValueWithProperty(height);\n var blurRadius = normalizeValueWithProperty(radius);\n var color = normalizeValueWithProperty(textShadowColor, 'textShadowColor');\n if (color && (height !== 0 || width !== 0 || radius !== 0) && offsetX != null && offsetY != null && blurRadius != null) {\n return offsetX + \" \" + offsetY + \" \" + blurRadius + \" \" + color;\n }\n};\nexport var preprocess = function preprocess(originalStyle) {\n var style = originalStyle || emptyObject;\n var nextStyle = {};\n for (var originalProp in style) {\n var originalValue = style[originalProp];\n var prop = originalProp;\n var value = originalValue;\n if (!Object.prototype.hasOwnProperty.call(style, originalProp) || originalValue == null) {\n continue;\n }\n if (prop === 'shadowColor' || prop === 'shadowOffset' || prop === 'shadowOpacity' || prop === 'shadowRadius') {\n var boxShadowValue = createBoxShadowValue(style);\n if (boxShadowValue != null && nextStyle.boxShadow == null) {\n var boxShadow = style.boxShadow;\n prop = 'boxShadow';\n value = boxShadow ? boxShadow + \", \" + boxShadowValue : boxShadowValue;\n } else {\n continue;\n }\n }\n if (prop === 'textShadowColor' || prop === 'textShadowOffset' || prop === 'textShadowRadius') {\n var textShadowValue = createTextShadowValue(style);\n if (textShadowValue != null && nextStyle.textShadow == null) {\n var textShadow = style.textShadow;\n prop = 'textShadow';\n value = textShadow ? textShadow + \", \" + textShadowValue : textShadowValue;\n } else {\n continue;\n }\n }\n nextStyle[prop] = value;\n }\n return nextStyle;\n};\nexport default preprocess;","map":{"version":3,"names":["normalizeColor","normalizeValueWithProperty","emptyObject","defaultOffset","height","width","createBoxShadowValue","style","shadowColor","shadowOffset","shadowOpacity","shadowRadius","_ref","offsetX","offsetY","blurRadius","color","createTextShadowValue","textShadowColor","textShadowOffset","textShadowRadius","_ref2","radius","preprocess","originalStyle","nextStyle","originalProp","originalValue","prop","value","Object","prototype","hasOwnProperty","call","boxShadowValue","boxShadow","textShadowValue","textShadow"],"sources":["/Users/thomaschazot/Documents/But2A/LaSuperMeteo/iut-expo-starter/node_modules/react-native-web/dist/exports/StyleSheet/preprocess.js"],"sourcesContent":["/**\n * Copyright (c) Nicolas Gallagher.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n *\n * \n */\nimport normalizeColor from './compiler/normalizeColor';\nimport normalizeValueWithProperty from './compiler/normalizeValueWithProperty';\nvar emptyObject = {};\n/**\n * Shadows\n */\n\nvar defaultOffset = {\n height: 0,\n width: 0\n};\nexport var createBoxShadowValue = style => {\n var shadowColor = style.shadowColor,\n shadowOffset = style.shadowOffset,\n shadowOpacity = style.shadowOpacity,\n shadowRadius = style.shadowRadius;\n\n var _ref = shadowOffset || defaultOffset,\n height = _ref.height,\n width = _ref.width;\n\n var offsetX = normalizeValueWithProperty(width);\n var offsetY = normalizeValueWithProperty(height);\n var blurRadius = normalizeValueWithProperty(shadowRadius || 0);\n var color = normalizeColor(shadowColor || 'black', shadowOpacity);\n\n if (color != null && offsetX != null && offsetY != null && blurRadius != null) {\n return offsetX + \" \" + offsetY + \" \" + blurRadius + \" \" + color;\n }\n};\nexport var createTextShadowValue = style => {\n var textShadowColor = style.textShadowColor,\n textShadowOffset = style.textShadowOffset,\n textShadowRadius = style.textShadowRadius;\n\n var _ref2 = textShadowOffset || defaultOffset,\n height = _ref2.height,\n width = _ref2.width;\n\n var radius = textShadowRadius || 0;\n var offsetX = normalizeValueWithProperty(width);\n var offsetY = normalizeValueWithProperty(height);\n var blurRadius = normalizeValueWithProperty(radius);\n var color = normalizeValueWithProperty(textShadowColor, 'textShadowColor');\n\n if (color && (height !== 0 || width !== 0 || radius !== 0) && offsetX != null && offsetY != null && blurRadius != null) {\n return offsetX + \" \" + offsetY + \" \" + blurRadius + \" \" + color;\n }\n};\n/**\n * Preprocess styles\n */\n\nexport var preprocess = originalStyle => {\n var style = originalStyle || emptyObject;\n var nextStyle = {};\n\n for (var originalProp in style) {\n var originalValue = style[originalProp];\n var prop = originalProp;\n var value = originalValue;\n\n if (!Object.prototype.hasOwnProperty.call(style, originalProp) || originalValue == null) {\n continue;\n } // Convert shadow styles\n\n\n if (prop === 'shadowColor' || prop === 'shadowOffset' || prop === 'shadowOpacity' || prop === 'shadowRadius') {\n var boxShadowValue = createBoxShadowValue(style);\n\n if (boxShadowValue != null && nextStyle.boxShadow == null) {\n var boxShadow = style.boxShadow;\n prop = 'boxShadow';\n value = boxShadow ? boxShadow + \", \" + boxShadowValue : boxShadowValue;\n } else {\n continue;\n }\n } // Convert text shadow styles\n\n\n if (prop === 'textShadowColor' || prop === 'textShadowOffset' || prop === 'textShadowRadius') {\n var textShadowValue = createTextShadowValue(style);\n\n if (textShadowValue != null && nextStyle.textShadow == null) {\n var textShadow = style.textShadow;\n prop = 'textShadow';\n value = textShadow ? textShadow + \", \" + textShadowValue : textShadowValue;\n } else {\n continue;\n }\n }\n\n nextStyle[prop] = value;\n } // $FlowIgnore\n\n\n return nextStyle;\n};\nexport default preprocess;"],"mappings":"AAQA,OAAOA,cAAc;AACrB,OAAOC,0BAA0B;AACjC,IAAIC,WAAW,GAAG,CAAC,CAAC;AAKpB,IAAIC,aAAa,GAAG;EAClBC,MAAM,EAAE,CAAC;EACTC,KAAK,EAAE;AACT,CAAC;AACD,OAAO,IAAIC,oBAAoB,GAAG,SAAvBA,oBAAoB,CAAGC,KAAK,EAAI;EACzC,IAAIC,WAAW,GAAGD,KAAK,CAACC,WAAW;IAC/BC,YAAY,GAAGF,KAAK,CAACE,YAAY;IACjCC,aAAa,GAAGH,KAAK,CAACG,aAAa;IACnCC,YAAY,GAAGJ,KAAK,CAACI,YAAY;EAErC,IAAIC,IAAI,GAAGH,YAAY,IAAIN,aAAa;IACpCC,MAAM,GAAGQ,IAAI,CAACR,MAAM;IACpBC,KAAK,GAAGO,IAAI,CAACP,KAAK;EAEtB,IAAIQ,OAAO,GAAGZ,0BAA0B,CAACI,KAAK,CAAC;EAC/C,IAAIS,OAAO,GAAGb,0BAA0B,CAACG,MAAM,CAAC;EAChD,IAAIW,UAAU,GAAGd,0BAA0B,CAACU,YAAY,IAAI,CAAC,CAAC;EAC9D,IAAIK,KAAK,GAAGhB,cAAc,CAACQ,WAAW,IAAI,OAAO,EAAEE,aAAa,CAAC;EAEjE,IAAIM,KAAK,IAAI,IAAI,IAAIH,OAAO,IAAI,IAAI,IAAIC,OAAO,IAAI,IAAI,IAAIC,UAAU,IAAI,IAAI,EAAE;IAC7E,OAAOF,OAAO,GAAG,GAAG,GAAGC,OAAO,GAAG,GAAG,GAAGC,UAAU,GAAG,GAAG,GAAGC,KAAK;EACjE;AACF,CAAC;AACD,OAAO,IAAIC,qBAAqB,GAAG,SAAxBA,qBAAqB,CAAGV,KAAK,EAAI;EAC1C,IAAIW,eAAe,GAAGX,KAAK,CAACW,eAAe;IACvCC,gBAAg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