@tamagui/core 1.115.4 → 1.115.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/native.js CHANGED
@@ -5523,6 +5523,111 @@ var require_getStylesAtomic_native = __commonJS({
5523
5523
  }
5524
5524
  });
5525
5525
 
5526
+ // ../web/dist/cjs/helpers/isActivePlatform.native.js
5527
+ var require_isActivePlatform_native = __commonJS({
5528
+ "../web/dist/cjs/helpers/isActivePlatform.native.js"(exports2, module2) {
5529
+ "use strict";
5530
+ var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
5531
+ for (var name in all) __defProp2(target, name, {
5532
+ get: all[name],
5533
+ enumerable: !0
5534
+ });
5535
+ }, __copyProps2 = function(to, from, except, desc) {
5536
+ var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
5537
+ if (from && typeof from == "object" || typeof from == "function") try {
5538
+ for (var _loop = function() {
5539
+ var key = _step.value;
5540
+ !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
5541
+ get: function() {
5542
+ return from[key];
5543
+ },
5544
+ enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
5545
+ });
5546
+ }, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
5547
+ } catch (err) {
5548
+ _didIteratorError = !0, _iteratorError = err;
5549
+ } finally {
5550
+ try {
5551
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
5552
+ } finally {
5553
+ if (_didIteratorError)
5554
+ throw _iteratorError;
5555
+ }
5556
+ }
5557
+ return to;
5558
+ }, __toCommonJS2 = function(mod) {
5559
+ return __copyProps2(__defProp2({}, "__esModule", {
5560
+ value: !0
5561
+ }), mod);
5562
+ }, isActivePlatform_exports = {};
5563
+ __export2(isActivePlatform_exports, {
5564
+ isActivePlatform: function() {
5565
+ return isActivePlatform;
5566
+ }
5567
+ });
5568
+ module2.exports = __toCommonJS2(isActivePlatform_exports);
5569
+ var import_constants2 = require_index_native3();
5570
+ function isActivePlatform(key) {
5571
+ if (!key.startsWith("$platform")) return !0;
5572
+ var platform = key.slice(10);
5573
+ return (
5574
+ // web, ios, android
5575
+ platform === import_constants2.currentPlatform || // web, native
5576
+ platform === "native"
5577
+ );
5578
+ }
5579
+ }
5580
+ });
5581
+
5582
+ // ../web/dist/cjs/helpers/isActiveTheme.native.js
5583
+ var require_isActiveTheme_native = __commonJS({
5584
+ "../web/dist/cjs/helpers/isActiveTheme.native.js"(exports2, module2) {
5585
+ "use strict";
5586
+ var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
5587
+ for (var name in all) __defProp2(target, name, {
5588
+ get: all[name],
5589
+ enumerable: !0
5590
+ });
5591
+ }, __copyProps2 = function(to, from, except, desc) {
5592
+ var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
5593
+ if (from && typeof from == "object" || typeof from == "function") try {
5594
+ for (var _loop = function() {
5595
+ var key = _step.value;
5596
+ !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
5597
+ get: function() {
5598
+ return from[key];
5599
+ },
5600
+ enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
5601
+ });
5602
+ }, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
5603
+ } catch (err) {
5604
+ _didIteratorError = !0, _iteratorError = err;
5605
+ } finally {
5606
+ try {
5607
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
5608
+ } finally {
5609
+ if (_didIteratorError)
5610
+ throw _iteratorError;
5611
+ }
5612
+ }
5613
+ return to;
5614
+ }, __toCommonJS2 = function(mod) {
5615
+ return __copyProps2(__defProp2({}, "__esModule", {
5616
+ value: !0
5617
+ }), mod);
5618
+ }, isActiveTheme_exports = {};
5619
+ __export2(isActiveTheme_exports, {
5620
+ isActiveTheme: function() {
5621
+ return isActiveTheme;
5622
+ }
5623
+ });
5624
+ module2.exports = __toCommonJS2(isActiveTheme_exports);
5625
+ function isActiveTheme(key, activeThemeName) {
5626
+ if (key.startsWith("$theme-")) return key.slice(7).startsWith(activeThemeName);
5627
+ }
5628
+ }
5629
+ });
5630
+
5526
5631
  // ../web/dist/cjs/helpers/log.native.js
5527
5632
  var require_log_native = __commonJS({
5528
5633
  "../web/dist/cjs/helpers/log.native.js"(exports2, module2) {
@@ -6637,9 +6742,9 @@ var require_propMapper_native = __commonJS({
6637
6742
  }
6638
6743
  });
6639
6744
 
6640
- // ../web/dist/cjs/helpers/transformsToString.native.js
6641
- var require_transformsToString_native = __commonJS({
6642
- "../web/dist/cjs/helpers/transformsToString.native.js"(exports2, module2) {
6745
+ // ../web/dist/cjs/helpers/sortString.native.js
6746
+ var require_sortString_native = __commonJS({
6747
+ "../web/dist/cjs/helpers/sortString.native.js"(exports2, module2) {
6643
6748
  "use strict";
6644
6749
  var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
6645
6750
  for (var name in all) __defProp2(target, name, {
@@ -6673,31 +6778,22 @@ var require_transformsToString_native = __commonJS({
6673
6778
  return __copyProps2(__defProp2({}, "__esModule", {
6674
6779
  value: !0
6675
6780
  }), mod);
6676
- }, transformsToString_exports = {};
6677
- __export2(transformsToString_exports, {
6678
- transformsToString: function() {
6679
- return transformsToString;
6781
+ }, sortString_exports = {};
6782
+ __export2(sortString_exports, {
6783
+ sortString: function() {
6784
+ return sortString;
6680
6785
  }
6681
6786
  });
6682
- module2.exports = __toCommonJS2(transformsToString_exports);
6683
- var import_normalizeValueWithProperty = require_normalizeValueWithProperty_native();
6684
- function transformsToString(transforms) {
6685
- return transforms.map(
6686
- // { scale: 2 } => 'scale(2)'
6687
- // { translateX: 20 } => 'translateX(20px)'
6688
- // { matrix: [1,2,3,4,5,6] } => 'matrix(1,2,3,4,5,6)'
6689
- function(transform) {
6690
- var type = Object.keys(transform)[0], value = transform[type];
6691
- return type === "matrix" || type === "matrix3d" ? `${type}(${value.join(",")})` : `${type}(${(0, import_normalizeValueWithProperty.normalizeValueWithProperty)(value, type)})`;
6692
- }
6693
- ).join(" ");
6694
- }
6787
+ module2.exports = __toCommonJS2(sortString_exports);
6788
+ var sortString = function(a, b) {
6789
+ return a < b ? -1 : a > b ? 1 : 0;
6790
+ };
6695
6791
  }
6696
6792
  });
6697
6793
 
6698
- // ../web/dist/cjs/helpers/isActivePlatform.native.js
6699
- var require_isActivePlatform_native = __commonJS({
6700
- "../web/dist/cjs/helpers/isActivePlatform.native.js"(exports2, module2) {
6794
+ // ../web/dist/cjs/helpers/transformsToString.native.js
6795
+ var require_transformsToString_native = __commonJS({
6796
+ "../web/dist/cjs/helpers/transformsToString.native.js"(exports2, module2) {
6701
6797
  "use strict";
6702
6798
  var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
6703
6799
  for (var name in all) __defProp2(target, name, {
@@ -6731,71 +6827,25 @@ var require_isActivePlatform_native = __commonJS({
6731
6827
  return __copyProps2(__defProp2({}, "__esModule", {
6732
6828
  value: !0
6733
6829
  }), mod);
6734
- }, isActivePlatform_exports = {};
6735
- __export2(isActivePlatform_exports, {
6736
- isActivePlatform: function() {
6737
- return isActivePlatform;
6830
+ }, transformsToString_exports = {};
6831
+ __export2(transformsToString_exports, {
6832
+ transformsToString: function() {
6833
+ return transformsToString;
6738
6834
  }
6739
6835
  });
6740
- module2.exports = __toCommonJS2(isActivePlatform_exports);
6741
- var import_constants2 = require_index_native3();
6742
- function isActivePlatform(key) {
6743
- var platform = key.slice(10);
6744
- return (
6745
- // web, ios, android
6746
- platform === import_constants2.currentPlatform || // web, native
6747
- platform === "native"
6748
- );
6749
- }
6750
- }
6751
- });
6752
-
6753
- // ../web/dist/cjs/helpers/sortString.native.js
6754
- var require_sortString_native = __commonJS({
6755
- "../web/dist/cjs/helpers/sortString.native.js"(exports2, module2) {
6756
- "use strict";
6757
- var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
6758
- for (var name in all) __defProp2(target, name, {
6759
- get: all[name],
6760
- enumerable: !0
6761
- });
6762
- }, __copyProps2 = function(to, from, except, desc) {
6763
- var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
6764
- if (from && typeof from == "object" || typeof from == "function") try {
6765
- for (var _loop = function() {
6766
- var key = _step.value;
6767
- !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
6768
- get: function() {
6769
- return from[key];
6770
- },
6771
- enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
6772
- });
6773
- }, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
6774
- } catch (err) {
6775
- _didIteratorError = !0, _iteratorError = err;
6776
- } finally {
6777
- try {
6778
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
6779
- } finally {
6780
- if (_didIteratorError)
6781
- throw _iteratorError;
6836
+ module2.exports = __toCommonJS2(transformsToString_exports);
6837
+ var import_normalizeValueWithProperty = require_normalizeValueWithProperty_native();
6838
+ function transformsToString(transforms) {
6839
+ return transforms.map(
6840
+ // { scale: 2 } => 'scale(2)'
6841
+ // { translateX: 20 } => 'translateX(20px)'
6842
+ // { matrix: [1,2,3,4,5,6] } => 'matrix(1,2,3,4,5,6)'
6843
+ function(transform) {
6844
+ var type = Object.keys(transform)[0], value = transform[type];
6845
+ return type === "matrix" || type === "matrix3d" ? `${type}(${value.join(",")})` : `${type}(${(0, import_normalizeValueWithProperty.normalizeValueWithProperty)(value, type)})`;
6782
6846
  }
6783
- }
6784
- return to;
6785
- }, __toCommonJS2 = function(mod) {
6786
- return __copyProps2(__defProp2({}, "__esModule", {
6787
- value: !0
6788
- }), mod);
6789
- }, sortString_exports = {};
6790
- __export2(sortString_exports, {
6791
- sortString: function() {
6792
- return sortString;
6793
- }
6794
- });
6795
- module2.exports = __toCommonJS2(sortString_exports);
6796
- var sortString = function(a, b) {
6797
- return a < b ? -1 : a > b ? 1 : 0;
6798
- };
6847
+ ).join(" ");
6848
+ }
6799
6849
  }
6800
6850
  });
6801
6851
 
@@ -6863,7 +6913,7 @@ var require_getSplitStyles_native = __commonJS({
6863
6913
  }
6864
6914
  });
6865
6915
  module2.exports = __toCommonJS2(getSplitStyles_exports);
6866
- var import_react3 = __toESM2(require("react")), import_constants2 = require_index_native3(), import_helpers = require_index_native4(), import_config = require_config_native(), import_accessibilityDirectMap = require_accessibilityDirectMap_native(), import_constants22 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_useMedia = require_useMedia_native(), import_createMediaStyle = require_createMediaStyle_native(), import_expandStyles = require_expandStyles_native(), import_getGroupPropParts = require_getGroupPropParts_native(), import_getStylesAtomic = require_getStylesAtomic_native(), import_insertStyleRule = require_insertStyleRule_native(), import_log = require_log_native(), import_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_propMapper = require_propMapper_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_skipProps = require_skipProps_native(), import_transformsToString = require_transformsToString_native(), import_isActivePlatform = require_isActivePlatform_native(), import_sortString = require_sortString_native(), consoleGroupCollapsed = import_constants2.isWeb ? console.groupCollapsed : console.info, conf, PROP_SPLIT = "-";
6916
+ var import_constants2 = require_index_native3(), import_helpers = require_index_native4(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_accessibilityDirectMap = require_accessibilityDirectMap_native(), import_constants22 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_useMedia = require_useMedia_native(), import_createMediaStyle = require_createMediaStyle_native(), import_expandStyles = require_expandStyles_native(), import_getGroupPropParts = require_getGroupPropParts_native(), import_getStylesAtomic = require_getStylesAtomic_native(), import_insertStyleRule = require_insertStyleRule_native(), import_isActivePlatform = require_isActivePlatform_native(), import_isActiveTheme = require_isActiveTheme_native(), import_log = require_log_native(), import_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_propMapper = require_propMapper_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_skipProps = require_skipProps_native(), import_sortString = require_sortString_native(), import_transformsToString = require_transformsToString_native(), consoleGroupCollapsed = import_constants2.isWeb ? console.groupCollapsed : console.info, conf, PROP_SPLIT = "-";
6867
6917
  function isValidStyleKey(key, staticConfig) {
6868
6918
  var _staticConfig_accept, validStyleProps = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles);
6869
6919
  return validStyleProps[key] || ((_staticConfig_accept = staticConfig.accept) === null || _staticConfig_accept === void 0 ? void 0 : _staticConfig_accept[key]);
@@ -7005,7 +7055,7 @@ var require_getSplitStyles_native = __commonJS({
7005
7055
  try {
7006
7056
  for (var _iterator12 = mediaStyles[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = !0) {
7007
7057
  var style3 = _step12.value, property = style3[0];
7008
- if (!(property[0] === "$" && property.startsWith("$platform") && !(0, import_isActivePlatform.isActivePlatform)(property))) {
7058
+ if (!(property[0] === "$" && !(0, import_isActivePlatform.isActivePlatform)(property))) {
7009
7059
  var out = (0, import_createMediaStyle.createMediaStyle)(style3, mediaKeyShort, import_useMedia.mediaQueryConfig, isMedia, !1, priority);
7010
7060
  process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)("\u{1F4FA} media style:", out);
7011
7061
  var fullKey1 = `${style3[import_helpers.StyleObjectProperty]}${PROP_SPLIT}${mediaKeyShort}${style3[import_helpers.StyleObjectPseudo] || ""}`;
@@ -7034,9 +7084,7 @@ var require_getSplitStyles_native = __commonJS({
7034
7084
  }
7035
7085
  var mediaStyle1 = getSubStyle(styleState, key, val, !0), importanceBump = 0;
7036
7086
  if (isThemeMedia) {
7037
- dynamicThemeAccess = !0;
7038
- var mediaThemeName = mediaKeyShort.slice(6);
7039
- if (!(themeName === mediaThemeName || themeName.startsWith(mediaThemeName))) return "continue";
7087
+ if (dynamicThemeAccess = !0, !(themeName === mediaKeyShort || themeName.startsWith(mediaKeyShort))) return "continue";
7040
7088
  } else if (isGroupMedia) {
7041
7089
  var _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = context == null ? void 0 : context.groups.state[groupName];
7042
7090
  if (!groupContext) return process.env.NODE_ENV === "development" && debug && (0, import_log.log)(`No parent with group prop, skipping styles: ${groupName}`), "continue";
@@ -7067,7 +7115,7 @@ var require_getSplitStyles_native = __commonJS({
7067
7115
  continue;
7068
7116
  }
7069
7117
  if (subKey[0] === "$") {
7070
- if (!(0, import_isActivePlatform.isActivePlatform)(subKey)) continue;
7118
+ if (!(0, import_isActivePlatform.isActivePlatform)(subKey) || !(0, import_isActiveTheme.isActiveTheme)(subKey, themeName)) continue;
7071
7119
  for (var subSubKey in mediaStyle1[subKey]) mergeMediaStyle2(subSubKey, mediaStyle1[subKey][subSubKey]);
7072
7120
  } else mergeMediaStyle2(subKey, mediaStyle1[subKey]);
7073
7121
  }