@tamagui/core 1.101.3 → 1.101.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.
@@ -2476,42 +2476,31 @@ var require_insertStyleRule_native = __commonJS({
2476
2476
  function insertStyleRules(rulesToInsert) {
2477
2477
  if (!process.env.TAMAGUI_REACT_19) {
2478
2478
  if (!rulesToInsert.length || !sheet) return;
2479
- var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
2480
- try {
2481
- for (var _iterator = rulesToInsert[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
2482
- var styleObject = _step.value, identifier = styleObject[import_helpers.StyleObjectIdentifier];
2483
- if (shouldInsertStyleRules(identifier)) {
2484
- var rules = styleObject[import_helpers.StyleObjectRules];
2485
- allSelectors[identifier] = rules.join(`
2479
+ for (var key in rulesToInsert) {
2480
+ var styleObject = rulesToInsert[key], identifier = styleObject[import_helpers.StyleObjectIdentifier];
2481
+ if (shouldInsertStyleRules(identifier)) {
2482
+ var rules = styleObject[import_helpers.StyleObjectRules];
2483
+ allSelectors[identifier] = rules.join(`
2486
2484
  `), track(identifier), updateRules(identifier, rules);
2487
- var _iteratorNormalCompletion1 = !0, _didIteratorError1 = !1, _iteratorError1 = void 0;
2488
- try {
2489
- for (var _iterator1 = rules[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = !0) {
2490
- var rule = _step1.value;
2491
- if (0) try {
2492
- } catch (err) {
2493
- }
2494
- else sheet.insertRule(rule, sheet.cssRules.length);
2485
+ var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
2486
+ try {
2487
+ for (var _iterator = rules[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
2488
+ var rule = _step.value;
2489
+ if (0) try {
2490
+ } catch (err) {
2495
2491
  }
2496
- } catch (err) {
2497
- _didIteratorError1 = !0, _iteratorError1 = err;
2492
+ else sheet.insertRule(rule, sheet.cssRules.length);
2493
+ }
2494
+ } catch (err) {
2495
+ _didIteratorError = !0, _iteratorError = err;
2496
+ } finally {
2497
+ try {
2498
+ !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
2498
2499
  } finally {
2499
- try {
2500
- !_iteratorNormalCompletion1 && _iterator1.return != null && _iterator1.return();
2501
- } finally {
2502
- if (_didIteratorError1) throw _iteratorError1;
2503
- }
2500
+ if (_didIteratorError) throw _iteratorError;
2504
2501
  }
2505
2502
  }
2506
2503
  }
2507
- } catch (err) {
2508
- _didIteratorError = !0, _iteratorError = err;
2509
- } finally {
2510
- try {
2511
- !_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
2512
- } finally {
2513
- if (_didIteratorError) throw _iteratorError;
2514
- }
2515
2504
  }
2516
2505
  }
2517
2506
  }
@@ -4901,9 +4890,9 @@ var require_defaultOffset_native = __commonJS({
4901
4890
  }
4902
4891
  });
4903
4892
 
4904
- // ../../node_modules/@react-native/normalize-color/index.js
4893
+ // ../../../node_modules/@react-native/normalize-color/index.js
4905
4894
  var require_normalize_color = __commonJS({
4906
- "../../node_modules/@react-native/normalize-color/index.js"(exports2, module2) {
4895
+ "../../../node_modules/@react-native/normalize-color/index.js"(exports2, module2) {
4907
4896
  "use strict";
4908
4897
  function normalizeColor(color) {
4909
4898
  if (typeof color == "number")
@@ -8528,11 +8517,12 @@ var require_createComponent_native = __commonJS({
8528
8517
  var exv = exitVariant ?? enterExitVariant, env = enterVariant ?? enterExitVariant;
8529
8518
  state.unmounted && env && staticConfig.variants[env] ? props[env] = !0 : isExiting && exv && (props[exv] = exitVariant !== enterExitVariant);
8530
8519
  }
8531
- var shouldAvoidClasses = !!(!import_constants.isWeb || isAnimated && !supportsCSSVars || !staticConfig.acceptsClassName || // on server for SSR and animation compat added the && isHydrated but perhaps we want
8532
- // disableClassName="until-hydrated" to be more straightforward
8533
- // see issue if not, Button sets disableClassName to true <Button animation="" /> with
8534
- // the react-native driver errors because it tries to animate var(--color) to rbga(..)
8535
- props.disableClassName && isHydrated), groupName = props.group;
8520
+ var shouldAvoidClasses = !import_constants.isWeb;
8521
+ if (import_constants.isWeb) {
8522
+ var disableClassName = props.disableClassName, isAnimatedAndHydrated = isAnimated && !supportsCSSVars && didHydrateOnce && !import_constants.isServer, isDisabledManually = disableClassName && !import_constants.isServer && didHydrateOnce && state.unmounted === !0;
8523
+ (isAnimatedAndHydrated || isDisabledManually) && (shouldAvoidClasses = !0);
8524
+ }
8525
+ var groupName = props.group;
8536
8526
  if (groupName && !curStateRef.group) {
8537
8527
  var listeners = /* @__PURE__ */ new Set();
8538
8528
  curStateRef.group = {
@@ -8875,23 +8865,27 @@ var require_createComponent_native = __commonJS({
8875
8865
  children: content
8876
8866
  }));
8877
8867
  }
8878
- if (process.env.TAMAGUI_REACT_19 && splitStyles.rulesToInsert.length && (content = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
8879
- children: [
8880
- content,
8881
- /* lets see if we can put a single style tag per rule for optimal de-duping */
8882
- splitStyles.rulesToInsert.map(function(styleObject) {
8883
- var identifier = styleObject[import_helpers.StyleObjectIdentifier];
8884
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("style", {
8885
- // @ts-ignore
8886
- href: "t_".concat(identifier),
8887
- // @ts-ignore
8888
- precedence: "default",
8889
- children: styleObject[import_helpers.StyleObjectRules].join(`
8868
+ if (process.env.TAMAGUI_REACT_19) {
8869
+ var rulesToInsert = splitStyles.rulesToInsert, keys = Object.keys(splitStyles.rulesToInsert);
8870
+ keys.length && (content = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_jsx_runtime.Fragment, {
8871
+ children: [
8872
+ content,
8873
+ /* lets see if we can put a single style tag per rule for optimal de-duping */
8874
+ keys.map(function(key3) {
8875
+ var styleObject = rulesToInsert[key3], identifier = styleObject[import_helpers.StyleObjectIdentifier];
8876
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("style", {
8877
+ // @ts-ignore
8878
+ href: "t_".concat(identifier),
8879
+ // @ts-ignore
8880
+ precedence: "default",
8881
+ children: styleObject[import_helpers.StyleObjectRules].join(`
8890
8882
  `)
8891
- }, identifier);
8892
- })
8893
- ]
8894
- })), !1) {
8883
+ }, identifier);
8884
+ })
8885
+ ]
8886
+ }));
8887
+ }
8888
+ if (0) {
8895
8889
  var element1, title;
8896
8890
  if (import_constants.isWeb)
8897
8891
  try {
@@ -8970,10 +8964,10 @@ var require_createComponent_native = __commonJS({
8970
8964
  }
8971
8965
  });
8972
8966
  function spacedChildren(props) {
8973
- var _childrenList__type, _childrenList_, isZStack = props.isZStack, children = props.children, space = props.space, direction = props.direction, spaceFlex = props.spaceFlex, separator = props.separator, hasSpace = !!(space || spaceFlex), hasSeparator = separator != null;
8974
- if (!(hasSpace || hasSeparator || isZStack)) return children;
8975
- var childrenList = import_react3.Children.toArray(children), len = childrenList.length;
8976
- if (len <= 1 && !isZStack && !(!((_childrenList_ = childrenList[0]) === null || _childrenList_ === void 0 || (_childrenList__type = _childrenList_.type) === null || _childrenList__type === void 0) && _childrenList__type.shouldForwardSpace)) return childrenList;
8967
+ var _childrenList__type, _childrenList_, isZStack = props.isZStack, children = props.children, space = props.space, direction = props.direction, spaceFlex = props.spaceFlex, separator = props.separator, ensureKeys = props.ensureKeys, hasSpace = !!(space || spaceFlex), hasSeparator = separator != null, areChildrenArray = Array.isArray(children);
8968
+ if (!ensureKeys && !(hasSpace || hasSeparator || isZStack)) return children;
8969
+ var childrenList = areChildrenArray ? children : import_react3.Children.toArray(children), len = childrenList.length;
8970
+ if (len <= 1 && !isZStack && !(!((_childrenList_ = childrenList[0]) === null || _childrenList_ === void 0 || (_childrenList__type = _childrenList_.type) === null || _childrenList__type === void 0) && _childrenList__type.shouldForwardSpace)) return children;
8977
8971
  var final = [], _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
8978
8972
  try {
8979
8973
  for (var _iterator = childrenList.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
@@ -8987,22 +8981,22 @@ var require_createComponent_native = __commonJS({
8987
8981
  children: isZStack ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(AbsoluteFill, {
8988
8982
  children: child
8989
8983
  }) : child
8990
- }, index)), !(isUnspaced(child) && index === 0) && !isZStack) {
8984
+ }, "".concat(index, "0t"))), !(isUnspaced(child) && index === 0) && !isZStack) {
8991
8985
  var next = childrenList[index + 1];
8992
- next && !isUnspaced(next) && (separator ? (hasSpace && final.push(createSpacer({
8993
- key: "_".concat(index, "_00tmgui"),
8986
+ next && !isEmpty && !isUnspaced(next) && (separator ? (hasSpace && final.push(createSpacer({
8987
+ key: "_".concat(index, "_00t"),
8994
8988
  direction,
8995
8989
  space,
8996
8990
  spaceFlex
8997
- })), final.push(/* @__PURE__ */ import_react3.default.isValidElement(separator) ? /* @__PURE__ */ import_react3.default.cloneElement(separator, {
8998
- key: "sep_".concat(index)
8999
- }) : separator), hasSpace && final.push(createSpacer({
9000
- key: "_".concat(index, "01tmgui"),
8991
+ })), final.push(/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react3.Fragment, {
8992
+ children: separator
8993
+ }, "".concat(index, "03t"))), hasSpace && final.push(createSpacer({
8994
+ key: "_".concat(index, "01t"),
9001
8995
  direction,
9002
8996
  space,
9003
8997
  spaceFlex
9004
8998
  }))) : final.push(createSpacer({
9005
- key: "_".concat(index, "02tmgui"),
8999
+ key: "_".concat(index, "02t"),
9006
9000
  direction,
9007
9001
  space,
9008
9002
  spaceFlex
@@ -12155,9 +12149,9 @@ var require_index_native9 = __commonJS({
12155
12149
  }
12156
12150
  });
12157
12151
 
12158
- // ../fake-react-native/index.js
12152
+ // ../../packages/fake-react-native/index.js
12159
12153
  var require_fake_react_native = __commonJS({
12160
- "../fake-react-native/index.js"(exports2, module2) {
12154
+ "../../packages/fake-react-native/index.js"(exports2, module2) {
12161
12155
  module2.exports = proxyWorm();
12162
12156
  function proxyWorm() {
12163
12157
  return new Proxy({
@@ -12191,7 +12185,7 @@ var require_fake_react_native = __commonJS({
12191
12185
  }
12192
12186
  });
12193
12187
 
12194
- // ../fake-react-native/idFn.js
12188
+ // ../../packages/fake-react-native/idFn.js
12195
12189
  var idFn_exports = {};
12196
12190
  __export(idFn_exports, {
12197
12191
  default: () => idFn_default
@@ -12200,7 +12194,7 @@ function idFn_default(_) {
12200
12194
  return _;
12201
12195
  }
12202
12196
  var init_idFn = __esm({
12203
- "../fake-react-native/idFn.js"() {
12197
+ "../../packages/fake-react-native/idFn.js"() {
12204
12198
  }
12205
12199
  });
12206
12200