tamagui 1.114.0 → 1.114.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 +89 -40
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +89 -40
- package/dist/test.native.js.map +3 -3
- package/package.json +54 -54
package/dist/native.js
CHANGED
|
@@ -8055,6 +8055,56 @@ var require_themeable_native = __commonJS({
|
|
|
8055
8055
|
}
|
|
8056
8056
|
});
|
|
8057
8057
|
|
|
8058
|
+
// ../../core/web/dist/cjs/helpers/wrapStyleTags.native.js
|
|
8059
|
+
var require_wrapStyleTags_native = __commonJS({
|
|
8060
|
+
"../../core/web/dist/cjs/helpers/wrapStyleTags.native.js"(exports2, module2) {
|
|
8061
|
+
"use strict";
|
|
8062
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
8063
|
+
for (var name in all) __defProp2(target, name, {
|
|
8064
|
+
get: all[name],
|
|
8065
|
+
enumerable: !0
|
|
8066
|
+
});
|
|
8067
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
8068
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
8069
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
8070
|
+
for (var _loop = function() {
|
|
8071
|
+
var key = _step.value;
|
|
8072
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
8073
|
+
get: function() {
|
|
8074
|
+
return from[key];
|
|
8075
|
+
},
|
|
8076
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
8077
|
+
});
|
|
8078
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
8079
|
+
} catch (err) {
|
|
8080
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
8081
|
+
} finally {
|
|
8082
|
+
try {
|
|
8083
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
8084
|
+
} finally {
|
|
8085
|
+
if (_didIteratorError)
|
|
8086
|
+
throw _iteratorError;
|
|
8087
|
+
}
|
|
8088
|
+
}
|
|
8089
|
+
return to;
|
|
8090
|
+
}, __toCommonJS2 = function(mod) {
|
|
8091
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
8092
|
+
value: !0
|
|
8093
|
+
}), mod);
|
|
8094
|
+
}, wrapStyleTags_exports = {};
|
|
8095
|
+
__export2(wrapStyleTags_exports, {
|
|
8096
|
+
wrapStyleTags: function() {
|
|
8097
|
+
return wrapStyleTags;
|
|
8098
|
+
}
|
|
8099
|
+
});
|
|
8100
|
+
module2.exports = __toCommonJS2(wrapStyleTags_exports);
|
|
8101
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_helpers = require_index_native7();
|
|
8102
|
+
function wrapStyleTags(styles, content) {
|
|
8103
|
+
return process.env.TAMAGUI_REACT_19, content;
|
|
8104
|
+
}
|
|
8105
|
+
}
|
|
8106
|
+
});
|
|
8107
|
+
|
|
8058
8108
|
// ../../core/web/dist/cjs/hooks/useDidHydrateOnce.native.js
|
|
8059
8109
|
var require_useDidHydrateOnce_native = __commonJS({
|
|
8060
8110
|
"../../core/web/dist/cjs/hooks/useDidHydrateOnce.native.js"(exports2, module2) {
|
|
@@ -8486,7 +8536,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8486
8536
|
}
|
|
8487
8537
|
});
|
|
8488
8538
|
module2.exports = __toCommonJS2(createComponent_exports);
|
|
8489
|
-
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_constants22 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_ComponentContext = require_ComponentContext_native(), import_createVariable = require_createVariable_native(), import_defaultComponentState = require_defaultComponentState_native(), import_getSplitStyles = require_getSplitStyles_native(), import_log = require_log_native(), import_mergeProps = require_mergeProps_native(), import_setElementProps = require_setElementProps_native(), import_subscribeToContextGroup = require_subscribeToContextGroup_native(), import_themeable = require_themeable_native(), import_useComponentState = require_useComponentState_native(), import_useMedia = require_useMedia_native(), import_useTheme = require_useTheme_native(), import_setupHooks = require_setupHooks_native(), import_Slot = require_Slot_native(), import_Theme = require_Theme_native(), import_ThemeDebug = require_ThemeDebug_native(), tamaguiConfig, time, debugKeyListeners, startVisualizer, componentSetStates = /* @__PURE__ */ new Set();
|
|
8539
|
+
var import_jsx_runtime6 = require("react/jsx-runtime"), import_compose_refs = require_index_native11(), import_constants4 = require_index_native6(), import_helpers = require_index_native7(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_constants22 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_ComponentContext = require_ComponentContext_native(), import_createVariable = require_createVariable_native(), import_defaultComponentState = require_defaultComponentState_native(), import_getSplitStyles = require_getSplitStyles_native(), import_log = require_log_native(), import_mergeProps = require_mergeProps_native(), import_setElementProps = require_setElementProps_native(), import_subscribeToContextGroup = require_subscribeToContextGroup_native(), import_themeable = require_themeable_native(), import_wrapStyleTags = require_wrapStyleTags_native(), import_useComponentState = require_useComponentState_native(), import_useMedia = require_useMedia_native(), import_useTheme = require_useTheme_native(), import_setupHooks = require_setupHooks_native(), import_Slot = require_Slot_native(), import_Theme = require_Theme_native(), import_ThemeDebug = require_ThemeDebug_native(), tamaguiConfig, time, debugKeyListeners, startVisualizer, componentSetStates = /* @__PURE__ */ new Set();
|
|
8490
8540
|
typeof document < "u" && (cancelTouches = function() {
|
|
8491
8541
|
componentSetStates.forEach(function(setState) {
|
|
8492
8542
|
return setState(function(prev) {
|
|
@@ -8936,7 +8986,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8936
8986
|
children: content
|
|
8937
8987
|
});
|
|
8938
8988
|
}
|
|
8939
|
-
|
|
8989
|
+
var { rulesToInsert } = splitStyles;
|
|
8940
8990
|
if (process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile") {
|
|
8941
8991
|
var element1 = typeof elementType == "string" ? elementType : "Component", title = `render <${element1} /> (${internalID}) with props`;
|
|
8942
8992
|
if (import_constants4.isWeb) {
|
|
@@ -10263,46 +10313,44 @@ var require_styled_native = __commonJS({
|
|
|
10263
10313
|
function styled8(ComponentIn, options, staticExtractionOptions) {
|
|
10264
10314
|
if (process.env.NODE_ENV !== "production" && !ComponentIn) throw new Error("No component given to styled()");
|
|
10265
10315
|
var parentStaticConfig = ComponentIn.staticConfig, isPlainStyledComponent = !!parentStaticConfig && !(parentStaticConfig.isReactNative || parentStaticConfig.isHOC), isNonStyledHOC = (parentStaticConfig == null ? void 0 : parentStaticConfig.isHOC) && !(parentStaticConfig != null && parentStaticConfig.isStyledHOC), Component = isNonStyledHOC || isPlainStyledComponent ? ComponentIn : (parentStaticConfig == null ? void 0 : parentStaticConfig.Component) || ComponentIn, reactNativeConfig = parentStaticConfig ? void 0 : (0, import_setupReactNative.getReactNativeConfig)(Component), isReactNative = !!(reactNativeConfig || staticExtractionOptions != null && staticExtractionOptions.isReactNative || parentStaticConfig != null && parentStaticConfig.isReactNative), staticConfigProps = function() {
|
|
10266
|
-
|
|
10267
|
-
|
|
10268
|
-
|
|
10269
|
-
|
|
10270
|
-
|
|
10271
|
-
|
|
10272
|
-
|
|
10273
|
-
|
|
10274
|
-
parentStaticConfig.defaultVariants && key2 in parentStaticConfig.defaultVariants && (!defaultVariants || !(key2 in defaultVariants)) && (parentDefaultVariants || (parentDefaultVariants = {}), parentDefaultVariants[key2] = val), key2 in defaultProps || (parentDefaultProps || (parentDefaultProps = {}), parentDefaultProps[key2] = pdp[key2]);
|
|
10275
|
-
}
|
|
10276
|
-
parentStaticConfig.variants && (variants = (0, import_mergeVariants.mergeVariants)(parentStaticConfig.variants, variants));
|
|
10316
|
+
var { variants, name, defaultVariants, acceptsClassName: acceptsClassNameProp, context, ...defaultProps } = options || {}, parentDefaultVariants, parentDefaultProps;
|
|
10317
|
+
if (parentStaticConfig) {
|
|
10318
|
+
var avoid = parentStaticConfig.isHOC && !parentStaticConfig.isStyledHOC;
|
|
10319
|
+
if (!avoid) {
|
|
10320
|
+
var pdp = parentStaticConfig.defaultProps;
|
|
10321
|
+
for (var key2 in pdp) {
|
|
10322
|
+
var val = pdp[key2];
|
|
10323
|
+
parentStaticConfig.defaultVariants && key2 in parentStaticConfig.defaultVariants && (!defaultVariants || !(key2 in defaultVariants)) && (parentDefaultVariants || (parentDefaultVariants = {}), parentDefaultVariants[key2] = val), key2 in defaultProps || (parentDefaultProps || (parentDefaultProps = {}), parentDefaultProps[key2] = pdp[key2]);
|
|
10277
10324
|
}
|
|
10325
|
+
parentStaticConfig.variants && (variants = (0, import_mergeVariants.mergeVariants)(parentStaticConfig.variants, variants));
|
|
10278
10326
|
}
|
|
10279
|
-
(parentDefaultProps || defaultVariants || parentDefaultVariants) && (defaultProps = {
|
|
10280
|
-
...parentDefaultProps,
|
|
10281
|
-
...parentDefaultVariants,
|
|
10282
|
-
...defaultProps,
|
|
10283
|
-
...defaultVariants
|
|
10284
|
-
}), parentStaticConfig != null && parentStaticConfig.isHOC && name && (defaultProps.componentName = name);
|
|
10285
|
-
var isText = !!(staticExtractionOptions != null && staticExtractionOptions.isText || parentStaticConfig != null && parentStaticConfig.isText), _staticExtractionOptions_acceptsClassName, _ref, acceptsClassName = (_ref = (_staticExtractionOptions_acceptsClassName = staticExtractionOptions == null ? void 0 : staticExtractionOptions.acceptsClassName) !== null && _staticExtractionOptions_acceptsClassName !== void 0 ? _staticExtractionOptions_acceptsClassName : acceptsClassNameProp) !== null && _ref !== void 0 ? _ref : isPlainStyledComponent || isReactNative || (parentStaticConfig == null ? void 0 : parentStaticConfig.isHOC) && (parentStaticConfig == null ? void 0 : parentStaticConfig.acceptsClassName), conf = {
|
|
10286
|
-
...parentStaticConfig,
|
|
10287
|
-
...staticExtractionOptions,
|
|
10288
|
-
...!isPlainStyledComponent && {
|
|
10289
|
-
Component
|
|
10290
|
-
},
|
|
10291
|
-
// @ts-expect-error
|
|
10292
|
-
variants,
|
|
10293
|
-
defaultProps,
|
|
10294
|
-
defaultVariants,
|
|
10295
|
-
componentName: name || (parentStaticConfig == null ? void 0 : parentStaticConfig.componentName),
|
|
10296
|
-
isReactNative,
|
|
10297
|
-
isText,
|
|
10298
|
-
acceptsClassName,
|
|
10299
|
-
context,
|
|
10300
|
-
...reactNativeConfig,
|
|
10301
|
-
isStyledHOC: !!(parentStaticConfig != null && parentStaticConfig.isHOC),
|
|
10302
|
-
parentStaticConfig
|
|
10303
|
-
};
|
|
10304
|
-
return (defaultProps.children || !acceptsClassName || context) && (conf.neverFlatten = !0), conf;
|
|
10305
10327
|
}
|
|
10328
|
+
(parentDefaultProps || defaultVariants || parentDefaultVariants) && (defaultProps = {
|
|
10329
|
+
...parentDefaultProps,
|
|
10330
|
+
...parentDefaultVariants,
|
|
10331
|
+
...defaultProps,
|
|
10332
|
+
...defaultVariants
|
|
10333
|
+
}), parentStaticConfig != null && parentStaticConfig.isHOC && name && (defaultProps.componentName = name);
|
|
10334
|
+
var isText = !!(staticExtractionOptions != null && staticExtractionOptions.isText || parentStaticConfig != null && parentStaticConfig.isText), _staticExtractionOptions_acceptsClassName, _ref, acceptsClassName = (_ref = (_staticExtractionOptions_acceptsClassName = staticExtractionOptions == null ? void 0 : staticExtractionOptions.acceptsClassName) !== null && _staticExtractionOptions_acceptsClassName !== void 0 ? _staticExtractionOptions_acceptsClassName : acceptsClassNameProp) !== null && _ref !== void 0 ? _ref : isPlainStyledComponent || isReactNative || (parentStaticConfig == null ? void 0 : parentStaticConfig.isHOC) && (parentStaticConfig == null ? void 0 : parentStaticConfig.acceptsClassName), conf = {
|
|
10335
|
+
...parentStaticConfig,
|
|
10336
|
+
...staticExtractionOptions,
|
|
10337
|
+
...!isPlainStyledComponent && {
|
|
10338
|
+
Component
|
|
10339
|
+
},
|
|
10340
|
+
// @ts-expect-error
|
|
10341
|
+
variants,
|
|
10342
|
+
defaultProps,
|
|
10343
|
+
defaultVariants,
|
|
10344
|
+
componentName: name || (parentStaticConfig == null ? void 0 : parentStaticConfig.componentName),
|
|
10345
|
+
isReactNative,
|
|
10346
|
+
isText,
|
|
10347
|
+
acceptsClassName,
|
|
10348
|
+
context,
|
|
10349
|
+
...reactNativeConfig,
|
|
10350
|
+
isStyledHOC: !!(parentStaticConfig != null && parentStaticConfig.isHOC),
|
|
10351
|
+
parentStaticConfig
|
|
10352
|
+
};
|
|
10353
|
+
return (defaultProps.children || !acceptsClassName || context) && (conf.neverFlatten = !0), conf;
|
|
10306
10354
|
}(), component = (0, import_createComponent.createComponent)(staticConfigProps || {});
|
|
10307
10355
|
for (var key in ComponentIn) key !== "propTypes" && (key in component || (component[key] = ComponentIn[key]));
|
|
10308
10356
|
return component;
|
|
@@ -11663,6 +11711,7 @@ var require_index_native14 = __commonJS({
|
|
|
11663
11711
|
__reExport2(src_exports2, require_themeable_native(), module2.exports);
|
|
11664
11712
|
__reExport2(src_exports2, require_themes_native(), module2.exports);
|
|
11665
11713
|
__reExport2(src_exports2, require_transformsToString_native(), module2.exports);
|
|
11714
|
+
__reExport2(src_exports2, require_wrapStyleTags_native(), module2.exports);
|
|
11666
11715
|
var import_useMedia = require_useMedia_native();
|
|
11667
11716
|
__reExport2(src_exports2, require_useTheme_native(), module2.exports);
|
|
11668
11717
|
__reExport2(src_exports2, require_useThemeName_native(), module2.exports);
|
|
@@ -15613,7 +15662,7 @@ var require_Adapt_native = __commonJS({
|
|
|
15613
15662
|
var { platform: platform2, when, children } = param, context = import_react3.default.useContext(AdaptParentContext), media = (0, import_core12.useMedia)(), enabled = !1;
|
|
15614
15663
|
return typeof when == "function" ? enabled = when({
|
|
15615
15664
|
media
|
|
15616
|
-
}) : (platform2 === "touch"
|
|
15665
|
+
}) : (enabled = !platform2, platform2 === "touch" && (enabled = import_constants4.isTouchable), platform2 === "native" && (enabled = !import_constants4.isWeb), platform2 === "web" && (enabled = import_constants4.isWeb), platform2 === "ios" && (enabled = import_constants4.isIos), platform2 === "android" && (enabled = import_constants4.isAndroid), when && !media[when] && (enabled = !1)), (0, import_constants4.useIsomorphicLayoutEffect)(function() {
|
|
15617
15666
|
if (enabled) return context == null || context.setWhen(when || enabled), function() {
|
|
15618
15667
|
context == null || context.setWhen(null);
|
|
15619
15668
|
};
|