@tamagui/core 1.129.5 → 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/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 = {
|
|
@@ -1196,8 +1196,8 @@ var require_config_native = __commonJS({
|
|
|
1196
1196
|
}
|
|
1197
1197
|
});
|
|
1198
1198
|
module2.exports = __toCommonJS2(config_exports);
|
|
1199
|
-
var
|
|
1200
|
-
Haven't called createTamagui yet. ${
|
|
1199
|
+
var import_constants = require_index_native2(), import_constants2 = require_constants_native2(), conf, haventCalledErrorMessage = process.env.NODE_ENV === "development" ? `
|
|
1200
|
+
Haven't called createTamagui yet. ${import_constants2.MISSING_THEME_MESSAGE}
|
|
1201
1201
|
` : "\u274C Error 001", getSetting2 = function(key) {
|
|
1202
1202
|
if (process.env.NODE_ENV === "development" && !conf) throw new Error(haventCalledErrorMessage);
|
|
1203
1203
|
var _conf_settings_key;
|
|
@@ -1235,7 +1235,7 @@ Haven't called createTamagui yet. ${import_constants22.MISSING_THEME_MESSAGE}
|
|
|
1235
1235
|
return tokensMerged[cat][value];
|
|
1236
1236
|
}) || ""]) === null || _tokensMerged_ === void 0 ? void 0 : _tokensMerged_[value];
|
|
1237
1237
|
}, getToken2 = function(value, group) {
|
|
1238
|
-
var useVariable = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] :
|
|
1238
|
+
var useVariable = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : import_constants.isWeb, token = getTokenObject(value, group);
|
|
1239
1239
|
return useVariable ? token == null ? void 0 : token.variable : token == null ? void 0 : token.val;
|
|
1240
1240
|
}, getTokenValue2 = function(value, group) {
|
|
1241
1241
|
if (!(value === "unset" || value === "auto")) return getToken2(value, group, !1);
|
|
@@ -1331,7 +1331,7 @@ var require_createVariable_native = __commonJS({
|
|
|
1331
1331
|
}
|
|
1332
1332
|
});
|
|
1333
1333
|
module2.exports = __toCommonJS2(createVariable_exports);
|
|
1334
|
-
var
|
|
1334
|
+
var import_constants = require_index_native2(), import_helpers2 = require_index_native3(), import_config = require_config_native();
|
|
1335
1335
|
function constructCSSVariableName(name) {
|
|
1336
1336
|
return `var(--${process.env.TAMAGUI_CSS_VARIABLE_PREFIX || ""}${name})`;
|
|
1337
1337
|
}
|
|
@@ -1344,12 +1344,12 @@ var require_createVariable_native = __commonJS({
|
|
|
1344
1344
|
key,
|
|
1345
1345
|
name: skipHash ? name : (0, import_helpers2.simpleHash)(name, 40),
|
|
1346
1346
|
val,
|
|
1347
|
-
variable:
|
|
1347
|
+
variable: import_constants.isWeb ? skipHash ? constructCSSVariableName(name) : createCSSVariable(name) : ""
|
|
1348
1348
|
};
|
|
1349
1349
|
};
|
|
1350
1350
|
function variableToString(vrble) {
|
|
1351
1351
|
var getValue = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
|
|
1352
|
-
return isVariable(vrble) ? !getValue &&
|
|
1352
|
+
return isVariable(vrble) ? !getValue && import_constants.isWeb && vrble.variable ? vrble.variable : `${vrble.val}` : `${vrble || ""}`;
|
|
1353
1353
|
}
|
|
1354
1354
|
function isVariable(v) {
|
|
1355
1355
|
return v && typeof v == "object" && "isVar" in v;
|
|
@@ -1465,7 +1465,7 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
1465
1465
|
}
|
|
1466
1466
|
});
|
|
1467
1467
|
module2.exports = __toCommonJS2(insertStyleRule_exports);
|
|
1468
|
-
var
|
|
1468
|
+
var import_constants = require_index_native2(), import_helpers2 = require_index_native3(), import_createVariable = require_createVariable_native(), scannedCache = /* @__PURE__ */ new WeakMap(), totalSelectorsInserted = /* @__PURE__ */ new Map(), allSelectors = {}, allRules = {}, insertedTransforms = {}, getAllSelectors = function() {
|
|
1469
1469
|
return allSelectors;
|
|
1470
1470
|
}, getAllRules = function() {
|
|
1471
1471
|
return Object.values(allRules);
|
|
@@ -1482,7 +1482,7 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
1482
1482
|
if (!insertedTransforms[identifier]) return insertedTransforms[identifier] = value, !0;
|
|
1483
1483
|
}
|
|
1484
1484
|
function listenForSheetChanges() {
|
|
1485
|
-
if (
|
|
1485
|
+
if (import_constants.isClient) {
|
|
1486
1486
|
var mo = new MutationObserver(function(entries) {
|
|
1487
1487
|
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
1488
1488
|
try {
|
|
@@ -1511,7 +1511,7 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
1511
1511
|
var lastScannedSheets = null;
|
|
1512
1512
|
function scanAllSheets() {
|
|
1513
1513
|
var collectThemes = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, tokens = arguments.length > 1 ? arguments[1] : void 0;
|
|
1514
|
-
if (process.env.NODE_ENV !== "test" &&
|
|
1514
|
+
if (process.env.NODE_ENV !== "test" && import_constants.isClient) {
|
|
1515
1515
|
var themes, sheets = document.styleSheets || [], prev = lastScannedSheets, current = new Set(sheets), _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
1516
1516
|
try {
|
|
1517
1517
|
for (var _iterator = current[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
@@ -1707,7 +1707,7 @@ var require_insertStyleRule_native = __commonJS({
|
|
|
1707
1707
|
nonce = _;
|
|
1708
1708
|
}
|
|
1709
1709
|
function insertStyleRules(rulesToInsert) {
|
|
1710
|
-
if (!sheet &&
|
|
1710
|
+
if (!sheet && import_constants.isClient && document.head) {
|
|
1711
1711
|
var styleTag = document.createElement("style");
|
|
1712
1712
|
nonce && (styleTag.nonce = nonce), sheet = document.head.appendChild(styleTag).sheet;
|
|
1713
1713
|
}
|
|
@@ -2009,7 +2009,7 @@ var require_useMedia_native = __commonJS({
|
|
|
2009
2009
|
}
|
|
2010
2010
|
});
|
|
2011
2011
|
module2.exports = __toCommonJS2(useMedia_exports);
|
|
2012
|
-
var
|
|
2012
|
+
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 = (
|
|
2013
2013
|
// development only safeguard
|
|
2014
2014
|
process.env.NODE_ENV === "development" ? new Proxy({}, {
|
|
2015
2015
|
get(target, key) {
|
|
@@ -2065,7 +2065,7 @@ var require_useMedia_native = __commonJS({
|
|
|
2065
2065
|
}
|
|
2066
2066
|
update();
|
|
2067
2067
|
};
|
|
2068
|
-
if (!(
|
|
2068
|
+
if (!(import_constants.isWeb && import_constants.isServer) && !process.env.IS_STATIC && setupVersion !== mediaVersion) {
|
|
2069
2069
|
setupVersion = mediaVersion, unlisten();
|
|
2070
2070
|
for (var key in mediaQueryConfig2) _loop(key);
|
|
2071
2071
|
}
|
|
@@ -2607,7 +2607,7 @@ var require_createStyledContext_native = __commonJS({
|
|
|
2607
2607
|
}
|
|
2608
2608
|
});
|
|
2609
2609
|
module2.exports = __toCommonJS2(createStyledContext_exports);
|
|
2610
|
-
var
|
|
2610
|
+
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"];
|
|
2611
2611
|
function createStyledContext(defaultValues) {
|
|
2612
2612
|
var OGContext = createReactContext(defaultValues), OGProvider = OGContext.Provider, Context = OGContext, scopedContexts = /* @__PURE__ */ new Map();
|
|
2613
2613
|
function getOrCreateScopedContext(scope) {
|
|
@@ -2624,7 +2624,7 @@ var require_createStyledContext_native = __commonJS({
|
|
|
2624
2624
|
}, [
|
|
2625
2625
|
(0, import_objectIdentityKey.objectIdentityKey)(values)
|
|
2626
2626
|
]), Provider22 = OGProvider;
|
|
2627
|
-
return scope && (Provider22 = getOrCreateScopedContext(scope).Provider), /* @__PURE__ */ (0,
|
|
2627
|
+
return scope && (Provider22 = getOrCreateScopedContext(scope).Provider), /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Provider22, {
|
|
2628
2628
|
value: next,
|
|
2629
2629
|
children
|
|
2630
2630
|
});
|
|
@@ -3846,7 +3846,7 @@ var require_expandStyles_native = __commonJS({
|
|
|
3846
3846
|
}
|
|
3847
3847
|
});
|
|
3848
3848
|
module2.exports = __toCommonJS2(expandStyles_exports);
|
|
3849
|
-
var
|
|
3849
|
+
var import_constants = require_index_native2(), import_normalizeShadow = require_normalizeShadow_native();
|
|
3850
3850
|
function fixStyles(style) {
|
|
3851
3851
|
"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));
|
|
3852
3852
|
for (var key in borderDefaults) if (key in style) {
|
|
@@ -3854,7 +3854,7 @@ var require_expandStyles_native = __commonJS({
|
|
|
3854
3854
|
(_style = style)[_borderDefaults_key = borderDefaults[key]] || (_style[_borderDefaults_key] = "solid");
|
|
3855
3855
|
}
|
|
3856
3856
|
}
|
|
3857
|
-
var nativeStyle =
|
|
3857
|
+
var nativeStyle = import_constants.isWeb ? null : "borderStyle", borderDefaults = {
|
|
3858
3858
|
borderWidth: "borderStyle",
|
|
3859
3859
|
borderBottomWidth: nativeStyle || "borderBottomStyle",
|
|
3860
3860
|
borderTopWidth: nativeStyle || "borderTopStyle",
|
|
@@ -3962,13 +3962,13 @@ var require_isActivePlatform_native = __commonJS({
|
|
|
3962
3962
|
}
|
|
3963
3963
|
});
|
|
3964
3964
|
module2.exports = __toCommonJS2(isActivePlatform_exports);
|
|
3965
|
-
var
|
|
3965
|
+
var import_constants = require_index_native2();
|
|
3966
3966
|
function isActivePlatform(key) {
|
|
3967
3967
|
if (!key.startsWith("$platform")) return !0;
|
|
3968
3968
|
var platform = key.slice(10);
|
|
3969
3969
|
return (
|
|
3970
3970
|
// web, ios, android
|
|
3971
|
-
platform ===
|
|
3971
|
+
platform === import_constants.currentPlatform || // web, native
|
|
3972
3972
|
platform === "native"
|
|
3973
3973
|
);
|
|
3974
3974
|
}
|
|
@@ -4127,14 +4127,14 @@ var require_normalizeValueWithProperty_native = __commonJS({
|
|
|
4127
4127
|
}
|
|
4128
4128
|
});
|
|
4129
4129
|
module2.exports = __toCommonJS2(normalizeValueWithProperty_exports);
|
|
4130
|
-
var
|
|
4130
|
+
var import_constants = require_index_native2(), import_helpers2 = require_index_native3(), stylePropsAllPlusTransforms = {
|
|
4131
4131
|
...import_helpers2.stylePropsAll,
|
|
4132
4132
|
translateX: !0,
|
|
4133
4133
|
translateY: !0
|
|
4134
4134
|
};
|
|
4135
4135
|
function normalizeValueWithProperty(value) {
|
|
4136
4136
|
var property = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
|
4137
|
-
if (!
|
|
4137
|
+
if (!import_constants.isWeb || import_helpers2.stylePropsUnitless[property] || property && !stylePropsAllPlusTransforms[property] || typeof value == "boolean") return value;
|
|
4138
4138
|
var res = value;
|
|
4139
4139
|
return value && typeof value == "object" ? value : (typeof value == "number" ? res = `${value}px` : property && (res = `${res}`), res);
|
|
4140
4140
|
}
|
|
@@ -4394,14 +4394,14 @@ var require_expandStyle_native = __commonJS({
|
|
|
4394
4394
|
}
|
|
4395
4395
|
});
|
|
4396
4396
|
module2.exports = __toCommonJS2(expandStyle_exports);
|
|
4397
|
-
var
|
|
4397
|
+
var import_constants = require_index_native2(), import_config = require_config_native(), import_webToNativeProps = require_webToNativeProps_native(), _loop = function(parent2) {
|
|
4398
4398
|
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);
|
|
4399
4399
|
EXPANSIONS[parent2] = EXPANSIONS[parent2].map(function(k) {
|
|
4400
4400
|
return `${prefix}${k}`;
|
|
4401
4401
|
});
|
|
4402
4402
|
};
|
|
4403
4403
|
function expandStyle(key, value) {
|
|
4404
|
-
if (
|
|
4404
|
+
if (import_constants.isAndroid && key === "elevationAndroid") return [
|
|
4405
4405
|
[
|
|
4406
4406
|
"elevation",
|
|
4407
4407
|
value
|
|
@@ -4461,7 +4461,7 @@ var require_expandStyle_native = __commonJS({
|
|
|
4461
4461
|
padding: all,
|
|
4462
4462
|
paddingHorizontal: horiz,
|
|
4463
4463
|
paddingVertical: vert,
|
|
4464
|
-
...
|
|
4464
|
+
...import_constants.isWeb && {
|
|
4465
4465
|
// react-native only supports borderStyle
|
|
4466
4466
|
borderStyle: [
|
|
4467
4467
|
"TopStyle",
|
|
@@ -4884,9 +4884,9 @@ var require_propMapper_native = __commonJS({
|
|
|
4884
4884
|
}
|
|
4885
4885
|
});
|
|
4886
4886
|
module2.exports = __toCommonJS2(propMapper_exports);
|
|
4887
|
-
var
|
|
4887
|
+
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) {
|
|
4888
4888
|
if (disabled) return map(key, value);
|
|
4889
|
-
if (lastFontFamilyToken = null, !(!
|
|
4889
|
+
if (lastFontFamilyToken = null, !(!import_constants.isAndroid && key === "elevationAndroid")) {
|
|
4890
4890
|
var { conf, styleProps, staticConfig } = styleState;
|
|
4891
4891
|
if (value === "unset") {
|
|
4892
4892
|
var _conf_unset, unsetVal = (_conf_unset = conf.unset) === null || _conf_unset === void 0 ? void 0 : _conf_unset[key];
|
|
@@ -5295,7 +5295,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5295
5295
|
}
|
|
5296
5296
|
});
|
|
5297
5297
|
module2.exports = __toCommonJS2(getSplitStyles_exports);
|
|
5298
|
-
var
|
|
5298
|
+
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 = "-";
|
|
5299
5299
|
function isValidStyleKey(key, validStyles2, accept) {
|
|
5300
5300
|
return key in validStyles2 ? !0 : accept && key in accept;
|
|
5301
5301
|
}
|
|
@@ -5316,7 +5316,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5316
5316
|
var valInitType = typeof valInit, isValidStyleKeyInit = isValidStyleKey(keyInit, validStyles2, accept);
|
|
5317
5317
|
if (0) var _viewProps2, _dataSet;
|
|
5318
5318
|
if (!isValidStyleKeyInit) {
|
|
5319
|
-
if (!
|
|
5319
|
+
if (!import_constants.isAndroid && keyInit === "elevationAndroid") return "continue";
|
|
5320
5320
|
if (keyInit === "userSelect") keyInit = "selectable", valInit = valInit !== "none";
|
|
5321
5321
|
else if (keyInit.startsWith("data-")) return "continue";
|
|
5322
5322
|
}
|
|
@@ -5344,7 +5344,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5344
5344
|
isVariant,
|
|
5345
5345
|
valInit,
|
|
5346
5346
|
shouldPassProp
|
|
5347
|
-
}),
|
|
5347
|
+
}), import_constants.isClient && (0, import_log.log)({
|
|
5348
5348
|
variants,
|
|
5349
5349
|
variant: variants == null ? void 0 : variants[keyInit],
|
|
5350
5350
|
isVariant,
|
|
@@ -5364,7 +5364,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5364
5364
|
viewProps[key4] = val2;
|
|
5365
5365
|
return;
|
|
5366
5366
|
}
|
|
5367
|
-
if (!isHOC && isValidStyleKey(key4, validStyles2, accept) ||
|
|
5367
|
+
if (!isHOC && isValidStyleKey(key4, validStyles2, accept) || import_constants.isAndroid && key4 === "elevation") {
|
|
5368
5368
|
mergeStyle(styleState, key4, val2);
|
|
5369
5369
|
return;
|
|
5370
5370
|
}
|
|
@@ -5507,7 +5507,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5507
5507
|
}
|
|
5508
5508
|
var mediaStyle1 = getSubStyle(styleState, key4, val2, !0), importanceBump = 0;
|
|
5509
5509
|
if (isThemeMedia) {
|
|
5510
|
-
if (dynamicThemeAccess = !0,
|
|
5510
|
+
if (dynamicThemeAccess = !0, import_constants.isIos && (0, import_config.getSetting)("fastSchemeChange")) {
|
|
5511
5511
|
var _styleState3;
|
|
5512
5512
|
(_styleState3 = styleState).style || (_styleState3.style = {});
|
|
5513
5513
|
var scheme = mediaKeyShort, oppositeScheme = (0, import_getDynamicVal.getOppositeScheme)(mediaKeyShort);
|
|
@@ -5579,8 +5579,8 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5579
5579
|
};
|
|
5580
5580
|
conf = conf || (0, import_config.getConfig)();
|
|
5581
5581
|
var animationDriver = (componentContext == null ? void 0 : componentContext.animationDriver) || conf.animations;
|
|
5582
|
-
|
|
5583
|
-
var { shorthands } = conf, { isHOC, isText, isInput, variants, isReactNative, inlineProps, inlineWhenUnflattened, parentStaticConfig, acceptsClassName } = staticConfig, viewProps = {}, mediaState2 = styleProps.mediaState || import_useMedia.mediaState, usedKeys = {}, shouldDoClasses = acceptsClassName &&
|
|
5582
|
+
import_constants.isWeb && styleProps.isAnimated && animationDriver.isReactNative && !styleProps.noNormalize && (styleProps.noNormalize = "values");
|
|
5583
|
+
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);
|
|
5584
5584
|
process.env.NODE_ENV === "development" && debug === "profile" && time`split-styles-setup`;
|
|
5585
5585
|
var styleState = {
|
|
5586
5586
|
classNames,
|
|
@@ -5604,7 +5604,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5604
5604
|
}
|
|
5605
5605
|
}));
|
|
5606
5606
|
}
|
|
5607
|
-
process.env.NODE_ENV === "development" && debug === "profile" && time`style-state`, process.env.NODE_ENV === "development" && debug && debug !== "profile" &&
|
|
5607
|
+
process.env.NODE_ENV === "development" && debug === "profile" && time`style-state`, process.env.NODE_ENV === "development" && debug && debug !== "profile" && import_constants.isClient && (console.groupCollapsed("getSplitStyles (collapsed)"), (0, import_log.log)({
|
|
5608
5608
|
props,
|
|
5609
5609
|
staticConfig,
|
|
5610
5610
|
shouldDoClasses,
|
|
@@ -5621,7 +5621,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5621
5621
|
process.env.NODE_ENV === "development" && debug === "profile" && time`split-styles-propsend`;
|
|
5622
5622
|
var avoidNormalize = styleProps.noNormalize === !1;
|
|
5623
5623
|
if (!avoidNormalize) {
|
|
5624
|
-
if (styleState.style && ((0, import_expandStyles.fixStyles)(styleState.style), !styleProps.noExpand && !styleProps.noMergeStyle &&
|
|
5624
|
+
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) {
|
|
5625
5625
|
var _styleState;
|
|
5626
5626
|
(_styleState = styleState).style || (_styleState.style = {}), mergeFlatTransforms(styleState.style, styleState.flatTransforms);
|
|
5627
5627
|
}
|
|
@@ -5730,7 +5730,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5730
5730
|
var _styleState;
|
|
5731
5731
|
(_styleState = styleState).flatTransforms || (_styleState.flatTransforms = {}), styleState.flatTransforms[key] = val;
|
|
5732
5732
|
} else {
|
|
5733
|
-
var shouldNormalize =
|
|
5733
|
+
var shouldNormalize = import_constants.isWeb && !disableNormalize && !styleProps.noNormalize, out = shouldNormalize ? (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(val, key) : val;
|
|
5734
5734
|
if (
|
|
5735
5735
|
// accept is for props not styles
|
|
5736
5736
|
staticConfig.accept && key in staticConfig.accept
|
|
@@ -5767,7 +5767,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5767
5767
|
styleState.flatTransforms && mergeFlatTransforms(styleOut, styleState.flatTransforms);
|
|
5768
5768
|
}
|
|
5769
5769
|
return styleProps.noNormalize || (0, import_expandStyles.fixStyles)(styleOut), styleOut;
|
|
5770
|
-
}, useInsertEffectCompat =
|
|
5770
|
+
}, useInsertEffectCompat = import_constants.isWeb ? import_react3.default.useInsertionEffect || import_constants.useIsomorphicLayoutEffect : function() {
|
|
5771
5771
|
}, useSplitStyles = function(a, b, c, d, e, f, g, h, i, j, k) {
|
|
5772
5772
|
var res = getSplitStyles(a, b, c, d, e, f, g, h, i, j, k);
|
|
5773
5773
|
return res;
|
|
@@ -5831,7 +5831,7 @@ var require_getSplitStyles_native = __commonJS({
|
|
|
5831
5831
|
var val = style[key];
|
|
5832
5832
|
key in import_helpers2.stylePropsTransform ? mergeTransform(out, key, val) : out[key] = (0, import_normalizeValueWithProperty.normalizeValueWithProperty)(val, key);
|
|
5833
5833
|
}
|
|
5834
|
-
return
|
|
5834
|
+
return import_constants.isWeb && Array.isArray(out.transform) && (out.transform = (0, import_transformsToString.transformsToString)(out.transform)), (0, import_expandStyles.fixStyles)(out), out;
|
|
5835
5835
|
}
|
|
5836
5836
|
function applyDefaultStyle(pkey, styleState) {
|
|
5837
5837
|
var defaultValues = animatableDefaults[pkey];
|
|
@@ -5956,9 +5956,9 @@ var require_setElementProps_native = __commonJS({
|
|
|
5956
5956
|
}
|
|
5957
5957
|
});
|
|
5958
5958
|
|
|
5959
|
-
//
|
|
5960
|
-
var
|
|
5961
|
-
"
|
|
5959
|
+
// ../../packages/is-equal-shallow/dist/cjs/index.native.js
|
|
5960
|
+
var require_index_native6 = __commonJS({
|
|
5961
|
+
"../../packages/is-equal-shallow/dist/cjs/index.native.js"(exports2, module2) {
|
|
5962
5962
|
"use strict";
|
|
5963
5963
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
5964
5964
|
for (var name in all) __defProp2(target, name, {
|
|
@@ -5992,10 +5992,10 @@ var require_useCreateShallowSetState_native = __commonJS({
|
|
|
5992
5992
|
return __copyProps2(__defProp2({}, "__esModule", {
|
|
5993
5993
|
value: !0
|
|
5994
5994
|
}), mod);
|
|
5995
|
-
},
|
|
5996
|
-
__export2(
|
|
5995
|
+
}, index_exports2 = {};
|
|
5996
|
+
__export2(index_exports2, {
|
|
5997
5997
|
isEqualShallow: function() {
|
|
5998
|
-
return
|
|
5998
|
+
return isEqualShallow;
|
|
5999
5999
|
},
|
|
6000
6000
|
mergeIfNotShallowEqual: function() {
|
|
6001
6001
|
return mergeIfNotShallowEqual;
|
|
@@ -6004,7 +6004,7 @@ var require_useCreateShallowSetState_native = __commonJS({
|
|
|
6004
6004
|
return useCreateShallowSetState;
|
|
6005
6005
|
}
|
|
6006
6006
|
});
|
|
6007
|
-
module2.exports = __toCommonJS2(
|
|
6007
|
+
module2.exports = __toCommonJS2(index_exports2);
|
|
6008
6008
|
var import_react3 = require("react");
|
|
6009
6009
|
function useCreateShallowSetState(setter, debugIn) {
|
|
6010
6010
|
return (0, import_react3.useCallback)(function(next) {
|
|
@@ -6017,7 +6017,7 @@ var require_useCreateShallowSetState_native = __commonJS({
|
|
|
6017
6017
|
]);
|
|
6018
6018
|
}
|
|
6019
6019
|
function mergeIfNotShallowEqual(prev, next, debug) {
|
|
6020
|
-
if (!prev || !next ||
|
|
6020
|
+
if (!prev || !next || isEqualShallow(prev, next)) return prev || next;
|
|
6021
6021
|
if (process.env.NODE_ENV === "development" && debug && (console.info("setStateShallow CHANGE", {
|
|
6022
6022
|
prev,
|
|
6023
6023
|
next
|
|
@@ -6027,7 +6027,7 @@ var require_useCreateShallowSetState_native = __commonJS({
|
|
|
6027
6027
|
...next
|
|
6028
6028
|
};
|
|
6029
6029
|
}
|
|
6030
|
-
function
|
|
6030
|
+
function isEqualShallow(prev, next) {
|
|
6031
6031
|
for (var key in next) if (prev[key] !== next[key]) return !1;
|
|
6032
6032
|
return !0;
|
|
6033
6033
|
}
|
|
@@ -6077,7 +6077,7 @@ var require_subscribeToContextGroup_native = __commonJS({
|
|
|
6077
6077
|
}
|
|
6078
6078
|
});
|
|
6079
6079
|
module2.exports = __toCommonJS2(subscribeToContextGroup_exports);
|
|
6080
|
-
var import_useMedia = require_useMedia_native(),
|
|
6080
|
+
var import_useMedia = require_useMedia_native(), import_is_equal_shallow = require_index_native6(), subscribeToContextGroup = function(param) {
|
|
6081
6081
|
var { setStateShallow, pseudoGroups, mediaGroups, componentContext, state } = param;
|
|
6082
6082
|
if (pseudoGroups || mediaGroups) {
|
|
6083
6083
|
var _componentContext_groups_subscribe, _componentContext_groups;
|
|
@@ -6088,7 +6088,7 @@ var require_subscribeToContextGroup_native = __commonJS({
|
|
|
6088
6088
|
};
|
|
6089
6089
|
if (pseudo && pseudoGroups != null && pseudoGroups.has(String(name))) Object.assign(current.pseudo, pseudo), persist();
|
|
6090
6090
|
else if (layout && mediaGroups) {
|
|
6091
|
-
var mediaState2 = (0, import_useMedia.getMediaState)(mediaGroups, layout), next = (0,
|
|
6091
|
+
var mediaState2 = (0, import_useMedia.getMediaState)(mediaGroups, layout), next = (0, import_is_equal_shallow.mergeIfNotShallowEqual)(current.media || {}, mediaState2);
|
|
6092
6092
|
next !== current.media && (Object.assign(current.media, next), persist());
|
|
6093
6093
|
}
|
|
6094
6094
|
function persist() {
|
|
@@ -6164,7 +6164,7 @@ var require_useThemeState_native = __commonJS({
|
|
|
6164
6164
|
}
|
|
6165
6165
|
});
|
|
6166
6166
|
module2.exports = __toCommonJS2(useThemeState_exports);
|
|
6167
|
-
var
|
|
6167
|
+
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() {
|
|
6168
6168
|
cacheVersion++, shouldForce = !0, allListeners.forEach(function(cb) {
|
|
6169
6169
|
return cb();
|
|
6170
6170
|
});
|
|
@@ -6174,7 +6174,7 @@ var require_useThemeState_native = __commonJS({
|
|
|
6174
6174
|
return rootThemeState;
|
|
6175
6175
|
}, useThemeState = function(props) {
|
|
6176
6176
|
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);
|
|
6177
|
-
if (!parentId && !isRoot) throw new Error(
|
|
6177
|
+
if (!parentId && !isRoot) throw new Error(import_constants2.MISSING_THEME_MESSAGE);
|
|
6178
6178
|
if (disable) return states.get(parentId) || {
|
|
6179
6179
|
id: "",
|
|
6180
6180
|
name: "light",
|
|
@@ -6207,7 +6207,7 @@ var require_useThemeState_native = __commonJS({
|
|
|
6207
6207
|
};
|
|
6208
6208
|
process.env.NODE_ENV === "development" && globalThis.time && globalThis.time`theme-prep-uses`;
|
|
6209
6209
|
var state = (0, import_react3.useSyncExternalStore)(subscribe, getSnapshot, getSnapshot);
|
|
6210
|
-
return (0,
|
|
6210
|
+
return (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
6211
6211
|
if (!HasRenderedOnce.get(keys)) {
|
|
6212
6212
|
HasRenderedOnce.set(keys, !0);
|
|
6213
6213
|
return;
|
|
@@ -6242,7 +6242,7 @@ var require_useThemeState_native = __commonJS({
|
|
|
6242
6242
|
];
|
|
6243
6243
|
if (!name) {
|
|
6244
6244
|
var next = lastState ?? parentState;
|
|
6245
|
-
if (!next) throw new Error(
|
|
6245
|
+
if (!next) throw new Error(import_constants2.MISSING_THEME_MESSAGE);
|
|
6246
6246
|
if (shouldRerender) {
|
|
6247
6247
|
var updated = {
|
|
6248
6248
|
...parentState || lastState
|
|
@@ -6468,7 +6468,7 @@ var require_getThemeProxied_native = __commonJS({
|
|
|
6468
6468
|
}
|
|
6469
6469
|
});
|
|
6470
6470
|
module2.exports = __toCommonJS2(getThemeProxied_exports);
|
|
6471
|
-
var
|
|
6471
|
+
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 = {};
|
|
6472
6472
|
function getThemeProxied(_props, _state, _keys) {
|
|
6473
6473
|
if (!(_state != null && _state.theme)) return emptyObject;
|
|
6474
6474
|
if (curKeys = _keys, curProps = _props, curState = _state, cache.has(curState.theme)) {
|
|
@@ -6487,7 +6487,7 @@ var require_getThemeProxied_native = __commonJS({
|
|
|
6487
6487
|
},
|
|
6488
6488
|
get(platform) {
|
|
6489
6489
|
if (curState) {
|
|
6490
|
-
var outVal = (0, import_createVariable.getVariable)(value), { name, scheme, inverses } = curState, shouldOptimize = scheme && platform !== "web" &&
|
|
6490
|
+
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)();
|
|
6491
6491
|
if (shouldOptimize) {
|
|
6492
6492
|
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)({
|
|
6493
6493
|
scheme,
|
|
@@ -6498,7 +6498,7 @@ var require_getThemeProxied_native = __commonJS({
|
|
|
6498
6498
|
}
|
|
6499
6499
|
return process.env.NODE_ENV === "development" && curProps.debug && console.info(` \u{1F3A8} useTheme() tracking new key because of:
|
|
6500
6500
|
not web: ${platform !== "web"}
|
|
6501
|
-
isIOS: ${
|
|
6501
|
+
isIOS: ${import_constants.isIos}
|
|
6502
6502
|
deopt: ${curProps.deopt}
|
|
6503
6503
|
fastScheme: ${(0, import_config.getSetting)("fastSchemeChange")}
|
|
6504
6504
|
`), track(key), outVal;
|
|
@@ -6693,7 +6693,7 @@ var require_Theme_native = __commonJS({
|
|
|
6693
6693
|
}
|
|
6694
6694
|
});
|
|
6695
6695
|
module2.exports = __toCommonJS2(Theme_exports);
|
|
6696
|
-
var
|
|
6696
|
+
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 = {
|
|
6697
6697
|
className: "",
|
|
6698
6698
|
style: {}
|
|
6699
6699
|
}, Theme = /* @__PURE__ */ (0, import_react3.forwardRef)(function(props, ref) {
|
|
@@ -6717,12 +6717,12 @@ var require_Theme_native = __commonJS({
|
|
|
6717
6717
|
Theme.avoidForwardRef = !0;
|
|
6718
6718
|
function getThemedChildren(themeState, children, props) {
|
|
6719
6719
|
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);
|
|
6720
|
-
if (process.env.NODE_ENV === "development" && props.debug === "visualize" && (children = /* @__PURE__ */ (0,
|
|
6720
|
+
if (process.env.NODE_ENV === "development" && props.debug === "visualize" && (children = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ThemeDebug.ThemeDebug, {
|
|
6721
6721
|
themeState,
|
|
6722
6722
|
themeProps: props,
|
|
6723
6723
|
children
|
|
6724
6724
|
})), !shouldRenderChildrenWithTheme) return children;
|
|
6725
|
-
children = /* @__PURE__ */ (0,
|
|
6725
|
+
children = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_useThemeState.ThemeStateContext.Provider, {
|
|
6726
6726
|
value: themeState.id,
|
|
6727
6727
|
children
|
|
6728
6728
|
});
|
|
@@ -6733,7 +6733,7 @@ var require_Theme_native = __commonJS({
|
|
|
6733
6733
|
var parentState = (0, import_useThemeState.getThemeState)(themeState.isNew ? themeState.id : themeState.parentId);
|
|
6734
6734
|
if (!parentState) throw new Error("\u203C\uFE0F010");
|
|
6735
6735
|
children = import_react3.Children.toArray(children).map(function(child) {
|
|
6736
|
-
return /* @__PURE__ */ (0, import_react3.isValidElement)(child) ? /* @__PURE__ */ (0, import_react3.cloneElement)(child, void 0, /* @__PURE__ */ (0,
|
|
6736
|
+
return /* @__PURE__ */ (0, import_react3.isValidElement)(child) ? /* @__PURE__ */ (0, import_react3.cloneElement)(child, void 0, /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Theme, {
|
|
6737
6737
|
name: parentState.name,
|
|
6738
6738
|
children: child.props.children
|
|
6739
6739
|
})) : child;
|
|
@@ -6746,15 +6746,15 @@ var require_Theme_native = __commonJS({
|
|
|
6746
6746
|
state,
|
|
6747
6747
|
...getThemeClassNameAndStyle(themeState, props, isRoot)
|
|
6748
6748
|
}), forceClassName === !1) return children;
|
|
6749
|
-
if (
|
|
6749
|
+
if (import_constants.isWeb) {
|
|
6750
6750
|
var { className, style } = getThemeClassNameAndStyle(themeState, props, isRoot);
|
|
6751
|
-
if (children = /* @__PURE__ */ (0,
|
|
6751
|
+
if (children = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", {
|
|
6752
6752
|
className: `${className} _dsp_contents is_Theme`,
|
|
6753
6753
|
style,
|
|
6754
6754
|
children
|
|
6755
6755
|
}), state.hasEverThemed === "wrapped") {
|
|
6756
6756
|
var className1 = requiresExtraWrapper ? `${isInverse ? name.startsWith("light") ? "t_light is_inversed" : name.startsWith("dark") ? "t_dark is_inversed" : "" : ""} _dsp_contents` : "_dsp_contents";
|
|
6757
|
-
children = /* @__PURE__ */ (0,
|
|
6757
|
+
children = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", {
|
|
6758
6758
|
className: className1,
|
|
6759
6759
|
children
|
|
6760
6760
|
});
|
|
@@ -6833,7 +6833,7 @@ var require_themeable_native = __commonJS({
|
|
|
6833
6833
|
}
|
|
6834
6834
|
});
|
|
6835
6835
|
module2.exports = __toCommonJS2(themeable_exports);
|
|
6836
|
-
var
|
|
6836
|
+
var import_jsx_runtime2 = require("react/jsx-runtime"), import_react3 = __toESM2(require("react")), import_Theme = require_Theme_native();
|
|
6837
6837
|
function themeable(Component, staticConfig) {
|
|
6838
6838
|
var optimize = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1, withThemeComponent = /* @__PURE__ */ import_react3.default.forwardRef(function(props, ref) {
|
|
6839
6839
|
var { themeInverse, theme, componentName, themeReset, ...rest } = props, overriddenContextProps, context = staticConfig == null ? void 0 : staticConfig.context;
|
|
@@ -6843,21 +6843,21 @@ var require_themeable_native = __commonJS({
|
|
|
6843
6843
|
}
|
|
6844
6844
|
var element = (
|
|
6845
6845
|
// @ts-expect-error its ok
|
|
6846
|
-
/* @__PURE__ */ (0,
|
|
6846
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Component, {
|
|
6847
6847
|
ref,
|
|
6848
6848
|
...rest,
|
|
6849
6849
|
"data-disable-theme": !0
|
|
6850
6850
|
})
|
|
6851
6851
|
), filteredProps = null, compName = componentName || (staticConfig == null ? void 0 : staticConfig.componentName);
|
|
6852
6852
|
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;
|
|
6853
|
-
var contents = /* @__PURE__ */ (0,
|
|
6853
|
+
var contents = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_Theme.Theme, {
|
|
6854
6854
|
"disable-child-theme": !0,
|
|
6855
6855
|
...filteredProps,
|
|
6856
6856
|
children: element
|
|
6857
6857
|
});
|
|
6858
6858
|
if (context) {
|
|
6859
6859
|
var Provider = context.Provider, contextValue = import_react3.default.useContext(context);
|
|
6860
|
-
contents = /* @__PURE__ */ (0,
|
|
6860
|
+
contents = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Provider, {
|
|
6861
6861
|
...contextValue,
|
|
6862
6862
|
...overriddenContextProps,
|
|
6863
6863
|
children: contents
|
|
@@ -6913,9 +6913,9 @@ var require_wrapStyleTags_native = __commonJS({
|
|
|
6913
6913
|
}
|
|
6914
6914
|
});
|
|
6915
6915
|
module2.exports = __toCommonJS2(wrapStyleTags_exports);
|
|
6916
|
-
var
|
|
6916
|
+
var import_jsx_runtime2 = require("react/jsx-runtime"), import_helpers2 = require_index_native3(), import_constants = require_index_native2();
|
|
6917
6917
|
function wrapStyleTags(styles, content) {
|
|
6918
|
-
return
|
|
6918
|
+
return import_constants.IS_REACT_19, content;
|
|
6919
6919
|
}
|
|
6920
6920
|
}
|
|
6921
6921
|
});
|
|
@@ -6966,9 +6966,9 @@ var require_ClientOnly_native = __commonJS({
|
|
|
6966
6966
|
}
|
|
6967
6967
|
});
|
|
6968
6968
|
module2.exports = __toCommonJS2(ClientOnly_exports);
|
|
6969
|
-
var
|
|
6969
|
+
var import_jsx_runtime2 = require("react/jsx-runtime"), import_react3 = require("react"), ClientOnlyContext2 = /* @__PURE__ */ (0, import_react3.createContext)(!1), ClientOnly2 = function(param) {
|
|
6970
6970
|
var { children } = param;
|
|
6971
|
-
return /* @__PURE__ */ (0,
|
|
6971
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ClientOnlyContext2.Provider, {
|
|
6972
6972
|
value: !0,
|
|
6973
6973
|
children
|
|
6974
6974
|
});
|
|
@@ -6977,7 +6977,7 @@ var require_ClientOnly_native = __commonJS({
|
|
|
6977
6977
|
});
|
|
6978
6978
|
|
|
6979
6979
|
// ../use-did-finish-ssr/dist/cjs/index.native.js
|
|
6980
|
-
var
|
|
6980
|
+
var require_index_native7 = __commonJS({
|
|
6981
6981
|
"../use-did-finish-ssr/dist/cjs/index.native.js"(exports2, module2) {
|
|
6982
6982
|
"use strict";
|
|
6983
6983
|
var __create2 = Object.create, __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __getProtoOf2 = Object.getPrototypeOf, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
@@ -7100,15 +7100,15 @@ var require_useComponentState_native = __commonJS({
|
|
|
7100
7100
|
}
|
|
7101
7101
|
});
|
|
7102
7102
|
module2.exports = __toCommonJS2(useComponentState_exports);
|
|
7103
|
-
var
|
|
7104
|
-
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)(
|
|
7103
|
+
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) {
|
|
7104
|
+
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);
|
|
7105
7105
|
stateRef.current || (stateRef.current = {});
|
|
7106
7106
|
var hasAnimationProp = !!("animation" in props || props.style && hasAnimatedStyleValue(props.style)), supportsCSSVars = animationDriver == null ? void 0 : animationDriver.supportsCSSVars, curStateRef = stateRef.current;
|
|
7107
7107
|
!needsHydration && hasAnimationProp && (curStateRef.hasAnimated = !0);
|
|
7108
7108
|
var willBeAnimatedClient = function() {
|
|
7109
7109
|
var next = !!(hasAnimationProp && !staticConfig.isHOC && useAnimations);
|
|
7110
7110
|
return !!(next || curStateRef.hasAnimated);
|
|
7111
|
-
}(), willBeAnimated = !
|
|
7111
|
+
}(), willBeAnimated = !import_constants.isServer && willBeAnimatedClient;
|
|
7112
7112
|
willBeAnimated && !curStateRef.hasAnimated && (curStateRef.hasAnimated = !0);
|
|
7113
7113
|
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
|
|
7114
7114
|
// this is just for a better ux, supports css variables for light/dark, media queries, etc
|
|
@@ -7125,12 +7125,12 @@ var require_useComponentState_native = __commonJS({
|
|
|
7125
7125
|
...states[0],
|
|
7126
7126
|
[props.forceStyle]: !0
|
|
7127
7127
|
} : states[0], setState = states[1], isAnimated = willBeAnimated;
|
|
7128
|
-
|
|
7128
|
+
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(_) {
|
|
7129
7129
|
return {
|
|
7130
7130
|
...state
|
|
7131
7131
|
};
|
|
7132
7132
|
}));
|
|
7133
|
-
var groupName = props.group, setStateShallow = (0,
|
|
7133
|
+
var groupName = props.group, setStateShallow = (0, import_is_equal_shallow.useCreateShallowSetState)(setState, props.debug);
|
|
7134
7134
|
if (presenceState && isAnimated && isHydrated && staticConfig.variants) {
|
|
7135
7135
|
process.env.NODE_ENV === "development" && props.debug === "verbose" && console.warn(`has presenceState ${JSON.stringify(presenceState)}`);
|
|
7136
7136
|
var { enterVariant, exitVariant, enterExitVariant, custom } = presenceState;
|
|
@@ -7138,8 +7138,8 @@ var require_useComponentState_native = __commonJS({
|
|
|
7138
7138
|
var exv = exitVariant ?? enterExitVariant, env = enterVariant ?? enterExitVariant;
|
|
7139
7139
|
state.unmounted && env && staticConfig.variants[env] ? (process.env.NODE_ENV === "development" && props.debug === "verbose" && console.warn(`Animating presence ENTER "${env}"`), props[env] = !0) : isExiting && exv && (process.env.NODE_ENV === "development" && props.debug === "verbose" && console.warn(`Animating presence EXIT "${exv}"`), props[exv] = exitVariant !== enterExitVariant);
|
|
7140
7140
|
}
|
|
7141
|
-
var noClass = !
|
|
7142
|
-
if (
|
|
7141
|
+
var noClass = !import_constants.isWeb || !!props.forceStyle || isAnimated && (animationDriver == null ? void 0 : animationDriver.needsWebStyles);
|
|
7142
|
+
if (import_constants.isWeb && (!import_constants.isServer || isHydrated)) {
|
|
7143
7143
|
var isAnimatedAndHydrated = isAnimated && !supportsCSSVars, isClassNameDisabled = !staticConfig.acceptsClassName && (config.disableSSR || !state.unmounted), isDisabledManually = disableClassName && !state.unmounted;
|
|
7144
7144
|
(isAnimatedAndHydrated || isDisabledManually || isClassNameDisabled) && (noClass = !0, process.env.NODE_ENV === "development" && props.debug && (0, import_log.log)("avoiding className", {
|
|
7145
7145
|
isAnimatedAndHydrated,
|
|
@@ -7321,7 +7321,7 @@ var require_Slot_native = __commonJS({
|
|
|
7321
7321
|
}
|
|
7322
7322
|
});
|
|
7323
7323
|
module2.exports = __toCommonJS2(Slot_exports);
|
|
7324
|
-
var
|
|
7324
|
+
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) {
|
|
7325
7325
|
var { children, ...slotProps } = props;
|
|
7326
7326
|
if (/* @__PURE__ */ (0, import_react3.isValidElement)(children)) {
|
|
7327
7327
|
var mergedProps = mergeSlotProps(children, slotProps);
|
|
@@ -7333,12 +7333,12 @@ var require_Slot_native = __commonJS({
|
|
|
7333
7333
|
return import_react3.Children.count(children) > 1 ? import_react3.Children.only(null) : null;
|
|
7334
7334
|
})), Slottable = function(param) {
|
|
7335
7335
|
var { children } = param;
|
|
7336
|
-
return /* @__PURE__ */ (0,
|
|
7336
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, {
|
|
7337
7337
|
children
|
|
7338
7338
|
});
|
|
7339
7339
|
};
|
|
7340
7340
|
Slottable.displayName = "Slottable";
|
|
7341
|
-
var pressMap =
|
|
7341
|
+
var pressMap = import_constants.isWeb ? {
|
|
7342
7342
|
onPress: "onClick",
|
|
7343
7343
|
onPressOut: "onMouseUp",
|
|
7344
7344
|
onPressIn: "onMouseDown"
|
|
@@ -7436,8 +7436,8 @@ var require_createComponent_native = __commonJS({
|
|
|
7436
7436
|
}
|
|
7437
7437
|
});
|
|
7438
7438
|
module2.exports = __toCommonJS2(createComponent_exports);
|
|
7439
|
-
var
|
|
7440
|
-
typeof
|
|
7439
|
+
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(), time2, debugKeyListeners, startVisualizer, componentSetStates = /* @__PURE__ */ new Set();
|
|
7440
|
+
typeof window < "u" && (cancelTouches = function() {
|
|
7441
7441
|
componentSetStates.forEach(function(setState) {
|
|
7442
7442
|
return setState(function(prev) {
|
|
7443
7443
|
return prev.press || prev.pressIn ? {
|
|
@@ -7450,33 +7450,34 @@ var require_createComponent_native = __commonJS({
|
|
|
7450
7450
|
}, addEventListener("mouseup", cancelTouches), addEventListener("touchend", cancelTouches), addEventListener("touchcancel", cancelTouches), process.env.NODE_ENV === "development" && (startVisualizer = function() {
|
|
7451
7451
|
var devVisualizerConfig = import_config.devConfig === null || import_config.devConfig === void 0 ? void 0 : import_config.devConfig.visualizer;
|
|
7452
7452
|
if (devVisualizerConfig) {
|
|
7453
|
+
var show2 = function(val) {
|
|
7454
|
+
clearTimeout(tm), isShowing = val, debugKeyListeners == null || debugKeyListeners.forEach(function(l) {
|
|
7455
|
+
return l(val);
|
|
7456
|
+
});
|
|
7457
|
+
}, show = show2;
|
|
7453
7458
|
debugKeyListeners = /* @__PURE__ */ new Set();
|
|
7454
7459
|
var tm, isShowing = !1, options = {
|
|
7455
7460
|
key: "Alt",
|
|
7456
7461
|
delay: 800,
|
|
7457
7462
|
...typeof devVisualizerConfig == "object" ? devVisualizerConfig : {}
|
|
7458
7463
|
};
|
|
7459
|
-
|
|
7460
|
-
|
|
7461
|
-
}),
|
|
7464
|
+
window.addEventListener("blur", function() {
|
|
7465
|
+
show2(!1);
|
|
7466
|
+
}), window.addEventListener("keydown", function(param) {
|
|
7462
7467
|
var { key, defaultPrevented } = param;
|
|
7463
7468
|
defaultPrevented || (clearTimeout(tm), key === options.key && (tm = setTimeout(function() {
|
|
7464
|
-
|
|
7465
|
-
return l(!0);
|
|
7466
|
-
});
|
|
7469
|
+
show2(!0);
|
|
7467
7470
|
}, options.delay)));
|
|
7468
|
-
}),
|
|
7471
|
+
}), window.addEventListener("keyup", function(param) {
|
|
7469
7472
|
var { key, defaultPrevented } = param;
|
|
7470
|
-
defaultPrevented || key === options.key &&
|
|
7471
|
-
return l(!1);
|
|
7472
|
-
})));
|
|
7473
|
+
defaultPrevented || key === options.key && isShowing && show2(!1);
|
|
7473
7474
|
});
|
|
7474
7475
|
}
|
|
7475
7476
|
}));
|
|
7476
7477
|
var cancelTouches, BaseText, BaseView, hasSetupBaseViews = !1, lastInteractionWasKeyboard = {
|
|
7477
7478
|
value: !1
|
|
7478
7479
|
};
|
|
7479
|
-
|
|
7480
|
+
import_constants.isWeb && globalThis.document && (document.addEventListener("keydown", function() {
|
|
7480
7481
|
lastInteractionWasKeyboard.value = !0;
|
|
7481
7482
|
}), document.addEventListener("mousedown", function() {
|
|
7482
7483
|
lastInteractionWasKeyboard.value = !1;
|
|
@@ -7535,7 +7536,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7535
7536
|
} : defaultProps, props = propsIn;
|
|
7536
7537
|
curDefaultProps && (props = (0, import_mergeProps.mergeProps)(curDefaultProps, propsIn));
|
|
7537
7538
|
var componentName2 = props.componentName || staticConfig.componentName;
|
|
7538
|
-
process.env.NODE_ENV === "development" &&
|
|
7539
|
+
process.env.NODE_ENV === "development" && import_constants.isClient && import_react3.default.useEffect(function() {
|
|
7539
7540
|
var overlay = null, debugVisualizerHandler = function() {
|
|
7540
7541
|
var show = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : !1, node = curStateRef.host;
|
|
7541
7542
|
if (node) if (show) {
|
|
@@ -7552,7 +7553,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7552
7553
|
]);
|
|
7553
7554
|
var 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;
|
|
7554
7555
|
process.env.NODE_ENV === "development" && time2 && time2`use-state`;
|
|
7555
|
-
var hasTextAncestor = !!(
|
|
7556
|
+
var 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;
|
|
7556
7557
|
animationDriver && isAnimated && // this should really be behind another prop as it's not really related to
|
|
7557
7558
|
// "needsWebStyles" basically with motion we just animate a plain div, but
|
|
7558
7559
|
// we still have animated.View/Text for Sheet which wants to control
|
|
@@ -7570,10 +7571,10 @@ var require_createComponent_native = __commonJS({
|
|
|
7570
7571
|
return !!stateRef.current.isListeningToTheme;
|
|
7571
7572
|
}), themeStateProps.deopt = willBeAnimated, process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile") {
|
|
7572
7573
|
var name = `${componentName2 || (Component == null ? void 0 : Component.displayName) || (Component == null ? void 0 : Component.name) || "[Unnamed Component]"}`, type = (hasEnterStyle ? "(hasEnter)" : " ") + (isAnimated ? "(animated)" : " ") + (isReactNative ? "(rnw)" : " ") + (noClass ? "(noClass)" : " ") + (state.press || state.pressIn ? "(PRESSED)" : " ") + (state.hover ? "(HOVERED)" : " ") + (state.focus ? "(FOCUSED)" : " ") + (state.focusWithin ? "(WITHIN FOCUSED)" : " ") + ((presenceState == null ? void 0 : presenceState.isPresent) === !1 ? "(EXIT)" : ""), dataIs = propsIn["data-is"] || "", banner = `<${name} /> ${internalID} ${dataIs ? ` ${dataIs}` : ""} ${type.trim()}`;
|
|
7573
|
-
if (console.info(`%c ${banner} (hydrated: ${isHydrated}) (unmounted: ${state.unmounted})`, "background: green; color: white;"),
|
|
7574
|
+
if (console.info(`%c ${banner} (hydrated: ${isHydrated}) (unmounted: ${state.unmounted})`, "background: green; color: white;"), import_constants.isServer) (0, import_log.log)({
|
|
7574
7575
|
noClass,
|
|
7575
7576
|
isAnimated,
|
|
7576
|
-
isWeb:
|
|
7577
|
+
isWeb: import_constants.isWeb,
|
|
7577
7578
|
supportsCSSVars
|
|
7578
7579
|
});
|
|
7579
7580
|
else {
|
|
@@ -7671,7 +7672,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7671
7672
|
var animationStyles, shouldUseAnimation = (
|
|
7672
7673
|
// if it supports css vars we run it on server too to get matching initial style
|
|
7673
7674
|
(supportsCSSVars ? willBeAnimatedClient : willBeAnimated) && useAnimations && !isHOC
|
|
7674
|
-
);
|
|
7675
|
+
), animatedRef;
|
|
7675
7676
|
if (shouldUseAnimation) {
|
|
7676
7677
|
var useStyleEmitter = animationDriver != null && animationDriver.avoidReRenders ? function(listener) {
|
|
7677
7678
|
stateRef.current.useStyleListener = listener;
|
|
@@ -7690,7 +7691,7 @@ var require_createComponent_native = __commonJS({
|
|
|
7690
7691
|
staticConfig,
|
|
7691
7692
|
stateRef
|
|
7692
7693
|
});
|
|
7693
|
-
animations && (animationStyles = animations.style, viewProps.style = animationStyles, animations.className && (viewProps.className = `${state.unmounted === "should-enter" ? "t_unmounted " : ""}${viewProps.className || ""} ${animations.className}`)), process.env.NODE_ENV === "development" && time2 && time2`animations`;
|
|
7694
|
+
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)), process.env.NODE_ENV === "development" && time2 && time2`animations`;
|
|
7694
7695
|
}
|
|
7695
7696
|
process.env.NODE_ENV === "development" && props.untilMeasured && !props.group && console.warn(`You set the untilMeasured prop without setting group. This doesn't work, be sure to set untilMeasured on the parent that sets group, not the children that use the $group- prop.
|
|
7696
7697
|
|
|
@@ -7705,7 +7706,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7705
7706
|
}), stateRef.current.hasMeasured = !0;
|
|
7706
7707
|
})), 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) {
|
|
7707
7708
|
return stateRef.current.host = x;
|
|
7708
|
-
}, forwardedRef, import_setElementProps.setElementProps)), viewProps.ref = curStateRef.composedRef, process.env.NODE_ENV === "development" && !isReactNative && !isText &&
|
|
7709
|
+
}, forwardedRef, import_setElementProps.setElementProps, animatedRef)), viewProps.ref = curStateRef.composedRef, process.env.NODE_ENV === "development" && !isReactNative && !isText && import_constants.isWeb && !isHOC && import_react3.default.Children.toArray(props.children).forEach(function(item) {
|
|
7709
7710
|
typeof item == "string" && item !== `
|
|
7710
7711
|
` && console.error(`Unexpected text node: ${item}. A text node cannot be a child of a <${staticConfig.componentName || propsIn.tag || "View"}>.`, props);
|
|
7711
7712
|
}), process.env.NODE_ENV === "development" && time2 && time2`events-hooks`;
|
|
@@ -7715,7 +7716,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7715
7716
|
pressIn: !1
|
|
7716
7717
|
});
|
|
7717
7718
|
};
|
|
7718
|
-
process.env.NODE_ENV === "development" &&
|
|
7719
|
+
process.env.NODE_ENV === "development" && import_constants.isWeb && (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
7719
7720
|
if (debugProp === "verbose") {
|
|
7720
7721
|
var cssStyleDeclarationToObject2 = function(style) {
|
|
7721
7722
|
for (var styleObject = {}, i = 0; i < style.length; i++) {
|
|
@@ -7726,7 +7727,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7726
7727
|
}, cssStyleDeclarationToObject = cssStyleDeclarationToObject2, computed = cssStyleDeclarationToObject2(getComputedStyle(stateRef.current.host));
|
|
7727
7728
|
console.groupCollapsed(`Rendered > (opacity: ${computed.opacity})`), console.warn(stateRef.current.host), console.warn(computed), console.groupEnd();
|
|
7728
7729
|
}
|
|
7729
|
-
}), (0,
|
|
7730
|
+
}), (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
7730
7731
|
if (state.unmounted === !0 && hasEnterStyle) {
|
|
7731
7732
|
setStateShallow({
|
|
7732
7733
|
unmounted: "should-enter"
|
|
@@ -7736,7 +7737,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7736
7737
|
var tm;
|
|
7737
7738
|
if (state.unmounted) {
|
|
7738
7739
|
var _config_animations2, _animationDriver_supportsCSSVars;
|
|
7739
|
-
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) ||
|
|
7740
|
+
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() {
|
|
7740
7741
|
setStateShallow({
|
|
7741
7742
|
unmounted: !1
|
|
7742
7743
|
});
|
|
@@ -7767,7 +7768,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7767
7768
|
mediaGroups ? Object.keys([
|
|
7768
7769
|
...mediaGroups
|
|
7769
7770
|
]).join("") : 0
|
|
7770
|
-
]), (0,
|
|
7771
|
+
]), (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
7771
7772
|
var _curStateRef_group;
|
|
7772
7773
|
if (groupName) {
|
|
7773
7774
|
curStateRef.group.emit(groupName, {
|
|
@@ -7787,7 +7788,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7787
7788
|
groupName,
|
|
7788
7789
|
state
|
|
7789
7790
|
]);
|
|
7790
|
-
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 =
|
|
7791
|
+
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);
|
|
7791
7792
|
process.env.NODE_ENV === "development" && time2 && time2`events-setup`, process.env.NODE_ENV === "development" && debugProp === "verbose" && (0, import_log.log)("\u{1FAA9} events()", {
|
|
7792
7793
|
runtimeFocusStyle,
|
|
7793
7794
|
runtimePressStyle,
|
|
@@ -7818,10 +7819,10 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7818
7819
|
needsPressState && setStateShallow({
|
|
7819
7820
|
press: !0,
|
|
7820
7821
|
pressIn: !0
|
|
7821
|
-
}), onPressIn == null || onPressIn(e), onMouseDown == null || onMouseDown(e),
|
|
7822
|
+
}), onPressIn == null || onPressIn(e), onMouseDown == null || onMouseDown(e), import_constants.isWeb && componentSetStates.add(setState);
|
|
7822
7823
|
} : void 0,
|
|
7823
7824
|
onPress: attachPress ? function(e) {
|
|
7824
|
-
unPress(),
|
|
7825
|
+
unPress(), import_constants.isWeb && (onClick == null || onClick(e)), onPress == null || onPress(e);
|
|
7825
7826
|
} : void 0,
|
|
7826
7827
|
...attachPress && onLongPress && {
|
|
7827
7828
|
onLongPress: function(e) {
|
|
@@ -7889,7 +7890,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7889
7890
|
var useChildrenResult;
|
|
7890
7891
|
import_setupHooks.hooks.useChildren && (useChildrenResult = import_setupHooks.hooks.useChildren(elementType, content, viewProps)), process.env.NODE_ENV === "development" && time2 && time2`use-children`, useChildrenResult ? content = useChildrenResult : content = /* @__PURE__ */ import_react3.default.createElement(elementType, viewProps, content);
|
|
7891
7892
|
var ResetPresence = config == null || (_config_animations = config.animations) === null || _config_animations === void 0 ? void 0 : _config_animations.ResetPresence;
|
|
7892
|
-
ResetPresence && willBeAnimated && (hasEnterStyle || presenceState) && content && typeof content != "string" && (content = /* @__PURE__ */ (0,
|
|
7893
|
+
ResetPresence && willBeAnimated && (hasEnterStyle || presenceState) && content && typeof content != "string" && (content = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ResetPresence, {
|
|
7893
7894
|
children: content
|
|
7894
7895
|
})), process.env.NODE_ENV === "development" && time2 && time2`create-element`;
|
|
7895
7896
|
var groupState = curStateRef.group, subGroupContext = import_react3.default.useMemo(function() {
|
|
@@ -7915,7 +7916,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7915
7916
|
}, [
|
|
7916
7917
|
groupName
|
|
7917
7918
|
]);
|
|
7918
|
-
if (("group" in props || propsIn.focusWithinStyle) && (content = /* @__PURE__ */ (0,
|
|
7919
|
+
if (("group" in props || propsIn.focusWithinStyle) && (content = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ComponentContext.ComponentContext.Provider, {
|
|
7919
7920
|
...componentContext,
|
|
7920
7921
|
groups: subGroupContext,
|
|
7921
7922
|
setParentFocusState: setStateShallow,
|
|
@@ -7931,7 +7932,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7931
7932
|
}
|
|
7932
7933
|
if (overriddenContextProps) {
|
|
7933
7934
|
var Provider = staticConfig.context.Provider;
|
|
7934
|
-
content = /* @__PURE__ */ (0,
|
|
7935
|
+
content = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Provider, {
|
|
7935
7936
|
...contextValue,
|
|
7936
7937
|
...overriddenContextProps,
|
|
7937
7938
|
children: content
|
|
@@ -7939,7 +7940,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7939
7940
|
}
|
|
7940
7941
|
if (process.env.NODE_ENV === "development" && time2 && time2`context-override`, process.env.NODE_ENV === "development" && time2 && time2`style-tags`, process.env.NODE_ENV === "development" && debugProp && debugProp !== "profile") {
|
|
7941
7942
|
var element1 = typeof elementType == "string" ? elementType : "Component", title = `render <${element1} /> (${internalID}) with props`;
|
|
7942
|
-
if (
|
|
7943
|
+
if (import_constants.isWeb) {
|
|
7943
7944
|
console.groupCollapsed(title);
|
|
7944
7945
|
try {
|
|
7945
7946
|
(0, import_log.log)("viewProps", viewProps), (0, import_log.log)("children", content), typeof window < "u" && (0, import_log.log)({
|
|
@@ -7999,7 +8000,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
7999
8000
|
return Component2.staticConfig = extendStyledConfig(extended), Component2.styleable = styleable, Component2;
|
|
8000
8001
|
}
|
|
8001
8002
|
function styleable(Component2, options) {
|
|
8002
|
-
var _Component_render, skipForwardRef =
|
|
8003
|
+
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);
|
|
8003
8004
|
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;
|
|
8004
8005
|
}
|
|
8005
8006
|
return res.extractable = extractable, res.styleable = styleable, res;
|
|
@@ -8024,7 +8025,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8024
8025
|
componentName: "Spacer",
|
|
8025
8026
|
validStyles: import_helpers2.validStyles,
|
|
8026
8027
|
defaultProps: {
|
|
8027
|
-
...
|
|
8028
|
+
...import_constants2.stackDefaultStyles,
|
|
8028
8029
|
// avoid nesting issues
|
|
8029
8030
|
tag: "span",
|
|
8030
8031
|
size: !0,
|
|
@@ -8067,8 +8068,8 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8067
8068
|
spaceFlex,
|
|
8068
8069
|
separator,
|
|
8069
8070
|
key: child.key
|
|
8070
|
-
})), isEmpty || !child || child.key && !isZStack ? final.push(child) : final.push(/* @__PURE__ */ (0,
|
|
8071
|
-
children: isZStack ? /* @__PURE__ */ (0,
|
|
8071
|
+
})), isEmpty || !child || child.key && !isZStack ? final.push(child) : final.push(/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.default.Fragment, {
|
|
8072
|
+
children: isZStack ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(AbsoluteFill, {
|
|
8072
8073
|
children: child
|
|
8073
8074
|
}) : child
|
|
8074
8075
|
}, `${index}0t`)), !(isUnspaced(child) && index === 0) && !isZStack) {
|
|
@@ -8078,7 +8079,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8078
8079
|
direction,
|
|
8079
8080
|
space,
|
|
8080
8081
|
spaceFlex
|
|
8081
|
-
})), final.push(/* @__PURE__ */ (0,
|
|
8082
|
+
})), final.push(/* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.default.Fragment, {
|
|
8082
8083
|
children: separator
|
|
8083
8084
|
}, `${index}03t`)), hasSpace && final.push(createSpacer({
|
|
8084
8085
|
key: `_${index}01t`,
|
|
@@ -8106,7 +8107,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8106
8107
|
}
|
|
8107
8108
|
function createSpacer(param) {
|
|
8108
8109
|
var { key, direction, space, spaceFlex } = param;
|
|
8109
|
-
return /* @__PURE__ */ (0,
|
|
8110
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Spacer, {
|
|
8110
8111
|
size: space,
|
|
8111
8112
|
direction,
|
|
8112
8113
|
...typeof spaceFlex < "u" && {
|
|
@@ -8120,7 +8121,7 @@ If you meant to do this, you can disable this warning - either change untilMeasu
|
|
|
8120
8121
|
}
|
|
8121
8122
|
var AbsoluteFill = createComponent({
|
|
8122
8123
|
defaultProps: {
|
|
8123
|
-
...
|
|
8124
|
+
...import_constants2.stackDefaultStyles,
|
|
8124
8125
|
flexDirection: "column",
|
|
8125
8126
|
position: "absolute",
|
|
8126
8127
|
top: 0,
|
|
@@ -8276,7 +8277,7 @@ var require_createVariables_native = __commonJS({
|
|
|
8276
8277
|
}
|
|
8277
8278
|
});
|
|
8278
8279
|
module2.exports = __toCommonJS2(createVariables_exports);
|
|
8279
|
-
var
|
|
8280
|
+
var import_constants = require_index_native2(), import_helpers2 = require_index_native3(), import_createVariable = require_createVariable_native(), cache = /* @__PURE__ */ new WeakMap(), createVariables = function(tokens) {
|
|
8280
8281
|
var parentPath = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "", isFont = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : !1;
|
|
8281
8282
|
if (cache.has(tokens)) return tokens;
|
|
8282
8283
|
var res = {}, i = 0;
|
|
@@ -8294,7 +8295,7 @@ var require_createVariables_native = __commonJS({
|
|
|
8294
8295
|
name,
|
|
8295
8296
|
key: keyWithPrefix
|
|
8296
8297
|
});
|
|
8297
|
-
|
|
8298
|
+
import_constants.isWeb && (finalValue.needsPx = val.needsPx), res[key] = finalValue;
|
|
8298
8299
|
continue;
|
|
8299
8300
|
}
|
|
8300
8301
|
if (val && typeof val == "object") {
|
|
@@ -8743,7 +8744,7 @@ var require_insertFont_native = __commonJS({
|
|
|
8743
8744
|
}
|
|
8744
8745
|
});
|
|
8745
8746
|
module2.exports = __toCommonJS2(insertFont_exports);
|
|
8746
|
-
var import_config = require_config_native(),
|
|
8747
|
+
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();
|
|
8747
8748
|
function insertFont(name, fontIn) {
|
|
8748
8749
|
var font = (0, import_createFont.createFont)(fontIn), tokened = (0, import_createVariables.createVariables)(font, name), parsed = parseFont(tokened);
|
|
8749
8750
|
if (0) var fontVars, styleElement;
|
|
@@ -8825,7 +8826,7 @@ var require_createTamagui_native = __commonJS({
|
|
|
8825
8826
|
}
|
|
8826
8827
|
});
|
|
8827
8828
|
module2.exports = __toCommonJS2(createTamagui_exports);
|
|
8828
|
-
var
|
|
8829
|
+
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();
|
|
8829
8830
|
function shouldTokenCategoryHaveUnits(category) {
|
|
8830
8831
|
var UNIT_CATEGORIES = /* @__PURE__ */ new Set([
|
|
8831
8832
|
"size",
|
|
@@ -8854,7 +8855,7 @@ var require_createTamagui_native = __commonJS({
|
|
|
8854
8855
|
var foundThemes;
|
|
8855
8856
|
if (configIn.themes) {
|
|
8856
8857
|
var noThemes = Object.keys(configIn.themes).length === 0;
|
|
8857
|
-
noThemes && (foundThemes = (0, import_insertStyleRule.scanAllSheets)(noThemes, tokensParsed)),
|
|
8858
|
+
noThemes && (foundThemes = (0, import_insertStyleRule.scanAllSheets)(noThemes, tokensParsed)), import_constants.IS_REACT_19 && process.env.TAMAGUI_SKIP_THEME_OPTIMIZATION || noThemes && (0, import_insertStyleRule.listenForSheetChanges)();
|
|
8858
8859
|
}
|
|
8859
8860
|
var fontSizeTokens = null, fontsParsed;
|
|
8860
8861
|
if (configIn.fonts) {
|
|
@@ -8880,7 +8881,7 @@ var require_createTamagui_native = __commonJS({
|
|
|
8880
8881
|
var variable = tokens[key2][skey];
|
|
8881
8882
|
if (specificTokens[`$${key2}.${skey}`] = variable, process.env.NODE_ENV === "development" && typeof variable > "u") throw new Error(`No value for tokens.${key2}.${skey}:
|
|
8882
8883
|
${JSON.stringify(variable, null, 2)}`);
|
|
8883
|
-
if (
|
|
8884
|
+
if (import_constants.isWeb) {
|
|
8884
8885
|
(0, import_registerCSSVariable.registerCSSVariable)(variable);
|
|
8885
8886
|
var variableNeedsPx = variable.needsPx === !0, categoryNeedsPx = shouldTokenCategoryHaveUnits(key2), shouldBeUnitless = !(variableNeedsPx || categoryNeedsPx);
|
|
8886
8887
|
declarations.push((0, import_registerCSSVariable.variableToCSS)(variable, shouldBeUnitless));
|
|
@@ -8898,7 +8899,7 @@ ${JSON.stringify(variable, null, 2)}`);
|
|
|
8898
8899
|
cssRuleSets,
|
|
8899
8900
|
getThemeRulesSets() {
|
|
8900
8901
|
var themeRuleSets = [];
|
|
8901
|
-
if (
|
|
8902
|
+
if (import_constants.isWeb) {
|
|
8902
8903
|
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
8903
8904
|
try {
|
|
8904
8905
|
for (var _iterator = dedupedThemes[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) {
|
|
@@ -9396,10 +9397,10 @@ var require_withStableStyle_native = __commonJS({
|
|
|
9396
9397
|
}
|
|
9397
9398
|
});
|
|
9398
9399
|
module2.exports = __toCommonJS2(withStableStyle_exports);
|
|
9399
|
-
var
|
|
9400
|
+
var import_jsx_runtime2 = require("react/jsx-runtime"), import_react3 = __toESM2(require("react")), import_useTheme = require_useTheme_native(), _withStableStyle = function(Component, styleProvider) {
|
|
9400
9401
|
return /* @__PURE__ */ import_react3.default.forwardRef(function(props, ref) {
|
|
9401
9402
|
var { _expressions = [], ...rest } = props, theme = (0, import_useTheme.useTheme)();
|
|
9402
|
-
return /* @__PURE__ */ (0,
|
|
9403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Component, {
|
|
9403
9404
|
ref,
|
|
9404
9405
|
style: styleProvider(theme, _expressions),
|
|
9405
9406
|
...rest
|
|
@@ -9810,8 +9811,8 @@ var require_useIsTouchDevice_native = __commonJS({
|
|
|
9810
9811
|
}
|
|
9811
9812
|
});
|
|
9812
9813
|
module2.exports = __toCommonJS2(useIsTouchDevice_exports);
|
|
9813
|
-
var
|
|
9814
|
-
return
|
|
9814
|
+
var import_constants = require_index_native2(), import_use_did_finish_ssr = require_index_native7(), useIsTouchDevice = function() {
|
|
9815
|
+
return import_constants.isWeb ? (0, import_use_did_finish_ssr.useDidFinishSSR)() ? import_constants.isTouchable : !1 : !0;
|
|
9815
9816
|
};
|
|
9816
9817
|
}
|
|
9817
9818
|
});
|
|
@@ -9859,9 +9860,9 @@ var require_Stack_native = __commonJS({
|
|
|
9859
9860
|
}
|
|
9860
9861
|
});
|
|
9861
9862
|
module2.exports = __toCommonJS2(Stack_exports);
|
|
9862
|
-
var import_helpers2 = require_index_native3(),
|
|
9863
|
+
var import_helpers2 = require_index_native3(), import_constants = require_constants_native2(), import_createComponent = require_createComponent_native(), Stack2 = (0, import_createComponent.createComponent)({
|
|
9863
9864
|
acceptsClassName: !0,
|
|
9864
|
-
defaultProps:
|
|
9865
|
+
defaultProps: import_constants.stackDefaultStyles,
|
|
9865
9866
|
validStyles: import_helpers2.validStyles
|
|
9866
9867
|
});
|
|
9867
9868
|
Stack2.displayName = "Stack";
|
|
@@ -9929,7 +9930,7 @@ var require_useProps_native = __commonJS({
|
|
|
9929
9930
|
}
|
|
9930
9931
|
});
|
|
9931
9932
|
module2.exports = __toCommonJS2(useProps_exports);
|
|
9932
|
-
var
|
|
9933
|
+
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();
|
|
9933
9934
|
function useProps(props, opts) {
|
|
9934
9935
|
var [propsOut, styleOut] = usePropsAndStyle(props, {
|
|
9935
9936
|
...opts,
|
|
@@ -9965,7 +9966,7 @@ var require_useProps_native = __commonJS({
|
|
|
9965
9966
|
resolveValues: "auto",
|
|
9966
9967
|
...opts
|
|
9967
9968
|
}, null, componentContext), { mediaGroups, pseudoGroups } = splitStyles;
|
|
9968
|
-
return (0,
|
|
9969
|
+
return (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
9969
9970
|
if (!disabled) {
|
|
9970
9971
|
if (state.unmounted) {
|
|
9971
9972
|
setStateShallow({
|
|
@@ -10042,9 +10043,9 @@ var require_View_native = __commonJS({
|
|
|
10042
10043
|
}
|
|
10043
10044
|
});
|
|
10044
10045
|
module2.exports = __toCommonJS2(View_exports);
|
|
10045
|
-
var import_helpers2 = require_index_native3(),
|
|
10046
|
+
var import_helpers2 = require_index_native3(), import_constants = require_constants_native2(), import_createComponent = require_createComponent_native(), View2 = (0, import_createComponent.createComponent)({
|
|
10046
10047
|
acceptsClassName: !0,
|
|
10047
|
-
defaultProps:
|
|
10048
|
+
defaultProps: import_constants.stackDefaultStyles,
|
|
10048
10049
|
validStyles: import_helpers2.validStyles
|
|
10049
10050
|
});
|
|
10050
10051
|
}
|
|
@@ -10169,11 +10170,11 @@ var require_ThemeProvider_native = __commonJS({
|
|
|
10169
10170
|
}
|
|
10170
10171
|
});
|
|
10171
10172
|
module2.exports = __toCommonJS2(ThemeProvider_exports);
|
|
10172
|
-
var
|
|
10173
|
+
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) {
|
|
10173
10174
|
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");
|
|
10174
|
-
return
|
|
10175
|
+
return import_constants.isClient && (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
10175
10176
|
if (!disableRootThemeClass) {
|
|
10176
|
-
var cn = `${
|
|
10177
|
+
var cn = `${import_constants2.THEME_CLASSNAME_PREFIX}${props.defaultTheme}`, target = themeClassNameOnRoot ? document.documentElement : document.body;
|
|
10177
10178
|
return target.classList.add(cn), function() {
|
|
10178
10179
|
target.classList.remove(cn);
|
|
10179
10180
|
};
|
|
@@ -10182,7 +10183,7 @@ var require_ThemeProvider_native = __commonJS({
|
|
|
10182
10183
|
props.defaultTheme,
|
|
10183
10184
|
disableRootThemeClass,
|
|
10184
10185
|
themeClassNameOnRoot
|
|
10185
|
-
]), /* @__PURE__ */ (0,
|
|
10186
|
+
]), /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_Theme.Theme, {
|
|
10186
10187
|
className: props.className,
|
|
10187
10188
|
name: props.defaultTheme,
|
|
10188
10189
|
// if root class disabled, force class here
|
|
@@ -10250,13 +10251,13 @@ var require_FontLanguage_native = __commonJS({
|
|
|
10250
10251
|
}
|
|
10251
10252
|
});
|
|
10252
10253
|
module2.exports = __toCommonJS2(FontLanguage_native_exports);
|
|
10253
|
-
var
|
|
10254
|
+
var import_jsx_runtime2 = require("react/jsx-runtime"), import_react3 = __toESM2(require("react")), import_ComponentContext = require_ComponentContext_native(), FontLanguage = function(param) {
|
|
10254
10255
|
var { children, ...props } = param, language = import_react3.default.useMemo(function() {
|
|
10255
10256
|
return props;
|
|
10256
10257
|
}, [
|
|
10257
10258
|
JSON.stringify(props)
|
|
10258
10259
|
]);
|
|
10259
|
-
return /* @__PURE__ */ (0,
|
|
10260
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ComponentContext.ComponentContext.Provider, {
|
|
10260
10261
|
language,
|
|
10261
10262
|
children
|
|
10262
10263
|
});
|
|
@@ -10316,26 +10317,14 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
10316
10317
|
}, TamaguiProvider_exports = {};
|
|
10317
10318
|
__export2(TamaguiProvider_exports, {
|
|
10318
10319
|
TamaguiProvider: function() {
|
|
10319
|
-
return
|
|
10320
|
-
},
|
|
10321
|
-
___onDidFinishClientRender: function() {
|
|
10322
|
-
return ___onDidFinishClientRender2;
|
|
10320
|
+
return TamaguiProvider2;
|
|
10323
10321
|
}
|
|
10324
10322
|
});
|
|
10325
10323
|
module2.exports = __toCommonJS2(TamaguiProvider_exports);
|
|
10326
|
-
var
|
|
10327
|
-
function
|
|
10328
|
-
didRender ? cb() : listeners.add(cb);
|
|
10329
|
-
}
|
|
10330
|
-
function TamaguiProvider(param) {
|
|
10324
|
+
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();
|
|
10325
|
+
function TamaguiProvider2(param) {
|
|
10331
10326
|
var { children, disableInjectCSS, config, className, defaultTheme, disableRootThemeClass, reset, themeClassNameOnRoot } = param;
|
|
10332
|
-
(0,
|
|
10333
|
-
return listeners.forEach(function(cb) {
|
|
10334
|
-
return cb();
|
|
10335
|
-
}), didRender = !0, function() {
|
|
10336
|
-
didRender = !1;
|
|
10337
|
-
};
|
|
10338
|
-
}, []), import_constants2.IS_REACT_19 || import_constants2.isClient && (0, import_constants2.useIsomorphicLayoutEffect)(function() {
|
|
10327
|
+
import_constants.IS_REACT_19 || import_constants.isClient && (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
10339
10328
|
if (config && !disableInjectCSS) {
|
|
10340
10329
|
var style = document.createElement("style");
|
|
10341
10330
|
return style.appendChild(document.createTextNode(config.getCSS())), document.head.appendChild(style), function() {
|
|
@@ -10345,13 +10334,13 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
10345
10334
|
}, [
|
|
10346
10335
|
config,
|
|
10347
10336
|
disableInjectCSS
|
|
10348
|
-
]), (0,
|
|
10337
|
+
]), (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
10349
10338
|
(0, import_useMedia.updateMediaListeners)();
|
|
10350
10339
|
}, []);
|
|
10351
|
-
var contents = /* @__PURE__ */ (0,
|
|
10352
|
-
children: /* @__PURE__ */ (0,
|
|
10340
|
+
var contents = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(UnmountedClassName, {
|
|
10341
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ComponentContext.ComponentContext.Provider, {
|
|
10353
10342
|
animationDriver: config == null ? void 0 : config.animations,
|
|
10354
|
-
children: /* @__PURE__ */ (0,
|
|
10343
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_ThemeProvider.ThemeProvider, {
|
|
10355
10344
|
themeClassNameOnRoot: themeClassNameOnRoot ?? (0, import_config.getSetting)("themeClassNameOnRoot"),
|
|
10356
10345
|
disableRootThemeClass: disableRootThemeClass ?? (0, import_config.getSetting)("disableRootThemeClass"),
|
|
10357
10346
|
defaultTheme: defaultTheme ?? (config ? Object.keys(config.themes)[0] : ""),
|
|
@@ -10361,9 +10350,9 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
10361
10350
|
})
|
|
10362
10351
|
})
|
|
10363
10352
|
});
|
|
10364
|
-
return (0, import_config.getSetting)("disableSSR") && (contents = /* @__PURE__ */ (0,
|
|
10353
|
+
return (0, import_config.getSetting)("disableSSR") && (contents = /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_use_did_finish_ssr.ClientOnly, {
|
|
10365
10354
|
children: contents
|
|
10366
|
-
})), /* @__PURE__ */ (0,
|
|
10355
|
+
})), /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, {
|
|
10367
10356
|
children: [
|
|
10368
10357
|
contents,
|
|
10369
10358
|
!1
|
|
@@ -10374,7 +10363,7 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
10374
10363
|
var [mounted, setMounted] = import_react3.default.useState(!1);
|
|
10375
10364
|
return import_react3.default.useEffect(function() {
|
|
10376
10365
|
setMounted(!0);
|
|
10377
|
-
}, []),
|
|
10366
|
+
}, []), import_constants.isWeb ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", {
|
|
10378
10367
|
style: {
|
|
10379
10368
|
display: "contents"
|
|
10380
10369
|
},
|
|
@@ -10382,7 +10371,7 @@ var require_TamaguiProvider_native = __commonJS({
|
|
|
10382
10371
|
children: props.children
|
|
10383
10372
|
}) : props.children;
|
|
10384
10373
|
}
|
|
10385
|
-
|
|
10374
|
+
TamaguiProvider2.displayName = "TamaguiProvider";
|
|
10386
10375
|
}
|
|
10387
10376
|
});
|
|
10388
10377
|
|
|
@@ -10441,12 +10430,12 @@ var require_Configuration_native = __commonJS({
|
|
|
10441
10430
|
}
|
|
10442
10431
|
});
|
|
10443
10432
|
module2.exports = __toCommonJS2(Configuration_exports);
|
|
10444
|
-
var
|
|
10445
|
-
var current = import_react3.default.useContext(import_ComponentContext.ComponentContext), clientOnly = (0, import_react3.useContext)(import_use_did_finish_ssr.ClientOnlyContext), children = /* @__PURE__ */ (0,
|
|
10433
|
+
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) {
|
|
10434
|
+
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, {
|
|
10446
10435
|
...current,
|
|
10447
10436
|
...props
|
|
10448
10437
|
});
|
|
10449
|
-
return clientOnly ? /* @__PURE__ */ (0,
|
|
10438
|
+
return clientOnly ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_use_did_finish_ssr.ClientOnly, {
|
|
10450
10439
|
children
|
|
10451
10440
|
}) : children;
|
|
10452
10441
|
};
|
|
@@ -10509,10 +10498,10 @@ var require_useGet_native = __commonJS({
|
|
|
10509
10498
|
}
|
|
10510
10499
|
});
|
|
10511
10500
|
module2.exports = __toCommonJS2(useGet_exports);
|
|
10512
|
-
var
|
|
10501
|
+
var import_constants = require_index_native2(), React3 = __toESM2(require("react"));
|
|
10513
10502
|
function useGet(currentValue, initialValue, forwardToFunction) {
|
|
10514
10503
|
var curRef = React3.useRef(initialValue ?? currentValue);
|
|
10515
|
-
return (0,
|
|
10504
|
+
return (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
10516
10505
|
curRef.current = currentValue;
|
|
10517
10506
|
}), React3.useCallback(forwardToFunction ? function() {
|
|
10518
10507
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
|
|
@@ -10579,7 +10568,7 @@ var require_useEvent_native = __commonJS({
|
|
|
10579
10568
|
});
|
|
10580
10569
|
|
|
10581
10570
|
// ../use-event/dist/cjs/index.native.js
|
|
10582
|
-
var
|
|
10571
|
+
var require_index_native8 = __commonJS({
|
|
10583
10572
|
"../use-event/dist/cjs/index.native.js"(exports2, module2) {
|
|
10584
10573
|
"use strict";
|
|
10585
10574
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
|
|
@@ -10619,7 +10608,7 @@ var require_index_native7 = __commonJS({
|
|
|
10619
10608
|
});
|
|
10620
10609
|
|
|
10621
10610
|
// ../web/dist/cjs/index.native.js
|
|
10622
|
-
var
|
|
10611
|
+
var require_index_native9 = __commonJS({
|
|
10623
10612
|
"../web/dist/cjs/index.native.js"(exports2, module2) {
|
|
10624
10613
|
"use strict";
|
|
10625
10614
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
@@ -10736,7 +10725,7 @@ var require_index_native8 = __commonJS({
|
|
|
10736
10725
|
__reExport2(index_exports2, require_withStableStyle_native(), module2.exports);
|
|
10737
10726
|
__reExport2(index_exports2, require_createMediaStyle_native(), module2.exports);
|
|
10738
10727
|
__reExport2(index_exports2, require_getShorthandValue_native(), module2.exports);
|
|
10739
|
-
__reExport2(index_exports2,
|
|
10728
|
+
__reExport2(index_exports2, require_index_native6(), module2.exports);
|
|
10740
10729
|
__reExport2(index_exports2, require_createStyledContext_native(), module2.exports);
|
|
10741
10730
|
__reExport2(index_exports2, require_expandStyles_native(), module2.exports);
|
|
10742
10731
|
__reExport2(index_exports2, require_getExpandedShorthands_native(), module2.exports);
|
|
@@ -10777,8 +10766,8 @@ var require_index_native8 = __commonJS({
|
|
|
10777
10766
|
__reExport2(index_exports2, require_FontLanguage_native(), module2.exports);
|
|
10778
10767
|
__reExport2(index_exports2, require_TamaguiProvider_native(), module2.exports);
|
|
10779
10768
|
__reExport2(index_exports2, require_Configuration_native(), module2.exports);
|
|
10780
|
-
__reExport2(index_exports2, require_index_native6(), module2.exports);
|
|
10781
10769
|
__reExport2(index_exports2, require_index_native7(), module2.exports);
|
|
10770
|
+
__reExport2(index_exports2, require_index_native8(), module2.exports);
|
|
10782
10771
|
__reExport2(index_exports2, require_index_native4(), module2.exports);
|
|
10783
10772
|
__reExport2(index_exports2, require_index_native3(), module2.exports);
|
|
10784
10773
|
__reExport2(index_exports2, require_index_native2(), module2.exports);
|
|
@@ -11163,15 +11152,15 @@ var require_createMedia_native = __commonJS({
|
|
|
11163
11152
|
}
|
|
11164
11153
|
});
|
|
11165
11154
|
module2.exports = __toCommonJS2(createMedia_exports);
|
|
11166
|
-
var
|
|
11155
|
+
var import_web2 = require_index_native9(), import_matchMedia = require_matchMedia_native2();
|
|
11167
11156
|
function createMedia2(media) {
|
|
11168
|
-
return (0,
|
|
11157
|
+
return (0, import_web2.setupMatchMedia)(import_matchMedia.matchMedia), media;
|
|
11169
11158
|
}
|
|
11170
11159
|
}
|
|
11171
11160
|
});
|
|
11172
11161
|
|
|
11173
11162
|
// ../react-native-media-driver/dist/cjs/index.native.js
|
|
11174
|
-
var
|
|
11163
|
+
var require_index_native10 = __commonJS({
|
|
11175
11164
|
"../react-native-media-driver/dist/cjs/index.native.js"(exports2, module2) {
|
|
11176
11165
|
"use strict";
|
|
11177
11166
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
|
|
@@ -11252,7 +11241,7 @@ var require_utils_native = __commonJS({
|
|
|
11252
11241
|
return canUseDOM;
|
|
11253
11242
|
},
|
|
11254
11243
|
getBoundingClientRect: function() {
|
|
11255
|
-
return
|
|
11244
|
+
return getBoundingClientRect;
|
|
11256
11245
|
},
|
|
11257
11246
|
getLowestCommonAncestor: function() {
|
|
11258
11247
|
return getLowestCommonAncestor;
|
|
@@ -11277,7 +11266,7 @@ var require_utils_native = __commonJS({
|
|
|
11277
11266
|
}
|
|
11278
11267
|
});
|
|
11279
11268
|
module2.exports = __toCommonJS2(utils_exports);
|
|
11280
|
-
var keyName = "__reactResponderId", canUseDOM = !!(typeof window < "u" && window.document && window.document.createElement),
|
|
11269
|
+
var keyName = "__reactResponderId", canUseDOM = !!(typeof window < "u" && window.document && window.document.createElement), getBoundingClientRect = function(node) {
|
|
11281
11270
|
if (node && node.nodeType === 1 && node.getBoundingClientRect) return node.getBoundingClientRect();
|
|
11282
11271
|
};
|
|
11283
11272
|
function getEventPath(domEvent) {
|
|
@@ -12129,7 +12118,7 @@ var require_useResponderEvents_native = __commonJS({
|
|
|
12129
12118
|
});
|
|
12130
12119
|
|
|
12131
12120
|
// ../react-native-use-responder-events/dist/cjs/index.native.js
|
|
12132
|
-
var
|
|
12121
|
+
var require_index_native11 = __commonJS({
|
|
12133
12122
|
"../react-native-use-responder-events/dist/cjs/index.native.js"(exports2, module2) {
|
|
12134
12123
|
"use strict";
|
|
12135
12124
|
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __copyProps2 = function(to, from, except, desc) {
|
|
@@ -12167,6 +12156,235 @@ var require_index_native10 = __commonJS({
|
|
|
12167
12156
|
}
|
|
12168
12157
|
});
|
|
12169
12158
|
|
|
12159
|
+
// ../use-element-layout/dist/cjs/index.native.js
|
|
12160
|
+
var require_index_native12 = __commonJS({
|
|
12161
|
+
"../use-element-layout/dist/cjs/index.native.js"(exports2, module2) {
|
|
12162
|
+
"use strict";
|
|
12163
|
+
var __defProp2 = Object.defineProperty, __getOwnPropDesc2 = Object.getOwnPropertyDescriptor, __getOwnPropNames2 = Object.getOwnPropertyNames, __hasOwnProp2 = Object.prototype.hasOwnProperty, __export2 = function(target, all) {
|
|
12164
|
+
for (var name in all) __defProp2(target, name, {
|
|
12165
|
+
get: all[name],
|
|
12166
|
+
enumerable: !0
|
|
12167
|
+
});
|
|
12168
|
+
}, __copyProps2 = function(to, from, except, desc) {
|
|
12169
|
+
var _iteratorNormalCompletion = !0, _didIteratorError = !1, _iteratorError = void 0;
|
|
12170
|
+
if (from && typeof from == "object" || typeof from == "function") try {
|
|
12171
|
+
for (var _loop = function() {
|
|
12172
|
+
var key = _step.value;
|
|
12173
|
+
!__hasOwnProp2.call(to, key) && key !== except && __defProp2(to, key, {
|
|
12174
|
+
get: function() {
|
|
12175
|
+
return from[key];
|
|
12176
|
+
},
|
|
12177
|
+
enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable
|
|
12178
|
+
});
|
|
12179
|
+
}, _iterator = __getOwnPropNames2(from)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = !0) _loop();
|
|
12180
|
+
} catch (err) {
|
|
12181
|
+
_didIteratorError = !0, _iteratorError = err;
|
|
12182
|
+
} finally {
|
|
12183
|
+
try {
|
|
12184
|
+
!_iteratorNormalCompletion && _iterator.return != null && _iterator.return();
|
|
12185
|
+
} finally {
|
|
12186
|
+
if (_didIteratorError)
|
|
12187
|
+
throw _iteratorError;
|
|
12188
|
+
}
|
|
12189
|
+
}
|
|
12190
|
+
return to;
|
|
12191
|
+
}, __toCommonJS2 = function(mod) {
|
|
12192
|
+
return __copyProps2(__defProp2({}, "__esModule", {
|
|
12193
|
+
value: !0
|
|
12194
|
+
}), mod);
|
|
12195
|
+
}, index_exports2 = {};
|
|
12196
|
+
__export2(index_exports2, {
|
|
12197
|
+
enable: function() {
|
|
12198
|
+
return enable2;
|
|
12199
|
+
},
|
|
12200
|
+
getElementLayoutEvent: function() {
|
|
12201
|
+
return getElementLayoutEvent2;
|
|
12202
|
+
},
|
|
12203
|
+
getElementLayoutEventAsync: function() {
|
|
12204
|
+
return getElementLayoutEventAsync;
|
|
12205
|
+
},
|
|
12206
|
+
getRect: function() {
|
|
12207
|
+
return getRect2;
|
|
12208
|
+
},
|
|
12209
|
+
measureLayout: function() {
|
|
12210
|
+
return measureLayout2;
|
|
12211
|
+
},
|
|
12212
|
+
measureLayoutAsync: function() {
|
|
12213
|
+
return measureLayoutAsync;
|
|
12214
|
+
},
|
|
12215
|
+
setOnLayoutStrategy: function() {
|
|
12216
|
+
return setOnLayoutStrategy2;
|
|
12217
|
+
},
|
|
12218
|
+
useElementLayout: function() {
|
|
12219
|
+
return useElementLayout2;
|
|
12220
|
+
}
|
|
12221
|
+
});
|
|
12222
|
+
module2.exports = __toCommonJS2(index_exports2);
|
|
12223
|
+
var import_constants = require_index_native2(), import_is_equal_shallow = require_index_native6(), LayoutHandlers = /* @__PURE__ */ new WeakMap(), Nodes = /* @__PURE__ */ new Set(), strategy = "async";
|
|
12224
|
+
function setOnLayoutStrategy2(state) {
|
|
12225
|
+
strategy = state;
|
|
12226
|
+
}
|
|
12227
|
+
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();
|
|
12228
|
+
function enable2() {
|
|
12229
|
+
avoidUpdates && (avoidUpdates = !1, queuedUpdates && (queuedUpdates.forEach(function(cb) {
|
|
12230
|
+
return cb();
|
|
12231
|
+
}), queuedUpdates.clear()));
|
|
12232
|
+
}
|
|
12233
|
+
if (import_constants.isClient) if (rAF) {
|
|
12234
|
+
layoutOnAnimationFrame = function() {
|
|
12235
|
+
var now = Date.now(), timeSinceLastFrame = now - lastFrameAt;
|
|
12236
|
+
if (lastFrameAt = now, strategy !== "off") {
|
|
12237
|
+
var expectedFrameTime = 16.67, hasRecentSyncWork = timeSinceLastFrame > expectedFrameTime * numDroppedFramesUntilPause;
|
|
12238
|
+
hasRecentSyncWork || Nodes.forEach(updateLayoutIfChanged);
|
|
12239
|
+
}
|
|
12240
|
+
rAF(layoutOnAnimationFrame);
|
|
12241
|
+
}, layoutOnAnimationFrame2 = layoutOnAnimationFrame, lastFrameAt = Date.now(), numDroppedFramesUntilPause = 2;
|
|
12242
|
+
async function updateLayoutIfChanged(node) {
|
|
12243
|
+
var nodeRect = node.getBoundingClientRect(), parentNode = node.parentElement, parentRect = parentNode == null ? void 0 : parentNode.getBoundingClientRect(), onLayout = LayoutHandlers.get(node);
|
|
12244
|
+
if (typeof onLayout == "function") {
|
|
12245
|
+
var cachedRect = NodeRectCache.get(node), cachedParentRect = parentNode ? NodeRectCache.get(parentNode) : null;
|
|
12246
|
+
if (!cachedRect || // has changed one rect
|
|
12247
|
+
!(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) {
|
|
12248
|
+
var event = getElementLayoutEvent2(node);
|
|
12249
|
+
queuedUpdates.set(node, function() {
|
|
12250
|
+
return onLayout(event);
|
|
12251
|
+
});
|
|
12252
|
+
} else if (strategy === "async") {
|
|
12253
|
+
var now = Date.now();
|
|
12254
|
+
LastChangeTime.set(node, now);
|
|
12255
|
+
var existingTimer = DebounceTimers.get(node);
|
|
12256
|
+
existingTimer && clearTimeout(existingTimer);
|
|
12257
|
+
var timer = setTimeout(async function() {
|
|
12258
|
+
var lastChange = LastChangeTime.get(node) || 0, timeSinceChange = Date.now() - lastChange;
|
|
12259
|
+
if (timeSinceChange >= DEBOUNCE_DELAY) {
|
|
12260
|
+
var event2 = await getElementLayoutEventAsync(node);
|
|
12261
|
+
onLayout(event2), DebounceTimers.delete(node);
|
|
12262
|
+
} else {
|
|
12263
|
+
var remainingDelay = DEBOUNCE_DELAY - timeSinceChange, newTimer = setTimeout(async function() {
|
|
12264
|
+
var event3 = await getElementLayoutEventAsync(node);
|
|
12265
|
+
onLayout(event3), DebounceTimers.delete(node);
|
|
12266
|
+
}, remainingDelay);
|
|
12267
|
+
DebounceTimers.set(node, newTimer);
|
|
12268
|
+
}
|
|
12269
|
+
}, DEBOUNCE_DELAY);
|
|
12270
|
+
DebounceTimers.set(node, timer);
|
|
12271
|
+
} else {
|
|
12272
|
+
var event1 = getElementLayoutEvent2(node);
|
|
12273
|
+
onLayout(event1);
|
|
12274
|
+
}
|
|
12275
|
+
}
|
|
12276
|
+
}
|
|
12277
|
+
rAF(layoutOnAnimationFrame);
|
|
12278
|
+
} else process.env.NODE_ENV === "development" && console.warn("No requestAnimationFrame - please polyfill for onLayout to work correctly");
|
|
12279
|
+
var layoutOnAnimationFrame, layoutOnAnimationFrame2, lastFrameAt, numDroppedFramesUntilPause, getElementLayoutEvent2 = function(target) {
|
|
12280
|
+
var res = null;
|
|
12281
|
+
if (measureLayout2(target, null, function(x, y, width, height, left, top) {
|
|
12282
|
+
res = {
|
|
12283
|
+
nativeEvent: {
|
|
12284
|
+
layout: {
|
|
12285
|
+
x,
|
|
12286
|
+
y,
|
|
12287
|
+
width,
|
|
12288
|
+
height,
|
|
12289
|
+
left,
|
|
12290
|
+
top
|
|
12291
|
+
},
|
|
12292
|
+
target
|
|
12293
|
+
},
|
|
12294
|
+
timeStamp: Date.now()
|
|
12295
|
+
};
|
|
12296
|
+
}), !res) throw new Error("\u203C\uFE0F");
|
|
12297
|
+
return res;
|
|
12298
|
+
}, measureLayout2 = function(node, relativeTo, callback) {
|
|
12299
|
+
var relativeNode = relativeTo || (node == null ? void 0 : node.parentElement);
|
|
12300
|
+
if (relativeNode instanceof HTMLElement) {
|
|
12301
|
+
var nodeDim = node.getBoundingClientRect(), relativeNodeDim = relativeNode.getBoundingClientRect();
|
|
12302
|
+
if (relativeNodeDim && nodeDim) {
|
|
12303
|
+
var { x, y, width, height, left, top } = getRelativeDimensions(nodeDim, relativeNodeDim);
|
|
12304
|
+
callback(x, y, width, height, left, top);
|
|
12305
|
+
}
|
|
12306
|
+
}
|
|
12307
|
+
}, getElementLayoutEventAsync = async function(target) {
|
|
12308
|
+
var layout = await measureLayoutAsync(target);
|
|
12309
|
+
if (!layout) throw new Error("\u203C\uFE0F");
|
|
12310
|
+
return {
|
|
12311
|
+
nativeEvent: {
|
|
12312
|
+
layout,
|
|
12313
|
+
target
|
|
12314
|
+
},
|
|
12315
|
+
timeStamp: Date.now()
|
|
12316
|
+
};
|
|
12317
|
+
}, measureLayoutAsync = async function(node, relativeTo) {
|
|
12318
|
+
var relativeNode = relativeTo || (node == null ? void 0 : node.parentElement);
|
|
12319
|
+
if (relativeNode instanceof HTMLElement) {
|
|
12320
|
+
var [nodeDim, relativeNodeDim] = await Promise.all([
|
|
12321
|
+
node.getBoundingClientRect(),
|
|
12322
|
+
relativeNode.getBoundingClientRect()
|
|
12323
|
+
]);
|
|
12324
|
+
if (relativeNodeDim && nodeDim) {
|
|
12325
|
+
var { x, y, width, height, left, top } = getRelativeDimensions(nodeDim, relativeNodeDim);
|
|
12326
|
+
return {
|
|
12327
|
+
x,
|
|
12328
|
+
y,
|
|
12329
|
+
width,
|
|
12330
|
+
height,
|
|
12331
|
+
left,
|
|
12332
|
+
top
|
|
12333
|
+
};
|
|
12334
|
+
}
|
|
12335
|
+
}
|
|
12336
|
+
return null;
|
|
12337
|
+
}, getRelativeDimensions = function(a, b) {
|
|
12338
|
+
var { height, left, top, width } = a, x = left - b.left, y = top - b.top;
|
|
12339
|
+
return {
|
|
12340
|
+
x,
|
|
12341
|
+
y,
|
|
12342
|
+
width,
|
|
12343
|
+
height,
|
|
12344
|
+
left,
|
|
12345
|
+
top
|
|
12346
|
+
};
|
|
12347
|
+
};
|
|
12348
|
+
function useElementLayout2(ref, onLayout) {
|
|
12349
|
+
var _ref_current, node = ensureWebElement((_ref_current = ref.current) === null || _ref_current === void 0 ? void 0 : _ref_current.host);
|
|
12350
|
+
node && onLayout && LayoutHandlers.set(node, onLayout), (0, import_constants.useIsomorphicLayoutEffect)(function() {
|
|
12351
|
+
var _ref_current2;
|
|
12352
|
+
if (onLayout) {
|
|
12353
|
+
var node2 = (_ref_current2 = ref.current) === null || _ref_current2 === void 0 ? void 0 : _ref_current2.host;
|
|
12354
|
+
if (node2) return LayoutHandlers.set(node2, onLayout), Nodes.add(node2), onLayout(getElementLayoutEvent2(node2)), function() {
|
|
12355
|
+
Nodes.delete(node2), LayoutHandlers.delete(node2), NodeRectCache.delete(node2);
|
|
12356
|
+
var timer = DebounceTimers.get(node2);
|
|
12357
|
+
timer && (clearTimeout(timer), DebounceTimers.delete(node2)), LastChangeTime.delete(node2);
|
|
12358
|
+
};
|
|
12359
|
+
}
|
|
12360
|
+
}, [
|
|
12361
|
+
ref,
|
|
12362
|
+
!!onLayout
|
|
12363
|
+
]);
|
|
12364
|
+
}
|
|
12365
|
+
function ensureWebElement(x) {
|
|
12366
|
+
if (!(typeof HTMLElement > "u")) return x instanceof HTMLElement ? x : void 0;
|
|
12367
|
+
}
|
|
12368
|
+
var getBoundingClientRect = function(node) {
|
|
12369
|
+
var _node_getBoundingClientRect;
|
|
12370
|
+
if (!(!node || node.nodeType !== 1)) return (_node_getBoundingClientRect = node.getBoundingClientRect) === null || _node_getBoundingClientRect === void 0 ? void 0 : _node_getBoundingClientRect.call(node);
|
|
12371
|
+
}, getRect2 = function(node) {
|
|
12372
|
+
var rect = getBoundingClientRect(node);
|
|
12373
|
+
if (rect) {
|
|
12374
|
+
var { x, y, top, left } = rect;
|
|
12375
|
+
return {
|
|
12376
|
+
x,
|
|
12377
|
+
y,
|
|
12378
|
+
width: node.offsetWidth,
|
|
12379
|
+
height: node.offsetHeight,
|
|
12380
|
+
top,
|
|
12381
|
+
left
|
|
12382
|
+
};
|
|
12383
|
+
}
|
|
12384
|
+
};
|
|
12385
|
+
}
|
|
12386
|
+
});
|
|
12387
|
+
|
|
12170
12388
|
// ../../packages/fake-react-native/idFn.js
|
|
12171
12389
|
var idFn_exports = {};
|
|
12172
12390
|
__export(idFn_exports, {
|
|
@@ -12184,14 +12402,15 @@ var init_idFn = __esm({
|
|
|
12184
12402
|
var index_exports = {};
|
|
12185
12403
|
__export(index_exports, {
|
|
12186
12404
|
Stack: () => Stack,
|
|
12405
|
+
TamaguiProvider: () => TamaguiProvider,
|
|
12187
12406
|
Text: () => Text,
|
|
12188
12407
|
View: () => View,
|
|
12189
12408
|
createTamagui: () => createTamagui,
|
|
12190
|
-
getElementLayoutEvent: () => getElementLayoutEvent,
|
|
12191
|
-
setOnLayoutStrategy: () => setOnLayoutStrategy
|
|
12409
|
+
getElementLayoutEvent: () => import_use_element_layout2.getElementLayoutEvent,
|
|
12410
|
+
setOnLayoutStrategy: () => import_use_element_layout2.setOnLayoutStrategy
|
|
12192
12411
|
});
|
|
12193
12412
|
module.exports = __toCommonJS(index_exports);
|
|
12194
|
-
var import_react_native_media_driver = __toESM(
|
|
12413
|
+
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());
|
|
12195
12414
|
|
|
12196
12415
|
// src/addNativeValidStyles.native.ts
|
|
12197
12416
|
var import_helpers = __toESM(require_index_native3());
|
|
@@ -12423,183 +12642,34 @@ function getBaseViews() {
|
|
|
12423
12642
|
};
|
|
12424
12643
|
}
|
|
12425
12644
|
|
|
12426
|
-
// src/helpers/getBoundingClientRect.tsx
|
|
12427
|
-
var getBoundingClientRect = function(node) {
|
|
12428
|
-
var _node_getBoundingClientRect;
|
|
12429
|
-
if (!(!node || node.nodeType !== 1))
|
|
12430
|
-
return (_node_getBoundingClientRect = node.getBoundingClientRect) === null || _node_getBoundingClientRect === void 0 ? void 0 : _node_getBoundingClientRect.call(node);
|
|
12431
|
-
};
|
|
12432
|
-
|
|
12433
|
-
// src/helpers/getRect.tsx
|
|
12434
|
-
var getRect = function(node) {
|
|
12435
|
-
var rect = getBoundingClientRect(node);
|
|
12436
|
-
if (rect) {
|
|
12437
|
-
var { x, y, top, left } = rect;
|
|
12438
|
-
return {
|
|
12439
|
-
x,
|
|
12440
|
-
y,
|
|
12441
|
-
width: node.offsetWidth,
|
|
12442
|
-
height: node.offsetHeight,
|
|
12443
|
-
top,
|
|
12444
|
-
left
|
|
12445
|
-
};
|
|
12446
|
-
}
|
|
12447
|
-
};
|
|
12448
|
-
|
|
12449
|
-
// src/hooks/useElementLayout.tsx
|
|
12450
|
-
var import_constants = __toESM(require_index_native2()), import_web = __toESM(require_index_native8()), LayoutHandlers = /* @__PURE__ */ new WeakMap(), Nodes = /* @__PURE__ */ new Set(), strategy = "async";
|
|
12451
|
-
function setOnLayoutStrategy(state) {
|
|
12452
|
-
strategy = state;
|
|
12453
|
-
}
|
|
12454
|
-
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;
|
|
12455
|
-
if (import_constants.isClient)
|
|
12456
|
-
if (rAF) {
|
|
12457
|
-
let layoutOnAnimationFrame = function() {
|
|
12458
|
-
var now = Date.now(), timeSinceLastFrame = now - lastFrameAt;
|
|
12459
|
-
if (lastFrameAt = now, strategy !== "off") {
|
|
12460
|
-
var expectedFrameTime = 16.67, hasRecentSyncWork = timeSinceLastFrame > expectedFrameTime * numDroppedFramesUntilPause;
|
|
12461
|
-
hasRecentSyncWork || Nodes.forEach(updateLayoutIfChanged);
|
|
12462
|
-
}
|
|
12463
|
-
rAF(layoutOnAnimationFrame);
|
|
12464
|
-
};
|
|
12465
|
-
layoutOnAnimationFrame2 = layoutOnAnimationFrame, avoidUpdates = !0, queuedUpdates = /* @__PURE__ */ new Map(), lastFrameAt = Date.now(), numDroppedFramesUntilPause = 2, (0, import_web.___onDidFinishClientRender)(function() {
|
|
12466
|
-
avoidUpdates = !1, queuedUpdates && (queuedUpdates.forEach(function(cb) {
|
|
12467
|
-
return cb();
|
|
12468
|
-
}), queuedUpdates.clear());
|
|
12469
|
-
});
|
|
12470
|
-
async function updateLayoutIfChanged(node) {
|
|
12471
|
-
var nodeRect = node.getBoundingClientRect(), parentNode = node.parentElement, parentRect = parentNode == null ? void 0 : parentNode.getBoundingClientRect(), onLayout = LayoutHandlers.get(node);
|
|
12472
|
-
if (typeof onLayout == "function") {
|
|
12473
|
-
var cachedRect = NodeRectCache.get(node), cachedParentRect = parentNode ? NodeRectCache.get(parentNode) : null;
|
|
12474
|
-
if (!cachedRect || // has changed one rect
|
|
12475
|
-
!(0, import_web.isEqualShallow)(cachedRect, nodeRect) && (!cachedParentRect || !(0, import_web.isEqualShallow)(cachedParentRect, parentRect)))
|
|
12476
|
-
if (NodeRectCache.set(node, nodeRect), parentRect && parentNode && ParentRectCache.set(parentNode, parentRect), avoidUpdates) {
|
|
12477
|
-
var event = getElementLayoutEvent(node);
|
|
12478
|
-
queuedUpdates.set(node, function() {
|
|
12479
|
-
return onLayout(event);
|
|
12480
|
-
});
|
|
12481
|
-
} else if (strategy === "async") {
|
|
12482
|
-
var now = Date.now();
|
|
12483
|
-
LastChangeTime.set(node, now);
|
|
12484
|
-
var existingTimer = DebounceTimers.get(node);
|
|
12485
|
-
existingTimer && clearTimeout(existingTimer);
|
|
12486
|
-
var timer = setTimeout(async function() {
|
|
12487
|
-
var lastChange = LastChangeTime.get(node) || 0, timeSinceChange = Date.now() - lastChange;
|
|
12488
|
-
if (timeSinceChange >= DEBOUNCE_DELAY) {
|
|
12489
|
-
var event2 = await getElementLayoutEventAsync(node);
|
|
12490
|
-
onLayout(event2), DebounceTimers.delete(node);
|
|
12491
|
-
} else {
|
|
12492
|
-
var remainingDelay = DEBOUNCE_DELAY - timeSinceChange, newTimer = setTimeout(async function() {
|
|
12493
|
-
var event3 = await getElementLayoutEventAsync(node);
|
|
12494
|
-
onLayout(event3), DebounceTimers.delete(node);
|
|
12495
|
-
}, remainingDelay);
|
|
12496
|
-
DebounceTimers.set(node, newTimer);
|
|
12497
|
-
}
|
|
12498
|
-
}, DEBOUNCE_DELAY);
|
|
12499
|
-
DebounceTimers.set(node, timer);
|
|
12500
|
-
} else {
|
|
12501
|
-
var event1 = getElementLayoutEvent(node);
|
|
12502
|
-
onLayout(event1);
|
|
12503
|
-
}
|
|
12504
|
-
}
|
|
12505
|
-
}
|
|
12506
|
-
rAF(layoutOnAnimationFrame);
|
|
12507
|
-
} else
|
|
12508
|
-
process.env.NODE_ENV === "development" && console.warn("No requestAnimationFrame - please polyfill for onLayout to work correctly");
|
|
12509
|
-
var avoidUpdates, queuedUpdates, lastFrameAt, numDroppedFramesUntilPause, layoutOnAnimationFrame2, getElementLayoutEvent = function(target) {
|
|
12510
|
-
var res = null;
|
|
12511
|
-
if (measureLayout(target, null, function(x, y, width, height, left, top) {
|
|
12512
|
-
res = {
|
|
12513
|
-
nativeEvent: {
|
|
12514
|
-
layout: {
|
|
12515
|
-
x,
|
|
12516
|
-
y,
|
|
12517
|
-
width,
|
|
12518
|
-
height,
|
|
12519
|
-
left,
|
|
12520
|
-
top
|
|
12521
|
-
},
|
|
12522
|
-
target
|
|
12523
|
-
},
|
|
12524
|
-
timeStamp: Date.now()
|
|
12525
|
-
};
|
|
12526
|
-
}), !res)
|
|
12527
|
-
throw new Error("\u203C\uFE0F");
|
|
12528
|
-
return res;
|
|
12529
|
-
}, measureLayout = function(node, relativeTo, callback) {
|
|
12530
|
-
var relativeNode = relativeTo || (node == null ? void 0 : node.parentElement);
|
|
12531
|
-
if (relativeNode instanceof HTMLElement) {
|
|
12532
|
-
var nodeDim = node.getBoundingClientRect(), relativeNodeDim = relativeNode.getBoundingClientRect();
|
|
12533
|
-
if (relativeNodeDim && nodeDim) {
|
|
12534
|
-
var { x, y, width, height, left, top } = getRelativeDimensions(nodeDim, relativeNodeDim);
|
|
12535
|
-
callback(x, y, width, height, left, top);
|
|
12536
|
-
}
|
|
12537
|
-
}
|
|
12538
|
-
}, getElementLayoutEventAsync = async function(target) {
|
|
12539
|
-
var res = null;
|
|
12540
|
-
if (await measureLayoutAsync(target, null, function(x, y, width, height, left, top) {
|
|
12541
|
-
res = {
|
|
12542
|
-
nativeEvent: {
|
|
12543
|
-
layout: {
|
|
12544
|
-
x,
|
|
12545
|
-
y,
|
|
12546
|
-
width,
|
|
12547
|
-
height,
|
|
12548
|
-
left,
|
|
12549
|
-
top
|
|
12550
|
-
},
|
|
12551
|
-
target
|
|
12552
|
-
},
|
|
12553
|
-
timeStamp: Date.now()
|
|
12554
|
-
};
|
|
12555
|
-
}), !res)
|
|
12556
|
-
throw new Error("\u203C\uFE0F");
|
|
12557
|
-
return res;
|
|
12558
|
-
}, measureLayoutAsync = async function(node, relativeTo, callback) {
|
|
12559
|
-
var relativeNode = relativeTo || (node == null ? void 0 : node.parentElement);
|
|
12560
|
-
if (relativeNode instanceof HTMLElement) {
|
|
12561
|
-
var [nodeDim, relativeNodeDim] = await Promise.all([
|
|
12562
|
-
node.getBoundingClientRect(),
|
|
12563
|
-
relativeNode.getBoundingClientRect()
|
|
12564
|
-
]);
|
|
12565
|
-
if (relativeNodeDim && nodeDim) {
|
|
12566
|
-
var { x, y, width, height, left, top } = getRelativeDimensions(nodeDim, relativeNodeDim);
|
|
12567
|
-
callback(x, y, width, height, left, top);
|
|
12568
|
-
}
|
|
12569
|
-
}
|
|
12570
|
-
}, getRelativeDimensions = function(a, b) {
|
|
12571
|
-
var { height, left, top, width } = a, x = left - b.left, y = top - b.top;
|
|
12572
|
-
return {
|
|
12573
|
-
x,
|
|
12574
|
-
y,
|
|
12575
|
-
width,
|
|
12576
|
-
height,
|
|
12577
|
-
left,
|
|
12578
|
-
top
|
|
12579
|
-
};
|
|
12580
|
-
};
|
|
12581
|
-
|
|
12582
12645
|
// src/vendor/Pressability.native.tsx
|
|
12583
12646
|
var Pressability = require_fake_react_native().default, usePressability = (init_idFn(), __toCommonJS(idFn_exports)).default;
|
|
12584
12647
|
|
|
12585
12648
|
// src/index.tsx
|
|
12586
|
-
|
|
12649
|
+
var import_use_element_layout2 = __toESM(require_index_native12());
|
|
12650
|
+
__reExport(index_exports, __toESM(require_index_native9()), module.exports);
|
|
12587
12651
|
addNativeValidStyles();
|
|
12588
|
-
var
|
|
12589
|
-
return
|
|
12652
|
+
var TamaguiProvider = function(props) {
|
|
12653
|
+
return (0, import_web.useIsomorphicLayoutEffect)(function() {
|
|
12654
|
+
(0, import_use_element_layout.enable)();
|
|
12655
|
+
}, []), /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_web.TamaguiProvider, {
|
|
12656
|
+
...props
|
|
12657
|
+
});
|
|
12658
|
+
}, createTamagui = function(conf) {
|
|
12659
|
+
return conf.media && (conf.media = (0, import_react_native_media_driver.createMedia)(conf.media)), (0, import_web.createTamagui)(conf);
|
|
12590
12660
|
}, baseViews = getBaseViews();
|
|
12591
|
-
(0,
|
|
12661
|
+
(0, import_web.setupHooks)({
|
|
12592
12662
|
getBaseViews,
|
|
12593
12663
|
setElementProps: function(node) {
|
|
12594
12664
|
if (node && !node.measure) {
|
|
12595
12665
|
var _node, _node1, _node2;
|
|
12596
12666
|
(_node = node).measure || (_node.measure = function(callback) {
|
|
12597
|
-
return measureLayout(node, null, callback);
|
|
12667
|
+
return (0, import_use_element_layout.measureLayout)(node, null, callback);
|
|
12598
12668
|
}), (_node1 = node).measureLayout || (_node1.measureLayout = function(relativeToNode, success) {
|
|
12599
|
-
return measureLayout(node, relativeToNode, success);
|
|
12669
|
+
return (0, import_use_element_layout.measureLayout)(node, relativeToNode, success);
|
|
12600
12670
|
}), (_node2 = node).measureInWindow || (_node2.measureInWindow = function(callback) {
|
|
12601
12671
|
setTimeout(function() {
|
|
12602
|
-
var { height, left, top, width } = getRect(node);
|
|
12672
|
+
var { height, left, top, width } = (0, import_use_element_layout.getRect)(node);
|
|
12603
12673
|
callback(left, top, width, height);
|
|
12604
12674
|
}, 0);
|
|
12605
12675
|
});
|
|
@@ -12620,7 +12690,7 @@ var createTamagui = function(conf) {
|
|
|
12620
12690
|
onPressIn,
|
|
12621
12691
|
onPressOut: onPressOut || onPress
|
|
12622
12692
|
};
|
|
12623
|
-
onPressOut && onPress && (inputEvents.onPressOut = (0,
|
|
12693
|
+
onPressOut && onPress && (inputEvents.onPressOut = (0, import_web.composeEventHandlers)(onPress, onPressOut)), Object.assign(viewProps, inputEvents);
|
|
12624
12694
|
}
|
|
12625
12695
|
} else {
|
|
12626
12696
|
events && viewProps.hitSlop && (events.hitSlop = viewProps.hitSlop);
|
|
@@ -12628,7 +12698,7 @@ var createTamagui = function(conf) {
|
|
|
12628
12698
|
if (events && (process.env.NODE_ENV === "development" && viewProps.debug && console.info(`Checking for press ${!!events.onPress} then applying pressability props: ${Object.keys(pressability || {})}`), events.onPress))
|
|
12629
12699
|
for (var key in pressability) {
|
|
12630
12700
|
var og = viewProps[key], val = pressability[key];
|
|
12631
|
-
viewProps[key] = og && !dontComposePressabilityKeys[key] ? (0,
|
|
12701
|
+
viewProps[key] = og && !dontComposePressabilityKeys[key] ? (0, import_web.composeEventHandlers)(og, val) : val;
|
|
12632
12702
|
}
|
|
12633
12703
|
}
|
|
12634
12704
|
},
|
|
@@ -12643,10 +12713,11 @@ var createTamagui = function(conf) {
|
|
|
12643
12713
|
});
|
|
12644
12714
|
var dontComposePressabilityKeys = {
|
|
12645
12715
|
onClick: !0
|
|
12646
|
-
}, View =
|
|
12716
|
+
}, View = import_web.View, Stack = import_web.Stack, Text = import_web.Text;
|
|
12647
12717
|
// Annotate the CommonJS export names for ESM import in node:
|
|
12648
12718
|
0 && (module.exports = {
|
|
12649
12719
|
Stack,
|
|
12720
|
+
TamaguiProvider,
|
|
12650
12721
|
Text,
|
|
12651
12722
|
View,
|
|
12652
12723
|
createTamagui,
|