@tamagui/linear-gradient 1.89.26 → 1.89.27-1708113113238
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/cjs/LinearGradient-shared.native.js +68 -31
- package/dist/cjs/LinearGradient-shared.native.js.map +3 -3
- package/dist/cjs/LinearGradient.native.js +2 -3
- package/dist/cjs/LinearGradient.native.js.map +3 -3
- package/dist/cjs/index.native.js.map +2 -2
- package/dist/cjs/linear-gradient.native.js.map +2 -2
- package/dist/esm/LinearGradient-shared.native.js +67 -31
- package/dist/esm/LinearGradient-shared.native.js.map +3 -3
- package/dist/esm/LinearGradient.native.js +2 -3
- package/dist/esm/LinearGradient.native.js.map +3 -3
- package/dist/esm/index.native.js.map +1 -1
- package/dist/esm/linear-gradient.native.js.map +3 -3
- package/dist/jsx/LinearGradient-shared.native.js +67 -31
- package/dist/jsx/LinearGradient-shared.native.js.map +3 -3
- package/dist/jsx/LinearGradient.native.js +2 -3
- package/dist/jsx/LinearGradient.native.js.map +3 -3
- package/dist/jsx/index.native.js.map +1 -1
- package/dist/jsx/linear-gradient.native.js.map +3 -3
- package/package.json +4 -4
- package/src/LinearGradient.native.tsx +1 -2
- package/types/LinearGradient.native.d.ts.map +1 -1
|
@@ -18,40 +18,77 @@ __export(LinearGradient_shared_exports, {
|
|
|
18
18
|
LinearGradient: () => LinearGradient
|
|
19
19
|
});
|
|
20
20
|
module.exports = __toCommonJS(LinearGradient_shared_exports);
|
|
21
|
-
var import_core = require("@tamagui/core"), import_stacks = require("@tamagui/stacks"), import_linear_gradient = require("./linear-gradient")
|
|
22
|
-
|
|
21
|
+
var import_core = require("@tamagui/core"), import_stacks = require("@tamagui/stacks"), import_linear_gradient = require("./linear-gradient");
|
|
22
|
+
function _define_property(obj, key, value) {
|
|
23
|
+
return key in obj ? Object.defineProperty(obj, key, {
|
|
24
|
+
value,
|
|
25
|
+
enumerable: !0,
|
|
26
|
+
configurable: !0,
|
|
27
|
+
writable: !0
|
|
28
|
+
}) : obj[key] = value, obj;
|
|
29
|
+
}
|
|
30
|
+
function _object_spread(target) {
|
|
31
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
32
|
+
var source = arguments[i] != null ? arguments[i] : {}, ownKeys = Object.keys(source);
|
|
33
|
+
typeof Object.getOwnPropertySymbols == "function" && (ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
34
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
35
|
+
}))), ownKeys.forEach(function(key) {
|
|
36
|
+
_define_property(target, key, source[key]);
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
return target;
|
|
40
|
+
}
|
|
41
|
+
function _object_without_properties(source, excluded) {
|
|
42
|
+
if (source == null)
|
|
43
|
+
return {};
|
|
44
|
+
var target = _object_without_properties_loose(source, excluded), key, i;
|
|
45
|
+
if (Object.getOwnPropertySymbols) {
|
|
46
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
47
|
+
for (i = 0; i < sourceSymbolKeys.length; i++)
|
|
48
|
+
key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
|
|
49
|
+
}
|
|
50
|
+
return target;
|
|
51
|
+
}
|
|
52
|
+
function _object_without_properties_loose(source, excluded) {
|
|
53
|
+
if (source == null)
|
|
54
|
+
return {};
|
|
55
|
+
var target = {}, sourceKeys = Object.keys(source), key, i;
|
|
56
|
+
for (i = 0; i < sourceKeys.length; i++)
|
|
57
|
+
key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
|
|
58
|
+
return target;
|
|
59
|
+
}
|
|
60
|
+
var LinearGradientFrame = (0, import_core.styled)(import_stacks.YStack, {
|
|
23
61
|
name: "LinearGradient",
|
|
24
62
|
overflow: "hidden",
|
|
25
63
|
position: "relative"
|
|
26
|
-
}), LinearGradient = LinearGradientFrame.styleable(
|
|
27
|
-
(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
), gradientStyle = {
|
|
64
|
+
}), LinearGradient = LinearGradientFrame.styleable(function(propsIn, ref) {
|
|
65
|
+
var _props_colors, props = (0, import_core.useProps)(propsIn), start = props.start, end = props.end, colorsProp = props.colors, locations = props.locations, children = props.children, stackProps = _object_without_properties(props, [
|
|
66
|
+
"start",
|
|
67
|
+
"end",
|
|
68
|
+
"colors",
|
|
69
|
+
"locations",
|
|
70
|
+
"children"
|
|
71
|
+
]), theme = (0, import_core.useTheme)(), colors = ((_props_colors = props.colors) === null || _props_colors === void 0 ? void 0 : _props_colors.map(function(c) {
|
|
72
|
+
var _theme_c, _theme_c_get;
|
|
73
|
+
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;
|
|
74
|
+
})) || [];
|
|
75
|
+
return process.env.NODE_ENV !== "production" && colors.some(function(c) {
|
|
76
|
+
var normalized = (0, import_core.normalizeColor)(c);
|
|
77
|
+
if (!normalized || normalized.startsWith("$"))
|
|
78
|
+
return !0;
|
|
79
|
+
}) && (console.error('LinearGradient: "colors" prop contains invalid color tokens: '.concat(colors, ' fallback to default colors: ["#000", "#fff"]')), colors = [
|
|
80
|
+
"#000",
|
|
81
|
+
"#fff"
|
|
82
|
+
]), /* @__PURE__ */ React.createElement(LinearGradientFrame, _object_spread({
|
|
83
|
+
ref
|
|
84
|
+
}, stackProps), /* @__PURE__ */ React.createElement(import_linear_gradient.LinearGradient, {
|
|
85
|
+
start,
|
|
86
|
+
end,
|
|
87
|
+
colors,
|
|
88
|
+
locations,
|
|
89
|
+
style: gradientStyle
|
|
90
|
+
}), children);
|
|
91
|
+
}), gradientStyle = {
|
|
55
92
|
position: "absolute",
|
|
56
93
|
top: 0,
|
|
57
94
|
left: 0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/LinearGradient-shared.tsx"],
|
|
4
|
-
"mappings": "
|
|
5
|
-
"names": ["
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/packages/linear-gradient/src/LinearGradient-shared.tsx"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;AACA,kBAA2D,0BAC3D,gBAAuB,4BAIvB,yBAAqD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAUrD,IAAMA,0BAAsBC,oBAAOC,sBAAQ;EACzCC,MAAM;EACNC,UAAU;EACVC,UAAU;AACZ,CAAA,GAEaC,iBAAiBN,oBAAoBO,UAChD,SAACC,SAASC,KAAAA;MAONC,eANIA,YAAQC,sBAASH,OAAAA,GAEfI,QAAuEF,MAAvEE,OAAOC,MAAgEH,MAAhEG,KAAaC,aAAmDJ,MAA3DK,QAAoBC,YAAuCN,MAAvCM,WAAWC,WAA4BP,MAA5BO,UAAaC,aAAAA,2BAAeR,OAAAA;IAAvEE;IAAOC;IAAKE;IAAoBC;IAAWC;MAC7CE,YAAQC,sBAAAA,GAEVL,WACFL,gBAAAA,MAAMK,YAAM,QAAZL,kBAAAA,SAAAA,SAAAA,cAAcW,IAAI,SAACC,GAAAA;QACTH,UAAAA;AAAR,YAAQA,gBAAAA,WAAAA,MAAMG,CAAAA,OAAE,QAARH,aAAAA,SAAAA,SAAAA,SAAUI,IAAI,KAAA,OAAA,QAAdJ,iBAAAA,SAAAA,eAAmCG;EAC7C,CAAA,MAAM,CAAA;AAER,SAAIE,QAAQC,IAAIC,aAAa,gBAEzBX,OAAOY,KAAK,SAACL,GAAAA;AACX,QAAMM,iBAAaC,4BAAeP,CAAAA;AAClC,QAAI,CAACM,cAAcA,WAAWE,WAAW,GAAA;AACvC,aAAO;EAEX,CAAA,MAEAC,QAAQC,MACL,gEAAsE,OAAPjB,QAAO,+CAAA,CAAA,GAEzEA,SAAS;IAAC;IAAQ;MAKpB,sBAAA,cAACf,qBAAAA,eAAAA;IAAoBS;KAAqBS,UAAAA,GACxC,sBAAA,cAACe,uBAAAA,gBAAAA;IACCrB;IACAC;IACAE;IACAC;IACAkB,OAAOC;MAERlB,QAAAA;AAGP,CAAA,GAKIkB,gBAA2B;EAC/B9B,UAAU;EACV+B,KAAK;EACLC,MAAM;EACNC,OAAO;EACPC,QAAQ;EACRC,QAAQ;AACV;",
|
|
5
|
+
"names": ["LinearGradientFrame", "styled", "YStack", "name", "overflow", "position", "LinearGradient", "styleable", "propsIn", "ref", "props", "useProps", "start", "end", "colorsProp", "colors", "locations", "children", "stackProps", "theme", "useTheme", "map", "c", "get", "process", "env", "NODE_ENV", "some", "normalized", "normalizeColor", "startsWith", "console", "error", "ExpoLinearGradient", "style", "gradientStyle", "top", "left", "right", "bottom", "zIndex"]
|
|
6
6
|
}
|
|
@@ -18,10 +18,9 @@ __export(LinearGradient_native_exports, {
|
|
|
18
18
|
LinearGradient: () => LinearGradient
|
|
19
19
|
});
|
|
20
20
|
module.exports = __toCommonJS(LinearGradient_native_exports);
|
|
21
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
22
21
|
function LinearGradient(props) {
|
|
23
|
-
|
|
24
|
-
return /* @__PURE__ */
|
|
22
|
+
var Real = require("./LinearGradient-shared").LinearGradient;
|
|
23
|
+
return /* @__PURE__ */ React.createElement(Real, props);
|
|
25
24
|
}
|
|
26
25
|
// Annotate the CommonJS export names for ESM import in node:
|
|
27
26
|
0 && (module.exports = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/LinearGradient.native.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AAAA
|
|
5
|
-
"names": []
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/packages/linear-gradient/src/LinearGradient.native.tsx"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;;;;;AAKO,SAASA,eAAeC,OAAK;AAClC,MAAMC,OAAOC,QAAQ,yBAAA,EAA2BH;AAChD,SAAO,sBAAA,cAACE,MAASD,KAAAA;AACnB;",
|
|
5
|
+
"names": ["LinearGradient", "props", "Real", "require"]
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/linear-gradient.ts"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;AAAA
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/packages/linear-gradient/src/linear-gradient.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;;;;;kCAA+B;",
|
|
5
5
|
"names": []
|
|
6
6
|
}
|
|
@@ -1,40 +1,76 @@
|
|
|
1
1
|
import { normalizeColor, styled, useProps, useTheme } from "@tamagui/core";
|
|
2
2
|
import { YStack } from "@tamagui/stacks";
|
|
3
3
|
import { LinearGradient as ExpoLinearGradient } from "./linear-gradient";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
function _define_property(obj, key, value) {
|
|
5
|
+
return key in obj ? Object.defineProperty(obj, key, {
|
|
6
|
+
value,
|
|
7
|
+
enumerable: !0,
|
|
8
|
+
configurable: !0,
|
|
9
|
+
writable: !0
|
|
10
|
+
}) : obj[key] = value, obj;
|
|
11
|
+
}
|
|
12
|
+
function _object_spread(target) {
|
|
13
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
14
|
+
var source = arguments[i] != null ? arguments[i] : {}, ownKeys = Object.keys(source);
|
|
15
|
+
typeof Object.getOwnPropertySymbols == "function" && (ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
16
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
17
|
+
}))), ownKeys.forEach(function(key) {
|
|
18
|
+
_define_property(target, key, source[key]);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return target;
|
|
22
|
+
}
|
|
23
|
+
function _object_without_properties(source, excluded) {
|
|
24
|
+
if (source == null)
|
|
25
|
+
return {};
|
|
26
|
+
var target = _object_without_properties_loose(source, excluded), key, i;
|
|
27
|
+
if (Object.getOwnPropertySymbols) {
|
|
28
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
29
|
+
for (i = 0; i < sourceSymbolKeys.length; i++)
|
|
30
|
+
key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
|
|
31
|
+
}
|
|
32
|
+
return target;
|
|
33
|
+
}
|
|
34
|
+
function _object_without_properties_loose(source, excluded) {
|
|
35
|
+
if (source == null)
|
|
36
|
+
return {};
|
|
37
|
+
var target = {}, sourceKeys = Object.keys(source), key, i;
|
|
38
|
+
for (i = 0; i < sourceKeys.length; i++)
|
|
39
|
+
key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
|
|
40
|
+
return target;
|
|
41
|
+
}
|
|
42
|
+
var LinearGradientFrame = styled(YStack, {
|
|
6
43
|
name: "LinearGradient",
|
|
7
44
|
overflow: "hidden",
|
|
8
45
|
position: "relative"
|
|
9
|
-
}), LinearGradient = LinearGradientFrame.styleable(
|
|
10
|
-
(propsIn,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
), gradientStyle = {
|
|
46
|
+
}), LinearGradient = LinearGradientFrame.styleable(function(propsIn, ref) {
|
|
47
|
+
var _props_colors, props = useProps(propsIn), start = props.start, end = props.end, colorsProp = props.colors, locations = props.locations, children = props.children, stackProps = _object_without_properties(props, [
|
|
48
|
+
"start",
|
|
49
|
+
"end",
|
|
50
|
+
"colors",
|
|
51
|
+
"locations",
|
|
52
|
+
"children"
|
|
53
|
+
]), theme = useTheme(), colors = ((_props_colors = props.colors) === null || _props_colors === void 0 ? void 0 : _props_colors.map(function(c) {
|
|
54
|
+
var _theme_c, _theme_c_get;
|
|
55
|
+
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;
|
|
56
|
+
})) || [];
|
|
57
|
+
return process.env.NODE_ENV !== "production" && colors.some(function(c) {
|
|
58
|
+
var normalized = normalizeColor(c);
|
|
59
|
+
if (!normalized || normalized.startsWith("$"))
|
|
60
|
+
return !0;
|
|
61
|
+
}) && (console.error('LinearGradient: "colors" prop contains invalid color tokens: '.concat(colors, ' fallback to default colors: ["#000", "#fff"]')), colors = [
|
|
62
|
+
"#000",
|
|
63
|
+
"#fff"
|
|
64
|
+
]), /* @__PURE__ */ React.createElement(LinearGradientFrame, _object_spread({
|
|
65
|
+
ref
|
|
66
|
+
}, stackProps), /* @__PURE__ */ React.createElement(ExpoLinearGradient, {
|
|
67
|
+
start,
|
|
68
|
+
end,
|
|
69
|
+
colors,
|
|
70
|
+
locations,
|
|
71
|
+
style: gradientStyle
|
|
72
|
+
}), children);
|
|
73
|
+
}), gradientStyle = {
|
|
38
74
|
position: "absolute",
|
|
39
75
|
top: 0,
|
|
40
76
|
left: 0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/LinearGradient-shared.tsx"],
|
|
4
|
-
"mappings": "AACA,
|
|
5
|
-
"names": ["
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/packages/linear-gradient/src/LinearGradient-shared.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,GAEfG,QAAuED,MAAvEC,OAAOC,MAAgEF,MAAhEE,KAAaC,aAAmDH,MAA3DI,QAAoBC,YAAuCL,MAAvCK,WAAWC,WAA4BN,MAA5BM,UAAaC,aAAAA,2BAAeP,OAAAA;IAAvEC;IAAOC;IAAKE;IAAoBC;IAAWC;MAC7CE,QAAQnB,SAAAA,GAEVe,WACFJ,gBAAAA,MAAMI,YAAM,QAAZJ,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,gBAEzBV,OAAOW,KAAK,SAACL,GAAAA;AACX,QAAMM,aAAa9B,eAAewB,CAAAA;AAClC,QAAI,CAACM,cAAcA,WAAWC,WAAW,GAAA;AACvC,aAAO;EAEX,CAAA,MAEAC,QAAQC,MACL,gEAAsE,OAAPf,QAAO,+CAAA,CAAA,GAEzEA,SAAS;IAAC;IAAQ;MAKpB,sBAAA,cAACX,qBAAAA,eAAAA;IAAoBM;KAAqBQ,UAAAA,GACxC,sBAAA,cAACf,oBAAAA;IACCS;IACAC;IACAE;IACAC;IACAe,OAAOC;MAERf,QAAAA;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", "colorsProp", "colors", "locations", "children", "stackProps", "theme", "map", "c", "get", "process", "env", "NODE_ENV", "some", "normalized", "startsWith", "console", "error", "style", "gradientStyle", "top", "left", "right", "bottom", "zIndex"]
|
|
6
6
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
1
|
function LinearGradient(props) {
|
|
3
|
-
|
|
4
|
-
return /* @__PURE__ */
|
|
2
|
+
var Real = require("./LinearGradient-shared").LinearGradient;
|
|
3
|
+
return /* @__PURE__ */ React.createElement(Real, props);
|
|
5
4
|
}
|
|
6
5
|
export {
|
|
7
6
|
LinearGradient
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/LinearGradient.native.tsx"],
|
|
4
|
-
"mappings": "
|
|
5
|
-
"names": []
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/packages/linear-gradient/src/LinearGradient.native.tsx"],
|
|
4
|
+
"mappings": "AAKO,SAASA,eAAeC,OAAK;AAClC,MAAMC,OAAOC,QAAQ,yBAAA,EAA2BH;AAChD,SAAO,sBAAA,cAACE,MAASD,KAAAA;AACnB;",
|
|
5
|
+
"names": ["LinearGradient", "props", "Real", "require"]
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/linear-gradient.ts"],
|
|
4
|
-
"mappings": "AAAA,
|
|
5
|
-
"names": []
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/packages/linear-gradient/src/linear-gradient.ts"],
|
|
4
|
+
"mappings": "AAAA,SAASA,sBAAsB;",
|
|
5
|
+
"names": ["LinearGradient"]
|
|
6
6
|
}
|
|
@@ -1,40 +1,76 @@
|
|
|
1
1
|
import { normalizeColor, styled, useProps, useTheme } from "@tamagui/core";
|
|
2
2
|
import { YStack } from "@tamagui/stacks";
|
|
3
3
|
import { LinearGradient as ExpoLinearGradient } from "./linear-gradient";
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
function _define_property(obj, key, value) {
|
|
5
|
+
return key in obj ? Object.defineProperty(obj, key, {
|
|
6
|
+
value,
|
|
7
|
+
enumerable: !0,
|
|
8
|
+
configurable: !0,
|
|
9
|
+
writable: !0
|
|
10
|
+
}) : obj[key] = value, obj;
|
|
11
|
+
}
|
|
12
|
+
function _object_spread(target) {
|
|
13
|
+
for (var i = 1; i < arguments.length; i++) {
|
|
14
|
+
var source = arguments[i] != null ? arguments[i] : {}, ownKeys = Object.keys(source);
|
|
15
|
+
typeof Object.getOwnPropertySymbols == "function" && (ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
16
|
+
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
17
|
+
}))), ownKeys.forEach(function(key) {
|
|
18
|
+
_define_property(target, key, source[key]);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
return target;
|
|
22
|
+
}
|
|
23
|
+
function _object_without_properties(source, excluded) {
|
|
24
|
+
if (source == null)
|
|
25
|
+
return {};
|
|
26
|
+
var target = _object_without_properties_loose(source, excluded), key, i;
|
|
27
|
+
if (Object.getOwnPropertySymbols) {
|
|
28
|
+
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
29
|
+
for (i = 0; i < sourceSymbolKeys.length; i++)
|
|
30
|
+
key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
|
|
31
|
+
}
|
|
32
|
+
return target;
|
|
33
|
+
}
|
|
34
|
+
function _object_without_properties_loose(source, excluded) {
|
|
35
|
+
if (source == null)
|
|
36
|
+
return {};
|
|
37
|
+
var target = {}, sourceKeys = Object.keys(source), key, i;
|
|
38
|
+
for (i = 0; i < sourceKeys.length; i++)
|
|
39
|
+
key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
|
|
40
|
+
return target;
|
|
41
|
+
}
|
|
42
|
+
var LinearGradientFrame = styled(YStack, {
|
|
6
43
|
name: "LinearGradient",
|
|
7
44
|
overflow: "hidden",
|
|
8
45
|
position: "relative"
|
|
9
|
-
}), LinearGradient = LinearGradientFrame.styleable(
|
|
10
|
-
(propsIn,
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
), gradientStyle = {
|
|
46
|
+
}), LinearGradient = LinearGradientFrame.styleable(function(propsIn, ref) {
|
|
47
|
+
var _props_colors, props = useProps(propsIn), start = props.start, end = props.end, colorsProp = props.colors, locations = props.locations, children = props.children, stackProps = _object_without_properties(props, [
|
|
48
|
+
"start",
|
|
49
|
+
"end",
|
|
50
|
+
"colors",
|
|
51
|
+
"locations",
|
|
52
|
+
"children"
|
|
53
|
+
]), theme = useTheme(), colors = ((_props_colors = props.colors) === null || _props_colors === void 0 ? void 0 : _props_colors.map(function(c) {
|
|
54
|
+
var _theme_c, _theme_c_get;
|
|
55
|
+
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;
|
|
56
|
+
})) || [];
|
|
57
|
+
return process.env.NODE_ENV !== "production" && colors.some(function(c) {
|
|
58
|
+
var normalized = normalizeColor(c);
|
|
59
|
+
if (!normalized || normalized.startsWith("$"))
|
|
60
|
+
return !0;
|
|
61
|
+
}) && (console.error('LinearGradient: "colors" prop contains invalid color tokens: '.concat(colors, ' fallback to default colors: ["#000", "#fff"]')), colors = [
|
|
62
|
+
"#000",
|
|
63
|
+
"#fff"
|
|
64
|
+
]), /* @__PURE__ */ React.createElement(LinearGradientFrame, _object_spread({
|
|
65
|
+
ref
|
|
66
|
+
}, stackProps), /* @__PURE__ */ React.createElement(ExpoLinearGradient, {
|
|
67
|
+
start,
|
|
68
|
+
end,
|
|
69
|
+
colors,
|
|
70
|
+
locations,
|
|
71
|
+
style: gradientStyle
|
|
72
|
+
}), children);
|
|
73
|
+
}), gradientStyle = {
|
|
38
74
|
position: "absolute",
|
|
39
75
|
top: 0,
|
|
40
76
|
left: 0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/LinearGradient-shared.tsx"],
|
|
4
|
-
"mappings": "AACA,
|
|
5
|
-
"names": ["
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/packages/linear-gradient/src/LinearGradient-shared.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,GAEfG,QAAuED,MAAvEC,OAAOC,MAAgEF,MAAhEE,KAAaC,aAAmDH,MAA3DI,QAAoBC,YAAuCL,MAAvCK,WAAWC,WAA4BN,MAA5BM,UAAaC,aAAAA,2BAAeP,OAAAA;IAAvEC;IAAOC;IAAKE;IAAoBC;IAAWC;MAC7CE,QAAQnB,SAAAA,GAEVe,WACFJ,gBAAAA,MAAMI,YAAM,QAAZJ,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,gBAEzBV,OAAOW,KAAK,SAACL,GAAAA;AACX,QAAMM,aAAa9B,eAAewB,CAAAA;AAClC,QAAI,CAACM,cAAcA,WAAWC,WAAW,GAAA;AACvC,aAAO;EAEX,CAAA,MAEAC,QAAQC,MACL,gEAAsE,OAAPf,QAAO,+CAAA,CAAA,GAEzEA,SAAS;IAAC;IAAQ;MAKpB,sBAAA,cAACX,qBAAAA,eAAAA;IAAoBM;KAAqBQ,UAAAA,GACxC,sBAAA,cAACf,oBAAAA;IACCS;IACAC;IACAE;IACAC;IACAe,OAAOC;MAERf,QAAAA;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", "colorsProp", "colors", "locations", "children", "stackProps", "theme", "map", "c", "get", "process", "env", "NODE_ENV", "some", "normalized", "startsWith", "console", "error", "style", "gradientStyle", "top", "left", "right", "bottom", "zIndex"]
|
|
6
6
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
1
|
function LinearGradient(props) {
|
|
3
|
-
|
|
4
|
-
return /* @__PURE__ */
|
|
2
|
+
var Real = require("./LinearGradient-shared").LinearGradient;
|
|
3
|
+
return /* @__PURE__ */ React.createElement(Real, props);
|
|
5
4
|
}
|
|
6
5
|
export {
|
|
7
6
|
LinearGradient
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/LinearGradient.native.tsx"],
|
|
4
|
-
"mappings": "
|
|
5
|
-
"names": []
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/packages/linear-gradient/src/LinearGradient.native.tsx"],
|
|
4
|
+
"mappings": "AAKO,SAASA,eAAeC,OAAK;AAClC,MAAMC,OAAOC,QAAQ,yBAAA,EAA2BH;AAChD,SAAO,sBAAA,cAACE,MAASD,KAAAA;AACnB;",
|
|
5
|
+
"names": ["LinearGradient", "props", "Real", "require"]
|
|
6
6
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/linear-gradient.ts"],
|
|
4
|
-
"mappings": "AAAA,
|
|
5
|
-
"names": []
|
|
3
|
+
"sources": ["../../src/Users/n8/tamagui/packages/linear-gradient/src/linear-gradient.ts"],
|
|
4
|
+
"mappings": "AAAA,SAASA,sBAAsB;",
|
|
5
|
+
"names": ["LinearGradient"]
|
|
6
6
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/linear-gradient",
|
|
3
|
-
"version": "1.89.
|
|
3
|
+
"version": "1.89.27-1708113113238",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"*.css"
|
|
6
6
|
],
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@tamagui/core": "1.89.
|
|
36
|
-
"@tamagui/stacks": "1.89.
|
|
35
|
+
"@tamagui/core": "1.89.27-1708113113238",
|
|
36
|
+
"@tamagui/stacks": "1.89.27-1708113113238"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"react": "*"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@tamagui/build": "1.89.
|
|
42
|
+
"@tamagui/build": "1.89.27-1708113113238",
|
|
43
43
|
"expo-linear-gradient": "^12.7.1",
|
|
44
44
|
"react": "^18.2.0"
|
|
45
45
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinearGradient.native.d.ts","sourceRoot":"","sources":["../src/LinearGradient.native.tsx"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,wBAAgB,cAAc,CAAC,KAAK,KAAA,
|
|
1
|
+
{"version":3,"file":"LinearGradient.native.d.ts","sourceRoot":"","sources":["../src/LinearGradient.native.tsx"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,wBAAgB,cAAc,CAAC,KAAK,KAAA,eAGnC"}
|