@tamagui/core 1.88.15 → 1.88.17

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")
@@ -3978,7 +3982,8 @@ var require_getSplitStyles_native = __commonJS({
3978
3982
  module2.exports = __toCommonJS2(getSplitStyles_exports);
3979
3983
  var import_constants = require_index_native3(), import_helpers = require_index_native4(), import_react3 = require("react"), import_config = require_config_native(), import_accessibilityDirectMap = require_accessibilityDirectMap_native(), import_constants2 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_useMedia = require_useMedia_native(), import_createMediaStyle = require_createMediaStyle_native(), import_expandStyles = require_expandStyles_native(), import_getGroupPropParts = require_getGroupPropParts_native(), import_getStylesAtomic = require_getStylesAtomic_native(), import_insertStyleRule = require_insertStyleRule_native(), import_log = require_log_native(), import_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_propMapper = require_propMapper_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_isObj = require_isObj_native(), IS_STATIC = process.env.IS_STATIC === "is_static", conf, PROP_SPLIT = "-";
3980
3984
  function isValidStyleKey(key, staticConfig) {
3981
- return (staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles))[key] || staticConfig.acceptTokens && staticConfig.acceptTokens[key];
3985
+ var _a;
3986
+ return (staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles))[key] || ((_a = staticConfig.acceptTokens) == null ? void 0 : _a[key]);
3982
3987
  }
3983
3988
  var getSplitStyles = (props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, context, elementType, debug) => {
3984
3989
  var _a, _b, _c, _e, _f, _g;
@@ -5183,39 +5188,47 @@ If you meant to do this, you can disable this warning - either change untilMeasu
5183
5188
  content = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Provider, { ...contextValue, ...overriddenContextProps, children: content });
5184
5189
  }
5185
5190
  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 {
5191
+ let title = `render <${typeof elementType == "string" ? elementType : "Component"} /> (${internalID}) with props`;
5192
+ if (import_constants.isWeb) {
5193
+ console.groupCollapsed(title);
5194
+ try {
5195
+ (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)({
5196
+ animationStyles,
5197
+ classNames,
5198
+ content,
5199
+ defaultProps,
5200
+ elementType,
5201
+ events,
5202
+ initialState,
5203
+ isAnimated,
5204
+ isMediaArray,
5205
+ isStringElement,
5206
+ mediaListeningKeys,
5207
+ pseudos,
5208
+ shouldAttach,
5209
+ shouldAvoidClasses,
5210
+ shouldForcePseudo,
5211
+ shouldListenForMedia,
5212
+ splitStyles,
5213
+ splitStylesStyle,
5214
+ state,
5215
+ stateRef,
5216
+ staticConfig,
5217
+ styleProps,
5218
+ tamaguiConfig,
5219
+ themeState,
5220
+ viewProps,
5221
+ willBeAnimated
5222
+ }));
5223
+ } catch {
5224
+ }
5225
+ console.groupEnd();
5226
+ } else {
5227
+ (0, import_log.log)(title), (0, import_log.log)("final styles:");
5228
+ for (let key in splitStylesStyle)
5229
+ (0, import_log.log)(key, splitStylesStyle[key]);
5217
5230
  }
5218
- if (console.groupEnd(), debugProp === "break")
5231
+ if (debugProp === "break")
5219
5232
  debugger;
5220
5233
  }
5221
5234
  return process.env.NODE_ENV === "development" && time && (time`rest`, globalThis.willPrint || (globalThis.willPrint = !0, setTimeout(() => {