tamagui 1.85.7 → 1.85.8
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 +23 -24
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +19 -22
- package/dist/test.native.js.map +2 -2
- package/package.json +52 -52
package/dist/test.native.js
CHANGED
|
@@ -1304,7 +1304,7 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
1304
1304
|
}
|
|
1305
1305
|
return scannedCache.set(sheet2, cacheKey), dedupedThemes;
|
|
1306
1306
|
}
|
|
1307
|
-
var colorVarToVal, rootComputedStyle = null
|
|
1307
|
+
var colorVarToVal, rootComputedStyle = null;
|
|
1308
1308
|
function addThemesFromCSS(cssStyleRule, tokens) {
|
|
1309
1309
|
let selectors = cssStyleRule.selectorText.split(",");
|
|
1310
1310
|
if (!selectors.length)
|
|
@@ -1322,7 +1322,7 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
1322
1322
|
if (sepI === -1)
|
|
1323
1323
|
continue;
|
|
1324
1324
|
let key = rule.slice(rule.indexOf("--") + 2, sepI), val = rule.slice(sepI + 2), value;
|
|
1325
|
-
if (val
|
|
1325
|
+
if (val.startsWith("var(")) {
|
|
1326
1326
|
let varName = val.slice(6, -1), tokenVal = colorVarToVal[varName];
|
|
1327
1327
|
tokenVal ? value = tokenVal : (rootComputedStyle ||= getComputedStyle(document.body), value = rootComputedStyle.getPropertyValue("--" + varName));
|
|
1328
1328
|
} else
|
|
@@ -1336,20 +1336,17 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
1336
1336
|
!0
|
|
1337
1337
|
);
|
|
1338
1338
|
}
|
|
1339
|
-
|
|
1340
|
-
names: [
|
|
1341
|
-
...new Set(
|
|
1342
|
-
selectors.map((selector) => {
|
|
1343
|
-
let parts = selector.replace(/(.t_|:root)/g, "").trim().split(" "), secondToLast = parts[parts.length - 2] || "", scheme = secondToLast.includes("dark") ? "dark" : secondToLast.includes("light") ? "light" : "", name = (() => {
|
|
1344
|
-
let _ = parts[parts.length - 1];
|
|
1345
|
-
return scheme && _.startsWith(scheme) && (_ = _.slice(scheme.length + 1)), _;
|
|
1346
|
-
})();
|
|
1347
|
-
return scheme === name || schemes[name] ? scheme : `${scheme}${scheme && name ? "_" : ""}${name}`;
|
|
1348
|
-
})
|
|
1349
|
-
)
|
|
1350
|
-
],
|
|
1339
|
+
let dedupedEntry = {
|
|
1340
|
+
names: [],
|
|
1351
1341
|
theme: values
|
|
1352
1342
|
};
|
|
1343
|
+
for (let selector of selectors) {
|
|
1344
|
+
let scheme = selector.includes("t_dark") ? "dark" : selector.includes("t_light") ? "light" : "", name = selector.slice(selector.lastIndexOf(".t_") + 3);
|
|
1345
|
+
name.startsWith(scheme) && (name = name.slice(scheme.length + 1)), scheme === name && (scheme = "");
|
|
1346
|
+
let themeName = `${scheme}${scheme && name ? "_" : ""}${name}`;
|
|
1347
|
+
dedupedEntry.names.includes(themeName) || dedupedEntry.names.push(themeName);
|
|
1348
|
+
}
|
|
1349
|
+
return dedupedEntry;
|
|
1353
1350
|
}
|
|
1354
1351
|
function getTamaguiSelector(rule, collectThemes = !1) {
|
|
1355
1352
|
if (rule instanceof CSSStyleRule) {
|
|
@@ -14580,7 +14577,7 @@ var require_Popper_native = __commonJS({
|
|
|
14580
14577
|
usePopperContext: () => usePopperContext
|
|
14581
14578
|
});
|
|
14582
14579
|
module2.exports = __toCommonJS2(Popper_exports);
|
|
14583
|
-
var import_compose_refs = require_index_native10(), import_constants4 = require_index_native(),
|
|
14580
|
+
var import_compose_refs = require_index_native10(), import_constants4 = require_index_native(), import_core13 = require_index_native15(), import_floating = require_index_native53(), import_get_token2 = require_index_native17(), import_stacks3 = require_index_native19(), React2 = __toESM2(require("react")), import_react_native4 = require("react-native"), import_jsx_runtime6 = require("react/jsx-runtime"), PopperContext = (0, import_core13.createStyledContext)({}), { useStyledContext: usePopperContext, Provider: PopperProvider } = PopperContext;
|
|
14584
14581
|
function Popper(props) {
|
|
14585
14582
|
let {
|
|
14586
14583
|
children,
|
|
@@ -14592,7 +14589,7 @@ var require_Popper_native = __commonJS({
|
|
|
14592
14589
|
offset: offset2,
|
|
14593
14590
|
__scopePopper
|
|
14594
14591
|
} = props, [isMounted, setIsMounted] = React2.useState(!1);
|
|
14595
|
-
(0,
|
|
14592
|
+
(0, import_constants4.useIsomorphicLayoutEffect)(() => {
|
|
14596
14593
|
setIsMounted(!0);
|
|
14597
14594
|
}, []);
|
|
14598
14595
|
let [anchorRef, setAnchorRef] = React2.useState(), [arrowEl, setArrow] = React2.useState(null), [arrowSize, setArrowSize] = React2.useState(0), offsetOptions = offset2 ?? arrowSize, floating = (0, import_floating.useFloating)({
|
|
@@ -14612,10 +14609,10 @@ var require_Popper_native = __commonJS({
|
|
|
14612
14609
|
// @ts-expect-error this comes from Tooltip for example
|
|
14613
14610
|
open
|
|
14614
14611
|
} = floating;
|
|
14615
|
-
if ((0,
|
|
14612
|
+
if ((0, import_constants4.useIsomorphicLayoutEffect)(() => {
|
|
14616
14613
|
floating.refs.setReference(anchorRef);
|
|
14617
14614
|
}, [anchorRef]), import_constants4.isWeb)
|
|
14618
|
-
(0,
|
|
14615
|
+
(0, import_constants4.useIsomorphicLayoutEffect)(() => {
|
|
14619
14616
|
if (open && refs.reference.current && refs.floating.current)
|
|
14620
14617
|
return (0, import_floating.autoUpdate)(refs.reference.current, refs.floating.current, floating.update);
|
|
14621
14618
|
}, [open, floating.update, refs.floating, refs.reference]);
|
|
@@ -14630,7 +14627,7 @@ var require_Popper_native = __commonJS({
|
|
|
14630
14627
|
return () => {
|
|
14631
14628
|
showSubscription.remove(), hideSubscription.remove();
|
|
14632
14629
|
};
|
|
14633
|
-
}, []), (0,
|
|
14630
|
+
}, []), (0, import_constants4.useIsomorphicLayoutEffect)(() => {
|
|
14634
14631
|
floating.update();
|
|
14635
14632
|
}, [dimensions, keyboardOpen]);
|
|
14636
14633
|
}
|
|
@@ -14701,7 +14698,7 @@ var require_Popper_native = __commonJS({
|
|
|
14701
14698
|
), [placement, strategy, props]), [hasInitialPosition, setHasInitialPosition] = React2.useState(!0);
|
|
14702
14699
|
if (React2.useEffect(() => {
|
|
14703
14700
|
(x || y) && setHasInitialPosition(!1);
|
|
14704
|
-
}, [x, y]), (0,
|
|
14701
|
+
}, [x, y]), (0, import_constants4.useIsomorphicLayoutEffect)(() => {
|
|
14705
14702
|
isMounted && update();
|
|
14706
14703
|
}, [isMounted]), !isMounted)
|
|
14707
14704
|
return null;
|
|
@@ -14720,7 +14717,7 @@ var require_Popper_native = __commonJS({
|
|
|
14720
14717
|
animateOnly: rest.animateOnly
|
|
14721
14718
|
}
|
|
14722
14719
|
};
|
|
14723
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
14720
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core13.Stack, { ...getFloatingProps ? getFloatingProps(frameProps) : frameProps, children: contents });
|
|
14724
14721
|
}), PopperArrowFrame = (0, import_core13.styled)(import_stacks3.YStack, {
|
|
14725
14722
|
name: "PopperArrow",
|
|
14726
14723
|
variants: {
|
|
@@ -14768,7 +14765,7 @@ var require_Popper_native = __commonJS({
|
|
|
14768
14765
|
if (primaryPlacement) {
|
|
14769
14766
|
arrowStyle[isVertical ? "width" : "height"] = size2 * 2;
|
|
14770
14767
|
let oppSide = opposites[primaryPlacement];
|
|
14771
|
-
oppSide && (arrowStyle[oppSide] = -size2, innerArrowStyle[oppSide] = size2 / 2), oppSide === "bottom" && (arrowStyle[oppSide] += 1), (oppSide === "top" || oppSide === "bottom") && (arrowStyle.left = 0), (oppSide === "left" || oppSide === "right") && (arrowStyle.top = 0), (0,
|
|
14768
|
+
oppSide && (arrowStyle[oppSide] = -size2, innerArrowStyle[oppSide] = size2 / 2), oppSide === "bottom" && (arrowStyle[oppSide] += 1), (oppSide === "top" || oppSide === "bottom") && (arrowStyle.left = 0), (oppSide === "left" || oppSide === "right") && (arrowStyle.top = 0), (0, import_constants4.useIsomorphicLayoutEffect)(() => {
|
|
14772
14769
|
var _a2;
|
|
14773
14770
|
(_a2 = context.onArrowSize) == null || _a2.call(context, size2);
|
|
14774
14771
|
}, [size2, context.onArrowSize]);
|