tamagui 1.124.16 → 1.124.18
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 +14 -12
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +14 -12
- package/dist/test.native.js.map +2 -2
- package/package.json +54 -54
package/dist/native.js
CHANGED
|
@@ -6213,14 +6213,14 @@ var require_propMapper_native = __commonJS({
|
|
|
6213
6213
|
}, lastFontFamilyToken = null, getTokenForKey = function(key, value, styleProps, styleState) {
|
|
6214
6214
|
var _staticConfig_accept, resolveAs = styleProps.resolveValues || "none";
|
|
6215
6215
|
if (resolveAs === "none") return value;
|
|
6216
|
-
var { theme, conf = (0, import_config.getConfig)(), context, fontFamily, staticConfig } = styleState, tokensParsed = conf.tokensParsed, valOrVar, hasSet = !1, customTokenAccept = staticConfig == null || (_staticConfig_accept = staticConfig.accept) === null || _staticConfig_accept === void 0 ? void 0 : _staticConfig_accept[key];
|
|
6216
|
+
var { theme, conf = (0, import_config.getConfig)(), context, fontFamily, staticConfig } = styleState, themeValue = theme ? theme[value] || theme[value.slice(1)] : void 0, tokensParsed = conf.tokensParsed, valOrVar, hasSet = !1, customTokenAccept = staticConfig == null || (_staticConfig_accept = staticConfig.accept) === null || _staticConfig_accept === void 0 ? void 0 : _staticConfig_accept[key];
|
|
6217
6217
|
if (customTokenAccept) {
|
|
6218
|
-
var
|
|
6218
|
+
var val = themeValue ?? tokensParsed[customTokenAccept][value];
|
|
6219
6219
|
val != null && (resolveAs = "value", valOrVar = val, hasSet = !0);
|
|
6220
6220
|
}
|
|
6221
|
-
if (
|
|
6221
|
+
if (themeValue) {
|
|
6222
6222
|
if (resolveAs === "except-theme") return value;
|
|
6223
|
-
valOrVar =
|
|
6223
|
+
valOrVar = themeValue, process.env.NODE_ENV === "development" && styleState.debug === "verbose" && (globalThis.tamaguiAvoidTracking = !0, console.info(` - resolving ${key} to theme value ${value} resolveAs ${resolveAs}`, valOrVar), globalThis.tamaguiAvoidTracking = !1), hasSet = !0;
|
|
6224
6224
|
} else {
|
|
6225
6225
|
if (value in conf.specificTokens) hasSet = !0, valOrVar = conf.specificTokens[value];
|
|
6226
6226
|
else {
|
|
@@ -11813,7 +11813,7 @@ var require_matchQuery_native = __commonJS({
|
|
|
11813
11813
|
case "color":
|
|
11814
11814
|
case "color-index":
|
|
11815
11815
|
case "monochrome":
|
|
11816
|
-
expValue = parseInt(expValue, 10) || 1, value = parseInt(value, 10) || 0;
|
|
11816
|
+
expValue = Number.parseInt(expValue, 10) || 1, value = Number.parseInt(value, 10) || 0;
|
|
11817
11817
|
break;
|
|
11818
11818
|
}
|
|
11819
11819
|
switch (modifier) {
|
|
@@ -11854,7 +11854,7 @@ var require_matchQuery_native = __commonJS({
|
|
|
11854
11854
|
return decimal || (numbers = ratio.match(/^(\d+)\s*\/\s*(\d+)$/), decimal = numbers[1] / numbers[2]), decimal;
|
|
11855
11855
|
}
|
|
11856
11856
|
function toDpi(resolution) {
|
|
11857
|
-
var _String_match, value = parseFloat(resolution), units = (_String_match = String(resolution).match(RE_RESOLUTION_UNIT)) === null || _String_match === void 0 ? void 0 : _String_match[1];
|
|
11857
|
+
var _String_match, value = Number.parseFloat(resolution), units = (_String_match = String(resolution).match(RE_RESOLUTION_UNIT)) === null || _String_match === void 0 ? void 0 : _String_match[1];
|
|
11858
11858
|
switch (units) {
|
|
11859
11859
|
case "dpcm":
|
|
11860
11860
|
return value / 2.54;
|
|
@@ -11865,7 +11865,7 @@ var require_matchQuery_native = __commonJS({
|
|
|
11865
11865
|
}
|
|
11866
11866
|
}
|
|
11867
11867
|
function toPx(length) {
|
|
11868
|
-
var _String_match, value = parseFloat(length), units = (_String_match = String(length).match(RE_LENGTH_UNIT)) === null || _String_match === void 0 ? void 0 : _String_match[1];
|
|
11868
|
+
var _String_match, value = Number.parseFloat(length), units = (_String_match = String(length).match(RE_LENGTH_UNIT)) === null || _String_match === void 0 ? void 0 : _String_match[1];
|
|
11869
11869
|
switch (units) {
|
|
11870
11870
|
case "em":
|
|
11871
11871
|
return value * 16;
|
|
@@ -16827,7 +16827,7 @@ var require_create_context_native = __commonJS({
|
|
|
16827
16827
|
if (defaultContext !== void 0) return defaultContext;
|
|
16828
16828
|
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
16829
16829
|
}
|
|
16830
|
-
return
|
|
16830
|
+
return [
|
|
16831
16831
|
Provider,
|
|
16832
16832
|
useContext
|
|
16833
16833
|
];
|
|
@@ -16857,7 +16857,7 @@ var require_create_context_native = __commonJS({
|
|
|
16857
16857
|
if (options != null && options.fallback) return (options == null ? void 0 : options.warn) !== !1 && console.warn(missingContextMessage), options.fallback;
|
|
16858
16858
|
throw new Error(missingContextMessage);
|
|
16859
16859
|
}
|
|
16860
|
-
return
|
|
16860
|
+
return [
|
|
16861
16861
|
Provider,
|
|
16862
16862
|
useContext
|
|
16863
16863
|
];
|
|
@@ -25435,18 +25435,20 @@ var require_Popover_native = __commonJS({
|
|
|
25435
25435
|
});
|
|
25436
25436
|
}), PopoverContent = import_popper.PopperContentFrame.extractable(/* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
25437
25437
|
var { allowPinchZoom, trapFocus, disableRemoveScroll = !0, zIndex, __scopePopover, ...contentImplProps } = props, context = usePopoverContext(__scopePopover), contentRef = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, contentRef), isRightClickOutsideRef = React4.useRef(!1), [isFullyHidden, setIsFullyHidden] = React4.useState(!context.open);
|
|
25438
|
-
|
|
25438
|
+
if (context.open && isFullyHidden && setIsFullyHidden(!1), React4.useEffect(function() {
|
|
25439
25439
|
if (context.open) {
|
|
25440
25440
|
var content = contentRef.current;
|
|
25441
25441
|
if (content) return (0, import_aria_hidden.hideOthers)(content);
|
|
25442
25442
|
}
|
|
25443
25443
|
}, [
|
|
25444
25444
|
context.open
|
|
25445
|
-
]), !context.keepChildrenMounted && isFullyHidden
|
|
25445
|
+
]), !context.keepChildrenMounted && isFullyHidden) return null;
|
|
25446
|
+
var _contentImplProps_pointerEvents;
|
|
25447
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContentPortal, {
|
|
25446
25448
|
__scopePopover,
|
|
25447
25449
|
zIndex: props.zIndex,
|
|
25448
25450
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Stack, {
|
|
25449
|
-
pointerEvents: context.open ? "auto" : "none",
|
|
25451
|
+
pointerEvents: context.open ? (_contentImplProps_pointerEvents = contentImplProps.pointerEvents) !== null && _contentImplProps_pointerEvents !== void 0 ? _contentImplProps_pointerEvents : "auto" : "none",
|
|
25450
25452
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContentImpl, {
|
|
25451
25453
|
...contentImplProps,
|
|
25452
25454
|
disableRemoveScroll,
|