tamagui 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 +54 -54
package/dist/test.native.js
CHANGED
|
@@ -9043,7 +9043,7 @@ var require_createComponent_native = __commonJS({
|
|
|
9043
9043
|
staticConfig,
|
|
9044
9044
|
stateRef
|
|
9045
9045
|
});
|
|
9046
|
-
(isAnimated || supportsCSSVars) && animations && (animationStyles = animations.style, viewProps.style = animationStyles);
|
|
9046
|
+
(isAnimated || supportsCSSVars) && animations && (animationStyles = animations.style, viewProps.style = animationStyles, animations.className && (viewProps.className = "".concat(viewProps.className || "", " ").concat(animations.className)));
|
|
9047
9047
|
}
|
|
9048
9048
|
groupName && (nonTamaguiProps.onLayout = (0, import_helpers.composeEventHandlers)(nonTamaguiProps.onLayout, function(e) {
|
|
9049
9049
|
stateRef.current.group.emit(groupName, {
|
|
@@ -12107,7 +12107,7 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
12107
12107
|
"@swc/helpers - typeof";
|
|
12108
12108
|
return obj && typeof Symbol < "u" && obj.constructor === Symbol ? "symbol" : typeof obj;
|
|
12109
12109
|
}
|
|
12110
|
-
var
|
|
12110
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
12111
12111
|
for (var name in all) __defProp2(target, name, {
|
|
12112
12112
|
get: all[name],
|
|
12113
12113
|
enumerable: !0
|
|
@@ -12135,18 +12135,6 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
12135
12135
|
}
|
|
12136
12136
|
}
|
|
12137
12137
|
return to;
|
|
12138
|
-
}, __toESM2 = function(mod, isNodeMode, target) {
|
|
12139
|
-
return target = mod != null ? __create2(__getProtoOf2(mod)) : {}, __copyProps2(
|
|
12140
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
12141
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
12142
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
12143
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
12144
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp2(target, "default", {
|
|
12145
|
-
value: mod,
|
|
12146
|
-
enumerable: !0
|
|
12147
|
-
}) : target,
|
|
12148
|
-
mod
|
|
12149
|
-
);
|
|
12150
12138
|
}, __toCommonJS2 = function(mod) {
|
|
12151
12139
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
12152
12140
|
value: !0
|
|
@@ -12158,64 +12146,51 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
12158
12146
|
}
|
|
12159
12147
|
});
|
|
12160
12148
|
module2.exports = __toCommonJS2(TamaguiProvider_exports);
|
|
12161
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_constants4 = require_index_native6(),
|
|
12162
|
-
function
|
|
12163
|
-
|
|
12164
|
-
|
|
12165
|
-
|
|
12166
|
-
configurable: !0,
|
|
12167
|
-
writable: !0
|
|
12168
|
-
}) : obj[key] = value, obj;
|
|
12149
|
+
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();
|
|
12150
|
+
function _array_like_to_array2(arr, len) {
|
|
12151
|
+
(len == null || len > arr.length) && (len = arr.length);
|
|
12152
|
+
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
12153
|
+
return arr2;
|
|
12169
12154
|
}
|
|
12170
|
-
function
|
|
12171
|
-
|
|
12172
|
-
var source = arguments[i] != null ? arguments[i] : {}, ownKeys22 = Object.keys(source);
|
|
12173
|
-
typeof Object.getOwnPropertySymbols == "function" && (ownKeys22 = ownKeys22.concat(Object.getOwnPropertySymbols(source).filter(function(sym) {
|
|
12174
|
-
return Object.getOwnPropertyDescriptor(source, sym).enumerable;
|
|
12175
|
-
}))), ownKeys22.forEach(function(key) {
|
|
12176
|
-
_define_property9(target, key, source[key]);
|
|
12177
|
-
});
|
|
12178
|
-
}
|
|
12179
|
-
return target;
|
|
12155
|
+
function _array_with_holes(arr) {
|
|
12156
|
+
if (Array.isArray(arr)) return arr;
|
|
12180
12157
|
}
|
|
12181
|
-
function
|
|
12182
|
-
var
|
|
12183
|
-
if (
|
|
12184
|
-
var
|
|
12185
|
-
|
|
12186
|
-
|
|
12187
|
-
}
|
|
12158
|
+
function _iterable_to_array_limit(arr, i) {
|
|
12159
|
+
var _i = arr == null ? null : (typeof Symbol > "u" ? "undefined" : _type_of3(Symbol)) < "u" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
12160
|
+
if (_i != null) {
|
|
12161
|
+
var _arr = [], _n = !0, _d = !1, _s, _e;
|
|
12162
|
+
try {
|
|
12163
|
+
for (_i = _i.call(arr); !(_n = (_s = _i.next()).done) && (_arr.push(_s.value), !(i && _arr.length === i)); _n = !0) ;
|
|
12164
|
+
} catch (err) {
|
|
12165
|
+
_d = !0, _e = err;
|
|
12166
|
+
} finally {
|
|
12167
|
+
try {
|
|
12168
|
+
!_n && _i.return != null && _i.return();
|
|
12169
|
+
} finally {
|
|
12170
|
+
if (_d) throw _e;
|
|
12171
|
+
}
|
|
12172
|
+
}
|
|
12173
|
+
return _arr;
|
|
12188
12174
|
}
|
|
12189
|
-
return keys;
|
|
12190
12175
|
}
|
|
12191
|
-
function
|
|
12192
|
-
|
|
12193
|
-
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
12194
|
-
}), target;
|
|
12176
|
+
function _non_iterable_rest() {
|
|
12177
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
12195
12178
|
}
|
|
12196
|
-
function
|
|
12197
|
-
|
|
12198
|
-
var target = _object_without_properties_loose5(source, excluded), key, i;
|
|
12199
|
-
if (Object.getOwnPropertySymbols) {
|
|
12200
|
-
var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
|
|
12201
|
-
for (i = 0; i < sourceSymbolKeys.length; i++) key = sourceSymbolKeys[i], !(excluded.indexOf(key) >= 0) && Object.prototype.propertyIsEnumerable.call(source, key) && (target[key] = source[key]);
|
|
12202
|
-
}
|
|
12203
|
-
return target;
|
|
12179
|
+
function _sliced_to_array(arr, i) {
|
|
12180
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array2(arr, i) || _non_iterable_rest();
|
|
12204
12181
|
}
|
|
12205
|
-
function
|
|
12206
|
-
if (
|
|
12207
|
-
|
|
12208
|
-
|
|
12209
|
-
|
|
12182
|
+
function _unsupported_iterable_to_array2(o, minLen) {
|
|
12183
|
+
if (o) {
|
|
12184
|
+
if (typeof o == "string") return _array_like_to_array2(o, minLen);
|
|
12185
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
12186
|
+
if (n === "Object" && o.constructor && (n = o.constructor.name), n === "Map" || n === "Set") return Array.from(n);
|
|
12187
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array2(o, minLen);
|
|
12188
|
+
}
|
|
12210
12189
|
}
|
|
12211
|
-
function TamaguiProvider2(
|
|
12212
|
-
var children =
|
|
12213
|
-
|
|
12214
|
-
|
|
12215
|
-
"config"
|
|
12216
|
-
]);
|
|
12217
|
-
(0, import_useMedia.setupMediaListeners)(), import_constants4.isClient && ((0, import_useDidHydrateOnce.useDidHydrateOnceRoot)(), React2.useInsertionEffect(function() {
|
|
12218
|
-
if (config && (config.disableSSR || document.documentElement.classList.contains("t_unmounted") && document.documentElement.classList.remove("t_unmounted"), !disableInjectCSS)) {
|
|
12190
|
+
function TamaguiProvider2(param) {
|
|
12191
|
+
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;
|
|
12192
|
+
(0, import_useMedia.setupMediaListeners)(), import_constants4.isClient && ((0, import_useDidHydrateOnce.useDidHydrateOnceRoot)(), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
12193
|
+
if (config && !disableInjectCSS) {
|
|
12219
12194
|
var style = document.createElement("style");
|
|
12220
12195
|
return style.appendChild(document.createTextNode(config.getCSS())), document.head.appendChild(style), function() {
|
|
12221
12196
|
document.head.removeChild(style);
|
|
@@ -12225,18 +12200,32 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
12225
12200
|
config,
|
|
12226
12201
|
disableInjectCSS
|
|
12227
12202
|
]));
|
|
12228
|
-
var
|
|
12229
|
-
|
|
12230
|
-
|
|
12231
|
-
|
|
12232
|
-
|
|
12233
|
-
|
|
12234
|
-
|
|
12235
|
-
|
|
12236
|
-
|
|
12237
|
-
|
|
12203
|
+
var contents = (0, import_react4.useMemo)(function() {
|
|
12204
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ComponentContext.ComponentContext.Provider, {
|
|
12205
|
+
animationDriver: config == null ? void 0 : config.animations,
|
|
12206
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_ThemeProvider.ThemeProvider, {
|
|
12207
|
+
themeClassNameOnRoot: themeClassNameOnRoot ?? (config == null ? void 0 : config.themeClassNameOnRoot),
|
|
12208
|
+
disableRootThemeClass: disableRootThemeClass ?? (config == null ? void 0 : config.disableRootThemeClass),
|
|
12209
|
+
defaultTheme: defaultTheme ?? (config ? Object.keys(config.themes)[0] : ""),
|
|
12210
|
+
reset,
|
|
12211
|
+
className,
|
|
12212
|
+
children
|
|
12213
|
+
})
|
|
12214
|
+
});
|
|
12215
|
+
}, []);
|
|
12216
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(UnmountedClassName, {
|
|
12217
|
+
children: contents
|
|
12238
12218
|
});
|
|
12239
12219
|
}
|
|
12220
|
+
function UnmountedClassName(props) {
|
|
12221
|
+
var _useState = _sliced_to_array((0, import_react4.useState)(!1), 2), mounted = _useState[0], setMounted = _useState[1];
|
|
12222
|
+
return (0, import_react4.useEffect)(function() {
|
|
12223
|
+
setMounted(!0);
|
|
12224
|
+
}, []), import_constants4.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", {
|
|
12225
|
+
className: mounted ? "" : "t_unmounted",
|
|
12226
|
+
children: props.children
|
|
12227
|
+
}) : props.children;
|
|
12228
|
+
}
|
|
12240
12229
|
TamaguiProvider2.displayName = "TamaguiProvider";
|
|
12241
12230
|
}
|
|
12242
12231
|
});
|