@tamagui/core 3.0.0-beta.739.1 → 3.0.0-beta.745.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/native.cjs CHANGED
@@ -10330,7 +10330,7 @@ function getThemeClassNames(name) {
10330
10330
  }
10331
10331
  //#endregion
10332
10332
  //#region ../helpers/dist/esm/composeEventHandlers.native.js
10333
- function _type_of$16(obj) {
10333
+ function _type_of$17(obj) {
10334
10334
  "@swc/helpers - typeof";
10335
10335
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
10336
10336
  }
@@ -10339,7 +10339,7 @@ function composeEventHandlers(og, next) {
10339
10339
  if (!og || !next) return next || og || void 0;
10340
10340
  return function(event) {
10341
10341
  og === null || og === void 0 || og(event);
10342
- var isPrevented = !!event && (typeof event === "undefined" ? "undefined" : _type_of$16(event)) === "object" && ("defaultPrevented" in event && Boolean(event.defaultPrevented) || "isCanceled" in event && Boolean(event.isCanceled));
10342
+ var isPrevented = !!event && (typeof event === "undefined" ? "undefined" : _type_of$17(event)) === "object" && ("defaultPrevented" in event && Boolean(event.defaultPrevented) || "isCanceled" in event && Boolean(event.isCanceled));
10343
10343
  if (!event || !checkDefaultPrevented || !isPrevented) return next === null || next === void 0 ? void 0 : next(event);
10344
10344
  };
10345
10345
  }
@@ -11538,7 +11538,7 @@ function loadAnimationDriver(name, driver) {
11538
11538
  }
11539
11539
  //#endregion
11540
11540
  //#region ../web/dist/esm/createVariable.native.js
11541
- function _type_of$15(obj) {
11541
+ function _type_of$16(obj) {
11542
11542
  "@swc/helpers - typeof";
11543
11543
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
11544
11544
  }
@@ -11566,7 +11566,7 @@ function variableToString(vrble) {
11566
11566
  return `${vrble || ""}`;
11567
11567
  }
11568
11568
  function isVariable(v) {
11569
- return v && (typeof v === "undefined" ? "undefined" : _type_of$15(v)) === "object" && "isVar" in v;
11569
+ return v && (typeof v === "undefined" ? "undefined" : _type_of$16(v)) === "object" && "isVar" in v;
11570
11570
  }
11571
11571
  function getVariable(nameOrVariable) {
11572
11572
  var group = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "size";
@@ -12737,12 +12737,12 @@ var hasThemeUpdatingProps = function(props) {
12737
12737
  };
12738
12738
  //#endregion
12739
12739
  //#region ../web/dist/esm/helpers/isObj.native.js
12740
- function _type_of$14(obj) {
12740
+ function _type_of$15(obj) {
12741
12741
  "@swc/helpers - typeof";
12742
12742
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
12743
12743
  }
12744
12744
  var isObj = function(x) {
12745
- return x && !Array.isArray(x) && (typeof x === "undefined" ? "undefined" : _type_of$14(x)) === "object";
12745
+ return x && !Array.isArray(x) && (typeof x === "undefined" ? "undefined" : _type_of$15(x)) === "object";
12746
12746
  };
12747
12747
  function isPlainObject(value) {
12748
12748
  if (!isObj(value)) return false;
@@ -12785,7 +12785,7 @@ var mergeComponentProps = function(defaultProps, contextProps, props) {
12785
12785
  };
12786
12786
  //#endregion
12787
12787
  //#region ../web/dist/esm/helpers/objectIdentityKey.native.js
12788
- function _type_of$13(obj) {
12788
+ function _type_of$14(obj) {
12789
12789
  "@swc/helpers - typeof";
12790
12790
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
12791
12791
  }
@@ -12794,7 +12794,7 @@ function objectIdentityKey(obj) {
12794
12794
  for (var key in obj) {
12795
12795
  k += key;
12796
12796
  var arg = obj[key];
12797
- var type = typeof arg === "undefined" ? "undefined" : _type_of$13(arg);
12797
+ var type = typeof arg === "undefined" ? "undefined" : _type_of$14(arg);
12798
12798
  if (!arg || type !== "object" && type !== "function") k += type + arg;
12799
12799
  else if (cache$2.has(arg)) k += cache$2.get(arg);
12800
12800
  else {
@@ -13060,7 +13060,7 @@ var useThemeWithState = function(props) {
13060
13060
  //#region ../web/dist/esm/_withStableStyle.native.js
13061
13061
  var _excluded$9 = ["ref"];
13062
13062
  var _excluded2$4 = ["_expressions"];
13063
- function _type_of$12(obj) {
13063
+ function _type_of$13(obj) {
13064
13064
  "@swc/helpers - typeof";
13065
13065
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
13066
13066
  }
@@ -13087,7 +13087,7 @@ var _withStableStyle = function(Component, createStyle, hasThemeKeys, hasMediaKe
13087
13087
  if (!gettableTheme) {
13088
13088
  var _loop = function(key2) {
13089
13089
  var value = fallbackTheme[key2];
13090
- gettableTheme[key2] = typeof (value === null || value === void 0 ? void 0 : value.get) === "function" ? value : _objectSpread2(_objectSpread2({}, value && (typeof value === "undefined" ? "undefined" : _type_of$12(value)) === "object" ? value : { val: value }), {}, { get: function() {
13090
+ gettableTheme[key2] = typeof (value === null || value === void 0 ? void 0 : value.get) === "function" ? value : _objectSpread2(_objectSpread2({}, value && (typeof value === "undefined" ? "undefined" : _type_of$13(value)) === "object" ? value : { val: value }), {}, { get: function() {
13091
13091
  return getVariable(value);
13092
13092
  } });
13093
13093
  };
@@ -13700,12 +13700,12 @@ function setComponentDisplayName(component, displayName) {
13700
13700
  }
13701
13701
  //#endregion
13702
13702
  //#region ../web/dist/esm/helpers/resolveAnimationDriver.native.js
13703
- function _type_of$11(obj) {
13703
+ function _type_of$12(obj) {
13704
13704
  "@swc/helpers - typeof";
13705
13705
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
13706
13706
  }
13707
13707
  function isAnimationDriver(value) {
13708
- if ((typeof value === "undefined" ? "undefined" : _type_of$11(value)) !== "object" || value === null) return false;
13708
+ if ((typeof value === "undefined" ? "undefined" : _type_of$12(value)) !== "object" || value === null) return false;
13709
13709
  if ("isStub" in value && value.isStub === true) return true;
13710
13710
  return "useAnimations" in value && typeof value.useAnimations === "function";
13711
13711
  }
@@ -14476,7 +14476,7 @@ function resolveVariableValue(key, valOrVar, resolveValues) {
14476
14476
  }
14477
14477
  //#endregion
14478
14478
  //#region ../web/dist/esm/helpers/themeRef.native.js
14479
- function _type_of$9(obj) {
14479
+ function _type_of$10(obj) {
14480
14480
  "@swc/helpers - typeof";
14481
14481
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
14482
14482
  }
@@ -14489,7 +14489,7 @@ function themeRefKey(value) {
14489
14489
  function containsThemeRef(value) {
14490
14490
  if (typeof value === "string") return value.includes(THEME_REF_PREFIX);
14491
14491
  if (Array.isArray(value)) return value.some(containsThemeRef);
14492
- if (value && (typeof value === "undefined" ? "undefined" : _type_of$9(value)) === "object") return Object.values(value).some(containsThemeRef);
14492
+ if (value && (typeof value === "undefined" ? "undefined" : _type_of$10(value)) === "object") return Object.values(value).some(containsThemeRef);
14493
14493
  return false;
14494
14494
  }
14495
14495
  //#endregion
@@ -14521,6 +14521,10 @@ function transformsToString(transforms) {
14521
14521
  }
14522
14522
  //#endregion
14523
14523
  //#region ../web/dist/esm/helpers/directStyle.native.js
14524
+ function _type_of$9(obj) {
14525
+ "@swc/helpers - typeof";
14526
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
14527
+ }
14524
14528
  var directStyleHandler = {
14525
14529
  segment(state, start, end, isBase, valid, source, chainStart, chainEnd, chainValid, chainCount, _result, failure, failureIndex, property, merge, originalValue, contextOnly) {
14526
14530
  if (isBase) {
@@ -14552,11 +14556,14 @@ var directStyleHandler = {
14552
14556
  hasBase = true;
14553
14557
  }
14554
14558
  if (result & 2 && !hasBase) {
14555
- var value = property === "opacity" ? 1 : property === "scale" || property === "scaleX" || property === "scaleY" ? 1 : property === "rotate" ? "0deg" : property === "x" || property === "y" ? 0 : null;
14559
+ var value = implicitLifecycleBase(property);
14556
14560
  if (value !== null) emitValue(state, property, value, 0, "", void 0, "", "", merge, value, contextOnly);
14557
14561
  }
14558
14562
  }
14559
14563
  };
14564
+ function implicitLifecycleBase(property) {
14565
+ return property === "opacity" || property === "scale" || property === "scaleX" || property === "scaleY" ? 1 : property === "rotate" ? "0deg" : property === "x" || property === "y" ? 0 : null;
14566
+ }
14560
14567
  var legacyTransformParts = /* @__PURE__ */ new Set([
14561
14568
  "matrix",
14562
14569
  "perspective",
@@ -15276,10 +15283,45 @@ function contributeFrontendValue(state, property, value, merge) {
15276
15283
  }
15277
15284
  return true;
15278
15285
  }
15286
+ function isConditionalStyleObject(state, value) {
15287
+ if (Object.prototype.hasOwnProperty.call(value, "default")) return true;
15288
+ for (var key in value) return key.length > 0 && !!resolveClauseChain(state, key, 0, key.length);
15289
+ return false;
15290
+ }
15279
15291
  function contributeVariantClauseValue(state, property, value, conditionSource, merge, originalValue) {
15280
15292
  var contextOnly = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : false;
15293
+ if (value && (typeof value === "undefined" ? "undefined" : _type_of$9(value)) === "object" && !Array.isArray(value) && !isVariable(value) && isConditionalStyleObject(state, value)) {
15294
+ for (var key in value) {
15295
+ var payload = value[key];
15296
+ if (payload == null) continue;
15297
+ var source = key === "default" ? conditionSource : `${conditionSource}:${key}`;
15298
+ resolveClauseChain(state, source, 0, source.length, property, payload, merge, payload, contextOnly, -1, -1, 2);
15299
+ }
15300
+ return;
15301
+ }
15281
15302
  resolveClauseChain(state, conditionSource, 0, conditionSource.length, property, value, merge, originalValue, contextOnly, -1, -1, 2);
15282
15303
  }
15304
+ function contributeStyleObject(state, property, value, merge, contextOnly) {
15305
+ if (!isConditionalStyleObject(state, value)) return false;
15306
+ var hasBase = false;
15307
+ var base = value.default;
15308
+ if (base != null) {
15309
+ emitValue(state, property, base, 0, "", void 0, "", "", merge, base, contextOnly);
15310
+ hasBase = true;
15311
+ }
15312
+ var conditions = 0;
15313
+ for (var key in value) {
15314
+ if (key === "default") continue;
15315
+ var payload = value[key];
15316
+ if (payload == null) continue;
15317
+ conditions |= resolveClauseChain(state, key, 0, key.length, property, payload, merge, payload, contextOnly, -1, -1, 1);
15318
+ }
15319
+ if (conditions & 12 && !hasBase) {
15320
+ var resting = implicitLifecycleBase(property);
15321
+ if (resting !== null) emitValue(state, property, resting, 0, "", void 0, "", "", merge, resting, contextOnly);
15322
+ }
15323
+ return true;
15324
+ }
15283
15325
  function contributeStyleValue(state, property, value, merge, originalValue) {
15284
15326
  var contextOnly = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : false;
15285
15327
  if (value === "safe" && isSafeAreaKey(property)) {
@@ -15306,6 +15348,7 @@ function contributeStyleValue(state, property, value, merge, originalValue) {
15306
15348
  }
15307
15349
  }
15308
15350
  if (typeof value === "string") return contributeStyleString(state, property, value, merge, originalValue, contextOnly);
15351
+ if (value && (typeof value === "undefined" ? "undefined" : _type_of$9(value)) === "object" && !Array.isArray(value) && !isVariable(value) && contributeStyleObject(state, property, value, merge, contextOnly)) return true;
15309
15352
  if (value != null) {
15310
15353
  emitValue(state, property, value, 0, "", void 0, "", "", merge, originalValue !== null && originalValue !== void 0 ? originalValue : value, contextOnly);
15311
15354
  return true;
@@ -16922,9 +16965,23 @@ function hasFlatModifier(props, config, modifiers, ctx) {
16922
16965
  ]);
16923
16966
  for (var key in props) {
16924
16967
  var value = props[key];
16925
- if (typeof value !== "string" || value.indexOf(":") === -1) continue;
16968
+ var isString = typeof value === "string";
16969
+ if (isString ? value.indexOf(":") === -1 : !value || (typeof value === "undefined" ? "undefined" : _type_of$5(value)) !== "object") continue;
16926
16970
  var property = config.shorthands[key] || key;
16927
16971
  if (!(property in stylePropsAll) && property !== "transition") continue;
16972
+ if (!isString) {
16973
+ if (property === "transition") continue;
16974
+ for (var chain in value) {
16975
+ if (chain === "default" || value[chain] == null) continue;
16976
+ var start = 0;
16977
+ for (var index = 0; index <= chain.length; index++) {
16978
+ if (index !== chain.length && chain.charCodeAt(index) !== 58) continue;
16979
+ if (modifiers.has(canonicalClauseModifier(chain.slice(start, index)))) return true;
16980
+ start = index + 1;
16981
+ }
16982
+ }
16983
+ continue;
16984
+ }
16928
16985
  scan[0] = value;
16929
16986
  scan[1] = modifiers;
16930
16987
  scan[2] = false;
@@ -145,7 +145,7 @@ function getThemeClassNames(name) {
145
145
  }
146
146
  //#endregion
147
147
  //#region ../helpers/dist/esm/composeEventHandlers.native.js
148
- function _type_of$18(obj) {
148
+ function _type_of$19(obj) {
149
149
  "@swc/helpers - typeof";
150
150
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
151
151
  }
@@ -154,7 +154,7 @@ function composeEventHandlers(og, next) {
154
154
  if (!og || !next) return next || og || void 0;
155
155
  return function(event) {
156
156
  og === null || og === void 0 || og(event);
157
- var isPrevented = !!event && (typeof event === "undefined" ? "undefined" : _type_of$18(event)) === "object" && ("defaultPrevented" in event && Boolean(event.defaultPrevented) || "isCanceled" in event && Boolean(event.isCanceled));
157
+ var isPrevented = !!event && (typeof event === "undefined" ? "undefined" : _type_of$19(event)) === "object" && ("defaultPrevented" in event && Boolean(event.defaultPrevented) || "isCanceled" in event && Boolean(event.isCanceled));
158
158
  if (!event || !checkDefaultPrevented || !isPrevented) return next === null || next === void 0 ? void 0 : next(event);
159
159
  };
160
160
  }
@@ -661,7 +661,7 @@ var FONT_DATA_ATTRIBUTE_NAME = "data-tamagui-font";
661
661
  var MISSING_THEME_MESSAGE = `Missing theme.`;
662
662
  //#endregion
663
663
  //#region ../web/dist/esm/helpers/formatDiagnostic.native.js
664
- function _type_of$17(obj) {
664
+ function _type_of$18(obj) {
665
665
  "@swc/helpers - typeof";
666
666
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
667
667
  }
@@ -673,9 +673,9 @@ function formatDiagnosticValue(value) {
673
673
  return JSON.stringify(output);
674
674
  }
675
675
  if (value == null || typeof value === "number" || typeof value === "boolean") return String(value);
676
- if ((typeof value === "undefined" ? "undefined" : _type_of$17(value)) === "bigint") return `${value}n`;
676
+ if ((typeof value === "undefined" ? "undefined" : _type_of$18(value)) === "bigint") return `${value}n`;
677
677
  if (typeof value === "function") return `[Function ${value.name || "anonymous"}]`;
678
- if ((typeof value === "undefined" ? "undefined" : _type_of$17(value)) !== "object") return String(value);
678
+ if ((typeof value === "undefined" ? "undefined" : _type_of$18(value)) !== "object") return String(value);
679
679
  if (seen.has(value)) return "[Circular]";
680
680
  if (depth === 2) return Array.isArray(value) ? "[Array]" : "[Object]";
681
681
  seen.add(value);
@@ -1480,7 +1480,7 @@ function loadAnimationDriver(name, driver) {
1480
1480
  }
1481
1481
  //#endregion
1482
1482
  //#region ../web/dist/esm/createVariable.native.js
1483
- function _type_of$16(obj) {
1483
+ function _type_of$17(obj) {
1484
1484
  "@swc/helpers - typeof";
1485
1485
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
1486
1486
  }
@@ -1508,7 +1508,7 @@ function variableToString(vrble) {
1508
1508
  return `${vrble || ""}`;
1509
1509
  }
1510
1510
  function isVariable(v) {
1511
- return v && (typeof v === "undefined" ? "undefined" : _type_of$16(v)) === "object" && "isVar" in v;
1511
+ return v && (typeof v === "undefined" ? "undefined" : _type_of$17(v)) === "object" && "isVar" in v;
1512
1512
  }
1513
1513
  function getVariable(nameOrVariable) {
1514
1514
  var group = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "size";
@@ -2679,12 +2679,12 @@ var hasThemeUpdatingProps = function(props) {
2679
2679
  };
2680
2680
  //#endregion
2681
2681
  //#region ../web/dist/esm/helpers/isObj.native.js
2682
- function _type_of$15(obj) {
2682
+ function _type_of$16(obj) {
2683
2683
  "@swc/helpers - typeof";
2684
2684
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
2685
2685
  }
2686
2686
  var isObj = function(x) {
2687
- return x && !Array.isArray(x) && (typeof x === "undefined" ? "undefined" : _type_of$15(x)) === "object";
2687
+ return x && !Array.isArray(x) && (typeof x === "undefined" ? "undefined" : _type_of$16(x)) === "object";
2688
2688
  };
2689
2689
  function isPlainObject(value) {
2690
2690
  if (!isObj(value)) return false;
@@ -2727,7 +2727,7 @@ var mergeComponentProps = function(defaultProps, contextProps, props) {
2727
2727
  };
2728
2728
  //#endregion
2729
2729
  //#region ../web/dist/esm/helpers/objectIdentityKey.native.js
2730
- function _type_of$14(obj) {
2730
+ function _type_of$15(obj) {
2731
2731
  "@swc/helpers - typeof";
2732
2732
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
2733
2733
  }
@@ -2736,7 +2736,7 @@ function objectIdentityKey(obj) {
2736
2736
  for (var key in obj) {
2737
2737
  k += key;
2738
2738
  var arg = obj[key];
2739
- var type = typeof arg === "undefined" ? "undefined" : _type_of$14(arg);
2739
+ var type = typeof arg === "undefined" ? "undefined" : _type_of$15(arg);
2740
2740
  if (!arg || type !== "object" && type !== "function") k += type + arg;
2741
2741
  else if (cache$2.has(arg)) k += cache$2.get(arg);
2742
2742
  else {
@@ -3002,7 +3002,7 @@ var useThemeWithState = function(props) {
3002
3002
  //#region ../web/dist/esm/_withStableStyle.native.js
3003
3003
  var _excluded$9 = ["ref"];
3004
3004
  var _excluded2$4 = ["_expressions"];
3005
- function _type_of$13(obj) {
3005
+ function _type_of$14(obj) {
3006
3006
  "@swc/helpers - typeof";
3007
3007
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
3008
3008
  }
@@ -3029,7 +3029,7 @@ var _withStableStyle = function(Component, createStyle, hasThemeKeys, hasMediaKe
3029
3029
  if (!gettableTheme) {
3030
3030
  var _loop = function(key2) {
3031
3031
  var value = fallbackTheme[key2];
3032
- gettableTheme[key2] = typeof (value === null || value === void 0 ? void 0 : value.get) === "function" ? value : _objectSpread2(_objectSpread2({}, value && (typeof value === "undefined" ? "undefined" : _type_of$13(value)) === "object" ? value : { val: value }), {}, { get: function() {
3032
+ gettableTheme[key2] = typeof (value === null || value === void 0 ? void 0 : value.get) === "function" ? value : _objectSpread2(_objectSpread2({}, value && (typeof value === "undefined" ? "undefined" : _type_of$14(value)) === "object" ? value : { val: value }), {}, { get: function() {
3033
3033
  return getVariable(value);
3034
3034
  } });
3035
3035
  };
@@ -3642,12 +3642,12 @@ function setComponentDisplayName(component, displayName) {
3642
3642
  }
3643
3643
  //#endregion
3644
3644
  //#region ../web/dist/esm/helpers/resolveAnimationDriver.native.js
3645
- function _type_of$12(obj) {
3645
+ function _type_of$13(obj) {
3646
3646
  "@swc/helpers - typeof";
3647
3647
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
3648
3648
  }
3649
3649
  function isAnimationDriver(value) {
3650
- if ((typeof value === "undefined" ? "undefined" : _type_of$12(value)) !== "object" || value === null) return false;
3650
+ if ((typeof value === "undefined" ? "undefined" : _type_of$13(value)) !== "object" || value === null) return false;
3651
3651
  if ("isStub" in value && value.isStub === true) return true;
3652
3652
  return "useAnimations" in value && typeof value.useAnimations === "function";
3653
3653
  }
@@ -4696,7 +4696,7 @@ function resolveVariableValue(key, valOrVar, resolveValues) {
4696
4696
  }
4697
4697
  //#endregion
4698
4698
  //#region ../web/dist/esm/helpers/themeRef.native.js
4699
- function _type_of$10(obj) {
4699
+ function _type_of$11(obj) {
4700
4700
  "@swc/helpers - typeof";
4701
4701
  return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
4702
4702
  }
@@ -4709,7 +4709,7 @@ function themeRefKey(value) {
4709
4709
  function containsThemeRef(value) {
4710
4710
  if (typeof value === "string") return value.includes(THEME_REF_PREFIX);
4711
4711
  if (Array.isArray(value)) return value.some(containsThemeRef);
4712
- if (value && (typeof value === "undefined" ? "undefined" : _type_of$10(value)) === "object") return Object.values(value).some(containsThemeRef);
4712
+ if (value && (typeof value === "undefined" ? "undefined" : _type_of$11(value)) === "object") return Object.values(value).some(containsThemeRef);
4713
4713
  return false;
4714
4714
  }
4715
4715
  //#endregion
@@ -4741,6 +4741,10 @@ function transformsToString(transforms) {
4741
4741
  }
4742
4742
  //#endregion
4743
4743
  //#region ../web/dist/esm/helpers/directStyle.native.js
4744
+ function _type_of$10(obj) {
4745
+ "@swc/helpers - typeof";
4746
+ return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
4747
+ }
4744
4748
  var directStyleHandler = {
4745
4749
  segment(state, start, end, isBase, valid, source, chainStart, chainEnd, chainValid, chainCount, _result, failure, failureIndex, property, merge, originalValue, contextOnly) {
4746
4750
  if (isBase) {
@@ -4772,11 +4776,14 @@ var directStyleHandler = {
4772
4776
  hasBase = true;
4773
4777
  }
4774
4778
  if (result & 2 && !hasBase) {
4775
- var value = property === "opacity" ? 1 : property === "scale" || property === "scaleX" || property === "scaleY" ? 1 : property === "rotate" ? "0deg" : property === "x" || property === "y" ? 0 : null;
4779
+ var value = implicitLifecycleBase(property);
4776
4780
  if (value !== null) emitValue(state, property, value, 0, "", void 0, "", "", merge, value, contextOnly);
4777
4781
  }
4778
4782
  }
4779
4783
  };
4784
+ function implicitLifecycleBase(property) {
4785
+ return property === "opacity" || property === "scale" || property === "scaleX" || property === "scaleY" ? 1 : property === "rotate" ? "0deg" : property === "x" || property === "y" ? 0 : null;
4786
+ }
4780
4787
  var legacyTransformParts = /* @__PURE__ */ new Set([
4781
4788
  "matrix",
4782
4789
  "perspective",
@@ -5496,10 +5503,45 @@ function contributeFrontendValue(state, property, value, merge) {
5496
5503
  }
5497
5504
  return true;
5498
5505
  }
5506
+ function isConditionalStyleObject(state, value) {
5507
+ if (Object.prototype.hasOwnProperty.call(value, "default")) return true;
5508
+ for (var key in value) return key.length > 0 && !!resolveClauseChain(state, key, 0, key.length);
5509
+ return false;
5510
+ }
5499
5511
  function contributeVariantClauseValue(state, property, value, conditionSource, merge, originalValue) {
5500
5512
  var contextOnly = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : false;
5513
+ if (value && (typeof value === "undefined" ? "undefined" : _type_of$10(value)) === "object" && !Array.isArray(value) && !isVariable(value) && isConditionalStyleObject(state, value)) {
5514
+ for (var key in value) {
5515
+ var payload = value[key];
5516
+ if (payload == null) continue;
5517
+ var source = key === "default" ? conditionSource : `${conditionSource}:${key}`;
5518
+ resolveClauseChain(state, source, 0, source.length, property, payload, merge, payload, contextOnly, -1, -1, 2);
5519
+ }
5520
+ return;
5521
+ }
5501
5522
  resolveClauseChain(state, conditionSource, 0, conditionSource.length, property, value, merge, originalValue, contextOnly, -1, -1, 2);
5502
5523
  }
5524
+ function contributeStyleObject(state, property, value, merge, contextOnly) {
5525
+ if (!isConditionalStyleObject(state, value)) return false;
5526
+ var hasBase = false;
5527
+ var base = value.default;
5528
+ if (base != null) {
5529
+ emitValue(state, property, base, 0, "", void 0, "", "", merge, base, contextOnly);
5530
+ hasBase = true;
5531
+ }
5532
+ var conditions = 0;
5533
+ for (var key in value) {
5534
+ if (key === "default") continue;
5535
+ var payload = value[key];
5536
+ if (payload == null) continue;
5537
+ conditions |= resolveClauseChain(state, key, 0, key.length, property, payload, merge, payload, contextOnly, -1, -1, 1);
5538
+ }
5539
+ if (conditions & 12 && !hasBase) {
5540
+ var resting = implicitLifecycleBase(property);
5541
+ if (resting !== null) emitValue(state, property, resting, 0, "", void 0, "", "", merge, resting, contextOnly);
5542
+ }
5543
+ return true;
5544
+ }
5503
5545
  function contributeStyleValue(state, property, value, merge, originalValue) {
5504
5546
  var contextOnly = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : false;
5505
5547
  if (value === "safe" && isSafeAreaKey(property)) {
@@ -5526,6 +5568,7 @@ function contributeStyleValue(state, property, value, merge, originalValue) {
5526
5568
  }
5527
5569
  }
5528
5570
  if (typeof value === "string") return contributeStyleString(state, property, value, merge, originalValue, contextOnly);
5571
+ if (value && (typeof value === "undefined" ? "undefined" : _type_of$10(value)) === "object" && !Array.isArray(value) && !isVariable(value) && contributeStyleObject(state, property, value, merge, contextOnly)) return true;
5529
5572
  if (value != null) {
5530
5573
  emitValue(state, property, value, 0, "", void 0, "", "", merge, originalValue !== null && originalValue !== void 0 ? originalValue : value, contextOnly);
5531
5574
  return true;
@@ -7144,9 +7187,23 @@ function hasFlatModifier(props, config, modifiers, ctx) {
7144
7187
  ]);
7145
7188
  for (var key in props) {
7146
7189
  var value = props[key];
7147
- if (typeof value !== "string" || value.indexOf(":") === -1) continue;
7190
+ var isString = typeof value === "string";
7191
+ if (isString ? value.indexOf(":") === -1 : !value || (typeof value === "undefined" ? "undefined" : _type_of$6(value)) !== "object") continue;
7148
7192
  var property = config.shorthands[key] || key;
7149
7193
  if (!(property in stylePropsAll) && property !== "transition") continue;
7194
+ if (!isString) {
7195
+ if (property === "transition") continue;
7196
+ for (var chain in value) {
7197
+ if (chain === "default" || value[chain] == null) continue;
7198
+ var start = 0;
7199
+ for (var index = 0; index <= chain.length; index++) {
7200
+ if (index !== chain.length && chain.charCodeAt(index) !== 58) continue;
7201
+ if (modifiers.has(canonicalClauseModifier(chain.slice(start, index)))) return true;
7202
+ start = index + 1;
7203
+ }
7204
+ }
7205
+ continue;
7206
+ }
7150
7207
  scan[0] = value;
7151
7208
  scan[1] = modifiers;
7152
7209
  scan[2] = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/core",
3
- "version": "3.0.0-beta.739.1",
3
+ "version": "3.0.0-beta.745.1",
4
4
  "gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -127,20 +127,20 @@
127
127
  "clean:build": "tamagui-build clean:build"
128
128
  },
129
129
  "dependencies": {
130
- "@tamagui/compose-refs": "3.0.0-beta.739.1",
131
- "@tamagui/constants": "3.0.0-beta.739.1",
132
- "@tamagui/helpers": "3.0.0-beta.739.1",
133
- "@tamagui/react-native-media-driver": "3.0.0-beta.739.1",
134
- "@tamagui/react-native-use-pressable": "3.0.0-beta.739.1",
135
- "@tamagui/size": "3.0.0-beta.739.1",
136
- "@tamagui/use-element-layout": "3.0.0-beta.739.1",
137
- "@tamagui/use-event": "3.0.0-beta.739.1",
138
- "@tamagui/web": "3.0.0-beta.739.1"
130
+ "@tamagui/compose-refs": "3.0.0-beta.745.1",
131
+ "@tamagui/constants": "3.0.0-beta.745.1",
132
+ "@tamagui/helpers": "3.0.0-beta.745.1",
133
+ "@tamagui/react-native-media-driver": "3.0.0-beta.745.1",
134
+ "@tamagui/react-native-use-pressable": "3.0.0-beta.745.1",
135
+ "@tamagui/size": "3.0.0-beta.745.1",
136
+ "@tamagui/use-element-layout": "3.0.0-beta.745.1",
137
+ "@tamagui/use-event": "3.0.0-beta.745.1",
138
+ "@tamagui/web": "3.0.0-beta.745.1"
139
139
  },
140
140
  "devDependencies": {
141
- "@tamagui/build": "3.0.0-beta.739.1",
142
- "@tamagui/native-bundle": "3.0.0-beta.739.1",
143
- "@tamagui/react-native-web-lite": "3.0.0-beta.739.1",
141
+ "@tamagui/build": "3.0.0-beta.745.1",
142
+ "@tamagui/native-bundle": "3.0.0-beta.745.1",
143
+ "@tamagui/react-native-web-lite": "3.0.0-beta.745.1",
144
144
  "@testing-library/react": "^16.1.0",
145
145
  "csstype": "^3.0.10",
146
146
  "react": "19.2.3",