tamagui 1.125.29 → 1.125.31-1743030157133
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 -14
- package/dist/native.js.map +1 -1
- package/dist/test.native.js +22 -13
- package/dist/test.native.js.map +1 -1
- package/package.json +55 -55
package/dist/native.js
CHANGED
|
@@ -10333,6 +10333,9 @@ var require_getExpandedShorthands_native = __commonJS({
|
|
|
10333
10333
|
}), mod);
|
|
10334
10334
|
}, getExpandedShorthands_exports = {};
|
|
10335
10335
|
__export2(getExpandedShorthands_exports, {
|
|
10336
|
+
getExpandedShorthand: function() {
|
|
10337
|
+
return getExpandedShorthand;
|
|
10338
|
+
},
|
|
10336
10339
|
getExpandedShorthands: function() {
|
|
10337
10340
|
return getExpandedShorthands;
|
|
10338
10341
|
}
|
|
@@ -10346,6 +10349,10 @@ var require_getExpandedShorthands_native = __commonJS({
|
|
|
10346
10349
|
for (var key in props) res[shorthands[key] || key] = props[key];
|
|
10347
10350
|
return res;
|
|
10348
10351
|
}
|
|
10352
|
+
function getExpandedShorthand(propKey, props) {
|
|
10353
|
+
var shorthands = (0, import_config.getConfig)().inverseShorthands, _props_propKey;
|
|
10354
|
+
return (_props_propKey = props[propKey]) !== null && _props_propKey !== void 0 ? _props_propKey : props[shorthands[propKey]];
|
|
10355
|
+
}
|
|
10349
10356
|
}
|
|
10350
10357
|
});
|
|
10351
10358
|
|
|
@@ -13331,7 +13338,7 @@ var require_getBaseViews_native = __commonJS({
|
|
|
13331
13338
|
if (process.env.NODE_ENV !== "test") {
|
|
13332
13339
|
View2 = require("react-native/Libraries/Components/View/ViewNativeComponent").default;
|
|
13333
13340
|
var TextAncestorModule = require("react-native/Libraries/Text/TextAncestor"), _TextAncestorModule_default;
|
|
13334
|
-
TextAncestor = (_TextAncestorModule_default = TextAncestorModule.default) !== null && _TextAncestorModule_default !== void 0 ? _TextAncestorModule_default :
|
|
13341
|
+
TextAncestor = (_TextAncestorModule_default = TextAncestorModule.default) !== null && _TextAncestorModule_default !== void 0 ? _TextAncestorModule_default : TextAncestorModule;
|
|
13335
13342
|
}
|
|
13336
13343
|
return View2 || (View2 = native.View || native.default.View), {
|
|
13337
13344
|
View: View2,
|
|
@@ -15970,20 +15977,20 @@ var require_useStackedZIndex_native = __commonJS({
|
|
|
15970
15977
|
});
|
|
15971
15978
|
module2.exports = __toCommonJS2(useStackedZIndex_exports);
|
|
15972
15979
|
var import_react3 = require("react"), import_context = require_context_native(), ZIndicesByContext = {}, useStackedZIndex = function(props) {
|
|
15973
|
-
var _ZIndicesByContext,
|
|
15974
|
-
(_ZIndicesByContext = ZIndicesByContext)[
|
|
15975
|
-
var stackContext = ZIndicesByContext[
|
|
15980
|
+
var _ZIndicesByContext, _stackLayer, { stackZIndex, zIndex: zIndexProp } = props, id = (0, import_react3.useId)(), stackingContextLevel = (0, import_react3.useContext)(import_context.ZIndexStackContext), stackLayer = process.env.TAMAGUI_STACK_Z_INDEX_GLOBAL || stackZIndex === "global" ? 0 : stackingContextLevel, hardcoded = (0, import_react3.useContext)(import_context.ZIndexHardcodedContext);
|
|
15981
|
+
(_ZIndicesByContext = ZIndicesByContext)[_stackLayer = stackLayer] || (_ZIndicesByContext[_stackLayer] = {});
|
|
15982
|
+
var stackContext = ZIndicesByContext[stackLayer], zIndex = (0, import_react3.useMemo)(function() {
|
|
15976
15983
|
if (typeof zIndexProp == "number") return zIndexProp;
|
|
15977
15984
|
if (stackZIndex) {
|
|
15978
15985
|
if (hardcoded) return hardcoded + 1;
|
|
15979
15986
|
var highest = Object.values(stackContext).reduce(function(acc, cur) {
|
|
15980
15987
|
return Math.max(acc, cur);
|
|
15981
|
-
}, 0), found =
|
|
15988
|
+
}, 0), found = stackLayer * 5e3 + highest + 1;
|
|
15982
15989
|
return typeof stackZIndex == "number" ? stackZIndex + found : found;
|
|
15983
15990
|
}
|
|
15984
15991
|
return 1;
|
|
15985
15992
|
}, [
|
|
15986
|
-
|
|
15993
|
+
stackLayer,
|
|
15987
15994
|
zIndexProp,
|
|
15988
15995
|
stackZIndex
|
|
15989
15996
|
]);
|
|
@@ -16563,13 +16570,13 @@ var require_Portal_native = __commonJS({
|
|
|
16563
16570
|
var import_jsx_runtime6 = require("react/jsx-runtime"), import_stacks3 = require_index_native22(), import_z_index_stack2 = require_index_native27(), React4 = __toESM2(require("react")), import_react_native4 = require("react-native"), import_constants4 = require_constants_native3(), import_GorhomPortalItem = require_GorhomPortalItem_native(), import_helpers = require_helpers_native(), createPortal = function() {
|
|
16564
16571
|
if (import_constants4.IS_FABRIC) try {
|
|
16565
16572
|
var _ReactFabricShimModule_default, ReactFabricShimModule = require("react-native/Libraries/Renderer/shims/ReactFabric"), _ReactFabricShimModule_default_createPortal;
|
|
16566
|
-
return (_ReactFabricShimModule_default_createPortal = (_ReactFabricShimModule_default = ReactFabricShimModule.default) === null || _ReactFabricShimModule_default === void 0 ? void 0 : _ReactFabricShimModule_default.createPortal) !== null && _ReactFabricShimModule_default_createPortal !== void 0 ? _ReactFabricShimModule_default_createPortal : ReactFabricShimModule.createPortal;
|
|
16573
|
+
return (_ReactFabricShimModule_default_createPortal = ReactFabricShimModule == null || (_ReactFabricShimModule_default = ReactFabricShimModule.default) === null || _ReactFabricShimModule_default === void 0 ? void 0 : _ReactFabricShimModule_default.createPortal) !== null && _ReactFabricShimModule_default_createPortal !== void 0 ? _ReactFabricShimModule_default_createPortal : ReactFabricShimModule.createPortal;
|
|
16567
16574
|
} catch (err) {
|
|
16568
16575
|
return console.info("Note: error importing portal, defaulting to non-native portals", err), null;
|
|
16569
16576
|
}
|
|
16570
16577
|
try {
|
|
16571
16578
|
var _ReactNativeShimModule_default, ReactNativeShimModule = require("react-native/Libraries/Renderer/shims/ReactNative").createPortal, _ReactNativeShimModule_default_createPortal;
|
|
16572
|
-
return (_ReactNativeShimModule_default_createPortal = (_ReactNativeShimModule_default = ReactNativeShimModule.default) === null || _ReactNativeShimModule_default === void 0 ? void 0 : _ReactNativeShimModule_default.createPortal) !== null && _ReactNativeShimModule_default_createPortal !== void 0 ? _ReactNativeShimModule_default_createPortal : ReactNativeShimModule.createPortal;
|
|
16579
|
+
return (_ReactNativeShimModule_default_createPortal = ReactNativeShimModule == null || (_ReactNativeShimModule_default = ReactNativeShimModule.default) === null || _ReactNativeShimModule_default === void 0 ? void 0 : _ReactNativeShimModule_default.createPortal) !== null && _ReactNativeShimModule_default_createPortal !== void 0 ? _ReactNativeShimModule_default_createPortal : ReactNativeShimModule.createPortal;
|
|
16573
16580
|
} catch (err) {
|
|
16574
16581
|
return console.info("Note: error importing portal, defaulting to non-native portals", err), null;
|
|
16575
16582
|
}
|
|
@@ -19455,6 +19462,7 @@ var require_Dialog_native = __commonJS({
|
|
|
19455
19462
|
return isAdapted ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
19456
19463
|
children: content
|
|
19457
19464
|
}) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.PortalItem, {
|
|
19465
|
+
hostName: context.adaptName,
|
|
19458
19466
|
children: content
|
|
19459
19467
|
});
|
|
19460
19468
|
}, DialogPortal = function(props) {
|
|
@@ -19462,10 +19470,10 @@ var require_Dialog_native = __commonJS({
|
|
|
19462
19470
|
isShowing && isFullyHidden && setIsFullyHidden(!1);
|
|
19463
19471
|
var handleExitComplete = React4.useCallback(function() {
|
|
19464
19472
|
setIsFullyHidden(!0);
|
|
19465
|
-
}, []);
|
|
19473
|
+
}, []), zIndex = (0, import_core12.getExpandedShorthand)("zIndex", props);
|
|
19466
19474
|
if (context.modal) {
|
|
19467
19475
|
var contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_z_index_stack2.StackZIndexContext, {
|
|
19468
|
-
zIndex: (0, import_portal2.resolveViewZIndex)(
|
|
19476
|
+
zIndex: (0, import_portal2.resolveViewZIndex)(zIndex),
|
|
19469
19477
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.AnimatePresence, {
|
|
19470
19478
|
onExitComplete: handleExitComplete,
|
|
19471
19479
|
children: isShowing || isAdapted ? children : null
|
|
@@ -19482,7 +19490,7 @@ var require_Dialog_native = __commonJS({
|
|
|
19482
19490
|
})
|
|
19483
19491
|
});
|
|
19484
19492
|
return import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, {
|
|
19485
|
-
zIndex
|
|
19493
|
+
zIndex,
|
|
19486
19494
|
// set to 1000 which "boosts" it 1000 above baseline for current context
|
|
19487
19495
|
// this makes sure its above (this first 1k) popovers on the same layer
|
|
19488
19496
|
stackZIndex: 1e3,
|
|
@@ -19566,8 +19574,8 @@ var require_Dialog_native = __commonJS({
|
|
|
19566
19574
|
});
|
|
19567
19575
|
})), DialogContentModal = /* @__PURE__ */ React4.forwardRef(function(param, forwardedRef) {
|
|
19568
19576
|
var { children, context, ...props } = param, contentRef = React4.useRef(null), composedRefs = (0, import_compose_refs.useComposedRefs)(forwardedRef, context.contentRef, contentRef);
|
|
19569
|
-
return
|
|
19570
|
-
if (context.open) {
|
|
19577
|
+
return React4.useEffect(function() {
|
|
19578
|
+
if (import_constants4.isWeb && context.open) {
|
|
19571
19579
|
var content = contentRef.current;
|
|
19572
19580
|
if (content) return (0, import_aria_hidden.hideOthers)(content);
|
|
19573
19581
|
}
|
|
@@ -19785,7 +19793,8 @@ If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it wi
|
|
|
19785
19793
|
onOpenToggle,
|
|
19786
19794
|
modal,
|
|
19787
19795
|
allowPinchZoom,
|
|
19788
|
-
disableRemoveScroll
|
|
19796
|
+
disableRemoveScroll,
|
|
19797
|
+
adaptName
|
|
19789
19798
|
};
|
|
19790
19799
|
return React4.useImperativeHandle(ref, function() {
|
|
19791
19800
|
return {
|