@tamagui/core 1.114.1 → 1.114.3
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 +97 -62
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +94 -46
- package/dist/test.native.js.map +3 -3
- package/package.json +6 -6
package/dist/native.js
CHANGED
|
@@ -3703,7 +3703,9 @@ If this is intended and you are using Tamagui without any themes, you can disabl
|
|
|
3703
3703
|
if (subkey === "val") globalThis.tamaguiAvoidTracking || (process.env.NODE_ENV === "development" && debug === "verbose" && console.info(" \u{1F3A8} useTheme() tracking new key because of .val access", new Error().stack), track(keyString));
|
|
3704
3704
|
else if (subkey === "get") return function(platform) {
|
|
3705
3705
|
var outVal = (0, import_createVariable.getVariable)(val);
|
|
3706
|
-
if (platform !== "web" && import_constants2.isIos && !deopt && (0, import_config.getSetting)("fastSchemeChange") &&
|
|
3706
|
+
if (platform !== "web" && import_constants2.isIos && !deopt && (0, import_config.getSetting)("fastSchemeChange") && scheme) {
|
|
3707
|
+
var isInversed = getIsInversed(themeManager);
|
|
3708
|
+
isInversed && (scheme = scheme === "dark" ? "light" : "dark");
|
|
3707
3709
|
var oppositeThemeName = name.replace(scheme === "dark" ? "dark" : "light", scheme === "dark" ? "light" : "dark"), oppositeTheme = config.themes[oppositeThemeName], oppositeVal = (0, import_createVariable.getVariable)(oppositeTheme == null ? void 0 : oppositeTheme[keyString]);
|
|
3708
3710
|
if (oppositeVal) {
|
|
3709
3711
|
var dynamicVal = {
|
|
@@ -3715,17 +3717,13 @@ If this is intended and you are using Tamagui without any themes, you can disabl
|
|
|
3715
3717
|
return dynamicVal;
|
|
3716
3718
|
}
|
|
3717
3719
|
}
|
|
3718
|
-
|
|
3720
|
+
return process.env.NODE_ENV === "development" && debug && console.info(` \u{1F3A8} useTheme() tracking new key because of:
|
|
3719
3721
|
not web: ${platform !== "web"}
|
|
3720
3722
|
isIOS: ${import_constants2.isIos}
|
|
3721
3723
|
deopt: ${deopt}
|
|
3722
3724
|
fastScheme: ${(0, import_config.getSetting)("fastSchemeChange")}
|
|
3723
|
-
|
|
3724
|
-
`),
|
|
3725
|
-
var _themeManager_parentManager;
|
|
3726
|
-
console.info(` some parent is inversed: ${themeManager == null ? void 0 : themeManager.state.name} => ${themeManager == null || (_themeManager_parentManager = themeManager.parentManager) === null || _themeManager_parentManager === void 0 ? void 0 : _themeManager_parentManager.state.name}`);
|
|
3727
|
-
}
|
|
3728
|
-
return track(keyString), outVal;
|
|
3725
|
+
inversed: ${getIsInversed(themeManager)}
|
|
3726
|
+
`), track(keyString), outVal;
|
|
3729
3727
|
};
|
|
3730
3728
|
return Reflect.get(val, subkey);
|
|
3731
3729
|
}
|
|
@@ -3737,22 +3735,10 @@ If this is intended and you are using Tamagui without any themes, you can disabl
|
|
|
3737
3735
|
}
|
|
3738
3736
|
});
|
|
3739
3737
|
}
|
|
3740
|
-
function
|
|
3741
|
-
for (var cur = manager; cur; ) {
|
|
3738
|
+
function getIsInversed(manager) {
|
|
3739
|
+
for (var isInversed = !1, cur = manager; cur; ) {
|
|
3742
3740
|
if (!cur.parentManager) return !1;
|
|
3743
|
-
|
|
3744
|
-
|
|
3745
|
-
This means you've accessed a theme value without .get() in a child of an inversed theme.
|
|
3746
|
-
|
|
3747
|
-
This isn't necessarily a bug, but can often be due to a mistaken inverse (for example,
|
|
3748
|
-
you may have a Theme inside your TamaguiProvider with mis-matched theme values for light/dark).
|
|
3749
|
-
|
|
3750
|
-
For this reason we've added this warning. If this is intentional, you can disable it with:
|
|
3751
|
-
|
|
3752
|
-
process.env.TAMAGUI_DISABLE_INVERSE_THEME_WARNING === 1
|
|
3753
|
-
or globalThis.TAMAGUI_DITW = true
|
|
3754
|
-
`), !0;
|
|
3755
|
-
cur = cur.parentManager;
|
|
3741
|
+
cur.parentManager.state.scheme !== cur.state.scheme && (isInversed = !isInversed), cur = cur.parentManager;
|
|
3756
3742
|
}
|
|
3757
3743
|
return !1;
|
|
3758
3744
|
}
|
|
@@ -7913,6 +7899,56 @@ var require_themeable_native = __commonJS({
|
|
|
7913
7899
|
}
|
|
7914
7900
|
});
|
|
7915
7901
|
|
|
7902
|
+
// ../web/dist/cjs/helpers/wrapStyleTags.native.js
|
|
7903
|
+
var require_wrapStyleTags_native = __commonJS({
|
|
7904
|
+
"../web/dist/cjs/helpers/wrapStyleTags.native.js"(exports2, module2) {
|
|
7905
|
+
"use strict";
|
|
7906
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
7907
|
+
for (var name in all) __defProp2(target, name, {
|
|
7908
|
+
get: all[name],
|
|
7909
|
+
enumerable: !0
|
|
7910
|
+
});
|
|
7911
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
7912
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
7913
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
7914
|
+
for (var _loop = function() {
|
|
7915
|
+
var key = _step.value;
|
|
7916
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
7917
|
+
get: function() {
|
|
7918
|
+
return from[key];
|
|
7919
|
+
},
|
|
7920
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
7921
|
+
});
|
|
7922
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
7923
|
+
} catch (err) {
|
|
7924
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
7925
|
+
} finally {
|
|
7926
|
+
try {
|
|
7927
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
7928
|
+
} finally {
|
|
7929
|
+
if (_didIteratorError)
|
|
7930
|
+
throw _iteratorError;
|
|
7931
|
+
}
|
|
7932
|
+
}
|
|
7933
|
+
return to;
|
|
7934
|
+
}, __toCommonJS2 = function(mod) {
|
|
7935
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
7936
|
+
value: !0
|
|
7937
|
+
}), mod);
|
|
7938
|
+
}, wrapStyleTags_exports = {};
|
|
7939
|
+
__export2(wrapStyleTags_exports, {
|
|
7940
|
+
wrapStyleTags: function() {
|
|
7941
|
+
return wrapStyleTags;
|
|
7942
|
+
}
|
|
7943
|
+
});
|
|
7944
|
+
module2.exports = __toCommonJS2(wrapStyleTags_exports);
|
|
7945
|
+
var import_jsx_runtime = require("react/jsx-runtime"), import_helpers = require_index_native4();
|
|
7946
|
+
function wrapStyleTags(styles, content) {
|
|
7947
|
+
return process.env.TAMAGUI_REACT_19, content;
|
|
7948
|
+
}
|
|
7949
|
+
}
|
|
7950
|
+
});
|
|
7951
|
+
|
|
7916
7952
|
// ../web/dist/cjs/hooks/useDidHydrateOnce.native.js
|
|
7917
7953
|
var require_useDidHydrateOnce_native = __commonJS({
|
|
7918
7954
|
"../web/dist/cjs/hooks/useDidHydrateOnce.native.js"(exports2, module2) {
|
|
@@ -8344,7 +8380,7 @@ var require_createComponent_native = __commonJS({
|
|
|
8344
8380
|
}
|
|
8345
8381
|
});
|
|
8346
8382
|
module2.exports = __toCommonJS2(createComponent_exports);
|
|
8347
|
-
var import_jsx_runtime = require("react/jsx-runtime"), import_compose_refs = require_index_native5(), import_constants2 = require_index_native3(), import_helpers = require_index_native4(), 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();
|
|
8383
|
+
var import_jsx_runtime = require("react/jsx-runtime"), import_compose_refs = require_index_native5(), import_constants2 = require_index_native3(), import_helpers = require_index_native4(), 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();
|
|
8348
8384
|
typeof document < "u" && (cancelTouches = function() {
|
|
8349
8385
|
componentSetStates.forEach(function(setState) {
|
|
8350
8386
|
return setState(function(prev) {
|
|
@@ -8794,7 +8830,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8794
8830
|
children: content
|
|
8795
8831
|
});
|
|
8796
8832
|
}
|
|
8797
|
-
|
|
8833
|
+
var { rulesToInsert } = splitStyles;
|
|
8798
8834
|
if (process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile") {
|
|
8799
8835
|
var element1 = typeof elementType == "string" ? elementType : "Component", title = `render <${element1} /> (${internalID}) with props`;
|
|
8800
8836
|
if (import_constants2.isWeb) {
|
|
@@ -10121,46 +10157,44 @@ var require_styled_native = __commonJS({
|
|
|
10121
10157
|
function styled(ComponentIn, options, staticExtractionOptions) {
|
|
10122
10158
|
if (process.env.NODE_ENV !== "production" && !ComponentIn) throw new Error("No component given to styled()");
|
|
10123
10159
|
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() {
|
|
10124
|
-
|
|
10125
|
-
|
|
10126
|
-
|
|
10127
|
-
|
|
10128
|
-
|
|
10129
|
-
|
|
10130
|
-
|
|
10131
|
-
|
|
10132
|
-
parentStaticConfig.defaultVariants && key2 in parentStaticConfig.defaultVariants && (!defaultVariants || !(key2 in defaultVariants)) && (parentDefaultVariants || (parentDefaultVariants = {}), parentDefaultVariants[key2] = val), key2 in defaultProps || (parentDefaultProps || (parentDefaultProps = {}), parentDefaultProps[key2] = pdp[key2]);
|
|
10133
|
-
}
|
|
10134
|
-
parentStaticConfig.variants && (variants = (0, import_mergeVariants.mergeVariants)(parentStaticConfig.variants, variants));
|
|
10160
|
+
var { variants, name, defaultVariants, acceptsClassName: acceptsClassNameProp, context, ...defaultProps } = options || {}, parentDefaultVariants, parentDefaultProps;
|
|
10161
|
+
if (parentStaticConfig) {
|
|
10162
|
+
var avoid = parentStaticConfig.isHOC && !parentStaticConfig.isStyledHOC;
|
|
10163
|
+
if (!avoid) {
|
|
10164
|
+
var pdp = parentStaticConfig.defaultProps;
|
|
10165
|
+
for (var key2 in pdp) {
|
|
10166
|
+
var val = pdp[key2];
|
|
10167
|
+
parentStaticConfig.defaultVariants && key2 in parentStaticConfig.defaultVariants && (!defaultVariants || !(key2 in defaultVariants)) && (parentDefaultVariants || (parentDefaultVariants = {}), parentDefaultVariants[key2] = val), key2 in defaultProps || (parentDefaultProps || (parentDefaultProps = {}), parentDefaultProps[key2] = pdp[key2]);
|
|
10135
10168
|
}
|
|
10169
|
+
parentStaticConfig.variants && (variants = (0, import_mergeVariants.mergeVariants)(parentStaticConfig.variants, variants));
|
|
10136
10170
|
}
|
|
10137
|
-
(parentDefaultProps || defaultVariants || parentDefaultVariants) && (defaultProps = {
|
|
10138
|
-
...parentDefaultProps,
|
|
10139
|
-
...parentDefaultVariants,
|
|
10140
|
-
...defaultProps,
|
|
10141
|
-
...defaultVariants
|
|
10142
|
-
}), parentStaticConfig != null && parentStaticConfig.isHOC && name && (defaultProps.componentName = name);
|
|
10143
|
-
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 = {
|
|
10144
|
-
...parentStaticConfig,
|
|
10145
|
-
...staticExtractionOptions,
|
|
10146
|
-
...!isPlainStyledComponent && {
|
|
10147
|
-
Component
|
|
10148
|
-
},
|
|
10149
|
-
// @ts-expect-error
|
|
10150
|
-
variants,
|
|
10151
|
-
defaultProps,
|
|
10152
|
-
defaultVariants,
|
|
10153
|
-
componentName: name || (parentStaticConfig == null ? void 0 : parentStaticConfig.componentName),
|
|
10154
|
-
isReactNative,
|
|
10155
|
-
isText,
|
|
10156
|
-
acceptsClassName,
|
|
10157
|
-
context,
|
|
10158
|
-
...reactNativeConfig,
|
|
10159
|
-
isStyledHOC: !!(parentStaticConfig != null && parentStaticConfig.isHOC),
|
|
10160
|
-
parentStaticConfig
|
|
10161
|
-
};
|
|
10162
|
-
return (defaultProps.children || !acceptsClassName || context) && (conf.neverFlatten = !0), conf;
|
|
10163
10171
|
}
|
|
10172
|
+
(parentDefaultProps || defaultVariants || parentDefaultVariants) && (defaultProps = {
|
|
10173
|
+
...parentDefaultProps,
|
|
10174
|
+
...parentDefaultVariants,
|
|
10175
|
+
...defaultProps,
|
|
10176
|
+
...defaultVariants
|
|
10177
|
+
}), parentStaticConfig != null && parentStaticConfig.isHOC && name && (defaultProps.componentName = name);
|
|
10178
|
+
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 = {
|
|
10179
|
+
...parentStaticConfig,
|
|
10180
|
+
...staticExtractionOptions,
|
|
10181
|
+
...!isPlainStyledComponent && {
|
|
10182
|
+
Component
|
|
10183
|
+
},
|
|
10184
|
+
// @ts-expect-error
|
|
10185
|
+
variants,
|
|
10186
|
+
defaultProps,
|
|
10187
|
+
defaultVariants,
|
|
10188
|
+
componentName: name || (parentStaticConfig == null ? void 0 : parentStaticConfig.componentName),
|
|
10189
|
+
isReactNative,
|
|
10190
|
+
isText,
|
|
10191
|
+
acceptsClassName,
|
|
10192
|
+
context,
|
|
10193
|
+
...reactNativeConfig,
|
|
10194
|
+
isStyledHOC: !!(parentStaticConfig != null && parentStaticConfig.isHOC),
|
|
10195
|
+
parentStaticConfig
|
|
10196
|
+
};
|
|
10197
|
+
return (defaultProps.children || !acceptsClassName || context) && (conf.neverFlatten = !0), conf;
|
|
10164
10198
|
}(), component = (0, import_createComponent.createComponent)(staticConfigProps || {});
|
|
10165
10199
|
for (var key in ComponentIn) key !== "propTypes" && (key in component || (component[key] = ComponentIn[key]));
|
|
10166
10200
|
return component;
|
|
@@ -11685,6 +11719,7 @@ var require_index_native9 = __commonJS({
|
|
|
11685
11719
|
__reExport2(src_exports2, require_themeable_native(), module2.exports);
|
|
11686
11720
|
__reExport2(src_exports2, require_themes_native(), module2.exports);
|
|
11687
11721
|
__reExport2(src_exports2, require_transformsToString_native(), module2.exports);
|
|
11722
|
+
__reExport2(src_exports2, require_wrapStyleTags_native(), module2.exports);
|
|
11688
11723
|
var import_useMedia = require_useMedia_native();
|
|
11689
11724
|
__reExport2(src_exports2, require_useTheme_native(), module2.exports);
|
|
11690
11725
|
__reExport2(src_exports2, require_useThemeName_native(), module2.exports);
|