@tamagui/core 1.91.3 → 1.91.5
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 +27 -17
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +26 -16
- package/dist/test.native.js.map +2 -2
- package/package.json +6 -6
package/dist/native.js
CHANGED
|
@@ -3447,6 +3447,9 @@ var require_constants_native2 = __commonJS({
|
|
|
3447
3447
|
}), mod);
|
|
3448
3448
|
}, constants_exports = {};
|
|
3449
3449
|
__export2(constants_exports, {
|
|
3450
|
+
FONT_DATA_ATTRIBUTE_NAME: function() {
|
|
3451
|
+
return FONT_DATA_ATTRIBUTE_NAME;
|
|
3452
|
+
},
|
|
3450
3453
|
THEME_CLASSNAME_PREFIX: function() {
|
|
3451
3454
|
return THEME_CLASSNAME_PREFIX;
|
|
3452
3455
|
},
|
|
@@ -3461,7 +3464,7 @@ var require_constants_native2 = __commonJS({
|
|
|
3461
3464
|
}
|
|
3462
3465
|
});
|
|
3463
3466
|
module2.exports = __toCommonJS2(constants_exports);
|
|
3464
|
-
var THEME_NAME_SEPARATOR = "_", THEME_CLASSNAME_PREFIX = "t_", stackDefaultStyles = {}, webViewFlexCompatStyles = {
|
|
3467
|
+
var THEME_NAME_SEPARATOR = "_", THEME_CLASSNAME_PREFIX = "t_", FONT_DATA_ATTRIBUTE_NAME = "data-tamagui-font", stackDefaultStyles = {}, webViewFlexCompatStyles = {
|
|
3465
3468
|
display: "flex",
|
|
3466
3469
|
alignItems: "stretch",
|
|
3467
3470
|
flexDirection: "column",
|
|
@@ -4263,9 +4266,9 @@ If this is intended and you are using Tamagui without any themes, you can disabl
|
|
|
4263
4266
|
}
|
|
4264
4267
|
var isNewTheme2 = !!(themeManager2 !== parentManager || props.inverse);
|
|
4265
4268
|
isNewTheme2 && registerThemeManager(themeManager2);
|
|
4266
|
-
var
|
|
4269
|
+
var isWebSSR = import_constants.isWeb ? !(0, import_config.getConfig)().disableSSR : !1, mounted2 = isWebSSR ? isRoot || (prev == null ? void 0 : prev.mounted) : !0;
|
|
4267
4270
|
state2 || (isNewTheme2 ? state2 = themeManager2.state : (state2 = parentManager.state, themeManager2 = parentManager));
|
|
4268
|
-
var wasInversed = prev == null ? void 0 : prev.inversed,
|
|
4271
|
+
var wasInversed = prev == null ? void 0 : prev.inversed, isInherentlyInversed = isNewTheme2 && state2.scheme !== (parentManager == null ? void 0 : parentManager.state.scheme), inversed2 = isInherentlyInversed ? !0 : isWebSSR ? wasInversed != null ? !1 : null : props.inverse, response = {
|
|
4269
4272
|
themeManager: themeManager2,
|
|
4270
4273
|
isNewTheme: isNewTheme2,
|
|
4271
4274
|
mounted: mounted2,
|
|
@@ -4345,7 +4348,7 @@ If this is intended and you are using Tamagui without any themes, you can disabl
|
|
|
4345
4348
|
};
|
|
4346
4349
|
}, [
|
|
4347
4350
|
themeManager
|
|
4348
|
-
])), isInversingOnMount ? {
|
|
4351
|
+
])), import_constants.isWeb && isInversingOnMount ? {
|
|
4349
4352
|
isNewTheme: !1,
|
|
4350
4353
|
inversed: !1,
|
|
4351
4354
|
themeManager: parentManager,
|
|
@@ -7726,7 +7729,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7726
7729
|
if (!(isStyleProp && (props.asChild === "except-style" || props.asChild === "except-style-web"))) {
|
|
7727
7730
|
var shouldPassProp = !isStyleProp || // is in parent variants
|
|
7728
7731
|
isHOC && (parentStaticConfig == null ? void 0 : parentStaticConfig.variants) && keyInit in parentStaticConfig.variants || (inlineProps == null ? void 0 : inlineProps.has(keyInit)), parentVariant = parentStaticConfig == null || (_parentStaticConfig_variants = parentStaticConfig.variants) === null || _parentStaticConfig_variants === void 0 ? void 0 : _parentStaticConfig_variants[keyInit], isHOCShouldPassThrough = !!(isHOC && (isShorthand || isValidStyleKeyInit || isMediaOrPseudo1 || parentVariant || keyInit in import_skipProps.skipProps)), shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
|
|
7729
|
-
if (process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupCollapsed(" \u{1F511} ".concat(keyOg).concat(keyInit !== keyOg ? " (shorthand for ".concat(keyInit, ")") : "", " ").concat(shouldPassThrough ? "(pass)" : "")), (0, import_log.log)({
|
|
7732
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupEnd(), console.groupCollapsed(" \u{1F511} ".concat(keyOg).concat(keyInit !== keyOg ? " (shorthand for ".concat(keyInit, ")") : "", " ").concat(shouldPassThrough ? "(pass)" : "")), (0, import_log.log)({
|
|
7730
7733
|
isVariant,
|
|
7731
7734
|
valInit,
|
|
7732
7735
|
shouldPassProp
|
|
@@ -9266,7 +9269,16 @@ var require_createComponent_native = __commonJS({
|
|
|
9266
9269
|
});
|
|
9267
9270
|
}
|
|
9268
9271
|
}));
|
|
9269
|
-
var cancelTouches, BaseText, BaseView, hasSetupBaseViews = !1
|
|
9272
|
+
var cancelTouches, BaseText, BaseView, hasSetupBaseViews = !1, lastInteractionWasKeyboard = {
|
|
9273
|
+
value: !1
|
|
9274
|
+
};
|
|
9275
|
+
import_constants.isWeb && globalThis.document && (document.addEventListener("keydown", function() {
|
|
9276
|
+
lastInteractionWasKeyboard.value = !0;
|
|
9277
|
+
}), document.addEventListener("mousedown", function() {
|
|
9278
|
+
lastInteractionWasKeyboard.value = !1;
|
|
9279
|
+
}), document.addEventListener("mousemove", function() {
|
|
9280
|
+
lastInteractionWasKeyboard.value = !1;
|
|
9281
|
+
}));
|
|
9270
9282
|
function createComponent(staticConfig) {
|
|
9271
9283
|
var _staticConfig_defaultProps, componentName = staticConfig.componentName, config = null, defaultProps = staticConfig.defaultProps;
|
|
9272
9284
|
(0, import_config.onConfiguredOnce)(function(conf) {
|
|
@@ -9330,9 +9342,7 @@ var require_createComponent_native = __commonJS({
|
|
|
9330
9342
|
]), !1)
|
|
9331
9343
|
var timer;
|
|
9332
9344
|
process.env.NODE_ENV === "development" && time && time(_templateObject()), process.env.NODE_ENV === "development" && time && time(_templateObject1());
|
|
9333
|
-
var stateRef = (0, import_react3.useRef)({
|
|
9334
|
-
handleFocusVisible: !0
|
|
9335
|
-
});
|
|
9345
|
+
var stateRef = (0, import_react3.useRef)({});
|
|
9336
9346
|
process.env.NODE_ENV === "development" && time && time(_templateObject2());
|
|
9337
9347
|
var animationsConfig = componentContext.animationDriver, useAnimations = animationsConfig == null ? void 0 : animationsConfig.useAnimations, hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSSVars = animationsConfig == null ? void 0 : animationsConfig.supportsCSSVars, curState = stateRef.current, willBeAnimatedClient = function() {
|
|
9338
9348
|
var next = !!(hasAnimationProp && !isHOC && useAnimations);
|
|
@@ -9536,11 +9546,11 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9536
9546
|
}
|
|
9537
9547
|
var disposeGroupsListener;
|
|
9538
9548
|
if (pseudoGroups || mediaGroups) {
|
|
9539
|
-
var current = {
|
|
9549
|
+
var _componentContext_groups, current = {
|
|
9540
9550
|
pseudo: {},
|
|
9541
9551
|
media: {}
|
|
9542
9552
|
};
|
|
9543
|
-
disposeGroupsListener = componentContext.groups.subscribe(function(name2, param) {
|
|
9553
|
+
process.env.NODE_ENV === "development" && !componentContext.groups && console.debug("No context group found"), disposeGroupsListener = (_componentContext_groups = componentContext.groups) === null || _componentContext_groups === void 0 ? void 0 : _componentContext_groups.subscribe(function(name2, param) {
|
|
9544
9554
|
var layout = param.layout, pseudo = param.pseudo, persist = function() {
|
|
9545
9555
|
var group = _object_spread_props(_object_spread2({}, state.group), _define_property2({}, name2, current));
|
|
9546
9556
|
setStateShallow({
|
|
@@ -9569,7 +9579,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9569
9579
|
process.env.NODE_ENV === "development" && time && time(_templateObject14());
|
|
9570
9580
|
var events = shouldAttach ? _object_spread2(_object_spread_props(_object_spread2({
|
|
9571
9581
|
onPressOut: attachPress ? function(e) {
|
|
9572
|
-
|
|
9582
|
+
unPress(), onPressOut == null || onPressOut(e), onMouseUp == null || onMouseUp(e);
|
|
9573
9583
|
} : void 0
|
|
9574
9584
|
}, (attachHover || attachPress) && {
|
|
9575
9585
|
onMouseEnter: function(e) {
|
|
@@ -9582,7 +9592,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9582
9592
|
}
|
|
9583
9593
|
}), {
|
|
9584
9594
|
onPressIn: attachPress ? function(e) {
|
|
9585
|
-
|
|
9595
|
+
runtimePressStyle && setStateShallow({
|
|
9586
9596
|
press: !0,
|
|
9587
9597
|
pressIn: !0
|
|
9588
9598
|
}), onPressIn == null || onPressIn(e), onMouseDown == null || onMouseDown(e), import_constants.isWeb && mouseUps.add(unPress);
|
|
@@ -9599,7 +9609,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9599
9609
|
pseudos != null && pseudos.focusVisibleStyle ? setTimeout(function() {
|
|
9600
9610
|
setStateShallow({
|
|
9601
9611
|
focus: !0,
|
|
9602
|
-
focusVisible: !!
|
|
9612
|
+
focusVisible: !!lastInteractionWasKeyboard.value
|
|
9603
9613
|
});
|
|
9604
9614
|
}, 0) : setStateShallow({
|
|
9605
9615
|
focus: !0,
|
|
@@ -9607,7 +9617,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9607
9617
|
}), onFocus == null || onFocus(e);
|
|
9608
9618
|
},
|
|
9609
9619
|
onBlur: function(e) {
|
|
9610
|
-
|
|
9620
|
+
setStateShallow({
|
|
9611
9621
|
focus: !1,
|
|
9612
9622
|
focusVisible: !1
|
|
9613
9623
|
}), onBlur == null || onBlur(e);
|
|
@@ -10603,11 +10613,11 @@ var require_insertFont_native = __commonJS({
|
|
|
10603
10613
|
}
|
|
10604
10614
|
});
|
|
10605
10615
|
module2.exports = __toCommonJS2(insertFont_exports);
|
|
10606
|
-
var import_config = require_config_native(), import_createFont = require_createFont_native(), import_createVariables = require_createVariables_native(), import_registerCSSVariable = require_registerCSSVariable_native();
|
|
10616
|
+
var import_config = require_config_native(), import_constants = require_constants_native2(), import_createFont = require_createFont_native(), import_createVariables = require_createVariables_native(), import_registerCSSVariable = require_registerCSSVariable_native();
|
|
10607
10617
|
function insertFont(name, fontIn) {
|
|
10608
10618
|
var font = (0, import_createFont.createFont)(fontIn), tokened = (0, import_createVariables.createVariables)(font, name), parsed = parseFont(tokened);
|
|
10609
10619
|
if (0)
|
|
10610
|
-
var fontVars,
|
|
10620
|
+
var fontVars, styleElement;
|
|
10611
10621
|
return (0, import_config.setConfigFont)(name, tokened, parsed), parsed;
|
|
10612
10622
|
}
|
|
10613
10623
|
var updateFont = insertFont;
|