@tamagui/core 1.62.3 → 1.64.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/cjs/helpers/getBoundingClientRect.js +2 -1
- package/dist/cjs/helpers/getBoundingClientRect.js.map +1 -1
- package/dist/cjs/helpers/getBoundingClientRect.native.js +2 -1
- package/dist/cjs/helpers/getBoundingClientRect.native.js.map +1 -1
- package/dist/cjs/hooks/useElementLayout.js +2 -2
- package/dist/cjs/hooks/useElementLayout.js.map +1 -1
- package/dist/cjs/hooks/useElementLayout.native.js +2 -2
- package/dist/cjs/hooks/useElementLayout.native.js.map +1 -1
- package/dist/cjs/index.native.js +1 -1
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/native.js +206 -142
- package/dist/native.js.map +3 -3
- package/package.json +6 -6
package/dist/native.js
CHANGED
|
@@ -74,9 +74,9 @@ var require_composeEventHandlers_native = __commonJS({
|
|
|
74
74
|
module2.exports = __toCommonJS2(composeEventHandlers_exports);
|
|
75
75
|
function composeEventHandlers2(og, next, { checkDefaultPrevented = !0 } = {}) {
|
|
76
76
|
return !og || !next ? next || og || void 0 : function(event) {
|
|
77
|
-
if (og
|
|
77
|
+
if (og == null || og(event), !event || !(checkDefaultPrevented && "defaultPrevented" in event) || // @ts-ignore
|
|
78
78
|
"defaultPrevented" in event && !event.defaultPrevented)
|
|
79
|
-
return next
|
|
79
|
+
return next == null ? void 0 : next(event);
|
|
80
80
|
};
|
|
81
81
|
}
|
|
82
82
|
}
|
|
@@ -522,18 +522,25 @@ var require_config_native = __commonJS({
|
|
|
522
522
|
throw new Error("Haven't called createTamagui yet");
|
|
523
523
|
let { tokens, tokensParsed } = conf;
|
|
524
524
|
return prefixed === !1 ? tokens : prefixed === !0 ? tokensParsed : tokensMerged;
|
|
525
|
-
}, getTokenObject = (value, group) =>
|
|
525
|
+
}, getTokenObject = (value, group) => {
|
|
526
|
+
var _a, _b;
|
|
527
|
+
return conf.specificTokens[value] ?? (group ? (_a = tokensMerged[group]) == null ? void 0 : _a[value] : (_b = tokensMerged[Object.keys(tokensMerged).find((cat) => tokensMerged[cat][value]) || ""]) == null ? void 0 : _b[value]);
|
|
528
|
+
}, getToken2 = (value, group, useVariable = import_constants2.isWeb) => {
|
|
526
529
|
let token = getTokenObject(value, group);
|
|
527
|
-
return useVariable ? token
|
|
530
|
+
return useVariable ? token == null ? void 0 : token.variable : token == null ? void 0 : token.val;
|
|
528
531
|
}, getTokenValue2 = (value, group) => getToken2(value, group, !1), useTokens = getTokens2, getThemes2 = () => conf.themes, configListeners = /* @__PURE__ */ new Set(), onConfiguredOnce = (cb) => {
|
|
529
532
|
conf ? cb(conf) : configListeners.add(cb);
|
|
530
533
|
}, updateConfig2 = (key, value) => {
|
|
531
534
|
Object.assign(conf[key], value);
|
|
532
535
|
}, getFont = (name) => {
|
|
536
|
+
var _a;
|
|
533
537
|
let conf2 = getConfig2();
|
|
534
|
-
return conf2.fontsParsed[name] ?? Object.entries(conf2.fontsParsed).find(
|
|
535
|
-
([k]) =>
|
|
536
|
-
|
|
538
|
+
return conf2.fontsParsed[name] ?? ((_a = Object.entries(conf2.fontsParsed).find(
|
|
539
|
+
([k]) => {
|
|
540
|
+
var _a2, _b;
|
|
541
|
+
return ((_b = (_a2 = conf2.fontsParsed[k]) == null ? void 0 : _a2.family) == null ? void 0 : _b.val) === name;
|
|
542
|
+
}
|
|
543
|
+
)) == null ? void 0 : _a[1]);
|
|
537
544
|
};
|
|
538
545
|
}
|
|
539
546
|
});
|
|
@@ -678,6 +685,7 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
678
685
|
}
|
|
679
686
|
var bailAfterEnv = process.env.TAMAGUI_BAIL_AFTER_SCANNING_X_CSS_RULES, bailAfter = bailAfterEnv ? +bailAfterEnv : 250;
|
|
680
687
|
function updateSheetStyles(sheet2, remove = !1, collectThemes = !1, tokens) {
|
|
688
|
+
var _a, _b;
|
|
681
689
|
let rules;
|
|
682
690
|
try {
|
|
683
691
|
if (rules = sheet2.cssRules, !rules)
|
|
@@ -685,7 +693,7 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
685
693
|
} catch {
|
|
686
694
|
return;
|
|
687
695
|
}
|
|
688
|
-
let firstSelector = getTamaguiSelector(rules[0], collectThemes)
|
|
696
|
+
let firstSelector = (_a = getTamaguiSelector(rules[0], collectThemes)) == null ? void 0 : _a[0], lastSelector = (_b = getTamaguiSelector(rules[rules.length - 1], collectThemes)) == null ? void 0 : _b[0], cacheKey = `${rules.length}${firstSelector}${lastSelector}`, lastScanned = scannedCache.get(sheet2);
|
|
689
697
|
if (!remove && lastScanned === cacheKey)
|
|
690
698
|
return;
|
|
691
699
|
let len = rules.length, fails = 0, dedupedThemes;
|
|
@@ -951,9 +959,9 @@ var require_expandStyle_native = __commonJS({
|
|
|
951
959
|
// react-native doesn't support X / Y
|
|
952
960
|
overflow: xy
|
|
953
961
|
}
|
|
954
|
-
};
|
|
962
|
+
}, _a;
|
|
955
963
|
for (let parent in EXPANSIONS) {
|
|
956
|
-
let prefix = parent.slice(0, /[A-Z]/.exec(parent)
|
|
964
|
+
let prefix = parent.slice(0, ((_a = /[A-Z]/.exec(parent)) == null ? void 0 : _a.index) ?? parent.length);
|
|
957
965
|
EXPANSIONS[parent] = EXPANSIONS[parent].map((k) => `${prefix}${k}`);
|
|
958
966
|
}
|
|
959
967
|
}
|
|
@@ -1709,7 +1717,7 @@ var require_getVariantExtras_native = __commonJS({
|
|
|
1709
1717
|
var import_createVariable = require_createVariable_native(), import_createProxy = require_createProxy_native();
|
|
1710
1718
|
function getVariantExtras(styleState) {
|
|
1711
1719
|
let { curProps, conf, context, theme } = styleState, fonts = conf.fontsParsed;
|
|
1712
|
-
context
|
|
1720
|
+
context != null && context.language && (fonts = getFontsForLanguage(conf.fontsParsed, context.language));
|
|
1713
1721
|
let fontFamily = (0, import_createVariable.getVariableValue)(
|
|
1714
1722
|
styleState.fontFamily || styleState.curProps.fontFamily || styleState.conf.defaultFont
|
|
1715
1723
|
);
|
|
@@ -1869,6 +1877,7 @@ var require_propMapper_native = __commonJS({
|
|
|
1869
1877
|
return input;
|
|
1870
1878
|
}
|
|
1871
1879
|
var variableToFontNameCache = /* @__PURE__ */ new WeakMap(), fontFamilyCache = /* @__PURE__ */ new WeakMap(), getPropMappedFontFamily = (expanded) => expanded && fontFamilyCache.get(expanded), resolveTokensAndVariants = (key, value, styleProps, styleState, parentVariantKey) => {
|
|
1880
|
+
var _a;
|
|
1872
1881
|
let { conf, staticConfig, debug, theme } = styleState, { variants } = staticConfig, res = {};
|
|
1873
1882
|
debug === "verbose" && console.log(" - resolveTokensAndVariants", key, value);
|
|
1874
1883
|
for (let rKey in value) {
|
|
@@ -1902,7 +1911,7 @@ var require_propMapper_native = __commonJS({
|
|
|
1902
1911
|
debug === "verbose" && console.log("object", fKey, subObject), res[fKey] ??= {}, Object.assign(res[fKey], subObject);
|
|
1903
1912
|
} else
|
|
1904
1913
|
res[fKey] = val;
|
|
1905
|
-
debug && res[fKey]
|
|
1914
|
+
debug && ((_a = res[fKey]) == null ? void 0 : _a[0]) === "$" && console.warn(`\u26A0\uFE0F Missing token in theme ${theme.name}:`, fKey, res[fKey], theme);
|
|
1906
1915
|
}
|
|
1907
1916
|
return res;
|
|
1908
1917
|
}, tokenCats = ["size", "color", "radius", "space", "zIndex"].map((name) => ({
|
|
@@ -1925,6 +1934,7 @@ var require_propMapper_native = __commonJS({
|
|
|
1925
1934
|
fontSize: "size",
|
|
1926
1935
|
fontWeight: "weight"
|
|
1927
1936
|
}, getTokenForKey = (key, value, resolveAs = "none", styleState) => {
|
|
1937
|
+
var _a, _b;
|
|
1928
1938
|
if (resolveAs === "none")
|
|
1929
1939
|
return value;
|
|
1930
1940
|
let { theme, conf = (0, import_config.getConfig)(), context, fontFamily } = styleState, tokensParsed = conf.tokensParsed, valOrVar, hasSet = !1;
|
|
@@ -1935,7 +1945,7 @@ var require_propMapper_native = __commonJS({
|
|
|
1935
1945
|
else {
|
|
1936
1946
|
switch (key) {
|
|
1937
1947
|
case "fontFamily": {
|
|
1938
|
-
valOrVar = (context
|
|
1948
|
+
valOrVar = ((_a = (context != null && context.language ? (0, import_getVariantExtras.getFontsForLanguage)(conf.fontsParsed, context.language) : conf.fontsParsed)[value]) == null ? void 0 : _a.family) || value, hasSet = !0;
|
|
1939
1949
|
break;
|
|
1940
1950
|
}
|
|
1941
1951
|
case "fontSize":
|
|
@@ -1943,7 +1953,10 @@ var require_propMapper_native = __commonJS({
|
|
|
1943
1953
|
case "letterSpacing":
|
|
1944
1954
|
case "fontWeight": {
|
|
1945
1955
|
let fam = fontFamily || conf.defaultFont;
|
|
1946
|
-
|
|
1956
|
+
if (fam) {
|
|
1957
|
+
let font = (context != null && context.language ? (0, import_getVariantExtras.getFontsForLanguage)(conf.fontsParsed, context.language) : conf.fontsParsed)[fam];
|
|
1958
|
+
valOrVar = ((_b = font == null ? void 0 : font[fontShorthand[key] || key]) == null ? void 0 : _b[value]) || value, hasSet = !0;
|
|
1959
|
+
}
|
|
1947
1960
|
break;
|
|
1948
1961
|
}
|
|
1949
1962
|
}
|
|
@@ -2043,19 +2056,20 @@ var require_ThemeManager_native = __commonJS({
|
|
|
2043
2056
|
getStateIfChanged(props = this.props, state = this.state, parentManager = this.parentManager) {
|
|
2044
2057
|
let _ = this.getState(props, parentManager);
|
|
2045
2058
|
if (state && state !== emptyState && !_)
|
|
2046
|
-
return parentManager
|
|
2059
|
+
return parentManager == null ? void 0 : parentManager.state;
|
|
2047
2060
|
if (this.getStateShouldChange(_, state))
|
|
2048
2061
|
return _;
|
|
2049
2062
|
}
|
|
2050
2063
|
getStateShouldChange(nextState, state = this.state) {
|
|
2051
|
-
return !(!nextState
|
|
2064
|
+
return !(!(nextState != null && nextState.theme) || nextState.theme === (state == null ? void 0 : state.theme));
|
|
2052
2065
|
}
|
|
2053
2066
|
getState(props = this.props, parentManager = this.parentManager) {
|
|
2054
|
-
return getState(props, parentManager) || parentManager
|
|
2067
|
+
return getState(props, parentManager) || (parentManager == null ? void 0 : parentManager.state) || null;
|
|
2055
2068
|
}
|
|
2056
2069
|
get allKeys() {
|
|
2070
|
+
var _a;
|
|
2057
2071
|
return this._allKeys ||= /* @__PURE__ */ new Set([
|
|
2058
|
-
...this.parentManager
|
|
2072
|
+
...((_a = this.parentManager) == null ? void 0 : _a.allKeys) || [],
|
|
2059
2073
|
...Object.keys(this.state.theme || {})
|
|
2060
2074
|
]), this._allKeys;
|
|
2061
2075
|
}
|
|
@@ -2072,6 +2086,7 @@ var require_ThemeManager_native = __commonJS({
|
|
|
2072
2086
|
return `t_sub_theme ${import_constants22.THEME_CLASSNAME_PREFIX}${name}`.replace("light_", "").replace("dark_", "");
|
|
2073
2087
|
}
|
|
2074
2088
|
function getState(props, parentManager) {
|
|
2089
|
+
var _a, _b, _c, _d, _e, _f;
|
|
2075
2090
|
let validManagerAndAllComponentThemes = getNonComponentParentManager(parentManager);
|
|
2076
2091
|
parentManager = validManagerAndAllComponentThemes[0];
|
|
2077
2092
|
let allComponentThemes = validManagerAndAllComponentThemes[1], themes = (0, import_config.getThemes)(), isDirectParentAComponentTheme = allComponentThemes.length > 0;
|
|
@@ -2079,12 +2094,12 @@ var require_ThemeManager_native = __commonJS({
|
|
|
2079
2094
|
throw new Error("Cannot reset + set new name");
|
|
2080
2095
|
if (!props.name && !props.inverse && !props.reset && !props.componentName)
|
|
2081
2096
|
return null;
|
|
2082
|
-
if (props.reset && !isDirectParentAComponentTheme && !parentManager
|
|
2097
|
+
if (props.reset && !isDirectParentAComponentTheme && !(parentManager != null && parentManager.parentManager))
|
|
2083
2098
|
return console.warn("Cannot reset no grandparent exists"), null;
|
|
2084
|
-
let result = null, nextName = props.reset ? isDirectParentAComponentTheme ? parentManager
|
|
2099
|
+
let result = null, nextName = props.reset ? isDirectParentAComponentTheme ? ((_a = parentManager == null ? void 0 : parentManager.state) == null ? void 0 : _a.name) || "" : ((_c = (_b = parentManager == null ? void 0 : parentManager.parentManager) == null ? void 0 : _b.state) == null ? void 0 : _c.name) || "" : props.name || "", { componentName } = props, parentName = props.reset ? isDirectParentAComponentTheme ? (
|
|
2085
2100
|
// here because parentManager already skipped componentTheme so we have to only go up once
|
|
2086
|
-
parentManager
|
|
2087
|
-
) : parentManager
|
|
2101
|
+
((_d = parentManager == null ? void 0 : parentManager.parentManager) == null ? void 0 : _d.state.name) || ""
|
|
2102
|
+
) : ((_f = (_e = parentManager == null ? void 0 : parentManager.parentManager) == null ? void 0 : _e.parentManager) == null ? void 0 : _f.state.name) || "" : isDirectParentAComponentTheme ? allComponentThemes[0] || "" : (parentManager == null ? void 0 : parentManager.state.name) || "";
|
|
2088
2103
|
props.reset && isDirectParentAComponentTheme && allComponentThemes.shift();
|
|
2089
2104
|
let base = parentName.split(import_constants22.THEME_NAME_SEPARATOR), lastSegment = base[base.length - 1], isParentComponentTheme = parentName && lastSegment[0].toUpperCase() === lastSegment[0];
|
|
2090
2105
|
isParentComponentTheme && base.pop();
|
|
@@ -2142,9 +2157,10 @@ var require_ThemeManager_native = __commonJS({
|
|
|
2142
2157
|
}
|
|
2143
2158
|
var inverseThemeName = (themeName) => themeName.startsWith("light") ? themeName.replace(/^light/, "dark") : themeName.replace(/^dark/, "light");
|
|
2144
2159
|
function getNonComponentParentManager(themeManager) {
|
|
2160
|
+
var _a;
|
|
2145
2161
|
let res = themeManager, componentThemeNames = [];
|
|
2146
|
-
for (; res && res
|
|
2147
|
-
componentThemeNames.push(res
|
|
2162
|
+
for (; res && res != null && res.isComponent; )
|
|
2163
|
+
componentThemeNames.push((_a = res == null ? void 0 : res.state) == null ? void 0 : _a.name), res = res.parentManager;
|
|
2148
2164
|
return [res || null, componentThemeNames];
|
|
2149
2165
|
}
|
|
2150
2166
|
}
|
|
@@ -2189,7 +2205,7 @@ var require_getThemeUnwrapped_native = __commonJS({
|
|
|
2189
2205
|
getThemeUnwrapped: () => getThemeUnwrapped
|
|
2190
2206
|
});
|
|
2191
2207
|
module2.exports = __toCommonJS2(getThemeUnwrapped_exports);
|
|
2192
|
-
var getThemeUnwrapped = (theme) => theme
|
|
2208
|
+
var getThemeUnwrapped = (theme) => (theme == null ? void 0 : theme[GetThemeUnwrapped]) || theme, GetThemeUnwrapped = Symbol();
|
|
2193
2209
|
}
|
|
2194
2210
|
});
|
|
2195
2211
|
|
|
@@ -2230,9 +2246,10 @@ var require_useTheme_native = __commonJS({
|
|
|
2230
2246
|
!1,
|
|
2231
2247
|
keys.current,
|
|
2232
2248
|
import_constants2.isServer ? void 0 : () => {
|
|
2233
|
-
|
|
2249
|
+
var _a, _b;
|
|
2250
|
+
let next = ((_a = props.shouldUpdate) == null ? void 0 : _a.call(props)) ?? (keys.current.length > 0 ? !0 : void 0);
|
|
2234
2251
|
return props.debug && props.debug !== "profile" && console.log(" \u{1F3A8} useTheme() shouldUpdate?", next, {
|
|
2235
|
-
shouldUpdateProp: props.shouldUpdate
|
|
2252
|
+
shouldUpdateProp: (_b = props.shouldUpdate) == null ? void 0 : _b.call(props),
|
|
2236
2253
|
keys: [...keys.current]
|
|
2237
2254
|
}), next;
|
|
2238
2255
|
}
|
|
@@ -2252,7 +2269,7 @@ var require_useTheme_native = __commonJS({
|
|
|
2252
2269
|
if (Reflect.has(theme, key))
|
|
2253
2270
|
return !0;
|
|
2254
2271
|
if (typeof key == "string")
|
|
2255
|
-
return key[0] === "$" && (key = key.slice(1)), themeManager
|
|
2272
|
+
return key[0] === "$" && (key = key.slice(1)), themeManager == null ? void 0 : themeManager.allKeys.has(key);
|
|
2256
2273
|
},
|
|
2257
2274
|
get(_, key) {
|
|
2258
2275
|
if (key === import_getThemeUnwrapped.GetThemeUnwrapped)
|
|
@@ -2292,7 +2309,7 @@ var require_useTheme_native = __commonJS({
|
|
|
2292
2309
|
}
|
|
2293
2310
|
let [themeState, setThemeState] = (0, import_react.useState)(createState), { state, mounted, isNewTheme, themeManager } = themeState, isInversingOnMount = !!(!themeState.mounted && props.inverse);
|
|
2294
2311
|
function getShouldUpdateTheme(manager = themeManager, nextState, prevState = state, forceShouldChange = !1) {
|
|
2295
|
-
let forceUpdate = shouldUpdate
|
|
2312
|
+
let forceUpdate = shouldUpdate == null ? void 0 : shouldUpdate();
|
|
2296
2313
|
if (!forceShouldChange && forceUpdate === !1)
|
|
2297
2314
|
return;
|
|
2298
2315
|
let next = nextState || manager.getState(props, parentManager);
|
|
@@ -2307,8 +2324,8 @@ var require_useTheme_native = __commonJS({
|
|
|
2307
2324
|
isNewTheme && themeManager && activeThemeManagers.add(themeManager), (isNewTheme || getShouldUpdateTheme(themeManager)) && setThemeState(createState);
|
|
2308
2325
|
let selfListenerDispose = themeManager.onChangeTheme((_a, _b, forced) => {
|
|
2309
2326
|
forced && setThemeState((prev) => createState(prev, !0));
|
|
2310
|
-
}), disposeChangeListener = parentManager
|
|
2311
|
-
let force = shouldUpdate
|
|
2327
|
+
}), disposeChangeListener = parentManager == null ? void 0 : parentManager.onChangeTheme((name, manager) => {
|
|
2328
|
+
let force = shouldUpdate == null ? void 0 : shouldUpdate(), doUpdate = force ?? !!(keys != null && keys.length || isNewTheme);
|
|
2312
2329
|
props.debug && console.log(" \u{1F538} onChange", themeManager.id, {
|
|
2313
2330
|
force,
|
|
2314
2331
|
doUpdate,
|
|
@@ -2319,7 +2336,7 @@ var require_useTheme_native = __commonJS({
|
|
|
2319
2336
|
}), doUpdate && setThemeState(createState);
|
|
2320
2337
|
}, themeManager.id);
|
|
2321
2338
|
return () => {
|
|
2322
|
-
selfListenerDispose(), disposeChangeListener
|
|
2339
|
+
selfListenerDispose(), disposeChangeListener == null || disposeChangeListener(), activeThemeManagers.delete(themeManager);
|
|
2323
2340
|
};
|
|
2324
2341
|
}, [
|
|
2325
2342
|
themeManager,
|
|
@@ -2350,14 +2367,14 @@ var require_useTheme_native = __commonJS({
|
|
|
2350
2367
|
themeManager
|
|
2351
2368
|
};
|
|
2352
2369
|
function createState(prev, force = !1) {
|
|
2353
|
-
if (prev && shouldUpdate
|
|
2370
|
+
if (prev && (shouldUpdate == null ? void 0 : shouldUpdate()) === !1)
|
|
2354
2371
|
return prev;
|
|
2355
2372
|
let themeManager2 = parentManager, state2;
|
|
2356
2373
|
if ((0, import_ThemeManager.getHasThemeUpdatingProps)(props)) {
|
|
2357
2374
|
let getNewThemeManager = () => new import_ThemeManager.ThemeManager(props, root ? "root" : parentManager);
|
|
2358
|
-
if (prev
|
|
2375
|
+
if (prev != null && prev.themeManager) {
|
|
2359
2376
|
themeManager2 = prev.themeManager;
|
|
2360
|
-
let forceChange = !!keys
|
|
2377
|
+
let forceChange = !!(keys != null && keys.length), next = themeManager2.getState(props, parentManager), nextState = getShouldUpdateTheme(
|
|
2361
2378
|
themeManager2,
|
|
2362
2379
|
next,
|
|
2363
2380
|
prev.state,
|
|
@@ -2367,8 +2384,8 @@ var require_useTheme_native = __commonJS({
|
|
|
2367
2384
|
} else
|
|
2368
2385
|
themeManager2 = getNewThemeManager(), state2 = { ...themeManager2.state };
|
|
2369
2386
|
}
|
|
2370
|
-
let isNewTheme2 = !!(themeManager2 !== parentManager || props.inverse), mounted2 = props.inverse ? root || prev
|
|
2371
|
-
if (state2 || (isNewTheme2 ? state2 = themeManager2.state : (state2 = parentManager.state, themeManager2 = parentManager)), !force && state2.name === prev
|
|
2387
|
+
let isNewTheme2 = !!(themeManager2 !== parentManager || props.inverse), mounted2 = props.inverse ? root || (prev == null ? void 0 : prev.mounted) : !0;
|
|
2388
|
+
if (state2 || (isNewTheme2 ? state2 = themeManager2.state : (state2 = parentManager.state, themeManager2 = parentManager)), !force && state2.name === (prev == null ? void 0 : prev.state.name))
|
|
2372
2389
|
return prev;
|
|
2373
2390
|
let response = {
|
|
2374
2391
|
state: state2,
|
|
@@ -2378,7 +2395,7 @@ var require_useTheme_native = __commonJS({
|
|
|
2378
2395
|
};
|
|
2379
2396
|
if (props.debug && import_constants2.isClient) {
|
|
2380
2397
|
console.groupCollapsed(` \u{1F537} ${themeManager2.id} useChangeThemeEffect createState`);
|
|
2381
|
-
let parentState = { ...parentManager
|
|
2398
|
+
let parentState = { ...parentManager == null ? void 0 : parentManager.state }, parentId = parentManager == null ? void 0 : parentManager.id, themeManagerState = { ...themeManager2.state };
|
|
2382
2399
|
console.log({
|
|
2383
2400
|
props,
|
|
2384
2401
|
parentState,
|
|
@@ -2443,22 +2460,22 @@ var require_useMedia_native = __commonJS({
|
|
|
2443
2460
|
if (key[0] === "$")
|
|
2444
2461
|
throw new Error("use short key");
|
|
2445
2462
|
return (0, import_config.getConfig)().settings.mediaPropOrder ? defaultMediaImportance : mediaKeysOrdered.indexOf(key) + 100;
|
|
2446
|
-
}, dispose = /* @__PURE__ */ new Set(), configureMedia2 = (config) => {
|
|
2463
|
+
}, dispose = /* @__PURE__ */ new Set(), mediaVersion = 0, configureMedia2 = (config) => {
|
|
2447
2464
|
let { media, mediaQueryDefaultActive } = config;
|
|
2448
2465
|
if (media) {
|
|
2466
|
+
mediaVersion++;
|
|
2449
2467
|
for (let key in media)
|
|
2450
|
-
mediaState2[key] = mediaQueryDefaultActive
|
|
2451
|
-
Object.assign(mediaQueryConfig2, media), initState = { ...mediaState2 },
|
|
2468
|
+
mediaState2[key] = (mediaQueryDefaultActive == null ? void 0 : mediaQueryDefaultActive[key]) || !1, mediaKeys.add(`$${key}`);
|
|
2469
|
+
Object.assign(mediaQueryConfig2, media), initState = { ...mediaState2 }, mediaKeysOrdered = Object.keys(media), config.disableSSR ? setupMediaListeners() : updateCurrentState();
|
|
2452
2470
|
}
|
|
2453
2471
|
};
|
|
2454
2472
|
function unlisten() {
|
|
2455
2473
|
dispose.forEach((cb) => cb()), dispose.clear();
|
|
2456
2474
|
}
|
|
2457
|
-
var
|
|
2475
|
+
var setupVersion = -1;
|
|
2458
2476
|
function setupMediaListeners() {
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
configuredKey = nextKey, unlisten();
|
|
2477
|
+
if (setupVersion !== mediaVersion) {
|
|
2478
|
+
setupVersion = mediaVersion, unlisten();
|
|
2462
2479
|
for (let key in mediaQueryConfig2) {
|
|
2463
2480
|
let update2 = function() {
|
|
2464
2481
|
let next = !!getMatch().matches;
|
|
@@ -2479,9 +2496,9 @@ var require_useMedia_native = __commonJS({
|
|
|
2479
2496
|
setupMediaListeners();
|
|
2480
2497
|
}, []);
|
|
2481
2498
|
}
|
|
2482
|
-
var listeners = /* @__PURE__ */ new Set(), flushing = !1;
|
|
2499
|
+
var listeners = /* @__PURE__ */ new Set(), flushing = !1, flushVersion = -1;
|
|
2483
2500
|
function updateCurrentState() {
|
|
2484
|
-
flushing || (flushing = !0, Promise.resolve().then(() => {
|
|
2501
|
+
flushing && flushVersion === mediaVersion || (flushVersion = mediaVersion, flushing = !0, Promise.resolve().then(() => {
|
|
2485
2502
|
flushing = !1, listeners.forEach((cb) => cb(mediaState2));
|
|
2486
2503
|
}));
|
|
2487
2504
|
}
|
|
@@ -2501,8 +2518,8 @@ var require_useMedia_native = __commonJS({
|
|
|
2501
2518
|
let { touched, prev } = internal.current, componentState = uid ? shouldUpdate.get(uid) : void 0;
|
|
2502
2519
|
if (componentState && componentState.enabled === !1)
|
|
2503
2520
|
return prev;
|
|
2504
|
-
let testKeys = componentState
|
|
2505
|
-
return !testKeys || testKeys
|
|
2521
|
+
let testKeys = (componentState == null ? void 0 : componentState.keys) ?? ((!componentState || componentState.enabled) && touched ? [...touched] : null);
|
|
2522
|
+
return !testKeys || testKeys != null && testKeys.every((key) => mediaState2[key] === prev[key]) ? prev : (internal.current.prev = mediaState2, mediaState2);
|
|
2506
2523
|
},
|
|
2507
2524
|
() => initState
|
|
2508
2525
|
);
|
|
@@ -2513,7 +2530,7 @@ var require_useMedia_native = __commonJS({
|
|
|
2513
2530
|
});
|
|
2514
2531
|
}
|
|
2515
2532
|
function useMediaPropsActive2(props, opts) {
|
|
2516
|
-
let media = useMedia2(), resolveAs = opts
|
|
2533
|
+
let media = useMedia2(), resolveAs = (opts == null ? void 0 : opts.resolveValues) || "none", theme = resolveAs ? (0, import_useTheme.useTheme)() : null, styleState = { theme }, shouldExpandShorthands = opts == null ? void 0 : opts.expandShorthands;
|
|
2517
2534
|
return (0, import_react.useMemo)(() => {
|
|
2518
2535
|
let config = (0, import_config.getConfig)(), next = {}, importancesUsed = {}, propNames = Object.keys(props), len = propNames.length;
|
|
2519
2536
|
for (let i = 0; i < len; i++) {
|
|
@@ -2822,6 +2839,41 @@ var require_ComponentContext_native = __commonJS({
|
|
|
2822
2839
|
}
|
|
2823
2840
|
});
|
|
2824
2841
|
|
|
2842
|
+
// ../web/dist/cjs/defaultComponentState.native.js
|
|
2843
|
+
var require_defaultComponentState_native = __commonJS({
|
|
2844
|
+
"../web/dist/cjs/defaultComponentState.native.js"(exports, module2) {
|
|
2845
|
+
"use strict";
|
|
2846
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = (target, all) => {
|
|
2847
|
+
for (var name in all)
|
|
2848
|
+
__defProp2(target, name, { get: all[name], enumerable: !0 });
|
|
2849
|
+
}, __copyProps2 = (to, from, except, desc) => {
|
|
2850
|
+
if (from && typeof from == "object" || typeof from == "function")
|
|
2851
|
+
for (let key of __getOwnPropNames2(from))
|
|
2852
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
2853
|
+
return to;
|
|
2854
|
+
}, __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: !0 }), mod), defaultComponentState_exports = {};
|
|
2855
|
+
__export2(defaultComponentState_exports, {
|
|
2856
|
+
defaultComponentState: () => defaultComponentState,
|
|
2857
|
+
defaultComponentStateMounted: () => defaultComponentStateMounted,
|
|
2858
|
+
defaultComponentStateShouldEnter: () => defaultComponentStateShouldEnter
|
|
2859
|
+
});
|
|
2860
|
+
module2.exports = __toCommonJS2(defaultComponentState_exports);
|
|
2861
|
+
var defaultComponentState = {
|
|
2862
|
+
hover: !1,
|
|
2863
|
+
press: !1,
|
|
2864
|
+
pressIn: !1,
|
|
2865
|
+
focus: !1,
|
|
2866
|
+
unmounted: !0
|
|
2867
|
+
}, defaultComponentStateMounted = {
|
|
2868
|
+
...defaultComponentState,
|
|
2869
|
+
unmounted: !1
|
|
2870
|
+
}, defaultComponentStateShouldEnter = {
|
|
2871
|
+
...defaultComponentState,
|
|
2872
|
+
unmounted: "should-enter"
|
|
2873
|
+
};
|
|
2874
|
+
}
|
|
2875
|
+
});
|
|
2876
|
+
|
|
2825
2877
|
// ../web/dist/cjs/helpers/createShallowSetState.native.js
|
|
2826
2878
|
var require_createShallowSetState_native = __commonJS({
|
|
2827
2879
|
"../web/dist/cjs/helpers/createShallowSetState.native.js"(exports, module2) {
|
|
@@ -2977,8 +3029,8 @@ var require_createMediaStyle_native = __commonJS({
|
|
|
2977
3029
|
if (isNonWindowMedia) {
|
|
2978
3030
|
let precedenceImportancePrefix = new Array((priority || 0) + (isGroup ? 1 : 0)).fill(":root").join("");
|
|
2979
3031
|
if (isThemeMedia || isGroup) {
|
|
2980
|
-
let groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyIn), mediaName = groupInfo
|
|
2981
|
-
groupMediaKey = groupInfo
|
|
3032
|
+
let groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyIn), mediaName = groupInfo == null ? void 0 : groupInfo.name;
|
|
3033
|
+
groupMediaKey = groupInfo == null ? void 0 : groupInfo.media, isGroup && (containerName = mediaName);
|
|
2982
3034
|
let name = (isGroup ? "group_" : "") + mediaName, selectorStart = styleInner.indexOf(":root"), selectorEnd = styleInner.lastIndexOf("{"), selector = styleInner.slice(selectorStart, selectorEnd), precedenceSpace = conf.themeClassNameOnRoot ? "" : " ", pseudoSelectorName = groupInfo.pseudo ? groupPseudoToPseudoCSSMap[groupInfo.pseudo] || groupInfo.pseudo : void 0, pseudoSelector = pseudoSelectorName ? `:${pseudoSelectorName}` : "", presedencePrefix = `:root${precedenceImportancePrefix}${precedenceSpace}`, mediaSelector = `.t_${name}${pseudoSelector}`, nextSelector = `${presedencePrefix}${mediaSelector} ${selector.replace(
|
|
2983
3035
|
":root",
|
|
2984
3036
|
""
|
|
@@ -3061,6 +3113,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
3061
3113
|
});
|
|
3062
3114
|
module2.exports = __toCommonJS2(getSplitStyles_exports);
|
|
3063
3115
|
var import_constants2 = require_index_native(), import_helpers = require_index_native3(), import_react = require("react"), import_config = require_config_native(), import_accessibilityDirectMap = require_accessibilityDirectMap_native(), import_isDevTools = require_isDevTools_native(), import_useMedia = require_useMedia_native(), import_createMediaStyle = require_createMediaStyle_native(), import_expandStyles = require_expandStyles_native(), import_getGroupPropParts = require_getGroupPropParts_native(), import_getStylesAtomic = require_getStylesAtomic_native(), import_insertStyleRule = require_insertStyleRule_native(), import_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_propMapper = require_propMapper_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), fontFamilyKey = "fontFamily", IS_STATIC = process.env.IS_STATIC === "is_static", conf, PROP_SPLIT = "-", getSplitStyles = (props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, context, elementType, debug) => {
|
|
3116
|
+
var _a, _b, _c, _e, _f, _g;
|
|
3064
3117
|
conf = conf || (0, import_config.getConfig)();
|
|
3065
3118
|
let { shorthands } = conf, {
|
|
3066
3119
|
isHOC,
|
|
@@ -3152,12 +3205,12 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
3152
3205
|
if (isStyleProp && props.asChild === "except-style")
|
|
3153
3206
|
continue;
|
|
3154
3207
|
let shouldPassProp = !isStyleProp || // is in parent variants
|
|
3155
|
-
isHOC && parentStaticConfig
|
|
3208
|
+
isHOC && (parentStaticConfig == null ? void 0 : parentStaticConfig.variants) && keyInit in parentStaticConfig.variants || (inlineProps == null ? void 0 : inlineProps.has(keyInit)), isHOCShouldPassThrough = !!(isHOC && (isShorthand || isValidStyleKeyInit || isMediaOrPseudo || (_a = parentStaticConfig == null ? void 0 : parentStaticConfig.variants) != null && _a[keyInit] || keyInit in skipProps)), shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
|
|
3156
3209
|
if (debug === "verbose" && (console.groupCollapsed(
|
|
3157
3210
|
`\u{1F539}\u{1F539}\u{1F539}\u{1F539} ${keyOg}${keyInit !== keyOg ? ` (shorthand for ${keyInit})` : ""} ${shouldPassThrough ? "(pass)" : ""} \u{1F539}\u{1F539}\u{1F539}\u{1F539}`
|
|
3158
3211
|
), console.log({ isVariant, valInit, shouldPassProp }), import_constants2.isClient && console.log({
|
|
3159
3212
|
variants,
|
|
3160
|
-
variant: variants
|
|
3213
|
+
variant: variants == null ? void 0 : variants[keyInit],
|
|
3161
3214
|
isVariant,
|
|
3162
3215
|
isHOCShouldPassThrough,
|
|
3163
3216
|
curProps: { ...styleState.curProps },
|
|
@@ -3177,7 +3230,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
3177
3230
|
styleProps,
|
|
3178
3231
|
componentState,
|
|
3179
3232
|
isVariant,
|
|
3180
|
-
variant: variants
|
|
3233
|
+
variant: variants == null ? void 0 : variants[keyInit],
|
|
3181
3234
|
shouldPassProp,
|
|
3182
3235
|
isHOCShouldPassThrough,
|
|
3183
3236
|
theme,
|
|
@@ -3195,7 +3248,7 @@ current`, {
|
|
|
3195
3248
|
if (expanded) {
|
|
3196
3249
|
for (let [key, val] of expanded)
|
|
3197
3250
|
if (!(val == null || key in usedKeys)) {
|
|
3198
|
-
if (isPseudo = key in import_helpers.validPseudoKeys, isMedia = !isPseudo && !isValidStyleKeyInit && (0, import_useMedia.isMediaKey)(key), isMediaOrPseudo = isMedia || isPseudo, isVariant = variants && key in variants, (inlineProps
|
|
3251
|
+
if (isPseudo = key in import_helpers.validPseudoKeys, isMedia = !isPseudo && !isValidStyleKeyInit && (0, import_useMedia.isMediaKey)(key), isMediaOrPseudo = isMedia || isPseudo, isVariant = variants && key in variants, (inlineProps != null && inlineProps.has(key) || IS_STATIC && inlineWhenUnflattened != null && inlineWhenUnflattened.has(key)) && (viewProps[key] = props[key] ?? val), isHOC && (isMediaOrPseudo || ((_b = parentStaticConfig == null ? void 0 : parentStaticConfig.variants) == null ? void 0 : _b[keyInit]))) {
|
|
3199
3252
|
passDownProp(viewProps, key, val, isMediaOrPseudo), debug === "verbose" && (console.groupCollapsed(` - passing down prop ${key}`), console.log({ val, after: { ...viewProps[key] } }), console.groupEnd());
|
|
3200
3253
|
continue;
|
|
3201
3254
|
}
|
|
@@ -3212,7 +3265,11 @@ current`, {
|
|
|
3212
3265
|
`No animation prop given to component ${staticConfig.componentName || ""} with enterStyle / exitStyle, these styles will be ignore.`
|
|
3213
3266
|
), !descriptor || isExit && !styleProps.isExiting)
|
|
3214
3267
|
continue;
|
|
3215
|
-
if ((!shouldDoClasses || IS_STATIC) && (pseudos ||= {}, pseudos[key] ||= {}, IS_STATIC
|
|
3268
|
+
if ((!shouldDoClasses || IS_STATIC) && (pseudos ||= {}, pseudos[key] ||= {}, IS_STATIC)) {
|
|
3269
|
+
Object.assign(pseudos[key], pseudoStyleObject);
|
|
3270
|
+
continue;
|
|
3271
|
+
}
|
|
3272
|
+
if (shouldDoClasses && !isEnter && !isExit) {
|
|
3216
3273
|
let pseudoStyles = (0, import_getStylesAtomic.generateAtomicStyles)(pseudoStyleObject, descriptor);
|
|
3217
3274
|
debug === "verbose" && (console.groupCollapsed("pseudo (classes)", key), console.log({ pseudoStyleObject, pseudoStyles }), console.groupEnd());
|
|
3218
3275
|
for (let psuedoStyle of pseudoStyles)
|
|
@@ -3309,22 +3366,24 @@ current`, {
|
|
|
3309
3366
|
if (!(themeName === mediaThemeName || themeName.startsWith(mediaThemeName)))
|
|
3310
3367
|
continue;
|
|
3311
3368
|
} else if (isGroupMedia) {
|
|
3312
|
-
let groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = context
|
|
3369
|
+
let groupInfo = (0, import_getGroupPropParts.getGroupPropParts)(mediaKeyShort), groupName = groupInfo.name, groupContext = context == null ? void 0 : context.groups.state[groupName];
|
|
3313
3370
|
if (!groupContext) {
|
|
3314
3371
|
debug && console.warn(`No parent with group prop, skipping styles: ${groupName}`);
|
|
3315
3372
|
continue;
|
|
3316
3373
|
}
|
|
3317
|
-
let groupPseudoKey = groupInfo.pseudo, groupMediaKey = groupInfo.media, componentGroupState = componentState.group
|
|
3374
|
+
let groupPseudoKey = groupInfo.pseudo, groupMediaKey = groupInfo.media, componentGroupState = (_c = componentState.group) == null ? void 0 : _c[groupName];
|
|
3318
3375
|
if (groupMediaKey) {
|
|
3319
3376
|
mediaGroups ||= /* @__PURE__ */ new Set(), mediaGroups.add(groupMediaKey);
|
|
3320
|
-
let mediaState22 = componentGroupState
|
|
3377
|
+
let mediaState22 = componentGroupState == null ? void 0 : componentGroupState.media, isActive = mediaState22 == null ? void 0 : mediaState22[groupMediaKey];
|
|
3321
3378
|
if (!mediaState22 && groupContext.layout && (isActive = (0, import_useMedia.mediaKeyMatch)(groupMediaKey, groupContext.layout)), !isActive)
|
|
3322
3379
|
continue;
|
|
3323
3380
|
importanceBump = 2;
|
|
3324
3381
|
}
|
|
3325
3382
|
if (groupPseudoKey) {
|
|
3326
|
-
|
|
3327
|
-
context
|
|
3383
|
+
pseudoGroups ||= /* @__PURE__ */ new Set(), pseudoGroups.add(groupName);
|
|
3384
|
+
let componentGroupPseudoState = (componentGroupState || // fallback to context initially
|
|
3385
|
+
context.groups.state[groupName]).pseudo;
|
|
3386
|
+
if (!(componentGroupPseudoState != null && componentGroupPseudoState[groupPseudoKey]))
|
|
3328
3387
|
continue;
|
|
3329
3388
|
importanceBump = import_pseudoDescriptors.pseudoPriorities[groupPseudoKey];
|
|
3330
3389
|
}
|
|
@@ -3391,9 +3450,9 @@ current`, {
|
|
|
3391
3450
|
mediaGroups
|
|
3392
3451
|
};
|
|
3393
3452
|
if (style.fontFamily) {
|
|
3394
|
-
let faceInfo = (0, import_config.getFont)(style.fontFamily)
|
|
3453
|
+
let faceInfo = (_e = (0, import_config.getFont)(style.fontFamily)) == null ? void 0 : _e.face;
|
|
3395
3454
|
if (faceInfo) {
|
|
3396
|
-
let overrideFace = faceInfo[style.fontWeight]
|
|
3455
|
+
let overrideFace = (_g = (_f = faceInfo[style.fontWeight]) == null ? void 0 : _f[style.fontStyle || "normal"]) == null ? void 0 : _g.val;
|
|
3397
3456
|
overrideFace && (style.fontFamily = overrideFace, styleState.fontFamily = overrideFace, delete style.fontWeight, delete style.fontStyle);
|
|
3398
3457
|
}
|
|
3399
3458
|
debug && debug !== "profile" && console.log(`Found fontFamily native: ${style.fontFamily}`, faceInfo);
|
|
@@ -3420,7 +3479,7 @@ current`, {
|
|
|
3420
3479
|
};
|
|
3421
3480
|
function mergeStyle(styleState, key, val) {
|
|
3422
3481
|
let { classNames, viewProps, style, usedKeys } = styleState;
|
|
3423
|
-
if (import_constants2.isWeb && val
|
|
3482
|
+
if (import_constants2.isWeb && (val == null ? void 0 : val[0]) === "_")
|
|
3424
3483
|
classNames[key] = val, usedKeys[key] ||= 1;
|
|
3425
3484
|
else if (key in import_helpers.stylePropsTransform)
|
|
3426
3485
|
styleState.transforms ||= {}, styleState.transforms[key] = val;
|
|
@@ -3542,7 +3601,7 @@ var require_mergeProps_native = __commonJS({
|
|
|
3542
3601
|
return out;
|
|
3543
3602
|
};
|
|
3544
3603
|
function mergeProp(out, a, b, key, inverseShorthands) {
|
|
3545
|
-
let shorthand = inverseShorthands
|
|
3604
|
+
let shorthand = (inverseShorthands == null ? void 0 : inverseShorthands[key]) || null;
|
|
3546
3605
|
if (b && (key in b || shorthand && shorthand in b))
|
|
3547
3606
|
return;
|
|
3548
3607
|
let val = a[key];
|
|
@@ -3741,7 +3800,7 @@ var require_themeable_native = __commonJS({
|
|
|
3741
3800
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
3742
3801
|
import_Theme.Theme,
|
|
3743
3802
|
{
|
|
3744
|
-
componentName: componentName || staticConfig
|
|
3803
|
+
componentName: componentName || (staticConfig == null ? void 0 : staticConfig.componentName),
|
|
3745
3804
|
name: theme || null,
|
|
3746
3805
|
"disable-child-theme": !0,
|
|
3747
3806
|
debug: props.debug,
|
|
@@ -3751,7 +3810,7 @@ var require_themeable_native = __commonJS({
|
|
|
3751
3810
|
}
|
|
3752
3811
|
);
|
|
3753
3812
|
});
|
|
3754
|
-
return withTheme.displayName = `Themed(${component
|
|
3813
|
+
return withTheme.displayName = `Themed(${(component == null ? void 0 : component.displayName) || (component == null ? void 0 : component.name) || "Anonymous"})`, withTheme;
|
|
3755
3814
|
}
|
|
3756
3815
|
}
|
|
3757
3816
|
});
|
|
@@ -3856,24 +3915,11 @@ var require_createComponent_native = __commonJS({
|
|
|
3856
3915
|
Spacer: () => Spacer,
|
|
3857
3916
|
Unspaced: () => Unspaced,
|
|
3858
3917
|
createComponent: () => createComponent,
|
|
3859
|
-
defaultComponentState: () => defaultComponentState,
|
|
3860
3918
|
mouseUps: () => mouseUps,
|
|
3861
3919
|
spacedChildren: () => spacedChildren
|
|
3862
3920
|
});
|
|
3863
3921
|
module2.exports = __toCommonJS2(createComponent_exports);
|
|
3864
|
-
var import_compose_refs = require_index_native5(), import_constants2 = require_index_native(), import_helpers = require_index_native3(), import_use_did_finish_ssr = require_index_native6(), import_react = __toESM2(require("react")), import_config = require_config_native(), import_constants22 = require_constants_native(), import_ComponentContext = require_ComponentContext_native(), import_createVariable = require_createVariable_native(), import_createShallowSetState = require_createShallowSetState_native(), import_getSplitStyles = require_getSplitStyles_native(), import_mergeProps = require_mergeProps_native(), import_proxyThemeVariables = require_proxyThemeVariables_native(), import_themeable = require_themeable_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(), import_jsx_runtime = require("react/jsx-runtime"),
|
|
3865
|
-
hover: !1,
|
|
3866
|
-
press: !1,
|
|
3867
|
-
pressIn: !1,
|
|
3868
|
-
focus: !1,
|
|
3869
|
-
unmounted: !0
|
|
3870
|
-
}, defaultComponentStateMounted = {
|
|
3871
|
-
...defaultComponentState,
|
|
3872
|
-
unmounted: !1
|
|
3873
|
-
}, defaultComponentStateShouldEnter = {
|
|
3874
|
-
...defaultComponentState,
|
|
3875
|
-
unmounted: "should-enter"
|
|
3876
|
-
}, tamaguiConfig, AnimatedText, AnimatedView, initialTheme, time, mouseUps = /* @__PURE__ */ new Set();
|
|
3922
|
+
var import_compose_refs = require_index_native5(), import_constants2 = require_index_native(), import_helpers = require_index_native3(), import_use_did_finish_ssr = require_index_native6(), import_react = __toESM2(require("react")), import_config = require_config_native(), import_constants22 = require_constants_native(), import_ComponentContext = require_ComponentContext_native(), import_createVariable = require_createVariable_native(), import_defaultComponentState = require_defaultComponentState_native(), import_createShallowSetState = require_createShallowSetState_native(), import_getSplitStyles = require_getSplitStyles_native(), import_mergeProps = require_mergeProps_native(), import_proxyThemeVariables = require_proxyThemeVariables_native(), import_themeable = require_themeable_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(), import_jsx_runtime = require("react/jsx-runtime"), tamaguiConfig, AnimatedText, AnimatedView, initialTheme, time, mouseUps = /* @__PURE__ */ new Set();
|
|
3877
3923
|
if (typeof document < "u") {
|
|
3878
3924
|
let cancelTouches = () => {
|
|
3879
3925
|
mouseUps.forEach((x) => x()), mouseUps.clear();
|
|
@@ -3882,8 +3928,10 @@ var require_createComponent_native = __commonJS({
|
|
|
3882
3928
|
}
|
|
3883
3929
|
var BaseText, BaseView, hasSetupBaseViews = !1;
|
|
3884
3930
|
function createComponent(staticConfig) {
|
|
3931
|
+
var _a;
|
|
3932
|
+
let config = null;
|
|
3885
3933
|
(0, import_config.onConfiguredOnce)((conf) => {
|
|
3886
|
-
if (!tamaguiConfig && (tamaguiConfig = conf, !initialTheme)) {
|
|
3934
|
+
if (config = conf, !tamaguiConfig && (tamaguiConfig = conf, !initialTheme)) {
|
|
3887
3935
|
let next = conf.themes[Object.keys(conf.themes)[0]];
|
|
3888
3936
|
initialTheme = (0, import_proxyThemeVariables.proxyThemeVariables)(next), initialTheme || console.log("Warning: Missing theme");
|
|
3889
3937
|
}
|
|
@@ -3896,15 +3944,16 @@ var require_createComponent_native = __commonJS({
|
|
|
3896
3944
|
validStyles: validStyles2 = {},
|
|
3897
3945
|
variants = {}
|
|
3898
3946
|
} = staticConfig, defaultComponentClassName = `is_${staticConfig.componentName}`, defaultProps = staticConfig.defaultProps;
|
|
3899
|
-
staticConfig.defaultProps
|
|
3947
|
+
(_a = staticConfig.defaultProps) != null && _a.debug && process.env.IS_STATIC !== "is_static" && console.log(`\u{1F41B} [${staticConfig.componentName || "Component"}]`, {
|
|
3900
3948
|
staticConfig,
|
|
3901
3949
|
defaultProps,
|
|
3902
3950
|
defaultPropsKeyOrder: defaultProps ? Object.keys(defaultProps) : []
|
|
3903
3951
|
});
|
|
3904
3952
|
let component = (0, import_react.forwardRef)((propsIn, forwardedRef) => {
|
|
3953
|
+
var _a2, _b, _c, _d, _g, _h, _i, _j, _k;
|
|
3905
3954
|
if (!hasSetupBaseViews) {
|
|
3906
3955
|
hasSetupBaseViews = !0;
|
|
3907
|
-
let baseViews = import_setupHooks.hooks.getBaseViews
|
|
3956
|
+
let baseViews = (_b = (_a2 = import_setupHooks.hooks).getBaseViews) == null ? void 0 : _b.call(_a2);
|
|
3908
3957
|
baseViews && (BaseText = baseViews.Text, BaseView = baseViews.View);
|
|
3909
3958
|
}
|
|
3910
3959
|
let componentContext = (0, import_react.useContext)(import_ComponentContext.ComponentContext), styledContextProps, overriddenContextProps, contextValue, { context } = staticConfig;
|
|
@@ -3914,7 +3963,7 @@ var require_createComponent_native = __commonJS({
|
|
|
3914
3963
|
for (let key in context.props) {
|
|
3915
3964
|
let propVal = (
|
|
3916
3965
|
// because its after default props but before props this annoying amount of checks
|
|
3917
|
-
propsIn[key] ?? propsIn[inverseShorthands[key]] ?? defaultProps
|
|
3966
|
+
propsIn[key] ?? propsIn[inverseShorthands[key]] ?? (defaultProps == null ? void 0 : defaultProps[key]) ?? (defaultProps == null ? void 0 : defaultProps[inverseShorthands[key]])
|
|
3918
3967
|
);
|
|
3919
3968
|
propVal === void 0 ? contextValue && (key in validStyles2 || key in variants) && (styledContextProps ||= {}, styledContextProps[key] = contextValue[key]) : (overriddenContextProps ||= {}, overriddenContextProps[key] = propVal);
|
|
3920
3969
|
}
|
|
@@ -3923,20 +3972,20 @@ var require_createComponent_native = __commonJS({
|
|
|
3923
3972
|
curDefaultProps ? props = (0, import_mergeProps.mergeProps)(curDefaultProps, propsIn) : props = propsIn;
|
|
3924
3973
|
let debugProp = props.debug, componentName = props.componentName || staticConfig.componentName;
|
|
3925
3974
|
time && time`start (ignore)`;
|
|
3926
|
-
let isHydrated = (0, import_use_did_finish_ssr.useDidFinishSSR)();
|
|
3975
|
+
let isHydrated = config != null && config.disableSSR ? !0 : (0, import_use_did_finish_ssr.useDidFinishSSR)();
|
|
3927
3976
|
time && time`did-finish-ssr`;
|
|
3928
3977
|
let stateRef = (0, import_react.useRef)(
|
|
3929
3978
|
void 0
|
|
3930
3979
|
);
|
|
3931
3980
|
stateRef.current ||= {}, time && time`stateref`;
|
|
3932
|
-
let hostRef = (0, import_react.useRef)(null), animationsConfig = componentContext.animationDriver, useAnimations = animationsConfig
|
|
3981
|
+
let hostRef = (0, import_react.useRef)(null), animationsConfig = componentContext.animationDriver, useAnimations = animationsConfig == null ? void 0 : animationsConfig.useAnimations, hasAnimationProp = !!(props.animation || props.style && hasAnimatedStyleValue(props.style)), supportsCSSVars = animationsConfig == null ? void 0 : animationsConfig.supportsCSSVars, willBeAnimated = (() => {
|
|
3933
3982
|
if (import_constants2.isServer && !supportsCSSVars)
|
|
3934
3983
|
return !1;
|
|
3935
3984
|
let curState = stateRef.current;
|
|
3936
3985
|
return !!(hasAnimationProp && !isHOC && useAnimations || curState.hasAnimated);
|
|
3937
|
-
})(), usePresence = animationsConfig
|
|
3986
|
+
})(), usePresence = animationsConfig == null ? void 0 : animationsConfig.usePresence, presence = willBeAnimated && (usePresence == null ? void 0 : usePresence()) || null, hasEnterStyle = !!props.enterStyle, needsMount = !!((!import_constants2.isWeb || import_constants2.isClient) && willBeAnimated);
|
|
3938
3987
|
time && time`pre-use-state`;
|
|
3939
|
-
let initialState = willBeAnimated ? supportsCSSVars ? defaultComponentStateShouldEnter : defaultComponentState : defaultComponentStateMounted, states = (0, import_react.useState)(initialState), state = propsIn.forceStyle ? { ...states[0], [propsIn.forceStyle]: !0 } : states[0], setState = states[1], setStateShallow = (0, import_createShallowSetState.createShallowSetState)(setState), groupName = props.group, groupClassName = groupName ? `t_group_${props.group}` : "";
|
|
3988
|
+
let initialState = willBeAnimated ? supportsCSSVars ? import_defaultComponentState.defaultComponentStateShouldEnter : import_defaultComponentState.defaultComponentState : import_defaultComponentState.defaultComponentStateMounted, states = (0, import_react.useState)(initialState), state = propsIn.forceStyle ? { ...states[0], [propsIn.forceStyle]: !0 } : states[0], setState = states[1], setStateShallow = (0, import_createShallowSetState.createShallowSetState)(setState), groupName = props.group, groupClassName = groupName ? `t_group_${props.group}` : "";
|
|
3940
3989
|
if (groupName) {
|
|
3941
3990
|
let groupContextState = componentContext.groups.state, og = setStateShallow;
|
|
3942
3991
|
setStateShallow = (state2) => {
|
|
@@ -3953,7 +4002,7 @@ var require_createComponent_native = __commonJS({
|
|
|
3953
4002
|
time && time`use-state`;
|
|
3954
4003
|
let isAnimated = willBeAnimated;
|
|
3955
4004
|
willBeAnimated && !supportsCSSVars && !presence && isHydrated && (import_constants2.isServer || state.unmounted === !0) && (isAnimated = !1), willBeAnimated && !stateRef.current.hasAnimated && (stateRef.current.hasAnimated = !0);
|
|
3956
|
-
let componentClassName = props.asChild ? "" : props.componentName ? `is_${props.componentName}` : defaultComponentClassName, hasTextAncestor = !!(import_constants2.isWeb && isText && componentContext.inText), isDisabled = props.disabled ?? props.accessibilityState
|
|
4005
|
+
let componentClassName = props.asChild ? "" : props.componentName ? `is_${props.componentName}` : defaultComponentClassName, hasTextAncestor = !!(import_constants2.isWeb && isText && componentContext.inText), isDisabled = props.disabled ?? ((_c = props.accessibilityState) == null ? void 0 : _c.disabled);
|
|
3957
4006
|
time && time`use-context`;
|
|
3958
4007
|
let element = import_constants2.isWeb && (!Component || typeof Component == "string") && props.tag || Component, BaseTextComponent = BaseText || element || "span", BaseViewComponent = BaseView || element || (hasTextAncestor ? "span" : "div");
|
|
3959
4008
|
AnimatedText = animationsConfig ? animationsConfig.Text : BaseTextComponent, AnimatedView = animationsConfig ? animationsConfig.View : BaseViewComponent;
|
|
@@ -3965,7 +4014,7 @@ var require_createComponent_native = __commonJS({
|
|
|
3965
4014
|
isEntering && enterVariant ? (debugProp === "verbose" && console.warn(`Animating presence ENTER "${enterVariant}"`), props[enterVariant] = !0) : isExiting2 && exitVariant && (debugProp === "verbose" && console.warn(`Animating presence EXIT "${enterVariant}"`), props[exitVariant] = !enterExitVariant);
|
|
3966
4015
|
}
|
|
3967
4016
|
}
|
|
3968
|
-
let isAnimatedReactNative =
|
|
4017
|
+
let isAnimatedReactNative = hasAnimationProp && (animationsConfig == null ? void 0 : animationsConfig.isReactNative), isReactNative = !!(staticConfig.isReactNative || isAnimatedReactNative), shouldAvoidClasses = !!(!import_constants2.isWeb || isAnimated || !staticConfig.acceptsClassName || propsIn.disableClassName), shouldForcePseudo = !!propsIn.forceStyle, noClassNames = shouldAvoidClasses || shouldForcePseudo, disableThemeProp = props["data-disable-theme"], disableTheme = disableThemeProp && !willBeAnimated || isHOC;
|
|
3969
4018
|
time && time`theme-props`, props.themeShallow && (stateRef.current.themeShallow = !0);
|
|
3970
4019
|
let themeStateProps = {
|
|
3971
4020
|
name: props.theme,
|
|
@@ -3975,11 +4024,11 @@ var require_createComponent_native = __commonJS({
|
|
|
3975
4024
|
shallow: stateRef.current.themeShallow,
|
|
3976
4025
|
shouldUpdate: () => stateRef.current.isListeningToTheme,
|
|
3977
4026
|
debug: debugProp
|
|
3978
|
-
}, isExiting = !state.unmounted && presence
|
|
4027
|
+
}, isExiting = !state.unmounted && (presence == null ? void 0 : presence[0]) === !1;
|
|
3979
4028
|
{
|
|
3980
4029
|
let id = (0, import_react.useId)();
|
|
3981
4030
|
if (debugProp && debugProp !== "profile") {
|
|
3982
|
-
let name = `${componentName || Component
|
|
4031
|
+
let name = `${componentName || (Component == null ? void 0 : Component.displayName) || (Component == null ? void 0 : Component.name) || "[Unnamed Component]"}`, type = isAnimatedReactNative ? "(animated)" : isReactNative ? "(rnw)" : "", dataIs = propsIn["data-is"] || "", banner = `${name}${dataIs ? ` ${dataIs}` : ""} ${type} id ${id}`;
|
|
3983
4032
|
console.group(
|
|
3984
4033
|
`%c ${banner} (unmounted: ${state.unmounted})${presence ? ` (presence: ${presence[0]})` : ""} ${isHydrated ? "\u{1F4A6}" : "\u{1F3DC}\uFE0F"}`,
|
|
3985
4034
|
"background: green; color: white;"
|
|
@@ -4017,7 +4066,7 @@ var require_createComponent_native = __commonJS({
|
|
|
4017
4066
|
let resolveVariablesAs = (
|
|
4018
4067
|
// if HOC + mounted + has animation prop, resolve as value so it passes non-variable to child
|
|
4019
4068
|
isAnimated && !supportsCSSVars || isHOC && state.unmounted == !1 && hasAnimationProp ? "value" : "auto"
|
|
4020
|
-
), keepStyleSSR = willBeAnimated && animationsConfig
|
|
4069
|
+
), keepStyleSSR = willBeAnimated && (animationsConfig == null ? void 0 : animationsConfig.keepStyleSSR), styleProps = {
|
|
4021
4070
|
mediaState: mediaState2,
|
|
4022
4071
|
noClassNames,
|
|
4023
4072
|
resolveVariablesAs,
|
|
@@ -4042,7 +4091,7 @@ var require_createComponent_native = __commonJS({
|
|
|
4042
4091
|
enabled: shouldListenForMedia,
|
|
4043
4092
|
keys: mediaListeningKeys
|
|
4044
4093
|
});
|
|
4045
|
-
let isAnimatedReactNativeWeb =
|
|
4094
|
+
let isAnimatedReactNativeWeb = hasAnimationProp && isReactNative;
|
|
4046
4095
|
if (debugProp && debugProp !== "profile" && (console.groupCollapsed(">>>"), console.log("props in", propsIn, "mapped to", props, "in order", Object.keys(props)), console.log("splitStyles", splitStyles), console.log("media", { shouldListenForMedia, isMediaArray, mediaListeningKeys }), console.log("className", Object.values(splitStyles.classNames)), import_constants2.isClient && console.log("ref", hostRef, "(click to view)"), console.groupEnd(), debugProp === "break"))
|
|
4047
4096
|
debugger;
|
|
4048
4097
|
let {
|
|
@@ -4099,7 +4148,7 @@ var require_createComponent_native = __commonJS({
|
|
|
4099
4148
|
|
|
4100
4149
|
If you meant to do this, you can disable this warning - either change untilMeasured and group at the same time, or do group={conditional ? 'name' : undefined}`
|
|
4101
4150
|
), time && time`destructure`;
|
|
4102
|
-
let disabled = props.accessibilityState
|
|
4151
|
+
let disabled = ((_d = props.accessibilityState) == null ? void 0 : _d.disabled) || // @ts-expect-error (comes from core)
|
|
4103
4152
|
props.accessibilityDisabled, viewProps = nonTamaguiProps;
|
|
4104
4153
|
isHOC && _themeProp && (viewProps.theme = _themeProp), groupName && (nonTamaguiProps.onLayout = (0, import_helpers.composeEventHandlers)(
|
|
4105
4154
|
nonTamaguiProps.onLayout,
|
|
@@ -4136,7 +4185,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
4136
4185
|
};
|
|
4137
4186
|
disposeGroupsListener = componentContext.groups.subscribe(
|
|
4138
4187
|
(name, { layout, pseudo }) => {
|
|
4139
|
-
if (pseudo && pseudoGroups
|
|
4188
|
+
if (pseudo && pseudoGroups != null && pseudoGroups.has(name))
|
|
4140
4189
|
Object.assign(current.pseudo, pseudo), persist();
|
|
4141
4190
|
else if (layout && mediaGroups) {
|
|
4142
4191
|
let mediaState22 = getMediaState(mediaGroups, layout), next = (0, import_createShallowSetState.mergeIfNotShallowEqual)(current.media, mediaState22);
|
|
@@ -4155,7 +4204,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
4155
4204
|
);
|
|
4156
4205
|
}
|
|
4157
4206
|
return () => {
|
|
4158
|
-
disposeGroupsListener
|
|
4207
|
+
disposeGroupsListener == null || disposeGroupsListener(), mouseUps.delete(unPress);
|
|
4159
4208
|
};
|
|
4160
4209
|
}, [
|
|
4161
4210
|
shouldSetMounted,
|
|
@@ -4163,37 +4212,37 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
4163
4212
|
pseudoGroups ? Object.keys([...pseudoGroups]).join("") : 0,
|
|
4164
4213
|
mediaGroups ? Object.keys([...mediaGroups]).join("") : 0
|
|
4165
4214
|
]);
|
|
4166
|
-
let avoidAnimationStyle = keepStyleSSR && state.unmounted === !0, fontFamily = isText ? splitStyles.fontFamily || staticConfig.defaultProps
|
|
4215
|
+
let avoidAnimationStyle = keepStyleSSR && state.unmounted === !0, fontFamily = isText ? splitStyles.fontFamily || ((_g = staticConfig.defaultProps) == null ? void 0 : _g.fontFamily) : null;
|
|
4167
4216
|
fontFamily && fontFamily[0] === "$" && (fontFamily = fontFamily.slice(1));
|
|
4168
4217
|
let fontFamilyClassName = fontFamily ? `font_${fontFamily}` : "", style = avoidAnimationStyle ? splitStyles.style : animationStyles || splitStyles.style, className;
|
|
4169
4218
|
viewProps.style = style;
|
|
4170
|
-
let runtimePressStyle = !disabled && noClassNames && pseudos
|
|
4219
|
+
let runtimePressStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.pressStyle), attachPress = !!(groupName || runtimePressStyle || onPress || onPressOut || onPressIn || onLongPress || onClick), runtimeHoverStyle = !disabled && noClassNames && (pseudos == null ? void 0 : pseudos.hoverStyle), isHoverable = import_constants2.isWeb && !!(groupName || runtimeHoverStyle || onHoverIn || onHoverOut || onMouseEnter || onMouseLeave), handlesPressEvents = !(import_constants2.isWeb || asChild), shouldAttach = !!(attachPress || isHoverable || noClassNames && "pressStyle" in props || import_constants2.isWeb && noClassNames && "hoverStyle" in props);
|
|
4171
4220
|
time && time`events-setup`;
|
|
4172
4221
|
let events = shouldAttach && !isDisabled && !asChild ? {
|
|
4173
4222
|
onPressOut: attachPress ? (e) => {
|
|
4174
|
-
unPress(), onPressOut
|
|
4223
|
+
unPress(), onPressOut == null || onPressOut(e), onMouseUp == null || onMouseUp(e);
|
|
4175
4224
|
} : void 0,
|
|
4176
4225
|
...(isHoverable || attachPress) && {
|
|
4177
4226
|
onMouseEnter: (e) => {
|
|
4178
4227
|
let next = {};
|
|
4179
|
-
next.hover = !0, state.pressIn && (next.press = !0), setStateShallow(next), onHoverIn
|
|
4228
|
+
next.hover = !0, state.pressIn && (next.press = !0), setStateShallow(next), onHoverIn == null || onHoverIn(e), onMouseEnter == null || onMouseEnter(e);
|
|
4180
4229
|
},
|
|
4181
4230
|
onMouseLeave: (e) => {
|
|
4182
4231
|
let next = {};
|
|
4183
|
-
mouseUps.add(unPress), next.hover = !1, state.pressIn && (next.press = !1, next.pressIn = !1), setStateShallow(next), onHoverOut
|
|
4232
|
+
mouseUps.add(unPress), next.hover = !1, state.pressIn && (next.press = !1, next.pressIn = !1), setStateShallow(next), onHoverOut == null || onHoverOut(e), onMouseLeave == null || onMouseLeave(e);
|
|
4184
4233
|
}
|
|
4185
4234
|
},
|
|
4186
4235
|
onPressIn: attachPress ? (e) => {
|
|
4187
4236
|
setStateShallow({
|
|
4188
4237
|
press: !0,
|
|
4189
4238
|
pressIn: !0
|
|
4190
|
-
}), onPressIn
|
|
4239
|
+
}), onPressIn == null || onPressIn(e), onMouseDown == null || onMouseDown(e), import_constants2.isWeb && mouseUps.add(unPress);
|
|
4191
4240
|
} : void 0,
|
|
4192
4241
|
onPress: attachPress ? (e) => {
|
|
4193
|
-
unPress(), import_constants2.isWeb && onClick
|
|
4242
|
+
unPress(), import_constants2.isWeb && (onClick == null || onClick(e)), onPress == null || onPress(e);
|
|
4194
4243
|
} : void 0,
|
|
4195
4244
|
onLongPress: attachPress && onLongPress ? (e) => {
|
|
4196
|
-
unPress(), onLongPress
|
|
4245
|
+
unPress(), onLongPress == null || onLongPress(e);
|
|
4197
4246
|
} : void 0
|
|
4198
4247
|
} : null;
|
|
4199
4248
|
events && Object.assign(events, {
|
|
@@ -4205,7 +4254,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
4205
4254
|
delayPressOut: viewProps.delayPressOut,
|
|
4206
4255
|
focusable: viewProps.focusable ?? !0,
|
|
4207
4256
|
minPressDuration: 0
|
|
4208
|
-
}), time && time`events`, debugProp === "verbose" && console.log("events", { events, isHoverable, attachPress }), import_setupHooks.hooks.useEvents
|
|
4257
|
+
}), time && time`events`, debugProp === "verbose" && console.log("events", { events, isHoverable, attachPress }), (_i = (_h = import_setupHooks.hooks).useEvents) == null || _i.call(_h, viewProps, events, splitStyles, setStateShallow);
|
|
4209
4258
|
let direction = props.spaceDirection || "both";
|
|
4210
4259
|
time && time`hooks`;
|
|
4211
4260
|
let content = !children || asChild ? children : spacedChildren({
|
|
@@ -4265,8 +4314,8 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
4265
4314
|
handlesPressEvents,
|
|
4266
4315
|
willBeAnimated,
|
|
4267
4316
|
isStringElement,
|
|
4268
|
-
classNamesIn: props.className
|
|
4269
|
-
classNamesOut: viewProps.className
|
|
4317
|
+
classNamesIn: (_j = props.className) == null ? void 0 : _j.split(" "),
|
|
4318
|
+
classNamesOut: (_k = viewProps.className) == null ? void 0 : _k.split(" "),
|
|
4270
4319
|
events,
|
|
4271
4320
|
shouldAttach,
|
|
4272
4321
|
pseudos,
|
|
@@ -4304,7 +4353,8 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
4304
4353
|
return Component2.staticConfig = extendStyledConfig(extended), Component2.styleable = styleable, Component2;
|
|
4305
4354
|
}
|
|
4306
4355
|
function styleable(Component2, extended) {
|
|
4307
|
-
|
|
4356
|
+
var _a2;
|
|
4357
|
+
let ComponentForwardedRef = ((_a2 = Component2.render) == null ? void 0 : _a2.length) === 2 ? Component2 : (
|
|
4308
4358
|
// memo because theme changes otherwise would always re-render
|
|
4309
4359
|
(0, import_react.memo)((0, import_react.forwardRef)(Component2))
|
|
4310
4360
|
), extendedConfig = extendStyledConfig(extended), out = (0, import_themeable.themeable)(ComponentForwardedRef, extendedConfig);
|
|
@@ -4360,16 +4410,17 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
4360
4410
|
}
|
|
4361
4411
|
});
|
|
4362
4412
|
function spacedChildren(props) {
|
|
4413
|
+
var _a, _b, _c;
|
|
4363
4414
|
let { isZStack, children, space, direction, spaceFlex, separator } = props, hasSpace = !!(space || spaceFlex), hasSeparator = separator != null;
|
|
4364
4415
|
if (!(hasSpace || hasSeparator || isZStack))
|
|
4365
4416
|
return children;
|
|
4366
4417
|
let childrenList = import_react.Children.toArray(children);
|
|
4367
|
-
if (childrenList.length <= 1 && !isZStack && !childrenList[0]
|
|
4418
|
+
if (childrenList.length <= 1 && !isZStack && !((_b = (_a = childrenList[0]) == null ? void 0 : _a.type) != null && _b.shouldForwardSpace))
|
|
4368
4419
|
return childrenList;
|
|
4369
4420
|
let final = [];
|
|
4370
4421
|
for (let [index, child] of childrenList.entries()) {
|
|
4371
4422
|
let isEmpty = child == null || Array.isArray(child) && child.length === 0;
|
|
4372
|
-
if (!isEmpty && import_react.default.isValidElement(child) && child.type
|
|
4423
|
+
if (!isEmpty && import_react.default.isValidElement(child) && (_c = child.type) != null && _c.shouldForwardSpace && (child = import_react.default.cloneElement(child, {
|
|
4373
4424
|
space,
|
|
4374
4425
|
spaceFlex,
|
|
4375
4426
|
separator,
|
|
@@ -4420,8 +4471,8 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
4420
4471
|
);
|
|
4421
4472
|
}
|
|
4422
4473
|
function isUnspaced(child) {
|
|
4423
|
-
let t = child
|
|
4424
|
-
return t
|
|
4474
|
+
let t = child == null ? void 0 : child.type;
|
|
4475
|
+
return (t == null ? void 0 : t.isVisuallyHidden) || (t == null ? void 0 : t.isUnspaced);
|
|
4425
4476
|
}
|
|
4426
4477
|
var AbsoluteFill = createComponent({
|
|
4427
4478
|
defaultProps: {
|
|
@@ -4755,6 +4806,7 @@ var require_insertFont_native = __commonJS({
|
|
|
4755
4806
|
}
|
|
4756
4807
|
var updateFont = insertFont;
|
|
4757
4808
|
function parseFont(definition) {
|
|
4809
|
+
var _a;
|
|
4758
4810
|
let parsed = {};
|
|
4759
4811
|
for (let attrKey in definition) {
|
|
4760
4812
|
let attr = definition[attrKey];
|
|
@@ -4764,7 +4816,7 @@ var require_insertFont_native = __commonJS({
|
|
|
4764
4816
|
parsed[attrKey] = {};
|
|
4765
4817
|
for (let key in attr) {
|
|
4766
4818
|
let val = attr[key];
|
|
4767
|
-
val.val
|
|
4819
|
+
((_a = val.val) == null ? void 0 : _a[0]) === "$" && (val = val.val), parsed[attrKey][`$${key}`] = val;
|
|
4768
4820
|
}
|
|
4769
4821
|
}
|
|
4770
4822
|
}
|
|
@@ -4808,6 +4860,7 @@ var require_createTamagui_native = __commonJS({
|
|
|
4808
4860
|
module2.exports = __toCommonJS2(createTamagui_exports);
|
|
4809
4861
|
var import_constants2 = require_index_native(), import_config = require_config_native(), import_createVariables = require_createVariables_native(), import_getThemeCSSRules = require_getThemeCSSRules_native(), import_insertStyleRule = require_insertStyleRule_native(), import_proxyThemeToParents = require_proxyThemeToParents_native(), import_registerCSSVariable = require_registerCSSVariable_native(), import_themes = require_themes_native(), import_useMedia = require_useMedia_native(), import_insertFont = require_insertFont_native(), import_Tamagui = require_Tamagui_native(), createdConfigs = /* @__PURE__ */ new WeakMap();
|
|
4810
4862
|
function createTamagui(configIn) {
|
|
4863
|
+
var _a;
|
|
4811
4864
|
if (createdConfigs.has(configIn))
|
|
4812
4865
|
return configIn;
|
|
4813
4866
|
if (!configIn.tokens)
|
|
@@ -4938,7 +4991,7 @@ ${runtimeStyles}`;
|
|
|
4938
4991
|
// const tokens = [...getToken(tokens.size[0])]
|
|
4939
4992
|
// .spacer-sm + ._dsp_contents._dsp-sm-hidden { margin-left: -var(--${}) }
|
|
4940
4993
|
};
|
|
4941
|
-
return (0, import_useMedia.configureMedia)(config), (0, import_config.setConfig)(config), import_config.configListeners.size && (import_config.configListeners.forEach((cb) => cb(config)), import_config.configListeners.clear()), createdConfigs.set(config, !0), process.env.DEBUG
|
|
4994
|
+
return (0, import_useMedia.configureMedia)(config), (0, import_config.setConfig)(config), import_config.configListeners.size && (import_config.configListeners.forEach((cb) => cb(config)), import_config.configListeners.clear()), createdConfigs.set(config, !0), (_a = process.env.DEBUG) != null && _a.startsWith("tamagui") && console.log("Tamagui config:", config), globalThis.Tamagui || (globalThis.Tamagui = import_Tamagui.Tamagui), config;
|
|
4942
4995
|
}
|
|
4943
4996
|
function getThemesDeduped(themes) {
|
|
4944
4997
|
let dedupedThemes = [], existing = /* @__PURE__ */ new Map();
|
|
@@ -5006,7 +5059,7 @@ var require_mergeVariants_native = __commonJS({
|
|
|
5006
5059
|
var mergeVariants = (parentVariants, ourVariants) => {
|
|
5007
5060
|
let variants = {};
|
|
5008
5061
|
for (let key in ourVariants) {
|
|
5009
|
-
let parentVariant = parentVariants
|
|
5062
|
+
let parentVariant = parentVariants == null ? void 0 : parentVariants[key], ourVariant = ourVariants[key];
|
|
5010
5063
|
if (!parentVariant || typeof ourVariant == "function") {
|
|
5011
5064
|
variants[key] = ourVariant;
|
|
5012
5065
|
continue;
|
|
@@ -5017,7 +5070,7 @@ var require_mergeVariants_native = __commonJS({
|
|
|
5017
5070
|
}
|
|
5018
5071
|
variants[key] = {};
|
|
5019
5072
|
for (let subKey in ourVariant) {
|
|
5020
|
-
let val = ourVariant[subKey], parentVal = parentVariant
|
|
5073
|
+
let val = ourVariant[subKey], parentVal = parentVariant == null ? void 0 : parentVariant[subKey];
|
|
5021
5074
|
typeof val == "function" || !parentVal || typeof parentVal == "function" ? variants[key][subKey] = val : variants[key][subKey] = {
|
|
5022
5075
|
// keep order
|
|
5023
5076
|
...parentVal,
|
|
@@ -5096,7 +5149,7 @@ var require_styled_native = __commonJS({
|
|
|
5096
5149
|
function styled(ComponentIn, options, staticExtractionOptions) {
|
|
5097
5150
|
if (!ComponentIn)
|
|
5098
5151
|
throw new Error("No component given to styled()");
|
|
5099
|
-
let parentStaticConfig = ComponentIn.staticConfig, isPlainStyledComponent = !!parentStaticConfig && !(parentStaticConfig.isReactNative || parentStaticConfig.isHOC), Component = parentStaticConfig
|
|
5152
|
+
let parentStaticConfig = ComponentIn.staticConfig, isPlainStyledComponent = !!parentStaticConfig && !(parentStaticConfig.isReactNative || parentStaticConfig.isHOC), Component = parentStaticConfig != null && parentStaticConfig.isHOC && !(parentStaticConfig != null && parentStaticConfig.isStyledHOC) || isPlainStyledComponent ? ComponentIn : (parentStaticConfig == null ? void 0 : parentStaticConfig.Component) || ComponentIn, reactNativeConfig = (0, import_setupReactNative.getReactNativeConfig)(Component), isReactNative = !!(reactNativeConfig || staticExtractionOptions != null && staticExtractionOptions.isReactNative || parentStaticConfig != null && parentStaticConfig.isReactNative || (0, import_setupReactNative.getReactNativeConfig)(parentStaticConfig == null ? void 0 : parentStaticConfig.Component)), staticConfigProps = (() => {
|
|
5100
5153
|
if (options) {
|
|
5101
5154
|
let {
|
|
5102
5155
|
variants,
|
|
@@ -5112,8 +5165,8 @@ var require_styled_native = __commonJS({
|
|
|
5112
5165
|
}), parentStaticConfig && (parentStaticConfig.isHOC && !parentStaticConfig.isStyledHOC || (defaultProps = {
|
|
5113
5166
|
...parentStaticConfig.defaultProps,
|
|
5114
5167
|
...defaultProps
|
|
5115
|
-
}), parentStaticConfig.variants && (variants = (0, import_mergeVariants.mergeVariants)(parentStaticConfig.variants, variants))), parentStaticConfig
|
|
5116
|
-
let isText = !!(staticExtractionOptions
|
|
5168
|
+
}), parentStaticConfig.variants && (variants = (0, import_mergeVariants.mergeVariants)(parentStaticConfig.variants, variants))), parentStaticConfig != null && parentStaticConfig.isHOC && name && (defaultProps.componentName = name);
|
|
5169
|
+
let isText = !!(staticExtractionOptions != null && staticExtractionOptions.isText || parentStaticConfig != null && parentStaticConfig.isText), acceptsClassName = acceptsClassNameProp ?? (isPlainStyledComponent || isReactNative || (parentStaticConfig == null ? void 0 : parentStaticConfig.isHOC) && (parentStaticConfig == null ? void 0 : parentStaticConfig.acceptsClassName)), conf = {
|
|
5117
5170
|
...parentStaticConfig,
|
|
5118
5171
|
...staticExtractionOptions,
|
|
5119
5172
|
...!isPlainStyledComponent && {
|
|
@@ -5124,13 +5177,13 @@ var require_styled_native = __commonJS({
|
|
|
5124
5177
|
variants,
|
|
5125
5178
|
defaultProps,
|
|
5126
5179
|
defaultVariants,
|
|
5127
|
-
componentName: name || parentStaticConfig
|
|
5180
|
+
componentName: name || (parentStaticConfig == null ? void 0 : parentStaticConfig.componentName),
|
|
5128
5181
|
isReactNative,
|
|
5129
5182
|
isText,
|
|
5130
5183
|
acceptsClassName,
|
|
5131
5184
|
context,
|
|
5132
5185
|
...reactNativeConfig,
|
|
5133
|
-
isStyledHOC: !!parentStaticConfig
|
|
5186
|
+
isStyledHOC: !!(parentStaticConfig != null && parentStaticConfig.isHOC),
|
|
5134
5187
|
parentStaticConfig
|
|
5135
5188
|
};
|
|
5136
5189
|
return (defaultProps.children || !acceptsClassName || context) && (conf.neverFlatten = !0), conf;
|
|
@@ -5243,7 +5296,7 @@ var require_isTamaguiComponent_native = __commonJS({
|
|
|
5243
5296
|
});
|
|
5244
5297
|
module2.exports = __toCommonJS2(isTamaguiComponent_exports);
|
|
5245
5298
|
function isTamaguiComponent(comp, name) {
|
|
5246
|
-
let config = comp
|
|
5299
|
+
let config = comp == null ? void 0 : comp.staticConfig;
|
|
5247
5300
|
return !!(config && (!name || name === config.componentName));
|
|
5248
5301
|
}
|
|
5249
5302
|
}
|
|
@@ -5324,14 +5377,14 @@ var require_useThemeName_native = __commonJS({
|
|
|
5324
5377
|
module2.exports = __toCommonJS2(useThemeName_exports);
|
|
5325
5378
|
var import_constants2 = require_index_native(), import_react = require("react"), import_ThemeManagerContext = require_ThemeManagerContext_native();
|
|
5326
5379
|
function useThemeName(opts) {
|
|
5327
|
-
let manager = (0, import_react.useContext)(import_ThemeManagerContext.ThemeManagerContext), [name, setName] = (0, import_react.useState)(manager
|
|
5380
|
+
let manager = (0, import_react.useContext)(import_ThemeManagerContext.ThemeManagerContext), [name, setName] = (0, import_react.useState)((manager == null ? void 0 : manager.state.name) || "");
|
|
5328
5381
|
return (0, import_constants2.useIsomorphicLayoutEffect)(() => {
|
|
5329
5382
|
if (manager)
|
|
5330
5383
|
return setName(manager.state.name), manager.onChangeTheme((next, manager2) => {
|
|
5331
|
-
let name2 = opts
|
|
5384
|
+
let name2 = opts != null && opts.parent && manager2.state.parentName || next;
|
|
5332
5385
|
name2 && setName(name2);
|
|
5333
5386
|
});
|
|
5334
|
-
}, [manager
|
|
5387
|
+
}, [manager == null ? void 0 : manager.state.name]), name;
|
|
5335
5388
|
}
|
|
5336
5389
|
}
|
|
5337
5390
|
});
|
|
@@ -5353,14 +5406,14 @@ var require_useStyle_native = __commonJS({
|
|
|
5353
5406
|
useStyle: () => useStyle
|
|
5354
5407
|
});
|
|
5355
5408
|
module2.exports = __toCommonJS2(useStyle_exports);
|
|
5356
|
-
var import_react = require("react"), import_ComponentContext = require_ComponentContext_native(),
|
|
5409
|
+
var import_react = require("react"), import_ComponentContext = require_ComponentContext_native(), import_defaultComponentState = require_defaultComponentState_native(), import_getSplitStyles = require_getSplitStyles_native(), import_useMedia = require_useMedia_native(), import_useTheme = require_useTheme_native();
|
|
5357
5410
|
function useStyle(base, style, options) {
|
|
5358
5411
|
let isText = base.staticConfig.isText, componentContext = (0, import_react.useContext)(import_ComponentContext.ComponentContext), [themeState] = (0, import_useTheme.useThemeWithState)({}), media = (0, import_useMedia.useMedia)(), out = (0, import_getSplitStyles.useSplitStyles)(
|
|
5359
5412
|
style,
|
|
5360
5413
|
base.staticConfig,
|
|
5361
5414
|
themeState.state.theme,
|
|
5362
5415
|
themeState.state.name,
|
|
5363
|
-
|
|
5416
|
+
import_defaultComponentState.defaultComponentState,
|
|
5364
5417
|
{
|
|
5365
5418
|
...options,
|
|
5366
5419
|
mediaState: media,
|
|
@@ -5369,7 +5422,7 @@ var require_useStyle_native = __commonJS({
|
|
|
5369
5422
|
null,
|
|
5370
5423
|
componentContext,
|
|
5371
5424
|
isText ? "span" : "div",
|
|
5372
|
-
options
|
|
5425
|
+
options == null ? void 0 : options.debug
|
|
5373
5426
|
);
|
|
5374
5427
|
return {
|
|
5375
5428
|
style: Object.keys(out.style).length ? out.style : null,
|
|
@@ -5441,8 +5494,8 @@ var require_useProps_native = __commonJS({
|
|
|
5441
5494
|
var import_useMedia = require_useMedia_native();
|
|
5442
5495
|
function useProps(props, opts) {
|
|
5443
5496
|
return (0, import_useMedia.useMediaPropsActive)(props, {
|
|
5444
|
-
expandShorthands: !opts
|
|
5445
|
-
resolveValues: opts
|
|
5497
|
+
expandShorthands: !(opts != null && opts.disableExpandShorthands),
|
|
5498
|
+
resolveValues: opts == null ? void 0 : opts.resolveValues
|
|
5446
5499
|
});
|
|
5447
5500
|
}
|
|
5448
5501
|
}
|
|
@@ -5701,7 +5754,10 @@ var require_useGet_native = __commonJS({
|
|
|
5701
5754
|
return useIsomorphicLayoutEffect3(() => {
|
|
5702
5755
|
curRef.current = currentValue;
|
|
5703
5756
|
}), (0, import_react.useCallback)(
|
|
5704
|
-
forwardToFunction ? (...args) =>
|
|
5757
|
+
forwardToFunction ? (...args) => {
|
|
5758
|
+
var _a;
|
|
5759
|
+
return (_a = curRef.current) == null ? void 0 : _a.apply(null, args);
|
|
5760
|
+
} : () => curRef.current,
|
|
5705
5761
|
[]
|
|
5706
5762
|
);
|
|
5707
5763
|
}
|
|
@@ -5862,6 +5918,11 @@ var require_fake_react_native = __commonJS({
|
|
|
5862
5918
|
View: "View",
|
|
5863
5919
|
Text: "Text",
|
|
5864
5920
|
TextInput: "TextInput",
|
|
5921
|
+
ScrollView: "ScrollView",
|
|
5922
|
+
Dimensions: {
|
|
5923
|
+
addEventListener(cb) {
|
|
5924
|
+
}
|
|
5925
|
+
},
|
|
5865
5926
|
addPoolingTo() {
|
|
5866
5927
|
}
|
|
5867
5928
|
},
|
|
@@ -5902,8 +5963,9 @@ var keyName = "__reactResponderId", canUseDOM = !!(typeof window < "u" && window
|
|
|
5902
5963
|
return node.getBoundingClientRect();
|
|
5903
5964
|
};
|
|
5904
5965
|
function getEventPath(domEvent) {
|
|
5966
|
+
var _a;
|
|
5905
5967
|
if (domEvent.type === "selectionchange") {
|
|
5906
|
-
let target = window.getSelection()
|
|
5968
|
+
let target = (_a = window.getSelection()) == null ? void 0 : _a.anchorNode;
|
|
5907
5969
|
return composedPathFallback(target);
|
|
5908
5970
|
} else
|
|
5909
5971
|
return domEvent.composedPath != null ? domEvent.composedPath() : composedPathFallback(domEvent.target);
|
|
@@ -5980,7 +6042,7 @@ function normalizeIdentifier(identifier) {
|
|
|
5980
6042
|
return identifier > 20 ? identifier % 20 : identifier;
|
|
5981
6043
|
}
|
|
5982
6044
|
function createResponderEvent(domEvent, responderTouchHistoryStore2) {
|
|
5983
|
-
let rect, propagationWasStopped = !1, changedTouches, touches, domEventChangedTouches = domEvent.changedTouches, domEventType = domEvent.type, metaKey = domEvent.metaKey === !0, shiftKey = domEvent.shiftKey === !0, force = domEventChangedTouches
|
|
6045
|
+
let rect, propagationWasStopped = !1, changedTouches, touches, domEventChangedTouches = domEvent.changedTouches, domEventType = domEvent.type, metaKey = domEvent.metaKey === !0, shiftKey = domEvent.shiftKey === !0, force = (domEventChangedTouches == null ? void 0 : domEventChangedTouches[0].force) || 0, identifier = normalizeIdentifier((domEventChangedTouches == null ? void 0 : domEventChangedTouches[0].identifier) || 0), clientX = (domEventChangedTouches == null ? void 0 : domEventChangedTouches[0].clientX) || domEvent.clientX, clientY = (domEventChangedTouches == null ? void 0 : domEventChangedTouches[0].clientY) || domEvent.clientY, pageX = (domEventChangedTouches == null ? void 0 : domEventChangedTouches[0].pageX) || domEvent.pageX, pageY = (domEventChangedTouches == null ? void 0 : domEventChangedTouches[0].pageY) || domEvent.pageY, preventDefault = typeof domEvent.preventDefault == "function" ? domEvent.preventDefault.bind(domEvent) : emptyFunction, timestamp = domEvent.timeStamp;
|
|
5984
6046
|
function normalizeTouches(touches2) {
|
|
5985
6047
|
return Array.prototype.slice.call(touches2).map((touch) => ({
|
|
5986
6048
|
force: touch.force,
|
|
@@ -6172,6 +6234,7 @@ var ResponderTouchHistoryStore = class {
|
|
|
6172
6234
|
mostRecentTimeStamp: 0
|
|
6173
6235
|
};
|
|
6174
6236
|
recordTouchTrack(topLevelType, nativeEvent) {
|
|
6237
|
+
var _a, _b;
|
|
6175
6238
|
let touchHistory = this._touchHistory;
|
|
6176
6239
|
if (isMoveish(topLevelType))
|
|
6177
6240
|
nativeEvent.changedTouches.forEach((touch) => recordTouchMove(touch, touchHistory));
|
|
@@ -6180,11 +6243,11 @@ var ResponderTouchHistoryStore = class {
|
|
|
6180
6243
|
else if (isEndish(topLevelType) && (nativeEvent.changedTouches.forEach((touch) => recordTouchEnd(touch, touchHistory)), touchHistory.numberActiveTouches = nativeEvent.touches.length, touchHistory.numberActiveTouches === 1)) {
|
|
6181
6244
|
let { touchBank } = touchHistory;
|
|
6182
6245
|
for (let i = 0; i < touchBank.length; i++)
|
|
6183
|
-
if (touchBank[i]
|
|
6246
|
+
if ((_a = touchBank[i]) != null && _a.touchActive) {
|
|
6184
6247
|
touchHistory.indexOfSingleActiveTouch = i;
|
|
6185
6248
|
break;
|
|
6186
6249
|
}
|
|
6187
|
-
touchBank[touchHistory.indexOfSingleActiveTouch]
|
|
6250
|
+
(_b = touchBank[touchHistory.indexOfSingleActiveTouch]) != null && _b.touchActive || console.error("Cannot find single active touch.");
|
|
6188
6251
|
}
|
|
6189
6252
|
}
|
|
6190
6253
|
get touchHistory() {
|
|
@@ -6410,8 +6473,9 @@ var import_constants = __toESM(require_index_native());
|
|
|
6410
6473
|
|
|
6411
6474
|
// src/helpers/getBoundingClientRect.tsx
|
|
6412
6475
|
var getBoundingClientRect2 = (node) => {
|
|
6476
|
+
var _a;
|
|
6413
6477
|
if (!(!node || node.nodeType !== 1))
|
|
6414
|
-
return node.getBoundingClientRect
|
|
6478
|
+
return (_a = node.getBoundingClientRect) == null ? void 0 : _a.call(node);
|
|
6415
6479
|
};
|
|
6416
6480
|
|
|
6417
6481
|
// src/helpers/getRect.tsx
|
|
@@ -6442,7 +6506,7 @@ typeof window < "u" && "ResizeObserver" in window && (resizeObserver = new Resiz
|
|
|
6442
6506
|
}
|
|
6443
6507
|
}));
|
|
6444
6508
|
var measureLayout = (node, relativeTo, callback) => {
|
|
6445
|
-
let relativeNode = relativeTo || node
|
|
6509
|
+
let relativeNode = relativeTo || (node == null ? void 0 : node.parentNode);
|
|
6446
6510
|
relativeNode instanceof HTMLElement && setTimeout(() => {
|
|
6447
6511
|
let relativeRect = getBoundingClientRect2(relativeNode), { height, left, top, width } = getRect(node), x = left - relativeRect.left, y = top - relativeRect.top;
|
|
6448
6512
|
callback(x, y, width, height, left, top);
|
|
@@ -6455,7 +6519,7 @@ function useElementLayout(ref, onLayout) {
|
|
|
6455
6519
|
let node = ref.current;
|
|
6456
6520
|
if (node)
|
|
6457
6521
|
return LayoutHandlers.set(node, onLayout), resizeObserver.observe(node), () => {
|
|
6458
|
-
resizeObserver
|
|
6522
|
+
resizeObserver == null || resizeObserver.unobserve(node);
|
|
6459
6523
|
};
|
|
6460
6524
|
}, [ref, onLayout]);
|
|
6461
6525
|
}
|
|
@@ -6536,7 +6600,7 @@ var Stack = import_web2.Stack, Text = import_web2.Text;
|
|
|
6536
6600
|
},
|
|
6537
6601
|
useEvents(viewProps, events, { pseudos }, setStateShallow) {
|
|
6538
6602
|
{
|
|
6539
|
-
!!pseudos
|
|
6603
|
+
!!(pseudos != null && pseudos.focusStyle) && (viewProps.onFocus = (0, import_web2.composeEventHandlers)(viewProps.onFocus, () => {
|
|
6540
6604
|
setStateShallow({ focus: !0 });
|
|
6541
6605
|
}), viewProps.onBlur = (0, import_web2.composeEventHandlers)(viewProps.onBlur, () => {
|
|
6542
6606
|
setStateShallow({ focus: !1 });
|