@tamagui/core 2.0.0-rc.3 → 2.0.0-rc.31

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.
Files changed (55) hide show
  1. package/.turbo/turbo-build.log +4 -0
  2. package/bundle-native.mjs +22 -0
  3. package/dist/cjs/index.cjs +1 -0
  4. package/dist/cjs/index.native.js +1 -0
  5. package/dist/cjs/index.native.js.map +1 -1
  6. package/dist/esm/index.js +50 -65
  7. package/dist/esm/index.js.map +1 -6
  8. package/dist/esm/index.mjs +2 -4
  9. package/dist/esm/index.mjs.map +1 -1
  10. package/dist/esm/index.native.js +2 -2
  11. package/dist/esm/index.native.js.map +1 -1
  12. package/dist/native.cjs +2054 -2711
  13. package/dist/test.native.cjs +1051 -609
  14. package/inject-styles/index.cjs +2 -0
  15. package/inject-styles/index.js +2 -0
  16. package/inject-styles.cjs +1 -0
  17. package/native/index.cjs +2 -0
  18. package/native/index.js +2 -0
  19. package/native-test/index.cjs +2 -0
  20. package/native-test/index.js +2 -0
  21. package/package.json +27 -30
  22. package/reactNativeTypes/index.cjs +2 -0
  23. package/reactNativeTypes/index.js +2 -0
  24. package/reactNativeTypes/index.native.cjs +2 -0
  25. package/reactNativeTypes/index.native.js +2 -0
  26. package/reactNativeTypes.cjs +1 -0
  27. package/src/createOptimizedView.native.tsx +2 -2
  28. package/src/index.tsx +1 -0
  29. package/tsconfig.json +30 -0
  30. package/types/createOptimizedView.native.d.ts +4 -6
  31. package/types/createOptimizedView.native.d.ts.map +1 -1
  32. package/types/index.d.ts +1 -1
  33. package/types/index.d.ts.map +1 -1
  34. package/dist/cjs/createOptimizedView.js +0 -22
  35. package/dist/cjs/createOptimizedView.js.map +0 -6
  36. package/dist/cjs/getBaseViews.js +0 -23
  37. package/dist/cjs/getBaseViews.js.map +0 -6
  38. package/dist/cjs/index.js +0 -78
  39. package/dist/cjs/index.js.map +0 -6
  40. package/dist/cjs/inject-styles.js +0 -28
  41. package/dist/cjs/inject-styles.js.map +0 -6
  42. package/dist/cjs/reactNativeTypes.js +0 -14
  43. package/dist/cjs/reactNativeTypes.js.map +0 -6
  44. package/dist/cjs/vendor/Pressability.js +0 -22
  45. package/dist/cjs/vendor/Pressability.js.map +0 -6
  46. package/dist/esm/createOptimizedView.js +0 -6
  47. package/dist/esm/createOptimizedView.js.map +0 -6
  48. package/dist/esm/getBaseViews.js +0 -7
  49. package/dist/esm/getBaseViews.js.map +0 -6
  50. package/dist/esm/inject-styles.js +0 -12
  51. package/dist/esm/inject-styles.js.map +0 -6
  52. package/dist/esm/reactNativeTypes.js +0 -1
  53. package/dist/esm/reactNativeTypes.js.map +0 -6
  54. package/dist/esm/vendor/Pressability.js +0 -6
  55. package/dist/esm/vendor/Pressability.js.map +0 -6
@@ -50,25 +50,6 @@ function _interopNamespaceDefault(e) {
50
50
  n.default = e;
51
51
  return Object.freeze(n);
52
52
  }
53
- function _mergeNamespaces(n, m) {
54
- for (var i = 0; i < m.length; i++) {
55
- const e = m[i];
56
- if (typeof e !== "string" && !Array.isArray(e)) {
57
- for (const k in e) {
58
- if (k !== "default" && !(k in n)) {
59
- const d = Object.getOwnPropertyDescriptor(e, k);
60
- if (d) {
61
- Object.defineProperty(n, k, d.get ? d : {
62
- enumerable: true,
63
- get: () => e[k]
64
- });
65
- }
66
- }
67
- }
68
- }
69
- }
70
- return Object.freeze(Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }));
71
- }
72
53
  const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
73
54
  var pseudoDescriptorsBase = {
74
55
  // order of keys here important! in priority order
@@ -167,9 +148,9 @@ function objectIdentityKey(obj) {
167
148
  return k;
168
149
  }
169
150
  var cache$5 = /* @__PURE__ */ new WeakMap();
170
- var createReactContext = React["createContext"];
171
- function createStyledContext(defaultValues) {
172
- var namespace = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", OGContext = createReactContext(defaultValues), OGProvider = OGContext.Provider, Context = OGContext, scopedContexts = /* @__PURE__ */ new Map(), LastScopeInNamespace = createReactContext(namespace);
151
+ var createStyledContext = function(defaultValues) {
152
+ "use no memo";
153
+ var namespace = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", createReactContext = React["createContext"], useReactMemo = React["useMemo"], useReactContext = React["useContext"], OGContext = createReactContext(defaultValues), OGProvider = OGContext.Provider, Context = OGContext, scopedContexts = /* @__PURE__ */ new Map(), LastScopeInNamespace = createReactContext(namespace);
173
154
  function getOrCreateScopedContext(scope) {
174
155
  var ScopedContext = scopedContexts.get(scope);
175
156
  return ScopedContext || (ScopedContext = createReactContext(defaultValues), scopedContexts.set(scope, ScopedContext)), ScopedContext;
@@ -186,7 +167,7 @@ function createStyledContext(defaultValues) {
186
167
  "scope",
187
168
  // performance: avoid creating objects
188
169
  "__disableMergeDefaultValues"
189
- ]), scope = getNamespacedScope(scopeIn), next = React.useMemo(function() {
170
+ ]), scope = getNamespacedScope(scopeIn), next = useReactMemo(function() {
190
171
  return __disableMergeDefaultValues ? values : mergeProps(defaultValues, values);
191
172
  }, [objectIdentityKey(values)]), ScopedProvider = OGProvider;
192
173
  return scope && (ScopedProvider = getOrCreateScopedContext(scope).Provider), /* @__PURE__ */ jsxRuntime.jsx(LastScopeInNamespace.Provider, {
@@ -197,11 +178,11 @@ function createStyledContext(defaultValues) {
197
178
  })
198
179
  });
199
180
  }, useStyledContext = function() {
200
- var scopeIn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", lastScopeInNamespace = React.useContext(LastScopeInNamespace), scope = namespace ? scopeIn ? getNamespacedScope(scopeIn) : lastScopeInNamespace : scopeIn, context = scope ? getOrCreateScopedContext(scope) : OGContext, value = React.useContext(context);
181
+ var scopeIn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "", lastScopeInNamespace = useReactContext(LastScopeInNamespace), scope = namespace ? scopeIn ? getNamespacedScope(scopeIn) : lastScopeInNamespace : scopeIn, context = scope ? getOrCreateScopedContext(scope) : OGContext, value = useReactContext(context);
201
182
  return value;
202
183
  };
203
184
  return Context.Provider = Provider, Context.props = defaultValues, Context.context = OGContext, Context.useStyledContext = useStyledContext, Context;
204
- }
185
+ };
205
186
  var ComponentContext = createStyledContext({
206
187
  disableSSR: void 0,
207
188
  inText: false,
@@ -228,20 +209,11 @@ function isEqualShallow(prev, next) {
228
209
  for (var key in next) if (prev[key] !== next[key]) return false;
229
210
  return true;
230
211
  }
231
- var isWeb = false, isBrowser = false, isServer = false, isClient = true, isWindowDefined = false, useIsomorphicLayoutEffect = React.useLayoutEffect, isChrome = false, isWebTouchable = false, isTouchable = true, isAndroid = reactNative.Platform.OS === "android" || process.env.TEST_NATIVE_PLATFORM === "android", isIos = reactNative.Platform.OS === "ios" || process.env.TEST_NATIVE_PLATFORM === "ios", platforms = {
212
+ var isWeb = false, isBrowser = false, isServer$1 = false, isClient = true, isWindowDefined = false, useIsomorphicLayoutEffect = React.useLayoutEffect, isChrome = false, isWebTouchable = false, isTouchable = true, isAndroid = (reactNative.Platform === null || reactNative.Platform === void 0 ? void 0 : reactNative.Platform.OS) === "android" || process.env.TEST_NATIVE_PLATFORM === "android", isIos = (reactNative.Platform === null || reactNative.Platform === void 0 ? void 0 : reactNative.Platform.OS) === "ios" || process.env.TEST_NATIVE_PLATFORM === "ios", platforms = {
232
213
  ios: "ios",
233
214
  android: "android"
234
- }, currentPlatform = platforms[reactNative.Platform.OS] || "native";
235
- var THEME_NAME_SEPARATOR = "_", THEME_CLASSNAME_PREFIX = "t_", FONT_DATA_ATTRIBUTE_NAME = "data-tamagui-font", viewDefaultStyles = {}, webViewFlexCompatStyles = {
236
- display: "flex",
237
- alignItems: "stretch",
238
- flexDirection: "column",
239
- flexBasis: "auto",
240
- boxSizing: "border-box",
241
- minHeight: 0,
242
- minWidth: 0,
243
- flexShrink: 0
244
- }, MISSING_THEME_MESSAGE = "Missing theme.";
215
+ }, currentPlatform = (!(reactNative.Platform === null || reactNative.Platform === void 0) && reactNative.Platform.OS ? platforms[reactNative.Platform.OS] : void 0) || "native";
216
+ var THEME_NAME_SEPARATOR = "_", THEME_CLASSNAME_PREFIX = "t_", FONT_DATA_ATTRIBUTE_NAME = "data-tamagui-font", MISSING_THEME_MESSAGE = "Missing theme.";
245
217
  var conf$1, getConfigFromGlobalOrLocal = function() {
246
218
  return conf$1 || (globalThis.__tamaguiConfig ? globalThis.__tamaguiConfig : null);
247
219
  }, getSetting = function(key) {
@@ -316,6 +288,28 @@ function loadAnimationDriver(name, driver) {
316
288
  [name]: driver
317
289
  };
318
290
  }
291
+ function camelToHyphen(str) {
292
+ return str.replace(/[A-Z]/g, function(m) {
293
+ return `-${m.toLowerCase()}`;
294
+ }).toLowerCase();
295
+ }
296
+ var cache$4 = /* @__PURE__ */ new WeakMap();
297
+ function mediaObjectToString(query) {
298
+ if (typeof query == "string") return query;
299
+ if (cache$4.has(query)) return cache$4.get(query);
300
+ var res = Object.entries(query).map(function(param) {
301
+ var [feature, value] = param;
302
+ return feature = camelToHyphen(feature), typeof value == "string" ? `(${feature}: ${value})` : (typeof value == "number" && /[height|width]$/.test(feature) && (value = `${value}px`), `(${feature}: ${value})`);
303
+ }).join(" and ");
304
+ return cache$4.set(query, res), res;
305
+ }
306
+ exports.mediaState = // development only safeguard
307
+ {};
308
+ var setMediaState = function(next) {
309
+ exports.mediaState = next;
310
+ }, mediaQueryConfig = {}, getMedia = function() {
311
+ return exports.mediaState;
312
+ }, mediaKeys = /* @__PURE__ */ new Set();
319
313
  function kebabToCamel(str) {
320
314
  return str.replace(/-([a-z])/g, function(_2, c) {
321
315
  return c.toUpperCase();
@@ -340,7 +334,7 @@ var groupPseudoToPseudoCSSMap = {
340
334
  press: "active",
341
335
  focusVisible: "focus-visible",
342
336
  focusWithin: "focus-within"
343
- }, specificities = new Array(5).fill(0).map(function(_2, i) {
337
+ }, specificities = new Array(12).fill(0).map(function(_2, i) {
344
338
  return new Array(i).fill(":root").join("");
345
339
  });
346
340
  function getThemeOrGroupSelector(name, styleInner, isGroup, groupParts) {
@@ -349,7 +343,7 @@ function getThemeOrGroupSelector(name, styleInner, isGroup, groupParts) {
349
343
  }
350
344
  var createMediaStyle = function(styleObject, mediaKeyIn, mediaQueries, type, negate, priority) {
351
345
  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), id = `${ogPrefix}${MEDIA_SEP}${mediaKeyIn.replace("-", "")}${negKey}${MEDIA_SEP}`, styleRule = "", groupPriority = "", groupMediaKey, containerName, nextIdentifier = identifier.replace(ogPrefix, id), styleInner = rules.map(function(rule) {
352
- return rule.replace(identifier, nextIdentifier);
346
+ return rule.replaceAll(identifier, nextIdentifier);
353
347
  }).join(";"), isHover = false;
354
348
  if (isNonWindowMedia) {
355
349
  var specificity = (priority || 0) + (isGroup || isPlatform ? 1 : 0);
@@ -362,7 +356,10 @@ var createMediaStyle = function(styleObject, mediaKeyIn, mediaQueries, type, neg
362
356
  groupMediaKey = media, isGroup && (containerName = name), (pseudo === "press" || pseudoIn === "active") && (specificity += 2), pseudo === "hover" && (isHover = true);
363
357
  var [selector, nextSelector] = getThemeOrGroupSelector(name, styleInner, isGroup, groupParts, isTheme, specificities[specificity]);
364
358
  styleRule = styleInner.replace(selector, nextSelector);
365
- } else styleRule = `${specificities[specificity]}${styleInner}`;
359
+ } else {
360
+ var prefix = specificities[specificity];
361
+ styleRule = prefix && styleInner[0] === "@" ? styleInner.replace("{", `{${prefix}`) : `${prefix}${styleInner}`;
362
+ }
366
363
  }
367
364
  if (!isNonWindowMedia || groupMediaKey) {
368
365
  if (!selectors) {
@@ -373,8 +370,8 @@ var createMediaStyle = function(styleObject, mediaKeyIn, mediaQueries, type, neg
373
370
  return [k, new Array(index2 + 1).fill(":root").join("")];
374
371
  }));
375
372
  }
376
- 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";
377
- 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}}`);
373
+ var mediaKey = groupMediaKey || mediaKeyIn, mediaSelector = selectors[mediaKey], screenStr = negate ? "not all and " : "", mediaQuery = `${screenStr}${mediaSelector}`, precedenceImportancePrefix = groupMediaKey ? groupPriority : prefixes[mediaKey], prefix1 = groupMediaKey ? `@container ${containerName}` : "@media";
374
+ groupMediaKey && (styleInner = styleRule), styleInner.includes(prefix1) ? styleRule = styleInner.replace("{", ` and ${mediaQuery} {`).replace("and screen and", "and") : styleRule = `${prefix1} ${mediaQuery}{${precedenceImportancePrefix}${styleInner}}`, groupMediaKey && (styleRule = `@supports (contain: ${getSetting("webContainerType") || "inline-size"}) {${styleRule}}`);
378
375
  }
379
376
  return isHover && (styleRule = `@media (hover:hover){${styleRule}}`), [property, void 0, nextIdentifier, void 0, [styleRule]];
380
377
  };
@@ -397,11 +394,7 @@ function matchMediaFallback(query) {
397
394
  function setupMatchMedia(_2) {
398
395
  matchMediaImpl = _2, globalThis.matchMedia = _2;
399
396
  }
400
- exports.mediaState = // development only safeguard
401
- {};
402
- var mediaQueryConfig = {}, getMedia = function() {
403
- return exports.mediaState;
404
- }, mediaKeys = /* @__PURE__ */ new Set(), mediaKeyRegex = /\$(platform|theme|group)-/, getMediaKey = function(key) {
397
+ var mediaKeyRegex = /\$(platform|theme|group)-/, getMediaKey = function(key) {
405
398
  if (key[0] !== "$") return false;
406
399
  if (mediaKeys.has(key)) return true;
407
400
  var match = key.match(mediaKeyRegex);
@@ -414,8 +407,8 @@ var mediaQueryConfig = {}, getMedia = function() {
414
407
  } = config, mediaQueryDefaultActive = getSetting("mediaQueryDefaultActive");
415
408
  if (media) {
416
409
  mediaVersion++, resetMediaStyleCache();
417
- for (var key in media) exports.mediaState[key] = (mediaQueryDefaultActive == null ? void 0 : mediaQueryDefaultActive[key]) || false, mediaKeys.add(`$${key}`);
418
- Object.assign(mediaQueryConfig, media), initState = __spreadValues({}, exports.mediaState), mediaKeysOrdered = Object.keys(media), setupMediaListeners();
410
+ for (var key in media) getMedia()[key] = (mediaQueryDefaultActive == null ? void 0 : mediaQueryDefaultActive[key]) || false, mediaKeys.add(`$${key}`);
411
+ Object.assign(mediaQueryConfig, media), initState = __spreadValues({}, getMedia()), mediaKeysOrdered = Object.keys(media), setupMediaListeners();
419
412
  }
420
413
  };
421
414
  function unlisten() {
@@ -435,9 +428,9 @@ function setupMediaListeners() {
435
428
  });
436
429
  function update() {
437
430
  var next = !!getMatch().matches;
438
- next !== exports.mediaState[key2] && (exports.mediaState = __spreadProps(__spreadValues({}, exports.mediaState), {
431
+ next !== getMedia()[key2] && (setMediaState(__spreadProps(__spreadValues({}, getMedia()), {
439
432
  [key2]: next
440
- }), updateMediaListeners());
433
+ })), updateMediaListeners());
441
434
  }
442
435
  update();
443
436
  };
@@ -449,7 +442,7 @@ function setupMediaListeners() {
449
442
  var listeners = /* @__PURE__ */ new Set();
450
443
  function updateMediaListeners() {
451
444
  listeners.forEach(function(cb) {
452
- return cb(exports.mediaState);
445
+ return cb(getMedia());
453
446
  });
454
447
  }
455
448
  var States = /* @__PURE__ */ new WeakMap();
@@ -466,26 +459,27 @@ function subscribe(subscriber) {
466
459
  };
467
460
  }
468
461
  function useMedia(componentContext, debug) {
462
+ "use no memo";
469
463
  var componentState = componentContext ? States.get(componentContext) : null, internalRef = React.useRef(null);
470
464
  internalRef.current || (internalRef.current = {
471
465
  keys: /* @__PURE__ */ new Set(),
472
- lastState: exports.mediaState
466
+ lastState: getMedia()
473
467
  }), internalRef.current.pendingState && (internalRef.current.lastState = internalRef.current.pendingState, internalRef.current.pendingState = void 0);
474
468
  var {
475
469
  keys
476
470
  } = internalRef.current;
477
471
  keys.size && keys.clear();
478
- var state = React.useSyncExternalStore(subscribe, function() {
472
+ var state2 = React.useSyncExternalStore(subscribe, function() {
479
473
  var curKeys2 = (componentState == null ? void 0 : componentState.keys) || keys, {
480
474
  lastState,
481
475
  pendingState
482
476
  } = internalRef.current;
483
477
  if (!curKeys2.size) return lastState;
484
- var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
478
+ var ms = getMedia(), _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
485
479
  try {
486
480
  for (var _iterator = curKeys2[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
487
481
  var key = _step.value;
488
- if (exports.mediaState[key] !== (pendingState || lastState)[key]) return false, (componentContext == null ? void 0 : componentContext.mediaEmit) ? (componentContext.mediaEmit(exports.mediaState), internalRef.current.pendingState = exports.mediaState, lastState) : (internalRef.current.lastState = exports.mediaState, exports.mediaState);
482
+ if (ms[key] !== (pendingState || lastState)[key]) return false, (componentContext == null ? void 0 : componentContext.mediaEmit) ? (componentContext.mediaEmit(ms), internalRef.current.pendingState = ms, lastState) : (internalRef.current.lastState = ms, ms);
489
483
  }
490
484
  } catch (err) {
491
485
  _didIteratorError = true, _iteratorError = err;
@@ -498,9 +492,9 @@ function useMedia(componentContext, debug) {
498
492
  }
499
493
  return lastState;
500
494
  }, getServerSnapshot);
501
- return new Proxy(state, {
495
+ return new Proxy(state2, {
502
496
  get(_2, key) {
503
- return !disableMediaTouch && typeof key == "string" && keys.add(key), Reflect.get(state, key);
497
+ return !disableMediaTouch && typeof key == "string" && keys.add(key), Reflect.get(state2, key);
504
498
  }
505
499
  });
506
500
  }
@@ -526,21 +520,6 @@ var getMediaImportanceIfMoreImportant = function(mediaKey, key, styleState, isSi
526
520
  var importance = isSizeMedia ? getMediaKeyImportance(mediaKey) : defaultMediaImportance, usedKeys = styleState.usedKeys;
527
521
  return !usedKeys[key] || importance > usedKeys[key] ? importance : null;
528
522
  };
529
- function camelToHyphen(str) {
530
- return str.replace(/[A-Z]/g, function(m) {
531
- return `-${m.toLowerCase()}`;
532
- }).toLowerCase();
533
- }
534
- var cache$4 = /* @__PURE__ */ new WeakMap();
535
- function mediaObjectToString(query, key) {
536
- if (typeof query == "string") return query;
537
- if (cache$4.has(query)) return cache$4.get(query);
538
- var res = Object.entries(query).map(function(param) {
539
- var [feature, value] = param;
540
- return feature = camelToHyphen(feature), typeof value == "string" ? `(${feature}: ${value})` : (typeof value == "number" && /[height|width]$/.test(feature) && (value = `${value}px`), `(${feature}: ${value})`);
541
- }).join(" and ");
542
- return cache$4.set(query, res), res;
543
- }
544
523
  function mediaKeyMatch(key, dimensions) {
545
524
  var mediaQueries = mediaQueryConfig[key], result = Object.keys(mediaQueries).every(function(query) {
546
525
  var expectedVal = +mediaQueries[query], isMax = query.startsWith("max"), isWidth = query.endsWith("Width"), givenVal = dimensions[isWidth ? "width" : "height"];
@@ -630,75 +609,29 @@ function resolvePlatformNames(nativeProp) {
630
609
  ) : Array.isArray(nativeProp) ? nativeProp : [nativeProp], set = new Set(platforms2);
631
610
  return set.has("mobile") && (set.add("android"), set.add("ios"), set.delete("mobile")), set;
632
611
  }
633
- var webOnlyStylePropsView = {
634
- transition: true,
635
- textWrap: true,
636
- backdropFilter: true,
637
- WebkitBackdropFilter: true,
638
- background: true,
639
- borderTop: true,
640
- borderRight: true,
641
- borderBottom: true,
642
- borderLeft: true,
643
- backgroundAttachment: true,
644
- backgroundBlendMode: true,
645
- backgroundClip: true,
646
- backgroundOrigin: true,
647
- backgroundPosition: true,
648
- backgroundRepeat: true,
649
- backgroundSize: true,
612
+ var cssShorthandLonghands = {
613
+ // border longhands
614
+ borderWidth: true,
615
+ borderStyle: true,
616
+ borderColor: true,
617
+ borderTopWidth: true,
618
+ borderTopStyle: true,
619
+ borderTopColor: true,
620
+ borderRightWidth: true,
621
+ borderRightStyle: true,
622
+ borderRightColor: true,
623
+ borderBottomWidth: true,
650
624
  borderBottomStyle: true,
651
- borderImage: true,
625
+ borderBottomColor: true,
626
+ borderLeftWidth: true,
652
627
  borderLeftStyle: true,
653
- borderRightStyle: true,
654
- borderTopStyle: true,
655
- caretColor: true,
656
- clipPath: true,
657
- contain: true,
658
- containerType: true,
659
- content: true,
660
- float: true,
661
- mask: true,
662
- maskBorder: true,
663
- maskBorderMode: true,
664
- maskBorderOutset: true,
665
- maskBorderRepeat: true,
666
- maskBorderSlice: true,
667
- maskBorderSource: true,
668
- maskBorderWidth: true,
669
- maskClip: true,
670
- maskComposite: true,
671
- maskImage: true,
672
- maskMode: true,
673
- maskOrigin: true,
674
- maskPosition: true,
675
- maskRepeat: true,
676
- maskSize: true,
677
- maskType: true,
678
- objectFit: true,
679
- objectPosition: true,
680
- overflowBlock: true,
681
- overflowInline: true,
682
- overflowX: true,
683
- overflowY: true,
684
- // NOTE: pointerEvents is NOT web-only - it's a core React Native View prop (not a style)
685
- pointerEvents: true,
686
- scrollbarWidth: true,
687
- textEmphasis: true,
688
- touchAction: true,
689
- transformStyle: true,
690
- userSelect: true,
691
- willChange: true
692
- }, webOnlyStylePropsText = {
693
- whiteSpace: true,
694
- wordWrap: true,
695
- textOverflow: true,
696
- textDecorationDistance: true,
697
- // cursor: now cross-platform - in stylePropsView
698
- WebkitLineClamp: true,
699
- WebkitBoxOrient: true
700
- };
701
- var textColors = {
628
+ borderLeftColor: true,
629
+ // outline longhands
630
+ outlineWidth: true,
631
+ outlineStyle: true,
632
+ outlineColor: true,
633
+ outlineOffset: true
634
+ }, textColors = {
702
635
  color: true,
703
636
  textDecorationColor: true,
704
637
  textShadowColor: true
@@ -752,8 +685,47 @@ var textColors = {
752
685
  // outlineColor is supported on RN 0.77+ (New Architecture)
753
686
  outlineColor: true
754
687
  })
755
- }, stylePropsUnitless = {
688
+ }, nonAnimatableViewProps = {
689
+ alignContent: true,
690
+ alignItems: true,
691
+ alignSelf: true,
692
+ backfaceVisibility: true,
693
+ borderCurve: true,
694
+ borderStyle: true,
695
+ borderBlockStyle: true,
696
+ borderBlockEndStyle: true,
697
+ borderBlockStartStyle: true,
698
+ borderInlineStyle: true,
699
+ borderInlineEndStyle: true,
700
+ borderInlineStartStyle: true,
701
+ boxSizing: true,
702
+ cursor: true,
703
+ direction: true,
704
+ display: true,
705
+ flexDirection: true,
706
+ flexWrap: true,
707
+ isolation: true,
708
+ justifyContent: true,
709
+ mixBlendMode: true,
710
+ outlineStyle: true,
711
+ overflow: true,
712
+ position: true
713
+ }, nonAnimatableFontProps = {
714
+ fontFamily: true,
715
+ fontStyle: true,
716
+ fontVariant: true,
717
+ textTransform: true
718
+ }, nonAnimatableTextOnlyProps = {
719
+ textAlign: true,
720
+ textDecorationLine: true,
721
+ textDecorationStyle: true,
722
+ userSelect: true
723
+ }, nonAnimatableUnitlessProps = {
756
724
  WebkitLineClamp: true,
725
+ lineClamp: true,
726
+ gridTemplateColumns: true,
727
+ gridTemplateAreas: true
728
+ }, nonAnimatableStyleProps = __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, nonAnimatableViewProps), nonAnimatableFontProps), nonAnimatableTextOnlyProps), nonAnimatableUnitlessProps), stylePropsUnitless = __spreadProps(__spreadValues({}, nonAnimatableUnitlessProps), {
757
729
  animationIterationCount: true,
758
730
  aspectRatio: true,
759
731
  borderImageOutset: true,
@@ -775,9 +747,6 @@ var textColors = {
775
747
  gridColumnEnd: true,
776
748
  gridColumnGap: true,
777
749
  gridColumnStart: true,
778
- gridTemplateColumns: true,
779
- gridTemplateAreas: true,
780
- lineClamp: true,
781
750
  opacity: true,
782
751
  order: true,
783
752
  orphans: true,
@@ -790,7 +759,7 @@ var textColors = {
790
759
  scaleY: true,
791
760
  scaleZ: true,
792
761
  shadowOpacity: true
793
- }, stylePropsTransform = {
762
+ }), stylePropsTransform = {
794
763
  x: true,
795
764
  y: true,
796
765
  scale: true,
@@ -804,10 +773,7 @@ var textColors = {
804
773
  rotateY: true,
805
774
  rotateX: true,
806
775
  rotateZ: true
807
- }, stylePropsView = __spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({
808
- backfaceVisibility: true,
809
- borderCurve: true,
810
- cursor: true,
776
+ }, stylePropsView = __spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadProps(__spreadValues({}, nonAnimatableViewProps), {
811
777
  borderBottomEndRadius: true,
812
778
  borderBottomStartRadius: true,
813
779
  borderBottomWidth: true,
@@ -819,34 +785,20 @@ var textColors = {
819
785
  borderInlineWidth: true,
820
786
  borderInlineEndWidth: true,
821
787
  borderInlineStartWidth: true,
822
- borderStyle: true,
823
- borderBlockStyle: true,
824
- borderBlockEndStyle: true,
825
- borderBlockStartStyle: true,
826
- borderInlineStyle: true,
827
- borderInlineEndStyle: true,
828
- borderInlineStartStyle: true,
829
788
  borderTopEndRadius: true,
830
789
  borderTopStartRadius: true,
831
790
  borderTopWidth: true,
832
791
  borderWidth: true,
833
792
  transform: true,
834
793
  transformOrigin: true,
835
- alignContent: true,
836
- alignItems: true,
837
- alignSelf: true,
838
794
  borderEndWidth: true,
839
795
  borderStartWidth: true,
840
796
  bottom: true,
841
- display: true,
842
797
  end: true,
843
798
  flexBasis: true,
844
- flexDirection: true,
845
- flexWrap: true,
846
799
  gap: true,
847
800
  columnGap: true,
848
801
  rowGap: true,
849
- justifyContent: true,
850
802
  left: true,
851
803
  margin: true,
852
804
  marginBlock: true,
@@ -863,7 +815,6 @@ var textColors = {
863
815
  marginStart: true,
864
816
  marginTop: true,
865
817
  marginVertical: true,
866
- overflow: true,
867
818
  padding: true,
868
819
  paddingBottom: true,
869
820
  paddingInline: true,
@@ -878,7 +829,6 @@ var textColors = {
878
829
  paddingStart: true,
879
830
  paddingTop: true,
880
831
  paddingVertical: true,
881
- position: true,
882
832
  right: true,
883
833
  start: true,
884
834
  top: true,
@@ -889,10 +839,9 @@ var textColors = {
889
839
  insetInline: true,
890
840
  insetInlineEnd: true,
891
841
  insetInlineStart: true,
892
- direction: true,
893
842
  shadowOffset: true,
894
843
  shadowRadius: true
895
- }, tokenCategories.color), tokenCategories.radius), tokenCategories.size), tokenCategories.radius), stylePropsTransform), stylePropsUnitless), isAndroid ? {
844
+ }), tokenCategories.color), tokenCategories.radius), tokenCategories.size), stylePropsTransform), stylePropsUnitless), isAndroid ? {
896
845
  elevationAndroid: true
897
846
  } : {}), {
898
847
  boxShadow: true,
@@ -903,31 +852,19 @@ var textColors = {
903
852
  // the actual RN 0.76+ prop name (backgroundImage expands to this on native)
904
853
  experimental_backgroundImage: true,
905
854
  // RN 0.76/0.77+ style props (New Architecture)
906
- boxSizing: true,
907
- mixBlendMode: true,
908
- isolation: true,
855
+ outline: true,
909
856
  outlineColor: true,
910
857
  outlineOffset: true,
911
- outlineStyle: true,
912
858
  outlineWidth: true
913
- }), stylePropsFont = {
914
- fontFamily: true,
859
+ }), stylePropsFont = __spreadProps(__spreadValues({}, nonAnimatableFontProps), {
915
860
  fontSize: true,
916
- fontStyle: true,
917
861
  fontWeight: true,
918
- fontVariant: true,
919
862
  letterSpacing: true,
920
- lineHeight: true,
921
- textTransform: true
922
- }, stylePropsTextOnly = __spreadProps(__spreadValues(__spreadProps(__spreadValues({}, stylePropsFont), {
923
- textAlign: true,
924
- textDecorationLine: true,
925
- textDecorationStyle: true
926
- }), textColors), {
863
+ lineHeight: true
864
+ }), stylePropsTextOnly = __spreadProps(__spreadValues(__spreadValues(__spreadValues({}, stylePropsFont), nonAnimatableTextOnlyProps), textColors), {
927
865
  textShadow: true,
928
866
  textShadowOffset: true,
929
867
  textShadowRadius: true,
930
- userSelect: true,
931
868
  verticalAlign: true
932
869
  }), stylePropsText = __spreadValues(__spreadValues({}, stylePropsView), stylePropsTextOnly), stylePropsAll = stylePropsText, validPseudoKeys = {
933
870
  enterStyle: true,
@@ -941,6 +878,76 @@ var textColors = {
941
878
  var Decorated = /* @__PURE__ */ Symbol(), withStaticProperties = function(component, staticProps) {
942
879
  return Object.assign(component, staticProps), component[Decorated] = true, component;
943
880
  };
881
+ var nonAnimatableWebViewProps = {
882
+ backgroundAttachment: true,
883
+ backgroundBlendMode: true,
884
+ backgroundClip: true,
885
+ backgroundOrigin: true,
886
+ backgroundRepeat: true,
887
+ borderBottomStyle: true,
888
+ borderLeftStyle: true,
889
+ borderRightStyle: true,
890
+ borderTopStyle: true,
891
+ contain: true,
892
+ containerType: true,
893
+ content: true,
894
+ float: true,
895
+ maskBorderMode: true,
896
+ maskBorderRepeat: true,
897
+ maskClip: true,
898
+ maskComposite: true,
899
+ maskMode: true,
900
+ maskOrigin: true,
901
+ maskRepeat: true,
902
+ maskType: true,
903
+ objectFit: true,
904
+ overflowBlock: true,
905
+ overflowInline: true,
906
+ overflowX: true,
907
+ overflowY: true,
908
+ // NOTE: pointerEvents is NOT web-only - it's a core React Native View prop (not a style)
909
+ pointerEvents: true,
910
+ scrollbarWidth: true,
911
+ textWrap: true,
912
+ touchAction: true,
913
+ transformStyle: true,
914
+ willChange: true
915
+ }, nonAnimatableWebTextProps = {
916
+ whiteSpace: true,
917
+ wordWrap: true,
918
+ textOverflow: true,
919
+ WebkitBoxOrient: true
920
+ }, webOnlyStylePropsView = __spreadProps(__spreadValues({}, nonAnimatableWebViewProps), {
921
+ transition: true,
922
+ backdropFilter: true,
923
+ WebkitBackdropFilter: true,
924
+ background: true,
925
+ borderTop: true,
926
+ borderRight: true,
927
+ borderBottom: true,
928
+ borderLeft: true,
929
+ backgroundPosition: true,
930
+ backgroundSize: true,
931
+ borderImage: true,
932
+ caretColor: true,
933
+ clipPath: true,
934
+ mask: true,
935
+ maskBorder: true,
936
+ maskBorderOutset: true,
937
+ maskBorderSlice: true,
938
+ maskBorderSource: true,
939
+ maskBorderWidth: true,
940
+ maskImage: true,
941
+ maskPosition: true,
942
+ maskSize: true,
943
+ objectPosition: true,
944
+ textEmphasis: true,
945
+ userSelect: true
946
+ }), webOnlyStylePropsText = __spreadProps(__spreadValues({}, nonAnimatableWebTextProps), {
947
+ textDecorationDistance: true,
948
+ // cursor: now cross-platform - in stylePropsView
949
+ WebkitLineClamp: true
950
+ });
944
951
  function _type_of$6(obj) {
945
952
  "@swc/helpers - typeof";
946
953
  return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
@@ -1047,16 +1054,17 @@ function extractValueFromDynamic(val, scheme) {
1047
1054
  return (val == null ? void 0 : val.dynamic) ? val.dynamic[scheme] : val;
1048
1055
  }
1049
1056
  var ThemeStateContext = React.createContext(""), allListeners = /* @__PURE__ */ new Map(), listenersByParent = {}, HasRenderedOnce = /* @__PURE__ */ new WeakMap(), HadTheme = /* @__PURE__ */ new WeakMap(), PendingUpdate = /* @__PURE__ */ new Map(), states = /* @__PURE__ */ new Map(), localStates = /* @__PURE__ */ new Map(), shouldForce = false, forceUpdateThemes = function() {
1050
- shouldForce = true, allListeners.forEach(function(cb) {
1057
+ cacheVersion++, shouldForce = true, allListeners.forEach(function(cb) {
1051
1058
  return cb();
1052
1059
  });
1053
1060
  }, getThemeState = function(id) {
1054
1061
  return states.get(id);
1055
- }, themes = null, rootThemeState = null, getRootThemeState = function() {
1062
+ }, cacheVersion = 0, themeNameCache = /* @__PURE__ */ new Map(), themeNameCacheVer = -1, themes = null, rootThemeState = null, getRootThemeState = function() {
1056
1063
  return rootThemeState;
1057
1064
  }, getThemeBaseName = function(name) {
1058
1065
  return name.replace(/^(light|dark)_/, "");
1059
1066
  }, useThemeState = function(props) {
1067
+ "use no memo";
1060
1068
  var isRoot = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false, keys = arguments.length > 2 ? arguments[2] : void 0, schemeKeys = arguments.length > 3 ? arguments[3] : void 0, {
1061
1069
  disable
1062
1070
  } = props, parentId = React.useContext(ThemeStateContext);
@@ -1067,17 +1075,18 @@ var ThemeStateContext = React.createContext(""), allListeners = /* @__PURE__ */
1067
1075
  theme: getConfig().themes.light
1068
1076
  };
1069
1077
  var id = React.useId(), subscribe2 = React.useCallback(function(cb) {
1070
- var _listenersByParent, _parentId;
1071
- return (_listenersByParent = listenersByParent)[_parentId = parentId] || (_listenersByParent[_parentId] = /* @__PURE__ */ new Set()), listenersByParent[parentId].add(id), allListeners.set(id, function() {
1078
+ return listenersByParent[parentId] = listenersByParent[parentId] || /* @__PURE__ */ new Set(), listenersByParent[parentId].add(id), allListeners.set(id, function() {
1072
1079
  PendingUpdate.set(id, shouldForce ? "force" : true), cb();
1073
1080
  }), function() {
1074
1081
  allListeners.delete(id), listenersByParent[parentId].delete(id), localStates.delete(id), states.delete(id), PendingUpdate.delete(id);
1075
1082
  };
1076
1083
  }, [id, parentId]), propsKey = getPropsKey(props), getSnapshot = function() {
1077
- var _keys_current, _schemeKeys_current, _keys_current1, _props_needsUpdate, local = localStates.get(id), parentState = states.get(parentId), isSchemeOnlyChange = isIos && getSetting("fastSchemeChange") && local && parentState && local.scheme !== parentState.scheme && getThemeBaseName(local.name) === getThemeBaseName(parentState.name), _keys_current_size, keysSize = (_keys_current_size = keys == null || (_keys_current = keys.current) === null || _keys_current === void 0 ? void 0 : _keys_current.size) !== null && _keys_current_size !== void 0 ? _keys_current_size : 0, _schemeKeys_current_size, schemeKeysSize = (_schemeKeys_current_size = schemeKeys == null || (_schemeKeys_current = schemeKeys.current) === null || _schemeKeys_current === void 0 ? void 0 : _schemeKeys_current.size) !== null && _schemeKeys_current_size !== void 0 ? _schemeKeys_current_size : 0, allKeysSchemeOptimized = schemeKeysSize === keysSize && keysSize > 0, canSkipForSchemeChange = isSchemeOnlyChange && allKeysSchemeOptimized, needsUpdate = props.passThrough ? false : isRoot || props.name === "light" || props.name === "dark" || props.name === null ? true : HasRenderedOnce.get(keys) ? canSkipForSchemeChange ? false : !(keys == null || (_keys_current1 = keys.current) === null || _keys_current1 === void 0) && _keys_current1.size ? true : (_props_needsUpdate = props.needsUpdate) === null || _props_needsUpdate === void 0 ? void 0 : _props_needsUpdate.call(props) : true, [rerender, next] = getNextState(local, props, propsKey, isRoot, id, parentId, needsUpdate, PendingUpdate.get(id));
1078
- return PendingUpdate.delete(id), (!local || rerender) && (local = __spreadValues({}, next), localStates.set(id, local)), Object.assign(local, next), local.id = id, states.set(id, next), local;
1084
+ var _keys_current, _schemeKeys_current, _keys_current1, _props_needsUpdate, local = localStates.get(id), parentState = states.get(parentId);
1085
+ if (local && !PendingUpdate.has(id) && parentState && local._parentName === parentState.name && local._propsKey === propsKey) return local;
1086
+ var isSchemeOnlyChange = isIos && getSetting("fastSchemeChange") && local && parentState && local.scheme !== parentState.scheme && getThemeBaseName(local.name) === getThemeBaseName(parentState.name), _keys_current_size, keysSize = (_keys_current_size = keys == null || (_keys_current = keys.current) === null || _keys_current === void 0 ? void 0 : _keys_current.size) !== null && _keys_current_size !== void 0 ? _keys_current_size : 0, _schemeKeys_current_size, schemeKeysSize = (_schemeKeys_current_size = schemeKeys == null || (_schemeKeys_current = schemeKeys.current) === null || _schemeKeys_current === void 0 ? void 0 : _schemeKeys_current.size) !== null && _schemeKeys_current_size !== void 0 ? _schemeKeys_current_size : 0, allKeysSchemeOptimized = schemeKeysSize === keysSize && keysSize > 0, canSkipForSchemeChange = isSchemeOnlyChange && allKeysSchemeOptimized, needsUpdate = props.passThrough ? false : isRoot || props.name === "light" || props.name === "dark" || props.name === null ? true : HasRenderedOnce.get(keys) ? canSkipForSchemeChange ? false : !(keys == null || (_keys_current1 = keys.current) === null || _keys_current1 === void 0) && _keys_current1.size ? true : (_props_needsUpdate = props.needsUpdate) === null || _props_needsUpdate === void 0 ? void 0 : _props_needsUpdate.call(props) : true, [rerender, next] = getNextState(local, props, propsKey, isRoot, id, parentId, needsUpdate, PendingUpdate.get(id));
1087
+ return PendingUpdate.delete(id), (!local || rerender) && (local = __spreadValues({}, next), localStates.set(id, local)), next !== local && (Object.assign(local, next), local.id = id), local._parentName = parentState == null ? void 0 : parentState.name, local._propsKey = propsKey, states.set(id, next), local;
1079
1088
  };
1080
- var state = React.useSyncExternalStore(subscribe2, getSnapshot, getSnapshot);
1089
+ var state2 = React.useSyncExternalStore(subscribe2, getSnapshot, getSnapshot);
1081
1090
  return useIsomorphicLayoutEffect(function() {
1082
1091
  if (!HasRenderedOnce.get(keys)) {
1083
1092
  HasRenderedOnce.set(keys, true);
@@ -1088,7 +1097,7 @@ var ThemeStateContext = React.createContext(""), allListeners = /* @__PURE__ */
1088
1097
  return;
1089
1098
  }
1090
1099
  scheduleUpdate(id), HadTheme.set(keys, true);
1091
- }, [keys, propsKey]), state;
1100
+ }, [keys, propsKey]), state2;
1092
1101
  }, getNextState = function(lastState, props, propsKey) {
1093
1102
  var isRoot = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false, id = arguments.length > 4 ? arguments[4] : void 0, parentId = arguments.length > 5 ? arguments[5] : void 0, needsUpdate = arguments.length > 6 ? arguments[6] : void 0, pendingUpdate = arguments.length > 7 ? arguments[7] : void 0, {
1094
1103
  debug
@@ -1098,7 +1107,7 @@ var ThemeStateContext = React.createContext(""), allListeners = /* @__PURE__ */
1098
1107
  }];
1099
1108
  themes || (themes = getConfig().themes);
1100
1109
  var name = !propsKey && (!lastState || !(lastState == null ? void 0 : lastState.isNew)) ? null : getNewThemeName(parentState == null ? void 0 : parentState.name, props, pendingUpdate === "force" ? true : !!needsUpdate), isSameAsParent = parentState && (!name || name === parentState.name), shouldRerender = !!(pendingUpdate === "force" || needsUpdate && (pendingUpdate || (lastState == null ? void 0 : lastState.name) !== (parentState == null ? void 0 : parentState.name)));
1101
- if (isSameAsParent) return [shouldRerender, __spreadProps(__spreadValues({}, parentState), {
1110
+ if (isSameAsParent) return !shouldRerender && lastState && lastState.name === parentState.name ? [false, lastState] : [shouldRerender, __spreadProps(__spreadValues({}, parentState), {
1102
1111
  isNew: false
1103
1112
  })];
1104
1113
  if (!name) {
@@ -1164,14 +1173,23 @@ function getNewThemeName() {
1164
1173
  reset
1165
1174
  } = props, componentName = props.unstyled ? void 0 : props.componentName;
1166
1175
  if (name && reset) throw new Error("Cannot reset and set a new name at the same time.");
1176
+ var cacheKey = `${parentName}|${name || ""}|${componentName || ""}|${reset ? 1 : 0}|${forceUpdate ? 1 : 0}`;
1177
+ if (themeNameCacheVer !== cacheVersion) themeNameCache.clear(), themeNameCacheVer = cacheVersion;
1178
+ else {
1179
+ var cached = themeNameCache.get(cacheKey);
1180
+ if (cached !== void 0) return cached;
1181
+ }
1167
1182
  var {
1168
1183
  themes: themes2
1169
1184
  } = getConfig();
1170
1185
  if (reset) {
1171
1186
  var isSchemeOnly = parentName === "light" || parentName === "dark";
1172
- if (isSchemeOnly) return parentName === "light" ? "dark" : "light";
1173
- var lastPartIndex = parentName.lastIndexOf("_"), name1 = lastPartIndex <= 0 ? parentName : parentName.slice(lastPartIndex), scheme = parentName.slice(0, lastPartIndex), result = themes2[name1] ? name1 : scheme;
1174
- return result;
1187
+ if (isSchemeOnly) {
1188
+ var result = parentName === "light" ? "dark" : "light";
1189
+ return themeNameCache.set(cacheKey, result), result;
1190
+ }
1191
+ var lastPartIndex = parentName.lastIndexOf("_"), name1 = lastPartIndex <= 0 ? parentName : parentName.slice(lastPartIndex), scheme = parentName.slice(0, lastPartIndex), result1 = themes2[name1] ? name1 : scheme;
1192
+ return themeNameCache.set(cacheKey, result1), result1;
1175
1193
  }
1176
1194
  var parentParts = parentName.split("_"), lastName = parentParts[parentParts.length - 1];
1177
1195
  lastName && lastName[0].toLowerCase() !== lastName[0] && parentParts.pop();
@@ -1262,7 +1280,7 @@ function getNewThemeName() {
1262
1280
  }
1263
1281
  return !forceUpdate && found === parentName && // if its a scheme only sub-theme, we always consider it "new" because it likely inverses
1264
1282
  // and we want to avoid reparenting
1265
- !validSchemes[found] ? null : found;
1283
+ !validSchemes[found] ? (themeNameCache.set(cacheKey, null), null) : (themeNameCache.set(cacheKey, found), found);
1266
1284
  }
1267
1285
  var getPropsKey = function(param) {
1268
1286
  var {
@@ -1320,29 +1338,39 @@ function getThemeProxied(_props, _state, _keys, _schemeKeys) {
1320
1338
  return cache$2.set(_state.theme, proxied1), proxied1;
1321
1339
  }
1322
1340
  var EMPTY = {}, useTheme = function() {
1341
+ "use no memo";
1323
1342
  var [theme] = useThemeWithState(EMPTY), res = theme;
1324
1343
  return res;
1325
1344
  }, useThemeWithState = function(props) {
1345
+ "use no memo";
1326
1346
  var isRoot = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false, keys = React.useRef(null), schemeKeys = React.useRef(null), themeState = useThemeState(props, isRoot, keys, schemeKeys);
1327
1347
  var themeProxied = props.passThrough ? {} : getThemeProxied(props, themeState, keys, schemeKeys);
1328
1348
  return [themeProxied, themeState];
1329
1349
  };
1330
- var _withStableStyle = function(Component, styleProvider) {
1331
- return /* @__PURE__ */ React.forwardRef(function(props, ref) {
1350
+ var _withStableStyle = function(Component, createStyle) {
1351
+ return /* @__PURE__ */ React.memo(/* @__PURE__ */ React.forwardRef(function(props, ref) {
1332
1352
  var _a = props, {
1333
1353
  _expressions = []
1334
1354
  } = _a, rest = __objRest(_a, [
1335
1355
  "_expressions"
1336
- ]), theme = useTheme(), hasMediaKeys = _expressions.some(function(expr) {
1356
+ ]), parentId = React.useContext(ThemeStateContext);
1357
+ if (!parentId) {
1358
+ var config = getConfigMaybe(), themes2 = config == null ? void 0 : config.themes, fallback = themes2 ? themes2.light || themes2.dark || Object.values(themes2)[0] : {};
1359
+ return /* @__PURE__ */ jsxRuntime.jsx(Component, __spreadValues({
1360
+ ref,
1361
+ style: createStyle(fallback, _expressions)
1362
+ }, rest));
1363
+ }
1364
+ var theme = useTheme(), hasMediaKeys = _expressions.some(function(expr) {
1337
1365
  return typeof expr == "string";
1338
1366
  }), media = hasMediaKeys ? useMedia() : null, resolvedExpressions = media ? _expressions.map(function(expr) {
1339
1367
  return typeof expr == "string" ? media[expr] : expr;
1340
1368
  }) : _expressions;
1341
1369
  return /* @__PURE__ */ jsxRuntime.jsx(Component, __spreadValues({
1342
1370
  ref,
1343
- style: styleProvider(theme, resolvedExpressions)
1371
+ style: createStyle(theme, resolvedExpressions)
1344
1372
  }, rest));
1345
- });
1373
+ }));
1346
1374
  };
1347
1375
  function setRef(ref, value) {
1348
1376
  typeof ref == "function" ? ref(value) : ref && (ref.current = value);
@@ -1359,50 +1387,44 @@ function useComposedRefs() {
1359
1387
  for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) refs[_key] = arguments[_key];
1360
1388
  return React__namespace.useCallback(composeRefs(...refs), refs);
1361
1389
  }
1362
- var defaultComponentState = {
1363
- hover: false,
1364
- press: false,
1365
- pressIn: false,
1366
- focus: false,
1367
- focusVisible: false,
1368
- focusWithin: false,
1369
- unmounted: true,
1370
- disabled: false
1371
- }, defaultComponentStateMounted = __spreadProps(__spreadValues({}, defaultComponentState), {
1372
- unmounted: false
1373
- }), defaultComponentStateShouldEnter = __spreadProps(__spreadValues({}, defaultComponentState), {
1374
- unmounted: "should-enter"
1375
- });
1376
- var GLOBAL_KEY = "__tamagui_native_gesture_state__";
1377
- function getGlobalState() {
1378
- var g = globalThis;
1379
- return g[GLOBAL_KEY] || (g[GLOBAL_KEY] = {
1380
- enabled: false,
1381
- Gesture: null,
1382
- GestureDetector: null,
1383
- ScrollView: null
1384
- }), g[GLOBAL_KEY];
1390
+ function createGlobalState(key, defaultValue2) {
1391
+ var GLOBAL_KEY = `__tamagui_${key}__`;
1392
+ function getGlobalState() {
1393
+ var g = globalThis;
1394
+ return g[GLOBAL_KEY] || (g[GLOBAL_KEY] = defaultValue2), g[GLOBAL_KEY];
1395
+ }
1396
+ function setGlobalState(newState) {
1397
+ globalThis[GLOBAL_KEY] = newState;
1398
+ }
1399
+ return {
1400
+ get: getGlobalState,
1401
+ set: setGlobalState
1402
+ };
1385
1403
  }
1404
+ var state = createGlobalState("gesture", {
1405
+ enabled: false,
1406
+ Gesture: null,
1407
+ GestureDetector: null,
1408
+ ScrollView: null
1409
+ });
1386
1410
  function getGestureHandler() {
1387
1411
  return {
1388
1412
  get isEnabled() {
1389
- return getGlobalState().enabled;
1413
+ return state.get().enabled;
1390
1414
  },
1391
1415
  get state() {
1392
- return getGlobalState();
1416
+ return state.get();
1393
1417
  },
1394
1418
  set(updates) {
1395
- var state = getGlobalState();
1396
- Object.assign(state, updates);
1419
+ Object.assign(state.get(), updates);
1397
1420
  },
1398
1421
  disable() {
1399
- var state = getGlobalState();
1400
- state.enabled = false;
1422
+ state.get().enabled = false;
1401
1423
  },
1402
1424
  createPressGesture(config) {
1403
1425
  var {
1404
1426
  Gesture
1405
- } = getGlobalState();
1427
+ } = state.get();
1406
1428
  if (!Gesture) return null;
1407
1429
  var _config_delayLongPress, longPressDuration = (_config_delayLongPress = config.delayLongPress) !== null && _config_delayLongPress !== void 0 ? _config_delayLongPress : 500, tap = Gesture.Tap().runOnJS(true).maxDuration(1e4).onBegin(function(e) {
1408
1430
  var _config_onPressIn;
@@ -1429,80 +1451,161 @@ function getGestureHandler() {
1429
1451
  }
1430
1452
  };
1431
1453
  }
1432
- var dontComposePressabilityKeys = {
1433
- onBlur: true,
1434
- onFocus: true
1435
- }, emptyConfig = {}, usePressability = null;
1454
+ var NativeMenuContext = React.createContext(false);
1455
+ var defaultComponentState = {
1456
+ hover: false,
1457
+ press: false,
1458
+ pressIn: false,
1459
+ focus: false,
1460
+ focusVisible: false,
1461
+ focusWithin: false,
1462
+ unmounted: true,
1463
+ disabled: false
1464
+ }, defaultComponentStateMounted = __spreadProps(__spreadValues({}, defaultComponentState), {
1465
+ unmounted: false
1466
+ }), defaultComponentStateShouldEnter = __spreadProps(__spreadValues({}, defaultComponentState), {
1467
+ unmounted: "should-enter"
1468
+ });
1469
+ var DEFAULT_LONG_PRESS_DELAY = 500, DEFAULT_MIN_PRESS_DURATION = 130;
1436
1470
  function useMainThreadPressEvents(events, viewProps) {
1437
- var enabled = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : true;
1438
- usePressability || (usePressability = require("react-native/Libraries/Pressability/usePressability").default);
1439
- var pressability = usePressability(enabled ? events : emptyConfig);
1440
- if (enabled && pressability) {
1441
- viewProps.hitSlop && events && (events.hitSlop = viewProps.hitSlop);
1442
- for (var key in pressability) {
1443
- var og = viewProps[key], val = pressability[key];
1444
- viewProps[key] = og && !dontComposePressabilityKeys[key] ? composeEventHandlers(og, val) : val;
1445
- }
1471
+ var enabled = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : true, ref = React.useRef(null);
1472
+ if (ref.current || (ref.current = {
1473
+ state: "idle",
1474
+ pressInTimer: null,
1475
+ pressOutTimer: null,
1476
+ longPressTimer: null,
1477
+ activateTime: 0
1478
+ }), !enabled || !events) return;
1479
+ var _events_delayPressIn, delayPressIn = Math.max(0, (_events_delayPressIn = events.delayPressIn) !== null && _events_delayPressIn !== void 0 ? _events_delayPressIn : 0), _events_delayPressOut, delayPressOut = Math.max(0, (_events_delayPressOut = events.delayPressOut) !== null && _events_delayPressOut !== void 0 ? _events_delayPressOut : 0), _events_delayLongPress, delayLongPress = Math.max(0, (_events_delayLongPress = events.delayLongPress) !== null && _events_delayLongPress !== void 0 ? _events_delayLongPress : DEFAULT_LONG_PRESS_DELAY), _events_minPressDuration, minPressDuration = Math.max(0, (_events_minPressDuration = events.minPressDuration) !== null && _events_minPressDuration !== void 0 ? _events_minPressDuration : DEFAULT_MIN_PRESS_DURATION);
1480
+ function activate(e) {
1481
+ var _events_onPressIn;
1482
+ ref.current.state = "active", ref.current.activateTime = Date.now(), (_events_onPressIn = events.onPressIn) === null || _events_onPressIn === void 0 || _events_onPressIn.call(events, e);
1446
1483
  }
1447
- }
1448
- function useEvents(events, viewProps, stateRef, staticConfig, isHOC) {
1449
- if (events && (events.onFocus && (viewProps.onFocus = events.onFocus), events.onBlur && (viewProps.onBlur = events.onBlur)), staticConfig.isInput && events) {
1450
- var {
1451
- onPressIn,
1452
- onPressOut,
1453
- onPress
1454
- } = events, inputEvents = {
1455
- onPressIn,
1456
- onPressOut: onPressOut || onPress
1457
- };
1458
- return onPressOut && onPress && (inputEvents.onPressOut = composeEventHandlers(onPress, onPressOut)), Object.assign(viewProps, inputEvents), null;
1484
+ function deactivate(e) {
1485
+ var pressDuration = Date.now() - ref.current.activateTime, remaining = Math.max(minPressDuration - pressDuration, delayPressOut);
1486
+ if (remaining > 0) ref.current.pressOutTimer = setTimeout(function() {
1487
+ var _events_onPressOut2;
1488
+ (_events_onPressOut2 = events.onPressOut) === null || _events_onPressOut2 === void 0 || _events_onPressOut2.call(events, e);
1489
+ }, remaining);
1490
+ else {
1491
+ var _events_onPressOut;
1492
+ (_events_onPressOut = events.onPressOut) === null || _events_onPressOut === void 0 || _events_onPressOut.call(events, e);
1493
+ }
1459
1494
  }
1460
- if (isHOC && events) {
1461
- var {
1462
- onPressIn: onPressIn1,
1463
- onPressOut: onPressOut1,
1464
- onPress: onPress1,
1465
- onLongPress,
1466
- delayLongPress
1467
- } = events;
1468
- return Object.assign(viewProps, {
1469
- onPressIn: onPressIn1,
1470
- onPressOut: onPressOut1,
1471
- onPress: onPress1,
1472
- onLongPress,
1473
- delayLongPress
1474
- }), null;
1495
+ function cleanup() {
1496
+ ref.current.pressInTimer && clearTimeout(ref.current.pressInTimer), ref.current.pressOutTimer && clearTimeout(ref.current.pressOutTimer), ref.current.longPressTimer && clearTimeout(ref.current.longPressTimer), ref.current.pressInTimer = null, ref.current.pressOutTimer = null, ref.current.longPressTimer = null;
1475
1497
  }
1498
+ viewProps.onStartShouldSetResponder = function() {
1499
+ return !events.disabled;
1500
+ }, viewProps.onResponderGrant = function(e) {
1501
+ cleanup(), ref.current.state = "pressing", delayPressIn > 0 ? ref.current.pressInTimer = setTimeout(function() {
1502
+ return activate(e);
1503
+ }, delayPressIn) : activate(e), events.onLongPress && (ref.current.longPressTimer = setTimeout(function() {
1504
+ if (ref.current.state === "active") {
1505
+ var _events_onLongPress;
1506
+ ref.current.state = "longPressed", (_events_onLongPress = events.onLongPress) === null || _events_onLongPress === void 0 || _events_onLongPress.call(events, e);
1507
+ }
1508
+ }, delayLongPress + delayPressIn));
1509
+ }, viewProps.onResponderRelease = function(e) {
1510
+ ref.current.state === "active";
1511
+ var wasLongPressed = ref.current.state === "longPressed";
1512
+ if (cleanup(), ref.current.state === "pressing" && activate(e), !wasLongPressed) {
1513
+ var _events_onPress;
1514
+ (_events_onPress = events.onPress) === null || _events_onPress === void 0 || _events_onPress.call(events, e);
1515
+ }
1516
+ deactivate(e), ref.current.state = "idle";
1517
+ }, viewProps.onResponderTerminate = function(e) {
1518
+ cleanup(), (ref.current.state === "active" || ref.current.state === "longPressed") && deactivate(e), ref.current.state = "idle";
1519
+ }, viewProps.onResponderTerminationRequest = function() {
1520
+ return events.cancelable !== false;
1521
+ }, viewProps.onResponderMove = function(e) {
1522
+ var _events_onPressMove;
1523
+ (_events_onPressMove = events.onPressMove) === null || _events_onPressMove === void 0 || _events_onPressMove.call(events, e);
1524
+ };
1525
+ }
1526
+ function useEvents(events, viewProps, stateRef, staticConfig, isHOC, isInsideNativeMenu) {
1527
+ events && (events.onFocus && (viewProps.onFocus = events.onFocus), events.onBlur && (viewProps.onBlur = events.onBlur));
1476
1528
  var hasPressEvents = events == null ? void 0 : events.onPress, gh = getGestureHandler();
1477
1529
  hasPressEvents && (stateRef.current.hasHadEvents = true);
1478
- var everEnabled = !!(hasPressEvents || stateRef.current.hasHadEvents);
1479
- if (gh.isEnabled) {
1480
- var callbacksRef = React.useRef({}), gestureRef = React.useRef(null);
1481
- return everEnabled ? (callbacksRef.current = hasPressEvents ? {
1482
- onPressIn: events.onPressIn,
1483
- onPressOut: events.onPressOut,
1484
- onPress: events.onPress,
1485
- onLongPress: events.onLongPress
1486
- } : {}, gestureRef.current || (gestureRef.current = gh.createPressGesture({
1487
- onPressIn: function(e) {
1488
- var _callbacksRef_current_onPressIn, _callbacksRef_current;
1489
- return (_callbacksRef_current_onPressIn = (_callbacksRef_current = callbacksRef.current).onPressIn) === null || _callbacksRef_current_onPressIn === void 0 ? void 0 : _callbacksRef_current_onPressIn.call(_callbacksRef_current, e);
1490
- },
1491
- onPressOut: function(e) {
1492
- var _callbacksRef_current_onPressOut, _callbacksRef_current;
1493
- return (_callbacksRef_current_onPressOut = (_callbacksRef_current = callbacksRef.current).onPressOut) === null || _callbacksRef_current_onPressOut === void 0 ? void 0 : _callbacksRef_current_onPressOut.call(_callbacksRef_current, e);
1494
- },
1495
- onPress: function(e) {
1496
- var _callbacksRef_current_onPress, _callbacksRef_current;
1497
- return (_callbacksRef_current_onPress = (_callbacksRef_current = callbacksRef.current).onPress) === null || _callbacksRef_current_onPress === void 0 ? void 0 : _callbacksRef_current_onPress.call(_callbacksRef_current, e);
1498
- },
1499
- onLongPress: function(e) {
1500
- var _callbacksRef_current_onLongPress, _callbacksRef_current;
1501
- return (_callbacksRef_current_onLongPress = (_callbacksRef_current = callbacksRef.current).onLongPress) === null || _callbacksRef_current_onLongPress === void 0 ? void 0 : _callbacksRef_current_onLongPress.call(_callbacksRef_current, e);
1502
- },
1503
- delayLongPress: events.delayLongPress,
1504
- hitSlop: viewProps.hitSlop
1505
- })), gestureRef.current) : null;
1530
+ var everEnabled = !!(hasPressEvents || stateRef.current.hasHadEvents), isUsingRNGH = gh.isEnabled;
1531
+ if (staticConfig.isInput) {
1532
+ if (events) {
1533
+ var {
1534
+ onPressIn,
1535
+ onPressOut,
1536
+ onPress
1537
+ } = events, inputEvents = {
1538
+ onPressIn,
1539
+ onPressOut: onPressOut || onPress
1540
+ };
1541
+ onPressOut && onPress && (inputEvents.onPressOut = composeEventHandlers(onPress, onPressOut)), Object.assign(viewProps, inputEvents);
1542
+ }
1543
+ return null;
1544
+ }
1545
+ if (isHOC) {
1546
+ if (events) {
1547
+ var {
1548
+ onPressIn: onPressIn1,
1549
+ onPressOut: onPressOut1,
1550
+ onPress: onPress1,
1551
+ onLongPress,
1552
+ delayLongPress
1553
+ } = events;
1554
+ Object.assign(viewProps, {
1555
+ onPressIn: onPressIn1,
1556
+ onPressOut: onPressOut1,
1557
+ onPress: onPress1,
1558
+ onLongPress,
1559
+ delayLongPress
1560
+ });
1561
+ }
1562
+ return null;
1563
+ }
1564
+ if (isUsingRNGH) {
1565
+ var callbacksRef = React.useRef(isUsingRNGH ? {} : null), gestureRef = React.useRef(null);
1566
+ if (everEnabled) {
1567
+ if (callbacksRef.current = hasPressEvents ? {
1568
+ onPressIn: events.onPressIn,
1569
+ onPressOut: events.onPressOut,
1570
+ onPress: events.onPress,
1571
+ onLongPress: events.onLongPress
1572
+ } : {}, !gestureRef.current) if (isInsideNativeMenu) {
1573
+ var {
1574
+ Gesture
1575
+ } = gh.state, manual = Gesture.Manual().runOnJS(true).manualActivation(true).onTouchesDown(function() {
1576
+ var _callbacksRef_current_onPressIn, _callbacksRef_current;
1577
+ (_callbacksRef_current_onPressIn = (_callbacksRef_current = callbacksRef.current).onPressIn) === null || _callbacksRef_current_onPressIn === void 0 || _callbacksRef_current_onPressIn.call(_callbacksRef_current, {});
1578
+ }).onTouchesUp(function() {
1579
+ var _callbacksRef_current_onPress, _callbacksRef_current, _callbacksRef_current_onPressOut, _callbacksRef_current1;
1580
+ (_callbacksRef_current_onPress = (_callbacksRef_current = callbacksRef.current).onPress) === null || _callbacksRef_current_onPress === void 0 || _callbacksRef_current_onPress.call(_callbacksRef_current, {}), (_callbacksRef_current_onPressOut = (_callbacksRef_current1 = callbacksRef.current).onPressOut) === null || _callbacksRef_current_onPressOut === void 0 || _callbacksRef_current_onPressOut.call(_callbacksRef_current1, {});
1581
+ }).onTouchesCancelled(function() {
1582
+ var _callbacksRef_current_onPressOut, _callbacksRef_current;
1583
+ (_callbacksRef_current_onPressOut = (_callbacksRef_current = callbacksRef.current).onPressOut) === null || _callbacksRef_current_onPressOut === void 0 || _callbacksRef_current_onPressOut.call(_callbacksRef_current, {});
1584
+ });
1585
+ gestureRef.current = manual;
1586
+ } else gestureRef.current = gh.createPressGesture({
1587
+ onPressIn: function(e) {
1588
+ var _callbacksRef_current_onPressIn, _callbacksRef_current;
1589
+ return (_callbacksRef_current_onPressIn = (_callbacksRef_current = callbacksRef.current).onPressIn) === null || _callbacksRef_current_onPressIn === void 0 ? void 0 : _callbacksRef_current_onPressIn.call(_callbacksRef_current, e);
1590
+ },
1591
+ onPressOut: function(e) {
1592
+ var _callbacksRef_current_onPressOut, _callbacksRef_current;
1593
+ return (_callbacksRef_current_onPressOut = (_callbacksRef_current = callbacksRef.current).onPressOut) === null || _callbacksRef_current_onPressOut === void 0 ? void 0 : _callbacksRef_current_onPressOut.call(_callbacksRef_current, e);
1594
+ },
1595
+ onPress: function(e) {
1596
+ var _callbacksRef_current_onPress, _callbacksRef_current;
1597
+ return (_callbacksRef_current_onPress = (_callbacksRef_current = callbacksRef.current).onPress) === null || _callbacksRef_current_onPress === void 0 ? void 0 : _callbacksRef_current_onPress.call(_callbacksRef_current, e);
1598
+ },
1599
+ onLongPress: function(e) {
1600
+ var _callbacksRef_current_onLongPress, _callbacksRef_current;
1601
+ return (_callbacksRef_current_onLongPress = (_callbacksRef_current = callbacksRef.current).onLongPress) === null || _callbacksRef_current_onLongPress === void 0 ? void 0 : _callbacksRef_current_onLongPress.call(_callbacksRef_current, e);
1602
+ },
1603
+ delayLongPress: events == null ? void 0 : events.delayLongPress,
1604
+ hitSlop: viewProps.hitSlop
1605
+ });
1606
+ return gestureRef.current;
1607
+ }
1608
+ return null;
1506
1609
  }
1507
1610
  return useMainThreadPressEvents(events, viewProps, hasPressEvents), null;
1508
1611
  }
@@ -1518,12 +1621,15 @@ function wrapWithGestureDetector(content, gesture, stateRef, isHOC) {
1518
1621
  gesture: gestureToUse
1519
1622
  }, content) : content;
1520
1623
  }
1521
- var getDefaultProps = function(staticConfig, propsComponentName, isSubText) {
1624
+ var getDefaultProps = function(staticConfig, propsComponentName) {
1522
1625
  var _conf_defaultProps, defaultProps = staticConfig == null ? void 0 : staticConfig.defaultProps, conf2 = getConfig(), name = propsComponentName || (staticConfig == null ? void 0 : staticConfig.componentName) || // important: this is how we end up getting the defaultProps we set in createTamagui
1523
1626
  (staticConfig.isText ? "Text" : "View"), userDefaultProps = conf2 == null || (_conf_defaultProps = conf2.defaultProps) === null || _conf_defaultProps === void 0 ? void 0 : _conf_defaultProps[name];
1524
- if (userDefaultProps && (defaultProps = __spreadValues(__spreadValues({}, userDefaultProps), defaultProps)), 0) ;
1525
- return defaultProps;
1627
+ return userDefaultProps && (defaultProps = defaultProps ? __spreadValues(__spreadValues({}, userDefaultProps), defaultProps) : userDefaultProps), defaultProps;
1526
1628
  };
1629
+ function resolveAnimationDriver(driver) {
1630
+ var _driver_default;
1631
+ return driver ? typeof driver.useAnimations == "function" ? driver : "default" in driver && typeof ((_driver_default = driver.default) === null || _driver_default === void 0 ? void 0 : _driver_default.useAnimations) == "function" ? driver.default : null : null;
1632
+ }
1527
1633
  var defaultOffset = {
1528
1634
  height: 0,
1529
1635
  width: 0
@@ -2058,10 +2164,10 @@ function requireNormalizeColor() {
2058
2164
  }
2059
2165
  var normalizeColorExports = requireNormalizeColor();
2060
2166
  const index = /* @__PURE__ */ getDefaultExportFromCjs(normalizeColorExports);
2061
- const normalizeColor$1 = /* @__PURE__ */ _mergeNamespaces({
2167
+ const normalizeColor$1 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2062
2168
  __proto__: null,
2063
2169
  default: index
2064
- }, [normalizeColorExports]);
2170
+ }, Symbol.toStringTag, { value: "Module" }));
2065
2171
  var norm = index || normalizeColor$1, normalizeCSSColor = norm;
2066
2172
  function rgba(colorInt) {
2067
2173
  var r = Math.round((colorInt & 4278190080) >>> 24), g = Math.round((colorInt & 16711680) >>> 16), b = Math.round((colorInt & 65280) >>> 8), a = ((colorInt & 255) >>> 0) / 255;
@@ -2125,18 +2231,6 @@ var nativeStyle = "borderStyle", borderDefaults = {
2125
2231
  var empty = function() {
2126
2232
  console.warn("no-op native");
2127
2233
  }, getCSSStylesAtomic = empty, getStyleAtomic = empty, styleToCSS = empty;
2128
- function scanAllSheets() {
2129
- if (!process.env.TAMAGUI_DID_OUTPUT_CSS) {
2130
- return;
2131
- }
2132
- }
2133
- process.env.TAMAGUI_BAIL_AFTER_SCANNING_X_CSS_RULES;
2134
- function setNonce(_2) {
2135
- }
2136
- function insertStyleRules(rulesToInsert) {
2137
- return;
2138
- }
2139
- process.env.TAMAGUI_INSERT_SELECTOR_TRIES ? +process.env.TAMAGUI_INSERT_SELECTOR_TRIES : 1;
2140
2234
  function isActivePlatform(key) {
2141
2235
  if (!key.startsWith("$platform")) return true;
2142
2236
  var platform = key.slice(10);
@@ -2178,6 +2272,31 @@ function parseBorderShorthand(value) {
2178
2272
  var result = [];
2179
2273
  return borderWidth !== void 0 && (result.push(["borderTopWidth", borderWidth]), result.push(["borderRightWidth", borderWidth]), result.push(["borderBottomWidth", borderWidth]), result.push(["borderLeftWidth", borderWidth])), borderStyle !== void 0 && result.push(["borderStyle", borderStyle]), borderColor !== void 0 && (result.push(["borderTopColor", borderColor]), result.push(["borderRightColor", borderColor]), result.push(["borderBottomColor", borderColor]), result.push(["borderLeftColor", borderColor])), result.length > 0 ? result : void 0;
2180
2274
  }
2275
+ var outlineStyles = /* @__PURE__ */ new Set(["solid", "dashed", "dotted", "double", "groove", "ridge", "inset", "outset", "none", "hidden"]);
2276
+ function parseOutlineShorthand(value) {
2277
+ if (value === "none" || value === "0") return [["outlineWidth", 0], ["outlineStyle", "none"]];
2278
+ var parts = value.trim().split(/\s+/), outlineWidth, outlineStyle, outlineColor, _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
2279
+ try {
2280
+ for (var _iterator = parts[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
2281
+ var part = _step.value;
2282
+ if (outlineStyles.has(part)) outlineStyle = part;
2283
+ else if (/^[\d.]+(?:px|em|rem|%|pt|vw|vh)?$/.test(part)) {
2284
+ var num = parseFloat(part);
2285
+ outlineWidth = part.endsWith("px") || !part.match(/[a-z%]/i) ? num : part;
2286
+ } else outlineColor = part;
2287
+ }
2288
+ } catch (err) {
2289
+ _didIteratorError = true, _iteratorError = err;
2290
+ } finally {
2291
+ try {
2292
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
2293
+ } finally {
2294
+ if (_didIteratorError) throw _iteratorError;
2295
+ }
2296
+ }
2297
+ var result = [];
2298
+ return outlineWidth !== void 0 && result.push(["outlineWidth", outlineWidth]), outlineStyle !== void 0 && result.push(["outlineStyle", outlineStyle]), outlineColor !== void 0 && result.push(["outlineColor", outlineColor]), result.length > 0 ? result : void 0;
2299
+ }
2181
2300
  var _loop = function(parent) {
2182
2301
  var _exec, _exec_index, prefix = parent.slice(0, (_exec_index = (_exec = /[A-Z]/.exec(parent)) === null || _exec === void 0 ? void 0 : _exec.index) !== null && _exec_index !== void 0 ? _exec_index : parent.length);
2183
2302
  EXPANSIONS[parent] = EXPANSIONS[parent].map(function(k) {
@@ -2204,6 +2323,13 @@ function expandStyle(key, value) {
2204
2323
  }
2205
2324
  return;
2206
2325
  }
2326
+ case "outline": {
2327
+ if (typeof value == "string") {
2328
+ var parsed1 = parseOutlineShorthand(value);
2329
+ if (parsed1) return parsed1;
2330
+ }
2331
+ return;
2332
+ }
2207
2333
  }
2208
2334
  if (key in nativeExpansions) return nativeExpansions[key].map(function(k) {
2209
2335
  return [k, value];
@@ -2318,6 +2444,97 @@ function getFontsForLanguage(fonts, language) {
2318
2444
  })));
2319
2445
  return fontLanguageCache.set(language, next), next;
2320
2446
  }
2447
+ var fontShorthand = {
2448
+ fontSize: "size",
2449
+ fontWeight: "weight"
2450
+ }, colorKeys = tokenCategories.color, _lastFontFamilyToken = null;
2451
+ function getLastFontFamilyToken() {
2452
+ return _lastFontFamilyToken;
2453
+ }
2454
+ function setLastFontFamilyToken(value) {
2455
+ _lastFontFamilyToken = value;
2456
+ }
2457
+ var getTokenForKey = function(key, value, styleProps, styleState) {
2458
+ var _staticConfig_accept, resolveAs = styleProps.resolveValues || "none";
2459
+ if (resolveAs === "none") return value;
2460
+ var opacityModifier;
2461
+ if (key in colorKeys) {
2462
+ var slashIdx = value.indexOf("/");
2463
+ if (slashIdx > 0) {
2464
+ var raw = value.slice(slashIdx + 1);
2465
+ if (raw.length > 0) {
2466
+ var num = Number(raw);
2467
+ Number.isNaN(num) || (opacityModifier = Math.max(0, Math.min(1, num / 100)), value = value.slice(0, slashIdx));
2468
+ }
2469
+ }
2470
+ }
2471
+ var {
2472
+ theme,
2473
+ conf: conf2 = getConfig(),
2474
+ context,
2475
+ fontFamily,
2476
+ staticConfig
2477
+ } = styleState, themeValue = theme ? theme[value] || theme[value.slice(1)] : void 0, tokensParsed = conf2.tokensParsed, valOrVar, hasSet = false, customTokenAccept = staticConfig == null || (_staticConfig_accept = staticConfig.accept) === null || _staticConfig_accept === void 0 ? void 0 : _staticConfig_accept[key];
2478
+ if (customTokenAccept) {
2479
+ var _tokensParsed_customTokenAccept, val = themeValue != null ? themeValue : (_tokensParsed_customTokenAccept = tokensParsed[customTokenAccept]) === null || _tokensParsed_customTokenAccept === void 0 ? void 0 : _tokensParsed_customTokenAccept[value];
2480
+ val != null && (resolveAs = "value", valOrVar = val, hasSet = true);
2481
+ }
2482
+ if (themeValue) {
2483
+ if (resolveAs === "except-theme") return value;
2484
+ valOrVar = themeValue, hasSet = true;
2485
+ } else {
2486
+ if (value in conf2.specificTokens) hasSet = true, valOrVar = conf2.specificTokens[value];
2487
+ else {
2488
+ switch (key) {
2489
+ case "fontFamily": {
2490
+ var _fontsParsed_value, fontsParsed = (context == null ? void 0 : context.language) ? getFontsForLanguage(conf2.fontsParsed, context.language) : conf2.fontsParsed;
2491
+ valOrVar = ((_fontsParsed_value = fontsParsed[value]) === null || _fontsParsed_value === void 0 ? void 0 : _fontsParsed_value.family) || value, setLastFontFamilyToken(value), hasSet = true;
2492
+ break;
2493
+ }
2494
+ case "fontSize":
2495
+ case "lineHeight":
2496
+ case "letterSpacing":
2497
+ case "fontWeight": {
2498
+ var fam = fontFamily || conf2.defaultFontToken;
2499
+ if (fam) {
2500
+ var _font_, fontsParsed1 = (context == null ? void 0 : context.language) ? getFontsForLanguage(conf2.fontsParsed, context.language) : conf2.fontsParsed, font = fontsParsed1[fam] || fontsParsed1[conf2.defaultFontToken];
2501
+ valOrVar = (font == null || (_font_ = font[fontShorthand[key] || key]) === null || _font_ === void 0 ? void 0 : _font_[value]) || value, hasSet = true;
2502
+ }
2503
+ break;
2504
+ }
2505
+ }
2506
+ for (var cat in tokenCategories) if (key in tokenCategories[cat]) {
2507
+ var _tokensParsed_cat, res = (_tokensParsed_cat = tokensParsed[cat]) === null || _tokensParsed_cat === void 0 ? void 0 : _tokensParsed_cat[value];
2508
+ res != null ? (valOrVar = res, hasSet = true) : false;
2509
+ }
2510
+ }
2511
+ if (!hasSet) {
2512
+ var spaceVar = tokensParsed.space[value];
2513
+ spaceVar != null && (valOrVar = spaceVar, hasSet = true);
2514
+ }
2515
+ }
2516
+ if (hasSet) {
2517
+ var out = resolveVariableValue(key, valOrVar, resolveAs);
2518
+ if (opacityModifier !== void 0 && opacityModifier < 1) {
2519
+ var _normalizeColor;
2520
+ out = (_normalizeColor = normalizeColor(String(out), opacityModifier)) !== null && _normalizeColor !== void 0 ? _normalizeColor : out;
2521
+ }
2522
+ return out;
2523
+ }
2524
+ };
2525
+ function resolveVariableValue(key, valOrVar, resolveValues) {
2526
+ if (resolveValues === "none") return valOrVar;
2527
+ if (isVariable(valOrVar)) {
2528
+ if (resolveValues === "value") return valOrVar.val;
2529
+ var get = valOrVar == null ? void 0 : valOrVar.get;
2530
+ if (key !== "shadowColor" && typeof get == "function") {
2531
+ var resolveDynamicFor = resolveValues === "web" ? "web" : void 0;
2532
+ return get(resolveDynamicFor);
2533
+ }
2534
+ return valOrVar.val;
2535
+ }
2536
+ return valOrVar;
2537
+ }
2321
2538
  function _type_of$5(obj) {
2322
2539
  "@swc/helpers - typeof";
2323
2540
  return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
@@ -2341,6 +2558,152 @@ function normalizeStyle$1(style) {
2341
2558
  }
2342
2559
  return fixStyles(res), res;
2343
2560
  }
2561
+ function parseNativeStyle(key, cssString, tokenMap) {
2562
+ switch (key) {
2563
+ case "backgroundImage":
2564
+ return parseBackgroundImage(cssString, tokenMap);
2565
+ case "boxShadow":
2566
+ return parseBoxShadow(cssString, tokenMap);
2567
+ case "textShadow":
2568
+ return parseTextShadow(cssString, tokenMap);
2569
+ default:
2570
+ return;
2571
+ }
2572
+ }
2573
+ function resolveColor(raw, tokenMap) {
2574
+ return tokenMap && tokenMap.has(raw) ? tokenMap.get(raw) : raw;
2575
+ }
2576
+ function parseBackgroundImage(css, tokenMap) {
2577
+ var match = css.match(RegExp("^linear-gradient\\((.+)\\)$", "s"));
2578
+ if (match) {
2579
+ var inner = match[1], parts = splitOutsideParens(inner);
2580
+ if (!(parts.length < 2)) {
2581
+ var direction, startIdx = 0, firstPart = parts[0].trim();
2582
+ (firstPart.startsWith("to ") || /^\d+(\.\d+)?(deg|rad|turn|grad)$/.test(firstPart)) && (direction = firstPart, startIdx = 1);
2583
+ for (var colorStops = [], i = startIdx; i < parts.length; i++) {
2584
+ var stopParts = parts[i].trim().match(/\S+\([^)]*\)|\S+/g);
2585
+ if (stopParts) {
2586
+ var colorRaw = stopParts[0], color = resolveColor(colorRaw, tokenMap), positions = stopParts.slice(1), stop = {
2587
+ color
2588
+ };
2589
+ positions.length > 0 && (stop.positions = positions), colorStops.push(stop);
2590
+ }
2591
+ }
2592
+ var gradient = {
2593
+ type: "linear-gradient",
2594
+ colorStops
2595
+ };
2596
+ return direction && (gradient.direction = direction), [gradient];
2597
+ }
2598
+ }
2599
+ }
2600
+ function parseBoxShadow(css, tokenMap) {
2601
+ var shadowStrings = splitOutsideParens(css), shadows = [], _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
2602
+ try {
2603
+ for (var _iterator = shadowStrings[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
2604
+ var raw = _step.value, s = raw.trim();
2605
+ if (s) {
2606
+ var tokens = s.split(/\s+/);
2607
+ if (tokens.length < 2) return;
2608
+ var startIdx = 0, inset = false;
2609
+ tokens[0] === "inset" && (inset = true, startIdx = 1);
2610
+ for (var numericParts = [], colorParts = [], i = startIdx; i < tokens.length; i++) {
2611
+ var n = parseDimension(tokens[i]);
2612
+ if (n !== void 0) numericParts.push(n);
2613
+ else {
2614
+ colorParts = tokens.slice(i);
2615
+ break;
2616
+ }
2617
+ }
2618
+ if (numericParts.length < 2) return;
2619
+ var shadow = {
2620
+ offsetX: numericParts[0],
2621
+ offsetY: numericParts[1]
2622
+ };
2623
+ if (inset && (shadow.inset = true), numericParts.length >= 3 && (shadow.blurRadius = numericParts[2]), numericParts.length >= 4 && (shadow.spreadDistance = numericParts[3]), colorParts.length > 0) {
2624
+ var colorStr = colorParts.join(" ");
2625
+ shadow.color = resolveColor(colorStr, tokenMap);
2626
+ }
2627
+ shadows.push(shadow);
2628
+ }
2629
+ }
2630
+ } catch (err) {
2631
+ _didIteratorError = true, _iteratorError = err;
2632
+ } finally {
2633
+ try {
2634
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
2635
+ } finally {
2636
+ if (_didIteratorError) throw _iteratorError;
2637
+ }
2638
+ }
2639
+ return shadows.length > 0 ? shadows : void 0;
2640
+ }
2641
+ function parseTextShadow(css, tokenMap) {
2642
+ var tokens = css.trim().split(/\s+/);
2643
+ if (!(tokens.length < 3)) {
2644
+ var offsetX = parseDimension(tokens[0]), offsetY = parseDimension(tokens[1]), blur = parseDimension(tokens[2]);
2645
+ if (!(offsetX === void 0 || offsetY === void 0 || blur === void 0)) {
2646
+ var result = [["textShadowOffset", {
2647
+ width: offsetX,
2648
+ height: offsetY
2649
+ }], ["textShadowRadius", blur]];
2650
+ if (tokens.length >= 4) {
2651
+ var colorStr = tokens.slice(3).join(" ");
2652
+ result.push(["textShadowColor", resolveColor(colorStr, tokenMap)]);
2653
+ }
2654
+ return result;
2655
+ }
2656
+ }
2657
+ }
2658
+ function parseDimension(s) {
2659
+ var cleaned = s.replace(/px$|dp$/, ""), n = Number(cleaned);
2660
+ return Number.isFinite(n) ? n : void 0;
2661
+ }
2662
+ function splitOutsideParens(s) {
2663
+ for (var parts = [], depth = 0, start = 0, i = 0; i < s.length; i++) {
2664
+ var ch = s.charCodeAt(i);
2665
+ ch === 40 ? depth++ : ch === 41 ? depth-- : ch === 44 && /* , */
2666
+ depth === 0 && (parts.push(s.slice(start, i)), start = i + 1);
2667
+ }
2668
+ return parts.push(s.slice(start)), parts;
2669
+ }
2670
+ var tokenPattern = /(\$[\w.-]+)/g, nativeParseKeys = {
2671
+ backgroundImage: true,
2672
+ boxShadow: true,
2673
+ textShadow: true
2674
+ };
2675
+ function replaceTokens(value, styleProps, styleState) {
2676
+ return value.replace(tokenPattern, function(t) {
2677
+ var r = getTokenForKey("size", t, styleProps, styleState);
2678
+ return r == null && (r = getTokenForKey("color", t, styleProps, styleState)), r != null ? String(r) : t;
2679
+ });
2680
+ }
2681
+ function platformResolveValue(key, value, styleProps, styleState) {
2682
+ if (!nativeParseKeys[key]) return replaceTokens(value, styleProps, styleState);
2683
+ var effectiveStyleProps = key === "backgroundImage" ? __spreadProps(__spreadValues({}, styleProps), {
2684
+ resolveValues: "web"
2685
+ }) : styleProps, tokenMap = /* @__PURE__ */ new Map(), placeholderIdx = 0, withPlaceholders = value.replace(tokenPattern, function(t) {
2686
+ var r = getTokenForKey("size", t, effectiveStyleProps, styleState);
2687
+ if (r == null && (r = getTokenForKey("color", t, effectiveStyleProps, styleState)), r == null) return t;
2688
+ if (typeof r != "string" && typeof r != "number") {
2689
+ var placeholder = `__tk${placeholderIdx++}__`;
2690
+ return tokenMap.set(placeholder, r), placeholder;
2691
+ }
2692
+ return String(r);
2693
+ }), parsed = parseNativeStyle(key, withPlaceholders, tokenMap);
2694
+ return parsed || replaceTokens(value, styleProps, styleState);
2695
+ }
2696
+ var compoundKeys = {
2697
+ boxShadow: true,
2698
+ textShadow: true,
2699
+ filter: true,
2700
+ backgroundImage: true,
2701
+ border: true,
2702
+ outline: true
2703
+ };
2704
+ function resolveCompoundTokens(key, value, styleProps, styleState) {
2705
+ return !value.includes("$") || !compoundKeys[key] ? value : platformResolveValue(key, value, styleProps, styleState);
2706
+ }
2344
2707
  var remRegex = /(-?[\d.]+)rem/g;
2345
2708
  function resolveRem(value) {
2346
2709
  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;
@@ -2406,6 +2769,7 @@ var skipProps = {
2406
2769
  transition: 1,
2407
2770
  space: 1,
2408
2771
  animateOnly: 1,
2772
+ animatedBy: 1,
2409
2773
  disableClassName: 1,
2410
2774
  debug: 1,
2411
2775
  componentName: 1,
@@ -2424,7 +2788,7 @@ function _type_of$4(obj) {
2424
2788
  }
2425
2789
  var propMapper = function(key, value, styleState, disabled, map) {
2426
2790
  if (disabled) return map(key, value);
2427
- if (lastFontFamilyToken = null, !(!isAndroid && key === "elevationAndroid")) {
2791
+ if (setLastFontFamilyToken(null), !(!isAndroid && key === "elevationAndroid")) {
2428
2792
  var {
2429
2793
  conf: conf2,
2430
2794
  styleProps,
@@ -2444,15 +2808,44 @@ var propMapper = function(key, value, styleState, disabled, map) {
2444
2808
  }
2445
2809
  styleProps.disableExpandShorthands || key in conf2.shorthands && (key = conf2.shorthands[key]);
2446
2810
  var originalValue = value;
2447
- if (value != null && (typeof value == "string" && value[0] === "$" ? value = getTokenForKey(key, value, styleProps, styleState) : (key === "boxShadow" || key === "textShadow" || key === "filter" || key === "backgroundImage" || key === "border") && typeof value == "string" && value.includes("$") ? value = value.replace(/(\$[\w.-]+)/g, function(t) {
2448
- var r = getTokenForKey("size", t, styleProps, styleState);
2449
- return r == null && (r = getTokenForKey("color", t, styleProps, styleState)), r != null ? String(r) : t;
2450
- }) : isVariable(value) ? value = resolveVariableValue(key, value, styleProps.resolveValues) : isRemValue(value) && (value = resolveRem(value))), value != null) {
2451
- key === "fontFamily" && lastFontFamilyToken && (styleState.fontFamily = lastFontFamilyToken);
2811
+ if (value != null) if (typeof value == "string") {
2812
+ if (value[0] === "$") value = getTokenForKey(key, value, styleProps, styleState);
2813
+ else {
2814
+ var resolved = resolveCompoundTokens(key, value, styleProps, styleState);
2815
+ value = resolved !== value ? resolved : isRemValue(value) ? resolveRem(value) : value;
2816
+ }
2817
+ } else isVariable(value) ? value = resolveVariableValue(key, value, styleProps.resolveValues) : isRemValue(value) && (value = resolveRem(value));
2818
+ if (value != null && typeof value == "string" && (key === "backgroundImage" || key === "boxShadow" || key === "textShadow")) {
2819
+ var parsed = parseNativeStyle(key, value);
2820
+ if (parsed) {
2821
+ if (key === "textShadow" && Array.isArray(parsed) && Array.isArray(parsed[0])) {
2822
+ var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
2823
+ try {
2824
+ for (var _iterator = parsed[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
2825
+ var [nkey, nvalue] = _step.value;
2826
+ map(nkey, nvalue, originalValue);
2827
+ }
2828
+ } catch (err) {
2829
+ _didIteratorError = true, _iteratorError = err;
2830
+ } finally {
2831
+ try {
2832
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
2833
+ } finally {
2834
+ if (_didIteratorError) throw _iteratorError;
2835
+ }
2836
+ }
2837
+ return;
2838
+ }
2839
+ value = parsed;
2840
+ }
2841
+ }
2842
+ if (value != null) {
2843
+ var fontToken = getLastFontFamilyToken();
2844
+ key === "fontFamily" && fontToken && (styleState.fontFamily = fontToken);
2452
2845
  var expanded = styleProps.noExpand ? null : expandStyle(key, value);
2453
2846
  if (expanded) for (var max = expanded.length, i = 0; i < max; i++) {
2454
- var [nkey, nvalue] = expanded[i];
2455
- map(nkey, nvalue, originalValue);
2847
+ var [nkey1, nvalue1] = expanded[i];
2848
+ map(nkey1, nvalue1, originalValue);
2456
2849
  }
2457
2850
  else map(key, value, originalValue);
2458
2851
  }
@@ -2466,7 +2859,7 @@ var propMapper = function(key, value, styleState, disabled, map) {
2466
2859
  variants
2467
2860
  } = staticConfig;
2468
2861
  if (variants) {
2469
- var variantValue = getVariantDefinition(variants[key], value, conf2);
2862
+ var variantValue = getVariantDefinition(variants[key], value, conf2, styleState);
2470
2863
  if (!variantValue) {
2471
2864
  if (process.env.TAMAGUI_WARN_ON_MISSING_VARIANT === "1" && typeof value != "boolean") {
2472
2865
  var name = staticConfig.componentName || "[UnnamedComponent]";
@@ -2486,7 +2879,7 @@ var propMapper = function(key, value, styleState, disabled, map) {
2486
2879
  if (variantValue) {
2487
2880
  var expanded = normalizeStyle$1(variantValue, !!styleProps.noNormalize);
2488
2881
  var next = Object.entries(expanded);
2489
- return fontFamilyResult && fontFamilyResult[0] === "$" && (lastFontFamilyToken = getVariableValue(fontFamilyResult)), next;
2882
+ return fontFamilyResult && fontFamilyResult[0] === "$" && setLastFontFamilyToken(getVariableValue(fontFamilyResult)), next;
2490
2883
  }
2491
2884
  }
2492
2885
  };
@@ -2521,8 +2914,7 @@ var variableToFontNameCache = /* @__PURE__ */ new WeakMap(), resolveTokensAndVar
2521
2914
  }
2522
2915
  if (styleProps.noExpand) res[subKey] = val;
2523
2916
  else if (variants && subKey in variants) {
2524
- if (parentVariantKey && parentVariantKey === key) res[subKey] = // SYNC WITH *1
2525
- val[0] === "$" ? getTokenForKey(subKey, val, styleProps, styleState) : val;
2917
+ if (parentVariantKey && parentVariantKey === key) res[subKey] = val[0] === "$" ? getTokenForKey(subKey, val, styleProps, styleState) : val;
2526
2918
  else {
2527
2919
  var variantOut = resolveVariants(subKey, val, styleProps, styleState, key);
2528
2920
  if (variantOut) {
@@ -2553,8 +2945,8 @@ var variableToFontNameCache = /* @__PURE__ */ new WeakMap(), resolveTokensAndVar
2553
2945
  continue;
2554
2946
  }
2555
2947
  if (typeof val == "string") {
2556
- var fVal = val[0] === "$" ? getTokenForKey(subKey, val, styleProps, styleState) : isRemValue(val) ? resolveRem(val) : val;
2557
- res[subKey] = fVal;
2948
+ var fVal = val[0] === "$" ? getTokenForKey(subKey, val, styleProps, styleState) : resolveCompoundTokens(subKey, val, styleProps, styleState);
2949
+ res[subKey] = fVal === val && isRemValue(val) ? resolveRem(val) : fVal;
2558
2950
  continue;
2559
2951
  }
2560
2952
  if (isObj(val)) {
@@ -2571,7 +2963,10 @@ var variableToFontNameCache = /* @__PURE__ */ new WeakMap(), resolveTokensAndVar
2571
2963
  spreadName: `...${name}`
2572
2964
  };
2573
2965
  });
2574
- function getVariantDefinition(variant, value, conf2) {
2966
+ function getVariantDefinition(variant, value, conf2, param) {
2967
+ var {
2968
+ theme
2969
+ } = param;
2575
2970
  if (variant) {
2576
2971
  if (typeof variant == "function") return variant;
2577
2972
  var exact = variant[value];
@@ -2586,7 +2981,13 @@ function getVariantDefinition(variant, value, conf2) {
2586
2981
  name,
2587
2982
  spreadName
2588
2983
  } = _step.value;
2589
- if (spreadName in variant && name in tokensParsed && value in tokensParsed[name]) return variant[spreadName];
2984
+ if (spreadName in variant) {
2985
+ if (name in tokensParsed && value in tokensParsed[name]) return variant[spreadName];
2986
+ if (name === "color" && theme && typeof value == "string" && value[0] === "$") {
2987
+ var themeKey = value.slice(1);
2988
+ if (themeKey in theme) return variant[spreadName];
2989
+ }
2990
+ }
2590
2991
  }
2591
2992
  } catch (err) {
2592
2993
  _didIteratorError = true, _iteratorError = err;
@@ -2603,75 +3004,6 @@ function getVariantDefinition(variant, value, conf2) {
2603
3004
  return variant[`:${typeof value > "u" ? "undefined" : _type_of$4(value)}`] || variant["..."];
2604
3005
  }
2605
3006
  }
2606
- var fontShorthand = {
2607
- fontSize: "size",
2608
- fontWeight: "weight"
2609
- }, lastFontFamilyToken = null, getTokenForKey = function(key, value, styleProps, styleState) {
2610
- var _staticConfig_accept, resolveAs = styleProps.resolveValues || "none";
2611
- if (resolveAs === "none") return value;
2612
- var {
2613
- theme,
2614
- conf: conf2 = getConfig(),
2615
- context,
2616
- fontFamily,
2617
- staticConfig
2618
- } = styleState, themeValue = theme ? theme[value] || theme[value.slice(1)] : void 0, tokensParsed = conf2.tokensParsed, valOrVar, hasSet = false, customTokenAccept = staticConfig == null || (_staticConfig_accept = staticConfig.accept) === null || _staticConfig_accept === void 0 ? void 0 : _staticConfig_accept[key];
2619
- if (customTokenAccept) {
2620
- var val = themeValue != null ? themeValue : tokensParsed[customTokenAccept][value];
2621
- val != null && (resolveAs = "value", valOrVar = val, hasSet = true);
2622
- }
2623
- if (themeValue) {
2624
- if (resolveAs === "except-theme") return value;
2625
- valOrVar = themeValue, hasSet = true;
2626
- } else {
2627
- if (value in conf2.specificTokens) hasSet = true, valOrVar = conf2.specificTokens[value];
2628
- else {
2629
- switch (key) {
2630
- case "fontFamily": {
2631
- var _fontsParsed_value, fontsParsed = (context == null ? void 0 : context.language) ? getFontsForLanguage(conf2.fontsParsed, context.language) : conf2.fontsParsed;
2632
- valOrVar = ((_fontsParsed_value = fontsParsed[value]) === null || _fontsParsed_value === void 0 ? void 0 : _fontsParsed_value.family) || value, lastFontFamilyToken = value, hasSet = true;
2633
- break;
2634
- }
2635
- case "fontSize":
2636
- case "lineHeight":
2637
- case "letterSpacing":
2638
- case "fontWeight": {
2639
- var fam = fontFamily || conf2.defaultFontToken;
2640
- if (fam) {
2641
- var _font_, fontsParsed1 = (context == null ? void 0 : context.language) ? getFontsForLanguage(conf2.fontsParsed, context.language) : conf2.fontsParsed, font = fontsParsed1[fam] || fontsParsed1[conf2.defaultFontToken];
2642
- valOrVar = (font == null || (_font_ = font[fontShorthand[key] || key]) === null || _font_ === void 0 ? void 0 : _font_[value]) || value, hasSet = true;
2643
- }
2644
- break;
2645
- }
2646
- }
2647
- for (var cat in tokenCategories) if (key in tokenCategories[cat]) {
2648
- var _tokensParsed_cat, res = (_tokensParsed_cat = tokensParsed[cat]) === null || _tokensParsed_cat === void 0 ? void 0 : _tokensParsed_cat[value];
2649
- res != null ? (valOrVar = res, hasSet = true) : false;
2650
- }
2651
- }
2652
- if (!hasSet) {
2653
- var spaceVar = tokensParsed.space[value];
2654
- spaceVar != null && (valOrVar = spaceVar, hasSet = true);
2655
- }
2656
- }
2657
- if (hasSet) {
2658
- var out = resolveVariableValue(key, valOrVar, resolveAs);
2659
- return out;
2660
- }
2661
- };
2662
- function resolveVariableValue(key, valOrVar, resolveValues) {
2663
- if (resolveValues === "none") return valOrVar;
2664
- if (isVariable(valOrVar)) {
2665
- if (resolveValues === "value") return valOrVar.val;
2666
- var get = valOrVar == null ? void 0 : valOrVar.get;
2667
- if (key !== "shadowColor" && typeof get == "function") {
2668
- var resolveDynamicFor = resolveValues === "web" ? "web" : void 0;
2669
- return get(resolveDynamicFor);
2670
- }
2671
- return valOrVar.val;
2672
- }
2673
- return valOrVar;
2674
- }
2675
3007
  var sortString = function(a, b) {
2676
3008
  return a < b ? -1 : a > b ? 1 : 0;
2677
3009
  };
@@ -2699,14 +3031,14 @@ function normalizeGroupKey(key, groupContext) {
2699
3031
  plen === 2 || plen === 3 && pseudoPriorities[parts[parts.length - 1]]
2700
3032
  ) {
2701
3033
  var name = parts[1];
2702
- if (groupContext && !groupContext[name]) return key.replace("$group-", "$group-true-");
3034
+ if (name !== "true" && groupContext && !groupContext[name]) return key.replace("$group-", "$group-true-");
2703
3035
  }
2704
3036
  return key;
2705
3037
  }
2706
3038
  function isValidStyleKey(key, validStyles2, accept) {
2707
3039
  return key in validStyles2 ? true : accept && key in accept;
2708
3040
  }
2709
- var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, componentContext, groupContext, elementType, startedUnhydrated, debug) {
3041
+ var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, componentContext, groupContext, elementType, startedUnhydrated, debug, animationDriver) {
2710
3042
  var _loop2 = function(keyOg2) {
2711
3043
  var keyInit = keyOg2, valInit = props[keyInit];
2712
3044
  if (keyInit === "children") return viewProps[keyInit] = valInit, "continue";
@@ -2724,7 +3056,8 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
2724
3056
  }
2725
3057
  }
2726
3058
  if (keyInit in skipProps && !noSkip && !isHOC) {
2727
- return "continue";
3059
+ var _driver_animations;
3060
+ if (!(keyInit === "transition" && typeof valInit == "string" && !(!(driver == null || (_driver_animations = driver.animations) === null || _driver_animations === void 0) && _driver_animations[valInit]))) return "continue";
2728
3061
  }
2729
3062
  var isValidStyleKeyInit = isValidStyleKey(keyInit, validStyles$1, accept);
2730
3063
  if (!isValidStyleKeyInit) {
@@ -2739,48 +3072,53 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
2739
3072
  var shouldPassProp = !isStyleProp && isHOC || // is in parent variants
2740
3073
  isHOC && parentVariants && keyInit in parentVariants || (inlineProps == null ? void 0 : inlineProps.has(keyInit)), parentVariant = parentVariants == null ? void 0 : parentVariants[keyInit], isHOCShouldPassThrough = !!(isHOC && (isValidStyleKeyInit || isMediaOrPseudo || parentVariant || keyInit in skipProps)), shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
2741
3074
  if (shouldPassThrough && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo), !isVariant)) return "continue";
2742
- if (!noSkip && keyInit in skipProps) return "continue";
3075
+ if (!noSkip) {
3076
+ var _driver_animations1;
3077
+ if (keyInit in skipProps && !(keyInit === "transition" && typeof valInit == "string" && !(!(driver == null || (_driver_animations1 = driver.animations) === null || _driver_animations1 === void 0) && _driver_animations1[valInit]))) return "continue";
3078
+ }
2743
3079
  (isText || isInput) && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit);
2744
3080
  var disablePropMap = isMediaOrPseudo || !isStyleLikeKey;
2745
- if (propMapper(keyInit, valInit, styleState, disablePropMap, function(key4, val2, originalVal) {
2746
- var _parentStaticConfig_variants, isStyledContextProp = styledContext && key4 in styledContext;
3081
+ if (propMapper(keyInit, valInit, styleState, disablePropMap, function(key5, val2, originalVal) {
3082
+ var _parentStaticConfig_variants, isStyledContextProp = styledContext && key5 in styledContext;
2747
3083
  if (!isHOC && disablePropMap && !isStyledContextProp && !isMediaOrPseudo) {
2748
- viewProps[key4] = val2;
3084
+ viewProps[key5] = val2;
2749
3085
  return;
2750
3086
  }
2751
- if (val2 != null) {
2752
- if (key4 === "pointerEvents") {
2753
- viewProps[key4] = val2;
3087
+ if (false, val2 != null) {
3088
+ if (key5 === "pointerEvents") {
3089
+ viewProps[key5] = val2;
2754
3090
  return;
2755
3091
  }
2756
- if (!isHOC && isValidStyleKey(key4, validStyles$1, accept) || isAndroid && key4 === "elevation") {
2757
- mergeStyle(styleState, key4, val2, 1, false, originalVal);
3092
+ if (!isHOC && isValidStyleKey(key5, validStyles$1, accept) || isAndroid && key5 === "elevation") {
3093
+ mergeStyle(styleState, key5, val2, 1, false, originalVal);
2758
3094
  return;
2759
3095
  }
2760
- if (isPseudo = key4 in validPseudoKeys, isMedia = isPseudo ? false : getMediaKey(key4), isMediaOrPseudo = !!(isMedia || isPseudo), isVariant = variants && key4 in variants, isMedia === "group" && (key4 = normalizeGroupKey(key4, groupContext)), (inlineProps == null ? void 0 : inlineProps.has(key4)) || process.env.IS_STATIC === "is_static" && (inlineWhenUnflattened == null ? void 0 : inlineWhenUnflattened.has(key4))) {
3096
+ if (isPseudo = key5 in validPseudoKeys, isMedia = isPseudo ? false : getMediaKey(key5), isMediaOrPseudo = !!(isMedia || isPseudo), isVariant = variants && key5 in variants, isMedia === "group" && (key5 = normalizeGroupKey(key5, groupContext)), (inlineProps == null ? void 0 : inlineProps.has(key5)) || process.env.IS_STATIC === "is_static" && (inlineWhenUnflattened == null ? void 0 : inlineWhenUnflattened.has(key5))) {
2761
3097
  var _props_key;
2762
- viewProps[key4] = (_props_key = props[key4]) !== null && _props_key !== void 0 ? _props_key : val2;
3098
+ viewProps[key5] = (_props_key = props[key5]) !== null && _props_key !== void 0 ? _props_key : val2;
2763
3099
  }
2764
3100
  var shouldPassThrough2 = styleProps.noExpand && isPseudo || isHOC && (isMediaOrPseudo || (parentStaticConfig == null || (_parentStaticConfig_variants = parentStaticConfig.variants) === null || _parentStaticConfig_variants === void 0 ? void 0 : _parentStaticConfig_variants[keyInit]));
2765
3101
  if (shouldPassThrough2) {
2766
- passDownProp(viewProps, key4, val2, isMediaOrPseudo);
3102
+ passDownProp(viewProps, key5, val2, isMediaOrPseudo), false;
2767
3103
  return;
2768
3104
  }
2769
3105
  if (isPseudo) {
2770
3106
  if (!val2) return;
2771
- var pseudoStyleObject = getSubStyle(styleState, key4, val2, styleProps.noClass && process.env.IS_STATIC !== "is_static");
2772
- {
3107
+ var pseudoStyleObject = getSubStyle(styleState, key5, val2, styleProps.noClass && process.env.IS_STATIC !== "is_static");
3108
+ if (!shouldDoClasses || process.env.IS_STATIC === "is_static") {
2773
3109
  var _pseudos, _key;
2774
- if (pseudos || (pseudos = {}), (_pseudos = pseudos)[_key = key4] || (_pseudos[_key] = {}), process.env.IS_STATIC === "is_static") {
2775
- Object.assign(pseudos[key4], pseudoStyleObject);
3110
+ if (pseudos || (pseudos = {}), (_pseudos = pseudos)[_key = key5] || (_pseudos[_key] = {}), process.env.IS_STATIC === "is_static") {
3111
+ Object.assign(pseudos[key5], pseudoStyleObject);
2776
3112
  return;
2777
3113
  }
2778
3114
  }
2779
- var descriptor = pseudoDescriptors[key4], isEnter = key4 === "enterStyle", isExit = key4 === "exitStyle";
3115
+ var descriptor = pseudoDescriptors[key5], isEnter = key5 === "enterStyle", isExit = key5 === "exitStyle";
2780
3116
  if (!descriptor) return;
2781
- {
3117
+ var pseudoStyles, _iteratorNormalCompletion3, _didIteratorError3, _iteratorError3, _iterator3, _step3, psuedoStyle, fullKey;
3118
+ if (shouldDoClasses && !isExit) ;
3119
+ if (!shouldDoClasses || isExit || isEnter) {
2782
3120
  var descriptorKey = descriptor.stateKey || descriptor.name, isDisabled2 = componentState[descriptorKey] === false;
2783
- isExit && (isDisabled2 = !styleProps.isExiting), isEnter && componentState.unmounted === false && (isDisabled2 = true);
3121
+ isExit && (isDisabled2 = !styleProps.isExiting), isEnter && componentState.unmounted === false && (isDisabled2 = true), false;
2784
3122
  var importance = descriptor.priority, pseudoOriginalValues = styleOriginalValues.get(pseudoStyleObject);
2785
3123
  for (var pkey in pseudoStyleObject) {
2786
3124
  var _$val = pseudoStyleObject[pkey];
@@ -2790,7 +3128,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
2790
3128
  if (shouldMerge) {
2791
3129
  if (process.env.IS_STATIC === "is_static") {
2792
3130
  var _pseudos1, _key1;
2793
- pseudos || (pseudos = {}), (_pseudos1 = pseudos)[_key1 = key4] || (_pseudos1[_key1] = {}), pseudos[key4][pkey] = _$val;
3131
+ pseudos || (pseudos = {}), (_pseudos1 = pseudos)[_key1 = key5] || (_pseudos1[_key1] = {}), pseudos[key5][pkey] = _$val;
2794
3132
  }
2795
3133
  mergeStyle(styleState, pkey, _$val, importance, false, pseudoOriginalValues == null ? void 0 : pseudoOriginalValues[pkey]);
2796
3134
  }
@@ -2805,48 +3143,27 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
2805
3143
  }
2806
3144
  if (isMedia) {
2807
3145
  if (!val2) return;
2808
- var mediaKeyShort = key4.slice(isMedia == "theme" ? 7 : 1);
3146
+ var mediaKeyShort = key5.slice(isMedia == "theme" ? 7 : 1);
2809
3147
  hasMedia || (hasMedia = true);
2810
- val2.space;
2811
- if ((!hasMedia || typeof hasMedia == "boolean") && (hasMedia = /* @__PURE__ */ new Set()), hasMedia.add(mediaKeyShort), isMedia === "platform" && !isActivePlatform(key4)) return;
3148
+ var hasSpace = val2.space;
3149
+ if ((hasSpace || !shouldDoClasses || styleProps.willBeAnimated) && ((!hasMedia || typeof hasMedia == "boolean") && (hasMedia = /* @__PURE__ */ new Set()), hasMedia.add(mediaKeyShort)), isMedia === "platform" && !isActivePlatform(key5)) return;
2812
3150
  var priority = mediaStylesSeen;
2813
- mediaStylesSeen += 1;
2814
- var shouldDoClassesForThisMedia = isWeb;
2815
- if (shouldDoClassesForThisMedia) {
2816
- getSubStyle(styleState, key4, val2, false);
2817
- var mediaStyles = getCSSStylesAtomic(), _iteratorNormalCompletion12 = true, _didIteratorError12 = false, _iteratorError12 = void 0;
2818
- try {
2819
- for (var _iterator12 = mediaStyles[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = true) {
2820
- var style3 = _step12.value, property = style3[StyleObjectProperty], isSubStyle = property[0] === "$";
2821
- if (!(isSubStyle && !isActivePlatform(property))) {
2822
- var out = createMediaStyle(style3, mediaKeyShort, mediaQueryConfig, isMedia, false, priority);
2823
- var subKey = isSubStyle ? style3[2] : "", fullKey1 = `${style3[StyleObjectProperty]}${subKey}${PROP_SPLIT}${mediaKeyShort}${style3[StyleObjectPseudo] || ""}`;
2824
- addStyleToInsertRules(rulesToInsert, out), classNames[fullKey1] = out[StyleObjectIdentifier];
2825
- }
2826
- }
2827
- } catch (err) {
2828
- _didIteratorError12 = true, _iteratorError12 = err;
2829
- } finally {
2830
- try {
2831
- !_iteratorNormalCompletion12 && _iterator12.return != null && _iterator12.return();
2832
- } finally {
2833
- if (_didIteratorError12) throw _iteratorError12;
2834
- }
2835
- }
2836
- } else {
2837
- let mergeMediaStyle2 = function(key5, val3, originalVal2) {
3151
+ var mediaStyle, mediaStyles, _iteratorNormalCompletion12, _didIteratorError12, _iteratorError12, _iterator12, _step12, style3, property, isSubStyle, out, subKey, fullKey1;
3152
+ if (mediaStylesSeen += 1, shouldDoClasses) ;
3153
+ else {
3154
+ let mergeMediaStyle2 = function(key6, val3, originalVal2) {
2838
3155
  var _styleState4;
2839
3156
  (_styleState4 = styleState).style || (_styleState4.style = {});
2840
- var didMerge = mergeMediaByImportance(styleState, mediaKeyShort, key5, val3, mediaState[mediaKeyShort], importanceBump, debug, originalVal2);
2841
- didMerge && key5 === "fontFamily" && (styleState.fontFamily = mediaStyle1.fontFamily);
3157
+ var didMerge = mergeMediaByImportance(styleState, mediaKeyShort, key6, val3, mediaState[mediaKeyShort], importanceBump, debug, originalVal2);
3158
+ didMerge && key6 === "fontFamily" && (styleState.fontFamily = mediaStyle1.fontFamily);
2842
3159
  };
2843
- var isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group", isPlatformMedia = isMedia === "platform";
3160
+ var mergeMediaStyle = mergeMediaStyle2, isThemeMedia = isMedia === "theme", isGroupMedia = isMedia === "group", isPlatformMedia = isMedia === "platform";
2844
3161
  if (!isThemeMedia && !isPlatformMedia && !isGroupMedia) {
2845
3162
  if (!mediaState[mediaKeyShort]) {
2846
3163
  return;
2847
3164
  }
2848
3165
  }
2849
- var mediaStyle1 = getSubStyle(styleState, key4, val2, true), importanceBump = 0;
3166
+ var mediaStyle1 = getSubStyle(styleState, key5, val2, true), importanceBump = 0;
2850
3167
  if (isThemeMedia) {
2851
3168
  if (isIos && getSetting("fastSchemeChange")) {
2852
3169
  var _styleState3;
@@ -2872,14 +3189,14 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
2872
3189
  } else if (isGroupMedia) {
2873
3190
  var _groupContext_groupName, _componentState_group, groupInfo = getGroupPropParts(mediaKeyShort), groupName = groupInfo.name, groupState = groupContext == null || (_groupContext_groupName = groupContext[groupName]) === null || _groupContext_groupName === void 0 ? void 0 : _groupContext_groupName.state, groupPseudoKey = groupInfo.pseudo, groupMediaKey = groupInfo.media;
2874
3191
  if (!groupState) {
2875
- pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set());
3192
+ false, pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set());
2876
3193
  return;
2877
3194
  }
2878
3195
  var componentGroupState = (_componentState_group = componentState.group) === null || _componentState_group === void 0 ? void 0 : _componentState_group[groupName];
2879
3196
  if (groupMediaKey) {
2880
3197
  mediaGroups || (mediaGroups = /* @__PURE__ */ new Set()), mediaGroups.add(groupMediaKey);
2881
3198
  var mediaState1 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState1 == null ? void 0 : mediaState1[groupMediaKey];
2882
- if (!mediaState1 && groupState.layout && (isActive = mediaKeyMatch(groupMediaKey, groupState.layout)), !isActive) {
3199
+ if (!mediaState1 && groupState.layout && (isActive = mediaKeyMatch(groupMediaKey, groupState.layout)), false, !isActive) {
2883
3200
  for (var pkey1 in mediaStyle1) applyDefaultStyle(pkey1, styleState);
2884
3201
  return;
2885
3202
  }
@@ -2889,7 +3206,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
2889
3206
  var _this;
2890
3207
  pseudoGroups || (pseudoGroups = /* @__PURE__ */ new Set()), pseudoGroups.add(groupName);
2891
3208
  var componentGroupPseudoState = (_this = componentGroupState || (groupContext == null ? void 0 : groupContext[groupName].state)) === null || _this === void 0 ? void 0 : _this.pseudo, isActive1 = componentGroupPseudoState == null ? void 0 : componentGroupPseudoState[groupPseudoKey], priority1 = pseudoPriorities[groupPseudoKey];
2892
- if (!isActive1) {
3209
+ if (false, !isActive1) {
2893
3210
  for (var pkey2 in mediaStyle1) applyDefaultStyle(pkey2, styleState);
2894
3211
  return;
2895
3212
  }
@@ -2897,6 +3214,10 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
2897
3214
  }
2898
3215
  }
2899
3216
  var mediaOriginalValues = styleOriginalValues.get(mediaStyle1);
3217
+ if (isGroupMedia && mediaStyle1.transition) {
3218
+ var _styleState12;
3219
+ (_styleState12 = styleState).pseudoTransitions || (_styleState12.pseudoTransitions = {}), styleState.pseudoTransitions[`$${mediaKeyShort}`] = mediaStyle1.transition;
3220
+ }
2900
3221
  for (var subKey2 in mediaStyle1) if (subKey2 !== "space") if (subKey2[0] === "$") {
2901
3222
  if (!isActivePlatform(subKey2) || !isActiveTheme(subKey2, themeName)) continue;
2902
3223
  var subOriginalValues = styleOriginalValues.get(mediaStyle1[subKey2]);
@@ -2907,13 +3228,13 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
2907
3228
  }
2908
3229
  if (!isVariant) {
2909
3230
  if (isStyledContextProp) return;
2910
- viewProps[key4] = val2;
3231
+ viewProps[key5] = val2;
2911
3232
  }
2912
3233
  }
2913
3234
  }), false) ;
2914
3235
  };
2915
3236
  conf = conf || getConfig();
2916
- (componentContext == null ? void 0 : componentContext.animationDriver) || conf.animations;
3237
+ var driver = animationDriver || (componentContext == null ? void 0 : componentContext.animationDriver) || conf.animations;
2917
3238
  if (props.passThrough) return null;
2918
3239
  var {
2919
3240
  shorthands
@@ -2927,7 +3248,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
2927
3248
  inlineWhenUnflattened,
2928
3249
  parentStaticConfig,
2929
3250
  acceptsClassName
2930
- } = staticConfig, viewProps = {}, mediaState = styleProps.mediaState || exports.mediaState, rulesToInsert = void 0, classNames = {};
3251
+ } = staticConfig, viewProps = {}, mediaState = styleProps.mediaState || exports.mediaState, shouldDoClasses = acceptsClassName && isWeb, rulesToInsert = void 0, classNames = {};
2931
3252
  props.space;
2932
3253
  var pseudos = null, hasMedia = false, dynamicThemeAccess, pseudoGroups, mediaGroups;
2933
3254
  props.className || "";
@@ -2944,15 +3265,17 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
2944
3265
  usedKeys: {},
2945
3266
  viewProps,
2946
3267
  context: componentContext,
2947
- debug
3268
+ debug,
3269
+ // resolved animation driver (respects animatedBy prop)
3270
+ animationDriver: driver
2948
3271
  };
2949
3272
  if (process.env.IS_STATIC === "is_static") {
2950
3273
  var {
2951
3274
  fallbackProps
2952
3275
  } = styleProps;
2953
3276
  fallbackProps && (styleState.props = new Proxy(props, {
2954
- get(_2, key4, val2) {
2955
- return Reflect.has(props, key4) ? Reflect.get(props, key4) : Reflect.get(fallbackProps, key4);
3277
+ get(_2, key5, val2) {
3278
+ return Reflect.has(props, key5) ? Reflect.get(props, key5) : Reflect.get(fallbackProps, key5);
2956
3279
  }
2957
3280
  }));
2958
3281
  }
@@ -3015,7 +3338,8 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
3015
3338
  dynamicThemeAccess,
3016
3339
  pseudoGroups,
3017
3340
  mediaGroups,
3018
- overriddenContextProps: styleState.overriddenContextProps
3341
+ overriddenContextProps: styleState.overriddenContextProps,
3342
+ pseudoTransitions: styleState.pseudoTransitions
3019
3343
  }, asChildExceptStyleLike = asChild === "except-style" || asChild === "except-style-web";
3020
3344
  if (!styleProps.noMergeStyle && !asChildExceptStyleLike) {
3021
3345
  var style2 = styleState.style;
@@ -3068,11 +3392,23 @@ function mergeStyle(styleState, key, val, importance) {
3068
3392
  var getSubStyle = function(styleState, subKey, styleIn, avoidMergeTransform) {
3069
3393
  var _loop2 = function(key1) {
3070
3394
  var val = styleIn[key1];
3071
- key1 = conf2.shorthands[key1] || key1;
3395
+ if (key1 = conf2.shorthands[key1] || key1, key1 === "transition") {
3396
+ var _driver_animations, _styleState;
3397
+ (_styleState = styleState).pseudoTransitions || (_styleState.pseudoTransitions = {}), styleState.pseudoTransitions[subKey] = val;
3398
+ var driver = styleState.animationDriver;
3399
+ if ((driver == null ? void 0 : driver.outputStyle) === "css") {
3400
+ var _driver_animations1, animationConfig = (_driver_animations1 = driver.animations) === null || _driver_animations1 === void 0 ? void 0 : _driver_animations1[val];
3401
+ if (animationConfig) {
3402
+ var important = subKey[0] === "$" ? " !important" : "";
3403
+ styleOut.transition = `all ${animationConfig}${important}`;
3404
+ }
3405
+ }
3406
+ return !styleOut.transition && typeof val == "string" && !(!(driver == null || (_driver_animations = driver.animations) === null || _driver_animations === void 0) && _driver_animations[val]) && (styleOut.transition = val), key = key1, "continue";
3407
+ }
3072
3408
  var shouldSkip = !staticConfig.isHOC && key1 in skipProps && !styleProps.noSkip;
3073
3409
  if (shouldSkip) return key = key1, "continue";
3074
3410
  propMapper(key1, val, styleState, false, function(skey, sval, originalVal) {
3075
- originalVal !== void 0 && (originalValues || (originalValues = {}), originalValues[skey] = originalVal), skey in validPseudoKeys && (sval = getSubStyle(styleState, skey, sval, avoidMergeTransform)), !avoidMergeTransform && skey in stylePropsTransform ? mergeTransform(styleOut, skey, sval) : styleOut[skey] = styleProps.noNormalize ? sval : normalizeValueWithProperty(sval);
3411
+ originalVal !== void 0 && (originalValues || (originalValues = {}), originalValues[skey] = originalVal), skey in validPseudoKeys && (sval = getSubStyle(styleState, skey, sval, avoidMergeTransform)), !avoidMergeTransform && skey in stylePropsTransform ? mergeTransform(styleOut, skey, sval) : styleOut[skey] = styleProps.noNormalize ? sval : normalizeValueWithProperty(sval, key1);
3076
3412
  }), key = key1;
3077
3413
  }, {
3078
3414
  staticConfig,
@@ -3110,8 +3446,9 @@ var getSubStyle = function(styleState, subKey, styleIn, avoidMergeTransform) {
3110
3446
  } else flatTransforms && mergeFlatTransforms(styleOut, flatTransforms);
3111
3447
  }
3112
3448
  return styleProps.noNormalize || fixStyles(styleOut), originalValues && styleOriginalValues.set(styleOut, originalValues), styleOut;
3113
- }, useSplitStyles = function(a, b, c, d, e, f, g, h, i, j, k, l) {
3114
- var res = getSplitStyles(a, b, c, d, e, f, g, h, i, j, k, l);
3449
+ }, useSplitStyles = function(a, b, c, d, e, f, g, h, i, j, k, l, m) {
3450
+ "use no memo";
3451
+ var res = getSplitStyles(a, b, c, d, e, f, g, h, i, j, k, l, m);
3115
3452
  return res;
3116
3453
  };
3117
3454
  function addStyleToInsertRules(rulesToInsert, styleObject) {
@@ -3173,6 +3510,18 @@ function applyDefaultStyle(pkey, styleState) {
3173
3510
  var defaultValues = animatableDefaults[pkey];
3174
3511
  defaultValues != null && !(pkey in styleState.usedKeys) && (!styleState.style || !(pkey in styleState.style)) && mergeStyle(styleState, pkey, defaultValues, 1);
3175
3512
  }
3513
+ var isEventHandler = /^on[A-Z]/;
3514
+ function mergeSlotStyleProps(base, overlay) {
3515
+ for (var key in overlay) {
3516
+ var baseVal = base[key], overlayVal = overlay[key];
3517
+ overlayVal !== void 0 && (key === "style" ? base.style = baseVal && overlayVal ? __spreadValues(__spreadValues({}, baseVal), overlayVal) : overlayVal || baseVal : key === "className" ? base.className = baseVal && overlayVal ? `${baseVal} ${overlayVal}` : overlayVal || baseVal : key === "ref" ? base.ref = baseVal && overlayVal ? composeRefs(baseVal, overlayVal) : overlayVal || baseVal : isEventHandler.test(key) && typeof baseVal == "function" && typeof overlayVal == "function" ? base[key] = composeEventHandlers(baseVal, overlayVal) : base[key] = overlayVal);
3518
+ }
3519
+ return base;
3520
+ }
3521
+ function mergeRenderElementProps(elementProps, viewProps, children) {
3522
+ var merged = mergeSlotStyleProps(__spreadValues({}, elementProps), viewProps);
3523
+ return merged.children = children, merged;
3524
+ }
3176
3525
  function usePointerEvents(props, viewProps) {
3177
3526
  var {
3178
3527
  onPointerDown,
@@ -3251,17 +3600,41 @@ function usePointerEvents(props, viewProps) {
3251
3600
  }));
3252
3601
  }
3253
3602
  }
3254
- var isEventHandler = /^on[A-Z]/;
3255
- function mergeSlotStyleProps(base, overlay) {
3256
- for (var key in overlay) {
3257
- var baseVal = base[key], overlayVal = overlay[key];
3258
- overlayVal !== void 0 && (key === "style" ? base.style = baseVal && overlayVal ? __spreadValues(__spreadValues({}, baseVal), overlayVal) : overlayVal || baseVal : key === "className" ? base.className = baseVal && overlayVal ? `${baseVal} ${overlayVal}` : overlayVal || baseVal : key === "ref" ? base.ref = baseVal && overlayVal ? composeRefs(baseVal, overlayVal) : overlayVal || baseVal : isEventHandler.test(key) && typeof baseVal == "function" && typeof overlayVal == "function" ? base[key] = composeEventHandlers(baseVal, overlayVal) : base[key] = overlayVal);
3603
+ function resolveEffectivePseudoTransition(prev, next, pseudoTransitions, baseTransition) {
3604
+ if (!pseudoTransitions) return baseTransition;
3605
+ var prevState = prev || {
3606
+ hover: false,
3607
+ press: false,
3608
+ focus: false,
3609
+ groups: {}
3610
+ };
3611
+ if (next.press && !prevState.press && pseudoTransitions.pressStyle) return pseudoTransitions.pressStyle;
3612
+ if (next.hover && !prevState.hover && pseudoTransitions.hoverStyle) return pseudoTransitions.hoverStyle;
3613
+ if (next.focus && !prevState.focus && pseudoTransitions.focusStyle) return pseudoTransitions.focusStyle;
3614
+ for (var key in pseudoTransitions) if (key.startsWith("$group-")) {
3615
+ var _next_group_groupName, _next_group, _prevState_groups, match = key.match(/^\$group-(.+)-(hover|press|focus)$/);
3616
+ if (!match) continue;
3617
+ var groupName = match[1], pseudoType = match[2], nextGroupPseudo = (_next_group = next.group) === null || _next_group === void 0 || (_next_group_groupName = _next_group[groupName]) === null || _next_group_groupName === void 0 ? void 0 : _next_group_groupName.pseudo, prevGroupPseudo = (_prevState_groups = prevState.groups) === null || _prevState_groups === void 0 ? void 0 : _prevState_groups[groupName];
3618
+ if ((nextGroupPseudo == null ? void 0 : nextGroupPseudo[pseudoType]) && !(prevGroupPseudo == null ? void 0 : prevGroupPseudo[pseudoType])) return pseudoTransitions[key];
3259
3619
  }
3260
- return base;
3261
- }
3262
- function mergeRenderElementProps(elementProps, viewProps, children) {
3263
- var merged = mergeSlotStyleProps(__spreadValues({}, elementProps), viewProps);
3264
- return merged.children = children, merged;
3620
+ return baseTransition;
3621
+ }
3622
+ function extractPseudoState(state2) {
3623
+ var groups = {};
3624
+ if (state2.group) for (var groupName in state2.group) {
3625
+ var _state_group_groupName, pseudo = (_state_group_groupName = state2.group[groupName]) === null || _state_group_groupName === void 0 ? void 0 : _state_group_groupName.pseudo;
3626
+ pseudo && (groups[groupName] = {
3627
+ hover: pseudo.hover,
3628
+ press: pseudo.press,
3629
+ focus: pseudo.focus
3630
+ });
3631
+ }
3632
+ return {
3633
+ hover: state2.hover,
3634
+ press: state2.press,
3635
+ focus: state2.focus,
3636
+ groups
3637
+ };
3265
3638
  }
3266
3639
  function setElementProps(element) {
3267
3640
  element && !element.getBoundingClientRect && (element.getBoundingClientRect = function() {
@@ -3360,6 +3733,7 @@ var subscribeToContextGroup = function(props) {
3360
3733
  };
3361
3734
  };
3362
3735
  var Theme = /* @__PURE__ */ React.forwardRef(function(props, ref) {
3736
+ "use no memo";
3363
3737
  if (props.disable) return props.children;
3364
3738
  var {
3365
3739
  passThrough
@@ -3384,7 +3758,7 @@ function getThemedChildren(themeState, children, props) {
3384
3758
  var isRoot = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false, stateRef = arguments.length > 4 ? arguments[4] : void 0, passThrough = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : false, {
3385
3759
  shallow,
3386
3760
  forceClassName
3387
- } = props, state = stateRef.current, hasEverThemed = state.hasEverThemed, shouldRenderChildrenWithTheme = hasEverThemed || themeState.isNew || isRoot || hasThemeUpdatingProps(props);
3761
+ } = props, state2 = stateRef.current, hasEverThemed = state2.hasEverThemed, shouldRenderChildrenWithTheme = hasEverThemed || themeState.isNew || isRoot || hasThemeUpdatingProps(props);
3388
3762
  if (!shouldRenderChildrenWithTheme) return children;
3389
3763
  children = /* @__PURE__ */ jsxRuntime.jsx(ThemeStateContext.Provider, {
3390
3764
  value: themeState.id,
@@ -3394,9 +3768,9 @@ function getThemedChildren(themeState, children, props) {
3394
3768
  isInverse,
3395
3769
  name
3396
3770
  } = themeState, requiresExtraWrapper = isInverse || forceClassName;
3397
- if (state.hasEverThemed || (state.hasEverThemed = true), (requiresExtraWrapper || // if the theme is exactly dark or light, its likely to change between dark/light
3771
+ if (state2.hasEverThemed || (state2.hasEverThemed = true), (requiresExtraWrapper || // if the theme is exactly dark or light, its likely to change between dark/light
3398
3772
  // and that would require wrapping which would re-parent, so to avoid re-parenting do this
3399
- themeState.name === "dark" || themeState.name === "light") && (state.hasEverThemed = "wrapped"), shallow && themeState.parentId) {
3773
+ themeState.name === "dark" || themeState.name === "light") && (state2.hasEverThemed = "wrapped"), shallow && themeState.parentId) {
3400
3774
  var parentState = getThemeState(themeState.isNew ? themeState.id : themeState.parentId);
3401
3775
  if (!parentState) throw new Error("‼️010");
3402
3776
  children = React.Children.toArray(children).map(function(child) {
@@ -3411,6 +3785,7 @@ function getThemedChildren(themeState, children, props) {
3411
3785
  }
3412
3786
  function themeable(Component, staticConfig) {
3413
3787
  var optimize = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false, withThemeComponent = /* @__PURE__ */ React.forwardRef(function(props, ref) {
3788
+ "use no memo";
3414
3789
  var userDefaults = getDefaultProps(staticConfig, props.componentName), defaultTheme = userDefaults == null ? void 0 : userDefaults.theme, defaultResetTheme = userDefaults == null ? void 0 : userDefaults.themeReset, _a = props, {
3415
3790
  theme,
3416
3791
  componentName,
@@ -3422,7 +3797,7 @@ function themeable(Component, staticConfig) {
3422
3797
  ]), overriddenContextProps, context = staticConfig == null ? void 0 : staticConfig.context;
3423
3798
  if (context) for (var key in context.props) {
3424
3799
  var val = props[key];
3425
- val !== void 0 && (overriddenContextProps || (overriddenContextProps = {}), overriddenContextProps[key] = val);
3800
+ val !== void 0 && (overriddenContextProps = overriddenContextProps || {}, overriddenContextProps[key] = val);
3426
3801
  }
3427
3802
  var element = (
3428
3803
  // @ts-expect-error its ok
@@ -3432,7 +3807,7 @@ function themeable(Component, staticConfig) {
3432
3807
  "data-disable-theme": true
3433
3808
  }))
3434
3809
  ), filteredProps = null, compName = componentName || (staticConfig == null ? void 0 : staticConfig.componentName);
3435
- if (compName && (filteredProps || (filteredProps = {}), filteredProps.componentName = compName), "debug" in props && (filteredProps || (filteredProps = {}), filteredProps.debug = props.debug), ("theme" in props || defaultTheme) && (filteredProps || (filteredProps = {}), filteredProps.name = "theme" in props ? props.theme : defaultTheme), ("themeReset" in props || defaultResetTheme) && (filteredProps || (filteredProps = {}), filteredProps.reset = "themeReset" in props ? themeReset : defaultResetTheme), optimize && !filteredProps) return element;
3810
+ if (compName && (filteredProps = filteredProps || {}, filteredProps.componentName = compName), "debug" in props && (filteredProps = filteredProps || {}, filteredProps.debug = props.debug), ("theme" in props || defaultTheme) && (filteredProps = filteredProps || {}, filteredProps.name = "theme" in props ? props.theme : defaultTheme), ("themeReset" in props || defaultResetTheme) && (filteredProps = filteredProps || {}, filteredProps.reset = "themeReset" in props ? themeReset : defaultResetTheme), optimize && !filteredProps) return element;
3436
3811
  var contents = /* @__PURE__ */ jsxRuntime.jsx(Theme, __spreadProps(__spreadValues({
3437
3812
  "disable-child-theme": true
3438
3813
  }, filteredProps), {
@@ -3448,8 +3823,6 @@ function themeable(Component, staticConfig) {
3448
3823
  }), withTheme = withThemeComponent;
3449
3824
  return withTheme.displayName = `Themed(${(Component == null ? void 0 : Component.displayName) || (Component == null ? void 0 : Component.name) || "Anonymous"})`, withTheme;
3450
3825
  }
3451
- function getStyleTags(styles) {
3452
- }
3453
3826
  var ClientOnlyContext = /* @__PURE__ */ React.createContext(false), ClientOnly = function(param) {
3454
3827
  var {
3455
3828
  children,
@@ -3476,6 +3849,7 @@ function _type_of$2(obj) {
3476
3849
  return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
3477
3850
  }
3478
3851
  var useComponentState = function(props, animationDriver, staticConfig, config) {
3852
+ "use no memo";
3479
3853
  var _animationDriver_usePresence, isHydrated = useDidFinishSSR(), needsHydration = !useIsClientOnly(), useAnimations = (animationDriver == null ? void 0 : animationDriver.isStub) ? void 0 : animationDriver == null ? void 0 : animationDriver.useAnimations, {
3480
3854
  isHOC
3481
3855
  } = staticConfig, stateRef = React.useRef(
@@ -3485,7 +3859,7 @@ var useComponentState = function(props, animationDriver, staticConfig, config) {
3485
3859
  stateRef.current || (stateRef.current = {
3486
3860
  startedUnhydrated: needsHydration && !isHydrated
3487
3861
  });
3488
- var hasAnimationProp = !!(!isHOC && "transition" in props || props.style && hasAnimatedStyleValue(props.style)), _animationDriver_inputStyle, inputStyle = (_animationDriver_inputStyle = animationDriver == null ? void 0 : animationDriver.inputStyle) !== null && _animationDriver_inputStyle !== void 0 ? _animationDriver_inputStyle : (animationDriver == null ? void 0 : animationDriver.supportsCSS) ? "css" : "inline", supportsCSS = inputStyle === "css", curStateRef = stateRef.current;
3862
+ var hasAnimationProp = !!(!isHOC && "transition" in props || props.style && hasAnimatedStyleValue(props.style)), _animationDriver_inputStyle, inputStyle = (_animationDriver_inputStyle = animationDriver == null ? void 0 : animationDriver.inputStyle) !== null && _animationDriver_inputStyle !== void 0 ? _animationDriver_inputStyle : "css", _animationDriver_outputStyle, outputStyle = (_animationDriver_outputStyle = animationDriver == null ? void 0 : animationDriver.outputStyle) !== null && _animationDriver_outputStyle !== void 0 ? _animationDriver_outputStyle : "css", curStateRef = stateRef.current;
3489
3863
  !needsHydration && hasAnimationProp && (curStateRef.hasAnimated = true);
3490
3864
  var willBeAnimatedClient = (function() {
3491
3865
  var next = !!(hasAnimationProp && !isHOC && useAnimations);
@@ -3505,11 +3879,11 @@ var useComponentState = function(props, animationDriver, staticConfig, config) {
3505
3879
  canImmediatelyEnter ? defaultComponentStateShouldEnter : defaultComponentState
3506
3880
  ) : defaultComponentStateMounted, disabled = isDisabled(props);
3507
3881
  disabled != null && (initialState.disabled = disabled);
3508
- var states2 = React.useState(initialState), state = props.forceStyle ? __spreadProps(__spreadValues({}, states2[0]), {
3882
+ var states2 = React.useState(initialState), state2 = props.forceStyle ? __spreadProps(__spreadValues({}, states2[0]), {
3509
3883
  [props.forceStyle]: true
3510
3884
  }) : states2[0], setState = states2[1], isAnimated = willBeAnimated;
3511
- disabled !== state.disabled && (disabled && Object.assign(state, defaultComponentStateMounted), state.disabled = disabled, setState(function(_2) {
3512
- return __spreadValues({}, state);
3885
+ disabled !== state2.disabled && (disabled && Object.assign(state2, defaultComponentStateMounted), state2.disabled = disabled, setState(function(_2) {
3886
+ return __spreadValues({}, state2);
3513
3887
  }));
3514
3888
  var groupName = props.group, setStateShallow = useCreateShallowSetState(setState, props.debug);
3515
3889
  if (presenceState && isAnimated && isHydrated && staticConfig.variants) {
@@ -3521,7 +3895,7 @@ var useComponentState = function(props, animationDriver, staticConfig, config) {
3521
3895
  } = presenceState;
3522
3896
  isObj(custom) && Object.assign(props, custom);
3523
3897
  var exv = exitVariant != null ? exitVariant : enterExitVariant, env = enterVariant != null ? enterVariant : enterExitVariant;
3524
- state.unmounted && env && staticConfig.variants[env] ? props[env] = true : isExiting && exv && (props[exv] = exitVariant !== enterExitVariant);
3898
+ state2.unmounted && env && staticConfig.variants[env] ? props[env] = true : isExiting && exv && (props[exv] = exitVariant !== enterExitVariant);
3525
3899
  }
3526
3900
  var noClass = !isWeb;
3527
3901
  return {
@@ -3539,9 +3913,10 @@ var useComponentState = function(props, animationDriver, staticConfig, config) {
3539
3913
  setState,
3540
3914
  setStateShallow,
3541
3915
  noClass,
3542
- state,
3916
+ state: state2,
3543
3917
  stateRef,
3544
- supportsCSS,
3918
+ inputStyle,
3919
+ outputStyle,
3545
3920
  willBeAnimated,
3546
3921
  willBeAnimatedClient
3547
3922
  };
@@ -3604,8 +3979,9 @@ function createComponent(staticConfig) {
3604
3979
  isText,
3605
3980
  isHOC
3606
3981
  } = staticConfig, component = /* @__PURE__ */ React.forwardRef(function(propsIn, forwardedRef) {
3982
+ "use no memo";
3607
3983
  var _hooks_usePropsTransform;
3608
- config || (config = getConfig());
3984
+ config = config || getConfig();
3609
3985
  if (!hasSetupBaseViews) {
3610
3986
  var _hooks_getBaseViews;
3611
3987
  hasSetupBaseViews = true;
@@ -3613,25 +3989,25 @@ function createComponent(staticConfig) {
3613
3989
  baseViews && (BaseText = baseViews.Text, BaseView = baseViews.View);
3614
3990
  }
3615
3991
  if (propsIn["data-test-renders"]) {
3616
- var _propsIn_datatestrenders, _current, _2;
3617
- (_2 = (_propsIn_datatestrenders = propsIn["data-test-renders"])[_current = "current"]) !== null && _2 !== void 0 || (_propsIn_datatestrenders[_current] = 0), propsIn["data-test-renders"].current += 1;
3992
+ var _propsIn_datatestrenders_current;
3993
+ propsIn["data-test-renders"].current = (_propsIn_datatestrenders_current = propsIn["data-test-renders"].current) !== null && _propsIn_datatestrenders_current !== void 0 ? _propsIn_datatestrenders_current : 0, propsIn["data-test-renders"].current += 1;
3618
3994
  }
3619
3995
  var {
3620
3996
  context,
3621
3997
  isReactNative
3622
- } = staticConfig, debugProp = propsIn.debug, styledContextValue = context ? React.useContext(context) : void 0, overriddenContextProps = null, componentContext = React.useContext(ComponentContext);
3998
+ } = staticConfig, debugProp = propsIn.debug, styledContextValue = context ? React.useContext(context) : void 0, overriddenContextProps = null, componentContext = React.useContext(ComponentContext), isInsideNativeMenu = React.useContext(NativeMenuContext);
3623
3999
  var props = propsIn, componentName = props.componentName || staticConfig.componentName, defaultProps = getDefaultProps(staticConfig, props.componentName), [nextProps, overrides] = mergeComponentProps(defaultProps, styledContextValue, propsIn);
3624
4000
  props = nextProps, overriddenContextProps = overrides;
3625
4001
  var groupContextParent = React.useContext(GroupContext), animationDriver = (function() {
3626
- if (props.animatedBy && (config == null ? void 0 : config.animations)) {
3627
- var animations2 = config.animations;
3628
- if ("default" in animations2) {
3629
- var _animations_props_animatedBy;
3630
- return (_animations_props_animatedBy = animations2[props.animatedBy]) !== null && _animations_props_animatedBy !== void 0 ? _animations_props_animatedBy : animations2.default;
4002
+ if (props.animatedBy && config) {
4003
+ if (config.animationDrivers) {
4004
+ var _config_animationDrivers_props_animatedBy;
4005
+ return (_config_animationDrivers_props_animatedBy = config.animationDrivers[props.animatedBy]) !== null && _config_animationDrivers_props_animatedBy !== void 0 ? _config_animationDrivers_props_animatedBy : config.animations;
3631
4006
  }
3632
- return props.animatedBy === "default" ? animations2 : null;
4007
+ return props.animatedBy === "default" ? config.animations : null;
3633
4008
  }
3634
- return componentContext.animationDriver;
4009
+ var _resolveAnimationDriver, _ref;
4010
+ return (_ref = (_resolveAnimationDriver = resolveAnimationDriver(componentContext.animationDriver)) !== null && _resolveAnimationDriver !== void 0 ? _resolveAnimationDriver : resolveAnimationDriver(config == null ? void 0 : config.animations)) !== null && _ref !== void 0 ? _ref : null;
3635
4011
  })(), useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, componentState = useComponentState(props, (animationDriver == null ? void 0 : animationDriver.isStub) ? null : animationDriver, staticConfig), {
3636
4012
  disabled,
3637
4013
  groupName,
@@ -3644,9 +4020,10 @@ function createComponent(staticConfig) {
3644
4020
  presenceState,
3645
4021
  setState,
3646
4022
  noClass,
3647
- state,
4023
+ state: state2,
3648
4024
  stateRef,
3649
- supportsCSS,
4025
+ inputStyle,
4026
+ outputStyle,
3650
4027
  willBeAnimated,
3651
4028
  willBeAnimatedClient,
3652
4029
  startedUnhydrated
@@ -3661,9 +4038,9 @@ function createComponent(staticConfig) {
3661
4038
  var listeners2 = /* @__PURE__ */ new Set();
3662
4039
  return (_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || (_stateRef_current_group_listeners = _stateRef_current_group.listeners) === null || _stateRef_current_group_listeners === void 0 || _stateRef_current_group_listeners.clear(), stateRef.current.group = {
3663
4040
  listeners: listeners2,
3664
- emit(state2) {
4041
+ emit(state22) {
3665
4042
  listeners2.forEach(function(l) {
3666
- return l(state2);
4043
+ return l(state22);
3667
4044
  });
3668
4045
  },
3669
4046
  subscribe(cb) {
@@ -3689,12 +4066,8 @@ function createComponent(staticConfig) {
3689
4066
  }
3690
4067
  });
3691
4068
  }, [stateRef, groupName, groupContextParent]), setStateShallow = componentState.setStateShallow;
3692
- var isTaggable = !Component || typeof Component == "string", renderProp = props.render, element = Component, BaseTextComponent = BaseText || element || "span", BaseViewComponent = BaseView || element || "div", elementType = isText ? BaseTextComponent : BaseViewComponent;
3693
- animationDriver && isAnimated && // this should really be behind another prop as it's not really related to
3694
- // "needsWebStyles" basically with motion we just animate a plain div, but
3695
- // we still have animated.View/Text for Sheet which wants to control
3696
- // things declaratively
3697
- !animationDriver.needsWebStyles && (elementType = animationDriver[isText ? "Text" : "View"] || elementType);
4069
+ var renderProp = props.render, element = Component, BaseTextComponent = BaseText || element || "span", BaseViewComponent = BaseView || element || "div", BaseComponent = isText ? BaseTextComponent : BaseViewComponent, elementType = BaseComponent, isAnimatedCustomComponent = animationDriver && isAnimated && animationDriver.needsCustomComponent;
4070
+ isAnimatedCustomComponent && (elementType = animationDriver[isText ? "Text" : "View"] || elementType);
3698
4071
  var disableTheme = isHOC;
3699
4072
  var themeStateProps = {
3700
4073
  componentName,
@@ -3712,7 +4085,7 @@ function createComponent(staticConfig) {
3712
4085
  setDidGetVariableValue(false);
3713
4086
  var resolveValues = (
3714
4087
  // if HOC + mounted + has animation prop, resolve as value so it passes non-variable to child
3715
- isAnimated && !supportsCSS || isHOC && state.unmounted == false && hasAnimationProp ? "value" : "auto"
4088
+ isAnimated && inputStyle !== "css" || isHOC && state2.unmounted == false && hasAnimationProp ? "value" : "auto"
3716
4089
  ), styleProps = {
3717
4090
  mediaState,
3718
4091
  noClass,
@@ -3722,11 +4095,11 @@ function createComponent(staticConfig) {
3722
4095
  willBeAnimated,
3723
4096
  styledContext: styledContextValue
3724
4097
  }, themeName = (themeState == null ? void 0 : themeState.name) || "";
3725
- var splitStyles = useSplitStyles(props, staticConfig, theme, themeName, state, styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp), isPassthrough = !splitStyles, contextForOverride = staticConfig.context;
4098
+ var splitStyles = useSplitStyles(props, staticConfig, theme, themeName, state2, styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp, animationDriver), isPassthrough = !splitStyles, contextForOverride = staticConfig.context;
3726
4099
  if (splitStyles == null ? void 0 : splitStyles.overriddenContextProps) {
3727
4100
  var _staticConfig_parentStaticConfig, contextForProps = staticConfig.context || ((_staticConfig_parentStaticConfig = staticConfig.parentStaticConfig) === null || _staticConfig_parentStaticConfig === void 0 ? void 0 : _staticConfig_parentStaticConfig.context);
3728
4101
  if (contextForProps) {
3729
- for (var key in splitStyles.overriddenContextProps) overriddenContextProps || (overriddenContextProps = {}), overriddenContextProps[key] = splitStyles.overriddenContextProps[key];
4102
+ for (var key in splitStyles.overriddenContextProps) overriddenContextProps = overriddenContextProps || {}, overriddenContextProps[key] = splitStyles.overriddenContextProps[key];
3730
4103
  staticConfig.context || (contextForOverride = contextForProps);
3731
4104
  }
3732
4105
  }
@@ -3742,7 +4115,8 @@ function createComponent(staticConfig) {
3742
4115
  });
3743
4116
  }
3744
4117
  }
3745
- if (!isPassthrough && (hasAnimationProp || groupName) && (animationDriver == null ? void 0 : animationDriver.avoidReRenders)) {
4118
+ var hasEnterExitTransition = props.transition && _type_of$1(props.transition) === "object" && !Array.isArray(props.transition) && ("enter" in props.transition || "exit" in props.transition);
4119
+ if (!isPassthrough && (hasAnimationProp || groupName) && (animationDriver == null ? void 0 : animationDriver.avoidReRenders) && !hasEnterExitTransition) {
3746
4120
  let updateGroupListeners2 = function() {
3747
4121
  var updatedState = stateRef.current.nextState;
3748
4122
  if (groupContext) {
@@ -3760,7 +4134,7 @@ function createComponent(staticConfig) {
3760
4134
  notifyGroupSubscribers(groupContext, stateRef.current.group || null, childrenGroupState);
3761
4135
  }
3762
4136
  };
3763
- var _componentContext, _componentContext1, ogSetStateShallow = setStateShallow;
4137
+ var ogSetStateShallow = setStateShallow;
3764
4138
  if (stateRef.current.updateStyleListener = function() {
3765
4139
  var useStyleListener = stateRef.current.useStyleListener;
3766
4140
  if (!useStyleListener) {
@@ -3768,11 +4142,11 @@ function createComponent(staticConfig) {
3768
4142
  pendingState && (stateRef.current.nextState = void 0, ogSetStateShallow(pendingState));
3769
4143
  return;
3770
4144
  }
3771
- var updatedState = stateRef.current.nextState || state, mediaState2 = stateRef.current.nextMedia, nextStyles = getSplitStyles(props, staticConfig, theme, themeName, updatedState, mediaState2 ? __spreadProps(__spreadValues({}, styleProps), {
4145
+ var updatedState = stateRef.current.nextState || state2, mediaState2 = stateRef.current.nextMedia, nextStyles = getSplitStyles(props, staticConfig, theme, themeName, updatedState, mediaState2 ? __spreadProps(__spreadValues({}, styleProps), {
3772
4146
  mediaState: mediaState2
3773
- }) : styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp);
3774
- useStyleListener((nextStyles == null ? void 0 : nextStyles.style) || {});
3775
- }, (_componentContext = componentContext).mediaEmitListeners || (_componentContext.mediaEmitListeners = /* @__PURE__ */ new Set()), !stateRef.current.mediaEmitCleanup) {
4147
+ }) : styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp, animationDriver), effectiveTransition2 = resolveEffectivePseudoTransition(stateRef.current.prevPseudoState, updatedState, nextStyles == null ? void 0 : nextStyles.pseudoTransitions, props.transition);
4148
+ stateRef.current.prevPseudoState = extractPseudoState(updatedState), useStyleListener((nextStyles == null ? void 0 : nextStyles.style) || {}, effectiveTransition2);
4149
+ }, componentContext.mediaEmitListeners = componentContext.mediaEmitListeners || /* @__PURE__ */ new Set(), !stateRef.current.mediaEmitCleanup) {
3776
4150
  var updateListener = function(next) {
3777
4151
  var _stateRef_current_updateStyleListener, _stateRef_current;
3778
4152
  stateRef.current.nextMedia = next, (_stateRef_current_updateStyleListener = (_stateRef_current = stateRef.current).updateStyleListener) === null || _stateRef_current_updateStyleListener === void 0 || _stateRef_current_updateStyleListener.call(_stateRef_current);
@@ -3782,7 +4156,7 @@ function createComponent(staticConfig) {
3782
4156
  (_componentContext_mediaEmitListeners = componentContext.mediaEmitListeners) === null || _componentContext_mediaEmitListeners === void 0 || _componentContext_mediaEmitListeners.delete(updateListener);
3783
4157
  };
3784
4158
  }
3785
- (_componentContext1 = componentContext).mediaEmit || (_componentContext1.mediaEmit = function(next) {
4159
+ componentContext.mediaEmit = componentContext.mediaEmit || function(next) {
3786
4160
  var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
3787
4161
  try {
3788
4162
  for (var _iterator = componentContext.mediaEmitListeners[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
@@ -3798,8 +4172,8 @@ function createComponent(staticConfig) {
3798
4172
  if (_didIteratorError) throw _iteratorError;
3799
4173
  }
3800
4174
  }
3801
- }), stateRef.current.setStateShallow = function(nextOrGetNext) {
3802
- var prev = stateRef.current.nextState || state, next = typeof nextOrGetNext == "function" ? nextOrGetNext(prev) : nextOrGetNext;
4175
+ }, stateRef.current.setStateShallow = function(nextOrGetNext) {
4176
+ var prev = stateRef.current.nextState || state2, next = typeof nextOrGetNext == "function" ? nextOrGetNext(prev) : nextOrGetNext;
3803
4177
  if (!(next === prev || isEqualShallow(prev, next))) {
3804
4178
  var canAvoidReRender = Object.keys(next).every(function(key3) {
3805
4179
  return avoidReRenderKeys.has(key3);
@@ -3809,18 +4183,12 @@ function createComponent(staticConfig) {
3809
4183
  updateGroupListeners2(), (_stateRef_current_updateStyleListener = (_stateRef_current = stateRef.current).updateStyleListener) === null || _stateRef_current_updateStyleListener === void 0 || _stateRef_current_updateStyleListener.call(_stateRef_current);
3810
4184
  } else ogSetStateShallow(next);
3811
4185
  }
3812
- }, setStateShallow = function(state2) {
4186
+ }, setStateShallow = function(state22) {
3813
4187
  var _stateRef_current_setStateShallow, _stateRef_current;
3814
- (_stateRef_current_setStateShallow = (_stateRef_current = stateRef.current).setStateShallow) === null || _stateRef_current_setStateShallow === void 0 || _stateRef_current_setStateShallow.call(_stateRef_current, state2);
4188
+ (_stateRef_current_setStateShallow = (_stateRef_current = stateRef.current).setStateShallow) === null || _stateRef_current_setStateShallow === void 0 || _stateRef_current_setStateShallow.call(_stateRef_current, state22);
3815
4189
  };
3816
4190
  }
3817
- if (splitStyles) {
3818
- if (props.group && props.untilMeasured === "hide" && !stateRef.current.hasMeasured) {
3819
- var _splitStyles;
3820
- (_splitStyles = splitStyles).style || (_splitStyles.style = {}), splitStyles.style.opacity = 0;
3821
- }
3822
- splitStyles.dynamicThemeAccess != null && (stateRef.current.isListeningToTheme = splitStyles.dynamicThemeAccess);
3823
- }
4191
+ splitStyles && (props.group && props.untilMeasured === "hide" && !stateRef.current.hasMeasured && (splitStyles.style = splitStyles.style || {}, splitStyles.style.opacity = 0), splitStyles.dynamicThemeAccess != null && (stateRef.current.isListeningToTheme = splitStyles.dynamicThemeAccess));
3824
4192
  var hasRuntimeMediaKeys = (splitStyles == null ? void 0 : splitStyles.hasMedia) && splitStyles.hasMedia !== true, shouldListenForMedia = didGetVariableValue() || hasRuntimeMediaKeys || noClass && (splitStyles == null ? void 0 : splitStyles.hasMedia) === true, mediaListeningKeys = hasRuntimeMediaKeys ? splitStyles.hasMedia : null;
3825
4193
  setMediaShouldUpdate(componentContext, shouldListenForMedia, mediaListeningKeys);
3826
4194
  var {
@@ -3877,23 +4245,26 @@ function createComponent(staticConfig) {
3877
4245
  "onClick",
3878
4246
  "theme"
3879
4247
  ]), viewProps = nonTamaguiProps;
3880
- !isTaggable && props.forceStyle && (viewProps.forceStyle = props.forceStyle), isHOC && (typeof _themeProp < "u" && (viewProps.theme = _themeProp), typeof passThrough < "u" && (viewProps.passThrough = passThrough)), renderProp && elementType.acceptTagProp && (viewProps.render = renderProp);
4248
+ props.forceStyle && (viewProps.forceStyle = props.forceStyle), isHOC && (typeof _themeProp < "u" && (viewProps.theme = _themeProp), typeof passThrough < "u" && (viewProps.passThrough = passThrough));
3881
4249
  var animationStyles, shouldUseAnimation = (
3882
4250
  // if it supports css vars we run it on server too to get matching initial style
3883
- (supportsCSS ? willBeAnimatedClient : willBeAnimated) && useAnimations && !isHOC
4251
+ (inputStyle === "css" ? willBeAnimatedClient : willBeAnimated) && useAnimations && !isHOC
3884
4252
  ), animatedRef;
3885
4253
  if (shouldUseAnimation) {
3886
4254
  var useStyleEmitter = (animationDriver == null ? void 0 : animationDriver.avoidReRenders) ? function(listener) {
3887
4255
  stateRef.current.useStyleListener = listener;
3888
- } : void 0, animations = useAnimations({
4256
+ } : void 0, effectiveTransition = resolveEffectivePseudoTransition(stateRef.current.prevPseudoState, state2, splitStyles == null ? void 0 : splitStyles.pseudoTransitions, props.transition);
4257
+ splitStyles && (splitStyles.effectiveTransition = effectiveTransition), stateRef.current.prevPseudoState = extractPseudoState(state2);
4258
+ var animations = useAnimations({
3889
4259
  props: propsWithAnimation,
3890
- // if hydrating, send empty style
3891
- style: splitStylesStyle || {},
4260
+ // clone style to prevent animation driver mutations from leaking to viewProps
4261
+ // during SSR/pre-hydration (CSS driver mutates style.transition in place)
4262
+ style: isHydrated ? splitStylesStyle || {} : __spreadValues({}, splitStylesStyle),
3892
4263
  // @ts-ignore
3893
4264
  styleState: splitStyles,
3894
4265
  useStyleEmitter,
3895
4266
  presence,
3896
- componentState: state,
4267
+ componentState: state2,
3897
4268
  styleProps,
3898
4269
  theme,
3899
4270
  themeName,
@@ -3901,7 +4272,7 @@ function createComponent(staticConfig) {
3901
4272
  staticConfig,
3902
4273
  stateRef
3903
4274
  });
3904
- animations && (animations.ref && (animatedRef = animations.ref), isHydrated && animations && (animationStyles = animations.style, viewProps.style = animationStyles, animations.className && (viewProps.className = `${state.unmounted === "should-enter" ? "t_unmounted " : ""}${viewProps.className || ""} ${animations.className}`)));
4275
+ animations && (animations.ref && (animatedRef = animations.ref), isHydrated && animations && (animationStyles = animations.style, viewProps.style = animationStyles, animations.className && (viewProps.className = `${state2.unmounted === "should-enter" ? "t_unmounted " : ""}${viewProps.className || ""} ${animations.className}`)));
3905
4276
  }
3906
4277
  !isPassthrough && groupContext && // avoids onLayout if we don't need it
3907
4278
  props.containerType !== "normal" && (nonTamaguiProps.onLayout = composeEventHandlers(nonTamaguiProps.onLayout, function(e) {
@@ -3921,14 +4292,14 @@ function createComponent(staticConfig) {
3921
4292
  });
3922
4293
  };
3923
4294
  useIsomorphicLayoutEffect(function() {
3924
- if (state.unmounted === true && hasEnterStyle) {
4295
+ if (state2.unmounted === true && hasEnterStyle) {
3925
4296
  setStateShallow({
3926
4297
  unmounted: "should-enter"
3927
4298
  });
3928
4299
  return;
3929
4300
  }
3930
- if (state.unmounted) {
3931
- if (supportsCSS) {
4301
+ if (state2.unmounted) {
4302
+ if (inputStyle === "css") {
3932
4303
  var cancelled = false;
3933
4304
  return requestAnimationFrame(function() {
3934
4305
  cancelled || requestAnimationFrame(function() {
@@ -3948,7 +4319,7 @@ function createComponent(staticConfig) {
3948
4319
  var _stateRef_current_mediaEmitCleanup, _stateRef_current;
3949
4320
  componentSetStates.delete(setState), (_stateRef_current_mediaEmitCleanup = (_stateRef_current = stateRef.current).mediaEmitCleanup) === null || _stateRef_current_mediaEmitCleanup === void 0 || _stateRef_current_mediaEmitCleanup.call(_stateRef_current);
3950
4321
  };
3951
- }, [state.unmounted, supportsCSS]), useIsomorphicLayoutEffect(function() {
4322
+ }, [state2.unmounted, inputStyle]), useIsomorphicLayoutEffect(function() {
3952
4323
  if (!disabled && !(!pseudoGroups && !mediaGroups) && allGroupContexts) return subscribeToContextGroup({
3953
4324
  groupContext: allGroupContexts,
3954
4325
  setStateShallow,
@@ -3958,9 +4329,9 @@ function createComponent(staticConfig) {
3958
4329
  }, [allGroupContexts, disabled, pseudoGroups ? objectIdentityKey(pseudoGroups) : 0, mediaGroups ? objectIdentityKey(mediaGroups) : 0]);
3959
4330
  var groupEmitter = stateRef.current.group;
3960
4331
  useIsomorphicLayoutEffect(function() {
3961
- !groupContext || !groupEmitter || notifyGroupSubscribers(groupContext, groupEmitter, state);
3962
- }, [groupContext, groupEmitter, state]);
3963
- var runtimePressStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.pressStyle), runtimeFocusStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.focusStyle), runtimeFocusVisibleStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.focusVisibleStyle), attachFocus = !!(runtimePressStyle || runtimeFocusStyle || runtimeFocusVisibleStyle || onFocus || onBlur || componentContext.setParentFocusState), hasDynamicGroupChildren = !!(groupName && state.hasDynGroupChildren), attachPress = !!(hasDynamicGroupChildren || runtimePressStyle || onPress || onPressOut || onPressIn || onMouseDown || onMouseUp || onLongPress || onClick || (pseudos == null ? void 0 : pseudos.focusVisibleStyle)), runtimeHoverStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.hoverStyle), needsHoverState = !!(hasDynamicGroupChildren || runtimeHoverStyle), attachHover = isWeb, shouldAttach = !disabled && !props.asChild && !!(attachFocus || attachPress || attachHover || runtimePressStyle || runtimeHoverStyle || runtimeFocusStyle), needsPressState = !!(hasDynamicGroupChildren || runtimePressStyle);
4332
+ !groupContext || !groupEmitter || notifyGroupSubscribers(groupContext, groupEmitter, state2);
4333
+ }, [groupContext, groupEmitter, state2]);
4334
+ var runtimePressStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.pressStyle), runtimeFocusStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.focusStyle), runtimeFocusVisibleStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.focusVisibleStyle), attachFocus = !!(runtimePressStyle || runtimeFocusStyle || runtimeFocusVisibleStyle || onFocus || onBlur || componentContext.setParentFocusState), hasDynamicGroupChildren = !!(groupName && state2.hasDynGroupChildren), attachPress = !!(hasDynamicGroupChildren || runtimePressStyle || onPress || onPressOut || onPressIn || onMouseDown || onMouseUp || onLongPress || onClick || (pseudos == null ? void 0 : pseudos.focusVisibleStyle)), runtimeHoverStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.hoverStyle), needsHoverState = !!(hasDynamicGroupChildren || runtimeHoverStyle), attachHover = isWeb, shouldAttach = !disabled && !props.asChild && !!(attachFocus || attachPress || attachHover || runtimePressStyle || runtimeHoverStyle || runtimeFocusStyle), needsPressState = !!(hasDynamicGroupChildren || runtimePressStyle);
3964
4335
  var events = shouldAttach ? __spreadValues(__spreadValues(__spreadProps(__spreadValues({
3965
4336
  onPressOut: attachPress ? function(e) {
3966
4337
  unPress(), onPressOut == null ? void 0 : onPressOut(e), onMouseUp == null ? void 0 : onMouseUp(e);
@@ -3968,7 +4339,7 @@ function createComponent(staticConfig) {
3968
4339
  }, attachPress && {
3969
4340
  onMouseEnter: function(e) {
3970
4341
  var next = {};
3971
- needsHoverState && true && (next.hover = true), needsPressState && state.pressIn && (next.press = true), setStateShallow(next), onHoverIn == null ? void 0 : onHoverIn(e), onMouseEnter == null ? void 0 : onMouseEnter(e);
4342
+ needsHoverState && true && (next.hover = true), needsPressState && state2.pressIn && (next.press = true), setStateShallow(next), onHoverIn == null ? void 0 : onHoverIn(e), onMouseEnter == null ? void 0 : onMouseEnter(e);
3972
4343
  },
3973
4344
  onMouseLeave: function(e) {
3974
4345
  var next = {};
@@ -3991,7 +4362,9 @@ function createComponent(staticConfig) {
3991
4362
  }), attachFocus && {
3992
4363
  onFocus: function(e) {
3993
4364
  var next = {};
3994
- componentContext.setParentFocusState && (next.focusWithin = true), (pseudos == null ? void 0 : pseudos.focusVisibleStyle) && lastInteractionWasKeyboard.value ? next.focusVisible = true : next.focus = true, setStateShallow(next), onFocus == null ? void 0 : onFocus(e);
4365
+ componentContext.setParentFocusState && (componentContext.setParentFocusState({
4366
+ focusWithin: true
4367
+ }), next.focusWithin = true), (pseudos == null ? void 0 : pseudos.focusVisibleStyle) && lastInteractionWasKeyboard.value ? next.focusVisible = true : next.focus = true, setStateShallow(next), onFocus == null ? void 0 : onFocus(e);
3995
4368
  },
3996
4369
  onBlur: function(e) {
3997
4370
  componentContext.setParentFocusState && componentContext.setParentFocusState({
@@ -4016,29 +4389,27 @@ function createComponent(staticConfig) {
4016
4389
  minPressDuration: 0
4017
4390
  });
4018
4391
  }
4019
- var pressGesture = useEvents(events, viewProps, stateRef, staticConfig, isHOC);
4020
- var content = children;
4392
+ var pressGesture = useEvents(events, viewProps, stateRef, staticConfig, isHOC, isInsideNativeMenu);
4021
4393
  if (asChild) if (elementType = Slot, 0) ;
4022
4394
  else Object.assign(viewProps, {
4023
4395
  onPress,
4024
4396
  onLongPress
4025
4397
  });
4026
- isPassthrough && (content = propsIn.children, elementType = BaseViewComponent, viewProps = {
4398
+ var content;
4399
+ if (isPassthrough) content = /* @__PURE__ */ React.createElement(BaseComponent, {
4027
4400
  style: {
4028
4401
  display: "contents"
4029
4402
  }
4030
- });
4031
- var useChildrenResult;
4032
- if (hooks.useChildren && (useChildrenResult = hooks.useChildren(elementType, content, viewProps)), useChildrenResult) content = useChildrenResult;
4033
- else if (typeof renderProp == "function") {
4034
- var renderProps = __spreadProps(__spreadValues({}, viewProps), {
4035
- children: content
4036
- });
4037
- content = renderProp(renderProps, state);
4038
- } else if (renderProp && (typeof renderProp > "u" ? "undefined" : _type_of$1(renderProp)) === "object" && /* @__PURE__ */ React.isValidElement(renderProp)) {
4039
- var elementProps = renderProp.props || {}, mergedProps = mergeRenderElementProps(elementProps, viewProps, content);
4040
- content = /* @__PURE__ */ React.cloneElement(renderProp, mergedProps);
4041
- } else content = /* @__PURE__ */ React.createElement(elementType, viewProps, content);
4403
+ }, propsIn.children);
4404
+ else {
4405
+ hooks.useChildren && (content = hooks.useChildren(elementType, content || children, viewProps));
4406
+ var isRenderPropString = typeof renderProp == "string";
4407
+ if (renderProp && !isRenderPropString) {
4408
+ var out = getCustomRender(renderProp, content || children, viewProps, componentState);
4409
+ out && (viewProps = out.viewProps, elementType = out.elementType);
4410
+ }
4411
+ content || (isRenderPropString && viewProps.render, content = /* @__PURE__ */ React.createElement(elementType, viewProps, content || children));
4412
+ }
4042
4413
  content = wrapWithGestureDetector(content, pressGesture, stateRef, isHOC);
4043
4414
  var ResetPresence = animationDriver == null ? void 0 : animationDriver.ResetPresence, needsReset = !!// not when passing down to child
4044
4415
  (!asChild && // not when passThrough
@@ -4049,7 +4420,7 @@ function createComponent(staticConfig) {
4049
4420
  if (renderReset && ResetPresence && (content = /* @__PURE__ */ jsxRuntime.jsx(ResetPresence, {
4050
4421
  disabled: !needsReset,
4051
4422
  children: content
4052
- })), "focusWithinStyle" in propsIn && (content = /* @__PURE__ */ jsxRuntime.jsx(ComponentContext.Provider, __spreadProps(__spreadValues({}, componentContext), {
4423
+ })), ("focusWithinStyle" in propsIn || (pseudos == null ? void 0 : pseudos.focusWithinStyle)) && (content = /* @__PURE__ */ jsxRuntime.jsx(ComponentContext.Provider, __spreadProps(__spreadValues({}, componentContext), {
4053
4424
  setParentFocusState: setStateShallow,
4054
4425
  children: content
4055
4426
  }))), "group" in props && (content = /* @__PURE__ */ jsxRuntime.jsx(GroupContext.Provider, {
@@ -4092,7 +4463,28 @@ function createComponent(staticConfig) {
4092
4463
  }
4093
4464
  var fromPx = function(val) {
4094
4465
  return typeof val == "number" ? val : typeof val == "string" ? +val.replace("px", "") : 0;
4466
+ }, getCustomRender = function(renderProp, content, viewProps, state2) {
4467
+ if (typeof renderProp == "function") {
4468
+ var out = renderProp(viewProps, state2);
4469
+ renderProp = getRenderElementForPlatform(out);
4470
+ }
4471
+ if (renderProp && (typeof renderProp > "u" ? "undefined" : _type_of$1(renderProp)) === "object" && /* @__PURE__ */ React.isValidElement(renderProp)) {
4472
+ var renderElement = getRenderElementForPlatform(renderProp);
4473
+ if (renderElement) {
4474
+ var elementProps = renderProp.props, mergedProps = elementProps ? mergeRenderElementProps(elementProps, viewProps, content) : viewProps;
4475
+ return {
4476
+ elementType: renderProp.type,
4477
+ viewProps: mergedProps
4478
+ };
4479
+ }
4480
+ }
4095
4481
  };
4482
+ function getRenderElementForPlatform(potential) {
4483
+ if (!isHTMLElement(potential)) return potential;
4484
+ }
4485
+ function isHTMLElement(el) {
4486
+ return typeof el.type == "string" && el.type[0] === el.type[0].toLowerCase();
4487
+ }
4096
4488
  function getExpandedShorthands(props) {
4097
4489
  var shorthands = getConfig().shorthands;
4098
4490
  if (!shorthands) return props;
@@ -4118,6 +4510,18 @@ var registerCSSVariable = function(v) {
4118
4510
  var unitless = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
4119
4511
  return process.env.TAMAGUI_DID_OUTPUT_CSS ? "" : `--${process.env.TAMAGUI_CSS_VARIABLE_PREFIX || ""}${createCSSVariable(v.name, false)}:${!unitless && typeof v.val == "number" ? `${v.val}px` : v.val}`;
4120
4512
  }, tokensValueToVariable = /* @__PURE__ */ new Map(), autoVariables = [], mutatedAutoVariables = [];
4513
+ function scanAllSheets() {
4514
+ if (!process.env.TAMAGUI_DID_OUTPUT_CSS) {
4515
+ return;
4516
+ }
4517
+ }
4518
+ process.env.TAMAGUI_BAIL_AFTER_SCANNING_X_CSS_RULES;
4519
+ function setNonce(_2) {
4520
+ }
4521
+ function insertStyleRules(rulesToInsert) {
4522
+ return;
4523
+ }
4524
+ process.env.TAMAGUI_INSERT_SELECTOR_TRIES ? +process.env.TAMAGUI_INSERT_SELECTOR_TRIES : 1;
4121
4525
  function isTamaguiComponent(comp, name) {
4122
4526
  var config = comp == null ? void 0 : comp.staticConfig;
4123
4527
  return !!(config && (!name || name === config.componentName));
@@ -4236,6 +4640,8 @@ function ensureThemeVariable(theme, key) {
4236
4640
  val
4237
4641
  });
4238
4642
  }
4643
+ function getStyleTags(styles) {
4644
+ }
4239
4645
  var fontWeights = ["100", "200", "300", "400", "500", "600", "700", "800", "900"], processSection = function(section, keys, defaultValue2) {
4240
4646
  if (typeof section == "string") return section;
4241
4647
  var sectionKeys = Object.keys(section), fillValue = section[sectionKeys[0]];
@@ -4297,10 +4703,8 @@ var noAnimationDriver = function(method) {
4297
4703
  }, createEmptyAnimationDriver = function() {
4298
4704
  return {
4299
4705
  isReactNative: false,
4300
- supportsCSS: true,
4301
4706
  inputStyle: "css",
4302
4707
  outputStyle: "css",
4303
- classNameAnimation: true,
4304
4708
  isStub: true,
4305
4709
  animations: {},
4306
4710
  useAnimations: function() {
@@ -4323,6 +4727,19 @@ var noAnimationDriver = function(method) {
4323
4727
  }
4324
4728
  };
4325
4729
  }, defaultAnimationDriver = createEmptyAnimationDriver();
4730
+ function getFontPropertyDeclarations(fontParsed) {
4731
+ var tokenKey = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "$true", props = ["font-family: var(--f-family)"], getVarRef = function(obj) {
4732
+ var val = obj == null ? void 0 : obj[tokenKey];
4733
+ if (isVariable(val)) return getVariableVariable(val);
4734
+ }, letterSpacing = getVarRef(fontParsed.letterSpacing);
4735
+ letterSpacing && props.push(`letter-spacing: ${letterSpacing}`);
4736
+ var lineHeight = getVarRef(fontParsed.lineHeight);
4737
+ lineHeight && props.push(`line-height: ${lineHeight}`);
4738
+ var fontStyle = getVarRef(fontParsed.style);
4739
+ fontStyle && props.push(`font-style: ${fontStyle}`);
4740
+ var fontWeight = getVarRef(fontParsed.weight);
4741
+ return fontWeight && props.push(`font-weight: ${fontWeight}`), props;
4742
+ }
4326
4743
  function createTokenCSS(tokens, shouldTokenCategoryHaveUnits2) {
4327
4744
  if (!process.env.TAMAGUI_DID_OUTPUT_CSS) {
4328
4745
  var declarations = [], sortedTokenKeys = Object.keys(tokens).sort(), _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
@@ -4369,7 +4786,8 @@ function createFontCSS(fontsParsed, registerFontVariables2) {
4369
4786
  fontDeclarations[key] = {
4370
4787
  name: name.slice(1),
4371
4788
  declarations: fontVars,
4372
- language
4789
+ language,
4790
+ fontParsed
4373
4791
  };
4374
4792
  }
4375
4793
  } catch (err) {
@@ -4386,6 +4804,7 @@ function createFontCSS(fontsParsed, registerFontVariables2) {
4386
4804
  return {};
4387
4805
  }
4388
4806
  function buildCSSRuleSets(declarations, fontDeclarations) {
4807
+ var defaultFontToken = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : "$true";
4389
4808
  if (!process.env.TAMAGUI_DID_OUTPUT_CSS) {
4390
4809
  let declarationsToRuleSet2 = function(decs) {
4391
4810
  var selector = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
@@ -4394,14 +4813,16 @@ function buildCSSRuleSets(declarations, fontDeclarations) {
4394
4813
  };
4395
4814
  var cssRuleSets = [], sep = " ";
4396
4815
  declarations.length && cssRuleSets.push(declarationsToRuleSet2(declarations));
4397
- var sortedFontDeclarationKeys = Object.keys(fontDeclarations).sort(), _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
4816
+ var fontSelectors = [], sortedFontDeclarationKeys = Object.keys(fontDeclarations).sort(), _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
4398
4817
  try {
4399
4818
  for (var _iterator = sortedFontDeclarationKeys[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
4400
4819
  var key = _step.value, {
4401
4820
  name,
4402
4821
  declarations: _$declarations,
4403
4822
  language = "default"
4404
- } = fontDeclarations[key], fontSelector = `.font_${name}`, langSelector = `:root .t_lang-${name}-${language} ${fontSelector}`, selectors2 = language === "default" ? ` ${fontSelector}, ${langSelector}` : langSelector, specificRuleSet = declarationsToRuleSet2(_$declarations, selectors2);
4823
+ } = fontDeclarations[key], fontSelector = `.font_${name}`;
4824
+ fontSelectors.push(fontSelector);
4825
+ var langSelector = `:root .t_lang-${name}-${language} ${fontSelector}`, selectors2 = language === "default" ? ` ${fontSelector}, ${langSelector}` : langSelector, specificRuleSet = declarationsToRuleSet2(_$declarations, selectors2);
4405
4826
  cssRuleSets.push(specificRuleSet);
4406
4827
  }
4407
4828
  } catch (err) {
@@ -4413,6 +4834,13 @@ function buildCSSRuleSets(declarations, fontDeclarations) {
4413
4834
  if (_didIteratorError) throw _iteratorError;
4414
4835
  }
4415
4836
  }
4837
+ if (fontSelectors.length) {
4838
+ var firstFont = fontDeclarations[sortedFontDeclarationKeys[0]];
4839
+ if (firstFont == null ? void 0 : firstFont.fontParsed) {
4840
+ var fontProps = getFontPropertyDeclarations(firstFont.fontParsed, defaultFontToken), sharedSelectors = [...fontSelectors, ".is_View"].join(", ");
4841
+ cssRuleSets.push(`${sharedSelectors} {${fontProps.join("; ")}}`);
4842
+ }
4843
+ }
4416
4844
  return cssRuleSets;
4417
4845
  }
4418
4846
  return [];
@@ -4557,17 +4985,15 @@ function createTamagui$1(configIn) {
4557
4985
  return (val2 == null ? void 0 : val2[0]) === "$" && (val2 = val2.slice(1)), val2;
4558
4986
  })();
4559
4987
  ((_configIn_settings1 = configIn.settings) === null || _configIn_settings1 === void 0 ? void 0 : _configIn_settings1.defaultPosition) || "static";
4560
- var defaultProps = configIn.defaultProps || {}, defaultFontToken = defaultFont ? `$${defaultFont}` : "";
4561
- defaultFont && (defaultProps.Text = __spreadProps(__spreadValues({}, defaultProps.Text), {
4562
- fontFamily: defaultFontToken
4563
- }));
4564
- var config = __spreadProps(__spreadValues({
4988
+ var defaultProps = configIn.defaultProps || {}, defaultFontToken = defaultFont ? `$${defaultFont}` : "", inputAnimations = configIn.animations, resolvedDriver = resolveAnimationDriver(inputAnimations), isMultiDriver = resolvedDriver !== null && resolvedDriver !== inputAnimations, resolvedAnimations = resolvedDriver != null ? resolvedDriver : inputAnimations, animationDrivers = isMultiDriver ? inputAnimations : void 0, config = __spreadProps(__spreadValues({
4565
4989
  fonts: {},
4566
4990
  onlyAllowShorthands: false,
4567
4991
  fontLanguages: [],
4568
- animations: defaultAnimationDriver,
4569
4992
  media: {}
4570
4993
  }, configIn), {
4994
+ // normalized animations (resolved from multi-driver format if needed)
4995
+ animations: resolvedAnimations != null ? resolvedAnimations : defaultAnimationDriver,
4996
+ animationDrivers,
4571
4997
  defaultProps,
4572
4998
  settings: __spreadValues({
4573
4999
  webContainerType: "inline-size"
@@ -4791,7 +5217,6 @@ var useIsTouchDevice = function() {
4791
5217
  };
4792
5218
  var View$1 = createComponent({
4793
5219
  acceptsClassName: true,
4794
- defaultProps: viewDefaultStyles,
4795
5220
  validStyles
4796
5221
  });
4797
5222
  function useProps(props, opts) {
@@ -4813,13 +5238,13 @@ function usePropsAndStyle(props, opts) {
4813
5238
  return true;
4814
5239
  }
4815
5240
  }), componentContext = React.useContext(ComponentContext), groupContext = React.useContext(GroupContext), {
4816
- state,
5241
+ state: state2,
4817
5242
  disabled,
4818
5243
  setStateShallow
4819
5244
  } = useComponentState(props, componentContext.animationDriver, staticConfig, getConfig()), mediaStateNow = (opts == null ? void 0 : opts.noMedia) ? (
4820
5245
  // not safe to use mediaState but really marginal to hit this
4821
5246
  exports.mediaState
4822
- ) : useMedia(), splitStyles = useSplitStyles(props, staticConfig, theme, (themeState == null ? void 0 : themeState.name) || "", state, __spreadValues({
5247
+ ) : useMedia(), splitStyles = useSplitStyles(props, staticConfig, theme, (themeState == null ? void 0 : themeState.name) || "", state2, __spreadValues({
4823
5248
  isAnimated: false,
4824
5249
  mediaState: mediaStateNow,
4825
5250
  noSkip: true,
@@ -4832,7 +5257,7 @@ function usePropsAndStyle(props, opts) {
4832
5257
  } = splitStyles || {};
4833
5258
  return useIsomorphicLayoutEffect(function() {
4834
5259
  if (!disabled) {
4835
- if (state.unmounted) {
5260
+ if (state2.unmounted) {
4836
5261
  setStateShallow({
4837
5262
  unmounted: false
4838
5263
  });
@@ -4867,6 +5292,9 @@ var Configuration = function(props) {
4867
5292
  children: /* @__PURE__ */ jsxRuntime.jsx(ComponentContext.Provider, __spreadValues(__spreadValues({}, current), props))
4868
5293
  });
4869
5294
  };
5295
+ function TamaguiRoot(props) {
5296
+ return props.children;
5297
+ }
4870
5298
  function FontLanguage(param) {
4871
5299
  var _a = param, {
4872
5300
  children
@@ -4881,6 +5309,7 @@ function FontLanguage(param) {
4881
5309
  }));
4882
5310
  }
4883
5311
  var ThemeProvider = function(props) {
5312
+ "use no memo";
4884
5313
  var addThemeClassName = getSetting("addThemeClassName"), forceClassName = addThemeClassName === void 0;
4885
5314
  return /* @__PURE__ */ jsxRuntime.jsx(Theme, {
4886
5315
  className: props.className,
@@ -4891,37 +5320,42 @@ var ThemeProvider = function(props) {
4891
5320
  children: props.children
4892
5321
  });
4893
5322
  };
5323
+ var _cachedFirstKey, _cachedConfig;
5324
+ function firstThemeKey(config) {
5325
+ return config !== _cachedConfig && (_cachedConfig = config, _cachedFirstKey = (config == null ? void 0 : config.themes) ? Object.keys(config.themes)[0] : void 0), _cachedFirstKey;
5326
+ }
4894
5327
  function TamaguiProvider$1(param) {
4895
5328
  var {
4896
5329
  children,
4897
5330
  disableInjectCSS,
4898
5331
  config,
4899
5332
  className,
4900
- defaultTheme,
5333
+ defaultTheme: defaultThemeProp,
4901
5334
  reset,
4902
5335
  insets
4903
- } = param;
5336
+ } = param, defaultTheme = defaultThemeProp || firstThemeKey(config) || "light";
4904
5337
  useIsomorphicLayoutEffect(function() {
4905
5338
  updateMediaListeners();
4906
5339
  }, []);
4907
5340
  var memoizedInsets = React.useMemo(function() {
4908
5341
  return insets;
4909
5342
  }, [insets == null ? void 0 : insets.top, insets == null ? void 0 : insets.right, insets == null ? void 0 : insets.bottom, insets == null ? void 0 : insets.left]), defaultAnimationDriver2 = React.useMemo(function() {
4910
- var animations = config == null ? void 0 : config.animations;
4911
- return animations ? "default" in animations ? animations.default : animations : null;
5343
+ return resolveAnimationDriver(config == null ? void 0 : config.animations);
4912
5344
  }, [config == null ? void 0 : config.animations]);
4913
5345
  React.useEffect(function() {
4914
5346
  var _defaultAnimationDriver_onMount;
4915
5347
  defaultAnimationDriver2 == null || (_defaultAnimationDriver_onMount = defaultAnimationDriver2.onMount) === null || _defaultAnimationDriver_onMount === void 0 || _defaultAnimationDriver_onMount.call(defaultAnimationDriver2);
4916
5348
  }, []);
4917
- var contents = /* @__PURE__ */ jsxRuntime.jsx(UnmountedClassName, {
4918
- children: /* @__PURE__ */ jsxRuntime.jsx(ComponentContext.Provider, {
4919
- animationDriver: defaultAnimationDriver2,
4920
- insets: memoizedInsets,
4921
- children: /* @__PURE__ */ jsxRuntime.jsx(ThemeProvider, {
4922
- defaultTheme,
4923
- reset,
4924
- className,
5349
+ var contents = /* @__PURE__ */ jsxRuntime.jsx(ComponentContext.Provider, {
5350
+ animationDriver: defaultAnimationDriver2,
5351
+ insets: memoizedInsets,
5352
+ children: /* @__PURE__ */ jsxRuntime.jsx(ThemeProvider, {
5353
+ defaultTheme,
5354
+ reset,
5355
+ className,
5356
+ children: /* @__PURE__ */ jsxRuntime.jsx(TamaguiRoot, {
5357
+ theme: defaultTheme,
5358
+ isRootRoot: true,
4925
5359
  children
4926
5360
  })
4927
5361
  })
@@ -4933,13 +5367,6 @@ function TamaguiProvider$1(param) {
4933
5367
  children: [contents, false]
4934
5368
  });
4935
5369
  }
4936
- function UnmountedClassName(props) {
4937
- var [mounted, setMounted] = React.useState(false);
4938
- if (React.useEffect(function() {
4939
- setMounted(true);
4940
- }, []), !isWeb) return props.children;
4941
- }
4942
- TamaguiProvider$1.displayName = "TamaguiProvider";
4943
5370
  var ellipsisStyle = {
4944
5371
  numberOfLines: 1,
4945
5372
  lineBreakMode: "clip"
@@ -4958,10 +5385,10 @@ var ellipsisStyle = {
4958
5385
  },
4959
5386
  validStyles: __spreadValues(__spreadValues({}, validStyles), stylePropsTextOnly)
4960
5387
  });
4961
- Text$1.displayName = "Text";
5388
+ var isServer = typeof window > "u", useIsomorphicInsertionEffect = isServer ? React__namespace.useEffect : React__namespace.useInsertionEffect || React__namespace.useLayoutEffect;
4962
5389
  function useGet(currentValue, initialValue, forwardToFunction) {
4963
5390
  var curRef = React__namespace.useRef(initialValue != null ? initialValue : currentValue);
4964
- return useIsomorphicLayoutEffect(function() {
5391
+ return useIsomorphicInsertionEffect(function() {
4965
5392
  curRef.current = currentValue;
4966
5393
  }), React__namespace.useCallback(forwardToFunction ? function() {
4967
5394
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
@@ -5167,6 +5594,7 @@ var matchMedia = function(query) {
5167
5594
  function createMedia(media) {
5168
5595
  return setupMatchMedia(matchMedia), media;
5169
5596
  }
5597
+ var LayoutHandlers = /* @__PURE__ */ new WeakMap(), LayoutDisableKey = /* @__PURE__ */ new WeakMap(), Nodes = /* @__PURE__ */ new Set(), IntersectionState = /* @__PURE__ */ new WeakMap();
5170
5598
  var DisableLayoutContextKey = /* @__PURE__ */ React.createContext(""), LayoutMeasurementController = function(param) {
5171
5599
  var {
5172
5600
  disable,
@@ -5178,14 +5606,22 @@ var DisableLayoutContextKey = /* @__PURE__ */ React.createContext(""), LayoutMea
5178
5606
  children
5179
5607
  });
5180
5608
  };
5181
- function setOnLayoutStrategy(state) {
5609
+ function setOnLayoutStrategy(state2) {
5182
5610
  }
5183
- var avoidUpdates = true, queuedUpdates = /* @__PURE__ */ new Map();
5611
+ var NodeRectCache = /* @__PURE__ */ new WeakMap(), avoidUpdates = true, queuedUpdates = /* @__PURE__ */ new Map();
5184
5612
  function enable() {
5185
5613
  avoidUpdates && (avoidUpdates = false, queuedUpdates && (queuedUpdates.forEach(function(cb) {
5186
5614
  return cb();
5187
5615
  }), queuedUpdates.clear()));
5188
5616
  }
5617
+ function registerLayoutNode(node, onChange, disableKey) {
5618
+ return Nodes.add(node), LayoutHandlers.set(node, onChange), disableKey && LayoutDisableKey.set(node, disableKey), function() {
5619
+ return cleanupNode(node);
5620
+ };
5621
+ }
5622
+ function cleanupNode(node) {
5623
+ Nodes.delete(node), LayoutHandlers.delete(node), LayoutDisableKey.delete(node), NodeRectCache.delete(node), IntersectionState.delete(node);
5624
+ }
5189
5625
  function getBaseViews() {
5190
5626
  var _a, _b, _c, _d;
5191
5627
  const native = require("react-native");
@@ -5249,6 +5685,7 @@ exports.THEME_CLASSNAME_PREFIX = THEME_CLASSNAME_PREFIX;
5249
5685
  exports.THEME_NAME_SEPARATOR = THEME_NAME_SEPARATOR;
5250
5686
  exports.Tamagui = Tamagui;
5251
5687
  exports.TamaguiProvider = TamaguiProvider;
5688
+ exports.TamaguiRoot = TamaguiRoot;
5252
5689
  exports.Text = Text;
5253
5690
  exports.Theme = Theme;
5254
5691
  exports.ThemeProvider = ThemeProvider;
@@ -5271,10 +5708,12 @@ exports.createTamagui = createTamagui;
5271
5708
  exports.createTokens = createTokens;
5272
5709
  exports.createVariable = createVariable;
5273
5710
  exports.createVariables = createVariables;
5711
+ exports.cssShorthandLonghands = cssShorthandLonghands;
5274
5712
  exports.currentPlatform = currentPlatform;
5275
5713
  exports.defaultMediaImportance = defaultMediaImportance;
5276
5714
  exports.didGetVariableValue = didGetVariableValue;
5277
5715
  exports.ensureThemeVariable = ensureThemeVariable;
5716
+ exports.extractPseudoState = extractPseudoState;
5278
5717
  exports.fixStyles = fixStyles;
5279
5718
  exports.forceUpdateThemes = forceUpdateThemes;
5280
5719
  exports.getCSSStylesAtomic = getCSSStylesAtomic;
@@ -5315,7 +5754,7 @@ exports.isChrome = isChrome;
5315
5754
  exports.isClient = isClient;
5316
5755
  exports.isEqualShallow = isEqualShallow;
5317
5756
  exports.isIos = isIos;
5318
- exports.isServer = isServer;
5757
+ exports.isServer = isServer$1;
5319
5758
  exports.isTamaguiComponent = isTamaguiComponent;
5320
5759
  exports.isTamaguiElement = isTamaguiElement;
5321
5760
  exports.isTouchable = isTouchable;
@@ -5333,6 +5772,9 @@ exports.mergeIfNotShallowEqual = mergeIfNotShallowEqual;
5333
5772
  exports.mergeProps = mergeProps;
5334
5773
  exports.mergeSlotStyleProps = mergeSlotStyleProps;
5335
5774
  exports.mutatedAutoVariables = mutatedAutoVariables;
5775
+ exports.nonAnimatableStyleProps = nonAnimatableStyleProps;
5776
+ exports.nonAnimatableWebTextProps = nonAnimatableWebTextProps;
5777
+ exports.nonAnimatableWebViewProps = nonAnimatableWebViewProps;
5336
5778
  exports.normalizeColor = normalizeColor;
5337
5779
  exports.normalizeStyle = normalizeStyle$1;
5338
5780
  exports.normalizeValueWithProperty = normalizeValueWithProperty;
@@ -5346,7 +5788,9 @@ exports.pseudoDescriptorsBase = pseudoDescriptorsBase;
5346
5788
  exports.pseudoPriorities = pseudoPriorities;
5347
5789
  exports.px = px;
5348
5790
  exports.registerFontVariables = registerFontVariables;
5791
+ exports.registerLayoutNode = registerLayoutNode;
5349
5792
  exports.resetMediaStyleCache = resetMediaStyleCache;
5793
+ exports.resolveEffectivePseudoTransition = resolveEffectivePseudoTransition;
5350
5794
  exports.rgba = rgba;
5351
5795
  exports.setConfig = setConfig;
5352
5796
  exports.setDidGetVariableValue = setDidGetVariableValue;
@@ -5395,8 +5839,6 @@ exports.useThemeWithState = useThemeWithState;
5395
5839
  exports.validPseudoKeys = validPseudoKeys;
5396
5840
  exports.validStyles = validStyles;
5397
5841
  exports.variableToString = variableToString;
5398
- exports.viewDefaultStyles = viewDefaultStyles;
5399
5842
  exports.webOnlyStylePropsText = webOnlyStylePropsText;
5400
5843
  exports.webOnlyStylePropsView = webOnlyStylePropsView;
5401
- exports.webViewFlexCompatStyles = webViewFlexCompatStyles;
5402
5844
  exports.withStaticProperties = withStaticProperties;