@tamagui/linear-gradient 2.7.7 → 3.0.0-beta.637.1

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.
Files changed (51) hide show
  1. package/dist/cjs/LinearGradient.cjs +53 -63
  2. package/dist/cjs/LinearGradient.native.cjs +76 -0
  3. package/dist/cjs/LinearGradient.native.js +56 -65
  4. package/dist/cjs/LinearGradient.native.js.map +1 -1
  5. package/dist/cjs/index.cjs +15 -18
  6. package/dist/cjs/index.native.cjs +27 -0
  7. package/dist/cjs/index.native.js +15 -17
  8. package/dist/cjs/index.native.js.map +1 -1
  9. package/dist/cjs/linear-gradient.cjs +97 -122
  10. package/dist/cjs/linear-gradient.native.cjs +37 -0
  11. package/dist/cjs/linear-gradient.native.js +22 -26
  12. package/dist/cjs/linear-gradient.native.js.map +1 -1
  13. package/dist/esm/LinearGradient.mjs +42 -47
  14. package/dist/esm/LinearGradient.mjs.map +1 -1
  15. package/dist/esm/LinearGradient.native.js +46 -51
  16. package/dist/esm/LinearGradient.native.js.map +1 -1
  17. package/dist/esm/index.js +2 -2
  18. package/dist/esm/index.mjs +2 -2
  19. package/dist/esm/index.native.js +2 -2
  20. package/dist/esm/linear-gradient.mjs +81 -96
  21. package/dist/esm/linear-gradient.mjs.map +1 -1
  22. package/dist/esm/linear-gradient.native.js +10 -10
  23. package/dist/esm/linear-gradient.native.js.map +1 -1
  24. package/dist/jsx/LinearGradient.mjs +42 -47
  25. package/dist/jsx/LinearGradient.mjs.map +1 -1
  26. package/dist/jsx/LinearGradient.native.cjs +76 -0
  27. package/dist/jsx/LinearGradient.native.js +56 -65
  28. package/dist/jsx/LinearGradient.native.js.map +1 -1
  29. package/dist/jsx/index.js +2 -2
  30. package/dist/jsx/index.mjs +2 -2
  31. package/dist/jsx/index.native.cjs +27 -0
  32. package/dist/jsx/index.native.js +15 -17
  33. package/dist/jsx/index.native.js.map +1 -1
  34. package/dist/jsx/linear-gradient.mjs +81 -96
  35. package/dist/jsx/linear-gradient.mjs.map +1 -1
  36. package/dist/jsx/linear-gradient.native.cjs +37 -0
  37. package/dist/jsx/linear-gradient.native.js +22 -26
  38. package/dist/jsx/linear-gradient.native.js.map +1 -1
  39. package/package.json +9 -8
  40. package/src/LinearGradient.tsx +16 -5
  41. package/types/LinearGradient.d.ts +7 -5
  42. package/types/LinearGradient.d.ts.map +1 -1
  43. package/types/linear-gradient.d.ts +2 -1
  44. package/types/linear-gradient.d.ts.map +1 -1
  45. package/types/linear-gradient.native.d.ts +1 -1
  46. package/types/linear-gradient.native.d.ts.map +1 -1
  47. package/dist/esm/index.js.map +0 -1
  48. package/dist/esm/index.mjs.map +0 -1
  49. package/dist/esm/index.native.js.map +0 -1
  50. package/dist/jsx/index.js.map +0 -1
  51. package/dist/jsx/index.mjs.map +0 -1
@@ -1,81 +1,71 @@
1
+
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
6
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
7
+ for (var name in all) __defProp(target, name, {
8
+ get: all[name],
9
+ enumerable: true
10
+ });
10
11
  };
11
12
  var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
- get: () => from[key],
15
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
- });
17
- }
18
- return to;
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ }
19
+ return to;
19
20
  };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: true
22
- }), mod);
21
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
22
  var LinearGradient_exports = {};
24
- __export(LinearGradient_exports, {
25
- LinearGradient: () => LinearGradient
26
- });
23
+ __export(LinearGradient_exports, { LinearGradient: () => LinearGradient });
27
24
  module.exports = __toCommonJS(LinearGradient_exports);
28
25
  var import_core = require("@tamagui/core");
29
26
  var import_stacks = require("@tamagui/stacks");
30
27
  var import_linear_gradient = require("./linear-gradient.cjs");
31
28
  var import_jsx_runtime = require("react/jsx-runtime");
32
29
  const LinearGradientFrame = (0, import_core.styled)(import_stacks.YStack, {
33
- name: "LinearGradient",
34
- overflow: "hidden",
35
- position: "relative"
30
+ displayName: "LinearGradient",
31
+ overflow: "hidden",
32
+ position: "relative"
36
33
  });
37
- const LinearGradient = LinearGradientFrame.styleable((propsIn, ref) => {
38
- const props = (0, import_core.useProps)(propsIn);
39
- const {
40
- start,
41
- end,
42
- colors: colorsProp,
43
- locations,
44
- children,
45
- ...stackProps
46
- } = props;
47
- const theme = (0, import_core.useTheme)();
48
- let colors = props.colors?.map(c => {
49
- return theme[c]?.get("web") ?? c;
50
- }) || [];
51
- if (process.env.NODE_ENV !== "production") {
52
- if (colors.some(c => {
53
- const normalized = (0, import_core.normalizeColor)(c);
54
- if (!normalized || normalized.startsWith("$")) {
55
- return true;
56
- }
57
- })) {
58
- console.error(`LinearGradient: "colors" prop contains invalid color tokens: ${colors} fallback to default colors: ["#000", "#fff"]`);
59
- colors = ["#000", "#fff"];
60
- }
61
- }
62
- return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(LinearGradientFrame, {
63
- ref,
64
- ...stackProps,
65
- children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_linear_gradient.LinearGradient, {
66
- start,
67
- end,
68
- colors,
69
- locations,
70
- style: gradientStyle
71
- }), children]
72
- });
34
+ const LinearGradient = (0, import_core.createStyledHOC)(LinearGradientFrame, (propsIn, ref) => {
35
+ const props = (0, import_core.useProps)(propsIn);
36
+ const { start, end, colors: colorsProp, locations, children, ...stackProps } = props;
37
+ const theme = (0, import_core.useTheme)();
38
+ let colors = props.colors?.map((c) => {
39
+ return theme[c]?.get("web") ?? c;
40
+ }) || [];
41
+ if (process.env.NODE_ENV !== "production") {
42
+ if (colors.some((c) => {
43
+ const normalized = (0, import_core.normalizeColor)(c);
44
+ if (!normalized) {
45
+ return true;
46
+ }
47
+ })) {
48
+ console.error(`LinearGradient: "colors" prop contains invalid color tokens: ${colors} fallback to default colors: ["#000", "#fff"]`);
49
+ colors = ["#000", "#fff"];
50
+ }
51
+ }
52
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(LinearGradientFrame, {
53
+ ref,
54
+ ...stackProps,
55
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_linear_gradient.LinearGradient, {
56
+ start,
57
+ end,
58
+ colors,
59
+ locations,
60
+ style: gradientStyle
61
+ }), children]
62
+ });
73
63
  });
74
64
  const gradientStyle = {
75
- position: "absolute",
76
- top: 0,
77
- left: 0,
78
- right: 0,
79
- bottom: 0,
80
- zIndex: 0
81
- };
65
+ position: "absolute",
66
+ top: 0,
67
+ left: 0,
68
+ right: 0,
69
+ bottom: 0,
70
+ zIndex: 0
71
+ };
@@ -0,0 +1,76 @@
1
+ "use strict";
2
+
3
+
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all) __defProp(target, name, {
10
+ get: all[name],
11
+ enumerable: true
12
+ });
13
+ };
14
+ var __copyProps = (to, from, except, desc) => {
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
21
+ return to;
22
+ };
23
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
+ var LinearGradient_exports = {};
25
+ __export(LinearGradient_exports, { LinearGradient: () => LinearGradient });
26
+ module.exports = __toCommonJS(LinearGradient_exports);
27
+ var import_jsx_runtime = require("react/jsx-runtime");
28
+ var import_core = require("@tamagui/core");
29
+ var import_stacks = require("@tamagui/stacks");
30
+ var import_linear_gradient = require("./linear-gradient.native.js");
31
+ var LinearGradientFrame = (0, import_core.styled)(import_stacks.YStack, {
32
+ displayName: "LinearGradient",
33
+ overflow: "hidden",
34
+ position: "relative"
35
+ });
36
+ var LinearGradient = (0, import_core.createStyledHOC)(LinearGradientFrame, function(propsIn, ref) {
37
+ var _props_colors;
38
+ var props = (0, import_core.useProps)(propsIn);
39
+ var { start, end, colors: colorsProp, locations, children, ...stackProps } = props;
40
+ var theme = (0, import_core.useTheme)();
41
+ var colors = ((_props_colors = props.colors) === null || _props_colors === void 0 ? void 0 : _props_colors.map(function(c) {
42
+ var _theme_c;
43
+ var _theme_c_get;
44
+ 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;
45
+ })) || [];
46
+ if (process.env.NODE_ENV !== "production") {
47
+ if (colors.some(function(c) {
48
+ var normalized = (0, import_core.normalizeColor)(c);
49
+ if (!normalized) {
50
+ return true;
51
+ }
52
+ })) {
53
+ console.error(`LinearGradient: "colors" prop contains invalid color tokens: ${colors} fallback to default colors: ["#000", "#fff"]`);
54
+ colors = ["#000", "#fff"];
55
+ }
56
+ }
57
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(LinearGradientFrame, {
58
+ ref,
59
+ ...stackProps,
60
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_linear_gradient.LinearGradient, {
61
+ start,
62
+ end,
63
+ colors,
64
+ locations,
65
+ style: gradientStyle
66
+ }), children]
67
+ });
68
+ });
69
+ var gradientStyle = {
70
+ position: "absolute",
71
+ top: 0,
72
+ left: 0,
73
+ right: 0,
74
+ bottom: 0,
75
+ zIndex: 0
76
+ };
@@ -1,87 +1,78 @@
1
1
  "use strict";
2
2
 
3
+
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
8
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
9
+ for (var name in all) __defProp(target, name, {
10
+ get: all[name],
11
+ enumerable: true
12
+ });
12
13
  };
13
14
  var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
21
+ return to;
21
22
  };
22
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
23
- value: true
24
- }), mod);
23
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
24
  var LinearGradient_exports = {};
26
- __export(LinearGradient_exports, {
27
- LinearGradient: () => LinearGradient
28
- });
25
+ __export(LinearGradient_exports, { LinearGradient: () => LinearGradient });
29
26
  module.exports = __toCommonJS(LinearGradient_exports);
30
27
  var import_jsx_runtime = require("react/jsx-runtime");
31
28
  var import_core = require("@tamagui/core");
32
29
  var import_stacks = require("@tamagui/stacks");
33
30
  var import_linear_gradient = require("./linear-gradient.native.js");
34
31
  var LinearGradientFrame = (0, import_core.styled)(import_stacks.YStack, {
35
- name: "LinearGradient",
36
- overflow: "hidden",
37
- position: "relative"
32
+ displayName: "LinearGradient",
33
+ overflow: "hidden",
34
+ position: "relative"
38
35
  });
39
- var LinearGradient = LinearGradientFrame.styleable(function (propsIn, ref) {
40
- var _props_colors;
41
- var props = (0, import_core.useProps)(propsIn);
42
- var {
43
- start,
44
- end,
45
- colors: colorsProp,
46
- locations,
47
- children,
48
- ...stackProps
49
- } = props;
50
- var theme = (0, import_core.useTheme)();
51
- var colors = ((_props_colors = props.colors) === null || _props_colors === void 0 ? void 0 : _props_colors.map(function (c) {
52
- var _theme_c;
53
- var _theme_c_get;
54
- 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;
55
- })) || [];
56
- if (process.env.NODE_ENV !== "production") {
57
- if (colors.some(function (c) {
58
- var normalized = (0, import_core.normalizeColor)(c);
59
- if (!normalized || normalized.startsWith("$")) {
60
- return true;
61
- }
62
- })) {
63
- console.error(`LinearGradient: "colors" prop contains invalid color tokens: ${colors} fallback to default colors: ["#000", "#fff"]`);
64
- colors = ["#000", "#fff"];
65
- }
66
- }
67
- return /* @__PURE__ */(0, import_jsx_runtime.jsxs)(LinearGradientFrame, {
68
- ref,
69
- ...stackProps,
70
- children: [/* @__PURE__ */(0, import_jsx_runtime.jsx)(import_linear_gradient.LinearGradient, {
71
- start,
72
- end,
73
- colors,
74
- locations,
75
- style: gradientStyle
76
- }), children]
77
- });
36
+ var LinearGradient = (0, import_core.createStyledHOC)(LinearGradientFrame, function(propsIn, ref) {
37
+ var _props_colors;
38
+ var props = (0, import_core.useProps)(propsIn);
39
+ var { start, end, colors: colorsProp, locations, children, ...stackProps } = props;
40
+ var theme = (0, import_core.useTheme)();
41
+ var colors = ((_props_colors = props.colors) === null || _props_colors === void 0 ? void 0 : _props_colors.map(function(c) {
42
+ var _theme_c;
43
+ var _theme_c_get;
44
+ 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;
45
+ })) || [];
46
+ if (process.env.NODE_ENV !== "production") {
47
+ if (colors.some(function(c) {
48
+ var normalized = (0, import_core.normalizeColor)(c);
49
+ if (!normalized) {
50
+ return true;
51
+ }
52
+ })) {
53
+ console.error(`LinearGradient: "colors" prop contains invalid color tokens: ${colors} fallback to default colors: ["#000", "#fff"]`);
54
+ colors = ["#000", "#fff"];
55
+ }
56
+ }
57
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(LinearGradientFrame, {
58
+ ref,
59
+ ...stackProps,
60
+ children: [/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_linear_gradient.LinearGradient, {
61
+ start,
62
+ end,
63
+ colors,
64
+ locations,
65
+ style: gradientStyle
66
+ }), children]
67
+ });
78
68
  });
79
69
  var gradientStyle = {
80
- position: "absolute",
81
- top: 0,
82
- left: 0,
83
- right: 0,
84
- bottom: 0,
85
- zIndex: 0
70
+ position: "absolute",
71
+ top: 0,
72
+ left: 0,
73
+ right: 0,
74
+ bottom: 0,
75
+ zIndex: 0
86
76
  };
77
+
87
78
  //# sourceMappingURL=LinearGradient.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","LinearGradient_exports","__export","LinearGradient","module","exports","import_jsx_runtime","require","import_core","import_stacks","import_linear_gradient","LinearGradientFrame","styled","YStack","name","overflow","position","styleable","propsIn","ref","_props_colors","props","useProps","start","end","colors","colorsProp","locations","children","stackProps","theme","useTheme","map","c","_theme_c","_theme_c_get","get","process","env","NODE_ENV","some","normalized","normalizeColor","startsWith","console","error","jsxs","jsx","style","gradientStyle","top","left"],"sources":["../../src/LinearGradient.tsx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C,GAAA,CAAAC,QAAA,KAAc,YAAW;IAC5B,IAAAd,MAAA,CAAAe,IAAO,WAAAP,CAAA;MAAA,IACTQ,UAAA,OAAAjC,WAAA,CAAAkC,cAAA,EAAAT,CAAA;MACF,IACA,CAAAQ,UAAA,IAAAA,UAAA,CAAAE,UAAA;QACA,WAAQ;MAAA;IACgE,IACxE;MACAC,OAAA,CAAAC,KAAU,iEAAcpB,MAAA;MAC1BA,MAAA,IACF,QAEA,MACE,CACE;IAAA;EAAC;EAAA,sBACC,IAAAnB,kBAAA,CAAAwC,IAAA,EAAAnC,mBAAA;IAAAQ,GAAA;IACA,GAAAU,UACA;IAAAD,QACA,kBACO,IAAAtB,kBAAA,CAAAyC,GAAA,EAAArC,sBAAA,CAAAP,cAAA;MAAAoB,KAAA;MACTC,GAAA;MACCC,MAAA;MACHE,SAAA;MAEJqB,KAAA,EAAAC;IACF,IAIMrB,QAAA;EAEJ;AAAK,EACL;AAAM,IACNqB,aAAO;EACPjC,QAAQ;EACRkC,GAAA;EACFC,IAAA","ignoreList":[]}
1
+ {"version":3,"file":"LinearGradient.native.js","names":[],"sources":["cjs/LinearGradient.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar LinearGradient_exports = {};\n__export(LinearGradient_exports, {\n LinearGradient: () => LinearGradient\n});\nmodule.exports = __toCommonJS(LinearGradient_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_core = require(\"@tamagui/core\");\nvar import_stacks = require(\"@tamagui/stacks\");\nvar import_linear_gradient = require(\"./linear-gradient\");\nvar LinearGradientFrame = (0, import_core.styled)(import_stacks.YStack, {\n displayName: \"LinearGradient\",\n overflow: \"hidden\",\n position: \"relative\"\n});\nvar LinearGradient = (0, import_core.createStyledHOC)(LinearGradientFrame, function(propsIn, ref) {\n var _props_colors;\n var props = (0, import_core.useProps)(propsIn);\n var { start, end, colors: colorsProp, locations, children, ...stackProps } = props;\n var theme = (0, import_core.useTheme)();\n var colors = ((_props_colors = props.colors) === null || _props_colors === void 0 ? void 0 : _props_colors.map(function(c) {\n var _theme_c;\n var _theme_c_get;\n 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;\n })) || [];\n if (process.env.NODE_ENV !== \"production\") {\n if (colors.some(function(c) {\n var normalized = (0, import_core.normalizeColor)(c);\n if (!normalized) {\n return true;\n }\n })) {\n console.error(`LinearGradient: \"colors\" prop contains invalid color tokens: ${colors} fallback to default colors: [\"#000\", \"#fff\"]`);\n colors = [\n \"#000\",\n \"#fff\"\n ];\n }\n }\n return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(LinearGradientFrame, {\n ref,\n ...stackProps,\n children: [\n /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_linear_gradient.LinearGradient, {\n start,\n end,\n colors,\n locations,\n style: gradientStyle\n }),\n children\n ]\n });\n});\nvar gradientStyle = {\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n zIndex: 0\n};\n//# sourceMappingURL=LinearGradient.js.map\n"],"mappings":";;;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,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AG;EACzH,IAAI;EACJ,IAAI;EACJ,QAAQ,gBAAgB,WAAW,MAAM,QAAQ,QAAQ,aAAa,KAAK,IAAI,KAAK,IAAI,SAAS,IAAI,KAAK,OAAO,QAAQ,iBAAiB,KAAK,IAAI,eAAe;CACpK,CAAC,MAAM,CAAC;CACR,IAAI,QAAQ,IAAI,aAAa,cAAc;EACzC,IAAI,OAAO,KAAK,SAAS,GAAG;GAC1B,IAAI,cAAc,GAAG,YAAY,gBAAgB,CAAC;GAClD,IAAI,CAAC,YAAY;IACf,OAAO;GACT;EACF,CAAC,GAAG;GACF,QAAQ,MAAM,gEAAgE,OAAO,8CAA8C;GACnI,SAAS,CACP,QACA,MACF;EACF;CACF;CACA,OAAuB,iBAAC,GAAG,mBAAmB,MAAM,qBAAqB;EACvE;EACA,GAAG;EACH,UAAU,CACQ,iBAAC,GAAG,mBAAmB,KAAK,uBAAuB,gBAAgB;GACjF;GACA;GACA;GACA;GACA,OAAO;EACT,CAAC,GACD,QACF;CACF,CAAC;AACH,CAAC;AACD,IAAI,gBAAgB;CAClB,UAAU;CACV,KAAK;CACL,MAAM;CACN,OAAO;CACP,QAAQ;CACR,QAAQ;AACV"}
@@ -1,28 +1,25 @@
1
+
1
2
  var __defProp = Object.defineProperty;
2
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
6
  var __export = (target, all) => {
6
- for (var name in all) __defProp(target, name, {
7
- get: all[name],
8
- enumerable: true
9
- });
7
+ for (var name in all) __defProp(target, name, {
8
+ get: all[name],
9
+ enumerable: true
10
+ });
10
11
  };
11
12
  var __copyProps = (to, from, except, desc) => {
12
- if (from && typeof from === "object" || typeof from === "function") {
13
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
14
- get: () => from[key],
15
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
16
- });
17
- }
18
- return to;
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
15
+ get: () => from[key],
16
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
17
+ });
18
+ }
19
+ return to;
19
20
  };
20
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
21
- value: true
22
- }), mod);
21
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
23
22
  var index_exports = {};
24
- __export(index_exports, {
25
- LinearGradient: () => import_LinearGradient.LinearGradient
26
- });
23
+ __export(index_exports, { LinearGradient: () => import_LinearGradient.LinearGradient });
27
24
  module.exports = __toCommonJS(index_exports);
28
- var import_LinearGradient = require("./LinearGradient.cjs");
25
+ var import_LinearGradient = require("./LinearGradient.cjs");
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all) __defProp(target, name, {
10
+ get: all[name],
11
+ enumerable: true
12
+ });
13
+ };
14
+ var __copyProps = (to, from, except, desc) => {
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
21
+ return to;
22
+ };
23
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
24
+ var index_exports = {};
25
+ __export(index_exports, { LinearGradient: () => import_LinearGradient.LinearGradient });
26
+ module.exports = __toCommonJS(index_exports);
27
+ var import_LinearGradient = require("./LinearGradient.native.js");
@@ -1,31 +1,29 @@
1
1
  "use strict";
2
2
 
3
+
3
4
  var __defProp = Object.defineProperty;
4
5
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
6
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
8
  var __export = (target, all) => {
8
- for (var name in all) __defProp(target, name, {
9
- get: all[name],
10
- enumerable: true
11
- });
9
+ for (var name in all) __defProp(target, name, {
10
+ get: all[name],
11
+ enumerable: true
12
+ });
12
13
  };
13
14
  var __copyProps = (to, from, except, desc) => {
14
- if (from && typeof from === "object" || typeof from === "function") {
15
- for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
16
- get: () => from[key],
17
- enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
18
- });
19
- }
20
- return to;
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
+ get: () => from[key],
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
21
+ return to;
21
22
  };
22
- var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
23
- value: true
24
- }), mod);
23
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
25
24
  var index_exports = {};
26
- __export(index_exports, {
27
- LinearGradient: () => import_LinearGradient.LinearGradient
28
- });
25
+ __export(index_exports, { LinearGradient: () => import_LinearGradient.LinearGradient });
29
26
  module.exports = __toCommonJS(index_exports);
30
27
  var import_LinearGradient = require("./LinearGradient.native.js");
28
+
31
29
  //# sourceMappingURL=index.native.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["__toCommonJS","mod","__copyProps","__defProp","value","index_exports","__export","LinearGradient","import_LinearGradient","module","exports"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,YAAA,GAAAC,GAAA,IAAAC,WAAA,CAAAC,SAAA;EAAAC,KAAA;AAAA,IAAAH,GAAA;AAAA,IAAAI,aAAA;AAAAC,QAAA,CAAAD,aAAA;EAAAE,cAAA,EAAAA,CAAA,KAAAC,qBAAA,CAAAD;AAAA;AAAAE,MAAA,CAAAC,OAAA,GAAAV,YAIO,CAAAK,aAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.native.js","names":[],"sources":["cjs/index.native.js"],"sourcesContent":["\"use strict\";\nvar __defProp = Object.defineProperty;\nvar __getOwnPropDesc = Object.getOwnPropertyDescriptor;\nvar __getOwnPropNames = Object.getOwnPropertyNames;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __export = (target, all) => {\n for (var name in all)\n __defProp(target, name, { get: all[name], enumerable: true });\n};\nvar __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n};\nvar __toCommonJS = (mod) => __copyProps(__defProp({}, \"__esModule\", { value: true }), mod);\nvar index_exports = {};\n__export(index_exports, {\n LinearGradient: () => import_LinearGradient.LinearGradient\n});\nmodule.exports = __toCommonJS(index_exports);\nvar import_LinearGradient = require(\"./LinearGradient\");\n//# sourceMappingURL=index.js.map\n"],"mappings":";;;;AACA,IAAI,YAAY,OAAO;AACvB,IAAI,mBAAmB,OAAO;AAC9B,IAAI,oBAAoB,OAAO;AAC/B,IAAI,eAAe,OAAO,UAAU;AACpC,IAAI,YAAY,QAAQ,QAAQ;CAC9B,KAAK,IAAI,QAAQ,KACf,UAAU,QAAQ,MAAM;EAAE,KAAK,IAAI;EAAO,YAAY;CAAK,CAAC;AAChE;AACA,IAAI,eAAe,IAAI,MAAM,QAAQ,SAAS;CAC5C,IAAI,QAAQ,OAAO,SAAS,YAAY,OAAO,SAAS,YAAY;EAClE,KAAK,IAAI,OAAO,kBAAkB,IAAI,GACpC,IAAI,CAAC,aAAa,KAAK,IAAI,GAAG,KAAK,QAAQ,QACzC,UAAU,IAAI,KAAK;GAAE,WAAW,KAAK;GAAM,YAAY,EAAE,OAAO,iBAAiB,MAAM,GAAG,MAAM,KAAK;EAAW,CAAC;CACvH;CACA,OAAO;AACT;AACA,IAAI,gBAAgB,QAAQ,YAAY,UAAU,CAAC,GAAG,cAAc,EAAE,OAAO,KAAK,CAAC,GAAG,GAAG;AACzF,IAAI,gBAAgB,CAAC;AACrB,SAAS,eAAe,EACtB,sBAAsB,sBAAsB,eAC9C,CAAC;AACD,OAAO,UAAU,aAAa,aAAa;AAC3C,IAAI,wBAAwB,QAAQ,4BAAkB"}