@tamagui/core 1.85.5 → 1.85.6

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.
@@ -1462,17 +1462,20 @@ var require_insertStyleRule_native = __commonJS({
1462
1462
  !0
1463
1463
  );
1464
1464
  }
1465
- let dedupedEntry = {
1466
- names: [],
1465
+ return {
1466
+ names: [
1467
+ ...new Set(
1468
+ selectors.map((selector) => {
1469
+ let parts = selector.replace(/(.t_|:root)/g, "").trim().split(" "), [first] = parts, scheme = first.includes("dark") ? "dark" : first.includes("light") ? "light" : "", name = (() => {
1470
+ let _ = parts[parts.length - 1];
1471
+ return scheme && _.startsWith(scheme) && (_ = _.slice(scheme.length + 1)), _;
1472
+ })();
1473
+ return `${scheme}${scheme && name ? "_" : ""}${name}`;
1474
+ })
1475
+ )
1476
+ ],
1467
1477
  theme: values
1468
1478
  };
1469
- for (let selector of selectors) {
1470
- let di = selector.indexOf("t_dark"), li = selector.indexOf("t_light"), scheme = di && li ? di < li ? "dark" : "light" : "", name = selector.slice(selector.lastIndexOf(".t_") + 3);
1471
- name.startsWith(scheme) && (name = name.slice(scheme.length + 1)), scheme === name && (scheme = "");
1472
- let themeName = `${scheme}${scheme && name ? "_" : ""}${name}`;
1473
- dedupedEntry.names.includes(themeName) || dedupedEntry.names.push(themeName);
1474
- }
1475
- return dedupedEntry;
1476
1479
  }
1477
1480
  function getTamaguiSelector(rule, collectThemes = !1) {
1478
1481
  if (rule instanceof CSSStyleRule) {