tamagui 1.121.5 → 1.121.7

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
@@ -2151,7 +2151,7 @@ var require_config_native = __commonJS({
2151
2151
  return getFont;
2152
2152
  },
2153
2153
  getSetting: function() {
2154
- return getSetting;
2154
+ return getSetting2;
2155
2155
  },
2156
2156
  getThemes: function() {
2157
2157
  return getThemes3;
@@ -2200,7 +2200,7 @@ Haven't called createTamagui yet.
2200
2200
  with the starter kits that you can call with "yarn upgrade:tamagui" to help with this.
2201
2201
 
2202
2202
  You may want to clear your node_modules as well and run a fresh install after ugprading.
2203
- ` : "\u274C Error 001", getSetting = function(key) {
2203
+ ` : "\u274C Error 001", getSetting2 = function(key) {
2204
2204
  if (process.env.NODE_ENV === "development" && !conf) throw new Error(haventCalledErrorMessage);
2205
2205
  var _conf_settings_key;
2206
2206
  return (_conf_settings_key = conf.settings[key]) !== null && _conf_settings_key !== void 0 ? _conf_settings_key : (
@@ -8252,11 +8252,11 @@ var require_wrapStyleTags_native = __commonJS({
8252
8252
  }
8253
8253
  });
8254
8254
 
8255
- // ../../core/web/dist/cjs/hooks/useIsHydrated.native.js
8256
- var require_useIsHydrated_native = __commonJS({
8257
- "../../core/web/dist/cjs/hooks/useIsHydrated.native.js"(exports2, module2) {
8255
+ // ../../core/use-did-finish-ssr/dist/cjs/index.native.js
8256
+ var require_index_native13 = __commonJS({
8257
+ "../../core/use-did-finish-ssr/dist/cjs/index.native.js"(exports2, module2) {
8258
8258
  "use strict";
8259
- var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
8259
+ var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
8260
8260
  for (var name in all) __defProp2(target, name, {
8261
8261
  get: all[name],
8262
8262
  enumerable: !0
@@ -8284,27 +8284,40 @@ var require_useIsHydrated_native = __commonJS({
8284
8284
  }
8285
8285
  }
8286
8286
  return to;
8287
+ }, __toESM2 = function(mod, isNodeMode, target) {
8288
+ return target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
8289
+ // If the importer is in node compatibility mode or this is not an ESM
8290
+ // file that has been converted to a CommonJS file using a Babel-
8291
+ // compatible transform (i.e. "__esModule" has not been set), then set
8292
+ // "default" to the CommonJS "module.exports" for node compatibility.
8293
+ isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
8294
+ value: mod,
8295
+ enumerable: !0
8296
+ }) : target,
8297
+ mod
8298
+ );
8287
8299
  }, __toCommonJS2 = function(mod) {
8288
8300
  return __copyProps2(__defProp2({}, "__esModule", {
8289
8301
  value: !0
8290
8302
  }), mod);
8291
- }, useIsHydrated_exports = {};
8292
- __export2(useIsHydrated_exports, {
8293
- useIsHydrated: function() {
8294
- return useIsHydrated;
8303
+ }, src_exports2 = {};
8304
+ __export2(src_exports2, {
8305
+ useClientValue: function() {
8306
+ return useClientValue;
8307
+ },
8308
+ useDidFinishSSR: function() {
8309
+ return useDidFinishSSR2;
8295
8310
  }
8296
8311
  });
8297
- module2.exports = __toCommonJS2(useIsHydrated_exports);
8298
- var import_react3 = require("react"), nullSubscribe = function() {
8299
- return function() {
8300
- };
8301
- }, useIsHydrated = function() {
8302
- return (0, import_react3.useSyncExternalStore)(nullSubscribe, function() {
8303
- return !0;
8304
- }, function() {
8305
- return !1;
8306
- });
8307
- };
8312
+ module2.exports = __toCommonJS2(src_exports2);
8313
+ var React4 = __toESM2(require("react"));
8314
+ function useDidFinishSSR2(value) {
8315
+ return value ?? !0;
8316
+ }
8317
+ function useClientValue(value) {
8318
+ var done = useDidFinishSSR2();
8319
+ return done ? typeof value == "function" ? value() : value : void 0;
8320
+ }
8308
8321
  }
8309
8322
  });
8310
8323
 
@@ -8351,8 +8364,8 @@ var require_useComponentState_native = __commonJS({
8351
8364
  }
8352
8365
  });
8353
8366
  module2.exports = __toCommonJS2(useComponentState_exports);
8354
- var import_constants4 = require_index_native6(), import_react3 = require("react"), import_defaultComponentState = require_defaultComponentState_native(), import_createShallowSetState = require_createShallowSetState_native(), import_isObj = require_isObj_native(), import_log = require_log_native(), import_useIsHydrated = require_useIsHydrated_native(), useComponentState = function(props, param, staticConfig, config) {
8355
- var { animationDriver, groups } = param, _animationDriver_usePresence, isHydrated = (0, import_useIsHydrated.useIsHydrated)(), useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, stateRef = (0, import_react3.useRef)(void 0);
8367
+ var import_constants4 = require_index_native6(), import_use_did_finish_ssr = require_index_native13(), import_react3 = require("react"), import_defaultComponentState = require_defaultComponentState_native(), import_createShallowSetState = require_createShallowSetState_native(), import_isObj = require_isObj_native(), import_log = require_log_native(), useComponentState = function(props, param, staticConfig, config) {
8368
+ var { animationDriver, groups } = param, _animationDriver_usePresence, isHydrated = (0, import_use_did_finish_ssr.useDidFinishSSR)(), useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, stateRef = (0, import_react3.useRef)(void 0);
8356
8369
  stateRef.current || (stateRef.current = {});
8357
8370
  var hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSSVars = animationDriver == null ? void 0 : animationDriver.supportsCSSVars, curStateRef = stateRef.current, willBeAnimatedClient = function() {
8358
8371
  var next = !!(hasAnimationProp && !staticConfig.isHOC && useAnimations);
@@ -10049,28 +10062,11 @@ var require_createTamagui_native = __commonJS({
10049
10062
  ${JSON.stringify(variable, null, 2)}`);
10050
10063
  import_constants4.isWeb && ((0, import_registerCSSVariable.registerCSSVariable)(variable), declarations.push((0, import_registerCSSVariable.variableToCSS)(variable, key2 === "zIndex")));
10051
10064
  }
10052
- if (import_constants4.isWeb) {
10053
- var declarationsToRuleSet2 = function(decs) {
10054
- var selector = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
10055
- return `:root${selector} {${sep}${[
10056
- ...decs
10057
- ].join(`;${sep}`)}${sep}}`;
10058
- }, declarationsToRuleSet = declarationsToRuleSet2;
10059
- for (var key1 in fontsParsed) {
10060
- var fontParsed = fontsParsed[key1], [name, language] = key1.includes("_") ? key1.split("_") : [
10061
- key1
10062
- ], fontVars = (0, import_insertFont.registerFontVariables)(fontParsed);
10063
- fontDeclarations[key1] = {
10064
- name: name.slice(1),
10065
- declarations: fontVars,
10066
- language
10067
- };
10068
- }
10069
- var sep = configIn.cssStyleSeparator || "";
10070
- if (cssRuleSets.push(declarationsToRuleSet2(declarations)), fontDeclarations) for (var key22 in fontDeclarations) {
10071
- var { name: name1, declarations: declarations1, language: language1 = "default" } = fontDeclarations[key22], fontSelector = `.font_${name1}`, langSelector = `:root .t_lang-${name1}-${language1} ${fontSelector}`, selectors = language1 === "default" ? ` ${fontSelector}, ${langSelector}` : langSelector, specificRuleSet = declarationsToRuleSet2(declarations1, selectors);
10072
- cssRuleSets.push(specificRuleSet);
10073
- }
10065
+ if (0) {
10066
+ var declarationsToRuleSet;
10067
+ for (var key1 in fontsParsed) var fontParsed, name, language, fontVars;
10068
+ var sep;
10069
+ if (fontDeclarations) for (var key22 in fontDeclarations) var name1, declarations1, language1, fontSelector, langSelector, selectors, specificRuleSet;
10074
10070
  }
10075
10071
  var themesIn = configIn.themes, dedupedThemes = foundThemes ?? getThemesDeduped(themesIn), themes = (0, import_proxyThemeToParents.proxyThemesToParents)(dedupedThemes);
10076
10072
  return {
@@ -10107,22 +10103,12 @@ ${JSON.stringify(variable, null, 2)}`);
10107
10103
  }
10108
10104
  };
10109
10105
  }(), shorthands = configIn.shorthands || {}, lastCSSInsertedRulesIndex = -1, getCSS = function() {
10110
- var opts = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, { separator = `
10111
- `, sinceLastCall, exclude } = opts;
10112
- if (sinceLastCall && lastCSSInsertedRulesIndex >= 0) {
10113
- var rules = (0, import_insertStyleRule.getAllRules)();
10114
- return lastCSSInsertedRulesIndex = rules.length, rules.slice(lastCSSInsertedRulesIndex).join(separator);
10115
- }
10116
- lastCSSInsertedRulesIndex = 0;
10117
- var runtimeStyles = (0, import_insertStyleRule.getAllRules)().join(separator);
10118
- if (exclude === "design-system") return runtimeStyles;
10119
- var designSystem = `._ovs-contain {overscroll-behavior:contain;}
10120
- .is_Text .is_Text {display:inline-flex;}
10121
- ._dsp_contents {display:contents;}
10122
- ${themeConfig.cssRuleSets.join(separator)}`;
10123
- return `${designSystem}
10124
- ${exclude ? "" : themeConfig.getThemeRulesSets().join(separator)}
10125
- ${runtimeStyles}`;
10106
+ var opts = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
10107
+ if (0) {
10108
+ var separator, sinceLastCall, exclude;
10109
+ if (sinceLastCall && lastCSSInsertedRulesIndex >= 0) var rules;
10110
+ var runtimeStyles, designSystem;
10111
+ } else return "";
10126
10112
  }, getNewCSS = function(opts) {
10127
10113
  return getCSS({
10128
10114
  ...opts,
@@ -10457,7 +10443,7 @@ var require_styled_native = __commonJS({
10457
10443
  var pdp = parentStaticConfig.defaultProps;
10458
10444
  for (var key2 in pdp) {
10459
10445
  var val = pdp[key2];
10460
- parentStaticConfig.defaultVariants && key2 in parentStaticConfig.defaultVariants && (!defaultVariants || !(key2 in defaultVariants)) && (parentDefaultVariants || (parentDefaultVariants = {}), parentDefaultVariants[key2] = val), key2 in defaultProps || (parentDefaultProps || (parentDefaultProps = {}), parentDefaultProps[key2] = pdp[key2]);
10446
+ parentStaticConfig.defaultVariants && key2 in parentStaticConfig.defaultVariants && (!defaultVariants || !(key2 in defaultVariants)) && (parentDefaultVariants || (parentDefaultVariants = {}), parentDefaultVariants[key2] = val), !(key2 in defaultProps) && (!defaultVariants || !(key2 in defaultVariants)) && (parentDefaultProps || (parentDefaultProps = {}), parentDefaultProps[key2] = pdp[key2]);
10461
10447
  }
10462
10448
  parentStaticConfig.variants && (variants = (0, import_mergeVariants.mergeVariants)(parentStaticConfig.variants, variants));
10463
10449
  }
@@ -10959,76 +10945,6 @@ var require_useConfiguration_native = __commonJS({
10959
10945
  }
10960
10946
  });
10961
10947
 
10962
- // ../../core/use-did-finish-ssr/dist/cjs/index.native.js
10963
- var require_index_native13 = __commonJS({
10964
- "../../core/use-did-finish-ssr/dist/cjs/index.native.js"(exports2, module2) {
10965
- "use strict";
10966
- var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
10967
- for (var name in all) __defProp2(target, name, {
10968
- get: all[name],
10969
- enumerable: !0
10970
- });
10971
- }, __copyProps2 = function(to, from, except, desc) {
10972
- var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
10973
- if (from && typeof from == "object" || typeof from == "function") try {
10974
- for (var _loop = function() {
10975
- var key = _step.value;
10976
- !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
10977
- get: function() {
10978
- return from[key];
10979
- },
10980
- enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
10981
- });
10982
- }, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
10983
- } catch (err) {
10984
- _didIteratorError = !0, _iteratorError = err;
10985
- } finally {
10986
- try {
10987
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
10988
- } finally {
10989
- if (_didIteratorError)
10990
- throw _iteratorError;
10991
- }
10992
- }
10993
- return to;
10994
- }, __toESM2 = function(mod, isNodeMode, target) {
10995
- return target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
10996
- // If the importer is in node compatibility mode or this is not an ESM
10997
- // file that has been converted to a CommonJS file using a Babel-
10998
- // compatible transform (i.e. "__esModule" has not been set), then set
10999
- // "default" to the CommonJS "module.exports" for node compatibility.
11000
- isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
11001
- value: mod,
11002
- enumerable: !0
11003
- }) : target,
11004
- mod
11005
- );
11006
- }, __toCommonJS2 = function(mod) {
11007
- return __copyProps2(__defProp2({}, "__esModule", {
11008
- value: !0
11009
- }), mod);
11010
- }, src_exports2 = {};
11011
- __export2(src_exports2, {
11012
- useClientValue: function() {
11013
- return useClientValue;
11014
- },
11015
- useDidFinishSSR: function() {
11016
- return useDidFinishSSR2;
11017
- }
11018
- });
11019
- module2.exports = __toCommonJS2(src_exports2);
11020
- var React4 = __toESM2(require("react"));
11021
- function useDidFinishSSR2(value) {
11022
- return value ?? !0;
11023
- var cur, setCur;
11024
- }
11025
- function useClientValue(value) {
11026
- var done = useDidFinishSSR2();
11027
- return done ? typeof value == "function" ? value() : value : void 0;
11028
- }
11029
- }
11030
- });
11031
-
11032
10948
  // ../../core/web/dist/cjs/hooks/useIsTouchDevice.native.js
11033
10949
  var require_useIsTouchDevice_native = __commonJS({
11034
10950
  "../../core/web/dist/cjs/hooks/useIsTouchDevice.native.js"(exports2, module2) {
@@ -11754,6 +11670,9 @@ var require_index_native14 = __commonJS({
11754
11670
  getMedia: function() {
11755
11671
  return import_useMedia.getMedia;
11756
11672
  },
11673
+ getSetting: function() {
11674
+ return import_config.getSetting;
11675
+ },
11757
11676
  getThemes: function() {
11758
11677
  return import_config.getThemes;
11759
11678
  },
@@ -15020,6 +14939,9 @@ var require_Headings_native = __commonJS({
15020
14939
  size: "$10"
15021
14940
  }
15022
14941
  }
14942
+ },
14943
+ defaultVariants: {
14944
+ unstyled: process.env.TAMAGUI_HEADLESS === "1"
15023
14945
  }
15024
14946
  }), H2 = (0, import_web.styled)(Heading, {
15025
14947
  name: "H2",
@@ -15030,6 +14952,9 @@ var require_Headings_native = __commonJS({
15030
14952
  size: "$9"
15031
14953
  }
15032
14954
  }
14955
+ },
14956
+ defaultVariants: {
14957
+ unstyled: process.env.TAMAGUI_HEADLESS === "1"
15033
14958
  }
15034
14959
  }), H3 = (0, import_web.styled)(Heading, {
15035
14960
  name: "H3",
@@ -15040,6 +14965,9 @@ var require_Headings_native = __commonJS({
15040
14965
  size: "$8"
15041
14966
  }
15042
14967
  }
14968
+ },
14969
+ defaultVariants: {
14970
+ unstyled: process.env.TAMAGUI_HEADLESS === "1"
15043
14971
  }
15044
14972
  }), H4 = (0, import_web.styled)(Heading, {
15045
14973
  name: "H4",
@@ -15050,6 +14978,9 @@ var require_Headings_native = __commonJS({
15050
14978
  size: "$7"
15051
14979
  }
15052
14980
  }
14981
+ },
14982
+ defaultVariants: {
14983
+ unstyled: process.env.TAMAGUI_HEADLESS === "1"
15053
14984
  }
15054
14985
  }), H5 = (0, import_web.styled)(Heading, {
15055
14986
  name: "H5",
@@ -15060,6 +14991,9 @@ var require_Headings_native = __commonJS({
15060
14991
  size: "$6"
15061
14992
  }
15062
14993
  }
14994
+ },
14995
+ defaultVariants: {
14996
+ unstyled: process.env.TAMAGUI_HEADLESS === "1"
15063
14997
  }
15064
14998
  }), H6 = (0, import_web.styled)(Heading, {
15065
14999
  name: "H6",
@@ -15070,6 +15004,9 @@ var require_Headings_native = __commonJS({
15070
15004
  size: "$5"
15071
15005
  }
15072
15006
  }
15007
+ },
15008
+ defaultVariants: {
15009
+ unstyled: process.env.TAMAGUI_HEADLESS === "1"
15073
15010
  }
15074
15011
  });
15075
15012
  }
@@ -17982,9 +17919,7 @@ var require_SheetImplementationCustom_native = __commonJS({
17982
17919
  }, [
17983
17920
  open
17984
17921
  ]);
17985
- var forcedContentHeight = hasFit ? void 0 : snapPointsMode === "percent" ? `${maxSnapPoint}${import_constants4.isWeb ? "dvh" : "%"}` : maxSnapPoint;
17986
- console.warn("animatedStyle", animatedStyle);
17987
- var contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_contexts.ParentSheetContext.Provider, {
17922
+ var forcedContentHeight = hasFit ? void 0 : snapPointsMode === "percent" ? `${maxSnapPoint}${import_constants4.isWeb ? "dvh" : "%"}` : maxSnapPoint, contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_contexts.ParentSheetContext.Provider, {
17988
17923
  value: nextParentContext,
17989
17924
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_SheetContext.SheetProvider, {
17990
17925
  ...providerProps,
@@ -20887,7 +20822,7 @@ var require_Button_native = __commonJS({
20887
20822
  size: size4
20888
20823
  } : void 0), inner = (0, import_web.spacedChildren)({
20889
20824
  // a bit arbitrary but scaling to font size is necessary so long as button does
20890
- space: spaceSize,
20825
+ space: spaceSize === !1 ? 0 : spaceSize == !0 ? "$true" : spaceSize,
20891
20826
  spaceFlex,
20892
20827
  ensureKeys: !0,
20893
20828
  separator,
@@ -29787,7 +29722,7 @@ var require_createSwitch_native = __commonJS({
29787
29722
  unstyled,
29788
29723
  ...unstyled === !1 && {
29789
29724
  size: size4,
29790
- ...!disableActiveTheme && {
29725
+ ...!disableActiveTheme && !unstyled && {
29791
29726
  theme: checked ? "active" : null
29792
29727
  }
29793
29728
  },
@@ -29858,7 +29793,7 @@ var require_createSwitch_native = __commonJS({
29858
29793
  type: "button"
29859
29794
  },
29860
29795
  ...switchProps,
29861
- ...!disableActiveTheme && {
29796
+ ...!disableActiveTheme && !props.unstyled && {
29862
29797
  theme: checked ? "active" : null,
29863
29798
  themeShallow: !0
29864
29799
  },