@tamagui/core 1.129.5-1751220455565 → 1.129.6-1751237024118
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/index.cjs +15 -9
- package/dist/cjs/index.js +11 -7
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs/index.native.js +15 -7
- package/dist/cjs/index.native.js.map +2 -2
- package/dist/esm/index.js +15 -5
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/index.mjs +11 -6
- package/dist/esm/index.mjs.map +1 -1
- package/dist/esm/index.native.js +13 -6
- package/dist/esm/index.native.js.map +1 -1
- package/dist/native.js +427 -356
- package/dist/native.js.map +3 -3
- package/dist/test.native.js +407 -335
- package/dist/test.native.js.map +3 -3
- package/package.json +9 -8
- package/src/index.tsx +19 -3
- package/types/index.d.ts +3 -2
- package/types/index.d.ts.map +1 -1
- package/dist/cjs/helpers/getBoundingClientRect.cjs +0 -41
- package/dist/cjs/helpers/getBoundingClientRect.js +0 -39
- package/dist/cjs/helpers/getBoundingClientRect.js.map +0 -6
- package/dist/cjs/helpers/getBoundingClientRect.native.js +0 -48
- package/dist/cjs/helpers/getBoundingClientRect.native.js.map +0 -6
- package/dist/cjs/helpers/getRect.cjs +0 -44
- package/dist/cjs/helpers/getRect.js +0 -27
- package/dist/cjs/helpers/getRect.js.map +0 -6
- package/dist/cjs/helpers/getRect.native.js +0 -39
- package/dist/cjs/helpers/getRect.native.js.map +0 -6
- package/dist/cjs/hooks/useElementLayout.cjs +0 -203
- package/dist/cjs/hooks/useElementLayout.js +0 -152
- package/dist/cjs/hooks/useElementLayout.js.map +0 -6
- package/dist/cjs/hooks/useElementLayout.native.js +0 -185
- package/dist/cjs/hooks/useElementLayout.native.js.map +0 -6
- package/dist/esm/helpers/getBoundingClientRect.js +0 -23
- package/dist/esm/helpers/getBoundingClientRect.js.map +0 -6
- package/dist/esm/helpers/getBoundingClientRect.mjs +0 -17
- package/dist/esm/helpers/getBoundingClientRect.mjs.map +0 -1
- package/dist/esm/helpers/getBoundingClientRect.native.js +0 -24
- package/dist/esm/helpers/getBoundingClientRect.native.js.map +0 -1
- package/dist/esm/helpers/getRect.js +0 -11
- package/dist/esm/helpers/getRect.js.map +0 -6
- package/dist/esm/helpers/getRect.mjs +0 -21
- package/dist/esm/helpers/getRect.mjs.map +0 -1
- package/dist/esm/helpers/getRect.native.js +0 -22
- package/dist/esm/helpers/getRect.native.js.map +0 -1
- package/dist/esm/hooks/useElementLayout.js +0 -140
- package/dist/esm/hooks/useElementLayout.js.map +0 -6
- package/dist/esm/hooks/useElementLayout.mjs +0 -175
- package/dist/esm/hooks/useElementLayout.mjs.map +0 -1
- package/dist/esm/hooks/useElementLayout.native.js +0 -189
- package/dist/esm/hooks/useElementLayout.native.js.map +0 -1
- package/src/helpers/getBoundingClientRect.tsx +0 -30
- package/src/helpers/getRect.tsx +0 -8
- package/src/hooks/useElementLayout.tsx +0 -292
- package/types/helpers/getBoundingClientRect.d.ts +0 -3
- package/types/helpers/getBoundingClientRect.d.ts.map +0 -1
- package/types/helpers/getRect.d.ts +0 -9
- package/types/helpers/getRect.d.ts.map +0 -1
- package/types/hooks/useElementLayout.d.ts +0 -26
- package/types/hooks/useElementLayout.d.ts.map +0 -1
package/dist/test.native.js
CHANGED
|
@@ -442,7 +442,7 @@ var require_constants_native = __commonJS({
|
|
|
442
442
|
return isChrome;
|
|
443
443
|
},
|
|
444
444
|
isClient: function() {
|
|
445
|
-
return
|
|
445
|
+
return isClient;
|
|
446
446
|
},
|
|
447
447
|
isIos: function() {
|
|
448
448
|
return isIos;
|
|
@@ -467,7 +467,7 @@ var require_constants_native = __commonJS({
|
|
|
467
467
|
}
|
|
468
468
|
});
|
|
469
469
|
module2.exports = __toCommonJS2(constants_native_exports);
|
|
470
|
-
var import_react3 = require("react"), import_react22 = require("react"), import_react_native = require_fake_react_native(), IS_REACT_19 = !!import_react22.use, isWeb = !1, isWindowDefined = !1, isServer = !1,
|
|
470
|
+
var import_react3 = require("react"), import_react22 = require("react"), import_react_native = require_fake_react_native(), IS_REACT_19 = !!import_react22.use, isWeb = !1, isWindowDefined = !1, isServer = !1, isClient = !1, useIsomorphicLayoutEffect2 = import_react3.useLayoutEffect, isChrome = !1, isWebTouchable = !1, isTouchable = !0, isAndroid = import_react_native.Platform.OS === "android" || process.env.TEST_NATIVE_PLATFORM === "android", isIos = import_react_native.Platform.OS === "ios" || process.env.TEST_NATIVE_PLATFORM === "ios", platforms = {
|
|
471
471
|
ios: "ios",
|
|
472
472
|
android: "android"
|
|
473
473
|
}, currentPlatform = platforms[import_react_native.Platform.OS] || "native";
|
|
@@ -556,7 +556,7 @@ var require_shouldRenderNativePlatform_native = __commonJS({
|
|
|
556
556
|
}
|
|
557
557
|
});
|
|
558
558
|
module2.exports = __toCommonJS2(shouldRenderNativePlatform_exports);
|
|
559
|
-
var
|
|
559
|
+
var import_constants = require_index_native2(), ALL_PLATFORMS = [
|
|
560
560
|
"web",
|
|
561
561
|
"android",
|
|
562
562
|
"ios"
|
|
@@ -567,7 +567,7 @@ var require_shouldRenderNativePlatform_native = __commonJS({
|
|
|
567
567
|
try {
|
|
568
568
|
for (var _iterator = ALL_PLATFORMS[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
569
569
|
var platform = _step.value;
|
|
570
|
-
if (platform ===
|
|
570
|
+
if (platform === import_constants.currentPlatform && userRequestedPlatforms.has(platform)) return platform;
|
|
571
571
|
}
|
|
572
572
|
} catch (err) {
|
|
573
573
|
_didIteratorError = !0, _iteratorError = err;
|
|
@@ -662,7 +662,7 @@ var require_validStyleProps_native = __commonJS({
|
|
|
662
662
|
}
|
|
663
663
|
});
|
|
664
664
|
module2.exports = __toCommonJS2(validStyleProps_exports);
|
|
665
|
-
var
|
|
665
|
+
var import_constants = require_index_native2(), textColors = {
|
|
666
666
|
color: !0,
|
|
667
667
|
textDecorationColor: !0,
|
|
668
668
|
textShadowColor: !0
|
|
@@ -860,7 +860,7 @@ var require_validStyleProps_native = __commonJS({
|
|
|
860
860
|
...stylePropsUnitless,
|
|
861
861
|
boxShadow: !0,
|
|
862
862
|
filter: !0,
|
|
863
|
-
...
|
|
863
|
+
...import_constants.isAndroid ? {
|
|
864
864
|
elevationAndroid: !0
|
|
865
865
|
} : {}
|
|
866
866
|
}, stylePropsFont = {
|
|
@@ -1188,7 +1188,7 @@ var require_config_native = __commonJS({
|
|
|
1188
1188
|
}
|
|
1189
1189
|
});
|
|
1190
1190
|
module2.exports = __toCommonJS2(config_exports);
|
|
1191
|
-
var
|
|
1191
|
+
var import_constants = require_index_native2(), import_constants2 = require_constants_native2(), conf, getSetting2 = function(key) {
|
|
1192
1192
|
var _conf_settings_key;
|
|
1193
1193
|
return (_conf_settings_key = conf.settings[key]) !== null && _conf_settings_key !== void 0 ? _conf_settings_key : (
|
|
1194
1194
|
// @ts-expect-error
|
|
@@ -1221,7 +1221,7 @@ var require_config_native = __commonJS({
|
|
|
1221
1221
|
return tokensMerged[cat][value];
|
|
1222
1222
|
}) || ""]) === null || _tokensMerged_ === void 0 ? void 0 : _tokensMerged_[value];
|
|
1223
1223
|
}, getToken2 = function(value, group) {
|
|
1224
|
-
var useVariable = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
|
|
1224
|
+
var useVariable = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : import_constants.isWeb, token = getTokenObject(value, group);
|
|
1225
1225
|
return useVariable ? token == null ? void 0 : token.variable : token == null ? void 0 : token.val;
|
|
1226
1226
|
}, getTokenValue2 = function(value, group) {
|
|
1227
1227
|
if (!(value === "unset" || value === "auto")) return getToken2(value, group, !1);
|
|
@@ -1316,7 +1316,7 @@ var require_createVariable_native = __commonJS({
|
|
|
1316
1316
|
}
|
|
1317
1317
|
});
|
|
1318
1318
|
module2.exports = __toCommonJS2(createVariable_exports);
|
|
1319
|
-
var
|
|
1319
|
+
var import_constants = require_index_native2(), import_helpers2 = require_index_native3(), import_config = require_config_native();
|
|
1320
1320
|
function constructCSSVariableName(name) {
|
|
1321
1321
|
return `var(--${process.env.TAMAGUI_CSS_VARIABLE_PREFIX || ""}${name})`;
|
|
1322
1322
|
}
|
|
@@ -1329,12 +1329,12 @@ var require_createVariable_native = __commonJS({
|
|
|
1329
1329
|
key,
|
|
1330
1330
|
name: skipHash ? name : (0, import_helpers2.simpleHash)(name, 40),
|
|
1331
1331
|
val,
|
|
1332
|
-
variable:
|
|
1332
|
+
variable: import_constants.isWeb ? skipHash ? constructCSSVariableName(name) : createCSSVariable(name) : ""
|
|
1333
1333
|
};
|
|
1334
1334
|
};
|
|
1335
1335
|
function variableToString(vrble) {
|
|
1336
1336
|
var getValue = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
1337
|
-
return isVariable(vrble) ? !getValue &&
|
|
1337
|
+
return isVariable(vrble) ? !getValue && import_constants.isWeb && vrble.variable ? vrble.variable : `${vrble.val}` : `${vrble || ""}`;
|
|
1338
1338
|
}
|
|
1339
1339
|
function isVariable(v) {
|
|
1340
1340
|
return v && typeof v == "object" && "isVar" in v;
|
|
@@ -1448,7 +1448,7 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
1448
1448
|
}
|
|
1449
1449
|
});
|
|
1450
1450
|
module2.exports = __toCommonJS2(insertStyleRule_exports);
|
|
1451
|
-
var
|
|
1451
|
+
var import_constants = require_index_native2(), import_helpers2 = require_index_native3(), import_createVariable = require_createVariable_native(), totalSelectorsInserted = /* @__PURE__ */ new Map(), allSelectors = {}, allRules = {}, insertedTransforms = {}, getAllSelectors = function() {
|
|
1452
1452
|
return allSelectors;
|
|
1453
1453
|
}, getAllRules = function() {
|
|
1454
1454
|
return Object.values(allRules);
|
|
@@ -1463,7 +1463,7 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
1463
1463
|
}
|
|
1464
1464
|
}
|
|
1465
1465
|
function listenForSheetChanges() {
|
|
1466
|
-
if (
|
|
1466
|
+
if (import_constants.isClient) {
|
|
1467
1467
|
var mo = new MutationObserver(function(entries) {
|
|
1468
1468
|
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
1469
1469
|
try {
|
|
@@ -1526,7 +1526,7 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
1526
1526
|
nonce = _;
|
|
1527
1527
|
}
|
|
1528
1528
|
function insertStyleRules(rulesToInsert) {
|
|
1529
|
-
if (!sheet &&
|
|
1529
|
+
if (!sheet && import_constants.isClient && document.head) {
|
|
1530
1530
|
var styleTag = document.createElement("style");
|
|
1531
1531
|
nonce && (styleTag.nonce = nonce), sheet = document.head.appendChild(styleTag).sheet;
|
|
1532
1532
|
}
|
|
@@ -1823,7 +1823,7 @@ var require_useMedia_native = __commonJS({
|
|
|
1823
1823
|
}
|
|
1824
1824
|
});
|
|
1825
1825
|
module2.exports = __toCommonJS2(useMedia_exports);
|
|
1826
|
-
var
|
|
1826
|
+
var import_constants = require_index_native2(), import_react3 = require("react"), import_config = require_config_native(), import_matchMedia = require_matchMedia_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), mediaState2 = {}, mediaQueryConfig2 = {}, getMedia2 = function() {
|
|
1827
1827
|
return mediaState2;
|
|
1828
1828
|
}, mediaKeys = /* @__PURE__ */ new Set(), mediaKeyRegex = /\$(platform|theme|group)-/, isMediaKey = function(key) {
|
|
1829
1829
|
if (mediaKeys.has(key)) return !0;
|
|
@@ -1869,7 +1869,7 @@ var require_useMedia_native = __commonJS({
|
|
|
1869
1869
|
}
|
|
1870
1870
|
update();
|
|
1871
1871
|
};
|
|
1872
|
-
if (!(
|
|
1872
|
+
if (!(import_constants.isWeb && import_constants.isServer) && !process.env.IS_STATIC && setupVersion !== mediaVersion) {
|
|
1873
1873
|
setupVersion = mediaVersion, unlisten();
|
|
1874
1874
|
for (var key in mediaQueryConfig2) _loop(key);
|
|
1875
1875
|
}
|
|
@@ -2339,7 +2339,7 @@ var require_createStyledContext_native = __commonJS({
|
|
|
2339
2339
|
}
|
|
2340
2340
|
});
|
|
2341
2341
|
module2.exports = __toCommonJS2(createStyledContext_exports);
|
|
2342
|
-
var
|
|
2342
|
+
var import_jsx_runtime2 = require("react/jsx-runtime"), import_react3 = __toESM2(require("react")), import_objectIdentityKey = require_objectIdentityKey_native(), createReactContext = import_react3.default[Math.random(), "createContext"];
|
|
2343
2343
|
function createStyledContext(defaultValues) {
|
|
2344
2344
|
var OGContext = createReactContext(defaultValues), OGProvider = OGContext.Provider, Context = OGContext, scopedContexts = /* @__PURE__ */ new Map();
|
|
2345
2345
|
function getOrCreateScopedContext(scope) {
|
|
@@ -2356,7 +2356,7 @@ var require_createStyledContext_native = __commonJS({
|
|
|
2356
2356
|
}, [
|
|
2357
2357
|
(0, import_objectIdentityKey.objectIdentityKey)(values)
|
|
2358
2358
|
]), Provider22 = OGProvider;
|
|
2359
|
-
return scope && (Provider22 = getOrCreateScopedContext(scope).Provider), /* @__PURE__ */ (0,
|
|
2359
|
+
return scope && (Provider22 = getOrCreateScopedContext(scope).Provider), /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Provider22, {
|
|
2360
2360
|
value: next,
|
|
2361
2361
|
children
|
|
2362
2362
|
});
|
|
@@ -3578,7 +3578,7 @@ var require_expandStyles_native = __commonJS({
|
|
|
3578
3578
|
}
|
|
3579
3579
|
});
|
|
3580
3580
|
module2.exports = __toCommonJS2(expandStyles_exports);
|
|
3581
|
-
var
|
|
3581
|
+
var import_constants = require_index_native2(), import_normalizeShadow = require_normalizeShadow_native();
|
|
3582
3582
|
function fixStyles(style) {
|
|
3583
3583
|
"elevationAndroid" in style && (style.elevation = style.elevationAndroid, delete style.elevationAndroid), (style.shadowRadius != null || style.shadowColor || style.shadowOpacity != null || style.shadowOffset) && Object.assign(style, (0, import_normalizeShadow.normalizeShadow)(style));
|
|
3584
3584
|
for (var key in borderDefaults) if (key in style) {
|
|
@@ -3586,7 +3586,7 @@ var require_expandStyles_native = __commonJS({
|
|
|
3586
3586
|
(_style = style)[_borderDefaults_key = borderDefaults[key]] || (_style[_borderDefaults_key] = "solid");
|
|
3587
3587
|
}
|
|
3588
3588
|
}
|
|
3589
|
-
var nativeStyle =
|
|
3589
|
+
var nativeStyle = import_constants.isWeb ? null : "borderStyle", borderDefaults = {
|
|
3590
3590
|
borderWidth: "borderStyle",
|
|
3591
3591
|
borderBottomWidth: nativeStyle || "borderBottomStyle",
|
|
3592
3592
|
borderTopWidth: nativeStyle || "borderTopStyle",
|
|
@@ -3694,13 +3694,13 @@ var require_isActivePlatform_native = __commonJS({
|
|
|
3694
3694
|
}
|
|
3695
3695
|
});
|
|
3696
3696
|
module2.exports = __toCommonJS2(isActivePlatform_exports);
|
|
3697
|
-
var
|
|
3697
|
+
var import_constants = require_index_native2();
|
|
3698
3698
|
function isActivePlatform(key) {
|
|
3699
3699
|
if (!key.startsWith("$platform")) return !0;
|
|
3700
3700
|
var platform = key.slice(10);
|
|
3701
3701
|
return (
|
|
3702
3702
|
// web, ios, android
|
|
3703
|
-
platform ===
|
|
3703
|
+
platform === import_constants.currentPlatform || // web, native
|
|
3704
3704
|
platform === "native"
|
|
3705
3705
|
);
|
|
3706
3706
|
}
|
|
@@ -3857,14 +3857,14 @@ var require_normalizeValueWithProperty_native = __commonJS({
|
|
|
3857
3857
|
}
|
|
3858
3858
|
});
|
|
3859
3859
|
module2.exports = __toCommonJS2(normalizeValueWithProperty_exports);
|
|
3860
|
-
var
|
|
3860
|
+
var import_constants = require_index_native2(), import_helpers2 = require_index_native3(), stylePropsAllPlusTransforms = {
|
|
3861
3861
|
...import_helpers2.stylePropsAll,
|
|
3862
3862
|
translateX: !0,
|
|
3863
3863
|
translateY: !0
|
|
3864
3864
|
};
|
|
3865
3865
|
function normalizeValueWithProperty(value) {
|
|
3866
3866
|
var property = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
|
3867
|
-
if (!
|
|
3867
|
+
if (!import_constants.isWeb || import_helpers2.stylePropsUnitless[property] || property && !stylePropsAllPlusTransforms[property] || typeof value == "boolean") return value;
|
|
3868
3868
|
var res = value;
|
|
3869
3869
|
return value && typeof value == "object" ? value : (typeof value == "number" ? res = `${value}px` : property && (res = `${res}`), res);
|
|
3870
3870
|
}
|
|
@@ -4124,14 +4124,14 @@ var require_expandStyle_native = __commonJS({
|
|
|
4124
4124
|
}
|
|
4125
4125
|
});
|
|
4126
4126
|
module2.exports = __toCommonJS2(expandStyle_exports);
|
|
4127
|
-
var
|
|
4127
|
+
var import_constants = require_index_native2(), import_config = require_config_native(), import_webToNativeProps = require_webToNativeProps_native(), _loop = function(parent2) {
|
|
4128
4128
|
var _exec, _exec_index, prefix = parent2.slice(0, (_exec_index = (_exec = /[A-Z]/.exec(parent2)) === null || _exec === void 0 ? void 0 : _exec.index) !== null && _exec_index !== void 0 ? _exec_index : parent2.length);
|
|
4129
4129
|
EXPANSIONS[parent2] = EXPANSIONS[parent2].map(function(k) {
|
|
4130
4130
|
return `${prefix}${k}`;
|
|
4131
4131
|
});
|
|
4132
4132
|
};
|
|
4133
4133
|
function expandStyle(key, value) {
|
|
4134
|
-
if (
|
|
4134
|
+
if (import_constants.isAndroid && key === "elevationAndroid") return [
|
|
4135
4135
|
[
|
|
4136
4136
|
"elevation",
|
|
4137
4137
|
value
|
|
@@ -4191,7 +4191,7 @@ var require_expandStyle_native = __commonJS({
|
|
|
4191
4191
|
padding: all,
|
|
4192
4192
|
paddingHorizontal: horiz,
|
|
4193
4193
|
paddingVertical: vert,
|
|
4194
|
-
...
|
|
4194
|
+
...import_constants.isWeb && {
|
|
4195
4195
|
// react-native only supports borderStyle
|
|
4196
4196
|
borderStyle: [
|
|
4197
4197
|
"TopStyle",
|
|
@@ -4614,9 +4614,9 @@ var require_propMapper_native = __commonJS({
|
|
|
4614
4614
|
}
|
|
4615
4615
|
});
|
|
4616
4616
|
module2.exports = __toCommonJS2(propMapper_exports);
|
|
4617
|
-
var
|
|
4617
|
+
var import_constants = require_index_native2(), import_helpers2 = require_index_native3(), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_expandStyle = require_expandStyle_native(), import_getVariantExtras = require_getVariantExtras_native(), import_isObj = require_isObj_native(), import_normalizeStyle = require_normalizeStyle_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_skipProps = require_skipProps_native(), propMapper = function(key, value, styleState, disabled, map) {
|
|
4618
4618
|
if (disabled) return map(key, value);
|
|
4619
|
-
if (lastFontFamilyToken = null, !(!
|
|
4619
|
+
if (lastFontFamilyToken = null, !(!import_constants.isAndroid && key === "elevationAndroid")) {
|
|
4620
4620
|
var { conf, styleProps, staticConfig } = styleState;
|
|
4621
4621
|
if (value === "unset") {
|
|
4622
4622
|
var _conf_unset, unsetVal = (_conf_unset = conf.unset) === null || _conf_unset === void 0 ? void 0 : _conf_unset[key];
|
|
@@ -5012,7 +5012,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5012
5012
|
}
|
|
5013
5013
|
});
|
|
5014
5014
|
module2.exports = __toCommonJS2(getSplitStyles_exports);
|
|
5015
|
-
var
|
|
5015
|
+
var import_constants = require_index_native2(), import_helpers2 = require_index_native3(), import_react3 = __toESM2(require("react")), import_getDynamicVal = require_getDynamicVal_native(), import_config = require_config_native(), import_accessibilityDirectMap = require_accessibilityDirectMap_native(), import_constants2 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_useMedia = require_useMedia_native(), import_createMediaStyle = require_createMediaStyle_native(), import_expandStyles = require_expandStyles_native(), import_getCSSStylesAtomic = require_getCSSStylesAtomic_native(), import_getGroupPropParts = require_getGroupPropParts_native(), import_insertStyleRule = require_insertStyleRule_native(), import_isActivePlatform = require_isActivePlatform_native(), import_isActiveTheme = require_isActiveTheme_native(), import_log = require_log_native(), import_normalizeValueWithProperty = require_normalizeValueWithProperty_native(), import_propMapper = require_propMapper_native(), import_pseudoDescriptors = require_pseudoDescriptors_native(), import_skipProps = require_skipProps_native(), import_sortString = require_sortString_native(), import_transformsToString = require_transformsToString_native(), conf, PROP_SPLIT = "-";
|
|
5016
5016
|
function isValidStyleKey(key, validStyles2, accept) {
|
|
5017
5017
|
return key in validStyles2 ? !0 : accept && key in accept;
|
|
5018
5018
|
}
|
|
@@ -5033,7 +5033,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5033
5033
|
var valInitType = typeof valInit, isValidStyleKeyInit = isValidStyleKey(keyInit, validStyles2, accept);
|
|
5034
5034
|
if (0) var _viewProps2, _dataSet;
|
|
5035
5035
|
if (!isValidStyleKeyInit) {
|
|
5036
|
-
if (!
|
|
5036
|
+
if (!import_constants.isAndroid && keyInit === "elevationAndroid") return "continue";
|
|
5037
5037
|
if (keyInit === "userSelect") keyInit = "selectable", valInit = valInit !== "none";
|
|
5038
5038
|
else if (keyInit.startsWith("data-")) return "continue";
|
|
5039
5039
|
}
|
|
@@ -5071,7 +5071,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5071
5071
|
viewProps[key4] = val2;
|
|
5072
5072
|
return;
|
|
5073
5073
|
}
|
|
5074
|
-
if (!isHOC && isValidStyleKey(key4, validStyles2, accept) ||
|
|
5074
|
+
if (!isHOC && isValidStyleKey(key4, validStyles2, accept) || import_constants.isAndroid && key4 === "elevation") {
|
|
5075
5075
|
mergeStyle(styleState, key4, val2);
|
|
5076
5076
|
return;
|
|
5077
5077
|
}
|
|
@@ -5179,7 +5179,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5179
5179
|
return;
|
|
5180
5180
|
var mediaStyle1 = getSubStyle(styleState, key4, val2, !0), importanceBump = 0;
|
|
5181
5181
|
if (isThemeMedia) {
|
|
5182
|
-
if (dynamicThemeAccess = !0,
|
|
5182
|
+
if (dynamicThemeAccess = !0, import_constants.isIos && (0, import_config.getSetting)("fastSchemeChange")) {
|
|
5183
5183
|
var _styleState3;
|
|
5184
5184
|
(_styleState3 = styleState).style || (_styleState3.style = {});
|
|
5185
5185
|
var scheme = mediaKeyShort, oppositeScheme = (0, import_getDynamicVal.getOppositeScheme)(mediaKeyShort);
|
|
@@ -5239,8 +5239,8 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5239
5239
|
};
|
|
5240
5240
|
conf = conf || (0, import_config.getConfig)();
|
|
5241
5241
|
var animationDriver = (componentContext == null ? void 0 : componentContext.animationDriver) || conf.animations;
|
|
5242
|
-
|
|
5243
|
-
var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState2 = styleProps.mediaState || import_useMedia.mediaState, usedKeys = {}, shouldDoClasses = acceptsClassName &&
|
|
5242
|
+
import_constants.isWeb && styleProps.isAnimated && animationDriver.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
|
|
5243
|
+
var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState2 = styleProps.mediaState || import_useMedia.mediaState, usedKeys = {}, shouldDoClasses = acceptsClassName && import_constants.isWeb && !styleProps.noClass && !styleProps.isAnimated, rulesToInsert = void 0, classNames = {}, pseudos = null, space = props.space, hasMedia = !1, dynamicThemeAccess, pseudoGroups, mediaGroups, className = props.className || "", mediaStylesSeen = 0, validStyles2 = staticConfig.validStyles || (staticConfig.isText || staticConfig.isInput ? import_helpers2.stylePropsText : import_helpers2.validStyles), styleState = {
|
|
5244
5244
|
classNames,
|
|
5245
5245
|
conf,
|
|
5246
5246
|
props,
|
|
@@ -5266,7 +5266,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5266
5266
|
for (var keyOg in props) _loop(keyOg);
|
|
5267
5267
|
var avoidNormalize = styleProps.noNormalize === !1;
|
|
5268
5268
|
if (!avoidNormalize) {
|
|
5269
|
-
if (styleState.style && ((0, import_expandStyles.fixStyles)(styleState.style), !styleProps.noExpand && !styleProps.noMergeStyle &&
|
|
5269
|
+
if (styleState.style && ((0, import_expandStyles.fixStyles)(styleState.style), !styleProps.noExpand && !styleProps.noMergeStyle && import_constants.isWeb && !isReactNative && (0, import_getCSSStylesAtomic.styleToCSS)(styleState.style)), styleState.flatTransforms) {
|
|
5270
5270
|
var _styleState;
|
|
5271
5271
|
(_styleState = styleState).style || (_styleState.style = {}), mergeFlatTransforms(styleState.style, styleState.flatTransforms);
|
|
5272
5272
|
}
|
|
@@ -5363,7 +5363,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5363
5363
|
var _styleState;
|
|
5364
5364
|
(_styleState = styleState).flatTransforms || (_styleState.flatTransforms = {}), styleState.flatTransforms[key] = val;
|
|
5365
5365
|
} else {
|
|
5366
|
-
var shouldNormalize =
|
|
5366
|
+
var shouldNormalize = import_constants.isWeb && !disableNormalize && !styleProps.noNormalize, out = shouldNormalize ? (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(val, key) : val;
|
|
5367
5367
|
if (
|
|
5368
5368
|
// accept is for props not styles
|
|
5369
5369
|
staticConfig.accept && key in staticConfig.accept
|
|
@@ -5400,7 +5400,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5400
5400
|
styleState.flatTransforms && mergeFlatTransforms(styleOut, styleState.flatTransforms);
|
|
5401
5401
|
}
|
|
5402
5402
|
return styleProps.noNormalize || (0, import_expandStyles.fixStyles)(styleOut), styleOut;
|
|
5403
|
-
}, useInsertEffectCompat =
|
|
5403
|
+
}, useInsertEffectCompat = import_constants.isWeb ? import_react3.default.useInsertionEffect || import_constants.useIsomorphicLayoutEffect : function() {
|
|
5404
5404
|
}, useSplitStyles = function(a, b, c, d, e, f, g, h, i, j, k) {
|
|
5405
5405
|
var res = getSplitStyles(a, b, c, d, e, f, g, h, i, j, k);
|
|
5406
5406
|
return res;
|
|
@@ -5464,7 +5464,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5464
5464
|
var val = style[key];
|
|
5465
5465
|
key in import_helpers2.stylePropsTransform ? mergeTransform(out, key, val) : out[key] = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(val, key);
|
|
5466
5466
|
}
|
|
5467
|
-
return
|
|
5467
|
+
return import_constants.isWeb && Array.isArray(out.transform) && (out.transform = (0, import_transformsToString.transformsToString)(out.transform)), (0, import_expandStyles.fixStyles)(out), out;
|
|
5468
5468
|
}
|
|
5469
5469
|
function applyDefaultStyle(pkey, styleState) {
|
|
5470
5470
|
var defaultValues = animatableDefaults[pkey];
|
|
@@ -5589,9 +5589,9 @@ var require_setElementProps_native = __commonJS({
|
|
|
5589
5589
|
}
|
|
5590
5590
|
});
|
|
5591
5591
|
|
|
5592
|
-
//
|
|
5593
|
-
var
|
|
5594
|
-
"
|
|
5592
|
+
// ../../packages/is-equal-shallow/dist/cjs/index.native.js
|
|
5593
|
+
var require_index_native6 = __commonJS({
|
|
5594
|
+
"../../packages/is-equal-shallow/dist/cjs/index.native.js"(exports2, module2) {
|
|
5595
5595
|
"use strict";
|
|
5596
5596
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
5597
5597
|
for (var name in all) __defProp2(target, name, {
|
|
@@ -5625,10 +5625,10 @@ var require_useCreateShallowSetState_native = __commonJS({
|
|
|
5625
5625
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
5626
5626
|
value: !0
|
|
5627
5627
|
}), mod);
|
|
5628
|
-
},
|
|
5629
|
-
__export2(
|
|
5628
|
+
}, index_exports2 = {};
|
|
5629
|
+
__export2(index_exports2, {
|
|
5630
5630
|
isEqualShallow: function() {
|
|
5631
|
-
return
|
|
5631
|
+
return isEqualShallow;
|
|
5632
5632
|
},
|
|
5633
5633
|
mergeIfNotShallowEqual: function() {
|
|
5634
5634
|
return mergeIfNotShallowEqual;
|
|
@@ -5637,7 +5637,7 @@ var require_useCreateShallowSetState_native = __commonJS({
|
|
|
5637
5637
|
return useCreateShallowSetState;
|
|
5638
5638
|
}
|
|
5639
5639
|
});
|
|
5640
|
-
module2.exports = __toCommonJS2(
|
|
5640
|
+
module2.exports = __toCommonJS2(index_exports2);
|
|
5641
5641
|
var import_react3 = require("react");
|
|
5642
5642
|
function useCreateShallowSetState(setter, debugIn) {
|
|
5643
5643
|
return (0, import_react3.useCallback)(function(next) {
|
|
@@ -5650,12 +5650,12 @@ var require_useCreateShallowSetState_native = __commonJS({
|
|
|
5650
5650
|
]);
|
|
5651
5651
|
}
|
|
5652
5652
|
function mergeIfNotShallowEqual(prev, next, debug) {
|
|
5653
|
-
return !prev || !next ||
|
|
5653
|
+
return !prev || !next || isEqualShallow(prev, next) ? prev || next : {
|
|
5654
5654
|
...prev,
|
|
5655
5655
|
...next
|
|
5656
5656
|
};
|
|
5657
5657
|
}
|
|
5658
|
-
function
|
|
5658
|
+
function isEqualShallow(prev, next) {
|
|
5659
5659
|
for (var key in next) if (prev[key] !== next[key]) return !1;
|
|
5660
5660
|
return !0;
|
|
5661
5661
|
}
|
|
@@ -5705,7 +5705,7 @@ var require_subscribeToContextGroup_native = __commonJS({
|
|
|
5705
5705
|
}
|
|
5706
5706
|
});
|
|
5707
5707
|
module2.exports = __toCommonJS2(subscribeToContextGroup_exports);
|
|
5708
|
-
var import_useMedia = require_useMedia_native(),
|
|
5708
|
+
var import_useMedia = require_useMedia_native(), import_is_equal_shallow = require_index_native6(), subscribeToContextGroup = function(param) {
|
|
5709
5709
|
var { setStateShallow, pseudoGroups, mediaGroups, componentContext, state } = param;
|
|
5710
5710
|
if (pseudoGroups || mediaGroups) {
|
|
5711
5711
|
var _componentContext_groups_subscribe, _componentContext_groups;
|
|
@@ -5716,7 +5716,7 @@ var require_subscribeToContextGroup_native = __commonJS({
|
|
|
5716
5716
|
};
|
|
5717
5717
|
if (pseudo && pseudoGroups != null && pseudoGroups.has(String(name))) Object.assign(current.pseudo, pseudo), persist();
|
|
5718
5718
|
else if (layout && mediaGroups) {
|
|
5719
|
-
var mediaState2 = (0, import_useMedia.getMediaState)(mediaGroups, layout), next = (0,
|
|
5719
|
+
var mediaState2 = (0, import_useMedia.getMediaState)(mediaGroups, layout), next = (0, import_is_equal_shallow.mergeIfNotShallowEqual)(current.media || {}, mediaState2);
|
|
5720
5720
|
next !== current.media && (Object.assign(current.media, next), persist());
|
|
5721
5721
|
}
|
|
5722
5722
|
function persist() {
|
|
@@ -5792,7 +5792,7 @@ var require_useThemeState_native = __commonJS({
|
|
|
5792
5792
|
}
|
|
5793
5793
|
});
|
|
5794
5794
|
module2.exports = __toCommonJS2(useThemeState_exports);
|
|
5795
|
-
var
|
|
5795
|
+
var import_constants = require_index_native2(), import_react3 = require("react"), import_config = require_config_native(), import_constants2 = require_constants_native2(), ThemeStateContext = (0, import_react3.createContext)(""), allListeners = /* @__PURE__ */ new Map(), listenersByParent = {}, HasRenderedOnce = /* @__PURE__ */ new WeakMap(), HadTheme = /* @__PURE__ */ new WeakMap(), PendingUpdate = /* @__PURE__ */ new Map(), states = /* @__PURE__ */ new Map(), localStates = /* @__PURE__ */ new Map(), shouldForce = !1, forceUpdateThemes2 = function() {
|
|
5796
5796
|
cacheVersion++, shouldForce = !0, allListeners.forEach(function(cb) {
|
|
5797
5797
|
return cb();
|
|
5798
5798
|
});
|
|
@@ -5802,7 +5802,7 @@ var require_useThemeState_native = __commonJS({
|
|
|
5802
5802
|
return rootThemeState;
|
|
5803
5803
|
}, useThemeState = function(props) {
|
|
5804
5804
|
var isRoot = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1, keys = arguments.length > 2 ? arguments[2] : void 0, { disable } = props, parentId = (0, import_react3.useContext)(ThemeStateContext);
|
|
5805
|
-
if (!parentId && !isRoot) throw new Error(
|
|
5805
|
+
if (!parentId && !isRoot) throw new Error(import_constants2.MISSING_THEME_MESSAGE);
|
|
5806
5806
|
if (disable) return states.get(parentId) || {
|
|
5807
5807
|
id: "",
|
|
5808
5808
|
name: "light",
|
|
@@ -5825,7 +5825,7 @@ var require_useThemeState_native = __commonJS({
|
|
|
5825
5825
|
...next
|
|
5826
5826
|
}, localStates.set(id, local)), Object.assign(local, next), local.id = id, states.set(id, next), local;
|
|
5827
5827
|
}, state = (0, import_react3.useSyncExternalStore)(subscribe, getSnapshot, getSnapshot);
|
|
5828
|
-
return (0,
|
|
5828
|
+
return (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
5829
5829
|
if (!HasRenderedOnce.get(keys)) {
|
|
5830
5830
|
HasRenderedOnce.set(keys, !0);
|
|
5831
5831
|
return;
|
|
@@ -5856,7 +5856,7 @@ var require_useThemeState_native = __commonJS({
|
|
|
5856
5856
|
];
|
|
5857
5857
|
if (!name) {
|
|
5858
5858
|
var next = lastState ?? parentState;
|
|
5859
|
-
if (!next) throw new Error(
|
|
5859
|
+
if (!next) throw new Error(import_constants2.MISSING_THEME_MESSAGE);
|
|
5860
5860
|
if (shouldRerender) {
|
|
5861
5861
|
var updated = {
|
|
5862
5862
|
...parentState || lastState
|
|
@@ -6077,7 +6077,7 @@ var require_getThemeProxied_native = __commonJS({
|
|
|
6077
6077
|
}
|
|
6078
6078
|
});
|
|
6079
6079
|
module2.exports = __toCommonJS2(getThemeProxied_exports);
|
|
6080
|
-
var
|
|
6080
|
+
var import_constants = require_index_native2(), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_doesRootSchemeMatchSystem = require_doesRootSchemeMatchSystem_native(), import_getDynamicVal = require_getDynamicVal_native(), cache = /* @__PURE__ */ new Map(), curKeys, curProps, curState, emptyObject = {};
|
|
6081
6081
|
function getThemeProxied(_props, _state, _keys) {
|
|
6082
6082
|
if (!(_state != null && _state.theme)) return emptyObject;
|
|
6083
6083
|
if (curKeys = _keys, curProps = _props, curState = _state, cache.has(curState.theme)) {
|
|
@@ -6096,7 +6096,7 @@ var require_getThemeProxied_native = __commonJS({
|
|
|
6096
6096
|
},
|
|
6097
6097
|
get(platform) {
|
|
6098
6098
|
if (curState) {
|
|
6099
|
-
var outVal = (0, import_createVariable.getVariable)(value), { name, scheme, inverses } = curState, shouldOptimize = scheme && platform !== "web" &&
|
|
6099
|
+
var outVal = (0, import_createVariable.getVariable)(value), { name, scheme, inverses } = curState, shouldOptimize = scheme && platform !== "web" && import_constants.isIos && !curProps.deopt && (0, import_config.getSetting)("fastSchemeChange") && inverses === 0 && (0, import_doesRootSchemeMatchSystem.doesRootSchemeMatchSystem)();
|
|
6100
6100
|
if (shouldOptimize) {
|
|
6101
6101
|
var _config_themes_name, _config_themes_oppositeName, oppositeScheme = scheme === "dark" ? "light" : "dark", oppositeName = name.replace(scheme, oppositeScheme), color = (0, import_createVariable.getVariable)((_config_themes_name = config.themes[name]) === null || _config_themes_name === void 0 ? void 0 : _config_themes_name[key]), oppositeColor = (0, import_createVariable.getVariable)((_config_themes_oppositeName = config.themes[oppositeName]) === null || _config_themes_oppositeName === void 0 ? void 0 : _config_themes_oppositeName[key]), dynamicVal = (0, import_getDynamicVal.getDynamicVal)({
|
|
6102
6102
|
scheme,
|
|
@@ -6293,7 +6293,7 @@ var require_Theme_native = __commonJS({
|
|
|
6293
6293
|
}
|
|
6294
6294
|
});
|
|
6295
6295
|
module2.exports = __toCommonJS2(Theme_exports);
|
|
6296
|
-
var
|
|
6296
|
+
var import_jsx_runtime2 = require("react/jsx-runtime"), import_constants = require_index_native2(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_createVariable = require_createVariable_native(), import_useTheme = require_useTheme_native(), import_useThemeState = require_useThemeState_native(), import_ThemeDebug = require_ThemeDebug_native(), empty = {
|
|
6297
6297
|
className: "",
|
|
6298
6298
|
style: {}
|
|
6299
6299
|
}, Theme = /* @__PURE__ */ (0, import_react3.forwardRef)(function(props, ref) {
|
|
@@ -6318,7 +6318,7 @@ var require_Theme_native = __commonJS({
|
|
|
6318
6318
|
function getThemedChildren(themeState, children, props) {
|
|
6319
6319
|
var isRoot = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : !1, stateRef = arguments.length > 4 ? arguments[4] : void 0, { shallow, forceClassName } = props, state = stateRef.current, hasEverThemed = state.hasEverThemed, shouldRenderChildrenWithTheme = hasEverThemed || themeState.isNew || isRoot || (0, import_useThemeState.hasThemeUpdatingProps)(props);
|
|
6320
6320
|
if (!shouldRenderChildrenWithTheme) return children;
|
|
6321
|
-
children = /* @__PURE__ */ (0,
|
|
6321
|
+
children = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_useThemeState.ThemeStateContext.Provider, {
|
|
6322
6322
|
value: themeState.id,
|
|
6323
6323
|
children
|
|
6324
6324
|
});
|
|
@@ -6329,22 +6329,22 @@ var require_Theme_native = __commonJS({
|
|
|
6329
6329
|
var parentState = (0, import_useThemeState.getThemeState)(themeState.isNew ? themeState.id : themeState.parentId);
|
|
6330
6330
|
if (!parentState) throw new Error("\u203C\uFE0F010");
|
|
6331
6331
|
children = import_react3.Children.toArray(children).map(function(child) {
|
|
6332
|
-
return /* @__PURE__ */ (0, import_react3.isValidElement)(child) ? /* @__PURE__ */ (0, import_react3.cloneElement)(child, void 0, /* @__PURE__ */ (0,
|
|
6332
|
+
return /* @__PURE__ */ (0, import_react3.isValidElement)(child) ? /* @__PURE__ */ (0, import_react3.cloneElement)(child, void 0, /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Theme, {
|
|
6333
6333
|
name: parentState.name,
|
|
6334
6334
|
children: child.props.children
|
|
6335
6335
|
})) : child;
|
|
6336
6336
|
});
|
|
6337
6337
|
}
|
|
6338
6338
|
if (forceClassName === !1) return children;
|
|
6339
|
-
if (
|
|
6339
|
+
if (import_constants.isWeb) {
|
|
6340
6340
|
var { className, style } = getThemeClassNameAndStyle(themeState, props, isRoot);
|
|
6341
|
-
if (children = /* @__PURE__ */ (0,
|
|
6341
|
+
if (children = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", {
|
|
6342
6342
|
className: `${className} _dsp_contents is_Theme`,
|
|
6343
6343
|
style,
|
|
6344
6344
|
children
|
|
6345
6345
|
}), state.hasEverThemed === "wrapped") {
|
|
6346
6346
|
var className1 = requiresExtraWrapper ? `${isInverse ? name.startsWith("light") ? "t_light is_inversed" : name.startsWith("dark") ? "t_dark is_inversed" : "" : ""} _dsp_contents` : "_dsp_contents";
|
|
6347
|
-
children = /* @__PURE__ */ (0,
|
|
6347
|
+
children = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", {
|
|
6348
6348
|
className: className1,
|
|
6349
6349
|
children
|
|
6350
6350
|
});
|
|
@@ -6423,7 +6423,7 @@ var require_themeable_native = __commonJS({
|
|
|
6423
6423
|
}
|
|
6424
6424
|
});
|
|
6425
6425
|
module2.exports = __toCommonJS2(themeable_exports);
|
|
6426
|
-
var
|
|
6426
|
+
var import_jsx_runtime2 = require("react/jsx-runtime"), import_react3 = __toESM2(require("react")), import_Theme = require_Theme_native();
|
|
6427
6427
|
function themeable(Component, staticConfig) {
|
|
6428
6428
|
var optimize = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, withThemeComponent = /* @__PURE__ */ import_react3.default.forwardRef(function(props, ref) {
|
|
6429
6429
|
var { themeInverse, theme, componentName, themeReset, ...rest } = props, overriddenContextProps, context = staticConfig == null ? void 0 : staticConfig.context;
|
|
@@ -6433,21 +6433,21 @@ var require_themeable_native = __commonJS({
|
|
|
6433
6433
|
}
|
|
6434
6434
|
var element = (
|
|
6435
6435
|
// @ts-expect-error its ok
|
|
6436
|
-
/* @__PURE__ */ (0,
|
|
6436
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Component, {
|
|
6437
6437
|
ref,
|
|
6438
6438
|
...rest,
|
|
6439
6439
|
"data-disable-theme": !0
|
|
6440
6440
|
})
|
|
6441
6441
|
), filteredProps = null, compName = componentName || (staticConfig == null ? void 0 : staticConfig.componentName);
|
|
6442
6442
|
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), "themeInverse" in props && (filteredProps || (filteredProps = {}), filteredProps.inverse = props.themeInverse), "themeReset" in props && (filteredProps || (filteredProps = {}), filteredProps.reset = themeReset), optimize && !filteredProps) return element;
|
|
6443
|
-
var contents = /* @__PURE__ */ (0,
|
|
6443
|
+
var contents = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_Theme.Theme, {
|
|
6444
6444
|
"disable-child-theme": !0,
|
|
6445
6445
|
...filteredProps,
|
|
6446
6446
|
children: element
|
|
6447
6447
|
});
|
|
6448
6448
|
if (context) {
|
|
6449
6449
|
var Provider = context.Provider, contextValue = import_react3.default.useContext(context);
|
|
6450
|
-
contents = /* @__PURE__ */ (0,
|
|
6450
|
+
contents = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Provider, {
|
|
6451
6451
|
...contextValue,
|
|
6452
6452
|
...overriddenContextProps,
|
|
6453
6453
|
children: contents
|
|
@@ -6503,9 +6503,9 @@ var require_wrapStyleTags_native = __commonJS({
|
|
|
6503
6503
|
}
|
|
6504
6504
|
});
|
|
6505
6505
|
module2.exports = __toCommonJS2(wrapStyleTags_exports);
|
|
6506
|
-
var
|
|
6506
|
+
var import_jsx_runtime2 = require("react/jsx-runtime"), import_helpers2 = require_index_native3(), import_constants = require_index_native2();
|
|
6507
6507
|
function wrapStyleTags(styles, content) {
|
|
6508
|
-
return
|
|
6508
|
+
return import_constants.IS_REACT_19, content;
|
|
6509
6509
|
}
|
|
6510
6510
|
}
|
|
6511
6511
|
});
|
|
@@ -6556,9 +6556,9 @@ var require_ClientOnly_native = __commonJS({
|
|
|
6556
6556
|
}
|
|
6557
6557
|
});
|
|
6558
6558
|
module2.exports = __toCommonJS2(ClientOnly_exports);
|
|
6559
|
-
var
|
|
6559
|
+
var import_jsx_runtime2 = require("react/jsx-runtime"), import_react3 = require("react"), ClientOnlyContext2 = /* @__PURE__ */ (0, import_react3.createContext)(!1), ClientOnly2 = function(param) {
|
|
6560
6560
|
var { children } = param;
|
|
6561
|
-
return /* @__PURE__ */ (0,
|
|
6561
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ClientOnlyContext2.Provider, {
|
|
6562
6562
|
value: !0,
|
|
6563
6563
|
children
|
|
6564
6564
|
});
|
|
@@ -6567,7 +6567,7 @@ var require_ClientOnly_native = __commonJS({
|
|
|
6567
6567
|
});
|
|
6568
6568
|
|
|
6569
6569
|
// ../use-did-finish-ssr/dist/cjs/index.native.js
|
|
6570
|
-
var
|
|
6570
|
+
var require_index_native7 = __commonJS({
|
|
6571
6571
|
"../use-did-finish-ssr/dist/cjs/index.native.js"(exports2, module2) {
|
|
6572
6572
|
"use strict";
|
|
6573
6573
|
var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
@@ -6690,15 +6690,15 @@ var require_useComponentState_native = __commonJS({
|
|
|
6690
6690
|
}
|
|
6691
6691
|
});
|
|
6692
6692
|
module2.exports = __toCommonJS2(useComponentState_exports);
|
|
6693
|
-
var
|
|
6694
|
-
var { animationDriver } = param, _animationDriver_usePresence, isHydrated = (0, import_use_did_finish_ssr.useDidFinishSSR)(), needsHydration = !(0, import_use_did_finish_ssr.useIsClientOnly)(), [startedUnhydrated] = (0, import_react3.useState)(
|
|
6693
|
+
var import_constants = require_index_native2(), import_use_did_finish_ssr = require_index_native7(), import_react3 = require("react"), import_defaultComponentState = require_defaultComponentState_native(), import_isObj = require_isObj_native(), import_log = require_log_native(), import_is_equal_shallow = require_index_native6(), useComponentState = function(props, param, staticConfig, config) {
|
|
6694
|
+
var { animationDriver } = param, _animationDriver_usePresence, isHydrated = (0, import_use_did_finish_ssr.useDidFinishSSR)(), needsHydration = !(0, import_use_did_finish_ssr.useIsClientOnly)(), [startedUnhydrated] = (0, import_react3.useState)(import_constants.IS_REACT_19 ? !isHydrated : !1), useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, stateRef = (0, import_react3.useRef)(void 0);
|
|
6695
6695
|
stateRef.current || (stateRef.current = {});
|
|
6696
6696
|
var hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSSVars = animationDriver == null ? void 0 : animationDriver.supportsCSSVars, curStateRef = stateRef.current;
|
|
6697
6697
|
!needsHydration && hasAnimationProp && (curStateRef.hasAnimated = !0);
|
|
6698
6698
|
var willBeAnimatedClient = function() {
|
|
6699
6699
|
var next = !!(hasAnimationProp && !staticConfig.isHOC && useAnimations);
|
|
6700
6700
|
return !!(next || curStateRef.hasAnimated);
|
|
6701
|
-
}(), willBeAnimated = !
|
|
6701
|
+
}(), willBeAnimated = !import_constants.isServer && willBeAnimatedClient;
|
|
6702
6702
|
willBeAnimated && !curStateRef.hasAnimated && (curStateRef.hasAnimated = !0);
|
|
6703
6703
|
var { disableClassName } = props, presence = willBeAnimated && props.animatePresence !== !1 && (animationDriver == null || (_animationDriver_usePresence = animationDriver.usePresence) === null || _animationDriver_usePresence === void 0 ? void 0 : _animationDriver_usePresence.call(animationDriver)) || null, presenceState = presence == null ? void 0 : presence[2], isExiting = (presenceState == null ? void 0 : presenceState.isPresent) === !1, isEntering = (presenceState == null ? void 0 : presenceState.isPresent) === !0 && presenceState.initial !== !1, hasEnterStyle = !!props.enterStyle, hasAnimationThatNeedsHydrate = hasAnimationProp && !isHydrated && ((animationDriver == null ? void 0 : animationDriver.isReactNative) || !supportsCSSVars), hasEnterState = hasEnterStyle || isEntering, shouldEnter = hasEnterState || hasAnimationThatNeedsHydrate || // disableClassName doesnt work server side, only client, so needs hydrate
|
|
6704
6704
|
// this is just for a better ux, supports css variables for light/dark, media queries, etc
|
|
@@ -6715,20 +6715,20 @@ var require_useComponentState_native = __commonJS({
|
|
|
6715
6715
|
...states[0],
|
|
6716
6716
|
[props.forceStyle]: !0
|
|
6717
6717
|
} : states[0], setState = states[1], isAnimated = willBeAnimated;
|
|
6718
|
-
|
|
6718
|
+
import_constants.isWeb && hasAnimationThatNeedsHydrate && !staticConfig.isHOC && !isHydrated && (isAnimated = !1, curStateRef.willHydrate = !0), disabled !== state.disabled && (disabled && Object.assign(state, import_defaultComponentState.defaultComponentStateMounted), state.disabled = disabled, setState(function(_) {
|
|
6719
6719
|
return {
|
|
6720
6720
|
...state
|
|
6721
6721
|
};
|
|
6722
6722
|
}));
|
|
6723
|
-
var groupName = props.group, setStateShallow = (0,
|
|
6723
|
+
var groupName = props.group, setStateShallow = (0, import_is_equal_shallow.useCreateShallowSetState)(setState, props.debug);
|
|
6724
6724
|
if (presenceState && isAnimated && isHydrated && staticConfig.variants) {
|
|
6725
6725
|
var { enterVariant, exitVariant, enterExitVariant, custom } = presenceState;
|
|
6726
6726
|
(0, import_isObj.isObj)(custom) && Object.assign(props, custom);
|
|
6727
6727
|
var exv = exitVariant ?? enterExitVariant, env = enterVariant ?? enterExitVariant;
|
|
6728
6728
|
state.unmounted && env && staticConfig.variants[env] ? props[env] = !0 : isExiting && exv && (props[exv] = exitVariant !== enterExitVariant);
|
|
6729
6729
|
}
|
|
6730
|
-
var noClass = !
|
|
6731
|
-
if (
|
|
6730
|
+
var noClass = !import_constants.isWeb || !!props.forceStyle || isAnimated && (animationDriver == null ? void 0 : animationDriver.needsWebStyles);
|
|
6731
|
+
if (import_constants.isWeb && (!import_constants.isServer || isHydrated)) {
|
|
6732
6732
|
var isAnimatedAndHydrated = isAnimated && !supportsCSSVars, isClassNameDisabled = !staticConfig.acceptsClassName && (config.disableSSR || !state.unmounted), isDisabledManually = disableClassName && !state.unmounted;
|
|
6733
6733
|
(isAnimatedAndHydrated || isDisabledManually || isClassNameDisabled) && (noClass = !0);
|
|
6734
6734
|
}
|
|
@@ -6906,7 +6906,7 @@ var require_Slot_native = __commonJS({
|
|
|
6906
6906
|
}
|
|
6907
6907
|
});
|
|
6908
6908
|
module2.exports = __toCommonJS2(Slot_exports);
|
|
6909
|
-
var
|
|
6909
|
+
var import_jsx_runtime2 = require("react/jsx-runtime"), import_compose_refs = require_index_native4(), import_constants = require_index_native2(), import_helpers2 = require_index_native3(), import_react3 = require("react"), is19 = import_react3.version.startsWith("19."), Slot = /* @__PURE__ */ (0, import_react3.memo)(/* @__PURE__ */ (0, import_react3.forwardRef)(function(props, forwardedRef) {
|
|
6910
6910
|
var { children, ...slotProps } = props;
|
|
6911
6911
|
if (/* @__PURE__ */ (0, import_react3.isValidElement)(children)) {
|
|
6912
6912
|
var mergedProps = mergeSlotProps(children, slotProps);
|
|
@@ -6918,12 +6918,12 @@ var require_Slot_native = __commonJS({
|
|
|
6918
6918
|
return import_react3.Children.count(children) > 1 ? import_react3.Children.only(null) : null;
|
|
6919
6919
|
})), Slottable = function(param) {
|
|
6920
6920
|
var { children } = param;
|
|
6921
|
-
return /* @__PURE__ */ (0,
|
|
6921
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, {
|
|
6922
6922
|
children
|
|
6923
6923
|
});
|
|
6924
6924
|
};
|
|
6925
6925
|
Slottable.displayName = "Slottable";
|
|
6926
|
-
var pressMap =
|
|
6926
|
+
var pressMap = import_constants.isWeb ? {
|
|
6927
6927
|
onPress: "onClick",
|
|
6928
6928
|
onPressOut: "onMouseUp",
|
|
6929
6929
|
onPressIn: "onMouseDown"
|
|
@@ -7021,8 +7021,8 @@ var require_createComponent_native = __commonJS({
|
|
|
7021
7021
|
}
|
|
7022
7022
|
});
|
|
7023
7023
|
module2.exports = __toCommonJS2(createComponent_exports);
|
|
7024
|
-
var
|
|
7025
|
-
typeof
|
|
7024
|
+
var import_jsx_runtime2 = require("react/jsx-runtime"), import_compose_refs = require_index_native4(), import_constants = require_index_native2(), import_helpers2 = require_index_native3(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_constants2 = require_constants_native2(), import_isDevTools = require_isDevTools_native(), import_ComponentContext = require_ComponentContext_native(), import_createVariable = require_createVariable_native(), import_defaultComponentState = require_defaultComponentState_native(), import_getShorthandValue = require_getShorthandValue_native(), import_getSplitStyles = require_getSplitStyles_native(), import_log = require_log_native(), import_mergeProps = require_mergeProps_native(), import_setElementProps = require_setElementProps_native(), import_subscribeToContextGroup = require_subscribeToContextGroup_native(), import_themeable = require_themeable_native(), import_wrapStyleTags = require_wrapStyleTags_native(), import_useComponentState = require_useComponentState_native(), import_useMedia = require_useMedia_native(), import_useTheme = require_useTheme_native(), import_setupHooks = require_setupHooks_native(), import_Slot = require_Slot_native(), import_Theme = require_Theme_native(), componentSetStates = /* @__PURE__ */ new Set();
|
|
7025
|
+
typeof window < "u" && (cancelTouches = function() {
|
|
7026
7026
|
componentSetStates.forEach(function(setState) {
|
|
7027
7027
|
return setState(function(prev) {
|
|
7028
7028
|
return prev.press || prev.pressIn ? {
|
|
@@ -7036,7 +7036,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7036
7036
|
var cancelTouches, BaseText, BaseView, hasSetupBaseViews = !1, lastInteractionWasKeyboard = {
|
|
7037
7037
|
value: !1
|
|
7038
7038
|
};
|
|
7039
|
-
|
|
7039
|
+
import_constants.isWeb && globalThis.document && (document.addEventListener("keydown", function() {
|
|
7040
7040
|
lastInteractionWasKeyboard.value = !0;
|
|
7041
7041
|
}), document.addEventListener("mousedown", function() {
|
|
7042
7042
|
lastInteractionWasKeyboard.value = !1;
|
|
@@ -7085,7 +7085,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7085
7085
|
...styledContextProps
|
|
7086
7086
|
} : defaultProps, props = propsIn;
|
|
7087
7087
|
curDefaultProps && (props = (0, import_mergeProps.mergeProps)(curDefaultProps, propsIn));
|
|
7088
|
-
var componentName2 = props.componentName || staticConfig.componentName, animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, componentState = (0, import_useComponentState.useComponentState)(props, componentContext, staticConfig, config), { curStateRef, disabled, groupName, hasAnimationProp, hasEnterStyle, isAnimated, isExiting, isHydrated, presence, presenceState, setState, noClass, state, stateRef, supportsCSSVars, willBeAnimated, willBeAnimatedClient, startedUnhydrated } = componentState, setStateShallow = componentState.setStateShallow, hasTextAncestor = !!(
|
|
7088
|
+
var componentName2 = props.componentName || staticConfig.componentName, animationDriver = componentContext.animationDriver, useAnimations = animationDriver == null ? void 0 : animationDriver.useAnimations, componentState = (0, import_useComponentState.useComponentState)(props, componentContext, staticConfig, config), { curStateRef, disabled, groupName, hasAnimationProp, hasEnterStyle, isAnimated, isExiting, isHydrated, presence, presenceState, setState, noClass, state, stateRef, supportsCSSVars, willBeAnimated, willBeAnimatedClient, startedUnhydrated } = componentState, setStateShallow = componentState.setStateShallow, hasTextAncestor = !!(import_constants.isWeb && isText && componentContext.inText), isTaggable = !Component || typeof Component == "string", tagProp = props.tag, element = import_constants.isWeb && isTaggable && tagProp || Component, BaseTextComponent = BaseText || element || "span", BaseViewComponent = BaseView || element || (hasTextAncestor ? "span" : "div"), elementType = isText ? BaseTextComponent : BaseViewComponent;
|
|
7089
7089
|
animationDriver && isAnimated && // this should really be behind another prop as it's not really related to
|
|
7090
7090
|
// "needsWebStyles" basically with motion we just animate a plain div, but
|
|
7091
7091
|
// we still have animated.View/Text for Sheet which wants to control
|
|
@@ -7103,7 +7103,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7103
7103
|
return !!stateRef.current.isListeningToTheme;
|
|
7104
7104
|
}), themeStateProps.deopt = willBeAnimated, !1) {
|
|
7105
7105
|
var name, type, dataIs, banner;
|
|
7106
|
-
if (console.info(`%c ${banner} (hydrated: ${isHydrated}) (unmounted: ${state.unmounted})`, "background: green; color: white;"), !
|
|
7106
|
+
if (console.info(`%c ${banner} (hydrated: ${isHydrated}) (unmounted: ${state.unmounted})`, "background: green; color: white;"), !import_constants.isServer) var ch, childLog;
|
|
7107
7107
|
}
|
|
7108
7108
|
var [theme, themeState] = (0, import_useTheme.useThemeWithState)(themeStateProps);
|
|
7109
7109
|
elementType = Component || elementType;
|
|
@@ -7177,7 +7177,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7177
7177
|
var animationStyles, shouldUseAnimation = (
|
|
7178
7178
|
// if it supports css vars we run it on server too to get matching initial style
|
|
7179
7179
|
(supportsCSSVars ? willBeAnimatedClient : willBeAnimated) && useAnimations && !isHOC
|
|
7180
|
-
);
|
|
7180
|
+
), animatedRef;
|
|
7181
7181
|
if (shouldUseAnimation) {
|
|
7182
7182
|
var useStyleEmitter = animationDriver != null && animationDriver.avoidReRenders ? function(listener) {
|
|
7183
7183
|
stateRef.current.useStyleListener = listener;
|
|
@@ -7196,7 +7196,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7196
7196
|
staticConfig,
|
|
7197
7197
|
stateRef
|
|
7198
7198
|
});
|
|
7199
|
-
animations && (animationStyles = animations.style, viewProps.style = animationStyles, animations.className && (viewProps.className = `${state.unmounted === "should-enter" ? "t_unmounted " : ""}${viewProps.className || ""} ${animations.className}`));
|
|
7199
|
+
animations && (animationStyles = animations.style, viewProps.style = animationStyles, animations.className && (viewProps.className = `${state.unmounted === "should-enter" ? "t_unmounted " : ""}${viewProps.className || ""} ${animations.className}`), animations.ref && (animatedRef = animations.ref));
|
|
7200
7200
|
}
|
|
7201
7201
|
groupName && (nonTamaguiProps.onLayout = (0, import_helpers2.composeEventHandlers)(nonTamaguiProps.onLayout, function(e) {
|
|
7202
7202
|
var layout = e.nativeEvent.layout;
|
|
@@ -7209,14 +7209,14 @@ var require_createComponent_native = __commonJS({
|
|
|
7209
7209
|
}), stateRef.current.hasMeasured = !0;
|
|
7210
7210
|
})), viewProps = ((_hooks_usePropsTransform = import_setupHooks.hooks.usePropsTransform) === null || _hooks_usePropsTransform === void 0 ? void 0 : _hooks_usePropsTransform.call(import_setupHooks.hooks, elementType, nonTamaguiProps, stateRef, curStateRef.willHydrate)) || nonTamaguiProps, curStateRef.composedRef || (curStateRef.composedRef = (0, import_compose_refs.composeRefs)(function(x) {
|
|
7211
7211
|
return stateRef.current.host = x;
|
|
7212
|
-
}, forwardedRef, import_setElementProps.setElementProps)), viewProps.ref = curStateRef.composedRef;
|
|
7212
|
+
}, forwardedRef, import_setElementProps.setElementProps, animatedRef)), viewProps.ref = curStateRef.composedRef;
|
|
7213
7213
|
var { pseudoGroups, mediaGroups } = splitStyles, unPress = function() {
|
|
7214
7214
|
setStateShallow({
|
|
7215
7215
|
press: !1,
|
|
7216
7216
|
pressIn: !1
|
|
7217
7217
|
});
|
|
7218
7218
|
};
|
|
7219
|
-
(0,
|
|
7219
|
+
(0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
7220
7220
|
if (state.unmounted === !0 && hasEnterStyle) {
|
|
7221
7221
|
setStateShallow({
|
|
7222
7222
|
unmounted: "should-enter"
|
|
@@ -7226,7 +7226,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7226
7226
|
var tm;
|
|
7227
7227
|
if (state.unmounted) {
|
|
7228
7228
|
var _config_animations2, _animationDriver_supportsCSSVars;
|
|
7229
|
-
if (((_animationDriver_supportsCSSVars = animationDriver == null ? void 0 : animationDriver.supportsCSSVars) !== null && _animationDriver_supportsCSSVars !== void 0 ? _animationDriver_supportsCSSVars : !(config == null || (_config_animations2 = config.animations) === null || _config_animations2 === void 0) && _config_animations2.supportsCSSVars) ||
|
|
7229
|
+
if (((_animationDriver_supportsCSSVars = animationDriver == null ? void 0 : animationDriver.supportsCSSVars) !== null && _animationDriver_supportsCSSVars !== void 0 ? _animationDriver_supportsCSSVars : !(config == null || (_config_animations2 = config.animations) === null || _config_animations2 === void 0) && _config_animations2.supportsCSSVars) || import_constants.isAndroid) return tm = setTimeout(function() {
|
|
7230
7230
|
setStateShallow({
|
|
7231
7231
|
unmounted: !1
|
|
7232
7232
|
});
|
|
@@ -7257,7 +7257,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7257
7257
|
mediaGroups ? Object.keys([
|
|
7258
7258
|
...mediaGroups
|
|
7259
7259
|
]).join("") : 0
|
|
7260
|
-
]), (0,
|
|
7260
|
+
]), (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
7261
7261
|
var _curStateRef_group;
|
|
7262
7262
|
if (groupName) {
|
|
7263
7263
|
curStateRef.group.emit(groupName, {
|
|
@@ -7277,7 +7277,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7277
7277
|
groupName,
|
|
7278
7278
|
state
|
|
7279
7279
|
]);
|
|
7280
|
-
var runtimePressStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.pressStyle), runtimeFocusStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.focusStyle), runtimeFocusVisibleStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.focusVisibleStyle), attachFocus = !!(runtimePressStyle || runtimeFocusStyle || runtimeFocusVisibleStyle || onFocus || onBlur || componentContext.setParentFocusState), hasDynamicGroupChildren = !!(groupName && state.hasDynGroupChildren), attachPress = !!(hasDynamicGroupChildren || runtimePressStyle || onPress || onPressOut || onPressIn || onMouseDown || onMouseUp || onLongPress || onClick || pseudos != null && pseudos.focusVisibleStyle), runtimeHoverStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.hoverStyle), needsHoverState = !!(hasDynamicGroupChildren || runtimeHoverStyle), attachHover =
|
|
7280
|
+
var runtimePressStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.pressStyle), runtimeFocusStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.focusStyle), runtimeFocusVisibleStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.focusVisibleStyle), attachFocus = !!(runtimePressStyle || runtimeFocusStyle || runtimeFocusVisibleStyle || onFocus || onBlur || componentContext.setParentFocusState), hasDynamicGroupChildren = !!(groupName && state.hasDynGroupChildren), attachPress = !!(hasDynamicGroupChildren || runtimePressStyle || onPress || onPressOut || onPressIn || onMouseDown || onMouseUp || onLongPress || onClick || pseudos != null && pseudos.focusVisibleStyle), runtimeHoverStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.hoverStyle), needsHoverState = !!(hasDynamicGroupChildren || runtimeHoverStyle), attachHover = import_constants.isWeb && !!(hasDynamicGroupChildren || needsHoverState || onMouseEnter || onMouseLeave), shouldAttach = !disabled && !props.asChild && !!(attachFocus || attachPress || attachHover || runtimePressStyle || runtimeHoverStyle || runtimeFocusStyle), needsPressState = !!(hasDynamicGroupChildren || runtimePressStyle), events = shouldAttach ? {
|
|
7281
7281
|
onPressOut: attachPress ? function(e) {
|
|
7282
7282
|
unPress(), onPressOut == null || onPressOut(e), onMouseUp == null || onMouseUp(e);
|
|
7283
7283
|
} : void 0,
|
|
@@ -7295,10 +7295,10 @@ var require_createComponent_native = __commonJS({
|
|
|
7295
7295
|
needsPressState && setStateShallow({
|
|
7296
7296
|
press: !0,
|
|
7297
7297
|
pressIn: !0
|
|
7298
|
-
}), onPressIn == null || onPressIn(e), onMouseDown == null || onMouseDown(e),
|
|
7298
|
+
}), onPressIn == null || onPressIn(e), onMouseDown == null || onMouseDown(e), import_constants.isWeb && componentSetStates.add(setState);
|
|
7299
7299
|
} : void 0,
|
|
7300
7300
|
onPress: attachPress ? function(e) {
|
|
7301
|
-
unPress(),
|
|
7301
|
+
unPress(), import_constants.isWeb && (onClick == null || onClick(e)), onPress == null || onPress(e);
|
|
7302
7302
|
} : void 0,
|
|
7303
7303
|
...attachPress && onLongPress && {
|
|
7304
7304
|
onLongPress: function(e) {
|
|
@@ -7359,7 +7359,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7359
7359
|
var useChildrenResult;
|
|
7360
7360
|
import_setupHooks.hooks.useChildren && (useChildrenResult = import_setupHooks.hooks.useChildren(elementType, content, viewProps)), useChildrenResult ? content = useChildrenResult : content = /* @__PURE__ */ import_react3.default.createElement(elementType, viewProps, content);
|
|
7361
7361
|
var ResetPresence = config == null || (_config_animations = config.animations) === null || _config_animations === void 0 ? void 0 : _config_animations.ResetPresence;
|
|
7362
|
-
ResetPresence && willBeAnimated && (hasEnterStyle || presenceState) && content && typeof content != "string" && (content = /* @__PURE__ */ (0,
|
|
7362
|
+
ResetPresence && willBeAnimated && (hasEnterStyle || presenceState) && content && typeof content != "string" && (content = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ResetPresence, {
|
|
7363
7363
|
children: content
|
|
7364
7364
|
}));
|
|
7365
7365
|
var groupState = curStateRef.group, subGroupContext = import_react3.default.useMemo(function() {
|
|
@@ -7385,7 +7385,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7385
7385
|
}, [
|
|
7386
7386
|
groupName
|
|
7387
7387
|
]);
|
|
7388
|
-
if (("group" in props || propsIn.focusWithinStyle) && (content = /* @__PURE__ */ (0,
|
|
7388
|
+
if (("group" in props || propsIn.focusWithinStyle) && (content = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ComponentContext.ComponentContext.Provider, {
|
|
7389
7389
|
...componentContext,
|
|
7390
7390
|
groups: subGroupContext,
|
|
7391
7391
|
setParentFocusState: setStateShallow,
|
|
@@ -7401,7 +7401,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7401
7401
|
}
|
|
7402
7402
|
if (overriddenContextProps) {
|
|
7403
7403
|
var Provider = staticConfig.context.Provider;
|
|
7404
|
-
content = /* @__PURE__ */ (0,
|
|
7404
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Provider, {
|
|
7405
7405
|
...contextValue,
|
|
7406
7406
|
...overriddenContextProps,
|
|
7407
7407
|
children: content
|
|
@@ -7409,7 +7409,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7409
7409
|
}
|
|
7410
7410
|
if (0) {
|
|
7411
7411
|
var element1, title;
|
|
7412
|
-
if (!
|
|
7412
|
+
if (!import_constants.isWeb)
|
|
7413
7413
|
for (var key2 in splitStylesStyle) ;
|
|
7414
7414
|
}
|
|
7415
7415
|
return content;
|
|
@@ -7430,7 +7430,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7430
7430
|
return Component2.staticConfig = extendStyledConfig(extended), Component2.styleable = styleable, Component2;
|
|
7431
7431
|
}
|
|
7432
7432
|
function styleable(Component2, options) {
|
|
7433
|
-
var _Component_render, skipForwardRef =
|
|
7433
|
+
var _Component_render, skipForwardRef = import_constants.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__ */ import_react3.default.forwardRef(Component2), extendedConfig = extendStyledConfig(options == null ? void 0 : options.staticConfig);
|
|
7434
7434
|
return out = options != null && options.disableTheme ? out : (0, import_themeable.themeable)(out, extendedConfig, !0), process.env.TAMAGUI_MEMOIZE_STYLEABLE && (out = /* @__PURE__ */ import_react3.default.memo(out)), out.staticConfig = extendedConfig, out.styleable = styleable, out;
|
|
7435
7435
|
}
|
|
7436
7436
|
return res.extractable = extractable, res.styleable = styleable, res;
|
|
@@ -7455,7 +7455,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7455
7455
|
componentName: "Spacer",
|
|
7456
7456
|
validStyles: import_helpers2.validStyles,
|
|
7457
7457
|
defaultProps: {
|
|
7458
|
-
...
|
|
7458
|
+
...import_constants2.stackDefaultStyles,
|
|
7459
7459
|
// avoid nesting issues
|
|
7460
7460
|
tag: "span",
|
|
7461
7461
|
size: !0,
|
|
@@ -7498,8 +7498,8 @@ var require_createComponent_native = __commonJS({
|
|
|
7498
7498
|
spaceFlex,
|
|
7499
7499
|
separator,
|
|
7500
7500
|
key: child.key
|
|
7501
|
-
})), isEmpty || !child || child.key && !isZStack ? final.push(child) : final.push(/* @__PURE__ */ (0,
|
|
7502
|
-
children: isZStack ? /* @__PURE__ */ (0,
|
|
7501
|
+
})), isEmpty || !child || child.key && !isZStack ? final.push(child) : final.push(/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.default.Fragment, {
|
|
7502
|
+
children: isZStack ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(AbsoluteFill, {
|
|
7503
7503
|
children: child
|
|
7504
7504
|
}) : child
|
|
7505
7505
|
}, `${index}0t`)), !(isUnspaced(child) && index === 0) && !isZStack) {
|
|
@@ -7509,7 +7509,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7509
7509
|
direction,
|
|
7510
7510
|
space,
|
|
7511
7511
|
spaceFlex
|
|
7512
|
-
})), final.push(/* @__PURE__ */ (0,
|
|
7512
|
+
})), final.push(/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.default.Fragment, {
|
|
7513
7513
|
children: separator
|
|
7514
7514
|
}, `${index}03t`)), hasSpace && final.push(createSpacer({
|
|
7515
7515
|
key: `_${index}01t`,
|
|
@@ -7537,7 +7537,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7537
7537
|
}
|
|
7538
7538
|
function createSpacer(param) {
|
|
7539
7539
|
var { key, direction, space, spaceFlex } = param;
|
|
7540
|
-
return /* @__PURE__ */ (0,
|
|
7540
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Spacer, {
|
|
7541
7541
|
size: space,
|
|
7542
7542
|
direction,
|
|
7543
7543
|
...typeof spaceFlex < "u" && {
|
|
@@ -7551,7 +7551,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7551
7551
|
}
|
|
7552
7552
|
var AbsoluteFill = createComponent({
|
|
7553
7553
|
defaultProps: {
|
|
7554
|
-
...
|
|
7554
|
+
...import_constants2.stackDefaultStyles,
|
|
7555
7555
|
flexDirection: "column",
|
|
7556
7556
|
position: "absolute",
|
|
7557
7557
|
top: 0,
|
|
@@ -7707,7 +7707,7 @@ var require_createVariables_native = __commonJS({
|
|
|
7707
7707
|
}
|
|
7708
7708
|
});
|
|
7709
7709
|
module2.exports = __toCommonJS2(createVariables_exports);
|
|
7710
|
-
var
|
|
7710
|
+
var import_constants = require_index_native2(), import_helpers2 = require_index_native3(), import_createVariable = require_createVariable_native(), cache = /* @__PURE__ */ new WeakMap(), createVariables = function(tokens) {
|
|
7711
7711
|
var parentPath = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", isFont = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
|
|
7712
7712
|
if (cache.has(tokens)) return tokens;
|
|
7713
7713
|
var res = {}, i = 0;
|
|
@@ -7725,7 +7725,7 @@ var require_createVariables_native = __commonJS({
|
|
|
7725
7725
|
name,
|
|
7726
7726
|
key: keyWithPrefix
|
|
7727
7727
|
});
|
|
7728
|
-
|
|
7728
|
+
import_constants.isWeb && (finalValue.needsPx = val.needsPx), res[key] = finalValue;
|
|
7729
7729
|
continue;
|
|
7730
7730
|
}
|
|
7731
7731
|
if (val && typeof val == "object") {
|
|
@@ -8174,7 +8174,7 @@ var require_insertFont_native = __commonJS({
|
|
|
8174
8174
|
}
|
|
8175
8175
|
});
|
|
8176
8176
|
module2.exports = __toCommonJS2(insertFont_exports);
|
|
8177
|
-
var import_config = require_config_native(),
|
|
8177
|
+
var import_config = require_config_native(), import_constants = require_constants_native2(), import_createFont = require_createFont_native(), import_createVariables = require_createVariables_native(), import_registerCSSVariable = require_registerCSSVariable_native();
|
|
8178
8178
|
function insertFont(name, fontIn) {
|
|
8179
8179
|
var font = (0, import_createFont.createFont)(fontIn), tokened = (0, import_createVariables.createVariables)(font, name), parsed = parseFont(tokened);
|
|
8180
8180
|
if (0) var fontVars, styleElement;
|
|
@@ -8256,7 +8256,7 @@ var require_createTamagui_native = __commonJS({
|
|
|
8256
8256
|
}
|
|
8257
8257
|
});
|
|
8258
8258
|
module2.exports = __toCommonJS2(createTamagui_exports);
|
|
8259
|
-
var
|
|
8259
|
+
var import_constants = require_index_native2(), 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();
|
|
8260
8260
|
function shouldTokenCategoryHaveUnits(category) {
|
|
8261
8261
|
var UNIT_CATEGORIES = /* @__PURE__ */ new Set([
|
|
8262
8262
|
"size",
|
|
@@ -8285,7 +8285,7 @@ var require_createTamagui_native = __commonJS({
|
|
|
8285
8285
|
var foundThemes;
|
|
8286
8286
|
if (configIn.themes) {
|
|
8287
8287
|
var noThemes = Object.keys(configIn.themes).length === 0;
|
|
8288
|
-
noThemes && (foundThemes = (0, import_insertStyleRule.scanAllSheets)(noThemes, tokensParsed)),
|
|
8288
|
+
noThemes && (foundThemes = (0, import_insertStyleRule.scanAllSheets)(noThemes, tokensParsed)), import_constants.IS_REACT_19 && process.env.TAMAGUI_SKIP_THEME_OPTIMIZATION || noThemes && (0, import_insertStyleRule.listenForSheetChanges)();
|
|
8289
8289
|
}
|
|
8290
8290
|
var fontSizeTokens = null, fontsParsed;
|
|
8291
8291
|
if (configIn.fonts) {
|
|
@@ -8309,7 +8309,7 @@ var require_createTamagui_native = __commonJS({
|
|
|
8309
8309
|
var cssRuleSets = [], declarations = [], fontDeclarations = {};
|
|
8310
8310
|
for (var key2 in tokens) for (var skey in tokens[key2]) {
|
|
8311
8311
|
var variable = tokens[key2][skey];
|
|
8312
|
-
if (specificTokens[`$${key2}.${skey}`] = variable,
|
|
8312
|
+
if (specificTokens[`$${key2}.${skey}`] = variable, import_constants.isWeb) {
|
|
8313
8313
|
(0, import_registerCSSVariable.registerCSSVariable)(variable);
|
|
8314
8314
|
var variableNeedsPx = variable.needsPx === !0, categoryNeedsPx = shouldTokenCategoryHaveUnits(key2), shouldBeUnitless = !(variableNeedsPx || categoryNeedsPx);
|
|
8315
8315
|
declarations.push((0, import_registerCSSVariable.variableToCSS)(variable, shouldBeUnitless));
|
|
@@ -8327,7 +8327,7 @@ var require_createTamagui_native = __commonJS({
|
|
|
8327
8327
|
cssRuleSets,
|
|
8328
8328
|
getThemeRulesSets() {
|
|
8329
8329
|
var themeRuleSets = [];
|
|
8330
|
-
if (
|
|
8330
|
+
if (import_constants.isWeb) {
|
|
8331
8331
|
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
8332
8332
|
try {
|
|
8333
8333
|
for (var _iterator = dedupedThemes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
@@ -8823,10 +8823,10 @@ var require_withStableStyle_native = __commonJS({
|
|
|
8823
8823
|
}
|
|
8824
8824
|
});
|
|
8825
8825
|
module2.exports = __toCommonJS2(withStableStyle_exports);
|
|
8826
|
-
var
|
|
8826
|
+
var import_jsx_runtime2 = require("react/jsx-runtime"), import_react3 = __toESM2(require("react")), import_useTheme = require_useTheme_native(), _withStableStyle = function(Component, styleProvider) {
|
|
8827
8827
|
return /* @__PURE__ */ import_react3.default.forwardRef(function(props, ref) {
|
|
8828
8828
|
var { _expressions = [], ...rest } = props, theme = (0, import_useTheme.useTheme)();
|
|
8829
|
-
return /* @__PURE__ */ (0,
|
|
8829
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Component, {
|
|
8830
8830
|
ref,
|
|
8831
8831
|
style: styleProvider(theme, _expressions),
|
|
8832
8832
|
...rest
|
|
@@ -9237,8 +9237,8 @@ var require_useIsTouchDevice_native = __commonJS({
|
|
|
9237
9237
|
}
|
|
9238
9238
|
});
|
|
9239
9239
|
module2.exports = __toCommonJS2(useIsTouchDevice_exports);
|
|
9240
|
-
var
|
|
9241
|
-
return
|
|
9240
|
+
var import_constants = require_index_native2(), import_use_did_finish_ssr = require_index_native7(), useIsTouchDevice = function() {
|
|
9241
|
+
return import_constants.isWeb ? (0, import_use_did_finish_ssr.useDidFinishSSR)() ? import_constants.isTouchable : !1 : !0;
|
|
9242
9242
|
};
|
|
9243
9243
|
}
|
|
9244
9244
|
});
|
|
@@ -9286,9 +9286,9 @@ var require_Stack_native = __commonJS({
|
|
|
9286
9286
|
}
|
|
9287
9287
|
});
|
|
9288
9288
|
module2.exports = __toCommonJS2(Stack_exports);
|
|
9289
|
-
var import_helpers2 = require_index_native3(),
|
|
9289
|
+
var import_helpers2 = require_index_native3(), import_constants = require_constants_native2(), import_createComponent = require_createComponent_native(), Stack2 = (0, import_createComponent.createComponent)({
|
|
9290
9290
|
acceptsClassName: !0,
|
|
9291
|
-
defaultProps:
|
|
9291
|
+
defaultProps: import_constants.stackDefaultStyles,
|
|
9292
9292
|
validStyles: import_helpers2.validStyles
|
|
9293
9293
|
});
|
|
9294
9294
|
Stack2.displayName = "Stack";
|
|
@@ -9356,7 +9356,7 @@ var require_useProps_native = __commonJS({
|
|
|
9356
9356
|
}
|
|
9357
9357
|
});
|
|
9358
9358
|
module2.exports = __toCommonJS2(useProps_exports);
|
|
9359
|
-
var
|
|
9359
|
+
var import_constants = require_index_native2(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_ComponentContext = require_ComponentContext_native(), import_getSplitStyles = require_getSplitStyles_native(), import_subscribeToContextGroup = require_subscribeToContextGroup_native(), import_Stack = require_Stack_native(), import_useComponentState = require_useComponentState_native(), import_useMedia = require_useMedia_native(), import_useTheme = require_useTheme_native();
|
|
9360
9360
|
function useProps(props, opts) {
|
|
9361
9361
|
var [propsOut, styleOut] = usePropsAndStyle(props, {
|
|
9362
9362
|
...opts,
|
|
@@ -9392,7 +9392,7 @@ var require_useProps_native = __commonJS({
|
|
|
9392
9392
|
resolveValues: "auto",
|
|
9393
9393
|
...opts
|
|
9394
9394
|
}, null, componentContext), { mediaGroups, pseudoGroups } = splitStyles;
|
|
9395
|
-
return (0,
|
|
9395
|
+
return (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
9396
9396
|
if (!disabled) {
|
|
9397
9397
|
if (state.unmounted) {
|
|
9398
9398
|
setStateShallow({
|
|
@@ -9469,9 +9469,9 @@ var require_View_native = __commonJS({
|
|
|
9469
9469
|
}
|
|
9470
9470
|
});
|
|
9471
9471
|
module2.exports = __toCommonJS2(View_exports);
|
|
9472
|
-
var import_helpers2 = require_index_native3(),
|
|
9472
|
+
var import_helpers2 = require_index_native3(), import_constants = require_constants_native2(), import_createComponent = require_createComponent_native(), View2 = (0, import_createComponent.createComponent)({
|
|
9473
9473
|
acceptsClassName: !0,
|
|
9474
|
-
defaultProps:
|
|
9474
|
+
defaultProps: import_constants.stackDefaultStyles,
|
|
9475
9475
|
validStyles: import_helpers2.validStyles
|
|
9476
9476
|
});
|
|
9477
9477
|
}
|
|
@@ -9596,11 +9596,11 @@ var require_ThemeProvider_native = __commonJS({
|
|
|
9596
9596
|
}
|
|
9597
9597
|
});
|
|
9598
9598
|
module2.exports = __toCommonJS2(ThemeProvider_exports);
|
|
9599
|
-
var
|
|
9599
|
+
var import_jsx_runtime2 = require("react/jsx-runtime"), import_constants = require_index_native2(), import_react3 = require("react"), import_config = require_config_native(), import_constants2 = require_constants_native2(), import_Theme = require_Theme_native(), ThemeProvider = function(props) {
|
|
9600
9600
|
var _props_disableRootThemeClass, disableRootThemeClass = (_props_disableRootThemeClass = props.disableRootThemeClass) !== null && _props_disableRootThemeClass !== void 0 ? _props_disableRootThemeClass : (0, import_config.getSetting)("disableRootThemeClass"), _props_themeClassNameOnRoot, themeClassNameOnRoot = (_props_themeClassNameOnRoot = props.themeClassNameOnRoot) !== null && _props_themeClassNameOnRoot !== void 0 ? _props_themeClassNameOnRoot : (0, import_config.getSetting)("themeClassNameOnRoot");
|
|
9601
|
-
return
|
|
9601
|
+
return import_constants.isClient && (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
9602
9602
|
if (!disableRootThemeClass) {
|
|
9603
|
-
var cn = `${
|
|
9603
|
+
var cn = `${import_constants2.THEME_CLASSNAME_PREFIX}${props.defaultTheme}`, target = themeClassNameOnRoot ? document.documentElement : document.body;
|
|
9604
9604
|
return target.classList.add(cn), function() {
|
|
9605
9605
|
target.classList.remove(cn);
|
|
9606
9606
|
};
|
|
@@ -9609,7 +9609,7 @@ var require_ThemeProvider_native = __commonJS({
|
|
|
9609
9609
|
props.defaultTheme,
|
|
9610
9610
|
disableRootThemeClass,
|
|
9611
9611
|
themeClassNameOnRoot
|
|
9612
|
-
]), /* @__PURE__ */ (0,
|
|
9612
|
+
]), /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_Theme.Theme, {
|
|
9613
9613
|
className: props.className,
|
|
9614
9614
|
name: props.defaultTheme,
|
|
9615
9615
|
// if root class disabled, force class here
|
|
@@ -9677,13 +9677,13 @@ var require_FontLanguage_native = __commonJS({
|
|
|
9677
9677
|
}
|
|
9678
9678
|
});
|
|
9679
9679
|
module2.exports = __toCommonJS2(FontLanguage_native_exports);
|
|
9680
|
-
var
|
|
9680
|
+
var import_jsx_runtime2 = require("react/jsx-runtime"), import_react3 = __toESM2(require("react")), import_ComponentContext = require_ComponentContext_native(), FontLanguage = function(param) {
|
|
9681
9681
|
var { children, ...props } = param, language = import_react3.default.useMemo(function() {
|
|
9682
9682
|
return props;
|
|
9683
9683
|
}, [
|
|
9684
9684
|
JSON.stringify(props)
|
|
9685
9685
|
]);
|
|
9686
|
-
return /* @__PURE__ */ (0,
|
|
9686
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ComponentContext.ComponentContext.Provider, {
|
|
9687
9687
|
language,
|
|
9688
9688
|
children
|
|
9689
9689
|
});
|
|
@@ -9743,26 +9743,14 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
9743
9743
|
}, TamaguiProvider_exports = {};
|
|
9744
9744
|
__export2(TamaguiProvider_exports, {
|
|
9745
9745
|
TamaguiProvider: function() {
|
|
9746
|
-
return
|
|
9747
|
-
},
|
|
9748
|
-
___onDidFinishClientRender: function() {
|
|
9749
|
-
return ___onDidFinishClientRender2;
|
|
9746
|
+
return TamaguiProvider2;
|
|
9750
9747
|
}
|
|
9751
9748
|
});
|
|
9752
9749
|
module2.exports = __toCommonJS2(TamaguiProvider_exports);
|
|
9753
|
-
var
|
|
9754
|
-
function
|
|
9755
|
-
didRender ? cb() : listeners.add(cb);
|
|
9756
|
-
}
|
|
9757
|
-
function TamaguiProvider(param) {
|
|
9750
|
+
var import_jsx_runtime2 = require("react/jsx-runtime"), import_constants = require_index_native2(), import_use_did_finish_ssr = require_index_native7(), import_react3 = __toESM2(require("react")), import_config = require_config_native(), import_ComponentContext = require_ComponentContext_native(), import_useMedia = require_useMedia_native(), import_ThemeProvider = require_ThemeProvider_native();
|
|
9751
|
+
function TamaguiProvider2(param) {
|
|
9758
9752
|
var { children, disableInjectCSS, config, className, defaultTheme, disableRootThemeClass, reset, themeClassNameOnRoot } = param;
|
|
9759
|
-
(0,
|
|
9760
|
-
return listeners.forEach(function(cb) {
|
|
9761
|
-
return cb();
|
|
9762
|
-
}), didRender = !0, function() {
|
|
9763
|
-
didRender = !1;
|
|
9764
|
-
};
|
|
9765
|
-
}, []), import_constants2.IS_REACT_19 || import_constants2.isClient && (0, import_constants2.useIsomorphicLayoutEffect)(function() {
|
|
9753
|
+
import_constants.IS_REACT_19 || import_constants.isClient && (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
9766
9754
|
if (config && !disableInjectCSS) {
|
|
9767
9755
|
var style = document.createElement("style");
|
|
9768
9756
|
return style.appendChild(document.createTextNode(config.getCSS())), document.head.appendChild(style), function() {
|
|
@@ -9772,13 +9760,13 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
9772
9760
|
}, [
|
|
9773
9761
|
config,
|
|
9774
9762
|
disableInjectCSS
|
|
9775
|
-
]), (0,
|
|
9763
|
+
]), (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
9776
9764
|
(0, import_useMedia.updateMediaListeners)();
|
|
9777
9765
|
}, []);
|
|
9778
|
-
var contents = /* @__PURE__ */ (0,
|
|
9779
|
-
children: /* @__PURE__ */ (0,
|
|
9766
|
+
var contents = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(UnmountedClassName, {
|
|
9767
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ComponentContext.ComponentContext.Provider, {
|
|
9780
9768
|
animationDriver: config == null ? void 0 : config.animations,
|
|
9781
|
-
children: /* @__PURE__ */ (0,
|
|
9769
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ThemeProvider.ThemeProvider, {
|
|
9782
9770
|
themeClassNameOnRoot: themeClassNameOnRoot ?? (0, import_config.getSetting)("themeClassNameOnRoot"),
|
|
9783
9771
|
disableRootThemeClass: disableRootThemeClass ?? (0, import_config.getSetting)("disableRootThemeClass"),
|
|
9784
9772
|
defaultTheme: defaultTheme ?? (config ? Object.keys(config.themes)[0] : ""),
|
|
@@ -9788,9 +9776,9 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
9788
9776
|
})
|
|
9789
9777
|
})
|
|
9790
9778
|
});
|
|
9791
|
-
return (0, import_config.getSetting)("disableSSR") && (contents = /* @__PURE__ */ (0,
|
|
9779
|
+
return (0, import_config.getSetting)("disableSSR") && (contents = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_use_did_finish_ssr.ClientOnly, {
|
|
9792
9780
|
children: contents
|
|
9793
|
-
})), /* @__PURE__ */ (0,
|
|
9781
|
+
})), /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, {
|
|
9794
9782
|
children: [
|
|
9795
9783
|
contents,
|
|
9796
9784
|
!1
|
|
@@ -9801,7 +9789,7 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
9801
9789
|
var [mounted, setMounted] = import_react3.default.useState(!1);
|
|
9802
9790
|
return import_react3.default.useEffect(function() {
|
|
9803
9791
|
setMounted(!0);
|
|
9804
|
-
}, []),
|
|
9792
|
+
}, []), import_constants.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", {
|
|
9805
9793
|
style: {
|
|
9806
9794
|
display: "contents"
|
|
9807
9795
|
},
|
|
@@ -9809,7 +9797,7 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
9809
9797
|
children: props.children
|
|
9810
9798
|
}) : props.children;
|
|
9811
9799
|
}
|
|
9812
|
-
|
|
9800
|
+
TamaguiProvider2.displayName = "TamaguiProvider";
|
|
9813
9801
|
}
|
|
9814
9802
|
});
|
|
9815
9803
|
|
|
@@ -9868,12 +9856,12 @@ var require_Configuration_native = __commonJS({
|
|
|
9868
9856
|
}
|
|
9869
9857
|
});
|
|
9870
9858
|
module2.exports = __toCommonJS2(Configuration_exports);
|
|
9871
|
-
var
|
|
9872
|
-
var current = import_react3.default.useContext(import_ComponentContext.ComponentContext), clientOnly = (0, import_react3.useContext)(import_use_did_finish_ssr.ClientOnlyContext), children = /* @__PURE__ */ (0,
|
|
9859
|
+
var import_jsx_runtime2 = require("react/jsx-runtime"), import_use_did_finish_ssr = require_index_native7(), import_react3 = __toESM2(require("react")), import_ComponentContext = require_ComponentContext_native(), Configuration = function(props) {
|
|
9860
|
+
var current = import_react3.default.useContext(import_ComponentContext.ComponentContext), clientOnly = (0, import_react3.useContext)(import_use_did_finish_ssr.ClientOnlyContext), children = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ComponentContext.ComponentContext.Provider, {
|
|
9873
9861
|
...current,
|
|
9874
9862
|
...props
|
|
9875
9863
|
});
|
|
9876
|
-
return clientOnly ? /* @__PURE__ */ (0,
|
|
9864
|
+
return clientOnly ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_use_did_finish_ssr.ClientOnly, {
|
|
9877
9865
|
children
|
|
9878
9866
|
}) : children;
|
|
9879
9867
|
};
|
|
@@ -9936,10 +9924,10 @@ var require_useGet_native = __commonJS({
|
|
|
9936
9924
|
}
|
|
9937
9925
|
});
|
|
9938
9926
|
module2.exports = __toCommonJS2(useGet_exports);
|
|
9939
|
-
var
|
|
9927
|
+
var import_constants = require_index_native2(), React3 = __toESM2(require("react"));
|
|
9940
9928
|
function useGet(currentValue, initialValue, forwardToFunction) {
|
|
9941
9929
|
var curRef = React3.useRef(initialValue ?? currentValue);
|
|
9942
|
-
return (0,
|
|
9930
|
+
return (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
9943
9931
|
curRef.current = currentValue;
|
|
9944
9932
|
}), React3.useCallback(forwardToFunction ? function() {
|
|
9945
9933
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
|
|
@@ -10006,7 +9994,7 @@ var require_useEvent_native = __commonJS({
|
|
|
10006
9994
|
});
|
|
10007
9995
|
|
|
10008
9996
|
// ../use-event/dist/cjs/index.native.js
|
|
10009
|
-
var
|
|
9997
|
+
var require_index_native8 = __commonJS({
|
|
10010
9998
|
"../use-event/dist/cjs/index.native.js"(exports2, module2) {
|
|
10011
9999
|
"use strict";
|
|
10012
10000
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
|
|
@@ -10046,7 +10034,7 @@ var require_index_native7 = __commonJS({
|
|
|
10046
10034
|
});
|
|
10047
10035
|
|
|
10048
10036
|
// ../web/dist/cjs/index.native.js
|
|
10049
|
-
var
|
|
10037
|
+
var require_index_native9 = __commonJS({
|
|
10050
10038
|
"../web/dist/cjs/index.native.js"(exports2, module2) {
|
|
10051
10039
|
"use strict";
|
|
10052
10040
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
@@ -10163,7 +10151,7 @@ var require_index_native8 = __commonJS({
|
|
|
10163
10151
|
__reExport2(index_exports2, require_withStableStyle_native(), module2.exports);
|
|
10164
10152
|
__reExport2(index_exports2, require_createMediaStyle_native(), module2.exports);
|
|
10165
10153
|
__reExport2(index_exports2, require_getShorthandValue_native(), module2.exports);
|
|
10166
|
-
__reExport2(index_exports2,
|
|
10154
|
+
__reExport2(index_exports2, require_index_native6(), module2.exports);
|
|
10167
10155
|
__reExport2(index_exports2, require_createStyledContext_native(), module2.exports);
|
|
10168
10156
|
__reExport2(index_exports2, require_expandStyles_native(), module2.exports);
|
|
10169
10157
|
__reExport2(index_exports2, require_getExpandedShorthands_native(), module2.exports);
|
|
@@ -10204,8 +10192,8 @@ var require_index_native8 = __commonJS({
|
|
|
10204
10192
|
__reExport2(index_exports2, require_FontLanguage_native(), module2.exports);
|
|
10205
10193
|
__reExport2(index_exports2, require_TamaguiProvider_native(), module2.exports);
|
|
10206
10194
|
__reExport2(index_exports2, require_Configuration_native(), module2.exports);
|
|
10207
|
-
__reExport2(index_exports2, require_index_native6(), module2.exports);
|
|
10208
10195
|
__reExport2(index_exports2, require_index_native7(), module2.exports);
|
|
10196
|
+
__reExport2(index_exports2, require_index_native8(), module2.exports);
|
|
10209
10197
|
__reExport2(index_exports2, require_index_native4(), module2.exports);
|
|
10210
10198
|
__reExport2(index_exports2, require_index_native3(), module2.exports);
|
|
10211
10199
|
__reExport2(index_exports2, require_index_native2(), module2.exports);
|
|
@@ -10590,15 +10578,15 @@ var require_createMedia_native = __commonJS({
|
|
|
10590
10578
|
}
|
|
10591
10579
|
});
|
|
10592
10580
|
module2.exports = __toCommonJS2(createMedia_exports);
|
|
10593
|
-
var
|
|
10581
|
+
var import_web2 = require_index_native9(), import_matchMedia = require_matchMedia_native2();
|
|
10594
10582
|
function createMedia2(media) {
|
|
10595
|
-
return (0,
|
|
10583
|
+
return (0, import_web2.setupMatchMedia)(import_matchMedia.matchMedia), media;
|
|
10596
10584
|
}
|
|
10597
10585
|
}
|
|
10598
10586
|
});
|
|
10599
10587
|
|
|
10600
10588
|
// ../react-native-media-driver/dist/cjs/index.native.js
|
|
10601
|
-
var
|
|
10589
|
+
var require_index_native10 = __commonJS({
|
|
10602
10590
|
"../react-native-media-driver/dist/cjs/index.native.js"(exports2, module2) {
|
|
10603
10591
|
"use strict";
|
|
10604
10592
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
|
|
@@ -10679,7 +10667,7 @@ var require_utils_native = __commonJS({
|
|
|
10679
10667
|
return canUseDOM;
|
|
10680
10668
|
},
|
|
10681
10669
|
getBoundingClientRect: function() {
|
|
10682
|
-
return
|
|
10670
|
+
return getBoundingClientRect;
|
|
10683
10671
|
},
|
|
10684
10672
|
getLowestCommonAncestor: function() {
|
|
10685
10673
|
return getLowestCommonAncestor;
|
|
@@ -10704,7 +10692,7 @@ var require_utils_native = __commonJS({
|
|
|
10704
10692
|
}
|
|
10705
10693
|
});
|
|
10706
10694
|
module2.exports = __toCommonJS2(utils_exports);
|
|
10707
|
-
var keyName = "__reactResponderId", canUseDOM = !!(typeof window < "u" && window.document && window.document.createElement),
|
|
10695
|
+
var keyName = "__reactResponderId", canUseDOM = !!(typeof window < "u" && window.document && window.document.createElement), getBoundingClientRect = function(node) {
|
|
10708
10696
|
if (node && node.nodeType === 1 && node.getBoundingClientRect) return node.getBoundingClientRect();
|
|
10709
10697
|
};
|
|
10710
10698
|
function getEventPath(domEvent) {
|
|
@@ -11552,7 +11540,7 @@ var require_useResponderEvents_native = __commonJS({
|
|
|
11552
11540
|
});
|
|
11553
11541
|
|
|
11554
11542
|
// ../react-native-use-responder-events/dist/cjs/index.native.js
|
|
11555
|
-
var
|
|
11543
|
+
var require_index_native11 = __commonJS({
|
|
11556
11544
|
"../react-native-use-responder-events/dist/cjs/index.native.js"(exports2, module2) {
|
|
11557
11545
|
"use strict";
|
|
11558
11546
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
|
|
@@ -11590,6 +11578,235 @@ var require_index_native10 = __commonJS({
|
|
|
11590
11578
|
}
|
|
11591
11579
|
});
|
|
11592
11580
|
|
|
11581
|
+
// ../use-element-layout/dist/cjs/index.native.js
|
|
11582
|
+
var require_index_native12 = __commonJS({
|
|
11583
|
+
"../use-element-layout/dist/cjs/index.native.js"(exports2, module2) {
|
|
11584
|
+
"use strict";
|
|
11585
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
11586
|
+
for (var name in all) __defProp2(target, name, {
|
|
11587
|
+
get: all[name],
|
|
11588
|
+
enumerable: !0
|
|
11589
|
+
});
|
|
11590
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
11591
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
11592
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
11593
|
+
for (var _loop = function() {
|
|
11594
|
+
var key = _step.value;
|
|
11595
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
11596
|
+
get: function() {
|
|
11597
|
+
return from[key];
|
|
11598
|
+
},
|
|
11599
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
11600
|
+
});
|
|
11601
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
11602
|
+
} catch (err) {
|
|
11603
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
11604
|
+
} finally {
|
|
11605
|
+
try {
|
|
11606
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
11607
|
+
} finally {
|
|
11608
|
+
if (_didIteratorError)
|
|
11609
|
+
throw _iteratorError;
|
|
11610
|
+
}
|
|
11611
|
+
}
|
|
11612
|
+
return to;
|
|
11613
|
+
}, __toCommonJS2 = function(mod) {
|
|
11614
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
11615
|
+
value: !0
|
|
11616
|
+
}), mod);
|
|
11617
|
+
}, index_exports2 = {};
|
|
11618
|
+
__export2(index_exports2, {
|
|
11619
|
+
enable: function() {
|
|
11620
|
+
return enable2;
|
|
11621
|
+
},
|
|
11622
|
+
getElementLayoutEvent: function() {
|
|
11623
|
+
return getElementLayoutEvent2;
|
|
11624
|
+
},
|
|
11625
|
+
getElementLayoutEventAsync: function() {
|
|
11626
|
+
return getElementLayoutEventAsync;
|
|
11627
|
+
},
|
|
11628
|
+
getRect: function() {
|
|
11629
|
+
return getRect2;
|
|
11630
|
+
},
|
|
11631
|
+
measureLayout: function() {
|
|
11632
|
+
return measureLayout2;
|
|
11633
|
+
},
|
|
11634
|
+
measureLayoutAsync: function() {
|
|
11635
|
+
return measureLayoutAsync;
|
|
11636
|
+
},
|
|
11637
|
+
setOnLayoutStrategy: function() {
|
|
11638
|
+
return setOnLayoutStrategy2;
|
|
11639
|
+
},
|
|
11640
|
+
useElementLayout: function() {
|
|
11641
|
+
return useElementLayout2;
|
|
11642
|
+
}
|
|
11643
|
+
});
|
|
11644
|
+
module2.exports = __toCommonJS2(index_exports2);
|
|
11645
|
+
var import_constants = require_index_native2(), import_is_equal_shallow = require_index_native6(), LayoutHandlers = /* @__PURE__ */ new WeakMap(), Nodes = /* @__PURE__ */ new Set(), strategy = "async";
|
|
11646
|
+
function setOnLayoutStrategy2(state) {
|
|
11647
|
+
strategy = state;
|
|
11648
|
+
}
|
|
11649
|
+
var NodeRectCache = /* @__PURE__ */ new WeakMap(), ParentRectCache = /* @__PURE__ */ new WeakMap(), DebounceTimers = /* @__PURE__ */ new WeakMap(), LastChangeTime = /* @__PURE__ */ new WeakMap(), rAF = typeof window < "u" ? window.requestAnimationFrame : void 0, DEBOUNCE_DELAY = 32, avoidUpdates = !0, queuedUpdates = /* @__PURE__ */ new Map();
|
|
11650
|
+
function enable2() {
|
|
11651
|
+
avoidUpdates && (avoidUpdates = !1, queuedUpdates && (queuedUpdates.forEach(function(cb) {
|
|
11652
|
+
return cb();
|
|
11653
|
+
}), queuedUpdates.clear()));
|
|
11654
|
+
}
|
|
11655
|
+
if (import_constants.isClient && rAF) {
|
|
11656
|
+
layoutOnAnimationFrame = function() {
|
|
11657
|
+
var now = Date.now(), timeSinceLastFrame = now - lastFrameAt;
|
|
11658
|
+
if (lastFrameAt = now, strategy !== "off") {
|
|
11659
|
+
var expectedFrameTime = 16.67, hasRecentSyncWork = timeSinceLastFrame > expectedFrameTime * numDroppedFramesUntilPause;
|
|
11660
|
+
hasRecentSyncWork || Nodes.forEach(updateLayoutIfChanged);
|
|
11661
|
+
}
|
|
11662
|
+
rAF(layoutOnAnimationFrame);
|
|
11663
|
+
}, layoutOnAnimationFrame2 = layoutOnAnimationFrame, lastFrameAt = Date.now(), numDroppedFramesUntilPause = 2;
|
|
11664
|
+
async function updateLayoutIfChanged(node) {
|
|
11665
|
+
var nodeRect = node.getBoundingClientRect(), parentNode = node.parentElement, parentRect = parentNode == null ? void 0 : parentNode.getBoundingClientRect(), onLayout = LayoutHandlers.get(node);
|
|
11666
|
+
if (typeof onLayout == "function") {
|
|
11667
|
+
var cachedRect = NodeRectCache.get(node), cachedParentRect = parentNode ? NodeRectCache.get(parentNode) : null;
|
|
11668
|
+
if (!cachedRect || // has changed one rect
|
|
11669
|
+
!(0, import_is_equal_shallow.isEqualShallow)(cachedRect, nodeRect) && (!cachedParentRect || !(0, import_is_equal_shallow.isEqualShallow)(cachedParentRect, parentRect))) if (NodeRectCache.set(node, nodeRect), parentRect && parentNode && ParentRectCache.set(parentNode, parentRect), avoidUpdates) {
|
|
11670
|
+
var event = getElementLayoutEvent2(node);
|
|
11671
|
+
queuedUpdates.set(node, function() {
|
|
11672
|
+
return onLayout(event);
|
|
11673
|
+
});
|
|
11674
|
+
} else if (strategy === "async") {
|
|
11675
|
+
var now = Date.now();
|
|
11676
|
+
LastChangeTime.set(node, now);
|
|
11677
|
+
var existingTimer = DebounceTimers.get(node);
|
|
11678
|
+
existingTimer && clearTimeout(existingTimer);
|
|
11679
|
+
var timer = setTimeout(async function() {
|
|
11680
|
+
var lastChange = LastChangeTime.get(node) || 0, timeSinceChange = Date.now() - lastChange;
|
|
11681
|
+
if (timeSinceChange >= DEBOUNCE_DELAY) {
|
|
11682
|
+
var event2 = await getElementLayoutEventAsync(node);
|
|
11683
|
+
onLayout(event2), DebounceTimers.delete(node);
|
|
11684
|
+
} else {
|
|
11685
|
+
var remainingDelay = DEBOUNCE_DELAY - timeSinceChange, newTimer = setTimeout(async function() {
|
|
11686
|
+
var event3 = await getElementLayoutEventAsync(node);
|
|
11687
|
+
onLayout(event3), DebounceTimers.delete(node);
|
|
11688
|
+
}, remainingDelay);
|
|
11689
|
+
DebounceTimers.set(node, newTimer);
|
|
11690
|
+
}
|
|
11691
|
+
}, DEBOUNCE_DELAY);
|
|
11692
|
+
DebounceTimers.set(node, timer);
|
|
11693
|
+
} else {
|
|
11694
|
+
var event1 = getElementLayoutEvent2(node);
|
|
11695
|
+
onLayout(event1);
|
|
11696
|
+
}
|
|
11697
|
+
}
|
|
11698
|
+
}
|
|
11699
|
+
rAF(layoutOnAnimationFrame);
|
|
11700
|
+
}
|
|
11701
|
+
var layoutOnAnimationFrame, layoutOnAnimationFrame2, lastFrameAt, numDroppedFramesUntilPause, getElementLayoutEvent2 = function(target) {
|
|
11702
|
+
var res = null;
|
|
11703
|
+
if (measureLayout2(target, null, function(x, y, width, height, left, top) {
|
|
11704
|
+
res = {
|
|
11705
|
+
nativeEvent: {
|
|
11706
|
+
layout: {
|
|
11707
|
+
x,
|
|
11708
|
+
y,
|
|
11709
|
+
width,
|
|
11710
|
+
height,
|
|
11711
|
+
left,
|
|
11712
|
+
top
|
|
11713
|
+
},
|
|
11714
|
+
target
|
|
11715
|
+
},
|
|
11716
|
+
timeStamp: Date.now()
|
|
11717
|
+
};
|
|
11718
|
+
}), !res) throw new Error("\u203C\uFE0F");
|
|
11719
|
+
return res;
|
|
11720
|
+
}, measureLayout2 = function(node, relativeTo, callback) {
|
|
11721
|
+
var relativeNode = relativeTo || (node == null ? void 0 : node.parentElement);
|
|
11722
|
+
if (relativeNode instanceof HTMLElement) {
|
|
11723
|
+
var nodeDim = node.getBoundingClientRect(), relativeNodeDim = relativeNode.getBoundingClientRect();
|
|
11724
|
+
if (relativeNodeDim && nodeDim) {
|
|
11725
|
+
var { x, y, width, height, left, top } = getRelativeDimensions(nodeDim, relativeNodeDim);
|
|
11726
|
+
callback(x, y, width, height, left, top);
|
|
11727
|
+
}
|
|
11728
|
+
}
|
|
11729
|
+
}, getElementLayoutEventAsync = async function(target) {
|
|
11730
|
+
var layout = await measureLayoutAsync(target);
|
|
11731
|
+
if (!layout) throw new Error("\u203C\uFE0F");
|
|
11732
|
+
return {
|
|
11733
|
+
nativeEvent: {
|
|
11734
|
+
layout,
|
|
11735
|
+
target
|
|
11736
|
+
},
|
|
11737
|
+
timeStamp: Date.now()
|
|
11738
|
+
};
|
|
11739
|
+
}, measureLayoutAsync = async function(node, relativeTo) {
|
|
11740
|
+
var relativeNode = relativeTo || (node == null ? void 0 : node.parentElement);
|
|
11741
|
+
if (relativeNode instanceof HTMLElement) {
|
|
11742
|
+
var [nodeDim, relativeNodeDim] = await Promise.all([
|
|
11743
|
+
node.getBoundingClientRect(),
|
|
11744
|
+
relativeNode.getBoundingClientRect()
|
|
11745
|
+
]);
|
|
11746
|
+
if (relativeNodeDim && nodeDim) {
|
|
11747
|
+
var { x, y, width, height, left, top } = getRelativeDimensions(nodeDim, relativeNodeDim);
|
|
11748
|
+
return {
|
|
11749
|
+
x,
|
|
11750
|
+
y,
|
|
11751
|
+
width,
|
|
11752
|
+
height,
|
|
11753
|
+
left,
|
|
11754
|
+
top
|
|
11755
|
+
};
|
|
11756
|
+
}
|
|
11757
|
+
}
|
|
11758
|
+
return null;
|
|
11759
|
+
}, getRelativeDimensions = function(a, b) {
|
|
11760
|
+
var { height, left, top, width } = a, x = left - b.left, y = top - b.top;
|
|
11761
|
+
return {
|
|
11762
|
+
x,
|
|
11763
|
+
y,
|
|
11764
|
+
width,
|
|
11765
|
+
height,
|
|
11766
|
+
left,
|
|
11767
|
+
top
|
|
11768
|
+
};
|
|
11769
|
+
};
|
|
11770
|
+
function useElementLayout2(ref, onLayout) {
|
|
11771
|
+
var _ref_current, node = ensureWebElement((_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.host);
|
|
11772
|
+
node && onLayout && LayoutHandlers.set(node, onLayout), (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
11773
|
+
var _ref_current2;
|
|
11774
|
+
if (onLayout) {
|
|
11775
|
+
var node2 = (_ref_current2 = ref.current) === null || _ref_current2 === void 0 ? void 0 : _ref_current2.host;
|
|
11776
|
+
if (node2) return LayoutHandlers.set(node2, onLayout), Nodes.add(node2), onLayout(getElementLayoutEvent2(node2)), function() {
|
|
11777
|
+
Nodes.delete(node2), LayoutHandlers.delete(node2), NodeRectCache.delete(node2);
|
|
11778
|
+
var timer = DebounceTimers.get(node2);
|
|
11779
|
+
timer && (clearTimeout(timer), DebounceTimers.delete(node2)), LastChangeTime.delete(node2);
|
|
11780
|
+
};
|
|
11781
|
+
}
|
|
11782
|
+
}, [
|
|
11783
|
+
ref,
|
|
11784
|
+
!!onLayout
|
|
11785
|
+
]);
|
|
11786
|
+
}
|
|
11787
|
+
function ensureWebElement(x) {
|
|
11788
|
+
if (!(typeof HTMLElement > "u")) return x instanceof HTMLElement ? x : void 0;
|
|
11789
|
+
}
|
|
11790
|
+
var getBoundingClientRect = function(node) {
|
|
11791
|
+
var _node_getBoundingClientRect;
|
|
11792
|
+
if (!(!node || node.nodeType !== 1)) return (_node_getBoundingClientRect = node.getBoundingClientRect) === null || _node_getBoundingClientRect === void 0 ? void 0 : _node_getBoundingClientRect.call(node);
|
|
11793
|
+
}, getRect2 = function(node) {
|
|
11794
|
+
var rect = getBoundingClientRect(node);
|
|
11795
|
+
if (rect) {
|
|
11796
|
+
var { x, y, top, left } = rect;
|
|
11797
|
+
return {
|
|
11798
|
+
x,
|
|
11799
|
+
y,
|
|
11800
|
+
width: node.offsetWidth,
|
|
11801
|
+
height: node.offsetHeight,
|
|
11802
|
+
top,
|
|
11803
|
+
left
|
|
11804
|
+
};
|
|
11805
|
+
}
|
|
11806
|
+
};
|
|
11807
|
+
}
|
|
11808
|
+
});
|
|
11809
|
+
|
|
11593
11810
|
// ../../packages/fake-react-native/idFn.js
|
|
11594
11811
|
var idFn_exports = {};
|
|
11595
11812
|
__export(idFn_exports, {
|
|
@@ -11607,14 +11824,15 @@ var init_idFn = __esm({
|
|
|
11607
11824
|
var index_exports = {};
|
|
11608
11825
|
__export(index_exports, {
|
|
11609
11826
|
Stack: () => Stack,
|
|
11827
|
+
TamaguiProvider: () => TamaguiProvider,
|
|
11610
11828
|
Text: () => Text,
|
|
11611
11829
|
View: () => View,
|
|
11612
11830
|
createTamagui: () => createTamagui,
|
|
11613
|
-
getElementLayoutEvent: () => getElementLayoutEvent,
|
|
11614
|
-
setOnLayoutStrategy: () => setOnLayoutStrategy
|
|
11831
|
+
getElementLayoutEvent: () => import_use_element_layout2.getElementLayoutEvent,
|
|
11832
|
+
setOnLayoutStrategy: () => import_use_element_layout2.setOnLayoutStrategy
|
|
11615
11833
|
});
|
|
11616
11834
|
module.exports = __toCommonJS(index_exports);
|
|
11617
|
-
var import_react_native_media_driver = __toESM(
|
|
11835
|
+
var import_jsx_runtime = require("react/jsx-runtime"), import_react_native_media_driver = __toESM(require_index_native10()), import_react_native_use_responder_events = __toESM(require_index_native11()), import_web = __toESM(require_index_native9()), import_react2 = __toESM(require("react")), import_use_element_layout = __toESM(require_index_native12());
|
|
11618
11836
|
|
|
11619
11837
|
// src/addNativeValidStyles.native.ts
|
|
11620
11838
|
var import_helpers = __toESM(require_index_native3());
|
|
@@ -11843,181 +12061,34 @@ function getBaseViews() {
|
|
|
11843
12061
|
};
|
|
11844
12062
|
}
|
|
11845
12063
|
|
|
11846
|
-
// src/helpers/getBoundingClientRect.tsx
|
|
11847
|
-
var getBoundingClientRect = function(node) {
|
|
11848
|
-
var _node_getBoundingClientRect;
|
|
11849
|
-
if (!(!node || node.nodeType !== 1))
|
|
11850
|
-
return (_node_getBoundingClientRect = node.getBoundingClientRect) === null || _node_getBoundingClientRect === void 0 ? void 0 : _node_getBoundingClientRect.call(node);
|
|
11851
|
-
};
|
|
11852
|
-
|
|
11853
|
-
// src/helpers/getRect.tsx
|
|
11854
|
-
var getRect = function(node) {
|
|
11855
|
-
var rect = getBoundingClientRect(node);
|
|
11856
|
-
if (rect) {
|
|
11857
|
-
var { x, y, top, left } = rect;
|
|
11858
|
-
return {
|
|
11859
|
-
x,
|
|
11860
|
-
y,
|
|
11861
|
-
width: node.offsetWidth,
|
|
11862
|
-
height: node.offsetHeight,
|
|
11863
|
-
top,
|
|
11864
|
-
left
|
|
11865
|
-
};
|
|
11866
|
-
}
|
|
11867
|
-
};
|
|
11868
|
-
|
|
11869
|
-
// src/hooks/useElementLayout.tsx
|
|
11870
|
-
var import_constants = __toESM(require_index_native2()), import_web = __toESM(require_index_native8()), LayoutHandlers = /* @__PURE__ */ new WeakMap(), Nodes = /* @__PURE__ */ new Set(), strategy = "async";
|
|
11871
|
-
function setOnLayoutStrategy(state) {
|
|
11872
|
-
strategy = state;
|
|
11873
|
-
}
|
|
11874
|
-
var NodeRectCache = /* @__PURE__ */ new WeakMap(), ParentRectCache = /* @__PURE__ */ new WeakMap(), DebounceTimers = /* @__PURE__ */ new WeakMap(), LastChangeTime = /* @__PURE__ */ new WeakMap(), rAF = typeof window < "u" ? window.requestAnimationFrame : void 0, DEBOUNCE_DELAY = 32;
|
|
11875
|
-
if (import_constants.isClient && rAF) {
|
|
11876
|
-
let layoutOnAnimationFrame = function() {
|
|
11877
|
-
var now = Date.now(), timeSinceLastFrame = now - lastFrameAt;
|
|
11878
|
-
if (lastFrameAt = now, strategy !== "off") {
|
|
11879
|
-
var expectedFrameTime = 16.67, hasRecentSyncWork = timeSinceLastFrame > expectedFrameTime * numDroppedFramesUntilPause;
|
|
11880
|
-
hasRecentSyncWork || Nodes.forEach(updateLayoutIfChanged);
|
|
11881
|
-
}
|
|
11882
|
-
rAF(layoutOnAnimationFrame);
|
|
11883
|
-
};
|
|
11884
|
-
layoutOnAnimationFrame2 = layoutOnAnimationFrame, avoidUpdates = !0, queuedUpdates = /* @__PURE__ */ new Map(), lastFrameAt = Date.now(), numDroppedFramesUntilPause = 2, (0, import_web.___onDidFinishClientRender)(function() {
|
|
11885
|
-
avoidUpdates = !1, queuedUpdates && (queuedUpdates.forEach(function(cb) {
|
|
11886
|
-
return cb();
|
|
11887
|
-
}), queuedUpdates.clear());
|
|
11888
|
-
});
|
|
11889
|
-
async function updateLayoutIfChanged(node) {
|
|
11890
|
-
var nodeRect = node.getBoundingClientRect(), parentNode = node.parentElement, parentRect = parentNode == null ? void 0 : parentNode.getBoundingClientRect(), onLayout = LayoutHandlers.get(node);
|
|
11891
|
-
if (typeof onLayout == "function") {
|
|
11892
|
-
var cachedRect = NodeRectCache.get(node), cachedParentRect = parentNode ? NodeRectCache.get(parentNode) : null;
|
|
11893
|
-
if (!cachedRect || // has changed one rect
|
|
11894
|
-
!(0, import_web.isEqualShallow)(cachedRect, nodeRect) && (!cachedParentRect || !(0, import_web.isEqualShallow)(cachedParentRect, parentRect)))
|
|
11895
|
-
if (NodeRectCache.set(node, nodeRect), parentRect && parentNode && ParentRectCache.set(parentNode, parentRect), avoidUpdates) {
|
|
11896
|
-
var event = getElementLayoutEvent(node);
|
|
11897
|
-
queuedUpdates.set(node, function() {
|
|
11898
|
-
return onLayout(event);
|
|
11899
|
-
});
|
|
11900
|
-
} else if (strategy === "async") {
|
|
11901
|
-
var now = Date.now();
|
|
11902
|
-
LastChangeTime.set(node, now);
|
|
11903
|
-
var existingTimer = DebounceTimers.get(node);
|
|
11904
|
-
existingTimer && clearTimeout(existingTimer);
|
|
11905
|
-
var timer = setTimeout(async function() {
|
|
11906
|
-
var lastChange = LastChangeTime.get(node) || 0, timeSinceChange = Date.now() - lastChange;
|
|
11907
|
-
if (timeSinceChange >= DEBOUNCE_DELAY) {
|
|
11908
|
-
var event2 = await getElementLayoutEventAsync(node);
|
|
11909
|
-
onLayout(event2), DebounceTimers.delete(node);
|
|
11910
|
-
} else {
|
|
11911
|
-
var remainingDelay = DEBOUNCE_DELAY - timeSinceChange, newTimer = setTimeout(async function() {
|
|
11912
|
-
var event3 = await getElementLayoutEventAsync(node);
|
|
11913
|
-
onLayout(event3), DebounceTimers.delete(node);
|
|
11914
|
-
}, remainingDelay);
|
|
11915
|
-
DebounceTimers.set(node, newTimer);
|
|
11916
|
-
}
|
|
11917
|
-
}, DEBOUNCE_DELAY);
|
|
11918
|
-
DebounceTimers.set(node, timer);
|
|
11919
|
-
} else {
|
|
11920
|
-
var event1 = getElementLayoutEvent(node);
|
|
11921
|
-
onLayout(event1);
|
|
11922
|
-
}
|
|
11923
|
-
}
|
|
11924
|
-
}
|
|
11925
|
-
rAF(layoutOnAnimationFrame);
|
|
11926
|
-
}
|
|
11927
|
-
var avoidUpdates, queuedUpdates, lastFrameAt, numDroppedFramesUntilPause, layoutOnAnimationFrame2, getElementLayoutEvent = function(target) {
|
|
11928
|
-
var res = null;
|
|
11929
|
-
if (measureLayout(target, null, function(x, y, width, height, left, top) {
|
|
11930
|
-
res = {
|
|
11931
|
-
nativeEvent: {
|
|
11932
|
-
layout: {
|
|
11933
|
-
x,
|
|
11934
|
-
y,
|
|
11935
|
-
width,
|
|
11936
|
-
height,
|
|
11937
|
-
left,
|
|
11938
|
-
top
|
|
11939
|
-
},
|
|
11940
|
-
target
|
|
11941
|
-
},
|
|
11942
|
-
timeStamp: Date.now()
|
|
11943
|
-
};
|
|
11944
|
-
}), !res)
|
|
11945
|
-
throw new Error("\u203C\uFE0F");
|
|
11946
|
-
return res;
|
|
11947
|
-
}, measureLayout = function(node, relativeTo, callback) {
|
|
11948
|
-
var relativeNode = relativeTo || (node == null ? void 0 : node.parentElement);
|
|
11949
|
-
if (relativeNode instanceof HTMLElement) {
|
|
11950
|
-
var nodeDim = node.getBoundingClientRect(), relativeNodeDim = relativeNode.getBoundingClientRect();
|
|
11951
|
-
if (relativeNodeDim && nodeDim) {
|
|
11952
|
-
var { x, y, width, height, left, top } = getRelativeDimensions(nodeDim, relativeNodeDim);
|
|
11953
|
-
callback(x, y, width, height, left, top);
|
|
11954
|
-
}
|
|
11955
|
-
}
|
|
11956
|
-
}, getElementLayoutEventAsync = async function(target) {
|
|
11957
|
-
var res = null;
|
|
11958
|
-
if (await measureLayoutAsync(target, null, function(x, y, width, height, left, top) {
|
|
11959
|
-
res = {
|
|
11960
|
-
nativeEvent: {
|
|
11961
|
-
layout: {
|
|
11962
|
-
x,
|
|
11963
|
-
y,
|
|
11964
|
-
width,
|
|
11965
|
-
height,
|
|
11966
|
-
left,
|
|
11967
|
-
top
|
|
11968
|
-
},
|
|
11969
|
-
target
|
|
11970
|
-
},
|
|
11971
|
-
timeStamp: Date.now()
|
|
11972
|
-
};
|
|
11973
|
-
}), !res)
|
|
11974
|
-
throw new Error("\u203C\uFE0F");
|
|
11975
|
-
return res;
|
|
11976
|
-
}, measureLayoutAsync = async function(node, relativeTo, callback) {
|
|
11977
|
-
var relativeNode = relativeTo || (node == null ? void 0 : node.parentElement);
|
|
11978
|
-
if (relativeNode instanceof HTMLElement) {
|
|
11979
|
-
var [nodeDim, relativeNodeDim] = await Promise.all([
|
|
11980
|
-
node.getBoundingClientRect(),
|
|
11981
|
-
relativeNode.getBoundingClientRect()
|
|
11982
|
-
]);
|
|
11983
|
-
if (relativeNodeDim && nodeDim) {
|
|
11984
|
-
var { x, y, width, height, left, top } = getRelativeDimensions(nodeDim, relativeNodeDim);
|
|
11985
|
-
callback(x, y, width, height, left, top);
|
|
11986
|
-
}
|
|
11987
|
-
}
|
|
11988
|
-
}, getRelativeDimensions = function(a, b) {
|
|
11989
|
-
var { height, left, top, width } = a, x = left - b.left, y = top - b.top;
|
|
11990
|
-
return {
|
|
11991
|
-
x,
|
|
11992
|
-
y,
|
|
11993
|
-
width,
|
|
11994
|
-
height,
|
|
11995
|
-
left,
|
|
11996
|
-
top
|
|
11997
|
-
};
|
|
11998
|
-
};
|
|
11999
|
-
|
|
12000
12064
|
// src/vendor/Pressability.native.tsx
|
|
12001
12065
|
var Pressability = require_fake_react_native().default, usePressability = (init_idFn(), __toCommonJS(idFn_exports)).default;
|
|
12002
12066
|
|
|
12003
12067
|
// src/index.tsx
|
|
12004
|
-
|
|
12068
|
+
var import_use_element_layout2 = __toESM(require_index_native12());
|
|
12069
|
+
__reExport(index_exports, __toESM(require_index_native9()), module.exports);
|
|
12005
12070
|
addNativeValidStyles();
|
|
12006
|
-
var
|
|
12007
|
-
return
|
|
12071
|
+
var TamaguiProvider = function(props) {
|
|
12072
|
+
return (0, import_web.useIsomorphicLayoutEffect)(function() {
|
|
12073
|
+
(0, import_use_element_layout.enable)();
|
|
12074
|
+
}, []), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web.TamaguiProvider, {
|
|
12075
|
+
...props
|
|
12076
|
+
});
|
|
12077
|
+
}, createTamagui = function(conf) {
|
|
12078
|
+
return conf.media && (conf.media = (0, import_react_native_media_driver.createMedia)(conf.media)), (0, import_web.createTamagui)(conf);
|
|
12008
12079
|
}, baseViews = getBaseViews();
|
|
12009
|
-
(0,
|
|
12080
|
+
(0, import_web.setupHooks)({
|
|
12010
12081
|
getBaseViews,
|
|
12011
12082
|
setElementProps: function(node) {
|
|
12012
12083
|
if (node && !node.measure) {
|
|
12013
12084
|
var _node, _node1, _node2;
|
|
12014
12085
|
(_node = node).measure || (_node.measure = function(callback) {
|
|
12015
|
-
return measureLayout(node, null, callback);
|
|
12086
|
+
return (0, import_use_element_layout.measureLayout)(node, null, callback);
|
|
12016
12087
|
}), (_node1 = node).measureLayout || (_node1.measureLayout = function(relativeToNode, success) {
|
|
12017
|
-
return measureLayout(node, relativeToNode, success);
|
|
12088
|
+
return (0, import_use_element_layout.measureLayout)(node, relativeToNode, success);
|
|
12018
12089
|
}), (_node2 = node).measureInWindow || (_node2.measureInWindow = function(callback) {
|
|
12019
12090
|
setTimeout(function() {
|
|
12020
|
-
var { height, left, top, width } = getRect(node);
|
|
12091
|
+
var { height, left, top, width } = (0, import_use_element_layout.getRect)(node);
|
|
12021
12092
|
callback(left, top, width, height);
|
|
12022
12093
|
}, 0);
|
|
12023
12094
|
});
|
|
@@ -12038,7 +12109,7 @@ var createTamagui = function(conf) {
|
|
|
12038
12109
|
onPressIn,
|
|
12039
12110
|
onPressOut: onPressOut || onPress
|
|
12040
12111
|
};
|
|
12041
|
-
onPressOut && onPress && (inputEvents.onPressOut = (0,
|
|
12112
|
+
onPressOut && onPress && (inputEvents.onPressOut = (0, import_web.composeEventHandlers)(onPress, onPressOut)), Object.assign(viewProps, inputEvents);
|
|
12042
12113
|
}
|
|
12043
12114
|
} else {
|
|
12044
12115
|
events && viewProps.hitSlop && (events.hitSlop = viewProps.hitSlop);
|
|
@@ -12046,7 +12117,7 @@ var createTamagui = function(conf) {
|
|
|
12046
12117
|
if (events && events.onPress)
|
|
12047
12118
|
for (var key in pressability) {
|
|
12048
12119
|
var og = viewProps[key], val = pressability[key];
|
|
12049
|
-
viewProps[key] = og && !dontComposePressabilityKeys[key] ? (0,
|
|
12120
|
+
viewProps[key] = og && !dontComposePressabilityKeys[key] ? (0, import_web.composeEventHandlers)(og, val) : val;
|
|
12050
12121
|
}
|
|
12051
12122
|
}
|
|
12052
12123
|
},
|
|
@@ -12055,10 +12126,11 @@ var createTamagui = function(conf) {
|
|
|
12055
12126
|
});
|
|
12056
12127
|
var dontComposePressabilityKeys = {
|
|
12057
12128
|
onClick: !0
|
|
12058
|
-
}, View =
|
|
12129
|
+
}, View = import_web.View, Stack = import_web.Stack, Text = import_web.Text;
|
|
12059
12130
|
// Annotate the CommonJS export names for ESM import in node:
|
|
12060
12131
|
0 && (module.exports = {
|
|
12061
12132
|
Stack,
|
|
12133
|
+
TamaguiProvider,
|
|
12062
12134
|
Text,
|
|
12063
12135
|
View,
|
|
12064
12136
|
createTamagui,
|