@tamagui/core 1.144.0 → 2.0.0-1767740890268
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.cjs +242 -374
- package/dist/test.native.cjs +242 -374
- package/package.json +11 -11
package/dist/native.cjs
CHANGED
|
@@ -278,7 +278,8 @@ var ComponentContext = createStyledContext({
|
|
|
278
278
|
inText: false,
|
|
279
279
|
language: null,
|
|
280
280
|
animationDriver: null,
|
|
281
|
-
setParentFocusState: null
|
|
281
|
+
setParentFocusState: null,
|
|
282
|
+
insets: null
|
|
282
283
|
}), useConfiguration = function() {
|
|
283
284
|
return React.useContext(ComponentContext);
|
|
284
285
|
};
|
|
@@ -987,7 +988,7 @@ function getTouchFromResponderEvent(event) {
|
|
|
987
988
|
var _event$nativeEvent = event.nativeEvent, changedTouches = _event$nativeEvent.changedTouches, touches = _event$nativeEvent.touches;
|
|
988
989
|
return touches != null && touches.length > 0 ? touches[0] : changedTouches != null && changedTouches.length > 0 ? changedTouches[0] : event.nativeEvent;
|
|
989
990
|
}
|
|
990
|
-
function usePressEvents(
|
|
991
|
+
function usePressEvents(_2, config) {
|
|
991
992
|
var pressResponderRef = React.useRef(null);
|
|
992
993
|
pressResponderRef.current == null && (pressResponderRef.current = new PressResponder(config));
|
|
993
994
|
var pressResponder = pressResponderRef.current;
|
|
@@ -5982,7 +5983,7 @@ const Image$1 = React__namespace.forwardRef((props, ref) => {
|
|
|
5982
5983
|
}, [uri, requestRef, updateState, onError, onLoad, onLoadEnd, onLoadStart]), /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
5983
5984
|
View$3,
|
|
5984
5985
|
__spreadProps(__spreadValues({}, rest), {
|
|
5985
|
-
accessibilityLabel,
|
|
5986
|
+
"aria-label": accessibilityLabel,
|
|
5986
5987
|
onLayout: handleLayout,
|
|
5987
5988
|
pointerEvents,
|
|
5988
5989
|
ref,
|
|
@@ -7159,7 +7160,7 @@ const Image = React__namespace.forwardRef((props, ref) => {
|
|
|
7159
7160
|
}
|
|
7160
7161
|
return abortPendingRequest;
|
|
7161
7162
|
}, [uri, requestRef, updateState, onError, onLoad, onLoadEnd, onLoadStart]), /* @__PURE__ */ jsxRuntimeExports.jsxs(View$2, __spreadProps(__spreadValues({}, rest), {
|
|
7162
|
-
accessibilityLabel,
|
|
7163
|
+
"aria-label": accessibilityLabel,
|
|
7163
7164
|
onLayout: handleLayout,
|
|
7164
7165
|
pointerEvents,
|
|
7165
7166
|
ref,
|
|
@@ -8368,7 +8369,6 @@ var THEME_NAME_SEPARATOR = "_", THEME_CLASSNAME_PREFIX = "t_", FONT_DATA_ATTRIBU
|
|
|
8368
8369
|
flexDirection: "column",
|
|
8369
8370
|
flexBasis: "auto",
|
|
8370
8371
|
boxSizing: "border-box",
|
|
8371
|
-
position: process.env.TAMAGUI_POSITION_STATIC === "1" ? "static" : "relative",
|
|
8372
8372
|
minHeight: 0,
|
|
8373
8373
|
minWidth: 0,
|
|
8374
8374
|
flexShrink: 0
|
|
@@ -8394,8 +8394,8 @@ var conf$1, getConfigFromGlobalOrLocal = function() {
|
|
|
8394
8394
|
}, getConfigMaybe = function() {
|
|
8395
8395
|
return getConfigFromGlobalOrLocal();
|
|
8396
8396
|
}, tokensMerged;
|
|
8397
|
-
function setTokens(
|
|
8398
|
-
tokensMerged =
|
|
8397
|
+
function setTokens(_2) {
|
|
8398
|
+
tokensMerged = _2;
|
|
8399
8399
|
}
|
|
8400
8400
|
var getTokens = function() {
|
|
8401
8401
|
var {
|
|
@@ -8520,6 +8520,79 @@ function resolvePlatformNames(nativeProp) {
|
|
|
8520
8520
|
) : Array.isArray(nativeProp) ? nativeProp : [nativeProp], set = new Set(platforms2);
|
|
8521
8521
|
return set.has("mobile") && (set.add("android"), set.add("ios"), set.delete("mobile")), set;
|
|
8522
8522
|
}
|
|
8523
|
+
var webOnlyStylePropsView = {
|
|
8524
|
+
transition: true,
|
|
8525
|
+
textWrap: true,
|
|
8526
|
+
backdropFilter: true,
|
|
8527
|
+
WebkitBackdropFilter: true,
|
|
8528
|
+
// These background-* props are web-only CSS, but NOT backgroundColor
|
|
8529
|
+
background: true,
|
|
8530
|
+
backgroundAttachment: true,
|
|
8531
|
+
backgroundBlendMode: true,
|
|
8532
|
+
backgroundClip: true,
|
|
8533
|
+
backgroundImage: true,
|
|
8534
|
+
backgroundOrigin: true,
|
|
8535
|
+
backgroundPosition: true,
|
|
8536
|
+
backgroundRepeat: true,
|
|
8537
|
+
backgroundSize: true,
|
|
8538
|
+
borderBottomStyle: true,
|
|
8539
|
+
borderImage: true,
|
|
8540
|
+
borderLeftStyle: true,
|
|
8541
|
+
borderRightStyle: true,
|
|
8542
|
+
borderTopStyle: true,
|
|
8543
|
+
boxSizing: true,
|
|
8544
|
+
caretColor: true,
|
|
8545
|
+
clipPath: true,
|
|
8546
|
+
contain: true,
|
|
8547
|
+
containerType: true,
|
|
8548
|
+
content: true,
|
|
8549
|
+
cursor: true,
|
|
8550
|
+
float: true,
|
|
8551
|
+
mask: true,
|
|
8552
|
+
maskBorder: true,
|
|
8553
|
+
maskBorderMode: true,
|
|
8554
|
+
maskBorderOutset: true,
|
|
8555
|
+
maskBorderRepeat: true,
|
|
8556
|
+
maskBorderSlice: true,
|
|
8557
|
+
maskBorderSource: true,
|
|
8558
|
+
maskBorderWidth: true,
|
|
8559
|
+
maskClip: true,
|
|
8560
|
+
maskComposite: true,
|
|
8561
|
+
maskImage: true,
|
|
8562
|
+
maskMode: true,
|
|
8563
|
+
maskOrigin: true,
|
|
8564
|
+
maskPosition: true,
|
|
8565
|
+
maskRepeat: true,
|
|
8566
|
+
maskSize: true,
|
|
8567
|
+
maskType: true,
|
|
8568
|
+
mixBlendMode: true,
|
|
8569
|
+
objectFit: true,
|
|
8570
|
+
objectPosition: true,
|
|
8571
|
+
outlineOffset: true,
|
|
8572
|
+
outlineStyle: true,
|
|
8573
|
+
outlineWidth: true,
|
|
8574
|
+
outlineColor: true,
|
|
8575
|
+
overflowBlock: true,
|
|
8576
|
+
overflowInline: true,
|
|
8577
|
+
overflowX: true,
|
|
8578
|
+
overflowY: true,
|
|
8579
|
+
// NOTE: pointerEvents is NOT web-only - it's a core React Native View prop (not a style)
|
|
8580
|
+
pointerEvents: true,
|
|
8581
|
+
scrollbarWidth: true,
|
|
8582
|
+
textEmphasis: true,
|
|
8583
|
+
touchAction: true,
|
|
8584
|
+
transformStyle: true,
|
|
8585
|
+
userSelect: true,
|
|
8586
|
+
willChange: true
|
|
8587
|
+
}, webOnlyStylePropsText = {
|
|
8588
|
+
whiteSpace: true,
|
|
8589
|
+
wordWrap: true,
|
|
8590
|
+
textOverflow: true,
|
|
8591
|
+
textDecorationDistance: true,
|
|
8592
|
+
cursor: true,
|
|
8593
|
+
WebkitLineClamp: true,
|
|
8594
|
+
WebkitBoxOrient: true
|
|
8595
|
+
};
|
|
8523
8596
|
var textColors = {
|
|
8524
8597
|
color: true,
|
|
8525
8598
|
textDecorationColor: true,
|
|
@@ -8623,7 +8696,7 @@ var textColors = {
|
|
|
8623
8696
|
rotateY: true,
|
|
8624
8697
|
rotateX: true,
|
|
8625
8698
|
rotateZ: true
|
|
8626
|
-
}, stylePropsView = __spreadValues(
|
|
8699
|
+
}, stylePropsView = __spreadValues(__spreadProps(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues(__spreadValues({
|
|
8627
8700
|
backfaceVisibility: true,
|
|
8628
8701
|
borderBottomEndRadius: true,
|
|
8629
8702
|
borderBottomStartRadius: true,
|
|
@@ -8709,7 +8782,9 @@ var textColors = {
|
|
|
8709
8782
|
direction: true,
|
|
8710
8783
|
shadowOffset: true,
|
|
8711
8784
|
shadowRadius: true
|
|
8712
|
-
}, tokenCategories.color), tokenCategories.radius), tokenCategories.size), tokenCategories.radius), stylePropsTransform), stylePropsUnitless), {
|
|
8785
|
+
}, tokenCategories.color), tokenCategories.radius), tokenCategories.size), tokenCategories.radius), stylePropsTransform), stylePropsUnitless), isAndroid ? {
|
|
8786
|
+
elevationAndroid: true
|
|
8787
|
+
} : {}), {
|
|
8713
8788
|
boxShadow: true,
|
|
8714
8789
|
filter: true
|
|
8715
8790
|
}), !process.env.REACT_NATIVE_PRE_77 && {
|
|
@@ -8719,9 +8794,7 @@ var textColors = {
|
|
|
8719
8794
|
outlineSpread: true,
|
|
8720
8795
|
outlineStyle: true,
|
|
8721
8796
|
outlineWidth: true
|
|
8722
|
-
}),
|
|
8723
|
-
elevationAndroid: true
|
|
8724
|
-
} : {}), stylePropsFont = {
|
|
8797
|
+
}), stylePropsFont = {
|
|
8725
8798
|
fontFamily: true,
|
|
8726
8799
|
fontSize: true,
|
|
8727
8800
|
fontStyle: true,
|
|
@@ -8738,7 +8811,6 @@ var textColors = {
|
|
|
8738
8811
|
textShadowOffset: true,
|
|
8739
8812
|
textShadowRadius: true,
|
|
8740
8813
|
userSelect: true,
|
|
8741
|
-
selectable: true,
|
|
8742
8814
|
verticalAlign: true
|
|
8743
8815
|
}), stylePropsText = __spreadValues(__spreadValues({}, stylePropsView), stylePropsTextOnly), stylePropsAll = stylePropsText, validPseudoKeys = {
|
|
8744
8816
|
enterStyle: true,
|
|
@@ -8756,14 +8828,14 @@ function _type_of$6(obj) {
|
|
|
8756
8828
|
var Decorated = Symbol(), withStaticProperties = function(component, staticProps) {
|
|
8757
8829
|
var next = (function() {
|
|
8758
8830
|
if (component[Decorated]) {
|
|
8759
|
-
var
|
|
8831
|
+
var _2 = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
8760
8832
|
return /* @__PURE__ */ React.createElement(component, __spreadProps(__spreadValues({}, props), {
|
|
8761
8833
|
ref
|
|
8762
8834
|
}));
|
|
8763
8835
|
});
|
|
8764
8836
|
for (var key in component) {
|
|
8765
8837
|
var v = component[key];
|
|
8766
|
-
|
|
8838
|
+
_2[key] = v && (typeof v > "u" ? "undefined" : _type_of$6(v)) === "object" ? __spreadValues({}, v) : v;
|
|
8767
8839
|
}
|
|
8768
8840
|
}
|
|
8769
8841
|
return component;
|
|
@@ -8871,8 +8943,7 @@ var ThemeStateContext = React.createContext(""), allListeners = /* @__PURE__ */
|
|
|
8871
8943
|
if (disable) return states.get(parentId) || {
|
|
8872
8944
|
id: "",
|
|
8873
8945
|
name: "light",
|
|
8874
|
-
theme: getConfig().themes.light
|
|
8875
|
-
inverses: 0
|
|
8946
|
+
theme: getConfig().themes.light
|
|
8876
8947
|
};
|
|
8877
8948
|
var id2 = React.useId(), subscribe2 = React.useCallback(function(cb) {
|
|
8878
8949
|
var _listenersByParent, _parentId;
|
|
@@ -8918,14 +8989,14 @@ var ThemeStateContext = React.createContext(""), allListeners = /* @__PURE__ */
|
|
|
8918
8989
|
}
|
|
8919
8990
|
return [false, next];
|
|
8920
8991
|
}
|
|
8921
|
-
var scheme = getScheme(name),
|
|
8992
|
+
var scheme = getScheme(name), isInverse = parentState && scheme !== parentState.scheme, nextState = {
|
|
8922
8993
|
id: id2,
|
|
8923
8994
|
name,
|
|
8924
8995
|
theme: themes[name],
|
|
8925
8996
|
scheme,
|
|
8926
8997
|
parentId,
|
|
8927
8998
|
parentName: parentState == null ? void 0 : parentState.name,
|
|
8928
|
-
inverses,
|
|
8999
|
+
// inverses,
|
|
8929
9000
|
isInverse,
|
|
8930
9001
|
isNew: true
|
|
8931
9002
|
};
|
|
@@ -8971,7 +9042,6 @@ function getNewThemeName() {
|
|
|
8971
9042
|
name,
|
|
8972
9043
|
reset,
|
|
8973
9044
|
componentName,
|
|
8974
|
-
inverse,
|
|
8975
9045
|
debug
|
|
8976
9046
|
} = arguments.length > 1 ? arguments[1] : void 0, forceUpdate = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
|
|
8977
9047
|
if (name && reset) throw new Error("❌004");
|
|
@@ -9012,27 +9082,13 @@ function getNewThemeName() {
|
|
|
9012
9082
|
if (!found && !nameHasScheme) {
|
|
9013
9083
|
var parentScheme = getScheme(parentName);
|
|
9014
9084
|
if (parentScheme) {
|
|
9015
|
-
|
|
9016
|
-
var _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
|
|
9085
|
+
var parentBase = parentParts.join("_"), withScheme = [componentName ? `${parentBase}_${name}_${componentName}` : void 0, `${parentBase}_${name}`, componentName ? `${parentScheme}_${name}_${componentName}` : void 0, `${parentScheme}_${name}`].filter(Boolean), _iteratorNormalCompletion1 = true, _didIteratorError1 = false, _iteratorError1 = void 0;
|
|
9017
9086
|
try {
|
|
9018
|
-
|
|
9019
|
-
var
|
|
9020
|
-
|
|
9021
|
-
|
|
9022
|
-
|
|
9023
|
-
if (potential in themes2) {
|
|
9024
|
-
found = potential;
|
|
9025
|
-
break outer;
|
|
9026
|
-
}
|
|
9027
|
-
}
|
|
9028
|
-
} catch (err) {
|
|
9029
|
-
_didIteratorError2 = true, _iteratorError2 = err;
|
|
9030
|
-
} finally {
|
|
9031
|
-
try {
|
|
9032
|
-
!_iteratorNormalCompletion2 && _iterator2.return != null && _iterator2.return();
|
|
9033
|
-
} finally {
|
|
9034
|
-
if (_didIteratorError2) throw _iteratorError2;
|
|
9035
|
-
}
|
|
9087
|
+
for (var _iterator1 = withScheme[Symbol.iterator](), _step1; !(_iteratorNormalCompletion1 = (_step1 = _iterator1.next()).done); _iteratorNormalCompletion1 = true) {
|
|
9088
|
+
var potential = _step1.value;
|
|
9089
|
+
if (potential in themes2) {
|
|
9090
|
+
found = potential;
|
|
9091
|
+
break;
|
|
9036
9092
|
}
|
|
9037
9093
|
}
|
|
9038
9094
|
} catch (err) {
|
|
@@ -9050,32 +9106,27 @@ function getNewThemeName() {
|
|
|
9050
9106
|
if (!found) if (!name && componentName) {
|
|
9051
9107
|
var potential1 = `${parentParts.join("_")}_${componentName}`;
|
|
9052
9108
|
potential1 in themes2 && (found = potential1);
|
|
9053
|
-
} else for (var max = parentParts.length,
|
|
9054
|
-
var
|
|
9109
|
+
} else for (var max = parentParts.length, i = 0; i <= max; i++) {
|
|
9110
|
+
var base = (i === 0 ? parentParts : parentParts.slice(0, -i)).join("_"), _iteratorNormalCompletion2 = true, _didIteratorError2 = false, _iteratorError2 = void 0;
|
|
9055
9111
|
try {
|
|
9056
|
-
for (var
|
|
9057
|
-
var subName1 =
|
|
9112
|
+
for (var _iterator2 = subNames[Symbol.iterator](), _step2; !(_iteratorNormalCompletion2 = (_step2 = _iterator2.next()).done); _iteratorNormalCompletion2 = true) {
|
|
9113
|
+
var subName1 = _step2.value, potential2 = base ? `${base}_${subName1}` : subName1;
|
|
9058
9114
|
if (potential2 in themes2) {
|
|
9059
9115
|
found = potential2;
|
|
9060
9116
|
break;
|
|
9061
9117
|
}
|
|
9062
9118
|
}
|
|
9063
9119
|
} catch (err) {
|
|
9064
|
-
|
|
9120
|
+
_didIteratorError2 = true, _iteratorError2 = err;
|
|
9065
9121
|
} finally {
|
|
9066
9122
|
try {
|
|
9067
|
-
!
|
|
9123
|
+
!_iteratorNormalCompletion2 && _iterator2.return != null && _iterator2.return();
|
|
9068
9124
|
} finally {
|
|
9069
|
-
if (
|
|
9125
|
+
if (_didIteratorError2) throw _iteratorError2;
|
|
9070
9126
|
}
|
|
9071
9127
|
}
|
|
9072
9128
|
if (found) break;
|
|
9073
9129
|
}
|
|
9074
|
-
if (inverse) {
|
|
9075
|
-
found || (found = parentName);
|
|
9076
|
-
var scheme1 = found.split("_")[0];
|
|
9077
|
-
found = found.replace(new RegExp(`^${scheme1}`), scheme1 === "light" ? "dark" : "light");
|
|
9078
|
-
}
|
|
9079
9130
|
return !forceUpdate && found === parentName && // if its a scheme only sub-theme, we always consider it "new" because it likely inverses
|
|
9080
9131
|
// and we want to avoid reparenting
|
|
9081
9132
|
!validSchemes[found] ? null : found;
|
|
@@ -9084,13 +9135,12 @@ var getPropsKey = function(param) {
|
|
|
9084
9135
|
var {
|
|
9085
9136
|
name,
|
|
9086
9137
|
reset,
|
|
9087
|
-
inverse,
|
|
9088
9138
|
forceClassName,
|
|
9089
9139
|
componentName
|
|
9090
9140
|
} = param;
|
|
9091
|
-
return `${name || ""}${
|
|
9141
|
+
return `${name || ""}${reset || ""}${forceClassName || ""}${componentName || ""}`;
|
|
9092
9142
|
}, hasThemeUpdatingProps = function(props) {
|
|
9093
|
-
return "
|
|
9143
|
+
return "name" in props || "reset" in props || "forceClassName" in props;
|
|
9094
9144
|
};
|
|
9095
9145
|
function doesRootSchemeMatchSystem() {
|
|
9096
9146
|
var _getRootThemeState;
|
|
@@ -9116,9 +9166,8 @@ function getThemeProxied(_props, _state, _keys) {
|
|
|
9116
9166
|
if (curState) {
|
|
9117
9167
|
var outVal = getVariable(value), {
|
|
9118
9168
|
name,
|
|
9119
|
-
scheme
|
|
9120
|
-
|
|
9121
|
-
} = curState, shouldOptimize = scheme && platform !== "web" && isIos && !curProps.deopt && getSetting("fastSchemeChange") && inverses === 0 && doesRootSchemeMatchSystem();
|
|
9169
|
+
scheme
|
|
9170
|
+
} = curState, shouldOptimize = scheme && platform !== "web" && isIos && !curProps.deopt && getSetting("fastSchemeChange") && doesRootSchemeMatchSystem();
|
|
9122
9171
|
if (shouldOptimize) {
|
|
9123
9172
|
var _config_themes_name, _config_themes_oppositeName, oppositeScheme = scheme === "dark" ? "light" : "dark", oppositeName = name.replace(scheme, oppositeScheme), color = getVariable((_config_themes_name = config.themes[name]) === null || _config_themes_name === void 0 ? void 0 : _config_themes_name[key]), oppositeColor = getVariable((_config_themes_oppositeName = config.themes[oppositeName]) === null || _config_themes_oppositeName === void 0 ? void 0 : _config_themes_oppositeName[key]), dynamicVal = getDynamicVal({
|
|
9124
9173
|
scheme,
|
|
@@ -9135,8 +9184,8 @@ function getThemeProxied(_props, _state, _keys) {
|
|
|
9135
9184
|
}));
|
|
9136
9185
|
return cache$3.set(_state.theme, proxied1), proxied1;
|
|
9137
9186
|
}
|
|
9138
|
-
var useTheme = function() {
|
|
9139
|
-
var
|
|
9187
|
+
var EMPTY = {}, useTheme = function() {
|
|
9188
|
+
var [theme] = useThemeWithState(EMPTY), res = theme;
|
|
9140
9189
|
return res;
|
|
9141
9190
|
}, useThemeWithState = function(props) {
|
|
9142
9191
|
var isRoot = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false, keys = React.useRef(null), themeState = useThemeState(props, isRoot, keys);
|
|
@@ -9201,8 +9250,8 @@ function matchMediaFallback(query2) {
|
|
|
9201
9250
|
matches: false
|
|
9202
9251
|
};
|
|
9203
9252
|
}
|
|
9204
|
-
function setupMatchMedia(
|
|
9205
|
-
matchMediaImpl =
|
|
9253
|
+
function setupMatchMedia(_2) {
|
|
9254
|
+
matchMediaImpl = _2, globalThis.matchMedia = _2;
|
|
9206
9255
|
}
|
|
9207
9256
|
exports.mediaState = // development only safeguard
|
|
9208
9257
|
{};
|
|
@@ -9214,8 +9263,7 @@ var mediaQueryConfig = {}, getMedia = function() {
|
|
|
9214
9263
|
var match = key.match(mediaKeyRegex);
|
|
9215
9264
|
return match ? match[1] : false;
|
|
9216
9265
|
}, initState, mediaKeysOrdered, getMediaKeyImportance = function(key) {
|
|
9217
|
-
|
|
9218
|
-
return conf2.settings.mediaPropOrder ? defaultMediaImportance : mediaKeysOrdered.indexOf(key) + 100;
|
|
9266
|
+
return mediaKeysOrdered.indexOf(key) + 100;
|
|
9219
9267
|
}, dispose = /* @__PURE__ */ new Set(), mediaVersion = 0, configureMedia = function(config) {
|
|
9220
9268
|
var {
|
|
9221
9269
|
media
|
|
@@ -9307,7 +9355,7 @@ function useMedia(componentContext, debug) {
|
|
|
9307
9355
|
return lastState;
|
|
9308
9356
|
}, getServerSnapshot);
|
|
9309
9357
|
return new Proxy(state, {
|
|
9310
|
-
get(
|
|
9358
|
+
get(_2, key) {
|
|
9311
9359
|
return !disableMediaTouch && typeof key == "string" && keys.add(key), Reflect.get(state, key);
|
|
9312
9360
|
}
|
|
9313
9361
|
});
|
|
@@ -9331,7 +9379,7 @@ function getMediaState(mediaGroups, layout) {
|
|
|
9331
9379
|
return res;
|
|
9332
9380
|
}
|
|
9333
9381
|
var getMediaImportanceIfMoreImportant = function(mediaKey, key, styleState, isSizeMedia) {
|
|
9334
|
-
var importance = isSizeMedia
|
|
9382
|
+
var importance = isSizeMedia ? getMediaKeyImportance(mediaKey) : defaultMediaImportance, usedKeys = styleState.usedKeys;
|
|
9335
9383
|
return !usedKeys[key] || importance > usedKeys[key] ? importance : null;
|
|
9336
9384
|
};
|
|
9337
9385
|
function camelToHyphen(str) {
|
|
@@ -9357,7 +9405,7 @@ function mediaKeyMatch(key, dimensions2) {
|
|
|
9357
9405
|
return result;
|
|
9358
9406
|
}
|
|
9359
9407
|
function getGroupPropParts(groupProp) {
|
|
9360
|
-
var mediaQueries = getMedia(), [
|
|
9408
|
+
var mediaQueries = getMedia(), [_2, name, part3, part4] = groupProp.split("-"), pseudo, media = part3 in mediaQueries ? part3 : void 0;
|
|
9361
9409
|
return media ? pseudo = part4 : pseudo = part3, {
|
|
9362
9410
|
name,
|
|
9363
9411
|
pseudo,
|
|
@@ -9368,15 +9416,15 @@ var MEDIA_SEP = "_", prefixes = null, selectors = null, groupPseudoToPseudoCSSMa
|
|
|
9368
9416
|
press: "active",
|
|
9369
9417
|
focusVisible: "focus-visible",
|
|
9370
9418
|
focusWithin: "focus-within"
|
|
9371
|
-
}, specificities = new Array(5).fill(0).map(function(
|
|
9419
|
+
}, specificities = new Array(5).fill(0).map(function(_2, i) {
|
|
9372
9420
|
return new Array(i).fill(":root").join("");
|
|
9373
9421
|
});
|
|
9374
9422
|
function getThemeOrGroupSelector(name, styleInner, isGroup, groupParts) {
|
|
9375
|
-
var isTheme = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false, precedenceImportancePrefix = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : "", selectorStart = styleInner.lastIndexOf(":root") + 5, selectorEnd = styleInner.lastIndexOf("{"), selector = styleInner.slice(selectorStart, selectorEnd), precedenceSpace = getSetting("
|
|
9423
|
+
var isTheme = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false, precedenceImportancePrefix = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : "", selectorStart = styleInner.lastIndexOf(":root") + 5, selectorEnd = styleInner.lastIndexOf("{"), selector = styleInner.slice(selectorStart, selectorEnd), precedenceSpace = getSetting("addThemeClassName") !== false && isTheme ? "" : " ", pseudoSelectorName = groupParts.pseudo ? groupPseudoToPseudoCSSMap[groupParts.pseudo] || groupParts.pseudo : void 0, pseudoSelector = pseudoSelectorName ? `:${pseudoSelectorName}` : "", presedencePrefix = `:root${precedenceImportancePrefix}${precedenceSpace}`, mediaSelector = `.t_${isGroup ? "group_" : ""}${name}${pseudoSelector}`;
|
|
9376
9424
|
return [selector, `${presedencePrefix}${mediaSelector} ${selector.replaceAll(":root", "")}`];
|
|
9377
9425
|
}
|
|
9378
9426
|
var createMediaStyle = function(styleObject, mediaKeyIn, mediaQueries, type, negate, priority) {
|
|
9379
|
-
var [
|
|
9427
|
+
var [property, , identifier, pseudoIn, rules] = styleObject, isTheme = type === "theme", isPlatform = type === "platform", isGroup = type === "group", isNonWindowMedia = isTheme || isPlatform || isGroup, negKey = negate ? "0" : "", ogPrefix = identifier.slice(0, identifier.indexOf("-") + 1), id2 = `${ogPrefix}${MEDIA_SEP}${mediaKeyIn.replace("-", "")}${negKey}${MEDIA_SEP}`, styleRule = "", groupPriority = "", groupMediaKey, containerName, nextIdentifier = identifier.replace(ogPrefix, id2), styleInner = rules.map(function(rule) {
|
|
9380
9428
|
return rule.replace(identifier, nextIdentifier);
|
|
9381
9429
|
}).join(";"), isHover = false;
|
|
9382
9430
|
if (isNonWindowMedia) {
|
|
@@ -9397,17 +9445,11 @@ var createMediaStyle = function(styleObject, mediaKeyIn, mediaQueries, type, neg
|
|
|
9397
9445
|
var mediaKeys2 = Object.keys(mediaQueries);
|
|
9398
9446
|
selectors = Object.fromEntries(mediaKeys2.map(function(key) {
|
|
9399
9447
|
return [key, mediaObjectToString(mediaQueries[key])];
|
|
9400
|
-
})),
|
|
9448
|
+
})), prefixes = Object.fromEntries(mediaKeys2.map(function(k, index2) {
|
|
9401
9449
|
return [k, new Array(index2 + 1).fill(":root").join("")];
|
|
9402
|
-
}))
|
|
9450
|
+
}));
|
|
9403
9451
|
}
|
|
9404
|
-
var mediaKey = groupMediaKey || mediaKeyIn, mediaSelector = selectors[mediaKey], screenStr = negate ? "not all and " : "", mediaQuery = `${screenStr}${mediaSelector}`, precedenceImportancePrefix = groupMediaKey ? groupPriority :
|
|
9405
|
-
// this new array should be cached
|
|
9406
|
-
specificities[priority]
|
|
9407
|
-
) : (
|
|
9408
|
-
// @ts-ignore
|
|
9409
|
-
prefixes[mediaKey]
|
|
9410
|
-
), prefix = groupMediaKey ? `@container ${containerName}` : "@media";
|
|
9452
|
+
var mediaKey = groupMediaKey || mediaKeyIn, mediaSelector = selectors[mediaKey], screenStr = negate ? "not all and " : "", mediaQuery = `${screenStr}${mediaSelector}`, precedenceImportancePrefix = groupMediaKey ? groupPriority : prefixes[mediaKey], prefix = groupMediaKey ? `@container ${containerName}` : "@media";
|
|
9411
9453
|
groupMediaKey && (styleInner = styleRule), styleInner.includes(prefix) ? styleRule = styleInner.replace("{", ` and ${mediaQuery} {`).replace("and screen and", "and") : styleRule = `${prefix} ${mediaQuery}{${precedenceImportancePrefix}${styleInner}}`, groupMediaKey && (styleRule = `@supports (contain: ${getSetting("webContainerType") || "inline-size"}) {${styleRule}}`);
|
|
9412
9454
|
}
|
|
9413
9455
|
return isHover && (styleRule = `@media (hover:hover){${styleRule}}`), [property, void 0, nextIdentifier, void 0, [styleRule]];
|
|
@@ -9474,7 +9516,7 @@ var empty = function() {
|
|
|
9474
9516
|
function scanAllSheets() {
|
|
9475
9517
|
}
|
|
9476
9518
|
process.env.TAMAGUI_BAIL_AFTER_SCANNING_X_CSS_RULES;
|
|
9477
|
-
function setNonce(
|
|
9519
|
+
function setNonce(_2) {
|
|
9478
9520
|
}
|
|
9479
9521
|
function insertStyleRules(rulesToInsert) {
|
|
9480
9522
|
}
|
|
@@ -9601,15 +9643,13 @@ var cache$1 = /* @__PURE__ */ new WeakMap(), getVariantExtras = function(styleSt
|
|
|
9601
9643
|
props,
|
|
9602
9644
|
conf: conf2,
|
|
9603
9645
|
context,
|
|
9604
|
-
theme
|
|
9605
|
-
styleProps: styleProps2
|
|
9646
|
+
theme
|
|
9606
9647
|
} = styleState, fonts = conf2.fontsParsed;
|
|
9607
9648
|
(context == null ? void 0 : context.language) && (fonts = getFontsForLanguage(conf2.fontsParsed, context.language));
|
|
9608
9649
|
var next = {
|
|
9609
9650
|
fonts,
|
|
9610
9651
|
tokens: conf2.tokensParsed,
|
|
9611
9652
|
theme,
|
|
9612
|
-
context: styleProps2 == null ? void 0 : styleProps2.styledContext,
|
|
9613
9653
|
get fontFamily() {
|
|
9614
9654
|
return getVariableValue(styleState.fontFamily || styleState.props.fontFamily) || props.fontFamily || getVariableValue(getSetting("defaultFont"));
|
|
9615
9655
|
},
|
|
@@ -9653,58 +9693,66 @@ function normalizeStyle$1(style) {
|
|
|
9653
9693
|
}
|
|
9654
9694
|
return fixStyles(res), res;
|
|
9655
9695
|
}
|
|
9656
|
-
var
|
|
9657
|
-
|
|
9658
|
-
|
|
9659
|
-
|
|
9660
|
-
|
|
9661
|
-
|
|
9662
|
-
|
|
9663
|
-
|
|
9664
|
-
|
|
9665
|
-
|
|
9666
|
-
|
|
9667
|
-
|
|
9668
|
-
|
|
9669
|
-
|
|
9670
|
-
|
|
9671
|
-
|
|
9672
|
-
|
|
9673
|
-
|
|
9674
|
-
|
|
9675
|
-
|
|
9676
|
-
|
|
9677
|
-
|
|
9678
|
-
|
|
9679
|
-
|
|
9680
|
-
|
|
9681
|
-
|
|
9682
|
-
|
|
9683
|
-
|
|
9684
|
-
|
|
9685
|
-
|
|
9686
|
-
|
|
9687
|
-
|
|
9688
|
-
|
|
9689
|
-
|
|
9690
|
-
|
|
9691
|
-
|
|
9692
|
-
|
|
9693
|
-
|
|
9694
|
-
|
|
9695
|
-
|
|
9696
|
-
|
|
9697
|
-
|
|
9698
|
-
|
|
9699
|
-
|
|
9700
|
-
|
|
9701
|
-
|
|
9702
|
-
|
|
9703
|
-
|
|
9704
|
-
|
|
9705
|
-
|
|
9706
|
-
|
|
9707
|
-
|
|
9696
|
+
var remRegex = /(-?[\d.]+)rem/g;
|
|
9697
|
+
function resolveRem(value) {
|
|
9698
|
+
var _config_settings, config = getConfig(), _config_settings_remBaseFontSize, baseFontSize = (_config_settings_remBaseFontSize = config == null || (_config_settings = config.settings) === null || _config_settings === void 0 ? void 0 : _config_settings.remBaseFontSize) !== null && _config_settings_remBaseFontSize !== void 0 ? _config_settings_remBaseFontSize : 16;
|
|
9699
|
+
if (value.endsWith("rem") && !value.includes(" ")) {
|
|
9700
|
+
var numericValue = Number.parseFloat(value);
|
|
9701
|
+
if (!Number.isNaN(numericValue)) return PixelRatio2.getFontScale() * baseFontSize * numericValue;
|
|
9702
|
+
}
|
|
9703
|
+
for (var result = 0, match; (match = remRegex.exec(value)) !== null; ) {
|
|
9704
|
+
var numericValue1 = Number.parseFloat(match[1]);
|
|
9705
|
+
Number.isNaN(numericValue1) || (result += PixelRatio2.getFontScale() * baseFontSize * numericValue1);
|
|
9706
|
+
}
|
|
9707
|
+
return remRegex.lastIndex = 0, result;
|
|
9708
|
+
}
|
|
9709
|
+
function isRemValue(value) {
|
|
9710
|
+
return typeof value == "string" && value.includes("rem");
|
|
9711
|
+
}
|
|
9712
|
+
var _c = webOnlyStylePropsView, {
|
|
9713
|
+
pointerEvents: _
|
|
9714
|
+
} = _c, webOnlyStylePropsViewWithoutPointerEvents = __objRest(_c, [
|
|
9715
|
+
"pointerEvents"
|
|
9716
|
+
]), webPropsToSkip = __spreadProps(__spreadValues(__spreadValues({}, webOnlyStylePropsViewWithoutPointerEvents), webOnlyStylePropsText), {
|
|
9717
|
+
// Web-only event handlers
|
|
9718
|
+
onClick: 1,
|
|
9719
|
+
onDoubleClick: 1,
|
|
9720
|
+
onContextMenu: 1,
|
|
9721
|
+
onMouseEnter: 1,
|
|
9722
|
+
onMouseLeave: 1,
|
|
9723
|
+
onMouseMove: 1,
|
|
9724
|
+
onMouseOver: 1,
|
|
9725
|
+
onMouseOut: 1,
|
|
9726
|
+
onMouseDown: 1,
|
|
9727
|
+
onMouseUp: 1,
|
|
9728
|
+
onWheel: 1,
|
|
9729
|
+
onKeyDown: 1,
|
|
9730
|
+
onKeyUp: 1,
|
|
9731
|
+
onKeyPress: 1,
|
|
9732
|
+
onPointerDown: 1,
|
|
9733
|
+
onPointerMove: 1,
|
|
9734
|
+
onPointerUp: 1,
|
|
9735
|
+
onPointerCancel: 1,
|
|
9736
|
+
onPointerEnter: 1,
|
|
9737
|
+
onPointerLeave: 1,
|
|
9738
|
+
onDrag: 1,
|
|
9739
|
+
onDragStart: 1,
|
|
9740
|
+
onDragEnd: 1,
|
|
9741
|
+
onDragEnter: 1,
|
|
9742
|
+
onDragLeave: 1,
|
|
9743
|
+
onDragOver: 1,
|
|
9744
|
+
onDrop: 1,
|
|
9745
|
+
onChange: 1,
|
|
9746
|
+
onInput: 1,
|
|
9747
|
+
onBeforeInput: 1,
|
|
9748
|
+
onScroll: 1,
|
|
9749
|
+
onCopy: 1,
|
|
9750
|
+
onCut: 1,
|
|
9751
|
+
onPaste: 1,
|
|
9752
|
+
// Other web-only props
|
|
9753
|
+
htmlFor: 1,
|
|
9754
|
+
dangerouslySetInnerHTML: 1
|
|
9755
|
+
});
|
|
9708
9756
|
var skipProps = {
|
|
9709
9757
|
untilMeasured: 1,
|
|
9710
9758
|
animation: 1,
|
|
@@ -9718,7 +9766,6 @@ var skipProps = {
|
|
|
9718
9766
|
style: 1,
|
|
9719
9767
|
// handled after loop so pseudos set usedKeys and override it if necessary
|
|
9720
9768
|
group: 1,
|
|
9721
|
-
themeInverse: 1,
|
|
9722
9769
|
animatePresence: 1
|
|
9723
9770
|
};
|
|
9724
9771
|
Object.assign(skipProps, webPropsToSkip);
|
|
@@ -9754,7 +9801,7 @@ var propMapper = function(key, value, styleState, disabled, map) {
|
|
|
9754
9801
|
}
|
|
9755
9802
|
styleProps2.disableExpandShorthands || key in conf2.shorthands && (key = conf2.shorthands[key]);
|
|
9756
9803
|
var originalValue = value;
|
|
9757
|
-
if (value != null && (value[0] === "$" ? value = getTokenForKey(key, value, styleProps2, styleState) : isVariable(value)
|
|
9804
|
+
if (value != null && (value[0] === "$" ? value = getTokenForKey(key, value, styleProps2, styleState) : isVariable(value) ? value = resolveVariableValue(key, value, styleProps2.resolveValues) : isRemValue(value) && (value = resolveRem(value))), value != null) {
|
|
9758
9805
|
key === "fontFamily" && lastFontFamilyToken && (styleState.fontFamily = lastFontFamilyToken);
|
|
9759
9806
|
var expanded = styleProps2.noExpand ? null : expandStyle(key, value);
|
|
9760
9807
|
if (expanded) for (var max = expanded.length, i = 0; i < max; i++) {
|
|
@@ -9838,8 +9885,8 @@ var variableToFontNameCache = /* @__PURE__ */ new WeakMap(), resolveTokensAndVar
|
|
|
9838
9885
|
for (var _iterator = variantOut[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
9839
9886
|
var [_$key, val1] = _step.value;
|
|
9840
9887
|
if (val1 != null) if (_$key in pseudoDescriptors) {
|
|
9841
|
-
var _res, _key1,
|
|
9842
|
-
(
|
|
9888
|
+
var _res, _key1, _2;
|
|
9889
|
+
(_2 = (_res = res)[_key1 = _$key]) !== null && _2 !== void 0 || (_res[_key1] = {}), Object.assign(res[_$key], val1);
|
|
9843
9890
|
} else res[_$key] = val1;
|
|
9844
9891
|
}
|
|
9845
9892
|
} catch (err) {
|
|
@@ -9860,10 +9907,7 @@ var variableToFontNameCache = /* @__PURE__ */ new WeakMap(), resolveTokensAndVar
|
|
|
9860
9907
|
continue;
|
|
9861
9908
|
}
|
|
9862
9909
|
if (typeof val == "string") {
|
|
9863
|
-
var fVal = (
|
|
9864
|
-
// SYNC WITH *1
|
|
9865
|
-
val[0] === "$" ? getTokenForKey(subKey, val, styleProps2, styleState) : val
|
|
9866
|
-
);
|
|
9910
|
+
var fVal = val[0] === "$" ? getTokenForKey(subKey, val, styleProps2, styleState) : isRemValue(val) ? resolveRem(val) : val;
|
|
9867
9911
|
res[subKey] = fVal;
|
|
9868
9912
|
continue;
|
|
9869
9913
|
}
|
|
@@ -10034,10 +10078,6 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
10034
10078
|
if (keyInit === "userSelect") keyInit = "selectable", valInit = valInit !== "none";
|
|
10035
10079
|
else if (keyInit.startsWith("data-")) return "continue";
|
|
10036
10080
|
}
|
|
10037
|
-
if (keyInit === "dataSet") {
|
|
10038
|
-
for (var keyInit1 in valInit) viewProps[`data-${hyphenate(keyInit1)}`] = valInit[keyInit1];
|
|
10039
|
-
return "continue";
|
|
10040
|
-
}
|
|
10041
10081
|
var isVariant = !isValidStyleKeyInit && variants && keyInit in variants, isStyleLikeKey = isValidStyleKeyInit || isVariant, isPseudo = keyInit in validPseudoKeys, isMedia = !isStyleLikeKey && !isPseudo ? getMediaKey(keyInit) : false, isMediaOrPseudo = !!(isMedia || isPseudo);
|
|
10042
10082
|
isMediaOrPseudo && isMedia === "group" && (keyInit = normalizeGroupKey(keyInit, groupContext));
|
|
10043
10083
|
var isStyleProp = isValidStyleKeyInit || isMediaOrPseudo || isVariant && !noExpand;
|
|
@@ -10111,9 +10151,10 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
10111
10151
|
}
|
|
10112
10152
|
if (isMedia) {
|
|
10113
10153
|
if (!val2) return;
|
|
10114
|
-
val2.space;
|
|
10115
10154
|
var mediaKeyShort = key4.slice(isMedia == "theme" ? 7 : 1);
|
|
10116
|
-
|
|
10155
|
+
hasMedia || (hasMedia = true);
|
|
10156
|
+
val2.space;
|
|
10157
|
+
if ((!hasMedia || typeof hasMedia == "boolean") && (hasMedia = /* @__PURE__ */ new Set()), hasMedia.add(mediaKeyShort), isMedia === "platform" && !isActivePlatform(key4)) return;
|
|
10117
10158
|
var priority = mediaStylesSeen;
|
|
10118
10159
|
if (mediaStylesSeen += 1, shouldDoClasses) ;
|
|
10119
10160
|
else {
|
|
@@ -10136,12 +10177,16 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
10136
10177
|
(_styleState3 = styleState).style || (_styleState3.style = {});
|
|
10137
10178
|
var scheme = mediaKeyShort, oppositeScheme = getOppositeScheme(mediaKeyShort), themeOriginalValues = styleOriginalValues.get(mediaStyle1);
|
|
10138
10179
|
for (var subKey1 in mediaStyle1) {
|
|
10139
|
-
var _$val1 = extractValueFromDynamic(mediaStyle1[subKey1], scheme),
|
|
10140
|
-
mediaStyle1[subKey1] =
|
|
10141
|
-
|
|
10142
|
-
|
|
10143
|
-
|
|
10144
|
-
|
|
10180
|
+
var _$val1 = extractValueFromDynamic(mediaStyle1[subKey1], scheme), existing = styleState.style[subKey1];
|
|
10181
|
+
if (existing == null ? void 0 : existing.dynamic) existing.dynamic[scheme] = _$val1, mediaStyle1[subKey1] = existing;
|
|
10182
|
+
else {
|
|
10183
|
+
var oppositeVal = extractValueFromDynamic(existing, oppositeScheme);
|
|
10184
|
+
mediaStyle1[subKey1] = getDynamicVal({
|
|
10185
|
+
scheme,
|
|
10186
|
+
val: _$val1,
|
|
10187
|
+
oppositeVal
|
|
10188
|
+
}), mergeStyle(styleState, subKey1, mediaStyle1[subKey1], priority, false, themeOriginalValues == null ? void 0 : themeOriginalValues[subKey1]);
|
|
10189
|
+
}
|
|
10145
10190
|
}
|
|
10146
10191
|
} else if (!(themeName === mediaKeyShort || themeName.startsWith(mediaKeyShort))) return;
|
|
10147
10192
|
} else if (isGroupMedia) {
|
|
@@ -10172,17 +10217,11 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
10172
10217
|
}
|
|
10173
10218
|
}
|
|
10174
10219
|
var mediaOriginalValues = styleOriginalValues.get(mediaStyle1);
|
|
10175
|
-
for (var subKey2 in mediaStyle1) {
|
|
10176
|
-
if (subKey2
|
|
10177
|
-
|
|
10178
|
-
|
|
10179
|
-
|
|
10180
|
-
if (subKey2[0] === "$") {
|
|
10181
|
-
if (!isActivePlatform(subKey2) || !isActiveTheme(subKey2, themeName)) continue;
|
|
10182
|
-
var subOriginalValues = styleOriginalValues.get(mediaStyle1[subKey2]);
|
|
10183
|
-
for (var subSubKey in mediaStyle1[subKey2]) mergeMediaStyle2(subSubKey, mediaStyle1[subKey2][subSubKey], subOriginalValues == null ? void 0 : subOriginalValues[subSubKey]);
|
|
10184
|
-
} else mergeMediaStyle2(subKey2, mediaStyle1[subKey2], mediaOriginalValues == null ? void 0 : mediaOriginalValues[subKey2]);
|
|
10185
|
-
}
|
|
10220
|
+
for (var subKey2 in mediaStyle1) if (subKey2 !== "space") if (subKey2[0] === "$") {
|
|
10221
|
+
if (!isActivePlatform(subKey2) || !isActiveTheme(subKey2, themeName)) continue;
|
|
10222
|
+
var subOriginalValues = styleOriginalValues.get(mediaStyle1[subKey2]);
|
|
10223
|
+
for (var subSubKey in mediaStyle1[subKey2]) mergeMediaStyle2(subSubKey, mediaStyle1[subKey2][subSubKey], subOriginalValues == null ? void 0 : subOriginalValues[subSubKey]);
|
|
10224
|
+
} else mergeMediaStyle2(subKey2, mediaStyle1[subKey2], mediaOriginalValues == null ? void 0 : mediaOriginalValues[subKey2]);
|
|
10186
10225
|
}
|
|
10187
10226
|
return;
|
|
10188
10227
|
}
|
|
@@ -10208,7 +10247,9 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
10208
10247
|
inlineWhenUnflattened,
|
|
10209
10248
|
parentStaticConfig,
|
|
10210
10249
|
acceptsClassName
|
|
10211
|
-
} = staticConfig, viewProps = {}, mediaState = styleProps2.mediaState || exports.mediaState, shouldDoClasses = acceptsClassName && isWeb, rulesToInsert = void 0, classNames = {}, pseudos = null
|
|
10250
|
+
} = staticConfig, viewProps = {}, mediaState = styleProps2.mediaState || exports.mediaState, shouldDoClasses = acceptsClassName && isWeb, rulesToInsert = void 0, classNames = {}, pseudos = null;
|
|
10251
|
+
props.space;
|
|
10252
|
+
var hasMedia = false, dynamicThemeAccess, pseudoGroups, mediaGroups;
|
|
10212
10253
|
props.className || "";
|
|
10213
10254
|
var mediaStylesSeen = 0, validStyles$1 = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? stylePropsText : validStyles);
|
|
10214
10255
|
var styleState = {
|
|
@@ -10230,7 +10271,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
10230
10271
|
fallbackProps
|
|
10231
10272
|
} = styleProps2;
|
|
10232
10273
|
fallbackProps && (styleState.props = new Proxy(props, {
|
|
10233
|
-
get(
|
|
10274
|
+
get(_2, key4, val2) {
|
|
10234
10275
|
return Reflect.has(props, key4) ? Reflect.get(props, key4) : Reflect.get(fallbackProps, key4);
|
|
10235
10276
|
}
|
|
10236
10277
|
}));
|
|
@@ -10272,8 +10313,8 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
10272
10313
|
}
|
|
10273
10314
|
}
|
|
10274
10315
|
if (viewProps.tabIndex === 0) {
|
|
10275
|
-
var
|
|
10276
|
-
(
|
|
10316
|
+
var _viewProps, _accessible;
|
|
10317
|
+
(_accessible = (_viewProps = viewProps).accessible) !== null && _accessible !== void 0 || (_viewProps.accessible = true);
|
|
10277
10318
|
}
|
|
10278
10319
|
var style1 = styleState.style;
|
|
10279
10320
|
if (style1 == null ? void 0 : style1.fontFamily) {
|
|
@@ -10284,7 +10325,6 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
10284
10325
|
}
|
|
10285
10326
|
}
|
|
10286
10327
|
var result = {
|
|
10287
|
-
space,
|
|
10288
10328
|
hasMedia,
|
|
10289
10329
|
fontFamily: styleState.fontFamily,
|
|
10290
10330
|
viewProps,
|
|
@@ -10384,11 +10424,8 @@ var defaultColor = process.env.TAMAGUI_DEFAULT_COLOR || "rgba(0,0,0,0)", animata
|
|
|
10384
10424
|
x: 0,
|
|
10385
10425
|
y: 0,
|
|
10386
10426
|
borderRadius: 0
|
|
10387
|
-
})
|
|
10388
|
-
|
|
10389
|
-
}, hyphenate = function(str) {
|
|
10390
|
-
return str.replace(/[A-Z]/g, lowercaseHyphenate);
|
|
10391
|
-
}, mergeTransform = function(obj, key, val) {
|
|
10427
|
+
});
|
|
10428
|
+
var mergeTransform = function(obj, key, val) {
|
|
10392
10429
|
var backwards = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false, _obj;
|
|
10393
10430
|
typeof obj.transform != "string" && ((_obj = obj).transform || (_obj.transform = []), obj.transform[backwards ? "unshift" : "push"]({
|
|
10394
10431
|
[mapTransformKeys[key] || key]: val
|
|
@@ -10502,7 +10539,7 @@ var Theme = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
|
10502
10539
|
if (props.disable) return props.children;
|
|
10503
10540
|
var {
|
|
10504
10541
|
passThrough
|
|
10505
|
-
} = props, isRoot = !!props._isRoot, [
|
|
10542
|
+
} = props, isRoot = !!props._isRoot, [_2, themeState] = useThemeWithState(props, isRoot), disableDirectChildTheme = props["disable-child-theme"], finalChildren = disableDirectChildTheme ? React.Children.map(props.children, function(child) {
|
|
10506
10543
|
return passThrough ? child : /* @__PURE__ */ React.cloneElement(child, {
|
|
10507
10544
|
"data-disable-theme": true
|
|
10508
10545
|
});
|
|
@@ -10551,12 +10588,10 @@ function getThemedChildren(themeState, children, props) {
|
|
|
10551
10588
|
function themeable(Component, staticConfig) {
|
|
10552
10589
|
var optimize = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false, withThemeComponent = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
10553
10590
|
var _a = props, {
|
|
10554
|
-
themeInverse,
|
|
10555
10591
|
theme,
|
|
10556
10592
|
componentName,
|
|
10557
10593
|
themeReset
|
|
10558
10594
|
} = _a, rest = __objRest(_a, [
|
|
10559
|
-
"themeInverse",
|
|
10560
10595
|
"theme",
|
|
10561
10596
|
"componentName",
|
|
10562
10597
|
"themeReset"
|
|
@@ -10573,7 +10608,7 @@ function themeable(Component, staticConfig) {
|
|
|
10573
10608
|
"data-disable-theme": true
|
|
10574
10609
|
}))
|
|
10575
10610
|
), filteredProps = null, compName = componentName || (staticConfig == null ? void 0 : staticConfig.componentName);
|
|
10576
|
-
if (compName && (filteredProps || (filteredProps = {}), filteredProps.componentName = compName), "debug" in props && (filteredProps || (filteredProps = {}), filteredProps.debug = props.debug), "theme" in props && (filteredProps || (filteredProps = {}), filteredProps.name = props.theme), "
|
|
10611
|
+
if (compName && (filteredProps || (filteredProps = {}), filteredProps.componentName = compName), "debug" in props && (filteredProps || (filteredProps = {}), filteredProps.debug = props.debug), "theme" in props && (filteredProps || (filteredProps = {}), filteredProps.name = props.theme), "themeReset" in props && (filteredProps || (filteredProps = {}), filteredProps.reset = themeReset), optimize && !filteredProps) return element;
|
|
10577
10612
|
var contents = /* @__PURE__ */ jsxRuntimeExports.jsx(Theme, __spreadProps(__spreadValues({
|
|
10578
10613
|
"disable-child-theme": true
|
|
10579
10614
|
}, filteredProps), {
|
|
@@ -10649,7 +10684,7 @@ var useComponentState = function(props, animationDriver, staticConfig, config) {
|
|
|
10649
10684
|
var states2 = React.useState(initialState), state = props.forceStyle ? __spreadProps(__spreadValues({}, states2[0]), {
|
|
10650
10685
|
[props.forceStyle]: true
|
|
10651
10686
|
}) : states2[0], setState = states2[1], isAnimated = willBeAnimated;
|
|
10652
|
-
disabled !== state.disabled && (disabled && Object.assign(state, defaultComponentStateMounted), state.disabled = disabled, setState(function(
|
|
10687
|
+
disabled !== state.disabled && (disabled && Object.assign(state, defaultComponentStateMounted), state.disabled = disabled, setState(function(_2) {
|
|
10653
10688
|
return __spreadValues({}, state);
|
|
10654
10689
|
}));
|
|
10655
10690
|
var groupName = props.group, setStateShallow = useCreateShallowSetState(setState, props.debug);
|
|
@@ -10845,9 +10880,9 @@ function createComponent(staticConfig) {
|
|
|
10845
10880
|
shallow: stateRef.current.themeShallow,
|
|
10846
10881
|
debug: debugProp
|
|
10847
10882
|
};
|
|
10848
|
-
if ("
|
|
10883
|
+
if ("theme" in props && (themeStateProps.name = props.theme), themeStateProps.needsUpdate = function() {
|
|
10849
10884
|
return !!stateRef.current.isListeningToTheme;
|
|
10850
|
-
}
|
|
10885
|
+
}, themeStateProps.deopt = willBeAnimated, false) ;
|
|
10851
10886
|
var [theme, themeState] = useThemeWithState(themeStateProps);
|
|
10852
10887
|
elementType = Component || elementType;
|
|
10853
10888
|
var mediaState = useMedia(componentContext);
|
|
@@ -11126,14 +11161,7 @@ function createComponent(staticConfig) {
|
|
|
11126
11161
|
});
|
|
11127
11162
|
}
|
|
11128
11163
|
(_hooks_useEvents = hooks.useEvents) === null || _hooks_useEvents === void 0 || _hooks_useEvents.call(hooks, viewProps, events, splitStyles, setStateShallow, staticConfig);
|
|
11129
|
-
var
|
|
11130
|
-
var content = !children || asChild || !splitStyles ? children : spacedChildren({
|
|
11131
|
-
separator,
|
|
11132
|
-
children,
|
|
11133
|
-
space,
|
|
11134
|
-
direction,
|
|
11135
|
-
isZStack
|
|
11136
|
-
});
|
|
11164
|
+
var content = children;
|
|
11137
11165
|
if (asChild) if (elementType = Slot, 0) ;
|
|
11138
11166
|
else Object.assign(viewProps, {
|
|
11139
11167
|
onPress,
|
|
@@ -11190,153 +11218,13 @@ function createComponent(staticConfig) {
|
|
|
11190
11218
|
isStyledHOC: false
|
|
11191
11219
|
});
|
|
11192
11220
|
}
|
|
11193
|
-
function extractable(Component2, extended) {
|
|
11194
|
-
return Component2.staticConfig = extendStyledConfig(extended), Component2.styleable = styleable, Component2;
|
|
11195
|
-
}
|
|
11196
11221
|
function styleable(Component2, options) {
|
|
11197
11222
|
var _Component_render, skipForwardRef = IS_REACT_19 && typeof Component2 == "function" && Component2.length === 1 || ((_Component_render = Component2.render) === null || _Component_render === void 0 ? void 0 : _Component_render.length) === 2, out = skipForwardRef ? Component2 : /* @__PURE__ */ React.forwardRef(Component2), extendedConfig = extendStyledConfig(options == null ? void 0 : options.staticConfig);
|
|
11198
11223
|
return out = (options == null ? void 0 : options.disableTheme) ? out : themeable(out, extendedConfig, true), (extendedConfig.memo || process.env.TAMAGUI_MEMOIZE_STYLEABLE) && (out = /* @__PURE__ */ React.memo(out)), out.staticConfig = extendedConfig, out.styleable = styleable, out;
|
|
11199
11224
|
}
|
|
11200
|
-
return res.
|
|
11201
|
-
}
|
|
11202
|
-
function Unspaced(props) {
|
|
11203
|
-
return props.children;
|
|
11225
|
+
return res.styleable = styleable, res;
|
|
11204
11226
|
}
|
|
11205
|
-
|
|
11206
|
-
var getSpacerSize = function(size, param) {
|
|
11207
|
-
var {
|
|
11208
|
-
tokens
|
|
11209
|
-
} = param;
|
|
11210
|
-
size = size === false ? 0 : size === true ? "$true" : size;
|
|
11211
|
-
var _tokens_space_size, sizePx = (_tokens_space_size = tokens.space[size]) !== null && _tokens_space_size !== void 0 ? _tokens_space_size : size;
|
|
11212
|
-
return {
|
|
11213
|
-
width: sizePx,
|
|
11214
|
-
height: sizePx,
|
|
11215
|
-
minWidth: sizePx,
|
|
11216
|
-
minHeight: sizePx
|
|
11217
|
-
};
|
|
11218
|
-
}, Spacer = createComponent({
|
|
11219
|
-
acceptsClassName: true,
|
|
11220
|
-
memo: true,
|
|
11221
|
-
componentName: "Spacer",
|
|
11222
|
-
validStyles,
|
|
11223
|
-
defaultProps: __spreadProps(__spreadValues({}, stackDefaultStyles), {
|
|
11224
|
-
// avoid nesting issues
|
|
11225
|
-
tag: "span",
|
|
11226
|
-
size: true,
|
|
11227
|
-
pointerEvents: "none"
|
|
11228
|
-
}),
|
|
11229
|
-
variants: {
|
|
11230
|
-
size: {
|
|
11231
|
-
"...": getSpacerSize
|
|
11232
|
-
},
|
|
11233
|
-
flex: {
|
|
11234
|
-
true: {
|
|
11235
|
-
flexGrow: 1
|
|
11236
|
-
}
|
|
11237
|
-
},
|
|
11238
|
-
direction: {
|
|
11239
|
-
horizontal: {
|
|
11240
|
-
height: 0,
|
|
11241
|
-
minHeight: 0
|
|
11242
|
-
},
|
|
11243
|
-
vertical: {
|
|
11244
|
-
width: 0,
|
|
11245
|
-
minWidth: 0
|
|
11246
|
-
},
|
|
11247
|
-
both: {}
|
|
11248
|
-
}
|
|
11249
|
-
}
|
|
11250
|
-
});
|
|
11251
|
-
function spacedChildren(props) {
|
|
11252
|
-
var _childrenList__type, _childrenList_, {
|
|
11253
|
-
isZStack,
|
|
11254
|
-
children,
|
|
11255
|
-
space,
|
|
11256
|
-
direction,
|
|
11257
|
-
spaceFlex,
|
|
11258
|
-
separator,
|
|
11259
|
-
ensureKeys
|
|
11260
|
-
} = props, hasSpace = !!(space || spaceFlex), hasSeparator = separator != null, areChildrenArray = Array.isArray(children);
|
|
11261
|
-
if (!ensureKeys && !(hasSpace || hasSeparator || isZStack)) return children;
|
|
11262
|
-
var childrenList = areChildrenArray ? children : React.Children.toArray(children), len = childrenList.length;
|
|
11263
|
-
if (len <= 1 && !isZStack && !(!((_childrenList_ = childrenList[0]) === null || _childrenList_ === void 0 || (_childrenList__type = _childrenList_.type) === null || _childrenList__type === void 0) && _childrenList__type.shouldForwardSpace)) return children;
|
|
11264
|
-
var final = [], _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
11265
|
-
try {
|
|
11266
|
-
for (var _iterator = childrenList.entries()[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
11267
|
-
var [index2, child] = _step.value, _child_type, isEmpty = child == null || Array.isArray(child) && child.length === 0;
|
|
11268
|
-
if (!isEmpty && /* @__PURE__ */ React.isValidElement(child) && !((_child_type = child.type) === null || _child_type === void 0) && _child_type.shouldForwardSpace && (child = /* @__PURE__ */ React.cloneElement(child, {
|
|
11269
|
-
// @ts-expect-error we explicitly know with shouldForwardSpace
|
|
11270
|
-
space,
|
|
11271
|
-
spaceFlex,
|
|
11272
|
-
separator,
|
|
11273
|
-
key: child.key
|
|
11274
|
-
})), isEmpty || !child || child.key && !isZStack ? final.push(child) : final.push(/* @__PURE__ */ jsxRuntimeExports.jsx(React.Fragment, {
|
|
11275
|
-
children: isZStack ? /* @__PURE__ */ jsxRuntimeExports.jsx(AbsoluteFill, {
|
|
11276
|
-
children: child
|
|
11277
|
-
}) : child
|
|
11278
|
-
}, `${index2}0t`)), !(isUnspaced(child) && index2 === 0) && !isZStack) {
|
|
11279
|
-
var next = childrenList[index2 + 1];
|
|
11280
|
-
next && !isEmpty && !isUnspaced(next) && (separator ? (hasSpace && final.push(createSpacer({
|
|
11281
|
-
key: `_${index2}_00t`,
|
|
11282
|
-
direction,
|
|
11283
|
-
space,
|
|
11284
|
-
spaceFlex
|
|
11285
|
-
})), final.push(/* @__PURE__ */ jsxRuntimeExports.jsx(React.Fragment, {
|
|
11286
|
-
children: separator
|
|
11287
|
-
}, `${index2}03t`)), hasSpace && final.push(createSpacer({
|
|
11288
|
-
key: `_${index2}01t`,
|
|
11289
|
-
direction,
|
|
11290
|
-
space,
|
|
11291
|
-
spaceFlex
|
|
11292
|
-
}))) : final.push(createSpacer({
|
|
11293
|
-
key: `_${index2}02t`,
|
|
11294
|
-
direction,
|
|
11295
|
-
space,
|
|
11296
|
-
spaceFlex
|
|
11297
|
-
})));
|
|
11298
|
-
}
|
|
11299
|
-
}
|
|
11300
|
-
} catch (err) {
|
|
11301
|
-
_didIteratorError = true, _iteratorError = err;
|
|
11302
|
-
} finally {
|
|
11303
|
-
try {
|
|
11304
|
-
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
11305
|
-
} finally {
|
|
11306
|
-
if (_didIteratorError) throw _iteratorError;
|
|
11307
|
-
}
|
|
11308
|
-
}
|
|
11309
|
-
return final;
|
|
11310
|
-
}
|
|
11311
|
-
function createSpacer(param) {
|
|
11312
|
-
var {
|
|
11313
|
-
key,
|
|
11314
|
-
direction,
|
|
11315
|
-
space,
|
|
11316
|
-
spaceFlex
|
|
11317
|
-
} = param;
|
|
11318
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(Spacer, __spreadValues({
|
|
11319
|
-
size: space,
|
|
11320
|
-
direction
|
|
11321
|
-
}, typeof spaceFlex < "u" && {
|
|
11322
|
-
flex: spaceFlex === true ? 1 : spaceFlex === false ? 0 : spaceFlex
|
|
11323
|
-
}), key);
|
|
11324
|
-
}
|
|
11325
|
-
function isUnspaced(child) {
|
|
11326
|
-
var t2 = child == null ? void 0 : child.type;
|
|
11327
|
-
return (t2 == null ? void 0 : t2.isVisuallyHidden) || (t2 == null ? void 0 : t2.isUnspaced);
|
|
11328
|
-
}
|
|
11329
|
-
var AbsoluteFill = createComponent({
|
|
11330
|
-
defaultProps: __spreadProps(__spreadValues({}, stackDefaultStyles), {
|
|
11331
|
-
flexDirection: "column",
|
|
11332
|
-
position: "absolute",
|
|
11333
|
-
top: 0,
|
|
11334
|
-
right: 0,
|
|
11335
|
-
bottom: 0,
|
|
11336
|
-
left: 0,
|
|
11337
|
-
pointerEvents: "box-none"
|
|
11338
|
-
})
|
|
11339
|
-
}), fromPx = function(val) {
|
|
11227
|
+
var fromPx = function(val) {
|
|
11340
11228
|
return typeof val == "number" ? val : typeof val == "string" ? +val.replace("px", "") : 0;
|
|
11341
11229
|
};
|
|
11342
11230
|
function getExpandedShorthands(props) {
|
|
@@ -11612,7 +11500,7 @@ function shouldTokenCategoryHaveUnits(category) {
|
|
|
11612
11500
|
return UNIT_CATEGORIES.has(category);
|
|
11613
11501
|
}
|
|
11614
11502
|
function createTamagui$1(configIn) {
|
|
11615
|
-
var _configIn_settings, existingConfig = getConfigMaybe();
|
|
11503
|
+
var _configIn_settings, _configIn_settings1, existingConfig = getConfigMaybe();
|
|
11616
11504
|
existingConfig && (configIn = __spreadValues(__spreadValues({}, existingConfig), configIn));
|
|
11617
11505
|
var tokensParsed = {}, tokens = createVariables(configIn.tokens || {});
|
|
11618
11506
|
if (configIn.tokens) {
|
|
@@ -11691,10 +11579,12 @@ function createTamagui$1(configIn) {
|
|
|
11691
11579
|
return "";
|
|
11692
11580
|
}, getNewCSS = function(opts2) {
|
|
11693
11581
|
return getCSS(__spreadValues({}, opts2));
|
|
11694
|
-
},
|
|
11582
|
+
}, defaultFontSetting = (_configIn_settings = configIn.settings) === null || _configIn_settings === void 0 ? void 0 : _configIn_settings.defaultFont, defaultFont = (function() {
|
|
11695
11583
|
var val2 = defaultFontSetting;
|
|
11696
11584
|
return (val2 == null ? void 0 : val2[0]) === "$" && (val2 = val2.slice(1)), val2;
|
|
11697
|
-
})()
|
|
11585
|
+
})();
|
|
11586
|
+
((_configIn_settings1 = configIn.settings) === null || _configIn_settings1 === void 0 ? void 0 : _configIn_settings1.defaultPosition) || "static";
|
|
11587
|
+
var defaultProps2 = configIn.defaultProps || {}, defaultFontToken = defaultFont ? `$${defaultFont}` : "", unset = __spreadValues({}, configIn.unset);
|
|
11698
11588
|
!unset.fontFamily && defaultFont && (unset.fontFamily = defaultFontToken);
|
|
11699
11589
|
var config = __spreadProps(__spreadValues({
|
|
11700
11590
|
fonts: {},
|
|
@@ -11703,17 +11593,9 @@ function createTamagui$1(configIn) {
|
|
|
11703
11593
|
animations: defaultAnimationDriver,
|
|
11704
11594
|
media: {}
|
|
11705
11595
|
}, configIn), {
|
|
11596
|
+
defaultProps: defaultProps2,
|
|
11706
11597
|
unset,
|
|
11707
11598
|
settings: __spreadValues({
|
|
11708
|
-
// move deprecated settings here so we can reference them all using `getSetting`
|
|
11709
|
-
// TODO remove this on v2
|
|
11710
|
-
disableSSR: configIn.disableSSR,
|
|
11711
|
-
defaultFont: configIn.defaultFont,
|
|
11712
|
-
disableRootThemeClass: configIn.disableRootThemeClass,
|
|
11713
|
-
onlyAllowShorthands: configIn.onlyAllowShorthands,
|
|
11714
|
-
mediaQueryDefaultActive: configIn.mediaQueryDefaultActive,
|
|
11715
|
-
themeClassNameOnRoot: configIn.themeClassNameOnRoot,
|
|
11716
|
-
cssStyleSeparator: configIn.cssStyleSeparator,
|
|
11717
11599
|
webContainerType: "inline-size"
|
|
11718
11600
|
}, configIn.settings),
|
|
11719
11601
|
tokens,
|
|
@@ -11809,9 +11691,6 @@ var builtinShorthands = {
|
|
|
11809
11691
|
ox: "overflowX",
|
|
11810
11692
|
oy: "overflowY"
|
|
11811
11693
|
};
|
|
11812
|
-
var createTheme = function(theme) {
|
|
11813
|
-
return theme;
|
|
11814
|
-
};
|
|
11815
11694
|
function createTokens(tokens) {
|
|
11816
11695
|
var _process_env_TAMAGUI_TOKEN_PREFIX;
|
|
11817
11696
|
return createVariables(tokens, (_process_env_TAMAGUI_TOKEN_PREFIX = process.env.TAMAGUI_TOKEN_PREFIX) !== null && _process_env_TAMAGUI_TOKEN_PREFIX !== void 0 ? _process_env_TAMAGUI_TOKEN_PREFIX : "t");
|
|
@@ -11840,8 +11719,6 @@ var RNConfigs = {
|
|
|
11840
11719
|
isReactNative: true
|
|
11841
11720
|
}
|
|
11842
11721
|
};
|
|
11843
|
-
function setupReactNative(rnExports) {
|
|
11844
|
-
}
|
|
11845
11722
|
var mergeVariants = function(parentVariants, ourVariants) {
|
|
11846
11723
|
var level = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0, variants = {};
|
|
11847
11724
|
for (var key in ourVariants) {
|
|
@@ -11856,13 +11733,11 @@ function styled(ComponentIn, options, config) {
|
|
|
11856
11733
|
variants,
|
|
11857
11734
|
name,
|
|
11858
11735
|
defaultVariants,
|
|
11859
|
-
acceptsClassName: acceptsClassNameProp,
|
|
11860
11736
|
context
|
|
11861
11737
|
} = _a, defaultProps2 = __objRest(_a, [
|
|
11862
11738
|
"variants",
|
|
11863
11739
|
"name",
|
|
11864
11740
|
"defaultVariants",
|
|
11865
|
-
"acceptsClassName",
|
|
11866
11741
|
"context"
|
|
11867
11742
|
]), parentDefaultVariants, parentDefaultProps;
|
|
11868
11743
|
if (parentStaticConfig) {
|
|
@@ -11877,7 +11752,7 @@ function styled(ComponentIn, options, config) {
|
|
|
11877
11752
|
}
|
|
11878
11753
|
}
|
|
11879
11754
|
(parentDefaultProps || defaultVariants || parentDefaultVariants) && (defaultProps2 = __spreadValues(__spreadValues(__spreadValues(__spreadValues({}, parentDefaultProps), parentDefaultVariants), defaultProps2), defaultVariants)), (parentStaticConfig == null ? void 0 : parentStaticConfig.isHOC) && name && (defaultProps2.componentName = name);
|
|
11880
|
-
var isText = !!((config == null ? void 0 : config.isText) || (parentStaticConfig == null ? void 0 : parentStaticConfig.isText)), _config_acceptsClassName,
|
|
11755
|
+
var isText = !!((config == null ? void 0 : config.isText) || (parentStaticConfig == null ? void 0 : parentStaticConfig.isText)), _config_acceptsClassName, acceptsClassName = (_config_acceptsClassName = config == null ? void 0 : config.acceptsClassName) !== null && _config_acceptsClassName !== void 0 ? _config_acceptsClassName : isPlainStyledComponent || isReactNative || (parentStaticConfig == null ? void 0 : parentStaticConfig.isHOC) && (parentStaticConfig == null ? void 0 : parentStaticConfig.acceptsClassName), conf2 = __spreadProps(__spreadValues(__spreadProps(__spreadValues(__spreadValues(__spreadValues({}, parentStaticConfig), config), !isPlainStyledComponent && {
|
|
11881
11756
|
Component
|
|
11882
11757
|
}), {
|
|
11883
11758
|
// @ts-expect-error
|
|
@@ -11902,6 +11777,7 @@ var useIsTouchDevice = function() {
|
|
|
11902
11777
|
return true;
|
|
11903
11778
|
};
|
|
11904
11779
|
var Stack$1 = createComponent({
|
|
11780
|
+
componentName: "Stack",
|
|
11905
11781
|
acceptsClassName: true,
|
|
11906
11782
|
defaultProps: stackDefaultStyles,
|
|
11907
11783
|
validStyles
|
|
@@ -11922,7 +11798,6 @@ function usePropsAndStyle(props, opts2) {
|
|
|
11922
11798
|
var _opts_forComponent, _opts_forComponent_staticConfig, staticConfig = (_opts_forComponent_staticConfig = opts2 == null || (_opts_forComponent = opts2.forComponent) === null || _opts_forComponent === void 0 ? void 0 : _opts_forComponent.staticConfig) !== null && _opts_forComponent_staticConfig !== void 0 ? _opts_forComponent_staticConfig : Stack$1.staticConfig, [theme, themeState] = useThemeWithState({
|
|
11923
11799
|
componentName: staticConfig.componentName,
|
|
11924
11800
|
name: "theme" in props ? props.theme : void 0,
|
|
11925
|
-
inverse: "themeInverse" in props ? props.themeInverse : void 0,
|
|
11926
11801
|
needsUpdate() {
|
|
11927
11802
|
return true;
|
|
11928
11803
|
}
|
|
@@ -11995,12 +11870,12 @@ function FontLanguage(param) {
|
|
|
11995
11870
|
}));
|
|
11996
11871
|
}
|
|
11997
11872
|
var ThemeProvider = function(props) {
|
|
11998
|
-
var
|
|
11873
|
+
var addThemeClassName = getSetting("addThemeClassName");
|
|
11874
|
+
var forceClassName = addThemeClassName === void 0;
|
|
11999
11875
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Theme, {
|
|
12000
11876
|
className: props.className,
|
|
12001
11877
|
name: props.defaultTheme,
|
|
12002
|
-
|
|
12003
|
-
forceClassName: !disableRootThemeClass && !themeClassNameOnRoot,
|
|
11878
|
+
forceClassName,
|
|
12004
11879
|
// @ts-expect-error
|
|
12005
11880
|
_isRoot: React.useId,
|
|
12006
11881
|
children: props.children
|
|
@@ -12013,20 +11888,20 @@ function TamaguiProvider$1(param) {
|
|
|
12013
11888
|
config,
|
|
12014
11889
|
className,
|
|
12015
11890
|
defaultTheme,
|
|
12016
|
-
disableRootThemeClass,
|
|
12017
11891
|
reset,
|
|
12018
|
-
|
|
11892
|
+
insets
|
|
12019
11893
|
} = param;
|
|
12020
11894
|
useIsomorphicLayoutEffect(function() {
|
|
12021
11895
|
updateMediaListeners();
|
|
12022
11896
|
}, []);
|
|
12023
|
-
var
|
|
11897
|
+
var memoizedInsets = React.useMemo(function() {
|
|
11898
|
+
return insets;
|
|
11899
|
+
}, [insets == null ? void 0 : insets.top, insets == null ? void 0 : insets.right, insets == null ? void 0 : insets.bottom, insets == null ? void 0 : insets.left]), contents = /* @__PURE__ */ jsxRuntimeExports.jsx(UnmountedClassName, {
|
|
12024
11900
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ComponentContext.Provider, {
|
|
12025
11901
|
animationDriver: config == null ? void 0 : config.animations,
|
|
11902
|
+
insets: memoizedInsets,
|
|
12026
11903
|
children: /* @__PURE__ */ jsxRuntimeExports.jsx(ThemeProvider, {
|
|
12027
|
-
|
|
12028
|
-
disableRootThemeClass: disableRootThemeClass != null ? disableRootThemeClass : getSetting("disableRootThemeClass"),
|
|
12029
|
-
defaultTheme: defaultTheme != null ? defaultTheme : config ? Object.keys(config.themes)[0] : "",
|
|
11904
|
+
defaultTheme,
|
|
12030
11905
|
reset,
|
|
12031
11906
|
className,
|
|
12032
11907
|
children
|
|
@@ -12055,16 +11930,11 @@ var ellipsisStyle = {
|
|
|
12055
11930
|
isText: true,
|
|
12056
11931
|
defaultProps: {
|
|
12057
11932
|
fontFamily: "unset",
|
|
11933
|
+
position: "static",
|
|
12058
11934
|
suppressHighlighting: true
|
|
12059
11935
|
},
|
|
12060
11936
|
inlineWhenUnflattened: /* @__PURE__ */ new Set(["fontFamily"]),
|
|
12061
11937
|
variants: {
|
|
12062
|
-
/**
|
|
12063
|
-
* @deprecated Use ellipsis instead
|
|
12064
|
-
*/
|
|
12065
|
-
ellipse: {
|
|
12066
|
-
true: ellipsisStyle
|
|
12067
|
-
},
|
|
12068
11938
|
ellipsis: {
|
|
12069
11939
|
true: ellipsisStyle
|
|
12070
11940
|
}
|
|
@@ -12073,6 +11943,7 @@ var ellipsisStyle = {
|
|
|
12073
11943
|
});
|
|
12074
11944
|
Text$1.displayName = "Text";
|
|
12075
11945
|
var View$1 = createComponent({
|
|
11946
|
+
componentName: "View",
|
|
12076
11947
|
acceptsClassName: true,
|
|
12077
11948
|
defaultProps: stackDefaultStyles,
|
|
12078
11949
|
validStyles
|
|
@@ -12617,7 +12488,6 @@ exports.MISSING_THEME_MESSAGE = MISSING_THEME_MESSAGE;
|
|
|
12617
12488
|
exports.PROP_SPLIT = PROP_SPLIT;
|
|
12618
12489
|
exports.Slot = Slot;
|
|
12619
12490
|
exports.Slottable = Slottable;
|
|
12620
|
-
exports.Spacer = Spacer;
|
|
12621
12491
|
exports.Stack = Stack;
|
|
12622
12492
|
exports.StyleObjectIdentifier = StyleObjectIdentifier;
|
|
12623
12493
|
exports.StyleObjectProperty = StyleObjectProperty;
|
|
@@ -12631,7 +12501,6 @@ exports.TamaguiProvider = TamaguiProvider;
|
|
|
12631
12501
|
exports.Text = Text;
|
|
12632
12502
|
exports.Theme = Theme;
|
|
12633
12503
|
exports.ThemeProvider = ThemeProvider;
|
|
12634
|
-
exports.Unspaced = Unspaced;
|
|
12635
12504
|
exports.View = View;
|
|
12636
12505
|
exports._disableMediaTouch = _disableMediaTouch;
|
|
12637
12506
|
exports._withStableStyle = _withStableStyle;
|
|
@@ -12647,7 +12516,6 @@ exports.createMediaStyle = createMediaStyle;
|
|
|
12647
12516
|
exports.createShorthands = createShorthands;
|
|
12648
12517
|
exports.createStyledContext = createStyledContext;
|
|
12649
12518
|
exports.createTamagui = createTamagui;
|
|
12650
|
-
exports.createTheme = createTheme;
|
|
12651
12519
|
exports.createTokens = createTokens;
|
|
12652
12520
|
exports.createVariable = createVariable;
|
|
12653
12521
|
exports.createVariables = createVariables;
|
|
@@ -12731,10 +12599,8 @@ exports.setRef = setRef;
|
|
|
12731
12599
|
exports.setupDev = setupDev;
|
|
12732
12600
|
exports.setupHooks = setupHooks;
|
|
12733
12601
|
exports.setupMatchMedia = setupMatchMedia;
|
|
12734
|
-
exports.setupReactNative = setupReactNative;
|
|
12735
12602
|
exports.shouldRenderNativePlatform = shouldRenderNativePlatform;
|
|
12736
12603
|
exports.simpleHash = simpleHash;
|
|
12737
|
-
exports.spacedChildren = spacedChildren;
|
|
12738
12604
|
exports.stackDefaultStyles = stackDefaultStyles;
|
|
12739
12605
|
exports.styleOriginalValues = styleOriginalValues;
|
|
12740
12606
|
exports.stylePropsAll = stylePropsAll;
|
|
@@ -12771,5 +12637,7 @@ exports.useThemeWithState = useThemeWithState;
|
|
|
12771
12637
|
exports.validPseudoKeys = validPseudoKeys;
|
|
12772
12638
|
exports.validStyles = validStyles;
|
|
12773
12639
|
exports.variableToString = variableToString;
|
|
12640
|
+
exports.webOnlyStylePropsText = webOnlyStylePropsText;
|
|
12641
|
+
exports.webOnlyStylePropsView = webOnlyStylePropsView;
|
|
12774
12642
|
exports.webViewFlexCompatStyles = webViewFlexCompatStyles;
|
|
12775
12643
|
exports.withStaticProperties = withStaticProperties;
|