@tamagui/linear-gradient 1.89.30 → 1.90.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,40 +18,97 @@ __export(LinearGradient_shared_exports, {
18
18
  LinearGradient: () => LinearGradient
19
19
  });
20
20
  module.exports = __toCommonJS(LinearGradient_shared_exports);
21
- var import_core = require("@tamagui/core"), import_stacks = require("@tamagui/stacks"), import_linear_gradient = require("./linear-gradient"), import_jsx_runtime = require("react/jsx-runtime");
22
- const 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");
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)
58
+ return {};
59
+ var target = _object_without_properties_loose(source, excluded), key, i;
60
+ if (Object.getOwnPropertySymbols) {
61
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
62
+ for (i = 0; i < sourceSymbolKeys.length; i++)
63
+ key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
64
+ }
65
+ return target;
66
+ }
67
+ function _object_without_properties_loose(source, excluded) {
68
+ if (source == null)
69
+ return {};
70
+ var target = {}, sourceKeys = Object.keys(source), key, i;
71
+ for (i = 0; i < sourceKeys.length; i++)
72
+ key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
73
+ return target;
74
+ }
75
+ var LinearGradientFrame = (0, import_core.styled)(import_stacks.YStack, {
23
76
  name: "LinearGradient",
24
77
  overflow: "hidden",
25
78
  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
- ),
79
+ }), LinearGradient = LinearGradientFrame.styleable(function(propsIn, ref) {
80
+ 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, [
81
+ "start",
82
+ "end",
83
+ "colors",
84
+ "locations",
85
+ "children"
86
+ ]), theme = (0, import_core.useTheme)(), colors = ((_props_colors = props.colors) === null || _props_colors === void 0 ? void 0 : _props_colors.map(function(c) {
87
+ var _theme_c, _theme_c_get;
88
+ 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;
89
+ })) || [];
90
+ return process.env.NODE_ENV !== "production" && colors.some(function(c) {
91
+ var normalized = (0, import_core.normalizeColor)(c);
92
+ if (!normalized || normalized.startsWith("$"))
93
+ return !0;
94
+ }) && (console.error('LinearGradient: "colors" prop contains invalid color tokens: '.concat(colors, ' fallback to default colors: ["#000", "#fff"]')), colors = [
95
+ "#000",
96
+ "#fff"
97
+ ]), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(LinearGradientFrame, _object_spread_props(_object_spread({
98
+ ref
99
+ }, stackProps), {
100
+ children: [
101
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_linear_gradient.LinearGradient, {
102
+ start,
103
+ end,
104
+ colors,
105
+ locations,
106
+ style: gradientStyle
107
+ }),
51
108
  children
52
- ] });
53
- }
54
- ), gradientStyle = {
109
+ ]
110
+ }));
111
+ }), gradientStyle = {
55
112
  position: "absolute",
56
113
  top: 0,
57
114
  left: 0,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/LinearGradient.shared.tsx"],
4
- "mappings": ";;;;;;;;;;;;;;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/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"]
6
6
  }
@@ -1,40 +1,97 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import { normalizeColor, styled, useProps, useTheme } from "@tamagui/core";
2
3
  import { YStack } from "@tamagui/stacks";
3
4
  import { LinearGradient as ExpoLinearGradient } from "./linear-gradient";
4
- import { jsx, jsxs } from "react/jsx-runtime";
5
- const LinearGradientFrame = styled(YStack, {
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)
41
+ return {};
42
+ var target = _object_without_properties_loose(source, excluded), key, i;
43
+ if (Object.getOwnPropertySymbols) {
44
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
45
+ for (i = 0; i < sourceSymbolKeys.length; i++)
46
+ key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
47
+ }
48
+ return target;
49
+ }
50
+ function _object_without_properties_loose(source, excluded) {
51
+ if (source == null)
52
+ return {};
53
+ var target = {}, sourceKeys = Object.keys(source), key, i;
54
+ for (i = 0; i < sourceKeys.length; i++)
55
+ key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
56
+ return target;
57
+ }
58
+ var LinearGradientFrame = styled(YStack, {
6
59
  name: "LinearGradient",
7
60
  overflow: "hidden",
8
61
  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
- ),
62
+ }), LinearGradient = LinearGradientFrame.styleable(function(propsIn, ref) {
63
+ 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, [
64
+ "start",
65
+ "end",
66
+ "colors",
67
+ "locations",
68
+ "children"
69
+ ]), theme = useTheme(), colors = ((_props_colors = props.colors) === null || _props_colors === void 0 ? void 0 : _props_colors.map(function(c) {
70
+ var _theme_c, _theme_c_get;
71
+ 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;
72
+ })) || [];
73
+ return process.env.NODE_ENV !== "production" && colors.some(function(c) {
74
+ var normalized = normalizeColor(c);
75
+ if (!normalized || normalized.startsWith("$"))
76
+ return !0;
77
+ }) && (console.error('LinearGradient: "colors" prop contains invalid color tokens: '.concat(colors, ' fallback to default colors: ["#000", "#fff"]')), colors = [
78
+ "#000",
79
+ "#fff"
80
+ ]), /* @__PURE__ */ _jsxs(LinearGradientFrame, _object_spread_props(_object_spread({
81
+ ref
82
+ }, stackProps), {
83
+ children: [
84
+ /* @__PURE__ */ _jsx(ExpoLinearGradient, {
85
+ start,
86
+ end,
87
+ colors,
88
+ locations,
89
+ style: gradientStyle
90
+ }),
34
91
  children
35
- ] });
36
- }
37
- ), gradientStyle = {
92
+ ]
93
+ }));
94
+ }), gradientStyle = {
38
95
  position: "absolute",
39
96
  top: 0,
40
97
  left: 0,
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "version": 3,
3
- "sources": ["../../src/LinearGradient.shared.tsx"],
4
- "mappings": "AACA,SAAS,gBAAgB,QAAQ,UAAU,gBAAgB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QAAQ;AACV;",
5
+ "names": ["normalizeColor", "styled", "useProps", "useTheme", "YStack", "LinearGradient", "ExpoLinearGradient", "LinearGradientFrame", "name", "overflow", "position", "styleable", "propsIn", "ref", "props", "start", "end", "colorsProp", "colors", "locations", "children", "stackProps", "theme", "map", "c", "get", "process", "env", "NODE_ENV", "some", "normalized", "startsWith", "console", "error", "style", "gradientStyle", "top", "left", "right", "bottom", "zIndex"]
6
6
  }
@@ -1,40 +1,97 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
2
  import { normalizeColor, styled, useProps, useTheme } from "@tamagui/core";
2
3
  import { YStack } from "@tamagui/stacks";
3
4
  import { LinearGradient as ExpoLinearGradient } from "./linear-gradient";
4
- import { jsx, jsxs } from "react/jsx-runtime";
5
- const LinearGradientFrame = styled(YStack, {
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)
41
+ return {};
42
+ var target = _object_without_properties_loose(source, excluded), key, i;
43
+ if (Object.getOwnPropertySymbols) {
44
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
45
+ for (i = 0; i < sourceSymbolKeys.length; i++)
46
+ key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
47
+ }
48
+ return target;
49
+ }
50
+ function _object_without_properties_loose(source, excluded) {
51
+ if (source == null)
52
+ return {};
53
+ var target = {}, sourceKeys = Object.keys(source), key, i;
54
+ for (i = 0; i < sourceKeys.length; i++)
55
+ key = sourceKeys[i], !(excluded.indexOf(key) >= 0) && (target[key] = source[key]);
56
+ return target;
57
+ }
58
+ var LinearGradientFrame = styled(YStack, {
6
59
  name: "LinearGradient",
7
60
  overflow: "hidden",
8
61
  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
- ),
62
+ }), LinearGradient = LinearGradientFrame.styleable(function(propsIn, ref) {
63
+ 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, [
64
+ "start",
65
+ "end",
66
+ "colors",
67
+ "locations",
68
+ "children"
69
+ ]), theme = useTheme(), colors = ((_props_colors = props.colors) === null || _props_colors === void 0 ? void 0 : _props_colors.map(function(c) {
70
+ var _theme_c, _theme_c_get;
71
+ 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;
72
+ })) || [];
73
+ return process.env.NODE_ENV !== "production" && colors.some(function(c) {
74
+ var normalized = normalizeColor(c);
75
+ if (!normalized || normalized.startsWith("$"))
76
+ return !0;
77
+ }) && (console.error('LinearGradient: "colors" prop contains invalid color tokens: '.concat(colors, ' fallback to default colors: ["#000", "#fff"]')), colors = [
78
+ "#000",
79
+ "#fff"
80
+ ]), /* @__PURE__ */ _jsxs(LinearGradientFrame, _object_spread_props(_object_spread({
81
+ ref
82
+ }, stackProps), {
83
+ children: [
84
+ /* @__PURE__ */ _jsx(ExpoLinearGradient, {
85
+ start,
86
+ end,
87
+ colors,
88
+ locations,
89
+ style: gradientStyle
90
+ }),
34
91
  children
35
- ] });
36
- }
37
- ), gradientStyle = {
92
+ ]
93
+ }));
94
+ }), gradientStyle = {
38
95
  position: "absolute",
39
96
  top: 0,
40
97
  left: 0,
@@ -1,6 +1,6 @@
1
1
  {
2
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,s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LinearGradientFrame", "name", "overflow", "position", "styleable", "propsIn", "ref", "props", "start", "end", "colorsProp", "colors", "locations", "children", "stackProps", "theme", "map", "c", "get", "process", "env", "NODE_ENV", "some", "normalized", "startsWith", "console", "error", "style", "gradientStyle", "top", "left", "right", "bottom", "zIndex"]
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/linear-gradient",
3
- "version": "1.89.30",
3
+ "version": "1.90.0",
4
4
  "sideEffects": [
5
5
  "*.css"
6
6
  ],
@@ -32,14 +32,14 @@
32
32
  }
33
33
  },
34
34
  "dependencies": {
35
- "@tamagui/core": "1.89.30",
36
- "@tamagui/stacks": "1.89.30"
35
+ "@tamagui/core": "1.90.0",
36
+ "@tamagui/stacks": "1.90.0"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "react": "*"
40
40
  },
41
41
  "devDependencies": {
42
- "@tamagui/build": "1.89.30",
42
+ "@tamagui/build": "1.90.0",
43
43
  "expo-linear-gradient": "^12.7.1",
44
44
  "react": "^18.2.0"
45
45
  },
@@ -2,6 +2,5 @@
2
2
  * Fake file require just so native users can avoid installing
3
3
  * expo stuff up front for native.
4
4
  */
5
- /// <reference types="react" />
6
- export declare function LinearGradient(props: any): JSX.Element;
5
+ export declare function LinearGradient(props: any): import("react/jsx-runtime").JSX.Element;
7
6
  //# sourceMappingURL=LinearGradient.native.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LinearGradient.native.d.ts","sourceRoot":"","sources":["../src/LinearGradient.native.tsx"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,wBAAgB,cAAc,CAAC,KAAK,KAAA,eAGnC"}
1
+ {"version":3,"file":"LinearGradient.native.d.ts","sourceRoot":"","sources":["../src/LinearGradient.native.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,wBAAgB,cAAc,CAAC,KAAK,KAAA,2CAGnC"}