@tamagui/core 2.0.0-1768586279389 → 2.0.0-1768696252732

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.
@@ -31,6 +31,7 @@ var __objRest = (source, exclude) => {
31
31
  return target;
32
32
  };
33
33
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
34
+ const jsxRuntime = require("react/jsx-runtime");
34
35
  const React = require("react");
35
36
  const reactNative = require("react-native");
36
37
  function _interopNamespaceDefault(e2) {
@@ -69,290 +70,6 @@ function _mergeNamespaces(n, m) {
69
70
  return Object.freeze(Object.defineProperty(n, Symbol.toStringTag, { value: "Module" }));
70
71
  }
71
72
  const React__namespace = /* @__PURE__ */ _interopNamespaceDefault(React);
72
- function getDefaultExportFromCjs(x) {
73
- return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
74
- }
75
- var jsxRuntime = { exports: {} };
76
- var reactJsxRuntime_development = {};
77
- var hasRequiredReactJsxRuntime_development;
78
- function requireReactJsxRuntime_development() {
79
- if (hasRequiredReactJsxRuntime_development) return reactJsxRuntime_development;
80
- hasRequiredReactJsxRuntime_development = 1;
81
- /**
82
- * @license React
83
- * react-jsx-runtime.development.js
84
- *
85
- * Copyright (c) Meta Platforms, Inc. and affiliates.
86
- *
87
- * This source code is licensed under the MIT license found in the
88
- * LICENSE file in the root directory of this source tree.
89
- */
90
- (function() {
91
- function getComponentNameFromType(type) {
92
- if (null == type) return null;
93
- if ("function" === typeof type)
94
- return type.$$typeof === REACT_CLIENT_REFERENCE ? null : type.displayName || type.name || null;
95
- if ("string" === typeof type) return type;
96
- switch (type) {
97
- case REACT_FRAGMENT_TYPE:
98
- return "Fragment";
99
- case REACT_PROFILER_TYPE:
100
- return "Profiler";
101
- case REACT_STRICT_MODE_TYPE:
102
- return "StrictMode";
103
- case REACT_SUSPENSE_TYPE:
104
- return "Suspense";
105
- case REACT_SUSPENSE_LIST_TYPE:
106
- return "SuspenseList";
107
- case REACT_ACTIVITY_TYPE:
108
- return "Activity";
109
- }
110
- if ("object" === typeof type)
111
- switch ("number" === typeof type.tag && console.error(
112
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
113
- ), type.$$typeof) {
114
- case REACT_PORTAL_TYPE:
115
- return "Portal";
116
- case REACT_CONTEXT_TYPE:
117
- return (type.displayName || "Context") + ".Provider";
118
- case REACT_CONSUMER_TYPE:
119
- return (type._context.displayName || "Context") + ".Consumer";
120
- case REACT_FORWARD_REF_TYPE:
121
- var innerType = type.render;
122
- type = type.displayName;
123
- type || (type = innerType.displayName || innerType.name || "", type = "" !== type ? "ForwardRef(" + type + ")" : "ForwardRef");
124
- return type;
125
- case REACT_MEMO_TYPE:
126
- return innerType = type.displayName || null, null !== innerType ? innerType : getComponentNameFromType(type.type) || "Memo";
127
- case REACT_LAZY_TYPE:
128
- innerType = type._payload;
129
- type = type._init;
130
- try {
131
- return getComponentNameFromType(type(innerType));
132
- } catch (x) {
133
- }
134
- }
135
- return null;
136
- }
137
- function testStringCoercion(value) {
138
- return "" + value;
139
- }
140
- function checkKeyStringCoercion(value) {
141
- try {
142
- testStringCoercion(value);
143
- var JSCompiler_inline_result = false;
144
- } catch (e2) {
145
- JSCompiler_inline_result = true;
146
- }
147
- if (JSCompiler_inline_result) {
148
- JSCompiler_inline_result = console;
149
- var JSCompiler_temp_const = JSCompiler_inline_result.error;
150
- var JSCompiler_inline_result$jscomp$0 = "function" === typeof Symbol && Symbol.toStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
151
- JSCompiler_temp_const.call(
152
- JSCompiler_inline_result,
153
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
154
- JSCompiler_inline_result$jscomp$0
155
- );
156
- return testStringCoercion(value);
157
- }
158
- }
159
- function getTaskName(type) {
160
- if (type === REACT_FRAGMENT_TYPE) return "<>";
161
- if ("object" === typeof type && null !== type && type.$$typeof === REACT_LAZY_TYPE)
162
- return "<...>";
163
- try {
164
- var name = getComponentNameFromType(type);
165
- return name ? "<" + name + ">" : "<...>";
166
- } catch (x) {
167
- return "<...>";
168
- }
169
- }
170
- function getOwner() {
171
- var dispatcher = ReactSharedInternals.A;
172
- return null === dispatcher ? null : dispatcher.getOwner();
173
- }
174
- function UnknownOwner() {
175
- return Error("react-stack-top-frame");
176
- }
177
- function hasValidKey(config) {
178
- if (hasOwnProperty.call(config, "key")) {
179
- var getter = Object.getOwnPropertyDescriptor(config, "key").get;
180
- if (getter && getter.isReactWarning) return false;
181
- }
182
- return void 0 !== config.key;
183
- }
184
- function defineKeyPropWarningGetter(props, displayName) {
185
- function warnAboutAccessingKey() {
186
- specialPropKeyWarningShown || (specialPropKeyWarningShown = true, console.error(
187
- "%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",
188
- displayName
189
- ));
190
- }
191
- warnAboutAccessingKey.isReactWarning = true;
192
- Object.defineProperty(props, "key", {
193
- get: warnAboutAccessingKey,
194
- configurable: true
195
- });
196
- }
197
- function elementRefGetterWithDeprecationWarning() {
198
- var componentName = getComponentNameFromType(this.type);
199
- didWarnAboutElementRef[componentName] || (didWarnAboutElementRef[componentName] = true, console.error(
200
- "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
201
- ));
202
- componentName = this.props.ref;
203
- return void 0 !== componentName ? componentName : null;
204
- }
205
- function ReactElement(type, key, self, source, owner, props, debugStack, debugTask) {
206
- self = props.ref;
207
- type = {
208
- $$typeof: REACT_ELEMENT_TYPE,
209
- type,
210
- key,
211
- props,
212
- _owner: owner
213
- };
214
- null !== (void 0 !== self ? self : null) ? Object.defineProperty(type, "ref", {
215
- enumerable: false,
216
- get: elementRefGetterWithDeprecationWarning
217
- }) : Object.defineProperty(type, "ref", { enumerable: false, value: null });
218
- type._store = {};
219
- Object.defineProperty(type._store, "validated", {
220
- configurable: false,
221
- enumerable: false,
222
- writable: true,
223
- value: 0
224
- });
225
- Object.defineProperty(type, "_debugInfo", {
226
- configurable: false,
227
- enumerable: false,
228
- writable: true,
229
- value: null
230
- });
231
- Object.defineProperty(type, "_debugStack", {
232
- configurable: false,
233
- enumerable: false,
234
- writable: true,
235
- value: debugStack
236
- });
237
- Object.defineProperty(type, "_debugTask", {
238
- configurable: false,
239
- enumerable: false,
240
- writable: true,
241
- value: debugTask
242
- });
243
- Object.freeze && (Object.freeze(type.props), Object.freeze(type));
244
- return type;
245
- }
246
- function jsxDEVImpl(type, config, maybeKey, isStaticChildren, source, self, debugStack, debugTask) {
247
- var children = config.children;
248
- if (void 0 !== children)
249
- if (isStaticChildren)
250
- if (isArrayImpl(children)) {
251
- for (isStaticChildren = 0; isStaticChildren < children.length; isStaticChildren++)
252
- validateChildKeys(children[isStaticChildren]);
253
- Object.freeze && Object.freeze(children);
254
- } else
255
- console.error(
256
- "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
257
- );
258
- else validateChildKeys(children);
259
- if (hasOwnProperty.call(config, "key")) {
260
- children = getComponentNameFromType(type);
261
- var keys = Object.keys(config).filter(function(k) {
262
- return "key" !== k;
263
- });
264
- isStaticChildren = 0 < keys.length ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
265
- didWarnAboutKeySpread[children + isStaticChildren] || (keys = 0 < keys.length ? "{" + keys.join(": ..., ") + ": ...}" : "{}", console.error(
266
- 'A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />',
267
- isStaticChildren,
268
- children,
269
- keys,
270
- children
271
- ), didWarnAboutKeySpread[children + isStaticChildren] = true);
272
- }
273
- children = null;
274
- void 0 !== maybeKey && (checkKeyStringCoercion(maybeKey), children = "" + maybeKey);
275
- hasValidKey(config) && (checkKeyStringCoercion(config.key), children = "" + config.key);
276
- if ("key" in config) {
277
- maybeKey = {};
278
- for (var propName in config)
279
- "key" !== propName && (maybeKey[propName] = config[propName]);
280
- } else maybeKey = config;
281
- children && defineKeyPropWarningGetter(
282
- maybeKey,
283
- "function" === typeof type ? type.displayName || type.name || "Unknown" : type
284
- );
285
- return ReactElement(
286
- type,
287
- children,
288
- self,
289
- source,
290
- getOwner(),
291
- maybeKey,
292
- debugStack,
293
- debugTask
294
- );
295
- }
296
- function validateChildKeys(node) {
297
- "object" === typeof node && null !== node && node.$$typeof === REACT_ELEMENT_TYPE && node._store && (node._store.validated = 1);
298
- }
299
- var React$1 = React, REACT_ELEMENT_TYPE = Symbol.for("react.transitional.element"), REACT_PORTAL_TYPE = Symbol.for("react.portal"), REACT_FRAGMENT_TYPE = Symbol.for("react.fragment"), REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode"), REACT_PROFILER_TYPE = Symbol.for("react.profiler");
300
- var REACT_CONSUMER_TYPE = Symbol.for("react.consumer"), REACT_CONTEXT_TYPE = Symbol.for("react.context"), REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref"), REACT_SUSPENSE_TYPE = Symbol.for("react.suspense"), REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list"), REACT_MEMO_TYPE = Symbol.for("react.memo"), REACT_LAZY_TYPE = Symbol.for("react.lazy"), REACT_ACTIVITY_TYPE = Symbol.for("react.activity"), REACT_CLIENT_REFERENCE = Symbol.for("react.client.reference"), ReactSharedInternals = React$1.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, hasOwnProperty = Object.prototype.hasOwnProperty, isArrayImpl = Array.isArray, createTask = console.createTask ? console.createTask : function() {
301
- return null;
302
- };
303
- React$1 = {
304
- "react-stack-bottom-frame": function(callStackForError) {
305
- return callStackForError();
306
- }
307
- };
308
- var specialPropKeyWarningShown;
309
- var didWarnAboutElementRef = {};
310
- var unknownOwnerDebugStack = React$1["react-stack-bottom-frame"].bind(
311
- React$1,
312
- UnknownOwner
313
- )();
314
- var unknownOwnerDebugTask = createTask(getTaskName(UnknownOwner));
315
- var didWarnAboutKeySpread = {};
316
- reactJsxRuntime_development.Fragment = REACT_FRAGMENT_TYPE;
317
- reactJsxRuntime_development.jsx = function(type, config, maybeKey, source, self) {
318
- var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
319
- return jsxDEVImpl(
320
- type,
321
- config,
322
- maybeKey,
323
- false,
324
- source,
325
- self,
326
- trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
327
- trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
328
- );
329
- };
330
- reactJsxRuntime_development.jsxs = function(type, config, maybeKey, source, self) {
331
- var trackActualOwner = 1e4 > ReactSharedInternals.recentlyCreatedOwnerStacks++;
332
- return jsxDEVImpl(
333
- type,
334
- config,
335
- maybeKey,
336
- true,
337
- source,
338
- self,
339
- trackActualOwner ? Error("react-stack-top-frame") : unknownOwnerDebugStack,
340
- trackActualOwner ? createTask(getTaskName(type)) : unknownOwnerDebugTask
341
- );
342
- };
343
- })();
344
- return reactJsxRuntime_development;
345
- }
346
- var hasRequiredJsxRuntime;
347
- function requireJsxRuntime() {
348
- if (hasRequiredJsxRuntime) return jsxRuntime.exports;
349
- hasRequiredJsxRuntime = 1;
350
- {
351
- jsxRuntime.exports = requireReactJsxRuntime_development();
352
- }
353
- return jsxRuntime.exports;
354
- }
355
- var jsxRuntimeExports = requireJsxRuntime();
356
73
  var pseudoDescriptorsBase = {
357
74
  // order of keys here important! in priority order
358
75
  hoverStyle: {
@@ -401,7 +118,7 @@ var pseudoDescriptorsBase = {
401
118
  priority: 5
402
119
  }
403
120
  }), defaultMediaImportance = Object.keys(pseudoDescriptors).length;
404
- function _type_of$9(obj) {
121
+ function _type_of$a(obj) {
405
122
  "@swc/helpers - typeof";
406
123
  return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
407
124
  }
@@ -425,13 +142,13 @@ var mergeProps = function(defaultProps, props) {
425
142
  };
426
143
  function mergeProp(out, defaultProps, props, key) {
427
144
  var val = props[key];
428
- if (defaultProps && key in defaultProps && (key in pseudoDescriptors || key[0] === "$") && val && (typeof val > "u" ? "undefined" : _type_of$9(val)) === "object") {
145
+ if (defaultProps && key in defaultProps && (key in pseudoDescriptors || key[0] === "$") && val && (typeof val > "u" ? "undefined" : _type_of$a(val)) === "object") {
429
146
  var defaultVal = defaultProps[key];
430
- defaultVal && (typeof defaultVal > "u" ? "undefined" : _type_of$9(defaultVal)) === "object" && (val = mergeProps(defaultVal, val));
147
+ defaultVal && (typeof defaultVal > "u" ? "undefined" : _type_of$a(defaultVal)) === "object" && (val = mergeProps(defaultVal, val));
431
148
  }
432
149
  out[key] = val;
433
150
  }
434
- function _type_of$8(obj) {
151
+ function _type_of$9(obj) {
435
152
  "@swc/helpers - typeof";
436
153
  return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
437
154
  }
@@ -439,7 +156,7 @@ function objectIdentityKey(obj) {
439
156
  var k = "";
440
157
  for (var key in obj) {
441
158
  k += key;
442
- var arg = obj[key], type = typeof arg > "u" ? "undefined" : _type_of$8(arg);
159
+ var arg = obj[key], type = typeof arg > "u" ? "undefined" : _type_of$9(arg);
443
160
  if (!arg || type !== "object" && type !== "function") k += type + arg;
444
161
  else if (cache$5.has(arg)) k += cache$5.get(arg);
445
162
  else {
@@ -472,9 +189,9 @@ function createStyledContext(defaultValues) {
472
189
  ]), scope = getNamespacedScope(scopeIn), next = React.useMemo(function() {
473
190
  return __disableMergeDefaultValues ? values : mergeProps(defaultValues, values);
474
191
  }, [objectIdentityKey(values)]), ScopedProvider = OGProvider;
475
- return scope && (ScopedProvider = getOrCreateScopedContext(scope).Provider), /* @__PURE__ */ jsxRuntimeExports.jsx(LastScopeInNamespace.Provider, {
192
+ return scope && (ScopedProvider = getOrCreateScopedContext(scope).Provider), /* @__PURE__ */ jsxRuntime.jsx(LastScopeInNamespace.Provider, {
476
193
  value: scope,
477
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(ScopedProvider, {
194
+ children: /* @__PURE__ */ jsxRuntime.jsx(ScopedProvider, {
478
195
  value: next,
479
196
  children
480
197
  })
@@ -590,6 +307,18 @@ var getTokens = function() {
590
307
  };
591
308
  function setupDev(conf2) {
592
309
  }
310
+ function loadAnimationDriver(name, driver) {
311
+ var config = getConfigFromGlobalOrLocal();
312
+ if (!config) {
313
+ return;
314
+ }
315
+ config.animations && !("default" in config.animations) && (config.animations = {
316
+ default: config.animations
317
+ }), config.animations ? config.animations[name] = driver : config.animations = {
318
+ default: driver,
319
+ [name]: driver
320
+ };
321
+ }
593
322
  var matchMediaImpl = matchMediaFallback, matchMedia$1 = function() {
594
323
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
595
324
  return matchMediaImpl(...args);
@@ -798,7 +527,7 @@ function clamp(value, param) {
798
527
  var [min, max] = param;
799
528
  return Math.min(max, Math.max(min, value));
800
529
  }
801
- function _type_of$7(obj) {
530
+ function _type_of$8(obj) {
802
531
  "@swc/helpers - typeof";
803
532
  return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
804
533
  }
@@ -807,7 +536,7 @@ function composeEventHandlers(og, next) {
807
536
  checkDefaultPrevented = true
808
537
  } = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
809
538
  return !og || !next ? next || og || void 0 : function(event) {
810
- if (og == null ? void 0 : og(event), !event || !(checkDefaultPrevented && (typeof event > "u" ? "undefined" : _type_of$7(event)) === "object" && "defaultPrevented" in event) || // @ts-ignore
539
+ if (og == null ? void 0 : og(event), !event || !(checkDefaultPrevented && (typeof event > "u" ? "undefined" : _type_of$8(event)) === "object" && "defaultPrevented" in event) || // @ts-ignore
811
540
  "defaultPrevented" in event && !event.defaultPrevented) return next == null ? void 0 : next(event);
812
541
  };
813
542
  }
@@ -1115,6 +844,7 @@ var textColors = {
1115
844
  elevationAndroid: true
1116
845
  } : {}), {
1117
846
  boxShadow: true,
847
+ border: true,
1118
848
  filter: true,
1119
849
  // RN 0.76/0.77+ style props (New Architecture)
1120
850
  boxSizing: true,
@@ -1151,7 +881,7 @@ var textColors = {
1151
881
  disabledStyle: true,
1152
882
  focusWithinStyle: true
1153
883
  }, validStyles = stylePropsView;
1154
- function _type_of$6(obj) {
884
+ function _type_of$7(obj) {
1155
885
  "@swc/helpers - typeof";
1156
886
  return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
1157
887
  }
@@ -1165,14 +895,14 @@ var Decorated = Symbol(), withStaticProperties = function(component, staticProps
1165
895
  });
1166
896
  for (var key in component) {
1167
897
  var v = component[key];
1168
- _2[key] = v && (typeof v > "u" ? "undefined" : _type_of$6(v)) === "object" ? __spreadValues({}, v) : v;
898
+ _2[key] = v && (typeof v > "u" ? "undefined" : _type_of$7(v)) === "object" ? __spreadValues({}, v) : v;
1169
899
  }
1170
900
  }
1171
901
  return component;
1172
902
  })();
1173
903
  return Object.assign(next, staticProps), next[Decorated] = true, next;
1174
904
  };
1175
- function _type_of$5(obj) {
905
+ function _type_of$6(obj) {
1176
906
  "@swc/helpers - typeof";
1177
907
  return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
1178
908
  }
@@ -1199,7 +929,7 @@ function variableToString(vrble) {
1199
929
  return isVariable(vrble) ? `${vrble.val}` : `${vrble || ""}`;
1200
930
  }
1201
931
  function isVariable(v) {
1202
- return v && (typeof v > "u" ? "undefined" : _type_of$5(v)) === "object" && "isVar" in v;
932
+ return v && (typeof v > "u" ? "undefined" : _type_of$6(v)) === "object" && "isVar" in v;
1203
933
  }
1204
934
  function getVariable(nameOrVariable) {
1205
935
  var group = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "size", _tokens_group;
@@ -1531,7 +1261,7 @@ function getThemeProxied(_props, _state, _keys) {
1531
1261
  var outVal = getVariable(value), {
1532
1262
  name,
1533
1263
  scheme
1534
- } = curState, shouldOptimize = scheme && platform !== "web" && isIos && !curProps.deopt && getSetting("fastSchemeChange") && doesRootSchemeMatchSystem();
1264
+ } = curState, shouldOptimize = scheme && platform !== "web" && isIos && !curProps.deopt && !curState.isInverse && getSetting("fastSchemeChange") && doesRootSchemeMatchSystem();
1535
1265
  if (shouldOptimize) {
1536
1266
  var _config_themes_name, _config_themes_oppositeName, oppositeScheme = scheme === "dark" ? "light" : "dark", oppositeName = name.replace(scheme, oppositeScheme), color = getVariable((_config_themes_name = config.themes[name]) === null || _config_themes_name === void 0 ? void 0 : _config_themes_name[key]), oppositeColor = getVariable((_config_themes_oppositeName = config.themes[oppositeName]) === null || _config_themes_oppositeName === void 0 ? void 0 : _config_themes_oppositeName[key]), dynamicVal = getDynamicVal({
1537
1267
  scheme,
@@ -1567,7 +1297,7 @@ var _withStableStyle = function(Component, styleProvider) {
1567
1297
  }), media = hasMediaKeys ? useMedia() : null, resolvedExpressions = media ? _expressions.map(function(expr) {
1568
1298
  return typeof expr == "string" ? media[expr] : expr;
1569
1299
  }) : _expressions;
1570
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Component, __spreadValues({
1300
+ return /* @__PURE__ */ jsxRuntime.jsx(Component, __spreadValues({
1571
1301
  ref,
1572
1302
  style: styleProvider(theme, resolvedExpressions)
1573
1303
  }, rest));
@@ -1656,6 +1386,9 @@ var defaultOffset = {
1656
1386
  height: 0,
1657
1387
  width: 0
1658
1388
  };
1389
+ function getDefaultExportFromCjs(x) {
1390
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
1391
+ }
1659
1392
  var normalizeColor_1;
1660
1393
  var hasRequiredNormalizeColor;
1661
1394
  function requireNormalizeColor() {
@@ -2461,12 +2194,12 @@ function getFontsForLanguage(fonts, language) {
2461
2194
  })));
2462
2195
  return fontLanguageCache.set(language, next), next;
2463
2196
  }
2464
- function _type_of$4(obj) {
2197
+ function _type_of$5(obj) {
2465
2198
  "@swc/helpers - typeof";
2466
2199
  return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
2467
2200
  }
2468
2201
  var isObj = function(x) {
2469
- return x && !Array.isArray(x) && (typeof x > "u" ? "undefined" : _type_of$4(x)) === "object";
2202
+ return x && !Array.isArray(x) && (typeof x > "u" ? "undefined" : _type_of$5(x)) === "object";
2470
2203
  };
2471
2204
  function normalizeStyle$1(style) {
2472
2205
  var disableNormalize = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false, res = {};
@@ -2553,7 +2286,7 @@ var skipProps = {
2553
2286
  debug: 1,
2554
2287
  componentName: 1,
2555
2288
  disableOptimization: 1,
2556
- tag: 1,
2289
+ render: 1,
2557
2290
  style: 1,
2558
2291
  // handled after loop so pseudos set usedKeys and override it if necessary
2559
2292
  group: 1,
@@ -2561,7 +2294,7 @@ var skipProps = {
2561
2294
  };
2562
2295
  skipProps["data-test-renders"] = 1;
2563
2296
  Object.assign(skipProps, webPropsToSkip);
2564
- function _type_of$3(obj) {
2297
+ function _type_of$4(obj) {
2565
2298
  "@swc/helpers - typeof";
2566
2299
  return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
2567
2300
  }
@@ -2634,7 +2367,7 @@ var resolveTok = function(v, cat, sp, ss) {
2634
2367
  }
2635
2368
  styleProps.disableExpandShorthands || key in conf2.shorthands && (key = conf2.shorthands[key]);
2636
2369
  var originalValue = value;
2637
- if (value != null && (key === "boxShadow" && (typeof value > "u" ? "undefined" : _type_of$3(value)) === "object" ? value = boxShadowObjResolve(value, styleProps, styleState) : key === "filter" && (typeof value > "u" ? "undefined" : _type_of$3(value)) === "object" ? value = filterObjResolve(value, styleProps, styleState) : typeof value == "string" && value[0] === "$" ? value = getTokenForKey(key, value, styleProps, styleState) : key === "boxShadow" && typeof value == "string" && value.includes("$") ? value = value.replace(/(\$[\w.-]+)/g, function(t2) {
2370
+ if (value != null && (key === "boxShadow" && (typeof value > "u" ? "undefined" : _type_of$4(value)) === "object" ? value = boxShadowObjResolve(value, styleProps, styleState) : key === "filter" && (typeof value > "u" ? "undefined" : _type_of$4(value)) === "object" ? value = filterObjResolve(value, styleProps, styleState) : typeof value == "string" && value[0] === "$" ? value = getTokenForKey(key, value, styleProps, styleState) : key === "boxShadow" && typeof value == "string" && value.includes("$") ? value = value.replace(/(\$[\w.-]+)/g, function(t2) {
2638
2371
  var cat = /^\$-?\d/.test(t2) ? "size" : "color", r = getTokenForKey(cat, t2, styleProps, styleState);
2639
2372
  return r != null ? String(r) : t2;
2640
2373
  }) : key === "filter" && typeof value == "string" && value.includes("$") ? value = value.replace(/(\$[\w.-]+)/g, function(t2) {
@@ -2793,7 +2526,7 @@ function getVariantDefinition(variant, value, conf2) {
2793
2526
  var fontSizeVariant = variant["...fontSize"];
2794
2527
  if (fontSizeVariant && conf2.fontSizeTokens.has(value)) return fontSizeVariant;
2795
2528
  }
2796
- return variant[`:${typeof value > "u" ? "undefined" : _type_of$3(value)}`] || variant["..."];
2529
+ return variant[`:${typeof value > "u" ? "undefined" : _type_of$4(value)}`] || variant["..."];
2797
2530
  }
2798
2531
  }
2799
2532
  var fontShorthand = {
@@ -2880,7 +2613,7 @@ function transformsToString(transforms) {
2880
2613
  }
2881
2614
  ).join(" ");
2882
2615
  }
2883
- function _type_of$2(obj) {
2616
+ function _type_of$3(obj) {
2884
2617
  "@swc/helpers - typeof";
2885
2618
  return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
2886
2619
  }
@@ -2906,7 +2639,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
2906
2639
  if (keyInit === "jestAnimatedStyle") return "continue";
2907
2640
  if (accept) {
2908
2641
  var accepted = accept[keyInit];
2909
- if ((accepted === "style" || accepted === "textStyle") && valInit && (typeof valInit > "u" ? "undefined" : _type_of$2(valInit)) === "object") return viewProps[keyInit] = getSubStyle(styleState, keyInit, valInit, styleProps.noClass), "continue";
2642
+ if ((accepted === "style" || accepted === "textStyle") && valInit && (typeof valInit > "u" ? "undefined" : _type_of$3(valInit)) === "object") return viewProps[keyInit] = getSubStyle(styleState, keyInit, valInit, styleProps.noClass), "continue";
2910
2643
  }
2911
2644
  if (disableExpandShorthands || keyInit in shorthands && (keyInit = shorthands[keyInit]), keyInit === "className") return "continue";
2912
2645
  if (keyInit in skipProps && !noSkip && !isHOC) {
@@ -3091,7 +2824,9 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
3091
2824
  inlineWhenUnflattened,
3092
2825
  parentStaticConfig,
3093
2826
  acceptsClassName
3094
- } = staticConfig, viewProps = {}, mediaState = styleProps.mediaState || exports.mediaState, shouldDoClasses = acceptsClassName && isWeb, rulesToInsert = void 0, classNames = {}, pseudos = null, hasMedia = false, dynamicThemeAccess, pseudoGroups, mediaGroups;
2827
+ } = staticConfig, viewProps = {}, mediaState = styleProps.mediaState || exports.mediaState, shouldDoClasses = acceptsClassName && isWeb, rulesToInsert = void 0, classNames = {};
2828
+ props.space;
2829
+ var pseudos = null, hasMedia = false, dynamicThemeAccess, pseudoGroups, mediaGroups;
3095
2830
  props.className || "";
3096
2831
  var mediaStylesSeen = 0, validStyles$1 = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? stylePropsText : validStyles);
3097
2832
  var styleState = {
@@ -3282,9 +3017,14 @@ var defaultColor = process.env.TAMAGUI_DEFAULT_COLOR || "rgba(0,0,0,0)", animata
3282
3017
  }))), {
3283
3018
  opacity: 1,
3284
3019
  scale: 1,
3020
+ scaleX: 1,
3021
+ scaleY: 1,
3285
3022
  rotate: "0deg",
3286
- rotateY: "0deg",
3287
3023
  rotateX: "0deg",
3024
+ rotateY: "0deg",
3025
+ rotateZ: "0deg",
3026
+ skewX: "0deg",
3027
+ skewY: "0deg",
3288
3028
  x: 0,
3289
3029
  y: 0,
3290
3030
  borderRadius: 0
@@ -3329,6 +3069,18 @@ function applyDefaultStyle(pkey, styleState) {
3329
3069
  var defaultValues = animatableDefaults[pkey];
3330
3070
  defaultValues != null && !(pkey in styleState.usedKeys) && (!styleState.style || !(pkey in styleState.style)) && mergeStyle(styleState, pkey, defaultValues, 1);
3331
3071
  }
3072
+ var isEventHandler = /^on[A-Z]/;
3073
+ function mergeSlotStyleProps(base, overlay) {
3074
+ for (var key in overlay) {
3075
+ var baseVal = base[key], overlayVal = overlay[key];
3076
+ 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);
3077
+ }
3078
+ return base;
3079
+ }
3080
+ function mergeRenderElementProps(elementProps, viewProps, children) {
3081
+ var merged = mergeSlotStyleProps(__spreadValues({}, elementProps), viewProps);
3082
+ return merged.children = children, merged;
3083
+ }
3332
3084
  function setElementProps(element) {
3333
3085
  element && !element.getBoundingClientRect && (element.getBoundingClientRect = function() {
3334
3086
  if (element.unstable_getBoundingClientRect != null) return element.unstable_getBoundingClientRect();
@@ -3426,7 +3178,7 @@ function getThemedChildren(themeState, children, props) {
3426
3178
  forceClassName
3427
3179
  } = props, state = stateRef.current, hasEverThemed = state.hasEverThemed, shouldRenderChildrenWithTheme = hasEverThemed || themeState.isNew || isRoot || hasThemeUpdatingProps(props);
3428
3180
  if (!shouldRenderChildrenWithTheme) return children;
3429
- children = /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeStateContext.Provider, {
3181
+ children = /* @__PURE__ */ jsxRuntime.jsx(ThemeStateContext.Provider, {
3430
3182
  value: themeState.id,
3431
3183
  children
3432
3184
  });
@@ -3440,7 +3192,7 @@ function getThemedChildren(themeState, children, props) {
3440
3192
  var parentState = getThemeState(themeState.isNew ? themeState.id : themeState.parentId);
3441
3193
  if (!parentState) throw new Error("‼️010");
3442
3194
  children = React.Children.toArray(children).map(function(child) {
3443
- return /* @__PURE__ */ React.isValidElement(child) ? passThrough ? child : /* @__PURE__ */ React.cloneElement(child, void 0, /* @__PURE__ */ jsxRuntimeExports.jsx(Theme, {
3195
+ return /* @__PURE__ */ React.isValidElement(child) ? passThrough ? child : /* @__PURE__ */ React.cloneElement(child, void 0, /* @__PURE__ */ jsxRuntime.jsx(Theme, {
3444
3196
  name: parentState.name,
3445
3197
  children: child.props.children
3446
3198
  })) : child;
@@ -3466,21 +3218,21 @@ function themeable(Component, staticConfig) {
3466
3218
  }
3467
3219
  var element = (
3468
3220
  // @ts-expect-error its ok
3469
- /* @__PURE__ */ jsxRuntimeExports.jsx(Component, __spreadProps(__spreadValues({
3221
+ /* @__PURE__ */ jsxRuntime.jsx(Component, __spreadProps(__spreadValues({
3470
3222
  ref
3471
3223
  }, rest), {
3472
3224
  "data-disable-theme": true
3473
3225
  }))
3474
3226
  ), filteredProps = null, compName = componentName || (staticConfig == null ? void 0 : staticConfig.componentName);
3475
3227
  if (compName && (filteredProps || (filteredProps = {}), filteredProps.componentName = compName), "debug" in props && (filteredProps || (filteredProps = {}), filteredProps.debug = props.debug), "theme" in props && (filteredProps || (filteredProps = {}), filteredProps.name = props.theme), "themeReset" in props && (filteredProps || (filteredProps = {}), filteredProps.reset = themeReset), optimize && !filteredProps) return element;
3476
- var contents = /* @__PURE__ */ jsxRuntimeExports.jsx(Theme, __spreadProps(__spreadValues({
3228
+ var contents = /* @__PURE__ */ jsxRuntime.jsx(Theme, __spreadProps(__spreadValues({
3477
3229
  "disable-child-theme": true
3478
3230
  }, filteredProps), {
3479
3231
  children: element
3480
3232
  }));
3481
3233
  if (context) {
3482
3234
  var Provider = context.Provider, contextValue = React.useContext(context);
3483
- contents = /* @__PURE__ */ jsxRuntimeExports.jsx(Provider, __spreadProps(__spreadValues(__spreadValues({}, contextValue), overriddenContextProps), {
3235
+ contents = /* @__PURE__ */ jsxRuntime.jsx(Provider, __spreadProps(__spreadValues(__spreadValues({}, contextValue), overriddenContextProps), {
3484
3236
  children: contents
3485
3237
  }));
3486
3238
  }
@@ -3495,7 +3247,7 @@ var ClientOnlyContext = /* @__PURE__ */ React.createContext(false), ClientOnly =
3495
3247
  children,
3496
3248
  enabled
3497
3249
  } = param, existingValue = React.useContext(ClientOnlyContext);
3498
- return /* @__PURE__ */ jsxRuntimeExports.jsx(ClientOnlyContext.Provider, {
3250
+ return /* @__PURE__ */ jsxRuntime.jsx(ClientOnlyContext.Provider, {
3499
3251
  value: enabled != null ? enabled : existingValue,
3500
3252
  children
3501
3253
  });
@@ -3511,7 +3263,7 @@ function useClientValue(value) {
3511
3263
  useDidFinishSSR();
3512
3264
  return typeof value == "function" ? value() : value;
3513
3265
  }
3514
- function _type_of$1(obj) {
3266
+ function _type_of$2(obj) {
3515
3267
  "@swc/helpers - typeof";
3516
3268
  return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
3517
3269
  }
@@ -3589,7 +3341,7 @@ var useComponentState = function(props, animationDriver, staticConfig, config) {
3589
3341
  function hasAnimatedStyleValue(style) {
3590
3342
  return Object.keys(style).some(function(k) {
3591
3343
  var val = style[k];
3592
- return val && (typeof val > "u" ? "undefined" : _type_of$1(val)) === "object" && "_animation" in val;
3344
+ return val && (typeof val > "u" ? "undefined" : _type_of$2(val)) === "object" && "_animation" in val;
3593
3345
  });
3594
3346
  }
3595
3347
  var isDisabled = function(props) {
@@ -3600,7 +3352,7 @@ var hooks = {};
3600
3352
  function setupHooks(next) {
3601
3353
  Object.assign(hooks, next);
3602
3354
  }
3603
- var is19 = React.version.startsWith("19."), Slot = /* @__PURE__ */ React.memo(/* @__PURE__ */ React.forwardRef(function(props, forwardedRef) {
3355
+ var Slot = /* @__PURE__ */ React.memo(/* @__PURE__ */ React.forwardRef(function(props, forwardedRef) {
3604
3356
  var _a = props, {
3605
3357
  children
3606
3358
  } = _a, slotProps = __objRest(_a, [
@@ -3609,7 +3361,7 @@ var is19 = React.version.startsWith("19."), Slot = /* @__PURE__ */ React.memo(/*
3609
3361
  if (/* @__PURE__ */ React.isValidElement(children)) {
3610
3362
  var mergedProps = mergeSlotProps(children, slotProps);
3611
3363
  return /* @__PURE__ */ React.cloneElement(children, children.type.avoidForwardRef ? mergedProps : __spreadProps(__spreadValues({}, mergedProps), {
3612
- ref: composeRefs(forwardedRef, is19 ? children.props.ref : children.ref)
3364
+ ref: composeRefs(forwardedRef, children.props.ref)
3613
3365
  }));
3614
3366
  }
3615
3367
  return React.Children.count(children) > 1 ? React.Children.only(null) : null;
@@ -3617,24 +3369,23 @@ var is19 = React.version.startsWith("19."), Slot = /* @__PURE__ */ React.memo(/*
3617
3369
  var {
3618
3370
  children
3619
3371
  } = param;
3620
- return /* @__PURE__ */ jsxRuntimeExports.jsx(jsxRuntimeExports.Fragment, {
3372
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {
3621
3373
  children
3622
3374
  });
3623
3375
  };
3624
3376
  Slottable.displayName = "Slottable";
3625
3377
  var pressMap = {};
3626
3378
  function mergeSlotProps(child, slotProps) {
3627
- var childProps = child.props, overrideProps = __spreadValues({}, childProps), isHTMLChild = typeof child.type == "string";
3379
+ var childProps = child.props, isHTMLChild = typeof child.type == "string";
3628
3380
  if (isHTMLChild) for (var key in pressMap) key in slotProps && (slotProps[pressMap[key]] = slotProps[key], delete slotProps[key]);
3629
- for (var propName in childProps) {
3630
- var slotPropValue = slotProps[propName], childPropValue = childProps[propName];
3631
- isHTMLChild && propName in pressMap && (propName = pressMap[propName], delete overrideProps[propName]);
3632
- var isHandler = handleRegex.test(propName);
3633
- isHandler ? overrideProps[propName] = composeEventHandlers(childPropValue, slotPropValue) : propName === "style" ? overrideProps[propName] = __spreadValues(__spreadValues({}, slotPropValue), childPropValue) : propName === "className" && (overrideProps[propName] = [slotPropValue, childPropValue].filter(Boolean).join(" "));
3634
- }
3635
- return __spreadValues(__spreadValues({}, slotProps), overrideProps);
3381
+ var merged = mergeSlotStyleProps(slotProps, childProps);
3382
+ if (isHTMLChild) for (var key1 in pressMap) key1 in merged && (merged[pressMap[key1]] = merged[key1], delete merged[key1]);
3383
+ return merged;
3384
+ }
3385
+ function _type_of$1(obj) {
3386
+ "@swc/helpers - typeof";
3387
+ return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
3636
3388
  }
3637
- var handleRegex = /^on[A-Z]/;
3638
3389
  var componentSetStates = /* @__PURE__ */ new Set(), avoidReRenderKeys = /* @__PURE__ */ new Set(["hover", "press", "pressIn", "group", "focus", "focusWithin", "media", "group"]);
3639
3390
  var BaseText, BaseView, hasSetupBaseViews = false, lastInteractionWasKeyboard = {
3640
3391
  value: false
@@ -3656,7 +3407,7 @@ function createComponent(staticConfig) {
3656
3407
  isHOC
3657
3408
  } = staticConfig;
3658
3409
  var component = /* @__PURE__ */ React.forwardRef(function(propsIn, forwardedRef) {
3659
- var _hooks_usePropsTransform, _hooks_useEvents, _config_animations;
3410
+ var _hooks_usePropsTransform, _hooks_useEvents;
3660
3411
  if (!hasSetupBaseViews) {
3661
3412
  var _hooks_getBaseViews;
3662
3413
  hasSetupBaseViews = true;
@@ -3677,7 +3428,17 @@ function createComponent(staticConfig) {
3677
3428
  nextProps && (props = nextProps), overriddenContextProps = overrides;
3678
3429
  }
3679
3430
  var componentName2 = props.componentName || staticConfig.componentName;
3680
- var groupContextParent = React.useContext(GroupContext), animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, componentState = useComponentState(props, (animationDriver == null ? void 0 : animationDriver.isStub) ? null : animationDriver, staticConfig), {
3431
+ var groupContextParent = React.useContext(GroupContext), animationDriver = (function() {
3432
+ if (props.animatedBy && (config == null ? void 0 : config.animations)) {
3433
+ var animations2 = config.animations;
3434
+ if ("default" in animations2) {
3435
+ var _animations_props_animatedBy;
3436
+ return (_animations_props_animatedBy = animations2[props.animatedBy]) !== null && _animations_props_animatedBy !== void 0 ? _animations_props_animatedBy : animations2.default;
3437
+ }
3438
+ return props.animatedBy === "default" ? animations2 : null;
3439
+ }
3440
+ return componentContext.animationDriver;
3441
+ })(), useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, componentState = useComponentState(props, (animationDriver == null ? void 0 : animationDriver.isStub) ? null : animationDriver, staticConfig), {
3681
3442
  disabled,
3682
3443
  groupName,
3683
3444
  hasAnimationProp,
@@ -3734,7 +3495,7 @@ function createComponent(staticConfig) {
3734
3495
  }
3735
3496
  });
3736
3497
  }, [stateRef, groupName, groupContextParent]), setStateShallow = componentState.setStateShallow;
3737
- var isTaggable = !Component || typeof Component == "string", tagProp = props.tag, element = Component, BaseTextComponent = BaseText || element || "span", BaseViewComponent = BaseView || element || "div", elementType = isText ? BaseTextComponent : BaseViewComponent;
3498
+ var isTaggable = !Component || typeof Component == "string", renderProp = props.render, element = Component, BaseTextComponent = BaseText || element || "span", BaseViewComponent = BaseView || element || "div", elementType = isText ? BaseTextComponent : BaseViewComponent;
3738
3499
  animationDriver && isAnimated && // this should really be behind another prop as it's not really related to
3739
3500
  // "needsWebStyles" basically with motion we just animate a plain div, but
3740
3501
  // we still have animated.View/Text for Sheet which wants to control
@@ -3752,7 +3513,7 @@ function createComponent(staticConfig) {
3752
3513
  return !!stateRef.current.isListeningToTheme;
3753
3514
  }, themeStateProps.deopt = willBeAnimated, false) ;
3754
3515
  var [theme, themeState] = useThemeWithState(themeStateProps);
3755
- elementType = Component || elementType;
3516
+ elementType = element || elementType;
3756
3517
  var mediaState = useMedia(componentContext);
3757
3518
  setDidGetVariableValue(false);
3758
3519
  var resolveValues = (
@@ -3894,7 +3655,7 @@ function createComponent(staticConfig) {
3894
3655
  "onClick",
3895
3656
  "theme"
3896
3657
  ]), viewProps = nonTamaguiProps;
3897
- !isTaggable && props.forceStyle && (viewProps.forceStyle = props.forceStyle), isHOC && (typeof _themeProp < "u" && (viewProps.theme = _themeProp), typeof passThrough < "u" && (viewProps.passThrough = passThrough)), tagProp && elementType.acceptTagProp && (viewProps.tag = tagProp);
3658
+ !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);
3898
3659
  var animationStyles, shouldUseAnimation = (
3899
3660
  // if it supports css vars we run it on server too to get matching initial style
3900
3661
  (supportsCSS ? willBeAnimatedClient : willBeAnimated) && useAnimations && !isHOC
@@ -3913,6 +3674,7 @@ function createComponent(staticConfig) {
3913
3674
  componentState: state,
3914
3675
  styleProps,
3915
3676
  theme,
3677
+ themeName,
3916
3678
  pseudos: pseudos || null,
3917
3679
  staticConfig,
3918
3680
  stateRef
@@ -3943,24 +3705,27 @@ function createComponent(staticConfig) {
3943
3705
  });
3944
3706
  return;
3945
3707
  }
3946
- var tm;
3947
3708
  if (state.unmounted) {
3948
- if ((animationDriver == null ? void 0 : animationDriver.supportsCSS) || isAndroid) return tm = setTimeout(function() {
3949
- setStateShallow({
3950
- unmounted: false
3951
- });
3952
- }), function() {
3953
- return clearTimeout(tm);
3954
- };
3709
+ if (supportsCSS) {
3710
+ var cancelled = false;
3711
+ return requestAnimationFrame(function() {
3712
+ cancelled || requestAnimationFrame(function() {
3713
+ cancelled || setStateShallow({
3714
+ unmounted: false
3715
+ });
3716
+ });
3717
+ }), function() {
3718
+ cancelled = true;
3719
+ };
3720
+ }
3955
3721
  setStateShallow({
3956
3722
  unmounted: false
3957
3723
  });
3958
- return;
3959
3724
  }
3960
3725
  return function() {
3961
3726
  componentSetStates.delete(setState);
3962
3727
  };
3963
- }, [state.unmounted, disabled]), useIsomorphicLayoutEffect(function() {
3728
+ }, [state.unmounted, supportsCSS]), useIsomorphicLayoutEffect(function() {
3964
3729
  if (!disabled && !(!pseudoGroups && !mediaGroups) && allGroupContexts) return subscribeToContextGroup({
3965
3730
  groupContext: allGroupContexts,
3966
3731
  setStateShallow,
@@ -4041,26 +3806,35 @@ function createComponent(staticConfig) {
4041
3806
  }
4042
3807
  });
4043
3808
  var useChildrenResult;
4044
- hooks.useChildren && (useChildrenResult = hooks.useChildren(elementType, content, viewProps)), useChildrenResult ? content = useChildrenResult : content = /* @__PURE__ */ React.createElement(elementType, viewProps, content);
4045
- var ResetPresence = config == null || (_config_animations = config.animations) === null || _config_animations === void 0 ? void 0 : _config_animations.ResetPresence, needsReset = !!// not when passing down to child
3809
+ if (hooks.useChildren && (useChildrenResult = hooks.useChildren(elementType, content, viewProps)), useChildrenResult) content = useChildrenResult;
3810
+ else if (typeof renderProp == "function") {
3811
+ var renderProps = __spreadProps(__spreadValues({}, viewProps), {
3812
+ children: content
3813
+ });
3814
+ content = renderProp(renderProps, state);
3815
+ } else if (renderProp && (typeof renderProp > "u" ? "undefined" : _type_of$1(renderProp)) === "object" && /* @__PURE__ */ React.isValidElement(renderProp)) {
3816
+ var elementProps = renderProp.props || {}, mergedProps = mergeRenderElementProps(elementProps, viewProps, content);
3817
+ content = /* @__PURE__ */ React.cloneElement(renderProp, mergedProps);
3818
+ } else content = /* @__PURE__ */ React.createElement(elementType, viewProps, content);
3819
+ var ResetPresence = animationDriver == null ? void 0 : animationDriver.ResetPresence, needsReset = !!// not when passing down to child
4046
3820
  (!asChild && // not when passThrough
4047
3821
  splitStyles && // not when HOC
4048
3822
  !isHOC && ResetPresence && willBeAnimated && (hasEnterStyle || presenceState)), hasEverReset = stateRef.current.hasEverResetPresence;
4049
3823
  needsReset && !hasEverReset && (stateRef.current.hasEverResetPresence = true);
4050
3824
  var renderReset = needsReset || hasEverReset;
4051
- if (renderReset && ResetPresence && (content = /* @__PURE__ */ jsxRuntimeExports.jsx(ResetPresence, {
3825
+ if (renderReset && ResetPresence && (content = /* @__PURE__ */ jsxRuntime.jsx(ResetPresence, {
4052
3826
  disabled: !needsReset,
4053
3827
  children: content
4054
- })), "focusWithinStyle" in propsIn && (content = /* @__PURE__ */ jsxRuntimeExports.jsx(ComponentContext.Provider, __spreadProps(__spreadValues({}, componentContext), {
3828
+ })), "focusWithinStyle" in propsIn && (content = /* @__PURE__ */ jsxRuntime.jsx(ComponentContext.Provider, __spreadProps(__spreadValues({}, componentContext), {
4055
3829
  setParentFocusState: setStateShallow,
4056
3830
  children: content
4057
- }))), "group" in props && (content = /* @__PURE__ */ jsxRuntimeExports.jsx(GroupContext.Provider, {
3831
+ }))), "group" in props && (content = /* @__PURE__ */ jsxRuntime.jsx(GroupContext.Provider, {
4058
3832
  value: allGroupContexts,
4059
3833
  children: content
4060
3834
  })), content = disableTheme || !splitStyles ? content : getThemedChildren(themeState, content, themeStateProps, false, stateRef), overriddenContextProps && contextForOverride) {
4061
3835
  var Provider = contextForOverride.Provider;
4062
3836
  for (var key1 in styledContextValue) key1 in overriddenContextProps || (overriddenContextProps[key1] = styledContextValue[key1]);
4063
- debugProp && console.info("overriddenContextProps", overriddenContextProps), content = /* @__PURE__ */ jsxRuntimeExports.jsx(Provider, __spreadProps(__spreadValues({
3837
+ content = /* @__PURE__ */ jsxRuntime.jsx(Provider, __spreadProps(__spreadValues({
4064
3838
  __disableMergeDefaultValues: true
4065
3839
  }, overriddenContextProps), {
4066
3840
  children: content
@@ -4719,9 +4493,9 @@ function useThemeName() {
4719
4493
  }
4720
4494
  var Configuration = function(props) {
4721
4495
  var current = React.useContext(ComponentContext), _props_disableSSR;
4722
- return /* @__PURE__ */ jsxRuntimeExports.jsx(ClientOnly, {
4496
+ return /* @__PURE__ */ jsxRuntime.jsx(ClientOnly, {
4723
4497
  enabled: (_props_disableSSR = props.disableSSR) !== null && _props_disableSSR !== void 0 ? _props_disableSSR : current.disableSSR,
4724
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(ComponentContext.Provider, __spreadValues(__spreadValues({}, current), props))
4498
+ children: /* @__PURE__ */ jsxRuntime.jsx(ComponentContext.Provider, __spreadValues(__spreadValues({}, current), props))
4725
4499
  });
4726
4500
  };
4727
4501
  function FontLanguage(param) {
@@ -4732,7 +4506,7 @@ function FontLanguage(param) {
4732
4506
  ]), parentProps = React.useContext(ComponentContext), language = React.useMemo(function() {
4733
4507
  return props;
4734
4508
  }, [JSON.stringify(props)]);
4735
- return /* @__PURE__ */ jsxRuntimeExports.jsx(ComponentContext.Provider, __spreadProps(__spreadValues({}, parentProps), {
4509
+ return /* @__PURE__ */ jsxRuntime.jsx(ComponentContext.Provider, __spreadProps(__spreadValues({}, parentProps), {
4736
4510
  language,
4737
4511
  children
4738
4512
  }));
@@ -4740,7 +4514,7 @@ function FontLanguage(param) {
4740
4514
  var ThemeProvider = function(props) {
4741
4515
  var addThemeClassName = getSetting("addThemeClassName");
4742
4516
  var forceClassName = addThemeClassName === void 0;
4743
- return /* @__PURE__ */ jsxRuntimeExports.jsx(Theme, {
4517
+ return /* @__PURE__ */ jsxRuntime.jsx(Theme, {
4744
4518
  className: props.className,
4745
4519
  name: props.defaultTheme,
4746
4520
  forceClassName,
@@ -4764,11 +4538,14 @@ function TamaguiProvider$1(param) {
4764
4538
  }, []);
4765
4539
  var memoizedInsets = React.useMemo(function() {
4766
4540
  return insets;
4767
- }, [insets == null ? void 0 : insets.top, insets == null ? void 0 : insets.right, insets == null ? void 0 : insets.bottom, insets == null ? void 0 : insets.left]), contents = /* @__PURE__ */ jsxRuntimeExports.jsx(UnmountedClassName, {
4768
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(ComponentContext.Provider, {
4769
- animationDriver: config == null ? void 0 : config.animations,
4541
+ }, [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() {
4542
+ var animations = config == null ? void 0 : config.animations;
4543
+ return animations ? "default" in animations ? animations.default : animations : null;
4544
+ }, [config == null ? void 0 : config.animations]), contents = /* @__PURE__ */ jsxRuntime.jsx(UnmountedClassName, {
4545
+ children: /* @__PURE__ */ jsxRuntime.jsx(ComponentContext.Provider, {
4546
+ animationDriver: defaultAnimationDriver2,
4770
4547
  insets: memoizedInsets,
4771
- children: /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeProvider, {
4548
+ children: /* @__PURE__ */ jsxRuntime.jsx(ThemeProvider, {
4772
4549
  defaultTheme,
4773
4550
  reset,
4774
4551
  className,
@@ -4776,10 +4553,10 @@ function TamaguiProvider$1(param) {
4776
4553
  })
4777
4554
  })
4778
4555
  });
4779
- return getSetting("disableSSR") && (contents = /* @__PURE__ */ jsxRuntimeExports.jsx(ClientOnly, {
4556
+ return getSetting("disableSSR") && (contents = /* @__PURE__ */ jsxRuntime.jsx(ClientOnly, {
4780
4557
  enabled: true,
4781
4558
  children: contents
4782
- })), /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, {
4559
+ })), /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
4783
4560
  children: [contents, false]
4784
4561
  });
4785
4562
  }
@@ -5029,7 +4806,7 @@ var DisableLayoutContextKey = /* @__PURE__ */ React.createContext(""), LayoutMea
5029
4806
  children
5030
4807
  } = param, id = React.useId();
5031
4808
  return useIsomorphicLayoutEffect(function() {
5032
- }, [disable, id]), /* @__PURE__ */ jsxRuntimeExports.jsx(DisableLayoutContextKey.Provider, {
4809
+ }, [disable, id]), /* @__PURE__ */ jsxRuntime.jsx(DisableLayoutContextKey.Provider, {
5033
4810
  value: id,
5034
4811
  children
5035
4812
  });
@@ -5059,7 +4836,7 @@ const TamaguiProvider = (props) => {
5059
4836
  useIsomorphicLayoutEffect(() => {
5060
4837
  enable();
5061
4838
  }, []);
5062
- return /* @__PURE__ */ jsxRuntimeExports.jsx(TamaguiProvider$1, __spreadValues({}, props));
4839
+ return /* @__PURE__ */ jsxRuntime.jsx(TamaguiProvider$1, __spreadValues({}, props));
5063
4840
  };
5064
4841
  const createTamagui = (conf2) => {
5065
4842
  {
@@ -5223,6 +5000,7 @@ exports.isVariable = isVariable;
5223
5000
  exports.isWeb = isWeb;
5224
5001
  exports.isWebTouchable = isWebTouchable;
5225
5002
  exports.isWindowDefined = isWindowDefined;
5003
+ exports.loadAnimationDriver = loadAnimationDriver;
5226
5004
  exports.matchMedia = matchMedia$1;
5227
5005
  exports.mediaKeyMatch = mediaKeyMatch;
5228
5006
  exports.mediaObjectToString = mediaObjectToString;