Socket
Socket
Sign inDemoInstall

@tamagui/core

Package Overview
Dependencies
Maintainers
1
Versions
1111
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tamagui/core - npm Package Compare versions

Comparing version 1.0.0-alpha.36 to 1.0.0-alpha.37

42

dist/cjs/helpers/fixNativeShadow.native.js

@@ -12,23 +12,27 @@ var __defProp = Object.defineProperty;

});
const matchRgba = /rgba\(\s*([\d\.]{1,})\s*,\s*([\d\.]{1,})\s*,\s*([\d\.]{1,})\s*,\s*([\d\.]{1,})\s*\)$/;
const matchRgbaHsla = /(rgba|hsla)\(\s*([\d\.]{1,}%?)\s*,\s*([\d\.]{1,}%?)\s*,\s*([\d\.]{1,}%?)\s*,\s*([\d\.]{1,})\s*\)$/;
function fixNativeShadow(props) {
if (props.shadowColor) {
if (!!!("shadowOffset" in props)) {
props.shadowOffset = {
width: 0,
height: 0
};
if (!props.shadowColor) {
return;
}
if (!props.shadowOffset) {
props.shadowOffset = {
width: 0,
height: 0
};
}
if ("shadowOpacity" in props) {
return;
}
const c = `${props.shadowColor}`;
if ((c[0] === "r" || c[0] === "h") && c[3] === "a") {
const [_, type, _1, _2, _3, a] = c.match(matchRgbaHsla) || [];
if (typeof a !== "string") {
console.warn("invalid", c, type);
return;
}
if (!!!("shadowOpacity" in props)) {
const c = `${props.shadowColor}`;
if (c[0] === "r" && c[3] === "a") {
const [_, r, g, b, a] = c.match(matchRgba) || [];
if (typeof a !== "string") {
console.warn("non valid rgba", c);
return props;
}
props.shadowColor = `rgb(${r},${g},${b})`;
props.shadowOpacity = +a;
}
}
props.shadowColor = `${type.replace("a", "")}(${_1},${_2},${_3})`;
props.shadowOpacity = +a;
} else {
props.shadowOpacity = 1;
}

@@ -35,0 +39,0 @@ }

var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
const matchRgba = /rgba\(\s*([\d\.]{1,})\s*,\s*([\d\.]{1,})\s*,\s*([\d\.]{1,})\s*,\s*([\d\.]{1,})\s*\)$/;
const matchRgbaHsla = /(rgba|hsla)\(\s*([\d\.]{1,}%?)\s*,\s*([\d\.]{1,}%?)\s*,\s*([\d\.]{1,}%?)\s*,\s*([\d\.]{1,})\s*\)$/;
function fixNativeShadow(props) {
if (props.shadowColor) {
if (!!!("shadowOffset" in props)) {
props.shadowOffset = {
width: 0,
height: 0
};
if (!props.shadowColor) {
return;
}
if (!props.shadowOffset) {
props.shadowOffset = {
width: 0,
height: 0
};
}
if ("shadowOpacity" in props) {
return;
}
const c = `${props.shadowColor}`;
if ((c[0] === "r" || c[0] === "h") && c[3] === "a") {
const [_, type, _1, _2, _3, a] = c.match(matchRgbaHsla) || [];
if (typeof a !== "string") {
console.warn("invalid", c, type);
return;
}
if (!!!("shadowOpacity" in props)) {
const c = `${props.shadowColor}`;
if (c[0] === "r" && c[3] === "a") {
const [_, r, g, b, a] = c.match(matchRgba) || [];
if (typeof a !== "string") {
console.warn("non valid rgba", c);
return props;
}
props.shadowColor = `rgb(${r},${g},${b})`;
props.shadowOpacity = +a;
}
}
props.shadowColor = `${type.replace("a", "")}(${_1},${_2},${_3})`;
props.shadowOpacity = +a;
} else {
props.shadowOpacity = 1;
}

@@ -25,0 +29,0 @@ }

var __defProp = Object.defineProperty;
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
const matchRgba = /rgba\(\s*([\d\.]{1,})\s*,\s*([\d\.]{1,})\s*,\s*([\d\.]{1,})\s*,\s*([\d\.]{1,})\s*\)$/;
const matchRgbaHsla = /(rgba|hsla)\(\s*([\d\.]{1,}%?)\s*,\s*([\d\.]{1,}%?)\s*,\s*([\d\.]{1,}%?)\s*,\s*([\d\.]{1,})\s*\)$/;
function fixNativeShadow(props) {
if (props.shadowColor) {
if (!!!("shadowOffset" in props)) {
props.shadowOffset = {
width: 0,
height: 0
};
if (!props.shadowColor) {
return;
}
if (!props.shadowOffset) {
props.shadowOffset = {
width: 0,
height: 0
};
}
if ("shadowOpacity" in props) {
return;
}
const c = `${props.shadowColor}`;
if ((c[0] === "r" || c[0] === "h") && c[3] === "a") {
const [_, type, _1, _2, _3, a] = c.match(matchRgbaHsla) || [];
if (typeof a !== "string") {
console.warn("invalid", c, type);
return;
}
if (!!!("shadowOpacity" in props)) {
const c = `${props.shadowColor}`;
if (c[0] === "r" && c[3] === "a") {
const [_, r, g, b, a] = c.match(matchRgba) || [];
if (typeof a !== "string") {
console.warn("non valid rgba", c);
return props;
}
props.shadowColor = `rgb(${r},${g},${b})`;
props.shadowOpacity = +a;
}
}
props.shadowColor = `${type.replace("a", "")}(${_1},${_2},${_3})`;
props.shadowOpacity = +a;
} else {
props.shadowOpacity = 1;
}

@@ -25,0 +29,0 @@ }

{
"name": "@tamagui/core",
"version": "1.0.0-alpha.36",
"version": "1.0.0-alpha.37",
"source": "src/index.ts",

@@ -17,6 +17,6 @@ "main": "dist/cjs",

"dependencies": {
"@tamagui/helpers": "^1.0.0-alpha.36",
"@tamagui/helpers": "^1.0.0-alpha.37",
"@tamagui/ow": "^0.28.1",
"@tamagui/use-debounce": "^1.0.0-alpha.36",
"@tamagui/use-force-update": "^1.0.0-alpha.36",
"@tamagui/use-debounce": "^1.0.0-alpha.37",
"@tamagui/use-force-update": "^1.0.0-alpha.37",
"react": "*",

@@ -29,3 +29,3 @@ "react-dom": "*"

"devDependencies": {
"@tamagui/build": "^1.0.0-alpha.36",
"@tamagui/build": "^1.0.0-alpha.37",
"@types/react": "^17.0.35",

@@ -42,3 +42,3 @@ "esbuild": "^0.13.12",

},
"gitHead": "d5b75feefe9694ee2f107b69c1be98a5f107eada"
"gitHead": "c6357d6e6108b437bb055dad0eae51cd55190143"
}

@@ -1,2 +0,2 @@

export declare function fixNativeShadow(props: any): any;
export declare function fixNativeShadow(props: any): void;
//# sourceMappingURL=fixNativeShadow.native.d.ts.map

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc