@tamagui/linear-gradient 1.110.5 → 1.111.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.
@@ -18,70 +18,12 @@ __export(LinearGradient_exports, {
18
18
  LinearGradient: () => LinearGradient
19
19
  });
20
20
  module.exports = __toCommonJS(LinearGradient_exports);
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");
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] : {}, ownKeys2 = Object.keys(source);
33
- typeof Object.getOwnPropertySymbols == "function" && (ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
34
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
35
- }))), ownKeys2.forEach(function(key) {
36
- _define_property(target, key, source[key]);
37
- });
38
- }
39
- return target;
40
- }
41
- function ownKeys(object, enumerableOnly) {
42
- var keys = Object.keys(object);
43
- if (Object.getOwnPropertySymbols) {
44
- var symbols = Object.getOwnPropertySymbols(object);
45
- enumerableOnly && (symbols = symbols.filter(function(sym) {
46
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
47
- })), keys.push.apply(keys, symbols);
48
- }
49
- return keys;
50
- }
51
- function _object_spread_props(target, source) {
52
- return source = source ?? {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
53
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
54
- }), target;
55
- }
56
- function _object_without_properties(source, excluded) {
57
- if (source == null) return {};
58
- var target = _object_without_properties_loose(source, excluded), key, i;
59
- if (Object.getOwnPropertySymbols) {
60
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
61
- for (i = 0; i < sourceSymbolKeys.length; i++)
62
- key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
63
- }
64
- return target;
65
- }
66
- function _object_without_properties_loose(source, excluded) {
67
- if (source == null) return {};
68
- var target = {}, sourceKeys = Object.keys(source), key, i;
69
- for (i = 0; i < sourceKeys.length; i++)
70
- key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
71
- return target;
72
- }
73
- var LinearGradientFrame = (0, import_core.styled)(import_stacks.YStack, {
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, {
74
22
  name: "LinearGradient",
75
23
  overflow: "hidden",
76
24
  position: "relative"
77
25
  }), LinearGradient = LinearGradientFrame.styleable(function(propsIn, ref) {
78
- 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, [
79
- "start",
80
- "end",
81
- "colors",
82
- "locations",
83
- "children"
84
- ]), theme = (0, import_core.useTheme)(), colors = ((_props_colors = props.colors) === null || _props_colors === void 0 ? void 0 : _props_colors.map(function(c) {
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) {
85
27
  var _theme_c, _theme_c_get;
86
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;
87
29
  })) || [];
@@ -89,12 +31,12 @@ var LinearGradientFrame = (0, import_core.styled)(import_stacks.YStack, {
89
31
  var normalized = (0, import_core.normalizeColor)(c);
90
32
  if (!normalized || normalized.startsWith("$"))
91
33
  return !0;
92
- }) && (console.error('LinearGradient: "colors" prop contains invalid color tokens: '.concat(colors, ' fallback to default colors: ["#000", "#fff"]')), colors = [
34
+ }) && (console.error(`LinearGradient: "colors" prop contains invalid color tokens: ${colors} fallback to default colors: ["#000", "#fff"]`), colors = [
93
35
  "#000",
94
36
  "#fff"
95
- ]), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(LinearGradientFrame, _object_spread_props(_object_spread({
96
- ref
97
- }, stackProps), {
37
+ ]), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(LinearGradientFrame, {
38
+ ref,
39
+ ...stackProps,
98
40
  children: [
99
41
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_linear_gradient.LinearGradient, {
100
42
  start,
@@ -105,7 +47,7 @@ var LinearGradientFrame = (0, import_core.styled)(import_stacks.YStack, {
105
47
  }),
106
48
  children
107
49
  ]
108
- }));
50
+ });
109
51
  }), gradientStyle = {
110
52
  position: "absolute",
111
53
  top: 0,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/Users/n8/tamagui/code/ui/linear-gradient/src/LinearGradient.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;;;;;;;uDACA,cAA2D,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,uCAAAkB,MAACjC,qBAAAA,qBAAAA,eAAAA;IAAoBS;KAAqBS,UAAAA,GAAAA;;MACxC,uCAAAgB,KAACC,uBAAAA,gBAAAA;QACCvB;QACAC;QACAE;QACAC;QACAoB,OAAOC;;MAERpB;;;AAGP,CAAA,GAKIoB,gBAA2B;EAC/BhC,UAAU;EACViC,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", "_jsxs", "_jsx", "ExpoLinearGradient", "style", "gradientStyle", "top", "left", "right", "bottom", "zIndex"]
4
+ "mappings": ";;;;;;;;;;;;;;;;;;;;uDACA,cAA2D,0BAC3D,gBAAuB,4BAIvB,yBAAqD,8BAU/CA,0BAAsBC,oBAAOC,sBAAQ;EACzCC,MAAM;EACNC,UAAU;EACVC,UAAU;AACZ,CAAA,GAEaC,iBAAiBN,oBAAoBO,UAChD,SAACC,SAASC,KAAAA;MAONC,eANIA,YAAQC,sBAASH,OAAAA,GAEjB,EAAEI,OAAOC,KAAKC,QAAQC,YAAYC,WAAWC,UAAU,GAAGC,WAAAA,IAAeR,OACzES,YAAQC,sBAAAA,GAEVN,WACFJ,gBAAAA,MAAMI,YAAM,QAAZJ,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,gBAEzBZ,OAAOa,KAAK,SAACL,GAAAA;AACX,QAAMM,iBAAaC,4BAAeP,CAAAA;AAClC,QAAI,CAACM,cAAcA,WAAWE,WAAW,GAAA;AACvC,aAAO;EAEX,CAAA,MAEAC,QAAQC,MACN,gEAAgElB,MAAAA,+CAAqD,GAEvHA,SAAS;IAAC;IAAQ;MAKpB,uCAAAmB,MAACjC,qBAAAA;IAAoBS;IAAkB,GAAGS;;MACxC,uCAAAgB,KAACC,uBAAAA,gBAAAA;QACCvB;QACAC;QACAC;QACAE;QACAoB,OAAOC;;MAERpB;;;AAGP,CAAA,GAKIoB,gBAA2B;EAC/BhC,UAAU;EACViC,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", "colors", "colorsProp", "locations", "children", "stackProps", "theme", "useTheme", "map", "c", "get", "process", "env", "NODE_ENV", "some", "normalized", "normalizeColor", "startsWith", "console", "error", "_jsxs", "_jsx", "ExpoLinearGradient", "style", "gradientStyle", "top", "left", "right", "bottom", "zIndex"]
6
6
  }
@@ -2,69 +2,12 @@ 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
4
  import { LinearGradient as ExpoLinearGradient } from "./linear-gradient";
5
- function _define_property(obj, key, value) {
6
- return key in obj ? Object.defineProperty(obj, key, {
7
- value,
8
- enumerable: !0,
9
- configurable: !0,
10
- writable: !0
11
- }) : obj[key] = value, obj;
12
- }
13
- function _object_spread(target) {
14
- for (var i = 1; i < arguments.length; i++) {
15
- var source = arguments[i] != null ? arguments[i] : {}, ownKeys2 = Object.keys(source);
16
- typeof Object.getOwnPropertySymbols == "function" && (ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
17
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
18
- }))), ownKeys2.forEach(function(key) {
19
- _define_property(target, key, source[key]);
20
- });
21
- }
22
- return target;
23
- }
24
- function ownKeys(object, enumerableOnly) {
25
- var keys = Object.keys(object);
26
- if (Object.getOwnPropertySymbols) {
27
- var symbols = Object.getOwnPropertySymbols(object);
28
- enumerableOnly && (symbols = symbols.filter(function(sym) {
29
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
30
- })), keys.push.apply(keys, symbols);
31
- }
32
- return keys;
33
- }
34
- function _object_spread_props(target, source) {
35
- return source = source ?? {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
36
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
37
- }), target;
38
- }
39
- function _object_without_properties(source, excluded) {
40
- if (source == null) return {};
41
- var target = _object_without_properties_loose(source, excluded), key, i;
42
- if (Object.getOwnPropertySymbols) {
43
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
44
- for (i = 0; i < sourceSymbolKeys.length; i++)
45
- key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
46
- }
47
- return target;
48
- }
49
- function _object_without_properties_loose(source, excluded) {
50
- if (source == null) return {};
51
- var target = {}, sourceKeys = Object.keys(source), key, i;
52
- for (i = 0; i < sourceKeys.length; i++)
53
- key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
54
- return target;
55
- }
56
5
  var LinearGradientFrame = styled(YStack, {
57
6
  name: "LinearGradient",
58
7
  overflow: "hidden",
59
8
  position: "relative"
60
9
  }), LinearGradient = LinearGradientFrame.styleable(function(propsIn, ref) {
61
- 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, [
62
- "start",
63
- "end",
64
- "colors",
65
- "locations",
66
- "children"
67
- ]), theme = useTheme(), colors = ((_props_colors = props.colors) === null || _props_colors === void 0 ? void 0 : _props_colors.map(function(c) {
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) {
68
11
  var _theme_c, _theme_c_get;
69
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;
70
13
  })) || [];
@@ -72,12 +15,12 @@ var LinearGradientFrame = styled(YStack, {
72
15
  var normalized = normalizeColor(c);
73
16
  if (!normalized || normalized.startsWith("$"))
74
17
  return !0;
75
- }) && (console.error('LinearGradient: "colors" prop contains invalid color tokens: '.concat(colors, ' fallback to default colors: ["#000", "#fff"]')), colors = [
18
+ }) && (console.error(`LinearGradient: "colors" prop contains invalid color tokens: ${colors} fallback to default colors: ["#000", "#fff"]`), colors = [
76
19
  "#000",
77
20
  "#fff"
78
- ]), /* @__PURE__ */ _jsxs(LinearGradientFrame, _object_spread_props(_object_spread({
79
- ref
80
- }, stackProps), {
21
+ ]), /* @__PURE__ */ _jsxs(LinearGradientFrame, {
22
+ ref,
23
+ ...stackProps,
81
24
  children: [
82
25
  /* @__PURE__ */ _jsx(ExpoLinearGradient, {
83
26
  start,
@@ -88,7 +31,7 @@ var LinearGradientFrame = styled(YStack, {
88
31
  }),
89
32
  children
90
33
  ]
91
- }));
34
+ });
92
35
  }), gradientStyle = {
93
36
  position: "absolute",
94
37
  top: 0,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
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,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,sBAACX,qBAAAA,qBAAAA,eAAAA;IAAoBM;KAAqBQ,UAAAA,GAAAA;;MACxC,qBAACf,oBAAAA;QACCS;QACAC;QACAE;QACAC;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", "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"]
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
6
  }
@@ -0,0 +1,50 @@
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.mjs";
5
+ var LinearGradientFrame = styled(YStack, {
6
+ name: "LinearGradient",
7
+ overflow: "hidden",
8
+ position: "relative"
9
+ }),
10
+ LinearGradient = LinearGradientFrame.styleable(function (propsIn, ref) {
11
+ var _props_colors,
12
+ props = useProps(propsIn),
13
+ {
14
+ start,
15
+ end,
16
+ colors: colorsProp,
17
+ locations,
18
+ children,
19
+ ...stackProps
20
+ } = props,
21
+ theme = useTheme(),
22
+ colors = ((_props_colors = props.colors) === null || _props_colors === void 0 ? void 0 : _props_colors.map(function (c) {
23
+ var _theme_c, _theme_c_get;
24
+ 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;
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, {
33
+ start,
34
+ end,
35
+ colors,
36
+ locations,
37
+ style: gradientStyle
38
+ }), children]
39
+ });
40
+ }),
41
+ gradientStyle = {
42
+ position: "absolute",
43
+ top: 0,
44
+ left: 0,
45
+ right: 0,
46
+ bottom: 0,
47
+ zIndex: 0
48
+ };
49
+ export { LinearGradient };
50
+ //# sourceMappingURL=LinearGradient.native.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["jsx","_jsx","jsxs","_jsxs","normalizeColor","styled","useProps","useTheme","YStack","LinearGradient","ExpoLinearGradient","LinearGradientFrame","name","overflow","position","styleable","propsIn","ref","_props_colors","props","start","end","colors","colorsProp","locations","children","stackProps","theme","map","c","_theme_c","_theme_c_get","get","process","env","NODE_ENV","some","normalized","startsWith","console","error","style","gradientStyle","top","left","right","bottom"],"sources":["../../src/LinearGradient.tsx"],"sourcesContent":[null],"mappings":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,GAAAS,UACC;MAAAD,QACA,kBACAxB,IAAA,CAAAS,kBAAA;QAAAU,KACA;QAAAC,GACA;QAAOC,MAAA;QACTE,SAAA;QACCiB,KAAA,EAAAC;MAAA,CACH,GAEJjB,QAAA;IAMA;EAAU,EACV;EAAAiB,aAAK;IACL5B,QAAM;IACN6B,GAAA;IACAC,IAAA;IACAC,KAAA,GAAQ;IACVC,MAAA","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export * from "./LinearGradient.mjs";
2
+ //# sourceMappingURL=index.native.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc","ignoreList":[]}
@@ -0,0 +1,3 @@
1
+ import { LinearGradient } from "expo-linear-gradient";
2
+ export { LinearGradient };
3
+ //# sourceMappingURL=linear-gradient.native.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["LinearGradient"],"sources":["../../src/Users/n8/tamagui/code/ui/linear-gradient/src/linear-gradient.native.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,cAAA,QAAsB","ignoreList":[]}
@@ -2,69 +2,12 @@ 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
4
  import { LinearGradient as ExpoLinearGradient } from "./linear-gradient";
5
- function _define_property(obj, key, value) {
6
- return key in obj ? Object.defineProperty(obj, key, {
7
- value,
8
- enumerable: !0,
9
- configurable: !0,
10
- writable: !0
11
- }) : obj[key] = value, obj;
12
- }
13
- function _object_spread(target) {
14
- for (var i = 1; i < arguments.length; i++) {
15
- var source = arguments[i] != null ? arguments[i] : {}, ownKeys2 = Object.keys(source);
16
- typeof Object.getOwnPropertySymbols == "function" && (ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
17
- return Object.getOwnPropertyDescriptor(source, sym).enumerable;
18
- }))), ownKeys2.forEach(function(key) {
19
- _define_property(target, key, source[key]);
20
- });
21
- }
22
- return target;
23
- }
24
- function ownKeys(object, enumerableOnly) {
25
- var keys = Object.keys(object);
26
- if (Object.getOwnPropertySymbols) {
27
- var symbols = Object.getOwnPropertySymbols(object);
28
- enumerableOnly && (symbols = symbols.filter(function(sym) {
29
- return Object.getOwnPropertyDescriptor(object, sym).enumerable;
30
- })), keys.push.apply(keys, symbols);
31
- }
32
- return keys;
33
- }
34
- function _object_spread_props(target, source) {
35
- return source = source ?? {}, Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function(key) {
36
- Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
37
- }), target;
38
- }
39
- function _object_without_properties(source, excluded) {
40
- if (source == null) return {};
41
- var target = _object_without_properties_loose(source, excluded), key, i;
42
- if (Object.getOwnPropertySymbols) {
43
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
44
- for (i = 0; i < sourceSymbolKeys.length; i++)
45
- key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
46
- }
47
- return target;
48
- }
49
- function _object_without_properties_loose(source, excluded) {
50
- if (source == null) return {};
51
- var target = {}, sourceKeys = Object.keys(source), key, i;
52
- for (i = 0; i < sourceKeys.length; i++)
53
- key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
54
- return target;
55
- }
56
5
  var LinearGradientFrame = styled(YStack, {
57
6
  name: "LinearGradient",
58
7
  overflow: "hidden",
59
8
  position: "relative"
60
9
  }), LinearGradient = LinearGradientFrame.styleable(function(propsIn, ref) {
61
- 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, [
62
- "start",
63
- "end",
64
- "colors",
65
- "locations",
66
- "children"
67
- ]), theme = useTheme(), colors = ((_props_colors = props.colors) === null || _props_colors === void 0 ? void 0 : _props_colors.map(function(c) {
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) {
68
11
  var _theme_c, _theme_c_get;
69
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;
70
13
  })) || [];
@@ -72,12 +15,12 @@ var LinearGradientFrame = styled(YStack, {
72
15
  var normalized = normalizeColor(c);
73
16
  if (!normalized || normalized.startsWith("$"))
74
17
  return !0;
75
- }) && (console.error('LinearGradient: "colors" prop contains invalid color tokens: '.concat(colors, ' fallback to default colors: ["#000", "#fff"]')), colors = [
18
+ }) && (console.error(`LinearGradient: "colors" prop contains invalid color tokens: ${colors} fallback to default colors: ["#000", "#fff"]`), colors = [
76
19
  "#000",
77
20
  "#fff"
78
- ]), /* @__PURE__ */ _jsxs(LinearGradientFrame, _object_spread_props(_object_spread({
79
- ref
80
- }, stackProps), {
21
+ ]), /* @__PURE__ */ _jsxs(LinearGradientFrame, {
22
+ ref,
23
+ ...stackProps,
81
24
  children: [
82
25
  /* @__PURE__ */ _jsx(ExpoLinearGradient, {
83
26
  start,
@@ -88,7 +31,7 @@ var LinearGradientFrame = styled(YStack, {
88
31
  }),
89
32
  children
90
33
  ]
91
- }));
34
+ });
92
35
  }), gradientStyle = {
93
36
  position: "absolute",
94
37
  top: 0,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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ient", "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"]
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
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/linear-gradient",
3
- "version": "1.110.5",
3
+ "version": "1.111.0",
4
4
  "sideEffects": [
5
5
  "*.css"
6
6
  ],
@@ -33,11 +33,11 @@
33
33
  }
34
34
  },
35
35
  "dependencies": {
36
- "@tamagui/core": "1.110.5",
37
- "@tamagui/stacks": "1.110.5"
36
+ "@tamagui/core": "1.111.0",
37
+ "@tamagui/stacks": "1.111.0"
38
38
  },
39
39
  "devDependencies": {
40
- "@tamagui/build": "1.110.5",
40
+ "@tamagui/build": "1.111.0",
41
41
  "expo-linear-gradient": "~13.0.2",
42
42
  "react": "^18.2.0 || ^19.0.0"
43
43
  },