@tamagui/core 1.88.14 → 1.88.16

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
@@ -2025,7 +2025,7 @@ var require_ThemeManager_native = __commonJS({
2025
2025
  potentials = [...componentPotentials, ...potentials, ...allComponentThemes];
2026
2026
  }
2027
2027
  let found = potentials.find((t) => t in themes);
2028
- if (process.env.NODE_ENV !== "production" && typeof props.debug == "string" && console.info(" getState ", {
2028
+ if (process.env.NODE_ENV !== "production" && typeof props.debug == "string" && import_constants.isClient && console.info(" getState ", {
2029
2029
  props,
2030
2030
  found,
2031
2031
  potentials,
@@ -2046,7 +2046,7 @@ var require_ThemeManager_native = __commonJS({
2046
2046
  break;
2047
2047
  }
2048
2048
  }
2049
- return process.env.NODE_ENV !== "production" && props.debug === "verbose" && typeof window < "u" && (console.groupCollapsed("ThemeManager.getState()"), console.info({ props, baseName, base, min, max }), console.warn("result", { result }), console.trace(), console.groupEnd()), result;
2049
+ return process.env.NODE_ENV !== "production" && props.debug === "verbose" && import_constants.isClient && (console.groupCollapsed("ThemeManager.getState()"), console.info({ props, baseName, base, min, max }), console.warn("result", { result }), console.trace(), console.groupEnd()), result;
2050
2050
  }
2051
2051
  var inverseThemeName = (themeName) => themeName.startsWith("light") ? themeName.replace(/^light/, "dark") : themeName.replace(/^dark/, "light");
2052
2052
  function getManagers(themeManager) {
@@ -2119,10 +2119,14 @@ var require_useTheme_native = __commonJS({
2119
2119
  import_constants.isServer ? void 0 : () => {
2120
2120
  var _a, _b;
2121
2121
  let next = ((_a = props.shouldUpdate) == null ? void 0 : _a.call(props)) ?? (keys.current.length > 0 ? !0 : void 0);
2122
- return process.env.NODE_ENV === "development" && typeof props.debug == "string" && props.debug !== "profile" && console.info(" \u{1F3A8} useTheme() shouldUpdate?", next, {
2123
- shouldUpdateProp: (_b = props.shouldUpdate) == null ? void 0 : _b.call(props),
2124
- keys: [...keys.current]
2125
- }), next;
2122
+ return process.env.NODE_ENV === "development" && typeof props.debug == "string" && props.debug !== "profile" && console.info(
2123
+ " \u{1F3A8} useTheme() shouldUpdate?",
2124
+ next,
2125
+ import_constants.isClient ? {
2126
+ shouldUpdateProp: (_b = props.shouldUpdate) == null ? void 0 : _b.call(props),
2127
+ keys: [...keys.current]
2128
+ } : ""
2129
+ ), next;
2126
2130
  }
2127
2131
  ), { themeManager, state } = changedThemeState;
2128
2132
  process.env.NODE_ENV === "development" && (state != null && state.theme || process.env.TAMAGUI_DISABLE_NO_THEME_WARNING !== "1" && console.warn(
@@ -3736,7 +3740,7 @@ var require_propMapper_native = __commonJS({
3736
3740
  propMapper: () => propMapper
3737
3741
  });
3738
3742
  module2.exports = __toCommonJS2(propMapper_exports);
3739
- var import_constants = require_index_native3(), import_helpers = require_index_native4(), import_config = require_config_native(), import_isDevTools = require_isDevTools_native(), import_createVariable = require_createVariable_native(), import_expandStyle = require_expandStyle_native(), import_normalizeStyle = require_normalizeStyle_native(), import_getVariantExtras = require_getVariantExtras_native(), import_isObj = require_isObj_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), propMapper = (key, value, styleStateIn, subPropsIn) => {
3743
+ var import_constants = require_index_native3(), import_helpers = require_index_native4(), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_expandStyle = require_expandStyle_native(), import_normalizeStyle = require_normalizeStyle_native(), import_getVariantExtras = require_getVariantExtras_native(), import_isObj = require_isObj_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), propMapper = (key, value, styleStateIn, subPropsIn) => {
3740
3744
  var _a;
3741
3745
  if (lastFontFamilyToken = null, !import_constants.isAndroid && key === "elevationAndroid")
3742
3746
  return;
@@ -3940,7 +3944,7 @@ var require_propMapper_native = __commonJS({
3940
3944
  let out = resolveVariableValue(key, valOrVar, resolveAs);
3941
3945
  return process.env.NODE_ENV === "development" && styleState.debug === "verbose" && console.info("resolved", resolveAs, valOrVar, out), out;
3942
3946
  }
3943
- return process.env.NODE_ENV === "development" && import_isDevTools.isDevTools && styleState.debug === "verbose" && (console.groupCollapsed(" \uFE52 propMap (val)", key, value), console.info({ valOrVar, theme, hasSet }, theme ? theme[key] : ""), console.groupEnd()), value;
3947
+ process.env.NODE_ENV === "development" && styleState.debug === "verbose" && console.warn(`Warning: no token found for ${key}, omitting`);
3944
3948
  };
3945
3949
  function resolveVariableValue(key, valOrVar, resolveValues) {
3946
3950
  if (resolveValues === "none")
@@ -5183,39 +5187,47 @@ If you meant to do this, you can disable this warning - either change untilMeasu
5183
5187
  content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Provider, { ...contextValue, ...overriddenContextProps, children: content });
5184
5188
  }
5185
5189
  if (process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile") {
5186
- console.groupCollapsed(`render <${typeof elementType == "string" ? elementType : "Component"} /> (${internalID}) with props`);
5187
- try {
5188
- (0, import_log.log)("viewProps", viewProps), (0, import_log.log)("children", content), typeof window < "u" && ((0, import_log.log)("props in", propsIn, "mapped to", props, "in order", Object.keys(props)), (0, import_log.log)({
5189
- animationStyles,
5190
- classNames,
5191
- content,
5192
- defaultProps,
5193
- elementType,
5194
- events,
5195
- initialState,
5196
- isAnimated,
5197
- isMediaArray,
5198
- isStringElement,
5199
- mediaListeningKeys,
5200
- pseudos,
5201
- shouldAttach,
5202
- shouldAvoidClasses,
5203
- shouldForcePseudo,
5204
- shouldListenForMedia,
5205
- splitStyles,
5206
- splitStylesStyle,
5207
- state,
5208
- stateRef,
5209
- staticConfig,
5210
- styleProps,
5211
- tamaguiConfig,
5212
- themeState,
5213
- viewProps,
5214
- willBeAnimated
5215
- }));
5216
- } catch {
5190
+ let title = `render <${typeof elementType == "string" ? elementType : "Component"} /> (${internalID}) with props`;
5191
+ if (import_constants.isWeb) {
5192
+ console.groupCollapsed(title);
5193
+ try {
5194
+ (0, import_log.log)("viewProps", viewProps), (0, import_log.log)("children", content), typeof window < "u" && ((0, import_log.log)("props in", propsIn, "mapped to", props, "in order", Object.keys(props)), (0, import_log.log)({
5195
+ animationStyles,
5196
+ classNames,
5197
+ content,
5198
+ defaultProps,
5199
+ elementType,
5200
+ events,
5201
+ initialState,
5202
+ isAnimated,
5203
+ isMediaArray,
5204
+ isStringElement,
5205
+ mediaListeningKeys,
5206
+ pseudos,
5207
+ shouldAttach,
5208
+ shouldAvoidClasses,
5209
+ shouldForcePseudo,
5210
+ shouldListenForMedia,
5211
+ splitStyles,
5212
+ splitStylesStyle,
5213
+ state,
5214
+ stateRef,
5215
+ staticConfig,
5216
+ styleProps,
5217
+ tamaguiConfig,
5218
+ themeState,
5219
+ viewProps,
5220
+ willBeAnimated
5221
+ }));
5222
+ } catch {
5223
+ }
5224
+ console.groupEnd();
5225
+ } else {
5226
+ (0, import_log.log)(title), (0, import_log.log)("final styles:");
5227
+ for (let key in splitStylesStyle)
5228
+ (0, import_log.log)(key, splitStylesStyle[key]);
5217
5229
  }
5218
- if (console.groupEnd(), debugProp === "break")
5230
+ if (debugProp === "break")
5219
5231
  debugger;
5220
5232
  }
5221
5233
  return process.env.NODE_ENV === "development" && time && (time`rest`, globalThis.willPrint || (globalThis.willPrint = !0, setTimeout(() => {