tamagui 1.103.0 → 1.103.1
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 +68 -76
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +64 -75
- package/dist/test.native.js.map +2 -2
- package/package.json +54 -54
package/dist/native.js
CHANGED
|
@@ -7870,6 +7870,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7870
7870
|
staticConfig,
|
|
7871
7871
|
shouldDoClasses,
|
|
7872
7872
|
styleProps,
|
|
7873
|
+
rulesToInsert,
|
|
7873
7874
|
componentState,
|
|
7874
7875
|
styleState,
|
|
7875
7876
|
theme: _object_spread9({}, theme)
|
|
@@ -9809,7 +9810,7 @@ var require_createComponent_native = __commonJS({
|
|
|
9809
9810
|
staticConfig,
|
|
9810
9811
|
stateRef
|
|
9811
9812
|
});
|
|
9812
|
-
(isAnimated || supportsCSSVars) && animations && (animationStyles = animations.style, viewProps.style = animationStyles), process.env.NODE_ENV === "development" && time && time(_templateObject11());
|
|
9813
|
+
(isAnimated || supportsCSSVars) && animations && (animationStyles = animations.style, viewProps.style = animationStyles, animations.className && (viewProps.className = "".concat(viewProps.className || "", " ").concat(animations.className))), process.env.NODE_ENV === "development" && time && time(_templateObject11());
|
|
9813
9814
|
}
|
|
9814
9815
|
process.env.NODE_ENV === "development" && props.untilMeasured && !props.group && console.warn(`You set the untilMeasured prop without setting group. This doesn't work, be sure to set untilMeasured on the parent that sets group, not the children that use the $group- prop.
|
|
9815
9816
|
|
|
@@ -9831,7 +9832,9 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9831
9832
|
pressIn: !1
|
|
9832
9833
|
});
|
|
9833
9834
|
};
|
|
9834
|
-
(0,
|
|
9835
|
+
process.env.NODE_ENV === "development" && (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
9836
|
+
debugProp && (console.groupCollapsed("Rendered style >"), console.warn(getComputedStyle(stateRef.current.host)), console.groupEnd());
|
|
9837
|
+
}), (0, import_react4.useEffect)(function() {
|
|
9835
9838
|
if (!disabled) {
|
|
9836
9839
|
if (state.unmounted === !0 && hasEnterStyle) {
|
|
9837
9840
|
setStateShallow({
|
|
@@ -12929,7 +12932,7 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
12929
12932
|
"@swc/helpers - typeof";
|
|
12930
12933
|
return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
12931
12934
|
}
|
|
12932
|
-
var
|
|
12935
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
12933
12936
|
for (var name in all) __defProp2(target, name, {
|
|
12934
12937
|
get: all[name],
|
|
12935
12938
|
enumerable: !0
|
|
@@ -12957,18 +12960,6 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
12957
12960
|
}
|
|
12958
12961
|
}
|
|
12959
12962
|
return to;
|
|
12960
|
-
}, __toESM2 = function(mod, isNodeMode, target) {
|
|
12961
|
-
return target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
12962
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
12963
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
12964
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
12965
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
12966
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
|
|
12967
|
-
value: mod,
|
|
12968
|
-
enumerable: !0
|
|
12969
|
-
}) : target,
|
|
12970
|
-
mod
|
|
12971
|
-
);
|
|
12972
12963
|
}, __toCommonJS2 = function(mod) {
|
|
12973
12964
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
12974
12965
|
value: !0
|
|
@@ -12980,64 +12971,51 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
12980
12971
|
}
|
|
12981
12972
|
});
|
|
12982
12973
|
module2.exports = __toCommonJS2(TamaguiProvider_exports);
|
|
12983
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native6(),
|
|
12984
|
-
function
|
|
12985
|
-
|
|
12986
|
-
|
|
12987
|
-
|
|
12988
|
-
configurable: !0,
|
|
12989
|
-
writable: !0
|
|
12990
|
-
}) : obj[key] = value, obj;
|
|
12974
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native6(), import_react4 = require("react"), import_ComponentContext = require_ComponentContext_native(), import_useDidHydrateOnce = require_useDidHydrateOnce_native(), import_useMedia = require_useMedia_native(), import_ThemeProvider = require_ThemeProvider_native();
|
|
12975
|
+
function _array_like_to_array2(arr, len) {
|
|
12976
|
+
(len == null || len > arr.length) && (len = arr.length);
|
|
12977
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
12978
|
+
return arr2;
|
|
12991
12979
|
}
|
|
12992
|
-
function
|
|
12993
|
-
|
|
12994
|
-
var source = arguments[i] != null ? arguments[i] : {}, ownKeys22 = Object.keys(source);
|
|
12995
|
-
typeof Object.getOwnPropertySymbols == "function" && (ownKeys22 = ownKeys22.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
12996
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
12997
|
-
}))), ownKeys22.forEach(function(key) {
|
|
12998
|
-
_define_property9(target, key, source[key]);
|
|
12999
|
-
});
|
|
13000
|
-
}
|
|
13001
|
-
return target;
|
|
12980
|
+
function _array_with_holes(arr) {
|
|
12981
|
+
if (Array.isArray(arr)) return arr;
|
|
13002
12982
|
}
|
|
13003
|
-
function
|
|
13004
|
-
var
|
|
13005
|
-
if (
|
|
13006
|
-
var
|
|
13007
|
-
|
|
13008
|
-
|
|
13009
|
-
}
|
|
12983
|
+
function _iterable_to_array_limit(arr, i) {
|
|
12984
|
+
var _i = arr == null ? null : (typeof Symbol > "u" ? "undefined" : _type_of3(Symbol)) < "u" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
12985
|
+
if (_i != null) {
|
|
12986
|
+
var _arr = [], _n = !0, _d = !1, _s, _e;
|
|
12987
|
+
try {
|
|
12988
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done) && (_arr.push(_s.value), !(i && _arr.length === i)); _n = !0) ;
|
|
12989
|
+
} catch (err) {
|
|
12990
|
+
_d = !0, _e = err;
|
|
12991
|
+
} finally {
|
|
12992
|
+
try {
|
|
12993
|
+
!_n && _i.return != null && _i.return();
|
|
12994
|
+
} finally {
|
|
12995
|
+
if (_d) throw _e;
|
|
12996
|
+
}
|
|
12997
|
+
}
|
|
12998
|
+
return _arr;
|
|
13010
12999
|
}
|
|
13011
|
-
return keys;
|
|
13012
13000
|
}
|
|
13013
|
-
function
|
|
13014
|
-
|
|
13015
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
13016
|
-
}), target;
|
|
13001
|
+
function _non_iterable_rest() {
|
|
13002
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
13017
13003
|
}
|
|
13018
|
-
function
|
|
13019
|
-
|
|
13020
|
-
var target = _object_without_properties_loose5(source, excluded), key, i;
|
|
13021
|
-
if (Object.getOwnPropertySymbols) {
|
|
13022
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
13023
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
|
|
13024
|
-
}
|
|
13025
|
-
return target;
|
|
13004
|
+
function _sliced_to_array(arr, i) {
|
|
13005
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array2(arr, i) || _non_iterable_rest();
|
|
13026
13006
|
}
|
|
13027
|
-
function
|
|
13028
|
-
if (
|
|
13029
|
-
|
|
13030
|
-
|
|
13031
|
-
|
|
13007
|
+
function _unsupported_iterable_to_array2(o, minLen) {
|
|
13008
|
+
if (o) {
|
|
13009
|
+
if (typeof o == "string") return _array_like_to_array2(o, minLen);
|
|
13010
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
13011
|
+
if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set") return Array.from(n);
|
|
13012
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array2(o, minLen);
|
|
13013
|
+
}
|
|
13032
13014
|
}
|
|
13033
|
-
function TamaguiProvider2(
|
|
13034
|
-
var children =
|
|
13035
|
-
|
|
13036
|
-
|
|
13037
|
-
"config"
|
|
13038
|
-
]);
|
|
13039
|
-
(0, import_useMedia.setupMediaListeners)(), import_constants4.isClient && ((0, import_useDidHydrateOnce.useDidHydrateOnceRoot)(), React2.useInsertionEffect(function() {
|
|
13040
|
-
if (config && (config.disableSSR || document.documentElement.classList.contains("t_unmounted") && document.documentElement.classList.remove("t_unmounted"), !disableInjectCSS)) {
|
|
13015
|
+
function TamaguiProvider2(param) {
|
|
13016
|
+
var children = param.children, disableInjectCSS = param.disableInjectCSS, config = param.config, className = param.className, defaultTheme = param.defaultTheme, disableRootThemeClass = param.disableRootThemeClass, reset = param.reset, themeClassNameOnRoot = param.themeClassNameOnRoot;
|
|
13017
|
+
(0, import_useMedia.setupMediaListeners)(), import_constants4.isClient && ((0, import_useDidHydrateOnce.useDidHydrateOnceRoot)(), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
13018
|
+
if (config && !disableInjectCSS) {
|
|
13041
13019
|
var style = document.createElement("style");
|
|
13042
13020
|
return style.appendChild(document.createTextNode(config.getCSS())), document.head.appendChild(style), function() {
|
|
13043
13021
|
document.head.removeChild(style);
|
|
@@ -13047,18 +13025,32 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
13047
13025
|
config,
|
|
13048
13026
|
disableInjectCSS
|
|
13049
13027
|
]));
|
|
13050
|
-
var
|
|
13051
|
-
|
|
13052
|
-
|
|
13053
|
-
|
|
13054
|
-
|
|
13055
|
-
|
|
13056
|
-
|
|
13057
|
-
|
|
13058
|
-
|
|
13059
|
-
|
|
13028
|
+
var contents = (0, import_react4.useMemo)(function() {
|
|
13029
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ComponentContext.ComponentContext.Provider, {
|
|
13030
|
+
animationDriver: config == null ? void 0 : config.animations,
|
|
13031
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ThemeProvider.ThemeProvider, {
|
|
13032
|
+
themeClassNameOnRoot: themeClassNameOnRoot ?? (config == null ? void 0 : config.themeClassNameOnRoot),
|
|
13033
|
+
disableRootThemeClass: disableRootThemeClass ?? (config == null ? void 0 : config.disableRootThemeClass),
|
|
13034
|
+
defaultTheme: defaultTheme ?? (config ? Object.keys(config.themes)[0] : ""),
|
|
13035
|
+
reset,
|
|
13036
|
+
className,
|
|
13037
|
+
children
|
|
13038
|
+
})
|
|
13039
|
+
});
|
|
13040
|
+
}, []);
|
|
13041
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(UnmountedClassName, {
|
|
13042
|
+
children: contents
|
|
13060
13043
|
});
|
|
13061
13044
|
}
|
|
13045
|
+
function UnmountedClassName(props) {
|
|
13046
|
+
var _useState = _sliced_to_array((0, import_react4.useState)(!1), 2), mounted = _useState[0], setMounted = _useState[1];
|
|
13047
|
+
return (0, import_react4.useEffect)(function() {
|
|
13048
|
+
setMounted(!0);
|
|
13049
|
+
}, []), import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", {
|
|
13050
|
+
className: mounted ? "" : "t_unmounted",
|
|
13051
|
+
children: props.children
|
|
13052
|
+
}) : props.children;
|
|
13053
|
+
}
|
|
13062
13054
|
TamaguiProvider2.displayName = "TamaguiProvider";
|
|
13063
13055
|
}
|
|
13064
13056
|
});
|