@tamagui/core 1.112.8 → 1.112.9

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.
@@ -1023,9 +1023,10 @@ var require_index_native2 = __commonJS({
1023
1023
  }
1024
1024
  });
1025
1025
  module2.exports = __toCommonJS2(src_exports2);
1026
- var cache2 = /* @__PURE__ */ new Map(), simpleHash = function(str) {
1026
+ var cache2 = /* @__PURE__ */ new Map(), cacheSize = 0, simpleHash = function(strIn) {
1027
1027
  var hashMin = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 10;
1028
- if (cache2.has(str)) return cache2.get(str);
1028
+ if (cache2.has(strIn)) return cache2.get(strIn);
1029
+ var str = strIn;
1029
1030
  str[0] === "v" && str.startsWith("var(") && (str = str.slice(6, str.length - 1));
1030
1031
  for (var hash = 0, valids = "", added = 0, len = str.length, i = 0; i < len; i++) {
1031
1032
  if (hashMin !== "strict" && added <= hashMin) {
@@ -1042,7 +1043,7 @@ var require_index_native2 = __commonJS({
1042
1043
  hash = hashChar(hash, str[i]);
1043
1044
  }
1044
1045
  var res = valids + (hash ? Math.abs(hash) : "");
1045
- return cache2.size > 1e4 && cache2.clear(), cache2.set(str, res), res;
1046
+ return cacheSize > 1e4 && (cache2.clear(), cacheSize = 0), cache2.set(strIn, res), cacheSize++, res;
1046
1047
  }, hashChar = function(hash, c) {
1047
1048
  return Math.imul(31, hash) + c.charCodeAt(0) | 0;
1048
1049
  };