@tamagui/helpers-icon 3.0.6 → 3.0.8
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.
|
@@ -40,10 +40,10 @@ function themed(Component) {
|
|
|
40
40
|
resolveValues: process.env.TAMAGUI_ICON_COLOR_RESOLVE || "auto",
|
|
41
41
|
...optsIn
|
|
42
42
|
};
|
|
43
|
-
var IconWrapper = function(propsIn) {
|
|
43
|
+
var IconWrapper = function IconWrapper2(propsIn) {
|
|
44
44
|
var theme = (0, import_core.useTheme)();
|
|
45
45
|
var { size: sizeProp, strokeWidth: strokeWidthProp, color: colorProp, fill: fillProp, stroke: strokeProp, disableTheme, style, testID, ...rest } = propsIn;
|
|
46
|
-
var resolveSvgColor = function(val) {
|
|
46
|
+
var resolveSvgColor = function resolveSvgColor2(val) {
|
|
47
47
|
if (typeof val !== "string") return val;
|
|
48
48
|
var themed2 = theme === null || theme === void 0 ? void 0 : theme[val];
|
|
49
49
|
if (themed2 != null) return (0, import_core.getVariable)(themed2);
|
|
@@ -68,7 +68,7 @@ function themed(Component) {
|
|
|
68
68
|
};
|
|
69
69
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, { ...finalProps });
|
|
70
70
|
};
|
|
71
|
-
var wrapped = function(propsIn) {
|
|
71
|
+
var wrapped = function wrapped2(propsIn) {
|
|
72
72
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IconWrapper, { ...propsIn });
|
|
73
73
|
};
|
|
74
74
|
wrapped["staticConfig"] = {
|
|
@@ -40,10 +40,10 @@ function themed(Component) {
|
|
|
40
40
|
resolveValues: process.env.TAMAGUI_ICON_COLOR_RESOLVE || "auto",
|
|
41
41
|
...optsIn
|
|
42
42
|
};
|
|
43
|
-
var IconWrapper = function(propsIn) {
|
|
43
|
+
var IconWrapper = function IconWrapper2(propsIn) {
|
|
44
44
|
var theme = (0, import_core.useTheme)();
|
|
45
45
|
var { size: sizeProp, strokeWidth: strokeWidthProp, color: colorProp, fill: fillProp, stroke: strokeProp, disableTheme, style, testID, ...rest } = propsIn;
|
|
46
|
-
var resolveSvgColor = function(val) {
|
|
46
|
+
var resolveSvgColor = function resolveSvgColor2(val) {
|
|
47
47
|
if (typeof val !== "string") return val;
|
|
48
48
|
var themed2 = theme === null || theme === void 0 ? void 0 : theme[val];
|
|
49
49
|
if (themed2 != null) return (0, import_core.getVariable)(themed2);
|
|
@@ -68,7 +68,7 @@ function themed(Component) {
|
|
|
68
68
|
};
|
|
69
69
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, { ...finalProps });
|
|
70
70
|
};
|
|
71
|
-
var wrapped = function(propsIn) {
|
|
71
|
+
var wrapped = function wrapped2(propsIn) {
|
|
72
72
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IconWrapper, { ...propsIn });
|
|
73
73
|
};
|
|
74
74
|
wrapped["staticConfig"] = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themed.native.js","names":[],"sources":["cjs/themed.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 themed_exports = {};\n__export(themed_exports, {\n themed: () => themed\n});\nmodule.exports = __toCommonJS(themed_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_core = require(\"@tamagui/core\");\nvar import_font_size = require(\"@tamagui/font-size\");\nvar inlinePaintProps = /* @__PURE__ */ new Set([\n \"color\",\n \"fill\",\n \"stroke\"\n]);\nfunction themed(Component) {\n var optsIn = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n var opts = {\n defaultThemeColor: process.env.DEFAULT_ICON_THEME_COLOR || \"color\",\n defaultStrokeWidth: 2,\n fallbackColor: \"#000\",\n resolveValues: process.env.TAMAGUI_ICON_COLOR_RESOLVE || \"auto\",\n ...optsIn\n };\n var IconWrapper = function(propsIn) {\n var theme = (0, import_core.useTheme)();\n var { size: sizeProp, strokeWidth: strokeWidthProp, color: colorProp, fill: fillProp, stroke: strokeProp, disableTheme, style, testID, ...rest } = propsIn;\n var resolveSvgColor = function(val) {\n if (typeof val !== \"string\") return val;\n var themed2 = theme === null || theme === void 0 ? void 0 : theme[val];\n if (themed2 != null) return (0, import_core.getVariable)(themed2);\n return (0, import_core.getVariable)(val, \"color\");\n };\n var fillResolved = resolveSvgColor(fillProp);\n var strokeResolved = resolveSvgColor(strokeProp);\n var colorResolved = resolveSvgColor(colorProp);\n var colorIn = strokeResolved || colorResolved || (opts.defaultThemeColor ? theme[opts.defaultThemeColor] : void 0) || (!disableTheme ? theme.color : null) || opts.fallbackColor;\n var color = (0, import_core.getVariable)(colorIn);\n var size = typeof sizeProp === \"number\" ? sizeProp : typeof sizeProp === \"string\" ? (0, import_font_size.getFontSize)(sizeProp) : void 0;\n var strokeWidth = typeof strokeWidthProp === \"string\" ? (0, import_core.getTokenValue)(strokeWidthProp, \"size\") : strokeWidthProp !== null && strokeWidthProp !== void 0 ? strokeWidthProp : `${opts.defaultStrokeWidth}`;\n var finalProps = {\n ...rest,\n color,\n size,\n strokeWidth,\n ...fillResolved !== void 0 ? {\n fill: fillResolved\n } : null,\n ...strokeResolved !== void 0 ? {\n stroke: strokeResolved\n } : null,\n ...style ? {\n style\n } : null,\n // tamagui web maps testID -> data-testid; native keeps testID for react-native-svg\n ...testID != null ? import_core.isWeb ? {\n \"data-testid\": testID\n } : {\n testID\n } : null\n };\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, {\n ...finalProps\n });\n };\n var wrapped = function(propsIn) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IconWrapper, {\n ...propsIn\n });\n };\n wrapped[\"staticConfig\"] = {\n isHOC: true,\n acceptsClassName: true,\n // svg paint props are resolved by the icon wrapper, not an inner styled frame.\n inlineProps: inlinePaintProps\n };\n return wrapped;\n}\n//# sourceMappingURL=themed.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,iBAAiB,CAAC;AACtB,SAAS,gBAAgB,EACvB,cAAc,OAChB,CAAC;AACD,OAAO,UAAU,aAAa,cAAc;AAC5C,IAAI,qBAAqB,QAAQ,mBAAmB;AACpD,IAAI,cAAc,QAAQ,eAAe;AACzC,IAAI,mBAAmB,QAAQ,oBAAoB;AACnD,IAAI,mCAAmC,IAAI,IAAI;CAC7C;CACA;CACA;AACF,CAAC;AACD,SAAS,OAAO,WAAW;CACzB,IAAI,SAAS,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK,CAAC;CAC/E,IAAI,OAAO;EACT,mBAAmB,QAAQ,IAAI,4BAA4B;EAC3D,oBAAoB;EACpB,eAAe;EACf,eAAe,QAAQ,IAAI,8BAA8B;EACzD,GAAG;CACL;CACA,IAAI,cAAc,SAAS,SAAS;
|
|
1
|
+
{"version":3,"file":"themed.native.js","names":[],"sources":["cjs/themed.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 themed_exports = {};\n__export(themed_exports, {\n themed: () => themed\n});\nmodule.exports = __toCommonJS(themed_exports);\nvar import_jsx_runtime = require(\"react/jsx-runtime\");\nvar import_core = require(\"@tamagui/core\");\nvar import_font_size = require(\"@tamagui/font-size\");\nvar inlinePaintProps = /* @__PURE__ */ new Set([\n \"color\",\n \"fill\",\n \"stroke\"\n]);\nfunction themed(Component) {\n var optsIn = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n var opts = {\n defaultThemeColor: process.env.DEFAULT_ICON_THEME_COLOR || \"color\",\n defaultStrokeWidth: 2,\n fallbackColor: \"#000\",\n resolveValues: process.env.TAMAGUI_ICON_COLOR_RESOLVE || \"auto\",\n ...optsIn\n };\n var IconWrapper = function IconWrapper2(propsIn) {\n var theme = (0, import_core.useTheme)();\n var { size: sizeProp, strokeWidth: strokeWidthProp, color: colorProp, fill: fillProp, stroke: strokeProp, disableTheme, style, testID, ...rest } = propsIn;\n var resolveSvgColor = function resolveSvgColor2(val) {\n if (typeof val !== \"string\") return val;\n var themed2 = theme === null || theme === void 0 ? void 0 : theme[val];\n if (themed2 != null) return (0, import_core.getVariable)(themed2);\n return (0, import_core.getVariable)(val, \"color\");\n };\n var fillResolved = resolveSvgColor(fillProp);\n var strokeResolved = resolveSvgColor(strokeProp);\n var colorResolved = resolveSvgColor(colorProp);\n var colorIn = strokeResolved || colorResolved || (opts.defaultThemeColor ? theme[opts.defaultThemeColor] : void 0) || (!disableTheme ? theme.color : null) || opts.fallbackColor;\n var color = (0, import_core.getVariable)(colorIn);\n var size = typeof sizeProp === \"number\" ? sizeProp : typeof sizeProp === \"string\" ? (0, import_font_size.getFontSize)(sizeProp) : void 0;\n var strokeWidth = typeof strokeWidthProp === \"string\" ? (0, import_core.getTokenValue)(strokeWidthProp, \"size\") : strokeWidthProp !== null && strokeWidthProp !== void 0 ? strokeWidthProp : `${opts.defaultStrokeWidth}`;\n var finalProps = {\n ...rest,\n color,\n size,\n strokeWidth,\n ...fillResolved !== void 0 ? {\n fill: fillResolved\n } : null,\n ...strokeResolved !== void 0 ? {\n stroke: strokeResolved\n } : null,\n ...style ? {\n style\n } : null,\n // tamagui web maps testID -> data-testid; native keeps testID for react-native-svg\n ...testID != null ? import_core.isWeb ? {\n \"data-testid\": testID\n } : {\n testID\n } : null\n };\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Component, {\n ...finalProps\n });\n };\n var wrapped = function wrapped2(propsIn) {\n return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IconWrapper, {\n ...propsIn\n });\n };\n wrapped[\"staticConfig\"] = {\n isHOC: true,\n acceptsClassName: true,\n // svg paint props are res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Ae,OACjB,IAAI,EACF,OACF,IAAI;EACN;EACA,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,WAAW,EAC5D,GAAG,WACL,CAAC;CACH;CACA,IAAI,UAAU,SAAS,SAAS,SAAS;EACvC,OAAuB,iBAAC,GAAG,mBAAmB,IAAG,CAAE,aAAa,EAC9D,GAAG,QACL,CAAC;CACH;CACA,QAAQ,kBAAkB;EACxB,OAAO;EACP,kBAAkB;EAElB,aAAa;CACf;CACA,OAAO;AACT"}
|
|
@@ -16,10 +16,10 @@ function themed(Component) {
|
|
|
16
16
|
resolveValues: process.env.TAMAGUI_ICON_COLOR_RESOLVE || "auto",
|
|
17
17
|
...optsIn
|
|
18
18
|
};
|
|
19
|
-
var IconWrapper = function(propsIn) {
|
|
19
|
+
var IconWrapper = function IconWrapper2(propsIn) {
|
|
20
20
|
var theme = useTheme();
|
|
21
21
|
var { size: sizeProp, strokeWidth: strokeWidthProp, color: colorProp, fill: fillProp, stroke: strokeProp, disableTheme, style, testID, ...rest } = propsIn;
|
|
22
|
-
var resolveSvgColor = function(val) {
|
|
22
|
+
var resolveSvgColor = function resolveSvgColor2(val) {
|
|
23
23
|
if (typeof val !== "string") return val;
|
|
24
24
|
var themed2 = theme === null || theme === void 0 ? void 0 : theme[val];
|
|
25
25
|
if (themed2 != null) return getVariable(themed2);
|
|
@@ -44,7 +44,7 @@ function themed(Component) {
|
|
|
44
44
|
};
|
|
45
45
|
return /* @__PURE__ */ jsx(Component, { ...finalProps });
|
|
46
46
|
};
|
|
47
|
-
var wrapped = function(propsIn) {
|
|
47
|
+
var wrapped = function wrapped2(propsIn) {
|
|
48
48
|
return /* @__PURE__ */ jsx(IconWrapper, { ...propsIn });
|
|
49
49
|
};
|
|
50
50
|
wrapped["staticConfig"] = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themed.native.js","names":[],"sources":["esm/themed.native.js"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { getTokenValue, getVariable, isWeb, useTheme } from \"@tamagui/core\";\nimport { getFontSize } from \"@tamagui/font-size\";\nvar inlinePaintProps = /* @__PURE__ */ new Set([\n \"color\",\n \"fill\",\n \"stroke\"\n]);\nfunction themed(Component) {\n var optsIn = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n var opts = {\n defaultThemeColor: process.env.DEFAULT_ICON_THEME_COLOR || \"color\",\n defaultStrokeWidth: 2,\n fallbackColor: \"#000\",\n resolveValues: process.env.TAMAGUI_ICON_COLOR_RESOLVE || \"auto\",\n ...optsIn\n };\n var IconWrapper = function(propsIn) {\n var theme = useTheme();\n var { size: sizeProp, strokeWidth: strokeWidthProp, color: colorProp, fill: fillProp, stroke: strokeProp, disableTheme, style, testID, ...rest } = propsIn;\n var resolveSvgColor = function(val) {\n if (typeof val !== \"string\") return val;\n var themed2 = theme === null || theme === void 0 ? void 0 : theme[val];\n if (themed2 != null) return getVariable(themed2);\n return getVariable(val, \"color\");\n };\n var fillResolved = resolveSvgColor(fillProp);\n var strokeResolved = resolveSvgColor(strokeProp);\n var colorResolved = resolveSvgColor(colorProp);\n var colorIn = strokeResolved || colorResolved || (opts.defaultThemeColor ? theme[opts.defaultThemeColor] : void 0) || (!disableTheme ? theme.color : null) || opts.fallbackColor;\n var color = getVariable(colorIn);\n var size = typeof sizeProp === \"number\" ? sizeProp : typeof sizeProp === \"string\" ? getFontSize(sizeProp) : void 0;\n var strokeWidth = typeof strokeWidthProp === \"string\" ? getTokenValue(strokeWidthProp, \"size\") : strokeWidthProp !== null && strokeWidthProp !== void 0 ? strokeWidthProp : `${opts.defaultStrokeWidth}`;\n var finalProps = {\n ...rest,\n color,\n size,\n strokeWidth,\n ...fillResolved !== void 0 ? {\n fill: fillResolved\n } : null,\n ...strokeResolved !== void 0 ? {\n stroke: strokeResolved\n } : null,\n ...style ? {\n style\n } : null,\n // tamagui web maps testID -> data-testid; native keeps testID for react-native-svg\n ...testID != null ? isWeb ? {\n \"data-testid\": testID\n } : {\n testID\n } : null\n };\n return /* @__PURE__ */ _jsx(Component, {\n ...finalProps\n });\n };\n var wrapped = function(propsIn) {\n return /* @__PURE__ */ _jsx(IconWrapper, {\n ...propsIn\n });\n };\n wrapped[\"staticConfig\"] = {\n isHOC: true,\n acceptsClassName: true,\n // svg paint props are resolved by the icon wrapper, not an inner styled frame.\n inlineProps: inlinePaintProps\n };\n return wrapped;\n}\nexport {\n themed\n};\n//# sourceMappingURL=themed.js.map\n"],"mappings":";;;;;AAGA,IAAI,mCAAmC,IAAI,IAAI;CAC7C;CACA;CACA;AACF,CAAC;AACD,SAAS,OAAO,WAAW;CACzB,IAAI,SAAS,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK,CAAC;CAC/E,IAAI,OAAO;EACT,mBAAmB,QAAQ,IAAI,4BAA4B;EAC3D,oBAAoB;EACpB,eAAe;EACf,eAAe,QAAQ,IAAI,8BAA8B;EACzD,GAAG;CACL;CACA,IAAI,cAAc,SAAS,SAAS;
|
|
1
|
+
{"version":3,"file":"themed.native.js","names":[],"sources":["esm/themed.native.js"],"sourcesContent":["import { jsx as _jsx } from \"react/jsx-runtime\";\nimport { getTokenValue, getVariable, isWeb, useTheme } from \"@tamagui/core\";\nimport { getFontSize } from \"@tamagui/font-size\";\nvar inlinePaintProps = /* @__PURE__ */ new Set([\n \"color\",\n \"fill\",\n \"stroke\"\n]);\nfunction themed(Component) {\n var optsIn = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};\n var opts = {\n defaultThemeColor: process.env.DEFAULT_ICON_THEME_COLOR || \"color\",\n defaultStrokeWidth: 2,\n fallbackColor: \"#000\",\n resolveValues: process.env.TAMAGUI_ICON_COLOR_RESOLVE || \"auto\",\n ...optsIn\n };\n var IconWrapper = function IconWrapper2(propsIn) {\n var theme = useTheme();\n var { size: sizeProp, strokeWidth: strokeWidthProp, color: colorProp, fill: fillProp, stroke: strokeProp, disableTheme, style, testID, ...rest } = propsIn;\n var resolveSvgColor = function resolveSvgColor2(val) {\n if (typeof val !== \"string\") return val;\n var themed2 = theme === null || theme === void 0 ? void 0 : theme[val];\n if (themed2 != null) return getVariable(themed2);\n return getVariable(val, \"color\");\n };\n var fillResolved = resolveSvgColor(fillProp);\n var strokeResolved = resolveSvgColor(strokeProp);\n var colorResolved = resolveSvgColor(colorProp);\n var colorIn = strokeResolved || colorResolved || (opts.defaultThemeColor ? theme[opts.defaultThemeColor] : void 0) || (!disableTheme ? theme.color : null) || opts.fallbackColor;\n var color = getVariable(colorIn);\n var size = typeof sizeProp === \"number\" ? sizeProp : typeof sizeProp === \"string\" ? getFontSize(sizeProp) : void 0;\n var strokeWidth = typeof strokeWidthProp === \"string\" ? getTokenValue(strokeWidthProp, \"size\") : strokeWidthProp !== null && strokeWidthProp !== void 0 ? strokeWidthProp : `${opts.defaultStrokeWidth}`;\n var finalProps = {\n ...rest,\n color,\n size,\n strokeWidth,\n ...fillResolved !== void 0 ? {\n fill: fillResolved\n } : null,\n ...strokeResolved !== void 0 ? {\n stroke: strokeResolved\n } : null,\n ...style ? {\n style\n } : null,\n // tamagui web maps testID -> data-testid; native keeps testID for react-native-svg\n ...testID != null ? isWeb ? {\n \"data-testid\": testID\n } : {\n testID\n } : null\n };\n return /* @__PURE__ */ _jsx(Component, {\n ...finalProps\n });\n };\n var wrapped = function wrapped2(propsIn) {\n return /* @__PURE__ */ _jsx(IconWrapper, {\n ...propsIn\n });\n };\n wrapped[\"staticConfig\"] = {\n isHOC: true,\n acceptsClassName: true,\n // svg paint props are resolved by the icon wrapper, not an inner styled frame.\n inlineProps: inlinePaintProps\n };\n return wrapped;\n}\nexport {\n themed\n};\n//# sourceMappingURL=themed.js.map\n"],"mappings":";;;;;AAGA,IAAI,mCAAmC,IAAI,IAAI;CAC7C;CACA;CACA;AACF,CAAC;AACD,SAAS,OAAO,WAAW;CACzB,IAAI,SAAS,UAAU,SAAS,KAAK,UAAU,OAAO,KAAK,IAAI,UAAU,KAAK,CAAC;C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OACjB,IAAI,EACF,OACF,IAAI;EACN;EACA,OAAuB,oBAAK,WAAW,EACrC,GAAG,WACL,CAAC;CACH;CACA,IAAI,UAAU,SAAS,SAAS,SAAS;EACvC,OAAuB,oBAAK,aAAa,EACvC,GAAG,QACL,CAAC;CACH;CACA,QAAQ,kBAAkB;EACxB,OAAO;EACP,kBAAkB;EAElB,aAAa;CACf;CACA,OAAO;AACT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/helpers-icon",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.8",
|
|
4
4
|
"description": "Utilities for icon packages",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"source": "src/index.ts",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"clean:build": "tamagui-build clean:build"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@tamagui/core": "3.0.
|
|
37
|
-
"@tamagui/font-size": "3.0.
|
|
36
|
+
"@tamagui/core": "3.0.8",
|
|
37
|
+
"@tamagui/font-size": "3.0.8"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@tamagui/build": "3.0.
|
|
40
|
+
"@tamagui/build": "3.0.8",
|
|
41
41
|
"react": "19.2.3",
|
|
42
42
|
"react-native-svg": "15.15.4"
|
|
43
43
|
},
|
|
@@ -50,5 +50,5 @@
|
|
|
50
50
|
"url": "git+https://github.com/tamagui/tamagui.git",
|
|
51
51
|
"directory": "code/core/helpers-icon"
|
|
52
52
|
},
|
|
53
|
-
"releaseSourceCommit": "
|
|
53
|
+
"releaseSourceCommit": "b723356193510591d9ad15877b8937e8e6a31910"
|
|
54
54
|
}
|