tamagui 1.91.5 → 1.92.0
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 +22 -16
- package/dist/native.js.map +2 -2
- package/dist/test.native.js +20 -14
- package/dist/test.native.js.map +2 -2
- package/package.json +54 -54
package/dist/native.js
CHANGED
|
@@ -7275,7 +7275,7 @@ var require_propMapper_native = __commonJS({
|
|
|
7275
7275
|
get: function(_, k) {
|
|
7276
7276
|
return k === "curProps" ? subProps : Reflect.get(_, k);
|
|
7277
7277
|
}
|
|
7278
|
-
}) : styleStateIn, conf = styleState.conf, styleProps = styleState.styleProps, fontFamily = styleState.fontFamily, staticConfig = styleState.staticConfig, variants = staticConfig.variants;
|
|
7278
|
+
}) : styleStateIn, conf = styleState.conf, styleProps = styleState.styleProps, fontFamily = styleState.fontFamily, staticConfig = styleState.staticConfig, skipThemeTokenResolution = styleState.skipThemeTokenResolution, variants = staticConfig.variants;
|
|
7279
7279
|
if (process.env.NODE_ENV === "development" && fontFamily && fontFamily[0] === "$" && !(fontFamily in conf.fontsParsed) && console.warn('Warning: no fontFamily "'.concat(fontFamily, '" found in config: ').concat(Object.keys(conf.fontsParsed).join(", "))), !styleProps.noExpand && variants && key in variants) {
|
|
7280
7280
|
styleState.curProps[key] = value;
|
|
7281
7281
|
var variantValue = resolveVariants(key, value, styleProps, styleState, "");
|
|
@@ -7465,9 +7465,11 @@ var require_propMapper_native = __commonJS({
|
|
|
7465
7465
|
var _theme_value, val = (_theme_value = theme == null ? void 0 : theme[value]) !== null && _theme_value !== void 0 ? _theme_value : tokensParsed[customTokenAccept][value];
|
|
7466
7466
|
val != null && (resolveAs = "value", valOrVar = val, hasSet = !0);
|
|
7467
7467
|
}
|
|
7468
|
-
if (theme && value in theme)
|
|
7469
|
-
valOrVar = theme[value],
|
|
7470
|
-
|
|
7468
|
+
if (theme && value in theme) {
|
|
7469
|
+
if (valOrVar = theme[value], styleState.skipThemeTokenResolution && valOrVar != null && valOrVar.val)
|
|
7470
|
+
return process.env.NODE_ENV === "development" && styleState.debug === "verbose" && console.info(" - keep original value: ".concat(value, " for ").concat(key, " due to enableFlattenThemeOnNative: true")), value;
|
|
7471
|
+
process.env.NODE_ENV === "development" && styleState.debug === "verbose" && console.info(" - resolving ".concat(key, " to theme value ").concat(value, ": ").concat(valOrVar == null ? void 0 : valOrVar.val)), hasSet = !0;
|
|
7472
|
+
} else {
|
|
7471
7473
|
if (value in conf.specificTokens)
|
|
7472
7474
|
hasSet = !0, valOrVar = conf.specificTokens[value];
|
|
7473
7475
|
else {
|
|
@@ -7731,7 +7733,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7731
7733
|
var _staticConfig_accept, validStyleProps = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers.stylePropsText : import_helpers.validStyles);
|
|
7732
7734
|
return validStyleProps[key] || ((_staticConfig_accept = staticConfig.accept) === null || _staticConfig_accept === void 0 ? void 0 : _staticConfig_accept[key]);
|
|
7733
7735
|
}
|
|
7734
|
-
var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, context, elementType, debug) {
|
|
7736
|
+
var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, context, elementType, debug, skipThemeTokenResolution) {
|
|
7735
7737
|
conf = conf || (0, import_config.getConfig)(), import_constants4.isWeb && styleProps.isAnimated && conf.animations.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
|
|
7736
7738
|
var shorthands = conf.shorthands, isHOC = staticConfig.isHOC, isText = staticConfig.isText, isInput = staticConfig.isInput, variants = staticConfig.variants, isReactNative = staticConfig.isReactNative, inlineProps = staticConfig.inlineProps, inlineWhenUnflattened = staticConfig.inlineWhenUnflattened, parentStaticConfig = staticConfig.parentStaticConfig, acceptsClassName = staticConfig.acceptsClassName, viewProps = {}, mediaState3 = styleProps.mediaState || import_useMedia.mediaState, usedKeys = {}, shouldDoClasses = acceptsClassName && import_constants4.isWeb && !styleProps.noClassNames, rulesToInsert = void 0, classNames = {}, transforms = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, styleState = {
|
|
7737
7739
|
curProps: {},
|
|
@@ -7746,7 +7748,8 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7746
7748
|
usedKeys,
|
|
7747
7749
|
viewProps,
|
|
7748
7750
|
context,
|
|
7749
|
-
debug
|
|
7751
|
+
debug,
|
|
7752
|
+
skipThemeTokenResolution
|
|
7750
7753
|
};
|
|
7751
7754
|
process.env.NODE_ENV === "development" && debug && debug !== "profile" && import_constants4.isClient && (console.groupCollapsed("getSplitStyles (collapsed)"), (0, import_log.log)({
|
|
7752
7755
|
props,
|
|
@@ -7826,7 +7829,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
7826
7829
|
if (!(isStyleProp && (props.asChild === "except-style" || props.asChild === "except-style-web"))) {
|
|
7827
7830
|
var shouldPassProp = !isStyleProp || // is in parent variants
|
|
7828
7831
|
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;
|
|
7829
|
-
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)({
|
|
7832
|
+
if (process.env.NODE_ENV === "development" && debug === "verbose" && (console.groupEnd(), console.groupEnd(), console.groupCollapsed(" \u{1F511} ".concat(keyOg).concat(keyInit !== keyOg ? " (shorthand for ".concat(keyInit, ")") : "", " ").concat(shouldPassThrough ? "(pass)" : "")), (0, import_log.log)({
|
|
7830
7833
|
isVariant,
|
|
7831
7834
|
valInit,
|
|
7832
7835
|
shouldPassProp
|
|
@@ -9452,7 +9455,8 @@ var require_createComponent_native = __commonJS({
|
|
|
9452
9455
|
props.accessibilityDisabled || !1;
|
|
9453
9456
|
disabled != null && (initialState.disabled = disabled);
|
|
9454
9457
|
var states = (0, import_react2.useState)(initialState), state = props.forceStyle ? _object_spread_props8(_object_spread9({}, states[0]), _define_property9({}, props.forceStyle, !0)) : states[0], setState = states[1];
|
|
9455
|
-
disabled !== state.disabled && setState(_object_spread_props8(_object_spread9({}, state), {
|
|
9458
|
+
disabled !== state.disabled && setState(_object_spread_props8(_object_spread9({}, state, import_defaultComponentState.defaultComponentState), {
|
|
9459
|
+
// removes any stale press state etc
|
|
9456
9460
|
disabled
|
|
9457
9461
|
}));
|
|
9458
9462
|
var setStateShallow = (0, import_createShallowSetState.createShallowSetState)(setState, disabled, debugProp);
|
|
@@ -9844,7 +9848,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
9844
9848
|
console.groupEnd();
|
|
9845
9849
|
}
|
|
9846
9850
|
} else {
|
|
9847
|
-
(0, import_log.log)(title), import_isDevTools.isDevTools && (0, import_log.log)("viewProps", viewProps), (0, import_log.log)("final styles:");
|
|
9851
|
+
(0, import_log.log)(title), (0, import_log.log)("state: ", state), import_isDevTools.isDevTools && (0, import_log.log)("viewProps", viewProps), (0, import_log.log)("final styles:");
|
|
9848
9852
|
for (var key2 in splitStylesStyle)
|
|
9849
9853
|
(0, import_log.log)(key2, splitStylesStyle[key2]);
|
|
9850
9854
|
}
|
|
@@ -19919,7 +19923,7 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
19919
19923
|
}
|
|
19920
19924
|
}
|
|
19921
19925
|
var hiddenSize = 10000.1, SheetImplementationCustom = (0, import_core12.themeable)(/* @__PURE__ */ (0, import_react2.forwardRef)(function(props, forwardedRef) {
|
|
19922
|
-
var parentSheet = (0, import_react2.useContext)(import_contexts.ParentSheetContext), animation = props.animation, animationConfigProp = props.animationConfig, _props_modal = props.modal, modal = _props_modal === void 0 ? !1 : _props_modal, _props_zIndex = props.zIndex, zIndex = _props_zIndex === void 0 ? parentSheet.zIndex + 1 : _props_zIndex, _props_moveOnKeyboardChange = props.moveOnKeyboardChange, moveOnKeyboardChange = _props_moveOnKeyboardChange === void 0 ? !1 : _props_moveOnKeyboardChange, _props_unmountChildrenWhenHidden = props.unmountChildrenWhenHidden, unmountChildrenWhenHidden = _props_unmountChildrenWhenHidden === void 0 ? !1 : _props_unmountChildrenWhenHidden, portalProps = props.portalProps, keyboardIsVisible = (0, import_use_keyboard_visible.useKeyboardVisible)(), state = (0, import_useSheetOpenState.useSheetOpenState)(props), _useState = _sliced_to_array((0, import_react2.useState)(null), 2), overlayComponent = _useState[0], setOverlayComponent = _useState[1], providerProps = (0, import_useSheetProviderProps.useSheetProviderProps)(props, state, {
|
|
19926
|
+
var parentSheet = (0, import_react2.useContext)(import_contexts.ParentSheetContext), animation = props.animation, animationConfigProp = props.animationConfig, _props_modal = props.modal, modal = _props_modal === void 0 ? !1 : _props_modal, _props_zIndex = props.zIndex, zIndex = _props_zIndex === void 0 ? parentSheet.zIndex + 1 : _props_zIndex, _props_moveOnKeyboardChange = props.moveOnKeyboardChange, moveOnKeyboardChange = _props_moveOnKeyboardChange === void 0 ? !1 : _props_moveOnKeyboardChange, _props_unmountChildrenWhenHidden = props.unmountChildrenWhenHidden, unmountChildrenWhenHidden = _props_unmountChildrenWhenHidden === void 0 ? !1 : _props_unmountChildrenWhenHidden, portalProps = props.portalProps, tmp = props.containerComponent, ContainerComponent = tmp === void 0 ? import_react2.Fragment : tmp, keyboardIsVisible = (0, import_use_keyboard_visible.useKeyboardVisible)(), state = (0, import_useSheetOpenState.useSheetOpenState)(props), _useState = _sliced_to_array((0, import_react2.useState)(null), 2), overlayComponent = _useState[0], setOverlayComponent = _useState[1], providerProps = (0, import_useSheetProviderProps.useSheetProviderProps)(props, state, {
|
|
19923
19927
|
onOverlayComponent: setOverlayComponent
|
|
19924
19928
|
}), frameSize = providerProps.frameSize, setFrameSize = providerProps.setFrameSize, snapPoints = providerProps.snapPoints, snapPointsMode = providerProps.snapPointsMode, hasFit = providerProps.hasFit, position = providerProps.position, setPosition = providerProps.setPosition, scrollBridge = providerProps.scrollBridge, screenSize = providerProps.screenSize, setMaxContentSize = providerProps.setMaxContentSize, maxSnapPoint = providerProps.maxSnapPoint, open = state.open, controller = state.controller, isHidden = state.isHidden, sheetRef = (0, import_react2.useRef)(null), ref = (0, import_compose_refs.useComposedRefs)(forwardedRef, sheetRef), animationConfig = function() {
|
|
19925
19929
|
var _ref = _sliced_to_array(animation ? Array.isArray(animation) ? animation : [
|
|
@@ -20156,12 +20160,14 @@ var require_SheetImplementationCustom_native = __commonJS({
|
|
|
20156
20160
|
var modalContents = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_portal2.Portal, _object_spread_props8(_object_spread9({
|
|
20157
20161
|
zIndex
|
|
20158
20162
|
}, portalProps), {
|
|
20159
|
-
children: shouldMountChildren && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
20160
|
-
|
|
20161
|
-
|
|
20162
|
-
|
|
20163
|
-
|
|
20164
|
-
|
|
20163
|
+
children: shouldMountChildren && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ContainerComponent, {
|
|
20164
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_core12.Theme, {
|
|
20165
|
+
forceClassName: !0,
|
|
20166
|
+
name: themeName,
|
|
20167
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_adapt.AdaptParentContext.Provider, {
|
|
20168
|
+
value: adaptContext,
|
|
20169
|
+
children: contents
|
|
20170
|
+
})
|
|
20165
20171
|
})
|
|
20166
20172
|
})
|
|
20167
20173
|
}));
|