tamagui 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.
package/dist/native.js CHANGED
@@ -826,9 +826,10 @@ var require_index_native5 = __commonJS({
826
826
  }
827
827
  });
828
828
  module2.exports = __toCommonJS2(src_exports2);
829
- var cache = /* @__PURE__ */ new Map(), simpleHash = function(str) {
829
+ var cache = /* @__PURE__ */ new Map(), cacheSize = 0, simpleHash = function(strIn) {
830
830
  var hashMin = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 10;
831
- if (cache.has(str)) return cache.get(str);
831
+ if (cache.has(strIn)) return cache.get(strIn);
832
+ var str = strIn;
832
833
  str[0] === "v" && str.startsWith("var(") && (str = str.slice(6, str.length - 1));
833
834
  for (var hash = 0, valids = "", added = 0, len = str.length, i = 0; i < len; i++) {
834
835
  if (hashMin !== "strict" && added <= hashMin) {
@@ -845,7 +846,7 @@ var require_index_native5 = __commonJS({
845
846
  hash = hashChar(hash, str[i]);
846
847
  }
847
848
  var res = valids + (hash ? Math.abs(hash) : "");
848
- return cache.size > 1e4 && cache.clear(), cache.set(str, res), res;
849
+ return cacheSize > 1e4 && (cache.clear(), cacheSize = 0), cache.set(strIn, res), cacheSize++, res;
849
850
  }, hashChar = function(hash, c) {
850
851
  return Math.imul(31, hash) + c.charCodeAt(0) | 0;
851
852
  };