tamagui 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
@@ -5665,6 +5665,111 @@ var require_getStylesAtomic_native = __commonJS({
5665
5665
  }
5666
5666
  });
5667
5667
 
5668
+ // ../../core/web/dist/cjs/helpers/isActivePlatform.native.js
5669
+ var require_isActivePlatform_native = __commonJS({
5670
+ "../../core/web/dist/cjs/helpers/isActivePlatform.native.js"(exports2, module2) {
5671
+ "use strict";
5672
+ var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
5673
+ for (var name in all) __defProp2(target, name, {
5674
+ get: all[name],
5675
+ enumerable: !0
5676
+ });
5677
+ }, __copyProps2 = function(to, from, except, desc) {
5678
+ var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
5679
+ if (from && typeof from == "object" || typeof from == "function") try {
5680
+ for (var _loop = function() {
5681
+ var key = _step.value;
5682
+ !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
5683
+ get: function() {
5684
+ return from[key];
5685
+ },
5686
+ enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
5687
+ });
5688
+ }, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
5689
+ } catch (err) {
5690
+ _didIteratorError = !0, _iteratorError = err;
5691
+ } finally {
5692
+ try {
5693
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
5694
+ } finally {
5695
+ if (_didIteratorError)
5696
+ throw _iteratorError;
5697
+ }
5698
+ }
5699
+ return to;
5700
+ }, __toCommonJS2 = function(mod) {
5701
+ return __copyProps2(__defProp2({}, "__esModule", {
5702
+ value: !0
5703
+ }), mod);
5704
+ }, isActivePlatform_exports = {};
5705
+ __export2(isActivePlatform_exports, {
5706
+ isActivePlatform: function() {
5707
+ return isActivePlatform;
5708
+ }
5709
+ });
5710
+ module2.exports = __toCommonJS2(isActivePlatform_exports);
5711
+ var import_constants4 = require_index_native6();
5712
+ function isActivePlatform(key) {
5713
+ if (!key.startsWith("$platform")) return !0;
5714
+ var platform2 = key.slice(10);
5715
+ return (
5716
+ // web, ios, android
5717
+ platform2 === import_constants4.currentPlatform || // web, native
5718
+ platform2 === "native"
5719
+ );
5720
+ }
5721
+ }
5722
+ });
5723
+
5724
+ // ../../core/web/dist/cjs/helpers/isActiveTheme.native.js
5725
+ var require_isActiveTheme_native = __commonJS({
5726
+ "../../core/web/dist/cjs/helpers/isActiveTheme.native.js"(exports2, module2) {
5727
+ "use strict";
5728
+ var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
5729
+ for (var name in all) __defProp2(target, name, {
5730
+ get: all[name],
5731
+ enumerable: !0
5732
+ });
5733
+ }, __copyProps2 = function(to, from, except, desc) {
5734
+ var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
5735
+ if (from && typeof from == "object" || typeof from == "function") try {
5736
+ for (var _loop = function() {
5737
+ var key = _step.value;
5738
+ !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
5739
+ get: function() {
5740
+ return from[key];
5741
+ },
5742
+ enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
5743
+ });
5744
+ }, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
5745
+ } catch (err) {
5746
+ _didIteratorError = !0, _iteratorError = err;
5747
+ } finally {
5748
+ try {
5749
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
5750
+ } finally {
5751
+ if (_didIteratorError)
5752
+ throw _iteratorError;
5753
+ }
5754
+ }
5755
+ return to;
5756
+ }, __toCommonJS2 = function(mod) {
5757
+ return __copyProps2(__defProp2({}, "__esModule", {
5758
+ value: !0
5759
+ }), mod);
5760
+ }, isActiveTheme_exports = {};
5761
+ __export2(isActiveTheme_exports, {
5762
+ isActiveTheme: function() {
5763
+ return isActiveTheme;
5764
+ }
5765
+ });
5766
+ module2.exports = __toCommonJS2(isActiveTheme_exports);
5767
+ function isActiveTheme(key, activeThemeName) {
5768
+ if (key.startsWith("$theme-")) return key.slice(7).startsWith(activeThemeName);
5769
+ }
5770
+ }
5771
+ });
5772
+
5668
5773
  // ../../core/web/dist/cjs/helpers/log.native.js
5669
5774
  var require_log_native = __commonJS({
5670
5775
  "../../core/web/dist/cjs/helpers/log.native.js"(exports2, module2) {
@@ -6779,9 +6884,9 @@ var require_propMapper_native = __commonJS({
6779
6884
  }
6780
6885
  });
6781
6886
 
6782
- // ../../core/web/dist/cjs/helpers/transformsToString.native.js
6783
- var require_transformsToString_native = __commonJS({
6784
- "../../core/web/dist/cjs/helpers/transformsToString.native.js"(exports2, module2) {
6887
+ // ../../core/web/dist/cjs/helpers/sortString.native.js
6888
+ var require_sortString_native = __commonJS({
6889
+ "../../core/web/dist/cjs/helpers/sortString.native.js"(exports2, module2) {
6785
6890
  "use strict";
6786
6891
  var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
6787
6892
  for (var name in all) __defProp2(target, name, {
@@ -6815,31 +6920,22 @@ var require_transformsToString_native = __commonJS({
6815
6920
  return __copyProps2(__defProp2({}, "__esModule", {
6816
6921
  value: !0
6817
6922
  }), mod);
6818
- }, transformsToString_exports = {};
6819
- __export2(transformsToString_exports, {
6820
- transformsToString: function() {
6821
- return transformsToString;
6923
+ }, sortString_exports = {};
6924
+ __export2(sortString_exports, {
6925
+ sortString: function() {
6926
+ return sortString;
6822
6927
  }
6823
6928
  });
6824
- module2.exports = __toCommonJS2(transformsToString_exports);
6825
- var import_normalizeValueWithProperty = require_normalizeValueWithProperty_native();
6826
- function transformsToString(transforms) {
6827
- return transforms.map(
6828
- // { scale: 2 } => 'scale(2)'
6829
- // { translateX: 20 } => 'translateX(20px)'
6830
- // { matrix: [1,2,3,4,5,6] } => 'matrix(1,2,3,4,5,6)'
6831
- function(transform) {
6832
- var type = Object.keys(transform)[0], value = transform[type];
6833
- return type === "matrix" || type === "matrix3d" ? `${type}(${value.join(",")})` : `${type}(${(0, import_normalizeValueWithProperty.normalizeValueWithProperty)(value, type)})`;
6834
- }
6835
- ).join(" ");
6836
- }
6929
+ module2.exports = __toCommonJS2(sortString_exports);
6930
+ var sortString = function(a, b) {
6931
+ return a < b ? -1 : a > b ? 1 : 0;
6932
+ };
6837
6933
  }
6838
6934
  });
6839
6935
 
6840
- // ../../core/web/dist/cjs/helpers/isActivePlatform.native.js
6841
- var require_isActivePlatform_native = __commonJS({
6842
- "../../core/web/dist/cjs/helpers/isActivePlatform.native.js"(exports2, module2) {
6936
+ // ../../core/web/dist/cjs/helpers/transformsToString.native.js
6937
+ var require_transformsToString_native = __commonJS({
6938
+ "../../core/web/dist/cjs/helpers/transformsToString.native.js"(exports2, module2) {
6843
6939
  "use strict";
6844
6940
  var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
6845
6941
  for (var name in all) __defProp2(target, name, {
@@ -6873,71 +6969,25 @@ var require_isActivePlatform_native = __commonJS({
6873
6969
  return __copyProps2(__defProp2({}, "__esModule", {
6874
6970
  value: !0
6875
6971
  }), mod);
6876
- }, isActivePlatform_exports = {};
6877
- __export2(isActivePlatform_exports, {
6878
- isActivePlatform: function() {
6879
- return isActivePlatform;
6972
+ }, transformsToString_exports = {};
6973
+ __export2(transformsToString_exports, {
6974
+ transformsToString: function() {
6975
+ return transformsToString;
6880
6976
  }
6881
6977
  });
6882
- module2.exports = __toCommonJS2(isActivePlatform_exports);
6883
- var import_constants4 = require_index_native6();
6884
- function isActivePlatform(key) {
6885
- var platform2 = key.slice(10);
6886
- return (
6887
- // web, ios, android
6888
- platform2 === import_constants4.currentPlatform || // web, native
6889
- platform2 === "native"
6890
- );
6891
- }
6892
- }
6893
- });
6894
-
6895
- // ../../core/web/dist/cjs/helpers/sortString.native.js
6896
- var require_sortString_native = __commonJS({
6897
- "../../core/web/dist/cjs/helpers/sortString.native.js"(exports2, module2) {
6898
- "use strict";
6899
- var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
6900
- for (var name in all) __defProp2(target, name, {
6901
- get: all[name],
6902
- enumerable: !0
6903
- });
6904
- }, __copyProps2 = function(to, from, except, desc) {
6905
- var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
6906
- if (from && typeof from == "object" || typeof from == "function") try {
6907
- for (var _loop = function() {
6908
- var key = _step.value;
6909
- !__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
6910
- get: function() {
6911
- return from[key];
6912
- },
6913
- enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
6914
- });
6915
- }, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
6916
- } catch (err) {
6917
- _didIteratorError = !0, _iteratorError = err;
6918
- } finally {
6919
- try {
6920
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
6921
- } finally {
6922
- if (_didIteratorError)
6923
- throw _iteratorError;
6978
+ module2.exports = __toCommonJS2(transformsToString_exports);
6979
+ var import_normalizeValueWithProperty = require_normalizeValueWithProperty_native();
6980
+ function transformsToString(transforms) {
6981
+ return transforms.map(
6982
+ // { scale: 2 } => 'scale(2)'
6983
+ // { translateX: 20 } => 'translateX(20px)'
6984
+ // { matrix: [1,2,3,4,5,6] } => 'matrix(1,2,3,4,5,6)'
6985
+ function(transform) {
6986
+ var type = Object.keys(transform)[0], value = transform[type];
6987
+ return type === "matrix" || type === "matrix3d" ? `${type}(${value.join(",")})` : `${type}(${(0, import_normalizeValueWithProperty.normalizeValueWithProperty)(value, type)})`;
6924
6988
  }
6925
- }
6926
- return to;
6927
- }, __toCommonJS2 = function(mod) {
6928
- return __copyProps2(__defProp2({}, "__esModule", {
6929
- value: !0
6930
- }), mod);
6931
- }, sortString_exports = {};
6932
- __export2(sortString_exports, {
6933
- sortString: function() {
6934
- return sortString;
6935
- }
6936
- });
6937
- module2.exports = __toCommonJS2(sortString_exports);
6938
- var sortString = function(a, b) {
6939
- return a < b ? -1 : a > b ? 1 : 0;
6940
- };
6989
+ ).join(" ");
6990
+ }
6941
6991
  }
6942
6992
  });
6943
6993
 
@@ -7005,7 +7055,7 @@ var require_getSplitStyles_native = __commonJS({
7005
7055
  }
7006
7056
  });
7007
7057
  module2.exports = __toCommonJS2(getSplitStyles_exports);
7008
- var import_react3 = __toESM2(require("react")), import_constants4 = require_index_native6(), import_helpers = require_index_native7(), 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_constants4.isWeb ? console.groupCollapsed : console.info, conf, PROP_SPLIT = "-";
7058
+ var import_constants4 = require_index_native6(), import_helpers = require_index_native7(), 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_constants4.isWeb ? console.groupCollapsed : console.info, conf, PROP_SPLIT = "-";
7009
7059
  function isValidStyleKey(key, staticConfig) {
7010
7060
  var _staticConfig_accept, validStyleProps = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles);
7011
7061
  return validStyleProps[key] || ((_staticConfig_accept = staticConfig.accept) === null || _staticConfig_accept === void 0 ? void 0 : _staticConfig_accept[key]);
@@ -7147,7 +7197,7 @@ var require_getSplitStyles_native = __commonJS({
7147
7197
  try {
7148
7198
  for (var _iterator12 = mediaStyles[Symbol.iterator](), _step12; !(_iteratorNormalCompletion12 = (_step12 = _iterator12.next()).done); _iteratorNormalCompletion12 = !0) {
7149
7199
  var style3 = _step12.value, property = style3[0];
7150
- if (!(property[0] === "$" && property.startsWith("$platform") && !(0, import_isActivePlatform.isActivePlatform)(property))) {
7200
+ if (!(property[0] === "$" && !(0, import_isActivePlatform.isActivePlatform)(property))) {
7151
7201
  var out = (0, import_createMediaStyle.createMediaStyle)(style3, mediaKeyShort, import_useMedia.mediaQueryConfig, isMedia, !1, priority);
7152
7202
  process.env.NODE_ENV === "development" && debug === "verbose" && (0, import_log.log)("\u{1F4FA} media style:", out);
7153
7203
  var fullKey1 = `${style3[import_helpers.StyleObjectProperty]}${PROP_SPLIT}${mediaKeyShort}${style3[import_helpers.StyleObjectPseudo] || ""}`;
@@ -7176,9 +7226,7 @@ var require_getSplitStyles_native = __commonJS({
7176
7226
  }
7177
7227
  var mediaStyle1 = getSubStyle(styleState, key, val, !0), importanceBump = 0;
7178
7228
  if (isThemeMedia) {
7179
- dynamicThemeAccess = !0;
7180
- var mediaThemeName = mediaKeyShort.slice(6);
7181
- if (!(themeName === mediaThemeName || themeName.startsWith(mediaThemeName))) return "continue";
7229
+ if (dynamicThemeAccess = !0, !(themeName === mediaKeyShort || themeName.startsWith(mediaKeyShort))) return "continue";
7182
7230
  } else if (isGroupMedia) {
7183
7231
  var _componentState_group, groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = context == null ? void 0 : context.groups.state[groupName];
7184
7232
  if (!groupContext) return process.env.NODE_ENV === "development" && debug && (0, import_log.log)(`No parent with group prop, skipping styles: ${groupName}`), "continue";
@@ -7209,7 +7257,7 @@ var require_getSplitStyles_native = __commonJS({
7209
7257
  continue;
7210
7258
  }
7211
7259
  if (subKey[0] === "$") {
7212
- if (!(0, import_isActivePlatform.isActivePlatform)(subKey)) continue;
7260
+ if (!(0, import_isActivePlatform.isActivePlatform)(subKey) || !(0, import_isActiveTheme.isActiveTheme)(subKey, themeName)) continue;
7213
7261
  for (var subSubKey in mediaStyle1[subKey]) mergeMediaStyle2(subSubKey, mediaStyle1[subKey][subSubKey]);
7214
7262
  } else mergeMediaStyle2(subKey, mediaStyle1[subKey]);
7215
7263
  }
@@ -15479,19 +15527,13 @@ var require_Accordion_native = __commonJS({
15479
15527
  ref: forwardedRef
15480
15528
  });
15481
15529
  }), HeightAnimator = import_web.View.styleable(function(props, ref) {
15482
- var itemContext = useAccordionItemContext(), { children, ...rest } = props, [height, setHeight] = React4.useState(0);
15483
- React4.useEffect(function() {
15484
- itemContext.open || setHeight(0);
15485
- }, [
15486
- itemContext.open
15487
- ]);
15488
- var onLayout = (0, import_web.useEvent)(function(param) {
15530
+ var itemContext = useAccordionItemContext(), { children, ...rest } = props, [height, setHeight] = React4.useState(0), onLayout = (0, import_web.useEvent)(function(param) {
15489
15531
  var { nativeEvent } = param;
15490
15532
  nativeEvent.layout.height && setHeight(nativeEvent.layout.height);
15491
15533
  });
15492
15534
  return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_web.View, {
15493
15535
  ref,
15494
- height,
15536
+ height: itemContext.open ? height : 0,
15495
15537
  ...rest,
15496
15538
  children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_web.View, {
15497
15539
  position: "absolute",
@@ -16274,11 +16316,9 @@ var require_GorhomPortal_native = __commonJS({
16274
16316
  }
16275
16317
  });
16276
16318
  module2.exports = __toCommonJS2(GorhomPortal_exports);
16277
- var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native6(), import_core12 = require_index_native17(), import_react3 = __toESM2(require("react")), import_start_transition = require_index_native9(), ACTIONS;
16278
- (function(ACTIONS2) {
16279
- ACTIONS2[ACTIONS2.REGISTER_HOST = 0] = "REGISTER_HOST", ACTIONS2[ACTIONS2.DEREGISTER_HOST = 1] = "DEREGISTER_HOST", ACTIONS2[ACTIONS2.ADD_UPDATE_PORTAL = 2] = "ADD_UPDATE_PORTAL", ACTIONS2[ACTIONS2.REMOVE_PORTAL = 3] = "REMOVE_PORTAL";
16280
- })(ACTIONS || (ACTIONS = {}));
16281
- var INITIAL_STATE = {}, registerHost = function(state, hostName) {
16319
+ var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native6(), import_core12 = require_index_native17(), import_react3 = __toESM2(require("react")), import_start_transition = require_index_native9(), ACTIONS = /* @__PURE__ */ function(ACTIONS2) {
16320
+ return ACTIONS2[ACTIONS2.REGISTER_HOST = 0] = "REGISTER_HOST", ACTIONS2[ACTIONS2.DEREGISTER_HOST = 1] = "DEREGISTER_HOST", ACTIONS2[ACTIONS2.ADD_UPDATE_PORTAL = 2] = "ADD_UPDATE_PORTAL", ACTIONS2[ACTIONS2.REMOVE_PORTAL = 3] = "REMOVE_PORTAL", ACTIONS2;
16321
+ }(ACTIONS || {}), INITIAL_STATE = {}, registerHost = function(state, hostName) {
16282
16322
  return hostName in state || (state[hostName] = []), state;
16283
16323
  }, deregisterHost = function(state, hostName) {
16284
16324
  return delete state[hostName], state;