tamagui 1.123.0 → 1.123.2
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/cjs/setup.cjs +1 -1
- package/dist/cjs/setup.js +1 -1
- package/dist/cjs/setup.js.map +1 -1
- package/dist/cjs/setup.native.js +1 -1
- package/dist/cjs/setup.native.js.map +2 -2
- package/dist/esm/setup.js +1 -1
- package/dist/esm/setup.js.map +1 -1
- package/dist/esm/setup.mjs +1 -1
- package/dist/esm/setup.mjs.map +1 -1
- package/dist/esm/setup.native.js +1 -1
- package/dist/esm/setup.native.js.map +2 -2
- package/dist/jsx/setup.js +1 -1
- package/dist/jsx/setup.js.map +1 -1
- package/dist/jsx/setup.mjs +1 -1
- package/dist/jsx/setup.mjs.map +1 -1
- package/dist/jsx/setup.native.js +1 -1
- package/dist/jsx/setup.native.js.map +2 -2
- package/dist/native.js +71 -67
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +71 -67
- package/dist/test.native.js.map +2 -2
- package/package.json +54 -54
- package/src/setup.ts +2 -1
package/dist/test.native.js
CHANGED
|
@@ -1184,7 +1184,10 @@ var require_constants_native = __commonJS({
|
|
|
1184
1184
|
}
|
|
1185
1185
|
});
|
|
1186
1186
|
module2.exports = __toCommonJS2(constants_native_exports);
|
|
1187
|
-
var import_react3 = require("react"), isWeb6 = !1, isWindowDefined = !1, isServer2 = !1, isClient2 = !1, useIsomorphicLayoutEffect2 = import_react3.useLayoutEffect, isChrome2 = !1, isWebTouchable2 = !1, isTouchable2 = !0, isAndroid =
|
|
1187
|
+
var import_react3 = require("react"), import_react_native4 = require("react-native"), isWeb6 = !1, isWindowDefined = !1, isServer2 = !1, isClient2 = !1, useIsomorphicLayoutEffect2 = import_react3.useLayoutEffect, isChrome2 = !1, isWebTouchable2 = !1, isTouchable2 = !0, isAndroid = import_react_native4.Platform.OS === "android" || process.env.TEST_NATIVE_PLATFORM === "android", isIos = import_react_native4.Platform.OS === "ios" || process.env.TEST_NATIVE_PLATFORM === "ios", platforms = {
|
|
1188
|
+
ios: "ios",
|
|
1189
|
+
android: "android"
|
|
1190
|
+
}, currentPlatform = platforms[import_react_native4.Platform.OS] || "native";
|
|
1188
1191
|
}
|
|
1189
1192
|
});
|
|
1190
1193
|
|
|
@@ -3368,10 +3371,20 @@ var require_ThemeManager_native = __commonJS({
|
|
|
3368
3371
|
}
|
|
3369
3372
|
}
|
|
3370
3373
|
]), ThemeManager2;
|
|
3371
|
-
}();
|
|
3374
|
+
}(), cache = {};
|
|
3372
3375
|
function getState(props, manager) {
|
|
3373
|
-
if (props.name && props.reset) throw new Error("Cannot reset and set a new name at the same time.");
|
|
3374
3376
|
if (!getHasThemeUpdatingProps(props)) return null;
|
|
3377
|
+
var [allManagers] = getManagers(manager), cacheKey = `${props.name || ""}${props.componentName || ""}${props.inverse || ""}${props.reset || ""}${allManagers.map(function(x) {
|
|
3378
|
+
return (x == null ? void 0 : x.state.name) || ".";
|
|
3379
|
+
}).join("")}`, cached = cache[cacheKey];
|
|
3380
|
+
if (!cached) {
|
|
3381
|
+
var res = getStateUncached(props, manager);
|
|
3382
|
+
return cache[cacheKey] = res, res;
|
|
3383
|
+
}
|
|
3384
|
+
return cached;
|
|
3385
|
+
}
|
|
3386
|
+
function getStateUncached(props, manager) {
|
|
3387
|
+
if (props.name && props.reset) throw new Error("Cannot reset and set a new name at the same time.");
|
|
3375
3388
|
var themes = (0, import_config.getThemes)(), [allManagers, componentManagers] = getManagers(manager), isDirectParentAComponentTheme = !!(manager != null && manager.state.isComponent), startIndex = props.reset && !isDirectParentAComponentTheme ? 1 : 0, baseManager = allManagers[startIndex], parentManager = allManagers[startIndex + 1];
|
|
3376
3389
|
if (!baseManager && props.reset) return console.warn("Cannot reset, no parent theme exists"), null;
|
|
3377
3390
|
var { componentName } = props, result = null, baseName = (baseManager == null ? void 0 : baseManager.state.name) || "";
|
|
@@ -13327,7 +13340,7 @@ var require_Pressability_native = __commonJS({
|
|
|
13327
13340
|
var require_addNativeValidStyles_native = __commonJS({
|
|
13328
13341
|
"../../core/core/dist/cjs/addNativeValidStyles.native.js"(exports2, module2) {
|
|
13329
13342
|
"use strict";
|
|
13330
|
-
var
|
|
13343
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
13331
13344
|
for (var name in all) __defProp2(target, name, {
|
|
13332
13345
|
get: all[name],
|
|
13333
13346
|
enumerable: !0
|
|
@@ -13355,18 +13368,6 @@ var require_addNativeValidStyles_native = __commonJS({
|
|
|
13355
13368
|
}
|
|
13356
13369
|
}
|
|
13357
13370
|
return to;
|
|
13358
|
-
}, __toESM2 = function(mod, isNodeMode, target) {
|
|
13359
|
-
return target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
13360
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
13361
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
13362
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
13363
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
13364
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
|
|
13365
|
-
value: mod,
|
|
13366
|
-
enumerable: !0
|
|
13367
|
-
}) : target,
|
|
13368
|
-
mod
|
|
13369
|
-
);
|
|
13370
13371
|
}, __toCommonJS2 = function(mod) {
|
|
13371
13372
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
13372
13373
|
value: !0
|
|
@@ -13378,21 +13379,38 @@ var require_addNativeValidStyles_native = __commonJS({
|
|
|
13378
13379
|
}
|
|
13379
13380
|
});
|
|
13380
13381
|
module2.exports = __toCommonJS2(addNativeValidStyles_native_exports);
|
|
13381
|
-
var import_helpers = require_index_native7()
|
|
13382
|
-
function
|
|
13383
|
-
|
|
13384
|
-
|
|
13385
|
-
|
|
13386
|
-
|
|
13387
|
-
|
|
13388
|
-
|
|
13389
|
-
outlineWidth: !0,
|
|
13390
|
-
outlineStyle: !0,
|
|
13391
|
-
outlineSpread: !0,
|
|
13392
|
-
outlineColor: !0
|
|
13393
|
-
};
|
|
13394
|
-
Object.assign(import_helpers.validStyles, additional), Object.assign(import_helpers.stylePropsAll, additional);
|
|
13382
|
+
var import_helpers = require_index_native7();
|
|
13383
|
+
function getReactNativeVersion() {
|
|
13384
|
+
var version = process.env.REACT_NATIVE_VERSION || "";
|
|
13385
|
+
if (!process.env.REACT_NATIVE_VERSION) try {
|
|
13386
|
+
var ReactNativeOfficalVersion = require("react-native/Libraries/Core/ReactNativeVersion");
|
|
13387
|
+
if (ReactNativeOfficalVersion) {
|
|
13388
|
+
var { version: { major, minor, patch } } = ReactNativeOfficalVersion;
|
|
13389
|
+
version = `${major}.${minor}.${patch}`;
|
|
13395
13390
|
}
|
|
13391
|
+
} catch {
|
|
13392
|
+
} finally {
|
|
13393
|
+
version || (version = "0.77");
|
|
13394
|
+
}
|
|
13395
|
+
var [major1, minor1, patch1] = version.split(".");
|
|
13396
|
+
return [
|
|
13397
|
+
+major1,
|
|
13398
|
+
+minor1,
|
|
13399
|
+
+patch1
|
|
13400
|
+
];
|
|
13401
|
+
}
|
|
13402
|
+
function addNativeValidStyles() {
|
|
13403
|
+
var [major, minor] = getReactNativeVersion();
|
|
13404
|
+
if (major === 0 && minor >= 77) {
|
|
13405
|
+
var additional = {
|
|
13406
|
+
boxSizing: !0,
|
|
13407
|
+
mixBlendMode: !0,
|
|
13408
|
+
outlineWidth: !0,
|
|
13409
|
+
outlineStyle: !0,
|
|
13410
|
+
outlineSpread: !0,
|
|
13411
|
+
outlineColor: !0
|
|
13412
|
+
};
|
|
13413
|
+
Object.assign(import_helpers.validStyles, additional), Object.assign(import_helpers.stylePropsAll, additional);
|
|
13396
13414
|
}
|
|
13397
13415
|
}
|
|
13398
13416
|
}
|
|
@@ -16207,7 +16225,7 @@ var require_Adapt_native = __commonJS({
|
|
|
16207
16225
|
var Component = context == null ? void 0 : context.Contents;
|
|
16208
16226
|
output = children(Component ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Component, {}) : null);
|
|
16209
16227
|
} else output = children;
|
|
16210
|
-
return (0,
|
|
16228
|
+
return (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
16211
16229
|
typeof children == "function" && output !== void 0 && (context == null || context.setChildren(output));
|
|
16212
16230
|
}, [
|
|
16213
16231
|
output
|
|
@@ -17777,7 +17795,10 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
17777
17795
|
var adaptContext = (0, import_adapt.useAdaptContext)();
|
|
17778
17796
|
contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.ProvideAdaptContext, {
|
|
17779
17797
|
...adaptContext,
|
|
17780
|
-
children:
|
|
17798
|
+
children: (
|
|
17799
|
+
/* @ts-ignore */
|
|
17800
|
+
contents
|
|
17801
|
+
)
|
|
17781
17802
|
});
|
|
17782
17803
|
}
|
|
17783
17804
|
var shouldMountChildren = unmountChildrenWhenHidden ? !!opacity : !0;
|
|
@@ -24487,7 +24508,7 @@ var require_Popper_native = __commonJS({
|
|
|
24487
24508
|
unstyled: process.env.TAMAGUI_HEADLESS === "1"
|
|
24488
24509
|
}
|
|
24489
24510
|
}), PopperContent = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24490
|
-
var { __scopePopper, enableAnimationForPositionChange, ...rest } = props, { strategy, placement, refs, x, y, getFloatingProps, size: size4
|
|
24511
|
+
var { __scopePopper, enableAnimationForPositionChange, ...rest } = props, { strategy, placement, refs, x, y, getFloatingProps, size: size4 } = usePopperContext(__scopePopper), contentRefs = (0, import_compose_refs.useComposedRefs)(refs.setFloating, forwardedRef), contents = React4.useMemo(function() {
|
|
24491
24512
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopperContentFrame, {
|
|
24492
24513
|
"data-placement": placement,
|
|
24493
24514
|
"data-strategy": strategy,
|
|
@@ -24903,16 +24924,20 @@ var require_Popover_native = __commonJS({
|
|
|
24903
24924
|
...props.popperContext,
|
|
24904
24925
|
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverContext.Provider, {
|
|
24905
24926
|
...props.context,
|
|
24906
|
-
children:
|
|
24927
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.ProvideAdaptContext, {
|
|
24928
|
+
...props.adaptContext,
|
|
24929
|
+
children: props.children
|
|
24930
|
+
})
|
|
24907
24931
|
})
|
|
24908
24932
|
});
|
|
24909
24933
|
}
|
|
24910
24934
|
function PopoverContentPortal(props) {
|
|
24911
|
-
var { __scopePopover } = props, _props_zIndex, zIndex = (_props_zIndex = props.zIndex) !== null && _props_zIndex !== void 0 ? _props_zIndex : 15e4, context = usePopoverContext(__scopePopover), popperContext = (0, import_popper.usePopperContext)(__scopePopover || POPOVER_SCOPE), themeName = (0, import_core12.useThemeName)(), contents = props.children;
|
|
24935
|
+
var { __scopePopover } = props, _props_zIndex, zIndex = (_props_zIndex = props.zIndex) !== null && _props_zIndex !== void 0 ? _props_zIndex : 15e4, context = usePopoverContext(__scopePopover), popperContext = (0, import_popper.usePopperContext)(__scopePopover || POPOVER_SCOPE), themeName = (0, import_core12.useThemeName)(), adaptContext = (0, import_adapt.useAdaptContext)(), contents = props.children;
|
|
24912
24936
|
return (import_react_native4.Platform.OS === "android" || import_react_native4.Platform.OS === "ios") && (contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PopoverRepropagateContext, {
|
|
24913
24937
|
scope: __scopePopover || POPOVER_SCOPE,
|
|
24914
24938
|
popperContext,
|
|
24915
24939
|
context,
|
|
24940
|
+
adaptContext,
|
|
24916
24941
|
children: props.children
|
|
24917
24942
|
})), /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, {
|
|
24918
24943
|
zIndex,
|
|
@@ -24938,19 +24963,19 @@ var require_Popover_native = __commonJS({
|
|
|
24938
24963
|
setIsFullyHidden == null || setIsFullyHidden(!0);
|
|
24939
24964
|
}, [
|
|
24940
24965
|
setIsFullyHidden
|
|
24941
|
-
])
|
|
24966
|
+
]), contents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.ResetPresence, {
|
|
24967
|
+
children
|
|
24968
|
+
});
|
|
24942
24969
|
if (context.breakpointActive) {
|
|
24943
24970
|
var childrenWithoutScrollView = React4.Children.toArray(children).map(function(child) {
|
|
24944
24971
|
return /* @__PURE__ */ React4.isValidElement(child) && child.type === import_react_native4.ScrollView ? child.props.children : child;
|
|
24945
|
-
}), content = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.ResetPresence, {
|
|
24946
|
-
children: childrenWithoutScrollView
|
|
24947
24972
|
});
|
|
24948
|
-
return
|
|
24949
|
-
|
|
24950
|
-
|
|
24951
|
-
|
|
24952
|
-
|
|
24953
|
-
|
|
24973
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptPortalContents, {
|
|
24974
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_popper.PopperContext.Provider, {
|
|
24975
|
+
scope: __scopePopover || POPOVER_SCOPE,
|
|
24976
|
+
...popperContext,
|
|
24977
|
+
children: childrenWithoutScrollView
|
|
24978
|
+
})
|
|
24954
24979
|
});
|
|
24955
24980
|
}
|
|
24956
24981
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate.Animate, {
|
|
@@ -24964,31 +24989,10 @@ var require_Popover_native = __commonJS({
|
|
|
24964
24989
|
id: context.contentId,
|
|
24965
24990
|
ref: forwardedRef,
|
|
24966
24991
|
...contentProps,
|
|
24967
|
-
children:
|
|
24968
|
-
enabled: disableRemoveScroll ? !1 : open,
|
|
24969
|
-
allowPinchZoom: !0,
|
|
24970
|
-
// causes lots of bugs on touch web on site
|
|
24971
|
-
removeScrollBar: !1,
|
|
24972
|
-
style: dspContentsStyle,
|
|
24973
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_animate_presence.ResetPresence, {
|
|
24974
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_focus_scope.FocusScope, {
|
|
24975
|
-
loop: !0,
|
|
24976
|
-
enabled: disableFocusScope ? !1 : open,
|
|
24977
|
-
trapped: trapFocus,
|
|
24978
|
-
onMountAutoFocus: onOpenAutoFocus,
|
|
24979
|
-
onUnmountAutoFocus: onCloseAutoFocus,
|
|
24980
|
-
children: import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", {
|
|
24981
|
-
style: dspContentsStyle,
|
|
24982
|
-
children
|
|
24983
|
-
}) : children
|
|
24984
|
-
})
|
|
24985
|
-
})
|
|
24986
|
-
})
|
|
24992
|
+
children: contents
|
|
24987
24993
|
}, context.contentId)
|
|
24988
24994
|
});
|
|
24989
|
-
}),
|
|
24990
|
-
display: "contents"
|
|
24991
|
-
}, PopoverClose = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24995
|
+
}), PopoverClose = /* @__PURE__ */ React4.forwardRef(function(props, forwardedRef) {
|
|
24992
24996
|
var { __scopePopover, ...rest } = props, context = usePopoverContext(__scopePopover);
|
|
24993
24997
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_stacks3.YStack, {
|
|
24994
24998
|
...rest,
|