@tamagui/core 1.123.10 → 1.123.11

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.
package/dist/native.js CHANGED
@@ -7075,7 +7075,7 @@ var require_themeable_native = __commonJS({
7075
7075
  module2.exports = __toCommonJS2(themeable_exports);
7076
7076
  var import_jsx_runtime = require("react/jsx-runtime"), import_react3 = __toESM2(require("react")), import_Theme = require_Theme_native();
7077
7077
  function themeable(Component, staticConfig) {
7078
- var withThemeComponent = /* @__PURE__ */ import_react3.default.forwardRef(function(props, ref) {
7078
+ var optimize = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, withThemeComponent = function(props, ref) {
7079
7079
  var { themeInverse, theme, componentName, themeReset, ...rest } = props, overriddenContextProps, context = staticConfig == null ? void 0 : staticConfig.context;
7080
7080
  if (context) for (var key in context.props) {
7081
7081
  var val = props[key];
@@ -7088,10 +7088,8 @@ var require_themeable_native = __commonJS({
7088
7088
  ...rest,
7089
7089
  "data-disable-theme": !0
7090
7090
  })
7091
- ), filteredProps = {
7092
- componentName: componentName || (staticConfig == null ? void 0 : staticConfig.componentName)
7093
- };
7094
- "debug" in props && (filteredProps.debug = props.debug), "theme" in props && (filteredProps.name = props.theme), "themeInverse" in props && (filteredProps.inverse = props.themeInverse), "themeReset" in props && (filteredProps.reset = themeReset);
7091
+ ), filteredProps = null, compName = componentName || (staticConfig == null ? void 0 : staticConfig.componentName);
7092
+ if (compName && (filteredProps || (filteredProps = {}), filteredProps.componentName = compName), "debug" in props && (filteredProps || (filteredProps = {}), filteredProps.debug = props.debug), "theme" in props && (filteredProps || (filteredProps = {}), filteredProps.name = props.theme), "themeInverse" in props && (filteredProps || (filteredProps = {}), filteredProps.inverse = props.themeInverse), "themeReset" in props && (filteredProps || (filteredProps = {}), filteredProps.reset = themeReset), optimize && !filteredProps) return element;
7095
7093
  var contents = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_Theme.Theme, {
7096
7094
  "disable-child-theme": !0,
7097
7095
  ...filteredProps,
@@ -7106,8 +7104,8 @@ var require_themeable_native = __commonJS({
7106
7104
  });
7107
7105
  }
7108
7106
  return contents;
7109
- }), withTheme = withThemeComponent;
7110
- return withTheme.displayName = `Themed(${(Component == null ? void 0 : Component.displayName) || (Component == null ? void 0 : Component.name) || "Anonymous"})`, withTheme;
7107
+ }, withTheme = withThemeComponent;
7108
+ return withTheme.displayName = `Themed(${(Component == null ? void 0 : Component.displayName) || (Component == null ? void 0 : Component.name) || "Anonymous"})`, optimize ? withTheme : /* @__PURE__ */ import_react3.default.forwardRef(withTheme);
7111
7109
  }
7112
7110
  }
7113
7111
  });
@@ -8041,7 +8039,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
8041
8039
  }
8042
8040
  function styleable(Component2, options) {
8043
8041
  var _Component_render, isForwardedRefAlready = ((_Component_render = Component2.render) === null || _Component_render === void 0 ? void 0 : _Component_render.length) === 2, out = isForwardedRefAlready ? Component2 : /* @__PURE__ */ import_react3.default.forwardRef(Component2), extendedConfig = extendStyledConfig(options == null ? void 0 : options.staticConfig);
8044
- return out = options != null && options.disableTheme ? out : (0, import_themeable.themeable)(out, extendedConfig), process.env.TAMAGUI_MEMOIZE_STYLEABLE && (out = /* @__PURE__ */ import_react3.default.memo(out)), out.staticConfig = extendedConfig, out.styleable = styleable, out;
8042
+ return out = options != null && options.disableTheme ? out : (0, import_themeable.themeable)(out, extendedConfig, !0), process.env.TAMAGUI_MEMOIZE_STYLEABLE && (out = /* @__PURE__ */ import_react3.default.memo(out)), out.staticConfig = extendedConfig, out.styleable = styleable, out;
8045
8043
  }
8046
8044
  return res.extractable = extractable, res.styleable = styleable, res;
8047
8045
  }