@tamagui/core 1.143.0 → 2.0.0-1

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.cjs CHANGED
@@ -278,7 +278,8 @@ var ComponentContext = createStyledContext({
278
278
  inText: false,
279
279
  language: null,
280
280
  animationDriver: null,
281
- setParentFocusState: null
281
+ setParentFocusState: null,
282
+ insets: null
282
283
  }), useConfiguration = function() {
283
284
  return React.useContext(ComponentContext);
284
285
  };
@@ -987,7 +988,7 @@ function getTouchFromResponderEvent(event) {
987
988
  var _event$nativeEvent = event.nativeEvent, changedTouches = _event$nativeEvent.changedTouches, touches = _event$nativeEvent.touches;
988
989
  return touches != null && touches.length > 0 ? touches[0] : changedTouches != null && changedTouches.length > 0 ? changedTouches[0] : event.nativeEvent;
989
990
  }
990
- function usePressEvents(_, config) {
991
+ function usePressEvents(_2, config) {
991
992
  var pressResponderRef = React.useRef(null);
992
993
  pressResponderRef.current == null && (pressResponderRef.current = new PressResponder(config));
993
994
  var pressResponder = pressResponderRef.current;
@@ -5982,7 +5983,7 @@ const Image$1 = React__namespace.forwardRef((props, ref) => {
5982
5983
  }, [uri, requestRef, updateState, onError, onLoad, onLoadEnd, onLoadStart]), /* @__PURE__ */ jsxRuntimeExports.jsxs(
5983
5984
  View$3,
5984
5985
  __spreadProps(__spreadValues({}, rest), {
5985
- accessibilityLabel,
5986
+ "aria-label": accessibilityLabel,
5986
5987
  onLayout: handleLayout,
5987
5988
  pointerEvents,
5988
5989
  ref,
@@ -7159,7 +7160,7 @@ const Image = React__namespace.forwardRef((props, ref) => {
7159
7160
  }
7160
7161
  return abortPendingRequest;
7161
7162
  }, [uri, requestRef, updateState, onError, onLoad, onLoadEnd, onLoadStart]), /* @__PURE__ */ jsxRuntimeExports.jsxs(View$2, __spreadProps(__spreadValues({}, rest), {
7162
- accessibilityLabel,
7163
+ "aria-label": accessibilityLabel,
7163
7164
  onLayout: handleLayout,
7164
7165
  pointerEvents,
7165
7166
  ref,
@@ -8368,7 +8369,6 @@ var THEME_NAME_SEPARATOR = "_", THEME_CLASSNAME_PREFIX = "t_", FONT_DATA_ATTRIBU
8368
8369
  flexDirection: "column",
8369
8370
  flexBasis: "auto",
8370
8371
  boxSizing: "border-box",
8371
- position: process.env.TAMAGUI_POSITION_STATIC === "1" ? "static" : "relative",
8372
8372
  minHeight: 0,
8373
8373
  minWidth: 0,
8374
8374
  flexShrink: 0
@@ -8394,8 +8394,8 @@ var conf$1, getConfigFromGlobalOrLocal = function() {
8394
8394
  }, getConfigMaybe = function() {
8395
8395
  return getConfigFromGlobalOrLocal();
8396
8396
  }, tokensMerged;
8397
- function setTokens(_) {
8398
- tokensMerged = _;
8397
+ function setTokens(_2) {
8398
+ tokensMerged = _2;
8399
8399
  }
8400
8400
  var getTokens = function() {
8401
8401
  var {
@@ -8520,6 +8520,79 @@ function resolvePlatformNames(nativeProp) {
8520
8520
  ) : Array.isArray(nativeProp) ? nativeProp : [nativeProp], set = new Set(platforms2);
8521
8521
  return set.has("mobile") && (set.add("android"), set.add("ios"), set.delete("mobile")), set;
8522
8522
  }
8523
+ var webOnlyStylePropsView = {
8524
+ transition: true,
8525
+ textWrap: true,
8526
+ backdropFilter: true,
8527
+ WebkitBackdropFilter: true,
8528
+ // These background-* props are web-only CSS, but NOT backgroundColor
8529
+ background: true,
8530
+ backgroundAttachment: true,
8531
+ backgroundBlendMode: true,
8532
+ backgroundClip: true,
8533
+ backgroundImage: true,
8534
+ backgroundOrigin: true,
8535
+ backgroundPosition: true,
8536
+ backgroundRepeat: true,
8537
+ backgroundSize: true,
8538
+ borderBottomStyle: true,
8539
+ borderImage: true,
8540
+ borderLeftStyle: true,
8541
+ borderRightStyle: true,
8542
+ borderTopStyle: true,
8543
+ boxSizing: true,
8544
+ caretColor: true,
8545
+ clipPath: true,
8546
+ contain: true,
8547
+ containerType: true,
8548
+ content: true,
8549
+ cursor: true,
8550
+ float: true,
8551
+ mask: true,
8552
+ maskBorder: true,
8553
+ maskBorderMode: true,
8554
+ maskBorderOutset: true,
8555
+ maskBorderRepeat: true,
8556
+ maskBorderSlice: true,
8557
+ maskBorderSource: true,
8558
+ maskBorderWidth: true,
8559
+ maskClip: true,
8560
+ maskComposite: true,
8561
+ maskImage: true,
8562
+ maskMode: true,
8563
+ maskOrigin: true,
8564
+ maskPosition: true,
8565
+ maskRepeat: true,
8566
+ maskSize: true,
8567
+ maskType: true,
8568
+ mixBlendMode: true,
8569
+ objectFit: true,
8570
+ objectPosition: true,
8571
+ outlineOffset: true,
8572
+ outlineStyle: true,
8573
+ outlineWidth: true,
8574
+ outlineColor: true,
8575
+ overflowBlock: true,
8576
+ overflowInline: true,
8577
+ overflowX: true,
8578
+ overflowY: true,
8579
+ // NOTE: pointerEvents is NOT web-only - it's a core React Native View prop (not a style)
8580
+ pointerEvents: true,
8581
+ scrollbarWidth: true,
8582
+ textEmphasis: true,
8583
+ touchAction: true,
8584
+ transformStyle: true,
8585
+ userSelect: true,
8586
+ willChange: true
8587
+ }, webOnlyStylePropsText = {
8588
+ whiteSpace: true,
8589
+ wordWrap: true,
8590
+ textOverflow: true,
8591
+ textDecorationDistance: true,
8592
+ cursor: true,
8593
+ WebkitLineClamp: true,
8594
+ WebkitBoxOrient: true
8595
+ };
8523
8596
  var textColors = {
8524
8597
  color: true,
8525
8598
  textDecorationColor: true,
@@ -8623,7 +8696,7 @@ var textColors = {
8623
8696
  rotateY: true,
8624
8697
  rotateX: true,
8625
8698
  rotateZ: true
8626
- }, stylePropsView = __spreadValues(__spreadValues(__spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({
8699
+ }, stylePropsView = __spreadValues(__spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({
8627
8700
  backfaceVisibility: true,
8628
8701
  borderBottomEndRadius: true,
8629
8702
  borderBottomStartRadius: true,
@@ -8709,7 +8782,9 @@ var textColors = {
8709
8782
  direction: true,
8710
8783
  shadowOffset: true,
8711
8784
  shadowRadius: true
8712
- }, tokenCategories.color), tokenCategories.radius), tokenCategories.size), tokenCategories.radius), stylePropsTransform), stylePropsUnitless), {
8785
+ }, tokenCategories.color), tokenCategories.radius), tokenCategories.size), tokenCategories.radius), stylePropsTransform), stylePropsUnitless), isAndroid ? {
8786
+ elevationAndroid: true
8787
+ } : {}), {
8713
8788
  boxShadow: true,
8714
8789
  filter: true
8715
8790
  }), !process.env.REACT_NATIVE_PRE_77 && {
@@ -8719,9 +8794,7 @@ var textColors = {
8719
8794
  outlineSpread: true,
8720
8795
  outlineStyle: true,
8721
8796
  outlineWidth: true
8722
- }), isAndroid ? {
8723
- elevationAndroid: true
8724
- } : {}), stylePropsFont = {
8797
+ }), stylePropsFont = {
8725
8798
  fontFamily: true,
8726
8799
  fontSize: true,
8727
8800
  fontStyle: true,
@@ -8738,7 +8811,6 @@ var textColors = {
8738
8811
  textShadowOffset: true,
8739
8812
  textShadowRadius: true,
8740
8813
  userSelect: true,
8741
- selectable: true,
8742
8814
  verticalAlign: true
8743
8815
  }), stylePropsText = __spreadValues(__spreadValues({}, stylePropsView), stylePropsTextOnly), stylePropsAll = stylePropsText, validPseudoKeys = {
8744
8816
  enterStyle: true,
@@ -8756,14 +8828,14 @@ function _type_of$6(obj) {
8756
8828
  var Decorated = Symbol(), withStaticProperties = function(component, staticProps) {
8757
8829
  var next = (function() {
8758
8830
  if (component[Decorated]) {
8759
- var _ = /* @__PURE__ */ React.forwardRef(function(props, ref) {
8831
+ var _2 = /* @__PURE__ */ React.forwardRef(function(props, ref) {
8760
8832
  return /* @__PURE__ */ React.createElement(component, __spreadProps(__spreadValues({}, props), {
8761
8833
  ref
8762
8834
  }));
8763
8835
  });
8764
8836
  for (var key in component) {
8765
8837
  var v = component[key];
8766
- _[key] = v && (typeof v > "u" ? "undefined" : _type_of$6(v)) === "object" ? __spreadValues({}, v) : v;
8838
+ _2[key] = v && (typeof v > "u" ? "undefined" : _type_of$6(v)) === "object" ? __spreadValues({}, v) : v;
8767
8839
  }
8768
8840
  }
8769
8841
  return component;
@@ -8871,8 +8943,7 @@ var ThemeStateContext = React.createContext(""), allListeners = /* @__PURE__ */
8871
8943
  if (disable) return states.get(parentId) || {
8872
8944
  id: "",
8873
8945
  name: "light",
8874
- theme: getConfig().themes.light,
8875
- inverses: 0
8946
+ theme: getConfig().themes.light
8876
8947
  };
8877
8948
  var id2 = React.useId(), subscribe2 = React.useCallback(function(cb) {
8878
8949
  var _listenersByParent, _parentId;
@@ -8918,14 +8989,14 @@ var ThemeStateContext = React.createContext(""), allListeners = /* @__PURE__ */
8918
8989
  }
8919
8990
  return [false, next];
8920
8991
  }
8921
- var scheme = getScheme(name), _parentState_inverses, parentInverses = (_parentState_inverses = parentState == null ? void 0 : parentState.inverses) !== null && _parentState_inverses !== void 0 ? _parentState_inverses : 0, isInverse = parentState && scheme !== parentState.scheme, inverses = parentInverses + (isInverse ? 1 : 0), nextState = {
8992
+ var scheme = getScheme(name), isInverse = parentState && scheme !== parentState.scheme, nextState = {
8922
8993
  id: id2,
8923
8994
  name,
8924
8995
  theme: themes[name],
8925
8996
  scheme,
8926
8997
  parentId,
8927
8998
  parentName: parentState == null ? void 0 : parentState.name,
8928
- inverses,
8999
+ // inverses,
8929
9000
  isInverse,
8930
9001
  isNew: true
8931
9002
  };
@@ -8971,7 +9042,6 @@ function getNewThemeName() {
8971
9042
  name,
8972
9043
  reset,
8973
9044
  componentName,
8974
- inverse,
8975
9045
  debug
8976
9046
  } = arguments.length > 1 ? arguments[1] : void 0, forceUpdate = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
8977
9047
  if (name && reset) throw new Error("❌004");
@@ -9057,11 +9127,6 @@ function getNewThemeName() {
9057
9127
  }
9058
9128
  if (found) break;
9059
9129
  }
9060
- if (inverse) {
9061
- found || (found = parentName);
9062
- var scheme1 = found.split("_")[0];
9063
- found = found.replace(new RegExp(`^${scheme1}`), scheme1 === "light" ? "dark" : "light");
9064
- }
9065
9130
  return !forceUpdate && found === parentName && // if its a scheme only sub-theme, we always consider it "new" because it likely inverses
9066
9131
  // and we want to avoid reparenting
9067
9132
  !validSchemes[found] ? null : found;
@@ -9070,13 +9135,12 @@ var getPropsKey = function(param) {
9070
9135
  var {
9071
9136
  name,
9072
9137
  reset,
9073
- inverse,
9074
9138
  forceClassName,
9075
9139
  componentName
9076
9140
  } = param;
9077
- return `${name || ""}${inverse || ""}${reset || ""}${forceClassName || ""}${componentName || ""}`;
9141
+ return `${name || ""}${reset || ""}${forceClassName || ""}${componentName || ""}`;
9078
9142
  }, hasThemeUpdatingProps = function(props) {
9079
- return "inverse" in props || "name" in props || "reset" in props || "forceClassName" in props;
9143
+ return "name" in props || "reset" in props || "forceClassName" in props;
9080
9144
  };
9081
9145
  function doesRootSchemeMatchSystem() {
9082
9146
  var _getRootThemeState;
@@ -9102,9 +9166,8 @@ function getThemeProxied(_props, _state, _keys) {
9102
9166
  if (curState) {
9103
9167
  var outVal = getVariable(value), {
9104
9168
  name,
9105
- scheme,
9106
- inverses
9107
- } = curState, shouldOptimize = scheme && platform !== "web" && isIos && !curProps.deopt && getSetting("fastSchemeChange") && inverses === 0 && doesRootSchemeMatchSystem();
9169
+ scheme
9170
+ } = curState, shouldOptimize = scheme && platform !== "web" && isIos && !curProps.deopt && getSetting("fastSchemeChange") && doesRootSchemeMatchSystem();
9108
9171
  if (shouldOptimize) {
9109
9172
  var _config_themes_name, _config_themes_oppositeName, oppositeScheme = scheme === "dark" ? "light" : "dark", oppositeName = name.replace(scheme, oppositeScheme), color = getVariable((_config_themes_name = config.themes[name]) === null || _config_themes_name === void 0 ? void 0 : _config_themes_name[key]), oppositeColor = getVariable((_config_themes_oppositeName = config.themes[oppositeName]) === null || _config_themes_oppositeName === void 0 ? void 0 : _config_themes_oppositeName[key]), dynamicVal = getDynamicVal({
9110
9173
  scheme,
@@ -9121,8 +9184,8 @@ function getThemeProxied(_props, _state, _keys) {
9121
9184
  }));
9122
9185
  return cache$3.set(_state.theme, proxied1), proxied1;
9123
9186
  }
9124
- var useTheme = function() {
9125
- var props = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, [theme] = useThemeWithState(props), res = theme;
9187
+ var EMPTY = {}, useTheme = function() {
9188
+ var [theme] = useThemeWithState(EMPTY), res = theme;
9126
9189
  return res;
9127
9190
  }, useThemeWithState = function(props) {
9128
9191
  var isRoot = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false, keys = React.useRef(null), themeState = useThemeState(props, isRoot, keys);
@@ -9187,8 +9250,8 @@ function matchMediaFallback(query2) {
9187
9250
  matches: false
9188
9251
  };
9189
9252
  }
9190
- function setupMatchMedia(_) {
9191
- matchMediaImpl = _, globalThis.matchMedia = _;
9253
+ function setupMatchMedia(_2) {
9254
+ matchMediaImpl = _2, globalThis.matchMedia = _2;
9192
9255
  }
9193
9256
  exports.mediaState = // development only safeguard
9194
9257
  {};
@@ -9200,8 +9263,7 @@ var mediaQueryConfig = {}, getMedia = function() {
9200
9263
  var match = key.match(mediaKeyRegex);
9201
9264
  return match ? match[1] : false;
9202
9265
  }, initState, mediaKeysOrdered, getMediaKeyImportance = function(key) {
9203
- var conf2 = getConfig();
9204
- return conf2.settings.mediaPropOrder ? defaultMediaImportance : mediaKeysOrdered.indexOf(key) + 100;
9266
+ return mediaKeysOrdered.indexOf(key) + 100;
9205
9267
  }, dispose = /* @__PURE__ */ new Set(), mediaVersion = 0, configureMedia = function(config) {
9206
9268
  var {
9207
9269
  media
@@ -9293,7 +9355,7 @@ function useMedia(componentContext, debug) {
9293
9355
  return lastState;
9294
9356
  }, getServerSnapshot);
9295
9357
  return new Proxy(state, {
9296
- get(_, key) {
9358
+ get(_2, key) {
9297
9359
  return !disableMediaTouch && typeof key == "string" && keys.add(key), Reflect.get(state, key);
9298
9360
  }
9299
9361
  });
@@ -9317,7 +9379,7 @@ function getMediaState(mediaGroups, layout) {
9317
9379
  return res;
9318
9380
  }
9319
9381
  var getMediaImportanceIfMoreImportant = function(mediaKey, key, styleState, isSizeMedia) {
9320
- var importance = isSizeMedia && !getSetting("mediaPropOrder") ? getMediaKeyImportance(mediaKey) : defaultMediaImportance, usedKeys = styleState.usedKeys;
9382
+ var importance = isSizeMedia ? getMediaKeyImportance(mediaKey) : defaultMediaImportance, usedKeys = styleState.usedKeys;
9321
9383
  return !usedKeys[key] || importance > usedKeys[key] ? importance : null;
9322
9384
  };
9323
9385
  function camelToHyphen(str) {
@@ -9343,7 +9405,7 @@ function mediaKeyMatch(key, dimensions2) {
9343
9405
  return result;
9344
9406
  }
9345
9407
  function getGroupPropParts(groupProp) {
9346
- var mediaQueries = getMedia(), [_, name, part3, part4] = groupProp.split("-"), pseudo, media = part3 in mediaQueries ? part3 : void 0;
9408
+ var mediaQueries = getMedia(), [_2, name, part3, part4] = groupProp.split("-"), pseudo, media = part3 in mediaQueries ? part3 : void 0;
9347
9409
  return media ? pseudo = part4 : pseudo = part3, {
9348
9410
  name,
9349
9411
  pseudo,
@@ -9354,15 +9416,15 @@ var MEDIA_SEP = "_", prefixes = null, selectors = null, groupPseudoToPseudoCSSMa
9354
9416
  press: "active",
9355
9417
  focusVisible: "focus-visible",
9356
9418
  focusWithin: "focus-within"
9357
- }, specificities = new Array(5).fill(0).map(function(_, i) {
9419
+ }, specificities = new Array(5).fill(0).map(function(_2, i) {
9358
9420
  return new Array(i).fill(":root").join("");
9359
9421
  });
9360
9422
  function getThemeOrGroupSelector(name, styleInner, isGroup, groupParts) {
9361
- var isTheme = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false, precedenceImportancePrefix = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : "", selectorStart = styleInner.lastIndexOf(":root") + 5, selectorEnd = styleInner.lastIndexOf("{"), selector = styleInner.slice(selectorStart, selectorEnd), precedenceSpace = getSetting("themeClassNameOnRoot") && isTheme ? "" : " ", pseudoSelectorName = groupParts.pseudo ? groupPseudoToPseudoCSSMap[groupParts.pseudo] || groupParts.pseudo : void 0, pseudoSelector = pseudoSelectorName ? `:${pseudoSelectorName}` : "", presedencePrefix = `:root${precedenceImportancePrefix}${precedenceSpace}`, mediaSelector = `.t_${isGroup ? "group_" : ""}${name}${pseudoSelector}`;
9423
+ var isTheme = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false, precedenceImportancePrefix = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : "", selectorStart = styleInner.lastIndexOf(":root") + 5, selectorEnd = styleInner.lastIndexOf("{"), selector = styleInner.slice(selectorStart, selectorEnd), precedenceSpace = getSetting("addThemeClassName") !== false && isTheme ? "" : " ", pseudoSelectorName = groupParts.pseudo ? groupPseudoToPseudoCSSMap[groupParts.pseudo] || groupParts.pseudo : void 0, pseudoSelector = pseudoSelectorName ? `:${pseudoSelectorName}` : "", presedencePrefix = `:root${precedenceImportancePrefix}${precedenceSpace}`, mediaSelector = `.t_${isGroup ? "group_" : ""}${name}${pseudoSelector}`;
9362
9424
  return [selector, `${presedencePrefix}${mediaSelector} ${selector.replaceAll(":root", "")}`];
9363
9425
  }
9364
9426
  var createMediaStyle = function(styleObject, mediaKeyIn, mediaQueries, type, negate, priority) {
9365
- var [propertyIn, , identifier, pseudoIn, rules] = styleObject, property = propertyIn, enableMediaPropOrder = getSetting("mediaPropOrder"), isTheme = type === "theme", isPlatform = type === "platform", isGroup = type === "group", isNonWindowMedia = isTheme || isPlatform || isGroup, negKey = negate ? "0" : "", ogPrefix = identifier.slice(0, identifier.indexOf("-") + 1), id2 = `${ogPrefix}${MEDIA_SEP}${mediaKeyIn.replace("-", "")}${negKey}${MEDIA_SEP}`, styleRule = "", groupPriority = "", groupMediaKey, containerName, nextIdentifier = identifier.replace(ogPrefix, id2), styleInner = rules.map(function(rule) {
9427
+ var [property, , identifier, pseudoIn, rules] = styleObject, isTheme = type === "theme", isPlatform = type === "platform", isGroup = type === "group", isNonWindowMedia = isTheme || isPlatform || isGroup, negKey = negate ? "0" : "", ogPrefix = identifier.slice(0, identifier.indexOf("-") + 1), id2 = `${ogPrefix}${MEDIA_SEP}${mediaKeyIn.replace("-", "")}${negKey}${MEDIA_SEP}`, styleRule = "", groupPriority = "", groupMediaKey, containerName, nextIdentifier = identifier.replace(ogPrefix, id2), styleInner = rules.map(function(rule) {
9366
9428
  return rule.replace(identifier, nextIdentifier);
9367
9429
  }).join(";"), isHover = false;
9368
9430
  if (isNonWindowMedia) {
@@ -9383,17 +9445,11 @@ var createMediaStyle = function(styleObject, mediaKeyIn, mediaQueries, type, neg
9383
9445
  var mediaKeys2 = Object.keys(mediaQueries);
9384
9446
  selectors = Object.fromEntries(mediaKeys2.map(function(key) {
9385
9447
  return [key, mediaObjectToString(mediaQueries[key])];
9386
- })), enableMediaPropOrder || (prefixes = Object.fromEntries(mediaKeys2.map(function(k, index2) {
9448
+ })), prefixes = Object.fromEntries(mediaKeys2.map(function(k, index2) {
9387
9449
  return [k, new Array(index2 + 1).fill(":root").join("")];
9388
- })));
9450
+ }));
9389
9451
  }
9390
- var mediaKey = groupMediaKey || mediaKeyIn, mediaSelector = selectors[mediaKey], screenStr = negate ? "not all and " : "", mediaQuery = `${screenStr}${mediaSelector}`, precedenceImportancePrefix = groupMediaKey ? groupPriority : enableMediaPropOrder && priority ? (
9391
- // this new array should be cached
9392
- specificities[priority]
9393
- ) : (
9394
- // @ts-ignore
9395
- prefixes[mediaKey]
9396
- ), prefix = groupMediaKey ? `@container ${containerName}` : "@media";
9452
+ var mediaKey = groupMediaKey || mediaKeyIn, mediaSelector = selectors[mediaKey], screenStr = negate ? "not all and " : "", mediaQuery = `${screenStr}${mediaSelector}`, precedenceImportancePrefix = groupMediaKey ? groupPriority : prefixes[mediaKey], prefix = groupMediaKey ? `@container ${containerName}` : "@media";
9397
9453
  groupMediaKey && (styleInner = styleRule), styleInner.includes(prefix) ? styleRule = styleInner.replace("{", ` and ${mediaQuery} {`).replace("and screen and", "and") : styleRule = `${prefix} ${mediaQuery}{${precedenceImportancePrefix}${styleInner}}`, groupMediaKey && (styleRule = `@supports (contain: ${getSetting("webContainerType") || "inline-size"}) {${styleRule}}`);
9398
9454
  }
9399
9455
  return isHover && (styleRule = `@media (hover:hover){${styleRule}}`), [property, void 0, nextIdentifier, void 0, [styleRule]];
@@ -9460,7 +9516,7 @@ var empty = function() {
9460
9516
  function scanAllSheets() {
9461
9517
  }
9462
9518
  process.env.TAMAGUI_BAIL_AFTER_SCANNING_X_CSS_RULES;
9463
- function setNonce(_) {
9519
+ function setNonce(_2) {
9464
9520
  }
9465
9521
  function insertStyleRules(rulesToInsert) {
9466
9522
  }
@@ -9587,15 +9643,13 @@ var cache$1 = /* @__PURE__ */ new WeakMap(), getVariantExtras = function(styleSt
9587
9643
  props,
9588
9644
  conf: conf2,
9589
9645
  context,
9590
- theme,
9591
- styleProps: styleProps2
9646
+ theme
9592
9647
  } = styleState, fonts = conf2.fontsParsed;
9593
9648
  (context == null ? void 0 : context.language) && (fonts = getFontsForLanguage(conf2.fontsParsed, context.language));
9594
9649
  var next = {
9595
9650
  fonts,
9596
9651
  tokens: conf2.tokensParsed,
9597
9652
  theme,
9598
- context: styleProps2 == null ? void 0 : styleProps2.styledContext,
9599
9653
  get fontFamily() {
9600
9654
  return getVariableValue(styleState.fontFamily || styleState.props.fontFamily) || props.fontFamily || getVariableValue(getSetting("defaultFont"));
9601
9655
  },
@@ -9639,58 +9693,66 @@ function normalizeStyle$1(style) {
9639
9693
  }
9640
9694
  return fixStyles(res), res;
9641
9695
  }
9642
- var webPropsToSkip = {
9643
- whiteSpace: 1,
9644
- wordWrap: 1,
9645
- textOverflow: 1,
9646
- textDecorationDistance: 1,
9647
- cursor: 1,
9648
- contain: 1,
9649
- boxSizing: 1,
9650
- touchAction: 1,
9651
- outlineStyle: 1,
9652
- outlineOffset: 1,
9653
- outlineWidth: 1,
9654
- outlineColor: 1,
9655
- backdropFilter: 1,
9656
- backgroundImage: 1,
9657
- mixBlendMode: 1,
9658
- scrollbarWidth: 1,
9659
- backgroundOrigin: 1,
9660
- backgroundPosition: 1,
9661
- backgroundRepeat: 1,
9662
- backgroundSize: 1,
9663
- backgroundClip: 1,
9664
- backgroundBlendMode: 1,
9665
- backgroundAttachment: 1,
9666
- background: 1,
9667
- clipPath: 1,
9668
- caretColor: 1,
9669
- transformStyle: 1,
9670
- mask: 1,
9671
- maskImage: 1,
9672
- textEmphasis: 1,
9673
- borderImage: 1,
9674
- float: 1,
9675
- content: 1,
9676
- overflowBlock: 1,
9677
- overflowInline: 1,
9678
- maskBorder: 1,
9679
- maskBorderMode: 1,
9680
- maskBorderOutset: 1,
9681
- maskBorderRepeat: 1,
9682
- maskBorderSlice: 1,
9683
- maskBorderSource: 1,
9684
- maskBorderWidth: 1,
9685
- maskClip: 1,
9686
- maskComposite: 1,
9687
- maskMode: 1,
9688
- maskOrigin: 1,
9689
- maskPosition: 1,
9690
- maskRepeat: 1,
9691
- maskSize: 1,
9692
- maskType: 1
9693
- };
9696
+ var remRegex = /(-?[\d.]+)rem/g;
9697
+ function resolveRem(value) {
9698
+ var _config_settings, config = getConfig(), _config_settings_remBaseFontSize, baseFontSize = (_config_settings_remBaseFontSize = config == null || (_config_settings = config.settings) === null || _config_settings === void 0 ? void 0 : _config_settings.remBaseFontSize) !== null && _config_settings_remBaseFontSize !== void 0 ? _config_settings_remBaseFontSize : 16;
9699
+ if (value.endsWith("rem") && !value.includes(" ")) {
9700
+ var numericValue = Number.parseFloat(value);
9701
+ if (!Number.isNaN(numericValue)) return PixelRatio2.getFontScale() * baseFontSize * numericValue;
9702
+ }
9703
+ for (var result = 0, match; (match = remRegex.exec(value)) !== null; ) {
9704
+ var numericValue1 = Number.parseFloat(match[1]);
9705
+ Number.isNaN(numericValue1) || (result += PixelRatio2.getFontScale() * baseFontSize * numericValue1);
9706
+ }
9707
+ return remRegex.lastIndex = 0, result;
9708
+ }
9709
+ function isRemValue(value) {
9710
+ return typeof value == "string" && value.includes("rem");
9711
+ }
9712
+ var _c = webOnlyStylePropsView, {
9713
+ pointerEvents: _
9714
+ } = _c, webOnlyStylePropsViewWithoutPointerEvents = __objRest(_c, [
9715
+ "pointerEvents"
9716
+ ]), webPropsToSkip = __spreadProps(__spreadValues(__spreadValues({}, webOnlyStylePropsViewWithoutPointerEvents), webOnlyStylePropsText), {
9717
+ // Web-only event handlers
9718
+ onClick: 1,
9719
+ onDoubleClick: 1,
9720
+ onContextMenu: 1,
9721
+ onMouseEnter: 1,
9722
+ onMouseLeave: 1,
9723
+ onMouseMove: 1,
9724
+ onMouseOver: 1,
9725
+ onMouseOut: 1,
9726
+ onMouseDown: 1,
9727
+ onMouseUp: 1,
9728
+ onWheel: 1,
9729
+ onKeyDown: 1,
9730
+ onKeyUp: 1,
9731
+ onKeyPress: 1,
9732
+ onPointerDown: 1,
9733
+ onPointerMove: 1,
9734
+ onPointerUp: 1,
9735
+ onPointerCancel: 1,
9736
+ onPointerEnter: 1,
9737
+ onPointerLeave: 1,
9738
+ onDrag: 1,
9739
+ onDragStart: 1,
9740
+ onDragEnd: 1,
9741
+ onDragEnter: 1,
9742
+ onDragLeave: 1,
9743
+ onDragOver: 1,
9744
+ onDrop: 1,
9745
+ onChange: 1,
9746
+ onInput: 1,
9747
+ onBeforeInput: 1,
9748
+ onScroll: 1,
9749
+ onCopy: 1,
9750
+ onCut: 1,
9751
+ onPaste: 1,
9752
+ // Other web-only props
9753
+ htmlFor: 1,
9754
+ dangerouslySetInnerHTML: 1
9755
+ });
9694
9756
  var skipProps = {
9695
9757
  untilMeasured: 1,
9696
9758
  animation: 1,
@@ -9704,7 +9766,6 @@ var skipProps = {
9704
9766
  style: 1,
9705
9767
  // handled after loop so pseudos set usedKeys and override it if necessary
9706
9768
  group: 1,
9707
- themeInverse: 1,
9708
9769
  animatePresence: 1
9709
9770
  };
9710
9771
  Object.assign(skipProps, webPropsToSkip);
@@ -9740,7 +9801,7 @@ var propMapper = function(key, value, styleState, disabled, map) {
9740
9801
  }
9741
9802
  styleProps2.disableExpandShorthands || key in conf2.shorthands && (key = conf2.shorthands[key]);
9742
9803
  var originalValue = value;
9743
- if (value != null && (value[0] === "$" ? value = getTokenForKey(key, value, styleProps2, styleState) : isVariable(value) && (value = resolveVariableValue(key, value, styleProps2.resolveValues))), value != null) {
9804
+ if (value != null && (value[0] === "$" ? value = getTokenForKey(key, value, styleProps2, styleState) : isVariable(value) ? value = resolveVariableValue(key, value, styleProps2.resolveValues) : isRemValue(value) && (value = resolveRem(value))), value != null) {
9744
9805
  key === "fontFamily" && lastFontFamilyToken && (styleState.fontFamily = lastFontFamilyToken);
9745
9806
  var expanded = styleProps2.noExpand ? null : expandStyle(key, value);
9746
9807
  if (expanded) for (var max = expanded.length, i = 0; i < max; i++) {
@@ -9824,8 +9885,8 @@ var variableToFontNameCache = /* @__PURE__ */ new WeakMap(), resolveTokensAndVar
9824
9885
  for (var _iterator = variantOut[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
9825
9886
  var [_$key, val1] = _step.value;
9826
9887
  if (val1 != null) if (_$key in pseudoDescriptors) {
9827
- var _res, _key1, _;
9828
- (_ = (_res = res)[_key1 = _$key]) !== null && _ !== void 0 || (_res[_key1] = {}), Object.assign(res[_$key], val1);
9888
+ var _res, _key1, _2;
9889
+ (_2 = (_res = res)[_key1 = _$key]) !== null && _2 !== void 0 || (_res[_key1] = {}), Object.assign(res[_$key], val1);
9829
9890
  } else res[_$key] = val1;
9830
9891
  }
9831
9892
  } catch (err) {
@@ -9846,10 +9907,7 @@ var variableToFontNameCache = /* @__PURE__ */ new WeakMap(), resolveTokensAndVar
9846
9907
  continue;
9847
9908
  }
9848
9909
  if (typeof val == "string") {
9849
- var fVal = (
9850
- // SYNC WITH *1
9851
- val[0] === "$" ? getTokenForKey(subKey, val, styleProps2, styleState) : val
9852
- );
9910
+ var fVal = val[0] === "$" ? getTokenForKey(subKey, val, styleProps2, styleState) : isRemValue(val) ? resolveRem(val) : val;
9853
9911
  res[subKey] = fVal;
9854
9912
  continue;
9855
9913
  }
@@ -10020,10 +10078,6 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
10020
10078
  if (keyInit === "userSelect") keyInit = "selectable", valInit = valInit !== "none";
10021
10079
  else if (keyInit.startsWith("data-")) return "continue";
10022
10080
  }
10023
- if (keyInit === "dataSet") {
10024
- for (var keyInit1 in valInit) viewProps[`data-${hyphenate(keyInit1)}`] = valInit[keyInit1];
10025
- return "continue";
10026
- }
10027
10081
  var isVariant = !isValidStyleKeyInit && variants && keyInit in variants, isStyleLikeKey = isValidStyleKeyInit || isVariant, isPseudo = keyInit in validPseudoKeys, isMedia = !isStyleLikeKey && !isPseudo ? getMediaKey(keyInit) : false, isMediaOrPseudo = !!(isMedia || isPseudo);
10028
10082
  isMediaOrPseudo && isMedia === "group" && (keyInit = normalizeGroupKey(keyInit, groupContext));
10029
10083
  var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo || isVariant && !noExpand;
@@ -10097,9 +10151,10 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
10097
10151
  }
10098
10152
  if (isMedia) {
10099
10153
  if (!val2) return;
10100
- val2.space;
10101
10154
  var mediaKeyShort = key4.slice(isMedia == "theme" ? 7 : 1);
10102
- if (hasMedia || (hasMedia = true), (!hasMedia || typeof hasMedia == "boolean") && (hasMedia = /* @__PURE__ */ new Set()), hasMedia.add(mediaKeyShort), isMedia === "platform" && !isActivePlatform(key4)) return;
10155
+ hasMedia || (hasMedia = true);
10156
+ val2.space;
10157
+ if ((!hasMedia || typeof hasMedia == "boolean") && (hasMedia = /* @__PURE__ */ new Set()), hasMedia.add(mediaKeyShort), isMedia === "platform" && !isActivePlatform(key4)) return;
10103
10158
  var priority = mediaStylesSeen;
10104
10159
  if (mediaStylesSeen += 1, shouldDoClasses) ;
10105
10160
  else {
@@ -10122,12 +10177,16 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
10122
10177
  (_styleState3 = styleState).style || (_styleState3.style = {});
10123
10178
  var scheme = mediaKeyShort, oppositeScheme = getOppositeScheme(mediaKeyShort), themeOriginalValues = styleOriginalValues.get(mediaStyle1);
10124
10179
  for (var subKey1 in mediaStyle1) {
10125
- var _$val1 = extractValueFromDynamic(mediaStyle1[subKey1], scheme), oppositeVal = extractValueFromDynamic(styleState.style[subKey1], oppositeScheme);
10126
- mediaStyle1[subKey1] = getDynamicVal({
10127
- scheme,
10128
- val: _$val1,
10129
- oppositeVal
10130
- }), mergeStyle(styleState, subKey1, mediaStyle1[subKey1], priority, false, themeOriginalValues == null ? void 0 : themeOriginalValues[subKey1]);
10180
+ var _$val1 = extractValueFromDynamic(mediaStyle1[subKey1], scheme), existing = styleState.style[subKey1];
10181
+ if (existing == null ? void 0 : existing.dynamic) existing.dynamic[scheme] = _$val1, mediaStyle1[subKey1] = existing;
10182
+ else {
10183
+ var oppositeVal = extractValueFromDynamic(existing, oppositeScheme);
10184
+ mediaStyle1[subKey1] = getDynamicVal({
10185
+ scheme,
10186
+ val: _$val1,
10187
+ oppositeVal
10188
+ }), mergeStyle(styleState, subKey1, mediaStyle1[subKey1], priority, false, themeOriginalValues == null ? void 0 : themeOriginalValues[subKey1]);
10189
+ }
10131
10190
  }
10132
10191
  } else if (!(themeName === mediaKeyShort || themeName.startsWith(mediaKeyShort))) return;
10133
10192
  } else if (isGroupMedia) {
@@ -10158,17 +10217,11 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
10158
10217
  }
10159
10218
  }
10160
10219
  var mediaOriginalValues = styleOriginalValues.get(mediaStyle1);
10161
- for (var subKey2 in mediaStyle1) {
10162
- if (subKey2 === "space") {
10163
- space = valInit.space;
10164
- continue;
10165
- }
10166
- if (subKey2[0] === "$") {
10167
- if (!isActivePlatform(subKey2) || !isActiveTheme(subKey2, themeName)) continue;
10168
- var subOriginalValues = styleOriginalValues.get(mediaStyle1[subKey2]);
10169
- for (var subSubKey in mediaStyle1[subKey2]) mergeMediaStyle2(subSubKey, mediaStyle1[subKey2][subSubKey], subOriginalValues == null ? void 0 : subOriginalValues[subSubKey]);
10170
- } else mergeMediaStyle2(subKey2, mediaStyle1[subKey2], mediaOriginalValues == null ? void 0 : mediaOriginalValues[subKey2]);
10171
- }
10220
+ for (var subKey2 in mediaStyle1) if (subKey2 !== "space") if (subKey2[0] === "$") {
10221
+ if (!isActivePlatform(subKey2) || !isActiveTheme(subKey2, themeName)) continue;
10222
+ var subOriginalValues = styleOriginalValues.get(mediaStyle1[subKey2]);
10223
+ for (var subSubKey in mediaStyle1[subKey2]) mergeMediaStyle2(subSubKey, mediaStyle1[subKey2][subSubKey], subOriginalValues == null ? void 0 : subOriginalValues[subSubKey]);
10224
+ } else mergeMediaStyle2(subKey2, mediaStyle1[subKey2], mediaOriginalValues == null ? void 0 : mediaOriginalValues[subKey2]);
10172
10225
  }
10173
10226
  return;
10174
10227
  }
@@ -10194,7 +10247,9 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
10194
10247
  inlineWhenUnflattened,
10195
10248
  parentStaticConfig,
10196
10249
  acceptsClassName
10197
- } = staticConfig, viewProps = {}, mediaState = styleProps2.mediaState || exports.mediaState, shouldDoClasses = acceptsClassName && isWeb, rulesToInsert = void 0, classNames = {}, pseudos = null, space = props.space, hasMedia = false, dynamicThemeAccess, pseudoGroups, mediaGroups;
10250
+ } = staticConfig, viewProps = {}, mediaState = styleProps2.mediaState || exports.mediaState, shouldDoClasses = acceptsClassName && isWeb, rulesToInsert = void 0, classNames = {}, pseudos = null;
10251
+ props.space;
10252
+ var hasMedia = false, dynamicThemeAccess, pseudoGroups, mediaGroups;
10198
10253
  props.className || "";
10199
10254
  var mediaStylesSeen = 0, validStyles$1 = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? stylePropsText : validStyles);
10200
10255
  var styleState = {
@@ -10216,7 +10271,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
10216
10271
  fallbackProps
10217
10272
  } = styleProps2;
10218
10273
  fallbackProps && (styleState.props = new Proxy(props, {
10219
- get(_, key4, val2) {
10274
+ get(_2, key4, val2) {
10220
10275
  return Reflect.has(props, key4) ? Reflect.get(props, key4) : Reflect.get(fallbackProps, key4);
10221
10276
  }
10222
10277
  }));
@@ -10258,8 +10313,8 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
10258
10313
  }
10259
10314
  }
10260
10315
  if (viewProps.tabIndex === 0) {
10261
- var _viewProps1, _accessible1;
10262
- (_accessible1 = (_viewProps1 = viewProps).accessible) !== null && _accessible1 !== void 0 || (_viewProps1.accessible = true);
10316
+ var _viewProps, _accessible;
10317
+ (_accessible = (_viewProps = viewProps).accessible) !== null && _accessible !== void 0 || (_viewProps.accessible = true);
10263
10318
  }
10264
10319
  var style1 = styleState.style;
10265
10320
  if (style1 == null ? void 0 : style1.fontFamily) {
@@ -10270,7 +10325,6 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
10270
10325
  }
10271
10326
  }
10272
10327
  var result = {
10273
- space,
10274
10328
  hasMedia,
10275
10329
  fontFamily: styleState.fontFamily,
10276
10330
  viewProps,
@@ -10370,11 +10424,8 @@ var defaultColor = process.env.TAMAGUI_DEFAULT_COLOR || "rgba(0,0,0,0)", animata
10370
10424
  x: 0,
10371
10425
  y: 0,
10372
10426
  borderRadius: 0
10373
- }), lowercaseHyphenate = function(match) {
10374
- return `-${match.toLowerCase()}`;
10375
- }, hyphenate = function(str) {
10376
- return str.replace(/[A-Z]/g, lowercaseHyphenate);
10377
- }, mergeTransform = function(obj, key, val) {
10427
+ });
10428
+ var mergeTransform = function(obj, key, val) {
10378
10429
  var backwards = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false, _obj;
10379
10430
  typeof obj.transform != "string" && ((_obj = obj).transform || (_obj.transform = []), obj.transform[backwards ? "unshift" : "push"]({
10380
10431
  [mapTransformKeys[key] || key]: val
@@ -10488,7 +10539,7 @@ var Theme = /* @__PURE__ */ React.forwardRef(function(props, ref) {
10488
10539
  if (props.disable) return props.children;
10489
10540
  var {
10490
10541
  passThrough
10491
- } = props, isRoot = !!props._isRoot, [_, themeState] = useThemeWithState(props, isRoot), disableDirectChildTheme = props["disable-child-theme"], finalChildren = disableDirectChildTheme ? React.Children.map(props.children, function(child) {
10542
+ } = props, isRoot = !!props._isRoot, [_2, themeState] = useThemeWithState(props, isRoot), disableDirectChildTheme = props["disable-child-theme"], finalChildren = disableDirectChildTheme ? React.Children.map(props.children, function(child) {
10492
10543
  return passThrough ? child : /* @__PURE__ */ React.cloneElement(child, {
10493
10544
  "data-disable-theme": true
10494
10545
  });
@@ -10537,12 +10588,10 @@ function getThemedChildren(themeState, children, props) {
10537
10588
  function themeable(Component, staticConfig) {
10538
10589
  var optimize = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false, withThemeComponent = /* @__PURE__ */ React.forwardRef(function(props, ref) {
10539
10590
  var _a = props, {
10540
- themeInverse,
10541
10591
  theme,
10542
10592
  componentName,
10543
10593
  themeReset
10544
10594
  } = _a, rest = __objRest(_a, [
10545
- "themeInverse",
10546
10595
  "theme",
10547
10596
  "componentName",
10548
10597
  "themeReset"
@@ -10559,7 +10608,7 @@ function themeable(Component, staticConfig) {
10559
10608
  "data-disable-theme": true
10560
10609
  }))
10561
10610
  ), filteredProps = null, compName = componentName || (staticConfig == null ? void 0 : staticConfig.componentName);
10562
- 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;
10611
+ 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), "themeReset" in props && (filteredProps || (filteredProps = {}), filteredProps.reset = themeReset), optimize && !filteredProps) return element;
10563
10612
  var contents = /* @__PURE__ */ jsxRuntimeExports.jsx(Theme, __spreadProps(__spreadValues({
10564
10613
  "disable-child-theme": true
10565
10614
  }, filteredProps), {
@@ -10635,7 +10684,7 @@ var useComponentState = function(props, animationDriver, staticConfig, config) {
10635
10684
  var states2 = React.useState(initialState), state = props.forceStyle ? __spreadProps(__spreadValues({}, states2[0]), {
10636
10685
  [props.forceStyle]: true
10637
10686
  }) : states2[0], setState = states2[1], isAnimated = willBeAnimated;
10638
- disabled !== state.disabled && (disabled && Object.assign(state, defaultComponentStateMounted), state.disabled = disabled, setState(function(_) {
10687
+ disabled !== state.disabled && (disabled && Object.assign(state, defaultComponentStateMounted), state.disabled = disabled, setState(function(_2) {
10639
10688
  return __spreadValues({}, state);
10640
10689
  }));
10641
10690
  var groupName = props.group, setStateShallow = useCreateShallowSetState(setState, props.debug);
@@ -10831,9 +10880,9 @@ function createComponent(staticConfig) {
10831
10880
  shallow: stateRef.current.themeShallow,
10832
10881
  debug: debugProp
10833
10882
  };
10834
- if ("themeInverse" in props && (themeStateProps.inverse = props.themeInverse), "theme" in props && (themeStateProps.name = props.theme), typeof stateRef.current.isListeningToTheme == "boolean" && (themeStateProps.needsUpdate = function() {
10883
+ if ("theme" in props && (themeStateProps.name = props.theme), themeStateProps.needsUpdate = function() {
10835
10884
  return !!stateRef.current.isListeningToTheme;
10836
- }), themeStateProps.deopt = willBeAnimated, false) ;
10885
+ }, themeStateProps.deopt = willBeAnimated, false) ;
10837
10886
  var [theme, themeState] = useThemeWithState(themeStateProps);
10838
10887
  elementType = Component || elementType;
10839
10888
  var mediaState = useMedia(componentContext);
@@ -11063,7 +11112,7 @@ function createComponent(staticConfig) {
11063
11112
  }, attachPress && {
11064
11113
  onMouseEnter: function(e2) {
11065
11114
  var next = {};
11066
- needsHoverState && (next.hover = true), needsPressState && state.pressIn && (next.press = true), setStateShallow(next), onHoverIn == null ? void 0 : onHoverIn(e2), onMouseEnter == null ? void 0 : onMouseEnter(e2);
11115
+ needsHoverState && true && (next.hover = true), needsPressState && state.pressIn && (next.press = true), setStateShallow(next), onHoverIn == null ? void 0 : onHoverIn(e2), onMouseEnter == null ? void 0 : onMouseEnter(e2);
11067
11116
  },
11068
11117
  onMouseLeave: function(e2) {
11069
11118
  var next = {};
@@ -11112,14 +11161,7 @@ function createComponent(staticConfig) {
11112
11161
  });
11113
11162
  }
11114
11163
  (_hooks_useEvents = hooks.useEvents) === null || _hooks_useEvents === void 0 || _hooks_useEvents.call(hooks, viewProps, events, splitStyles, setStateShallow, staticConfig);
11115
- var direction = props.spaceDirection || "both";
11116
- var content = !children || asChild || !splitStyles ? children : spacedChildren({
11117
- separator,
11118
- children,
11119
- space,
11120
- direction,
11121
- isZStack
11122
- });
11164
+ var content = children;
11123
11165
  if (asChild) if (elementType = Slot, 0) ;
11124
11166
  else Object.assign(viewProps, {
11125
11167
  onPress,
@@ -11176,153 +11218,13 @@ function createComponent(staticConfig) {
11176
11218
  isStyledHOC: false
11177
11219
  });
11178
11220
  }
11179
- function extractable(Component2, extended) {
11180
- return Component2.staticConfig = extendStyledConfig(extended), Component2.styleable = styleable, Component2;
11181
- }
11182
11221
  function styleable(Component2, options) {
11183
11222
  var _Component_render, skipForwardRef = IS_REACT_19 && typeof Component2 == "function" && Component2.length === 1 || ((_Component_render = Component2.render) === null || _Component_render === void 0 ? void 0 : _Component_render.length) === 2, out = skipForwardRef ? Component2 : /* @__PURE__ */ React.forwardRef(Component2), extendedConfig = extendStyledConfig(options == null ? void 0 : options.staticConfig);
11184
11223
  return out = (options == null ? void 0 : options.disableTheme) ? out : themeable(out, extendedConfig, true), (extendedConfig.memo || process.env.TAMAGUI_MEMOIZE_STYLEABLE) && (out = /* @__PURE__ */ React.memo(out)), out.staticConfig = extendedConfig, out.styleable = styleable, out;
11185
11224
  }
11186
- return res.extractable = extractable, res.styleable = styleable, res;
11187
- }
11188
- function Unspaced(props) {
11189
- return props.children;
11225
+ return res.styleable = styleable, res;
11190
11226
  }
11191
- Unspaced.isUnspaced = true;
11192
- var getSpacerSize = function(size, param) {
11193
- var {
11194
- tokens
11195
- } = param;
11196
- size = size === false ? 0 : size === true ? "$true" : size;
11197
- var _tokens_space_size, sizePx = (_tokens_space_size = tokens.space[size]) !== null && _tokens_space_size !== void 0 ? _tokens_space_size : size;
11198
- return {
11199
- width: sizePx,
11200
- height: sizePx,
11201
- minWidth: sizePx,
11202
- minHeight: sizePx
11203
- };
11204
- }, Spacer = createComponent({
11205
- acceptsClassName: true,
11206
- memo: true,
11207
- componentName: "Spacer",
11208
- validStyles,
11209
- defaultProps: __spreadProps(__spreadValues({}, stackDefaultStyles), {
11210
- // avoid nesting issues
11211
- tag: "span",
11212
- size: true,
11213
- pointerEvents: "none"
11214
- }),
11215
- variants: {
11216
- size: {
11217
- "...": getSpacerSize
11218
- },
11219
- flex: {
11220
- true: {
11221
- flexGrow: 1
11222
- }
11223
- },
11224
- direction: {
11225
- horizontal: {
11226
- height: 0,
11227
- minHeight: 0
11228
- },
11229
- vertical: {
11230
- width: 0,
11231
- minWidth: 0
11232
- },
11233
- both: {}
11234
- }
11235
- }
11236
- });
11237
- function spacedChildren(props) {
11238
- var _childrenList__type, _childrenList_, {
11239
- isZStack,
11240
- children,
11241
- space,
11242
- direction,
11243
- spaceFlex,
11244
- separator,
11245
- ensureKeys
11246
- } = props, hasSpace = !!(space || spaceFlex), hasSeparator = separator != null, areChildrenArray = Array.isArray(children);
11247
- if (!ensureKeys && !(hasSpace || hasSeparator || isZStack)) return children;
11248
- var childrenList = areChildrenArray ? children : React.Children.toArray(children), len = childrenList.length;
11249
- if (len <= 1 && !isZStack && !(!((_childrenList_ = childrenList[0]) === null || _childrenList_ === void 0 || (_childrenList__type = _childrenList_.type) === null || _childrenList__type === void 0) && _childrenList__type.shouldForwardSpace)) return children;
11250
- var final = [], _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
11251
- try {
11252
- for (var _iterator = childrenList.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
11253
- var [index2, child] = _step.value, _child_type, isEmpty = child == null || Array.isArray(child) && child.length === 0;
11254
- if (!isEmpty && /* @__PURE__ */ React.isValidElement(child) && !((_child_type = child.type) === null || _child_type === void 0) && _child_type.shouldForwardSpace && (child = /* @__PURE__ */ React.cloneElement(child, {
11255
- // @ts-expect-error we explicitly know with shouldForwardSpace
11256
- space,
11257
- spaceFlex,
11258
- separator,
11259
- key: child.key
11260
- })), isEmpty || !child || child.key && !isZStack ? final.push(child) : final.push(/* @__PURE__ */ jsxRuntimeExports.jsx(React.Fragment, {
11261
- children: isZStack ? /* @__PURE__ */ jsxRuntimeExports.jsx(AbsoluteFill, {
11262
- children: child
11263
- }) : child
11264
- }, `${index2}0t`)), !(isUnspaced(child) && index2 === 0) && !isZStack) {
11265
- var next = childrenList[index2 + 1];
11266
- next && !isEmpty && !isUnspaced(next) && (separator ? (hasSpace && final.push(createSpacer({
11267
- key: `_${index2}_00t`,
11268
- direction,
11269
- space,
11270
- spaceFlex
11271
- })), final.push(/* @__PURE__ */ jsxRuntimeExports.jsx(React.Fragment, {
11272
- children: separator
11273
- }, `${index2}03t`)), hasSpace && final.push(createSpacer({
11274
- key: `_${index2}01t`,
11275
- direction,
11276
- space,
11277
- spaceFlex
11278
- }))) : final.push(createSpacer({
11279
- key: `_${index2}02t`,
11280
- direction,
11281
- space,
11282
- spaceFlex
11283
- })));
11284
- }
11285
- }
11286
- } catch (err) {
11287
- _didIteratorError = true, _iteratorError = err;
11288
- } finally {
11289
- try {
11290
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
11291
- } finally {
11292
- if (_didIteratorError) throw _iteratorError;
11293
- }
11294
- }
11295
- return final;
11296
- }
11297
- function createSpacer(param) {
11298
- var {
11299
- key,
11300
- direction,
11301
- space,
11302
- spaceFlex
11303
- } = param;
11304
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Spacer, __spreadValues({
11305
- size: space,
11306
- direction
11307
- }, typeof spaceFlex < "u" && {
11308
- flex: spaceFlex === true ? 1 : spaceFlex === false ? 0 : spaceFlex
11309
- }), key);
11310
- }
11311
- function isUnspaced(child) {
11312
- var t2 = child == null ? void 0 : child.type;
11313
- return (t2 == null ? void 0 : t2.isVisuallyHidden) || (t2 == null ? void 0 : t2.isUnspaced);
11314
- }
11315
- var AbsoluteFill = createComponent({
11316
- defaultProps: __spreadProps(__spreadValues({}, stackDefaultStyles), {
11317
- flexDirection: "column",
11318
- position: "absolute",
11319
- top: 0,
11320
- right: 0,
11321
- bottom: 0,
11322
- left: 0,
11323
- pointerEvents: "box-none"
11324
- })
11325
- }), fromPx = function(val) {
11227
+ var fromPx = function(val) {
11326
11228
  return typeof val == "number" ? val : typeof val == "string" ? +val.replace("px", "") : 0;
11327
11229
  };
11328
11230
  function getExpandedShorthands(props) {
@@ -11598,7 +11500,7 @@ function shouldTokenCategoryHaveUnits(category) {
11598
11500
  return UNIT_CATEGORIES.has(category);
11599
11501
  }
11600
11502
  function createTamagui$1(configIn) {
11601
- var _configIn_settings, existingConfig = getConfigMaybe();
11503
+ var _configIn_settings, _configIn_settings1, existingConfig = getConfigMaybe();
11602
11504
  existingConfig && (configIn = __spreadValues(__spreadValues({}, existingConfig), configIn));
11603
11505
  var tokensParsed = {}, tokens = createVariables(configIn.tokens || {});
11604
11506
  if (configIn.tokens) {
@@ -11677,10 +11579,12 @@ function createTamagui$1(configIn) {
11677
11579
  return "";
11678
11580
  }, getNewCSS = function(opts2) {
11679
11581
  return getCSS(__spreadValues({}, opts2));
11680
- }, _configIn_settings_defaultFont, defaultFontSetting = (_configIn_settings_defaultFont = (_configIn_settings = configIn.settings) === null || _configIn_settings === void 0 ? void 0 : _configIn_settings.defaultFont) !== null && _configIn_settings_defaultFont !== void 0 ? _configIn_settings_defaultFont : configIn.defaultFont, defaultFont = (function() {
11582
+ }, defaultFontSetting = (_configIn_settings = configIn.settings) === null || _configIn_settings === void 0 ? void 0 : _configIn_settings.defaultFont, defaultFont = (function() {
11681
11583
  var val2 = defaultFontSetting;
11682
11584
  return (val2 == null ? void 0 : val2[0]) === "$" && (val2 = val2.slice(1)), val2;
11683
- })(), defaultFontToken = defaultFont ? `$${defaultFont}` : "", unset = __spreadValues({}, configIn.unset);
11585
+ })();
11586
+ ((_configIn_settings1 = configIn.settings) === null || _configIn_settings1 === void 0 ? void 0 : _configIn_settings1.defaultPosition) || "static";
11587
+ var defaultProps2 = configIn.defaultProps || {}, defaultFontToken = defaultFont ? `$${defaultFont}` : "", unset = __spreadValues({}, configIn.unset);
11684
11588
  !unset.fontFamily && defaultFont && (unset.fontFamily = defaultFontToken);
11685
11589
  var config = __spreadProps(__spreadValues({
11686
11590
  fonts: {},
@@ -11689,17 +11593,9 @@ function createTamagui$1(configIn) {
11689
11593
  animations: defaultAnimationDriver,
11690
11594
  media: {}
11691
11595
  }, configIn), {
11596
+ defaultProps: defaultProps2,
11692
11597
  unset,
11693
11598
  settings: __spreadValues({
11694
- // move deprecated settings here so we can reference them all using `getSetting`
11695
- // TODO remove this on v2
11696
- disableSSR: configIn.disableSSR,
11697
- defaultFont: configIn.defaultFont,
11698
- disableRootThemeClass: configIn.disableRootThemeClass,
11699
- onlyAllowShorthands: configIn.onlyAllowShorthands,
11700
- mediaQueryDefaultActive: configIn.mediaQueryDefaultActive,
11701
- themeClassNameOnRoot: configIn.themeClassNameOnRoot,
11702
- cssStyleSeparator: configIn.cssStyleSeparator,
11703
11599
  webContainerType: "inline-size"
11704
11600
  }, configIn.settings),
11705
11601
  tokens,
@@ -11795,9 +11691,6 @@ var builtinShorthands = {
11795
11691
  ox: "overflowX",
11796
11692
  oy: "overflowY"
11797
11693
  };
11798
- var createTheme = function(theme) {
11799
- return theme;
11800
- };
11801
11694
  function createTokens(tokens) {
11802
11695
  var _process_env_TAMAGUI_TOKEN_PREFIX;
11803
11696
  return createVariables(tokens, (_process_env_TAMAGUI_TOKEN_PREFIX = process.env.TAMAGUI_TOKEN_PREFIX) !== null && _process_env_TAMAGUI_TOKEN_PREFIX !== void 0 ? _process_env_TAMAGUI_TOKEN_PREFIX : "t");
@@ -11826,8 +11719,6 @@ var RNConfigs = {
11826
11719
  isReactNative: true
11827
11720
  }
11828
11721
  };
11829
- function setupReactNative(rnExports) {
11830
- }
11831
11722
  var mergeVariants = function(parentVariants, ourVariants) {
11832
11723
  var level = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, variants = {};
11833
11724
  for (var key in ourVariants) {
@@ -11842,13 +11733,11 @@ function styled(ComponentIn, options, config) {
11842
11733
  variants,
11843
11734
  name,
11844
11735
  defaultVariants,
11845
- acceptsClassName: acceptsClassNameProp,
11846
11736
  context
11847
11737
  } = _a, defaultProps2 = __objRest(_a, [
11848
11738
  "variants",
11849
11739
  "name",
11850
11740
  "defaultVariants",
11851
- "acceptsClassName",
11852
11741
  "context"
11853
11742
  ]), parentDefaultVariants, parentDefaultProps;
11854
11743
  if (parentStaticConfig) {
@@ -11863,7 +11752,7 @@ function styled(ComponentIn, options, config) {
11863
11752
  }
11864
11753
  }
11865
11754
  (parentDefaultProps || defaultVariants || parentDefaultVariants) && (defaultProps2 = __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, parentDefaultProps), parentDefaultVariants), defaultProps2), defaultVariants)), (parentStaticConfig == null ? void 0 : parentStaticConfig.isHOC) && name && (defaultProps2.componentName = name);
11866
- var isText = !!((config == null ? void 0 : config.isText) || (parentStaticConfig == null ? void 0 : parentStaticConfig.isText)), _config_acceptsClassName, _ref, acceptsClassName = (_ref = (_config_acceptsClassName = config == null ? void 0 : config.acceptsClassName) !== null && _config_acceptsClassName !== void 0 ? _config_acceptsClassName : acceptsClassNameProp) !== null && _ref !== void 0 ? _ref : isPlainStyledComponent || isReactNative || (parentStaticConfig == null ? void 0 : parentStaticConfig.isHOC) && (parentStaticConfig == null ? void 0 : parentStaticConfig.acceptsClassName), conf2 = __spreadProps(__spreadValues(__spreadProps(__spreadValues(__spreadValues(__spreadValues({}, parentStaticConfig), config), !isPlainStyledComponent && {
11755
+ var isText = !!((config == null ? void 0 : config.isText) || (parentStaticConfig == null ? void 0 : parentStaticConfig.isText)), _config_acceptsClassName, acceptsClassName = (_config_acceptsClassName = config == null ? void 0 : config.acceptsClassName) !== null && _config_acceptsClassName !== void 0 ? _config_acceptsClassName : isPlainStyledComponent || isReactNative || (parentStaticConfig == null ? void 0 : parentStaticConfig.isHOC) && (parentStaticConfig == null ? void 0 : parentStaticConfig.acceptsClassName), conf2 = __spreadProps(__spreadValues(__spreadProps(__spreadValues(__spreadValues(__spreadValues({}, parentStaticConfig), config), !isPlainStyledComponent && {
11867
11756
  Component
11868
11757
  }), {
11869
11758
  // @ts-expect-error
@@ -11888,6 +11777,7 @@ var useIsTouchDevice = function() {
11888
11777
  return true;
11889
11778
  };
11890
11779
  var Stack$1 = createComponent({
11780
+ componentName: "Stack",
11891
11781
  acceptsClassName: true,
11892
11782
  defaultProps: stackDefaultStyles,
11893
11783
  validStyles
@@ -11908,7 +11798,6 @@ function usePropsAndStyle(props, opts2) {
11908
11798
  var _opts_forComponent, _opts_forComponent_staticConfig, staticConfig = (_opts_forComponent_staticConfig = opts2 == null || (_opts_forComponent = opts2.forComponent) === null || _opts_forComponent === void 0 ? void 0 : _opts_forComponent.staticConfig) !== null && _opts_forComponent_staticConfig !== void 0 ? _opts_forComponent_staticConfig : Stack$1.staticConfig, [theme, themeState] = useThemeWithState({
11909
11799
  componentName: staticConfig.componentName,
11910
11800
  name: "theme" in props ? props.theme : void 0,
11911
- inverse: "themeInverse" in props ? props.themeInverse : void 0,
11912
11801
  needsUpdate() {
11913
11802
  return true;
11914
11803
  }
@@ -11981,12 +11870,12 @@ function FontLanguage(param) {
11981
11870
  }));
11982
11871
  }
11983
11872
  var ThemeProvider = function(props) {
11984
- var _props_disableRootThemeClass, disableRootThemeClass = (_props_disableRootThemeClass = props.disableRootThemeClass) !== null && _props_disableRootThemeClass !== void 0 ? _props_disableRootThemeClass : getSetting("disableRootThemeClass"), _props_themeClassNameOnRoot, themeClassNameOnRoot = (_props_themeClassNameOnRoot = props.themeClassNameOnRoot) !== null && _props_themeClassNameOnRoot !== void 0 ? _props_themeClassNameOnRoot : getSetting("themeClassNameOnRoot");
11873
+ var addThemeClassName = getSetting("addThemeClassName");
11874
+ var forceClassName = addThemeClassName === void 0;
11985
11875
  return /* @__PURE__ */ jsxRuntimeExports.jsx(Theme, {
11986
11876
  className: props.className,
11987
11877
  name: props.defaultTheme,
11988
- // if root class disabled, force class here
11989
- forceClassName: !disableRootThemeClass && !themeClassNameOnRoot,
11878
+ forceClassName,
11990
11879
  // @ts-expect-error
11991
11880
  _isRoot: React.useId,
11992
11881
  children: props.children
@@ -11999,20 +11888,20 @@ function TamaguiProvider$1(param) {
11999
11888
  config,
12000
11889
  className,
12001
11890
  defaultTheme,
12002
- disableRootThemeClass,
12003
11891
  reset,
12004
- themeClassNameOnRoot
11892
+ insets
12005
11893
  } = param;
12006
11894
  useIsomorphicLayoutEffect(function() {
12007
11895
  updateMediaListeners();
12008
11896
  }, []);
12009
- var contents = /* @__PURE__ */ jsxRuntimeExports.jsx(UnmountedClassName, {
11897
+ var memoizedInsets = React.useMemo(function() {
11898
+ return insets;
11899
+ }, [insets == null ? void 0 : insets.top, insets == null ? void 0 : insets.right, insets == null ? void 0 : insets.bottom, insets == null ? void 0 : insets.left]), contents = /* @__PURE__ */ jsxRuntimeExports.jsx(UnmountedClassName, {
12010
11900
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(ComponentContext.Provider, {
12011
11901
  animationDriver: config == null ? void 0 : config.animations,
11902
+ insets: memoizedInsets,
12012
11903
  children: /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeProvider, {
12013
- themeClassNameOnRoot: themeClassNameOnRoot != null ? themeClassNameOnRoot : getSetting("themeClassNameOnRoot"),
12014
- disableRootThemeClass: disableRootThemeClass != null ? disableRootThemeClass : getSetting("disableRootThemeClass"),
12015
- defaultTheme: defaultTheme != null ? defaultTheme : config ? Object.keys(config.themes)[0] : "",
11904
+ defaultTheme,
12016
11905
  reset,
12017
11906
  className,
12018
11907
  children
@@ -12041,16 +11930,11 @@ var ellipsisStyle = {
12041
11930
  isText: true,
12042
11931
  defaultProps: {
12043
11932
  fontFamily: "unset",
11933
+ position: "static",
12044
11934
  suppressHighlighting: true
12045
11935
  },
12046
11936
  inlineWhenUnflattened: /* @__PURE__ */ new Set(["fontFamily"]),
12047
11937
  variants: {
12048
- /**
12049
- * @deprecated Use ellipsis instead
12050
- */
12051
- ellipse: {
12052
- true: ellipsisStyle
12053
- },
12054
11938
  ellipsis: {
12055
11939
  true: ellipsisStyle
12056
11940
  }
@@ -12059,6 +11943,7 @@ var ellipsisStyle = {
12059
11943
  });
12060
11944
  Text$1.displayName = "Text";
12061
11945
  var View$1 = createComponent({
11946
+ componentName: "View",
12062
11947
  acceptsClassName: true,
12063
11948
  defaultProps: stackDefaultStyles,
12064
11949
  validStyles
@@ -12603,7 +12488,6 @@ exports.MISSING_THEME_MESSAGE = MISSING_THEME_MESSAGE;
12603
12488
  exports.PROP_SPLIT = PROP_SPLIT;
12604
12489
  exports.Slot = Slot;
12605
12490
  exports.Slottable = Slottable;
12606
- exports.Spacer = Spacer;
12607
12491
  exports.Stack = Stack;
12608
12492
  exports.StyleObjectIdentifier = StyleObjectIdentifier;
12609
12493
  exports.StyleObjectProperty = StyleObjectProperty;
@@ -12617,7 +12501,6 @@ exports.TamaguiProvider = TamaguiProvider;
12617
12501
  exports.Text = Text;
12618
12502
  exports.Theme = Theme;
12619
12503
  exports.ThemeProvider = ThemeProvider;
12620
- exports.Unspaced = Unspaced;
12621
12504
  exports.View = View;
12622
12505
  exports._disableMediaTouch = _disableMediaTouch;
12623
12506
  exports._withStableStyle = _withStableStyle;
@@ -12633,7 +12516,6 @@ exports.createMediaStyle = createMediaStyle;
12633
12516
  exports.createShorthands = createShorthands;
12634
12517
  exports.createStyledContext = createStyledContext;
12635
12518
  exports.createTamagui = createTamagui;
12636
- exports.createTheme = createTheme;
12637
12519
  exports.createTokens = createTokens;
12638
12520
  exports.createVariable = createVariable;
12639
12521
  exports.createVariables = createVariables;
@@ -12717,10 +12599,8 @@ exports.setRef = setRef;
12717
12599
  exports.setupDev = setupDev;
12718
12600
  exports.setupHooks = setupHooks;
12719
12601
  exports.setupMatchMedia = setupMatchMedia;
12720
- exports.setupReactNative = setupReactNative;
12721
12602
  exports.shouldRenderNativePlatform = shouldRenderNativePlatform;
12722
12603
  exports.simpleHash = simpleHash;
12723
- exports.spacedChildren = spacedChildren;
12724
12604
  exports.stackDefaultStyles = stackDefaultStyles;
12725
12605
  exports.styleOriginalValues = styleOriginalValues;
12726
12606
  exports.stylePropsAll = stylePropsAll;
@@ -12757,5 +12637,7 @@ exports.useThemeWithState = useThemeWithState;
12757
12637
  exports.validPseudoKeys = validPseudoKeys;
12758
12638
  exports.validStyles = validStyles;
12759
12639
  exports.variableToString = variableToString;
12640
+ exports.webOnlyStylePropsText = webOnlyStylePropsText;
12641
+ exports.webOnlyStylePropsView = webOnlyStylePropsView;
12760
12642
  exports.webViewFlexCompatStyles = webViewFlexCompatStyles;
12761
12643
  exports.withStaticProperties = withStaticProperties;