@tamagui/linear-gradient 1.89.23 → 1.89.25

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.
@@ -0,0 +1,57 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
6
+ for (var name in all)
7
+ __defProp(target, name, { get: all[name], enumerable: !0 });
8
+ }, __copyProps = (to, from, except, desc) => {
9
+ if (from && typeof from == "object" || typeof from == "function")
10
+ for (let key of __getOwnPropNames(from))
11
+ !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
15
+ var LinearGradient_shared_exports = {};
16
+ __export(LinearGradient_shared_exports, {
17
+ LinearGradient: () => LinearGradient
18
+ });
19
+ module.exports = __toCommonJS(LinearGradient_shared_exports);
20
+ var import_core = require("@tamagui/core"), import_stacks = require("@tamagui/stacks"), import_linear_gradient = require("./linear-gradient"), import_jsx_runtime = require("react/jsx-runtime");
21
+ const LinearGradientFrame = (0, import_core.styled)(import_stacks.YStack, {
22
+ name: "LinearGradient",
23
+ overflow: "hidden",
24
+ position: "relative"
25
+ }), LinearGradient = LinearGradientFrame.styleable(
26
+ (propsIn, ref) => {
27
+ const props = (0, import_core.useProps)(propsIn), { start, end, colors: colorsProp, locations, children, ...stackProps } = props, theme = (0, import_core.useTheme)();
28
+ let colors = props.colors?.map((c) => theme[c]?.get("web") ?? c) || [];
29
+ return process.env.NODE_ENV !== "production" && colors.some((c) => {
30
+ const normalized = (0, import_core.normalizeColor)(c);
31
+ if (!normalized || normalized.startsWith("$"))
32
+ return !0;
33
+ }) && (console.error(
34
+ `LinearGradient: "colors" prop contains invalid color tokens: ${colors} fallback to default colors: ["#000", "#fff"]`
35
+ ), colors = ["#000", "#fff"]), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(LinearGradientFrame, { ref, ...stackProps, children: [
36
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
37
+ import_linear_gradient.LinearGradient,
38
+ {
39
+ start,
40
+ end,
41
+ colors,
42
+ locations,
43
+ style: gradientStyle
44
+ }
45
+ ),
46
+ children
47
+ ] });
48
+ }
49
+ ), gradientStyle = {
50
+ position: "absolute",
51
+ top: 0,
52
+ left: 0,
53
+ right: 0,
54
+ bottom: 0,
55
+ zIndex: 0
56
+ };
57
+ //# sourceMappingURL=LinearGradient-shared.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/LinearGradient-shared.tsx"],
4
+ "mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kBAA2D,0BAC3D,gBAAuB,4BAIvB,yBAAqD,8BA6C/C;AAnCN,MAAM,0BAAsB,oBAAO,sBAAQ;AAAA,EACzC,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU;AACZ,CAAC,GAEY,iBAAiB,oBAAoB;AAAA,EAChD,CAAC,SAAS,QAAQ;AAChB,UAAM,YAAQ,sBAAS,OAAO,GAExB,EAAE,OAAO,KAAK,QAAQ,YAAY,WAAW,UAAU,GAAG,WAAW,IAAI,OACzE,YAAQ,sBAAS;AAEvB,QAAI,SACF,MAAM,QAAQ,IAAI,CAAC,MACT,MAAM,CAAC,GAAG,IAAI,KAAK,KAAgB,CAC5C,KAAK,CAAC;AAET,WAAI,QAAQ,IAAI,aAAa,gBAEzB,OAAO,KAAK,CAAC,MAAM;AACjB,YAAM,iBAAa,4BAAe,CAAC;AACnC,UAAI,CAAC,cAAc,WAAW,WAAW,GAAG;AAC1C,eAAO;AAAA,IAEX,CAAC,MAED,QAAQ;AAAA,MACN,gEAAgE,MAAM;AAAA,IACxE,GACA,SAAS,CAAC,QAAQ,MAAM,IAK1B,6CAAC,uBAAoB,KAAkB,GAAG,YACxC;AAAA;AAAA,QAAC,uBAAAA;AAAA,QAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,OAAO;AAAA;AAAA,MACT;AAAA,MACC;AAAA,OACH;AAAA,EAEJ;AACF,GAIM,gBAA2B;AAAA,EAC/B,UAAU;AAAA,EACV,KAAK;AAAA,EACL,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AACV;",
5
+ "names": ["ExpoLinearGradient"]
6
+ }
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
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);
16
+ var LinearGradient_shared_exports = {};
17
+ __export(LinearGradient_shared_exports, {
18
+ LinearGradient: () => LinearGradient
19
+ });
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"), import_jsx_runtime = require("react/jsx-runtime");
22
+ const LinearGradientFrame = (0, import_core.styled)(import_stacks.YStack, {
23
+ name: "LinearGradient",
24
+ overflow: "hidden",
25
+ position: "relative"
26
+ }), LinearGradient = LinearGradientFrame.styleable(
27
+ (propsIn, ref) => {
28
+ var _a;
29
+ const props = (0, import_core.useProps)(propsIn), { start, end, colors: colorsProp, locations, children, ...stackProps } = props, theme = (0, import_core.useTheme)();
30
+ let colors = ((_a = props.colors) == null ? void 0 : _a.map((c) => {
31
+ var _a2;
32
+ return ((_a2 = theme[c]) == null ? void 0 : _a2.get("web")) ?? c;
33
+ })) || [];
34
+ return process.env.NODE_ENV !== "production" && colors.some((c) => {
35
+ const normalized = (0, import_core.normalizeColor)(c);
36
+ if (!normalized || normalized.startsWith("$"))
37
+ return !0;
38
+ }) && (console.error(
39
+ `LinearGradient: "colors" prop contains invalid color tokens: ${colors} fallback to default colors: ["#000", "#fff"]`
40
+ ), colors = ["#000", "#fff"]), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(LinearGradientFrame, { ref, ...stackProps, children: [
41
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
42
+ import_linear_gradient.LinearGradient,
43
+ {
44
+ start,
45
+ end,
46
+ colors,
47
+ locations,
48
+ style: gradientStyle
49
+ }
50
+ ),
51
+ children
52
+ ] });
53
+ }
54
+ ), gradientStyle = {
55
+ position: "absolute",
56
+ top: 0,
57
+ left: 0,
58
+ right: 0,
59
+ bottom: 0,
60
+ zIndex: 0
61
+ };
62
+ // Annotate the CommonJS export names for ESM import in node:
63
+ 0 && (module.exports = {
64
+ LinearGradient
65
+ });
66
+ //# sourceMappingURL=LinearGradient-shared.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/LinearGradient-shared.tsx"],
4
+ "mappings": ";;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,kBAA2D,0BAC3D,gBAAuB,4BAIvB,yBAAqD,8BA6C/C;AAnCN,MAAM,0BAAsB,oBAAO,sBAAQ;AAAA,EACzC,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU;AACZ,CAAC,GAEY,iBAAiB,oBAAoB;AAAA,EAChD,CAAC,SAAS,QAAQ;AAvBpB;AAwBI,UAAM,YAAQ,sBAAS,OAAO,GAExB,EAAE,OAAO,KAAK,QAAQ,YAAY,WAAW,UAAU,GAAG,WAAW,IAAI,OACzE,YAAQ,sBAAS;AAEvB,QAAI,WACF,WAAM,WAAN,mBAAc,IAAI,CAAC,MAAM;AA9B/B,UAAAA;AA+BQ,eAAQA,MAAA,MAAM,CAAC,MAAP,gBAAAA,IAAU,IAAI,WAAqB;AAAA,IAC7C,OAAM,CAAC;AAET,WAAI,QAAQ,IAAI,aAAa,gBAEzB,OAAO,KAAK,CAAC,MAAM;AACjB,YAAM,iBAAa,4BAAe,CAAC;AACnC,UAAI,CAAC,cAAc,WAAW,WAAW,GAAG;AAC1C,eAAO;AAAA,IAEX,CAAC,MAED,QAAQ;AAAA,MACN,gEAAgE,MAAM;AAAA,IACxE,GACA,SAAS,CAAC,QAAQ,MAAM,IAK1B,6CAAC,uBAAoB,KAAkB,GAAG,YACxC;AAAA;AAAA,QAAC,uBAAAC;AAAA,QAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,OAAO;AAAA;AAAA,MACT;AAAA,MACC;AAAA,OACH;AAAA,EAEJ;AACF,GAIM,gBAA2B;AAAA,EAC/B,UAAU;AAAA,EACV,KAAK;AAAA,EACL,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AACV;",
5
+ "names": ["_a", "ExpoLinearGradient"]
6
+ }
@@ -11,5 +11,5 @@ var __copyProps = (to, from, except, desc) => {
11
11
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
12
12
  var LinearGradient_exports = {};
13
13
  module.exports = __toCommonJS(LinearGradient_exports);
14
- __reExport(LinearGradient_exports, require("./LinearGradient.shared"), module.exports);
14
+ __reExport(LinearGradient_exports, require("./LinearGradient-shared"), module.exports);
15
15
  //# sourceMappingURL=LinearGradient.js.map
@@ -0,0 +1,44 @@
1
+ import { normalizeColor, styled, useProps, useTheme } from "@tamagui/core";
2
+ import { YStack } from "@tamagui/stacks";
3
+ import { LinearGradient as ExpoLinearGradient } from "./linear-gradient";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ const LinearGradientFrame = styled(YStack, {
6
+ name: "LinearGradient",
7
+ overflow: "hidden",
8
+ position: "relative"
9
+ }), LinearGradient = LinearGradientFrame.styleable(
10
+ (propsIn, ref) => {
11
+ const props = useProps(propsIn), { start, end, colors: colorsProp, locations, children, ...stackProps } = props, theme = useTheme();
12
+ let colors = props.colors?.map((c) => theme[c]?.get("web") ?? c) || [];
13
+ return process.env.NODE_ENV !== "production" && colors.some((c) => {
14
+ const normalized = normalizeColor(c);
15
+ if (!normalized || normalized.startsWith("$"))
16
+ return !0;
17
+ }) && (console.error(
18
+ `LinearGradient: "colors" prop contains invalid color tokens: ${colors} fallback to default colors: ["#000", "#fff"]`
19
+ ), colors = ["#000", "#fff"]), /* @__PURE__ */ jsxs(LinearGradientFrame, { ref, ...stackProps, children: [
20
+ /* @__PURE__ */ jsx(
21
+ ExpoLinearGradient,
22
+ {
23
+ start,
24
+ end,
25
+ colors,
26
+ locations,
27
+ style: gradientStyle
28
+ }
29
+ ),
30
+ children
31
+ ] });
32
+ }
33
+ ), gradientStyle = {
34
+ position: "absolute",
35
+ top: 0,
36
+ left: 0,
37
+ right: 0,
38
+ bottom: 0,
39
+ zIndex: 0
40
+ };
41
+ export {
42
+ LinearGradient
43
+ };
44
+ //# sourceMappingURL=LinearGradient-shared.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/LinearGradient-shared.tsx"],
4
+ "mappings": "AACA,SAAS,gBAAgB,QAAQ,UAAU,gBAAgB;AAC3D,SAAS,cAAc;AAIvB,SAAS,kBAAkB,0BAA0B;AA6C/C,SACE,KADF;AAnCN,MAAM,sBAAsB,OAAO,QAAQ;AAAA,EACzC,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU;AACZ,CAAC,GAEY,iBAAiB,oBAAoB;AAAA,EAChD,CAAC,SAAS,QAAQ;AAChB,UAAM,QAAQ,SAAS,OAAO,GAExB,EAAE,OAAO,KAAK,QAAQ,YAAY,WAAW,UAAU,GAAG,WAAW,IAAI,OACzE,QAAQ,SAAS;AAEvB,QAAI,SACF,MAAM,QAAQ,IAAI,CAAC,MACT,MAAM,CAAC,GAAG,IAAI,KAAK,KAAgB,CAC5C,KAAK,CAAC;AAET,WAAI,QAAQ,IAAI,aAAa,gBAEzB,OAAO,KAAK,CAAC,MAAM;AACjB,YAAM,aAAa,eAAe,CAAC;AACnC,UAAI,CAAC,cAAc,WAAW,WAAW,GAAG;AAC1C,eAAO;AAAA,IAEX,CAAC,MAED,QAAQ;AAAA,MACN,gEAAgE,MAAM;AAAA,IACxE,GACA,SAAS,CAAC,QAAQ,MAAM,IAK1B,qBAAC,uBAAoB,KAAkB,GAAG,YACxC;AAAA;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,OAAO;AAAA;AAAA,MACT;AAAA,MACC;AAAA,OACH;AAAA,EAEJ;AACF,GAIM,gBAA2B;AAAA,EAC/B,UAAU;AAAA,EACV,KAAK;AAAA,EACL,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AACV;",
5
+ "names": []
6
+ }
@@ -0,0 +1,45 @@
1
+ import { normalizeColor, styled, useProps, useTheme } from "@tamagui/core";
2
+ import { YStack } from "@tamagui/stacks";
3
+ import { LinearGradient as ExpoLinearGradient } from "./linear-gradient.mjs";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ const LinearGradientFrame = styled(YStack, {
6
+ name: "LinearGradient",
7
+ overflow: "hidden",
8
+ position: "relative"
9
+ }),
10
+ LinearGradient = LinearGradientFrame.styleable((propsIn, ref) => {
11
+ const props = useProps(propsIn),
12
+ {
13
+ start,
14
+ end,
15
+ colors: colorsProp,
16
+ locations,
17
+ children,
18
+ ...stackProps
19
+ } = props,
20
+ theme = useTheme();
21
+ let colors = props.colors?.map(c => theme[c]?.get("web") ?? c) || [];
22
+ return process.env.NODE_ENV !== "production" && colors.some(c => {
23
+ const normalized = normalizeColor(c);
24
+ if (!normalized || normalized.startsWith("$")) return !0;
25
+ }) && (console.error(`LinearGradient: "colors" prop contains invalid color tokens: ${colors} fallback to default colors: ["#000", "#fff"]`), colors = ["#000", "#fff"]), /* @__PURE__ */jsxs(LinearGradientFrame, {
26
+ ref,
27
+ ...stackProps,
28
+ children: [/* @__PURE__ */jsx(ExpoLinearGradient, {
29
+ start,
30
+ end,
31
+ colors,
32
+ locations,
33
+ style: gradientStyle
34
+ }), children]
35
+ });
36
+ }),
37
+ gradientStyle = {
38
+ position: "absolute",
39
+ top: 0,
40
+ left: 0,
41
+ right: 0,
42
+ bottom: 0,
43
+ zIndex: 0
44
+ };
45
+ export { LinearGradient };
@@ -0,0 +1,48 @@
1
+ import { normalizeColor, styled, useProps, useTheme } from "@tamagui/core";
2
+ import { YStack } from "@tamagui/stacks";
3
+ import { LinearGradient as ExpoLinearGradient } from "./linear-gradient";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ const LinearGradientFrame = styled(YStack, {
6
+ name: "LinearGradient",
7
+ overflow: "hidden",
8
+ position: "relative"
9
+ }), LinearGradient = LinearGradientFrame.styleable(
10
+ (propsIn, ref) => {
11
+ var _a;
12
+ const props = useProps(propsIn), { start, end, colors: colorsProp, locations, children, ...stackProps } = props, theme = useTheme();
13
+ let colors = ((_a = props.colors) == null ? void 0 : _a.map((c) => {
14
+ var _a2;
15
+ return ((_a2 = theme[c]) == null ? void 0 : _a2.get("web")) ?? c;
16
+ })) || [];
17
+ return process.env.NODE_ENV !== "production" && colors.some((c) => {
18
+ const normalized = normalizeColor(c);
19
+ if (!normalized || normalized.startsWith("$"))
20
+ return !0;
21
+ }) && (console.error(
22
+ `LinearGradient: "colors" prop contains invalid color tokens: ${colors} fallback to default colors: ["#000", "#fff"]`
23
+ ), colors = ["#000", "#fff"]), /* @__PURE__ */ jsxs(LinearGradientFrame, { ref, ...stackProps, children: [
24
+ /* @__PURE__ */ jsx(
25
+ ExpoLinearGradient,
26
+ {
27
+ start,
28
+ end,
29
+ colors,
30
+ locations,
31
+ style: gradientStyle
32
+ }
33
+ ),
34
+ children
35
+ ] });
36
+ }
37
+ ), gradientStyle = {
38
+ position: "absolute",
39
+ top: 0,
40
+ left: 0,
41
+ right: 0,
42
+ bottom: 0,
43
+ zIndex: 0
44
+ };
45
+ export {
46
+ LinearGradient
47
+ };
48
+ //# sourceMappingURL=LinearGradient-shared.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/LinearGradient-shared.tsx"],
4
+ "mappings": "AACA,SAAS,gBAAgB,QAAQ,UAAU,gBAAgB;AAC3D,SAAS,cAAc;AAIvB,SAAS,kBAAkB,0BAA0B;AA6C/C,SACE,KADF;AAnCN,MAAM,sBAAsB,OAAO,QAAQ;AAAA,EACzC,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU;AACZ,CAAC,GAEY,iBAAiB,oBAAoB;AAAA,EAChD,CAAC,SAAS,QAAQ;AAvBpB;AAwBI,UAAM,QAAQ,SAAS,OAAO,GAExB,EAAE,OAAO,KAAK,QAAQ,YAAY,WAAW,UAAU,GAAG,WAAW,IAAI,OACzE,QAAQ,SAAS;AAEvB,QAAI,WACF,WAAM,WAAN,mBAAc,IAAI,CAAC,MAAM;AA9B/B,UAAAA;AA+BQ,eAAQA,MAAA,MAAM,CAAC,MAAP,gBAAAA,IAAU,IAAI,WAAqB;AAAA,IAC7C,OAAM,CAAC;AAET,WAAI,QAAQ,IAAI,aAAa,gBAEzB,OAAO,KAAK,CAAC,MAAM;AACjB,YAAM,aAAa,eAAe,CAAC;AACnC,UAAI,CAAC,cAAc,WAAW,WAAW,GAAG;AAC1C,eAAO;AAAA,IAEX,CAAC,MAED,QAAQ;AAAA,MACN,gEAAgE,MAAM;AAAA,IACxE,GACA,SAAS,CAAC,QAAQ,MAAM,IAK1B,qBAAC,uBAAoB,KAAkB,GAAG,YACxC;AAAA;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,OAAO;AAAA;AAAA,MACT;AAAA,MACC;AAAA,OACH;AAAA,EAEJ;AACF,GAIM,gBAA2B;AAAA,EAC/B,UAAU;AAAA,EACV,KAAK;AAAA,EACL,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AACV;",
5
+ "names": ["_a"]
6
+ }
@@ -1,2 +1,2 @@
1
- export * from "./LinearGradient.shared";
1
+ export * from "./LinearGradient-shared";
2
2
  //# sourceMappingURL=LinearGradient.js.map
@@ -1 +1 @@
1
- export * from "./LinearGradient.shared";
1
+ export * from "./LinearGradient-shared.mjs";
@@ -0,0 +1,44 @@
1
+ import { normalizeColor, styled, useProps, useTheme } from "@tamagui/core";
2
+ import { YStack } from "@tamagui/stacks";
3
+ import { LinearGradient as ExpoLinearGradient } from "./linear-gradient";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ const LinearGradientFrame = styled(YStack, {
6
+ name: "LinearGradient",
7
+ overflow: "hidden",
8
+ position: "relative"
9
+ }), LinearGradient = LinearGradientFrame.styleable(
10
+ (propsIn, ref) => {
11
+ const props = useProps(propsIn), { start, end, colors: colorsProp, locations, children, ...stackProps } = props, theme = useTheme();
12
+ let colors = props.colors?.map((c) => theme[c]?.get("web") ?? c) || [];
13
+ return process.env.NODE_ENV !== "production" && colors.some((c) => {
14
+ const normalized = normalizeColor(c);
15
+ if (!normalized || normalized.startsWith("$"))
16
+ return !0;
17
+ }) && (console.error(
18
+ `LinearGradient: "colors" prop contains invalid color tokens: ${colors} fallback to default colors: ["#000", "#fff"]`
19
+ ), colors = ["#000", "#fff"]), /* @__PURE__ */ jsxs(LinearGradientFrame, { ref, ...stackProps, children: [
20
+ /* @__PURE__ */ jsx(
21
+ ExpoLinearGradient,
22
+ {
23
+ start,
24
+ end,
25
+ colors,
26
+ locations,
27
+ style: gradientStyle
28
+ }
29
+ ),
30
+ children
31
+ ] });
32
+ }
33
+ ), gradientStyle = {
34
+ position: "absolute",
35
+ top: 0,
36
+ left: 0,
37
+ right: 0,
38
+ bottom: 0,
39
+ zIndex: 0
40
+ };
41
+ export {
42
+ LinearGradient
43
+ };
44
+ //# sourceMappingURL=LinearGradient-shared.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/LinearGradient-shared.tsx"],
4
+ "mappings": "AACA,SAAS,gBAAgB,QAAQ,UAAU,gBAAgB;AAC3D,SAAS,cAAc;AAIvB,SAAS,kBAAkB,0BAA0B;AA6C/C,SACE,KADF;AAnCN,MAAM,sBAAsB,OAAO,QAAQ;AAAA,EACzC,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU;AACZ,CAAC,GAEY,iBAAiB,oBAAoB;AAAA,EAChD,CAAC,SAAS,QAAQ;AAChB,UAAM,QAAQ,SAAS,OAAO,GAExB,EAAE,OAAO,KAAK,QAAQ,YAAY,WAAW,UAAU,GAAG,WAAW,IAAI,OACzE,QAAQ,SAAS;AAEvB,QAAI,SACF,MAAM,QAAQ,IAAI,CAAC,MACT,MAAM,CAAC,GAAG,IAAI,KAAK,KAAgB,CAC5C,KAAK,CAAC;AAET,WAAI,QAAQ,IAAI,aAAa,gBAEzB,OAAO,KAAK,CAAC,MAAM;AACjB,YAAM,aAAa,eAAe,CAAC;AACnC,UAAI,CAAC,cAAc,WAAW,WAAW,GAAG;AAC1C,eAAO;AAAA,IAEX,CAAC,MAED,QAAQ;AAAA,MACN,gEAAgE,MAAM;AAAA,IACxE,GACA,SAAS,CAAC,QAAQ,MAAM,IAK1B,qBAAC,uBAAoB,KAAkB,GAAG,YACxC;AAAA;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,OAAO;AAAA;AAAA,MACT;AAAA,MACC;AAAA,OACH;AAAA,EAEJ;AACF,GAIM,gBAA2B;AAAA,EAC/B,UAAU;AAAA,EACV,KAAK;AAAA,EACL,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AACV;",
5
+ "names": []
6
+ }
@@ -0,0 +1,45 @@
1
+ import { normalizeColor, styled, useProps, useTheme } from "@tamagui/core";
2
+ import { YStack } from "@tamagui/stacks";
3
+ import { LinearGradient as ExpoLinearGradient } from "./linear-gradient.mjs";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ const LinearGradientFrame = styled(YStack, {
6
+ name: "LinearGradient",
7
+ overflow: "hidden",
8
+ position: "relative"
9
+ }),
10
+ LinearGradient = LinearGradientFrame.styleable((propsIn, ref) => {
11
+ const props = useProps(propsIn),
12
+ {
13
+ start,
14
+ end,
15
+ colors: colorsProp,
16
+ locations,
17
+ children,
18
+ ...stackProps
19
+ } = props,
20
+ theme = useTheme();
21
+ let colors = props.colors?.map(c => theme[c]?.get("web") ?? c) || [];
22
+ return process.env.NODE_ENV !== "production" && colors.some(c => {
23
+ const normalized = normalizeColor(c);
24
+ if (!normalized || normalized.startsWith("$")) return !0;
25
+ }) && (console.error(`LinearGradient: "colors" prop contains invalid color tokens: ${colors} fallback to default colors: ["#000", "#fff"]`), colors = ["#000", "#fff"]), /* @__PURE__ */jsxs(LinearGradientFrame, {
26
+ ref,
27
+ ...stackProps,
28
+ children: [/* @__PURE__ */jsx(ExpoLinearGradient, {
29
+ start,
30
+ end,
31
+ colors,
32
+ locations,
33
+ style: gradientStyle
34
+ }), children]
35
+ });
36
+ }),
37
+ gradientStyle = {
38
+ position: "absolute",
39
+ top: 0,
40
+ left: 0,
41
+ right: 0,
42
+ bottom: 0,
43
+ zIndex: 0
44
+ };
45
+ export { LinearGradient };
@@ -0,0 +1,48 @@
1
+ import { normalizeColor, styled, useProps, useTheme } from "@tamagui/core";
2
+ import { YStack } from "@tamagui/stacks";
3
+ import { LinearGradient as ExpoLinearGradient } from "./linear-gradient";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ const LinearGradientFrame = styled(YStack, {
6
+ name: "LinearGradient",
7
+ overflow: "hidden",
8
+ position: "relative"
9
+ }), LinearGradient = LinearGradientFrame.styleable(
10
+ (propsIn, ref) => {
11
+ var _a;
12
+ const props = useProps(propsIn), { start, end, colors: colorsProp, locations, children, ...stackProps } = props, theme = useTheme();
13
+ let colors = ((_a = props.colors) == null ? void 0 : _a.map((c) => {
14
+ var _a2;
15
+ return ((_a2 = theme[c]) == null ? void 0 : _a2.get("web")) ?? c;
16
+ })) || [];
17
+ return process.env.NODE_ENV !== "production" && colors.some((c) => {
18
+ const normalized = normalizeColor(c);
19
+ if (!normalized || normalized.startsWith("$"))
20
+ return !0;
21
+ }) && (console.error(
22
+ `LinearGradient: "colors" prop contains invalid color tokens: ${colors} fallback to default colors: ["#000", "#fff"]`
23
+ ), colors = ["#000", "#fff"]), /* @__PURE__ */ jsxs(LinearGradientFrame, { ref, ...stackProps, children: [
24
+ /* @__PURE__ */ jsx(
25
+ ExpoLinearGradient,
26
+ {
27
+ start,
28
+ end,
29
+ colors,
30
+ locations,
31
+ style: gradientStyle
32
+ }
33
+ ),
34
+ children
35
+ ] });
36
+ }
37
+ ), gradientStyle = {
38
+ position: "absolute",
39
+ top: 0,
40
+ left: 0,
41
+ right: 0,
42
+ bottom: 0,
43
+ zIndex: 0
44
+ };
45
+ export {
46
+ LinearGradient
47
+ };
48
+ //# sourceMappingURL=LinearGradient-shared.js.map
@@ -0,0 +1,6 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/LinearGradient-shared.tsx"],
4
+ "mappings": "AACA,SAAS,gBAAgB,QAAQ,UAAU,gBAAgB;AAC3D,SAAS,cAAc;AAIvB,SAAS,kBAAkB,0BAA0B;AA6C/C,SACE,KADF;AAnCN,MAAM,sBAAsB,OAAO,QAAQ;AAAA,EACzC,MAAM;AAAA,EACN,UAAU;AAAA,EACV,UAAU;AACZ,CAAC,GAEY,iBAAiB,oBAAoB;AAAA,EAChD,CAAC,SAAS,QAAQ;AAvBpB;AAwBI,UAAM,QAAQ,SAAS,OAAO,GAExB,EAAE,OAAO,KAAK,QAAQ,YAAY,WAAW,UAAU,GAAG,WAAW,IAAI,OACzE,QAAQ,SAAS;AAEvB,QAAI,WACF,WAAM,WAAN,mBAAc,IAAI,CAAC,MAAM;AA9B/B,UAAAA;AA+BQ,eAAQA,MAAA,MAAM,CAAC,MAAP,gBAAAA,IAAU,IAAI,WAAqB;AAAA,IAC7C,OAAM,CAAC;AAET,WAAI,QAAQ,IAAI,aAAa,gBAEzB,OAAO,KAAK,CAAC,MAAM;AACjB,YAAM,aAAa,eAAe,CAAC;AACnC,UAAI,CAAC,cAAc,WAAW,WAAW,GAAG;AAC1C,eAAO;AAAA,IAEX,CAAC,MAED,QAAQ;AAAA,MACN,gEAAgE,MAAM;AAAA,IACxE,GACA,SAAS,CAAC,QAAQ,MAAM,IAK1B,qBAAC,uBAAoB,KAAkB,GAAG,YACxC;AAAA;AAAA,QAAC;AAAA;AAAA,UACC;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA,OAAO;AAAA;AAAA,MACT;AAAA,MACC;AAAA,OACH;AAAA,EAEJ;AACF,GAIM,gBAA2B;AAAA,EAC/B,UAAU;AAAA,EACV,KAAK;AAAA,EACL,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,QAAQ;AACV;",
5
+ "names": ["_a"]
6
+ }
@@ -1,2 +1,2 @@
1
- export * from "./LinearGradient.shared";
1
+ export * from "./LinearGradient-shared";
2
2
  //# sourceMappingURL=LinearGradient.js.map
@@ -1 +1 @@
1
- export * from "./LinearGradient.shared";
1
+ export * from "./LinearGradient-shared.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/linear-gradient",
3
- "version": "1.89.23",
3
+ "version": "1.89.25",
4
4
  "sideEffects": [
5
5
  "*.css"
6
6
  ],
@@ -32,14 +32,14 @@
32
32
  }
33
33
  },
34
34
  "dependencies": {
35
- "@tamagui/core": "1.89.23",
36
- "@tamagui/stacks": "1.89.23"
35
+ "@tamagui/core": "1.89.25",
36
+ "@tamagui/stacks": "1.89.25"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "react": "*"
40
40
  },
41
41
  "devDependencies": {
42
- "@tamagui/build": "1.89.23",
42
+ "@tamagui/build": "1.89.25",
43
43
  "expo-linear-gradient": "^12.7.1",
44
44
  "react": "^18.2.0"
45
45
  },
@@ -1 +1 @@
1
- export * from './LinearGradient.shared'
1
+ export * from './LinearGradient-shared'
@@ -0,0 +1,29 @@
1
+ import type { ColorTokens, GetProps, ThemeTokens } from '@tamagui/core';
2
+ import type { LinearGradientPoint } from './linear-gradient';
3
+ export type LinearGradientExtraProps = {
4
+ colors?: (ColorTokens | ThemeTokens | (string & {}))[];
5
+ locations?: number[] | null;
6
+ start?: LinearGradientPoint | null;
7
+ end?: LinearGradientPoint | null;
8
+ };
9
+ export declare const LinearGradient: import("@tamagui/core").TamaguiComponent<Omit<import("@tamagui/core").GetFinalProps<import("@tamagui/core").RNTamaguiViewNonStyleProps, import("@tamagui/core").StackStyleBase, {
10
+ elevation?: number | import("@tamagui/core").SizeTokens | undefined;
11
+ fullscreen?: boolean | undefined;
12
+ inset?: number | import("@tamagui/core").SizeTokens | {
13
+ top?: number | undefined;
14
+ bottom?: number | undefined;
15
+ left?: number | undefined;
16
+ right?: number | undefined;
17
+ } | undefined;
18
+ }>, keyof LinearGradientExtraProps> & LinearGradientExtraProps, import("@tamagui/core").TamaguiElement, import("@tamagui/core").RNTamaguiViewNonStyleProps & LinearGradientExtraProps, import("@tamagui/core").StackStyleBase, {
19
+ elevation?: number | import("@tamagui/core").SizeTokens | undefined;
20
+ fullscreen?: boolean | undefined;
21
+ inset?: number | import("@tamagui/core").SizeTokens | {
22
+ top?: number | undefined;
23
+ bottom?: number | undefined;
24
+ left?: number | undefined;
25
+ right?: number | undefined;
26
+ } | undefined;
27
+ }, import("@tamagui/core").StaticConfigPublic>;
28
+ export type LinearGradientProps = GetProps<typeof LinearGradient>;
29
+ //# sourceMappingURL=LinearGradient-shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LinearGradient-shared.d.ts","sourceRoot":"","sources":["../src/LinearGradient-shared.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAKvE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAA;AAI5D,MAAM,MAAM,wBAAwB,GAAG;IACrC,MAAM,CAAC,EAAE,CAAC,WAAW,GAAG,WAAW,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC,EAAE,CAAA;IACtD,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;IAC3B,KAAK,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAA;IAClC,GAAG,CAAC,EAAE,mBAAmB,GAAG,IAAI,CAAA;CACjC,CAAA;AAQD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;8CAyC1B,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC,OAAO,cAAc,CAAC,CAAA"}
@@ -1,2 +1,2 @@
1
- export * from './LinearGradient.shared';
1
+ export * from './LinearGradient-shared';
2
2
  //# sourceMappingURL=LinearGradient.d.ts.map