@tamagui/core 3.0.6 → 3.0.8
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/createOptimizedView.native.cjs +2 -2
- package/dist/cjs/createOptimizedView.native.js +2 -2
- package/dist/cjs/createOptimizedView.native.js.map +1 -1
- package/dist/cjs/inject-styles.native.cjs +1 -1
- package/dist/cjs/inject-styles.native.js +1 -1
- package/dist/cjs/inject-styles.native.js.map +1 -1
- package/dist/cjs/runtime.native.cjs +4 -5
- package/dist/cjs/runtime.native.js +4 -5
- package/dist/cjs/runtime.native.js.map +1 -1
- package/dist/esm/createOptimizedView.native.js +2 -2
- package/dist/esm/createOptimizedView.native.js.map +1 -1
- package/dist/esm/inject-styles.native.js +1 -1
- package/dist/esm/inject-styles.native.js.map +1 -1
- package/dist/esm/runtime.native.js +4 -5
- package/dist/esm/runtime.native.js.map +1 -1
- package/dist/native.cjs +327 -335
- package/dist/test.native.cjs +305 -316
- package/package.json +13 -13
package/dist/test.native.cjs
CHANGED
|
@@ -86,7 +86,7 @@ function createRefComponent(render) {
|
|
|
86
86
|
}
|
|
87
87
|
//#endregion
|
|
88
88
|
//#region ../web/dist/esm/helpers/isObj.native.js
|
|
89
|
-
var isObj = function(x) {
|
|
89
|
+
var isObj = function isObj2(x) {
|
|
90
90
|
return x && !Array.isArray(x) && typeof x === "object";
|
|
91
91
|
};
|
|
92
92
|
function isPlainObject(value) {
|
|
@@ -96,20 +96,20 @@ function isPlainObject(value) {
|
|
|
96
96
|
}
|
|
97
97
|
//#endregion
|
|
98
98
|
//#region ../web/dist/esm/helpers/mergeProps.native.js
|
|
99
|
-
var mergeLayer = function(out, layer) {
|
|
99
|
+
var mergeLayer = function mergeLayer2(out, layer) {
|
|
100
100
|
for (var key in layer) {
|
|
101
101
|
var value = layer[key];
|
|
102
102
|
if (value === void 0 && key in out) continue;
|
|
103
103
|
out[key] = value;
|
|
104
104
|
}
|
|
105
105
|
};
|
|
106
|
-
var mergeProps = function(defaultProps, props) {
|
|
106
|
+
var mergeProps = function mergeProps2(defaultProps, props) {
|
|
107
107
|
var out = {};
|
|
108
108
|
mergeLayer(out, defaultProps);
|
|
109
109
|
mergeLayer(out, props);
|
|
110
110
|
return out;
|
|
111
111
|
};
|
|
112
|
-
var mergeComponentProps = function(defaultProps, contextProps, props) {
|
|
112
|
+
var mergeComponentProps = function mergeComponentProps2(defaultProps, contextProps, props) {
|
|
113
113
|
var overriddenContext = null;
|
|
114
114
|
if (!defaultProps && !contextProps) return [props, overriddenContext];
|
|
115
115
|
var out = {};
|
|
@@ -155,7 +155,7 @@ var _excluded$9 = [
|
|
|
155
155
|
"scope",
|
|
156
156
|
"__disableMergeDefaultValues"
|
|
157
157
|
];
|
|
158
|
-
var createStyledContext = function(defaultValues) {
|
|
158
|
+
var createStyledContext = function createStyledContext2(defaultValues) {
|
|
159
159
|
"use no memo";
|
|
160
160
|
var namespaceOrOptions = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
|
161
161
|
var namespace = typeof namespaceOrOptions === "string" ? namespaceOrOptions : namespaceOrOptions.namespace || "";
|
|
@@ -174,10 +174,10 @@ var createStyledContext = function(defaultValues) {
|
|
|
174
174
|
}
|
|
175
175
|
return ScopedContext;
|
|
176
176
|
}
|
|
177
|
-
var getNamespacedScope = function(scope) {
|
|
177
|
+
var getNamespacedScope = function getNamespacedScope2(scope) {
|
|
178
178
|
return namespace ? `${namespace}--${scope}` : scope;
|
|
179
179
|
};
|
|
180
|
-
var Provider = function(param) {
|
|
180
|
+
var Provider = function Provider2(param) {
|
|
181
181
|
var { children, scope: scopeIn, __disableMergeDefaultValues } = param, values = _objectWithoutProperties(param, _excluded$9);
|
|
182
182
|
var scope = getNamespacedScope(scopeIn);
|
|
183
183
|
var next = react.default.useMemo(function() {
|
|
@@ -193,7 +193,7 @@ var createStyledContext = function(defaultValues) {
|
|
|
193
193
|
})
|
|
194
194
|
});
|
|
195
195
|
};
|
|
196
|
-
var useStyledContext = function() {
|
|
196
|
+
var useStyledContext = function useStyledContext2() {
|
|
197
197
|
var scopeIn = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : "";
|
|
198
198
|
var lastScopeInNamespace = react.default.useContext(LastScopeInNamespace);
|
|
199
199
|
var scope = namespace ? scopeIn ? getNamespacedScope(scopeIn) : lastScopeInNamespace : scopeIn;
|
|
@@ -232,7 +232,7 @@ var ComponentContext = createStyledContext({
|
|
|
232
232
|
"setParentFocusState",
|
|
233
233
|
"insets"
|
|
234
234
|
] });
|
|
235
|
-
var useConfiguration = function() {
|
|
235
|
+
var useConfiguration = function useConfiguration2() {
|
|
236
236
|
return (0, react.useContext)(ComponentContext);
|
|
237
237
|
};
|
|
238
238
|
//#endregion
|
|
@@ -410,7 +410,7 @@ function formatDiagnosticValue(value) {
|
|
|
410
410
|
var items1 = keys.map(function(key2) {
|
|
411
411
|
try {
|
|
412
412
|
return `${key2}: ${formatDiagnosticValue(value[key2], depth + 1, seen)}`;
|
|
413
|
-
} catch (
|
|
413
|
+
} catch (unused) {
|
|
414
414
|
return `${key2}: [Unavailable]`;
|
|
415
415
|
}
|
|
416
416
|
});
|
|
@@ -459,7 +459,7 @@ function canonicalTransitionProperty(key) {
|
|
|
459
459
|
//#region ../simple-hash/dist/esm/index.native.js
|
|
460
460
|
var cache$2 = /* @__PURE__ */ new Map();
|
|
461
461
|
var cacheSize = 0;
|
|
462
|
-
var simpleHash = function(strIn) {
|
|
462
|
+
var simpleHash = function simpleHash2(strIn) {
|
|
463
463
|
var hashMin = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 10;
|
|
464
464
|
var cacheKey = `${hashMin}:${strIn}`;
|
|
465
465
|
if (cache$2.has(cacheKey)) return cache$2.get(cacheKey);
|
|
@@ -493,7 +493,7 @@ var simpleHash = function(strIn) {
|
|
|
493
493
|
cacheSize++;
|
|
494
494
|
return res;
|
|
495
495
|
};
|
|
496
|
-
var hashChar = function(hash, c) {
|
|
496
|
+
var hashChar = function hashChar2(hash, c) {
|
|
497
497
|
return Math.imul(31, hash) + c.charCodeAt(0) | 0;
|
|
498
498
|
};
|
|
499
499
|
function isValidCSSCharCode(code) {
|
|
@@ -1111,7 +1111,7 @@ var cssStyleProps = {
|
|
|
1111
1111
|
};
|
|
1112
1112
|
//#endregion
|
|
1113
1113
|
//#region ../helpers/dist/esm/toStylePropsObject.native.js
|
|
1114
|
-
var toStylePropsObject = function() {
|
|
1114
|
+
var toStylePropsObject = function toStylePropsObject2() {
|
|
1115
1115
|
for (var _len = arguments.length, sources = new Array(_len), _key = 0; _key < _len; _key++) sources[_key] = arguments[_key];
|
|
1116
1116
|
var out = {};
|
|
1117
1117
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
@@ -1178,7 +1178,7 @@ var validStyles = stylePropsView;
|
|
|
1178
1178
|
//#endregion
|
|
1179
1179
|
//#region ../helpers/dist/esm/withStaticProperties.native.js
|
|
1180
1180
|
var Decorated = /* @__PURE__ */ Symbol();
|
|
1181
|
-
var withStaticProperties = function(component, staticProps) {
|
|
1181
|
+
var withStaticProperties = function withStaticProperties2(component, staticProps) {
|
|
1182
1182
|
var out = (function() {
|
|
1183
1183
|
if (component[Decorated]) return typeof component === "function" ? Object.assign(component.bind(null), component) : _objectSpread2({}, component);
|
|
1184
1184
|
return component;
|
|
@@ -1330,13 +1330,13 @@ function parseFlatValueProduction(source) {
|
|
|
1330
1330
|
var length = source.length;
|
|
1331
1331
|
var segments = [];
|
|
1332
1332
|
var sawChain = false, chainStart = -1, chainEnd = -1, segmentStart = 0, wordStart = -1, lastColon = -1, quote = 0, comment = false, depth = 0, valid = true, clauseChainValid = true, currentChainValid = true, chainNonPlatformModifiers = null;
|
|
1333
|
-
var close = function(end) {
|
|
1333
|
+
var close = function close2(end) {
|
|
1334
1334
|
var start = segmentStart;
|
|
1335
1335
|
while (start < end && source.charCodeAt(start) <= 32) start++;
|
|
1336
1336
|
while (end > start && source.charCodeAt(end - 1) <= 32) end--;
|
|
1337
1337
|
segments.push(start, end, chainStart, chainEnd, (!sawChain ? 1 : 0) | (clauseChainValid ? 6 : 0));
|
|
1338
1338
|
};
|
|
1339
|
-
var flush = function() {
|
|
1339
|
+
var flush = function flush2() {
|
|
1340
1340
|
if (wordStart !== -1 && lastColon !== -1) {
|
|
1341
1341
|
chainStart = wordStart;
|
|
1342
1342
|
chainEnd = lastColon;
|
|
@@ -1426,19 +1426,19 @@ function parseFlatValueChecked(source) {
|
|
|
1426
1426
|
var length = source.length;
|
|
1427
1427
|
var segments = [];
|
|
1428
1428
|
var failure = null, failureIndex = -1, sawChain = false, chainStart = -1, chainEnd = -1, chainValid = true, segmentValid = true, segmentStart = 0, comment = false, commentStart = -1, quote = 0, quoteStart = -1, url = false, depth = 0, parenStart = -1, wordStart = -1, lastColon = -1, wordErrorMin = length, wordErrorMax = -1, chainNonPlatformModifiers = null;
|
|
1429
|
-
var report = function(code2, index2) {
|
|
1429
|
+
var report = function report2(code2, index2) {
|
|
1430
1430
|
if (failureIndex === -1) failureIndex = index2;
|
|
1431
1431
|
failure !== null && failure !== void 0 || (failure = code2);
|
|
1432
1432
|
wordErrorMin = Math.min(wordErrorMin, index2);
|
|
1433
1433
|
wordErrorMax = Math.max(wordErrorMax, index2);
|
|
1434
1434
|
};
|
|
1435
|
-
var close = function(end) {
|
|
1435
|
+
var close = function close2(end) {
|
|
1436
1436
|
var start = segmentStart;
|
|
1437
1437
|
while (start < end && source.charCodeAt(start) <= 32) start++;
|
|
1438
1438
|
while (end > start && source.charCodeAt(end - 1) <= 32) end--;
|
|
1439
1439
|
segments.push(start, end, chainStart, chainEnd, (!sawChain ? 1 : 0) | (segmentValid ? 2 : 0) | (chainValid ? 4 : 0));
|
|
1440
1440
|
};
|
|
1441
|
-
var flush = function(end) {
|
|
1441
|
+
var flush = function flush2(end) {
|
|
1442
1442
|
if (wordStart !== -1 && lastColon !== -1) {
|
|
1443
1443
|
chainStart = wordStart;
|
|
1444
1444
|
chainEnd = lastColon;
|
|
@@ -1590,8 +1590,9 @@ function isRootThemeName(name) {
|
|
|
1590
1590
|
return name.length > 0 && !name.includes("_");
|
|
1591
1591
|
}
|
|
1592
1592
|
function compileModifierVocabulary(view, onRefusal, onRegistered) {
|
|
1593
|
+
var _view_platformNames;
|
|
1593
1594
|
var names = /* @__PURE__ */ Object.create(null);
|
|
1594
|
-
var register = function(name2, code) {
|
|
1595
|
+
var register = function register2(name2, code) {
|
|
1595
1596
|
var kind = code & 7;
|
|
1596
1597
|
if (name2.charCodeAt(0) === 64) {
|
|
1597
1598
|
onRefusal === null || onRefusal === void 0 || onRefusal(1, name2, kind, 0);
|
|
@@ -1628,7 +1629,6 @@ function compileModifierVocabulary(view, onRefusal, onRegistered) {
|
|
|
1628
1629
|
forEachModifierName(view.mediaNames, function(name2, rank2) {
|
|
1629
1630
|
return register(name2, 2 | rank2 << 3);
|
|
1630
1631
|
});
|
|
1631
|
-
var _view_platformNames;
|
|
1632
1632
|
forEachModifierName((_view_platformNames = view.platformNames) !== null && _view_platformNames !== void 0 ? _view_platformNames : grammarPlatformNames, function(name2) {
|
|
1633
1633
|
return register(name2, 3 | grammarPlatformRank(name2) << 3);
|
|
1634
1634
|
});
|
|
@@ -1885,6 +1885,7 @@ function createGlobalState(key, defaultValue) {
|
|
|
1885
1885
|
//#region ../native/dist/esm/gestureState.native.js
|
|
1886
1886
|
var _globalThis;
|
|
1887
1887
|
var _PRESS_STATE_KEY;
|
|
1888
|
+
var _$1;
|
|
1888
1889
|
var state$1 = createGlobalState(`gesture`, {
|
|
1889
1890
|
enabled: false,
|
|
1890
1891
|
Gesture: null,
|
|
@@ -1919,12 +1920,11 @@ var PRESS_MOVE_CANCEL_DISTANCE = 12;
|
|
|
1919
1920
|
var PRESS_MOVE_CANCEL_DISTANCE_SQ = PRESS_MOVE_CANCEL_DISTANCE * PRESS_MOVE_CANCEL_DISTANCE;
|
|
1920
1921
|
var PRESS_STATE_KEY = "__tamagui_press_state__";
|
|
1921
1922
|
function getEventPointerId(e) {
|
|
1923
|
+
var _ref, _ref1, _ref2, _ref3, _ref4, _ref5, _ref6, _ref7;
|
|
1922
1924
|
var _e_pointer, _e_event, _e_event_pointer, _e_event1, _e_nativeEvent, _e_nativeEvent1, _e_event_nativeEvent, _e_event2, _e_event_nativeEvent1, _e_event3;
|
|
1923
|
-
var
|
|
1924
|
-
var pointerId = (_ref6 = (_ref5 = (_ref4 = (_ref3 = (_ref2 = (_ref1 = (_ref = (_e_pointerId = e === null || e === void 0 ? void 0 : e.pointerId) !== null && _e_pointerId !== void 0 ? _e_pointerId : e === null || e === void 0 ? void 0 : (_e_pointer = e.pointer) === null || _e_pointer === void 0 ? void 0 : _e_pointer.id) !== null && _ref !== void 0 ? _ref : e === null || e === void 0 ? void 0 : (_e_event = e.event) === null || _e_event === void 0 ? void 0 : _e_event.pointerId) !== null && _ref1 !== void 0 ? _ref1 : e === null || e === void 0 ? void 0 : (_e_event1 = e.event) === null || _e_event1 === void 0 ? void 0 : (_e_event_pointer = _e_event1.pointer) === null || _e_event_pointer === void 0 ? void 0 : _e_event_pointer.id) !== null && _ref2 !== void 0 ? _ref2 : e === null || e === void 0 ? void 0 : (_e_nativeEvent = e.nativeEvent) === null || _e_nativeEvent === void 0 ? void 0 : _e_nativeEvent.pointerId) !== null && _ref3 !== void 0 ? _ref3 : e === null || e === void 0 ? void 0 : (_e_nativeEvent1 = e.nativeEvent) === null || _e_nativeEvent1 === void 0 ? void 0 : _e_nativeEvent1.id) !== null && _ref4 !== void 0 ? _ref4 : e === null || e === void 0 ? void 0 : (_e_event2 = e.event) === null || _e_event2 === void 0 ? void 0 : (_e_event_nativeEvent = _e_event2.nativeEvent) === null || _e_event_nativeEvent === void 0 ? void 0 : _e_event_nativeEvent.pointerId) !== null && _ref5 !== void 0 ? _ref5 : e === null || e === void 0 ? void 0 : (_e_event3 = e.event) === null || _e_event3 === void 0 ? void 0 : (_e_event_nativeEvent1 = _e_event3.nativeEvent) === null || _e_event_nativeEvent1 === void 0 ? void 0 : _e_event_nativeEvent1.id) !== null && _ref6 !== void 0 ? _ref6 : null;
|
|
1925
|
+
var pointerId = (_ref = (_ref1 = (_ref2 = (_ref3 = (_ref4 = (_ref5 = (_ref6 = (_ref7 = e === null || e === void 0 ? void 0 : e.pointerId) !== null && _ref7 !== void 0 ? _ref7 : e === null || e === void 0 ? void 0 : (_e_pointer = e.pointer) === null || _e_pointer === void 0 ? void 0 : _e_pointer.id) !== null && _ref6 !== void 0 ? _ref6 : e === null || e === void 0 ? void 0 : (_e_event = e.event) === null || _e_event === void 0 ? void 0 : _e_event.pointerId) !== null && _ref5 !== void 0 ? _ref5 : e === null || e === void 0 ? void 0 : (_e_event1 = e.event) === null || _e_event1 === void 0 ? void 0 : (_e_event_pointer = _e_event1.pointer) === null || _e_event_pointer === void 0 ? void 0 : _e_event_pointer.id) !== null && _ref4 !== void 0 ? _ref4 : e === null || e === void 0 ? void 0 : (_e_nativeEvent = e.nativeEvent) === null || _e_nativeEvent === void 0 ? void 0 : _e_nativeEvent.pointerId) !== null && _ref3 !== void 0 ? _ref3 : e === null || e === void 0 ? void 0 : (_e_nativeEvent1 = e.nativeEvent) === null || _e_nativeEvent1 === void 0 ? void 0 : _e_nativeEvent1.id) !== null && _ref2 !== void 0 ? _ref2 : e === null || e === void 0 ? void 0 : (_e_event2 = e.event) === null || _e_event2 === void 0 ? void 0 : (_e_event_nativeEvent = _e_event2.nativeEvent) === null || _e_event_nativeEvent === void 0 ? void 0 : _e_event_nativeEvent.pointerId) !== null && _ref1 !== void 0 ? _ref1 : e === null || e === void 0 ? void 0 : (_e_event3 = e.event) === null || _e_event3 === void 0 ? void 0 : (_e_event_nativeEvent1 = _e_event3.nativeEvent) === null || _e_event_nativeEvent1 === void 0 ? void 0 : _e_event_nativeEvent1.id) !== null && _ref !== void 0 ? _ref : null;
|
|
1925
1926
|
return pointerId == null || Number.isNaN(pointerId) ? null : Number(pointerId);
|
|
1926
1927
|
}
|
|
1927
|
-
var _$1;
|
|
1928
1928
|
var pressState = (_$1 = (_globalThis = globalThis)[_PRESS_STATE_KEY = PRESS_STATE_KEY]) !== null && _$1 !== void 0 ? _$1 : _globalThis[_PRESS_STATE_KEY] = {
|
|
1929
1929
|
owner: null,
|
|
1930
1930
|
ownerId: null,
|
|
@@ -1963,9 +1963,9 @@ function getGestureHandler() {
|
|
|
1963
1963
|
state$1.get().enabled = false;
|
|
1964
1964
|
},
|
|
1965
1965
|
createPressGesture(config) {
|
|
1966
|
+
var _config_delayLongPress;
|
|
1966
1967
|
var { Gesture } = state$1.get();
|
|
1967
1968
|
if (!Gesture) return null;
|
|
1968
|
-
var _config_delayLongPress;
|
|
1969
1969
|
var longPressDuration = (_config_delayLongPress = config.delayLongPress) !== null && _config_delayLongPress !== void 0 ? _config_delayLongPress : 500;
|
|
1970
1970
|
var myToken = {};
|
|
1971
1971
|
var myDebugId = ++pressGestureDebugId;
|
|
@@ -1978,7 +1978,7 @@ function getGestureHandler() {
|
|
|
1978
1978
|
cancelledByMove: false
|
|
1979
1979
|
};
|
|
1980
1980
|
var GRACE_PERIOD_MS = process.env.TAMAGUI_RNGH_PRESS_DELAY ? +process.env.TAMAGUI_RNGH_PRESS_DELAY : 24;
|
|
1981
|
-
var tryClaimOwnership = function(e) {
|
|
1981
|
+
var tryClaimOwnership = function tryClaimOwnership2(e) {
|
|
1982
1982
|
var now = Date.now();
|
|
1983
1983
|
resetStaleOwner(now, config.debugName);
|
|
1984
1984
|
var currentPointerId = getEventPointerId(e);
|
|
@@ -1992,24 +1992,24 @@ function getGestureHandler() {
|
|
|
1992
1992
|
}
|
|
1993
1993
|
return pressState.owner === myToken;
|
|
1994
1994
|
};
|
|
1995
|
-
var isOwner = function() {
|
|
1995
|
+
var isOwner = function isOwner2() {
|
|
1996
1996
|
return pressState.owner === myToken;
|
|
1997
1997
|
};
|
|
1998
|
-
var releaseOwnership = function() {
|
|
1998
|
+
var releaseOwnership = function releaseOwnership2() {
|
|
1999
1999
|
if (flags.pressInTimer) {
|
|
2000
2000
|
clearTimeout(flags.pressInTimer);
|
|
2001
2001
|
flags.pressInTimer = null;
|
|
2002
2002
|
}
|
|
2003
2003
|
if (pressState.owner === myToken) resetPressOwner();
|
|
2004
2004
|
};
|
|
2005
|
-
var firePressIn = function(e) {
|
|
2005
|
+
var firePressIn = function firePressIn2(e) {
|
|
2006
2006
|
if (!flags.didPressIn && isOwner()) {
|
|
2007
2007
|
var _config_onPressIn;
|
|
2008
2008
|
flags.didPressIn = true;
|
|
2009
2009
|
(_config_onPressIn = config.onPressIn) === null || _config_onPressIn === void 0 || _config_onPressIn.call(config, e);
|
|
2010
2010
|
}
|
|
2011
2011
|
};
|
|
2012
|
-
var schedulePressIn = function(e) {
|
|
2012
|
+
var schedulePressIn = function schedulePressIn2(e) {
|
|
2013
2013
|
if (flags.pressInTimer) clearTimeout(flags.pressInTimer);
|
|
2014
2014
|
flags.pressInTimer = setTimeout(function() {
|
|
2015
2015
|
flags.pressInTimer = null;
|
|
@@ -2025,10 +2025,10 @@ function getGestureHandler() {
|
|
|
2025
2025
|
tryClaimOwnership(e);
|
|
2026
2026
|
schedulePressIn(e);
|
|
2027
2027
|
}).onTouchesMove(function(e) {
|
|
2028
|
+
var _ref;
|
|
2028
2029
|
var _e_changedTouches, _e_allTouches;
|
|
2029
2030
|
if (flags.cancelledByMove || flags.moveStartX === null) return;
|
|
2030
|
-
var
|
|
2031
|
-
var touch = (_e_changedTouches_ = (_e_changedTouches = e.changedTouches) === null || _e_changedTouches === void 0 ? void 0 : _e_changedTouches[0]) !== null && _e_changedTouches_ !== void 0 ? _e_changedTouches_ : (_e_allTouches = e.allTouches) === null || _e_allTouches === void 0 ? void 0 : _e_allTouches[0];
|
|
2031
|
+
var touch = (_ref = (_e_changedTouches = e.changedTouches) === null || _e_changedTouches === void 0 ? void 0 : _e_changedTouches[0]) !== null && _ref !== void 0 ? _ref : (_e_allTouches = e.allTouches) === null || _e_allTouches === void 0 ? void 0 : _e_allTouches[0];
|
|
2032
2032
|
if (!touch) return;
|
|
2033
2033
|
var dx = touch.absoluteX - flags.moveStartX;
|
|
2034
2034
|
var dy = touch.absoluteY - flags.moveStartY;
|
|
@@ -2147,14 +2147,13 @@ function hasSafeAreaSetup() {
|
|
|
2147
2147
|
//#region ../native/dist/esm/nativeMenuContext.native.js
|
|
2148
2148
|
var _g;
|
|
2149
2149
|
var _KEY;
|
|
2150
|
-
var KEY = "__tamagui_native_menu_context__";
|
|
2151
|
-
var g = globalThis;
|
|
2152
2150
|
var _;
|
|
2153
|
-
var NativeMenuContext = (_ = (_g =
|
|
2151
|
+
var NativeMenuContext = (_ = (_g = globalThis)[_KEY = "__tamagui_native_menu_context__"]) !== null && _ !== void 0 ? _ : _g[_KEY] = (0, react.createContext)(false);
|
|
2154
2152
|
//#endregion
|
|
2155
2153
|
//#region ../web/dist/esm/helpers/resolveSafeAreaVariable.native.js
|
|
2156
2154
|
var didWarnMissingSetup = false;
|
|
2157
2155
|
function resolveSafeAreaVariable(name) {
|
|
2156
|
+
var _ref;
|
|
2158
2157
|
var _state_initialMetrics;
|
|
2159
2158
|
var edge = name.startsWith("safe-area-") ? name.slice(10) : "";
|
|
2160
2159
|
if (edge !== "top" && edge !== "right" && edge !== "bottom" && edge !== "left") return;
|
|
@@ -2166,8 +2165,7 @@ function resolveSafeAreaVariable(name) {
|
|
|
2166
2165
|
}
|
|
2167
2166
|
return 0;
|
|
2168
2167
|
}
|
|
2169
|
-
|
|
2170
|
-
return state.enabled ? (_state_initialMetrics_insets_edge = (_state_initialMetrics = state.initialMetrics) === null || _state_initialMetrics === void 0 ? void 0 : _state_initialMetrics.insets[edge]) !== null && _state_initialMetrics_insets_edge !== void 0 ? _state_initialMetrics_insets_edge : 0 : 0;
|
|
2168
|
+
return state.enabled ? (_ref = (_state_initialMetrics = state.initialMetrics) === null || _state_initialMetrics === void 0 ? void 0 : _state_initialMetrics.insets[edge]) !== null && _ref !== void 0 ? _ref : 0 : 0;
|
|
2171
2169
|
}
|
|
2172
2170
|
function subscribeToSafeArea(listener) {
|
|
2173
2171
|
return getSafeArea().subscribe(listener);
|
|
@@ -2183,8 +2181,8 @@ var warned = globalThis.process.env.NODE_ENV !== "production" ? /* @__PURE__ */
|
|
|
2183
2181
|
function warnOnce(key) {
|
|
2184
2182
|
var message = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : key;
|
|
2185
2183
|
if (globalThis.process.env.NODE_ENV === "development") {
|
|
2186
|
-
var
|
|
2187
|
-
if ((warned === null || warned === void 0 ? void 0 : warned.has(key)) || ((
|
|
2184
|
+
var _ref;
|
|
2185
|
+
if ((warned === null || warned === void 0 ? void 0 : warned.has(key)) || ((_ref = warned === null || warned === void 0 ? void 0 : warned.size) !== null && _ref !== void 0 ? _ref : 0) >= warnLimit) return;
|
|
2188
2186
|
warned === null || warned === void 0 || warned.add(key);
|
|
2189
2187
|
console.warn(`[tamagui] ${message}`);
|
|
2190
2188
|
}
|
|
@@ -2273,7 +2271,7 @@ function resolveStyleStaticConfig(staticConfig, conf, revision) {
|
|
|
2273
2271
|
if (resolvedBaseStyle && !staticConfig.disableBaseStylePiece) {
|
|
2274
2272
|
var directBaseStyle;
|
|
2275
2273
|
var directBaseKeys;
|
|
2276
|
-
var flushDirectBaseStyle = function() {
|
|
2274
|
+
var flushDirectBaseStyle = function flushDirectBaseStyle2() {
|
|
2277
2275
|
if (!directBaseStyle || !directBaseKeys) return;
|
|
2278
2276
|
var piece = createStylePiece(directBaseStyle, "base");
|
|
2279
2277
|
baseStylePiece || (baseStylePiece = piece);
|
|
@@ -2393,7 +2391,7 @@ function prepareConfigRevision(config) {
|
|
|
2393
2391
|
rank
|
|
2394
2392
|
];
|
|
2395
2393
|
}
|
|
2396
|
-
var resolveCondition = function(authored) {
|
|
2394
|
+
var resolveCondition = function resolveCondition2(authored) {
|
|
2397
2395
|
var cached = conditionModifiers[authored];
|
|
2398
2396
|
if (cached !== void 0) return cached;
|
|
2399
2397
|
var result = null;
|
|
@@ -2462,10 +2460,10 @@ function prepareConfigRevision(config) {
|
|
|
2462
2460
|
insetInline: 8,
|
|
2463
2461
|
borderRadius: 8
|
|
2464
2462
|
};
|
|
2465
|
-
var propertyKind = function(property) {
|
|
2463
|
+
var propertyKind = function propertyKind2(property) {
|
|
2466
2464
|
return propertyKinds[property] || 0;
|
|
2467
2465
|
};
|
|
2468
|
-
var tokenCategory = function(property) {
|
|
2466
|
+
var tokenCategory = function tokenCategory2(property) {
|
|
2469
2467
|
return config.tokensParsed[property] ? property : config.tokensParsed.borderWidth && property.startsWith("border") && property.endsWith("Width") ? "borderWidth" : getTokenCategoryForProperty(property);
|
|
2470
2468
|
};
|
|
2471
2469
|
var normalizedTransitions = /* @__PURE__ */ new Map();
|
|
@@ -2478,11 +2476,11 @@ function prepareConfigRevision(config) {
|
|
|
2478
2476
|
expandSafeArea: expandSafeAreaValue,
|
|
2479
2477
|
safeAreaVariable: resolveSafeAreaVariable,
|
|
2480
2478
|
parseFlatValue,
|
|
2481
|
-
styleStaticConfig: function(staticConfig, conf) {
|
|
2479
|
+
styleStaticConfig: function styleStaticConfig(staticConfig, conf) {
|
|
2482
2480
|
return resolveStyleStaticConfig(staticConfig, conf, captured.revision);
|
|
2483
2481
|
},
|
|
2484
2482
|
propertyKind,
|
|
2485
|
-
compositeValue: function(property, raw, context, resolve) {
|
|
2483
|
+
compositeValue: function compositeValue(property, raw, context, resolve) {
|
|
2486
2484
|
var kind2 = propertyKinds[property];
|
|
2487
2485
|
if (kind2 < 7) return;
|
|
2488
2486
|
if (kind2 === 7) {
|
|
@@ -2518,7 +2516,7 @@ function prepareConfigRevision(config) {
|
|
|
2518
2516
|
return value;
|
|
2519
2517
|
}
|
|
2520
2518
|
},
|
|
2521
|
-
normalizeTransition: function(raw) {
|
|
2519
|
+
normalizeTransition: function normalizeTransition(raw) {
|
|
2522
2520
|
var known = normalizedTransitions.get(raw);
|
|
2523
2521
|
if (known !== void 0) return known;
|
|
2524
2522
|
var out = raw.replace(/\/\*[\s\S]*?\*\/|(["'])(?:\\.|(?!\1)[^\\])*\1|[A-Za-z_][\w-]*/g, function(authored, quote, offset) {
|
|
@@ -2529,7 +2527,7 @@ function prepareConfigRevision(config) {
|
|
|
2529
2527
|
normalizedTransitions.set(raw, out);
|
|
2530
2528
|
return out;
|
|
2531
2529
|
},
|
|
2532
|
-
embeddedTokens: function(raw, resolve) {
|
|
2530
|
+
embeddedTokens: function embeddedTokens(raw, resolve) {
|
|
2533
2531
|
return raw.replace(/\/\*[\s\S]*?\*\/|(["'])(?:\\.|(?!\1)[^\\])*\1|[$A-Za-z_][\w.$-]*(?:\/\d*\.?\d+)?/g, function(word, quote, offset) {
|
|
2534
2532
|
var before = raw.charCodeAt(offset - 1);
|
|
2535
2533
|
return quote || word[0] !== "$" && (before >= 48 && before <= 57 || before === 35 || before === 45 && raw.charCodeAt(offset - 2) === 45 || raw.charCodeAt(offset + word.length) === 40) ? word : resolve(word);
|
|
@@ -2552,7 +2550,7 @@ var setConfigCalledByThisInstance = false;
|
|
|
2552
2550
|
var haventCalledErrorMessage = globalThis.process.env.NODE_ENV === "development" ? `
|
|
2553
2551
|
Haven't called createTamagui yet. ${MISSING_THEME_MESSAGE}
|
|
2554
2552
|
` : `\u274C Error 001`;
|
|
2555
|
-
var getConfigFromGlobalOrLocal = function() {
|
|
2553
|
+
var getConfigFromGlobalOrLocal = function getConfigFromGlobalOrLocal2() {
|
|
2556
2554
|
if (conf) return conf;
|
|
2557
2555
|
if (globalThis.__tamaguiConfig) {
|
|
2558
2556
|
if (globalThis.process.env.NODE_ENV === "development" && globalThis.__tamaguiEvaluationConfig !== globalThis.__tamaguiConfig && !globalThis.__tamaguiHasWarnedGlobalFallback && !globalThis.__tamaguiPendingCheck) {
|
|
@@ -2573,7 +2571,7 @@ Tamagui: Using global config fallback. This may indicate duplicate tamagui insta
|
|
|
2573
2571
|
}
|
|
2574
2572
|
return null;
|
|
2575
2573
|
};
|
|
2576
|
-
var getSetting = function(key) {
|
|
2574
|
+
var getSetting = function getSetting2(key) {
|
|
2577
2575
|
var config = getConfigFromGlobalOrLocal();
|
|
2578
2576
|
if (globalThis.process.env.NODE_ENV === "development") {
|
|
2579
2577
|
if (!config) throw new Error(haventCalledErrorMessage);
|
|
@@ -2585,7 +2583,7 @@ function getStyleCompat() {
|
|
|
2585
2583
|
var config = getConfigFromGlobalOrLocal();
|
|
2586
2584
|
return (config === null || config === void 0 ? void 0 : (_config_settings = config.settings) === null || _config_settings === void 0 ? void 0 : _config_settings.styleCompat) || "web";
|
|
2587
2585
|
}
|
|
2588
|
-
var setConfig = function(next) {
|
|
2586
|
+
var setConfig = function setConfig2(next) {
|
|
2589
2587
|
setConfigCalledByThisInstance = true;
|
|
2590
2588
|
var previous = conf;
|
|
2591
2589
|
var previousGlobal = globalThis.__tamaguiConfig;
|
|
@@ -2595,7 +2593,7 @@ var setConfig = function(next) {
|
|
|
2595
2593
|
globalThis.__tamaguiConfig = next;
|
|
2596
2594
|
if (process.env.TAMAGUI_ENVIRONMENT === "tamagui") globalThis.__tamaguiEvaluationConfig = next;
|
|
2597
2595
|
};
|
|
2598
|
-
var setConfigFont = function(name, font, fontParsed) {
|
|
2596
|
+
var setConfigFont = function setConfigFont2(name, font, fontParsed) {
|
|
2599
2597
|
var config = getConfigFromGlobalOrLocal();
|
|
2600
2598
|
if (globalThis.process.env.NODE_ENV === "development") {
|
|
2601
2599
|
if (!config) throw new Error(haventCalledErrorMessage);
|
|
@@ -2604,58 +2602,58 @@ var setConfigFont = function(name, font, fontParsed) {
|
|
|
2604
2602
|
config.fontsParsed[name] = fontParsed;
|
|
2605
2603
|
prepareConfigRevision(config);
|
|
2606
2604
|
};
|
|
2607
|
-
var getConfig = function() {
|
|
2605
|
+
var getConfig = function getConfig2() {
|
|
2608
2606
|
var config = getConfigFromGlobalOrLocal();
|
|
2609
2607
|
if (!config) throw new Error(formatDiagnostic("Err0", "TamaguiConfig", "no config is available", "Call createTamagui before rendering and deduplicate Tamagui package versions", "config", config));
|
|
2610
2608
|
return config;
|
|
2611
2609
|
};
|
|
2612
|
-
var getConfigMaybe = function() {
|
|
2610
|
+
var getConfigMaybe = function getConfigMaybe2() {
|
|
2613
2611
|
return getConfigFromGlobalOrLocal();
|
|
2614
2612
|
};
|
|
2615
2613
|
var tokens;
|
|
2616
2614
|
function setTokens(next) {
|
|
2617
2615
|
tokens = next;
|
|
2618
2616
|
}
|
|
2619
|
-
var getTokensParsed = function() {
|
|
2617
|
+
var getTokensParsed = function getTokensParsed2() {
|
|
2618
|
+
var _ref;
|
|
2620
2619
|
var _getConfigFromGlobalOrLocal;
|
|
2621
|
-
|
|
2622
|
-
return (_getConfigFromGlobalOrLocal_tokensParsed = (_getConfigFromGlobalOrLocal = getConfigFromGlobalOrLocal()) === null || _getConfigFromGlobalOrLocal === void 0 ? void 0 : _getConfigFromGlobalOrLocal.tokensParsed) !== null && _getConfigFromGlobalOrLocal_tokensParsed !== void 0 ? _getConfigFromGlobalOrLocal_tokensParsed : tokens;
|
|
2620
|
+
return (_ref = (_getConfigFromGlobalOrLocal = getConfigFromGlobalOrLocal()) === null || _getConfigFromGlobalOrLocal === void 0 ? void 0 : _getConfigFromGlobalOrLocal.tokensParsed) !== null && _ref !== void 0 ? _ref : tokens;
|
|
2623
2621
|
};
|
|
2624
|
-
var getTokens = function() {
|
|
2622
|
+
var getTokens = function getTokens2() {
|
|
2625
2623
|
if (globalThis.process.env.NODE_ENV === "development") {
|
|
2626
2624
|
if (!getConfigFromGlobalOrLocal()) throw new Error(haventCalledErrorMessage);
|
|
2627
2625
|
}
|
|
2628
2626
|
return getTokensParsed();
|
|
2629
2627
|
};
|
|
2630
|
-
var getTokenObject = function(value, group) {
|
|
2628
|
+
var getTokenObject = function getTokenObject2(value, group) {
|
|
2631
2629
|
var _tokens_group, _tokens_;
|
|
2632
2630
|
var tokens2 = getTokensParsed();
|
|
2633
2631
|
return group ? (_tokens_group = tokens2[group]) === null || _tokens_group === void 0 ? void 0 : _tokens_group[value] : (_tokens_ = tokens2[Object.keys(tokens2).find(function(cat) {
|
|
2634
2632
|
return tokens2[cat][value];
|
|
2635
2633
|
}) || ""]) === null || _tokens_ === void 0 ? void 0 : _tokens_[value];
|
|
2636
2634
|
};
|
|
2637
|
-
var getToken = function(value, group) {
|
|
2635
|
+
var getToken = function getToken2(value, group) {
|
|
2638
2636
|
var useVariable = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
|
|
2639
2637
|
var token = getTokenObject(value, group);
|
|
2640
2638
|
return useVariable ? token === null || token === void 0 ? void 0 : token.variable : token === null || token === void 0 ? void 0 : token.val;
|
|
2641
2639
|
};
|
|
2642
|
-
var getTokenValue = function(value, group) {
|
|
2640
|
+
var getTokenValue = function getTokenValue2(value, group) {
|
|
2643
2641
|
if (value === "unset" || value === "auto") return;
|
|
2644
2642
|
return getToken(value, group, false);
|
|
2645
2643
|
};
|
|
2646
|
-
var getThemes = function() {
|
|
2644
|
+
var getThemes = function getThemes2() {
|
|
2647
2645
|
return getConfigFromGlobalOrLocal().themes;
|
|
2648
2646
|
};
|
|
2649
|
-
var updateConfig = function(key, value) {
|
|
2647
|
+
var updateConfig = function updateConfig2(key, value) {
|
|
2650
2648
|
var config = getConfigFromGlobalOrLocal();
|
|
2651
2649
|
if (!config || key === "__proto__" || !(key in config)) return;
|
|
2652
2650
|
Object.assign(config[key], value);
|
|
2653
2651
|
prepareConfigRevision(config);
|
|
2654
2652
|
};
|
|
2655
|
-
var getFont = function(name) {
|
|
2653
|
+
var getFont = function getFont2(name) {
|
|
2654
|
+
var _conf_fontsParsed_name;
|
|
2656
2655
|
var _Object_entries_find;
|
|
2657
2656
|
var conf2 = getConfig();
|
|
2658
|
-
var _conf_fontsParsed_name;
|
|
2659
2657
|
return (_conf_fontsParsed_name = conf2.fontsParsed[name]) !== null && _conf_fontsParsed_name !== void 0 ? _conf_fontsParsed_name : (_Object_entries_find = Object.entries(conf2.fontsParsed).find(function(param) {
|
|
2660
2658
|
var [k] = param;
|
|
2661
2659
|
var _conf_fontsParsed_k_family, _conf_fontsParsed_k;
|
|
@@ -2684,7 +2682,7 @@ function constructCSSVariableName(name) {
|
|
|
2684
2682
|
return `var(--${process.env.TAMAGUI_CSS_VARIABLE_PREFIX || ""}${name})`;
|
|
2685
2683
|
}
|
|
2686
2684
|
var pxStringRe$1 = /^-?\d*\.?\d+px$/;
|
|
2687
|
-
var createVariable = function(props) {
|
|
2685
|
+
var createVariable = function createVariable2(props) {
|
|
2688
2686
|
var skipHash = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
2689
2687
|
if (!skipHash && isVariable(props)) return props;
|
|
2690
2688
|
var { key, name, val } = props;
|
|
@@ -2708,19 +2706,19 @@ function isVariable(v) {
|
|
|
2708
2706
|
}
|
|
2709
2707
|
function getVariable(nameOrVariable) {
|
|
2710
2708
|
var group = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "size";
|
|
2709
|
+
var _ref;
|
|
2711
2710
|
var _tokens_group;
|
|
2712
2711
|
if (nameOrVariable === null || nameOrVariable === void 0 ? void 0 : nameOrVariable.dynamic) return nameOrVariable;
|
|
2713
2712
|
setDidGetVariableValue(true);
|
|
2714
2713
|
if (isVariable(nameOrVariable)) return variableToString(nameOrVariable);
|
|
2715
2714
|
var tokens = getConfig().tokensParsed;
|
|
2716
|
-
|
|
2717
|
-
return variableToString((_tokens_group_nameOrVariable = (_tokens_group = tokens[group]) === null || _tokens_group === void 0 ? void 0 : _tokens_group[nameOrVariable]) !== null && _tokens_group_nameOrVariable !== void 0 ? _tokens_group_nameOrVariable : nameOrVariable);
|
|
2715
|
+
return variableToString((_ref = (_tokens_group = tokens[group]) === null || _tokens_group === void 0 ? void 0 : _tokens_group[nameOrVariable]) !== null && _ref !== void 0 ? _ref : nameOrVariable);
|
|
2718
2716
|
}
|
|
2719
2717
|
var accessed = false;
|
|
2720
|
-
var setDidGetVariableValue = function(val) {
|
|
2718
|
+
var setDidGetVariableValue = function setDidGetVariableValue2(val) {
|
|
2721
2719
|
return accessed = val;
|
|
2722
2720
|
};
|
|
2723
|
-
var didGetVariableValue = function() {
|
|
2721
|
+
var didGetVariableValue = function didGetVariableValue2() {
|
|
2724
2722
|
return accessed;
|
|
2725
2723
|
};
|
|
2726
2724
|
function getVariableValue(v, group) {
|
|
@@ -2738,7 +2736,7 @@ function getVariableValue(v, group) {
|
|
|
2738
2736
|
}
|
|
2739
2737
|
return v;
|
|
2740
2738
|
}
|
|
2741
|
-
var createCSSVariable = function(nameProp) {
|
|
2739
|
+
var createCSSVariable = function createCSSVariable2(nameProp) {
|
|
2742
2740
|
var includeVar = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : true;
|
|
2743
2741
|
if (globalThis.process.env.NODE_ENV === "development") {
|
|
2744
2742
|
if (!nameProp || typeof nameProp !== "string") throw new Error(`createCSSVariable expected string, got: ${nameProp}`);
|
|
@@ -2760,11 +2758,11 @@ function isOptimizedForFirstRender() {
|
|
|
2760
2758
|
//#endregion
|
|
2761
2759
|
//#region ../web/dist/esm/helpers/mediaState.native.js
|
|
2762
2760
|
var mediaState = {};
|
|
2763
|
-
var setMediaState = function(next) {
|
|
2761
|
+
var setMediaState = function setMediaState2(next) {
|
|
2764
2762
|
mediaState = next;
|
|
2765
2763
|
};
|
|
2766
2764
|
var mediaQueryConfig = {};
|
|
2767
|
-
var getMedia = function() {
|
|
2765
|
+
var getMedia = function getMedia2() {
|
|
2768
2766
|
return mediaState;
|
|
2769
2767
|
};
|
|
2770
2768
|
var mediaKeys = /* @__PURE__ */ new Set();
|
|
@@ -2781,7 +2779,7 @@ function mediaKeyMatch(key, dimensions) {
|
|
|
2781
2779
|
//#endregion
|
|
2782
2780
|
//#region ../web/dist/esm/helpers/matchMedia.native.js
|
|
2783
2781
|
var matchMediaImpl = matchMediaFallback;
|
|
2784
|
-
var matchMedia = function() {
|
|
2782
|
+
var matchMedia = function matchMedia2() {
|
|
2785
2783
|
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) args[_key] = arguments[_key];
|
|
2786
2784
|
return matchMediaImpl(...args);
|
|
2787
2785
|
};
|
|
@@ -2796,11 +2794,11 @@ function matchMediaFallback(query) {
|
|
|
2796
2794
|
}));
|
|
2797
2795
|
}
|
|
2798
2796
|
return {
|
|
2799
|
-
match: function(a, b) {
|
|
2797
|
+
match: function match(a, b) {
|
|
2800
2798
|
return false;
|
|
2801
2799
|
},
|
|
2802
|
-
addListener: function() {},
|
|
2803
|
-
removeListener: function() {},
|
|
2800
|
+
addListener: function addListener() {},
|
|
2801
|
+
removeListener: function removeListener() {},
|
|
2804
2802
|
matches: false
|
|
2805
2803
|
};
|
|
2806
2804
|
}
|
|
@@ -2815,7 +2813,7 @@ function setupMatchMedia(_) {
|
|
|
2815
2813
|
}
|
|
2816
2814
|
var dispose = /* @__PURE__ */ new Set();
|
|
2817
2815
|
var mediaVersion = 0;
|
|
2818
|
-
var configureMedia = function(config) {
|
|
2816
|
+
var configureMedia = function configureMedia2(config) {
|
|
2819
2817
|
var { media } = config;
|
|
2820
2818
|
var mediaQueryDefaultActive = getSetting("mediaQueryDefaultActive");
|
|
2821
2819
|
if (!media) return;
|
|
@@ -2840,7 +2838,7 @@ var setupVersion = -1;
|
|
|
2840
2838
|
function setupMediaListeners() {
|
|
2841
2839
|
var _loop = function(key2) {
|
|
2842
2840
|
var str = mediaObjectToString(mediaQueryConfig[key2]);
|
|
2843
|
-
var getMatch = function() {
|
|
2841
|
+
var getMatch = function getMatch2() {
|
|
2844
2842
|
return matchMedia(str);
|
|
2845
2843
|
};
|
|
2846
2844
|
var match = getMatch();
|
|
@@ -3192,7 +3190,7 @@ function useMedia(emitter, debug, uid) {
|
|
|
3192
3190
|
});
|
|
3193
3191
|
return ref.optimizeForFirstRender ? state : ref.proxy;
|
|
3194
3192
|
}
|
|
3195
|
-
var incReducer$1 = function(c) {
|
|
3193
|
+
var incReducer$1 = function incReducer2(c) {
|
|
3196
3194
|
return c + 1;
|
|
3197
3195
|
};
|
|
3198
3196
|
var disableMediaTouch = false;
|
|
@@ -3290,7 +3288,7 @@ var HadTheme = /* @__PURE__ */ new WeakMap();
|
|
|
3290
3288
|
var PendingUpdate = /* @__PURE__ */ new Map();
|
|
3291
3289
|
var states = /* @__PURE__ */ new Map();
|
|
3292
3290
|
var shouldForce = false;
|
|
3293
|
-
var forceUpdateThemes = function() {
|
|
3291
|
+
var forceUpdateThemes = function forceUpdateThemes2() {
|
|
3294
3292
|
cacheVersion++;
|
|
3295
3293
|
shouldForce = true;
|
|
3296
3294
|
allListeners.forEach(function(cb) {
|
|
@@ -3298,24 +3296,24 @@ var forceUpdateThemes = function() {
|
|
|
3298
3296
|
});
|
|
3299
3297
|
shouldForce = false;
|
|
3300
3298
|
};
|
|
3301
|
-
var getThemeState = function(id) {
|
|
3299
|
+
var getThemeState = function getThemeState2(id) {
|
|
3302
3300
|
return states.get(id);
|
|
3303
3301
|
};
|
|
3304
3302
|
var themeUpdateLayers = /* @__PURE__ */ new Map();
|
|
3305
3303
|
var themeProviderParents = /* @__PURE__ */ new Map();
|
|
3306
|
-
var getThemeUpdateLayer = function(id) {
|
|
3304
|
+
var getThemeUpdateLayer = function getThemeUpdateLayer2(id) {
|
|
3307
3305
|
return themeUpdateLayers.get(id);
|
|
3308
3306
|
};
|
|
3309
|
-
var getThemeProviderParent = function(id) {
|
|
3307
|
+
var getThemeProviderParent = function getThemeProviderParent2(id) {
|
|
3310
3308
|
return themeProviderParents.get(id);
|
|
3311
3309
|
};
|
|
3312
|
-
var getThemeProviderChainSizes = function() {
|
|
3310
|
+
var getThemeProviderChainSizes = function getThemeProviderChainSizes2() {
|
|
3313
3311
|
return {
|
|
3314
3312
|
layers: themeUpdateLayers.size,
|
|
3315
3313
|
parents: themeProviderParents.size
|
|
3316
3314
|
};
|
|
3317
3315
|
};
|
|
3318
|
-
var registerThemeProviderChain = function(id, parentId, props) {
|
|
3316
|
+
var registerThemeProviderChain = function registerThemeProviderChain2(id, parentId, props) {
|
|
3319
3317
|
themeProviderParents.set(id, parentId);
|
|
3320
3318
|
if (props._themeUpdate) themeUpdateLayers.set(id, props._themeUpdate);
|
|
3321
3319
|
else themeUpdateLayers.delete(id);
|
|
@@ -3325,20 +3323,20 @@ var themeNameCache = /* @__PURE__ */ new Map();
|
|
|
3325
3323
|
var themeNameCacheVer = -1;
|
|
3326
3324
|
var themes = null;
|
|
3327
3325
|
var rootThemeState = null;
|
|
3328
|
-
var getRootThemeState = function() {
|
|
3326
|
+
var getRootThemeState = function getRootThemeState2() {
|
|
3329
3327
|
return rootThemeState;
|
|
3330
3328
|
};
|
|
3331
|
-
var getThemeBaseName = function(name) {
|
|
3329
|
+
var getThemeBaseName = function getThemeBaseName2(name) {
|
|
3332
3330
|
return name.replace(/^(light|dark)_/, "");
|
|
3333
3331
|
};
|
|
3334
|
-
var incReducer = function(c) {
|
|
3332
|
+
var incReducer = function incReducer2(c) {
|
|
3335
3333
|
return c + 1;
|
|
3336
3334
|
};
|
|
3337
|
-
var useThemeState = function(props) {
|
|
3335
|
+
var useThemeState = function useThemeState2(props) {
|
|
3338
3336
|
"use no memo";
|
|
3339
3337
|
var isRoot = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false, keys = arguments.length > 2 ? arguments[2] : void 0, schemeKeys = arguments.length > 3 ? arguments[3] : void 0, cascadeOnChange = arguments.length > 4 && arguments[4] !== void 0 ? arguments[4] : false, optimizeForFirstRender = arguments.length > 5 && arguments[5] !== void 0 ? arguments[5] : false;
|
|
3340
|
-
var _props__themeUpdate;
|
|
3341
3338
|
var _ref;
|
|
3339
|
+
var _props__themeUpdate;
|
|
3342
3340
|
var { disable } = props;
|
|
3343
3341
|
var parentId = (0, react.useContext)(ThemeStateContext);
|
|
3344
3342
|
if (!parentId && !isRoot) throw new Error(globalThis.process.env.NODE_ENV === "development" ? `${MISSING_THEME_MESSAGE}
|
|
@@ -3383,7 +3381,7 @@ Looked for theme${props.name ? ` "${props.name}"` : ""}, but no parent theme con
|
|
|
3383
3381
|
var _listenersByParent, _pid;
|
|
3384
3382
|
var pid = r.parentId;
|
|
3385
3383
|
var sid = r.id;
|
|
3386
|
-
var cb = function(forced) {
|
|
3384
|
+
var cb = function cb2(forced) {
|
|
3387
3385
|
var next = getSnapshotImpl(r);
|
|
3388
3386
|
if (next !== r.lastSnap) {
|
|
3389
3387
|
var _r_props_nativeUpdate, _r_props;
|
|
@@ -3433,7 +3431,7 @@ Looked for theme${props.name ? ` "${props.name}"` : ""}, but no parent theme con
|
|
|
3433
3431
|
}, [keys, propsKey]);
|
|
3434
3432
|
return state;
|
|
3435
3433
|
};
|
|
3436
|
-
var shouldSubscribeToTheme = function(r, cascadeOnChange) {
|
|
3434
|
+
var shouldSubscribeToTheme = function shouldSubscribeToTheme2(r, cascadeOnChange) {
|
|
3437
3435
|
var _r_keys_current, _r_props_needsUpdate, _r_props;
|
|
3438
3436
|
return Boolean(r.optimizeForFirstRender || r.isRoot || cascadeOnChange || hasThemeUpdatingProps(r.props) || ((_r_keys_current = r.keys.current) === null || _r_keys_current === void 0 ? void 0 : _r_keys_current.size) || ((_r_props_needsUpdate = (_r_props = r.props).needsUpdate) === null || _r_props_needsUpdate === void 0 ? void 0 : _r_props_needsUpdate.call(_r_props)));
|
|
3439
3437
|
};
|
|
@@ -3447,7 +3445,7 @@ function cleanupThemeState(r) {
|
|
|
3447
3445
|
themeUpdateLayers.delete(r.id);
|
|
3448
3446
|
themeProviderParents.delete(r.id);
|
|
3449
3447
|
}
|
|
3450
|
-
var getSnapshotImpl = function(r) {
|
|
3448
|
+
var getSnapshotImpl = function getSnapshotImpl2(r) {
|
|
3451
3449
|
var _keys_current, _schemeKeys_current, _keys_current1, _props_needsUpdate;
|
|
3452
3450
|
var { id, parentId, props, propsKey, isRoot, keys, optimizeForFirstRender } = r;
|
|
3453
3451
|
var schemeKeys = r.schemeKeys;
|
|
@@ -3482,8 +3480,9 @@ var getSnapshotImpl = function(r) {
|
|
|
3482
3480
|
states.set(id, next);
|
|
3483
3481
|
return local;
|
|
3484
3482
|
};
|
|
3485
|
-
var getNextState = function(lastState, props, propsKey) {
|
|
3483
|
+
var getNextState = function getNextState2(lastState, props, propsKey) {
|
|
3486
3484
|
var isRoot = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : false, id = arguments.length > 4 ? arguments[4] : void 0, parentId = arguments.length > 5 ? arguments[5] : void 0, needsUpdate = arguments.length > 6 ? arguments[6] : void 0, pendingUpdate = arguments.length > 7 ? arguments[7] : void 0;
|
|
3485
|
+
var _ref;
|
|
3487
3486
|
var parentState = states.get(parentId);
|
|
3488
3487
|
if (props.passThrough) return [false, parentState || lastState || { name: "" }];
|
|
3489
3488
|
themes || (themes = getConfig().themes);
|
|
@@ -3501,8 +3500,8 @@ var getNextState = function(lastState, props, propsKey) {
|
|
|
3501
3500
|
return [shouldRerender, _objectSpread2(_objectSpread2({}, parentState), {}, { isNew: false })];
|
|
3502
3501
|
}
|
|
3503
3502
|
if (!resolvedName) {
|
|
3504
|
-
var
|
|
3505
|
-
var next = (_ref1 = (
|
|
3503
|
+
var _ref1, _ref2;
|
|
3504
|
+
var next = (_ref1 = (_ref2 = lastState !== null && lastState !== void 0 ? lastState : parentState) !== null && _ref2 !== void 0 ? _ref2 : rootThemeState) !== null && _ref1 !== void 0 ? _ref1 : {
|
|
3506
3505
|
id,
|
|
3507
3506
|
name: "light",
|
|
3508
3507
|
theme: getConfig().themes.light
|
|
@@ -3511,8 +3510,7 @@ var getNextState = function(lastState, props, propsKey) {
|
|
|
3511
3510
|
return [false, next];
|
|
3512
3511
|
}
|
|
3513
3512
|
var scheme = getAuthoredThemeScheme(themes[resolvedName]) || getThemeScheme(resolvedName);
|
|
3514
|
-
var
|
|
3515
|
-
var parentInverses = (_parentState_inverses = parentState === null || parentState === void 0 ? void 0 : parentState.inverses) !== null && _parentState_inverses !== void 0 ? _parentState_inverses : 0;
|
|
3513
|
+
var parentInverses = (_ref = parentState === null || parentState === void 0 ? void 0 : parentState.inverses) !== null && _ref !== void 0 ? _ref : 0;
|
|
3516
3514
|
var isInverse = Boolean(parentState && scheme !== parentState.scheme);
|
|
3517
3515
|
var inverses = parentInverses + (isInverse ? 1 : 0);
|
|
3518
3516
|
var nextState = {
|
|
@@ -3597,7 +3595,7 @@ function resolveThemeName(parentName, name, themes2) {
|
|
|
3597
3595
|
if (!forceUpdate && found === parentName && found !== "light" && found !== "dark") return null;
|
|
3598
3596
|
return found;
|
|
3599
3597
|
}
|
|
3600
|
-
var hasThemeUpdatingProps = function(props) {
|
|
3598
|
+
var hasThemeUpdatingProps = function hasThemeUpdatingProps2(props) {
|
|
3601
3599
|
return "name" in props || "forceClassName" in props || "_themeUpdate" in props;
|
|
3602
3600
|
};
|
|
3603
3601
|
//#endregion
|
|
@@ -3640,7 +3638,7 @@ function getThemeProxied(_props, _state, _keys, _schemeKeys) {
|
|
|
3640
3638
|
var config = getConfig();
|
|
3641
3639
|
var proxied1 = Object.fromEntries(Object.entries(_state.theme).flatMap(function(param) {
|
|
3642
3640
|
var [key, value] = param;
|
|
3643
|
-
var get = function(platform) {
|
|
3641
|
+
var get = function get2(platform) {
|
|
3644
3642
|
if (!curState) return;
|
|
3645
3643
|
var outVal = getVariable(value);
|
|
3646
3644
|
var { name, scheme } = curState;
|
|
@@ -3701,12 +3699,12 @@ function getThemeProxied(_props, _state, _keys, _schemeKeys) {
|
|
|
3701
3699
|
//#endregion
|
|
3702
3700
|
//#region ../web/dist/esm/hooks/useTheme.native.js
|
|
3703
3701
|
var EMPTY = {};
|
|
3704
|
-
var useTheme = function() {
|
|
3702
|
+
var useTheme = function useTheme2() {
|
|
3705
3703
|
"use no memo";
|
|
3706
3704
|
var [theme] = useThemeWithState(EMPTY);
|
|
3707
3705
|
return theme;
|
|
3708
3706
|
};
|
|
3709
|
-
var useThemeWithState = function(props) {
|
|
3707
|
+
var useThemeWithState = function useThemeWithState2(props) {
|
|
3710
3708
|
"use no memo";
|
|
3711
3709
|
var isRoot = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false, forThemeView = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
|
|
3712
3710
|
var bag = (0, react.useRef)(null);
|
|
@@ -3733,7 +3731,7 @@ var _excluded2$3 = ["_expressions"];
|
|
|
3733
3731
|
var EMPTY_EXPRESSIONS = [];
|
|
3734
3732
|
var EMPTY_THEME = {};
|
|
3735
3733
|
var FALLBACK_THEME_CACHE = /* @__PURE__ */ new WeakMap();
|
|
3736
|
-
var _withStableStyle = function(Component, createStyle, hasThemeKeys, hasMediaKeys) {
|
|
3734
|
+
var _withStableStyle = function _withStableStyle2(Component, createStyle, hasThemeKeys, hasMediaKeys) {
|
|
3737
3735
|
return /* @__PURE__ */ react.default.memo(function WithStableStyle(props) {
|
|
3738
3736
|
var { ref } = props, propsWithoutRef = _objectWithoutProperties(props, _excluded$8);
|
|
3739
3737
|
var { _expressions = EMPTY_EXPRESSIONS } = propsWithoutRef, rest = _objectWithoutProperties(propsWithoutRef, _excluded2$3);
|
|
@@ -3753,7 +3751,7 @@ var _withStableStyle = function(Component, createStyle, hasThemeKeys, hasMediaKe
|
|
|
3753
3751
|
if (!gettableTheme) {
|
|
3754
3752
|
var _loop = function(key2) {
|
|
3755
3753
|
var value = fallbackTheme[key2];
|
|
3756
|
-
gettableTheme[key2] = typeof (value === null || value === void 0 ? void 0 : value.get) === "function" ? value : _objectSpread2(_objectSpread2({}, value && typeof value === "object" ? value : { val: value }), {}, { get: function() {
|
|
3754
|
+
gettableTheme[key2] = typeof (value === null || value === void 0 ? void 0 : value.get) === "function" ? value : _objectSpread2(_objectSpread2({}, value && typeof value === "object" ? value : { val: value }), {}, { get: function get() {
|
|
3757
3755
|
return getVariable(value);
|
|
3758
3756
|
} });
|
|
3759
3757
|
};
|
|
@@ -3868,6 +3866,7 @@ function getCompiledMapping(mapping) {
|
|
|
3868
3866
|
return compiled;
|
|
3869
3867
|
}
|
|
3870
3868
|
function resolveCompiledMapping(compiled, stateName, theme) {
|
|
3869
|
+
var _ref;
|
|
3871
3870
|
var cached = compiled.states.get(stateName);
|
|
3872
3871
|
if ((cached === null || cached === void 0 ? void 0 : cached.theme) === theme) return cached;
|
|
3873
3872
|
var renderProps = {};
|
|
@@ -3876,8 +3875,7 @@ function resolveCompiledMapping(compiled, stateName, theme) {
|
|
|
3876
3875
|
renderProps[styleKey] = value === void 0 ? null : getVariableValue(value);
|
|
3877
3876
|
}
|
|
3878
3877
|
renderProps = normalizeNativeStyle(renderProps, true);
|
|
3879
|
-
var
|
|
3880
|
-
var nativeProps = (_engine_processStyleColors = engine === null || engine === void 0 ? void 0 : engine.processStyleColors(renderProps)) !== null && _engine_processStyleColors !== void 0 ? _engine_processStyleColors : renderProps;
|
|
3878
|
+
var nativeProps = (_ref = engine === null || engine === void 0 ? void 0 : engine.processStyleColors(renderProps)) !== null && _ref !== void 0 ? _ref : renderProps;
|
|
3881
3879
|
if (compiled.states.size >= 1e4) compiled.states.clear();
|
|
3882
3880
|
var resolved = {
|
|
3883
3881
|
theme,
|
|
@@ -4044,19 +4042,31 @@ function updateNativeStyleLink(ref, host) {
|
|
|
4044
4042
|
ref.nativePushedKeys = void 0;
|
|
4045
4043
|
if (host && engine && ref.nativeStyleUpdate) ref.nativeLink = engine.link(host, {});
|
|
4046
4044
|
}
|
|
4045
|
+
var superseded = null;
|
|
4047
4046
|
function queueNativeViewState(entry) {
|
|
4048
4047
|
if (!engine) return;
|
|
4049
4048
|
if (!pending) {
|
|
4050
4049
|
pending = [];
|
|
4051
4050
|
queueMicrotask(function() {
|
|
4052
4051
|
var entries = pending;
|
|
4052
|
+
var dropped = superseded;
|
|
4053
4053
|
pending = null;
|
|
4054
|
+
superseded = null;
|
|
4055
|
+
if (dropped) entries = entries.filter(function(queued, index) {
|
|
4056
|
+
var _dropped_get;
|
|
4057
|
+
return index >= ((_dropped_get = dropped.get(queued.id)) !== null && _dropped_get !== void 0 ? _dropped_get : 0);
|
|
4058
|
+
});
|
|
4059
|
+
if (!entries.length) return;
|
|
4054
4060
|
engine === null || engine === void 0 || engine.applyViewStates(entries);
|
|
4055
4061
|
flushListener === null || flushListener === void 0 || flushListener(entries);
|
|
4056
4062
|
});
|
|
4057
4063
|
}
|
|
4058
4064
|
pending.push(entry);
|
|
4059
4065
|
}
|
|
4066
|
+
function supersedeNativeViewStates(id) {
|
|
4067
|
+
if (!pending) return;
|
|
4068
|
+
(superseded || (superseded = /* @__PURE__ */ new Map())).set(id, pending.length);
|
|
4069
|
+
}
|
|
4060
4070
|
//#endregion
|
|
4061
4071
|
//#region ../web/dist/esm/setupHooks.native.js
|
|
4062
4072
|
var hooks = {};
|
|
@@ -4071,7 +4081,7 @@ var hostTextProps = {
|
|
|
4071
4081
|
allowFontScaling: true,
|
|
4072
4082
|
ellipsizeMode: "tail"
|
|
4073
4083
|
};
|
|
4074
|
-
var _withNativeStyle = function(Component, baseStyle, themeStyleKeys, host) {
|
|
4084
|
+
var _withNativeStyle = function _withNativeStyle2(Component, baseStyle, themeStyleKeys, host) {
|
|
4075
4085
|
var _hooks_getBaseViews;
|
|
4076
4086
|
var Fallback = _withStableStyle(Component, function(theme) {
|
|
4077
4087
|
var themedStyle = {};
|
|
@@ -4087,14 +4097,14 @@ var _withNativeStyle = function(Component, baseStyle, themeStyleKeys, host) {
|
|
|
4087
4097
|
var HostText = host === "text" && !("userSelect" in baseStyle) && !("verticalAlign" in baseStyle) ? baseViews === null || baseViews === void 0 ? void 0 : baseViews.NativeText : void 0;
|
|
4088
4098
|
var hostTextBase = HostText ? _objectSpread2(_objectSpread2({ overflow: "hidden" }, baseStyle), typeof baseStyle.fontWeight === "number" && { fontWeight: String(baseStyle.fontWeight) }) : baseStyle;
|
|
4089
4099
|
var entries = /* @__PURE__ */ new Map();
|
|
4090
|
-
var createEntry = function() {
|
|
4100
|
+
var createEntry = function createEntry2() {
|
|
4091
4101
|
var entry = {
|
|
4092
4102
|
style: [baseStyle, null],
|
|
4093
4103
|
hostTextStyle: [hostTextBase, null],
|
|
4094
4104
|
stateName: "",
|
|
4095
4105
|
theme: null,
|
|
4096
4106
|
state: null,
|
|
4097
|
-
ref: function(node) {
|
|
4107
|
+
ref: function ref(node) {
|
|
4098
4108
|
if (node) linkHost(node, entry.state);
|
|
4099
4109
|
}
|
|
4100
4110
|
};
|
|
@@ -4107,7 +4117,7 @@ var _withNativeStyle = function(Component, baseStyle, themeStyleKeys, host) {
|
|
|
4107
4117
|
var linkState = createNativeStyleLinkState;
|
|
4108
4118
|
var linkHost = linkNativeStyleHost;
|
|
4109
4119
|
var assignRef = setRef;
|
|
4110
|
-
var render = function(props, key) {
|
|
4120
|
+
var render = function render2(props, key) {
|
|
4111
4121
|
var scopeId = (0, react.use)(ScopeContext);
|
|
4112
4122
|
var inText = TextAncestor ? (0, react.use)(TextAncestor) : false;
|
|
4113
4123
|
var themeState = scopeId && engineOf() ? scopeState(scopeId) : void 0;
|
|
@@ -4132,8 +4142,8 @@ var _withNativeStyle = function(Component, baseStyle, themeStyleKeys, host) {
|
|
|
4132
4142
|
}
|
|
4133
4143
|
if (entry.stateName !== name || entry.theme !== theme) {
|
|
4134
4144
|
var themed = resolve(themeStyleKeys, name, theme);
|
|
4135
|
-
entry.style
|
|
4136
|
-
entry.hostTextStyle
|
|
4145
|
+
entry.style = [baseStyle, themed];
|
|
4146
|
+
entry.hostTextStyle = [hostTextBase, themed];
|
|
4137
4147
|
entry.stateName = name;
|
|
4138
4148
|
entry.theme = theme;
|
|
4139
4149
|
entry.state = linkState(themeStyleKeys, scopeId, name, theme);
|
|
@@ -4157,7 +4167,7 @@ var _withNativeStyle = function(Component, baseStyle, themeStyleKeys, host) {
|
|
|
4157
4167
|
children: element
|
|
4158
4168
|
}, key);
|
|
4159
4169
|
};
|
|
4160
|
-
var NativeStyleView = function(props) {
|
|
4170
|
+
var NativeStyleView = function NativeStyleView2(props) {
|
|
4161
4171
|
return render(props);
|
|
4162
4172
|
};
|
|
4163
4173
|
NativeStyleView.inline = function(element) {
|
|
@@ -4177,7 +4187,7 @@ function mayRenderText(children) {
|
|
|
4177
4187
|
var isDevTools = (function() {
|
|
4178
4188
|
if (globalThis.process.env.NODE_ENV === "development") try {
|
|
4179
4189
|
return new Function("try {return this===window;}catch(e){ return false;}")();
|
|
4180
|
-
} catch (
|
|
4190
|
+
} catch (unused) {}
|
|
4181
4191
|
return false;
|
|
4182
4192
|
})();
|
|
4183
4193
|
//#endregion
|
|
@@ -4260,8 +4270,8 @@ function useMainThreadPressEvents(events, viewProps) {
|
|
|
4260
4270
|
ownsResponder.current = false;
|
|
4261
4271
|
};
|
|
4262
4272
|
viewProps.onResponderTerminationRequest = function(e) {
|
|
4263
|
-
var
|
|
4264
|
-
return (
|
|
4273
|
+
var _ref;
|
|
4274
|
+
return (_ref = userTerminationRequest === null || userTerminationRequest === void 0 ? void 0 : userTerminationRequest(e)) !== null && _ref !== void 0 ? _ref : handlers.onResponderTerminationRequest();
|
|
4265
4275
|
};
|
|
4266
4276
|
viewProps.onResponderMove = function(e) {
|
|
4267
4277
|
userMove === null || userMove === void 0 || userMove(e);
|
|
@@ -4276,16 +4286,16 @@ function useMainThreadPressEvents(events, viewProps) {
|
|
|
4276
4286
|
//#region ../web/dist/esm/eventHandling.native.js
|
|
4277
4287
|
var isFabric = !!globalThis.nativeFabricUIManager;
|
|
4278
4288
|
var isAndroidCache;
|
|
4279
|
-
var getIsAndroid = function() {
|
|
4289
|
+
var getIsAndroid = function getIsAndroid2() {
|
|
4280
4290
|
if (isAndroidCache === void 0) isAndroidCache = (react_native.Platform === null || react_native.Platform === void 0 ? void 0 : react_native.Platform.OS) === "android";
|
|
4281
4291
|
return isAndroidCache;
|
|
4282
4292
|
};
|
|
4283
4293
|
var isNativeDesktopCache;
|
|
4284
|
-
var getIsNativeDesktop = function() {
|
|
4294
|
+
var getIsNativeDesktop = function getIsNativeDesktop2() {
|
|
4285
4295
|
if (isNativeDesktopCache === void 0) isNativeDesktopCache = (react_native.Platform === null || react_native.Platform === void 0 ? void 0 : react_native.Platform.OS) === "macos" || (react_native.Platform === null || react_native.Platform === void 0 ? void 0 : react_native.Platform.OS) === "windows";
|
|
4286
4296
|
return isNativeDesktopCache;
|
|
4287
4297
|
};
|
|
4288
|
-
var responderClaim = function() {
|
|
4298
|
+
var responderClaim = function responderClaim2() {
|
|
4289
4299
|
return true;
|
|
4290
4300
|
};
|
|
4291
4301
|
var responderWrapperStyle = { display: "contents" };
|
|
@@ -4335,7 +4345,7 @@ function useEvents(events, viewProps, stateRef, staticConfig, isHOC, isInsideNat
|
|
|
4335
4345
|
var gestureRef = (0, react.useRef)(null);
|
|
4336
4346
|
var longPressTimerRef = (0, react.useRef)(null);
|
|
4337
4347
|
var longPressedRef = (0, react.useRef)(false);
|
|
4338
|
-
var clearLongPress = function() {
|
|
4348
|
+
var clearLongPress = function clearLongPress2() {
|
|
4339
4349
|
if (longPressTimerRef.current) clearTimeout(longPressTimerRef.current);
|
|
4340
4350
|
longPressTimerRef.current = null;
|
|
4341
4351
|
};
|
|
@@ -4343,7 +4353,7 @@ function useEvents(events, viewProps, stateRef, staticConfig, isHOC, isInsideNat
|
|
|
4343
4353
|
return clearLongPress;
|
|
4344
4354
|
}, []);
|
|
4345
4355
|
var pressActiveRef = (0, react.useRef)(false);
|
|
4346
|
-
var beginPress = function(e) {
|
|
4356
|
+
var beginPress = function beginPress2(e) {
|
|
4347
4357
|
var _callbacksRef_current_onPressIn, _callbacksRef_current;
|
|
4348
4358
|
if (pressActiveRef.current) return;
|
|
4349
4359
|
pressActiveRef.current = true;
|
|
@@ -4362,7 +4372,7 @@ function useEvents(events, viewProps, stateRef, staticConfig, isHOC, isInsideNat
|
|
|
4362
4372
|
}
|
|
4363
4373
|
(_callbacksRef_current_onPressIn = (_callbacksRef_current = callbacksRef.current).onPressIn) === null || _callbacksRef_current_onPressIn === void 0 || _callbacksRef_current_onPressIn.call(_callbacksRef_current, e !== null && e !== void 0 ? e : {});
|
|
4364
4374
|
};
|
|
4365
|
-
var endPress = function(e) {
|
|
4375
|
+
var endPress = function endPress2(e) {
|
|
4366
4376
|
var firePress = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
4367
4377
|
var _callbacksRef_current_onPress, _callbacksRef_current, _callbacksRef_current_onPressOut, _callbacksRef_current1;
|
|
4368
4378
|
clearLongPress();
|
|
@@ -4440,7 +4450,7 @@ function getTransitionResolver() {
|
|
|
4440
4450
|
}
|
|
4441
4451
|
//#endregion
|
|
4442
4452
|
//#region ../web/dist/esm/helpers/getCSSStylesAtomic.native.js
|
|
4443
|
-
var empty$1 = function() {};
|
|
4453
|
+
var empty$1 = function empty2() {};
|
|
4444
4454
|
var flushDirectStyles = empty$1;
|
|
4445
4455
|
var registerAtomicSlot = empty$1;
|
|
4446
4456
|
var getCSSStylesAtomic = empty$1;
|
|
@@ -4492,9 +4502,9 @@ function parseOutlineShorthand(value) {
|
|
|
4492
4502
|
//#endregion
|
|
4493
4503
|
//#region ../web/dist/esm/helpers/expandStyle.native.js
|
|
4494
4504
|
var _loop = function(parent2) {
|
|
4505
|
+
var _ref;
|
|
4495
4506
|
var _exec;
|
|
4496
|
-
var
|
|
4497
|
-
var 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);
|
|
4507
|
+
var prefix = parent2.slice(0, (_ref = (_exec = /[A-Z]/.exec(parent2)) === null || _exec === void 0 ? void 0 : _exec.index) !== null && _ref !== void 0 ? _ref : parent2.length);
|
|
4498
4508
|
EXPANSIONS[parent2] = EXPANSIONS[parent2].map(function(k) {
|
|
4499
4509
|
return `${prefix}${k}`;
|
|
4500
4510
|
});
|
|
@@ -4947,10 +4957,10 @@ function rgba(colorInt) {
|
|
|
4947
4957
|
var normalizeCSSColor = import_normalize_color.default || import_normalize_color;
|
|
4948
4958
|
//#endregion
|
|
4949
4959
|
//#region ../web/dist/esm/helpers/normalizeColor.native.js
|
|
4950
|
-
var isDynamicColor = function(color) {
|
|
4960
|
+
var isDynamicColor = function isDynamicColor2(color) {
|
|
4951
4961
|
return typeof color.dynamic === "object" && color.dynamic !== null;
|
|
4952
4962
|
};
|
|
4953
|
-
var normalizeColor = function(color, opacity) {
|
|
4963
|
+
var normalizeColor = function normalizeColor1(color, opacity) {
|
|
4954
4964
|
if (!color) return;
|
|
4955
4965
|
if (typeof color !== "string") {
|
|
4956
4966
|
if (opacity === void 0 || opacity === 1 || !isDynamicColor(color)) return color;
|
|
@@ -4963,13 +4973,13 @@ var normalizeColor = function(color, opacity) {
|
|
|
4963
4973
|
}
|
|
4964
4974
|
var rgbaVal = getRgba(color);
|
|
4965
4975
|
if (rgbaVal) {
|
|
4966
|
-
var colors = `${rgbaVal.r},${rgbaVal.g},${rgbaVal.b}`;
|
|
4967
4976
|
var _ref;
|
|
4977
|
+
var colors = `${rgbaVal.r},${rgbaVal.g},${rgbaVal.b}`;
|
|
4968
4978
|
return opacity === 1 ? `rgb(${colors})` : `rgba(${colors},${(_ref = opacity !== null && opacity !== void 0 ? opacity : rgbaVal.a) !== null && _ref !== void 0 ? _ref : 1})`;
|
|
4969
4979
|
}
|
|
4970
4980
|
return color;
|
|
4971
4981
|
};
|
|
4972
|
-
var getRgba = function(color) {
|
|
4982
|
+
var getRgba = function getRgba2(color) {
|
|
4973
4983
|
if (typeof color !== "string") return;
|
|
4974
4984
|
var colorNum = normalizeCSSColor(color.replace(/^(rgb|hsl)\((?=[^)]*\/)/, "$1a("));
|
|
4975
4985
|
if (colorNum != null) return rgba(colorNum);
|
|
@@ -5076,15 +5086,15 @@ var defaultSizing = {
|
|
|
5076
5086
|
}
|
|
5077
5087
|
}
|
|
5078
5088
|
};
|
|
5079
|
-
var toPx$1 = function(value) {
|
|
5089
|
+
var toPx$1 = function toPx2(value) {
|
|
5080
5090
|
return typeof value === "number" ? value : Number.parseFloat(value);
|
|
5081
5091
|
};
|
|
5082
5092
|
function resolveSizing(size, env) {
|
|
5093
|
+
var _ref, _ref1, _ref2, _ref3, _ref4;
|
|
5083
5094
|
var _font_size, _font_size1, _font_lineHeight, _tokens_space;
|
|
5084
5095
|
if (size === false) return void 0;
|
|
5085
5096
|
var conf = (env === null || env === void 0 ? void 0 : env.fonts) && (env === null || env === void 0 ? void 0 : env.tokens) ? void 0 : getConfig();
|
|
5086
|
-
var
|
|
5087
|
-
var sizing = _objectSpread2(_objectSpread2({}, defaultSizing), (_env_sizing = env === null || env === void 0 ? void 0 : env.sizing) !== null && _env_sizing !== void 0 ? _env_sizing : conf === null || conf === void 0 ? void 0 : conf.sizing);
|
|
5097
|
+
var sizing = _objectSpread2(_objectSpread2({}, defaultSizing), (_ref = env === null || env === void 0 ? void 0 : env.sizing) !== null && _ref !== void 0 ? _ref : conf === null || conf === void 0 ? void 0 : conf.sizing);
|
|
5088
5098
|
var name = size === true || size == null ? sizing.default : size;
|
|
5089
5099
|
var rung = sizing.sizes[name];
|
|
5090
5100
|
if (!rung) return void 0;
|
|
@@ -5101,12 +5111,9 @@ function resolveSizing(size, env) {
|
|
|
5101
5111
|
icon: rung.px.icon,
|
|
5102
5112
|
square: rung.px.square
|
|
5103
5113
|
});
|
|
5104
|
-
var
|
|
5105
|
-
var
|
|
5106
|
-
var
|
|
5107
|
-
var tokens = (_env_tokens = env === null || env === void 0 ? void 0 : env.tokens) !== null && _env_tokens !== void 0 ? _env_tokens : conf === null || conf === void 0 ? void 0 : conf.tokensParsed;
|
|
5108
|
-
var _conf_defaultFontToken, _env_font;
|
|
5109
|
-
var font = (_env_font = env === null || env === void 0 ? void 0 : env.font) !== null && _env_font !== void 0 ? _env_font : fonts === null || fonts === void 0 ? void 0 : fonts[(_conf_defaultFontToken = conf === null || conf === void 0 ? void 0 : conf.defaultFontToken) !== null && _conf_defaultFontToken !== void 0 ? _conf_defaultFontToken : "body"];
|
|
5114
|
+
var fonts = (_ref1 = env === null || env === void 0 ? void 0 : env.fonts) !== null && _ref1 !== void 0 ? _ref1 : conf === null || conf === void 0 ? void 0 : conf.fontsParsed;
|
|
5115
|
+
var tokens = (_ref2 = env === null || env === void 0 ? void 0 : env.tokens) !== null && _ref2 !== void 0 ? _ref2 : conf === null || conf === void 0 ? void 0 : conf.tokensParsed;
|
|
5116
|
+
var font = (_ref3 = env === null || env === void 0 ? void 0 : env.font) !== null && _ref3 !== void 0 ? _ref3 : fonts === null || fonts === void 0 ? void 0 : fonts[(_ref4 = conf === null || conf === void 0 ? void 0 : conf.defaultFontToken) !== null && _ref4 !== void 0 ? _ref4 : "body"];
|
|
5110
5117
|
var px = {
|
|
5111
5118
|
fontSize: toPx$1(getVariableValue(font === null || font === void 0 ? void 0 : (_font_size = font.size) === null || _font_size === void 0 ? void 0 : _font_size[rung.fontSize])),
|
|
5112
5119
|
control: toPx$1(getVariableValue(font === null || font === void 0 ? void 0 : (_font_size1 = font.size) === null || _font_size1 === void 0 ? void 0 : _font_size1[rung.controlFontSize])),
|
|
@@ -5146,13 +5153,13 @@ var dynamicComputedNumberProbe = 712367821;
|
|
|
5146
5153
|
var dynamicShapeProbeValues = /* @__PURE__ */ new WeakSet();
|
|
5147
5154
|
function createDynamicShapeProbe() {
|
|
5148
5155
|
var probe = new Proxy(function target2() {}, {
|
|
5149
|
-
apply: function() {
|
|
5156
|
+
apply: function apply() {
|
|
5150
5157
|
return probe;
|
|
5151
5158
|
},
|
|
5152
|
-
construct: function() {
|
|
5159
|
+
construct: function construct() {
|
|
5153
5160
|
return probe;
|
|
5154
5161
|
},
|
|
5155
|
-
get: function(_target, key) {
|
|
5162
|
+
get: function get(_target, key) {
|
|
5156
5163
|
if (key === Symbol.toPrimitive) return function(hint) {
|
|
5157
5164
|
return hint === "number" ? dynamicComputedNumberProbe : dynamicComputedProbe;
|
|
5158
5165
|
};
|
|
@@ -5162,14 +5169,14 @@ function createDynamicShapeProbe() {
|
|
|
5162
5169
|
if (key === dynamicSpreadProbe) return true;
|
|
5163
5170
|
return probe;
|
|
5164
5171
|
},
|
|
5165
|
-
getOwnPropertyDescriptor: function(target2, key) {
|
|
5172
|
+
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(target2, key) {
|
|
5166
5173
|
return key === dynamicSpreadProbe ? {
|
|
5167
5174
|
configurable: true,
|
|
5168
5175
|
enumerable: true,
|
|
5169
5176
|
value: true
|
|
5170
5177
|
} : Reflect.getOwnPropertyDescriptor(target2, key);
|
|
5171
5178
|
},
|
|
5172
|
-
ownKeys: function(target2) {
|
|
5179
|
+
ownKeys: function ownKeys(target2) {
|
|
5173
5180
|
return [...Reflect.ownKeys(target2), dynamicSpreadProbe];
|
|
5174
5181
|
}
|
|
5175
5182
|
});
|
|
@@ -5181,13 +5188,13 @@ function findDynamicShapeViolation(value) {
|
|
|
5181
5188
|
var seen = /* @__PURE__ */ new WeakSet();
|
|
5182
5189
|
var spread = false;
|
|
5183
5190
|
var computed = false;
|
|
5184
|
-
var visit = function(current) {
|
|
5191
|
+
var visit = function visit1(current) {
|
|
5185
5192
|
if (dynamicShapeProbeValues.has(current) || seen.has(current)) return;
|
|
5186
5193
|
seen.add(current);
|
|
5187
5194
|
var descriptors;
|
|
5188
5195
|
try {
|
|
5189
5196
|
descriptors = Object.getOwnPropertyDescriptors(current);
|
|
5190
|
-
} catch (
|
|
5197
|
+
} catch (unused) {
|
|
5191
5198
|
return;
|
|
5192
5199
|
}
|
|
5193
5200
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
@@ -5232,7 +5239,7 @@ function validateDynamicShape(fn) {
|
|
|
5232
5239
|
if (!violation) return;
|
|
5233
5240
|
var reasons = [violation.spread ? "a spread from a dynamic input" : "", violation.computed ? "a computed key from a dynamic input" : ""].filter(Boolean);
|
|
5234
5241
|
console.warn(`[tamagui] styled.dynamic${fn.name ? ` (${fn.name})` : ""} returned ${reasons.join(" and ")} during its development shape check. Dynamic style bodies require static object keys for extraction; this definition will deopt instead.`);
|
|
5235
|
-
} catch (
|
|
5242
|
+
} catch (unused) {}
|
|
5236
5243
|
}
|
|
5237
5244
|
function styledDynamic(fn) {
|
|
5238
5245
|
if (!fn) return bareStyledDynamic;
|
|
@@ -5273,15 +5280,15 @@ var totalSelectorsInserted = /* @__PURE__ */ new Map();
|
|
|
5273
5280
|
var allSelectors = {};
|
|
5274
5281
|
var allRules = {};
|
|
5275
5282
|
var allRuleSets = {};
|
|
5276
|
-
var getAllSelectors = function() {
|
|
5283
|
+
var getAllSelectors = function getAllSelectors2() {
|
|
5277
5284
|
return allSelectors;
|
|
5278
5285
|
};
|
|
5279
|
-
var getRulesForIdentifier = function(identifier) {
|
|
5286
|
+
var getRulesForIdentifier = function getRulesForIdentifier2(identifier) {
|
|
5280
5287
|
return allRuleSets[identifier];
|
|
5281
5288
|
};
|
|
5282
5289
|
var sortedRules = [];
|
|
5283
5290
|
var sortedRulesStale = true;
|
|
5284
|
-
var getAllRules = function() {
|
|
5291
|
+
var getAllRules = function getAllRules2() {
|
|
5285
5292
|
if (process.env.TAMAGUI_RUNTIME !== "island") {
|
|
5286
5293
|
if (sortedRulesStale) {
|
|
5287
5294
|
sortedRules = Object.keys(allRules).sort().map(function(key) {
|
|
@@ -5481,7 +5488,7 @@ function isTamaguiComponent(comp) {
|
|
|
5481
5488
|
}
|
|
5482
5489
|
//#endregion
|
|
5483
5490
|
//#region ../web/dist/esm/helpers/isTamaguiElement.native.js
|
|
5484
|
-
var isTamaguiElement = function(child) {
|
|
5491
|
+
var isTamaguiElement = function isTamaguiElement2(child) {
|
|
5485
5492
|
return /* @__PURE__ */ react.default.isValidElement(child) && isTamaguiComponent(child.type);
|
|
5486
5493
|
};
|
|
5487
5494
|
//#endregion
|
|
@@ -5690,11 +5697,11 @@ function isDynamicUnitValue(value) {
|
|
|
5690
5697
|
return !!((_UNIT_RE_exec = UNIT_RE.exec(trimmed.replace(/\s+/g, ""))) === null || _UNIT_RE_exec === void 0 ? void 0 : _UNIT_RE_exec[2]);
|
|
5691
5698
|
}
|
|
5692
5699
|
function getUnitContext(key, styleState) {
|
|
5700
|
+
var _ref;
|
|
5693
5701
|
var _styleState_conf_settings, _styleState_conf, _styleState_style, _groupEntry_state, _styleState_componentState_group_, _styleState_componentState_group, _styleState_componentState;
|
|
5694
5702
|
var window = react_native.Dimensions.get("window");
|
|
5695
5703
|
var fontScale = typeof react_native.PixelRatio !== "undefined" && react_native.PixelRatio.getFontScale ? react_native.PixelRatio.getFontScale() : 1;
|
|
5696
|
-
var
|
|
5697
|
-
var remBaseFontSize = (_styleState_conf_settings_remBaseFontSize = styleState === null || styleState === void 0 ? void 0 : (_styleState_conf = styleState.conf) === null || _styleState_conf === void 0 ? void 0 : (_styleState_conf_settings = _styleState_conf.settings) === null || _styleState_conf_settings === void 0 ? void 0 : _styleState_conf_settings.remBaseFontSize) !== null && _styleState_conf_settings_remBaseFontSize !== void 0 ? _styleState_conf_settings_remBaseFontSize : 16;
|
|
5704
|
+
var remBaseFontSize = (_ref = styleState === null || styleState === void 0 ? void 0 : (_styleState_conf = styleState.conf) === null || _styleState_conf === void 0 ? void 0 : (_styleState_conf_settings = _styleState_conf.settings) === null || _styleState_conf_settings === void 0 ? void 0 : _styleState_conf_settings.remBaseFontSize) !== null && _ref !== void 0 ? _ref : 16;
|
|
5698
5705
|
var isFontSizeProp = key === "fontSize";
|
|
5699
5706
|
var elementFontSize = typeof (styleState === null || styleState === void 0 ? void 0 : (_styleState_style = styleState.style) === null || _styleState_style === void 0 ? void 0 : _styleState_style.fontSize) === "number" ? styleState.style.fontSize : remBaseFontSize;
|
|
5700
5707
|
var groupContext = styleState === null || styleState === void 0 ? void 0 : styleState.flatGroupContext;
|
|
@@ -5751,10 +5758,10 @@ function evaluateCalc(expr, ctx) {
|
|
|
5751
5758
|
if (s.toLowerCase().startsWith("calc(") && s.endsWith(")")) s = s.slice(5, -1).trim();
|
|
5752
5759
|
var tokens = s.match(/[()*/+-]|[^\s()*/+-]+/g) || [];
|
|
5753
5760
|
var pos = 0;
|
|
5754
|
-
var peek = function() {
|
|
5761
|
+
var peek = function peek2() {
|
|
5755
5762
|
return tokens[pos];
|
|
5756
5763
|
};
|
|
5757
|
-
var consume = function() {
|
|
5764
|
+
var consume = function consume2() {
|
|
5758
5765
|
return tokens[pos++];
|
|
5759
5766
|
};
|
|
5760
5767
|
function parseExpression() {
|
|
@@ -6020,8 +6027,8 @@ function resolveConditionModifier(state, condition, authored) {
|
|
|
6020
6027
|
ranks[rankIndex] = precedence;
|
|
6021
6028
|
var buildCSS = false;
|
|
6022
6029
|
if (kind === 2) {
|
|
6023
|
-
var _state_flatMediaState;
|
|
6024
6030
|
var _state;
|
|
6031
|
+
var _state_flatMediaState;
|
|
6025
6032
|
var query = modifier[3];
|
|
6026
6033
|
if (!query) return setConditionUnresolved(condition, name);
|
|
6027
6034
|
if (buildCSS) appendConditionWrapper(condition, `@media ${query}`);
|
|
@@ -6037,8 +6044,8 @@ function resolveConditionModifier(state, condition, authored) {
|
|
|
6037
6044
|
return;
|
|
6038
6045
|
}
|
|
6039
6046
|
if (kind === 6) {
|
|
6040
|
-
var _state_componentState_group, _state_flatGroupContext, _state_flatGroupContext1, _component_media;
|
|
6041
6047
|
var _state1, _state2;
|
|
6048
|
+
var _state_componentState_group, _state_flatGroupContext, _state_flatGroupContext1, _component_media;
|
|
6042
6049
|
var size = modifier[4];
|
|
6043
6050
|
var containerName = modifier[5];
|
|
6044
6051
|
var groupName = `@${containerName}`;
|
|
@@ -6057,14 +6064,13 @@ function resolveConditionModifier(state, condition, authored) {
|
|
|
6057
6064
|
}
|
|
6058
6065
|
var selector = modifier[3];
|
|
6059
6066
|
if (kind === 5) {
|
|
6067
|
+
var _ref, _state3;
|
|
6060
6068
|
var _state_componentState_group1, _state_flatGroupContext2, _this;
|
|
6061
|
-
var _state3;
|
|
6062
6069
|
var groupName1 = modifier[4];
|
|
6063
6070
|
if (buildCSS) condition[conditionSelector] += `:where(.t_group_${groupName1}${selector} *)`;
|
|
6064
6071
|
var component1 = (_state_componentState_group1 = state.componentState.group) === null || _state_componentState_group1 === void 0 ? void 0 : _state_componentState_group1[groupName1];
|
|
6065
6072
|
var context1 = (_state_flatGroupContext2 = state.flatGroupContext) === null || _state_flatGroupContext2 === void 0 ? void 0 : _state_flatGroupContext2[groupName1];
|
|
6066
|
-
|
|
6067
|
-
if (!((_this = (_component_pseudo = component1 === null || component1 === void 0 ? void 0 : component1.pseudo) !== null && _component_pseudo !== void 0 ? _component_pseudo : context1 === null || context1 === void 0 ? void 0 : context1.state.pseudo) === null || _this === void 0 ? void 0 : _this[modifier[5]])) condition[conditionValue] &= -2;
|
|
6073
|
+
if (!((_this = (_ref = component1 === null || component1 === void 0 ? void 0 : component1.pseudo) !== null && _ref !== void 0 ? _ref : context1 === null || context1 === void 0 ? void 0 : context1.state.pseudo) === null || _this === void 0 ? void 0 : _this[modifier[5]])) condition[conditionValue] &= -2;
|
|
6068
6074
|
((_state3 = state).flatGroupKeys || (_state3.flatGroupKeys = /* @__PURE__ */ new Set())).add(groupName1);
|
|
6069
6075
|
} else {
|
|
6070
6076
|
var _state4;
|
|
@@ -6232,7 +6238,7 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
6232
6238
|
}
|
|
6233
6239
|
var resolveClassName = styleFrontend === null || styleFrontend === void 0 ? void 0 : styleFrontend.resolveClassName;
|
|
6234
6240
|
var composedProps = null;
|
|
6235
|
-
var sink = function(entry2) {
|
|
6241
|
+
var sink = function sink2(entry2) {
|
|
6236
6242
|
var property3 = entry2[0];
|
|
6237
6243
|
var condition2 = entry2[2];
|
|
6238
6244
|
if (property3.charCodeAt(0) === 95 && property3.charCodeAt(1) === 95) {
|
|
@@ -6415,10 +6421,8 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
6415
6421
|
if (!isValidStyleKeyInit) {
|
|
6416
6422
|
if (keyInit === "textOverflow") {
|
|
6417
6423
|
if (isText && valInit === "ellipsis") {
|
|
6418
|
-
var _viewProps, _viewProps1;
|
|
6419
|
-
var _numberOfLines;
|
|
6424
|
+
var _viewProps, _numberOfLines, _viewProps1, _ellipsizeMode;
|
|
6420
6425
|
(_numberOfLines = (_viewProps = viewProps).numberOfLines) !== null && _numberOfLines !== void 0 || (_viewProps.numberOfLines = 1);
|
|
6421
|
-
var _ellipsizeMode;
|
|
6422
6426
|
(_ellipsizeMode = (_viewProps1 = viewProps).ellipsizeMode) !== null && _ellipsizeMode !== void 0 || (_viewProps1.ellipsizeMode = "tail");
|
|
6423
6427
|
}
|
|
6424
6428
|
return;
|
|
@@ -6515,11 +6519,11 @@ function contributeProp(pass, keyOg, valOg) {
|
|
|
6515
6519
|
log("style", _objectSpread2({}, styleState.style));
|
|
6516
6520
|
log("viewProps", _objectSpread2({}, viewProps));
|
|
6517
6521
|
log("transforms", styleState.transformAccumulator);
|
|
6518
|
-
} catch (
|
|
6522
|
+
} catch (unused) {}
|
|
6519
6523
|
console.groupEnd();
|
|
6520
6524
|
}
|
|
6521
6525
|
}
|
|
6522
|
-
var getSplitStyles = function(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, componentContext, groupContext, elementType, startedUnhydrated, debug, animationDriver, styleStaticConfig) {
|
|
6526
|
+
var getSplitStyles = function getSplitStyles2(props, staticConfig, theme, themeName, componentState, styleProps, parentSplitStyles, componentContext, groupContext, elementType, startedUnhydrated, debug, animationDriver, styleStaticConfig) {
|
|
6523
6527
|
var _staticConfig_Component_staticConfig, _staticConfig_Component, _styleState_flatMediaKeys, _styleState_flatGroupKeys, _styleState_flatGroupMedia, _styleState_flatGroupKeys1, _styleState_flatGroupMedia1, _styleState_style;
|
|
6524
6528
|
var conf = getConfig();
|
|
6525
6529
|
styleStaticConfig || (styleStaticConfig = getStyleStaticConfig(staticConfig, conf));
|
|
@@ -6757,15 +6761,13 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
6757
6761
|
var nativeTextMetrics;
|
|
6758
6762
|
var _styleState_style2;
|
|
6759
6763
|
if (viewProps.tabIndex === 0) {
|
|
6760
|
-
var _viewProps;
|
|
6761
|
-
var _accessible;
|
|
6764
|
+
var _viewProps, _accessible;
|
|
6762
6765
|
(_accessible = (_viewProps = viewProps).accessible) !== null && _accessible !== void 0 || (_viewProps.accessible = true);
|
|
6763
6766
|
}
|
|
6764
6767
|
if ((isText || isInput || staticConfig.isDOM) && !isHOC && (styleState.nativeLineHeight !== void 0 || ((_styleState_style2 = styleState.style) === null || _styleState_style2 === void 0 ? void 0 : _styleState_style2.fontSize) !== void 0 || (componentContext === null || componentContext === void 0 ? void 0 : componentContext.parentFontSize) !== void 0 || (componentContext === null || componentContext === void 0 ? void 0 : componentContext.parentLineHeight) !== void 0)) {
|
|
6768
|
+
var _styleState2, _styleState_nativeLineHeight;
|
|
6765
6769
|
var _parentSplitStyles_nativeTextMetrics;
|
|
6766
|
-
var _styleState2;
|
|
6767
6770
|
var style = (_styleState2 = styleState).style || (_styleState2.style = {});
|
|
6768
|
-
var _styleState_nativeLineHeight;
|
|
6769
6771
|
var lineHeight = (_styleState_nativeLineHeight = styleState.nativeLineHeight) !== null && _styleState_nativeLineHeight !== void 0 ? _styleState_nativeLineHeight : parentSplitStyles === null || parentSplitStyles === void 0 ? void 0 : (_parentSplitStyles_nativeTextMetrics = parentSplitStyles.nativeTextMetrics) === null || _parentSplitStyles_nativeTextMetrics === void 0 ? void 0 : _parentSplitStyles_nativeTextMetrics.lineHeight;
|
|
6770
6772
|
if (typeof lineHeight === "string") {
|
|
6771
6773
|
var length = resolveNativeUnits("lineHeight", lineHeight, styleState);
|
|
@@ -6904,7 +6906,7 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
6904
6906
|
parentSplitStyles
|
|
6905
6907
|
});
|
|
6906
6908
|
for (var key8 in logs) log(key8, logs[key8]);
|
|
6907
|
-
} catch (
|
|
6909
|
+
} catch (unused) {}
|
|
6908
6910
|
console.groupEnd();
|
|
6909
6911
|
}
|
|
6910
6912
|
}
|
|
@@ -6916,8 +6918,7 @@ var stylePieceStaticConfig = {
|
|
|
6916
6918
|
isText: true,
|
|
6917
6919
|
validStyles: stylePropsInput
|
|
6918
6920
|
};
|
|
6919
|
-
|
|
6920
|
-
setStylePieceCompiler(compileStylePieceRuntime);
|
|
6921
|
+
setStylePieceCompiler(function compileStylePieceRuntime2(piece, layer) {});
|
|
6921
6922
|
setStylePieceResolver(function(piece, theme, themeName) {
|
|
6922
6923
|
var split = getSplitStyles({ style: piece }, stylePieceStaticConfig, theme, themeName, defaultComponentStateMounted, {
|
|
6923
6924
|
isAnimated: false,
|
|
@@ -6975,11 +6976,10 @@ function mergeStyle(styleState, key, val) {
|
|
|
6975
6976
|
var { viewProps, styleProps, staticConfig } = styleState;
|
|
6976
6977
|
var contextPropSet = styleState.flatStyleStaticConfig.styledContextKeys;
|
|
6977
6978
|
if (contextPropSet === null || contextPropSet === void 0 ? void 0 : contextPropSet.has(key)) {
|
|
6979
|
+
var _styleState, _ref;
|
|
6978
6980
|
var _styleState_originalContextPropValues;
|
|
6979
|
-
var _styleState;
|
|
6980
6981
|
(_styleState = styleState).overriddenContextProps || (_styleState.overriddenContextProps = {});
|
|
6981
6982
|
var originalFromState = (_styleState_originalContextPropValues = styleState.originalContextPropValues) === null || _styleState_originalContextPropValues === void 0 ? void 0 : _styleState_originalContextPropValues[key];
|
|
6982
|
-
var _ref;
|
|
6983
6983
|
styleState.overriddenContextProps[key] = (_ref = originalVal !== null && originalVal !== void 0 ? originalVal : originalFromState) !== null && _ref !== void 0 ? _ref : val;
|
|
6984
6984
|
}
|
|
6985
6985
|
if (key === "transform" || key in stylePropsTransform) {
|
|
@@ -7026,7 +7026,7 @@ function recordStyleTokenProvenance(styleState, key, originalVal) {
|
|
|
7026
7026
|
((_styleState = styleState).tokenProvenance || (_styleState.tokenProvenance = {}))[key] = originalVal;
|
|
7027
7027
|
} else if (styleState.tokenProvenance && key in styleState.tokenProvenance) delete styleState.tokenProvenance[key];
|
|
7028
7028
|
}
|
|
7029
|
-
var resolveStyleObject = function(styleState, styleIn) {
|
|
7029
|
+
var resolveStyleObject = function resolveStyleObject2(styleState, styleIn) {
|
|
7030
7030
|
var { conf, styleProps } = styleState;
|
|
7031
7031
|
var styleOut = {};
|
|
7032
7032
|
var originalValues;
|
|
@@ -7041,10 +7041,10 @@ var resolveStyleObject = function(styleState, styleIn) {
|
|
|
7041
7041
|
childState.flatAtomics = void 0;
|
|
7042
7042
|
childState.flatSlots = void 0;
|
|
7043
7043
|
childState.flatPropertyLayers = void 0;
|
|
7044
|
-
var mergeAccepted = function(_state, key2, value2, disableNormalize, originalValue) {
|
|
7044
|
+
var mergeAccepted = function mergeAccepted2(_state, key2, value2, disableNormalize, originalValue) {
|
|
7045
|
+
var _ref;
|
|
7045
7046
|
styleOut[key2] = disableNormalize || styleProps.noNormalize ? value2 : normalizeValueWithProperty(value2, key2);
|
|
7046
|
-
var
|
|
7047
|
-
var trackedOriginal = (_styleInOriginalValues_key = styleInOriginalValues === null || styleInOriginalValues === void 0 ? void 0 : styleInOriginalValues[key2]) !== null && _styleInOriginalValues_key !== void 0 ? _styleInOriginalValues_key : originalValue;
|
|
7047
|
+
var trackedOriginal = (_ref = styleInOriginalValues === null || styleInOriginalValues === void 0 ? void 0 : styleInOriginalValues[key2]) !== null && _ref !== void 0 ? _ref : originalValue;
|
|
7048
7048
|
if (trackedOriginal !== void 0) (originalValues || (originalValues = {}))[key2] = trackedOriginal;
|
|
7049
7049
|
};
|
|
7050
7050
|
for (var key in styleIn) {
|
|
@@ -7066,8 +7066,8 @@ var recordDefault = 8;
|
|
|
7066
7066
|
var recordCSS = 16;
|
|
7067
7067
|
function writeStyleRecord(state, property, value, cursor, original, flags) {
|
|
7068
7068
|
var conditionOverride = arguments.length > 6 && arguments[6] !== void 0 ? arguments[6] : -1;
|
|
7069
|
-
var _direct_flatPass, _direct_flatPass1;
|
|
7070
7069
|
var _direct;
|
|
7070
|
+
var _direct_flatPass, _direct_flatPass1;
|
|
7071
7071
|
var condition = conditionOverride !== -1 ? conditionOverride : cursor ? cursor[conditionValue] : 0;
|
|
7072
7072
|
var identity = cursor ? cursor[conditionKey] : "";
|
|
7073
7073
|
if (value === "unset" && identity !== "") {
|
|
@@ -7114,11 +7114,11 @@ function completeResolvedStyles(state) {
|
|
|
7114
7114
|
var direct = state;
|
|
7115
7115
|
var shadow = direct.flatWebShadow;
|
|
7116
7116
|
if (shadow && (direct.flatBoxShadowSequence || 0) <= shadow[4]) {
|
|
7117
|
+
var _shadow_;
|
|
7117
7118
|
var offset = shadow[1] || {
|
|
7118
7119
|
width: 0,
|
|
7119
7120
|
height: 0
|
|
7120
7121
|
};
|
|
7121
|
-
var _shadow_;
|
|
7122
7122
|
var color = normalizeColor(shadow[0], (_shadow_ = shadow[2]) !== null && _shadow_ !== void 0 ? _shadow_ : 1);
|
|
7123
7123
|
if (color) {
|
|
7124
7124
|
var next = `${shadowUnit(offset.width)} ${shadowUnit(offset.height)} ${shadowUnit(shadow[3])} ${color}`;
|
|
@@ -7239,10 +7239,10 @@ function emitUnderCondition(state, property, value, cursor, originalValue, conte
|
|
|
7239
7239
|
}
|
|
7240
7240
|
return condition;
|
|
7241
7241
|
}
|
|
7242
|
-
var formatScanFailure = function(failure, source, failureIndex) {
|
|
7242
|
+
var formatScanFailure = function formatScanFailure2(failure, source, failureIndex) {
|
|
7243
7243
|
return failure === "invalid-character" ? `"${source[failureIndex]}" would end the declaration or rule` : failure === "unterminated-string" ? "an unterminated string" : failure === "unterminated-comment" ? "an unterminated \"/*\" comment" : failure === "stray-comment-close" ? "a stray \"*/\"" : failure === "over-deep-clause" ? `a clause with more than 5 non-platform conditions` : "an unterminated \"(\"";
|
|
7244
7244
|
};
|
|
7245
|
-
var warnScanFailure = function(property, source, failure, failureIndex) {
|
|
7245
|
+
var warnScanFailure = function warnScanFailure2(property, source, failure, failureIndex) {
|
|
7246
7246
|
if (globalThis.process.env.NODE_ENV === "development") warnRefusedValue(property, source, formatScanFailure(failure, source, failureIndex));
|
|
7247
7247
|
};
|
|
7248
7248
|
var borderTargets = {
|
|
@@ -7478,8 +7478,8 @@ function configuredValue(state, property, raw) {
|
|
|
7478
7478
|
}
|
|
7479
7479
|
function ownsSourceLayer(state, property) {
|
|
7480
7480
|
var conditional = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : false;
|
|
7481
|
-
var _direct_flatPass, _direct_flatPass1;
|
|
7482
7481
|
var _direct;
|
|
7482
|
+
var _direct_flatPass, _direct_flatPass1;
|
|
7483
7483
|
var direct = state;
|
|
7484
7484
|
var layer = ((_direct_flatPass = direct.flatPass) === null || _direct_flatPass === void 0 ? void 0 : _direct_flatPass[passSourceLayer]) || 0;
|
|
7485
7485
|
var layers = (_direct = direct).flatPropertyLayers || (_direct.flatPropertyLayers = /* @__PURE__ */ new Map());
|
|
@@ -7770,8 +7770,7 @@ function walkConditionalValue(state, property, value, parent, sink) {
|
|
|
7770
7770
|
if (!(flags & 1)) continue;
|
|
7771
7771
|
if (start === end) continue;
|
|
7772
7772
|
if (flags & 2) {
|
|
7773
|
-
var _slices, _index;
|
|
7774
|
-
var _;
|
|
7773
|
+
var _slices, _index, _;
|
|
7775
7774
|
var payload = (_ = (_slices = slices)[_index = index]) !== null && _ !== void 0 ? _ : _slices[_index] = value.slice(start, end);
|
|
7776
7775
|
emitConditionalValue(state, property, payload, parentCondition, payload, sink, warnMode, contextOnly);
|
|
7777
7776
|
hasBase = true;
|
|
@@ -7782,7 +7781,7 @@ function walkConditionalValue(state, property, value, parent, sink) {
|
|
|
7782
7781
|
}
|
|
7783
7782
|
var lastPayloadStart = 0;
|
|
7784
7783
|
for (var index1 = 0; index1 < segments.length; index1 += 5) {
|
|
7785
|
-
var _slices1, _ref;
|
|
7784
|
+
var _slices1, _ref, _1;
|
|
7786
7785
|
var start1 = segments[index1];
|
|
7787
7786
|
var end1 = segments[index1 + 1];
|
|
7788
7787
|
var flags1 = segments[index1 + 4];
|
|
@@ -7796,12 +7795,10 @@ function walkConditionalValue(state, property, value, parent, sink) {
|
|
|
7796
7795
|
if (warnMode && globalThis.process.env.NODE_ENV === "development") warnRefusedValue(property, value, "a conditional clause has no value");
|
|
7797
7796
|
continue;
|
|
7798
7797
|
}
|
|
7799
|
-
var _1;
|
|
7800
7798
|
var cursor = conditionFromKey(state, (_1 = (_slices1 = slices)[_ref = index1 + 2]) !== null && _1 !== void 0 ? _1 : _slices1[_ref] = value.slice(segments[index1 + 2], segments[index1 + 3]), parentCondition);
|
|
7801
7799
|
conditions |= cursor[conditionValue];
|
|
7802
7800
|
if (cursor[conditionValue] & conditionResolvedFlag || warnMode) {
|
|
7803
|
-
var _slices2, _index1;
|
|
7804
|
-
var _2;
|
|
7801
|
+
var _slices2, _index1, _2;
|
|
7805
7802
|
emitConditionalValue(state, property, (_2 = (_slices2 = slices)[_index1 = index1]) !== null && _2 !== void 0 ? _2 : _slices2[_index1] = value.slice(start1, end1), cursor, value, sink, warnMode, contextOnly);
|
|
7806
7803
|
}
|
|
7807
7804
|
}
|
|
@@ -7976,9 +7973,9 @@ function usePointerEvents(props, viewProps) {
|
|
|
7976
7973
|
};
|
|
7977
7974
|
if (!hasPointerEvents) return;
|
|
7978
7975
|
var bag = ref.current;
|
|
7979
|
-
var createNormalizedEvent = function(e) {
|
|
7980
|
-
var touch = e.nativeEvent;
|
|
7976
|
+
var createNormalizedEvent = function createNormalizedEvent2(e) {
|
|
7981
7977
|
var _touch_identifier;
|
|
7978
|
+
var touch = e.nativeEvent;
|
|
7982
7979
|
return _objectSpread2(_objectSpread2({}, e), {}, {
|
|
7983
7980
|
clientX: touch.pageX,
|
|
7984
7981
|
clientY: touch.pageY,
|
|
@@ -7990,10 +7987,10 @@ function usePointerEvents(props, viewProps) {
|
|
|
7990
7987
|
pointerId: (_touch_identifier = touch.identifier) !== null && _touch_identifier !== void 0 ? _touch_identifier : 0,
|
|
7991
7988
|
nativeEvent: touch,
|
|
7992
7989
|
target: {
|
|
7993
|
-
setPointerCapture: function(_pointerId) {
|
|
7990
|
+
setPointerCapture: function setPointerCapture(_pointerId) {
|
|
7994
7991
|
bag.isCaptured = true;
|
|
7995
7992
|
},
|
|
7996
|
-
releasePointerCapture: function(_pointerId) {
|
|
7993
|
+
releasePointerCapture: function releasePointerCapture(_pointerId) {
|
|
7997
7994
|
bag.isCaptured = false;
|
|
7998
7995
|
}
|
|
7999
7996
|
}
|
|
@@ -8077,7 +8074,7 @@ function setElementProps(element) {
|
|
|
8077
8074
|
}
|
|
8078
8075
|
//#endregion
|
|
8079
8076
|
//#region ../web/dist/esm/helpers/subscribeToContextGroup.native.js
|
|
8080
|
-
var useGroupSetRevision = function(pseudoGroups, mediaGroups) {
|
|
8077
|
+
var useGroupSetRevision = function useGroupSetRevision2(pseudoGroups, mediaGroups) {
|
|
8081
8078
|
var previous = (0, react.useRef)({
|
|
8082
8079
|
pseudoGroups,
|
|
8083
8080
|
mediaGroups,
|
|
@@ -8090,7 +8087,7 @@ var useGroupSetRevision = function(pseudoGroups, mediaGroups) {
|
|
|
8090
8087
|
};
|
|
8091
8088
|
return previous.current.revision;
|
|
8092
8089
|
};
|
|
8093
|
-
var setsEqual = function(a, b) {
|
|
8090
|
+
var setsEqual = function setsEqual2(a, b) {
|
|
8094
8091
|
if (a === b) return true;
|
|
8095
8092
|
if (!a || !b || a.size !== b.size) return false;
|
|
8096
8093
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
@@ -8111,7 +8108,7 @@ var setsEqual = function(a, b) {
|
|
|
8111
8108
|
}
|
|
8112
8109
|
return true;
|
|
8113
8110
|
};
|
|
8114
|
-
var subscribeToContextGroup = function(props) {
|
|
8111
|
+
var subscribeToContextGroup = function subscribeToContextGroup2(props) {
|
|
8115
8112
|
var { pseudoGroups, mediaGroups, groupContext } = props;
|
|
8116
8113
|
if (pseudoGroups || mediaGroups) {
|
|
8117
8114
|
if (globalThis.process.env.NODE_ENV === "development" && !groupContext) console.debug(`No context group found`);
|
|
@@ -8159,7 +8156,7 @@ var subscribeToContextGroup = function(props) {
|
|
|
8159
8156
|
};
|
|
8160
8157
|
}
|
|
8161
8158
|
};
|
|
8162
|
-
var createGroupListener = function(name, param) {
|
|
8159
|
+
var createGroupListener = function createGroupListener2(name, param) {
|
|
8163
8160
|
var { setStateShallow, pseudoGroups, mediaGroups, groupContext } = param;
|
|
8164
8161
|
var parent = groupContext === null || groupContext === void 0 ? void 0 : groupContext[name];
|
|
8165
8162
|
if (!parent) return function() {};
|
|
@@ -8211,7 +8208,7 @@ var createGroupListener = function(name, param) {
|
|
|
8211
8208
|
//#endregion
|
|
8212
8209
|
//#region ../use-did-finish-ssr/dist/esm/ClientOnly.native.js
|
|
8213
8210
|
var ClientOnlyContext = /* @__PURE__ */ (0, react.createContext)(false);
|
|
8214
|
-
var ClientOnly = function(param) {
|
|
8211
|
+
var ClientOnly = function ClientOnly2(param) {
|
|
8215
8212
|
var { children, enabled } = param;
|
|
8216
8213
|
var existingValue = (0, react.useContext)(ClientOnlyContext);
|
|
8217
8214
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ClientOnlyContext.Provider, {
|
|
@@ -8221,7 +8218,7 @@ var ClientOnly = function(param) {
|
|
|
8221
8218
|
};
|
|
8222
8219
|
//#endregion
|
|
8223
8220
|
//#region ../use-did-finish-ssr/dist/esm/index.native.js
|
|
8224
|
-
var useIsClientOnly = function() {
|
|
8221
|
+
var useIsClientOnly = function useIsClientOnly2() {
|
|
8225
8222
|
return react.useContext(ClientOnlyContext);
|
|
8226
8223
|
};
|
|
8227
8224
|
function useDidFinishSSR() {
|
|
@@ -8233,10 +8230,10 @@ function useClientValue(value) {
|
|
|
8233
8230
|
}
|
|
8234
8231
|
//#endregion
|
|
8235
8232
|
//#region ../web/dist/esm/hooks/useComponentState.native.js
|
|
8236
|
-
var useComponentState = function(props, animationDriver, staticConfig, config) {
|
|
8233
|
+
var useComponentState = function useComponentState2(props, animationDriver, staticConfig, config) {
|
|
8237
8234
|
"use no memo";
|
|
8235
|
+
var _stateRef, _ref, _ref1, _curStateRef, _curStateRef1;
|
|
8238
8236
|
var _getPlatformDriver, _animationDriver_usePresence;
|
|
8239
|
-
var _stateRef, _curStateRef, _curStateRef1;
|
|
8240
8237
|
var isHydrated = useDidFinishSSR();
|
|
8241
8238
|
var needsHydration = !useIsClientOnly();
|
|
8242
8239
|
var useAnimations = (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.isStub) ? void 0 : animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.useAnimations;
|
|
@@ -8247,10 +8244,8 @@ var useComponentState = function(props, animationDriver, staticConfig, config) {
|
|
|
8247
8244
|
optimizeForFirstRender: isOptimizedForFirstRender()
|
|
8248
8245
|
});
|
|
8249
8246
|
var hasAnimationProp = Boolean(!isHOC && "transition" in props || props.style && hasAnimatedStyleValue(props.style));
|
|
8250
|
-
var
|
|
8251
|
-
var
|
|
8252
|
-
var _animationDriver_outputStyle;
|
|
8253
|
-
var outputStyle = (_animationDriver_outputStyle = animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.outputStyle) !== null && _animationDriver_outputStyle !== void 0 ? _animationDriver_outputStyle : "css";
|
|
8247
|
+
var inputStyle = (_ref = animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.inputStyle) !== null && _ref !== void 0 ? _ref : "css";
|
|
8248
|
+
var outputStyle = (_ref1 = animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.outputStyle) !== null && _ref1 !== void 0 ? _ref1 : "css";
|
|
8254
8249
|
if (!needsHydration && hasAnimationProp) curStateRef.hasAnimated = true;
|
|
8255
8250
|
var platformPseudoPossible = Boolean(!isHOC && useAnimations && (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.avoidReRenders) && ((_getPlatformDriver = getPlatformDriver()) === null || _getPlatformDriver === void 0 ? void 0 : _getPlatformDriver.pseudo));
|
|
8256
8251
|
var willBeAnimatedClient = Boolean((hasAnimationProp || platformPseudoPossible) && !isHOC && useAnimations || curStateRef.hasAnimated);
|
|
@@ -8260,8 +8255,7 @@ var useComponentState = function(props, animationDriver, staticConfig, config) {
|
|
|
8260
8255
|
var animatePresenceOptIn = willBeAnimated && !isHOC && props["animatePresence"] !== false;
|
|
8261
8256
|
if (animatePresenceOptIn) curStateRef.shouldRegisterPresence = true;
|
|
8262
8257
|
else {
|
|
8263
|
-
var _curStateRef2;
|
|
8264
|
-
var _shouldRegisterPresence;
|
|
8258
|
+
var _curStateRef2, _shouldRegisterPresence;
|
|
8265
8259
|
(_shouldRegisterPresence = (_curStateRef2 = curStateRef).shouldRegisterPresence) !== null && _shouldRegisterPresence !== void 0 || (_curStateRef2.shouldRegisterPresence = false);
|
|
8266
8260
|
}
|
|
8267
8261
|
var presenceResult = (animationDriver === null || animationDriver === void 0 ? void 0 : (_animationDriver_usePresence = animationDriver.usePresence) === null || _animationDriver_usePresence === void 0 ? void 0 : _animationDriver_usePresence.call(animationDriver, curStateRef)) || null;
|
|
@@ -8361,11 +8355,11 @@ function hasAnimatedStyleValue(style) {
|
|
|
8361
8355
|
}
|
|
8362
8356
|
return false;
|
|
8363
8357
|
}
|
|
8364
|
-
var isDisabled = function(props) {
|
|
8358
|
+
var isDisabled = function isDisabled2(props) {
|
|
8365
8359
|
var _props_accessibilityState;
|
|
8366
8360
|
return props.disabled || props.passThrough || ((_props_accessibilityState = props.accessibilityState) === null || _props_accessibilityState === void 0 ? void 0 : _props_accessibilityState.disabled) || props["aria-disabled"] || props.accessibilityDisabled || false;
|
|
8367
8361
|
};
|
|
8368
|
-
var useSplitStyles = function(a, b, c, d, e, f, g, h, i, j, k, l, m, n) {
|
|
8362
|
+
var useSplitStyles = function useSplitStyles2(a, b, c, d, e, f, g, h, i, j, k, l, m, n) {
|
|
8369
8363
|
"use no memo";
|
|
8370
8364
|
var res = getSplitStyles(a, b, c, d, e, f, g, h, i, j, k, l, m, n);
|
|
8371
8365
|
if (process.env.TAMAGUI_RUNTIME !== "island" && false);
|
|
@@ -8382,7 +8376,7 @@ var Slot = /* @__PURE__ */ (0, react.memo)(createRefComponent(function Slot2(pro
|
|
|
8382
8376
|
}
|
|
8383
8377
|
return react.Children.count(children) > 1 ? react.Children.only(null) : null;
|
|
8384
8378
|
}));
|
|
8385
|
-
var Slottable = function(param) {
|
|
8379
|
+
var Slottable = function Slottable2(param) {
|
|
8386
8380
|
var { children } = param;
|
|
8387
8381
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(react_jsx_runtime.Fragment, { children });
|
|
8388
8382
|
};
|
|
@@ -8565,10 +8559,10 @@ function createComponent(staticConfig) {
|
|
|
8565
8559
|
var { Component, isText, isHOC } = staticConfig;
|
|
8566
8560
|
var res;
|
|
8567
8561
|
var { displayName } = staticConfig;
|
|
8568
|
-
var component = function(propsInWithRef) {
|
|
8562
|
+
var component = function component2(propsInWithRef) {
|
|
8569
8563
|
"use no memo";
|
|
8564
|
+
var _stateRef_current, _avoidReRenders, _ref, _ref1;
|
|
8570
8565
|
var _hooks_usePropsTransform, _staticConfig_neverSkipProps;
|
|
8571
|
-
var _stateRef_current;
|
|
8572
8566
|
var forwardedRef = propsInWithRef.ref;
|
|
8573
8567
|
var propsIn = propsInWithRef;
|
|
8574
8568
|
config = config || getConfig();
|
|
@@ -8621,14 +8615,14 @@ function createComponent(staticConfig) {
|
|
|
8621
8615
|
if (globalThis.process.env.NODE_ENV === "development" && true) react.default.useEffect(function() {
|
|
8622
8616
|
var node;
|
|
8623
8617
|
var overlay = null;
|
|
8624
|
-
var remove = function() {
|
|
8618
|
+
var remove = function remove2() {
|
|
8625
8619
|
if (overlay) try {
|
|
8626
8620
|
var _overlay_parentNode;
|
|
8627
8621
|
(_overlay_parentNode = overlay.parentNode) === null || _overlay_parentNode === void 0 || _overlay_parentNode.removeChild(overlay);
|
|
8628
8622
|
overlay = null;
|
|
8629
|
-
} catch (
|
|
8623
|
+
} catch (unused) {}
|
|
8630
8624
|
};
|
|
8631
|
-
var debugVisualizerHandler = function() {
|
|
8625
|
+
var debugVisualizerHandler = function debugVisualizerHandler2() {
|
|
8632
8626
|
var show = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : false;
|
|
8633
8627
|
node = stateRef.current.host;
|
|
8634
8628
|
if (!node) return;
|
|
@@ -8668,12 +8662,12 @@ function createComponent(staticConfig) {
|
|
|
8668
8662
|
}, [displayName]);
|
|
8669
8663
|
var groupContextParent = react.default.useContext(GroupContext);
|
|
8670
8664
|
var animationDriver = (function() {
|
|
8665
|
+
var _ref9, _componentContext_animationDriver;
|
|
8671
8666
|
if (props.animatedBy && config) {
|
|
8672
8667
|
if (config.animationDrivers) return props.animatedBy in config.animationDrivers ? config.animationDrivers[props.animatedBy] : config.animations;
|
|
8673
8668
|
return props.animatedBy === "default" ? config.animations : null;
|
|
8674
8669
|
}
|
|
8675
|
-
|
|
8676
|
-
return (_ref5 = (_componentContext_animationDriver = componentContext.animationDriver) !== null && _componentContext_animationDriver !== void 0 ? _componentContext_animationDriver : config === null || config === void 0 ? void 0 : config.animations) !== null && _ref5 !== void 0 ? _ref5 : null;
|
|
8670
|
+
return (_ref9 = (_componentContext_animationDriver = componentContext.animationDriver) !== null && _componentContext_animationDriver !== void 0 ? _componentContext_animationDriver : config === null || config === void 0 ? void 0 : config.animations) !== null && _ref9 !== void 0 ? _ref9 : null;
|
|
8677
8671
|
})();
|
|
8678
8672
|
var useAnimations = (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.isStub) ? void 0 : animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.useAnimations;
|
|
8679
8673
|
var componentState = useComponentState(props, (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.isStub) ? null : animationDriver, staticConfig, config);
|
|
@@ -8681,7 +8675,6 @@ function createComponent(staticConfig) {
|
|
|
8681
8675
|
var { groupName } = componentState;
|
|
8682
8676
|
var { hasEnterStyle, isAnimated, willBeAnimated, willBeAnimatedClient, platformPseudo } = componentState;
|
|
8683
8677
|
props = componentState.props;
|
|
8684
|
-
var _avoidReRenders;
|
|
8685
8678
|
(_avoidReRenders = (_stateRef_current = stateRef.current).avoidReRenders) !== null && _avoidReRenders !== void 0 || (_stateRef_current.avoidReRenders = !!(animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.avoidReRenders));
|
|
8686
8679
|
if (stateRef.current.avoidReRenders) useIsomorphicLayoutEffect(function() {
|
|
8687
8680
|
var emitted = stateRef.current.prevPseudoState;
|
|
@@ -8730,9 +8723,9 @@ function createComponent(staticConfig) {
|
|
|
8730
8723
|
var _stateRef_current1;
|
|
8731
8724
|
themeStateProps.deopt = willBeAnimated;
|
|
8732
8725
|
themeStateProps.nativeUpdate = (_stateRef_current1 = stateRef.current).nativeUpdateProxy || (_stateRef_current1.nativeUpdateProxy = function(next) {
|
|
8726
|
+
var _ref9;
|
|
8733
8727
|
var _stateRef_current_nativeStyleUpdate, _stateRef_current3;
|
|
8734
|
-
|
|
8735
|
-
return (_stateRef_current_nativeStyleUpdate1 = (_stateRef_current_nativeStyleUpdate = (_stateRef_current3 = stateRef.current).nativeStyleUpdate) === null || _stateRef_current_nativeStyleUpdate === void 0 ? void 0 : _stateRef_current_nativeStyleUpdate.call(_stateRef_current3, next)) !== null && _stateRef_current_nativeStyleUpdate1 !== void 0 ? _stateRef_current_nativeStyleUpdate1 : false;
|
|
8728
|
+
return (_ref9 = (_stateRef_current_nativeStyleUpdate = (_stateRef_current3 = stateRef.current).nativeStyleUpdate) === null || _stateRef_current_nativeStyleUpdate === void 0 ? void 0 : _stateRef_current_nativeStyleUpdate.call(_stateRef_current3, next)) !== null && _ref9 !== void 0 ? _ref9 : false;
|
|
8736
8729
|
});
|
|
8737
8730
|
if (globalThis.process.env.NODE_ENV === "development") {
|
|
8738
8731
|
if (debugProp && debugProp !== "profile") {
|
|
@@ -8790,10 +8783,8 @@ ${banner}
|
|
|
8790
8783
|
willBeAnimated = finalizedComponentState.willBeAnimated;
|
|
8791
8784
|
willBeAnimatedClient = finalizedComponentState.willBeAnimatedClient;
|
|
8792
8785
|
platformPseudo = finalizedComponentState.platformPseudo;
|
|
8793
|
-
|
|
8794
|
-
|
|
8795
|
-
var _splitStyles_frontendContainer;
|
|
8796
|
-
var containerProp = (_splitStyles_frontendContainer = splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.frontendContainer) !== null && _splitStyles_frontendContainer !== void 0 ? _splitStyles_frontendContainer : props.container;
|
|
8786
|
+
groupName = (_ref = splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.frontendGroup) !== null && _ref !== void 0 ? _ref : groupName;
|
|
8787
|
+
var containerProp = (_ref1 = splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.frontendContainer) !== null && _ref1 !== void 0 ? _ref1 : props.container;
|
|
8797
8788
|
var containerName = props.containerName || (typeof containerProp === "string" ? containerProp : void 0);
|
|
8798
8789
|
var containerType = (splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.frontendContainerType) || props.containerType || (containerProp ? "inline-size" : void 0);
|
|
8799
8790
|
var isContainer = !!containerType && containerType !== "normal";
|
|
@@ -8820,7 +8811,7 @@ ${banner}
|
|
|
8820
8811
|
};
|
|
8821
8812
|
var entry = {
|
|
8822
8813
|
state: { pseudo: defaultComponentStateMounted },
|
|
8823
|
-
subscribe: function(listener) {
|
|
8814
|
+
subscribe: function subscribe(listener) {
|
|
8824
8815
|
var _stateRef_current_group2;
|
|
8825
8816
|
var dispose = (_stateRef_current_group2 = stateRef.current.group) === null || _stateRef_current_group2 === void 0 ? void 0 : _stateRef_current_group2.subscribe(listener);
|
|
8826
8817
|
return function() {
|
|
@@ -8846,6 +8837,7 @@ ${banner}
|
|
|
8846
8837
|
var nativeEngine = getNativeStyleEngine();
|
|
8847
8838
|
var canNativeUpdate = !!nativeEngine && !isPassthrough && !isHOC && !willBeAnimated && !groupName && !props.disableNativeStyle;
|
|
8848
8839
|
stateRef.current.nativePushedStates = canNativeUpdate ? /* @__PURE__ */ new Set() : void 0;
|
|
8840
|
+
if (stateRef.current.nativeLink) supersedeNativeViewStates(stateRef.current.nativeLink.id);
|
|
8849
8841
|
stateRef.current.nativeThemeState = void 0;
|
|
8850
8842
|
stateRef.current.nativeActiveState = canNativeUpdate ? themeState === null || themeState === void 0 ? void 0 : themeState.name : void 0;
|
|
8851
8843
|
var pushViewState = canNativeUpdate ? function(stateName, style2) {
|
|
@@ -8973,6 +8965,7 @@ ${banner}
|
|
|
8973
8965
|
var _stateRef_current2;
|
|
8974
8966
|
var ogSetStateShallow = setStateShallow;
|
|
8975
8967
|
stateRef.current.updateStyleListener = function() {
|
|
8968
|
+
var _ref9, _ref12;
|
|
8976
8969
|
var useStyleListener = stateRef.current.useStyleListener;
|
|
8977
8970
|
if (!useStyleListener) {
|
|
8978
8971
|
var pendingState = stateRef.current.nextState;
|
|
@@ -8982,8 +8975,7 @@ ${banner}
|
|
|
8982
8975
|
var updatedState = stateRef.current.nextState || state;
|
|
8983
8976
|
var mediaState2 = stateRef.current.nextMedia;
|
|
8984
8977
|
var nextStyles = getSplitStyles(props, staticConfig, theme, themeName, updatedState, mediaState2 ? _objectSpread2(_objectSpread2({}, styleProps), {}, { mediaState: mediaState2 }) : styleProps, null, componentContext, allGroupContexts, elementType, startedUnhydrated, debugProp, animationDriver, styleStaticConfig);
|
|
8985
|
-
var
|
|
8986
|
-
var effectiveTransition2 = (_ref5 = (_nextStyles_effectiveTransition = nextStyles === null || nextStyles === void 0 ? void 0 : nextStyles.effectiveTransition) !== null && _nextStyles_effectiveTransition !== void 0 ? _nextStyles_effectiveTransition : props.transition) !== null && _ref5 !== void 0 ? _ref5 : platformPseudo ? "0ms" : void 0;
|
|
8978
|
+
var effectiveTransition2 = (_ref9 = (_ref12 = nextStyles === null || nextStyles === void 0 ? void 0 : nextStyles.effectiveTransition) !== null && _ref12 !== void 0 ? _ref12 : props.transition) !== null && _ref9 !== void 0 ? _ref9 : platformPseudo ? "0ms" : void 0;
|
|
8987
8979
|
stateRef.current.prevPseudoState = extractPseudoState(updatedState);
|
|
8988
8980
|
var hasActivePseudo = Boolean(updatedState.hover || updatedState.press || updatedState.pressIn || updatedState.focus || updatedState.focusWithin);
|
|
8989
8981
|
useStyleListener((nextStyles === null || nextStyles === void 0 ? void 0 : nextStyles.style) || {}, effectiveTransition2, hasActivePseudo, nextStyles === null || nextStyles === void 0 ? void 0 : nextStyles.nativeTextMetrics);
|
|
@@ -9030,7 +9022,7 @@ ${banner}
|
|
|
9030
9022
|
ogSetStateShallow(next);
|
|
9031
9023
|
}
|
|
9032
9024
|
};
|
|
9033
|
-
setStateShallow = function(state2) {
|
|
9025
|
+
setStateShallow = function setStateShallow2(state2) {
|
|
9034
9026
|
var _stateRef_current_setStateShallow, _stateRef_current3;
|
|
9035
9027
|
(_stateRef_current_setStateShallow = (_stateRef_current3 = stateRef.current).setStateShallow) === null || _stateRef_current_setStateShallow === void 0 || _stateRef_current_setStateShallow.call(_stateRef_current3, state2);
|
|
9036
9028
|
};
|
|
@@ -9051,7 +9043,7 @@ ${banner}
|
|
|
9051
9043
|
var groupSetRevision = useGroupSetRevision(pseudoGroups, mediaGroups);
|
|
9052
9044
|
stateRef.current.prevStyle = splitStylesStyle || null;
|
|
9053
9045
|
var propsWithAnimation = props;
|
|
9054
|
-
var
|
|
9046
|
+
var _ref13 = viewPropsIn || {}, { asChild, children, themeShallow, onPress, onLongPress, onPressIn, onPressOut, onHoverIn, onHoverOut, onMouseUp, onMouseDown, onMouseEnter, onMouseLeave, onFocus, onBlur, onTransition, separator, passThrough, forceStyle: _forceStyle, onClick, theme: _themeProp } = _ref13, nonTamaguiProps = _objectWithoutProperties(_ref13, _excluded2$2);
|
|
9055
9047
|
var viewProps = nonTamaguiProps;
|
|
9056
9048
|
if (props.forceStyle) viewProps.forceStyle = props.forceStyle;
|
|
9057
9049
|
if (isHOC) {
|
|
@@ -9065,12 +9057,12 @@ ${banner}
|
|
|
9065
9057
|
var shouldUseAnimation = (inputStyle === "css" ? willBeAnimatedClient : willBeAnimated) && useAnimations && !isHOC;
|
|
9066
9058
|
var animatedRef;
|
|
9067
9059
|
if (shouldUseAnimation) {
|
|
9060
|
+
var _ref2, _ref3;
|
|
9068
9061
|
var _splitStyles_nativeTextMetrics;
|
|
9069
9062
|
var useStyleEmitter = (animationDriver === null || animationDriver === void 0 ? void 0 : animationDriver.avoidReRenders) ? function(listener) {
|
|
9070
9063
|
stateRef.current.useStyleListener = listener;
|
|
9071
9064
|
} : void 0;
|
|
9072
|
-
var
|
|
9073
|
-
var effectiveTransition = (_ref = (_splitStyles_effectiveTransition = splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.effectiveTransition) !== null && _splitStyles_effectiveTransition !== void 0 ? _splitStyles_effectiveTransition : props.transition) !== null && _ref !== void 0 ? _ref : platformPseudo ? "0ms" : void 0;
|
|
9065
|
+
var effectiveTransition = (_ref2 = (_ref3 = splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.effectiveTransition) !== null && _ref3 !== void 0 ? _ref3 : props.transition) !== null && _ref2 !== void 0 ? _ref2 : platformPseudo ? "0ms" : void 0;
|
|
9074
9066
|
if (splitStyles) splitStyles.effectiveTransition = effectiveTransition;
|
|
9075
9067
|
stateRef.current.prevPseudoState = extractPseudoState(state);
|
|
9076
9068
|
var animations = useAnimations({
|
|
@@ -9132,7 +9124,7 @@ ${banner}
|
|
|
9132
9124
|
usePointerEvents(props, viewProps);
|
|
9133
9125
|
if (globalThis.process.env.NODE_ENV === "development") {}
|
|
9134
9126
|
if (globalThis.process.env.NODE_ENV === "development" && time$1) time$1`events-hooks`;
|
|
9135
|
-
var unPress = function() {
|
|
9127
|
+
var unPress = function unPress2() {
|
|
9136
9128
|
setStateShallow({
|
|
9137
9129
|
press: false,
|
|
9138
9130
|
pressIn: false
|
|
@@ -9169,7 +9161,7 @@ ${banner}
|
|
|
9169
9161
|
useIsomorphicLayoutEffect(function() {
|
|
9170
9162
|
var disposeSafeArea;
|
|
9171
9163
|
if (splitStyles === null || splitStyles === void 0 ? void 0 : splitStyles.usesSafeArea) {
|
|
9172
|
-
var updateSafeArea = function() {
|
|
9164
|
+
var updateSafeArea = function updateSafeArea2() {
|
|
9173
9165
|
setState(function(previous) {
|
|
9174
9166
|
return _objectSpread2({}, previous);
|
|
9175
9167
|
});
|
|
@@ -9235,7 +9227,7 @@ ${banner}
|
|
|
9235
9227
|
onPressOut === null || onPressOut === void 0 || onPressOut(e);
|
|
9236
9228
|
onMouseUp === null || onMouseUp === void 0 || onMouseUp(e);
|
|
9237
9229
|
} : void 0 }, (attachHover || attachPress) && {
|
|
9238
|
-
onMouseEnter: function(e) {
|
|
9230
|
+
onMouseEnter: function onMouseEnter1(e) {
|
|
9239
9231
|
var next = {};
|
|
9240
9232
|
if (needsHoverState && !lastInteractionWasTouch.value) next.hover = true;
|
|
9241
9233
|
if (needsPressState) {
|
|
@@ -9245,7 +9237,7 @@ ${banner}
|
|
|
9245
9237
|
onHoverIn === null || onHoverIn === void 0 || onHoverIn(e);
|
|
9246
9238
|
onMouseEnter === null || onMouseEnter === void 0 || onMouseEnter(e);
|
|
9247
9239
|
},
|
|
9248
|
-
onMouseLeave: function(e) {
|
|
9240
|
+
onMouseLeave: function onMouseLeave1(e) {
|
|
9249
9241
|
var next = {};
|
|
9250
9242
|
if (needsHoverState) next.hover = false;
|
|
9251
9243
|
if (needsPressState) {
|
|
@@ -9269,11 +9261,11 @@ ${banner}
|
|
|
9269
9261
|
unPress();
|
|
9270
9262
|
onPress === null || onPress === void 0 || onPress(e);
|
|
9271
9263
|
} : void 0
|
|
9272
|
-
}, attachPress && onLongPress && { onLongPress: function(e) {
|
|
9264
|
+
}, attachPress && onLongPress && { onLongPress: function onLongPress1(e) {
|
|
9273
9265
|
unPress();
|
|
9274
9266
|
onLongPress === null || onLongPress === void 0 || onLongPress(e);
|
|
9275
9267
|
} }), attachFocus && {
|
|
9276
|
-
onFocus: function(e) {
|
|
9268
|
+
onFocus: function onFocus1(e) {
|
|
9277
9269
|
var next = {};
|
|
9278
9270
|
if (componentContext.setParentFocusState) {
|
|
9279
9271
|
componentContext.setParentFocusState({ focusWithin: true });
|
|
@@ -9285,7 +9277,7 @@ ${banner}
|
|
|
9285
9277
|
setStateShallow(next);
|
|
9286
9278
|
onFocus === null || onFocus === void 0 || onFocus(e);
|
|
9287
9279
|
},
|
|
9288
|
-
onBlur: function(e) {
|
|
9280
|
+
onBlur: function onBlur1(e) {
|
|
9289
9281
|
if (componentContext.setParentFocusState) componentContext.setParentFocusState({ focusWithin: false });
|
|
9290
9282
|
setStateShallow({
|
|
9291
9283
|
focus: false,
|
|
@@ -9324,10 +9316,10 @@ ${banner}
|
|
|
9324
9316
|
});
|
|
9325
9317
|
var hasRealPressEvents = false;
|
|
9326
9318
|
var pressGesture = null;
|
|
9319
|
+
var _ref4, _ref5, _ref6, _ref7, _props_testID;
|
|
9327
9320
|
var propsWithHref = props;
|
|
9328
9321
|
var propsInWithHref = propsIn;
|
|
9329
|
-
var _props_testID
|
|
9330
|
-
var pressDebugDetail = (_ref4 = (_ref3 = (_ref2 = (_ref1 = (_props_testID = props.testID) !== null && _props_testID !== void 0 ? _props_testID : propsIn.testID) !== null && _ref1 !== void 0 ? _ref1 : props.accessibilityLabel) !== null && _ref2 !== void 0 ? _ref2 : propsIn.accessibilityLabel) !== null && _ref3 !== void 0 ? _ref3 : typeof propsWithHref.href === "string" ? propsWithHref.href : null) !== null && _ref4 !== void 0 ? _ref4 : typeof propsInWithHref.href === "string" ? propsInWithHref.href : null;
|
|
9322
|
+
var pressDebugDetail = (_ref4 = (_ref5 = (_ref6 = (_ref7 = (_props_testID = props.testID) !== null && _props_testID !== void 0 ? _props_testID : propsIn.testID) !== null && _ref7 !== void 0 ? _ref7 : props.accessibilityLabel) !== null && _ref6 !== void 0 ? _ref6 : propsIn.accessibilityLabel) !== null && _ref5 !== void 0 ? _ref5 : typeof propsWithHref.href === "string" ? propsWithHref.href : null) !== null && _ref4 !== void 0 ? _ref4 : typeof propsInWithHref.href === "string" ? propsInWithHref.href : null;
|
|
9331
9323
|
var pressDebugName = displayName ? pressDebugDetail ? `${displayName}:${pressDebugDetail}` : displayName : pressDebugDetail || null;
|
|
9332
9324
|
hasRealPressEvents = !!(onPress || onPressIn || onPressOut || onLongPress);
|
|
9333
9325
|
pressGesture = useEvents(events, viewProps, stateRef, staticConfig, isHOC, isInsideNativeMenu, pressDebugName, hasRealPressEvents);
|
|
@@ -9386,10 +9378,10 @@ ${banner}
|
|
|
9386
9378
|
var provideText = !!textMetrics && children !== null && typeof children === "object" && (!componentContext.inText || textMetrics.fontSize !== componentContext.parentFontSize || textMetrics.lineHeight !== componentContext.parentLineHeight || animatedText !== componentContext.animatedText);
|
|
9387
9379
|
var provideFocus = conditionalStates === null || conditionalStates === void 0 ? void 0 : conditionalStates.has("focus-within");
|
|
9388
9380
|
if (provideText || provideFocus) {
|
|
9389
|
-
var
|
|
9381
|
+
var _ref8;
|
|
9390
9382
|
content = /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ComponentContext.Provider, _objectSpread2(_objectSpread2({}, componentContext), {}, {
|
|
9391
9383
|
inText: provideText || componentContext.inText,
|
|
9392
|
-
parentFontSize: (
|
|
9384
|
+
parentFontSize: (_ref8 = textMetrics === null || textMetrics === void 0 ? void 0 : textMetrics.fontSize) !== null && _ref8 !== void 0 ? _ref8 : componentContext.parentFontSize,
|
|
9393
9385
|
parentLineHeight: textMetrics ? textMetrics.lineHeight : componentContext.parentLineHeight,
|
|
9394
9386
|
animatedText,
|
|
9395
9387
|
setParentFocusState: provideFocus ? setStateShallow : componentContext.setParentFocusState,
|
|
@@ -9464,12 +9456,12 @@ ${banner}
|
|
|
9464
9456
|
}
|
|
9465
9457
|
return res;
|
|
9466
9458
|
}
|
|
9467
|
-
var fromPx = function(val) {
|
|
9459
|
+
var fromPx = function fromPx2(val) {
|
|
9468
9460
|
if (typeof val === "number") return val;
|
|
9469
9461
|
if (typeof val === "string") return +val.replace("px", "");
|
|
9470
9462
|
return 0;
|
|
9471
9463
|
};
|
|
9472
|
-
var getCustomRender = function(renderProp, content, viewProps, state) {
|
|
9464
|
+
var getCustomRender = function getCustomRender2(renderProp, content, viewProps, state) {
|
|
9473
9465
|
if (typeof renderProp === "function") renderProp = getRenderElementForPlatform(renderProp(viewProps, state));
|
|
9474
9466
|
if (renderProp) {
|
|
9475
9467
|
if (typeof renderProp === "object" && /* @__PURE__ */ react.default.isValidElement(renderProp)) {
|
|
@@ -9494,14 +9486,14 @@ function isHTMLElement(el) {
|
|
|
9494
9486
|
//#endregion
|
|
9495
9487
|
//#region ../web/dist/esm/helpers/getExpandedShorthands.native.js
|
|
9496
9488
|
function getExpandedShorthand(propKey, props) {
|
|
9497
|
-
var shorthands = getConfig().inverseShorthands;
|
|
9498
9489
|
var _props_propKey;
|
|
9490
|
+
var shorthands = getConfig().inverseShorthands;
|
|
9499
9491
|
return (_props_propKey = props[propKey]) !== null && _props_propKey !== void 0 ? _props_propKey : props[shorthands[propKey]];
|
|
9500
9492
|
}
|
|
9501
9493
|
//#endregion
|
|
9502
9494
|
//#region ../web/dist/esm/helpers/registerCSSVariable.native.js
|
|
9503
9495
|
var variableGeneration = 0;
|
|
9504
|
-
var registerCSSVariable = function(v) {
|
|
9496
|
+
var registerCSSVariable = function registerCSSVariable2(v) {
|
|
9505
9497
|
if (!process.env.TAMAGUI_DID_OUTPUT_CSS) {
|
|
9506
9498
|
var key = getVariableValue(v);
|
|
9507
9499
|
if (tokensValueToVariable.has(key) || tokensValueToVariable.size < 1e4) {
|
|
@@ -9510,23 +9502,23 @@ var registerCSSVariable = function(v) {
|
|
|
9510
9502
|
}
|
|
9511
9503
|
}
|
|
9512
9504
|
};
|
|
9513
|
-
var variableToCSS = function(v) {
|
|
9505
|
+
var variableToCSS = function variableToCSS2(v) {
|
|
9514
9506
|
var unitless = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : false;
|
|
9515
9507
|
if (!process.env.TAMAGUI_DID_OUTPUT_CSS) return `--${process.env.TAMAGUI_CSS_VARIABLE_PREFIX || ""}${createCSSVariable(v.name, false)}:${!unitless && typeof v.val === "number" ? `${v.val}px` : v.val}`;
|
|
9516
9508
|
return "";
|
|
9517
9509
|
};
|
|
9518
9510
|
var tokensValueToVariable = /* @__PURE__ */ new Map();
|
|
9519
9511
|
var autoVariables = [];
|
|
9520
|
-
var serializeVariables = function(variables) {
|
|
9512
|
+
var serializeVariables = function serializeVariables2(variables) {
|
|
9521
9513
|
return variables.map(function(v) {
|
|
9522
9514
|
return `--${v.name}:${v.val}`;
|
|
9523
9515
|
}).join(";");
|
|
9524
9516
|
};
|
|
9525
|
-
var getAutoVariableCSS = function() {
|
|
9517
|
+
var getAutoVariableCSS = function getAutoVariableCSS2() {
|
|
9526
9518
|
return serializeVariables(autoVariables);
|
|
9527
9519
|
};
|
|
9528
9520
|
var mutatedAutoVariables = [];
|
|
9529
|
-
var getMutatedAutoVariableCSS = function() {
|
|
9521
|
+
var getMutatedAutoVariableCSS = function getMutatedAutoVariableCSS2() {
|
|
9530
9522
|
return serializeVariables(mutatedAutoVariables);
|
|
9531
9523
|
};
|
|
9532
9524
|
//#endregion
|
|
@@ -9620,19 +9612,19 @@ var fontWeights = [
|
|
|
9620
9612
|
"800",
|
|
9621
9613
|
"900"
|
|
9622
9614
|
];
|
|
9623
|
-
var processSection = function(section, keys, defaultValue) {
|
|
9615
|
+
var processSection = function processSection2(section, keys, defaultValue) {
|
|
9624
9616
|
if (typeof section === "string") return section;
|
|
9625
9617
|
var sectionKeys = Object.keys(section);
|
|
9626
9618
|
var fillValue = section[sectionKeys[0]];
|
|
9627
9619
|
return Object.fromEntries([.../* @__PURE__ */ new Set([...keys, ...sectionKeys])].map(function(key) {
|
|
9628
|
-
var
|
|
9620
|
+
var _ref, _section_key;
|
|
9629
9621
|
var value = (_ref = (_section_key = section[key]) !== null && _section_key !== void 0 ? _section_key : defaultValue) !== null && _ref !== void 0 ? _ref : fillValue;
|
|
9630
9622
|
fillValue = value;
|
|
9631
9623
|
defaultValue = value;
|
|
9632
9624
|
return [key, value];
|
|
9633
9625
|
}));
|
|
9634
9626
|
};
|
|
9635
|
-
var createFont = function(font) {
|
|
9627
|
+
var createFont = function createFont2(font) {
|
|
9636
9628
|
var sizeKeys = Object.keys(font.size || {});
|
|
9637
9629
|
var processedFont = Object.fromEntries(Object.entries(font).map(function(param) {
|
|
9638
9630
|
var [key, section] = param;
|
|
@@ -9739,7 +9731,7 @@ function createShorthands(shorthands) {
|
|
|
9739
9731
|
//#endregion
|
|
9740
9732
|
//#region ../web/dist/esm/createVariables.native.js
|
|
9741
9733
|
var cache = /* @__PURE__ */ new WeakMap();
|
|
9742
|
-
var createVariables = function(tokens) {
|
|
9734
|
+
var createVariables = function createVariables1(tokens) {
|
|
9743
9735
|
var parentPath = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "";
|
|
9744
9736
|
arguments.length > 2 && arguments[2] !== void 0 && arguments[2];
|
|
9745
9737
|
if (cache.has(tokens)) return tokens;
|
|
@@ -9775,27 +9767,26 @@ var createVariables = function(tokens) {
|
|
|
9775
9767
|
};
|
|
9776
9768
|
//#endregion
|
|
9777
9769
|
//#region ../web/dist/esm/helpers/defaultAnimationDriver.native.js
|
|
9778
|
-
var noAnimationDriver = function(method) {
|
|
9770
|
+
var noAnimationDriver = function noAnimationDriver2(method) {
|
|
9779
9771
|
console.warn(`No animation driver configured. To use ${method}, you must pass \`animations\` to createTamagui. See: https://tamagui.dev/docs/core/animations`);
|
|
9780
9772
|
};
|
|
9781
|
-
var
|
|
9773
|
+
var defaultAnimationDriver = function createEmptyAnimationDriver2() {
|
|
9782
9774
|
return {
|
|
9783
9775
|
inputStyle: "css",
|
|
9784
9776
|
outputStyle: "css",
|
|
9785
9777
|
isStub: true,
|
|
9786
9778
|
animations: {},
|
|
9787
|
-
useAnimations: function() {
|
|
9779
|
+
useAnimations: function useAnimations() {
|
|
9788
9780
|
return noAnimationDriver("animations");
|
|
9789
9781
|
},
|
|
9790
|
-
usePresence: function() {
|
|
9782
|
+
usePresence: function usePresence() {
|
|
9791
9783
|
return noAnimationDriver("usePresence");
|
|
9792
9784
|
},
|
|
9793
|
-
ResetPresence: function() {
|
|
9785
|
+
ResetPresence: function ResetPresence() {
|
|
9794
9786
|
return noAnimationDriver("ResetPresence");
|
|
9795
9787
|
}
|
|
9796
9788
|
};
|
|
9797
|
-
};
|
|
9798
|
-
var defaultAnimationDriver = createEmptyAnimationDriver();
|
|
9789
|
+
}();
|
|
9799
9790
|
//#endregion
|
|
9800
9791
|
//#region ../web/dist/esm/helpers/resolveAnimationDriver.native.js
|
|
9801
9792
|
function isAnimationDriver(value) {
|
|
@@ -10065,7 +10056,7 @@ var unitlessSuffixes = [
|
|
|
10065
10056
|
"ratio",
|
|
10066
10057
|
"elevation"
|
|
10067
10058
|
];
|
|
10068
|
-
var isUnitlessVariableKey = function(key) {
|
|
10059
|
+
var isUnitlessVariableKey = function isUnitlessVariableKey2(key) {
|
|
10069
10060
|
var lower = key.toLowerCase();
|
|
10070
10061
|
return unitlessSuffixes.some(function(suffix) {
|
|
10071
10062
|
return lower.endsWith(suffix);
|
|
@@ -10078,7 +10069,7 @@ var tokenCategoryOrder = [
|
|
|
10078
10069
|
"radius",
|
|
10079
10070
|
"zIndex"
|
|
10080
10071
|
];
|
|
10081
|
-
var findVariableToken = function(tokensParsed, name) {
|
|
10072
|
+
var findVariableToken = function findVariableToken2(tokensParsed, name) {
|
|
10082
10073
|
if (globalThis.process.env.NODE_ENV === "development") {
|
|
10083
10074
|
var found;
|
|
10084
10075
|
var foundCategory;
|
|
@@ -10133,7 +10124,7 @@ var findVariableToken = function(tokensParsed, name) {
|
|
|
10133
10124
|
function mergeConfigVariablesIntoTheme(theme, themeName, variables, tokensParsed) {
|
|
10134
10125
|
var scheme = themeName.startsWith("dark") ? "dark" : "light";
|
|
10135
10126
|
var resolving = /* @__PURE__ */ new Set();
|
|
10136
|
-
var resolveRawValue = function(key2, value) {
|
|
10127
|
+
var resolveRawValue = function resolveRawValue1(key2, value) {
|
|
10137
10128
|
if (typeof value === "object" && value !== null) {
|
|
10138
10129
|
if (isVariable(value)) return value.val;
|
|
10139
10130
|
if ("needsPx" in value) return value;
|
|
@@ -10422,10 +10413,10 @@ function createTamagui$2(configIn) {
|
|
|
10422
10413
|
lastIndex: -1,
|
|
10423
10414
|
static: null
|
|
10424
10415
|
};
|
|
10425
|
-
var getCSS$1 = function() {
|
|
10416
|
+
var getCSS$1 = function getCSS2() {
|
|
10426
10417
|
return getCSS(themeConfig, arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, cssState);
|
|
10427
10418
|
};
|
|
10428
|
-
var getNewCSS = function(opts) {
|
|
10419
|
+
var getNewCSS = function getNewCSS2(opts) {
|
|
10429
10420
|
return getCSS$1(_objectSpread2(_objectSpread2({}, opts), {}, { sinceLastCall: true }));
|
|
10430
10421
|
};
|
|
10431
10422
|
var inputAnimations = configIn.animations;
|
|
@@ -10558,8 +10549,8 @@ var builtinShorthands = {
|
|
|
10558
10549
|
//#endregion
|
|
10559
10550
|
//#region ../web/dist/esm/createTokens.native.js
|
|
10560
10551
|
function createTokens(tokens) {
|
|
10561
|
-
if (globalThis.process.env.NODE_ENV !== "production") validateNoTrueTokenKeys(tokens);
|
|
10562
10552
|
var _process_env_TAMAGUI_TOKEN_PREFIX;
|
|
10553
|
+
if (globalThis.process.env.NODE_ENV !== "production") validateNoTrueTokenKeys(tokens);
|
|
10563
10554
|
return createVariables(tokens, (_process_env_TAMAGUI_TOKEN_PREFIX = process.env.TAMAGUI_TOKEN_PREFIX) !== null && _process_env_TAMAGUI_TOKEN_PREFIX !== void 0 ? _process_env_TAMAGUI_TOKEN_PREFIX : "t");
|
|
10564
10555
|
}
|
|
10565
10556
|
function validateNoTrueTokenKeys(tokens) {
|
|
@@ -10574,7 +10565,7 @@ function validateNoTrueTokenKeys(tokens) {
|
|
|
10574
10565
|
function mergeVariantValues(earlier, later) {
|
|
10575
10566
|
if (typeof earlier !== "string" || typeof later !== "string") return later;
|
|
10576
10567
|
if (!earlier.includes(":") && !later.includes(":")) return later;
|
|
10577
|
-
var getSlot = function(token, colon) {
|
|
10568
|
+
var getSlot = function getSlot2(token, colon) {
|
|
10578
10569
|
var slot = [];
|
|
10579
10570
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
10580
10571
|
try {
|
|
@@ -10600,7 +10591,7 @@ function mergeVariantValues(earlier, later) {
|
|
|
10600
10591
|
};
|
|
10601
10592
|
var clauses = /* @__PURE__ */ new Map();
|
|
10602
10593
|
var base;
|
|
10603
|
-
var add = function(source, reject) {
|
|
10594
|
+
var add = function add2(source, reject) {
|
|
10604
10595
|
var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = void 0;
|
|
10605
10596
|
try {
|
|
10606
10597
|
for (var _iterator = source.trim().split(/\s+/)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
@@ -10638,7 +10629,7 @@ function mergeStyleBranch(parentBranch, ourBranch) {
|
|
|
10638
10629
|
for (var key in ourBranch) out[key] = key in parentBranch ? mergeVariantValues(parentBranch[key], ourBranch[key]) : ourBranch[key];
|
|
10639
10630
|
return out;
|
|
10640
10631
|
}
|
|
10641
|
-
var mergeVariants = function(parentVariants, ourVariants) {
|
|
10632
|
+
var mergeVariants = function mergeVariants1(parentVariants, ourVariants) {
|
|
10642
10633
|
var level = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : 0;
|
|
10643
10634
|
if (!ourVariants) return parentVariants || {};
|
|
10644
10635
|
if (!parentVariants) return ourVariants || {};
|
|
@@ -10671,12 +10662,11 @@ function resolveSelection(state, variants, key, value, parentKey, condition) {
|
|
|
10671
10662
|
if (!isObj(output)) return;
|
|
10672
10663
|
var originals = styleOriginalValues.get(output);
|
|
10673
10664
|
for (var outputKey in output) {
|
|
10665
|
+
var _ref;
|
|
10674
10666
|
if (!state.styleProps.noSkip && outputKey in skipProps) continue;
|
|
10675
10667
|
var raw = output[outputKey];
|
|
10676
10668
|
if (raw == null) continue;
|
|
10677
|
-
|
|
10678
|
-
var _originals_outputKey;
|
|
10679
|
-
emitVariantStyle(state, outputKey, _$value, (_originals_outputKey = originals === null || originals === void 0 ? void 0 : originals[outputKey]) !== null && _originals_outputKey !== void 0 ? _originals_outputKey : raw, condition, parentKey === key && outputKey === key);
|
|
10669
|
+
emitVariantStyle(state, outputKey, state.styleProps.noNormalize ? raw : normalizeValueWithProperty(raw, state.conf.shorthands[outputKey] || outputKey), (_ref = originals === null || originals === void 0 ? void 0 : originals[outputKey]) !== null && _ref !== void 0 ? _ref : raw, condition, parentKey === key && outputKey === key);
|
|
10680
10670
|
}
|
|
10681
10671
|
}
|
|
10682
10672
|
//#endregion
|
|
@@ -10739,7 +10729,8 @@ function styledImpl(frontend, ComponentIn, optionsOrBaseClassName, configOrOptio
|
|
|
10739
10729
|
var reactNativeConfig = !parentStaticConfig ? getReactNativeConfig(Component) : void 0;
|
|
10740
10730
|
var resolvedIsReactNative = Boolean(reactNativeConfig || isReactNative);
|
|
10741
10731
|
var component = createComponent((function() {
|
|
10742
|
-
var _ref
|
|
10732
|
+
var _ref;
|
|
10733
|
+
var _ref2 = options || {}, { variants, displayName: _displayName, defaultVariants, context, contextProps } = _ref2, defaultProps = _objectWithoutProperties(_ref2, _excluded$2);
|
|
10743
10734
|
var parentDefaultVariants;
|
|
10744
10735
|
var parentDefaultProps;
|
|
10745
10736
|
var mergedBaseClassName = (parentStaticConfig === null || parentStaticConfig === void 0 ? void 0 : parentStaticConfig.baseClassName) && baseClassName ? `${parentStaticConfig.baseClassName} ${baseClassName}` : baseClassName || (parentStaticConfig === null || parentStaticConfig === void 0 ? void 0 : parentStaticConfig.baseClassName);
|
|
@@ -10770,8 +10761,7 @@ function styledImpl(frontend, ComponentIn, optionsOrBaseClassName, configOrOptio
|
|
|
10770
10761
|
var isInput = Boolean((config === null || config === void 0 ? void 0 : config.isInput) || (parentStaticConfig === null || parentStaticConfig === void 0 ? void 0 : parentStaticConfig.isInput));
|
|
10771
10762
|
var isText = Boolean((config === null || config === void 0 ? void 0 : config.isText) || (parentStaticConfig === null || parentStaticConfig === void 0 ? void 0 : parentStaticConfig.isText));
|
|
10772
10763
|
var validStyles = (config === null || config === void 0 ? void 0 : config.validStyles) || ((config === null || config === void 0 ? void 0 : config.isInput) ? stylePropsInput : (config === null || config === void 0 ? void 0 : config.isText) ? stylePropsText : parentStaticConfig === null || parentStaticConfig === void 0 ? void 0 : parentStaticConfig.validStyles);
|
|
10773
|
-
var
|
|
10774
|
-
var acceptsClassName = (_config_acceptsClassName = config === null || config === void 0 ? void 0 : config.acceptsClassName) !== null && _config_acceptsClassName !== void 0 ? _config_acceptsClassName : isPlainStyledComponent || resolvedIsReactNative || (parentStaticConfig === null || parentStaticConfig === void 0 ? void 0 : parentStaticConfig.isHOC) && (parentStaticConfig === null || parentStaticConfig === void 0 ? void 0 : parentStaticConfig.acceptsClassName);
|
|
10764
|
+
var acceptsClassName = (_ref = config === null || config === void 0 ? void 0 : config.acceptsClassName) !== null && _ref !== void 0 ? _ref : isPlainStyledComponent || resolvedIsReactNative || (parentStaticConfig === null || parentStaticConfig === void 0 ? void 0 : parentStaticConfig.isHOC) && (parentStaticConfig === null || parentStaticConfig === void 0 ? void 0 : parentStaticConfig.acceptsClassName);
|
|
10775
10765
|
var conf = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, parentStaticConfig), config), !isPlainStyledComponent && { Component }), {}, {
|
|
10776
10766
|
variants,
|
|
10777
10767
|
baseClassName: mergedBaseClassName,
|
|
@@ -10809,7 +10799,7 @@ function useStyle(piece) {
|
|
|
10809
10799
|
}
|
|
10810
10800
|
//#endregion
|
|
10811
10801
|
//#region ../web/dist/esm/hooks/useIsTouchDevice.native.js
|
|
10812
|
-
var useIsTouchDevice = function() {
|
|
10802
|
+
var useIsTouchDevice = function useIsTouchDevice2() {
|
|
10813
10803
|
return true;
|
|
10814
10804
|
};
|
|
10815
10805
|
//#endregion
|
|
@@ -10827,13 +10817,13 @@ function useAnimatedNumberDriver() {
|
|
|
10827
10817
|
function useAnimatedNumber(initial) {
|
|
10828
10818
|
return useAnimatedNumberDriver().useAnimatedNumber(initial);
|
|
10829
10819
|
}
|
|
10830
|
-
var useAnimatedNumberStyle = function(value, getStyle) {
|
|
10820
|
+
var useAnimatedNumberStyle = function useAnimatedNumberStyle2(value, getStyle) {
|
|
10831
10821
|
return useAnimatedNumberDriver().useAnimatedNumberStyle(value, getStyle);
|
|
10832
10822
|
};
|
|
10833
|
-
var useAnimatedNumbersStyle = function(values, getStyle) {
|
|
10823
|
+
var useAnimatedNumbersStyle = function useAnimatedNumbersStyle2(values, getStyle) {
|
|
10834
10824
|
return useAnimatedNumberDriver().useAnimatedNumbersStyle(values, getStyle);
|
|
10835
10825
|
};
|
|
10836
|
-
var useAnimatedNumberReaction = function(opts, onValue) {
|
|
10826
|
+
var useAnimatedNumberReaction = function useAnimatedNumberReaction2(opts, onValue) {
|
|
10837
10827
|
return useAnimatedNumberDriver().useAnimatedNumberReaction(opts, onValue);
|
|
10838
10828
|
};
|
|
10839
10829
|
//#endregion
|
|
@@ -10841,7 +10831,7 @@ var useAnimatedNumberReaction = function(opts, onValue) {
|
|
|
10841
10831
|
var forceUpdateState = {
|
|
10842
10832
|
forceClassName: true,
|
|
10843
10833
|
deopt: true,
|
|
10844
|
-
needsUpdate: function() {
|
|
10834
|
+
needsUpdate: function needsUpdate() {
|
|
10845
10835
|
return true;
|
|
10846
10836
|
}
|
|
10847
10837
|
};
|
|
@@ -10922,11 +10912,11 @@ var domEventProps = {
|
|
|
10922
10912
|
};
|
|
10923
10913
|
//#endregion
|
|
10924
10914
|
//#region ../web/dist/esm/dom/adapters.native.js
|
|
10925
|
-
var noop = function() {};
|
|
10926
|
-
var returnFalse = function() {
|
|
10915
|
+
var noop = function noop2() {};
|
|
10916
|
+
var returnFalse = function returnFalse2() {
|
|
10927
10917
|
return false;
|
|
10928
10918
|
};
|
|
10929
|
-
var clickFromPress = function(onClick) {
|
|
10919
|
+
var clickFromPress = function clickFromPress2(onClick) {
|
|
10930
10920
|
return function(event) {
|
|
10931
10921
|
var _event_nativeEvent_pageX, _event_nativeEvent_pageY;
|
|
10932
10922
|
onClick({
|
|
@@ -10945,7 +10935,7 @@ var clickFromPress = function(onClick) {
|
|
|
10945
10935
|
});
|
|
10946
10936
|
};
|
|
10947
10937
|
};
|
|
10948
|
-
var changeFromText = function(onChange) {
|
|
10938
|
+
var changeFromText = function changeFromText2(onChange) {
|
|
10949
10939
|
return function(event) {
|
|
10950
10940
|
var _event_nativeEvent_text;
|
|
10951
10941
|
onChange({
|
|
@@ -10954,7 +10944,7 @@ var changeFromText = function(onChange) {
|
|
|
10954
10944
|
});
|
|
10955
10945
|
};
|
|
10956
10946
|
};
|
|
10957
|
-
var inputFromText = function(onInput) {
|
|
10947
|
+
var inputFromText = function inputFromText2(onInput) {
|
|
10958
10948
|
return function(event) {
|
|
10959
10949
|
var _event_nativeEvent_text;
|
|
10960
10950
|
onInput({
|
|
@@ -10963,7 +10953,7 @@ var inputFromText = function(onInput) {
|
|
|
10963
10953
|
});
|
|
10964
10954
|
};
|
|
10965
10955
|
};
|
|
10966
|
-
var keyFromKeyPress = function(onKeyDown) {
|
|
10956
|
+
var keyFromKeyPress = function keyFromKeyPress2(onKeyDown) {
|
|
10967
10957
|
return function(event) {
|
|
10968
10958
|
var _event_nativeEvent_key;
|
|
10969
10959
|
onKeyDown({
|
|
@@ -10972,7 +10962,7 @@ var keyFromKeyPress = function(onKeyDown) {
|
|
|
10972
10962
|
});
|
|
10973
10963
|
};
|
|
10974
10964
|
};
|
|
10975
|
-
var loadFromImage = function(onLoad) {
|
|
10965
|
+
var loadFromImage = function loadFromImage2(onLoad) {
|
|
10976
10966
|
return function(event) {
|
|
10977
10967
|
var source = event.nativeEvent.source;
|
|
10978
10968
|
onLoad({
|
|
@@ -10984,12 +10974,12 @@ var loadFromImage = function(onLoad) {
|
|
|
10984
10974
|
});
|
|
10985
10975
|
};
|
|
10986
10976
|
};
|
|
10987
|
-
var errorFromImage = function(onError) {
|
|
10977
|
+
var errorFromImage = function errorFromImage2(onError) {
|
|
10988
10978
|
return function() {
|
|
10989
10979
|
onError({ type: "error" });
|
|
10990
10980
|
};
|
|
10991
10981
|
};
|
|
10992
|
-
var textEntryChange = function(onChange, onInput) {
|
|
10982
|
+
var textEntryChange = function textEntryChange2(onChange, onInput) {
|
|
10993
10983
|
if (!onChange) return onInput && inputFromText(onInput);
|
|
10994
10984
|
if (!onInput) return changeFromText(onChange);
|
|
10995
10985
|
return function(event) {
|
|
@@ -11084,7 +11074,7 @@ function assignRef(ref, value) {
|
|
|
11084
11074
|
else if (ref) ref.current = value;
|
|
11085
11075
|
}
|
|
11086
11076
|
function scaledRect(rect, scale) {
|
|
11087
|
-
var value = function(name) {
|
|
11077
|
+
var value = function value2(name) {
|
|
11088
11078
|
return typeof rect[name] === "number" ? rect[name] / scale : rect[name];
|
|
11089
11079
|
};
|
|
11090
11080
|
var DOMRectConstructor = globalThis.DOMRect;
|
|
@@ -11150,7 +11140,7 @@ function facadeFor(instance, tag, viewportScale) {
|
|
|
11150
11140
|
var property = _step.value;
|
|
11151
11141
|
if (property in host) Object.defineProperty(facade, property, {
|
|
11152
11142
|
configurable: true,
|
|
11153
|
-
get: function() {
|
|
11143
|
+
get: function get() {
|
|
11154
11144
|
return typeof host[property] === "number" ? host[property] / viewportScale : host[property];
|
|
11155
11145
|
}
|
|
11156
11146
|
});
|
|
@@ -11170,7 +11160,7 @@ function facadeFor(instance, tag, viewportScale) {
|
|
|
11170
11160
|
if (tag === "img") Object.defineProperty(facade, "complete", {
|
|
11171
11161
|
configurable: true,
|
|
11172
11162
|
enumerable: true,
|
|
11173
|
-
get: function() {
|
|
11163
|
+
get: function get() {
|
|
11174
11164
|
var _host_complete;
|
|
11175
11165
|
return (_host_complete = host.complete) !== null && _host_complete !== void 0 ? _host_complete : false;
|
|
11176
11166
|
}
|
|
@@ -11181,13 +11171,13 @@ function facadeFor(instance, tag, viewportScale) {
|
|
|
11181
11171
|
Object.defineProperties(facade, _objectSpread2({
|
|
11182
11172
|
selectionStart: {
|
|
11183
11173
|
enumerable: true,
|
|
11184
|
-
get: function() {
|
|
11174
|
+
get: function get() {
|
|
11185
11175
|
return selectionStart;
|
|
11186
11176
|
}
|
|
11187
11177
|
},
|
|
11188
11178
|
selectionEnd: {
|
|
11189
11179
|
enumerable: true,
|
|
11190
|
-
get: function() {
|
|
11180
|
+
get: function get() {
|
|
11191
11181
|
return selectionEnd;
|
|
11192
11182
|
}
|
|
11193
11183
|
}
|
|
@@ -11223,14 +11213,14 @@ function createDOMRefCallback(ref, tag, viewportScale) {
|
|
|
11223
11213
|
var callback = byTag.get(cacheKey);
|
|
11224
11214
|
if (!callback) {
|
|
11225
11215
|
var release;
|
|
11226
|
-
callback = function(instance) {
|
|
11216
|
+
callback = function callback2(instance) {
|
|
11227
11217
|
if (!instance) {
|
|
11228
11218
|
if (release) return release();
|
|
11229
11219
|
return assignRef(ref, null);
|
|
11230
11220
|
}
|
|
11231
11221
|
release === null || release === void 0 || release();
|
|
11232
11222
|
var cleanup = assignRef(ref, facadeFor(instance, tag, viewportScale));
|
|
11233
|
-
var currentRelease = function() {
|
|
11223
|
+
var currentRelease = function currentRelease1() {
|
|
11234
11224
|
if (release !== currentRelease) return;
|
|
11235
11225
|
release = void 0;
|
|
11236
11226
|
if (typeof cleanup === "function") cleanup();
|
|
@@ -11351,11 +11341,11 @@ function resolvedDOMView(props) {
|
|
|
11351
11341
|
}
|
|
11352
11342
|
function DOMTextWithInheritedStyle(param) {
|
|
11353
11343
|
var { props } = param;
|
|
11344
|
+
var _context_animationDriver;
|
|
11354
11345
|
var parent = (0, react.useContext)(inheritedTextStyleContext);
|
|
11355
11346
|
var context = (0, react.useContext)(ComponentContext);
|
|
11356
11347
|
var value = resolveInheritedTextStyle([props.style, props.__inheritedStyles], parent, context, props.__textMetrics);
|
|
11357
11348
|
var content = renderDOMText(_objectSpread2(_objectSpread2({}, props), {}, { style: [props.style, value.style] }));
|
|
11358
|
-
var _context_animationDriver;
|
|
11359
11349
|
var driver = context.animatedText && ((_context_animationDriver = context.animationDriver) !== null && _context_animationDriver !== void 0 ? _context_animationDriver : getConfig().animations);
|
|
11360
11350
|
if (value.metrics.inheritsFontSize && context.animatedText && (driver === null || driver === void 0 ? void 0 : driver.useTextMetrics)) content = (0, react_jsx_runtime.jsx)(NativeTextBinding, {
|
|
11361
11351
|
element: content,
|
|
@@ -11379,11 +11369,11 @@ function resolvedDOMText(props) {
|
|
|
11379
11369
|
}
|
|
11380
11370
|
function DOMTextInputWithInheritedStyle(param) {
|
|
11381
11371
|
var { props } = param;
|
|
11372
|
+
var _context_animationDriver;
|
|
11382
11373
|
var parent = (0, react.useContext)(inheritedTextStyleContext);
|
|
11383
11374
|
var context = (0, react.useContext)(ComponentContext);
|
|
11384
11375
|
var inherited = resolveInheritedTextStyle([props.style, props.__inheritedStyles], parent, context, props.__textMetrics);
|
|
11385
11376
|
var resolved = _objectSpread2(_objectSpread2({}, props), {}, { style: [props.style, inherited.style] });
|
|
11386
|
-
var _context_animationDriver;
|
|
11387
11377
|
var driver = context.animatedText && ((_context_animationDriver = context.animationDriver) !== null && _context_animationDriver !== void 0 ? _context_animationDriver : getConfig().animations);
|
|
11388
11378
|
if (inherited.metrics.inheritsFontSize && context.animatedText && (driver === null || driver === void 0 ? void 0 : driver.useTextMetrics)) return (0, react_jsx_runtime.jsx)(NativeTextBinding, {
|
|
11389
11379
|
element: renderDOMTextInput(resolved),
|
|
@@ -11519,6 +11509,7 @@ function resolveDOMProps(props, tag, spec, tables) {
|
|
|
11519
11509
|
var hasInputMode = false;
|
|
11520
11510
|
var hasRole = false;
|
|
11521
11511
|
for (var name in props) {
|
|
11512
|
+
var _tables_unsupportedProps_name, _tables_renamed_name;
|
|
11522
11513
|
var value = props[name];
|
|
11523
11514
|
if (value === void 0) continue;
|
|
11524
11515
|
if (name === "display") {
|
|
@@ -11566,13 +11557,11 @@ function resolveDOMProps(props, tag, spec, tables) {
|
|
|
11566
11557
|
continue;
|
|
11567
11558
|
}
|
|
11568
11559
|
if (tables.unsupportedEvents.has(name)) throw new Error(`${name} has no native DOM event equivalent`);
|
|
11569
|
-
var _tables_unsupportedProps_name;
|
|
11570
11560
|
var note = (_tables_unsupportedProps_name = tables.unsupportedProps[name]) !== null && _tables_unsupportedProps_name !== void 0 ? _tables_unsupportedProps_name : name.startsWith("data-") && name !== "data-testid" ? tables.dataPropNote : void 0;
|
|
11571
11561
|
if (note !== void 0) throw new Error(`${name} is not supported on native html.${tag}: ${note}`);
|
|
11572
11562
|
if (name === "onKeyDown" && !spec.entry) throw new Error("onKeyDown requires a native text-entry control");
|
|
11573
11563
|
if (name === "inputMode") hasInputMode = true;
|
|
11574
11564
|
else if (name === "role") hasRole = true;
|
|
11575
|
-
var _tables_renamed_name;
|
|
11576
11565
|
next[(_tables_renamed_name = tables.renamed[name]) !== null && _tables_renamed_name !== void 0 ? _tables_renamed_name : name] = value;
|
|
11577
11566
|
}
|
|
11578
11567
|
if (nested) Object.assign(next, nested);
|
|
@@ -11593,7 +11582,7 @@ function resolveDOMProps(props, tag, spec, tables) {
|
|
|
11593
11582
|
function createDOMTagFactory(tables) {
|
|
11594
11583
|
return function domTag(tag, Component) {
|
|
11595
11584
|
var spec = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
11596
|
-
var Tag = function(props) {
|
|
11585
|
+
var Tag = function Tag2(props) {
|
|
11597
11586
|
return (0, react_jsx_runtime.jsx)(Component, resolveDOMProps(props, tag, spec, tables));
|
|
11598
11587
|
};
|
|
11599
11588
|
Tag.displayName = tag;
|
|
@@ -11606,7 +11595,7 @@ function createDOMTagFactory(tables) {
|
|
|
11606
11595
|
};
|
|
11607
11596
|
}
|
|
11608
11597
|
function unsupportedDOMTag(tag, note) {
|
|
11609
|
-
var Tag = function() {
|
|
11598
|
+
var Tag = function Tag2() {
|
|
11610
11599
|
throw new Error(`html.${tag} is not supported on native: ${note}`);
|
|
11611
11600
|
};
|
|
11612
11601
|
Tag.displayName = tag;
|
|
@@ -11733,7 +11722,7 @@ var domTag = createDOMTagFactory({
|
|
|
11733
11722
|
});
|
|
11734
11723
|
var domValidStyles = _objectSpread2(_objectSpread2({}, viewStaticConfig.validStyles), textStaticConfig.validStyles);
|
|
11735
11724
|
var domInputValidStyles = _objectSpread2(_objectSpread2({}, domValidStyles), stylePropsInput);
|
|
11736
|
-
var primitive = function(component) {
|
|
11725
|
+
var primitive = function primitive2(component) {
|
|
11737
11726
|
return component;
|
|
11738
11727
|
};
|
|
11739
11728
|
var html = {
|
|
@@ -12440,9 +12429,9 @@ var html = {
|
|
|
12440
12429
|
};
|
|
12441
12430
|
//#endregion
|
|
12442
12431
|
//#region ../web/dist/esm/views/Configuration.native.js
|
|
12443
|
-
var Configuration = function(props) {
|
|
12444
|
-
var current = react.default.useContext(ComponentContext);
|
|
12432
|
+
var Configuration = function Configuration2(props) {
|
|
12445
12433
|
var _props_disableSSR;
|
|
12434
|
+
var current = react.default.useContext(ComponentContext);
|
|
12446
12435
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ClientOnly, {
|
|
12447
12436
|
enabled: (_props_disableSSR = props.disableSSR) !== null && _props_disableSSR !== void 0 ? _props_disableSSR : current.disableSSR,
|
|
12448
12437
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ComponentContext.Provider, _objectSpread2(_objectSpread2({}, current), props))
|
|
@@ -12478,7 +12467,7 @@ function SafeAreaTracker() {
|
|
|
12478
12467
|
}
|
|
12479
12468
|
//#endregion
|
|
12480
12469
|
//#region ../web/dist/esm/views/ThemeProvider.native.js
|
|
12481
|
-
var ThemeProvider = function(props) {
|
|
12470
|
+
var ThemeProvider = function ThemeProvider2(props) {
|
|
12482
12471
|
"use no memo";
|
|
12483
12472
|
var addThemeClassName = props.isSubtreeRoot ? false : getSetting("addThemeClassName");
|
|
12484
12473
|
var forceClassName = props.isSubtreeRoot || addThemeClassName === void 0;
|
|
@@ -12568,7 +12557,7 @@ function useGet(currentValue, initialValue, forwardToFunction) {
|
|
|
12568
12557
|
function useEvent(callback) {
|
|
12569
12558
|
return useGet(callback, defaultValue, true);
|
|
12570
12559
|
}
|
|
12571
|
-
var defaultValue = function() {
|
|
12560
|
+
var defaultValue = function defaultValue2() {
|
|
12572
12561
|
throw new Error("Cannot call an event handler while rendering.");
|
|
12573
12562
|
};
|
|
12574
12563
|
//#endregion
|
|
@@ -12603,17 +12592,17 @@ var LayoutHandlers = /* @__PURE__ */ new WeakMap();
|
|
|
12603
12592
|
var LayoutDisableKey = /* @__PURE__ */ new WeakMap();
|
|
12604
12593
|
var Nodes = /* @__PURE__ */ new Set();
|
|
12605
12594
|
var NodeRectCache = /* @__PURE__ */ new WeakMap();
|
|
12606
|
-
var usePretransformDimensions = function() {
|
|
12595
|
+
var usePretransformDimensions = function usePretransformDimensions2() {
|
|
12607
12596
|
return globalThis.__TAMAGUI_ONLAYOUT_PRETRANSFORM === true || process.env.TAMAGUI_ONLAYOUT_PRETRANSFORM === "1";
|
|
12608
12597
|
};
|
|
12609
|
-
var isDebugLayout = function() {
|
|
12598
|
+
var isDebugLayout = function isDebugLayout2() {
|
|
12610
12599
|
var _window_location_search, _window_location;
|
|
12611
12600
|
return typeof window !== "undefined" && ((_window_location = window.location) === null || _window_location === void 0 ? void 0 : (_window_location_search = _window_location.search) === null || _window_location_search === void 0 ? void 0 : _window_location_search.includes("__tamaDebugLayout"));
|
|
12612
12601
|
};
|
|
12613
12602
|
var DisableLayoutContextValues = {};
|
|
12614
12603
|
var DisableLayoutContextKey = /* @__PURE__ */ (0, react.createContext)("");
|
|
12615
12604
|
var ENABLE = false;
|
|
12616
|
-
var LayoutMeasurementController = function(param) {
|
|
12605
|
+
var LayoutMeasurementController = function LayoutMeasurementController2(param) {
|
|
12617
12606
|
var { disable, children } = param;
|
|
12618
12607
|
var id = (0, react.useId)();
|
|
12619
12608
|
useIsomorphicLayoutEffect(function() {
|
|
@@ -12779,14 +12768,14 @@ if (ENABLE) {
|
|
|
12779
12768
|
return _layoutOnAnimationFrame.apply(this, arguments);
|
|
12780
12769
|
}
|
|
12781
12770
|
resumeLayoutLoop = scheduleLayoutFrame2;
|
|
12782
|
-
measureOnNextFrame = function() {
|
|
12771
|
+
measureOnNextFrame = function measureOnNextFrame2() {
|
|
12783
12772
|
frameCount = 0;
|
|
12784
12773
|
scheduleLayoutFrame2();
|
|
12785
12774
|
};
|
|
12786
12775
|
document.addEventListener("visibilitychange", scheduleLayoutFrame2);
|
|
12787
12776
|
scheduleLayoutFrame2();
|
|
12788
12777
|
}
|
|
12789
|
-
var getElementLayoutEvent = function(nodeRect, parentRect, node) {
|
|
12778
|
+
var getElementLayoutEvent = function getElementLayoutEvent2(nodeRect, parentRect, node) {
|
|
12790
12779
|
return {
|
|
12791
12780
|
nativeEvent: {
|
|
12792
12781
|
layout: getRelativeDimensions(nodeRect, parentRect, node),
|
|
@@ -12795,13 +12784,13 @@ var getElementLayoutEvent = function(nodeRect, parentRect, node) {
|
|
|
12795
12784
|
timeStamp: Date.now()
|
|
12796
12785
|
};
|
|
12797
12786
|
};
|
|
12798
|
-
var getPreTransformDimensions = function(node) {
|
|
12787
|
+
var getPreTransformDimensions = function getPreTransformDimensions2(node) {
|
|
12799
12788
|
return {
|
|
12800
12789
|
width: node.offsetWidth,
|
|
12801
12790
|
height: node.offsetHeight
|
|
12802
12791
|
};
|
|
12803
12792
|
};
|
|
12804
|
-
var getRelativeDimensions = function(a, b, aNode) {
|
|
12793
|
+
var getRelativeDimensions = function getRelativeDimensions2(a, b, aNode) {
|
|
12805
12794
|
var left = a.left - b.left;
|
|
12806
12795
|
var top = a.top - b.top;
|
|
12807
12796
|
var { width, height } = usePretransformDimensions() && aNode ? getPreTransformDimensions(aNode) : {
|
|
@@ -13249,7 +13238,7 @@ var NativeMediaQueryList = /* @__PURE__ */ (function() {
|
|
|
13249
13238
|
})();
|
|
13250
13239
|
//#endregion
|
|
13251
13240
|
//#region ../react-native-media-driver/dist/esm/matchMedia.native.js
|
|
13252
|
-
var matchMedia$1 = function(query) {
|
|
13241
|
+
var matchMedia$1 = function matchMedia2(query) {
|
|
13253
13242
|
return new NativeMediaQueryList(query);
|
|
13254
13243
|
};
|
|
13255
13244
|
//#endregion
|