@tamagui/linear-gradient 1.113.1 → 1.114.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/LinearGradient.native.js +37 -41
- package/dist/esm/LinearGradient.native.js.map +6 -1
- package/dist/esm/index.native.js +2 -2
- package/dist/esm/index.native.js.map +6 -1
- package/dist/esm/linear-gradient.native.js +3 -1
- package/dist/esm/linear-gradient.native.js.map +6 -1
- package/package.json +4 -4
|
@@ -1,50 +1,46 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { normalizeColor, styled, useProps, useTheme } from "@tamagui/core";
|
|
3
3
|
import { YStack } from "@tamagui/stacks";
|
|
4
|
-
import { LinearGradient as ExpoLinearGradient } from "./linear-gradient
|
|
4
|
+
import { LinearGradient as ExpoLinearGradient } from "./linear-gradient";
|
|
5
5
|
var LinearGradientFrame = styled(YStack, {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
var
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return process.env.NODE_ENV !== "production" && colors.some(function (c) {
|
|
27
|
-
var normalized = normalizeColor(c);
|
|
28
|
-
if (!normalized || normalized.startsWith("$")) return !0;
|
|
29
|
-
}) && (console.error(`LinearGradient: "colors" prop contains invalid color tokens: ${colors} fallback to default colors: ["#000", "#fff"]`), colors = ["#000", "#fff"]), /* @__PURE__ */_jsxs(LinearGradientFrame, {
|
|
30
|
-
ref,
|
|
31
|
-
...stackProps,
|
|
32
|
-
children: [/* @__PURE__ */_jsx(ExpoLinearGradient, {
|
|
6
|
+
name: "LinearGradient",
|
|
7
|
+
overflow: "hidden",
|
|
8
|
+
position: "relative"
|
|
9
|
+
}), LinearGradient = LinearGradientFrame.styleable(function(propsIn, ref) {
|
|
10
|
+
var _props_colors, props = useProps(propsIn), { start, end, colors: colorsProp, locations, children, ...stackProps } = props, theme = useTheme(), colors = ((_props_colors = props.colors) === null || _props_colors === void 0 ? void 0 : _props_colors.map(function(c) {
|
|
11
|
+
var _theme_c, _theme_c_get;
|
|
12
|
+
return (_theme_c_get = (_theme_c = theme[c]) === null || _theme_c === void 0 ? void 0 : _theme_c.get("web")) !== null && _theme_c_get !== void 0 ? _theme_c_get : c;
|
|
13
|
+
})) || [];
|
|
14
|
+
return process.env.NODE_ENV !== "production" && colors.some(function(c) {
|
|
15
|
+
var normalized = normalizeColor(c);
|
|
16
|
+
if (!normalized || normalized.startsWith("$"))
|
|
17
|
+
return !0;
|
|
18
|
+
}) && (console.error(`LinearGradient: "colors" prop contains invalid color tokens: ${colors} fallback to default colors: ["#000", "#fff"]`), colors = [
|
|
19
|
+
"#000",
|
|
20
|
+
"#fff"
|
|
21
|
+
]), /* @__PURE__ */ _jsxs(LinearGradientFrame, {
|
|
22
|
+
ref,
|
|
23
|
+
...stackProps,
|
|
24
|
+
children: [
|
|
25
|
+
/* @__PURE__ */ _jsx(ExpoLinearGradient, {
|
|
33
26
|
start,
|
|
34
27
|
end,
|
|
35
28
|
colors,
|
|
36
29
|
locations,
|
|
37
30
|
style: gradientStyle
|
|
38
|
-
}),
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
31
|
+
}),
|
|
32
|
+
children
|
|
33
|
+
]
|
|
34
|
+
});
|
|
35
|
+
}), gradientStyle = {
|
|
36
|
+
position: "absolute",
|
|
37
|
+
top: 0,
|
|
38
|
+
left: 0,
|
|
39
|
+
right: 0,
|
|
40
|
+
bottom: 0,
|
|
41
|
+
zIndex: 0
|
|
42
|
+
};
|
|
43
|
+
export {
|
|
44
|
+
LinearGradient
|
|
45
|
+
};
|
|
46
|
+
//# sourceMappingURL=LinearGradient.js.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/code/ui/linear-gradient/src/LinearGradient.tsx"],
|
|
4
|
+
"mappings": ";AACA,SAASA,gBAAgBC,QAAQC,UAAUC,gBAAgB;AAC3D,SAASC,cAAc;AAIvB,SAASC,kBAAkBC,0BAA0B;AAUrD,IAAMC,sBAAsBN,OAAOG,QAAQ;EACzCI,MAAM;EACNC,UAAU;EACVC,UAAU;AACZ,CAAA,GAEaL,iBAAiBE,oBAAoBI,UAChD,SAACC,SAASC,KAAAA;MAONC,eANIA,QAAQZ,SAASU,OAAAA,GAEjB,EAAEG,OAAOC,KAAKC,QAAQC,YAAYC,WAAWC,UAAU,GAAGC,WAAAA,IAAeP,OACzEQ,QAAQnB,SAAAA,GAEVc,WACFH,gBAAAA,MAAMG,YAAM,QAAZH,kBAAAA,SAAAA,SAAAA,cAAcS,IAAI,SAACC,GAAAA;QACTF,UAAAA;AAAR,YAAQA,gBAAAA,WAAAA,MAAME,CAAAA,OAAE,QAARF,aAAAA,SAAAA,SAAAA,SAAUG,IAAI,KAAA,OAAA,QAAdH,iBAAAA,SAAAA,eAAmCE;EAC7C,CAAA,MAAM,CAAA;AAER,SAAIE,QAAQC,IAAIC,aAAa,gBAEzBX,OAAOY,KAAK,SAACL,GAAAA;AACX,QAAMM,aAAa9B,eAAewB,CAAAA;AAClC,QAAI,CAACM,cAAcA,WAAWC,WAAW,GAAA;AACvC,aAAO;EAEX,CAAA,MAEAC,QAAQC,MACN,gEAAgEhB,MAAAA,+CAAqD,GAEvHA,SAAS;IAAC;IAAQ;MAKpB,sBAACV,qBAAAA;IAAoBM;IAAkB,GAAGQ;;MACxC,qBAACf,oBAAAA;QACCS;QACAC;QACAC;QACAE;QACAe,OAAOC;;MAERf;;;AAGP,CAAA,GAKIe,gBAA2B;EAC/BzB,UAAU;EACV0B,KAAK;EACLC,MAAM;EACNC,OAAO;EACPC,QAAQ;EACRC,QAAQ;AACV;",
|
|
5
|
+
"names": ["normalizeColor", "styled", "useProps", "useTheme", "YStack", "LinearGradient", "ExpoLinearGradient", "LinearGradientFrame", "name", "overflow", "position", "styleable", "propsIn", "ref", "props", "start", "end", "colors", "colorsProp", "locations", "children", "stackProps", "theme", "map", "c", "get", "process", "env", "NODE_ENV", "some", "normalized", "startsWith", "console", "error", "style", "gradientStyle", "top", "left", "right", "bottom", "zIndex"]
|
|
6
|
+
}
|
package/dist/esm/index.native.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./LinearGradient
|
|
2
|
-
//# sourceMappingURL=index.
|
|
1
|
+
export * from "./LinearGradient";
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/code/ui/linear-gradient/src/linear-gradient.native.tsx"],
|
|
4
|
+
"mappings": "AAAA,SAASA,sBAAsB;",
|
|
5
|
+
"names": ["LinearGradient"]
|
|
6
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/linear-gradient",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.114.0",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"*.css"
|
|
6
6
|
],
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@tamagui/core": "1.
|
|
37
|
-
"@tamagui/stacks": "1.
|
|
36
|
+
"@tamagui/core": "1.114.0",
|
|
37
|
+
"@tamagui/stacks": "1.114.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@tamagui/build": "1.
|
|
40
|
+
"@tamagui/build": "1.114.0",
|
|
41
41
|
"expo-linear-gradient": "~13.0.2",
|
|
42
42
|
"react": "^18.2.0 || ^19.0.0"
|
|
43
43
|
},
|