@tamagui/linear-gradient 1.135.4-1761749240853 → 1.135.4
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.native.js +47 -60
- package/dist/cjs/LinearGradient.native.js.map +6 -1
- package/dist/cjs/index.native.js +15 -18
- package/dist/cjs/index.native.js.map +6 -1
- package/dist/cjs/linear-gradient.cjs +1 -1
- package/dist/cjs/linear-gradient.js +1 -1
- package/dist/cjs/linear-gradient.js.map +1 -1
- package/dist/cjs/linear-gradient.native.js +13 -16
- package/dist/cjs/linear-gradient.native.js.map +6 -1
- package/dist/jsx/LinearGradient.native.js +41 -71
- package/dist/jsx/LinearGradient.native.js.map +6 -1
- package/dist/jsx/index.native.js +5 -29
- package/dist/jsx/index.native.js.map +6 -1
- package/dist/jsx/linear-gradient.native.js +4 -28
- package/dist/jsx/linear-gradient.native.js.map +6 -1
- package/package.json +4 -5
|
@@ -1,76 +1,63 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
6
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
});
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: !0
|
|
22
|
-
}), mod);
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
23
16
|
var LinearGradient_exports = {};
|
|
24
17
|
__export(LinearGradient_exports, {
|
|
25
18
|
LinearGradient: () => LinearGradient
|
|
26
19
|
});
|
|
27
20
|
module.exports = __toCommonJS(LinearGradient_exports);
|
|
28
|
-
var import_jsx_runtime = require("react/jsx-runtime"),
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
var
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
colors = ((_props_colors = props.colors) === null || _props_colors === void 0 ? void 0 : _props_colors.map(function (c) {
|
|
50
|
-
var _theme_c, _theme_c_get;
|
|
51
|
-
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;
|
|
52
|
-
})) || [];
|
|
53
|
-
return process.env.NODE_ENV !== "production" && colors.some(function (c) {
|
|
54
|
-
var normalized = (0, import_core.normalizeColor)(c);
|
|
55
|
-
if (!normalized || normalized.startsWith("$")) return !0;
|
|
56
|
-
}) && (console.error(`LinearGradient: "colors" prop contains invalid color tokens: ${colors} fallback to default colors: ["#000", "#fff"]`), colors = ["#000", "#fff"]), /* @__PURE__ */(0, import_jsx_runtime.jsxs)(LinearGradientFrame, {
|
|
57
|
-
ref,
|
|
58
|
-
...stackProps,
|
|
59
|
-
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_linear_gradient.LinearGradient, {
|
|
21
|
+
var import_jsx_runtime = require("react/jsx-runtime"), import_core = require("@tamagui/core"), import_stacks = require("@tamagui/stacks"), import_linear_gradient = require("./linear-gradient"), LinearGradientFrame = (0, import_core.styled)(import_stacks.YStack, {
|
|
22
|
+
name: "LinearGradient",
|
|
23
|
+
overflow: "hidden",
|
|
24
|
+
position: "relative"
|
|
25
|
+
}), LinearGradient = LinearGradientFrame.styleable(function(propsIn, ref) {
|
|
26
|
+
var _props_colors, props = (0, import_core.useProps)(propsIn), { start, end, colors: colorsProp, locations, children, ...stackProps } = props, theme = (0, import_core.useTheme)(), colors = ((_props_colors = props.colors) === null || _props_colors === void 0 ? void 0 : _props_colors.map(function(c) {
|
|
27
|
+
var _theme_c, _theme_c_get;
|
|
28
|
+
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;
|
|
29
|
+
})) || [];
|
|
30
|
+
return process.env.NODE_ENV !== "production" && colors.some(function(c) {
|
|
31
|
+
var normalized = (0, import_core.normalizeColor)(c);
|
|
32
|
+
if (!normalized || normalized.startsWith("$"))
|
|
33
|
+
return !0;
|
|
34
|
+
}) && (console.error(`LinearGradient: "colors" prop contains invalid color tokens: ${colors} fallback to default colors: ["#000", "#fff"]`), colors = [
|
|
35
|
+
"#000",
|
|
36
|
+
"#fff"
|
|
37
|
+
]), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(LinearGradientFrame, {
|
|
38
|
+
ref,
|
|
39
|
+
...stackProps,
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_linear_gradient.LinearGradient, {
|
|
60
42
|
start,
|
|
61
43
|
end,
|
|
62
44
|
colors,
|
|
63
45
|
locations,
|
|
64
46
|
style: gradientStyle
|
|
65
|
-
}),
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
47
|
+
}),
|
|
48
|
+
children
|
|
49
|
+
]
|
|
50
|
+
});
|
|
51
|
+
}), gradientStyle = {
|
|
52
|
+
position: "absolute",
|
|
53
|
+
top: 0,
|
|
54
|
+
left: 0,
|
|
55
|
+
right: 0,
|
|
56
|
+
bottom: 0,
|
|
57
|
+
zIndex: 0
|
|
58
|
+
};
|
|
59
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
60
|
+
0 && (module.exports = {
|
|
61
|
+
LinearGradient
|
|
62
|
+
});
|
|
63
|
+
//# sourceMappingURL=LinearGradient.js.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/LinearGradient.tsx"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,yBAA2C,8BAC3C,cAA2D,0BAC3D,gBAAuB,4BACvB,yBAAqD,8BAEjD,0BAAsB,oBAAO,sBAAQ;AAAA,EACrC,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU;AACd,CAAC,GACU,iBAAiB,oBAAoB,UAAU,SAAS,SAAS,KAAK;AAC7E,MAAI,eACA,YAAQ,sBAAS,OAAO,GACxB,EAAE,OAAO,KAAK,QAAQ,YAAY,WAAW,UAAU,GAAG,WAAW,IAAI,OACzE,YAAQ,sBAAS,GACjB,WAAW,gBAAgB,MAAM,YAAY,QAAQ,kBAAkB,SAAS,SAAS,cAAc,IAAI,SAAS,GAAG;AACvH,QAAI,UACA;AACJ,YAAQ,gBAAgB,WAAW,MAAM,CAAC,OAAO,QAAQ,aAAa,SAAS,SAAS,SAAS,IAAI,KAAK,OAAO,QAAQ,iBAAiB,SAAS,eAAe;AAAA,EACtK,CAAC,MAAM,CAAC;AACR,SAAI,QAAQ,IAAI,aAAa,gBACrB,OAAO,KAAK,SAAS,GAAG;AACxB,QAAI,iBAAa,4BAAe,CAAC;AACjC,QAAI,CAAC,cAAc,WAAW,WAAW,GAAG;AACxC,aAAO;AAAA,EAEf,CAAC,MACG,QAAQ,MAAM,gEAAgE,MAAM,+CAA+C,GACnI,SAAS;AAAA,IACL;AAAA,IACA;AAAA,EACJ,IAGa,uCAAAA,MAAM,qBAAqB;AAAA,IAC5C;AAAA,IACA,GAAG;AAAA,IACH,UAAU;AAAA,MACQ,uCAAAC,KAAK,uBAAAC,gBAAoB;AAAA,QACnC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,OAAO;AAAA,MACX,CAAC;AAAA,MACD;AAAA,IACJ;AAAA,EACJ,CAAC;AACL,CAAC,GACG,gBAAgB;AAAA,EAChB,UAAU;AAAA,EACV,KAAK;AAAA,EACL,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AACZ;",
|
|
5
|
+
"names": ["_jsxs", "_jsx", "ExpoLinearGradient"]
|
|
6
|
+
}
|
package/dist/cjs/index.native.js
CHANGED
|
@@ -1,29 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
6
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
});
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: !0
|
|
22
|
-
}), mod);
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
23
16
|
var index_exports = {};
|
|
24
17
|
__export(index_exports, {
|
|
25
18
|
LinearGradient: () => import_LinearGradient.LinearGradient
|
|
26
19
|
});
|
|
27
20
|
module.exports = __toCommonJS(index_exports);
|
|
28
|
-
var import_LinearGradient = require("./LinearGradient
|
|
29
|
-
|
|
21
|
+
var import_LinearGradient = require("./LinearGradient");
|
|
22
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
23
|
+
0 && (module.exports = {
|
|
24
|
+
LinearGradient
|
|
25
|
+
});
|
|
26
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.ts"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAA+B;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -35,7 +35,7 @@ __export(linear_gradient_exports, {
|
|
|
35
35
|
});
|
|
36
36
|
module.exports = __toCommonJS(linear_gradient_exports);
|
|
37
37
|
var import_core = require("@tamagui/core"),
|
|
38
|
-
React = __toESM(require("react")
|
|
38
|
+
React = __toESM(require("react")),
|
|
39
39
|
import_react_native = require("react-native-web"),
|
|
40
40
|
import_jsx_runtime = require("react/jsx-runtime");
|
|
41
41
|
function LinearGradient({
|
|
@@ -25,7 +25,7 @@ __export(linear_gradient_exports, {
|
|
|
25
25
|
LinearGradient: () => LinearGradient
|
|
26
26
|
});
|
|
27
27
|
module.exports = __toCommonJS(linear_gradient_exports);
|
|
28
|
-
var import_core = require("@tamagui/core"), React = __toESM(require("react")
|
|
28
|
+
var import_core = require("@tamagui/core"), React = __toESM(require("react")), import_react_native = require("react-native-web"), import_jsx_runtime = require("react/jsx-runtime");
|
|
29
29
|
function LinearGradient({
|
|
30
30
|
colors,
|
|
31
31
|
locations,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/linear-gradient.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kBAA+B,0BAS/B,QAAuB,
|
|
4
|
+
"mappings": "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",
|
|
5
5
|
"names": ["width", "height"]
|
|
6
6
|
}
|
|
@@ -1,29 +1,26 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
6
|
var __export = (target, all) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
});
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: !0
|
|
22
|
-
}), mod);
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: !0 });
|
|
9
|
+
}, __copyProps = (to, from, except, desc) => {
|
|
10
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
11
|
+
for (let key of __getOwnPropNames(from))
|
|
12
|
+
!__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
return to;
|
|
14
|
+
};
|
|
15
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
|
|
23
16
|
var linear_gradient_native_exports = {};
|
|
24
17
|
__export(linear_gradient_native_exports, {
|
|
25
18
|
LinearGradient: () => import_expo_linear_gradient.LinearGradient
|
|
26
19
|
});
|
|
27
20
|
module.exports = __toCommonJS(linear_gradient_native_exports);
|
|
28
21
|
var import_expo_linear_gradient = require("expo-linear-gradient");
|
|
22
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
23
|
+
0 && (module.exports = {
|
|
24
|
+
LinearGradient
|
|
25
|
+
});
|
|
29
26
|
//# sourceMappingURL=linear-gradient.native.js.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/linear-gradient.native.tsx"],
|
|
4
|
+
"mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kCAA+B;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -1,76 +1,46 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(LinearGradient_exports);
|
|
28
|
-
var import_jsx_runtime = require("react/jsx-runtime"),
|
|
29
|
-
import_core = require("@tamagui/core"),
|
|
30
|
-
import_stacks = require("@tamagui/stacks"),
|
|
31
|
-
import_linear_gradient = require("./linear-gradient.native.js"),
|
|
32
|
-
LinearGradientFrame = (0, import_core.styled)(import_stacks.YStack, {
|
|
33
|
-
name: "LinearGradient",
|
|
34
|
-
overflow: "hidden",
|
|
35
|
-
position: "relative"
|
|
36
|
-
}),
|
|
37
|
-
LinearGradient = LinearGradientFrame.styleable(function (propsIn, ref) {
|
|
38
|
-
var _props_colors,
|
|
39
|
-
props = (0, import_core.useProps)(propsIn),
|
|
40
|
-
{
|
|
41
|
-
start,
|
|
42
|
-
end,
|
|
43
|
-
colors: colorsProp,
|
|
44
|
-
locations,
|
|
45
|
-
children,
|
|
46
|
-
...stackProps
|
|
47
|
-
} = props,
|
|
48
|
-
theme = (0, import_core.useTheme)(),
|
|
49
|
-
colors = ((_props_colors = props.colors) === null || _props_colors === void 0 ? void 0 : _props_colors.map(function (c) {
|
|
50
|
-
var _theme_c, _theme_c_get;
|
|
51
|
-
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;
|
|
52
|
-
})) || [];
|
|
53
|
-
return process.env.NODE_ENV !== "production" && colors.some(function (c) {
|
|
54
|
-
var normalized = (0, import_core.normalizeColor)(c);
|
|
55
|
-
if (!normalized || normalized.startsWith("$")) return !0;
|
|
56
|
-
}) && (console.error(`LinearGradient: "colors" prop contains invalid color tokens: ${colors} fallback to default colors: ["#000", "#fff"]`), colors = ["#000", "#fff"]), /* @__PURE__ */(0, import_jsx_runtime.jsxs)(LinearGradientFrame, {
|
|
57
|
-
ref,
|
|
58
|
-
...stackProps,
|
|
59
|
-
children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_linear_gradient.LinearGradient, {
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { normalizeColor, styled, useProps, useTheme } from "@tamagui/core";
|
|
3
|
+
import { YStack } from "@tamagui/stacks";
|
|
4
|
+
import { LinearGradient as ExpoLinearGradient } from "./linear-gradient";
|
|
5
|
+
var LinearGradientFrame = styled(YStack, {
|
|
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, {
|
|
60
26
|
start,
|
|
61
27
|
end,
|
|
62
28
|
colors,
|
|
63
29
|
locations,
|
|
64
30
|
style: gradientStyle
|
|
65
|
-
}),
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
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/LinearGradient.tsx"],
|
|
4
|
+
"mappings": "AAAA,SAAS,OAAO,MAAM,QAAQ,aAAa;AAC3C,SAAS,gBAAgB,QAAQ,UAAU,gBAAgB;AAC3D,SAAS,cAAc;AACvB,SAAS,kBAAkB,0BAA0B;AAErD,IAAI,sBAAsB,OAAO,QAAQ;AAAA,EACrC,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU;AACd,CAAC,GACU,iBAAiB,oBAAoB,UAAU,SAAS,SAAS,KAAK;AAC7E,MAAI,eACA,QAAQ,SAAS,OAAO,GACxB,EAAE,OAAO,KAAK,QAAQ,YAAY,WAAW,UAAU,GAAG,WAAW,IAAI,OACzE,QAAQ,SAAS,GACjB,WAAW,gBAAgB,MAAM,YAAY,QAAQ,kBAAkB,SAAS,SAAS,cAAc,IAAI,SAAS,GAAG;AACvH,QAAI,UACA;AACJ,YAAQ,gBAAgB,WAAW,MAAM,CAAC,OAAO,QAAQ,aAAa,SAAS,SAAS,SAAS,IAAI,KAAK,OAAO,QAAQ,iBAAiB,SAAS,eAAe;AAAA,EACtK,CAAC,MAAM,CAAC;AACR,SAAI,QAAQ,IAAI,aAAa,gBACrB,OAAO,KAAK,SAAS,GAAG;AACxB,QAAI,aAAa,eAAe,CAAC;AACjC,QAAI,CAAC,cAAc,WAAW,WAAW,GAAG;AACxC,aAAO;AAAA,EAEf,CAAC,MACG,QAAQ,MAAM,gEAAgE,MAAM,+CAA+C,GACnI,SAAS;AAAA,IACL;AAAA,IACA;AAAA,EACJ,IAGa,sBAAM,qBAAqB;AAAA,IAC5C;AAAA,IACA,GAAG;AAAA,IACH,UAAU;AAAA,MACQ,qBAAK,oBAAoB;AAAA,QACnC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,OAAO;AAAA,MACX,CAAC;AAAA,MACD;AAAA,IACJ;AAAA,EACJ,CAAC;AACL,CAAC,GACG,gBAAgB;AAAA,EAChB,UAAU;AAAA,EACV,KAAK;AAAA,EACL,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AACZ;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
package/dist/jsx/index.native.js
CHANGED
|
@@ -1,29 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all) __defProp(target, name, {
|
|
9
|
-
get: all[name],
|
|
10
|
-
enumerable: !0
|
|
11
|
-
});
|
|
12
|
-
},
|
|
13
|
-
__copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
-
get: () => from[key],
|
|
16
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
-
});
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: !0
|
|
22
|
-
}), mod);
|
|
23
|
-
var index_exports = {};
|
|
24
|
-
__export(index_exports, {
|
|
25
|
-
LinearGradient: () => import_LinearGradient.LinearGradient
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(index_exports);
|
|
28
|
-
var import_LinearGradient = require("./LinearGradient.native.js");
|
|
29
|
-
//# sourceMappingURL=index.native.js.map
|
|
1
|
+
import { LinearGradient } from "./LinearGradient";
|
|
2
|
+
export {
|
|
3
|
+
LinearGradient
|
|
4
|
+
};
|
|
5
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/index.ts"],
|
|
4
|
+
"mappings": "AAAA,SAAS,sBAAsB;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
|
@@ -1,29 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all) __defProp(target, name, {
|
|
9
|
-
get: all[name],
|
|
10
|
-
enumerable: !0
|
|
11
|
-
});
|
|
12
|
-
},
|
|
13
|
-
__copyProps = (to, from, except, desc) => {
|
|
14
|
-
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
15
|
-
get: () => from[key],
|
|
16
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
17
|
-
});
|
|
18
|
-
return to;
|
|
19
|
-
};
|
|
20
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
21
|
-
value: !0
|
|
22
|
-
}), mod);
|
|
23
|
-
var linear_gradient_native_exports = {};
|
|
24
|
-
__export(linear_gradient_native_exports, {
|
|
25
|
-
LinearGradient: () => import_expo_linear_gradient.LinearGradient
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(linear_gradient_native_exports);
|
|
28
|
-
var import_expo_linear_gradient = require("expo-linear-gradient");
|
|
1
|
+
import { LinearGradient } from "expo-linear-gradient";
|
|
2
|
+
export {
|
|
3
|
+
LinearGradient
|
|
4
|
+
};
|
|
29
5
|
//# sourceMappingURL=linear-gradient.native.js.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
{
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/linear-gradient.native.tsx"],
|
|
4
|
+
"mappings": "AAAA,SAAS,sBAAsB;",
|
|
5
|
+
"names": []
|
|
6
|
+
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/linear-gradient",
|
|
3
|
-
"version": "1.135.4
|
|
4
|
-
"type": "module",
|
|
3
|
+
"version": "1.135.4",
|
|
5
4
|
"sideEffects": [
|
|
6
5
|
"*.css"
|
|
7
6
|
],
|
|
@@ -37,11 +36,11 @@
|
|
|
37
36
|
}
|
|
38
37
|
},
|
|
39
38
|
"dependencies": {
|
|
40
|
-
"@tamagui/core": "1.135.4
|
|
41
|
-
"@tamagui/stacks": "1.135.4
|
|
39
|
+
"@tamagui/core": "1.135.4",
|
|
40
|
+
"@tamagui/stacks": "1.135.4"
|
|
42
41
|
},
|
|
43
42
|
"devDependencies": {
|
|
44
|
-
"@tamagui/build": "1.135.4
|
|
43
|
+
"@tamagui/build": "1.135.4",
|
|
45
44
|
"expo-linear-gradient": "~14.1.5",
|
|
46
45
|
"react": "*",
|
|
47
46
|
"react-native": "^0.79.2"
|