@tamagui/core 1.103.0 → 1.103.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/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 +6 -6
package/dist/native.js
CHANGED
|
@@ -7764,6 +7764,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7764
7764
|
staticConfig,
|
|
7765
7765
|
shouldDoClasses,
|
|
7766
7766
|
styleProps,
|
|
7767
|
+
rulesToInsert,
|
|
7767
7768
|
componentState,
|
|
7768
7769
|
styleState,
|
|
7769
7770
|
theme: _object_spread2({}, theme)
|
|
@@ -9703,7 +9704,7 @@ var require_createComponent_native = __commonJS({
|
|
|
9703
9704
|
staticConfig,
|
|
9704
9705
|
stateRef
|
|
9705
9706
|
});
|
|
9706
|
-
(isAnimated || supportsCSSVars) && animations && (animationStyles = animations.style, viewProps.style = animationStyles), process.env.NODE_ENV === "development" && time && time(_templateObject11());
|
|
9707
|
+
(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());
|
|
9707
9708
|
}
|
|
9708
9709
|
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.
|
|
9709
9710
|
|
|
@@ -9725,7 +9726,9 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9725
9726
|
pressIn: !1
|
|
9726
9727
|
});
|
|
9727
9728
|
};
|
|
9728
|
-
(0,
|
|
9729
|
+
process.env.NODE_ENV === "development" && (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
9730
|
+
debugProp && (console.groupCollapsed("Rendered style >"), console.warn(getComputedStyle(stateRef.current.host)), console.groupEnd());
|
|
9731
|
+
}), (0, import_react3.useEffect)(function() {
|
|
9729
9732
|
if (!disabled) {
|
|
9730
9733
|
if (state.unmounted === !0 && hasEnterStyle) {
|
|
9731
9734
|
setStateShallow({
|
|
@@ -12823,7 +12826,7 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
12823
12826
|
"@swc/helpers - typeof";
|
|
12824
12827
|
return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
12825
12828
|
}
|
|
12826
|
-
var
|
|
12829
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
12827
12830
|
for (var name in all) __defProp2(target, name, {
|
|
12828
12831
|
get: all[name],
|
|
12829
12832
|
enumerable: !0
|
|
@@ -12851,18 +12854,6 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
12851
12854
|
}
|
|
12852
12855
|
}
|
|
12853
12856
|
return to;
|
|
12854
|
-
}, __toESM2 = function(mod, isNodeMode, target) {
|
|
12855
|
-
return target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
12856
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
12857
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
12858
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
12859
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
12860
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
|
|
12861
|
-
value: mod,
|
|
12862
|
-
enumerable: !0
|
|
12863
|
-
}) : target,
|
|
12864
|
-
mod
|
|
12865
|
-
);
|
|
12866
12857
|
}, __toCommonJS2 = function(mod) {
|
|
12867
12858
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
12868
12859
|
value: !0
|
|
@@ -12874,64 +12865,51 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
12874
12865
|
}
|
|
12875
12866
|
});
|
|
12876
12867
|
module2.exports = __toCommonJS2(TamaguiProvider_exports);
|
|
12877
|
-
var import_jsx_runtime = require("react/jsx-runtime"), import_constants = require_index_native3(),
|
|
12878
|
-
function
|
|
12879
|
-
|
|
12880
|
-
|
|
12881
|
-
|
|
12882
|
-
configurable: !0,
|
|
12883
|
-
writable: !0
|
|
12884
|
-
}) : obj[key] = value, obj;
|
|
12868
|
+
var import_jsx_runtime = require("react/jsx-runtime"), import_constants = require_index_native3(), import_react3 = require("react"), import_ComponentContext = require_ComponentContext_native(), import_useDidHydrateOnce = require_useDidHydrateOnce_native(), import_useMedia = require_useMedia_native(), import_ThemeProvider = require_ThemeProvider_native();
|
|
12869
|
+
function _array_like_to_array(arr, len) {
|
|
12870
|
+
(len == null || len > arr.length) && (len = arr.length);
|
|
12871
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
12872
|
+
return arr2;
|
|
12885
12873
|
}
|
|
12886
|
-
function
|
|
12887
|
-
|
|
12888
|
-
var source = arguments[i] != null ? arguments[i] : {}, ownKeys2 = Object.keys(source);
|
|
12889
|
-
typeof Object.getOwnPropertySymbols == "function" && (ownKeys2 = ownKeys2.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
12890
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
12891
|
-
}))), ownKeys2.forEach(function(key) {
|
|
12892
|
-
_define_property2(target, key, source[key]);
|
|
12893
|
-
});
|
|
12894
|
-
}
|
|
12895
|
-
return target;
|
|
12874
|
+
function _array_with_holes(arr) {
|
|
12875
|
+
if (Array.isArray(arr)) return arr;
|
|
12896
12876
|
}
|
|
12897
|
-
function
|
|
12898
|
-
var
|
|
12899
|
-
if (
|
|
12900
|
-
var
|
|
12901
|
-
|
|
12902
|
-
|
|
12903
|
-
}
|
|
12877
|
+
function _iterable_to_array_limit(arr, i) {
|
|
12878
|
+
var _i = arr == null ? null : (typeof Symbol > "u" ? "undefined" : _type_of(Symbol)) < "u" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
12879
|
+
if (_i != null) {
|
|
12880
|
+
var _arr = [], _n = !0, _d = !1, _s, _e;
|
|
12881
|
+
try {
|
|
12882
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done) && (_arr.push(_s.value), !(i && _arr.length === i)); _n = !0) ;
|
|
12883
|
+
} catch (err) {
|
|
12884
|
+
_d = !0, _e = err;
|
|
12885
|
+
} finally {
|
|
12886
|
+
try {
|
|
12887
|
+
!_n && _i.return != null && _i.return();
|
|
12888
|
+
} finally {
|
|
12889
|
+
if (_d) throw _e;
|
|
12890
|
+
}
|
|
12891
|
+
}
|
|
12892
|
+
return _arr;
|
|
12904
12893
|
}
|
|
12905
|
-
return keys;
|
|
12906
12894
|
}
|
|
12907
|
-
function
|
|
12908
|
-
|
|
12909
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
12910
|
-
}), target;
|
|
12895
|
+
function _non_iterable_rest() {
|
|
12896
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
12911
12897
|
}
|
|
12912
|
-
function
|
|
12913
|
-
|
|
12914
|
-
var target = _object_without_properties_loose(source, excluded), key, i;
|
|
12915
|
-
if (Object.getOwnPropertySymbols) {
|
|
12916
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
12917
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
|
|
12918
|
-
}
|
|
12919
|
-
return target;
|
|
12898
|
+
function _sliced_to_array(arr, i) {
|
|
12899
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
12920
12900
|
}
|
|
12921
|
-
function
|
|
12922
|
-
if (
|
|
12923
|
-
|
|
12924
|
-
|
|
12925
|
-
|
|
12901
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
12902
|
+
if (o) {
|
|
12903
|
+
if (typeof o == "string") return _array_like_to_array(o, minLen);
|
|
12904
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
12905
|
+
if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set") return Array.from(n);
|
|
12906
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
12907
|
+
}
|
|
12926
12908
|
}
|
|
12927
|
-
function TamaguiProvider(
|
|
12928
|
-
var children =
|
|
12929
|
-
|
|
12930
|
-
|
|
12931
|
-
"config"
|
|
12932
|
-
]);
|
|
12933
|
-
(0, import_useMedia.setupMediaListeners)(), import_constants.isClient && ((0, import_useDidHydrateOnce.useDidHydrateOnceRoot)(), React.useInsertionEffect(function() {
|
|
12934
|
-
if (config && (config.disableSSR || document.documentElement.classList.contains("t_unmounted") && document.documentElement.classList.remove("t_unmounted"), !disableInjectCSS)) {
|
|
12909
|
+
function TamaguiProvider(param) {
|
|
12910
|
+
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;
|
|
12911
|
+
(0, import_useMedia.setupMediaListeners)(), import_constants.isClient && ((0, import_useDidHydrateOnce.useDidHydrateOnceRoot)(), (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
12912
|
+
if (config && !disableInjectCSS) {
|
|
12935
12913
|
var style = document.createElement("style");
|
|
12936
12914
|
return style.appendChild(document.createTextNode(config.getCSS())), document.head.appendChild(style), function() {
|
|
12937
12915
|
document.head.removeChild(style);
|
|
@@ -12941,18 +12919,32 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
12941
12919
|
config,
|
|
12942
12920
|
disableInjectCSS
|
|
12943
12921
|
]));
|
|
12944
|
-
var
|
|
12945
|
-
|
|
12946
|
-
|
|
12947
|
-
|
|
12948
|
-
|
|
12949
|
-
|
|
12950
|
-
|
|
12951
|
-
|
|
12952
|
-
|
|
12953
|
-
|
|
12922
|
+
var contents = (0, import_react3.useMemo)(function() {
|
|
12923
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ComponentContext.ComponentContext.Provider, {
|
|
12924
|
+
animationDriver: config == null ? void 0 : config.animations,
|
|
12925
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ThemeProvider.ThemeProvider, {
|
|
12926
|
+
themeClassNameOnRoot: themeClassNameOnRoot ?? (config == null ? void 0 : config.themeClassNameOnRoot),
|
|
12927
|
+
disableRootThemeClass: disableRootThemeClass ?? (config == null ? void 0 : config.disableRootThemeClass),
|
|
12928
|
+
defaultTheme: defaultTheme ?? (config ? Object.keys(config.themes)[0] : ""),
|
|
12929
|
+
reset,
|
|
12930
|
+
className,
|
|
12931
|
+
children
|
|
12932
|
+
})
|
|
12933
|
+
});
|
|
12934
|
+
}, []);
|
|
12935
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(UnmountedClassName, {
|
|
12936
|
+
children: contents
|
|
12954
12937
|
});
|
|
12955
12938
|
}
|
|
12939
|
+
function UnmountedClassName(props) {
|
|
12940
|
+
var _useState = _sliced_to_array((0, import_react3.useState)(!1), 2), mounted = _useState[0], setMounted = _useState[1];
|
|
12941
|
+
return (0, import_react3.useEffect)(function() {
|
|
12942
|
+
setMounted(!0);
|
|
12943
|
+
}, []), import_constants.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", {
|
|
12944
|
+
className: mounted ? "" : "t_unmounted",
|
|
12945
|
+
children: props.children
|
|
12946
|
+
}) : props.children;
|
|
12947
|
+
}
|
|
12956
12948
|
TamaguiProvider.displayName = "TamaguiProvider";
|
|
12957
12949
|
}
|
|
12958
12950
|
});
|