@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.
package/dist/native.js CHANGED
@@ -1497,17 +1497,20 @@ var require_insertStyleRule_native = __commonJS({
1497
1497
  !0
1498
1498
  );
1499
1499
  }
1500
- let dedupedEntry = {
1501
- names: [],
1500
+ return {
1501
+ names: [
1502
+ ...new Set(
1503
+ selectors.map((selector) => {
1504
+ let parts = selector.replace(/(.t_|:root)/g, "").trim().split(" "), [first] = parts, scheme = first.includes("dark") ? "dark" : first.includes("light") ? "light" : "", name = (() => {
1505
+ let _ = parts[parts.length - 1];
1506
+ return scheme && _.startsWith(scheme) && (_ = _.slice(scheme.length + 1)), _;
1507
+ })();
1508
+ return `${scheme}${scheme && name ? "_" : ""}${name}`;
1509
+ })
1510
+ )
1511
+ ],
1502
1512
  theme: values
1503
1513
  };
1504
- for (let selector of selectors) {
1505
- 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);
1506
- name.startsWith(scheme) && (name = name.slice(scheme.length + 1)), scheme === name && (scheme = "");
1507
- let themeName = `${scheme}${scheme && name ? "_" : ""}${name}`;
1508
- dedupedEntry.names.includes(themeName) || dedupedEntry.names.push(themeName);
1509
- }
1510
- return dedupedEntry;
1511
1514
  }
1512
1515
  function getTamaguiSelector(rule, collectThemes = !1) {
1513
1516
  if (rule instanceof CSSStyleRule) {