@tamagui/core 2.0.0-1768992908401 → 2.0.0-1769035103261
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/native.cjs +344 -347
- package/dist/test.native.cjs +147 -150
- package/package.json +11 -11
package/dist/native.cjs
CHANGED
|
@@ -6,18 +6,18 @@ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
|
6
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
7
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
8
8
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
9
|
-
var __spreadValues = (a,
|
|
10
|
-
for (var prop in
|
|
11
|
-
if (__hasOwnProp.call(
|
|
12
|
-
__defNormalProp(a, prop,
|
|
9
|
+
var __spreadValues = (a, b) => {
|
|
10
|
+
for (var prop in b || (b = {}))
|
|
11
|
+
if (__hasOwnProp.call(b, prop))
|
|
12
|
+
__defNormalProp(a, prop, b[prop]);
|
|
13
13
|
if (__getOwnPropSymbols)
|
|
14
|
-
for (var prop of __getOwnPropSymbols(
|
|
15
|
-
if (__propIsEnum.call(
|
|
16
|
-
__defNormalProp(a, prop,
|
|
14
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
15
|
+
if (__propIsEnum.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
17
|
}
|
|
18
18
|
return a;
|
|
19
19
|
};
|
|
20
|
-
var __spreadProps = (a,
|
|
20
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
21
|
var __objRest = (source, exclude) => {
|
|
22
22
|
var target = {};
|
|
23
23
|
for (var prop in source)
|
|
@@ -36,15 +36,15 @@ var __async = (__this, __arguments, generator) => {
|
|
|
36
36
|
var fulfilled = (value) => {
|
|
37
37
|
try {
|
|
38
38
|
step(generator.next(value));
|
|
39
|
-
} catch (
|
|
40
|
-
reject(
|
|
39
|
+
} catch (e) {
|
|
40
|
+
reject(e);
|
|
41
41
|
}
|
|
42
42
|
};
|
|
43
43
|
var rejected = (value) => {
|
|
44
44
|
try {
|
|
45
45
|
step(generator.throw(value));
|
|
46
|
-
} catch (
|
|
47
|
-
reject(
|
|
46
|
+
} catch (e) {
|
|
47
|
+
reject(e);
|
|
48
48
|
}
|
|
49
49
|
};
|
|
50
50
|
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
@@ -54,33 +54,33 @@ var __async = (__this, __arguments, generator) => {
|
|
|
54
54
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
55
55
|
const jsxRuntime = require("react/jsx-runtime");
|
|
56
56
|
const React = require("react");
|
|
57
|
-
function _interopNamespaceDefault(
|
|
57
|
+
function _interopNamespaceDefault(e) {
|
|
58
58
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
59
|
-
if (
|
|
60
|
-
for (const k in
|
|
59
|
+
if (e) {
|
|
60
|
+
for (const k in e) {
|
|
61
61
|
if (k !== "default") {
|
|
62
|
-
const d = Object.getOwnPropertyDescriptor(
|
|
62
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
63
63
|
Object.defineProperty(n, k, d.get ? d : {
|
|
64
64
|
enumerable: true,
|
|
65
|
-
get: () =>
|
|
65
|
+
get: () => e[k]
|
|
66
66
|
});
|
|
67
67
|
}
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
|
-
n.default =
|
|
70
|
+
n.default = e;
|
|
71
71
|
return Object.freeze(n);
|
|
72
72
|
}
|
|
73
73
|
function _mergeNamespaces(n, m) {
|
|
74
74
|
for (var i = 0; i < m.length; i++) {
|
|
75
|
-
const
|
|
76
|
-
if (typeof
|
|
77
|
-
for (const k in
|
|
75
|
+
const e = m[i];
|
|
76
|
+
if (typeof e !== "string" && !Array.isArray(e)) {
|
|
77
|
+
for (const k in e) {
|
|
78
78
|
if (k !== "default" && !(k in n)) {
|
|
79
|
-
const d = Object.getOwnPropertyDescriptor(
|
|
79
|
+
const d = Object.getOwnPropertyDescriptor(e, k);
|
|
80
80
|
if (d) {
|
|
81
81
|
Object.defineProperty(n, k, d.get ? d : {
|
|
82
82
|
enumerable: true,
|
|
83
|
-
get: () =>
|
|
83
|
+
get: () => e[k]
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
}
|
|
@@ -387,7 +387,7 @@ function supportsPassiveEvents() {
|
|
|
387
387
|
return supported = true, false;
|
|
388
388
|
}
|
|
389
389
|
}), window.addEventListener("test", null, options), window.removeEventListener("test", null, options);
|
|
390
|
-
} catch (
|
|
390
|
+
} catch (e) {
|
|
391
391
|
}
|
|
392
392
|
return supported;
|
|
393
393
|
}
|
|
@@ -410,7 +410,7 @@ function createEventHandle(type, options) {
|
|
|
410
410
|
if (target == null || typeof target.addEventListener != "function") throw new Error("createEventHandle: called on an invalid target.");
|
|
411
411
|
const element = target;
|
|
412
412
|
if (listener != null) {
|
|
413
|
-
const compatListener = (
|
|
413
|
+
const compatListener = (e) => listener(normalizeEvent(e));
|
|
414
414
|
return element.addEventListener(type, compatListener, opts2), function() {
|
|
415
415
|
element == null ? void 0 : element.removeEventListener(type, compatListener, opts2);
|
|
416
416
|
};
|
|
@@ -585,13 +585,13 @@ var getElementLayoutEvent = function(nodeRect, parentRect) {
|
|
|
585
585
|
},
|
|
586
586
|
timeStamp: Date.now()
|
|
587
587
|
};
|
|
588
|
-
}, getRelativeDimensions = function(a,
|
|
588
|
+
}, getRelativeDimensions = function(a, b) {
|
|
589
589
|
var {
|
|
590
590
|
height,
|
|
591
591
|
left,
|
|
592
592
|
top,
|
|
593
593
|
width
|
|
594
|
-
} = a, x = left -
|
|
594
|
+
} = a, x = left - b.left, y = top - b.top;
|
|
595
595
|
return {
|
|
596
596
|
x,
|
|
597
597
|
y,
|
|
@@ -1822,40 +1822,40 @@ function requireNormalizeColor() {
|
|
|
1822
1822
|
}
|
|
1823
1823
|
return null;
|
|
1824
1824
|
}
|
|
1825
|
-
function hue2rgb(p, q,
|
|
1826
|
-
if (
|
|
1827
|
-
|
|
1825
|
+
function hue2rgb(p, q, t) {
|
|
1826
|
+
if (t < 0) {
|
|
1827
|
+
t += 1;
|
|
1828
1828
|
}
|
|
1829
|
-
if (
|
|
1830
|
-
|
|
1829
|
+
if (t > 1) {
|
|
1830
|
+
t -= 1;
|
|
1831
1831
|
}
|
|
1832
|
-
if (
|
|
1833
|
-
return p + (q - p) * 6 *
|
|
1832
|
+
if (t < 1 / 6) {
|
|
1833
|
+
return p + (q - p) * 6 * t;
|
|
1834
1834
|
}
|
|
1835
|
-
if (
|
|
1835
|
+
if (t < 1 / 2) {
|
|
1836
1836
|
return q;
|
|
1837
1837
|
}
|
|
1838
|
-
if (
|
|
1839
|
-
return p + (q - p) * (2 / 3 -
|
|
1838
|
+
if (t < 2 / 3) {
|
|
1839
|
+
return p + (q - p) * (2 / 3 - t) * 6;
|
|
1840
1840
|
}
|
|
1841
1841
|
return p;
|
|
1842
1842
|
}
|
|
1843
|
-
function hslToRgb(
|
|
1844
|
-
const q = l < 0.5 ? l * (1 +
|
|
1843
|
+
function hslToRgb(h, s, l) {
|
|
1844
|
+
const q = l < 0.5 ? l * (1 + s) : l + s - l * s;
|
|
1845
1845
|
const p = 2 * l - q;
|
|
1846
|
-
const r = hue2rgb(p, q,
|
|
1847
|
-
const g = hue2rgb(p, q,
|
|
1848
|
-
const
|
|
1849
|
-
return Math.round(r * 255) << 24 | Math.round(g * 255) << 16 | Math.round(
|
|
1850
|
-
}
|
|
1851
|
-
function hwbToRgb(
|
|
1852
|
-
if (
|
|
1853
|
-
const gray = Math.round(
|
|
1846
|
+
const r = hue2rgb(p, q, h + 1 / 3);
|
|
1847
|
+
const g = hue2rgb(p, q, h);
|
|
1848
|
+
const b = hue2rgb(p, q, h - 1 / 3);
|
|
1849
|
+
return Math.round(r * 255) << 24 | Math.round(g * 255) << 16 | Math.round(b * 255) << 8;
|
|
1850
|
+
}
|
|
1851
|
+
function hwbToRgb(h, w, b) {
|
|
1852
|
+
if (w + b >= 1) {
|
|
1853
|
+
const gray = Math.round(w * 255 / (w + b));
|
|
1854
1854
|
return gray << 24 | gray << 16 | gray << 8;
|
|
1855
1855
|
}
|
|
1856
|
-
const red = hue2rgb(0, 1,
|
|
1857
|
-
const green = hue2rgb(0, 1,
|
|
1858
|
-
const blue = hue2rgb(0, 1,
|
|
1856
|
+
const red = hue2rgb(0, 1, h + 1 / 3) * (1 - w - b) + w;
|
|
1857
|
+
const green = hue2rgb(0, 1, h) * (1 - w - b) + w;
|
|
1858
|
+
const blue = hue2rgb(0, 1, h - 1 / 3) * (1 - w - b) + w;
|
|
1859
1859
|
return Math.round(red * 255) << 24 | Math.round(green * 255) << 16 | Math.round(blue * 255) << 8;
|
|
1860
1860
|
}
|
|
1861
1861
|
const NUMBER = "[-+]?\\d*\\.?\\d+";
|
|
@@ -2241,11 +2241,11 @@ const normalizeColor$3 = /* @__PURE__ */ _mergeNamespaces({
|
|
|
2241
2241
|
}, [normalizeColorExports]);
|
|
2242
2242
|
var norm = index || normalizeColor$3, normalizeCSSColor = norm;
|
|
2243
2243
|
function rgba(colorInt) {
|
|
2244
|
-
var r = Math.round((colorInt & 4278190080) >>> 24), g = Math.round((colorInt & 16711680) >>> 16),
|
|
2244
|
+
var r = Math.round((colorInt & 4278190080) >>> 24), g = Math.round((colorInt & 16711680) >>> 16), b = Math.round((colorInt & 65280) >>> 8), a = ((colorInt & 255) >>> 0) / 255;
|
|
2245
2245
|
return {
|
|
2246
2246
|
r,
|
|
2247
2247
|
g,
|
|
2248
|
-
b
|
|
2248
|
+
b,
|
|
2249
2249
|
a
|
|
2250
2250
|
};
|
|
2251
2251
|
}
|
|
@@ -2262,8 +2262,8 @@ const normalizeColor$2 = (color, opacity = 1) => {
|
|
|
2262
2262
|
if (typeof color == "string" && isWebColor$1(color)) return color;
|
|
2263
2263
|
const colorInt = processColor$1(color);
|
|
2264
2264
|
if (colorInt != null) {
|
|
2265
|
-
const r = colorInt >> 16 & 255, g = colorInt >> 8 & 255,
|
|
2266
|
-
return `rgba(${r},${g},${
|
|
2265
|
+
const r = colorInt >> 16 & 255, g = colorInt >> 8 & 255, b = colorInt & 255, alpha = ((colorInt >> 24 & 255) / 255 * opacity).toFixed(2);
|
|
2266
|
+
return `rgba(${r},${g},${b},${alpha})`;
|
|
2267
2267
|
}
|
|
2268
2268
|
if (typeof color == "string") return color;
|
|
2269
2269
|
};
|
|
@@ -2280,14 +2280,14 @@ const focusableElements$1 = {
|
|
|
2280
2280
|
blur(node) {
|
|
2281
2281
|
try {
|
|
2282
2282
|
node.blur();
|
|
2283
|
-
} catch (
|
|
2283
|
+
} catch (e) {
|
|
2284
2284
|
}
|
|
2285
2285
|
},
|
|
2286
2286
|
focus(node) {
|
|
2287
2287
|
try {
|
|
2288
2288
|
const name = node.nodeName;
|
|
2289
2289
|
node.getAttribute("tabIndex") == null && focusableElements$1[name] == null && node.setAttribute("tabIndex", "-1"), node.focus();
|
|
2290
|
-
} catch (
|
|
2290
|
+
} catch (e) {
|
|
2291
2291
|
}
|
|
2292
2292
|
},
|
|
2293
2293
|
measure(node, callback) {
|
|
@@ -2402,9 +2402,9 @@ const requests = {}, ImageLoader = {
|
|
|
2402
2402
|
load(uri, onLoad, onError) {
|
|
2403
2403
|
id += 1;
|
|
2404
2404
|
const image = new window.Image();
|
|
2405
|
-
return image.onerror = onError, image.onload = (
|
|
2405
|
+
return image.onerror = onError, image.onload = (e) => {
|
|
2406
2406
|
const onDecode = () => onLoad({
|
|
2407
|
-
nativeEvent:
|
|
2407
|
+
nativeEvent: e
|
|
2408
2408
|
});
|
|
2409
2409
|
typeof image.decode == "function" ? image.decode().then(onDecode, onDecode) : setTimeout(onDecode, 0);
|
|
2410
2410
|
}, image.src = uri, requests[`${id}`] = image, id;
|
|
@@ -2434,8 +2434,8 @@ const normalizeColor$1 = (color, opacity = 1) => {
|
|
|
2434
2434
|
if (typeof color == "string" && isWebColor(color)) return color;
|
|
2435
2435
|
const colorInt = processColor(color);
|
|
2436
2436
|
if (colorInt != null) {
|
|
2437
|
-
const r = colorInt >> 16 & 255, g = colorInt >> 8 & 255,
|
|
2438
|
-
return `rgba(${r},${g},${
|
|
2437
|
+
const r = colorInt >> 16 & 255, g = colorInt >> 8 & 255, b = colorInt & 255, alpha = ((colorInt >> 24 & 255) / 255 * opacity).toFixed(2);
|
|
2438
|
+
return `rgba(${r},${g},${b},${alpha})`;
|
|
2439
2439
|
}
|
|
2440
2440
|
};
|
|
2441
2441
|
function pick(obj, list) {
|
|
@@ -2512,14 +2512,14 @@ const focusableElements = {
|
|
|
2512
2512
|
blur(node) {
|
|
2513
2513
|
try {
|
|
2514
2514
|
node.blur();
|
|
2515
|
-
} catch (
|
|
2515
|
+
} catch (e) {
|
|
2516
2516
|
}
|
|
2517
2517
|
},
|
|
2518
2518
|
focus(node) {
|
|
2519
2519
|
try {
|
|
2520
2520
|
const name = node.nodeName;
|
|
2521
2521
|
node.getAttribute("tabIndex") == null && focusableElements[name] == null && node.setAttribute("tabIndex", "-1"), node.focus();
|
|
2522
|
-
} catch (
|
|
2522
|
+
} catch (e) {
|
|
2523
2523
|
}
|
|
2524
2524
|
},
|
|
2525
2525
|
measure(node, callback) {
|
|
@@ -2599,24 +2599,24 @@ function useHover(targetRef, config) {
|
|
|
2599
2599
|
useLayoutEffectImpl(() => {
|
|
2600
2600
|
const target = targetRef.current;
|
|
2601
2601
|
if (target !== null) {
|
|
2602
|
-
const hoverEnd = function(
|
|
2603
|
-
onHoverEnd == null ? void 0 : onHoverEnd(
|
|
2604
|
-
}, leaveListener = function(
|
|
2602
|
+
const hoverEnd = function(e) {
|
|
2603
|
+
onHoverEnd == null ? void 0 : onHoverEnd(e), onHoverChange == null ? void 0 : onHoverChange(false), addMoveListener(target, null), addLeaveListener(target, null);
|
|
2604
|
+
}, leaveListener = function(e) {
|
|
2605
2605
|
const target2 = targetRef.current;
|
|
2606
|
-
target2 != null && getPointerType(
|
|
2607
|
-
}, moveListener = function(
|
|
2608
|
-
getPointerType(
|
|
2609
|
-
}, hoverStart = function(
|
|
2610
|
-
onHoverStart == null ? void 0 : onHoverStart(
|
|
2606
|
+
target2 != null && getPointerType(e) !== "touch" && (contain && dispatchCustomEvent(target2, unlockEventType), hoverEnd(e));
|
|
2607
|
+
}, moveListener = function(e) {
|
|
2608
|
+
getPointerType(e) !== "touch" && onHoverUpdate != null && (e.x == null && (e.x = e.clientX), e.y == null && (e.y = e.clientY), onHoverUpdate(e));
|
|
2609
|
+
}, hoverStart = function(e) {
|
|
2610
|
+
onHoverStart == null ? void 0 : onHoverStart(e), onHoverChange == null ? void 0 : onHoverChange(true), onHoverUpdate != null && addMoveListener(target, disabled ? null : moveListener), addLeaveListener(target, disabled ? null : leaveListener);
|
|
2611
2611
|
};
|
|
2612
|
-
addEnterListener(target, disabled ? null : function(
|
|
2612
|
+
addEnterListener(target, disabled ? null : function(e) {
|
|
2613
2613
|
const target2 = targetRef.current;
|
|
2614
|
-
if (target2 != null && getPointerType(
|
|
2615
|
-
contain && dispatchCustomEvent(target2, lockEventType), hoverStart(
|
|
2614
|
+
if (target2 != null && getPointerType(e) !== "touch") {
|
|
2615
|
+
contain && dispatchCustomEvent(target2, lockEventType), hoverStart(e);
|
|
2616
2616
|
const lockListener = function(lockEvent) {
|
|
2617
|
-
lockEvent.target !== target2 && hoverEnd(
|
|
2617
|
+
lockEvent.target !== target2 && hoverEnd(e);
|
|
2618
2618
|
}, unlockListener = function(lockEvent) {
|
|
2619
|
-
lockEvent.target !== target2 && hoverStart(
|
|
2619
|
+
lockEvent.target !== target2 && hoverStart(e);
|
|
2620
2620
|
};
|
|
2621
2621
|
addLockListener(target2, disabled ? null : lockListener), addUnlockListener(target2, disabled ? null : unlockListener);
|
|
2622
2622
|
}
|
|
@@ -2681,12 +2681,12 @@ class TaskQueue {
|
|
|
2681
2681
|
try {
|
|
2682
2682
|
typeof task == "object" && task && "gen" in task ? this._genPromise(task) : typeof task == "object" && task && "run" in task ? task.run() : (invariant(typeof task == "function", `Expected Function, SimpleTask, or PromiseTask, but got:
|
|
2683
2683
|
` + JSON.stringify(task, null, 2)), task());
|
|
2684
|
-
} catch (
|
|
2685
|
-
if (
|
|
2684
|
+
} catch (e) {
|
|
2685
|
+
if (e instanceof Error) {
|
|
2686
2686
|
const taskName = task && typeof task == "object" && "name" in task ? task.name : "";
|
|
2687
|
-
|
|
2687
|
+
e.message = "TaskQueue: Error with task " + taskName + ": " + e.message;
|
|
2688
2688
|
}
|
|
2689
|
-
throw
|
|
2689
|
+
throw e;
|
|
2690
2690
|
}
|
|
2691
2691
|
}
|
|
2692
2692
|
}
|
|
@@ -3420,7 +3420,7 @@ class AnimatedWithChildren extends AnimatedNode {
|
|
|
3420
3420
|
if (super.__callListeners(value), !this.__isNative) for (const child of this._children) child.__getValue && child.__callListeners(child.__getValue());
|
|
3421
3421
|
}
|
|
3422
3422
|
}
|
|
3423
|
-
const linear = (
|
|
3423
|
+
const linear = (t) => t;
|
|
3424
3424
|
function createInterpolation(config) {
|
|
3425
3425
|
if (config.outputRange && typeof config.outputRange[0] == "string") return createInterpolationFromStringOutputRange(config);
|
|
3426
3426
|
const outputRange = config.outputRange, inputRange = config.inputRange;
|
|
@@ -3450,8 +3450,8 @@ function colorToRgba(input) {
|
|
|
3450
3450
|
let normalizedColor = normalizeColor$1(input);
|
|
3451
3451
|
if (normalizedColor === null || typeof normalizedColor != "number") return input;
|
|
3452
3452
|
normalizedColor = normalizedColor || 0;
|
|
3453
|
-
const r = (normalizedColor & 4278190080) >>> 24, g = (normalizedColor & 16711680) >>> 16,
|
|
3454
|
-
return `rgba(${r}, ${g}, ${
|
|
3453
|
+
const r = (normalizedColor & 4278190080) >>> 24, g = (normalizedColor & 16711680) >>> 16, b = (normalizedColor & 65280) >>> 8, a = (normalizedColor & 255) / 255;
|
|
3454
|
+
return `rgba(${r}, ${g}, ${b}, ${a})`;
|
|
3455
3455
|
}
|
|
3456
3456
|
const stringShapeRegex = /[+-]?(?:\d+\.?\d*|\.\d+)(?:[eE][+-]?\d+)?/g;
|
|
3457
3457
|
function createInterpolationFromStringOutputRange(config) {
|
|
@@ -4268,31 +4268,31 @@ const styles$h = {
|
|
|
4268
4268
|
display: "inline-flex"
|
|
4269
4269
|
}
|
|
4270
4270
|
};
|
|
4271
|
-
function normalizeScrollEvent$1(
|
|
4271
|
+
function normalizeScrollEvent$1(e) {
|
|
4272
4272
|
return {
|
|
4273
4273
|
nativeEvent: {
|
|
4274
4274
|
contentOffset: {
|
|
4275
4275
|
get x() {
|
|
4276
|
-
return
|
|
4276
|
+
return e.target.scrollLeft;
|
|
4277
4277
|
},
|
|
4278
4278
|
get y() {
|
|
4279
|
-
return
|
|
4279
|
+
return e.target.scrollTop;
|
|
4280
4280
|
}
|
|
4281
4281
|
},
|
|
4282
4282
|
contentSize: {
|
|
4283
4283
|
get height() {
|
|
4284
|
-
return
|
|
4284
|
+
return e.target.scrollHeight;
|
|
4285
4285
|
},
|
|
4286
4286
|
get width() {
|
|
4287
|
-
return
|
|
4287
|
+
return e.target.scrollWidth;
|
|
4288
4288
|
}
|
|
4289
4289
|
},
|
|
4290
4290
|
layoutMeasurement: {
|
|
4291
4291
|
get height() {
|
|
4292
|
-
return
|
|
4292
|
+
return e.target.offsetHeight;
|
|
4293
4293
|
},
|
|
4294
4294
|
get width() {
|
|
4295
|
-
return
|
|
4295
|
+
return e.target.offsetWidth;
|
|
4296
4296
|
}
|
|
4297
4297
|
}
|
|
4298
4298
|
},
|
|
@@ -4324,23 +4324,23 @@ const ScrollViewBase$1 = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
4324
4324
|
"style"
|
|
4325
4325
|
]), scrollState = React__namespace.useRef({ isScrolling: false, scrollLastTick: 0 }), scrollTimeout = React__namespace.useRef(null), scrollRef = React__namespace.useRef(null);
|
|
4326
4326
|
function createPreventableScrollHandler(handler) {
|
|
4327
|
-
return (
|
|
4328
|
-
scrollEnabled && handler && handler(
|
|
4327
|
+
return (e) => {
|
|
4328
|
+
scrollEnabled && handler && handler(e);
|
|
4329
4329
|
};
|
|
4330
4330
|
}
|
|
4331
|
-
function handleScroll(
|
|
4332
|
-
|
|
4333
|
-
handleScrollEnd(
|
|
4334
|
-
}, 100), scrollState.current.isScrolling ? shouldEmitScrollEvent$1(scrollState.current.scrollLastTick, scrollEventThrottle) && handleScrollTick(
|
|
4331
|
+
function handleScroll(e) {
|
|
4332
|
+
e.stopPropagation(), e.target === scrollRef.current && (e.persist(), scrollTimeout.current != null && clearTimeout(scrollTimeout.current), scrollTimeout.current = setTimeout(() => {
|
|
4333
|
+
handleScrollEnd(e);
|
|
4334
|
+
}, 100), scrollState.current.isScrolling ? shouldEmitScrollEvent$1(scrollState.current.scrollLastTick, scrollEventThrottle) && handleScrollTick(e) : handleScrollStart(e));
|
|
4335
4335
|
}
|
|
4336
|
-
function handleScrollStart(
|
|
4337
|
-
scrollState.current.isScrolling = true, handleScrollTick(
|
|
4336
|
+
function handleScrollStart(e) {
|
|
4337
|
+
scrollState.current.isScrolling = true, handleScrollTick(e);
|
|
4338
4338
|
}
|
|
4339
|
-
function handleScrollTick(
|
|
4340
|
-
scrollState.current.scrollLastTick = Date.now(), onScroll && onScroll(normalizeScrollEvent$1(
|
|
4339
|
+
function handleScrollTick(e) {
|
|
4340
|
+
scrollState.current.scrollLastTick = Date.now(), onScroll && onScroll(normalizeScrollEvent$1(e));
|
|
4341
4341
|
}
|
|
4342
|
-
function handleScrollEnd(
|
|
4343
|
-
scrollState.current.isScrolling = false, onScroll && onScroll(normalizeScrollEvent$1(
|
|
4342
|
+
function handleScrollEnd(e) {
|
|
4343
|
+
scrollState.current.isScrolling = false, onScroll && onScroll(normalizeScrollEvent$1(e));
|
|
4344
4344
|
}
|
|
4345
4345
|
const hideScrollbar = showsHorizontalScrollIndicator === false || showsVerticalScrollIndicator === false;
|
|
4346
4346
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -4511,17 +4511,17 @@ let ScrollView$1 = class ScrollView extends React.Component {
|
|
|
4511
4511
|
* relevant to you. (For example, only if you receive these callbacks after
|
|
4512
4512
|
* you had explicitly focused a node etc).
|
|
4513
4513
|
*/
|
|
4514
|
-
__publicField(this, "scrollResponderKeyboardWillShow", (
|
|
4515
|
-
this.keyboardWillOpenTo =
|
|
4514
|
+
__publicField(this, "scrollResponderKeyboardWillShow", (e) => {
|
|
4515
|
+
this.keyboardWillOpenTo = e, this.props.onKeyboardWillShow && this.props.onKeyboardWillShow(e);
|
|
4516
4516
|
});
|
|
4517
|
-
__publicField(this, "scrollResponderKeyboardWillHide", (
|
|
4518
|
-
this.keyboardWillOpenTo = null, this.props.onKeyboardWillHide && this.props.onKeyboardWillHide(
|
|
4517
|
+
__publicField(this, "scrollResponderKeyboardWillHide", (e) => {
|
|
4518
|
+
this.keyboardWillOpenTo = null, this.props.onKeyboardWillHide && this.props.onKeyboardWillHide(e);
|
|
4519
4519
|
});
|
|
4520
|
-
__publicField(this, "scrollResponderKeyboardDidShow", (
|
|
4521
|
-
|
|
4520
|
+
__publicField(this, "scrollResponderKeyboardDidShow", (e) => {
|
|
4521
|
+
e && (this.keyboardWillOpenTo = e), this.props.onKeyboardDidShow && this.props.onKeyboardDidShow(e);
|
|
4522
4522
|
});
|
|
4523
|
-
__publicField(this, "scrollResponderKeyboardDidHide", (
|
|
4524
|
-
this.keyboardWillOpenTo = null, this.props.onKeyboardDidHide && this.props.onKeyboardDidHide(
|
|
4523
|
+
__publicField(this, "scrollResponderKeyboardDidHide", (e) => {
|
|
4524
|
+
this.keyboardWillOpenTo = null, this.props.onKeyboardDidHide && this.props.onKeyboardDidHide(e);
|
|
4525
4525
|
});
|
|
4526
4526
|
}
|
|
4527
4527
|
/**
|
|
@@ -4621,13 +4621,13 @@ let ScrollView$1 = class ScrollView extends React.Component {
|
|
|
4621
4621
|
const scrollView = /* @__PURE__ */ jsxRuntime.jsx(ScrollViewClass, __spreadProps(__spreadValues({}, props), { ref: this._setScrollNodeRef.bind(this), children: contentContainer }));
|
|
4622
4622
|
return refreshControl ? React.cloneElement(refreshControl, { style: props.style }, scrollView) : scrollView;
|
|
4623
4623
|
}
|
|
4624
|
-
_handleContentOnLayout(
|
|
4624
|
+
_handleContentOnLayout(e) {
|
|
4625
4625
|
var _a, _b;
|
|
4626
|
-
const { width, height } =
|
|
4626
|
+
const { width, height } = e.nativeEvent.layout;
|
|
4627
4627
|
(_b = (_a = this.props).onContentSizeChange) == null ? void 0 : _b.call(_a, width, height);
|
|
4628
4628
|
}
|
|
4629
|
-
_handleScroll(
|
|
4630
|
-
this.props.keyboardDismissMode === "on-drag" && dismissKeyboard(), this.scrollResponderHandleScroll(
|
|
4629
|
+
_handleScroll(e) {
|
|
4630
|
+
this.props.keyboardDismissMode === "on-drag" && dismissKeyboard(), this.scrollResponderHandleScroll(e);
|
|
4631
4631
|
}
|
|
4632
4632
|
_setInnerViewRef(node) {
|
|
4633
4633
|
this._innerViewRef = node;
|
|
@@ -4680,7 +4680,7 @@ let ScrollView$1 = class ScrollView extends React.Component {
|
|
|
4680
4680
|
*
|
|
4681
4681
|
* Invoke this from an `onStartShouldSetResponderCapture` event.
|
|
4682
4682
|
*/
|
|
4683
|
-
scrollResponderHandleStartShouldSetResponderCapture(
|
|
4683
|
+
scrollResponderHandleStartShouldSetResponderCapture(e) {
|
|
4684
4684
|
return this.scrollResponderIsAnimating();
|
|
4685
4685
|
}
|
|
4686
4686
|
/**
|
|
@@ -4719,26 +4719,26 @@ let ScrollView$1 = class ScrollView extends React.Component {
|
|
|
4719
4719
|
*
|
|
4720
4720
|
* @param {SyntheticEvent} e Event.
|
|
4721
4721
|
*/
|
|
4722
|
-
scrollResponderHandleTouchEnd(
|
|
4723
|
-
const nativeEvent =
|
|
4724
|
-
this.isTouching = nativeEvent.touches.length !== 0, this.props.onTouchEnd && this.props.onTouchEnd(
|
|
4722
|
+
scrollResponderHandleTouchEnd(e) {
|
|
4723
|
+
const nativeEvent = e.nativeEvent;
|
|
4724
|
+
this.isTouching = nativeEvent.touches.length !== 0, this.props.onTouchEnd && this.props.onTouchEnd(e);
|
|
4725
4725
|
}
|
|
4726
4726
|
/**
|
|
4727
4727
|
* Invoke this from an `onResponderRelease` event.
|
|
4728
4728
|
*/
|
|
4729
|
-
scrollResponderHandleResponderRelease(
|
|
4730
|
-
this.props.onResponderRelease && this.props.onResponderRelease(
|
|
4729
|
+
scrollResponderHandleResponderRelease(e) {
|
|
4730
|
+
this.props.onResponderRelease && this.props.onResponderRelease(e);
|
|
4731
4731
|
const currentlyFocusedTextInput = TextInputState.currentlyFocusedField();
|
|
4732
|
-
!this.props.keyboardShouldPersistTaps && currentlyFocusedTextInput != null &&
|
|
4732
|
+
!this.props.keyboardShouldPersistTaps && currentlyFocusedTextInput != null && e.target !== currentlyFocusedTextInput && !this.observedScrollSinceBecomingResponder && !this.becameResponderWhileAnimating && (this.props.onScrollResponderKeyboardDismissed && this.props.onScrollResponderKeyboardDismissed(e), TextInputState.blurTextInput(currentlyFocusedTextInput));
|
|
4733
4733
|
}
|
|
4734
|
-
scrollResponderHandleScroll(
|
|
4735
|
-
this.observedScrollSinceBecomingResponder = true, this.props.onScroll && this.props.onScroll(
|
|
4734
|
+
scrollResponderHandleScroll(e) {
|
|
4735
|
+
this.observedScrollSinceBecomingResponder = true, this.props.onScroll && this.props.onScroll(e);
|
|
4736
4736
|
}
|
|
4737
4737
|
/**
|
|
4738
4738
|
* Invoke this from an `onResponderGrant` event.
|
|
4739
4739
|
*/
|
|
4740
|
-
scrollResponderHandleResponderGrant(
|
|
4741
|
-
this.observedScrollSinceBecomingResponder = false, this.props.onResponderGrant && this.props.onResponderGrant(
|
|
4740
|
+
scrollResponderHandleResponderGrant(e) {
|
|
4741
|
+
this.observedScrollSinceBecomingResponder = false, this.props.onResponderGrant && this.props.onResponderGrant(e), this.becameResponderWhileAnimating = this.scrollResponderIsAnimating();
|
|
4742
4742
|
}
|
|
4743
4743
|
/**
|
|
4744
4744
|
* Unfortunately, `onScrollBeginDrag` also fires when *stopping* the scroll
|
|
@@ -4747,26 +4747,26 @@ let ScrollView$1 = class ScrollView extends React.Component {
|
|
|
4747
4747
|
*
|
|
4748
4748
|
* Invoke this from an `onScrollBeginDrag` event.
|
|
4749
4749
|
*/
|
|
4750
|
-
scrollResponderHandleScrollBeginDrag(
|
|
4751
|
-
this.props.onScrollBeginDrag && this.props.onScrollBeginDrag(
|
|
4750
|
+
scrollResponderHandleScrollBeginDrag(e) {
|
|
4751
|
+
this.props.onScrollBeginDrag && this.props.onScrollBeginDrag(e);
|
|
4752
4752
|
}
|
|
4753
4753
|
/**
|
|
4754
4754
|
* Invoke this from an `onScrollEndDrag` event.
|
|
4755
4755
|
*/
|
|
4756
|
-
scrollResponderHandleScrollEndDrag(
|
|
4757
|
-
this.props.onScrollEndDrag && this.props.onScrollEndDrag(
|
|
4756
|
+
scrollResponderHandleScrollEndDrag(e) {
|
|
4757
|
+
this.props.onScrollEndDrag && this.props.onScrollEndDrag(e);
|
|
4758
4758
|
}
|
|
4759
4759
|
/**
|
|
4760
4760
|
* Invoke this from an `onMomentumScrollBegin` event.
|
|
4761
4761
|
*/
|
|
4762
|
-
scrollResponderHandleMomentumScrollBegin(
|
|
4763
|
-
this.lastMomentumScrollBeginTime = Date.now(), this.props.onMomentumScrollBegin && this.props.onMomentumScrollBegin(
|
|
4762
|
+
scrollResponderHandleMomentumScrollBegin(e) {
|
|
4763
|
+
this.lastMomentumScrollBeginTime = Date.now(), this.props.onMomentumScrollBegin && this.props.onMomentumScrollBegin(e);
|
|
4764
4764
|
}
|
|
4765
4765
|
/**
|
|
4766
4766
|
* Invoke this from an `onMomentumScrollEnd` event.
|
|
4767
4767
|
*/
|
|
4768
|
-
scrollResponderHandleMomentumScrollEnd(
|
|
4769
|
-
this.lastMomentumScrollEndTime = Date.now(), this.props.onMomentumScrollEnd && this.props.onMomentumScrollEnd(
|
|
4768
|
+
scrollResponderHandleMomentumScrollEnd(e) {
|
|
4769
|
+
this.lastMomentumScrollEndTime = Date.now(), this.props.onMomentumScrollEnd && this.props.onMomentumScrollEnd(e);
|
|
4770
4770
|
}
|
|
4771
4771
|
/**
|
|
4772
4772
|
* Invoke this from an `onTouchStart` event.
|
|
@@ -4779,8 +4779,8 @@ let ScrollView$1 = class ScrollView extends React.Component {
|
|
|
4779
4779
|
*
|
|
4780
4780
|
* @param {SyntheticEvent} e Touch Start event.
|
|
4781
4781
|
*/
|
|
4782
|
-
scrollResponderHandleTouchStart(
|
|
4783
|
-
this.isTouching = true, this.props.onTouchStart && this.props.onTouchStart(
|
|
4782
|
+
scrollResponderHandleTouchStart(e) {
|
|
4783
|
+
this.isTouching = true, this.props.onTouchStart && this.props.onTouchStart(e);
|
|
4784
4784
|
}
|
|
4785
4785
|
/**
|
|
4786
4786
|
* Invoke this from an `onTouchMove` event.
|
|
@@ -4793,11 +4793,11 @@ let ScrollView$1 = class ScrollView extends React.Component {
|
|
|
4793
4793
|
*
|
|
4794
4794
|
* @param {SyntheticEvent} e Touch Start event.
|
|
4795
4795
|
*/
|
|
4796
|
-
scrollResponderHandleTouchMove(
|
|
4797
|
-
this.props.onTouchMove && this.props.onTouchMove(
|
|
4796
|
+
scrollResponderHandleTouchMove(e) {
|
|
4797
|
+
this.props.onTouchMove && this.props.onTouchMove(e);
|
|
4798
4798
|
}
|
|
4799
|
-
scrollResponderHandleTerminate(
|
|
4800
|
-
this.props.onResponderTerminate && this.props.onResponderTerminate(
|
|
4799
|
+
scrollResponderHandleTerminate(e) {
|
|
4800
|
+
this.props.onResponderTerminate && this.props.onResponderTerminate(e);
|
|
4801
4801
|
}
|
|
4802
4802
|
/**
|
|
4803
4803
|
* A helper function for this class that lets us quickly determine if the
|
|
@@ -4812,8 +4812,8 @@ let ScrollView$1 = class ScrollView extends React.Component {
|
|
|
4812
4812
|
*/
|
|
4813
4813
|
scrollResponderFlashScrollIndicators() {
|
|
4814
4814
|
}
|
|
4815
|
-
scrollResponderTextInputFocusError(
|
|
4816
|
-
console.error("Error measuring text field: ",
|
|
4815
|
+
scrollResponderTextInputFocusError(e) {
|
|
4816
|
+
console.error("Error measuring text field: ", e);
|
|
4817
4817
|
}
|
|
4818
4818
|
};
|
|
4819
4819
|
const commonStyle$1 = {
|
|
@@ -5907,18 +5907,18 @@ const Image$1 = React__namespace.forwardRef((props, ref) => {
|
|
|
5907
5907
|
}
|
|
5908
5908
|
}
|
|
5909
5909
|
}
|
|
5910
|
-
function handleLayout(
|
|
5910
|
+
function handleLayout(e) {
|
|
5911
5911
|
if (resizeMode === "center" || resizeMode === "repeat" || onLayout) {
|
|
5912
|
-
const { layout: layout2 } =
|
|
5913
|
-
onLayout && onLayout(
|
|
5912
|
+
const { layout: layout2 } = e.nativeEvent;
|
|
5913
|
+
onLayout && onLayout(e), updateLayout(layout2);
|
|
5914
5914
|
}
|
|
5915
5915
|
}
|
|
5916
5916
|
const uri = resolveAssetUri$1(source);
|
|
5917
5917
|
return React__namespace.useEffect(() => {
|
|
5918
5918
|
abortPendingRequest(), uri != null && (updateState(LOADING$1), onLoadStart && onLoadStart(), requestRef.current = ImageLoader.load(
|
|
5919
5919
|
uri,
|
|
5920
|
-
function(
|
|
5921
|
-
updateState(LOADED$1), onLoad && onLoad(
|
|
5920
|
+
function(e) {
|
|
5921
|
+
updateState(LOADED$1), onLoad && onLoad(e), onLoadEnd && onLoadEnd();
|
|
5922
5922
|
},
|
|
5923
5923
|
function() {
|
|
5924
5924
|
updateState(ERRORED$1), onError && onError({
|
|
@@ -6259,8 +6259,8 @@ const pickProps$4 = (props) => pick(props, forwardPropsListText), Text$3 = React
|
|
|
6259
6259
|
onStartShouldSetResponderCapture
|
|
6260
6260
|
});
|
|
6261
6261
|
const handleClick = React__namespace.useCallback(
|
|
6262
|
-
(
|
|
6263
|
-
onClick != null ? onClick(
|
|
6262
|
+
(e) => {
|
|
6263
|
+
onClick != null ? onClick(e) : onPress != null && (e.stopPropagation(), onPress(e));
|
|
6264
6264
|
},
|
|
6265
6265
|
[onClick, onPress]
|
|
6266
6266
|
);
|
|
@@ -7088,18 +7088,18 @@ const Image = React__namespace.forwardRef((props, ref) => {
|
|
|
7088
7088
|
}
|
|
7089
7089
|
}
|
|
7090
7090
|
}
|
|
7091
|
-
function handleLayout(
|
|
7091
|
+
function handleLayout(e) {
|
|
7092
7092
|
if (resizeMode === "center" || resizeMode === "repeat" || onLayout) {
|
|
7093
7093
|
const {
|
|
7094
7094
|
layout: layout2
|
|
7095
|
-
} =
|
|
7096
|
-
onLayout && onLayout(
|
|
7095
|
+
} = e.nativeEvent;
|
|
7096
|
+
onLayout && onLayout(e), updateLayout(layout2);
|
|
7097
7097
|
}
|
|
7098
7098
|
}
|
|
7099
7099
|
const uri = resolveAssetUri(source);
|
|
7100
7100
|
return React__namespace.useEffect(() => {
|
|
7101
|
-
abortPendingRequest(), uri != null && (updateState(LOADING), onLoadStart && onLoadStart(), requestRef.current = ImageLoader.load(uri, function(
|
|
7102
|
-
updateState(LOADED), onLoad && onLoad(
|
|
7101
|
+
abortPendingRequest(), uri != null && (updateState(LOADING), onLoadStart && onLoadStart(), requestRef.current = ImageLoader.load(uri, function(e) {
|
|
7102
|
+
updateState(LOADED), onLoad && onLoad(e), onLoadEnd && onLoadEnd();
|
|
7103
7103
|
}, function() {
|
|
7104
7104
|
updateState(ERRORED), onError && onError({
|
|
7105
7105
|
nativeEvent: {
|
|
@@ -7291,14 +7291,14 @@ function Pressable(props, forwardedRef) {
|
|
|
7291
7291
|
hovered,
|
|
7292
7292
|
focused,
|
|
7293
7293
|
pressed
|
|
7294
|
-
}, blurHandler = React__namespace.useCallback((
|
|
7295
|
-
disabled ||
|
|
7296
|
-
}, [disabled, hostRef, setFocused, onBlur]), focusHandler = React__namespace.useCallback((
|
|
7297
|
-
disabled ||
|
|
7298
|
-
}, [disabled, hostRef, setFocused, onFocus]), contextMenuHandler = React__namespace.useCallback((
|
|
7299
|
-
onContextMenuPress == null ? void 0 : onContextMenuPress(
|
|
7300
|
-
}, [onContextMenu, onContextMenuPress]), keyDownHandler = React__namespace.useCallback((
|
|
7301
|
-
onKeyDownPress == null ? void 0 : onKeyDownPress(
|
|
7294
|
+
}, blurHandler = React__namespace.useCallback((e) => {
|
|
7295
|
+
disabled || e.nativeEvent.target === hostRef.current && (setFocused(false), onBlur == null ? void 0 : onBlur(e));
|
|
7296
|
+
}, [disabled, hostRef, setFocused, onBlur]), focusHandler = React__namespace.useCallback((e) => {
|
|
7297
|
+
disabled || e.nativeEvent.target === hostRef.current && (setFocused(true), onFocus == null ? void 0 : onFocus(e));
|
|
7298
|
+
}, [disabled, hostRef, setFocused, onFocus]), contextMenuHandler = React__namespace.useCallback((e) => {
|
|
7299
|
+
onContextMenuPress == null ? void 0 : onContextMenuPress(e), onContextMenu == null ? void 0 : onContextMenu(e);
|
|
7300
|
+
}, [onContextMenu, onContextMenuPress]), keyDownHandler = React__namespace.useCallback((e) => {
|
|
7301
|
+
onKeyDownPress == null ? void 0 : onKeyDownPress(e), onKeyDown2 == null ? void 0 : onKeyDown2(e);
|
|
7302
7302
|
}, [onKeyDown2, onKeyDownPress]);
|
|
7303
7303
|
return /* @__PURE__ */ jsxRuntime.jsx(View$2, __spreadProps(__spreadValues(__spreadValues({}, rest), pressEventHandlers), {
|
|
7304
7304
|
accessibilityDisabled: disabled,
|
|
@@ -7344,31 +7344,31 @@ const styles$4 = StyleSheet.create({
|
|
|
7344
7344
|
paddingLeft: `${cssFunction}(safe-area-inset-left)`
|
|
7345
7345
|
}
|
|
7346
7346
|
});
|
|
7347
|
-
function normalizeScrollEvent(
|
|
7347
|
+
function normalizeScrollEvent(e) {
|
|
7348
7348
|
return {
|
|
7349
7349
|
nativeEvent: {
|
|
7350
7350
|
contentOffset: {
|
|
7351
7351
|
get x() {
|
|
7352
|
-
return
|
|
7352
|
+
return e.target.scrollLeft;
|
|
7353
7353
|
},
|
|
7354
7354
|
get y() {
|
|
7355
|
-
return
|
|
7355
|
+
return e.target.scrollTop;
|
|
7356
7356
|
}
|
|
7357
7357
|
},
|
|
7358
7358
|
contentSize: {
|
|
7359
7359
|
get height() {
|
|
7360
|
-
return
|
|
7360
|
+
return e.target.scrollHeight;
|
|
7361
7361
|
},
|
|
7362
7362
|
get width() {
|
|
7363
|
-
return
|
|
7363
|
+
return e.target.scrollWidth;
|
|
7364
7364
|
}
|
|
7365
7365
|
},
|
|
7366
7366
|
layoutMeasurement: {
|
|
7367
7367
|
get height() {
|
|
7368
|
-
return
|
|
7368
|
+
return e.target.offsetHeight;
|
|
7369
7369
|
},
|
|
7370
7370
|
get width() {
|
|
7371
|
-
return
|
|
7371
|
+
return e.target.offsetWidth;
|
|
7372
7372
|
}
|
|
7373
7373
|
}
|
|
7374
7374
|
},
|
|
@@ -7403,23 +7403,23 @@ const ScrollViewBase = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
7403
7403
|
scrollLastTick: 0
|
|
7404
7404
|
}), scrollTimeout = React__namespace.useRef(null), scrollRef = React__namespace.useRef(null);
|
|
7405
7405
|
function createPreventableScrollHandler(handler) {
|
|
7406
|
-
return (
|
|
7407
|
-
scrollEnabled && handler && handler(
|
|
7406
|
+
return (e) => {
|
|
7407
|
+
scrollEnabled && handler && handler(e);
|
|
7408
7408
|
};
|
|
7409
7409
|
}
|
|
7410
|
-
function handleScroll(
|
|
7411
|
-
|
|
7412
|
-
handleScrollEnd(
|
|
7413
|
-
}, 100), scrollState.current.isScrolling ? shouldEmitScrollEvent(scrollState.current.scrollLastTick, scrollEventThrottle) && handleScrollTick(
|
|
7410
|
+
function handleScroll(e) {
|
|
7411
|
+
e.stopPropagation(), e.target === scrollRef.current && (e.persist(), scrollTimeout.current != null && clearTimeout(scrollTimeout.current), scrollTimeout.current = setTimeout(() => {
|
|
7412
|
+
handleScrollEnd(e);
|
|
7413
|
+
}, 100), scrollState.current.isScrolling ? shouldEmitScrollEvent(scrollState.current.scrollLastTick, scrollEventThrottle) && handleScrollTick(e) : handleScrollStart(e));
|
|
7414
7414
|
}
|
|
7415
|
-
function handleScrollStart(
|
|
7416
|
-
scrollState.current.isScrolling = true, handleScrollTick(
|
|
7415
|
+
function handleScrollStart(e) {
|
|
7416
|
+
scrollState.current.isScrolling = true, handleScrollTick(e);
|
|
7417
7417
|
}
|
|
7418
|
-
function handleScrollTick(
|
|
7419
|
-
scrollState.current.scrollLastTick = Date.now(), onScroll && onScroll(normalizeScrollEvent(
|
|
7418
|
+
function handleScrollTick(e) {
|
|
7419
|
+
scrollState.current.scrollLastTick = Date.now(), onScroll && onScroll(normalizeScrollEvent(e));
|
|
7420
7420
|
}
|
|
7421
|
-
function handleScrollEnd(
|
|
7422
|
-
scrollState.current.isScrolling = false, onScroll && onScroll(normalizeScrollEvent(
|
|
7421
|
+
function handleScrollEnd(e) {
|
|
7422
|
+
scrollState.current.isScrolling = false, onScroll && onScroll(normalizeScrollEvent(e));
|
|
7423
7423
|
}
|
|
7424
7424
|
const hideScrollbar = showsHorizontalScrollIndicator === false || showsVerticalScrollIndicator === false;
|
|
7425
7425
|
return /* @__PURE__ */ jsxRuntime.jsx(View$2, __spreadProps(__spreadValues({}, rest), {
|
|
@@ -7600,17 +7600,17 @@ class ScrollView2 extends React.Component {
|
|
|
7600
7600
|
* relevant to you. (For example, only if you receive these callbacks after
|
|
7601
7601
|
* you had explicitly focused a node etc).
|
|
7602
7602
|
*/
|
|
7603
|
-
__publicField(this, "scrollResponderKeyboardWillShow", (
|
|
7604
|
-
this.keyboardWillOpenTo =
|
|
7603
|
+
__publicField(this, "scrollResponderKeyboardWillShow", (e) => {
|
|
7604
|
+
this.keyboardWillOpenTo = e, this.props.onKeyboardWillShow && this.props.onKeyboardWillShow(e);
|
|
7605
7605
|
});
|
|
7606
|
-
__publicField(this, "scrollResponderKeyboardWillHide", (
|
|
7607
|
-
this.keyboardWillOpenTo = null, this.props.onKeyboardWillHide && this.props.onKeyboardWillHide(
|
|
7606
|
+
__publicField(this, "scrollResponderKeyboardWillHide", (e) => {
|
|
7607
|
+
this.keyboardWillOpenTo = null, this.props.onKeyboardWillHide && this.props.onKeyboardWillHide(e);
|
|
7608
7608
|
});
|
|
7609
|
-
__publicField(this, "scrollResponderKeyboardDidShow", (
|
|
7610
|
-
|
|
7609
|
+
__publicField(this, "scrollResponderKeyboardDidShow", (e) => {
|
|
7610
|
+
e && (this.keyboardWillOpenTo = e), this.props.onKeyboardDidShow && this.props.onKeyboardDidShow(e);
|
|
7611
7611
|
});
|
|
7612
|
-
__publicField(this, "scrollResponderKeyboardDidHide", (
|
|
7613
|
-
this.keyboardWillOpenTo = null, this.props.onKeyboardDidHide && this.props.onKeyboardDidHide(
|
|
7612
|
+
__publicField(this, "scrollResponderKeyboardDidHide", (e) => {
|
|
7613
|
+
this.keyboardWillOpenTo = null, this.props.onKeyboardDidHide && this.props.onKeyboardDidHide(e);
|
|
7614
7614
|
});
|
|
7615
7615
|
}
|
|
7616
7616
|
/**
|
|
@@ -7702,16 +7702,16 @@ class ScrollView2 extends React.Component {
|
|
|
7702
7702
|
style: props.style
|
|
7703
7703
|
}, scrollView) : scrollView;
|
|
7704
7704
|
}
|
|
7705
|
-
_handleContentOnLayout(
|
|
7705
|
+
_handleContentOnLayout(e) {
|
|
7706
7706
|
var _a, _b;
|
|
7707
7707
|
const {
|
|
7708
7708
|
width,
|
|
7709
7709
|
height
|
|
7710
|
-
} =
|
|
7710
|
+
} = e.nativeEvent.layout;
|
|
7711
7711
|
(_b = (_a = this.props).onContentSizeChange) == null ? void 0 : _b.call(_a, width, height);
|
|
7712
7712
|
}
|
|
7713
|
-
_handleScroll(
|
|
7714
|
-
this.props.keyboardDismissMode === "on-drag" && dismissKeyboard(), this.scrollResponderHandleScroll(
|
|
7713
|
+
_handleScroll(e) {
|
|
7714
|
+
this.props.keyboardDismissMode === "on-drag" && dismissKeyboard(), this.scrollResponderHandleScroll(e);
|
|
7715
7715
|
}
|
|
7716
7716
|
_setInnerViewRef(node) {
|
|
7717
7717
|
this._innerViewRef = node;
|
|
@@ -7764,7 +7764,7 @@ class ScrollView2 extends React.Component {
|
|
|
7764
7764
|
*
|
|
7765
7765
|
* Invoke this from an `onStartShouldSetResponderCapture` event.
|
|
7766
7766
|
*/
|
|
7767
|
-
scrollResponderHandleStartShouldSetResponderCapture(
|
|
7767
|
+
scrollResponderHandleStartShouldSetResponderCapture(e) {
|
|
7768
7768
|
return this.scrollResponderIsAnimating();
|
|
7769
7769
|
}
|
|
7770
7770
|
/**
|
|
@@ -7803,26 +7803,26 @@ class ScrollView2 extends React.Component {
|
|
|
7803
7803
|
*
|
|
7804
7804
|
* @param {SyntheticEvent} e Event.
|
|
7805
7805
|
*/
|
|
7806
|
-
scrollResponderHandleTouchEnd(
|
|
7807
|
-
const nativeEvent =
|
|
7808
|
-
this.isTouching = nativeEvent.touches.length !== 0, this.props.onTouchEnd && this.props.onTouchEnd(
|
|
7806
|
+
scrollResponderHandleTouchEnd(e) {
|
|
7807
|
+
const nativeEvent = e.nativeEvent;
|
|
7808
|
+
this.isTouching = nativeEvent.touches.length !== 0, this.props.onTouchEnd && this.props.onTouchEnd(e);
|
|
7809
7809
|
}
|
|
7810
7810
|
/**
|
|
7811
7811
|
* Invoke this from an `onResponderRelease` event.
|
|
7812
7812
|
*/
|
|
7813
|
-
scrollResponderHandleResponderRelease(
|
|
7814
|
-
this.props.onResponderRelease && this.props.onResponderRelease(
|
|
7813
|
+
scrollResponderHandleResponderRelease(e) {
|
|
7814
|
+
this.props.onResponderRelease && this.props.onResponderRelease(e);
|
|
7815
7815
|
const currentlyFocusedTextInput = TextInputState.currentlyFocusedField();
|
|
7816
|
-
!this.props.keyboardShouldPersistTaps && currentlyFocusedTextInput != null &&
|
|
7816
|
+
!this.props.keyboardShouldPersistTaps && currentlyFocusedTextInput != null && e.target !== currentlyFocusedTextInput && !this.observedScrollSinceBecomingResponder && !this.becameResponderWhileAnimating && (this.props.onScrollResponderKeyboardDismissed && this.props.onScrollResponderKeyboardDismissed(e), TextInputState.blurTextInput(currentlyFocusedTextInput));
|
|
7817
7817
|
}
|
|
7818
|
-
scrollResponderHandleScroll(
|
|
7819
|
-
this.observedScrollSinceBecomingResponder = true, this.props.onScroll && this.props.onScroll(
|
|
7818
|
+
scrollResponderHandleScroll(e) {
|
|
7819
|
+
this.observedScrollSinceBecomingResponder = true, this.props.onScroll && this.props.onScroll(e);
|
|
7820
7820
|
}
|
|
7821
7821
|
/**
|
|
7822
7822
|
* Invoke this from an `onResponderGrant` event.
|
|
7823
7823
|
*/
|
|
7824
|
-
scrollResponderHandleResponderGrant(
|
|
7825
|
-
this.observedScrollSinceBecomingResponder = false, this.props.onResponderGrant && this.props.onResponderGrant(
|
|
7824
|
+
scrollResponderHandleResponderGrant(e) {
|
|
7825
|
+
this.observedScrollSinceBecomingResponder = false, this.props.onResponderGrant && this.props.onResponderGrant(e), this.becameResponderWhileAnimating = this.scrollResponderIsAnimating();
|
|
7826
7826
|
}
|
|
7827
7827
|
/**
|
|
7828
7828
|
* Unfortunately, `onScrollBeginDrag` also fires when *stopping* the scroll
|
|
@@ -7831,26 +7831,26 @@ class ScrollView2 extends React.Component {
|
|
|
7831
7831
|
*
|
|
7832
7832
|
* Invoke this from an `onScrollBeginDrag` event.
|
|
7833
7833
|
*/
|
|
7834
|
-
scrollResponderHandleScrollBeginDrag(
|
|
7835
|
-
this.props.onScrollBeginDrag && this.props.onScrollBeginDrag(
|
|
7834
|
+
scrollResponderHandleScrollBeginDrag(e) {
|
|
7835
|
+
this.props.onScrollBeginDrag && this.props.onScrollBeginDrag(e);
|
|
7836
7836
|
}
|
|
7837
7837
|
/**
|
|
7838
7838
|
* Invoke this from an `onScrollEndDrag` event.
|
|
7839
7839
|
*/
|
|
7840
|
-
scrollResponderHandleScrollEndDrag(
|
|
7841
|
-
this.props.onScrollEndDrag && this.props.onScrollEndDrag(
|
|
7840
|
+
scrollResponderHandleScrollEndDrag(e) {
|
|
7841
|
+
this.props.onScrollEndDrag && this.props.onScrollEndDrag(e);
|
|
7842
7842
|
}
|
|
7843
7843
|
/**
|
|
7844
7844
|
* Invoke this from an `onMomentumScrollBegin` event.
|
|
7845
7845
|
*/
|
|
7846
|
-
scrollResponderHandleMomentumScrollBegin(
|
|
7847
|
-
this.lastMomentumScrollBeginTime = Date.now(), this.props.onMomentumScrollBegin && this.props.onMomentumScrollBegin(
|
|
7846
|
+
scrollResponderHandleMomentumScrollBegin(e) {
|
|
7847
|
+
this.lastMomentumScrollBeginTime = Date.now(), this.props.onMomentumScrollBegin && this.props.onMomentumScrollBegin(e);
|
|
7848
7848
|
}
|
|
7849
7849
|
/**
|
|
7850
7850
|
* Invoke this from an `onMomentumScrollEnd` event.
|
|
7851
7851
|
*/
|
|
7852
|
-
scrollResponderHandleMomentumScrollEnd(
|
|
7853
|
-
this.lastMomentumScrollEndTime = Date.now(), this.props.onMomentumScrollEnd && this.props.onMomentumScrollEnd(
|
|
7852
|
+
scrollResponderHandleMomentumScrollEnd(e) {
|
|
7853
|
+
this.lastMomentumScrollEndTime = Date.now(), this.props.onMomentumScrollEnd && this.props.onMomentumScrollEnd(e);
|
|
7854
7854
|
}
|
|
7855
7855
|
/**
|
|
7856
7856
|
* Invoke this from an `onTouchStart` event.
|
|
@@ -7863,8 +7863,8 @@ class ScrollView2 extends React.Component {
|
|
|
7863
7863
|
*
|
|
7864
7864
|
* @param {SyntheticEvent} e Touch Start event.
|
|
7865
7865
|
*/
|
|
7866
|
-
scrollResponderHandleTouchStart(
|
|
7867
|
-
this.isTouching = true, this.props.onTouchStart && this.props.onTouchStart(
|
|
7866
|
+
scrollResponderHandleTouchStart(e) {
|
|
7867
|
+
this.isTouching = true, this.props.onTouchStart && this.props.onTouchStart(e);
|
|
7868
7868
|
}
|
|
7869
7869
|
/**
|
|
7870
7870
|
* Invoke this from an `onTouchMove` event.
|
|
@@ -7877,11 +7877,11 @@ class ScrollView2 extends React.Component {
|
|
|
7877
7877
|
*
|
|
7878
7878
|
* @param {SyntheticEvent} e Touch Start event.
|
|
7879
7879
|
*/
|
|
7880
|
-
scrollResponderHandleTouchMove(
|
|
7881
|
-
this.props.onTouchMove && this.props.onTouchMove(
|
|
7880
|
+
scrollResponderHandleTouchMove(e) {
|
|
7881
|
+
this.props.onTouchMove && this.props.onTouchMove(e);
|
|
7882
7882
|
}
|
|
7883
|
-
scrollResponderHandleTerminate(
|
|
7884
|
-
this.props.onResponderTerminate && this.props.onResponderTerminate(
|
|
7883
|
+
scrollResponderHandleTerminate(e) {
|
|
7884
|
+
this.props.onResponderTerminate && this.props.onResponderTerminate(e);
|
|
7885
7885
|
}
|
|
7886
7886
|
/**
|
|
7887
7887
|
* A helper function for this class that lets us quickly determine if the
|
|
@@ -7896,8 +7896,8 @@ class ScrollView2 extends React.Component {
|
|
|
7896
7896
|
*/
|
|
7897
7897
|
scrollResponderFlashScrollIndicators() {
|
|
7898
7898
|
}
|
|
7899
|
-
scrollResponderTextInputFocusError(
|
|
7900
|
-
console.error("Error measuring text field: ",
|
|
7899
|
+
scrollResponderTextInputFocusError(e) {
|
|
7900
|
+
console.error("Error measuring text field: ", e);
|
|
7901
7901
|
}
|
|
7902
7902
|
}
|
|
7903
7903
|
const commonStyle = {
|
|
@@ -8015,8 +8015,8 @@ const pickProps$1 = (props) => pick(props, forwardPropsListText), Text$2 = React
|
|
|
8015
8015
|
onStartShouldSetResponder,
|
|
8016
8016
|
onStartShouldSetResponderCapture
|
|
8017
8017
|
});
|
|
8018
|
-
const handleClick = React__namespace.useCallback((
|
|
8019
|
-
onClick != null ? onClick(
|
|
8018
|
+
const handleClick = React__namespace.useCallback((e) => {
|
|
8019
|
+
onClick != null ? onClick(e) : onPress != null && (e.stopPropagation(), onPress(e));
|
|
8020
8020
|
}, [onClick, onPress]);
|
|
8021
8021
|
let component = hasTextAncestor ? "span" : "div";
|
|
8022
8022
|
const langDirection = props.lang != null ? getLocaleDirection(props.lang) : null, componentDirection = props.dir || langDirection, supportedProps = pickProps$1(rest);
|
|
@@ -8102,7 +8102,7 @@ const isSelectionStale = (node, selection) => {
|
|
|
8102
8102
|
} = selection;
|
|
8103
8103
|
try {
|
|
8104
8104
|
node.setSelectionRange(start, end || start);
|
|
8105
|
-
} catch (
|
|
8105
|
+
} catch (e) {
|
|
8106
8106
|
}
|
|
8107
8107
|
}
|
|
8108
8108
|
}, forwardPropsList = Object.assign({}, forwardedProps.defaultProps, forwardedProps.accessibilityProps, forwardedProps.clickProps, forwardedProps.focusProps, forwardedProps.keyboardProps, forwardedProps.mouseProps, forwardedProps.touchProps, forwardedProps.styleProps, {
|
|
@@ -8227,37 +8227,37 @@ const TextInput = React__namespace.forwardRef((props, forwardedRef) => {
|
|
|
8227
8227
|
hostNode != null && (hostNode.value = "");
|
|
8228
8228
|
}, hostNode.isFocused = () => hostNode != null && TextInputState.currentlyFocusedField() === hostNode, handleContentSizeChange(hostNode));
|
|
8229
8229
|
}, [handleContentSizeChange]);
|
|
8230
|
-
function handleBlur(
|
|
8231
|
-
TextInputState._currentlyFocusedNode = null, onBlur && (
|
|
8230
|
+
function handleBlur(e) {
|
|
8231
|
+
TextInputState._currentlyFocusedNode = null, onBlur && (e.nativeEvent.text = e.target.value, onBlur(e));
|
|
8232
8232
|
}
|
|
8233
|
-
function handleChange(
|
|
8234
|
-
const hostNode =
|
|
8235
|
-
|
|
8233
|
+
function handleChange(e) {
|
|
8234
|
+
const hostNode = e.target, text = hostNode.value;
|
|
8235
|
+
e.nativeEvent.text = text, handleContentSizeChange(hostNode), onChange && onChange(e), onChangeText && onChangeText(text);
|
|
8236
8236
|
}
|
|
8237
|
-
function handleFocus(
|
|
8238
|
-
const hostNode =
|
|
8239
|
-
onFocus && (
|
|
8237
|
+
function handleFocus(e) {
|
|
8238
|
+
const hostNode = e.target;
|
|
8239
|
+
onFocus && (e.nativeEvent.text = hostNode.value, onFocus(e)), hostNode != null && (TextInputState._currentlyFocusedNode = hostNode, clearTextOnFocus && (hostNode.value = ""), selectTextOnFocus && (focusTimeout != null && clearTimeout(focusTimeout), focusTimeout = setTimeout(() => {
|
|
8240
8240
|
hostNode == null ? void 0 : hostNode.select();
|
|
8241
8241
|
}, 0)));
|
|
8242
8242
|
}
|
|
8243
|
-
function handleKeyDown(
|
|
8244
|
-
const hostNode =
|
|
8245
|
-
|
|
8246
|
-
const shouldBlurOnSubmit = blurOnSubmit != null ? blurOnSubmit : !multiline, nativeEvent =
|
|
8247
|
-
onKeyPress && onKeyPress(
|
|
8248
|
-
!isComposing && !
|
|
8243
|
+
function handleKeyDown(e) {
|
|
8244
|
+
const hostNode = e.target;
|
|
8245
|
+
e.stopPropagation();
|
|
8246
|
+
const shouldBlurOnSubmit = blurOnSubmit != null ? blurOnSubmit : !multiline, nativeEvent = e.nativeEvent, isComposing = isEventComposing(nativeEvent);
|
|
8247
|
+
onKeyPress && onKeyPress(e), e.key === "Enter" && !e.shiftKey && // Do not call submit if composition is occuring.
|
|
8248
|
+
!isComposing && !e.isDefaultPrevented() && ((blurOnSubmit || !multiline) && onSubmitEditing && (e.preventDefault(), nativeEvent.text = e.target.value, onSubmitEditing(e)), shouldBlurOnSubmit && hostNode != null && setTimeout(() => hostNode.blur(), 0));
|
|
8249
8249
|
}
|
|
8250
|
-
function handleSelectionChange(
|
|
8250
|
+
function handleSelectionChange(e) {
|
|
8251
8251
|
if (onSelectionChange) try {
|
|
8252
|
-
const node =
|
|
8252
|
+
const node = e.target, {
|
|
8253
8253
|
selectionStart,
|
|
8254
8254
|
selectionEnd
|
|
8255
8255
|
} = node;
|
|
8256
|
-
|
|
8256
|
+
e.nativeEvent.selection = {
|
|
8257
8257
|
start: selectionStart,
|
|
8258
8258
|
end: selectionEnd
|
|
8259
|
-
},
|
|
8260
|
-
} catch (
|
|
8259
|
+
}, e.nativeEvent.text = e.target.value, onSelectionChange(e);
|
|
8260
|
+
} catch (e2) {
|
|
8261
8261
|
}
|
|
8262
8262
|
}
|
|
8263
8263
|
useIsomorphicLayoutEffect$1(() => {
|
|
@@ -8408,7 +8408,7 @@ var matchMediaImpl = matchMediaFallback, matchMedia$1 = function() {
|
|
|
8408
8408
|
};
|
|
8409
8409
|
function matchMediaFallback(query2) {
|
|
8410
8410
|
return !process.env.IS_STATIC && false, {
|
|
8411
|
-
match: function(a,
|
|
8411
|
+
match: function(a, b) {
|
|
8412
8412
|
return false;
|
|
8413
8413
|
},
|
|
8414
8414
|
addListener: function() {
|
|
@@ -9551,12 +9551,32 @@ __spreadValues({}, stylePropsAll);
|
|
|
9551
9551
|
function normalizeValueWithProperty(value) {
|
|
9552
9552
|
return value;
|
|
9553
9553
|
}
|
|
9554
|
-
var _loop
|
|
9554
|
+
var _loop = function(parent) {
|
|
9555
9555
|
var _exec, _exec_index, prefix = parent.slice(0, (_exec_index = (_exec = /[A-Z]/.exec(parent)) === null || _exec === void 0 ? void 0 : _exec.index) !== null && _exec_index !== void 0 ? _exec_index : parent.length);
|
|
9556
|
-
|
|
9556
|
+
EXPANSIONS[parent] = EXPANSIONS[parent].map(function(k) {
|
|
9557
9557
|
return `${prefix}${k}`;
|
|
9558
9558
|
});
|
|
9559
|
-
}
|
|
9559
|
+
};
|
|
9560
|
+
function expandStyle(key, value) {
|
|
9561
|
+
if (isAndroid && key === "elevationAndroid") return [["elevation", value]];
|
|
9562
|
+
switch (key) {
|
|
9563
|
+
case "objectFit": {
|
|
9564
|
+
var resizeMode = resizeModeMap[value] || "cover";
|
|
9565
|
+
return [["resizeMode", resizeMode]];
|
|
9566
|
+
}
|
|
9567
|
+
case "verticalAlign":
|
|
9568
|
+
return [["textAlignVertical", verticalAlignMap[value] || "auto"]];
|
|
9569
|
+
case "position":
|
|
9570
|
+
return value === "fixed" || value === "sticky" ? [["position", "absolute"]] : void 0;
|
|
9571
|
+
}
|
|
9572
|
+
if (key in nativeExpansions) return nativeExpansions[key].map(function(k) {
|
|
9573
|
+
return [k, value];
|
|
9574
|
+
});
|
|
9575
|
+
if (key in EXPANSIONS) return EXPANSIONS[key].map(function(k) {
|
|
9576
|
+
return [k, value];
|
|
9577
|
+
});
|
|
9578
|
+
}
|
|
9579
|
+
var resizeModeMap = {
|
|
9560
9580
|
fill: "stretch",
|
|
9561
9581
|
none: "center",
|
|
9562
9582
|
"scale-down": "contain",
|
|
@@ -9567,78 +9587,7 @@ var _loop$1 = function(parent) {
|
|
|
9567
9587
|
middle: "center",
|
|
9568
9588
|
bottom: "bottom",
|
|
9569
9589
|
auto: "auto"
|
|
9570
|
-
},
|
|
9571
|
-
objectFit: function(val) {
|
|
9572
|
-
var resizeMode = resizeModeMap[val] || "cover";
|
|
9573
|
-
return [["resizeMode", resizeMode]];
|
|
9574
|
-
},
|
|
9575
|
-
verticalAlign: function(val) {
|
|
9576
|
-
return [["textAlignVertical", verticalAlignMap[val] || "auto"]];
|
|
9577
|
-
}
|
|
9578
|
-
}, vert$1 = ["Top", "Bottom"], es = ["End", "Start"], t = ["Top"], b = ["Bottom"], s = ["Start"], e = ["End"], h = ["Height"], w = ["Width"], expansionsNoPrefix = {
|
|
9579
|
-
borderBlockColor: ["TopColor", "BottomColor"],
|
|
9580
|
-
borderInlineColor: ["EndColor", "StartColor"],
|
|
9581
|
-
borderBlockWidth: ["TopWidth", "BottomWidth"],
|
|
9582
|
-
borderInlineWidth: ["EndWidth", "StartWidth"],
|
|
9583
|
-
borderBlockStyle: ["TopStyle", "BottomStyle"],
|
|
9584
|
-
borderInlineStyle: ["EndStyle", "StartStyle"],
|
|
9585
|
-
marginBlock: vert$1,
|
|
9586
|
-
marginInline: es,
|
|
9587
|
-
paddingBlock: vert$1,
|
|
9588
|
-
paddingInline: es,
|
|
9589
|
-
borderBlockStartColor: ["TopColor"],
|
|
9590
|
-
borderBlockEndColor: ["BottomColor"],
|
|
9591
|
-
borderInlineStartColor: ["StartColor"],
|
|
9592
|
-
borderInlineEndColor: ["EndColor"],
|
|
9593
|
-
borderBlockStartWidth: ["TopWidth"],
|
|
9594
|
-
borderBlockEndWidth: ["BottomWidth"],
|
|
9595
|
-
borderInlineStartWidth: ["StartWidth"],
|
|
9596
|
-
borderInlineEndWidth: ["EndWidth"],
|
|
9597
|
-
borderBlockStartStyle: ["TopStyle"],
|
|
9598
|
-
borderBlockEndStyle: ["BottomStyle"],
|
|
9599
|
-
borderInlineStartStyle: ["StartStyle"],
|
|
9600
|
-
borderInlineEndStyle: ["EndStyle"],
|
|
9601
|
-
marginBlockStart: t,
|
|
9602
|
-
marginBlockEnd: b,
|
|
9603
|
-
marginInlineStart: s,
|
|
9604
|
-
marginInlineEnd: e,
|
|
9605
|
-
paddingBlockStart: t,
|
|
9606
|
-
paddingBlockEnd: b,
|
|
9607
|
-
paddingInlineStart: s,
|
|
9608
|
-
paddingInlineEnd: e,
|
|
9609
|
-
minBlockSize: h,
|
|
9610
|
-
maxBlockSize: h,
|
|
9611
|
-
minInlineSize: w,
|
|
9612
|
-
maxInlineSize: w
|
|
9613
|
-
};
|
|
9614
|
-
for (var parent$1 in expansionsNoPrefix) _loop$1(parent$1);
|
|
9615
|
-
var expansions = {
|
|
9616
|
-
inset: ["top", "right", "bottom", "left"],
|
|
9617
|
-
insetBlock: ["top", "bottom"],
|
|
9618
|
-
insetBlockStart: ["top"],
|
|
9619
|
-
insetBlockEnd: ["bottom"],
|
|
9620
|
-
insetInlineStart: ["left"],
|
|
9621
|
-
insetInlineEnd: ["right"],
|
|
9622
|
-
blockSize: ["height"],
|
|
9623
|
-
inlineSize: ["width"]
|
|
9624
|
-
}, webToNativeExpansion = Object.assign(expansionsNoPrefix, expansions);
|
|
9625
|
-
var _loop = function(parent) {
|
|
9626
|
-
var _exec, _exec_index, prefix = parent.slice(0, (_exec_index = (_exec = /[A-Z]/.exec(parent)) === null || _exec === void 0 ? void 0 : _exec.index) !== null && _exec_index !== void 0 ? _exec_index : parent.length);
|
|
9627
|
-
EXPANSIONS[parent] = EXPANSIONS[parent].map(function(k) {
|
|
9628
|
-
return `${prefix}${k}`;
|
|
9629
|
-
});
|
|
9630
|
-
};
|
|
9631
|
-
function expandStyle(key, value) {
|
|
9632
|
-
if (isAndroid && key === "elevationAndroid") return [["elevation", value]];
|
|
9633
|
-
if (key in EXPANSIONS) return EXPANSIONS[key].map(function(key2) {
|
|
9634
|
-
return [key2, value];
|
|
9635
|
-
});
|
|
9636
|
-
if (key in webToNativeExpansion) return webToNativeExpansion[key].map(function(key2) {
|
|
9637
|
-
return [key2, value];
|
|
9638
|
-
});
|
|
9639
|
-
if (key in webToNativeDynamicExpansion) return webToNativeDynamicExpansion[key](value);
|
|
9640
|
-
}
|
|
9641
|
-
var all = ["Top", "Right", "Bottom", "Left"], horiz = ["Right", "Left"], vert = ["Top", "Bottom"], EXPANSIONS = {
|
|
9590
|
+
}, all = ["Top", "Right", "Bottom", "Left"], horiz = ["Right", "Left"], vert = ["Top", "Bottom"], EXPANSIONS = __spreadValues({
|
|
9642
9591
|
borderColor: ["TopColor", "RightColor", "BottomColor", "LeftColor"],
|
|
9643
9592
|
borderRadius: ["TopLeftRadius", "TopRightRadius", "BottomRightRadius", "BottomLeftRadius"],
|
|
9644
9593
|
borderWidth: ["TopWidth", "RightWidth", "BottomWidth", "LeftWidth"],
|
|
@@ -9648,8 +9597,56 @@ var all = ["Top", "Right", "Bottom", "Left"], horiz = ["Right", "Left"], vert =
|
|
|
9648
9597
|
padding: all,
|
|
9649
9598
|
paddingHorizontal: horiz,
|
|
9650
9599
|
paddingVertical: vert
|
|
9651
|
-
};
|
|
9600
|
+
}, isWeb);
|
|
9652
9601
|
for (var parent in EXPANSIONS) _loop(parent);
|
|
9602
|
+
var nativeExpansions = {
|
|
9603
|
+
// logical border properties
|
|
9604
|
+
borderBlockColor: ["borderTopColor", "borderBottomColor"],
|
|
9605
|
+
borderInlineColor: ["borderEndColor", "borderStartColor"],
|
|
9606
|
+
borderBlockWidth: ["borderTopWidth", "borderBottomWidth"],
|
|
9607
|
+
borderInlineWidth: ["borderEndWidth", "borderStartWidth"],
|
|
9608
|
+
borderBlockStyle: ["borderTopStyle", "borderBottomStyle"],
|
|
9609
|
+
borderInlineStyle: ["borderEndStyle", "borderStartStyle"],
|
|
9610
|
+
borderBlockStartColor: ["borderTopColor"],
|
|
9611
|
+
borderBlockEndColor: ["borderBottomColor"],
|
|
9612
|
+
borderInlineStartColor: ["borderStartColor"],
|
|
9613
|
+
borderInlineEndColor: ["borderEndColor"],
|
|
9614
|
+
borderBlockStartWidth: ["borderTopWidth"],
|
|
9615
|
+
borderBlockEndWidth: ["borderBottomWidth"],
|
|
9616
|
+
borderInlineStartWidth: ["borderStartWidth"],
|
|
9617
|
+
borderInlineEndWidth: ["borderEndWidth"],
|
|
9618
|
+
borderBlockStartStyle: ["borderTopStyle"],
|
|
9619
|
+
borderBlockEndStyle: ["borderBottomStyle"],
|
|
9620
|
+
borderInlineStartStyle: ["borderStartStyle"],
|
|
9621
|
+
borderInlineEndStyle: ["borderEndStyle"],
|
|
9622
|
+
// logical margin/padding
|
|
9623
|
+
marginBlock: ["marginTop", "marginBottom"],
|
|
9624
|
+
marginInline: ["marginEnd", "marginStart"],
|
|
9625
|
+
paddingBlock: ["paddingTop", "paddingBottom"],
|
|
9626
|
+
paddingInline: ["paddingEnd", "paddingStart"],
|
|
9627
|
+
marginBlockStart: ["marginTop"],
|
|
9628
|
+
marginBlockEnd: ["marginBottom"],
|
|
9629
|
+
marginInlineStart: ["marginStart"],
|
|
9630
|
+
marginInlineEnd: ["marginEnd"],
|
|
9631
|
+
paddingBlockStart: ["paddingTop"],
|
|
9632
|
+
paddingBlockEnd: ["paddingBottom"],
|
|
9633
|
+
paddingInlineStart: ["paddingStart"],
|
|
9634
|
+
paddingInlineEnd: ["paddingEnd"],
|
|
9635
|
+
// logical sizing
|
|
9636
|
+
minBlockSize: ["minHeight"],
|
|
9637
|
+
maxBlockSize: ["maxHeight"],
|
|
9638
|
+
minInlineSize: ["minWidth"],
|
|
9639
|
+
maxInlineSize: ["maxWidth"],
|
|
9640
|
+
blockSize: ["height"],
|
|
9641
|
+
inlineSize: ["width"],
|
|
9642
|
+
// inset
|
|
9643
|
+
inset: ["top", "right", "bottom", "left"],
|
|
9644
|
+
insetBlock: ["top", "bottom"],
|
|
9645
|
+
insetBlockStart: ["top"],
|
|
9646
|
+
insetBlockEnd: ["bottom"],
|
|
9647
|
+
insetInlineStart: ["left"],
|
|
9648
|
+
insetInlineEnd: ["right"]
|
|
9649
|
+
};
|
|
9653
9650
|
var cache$1 = /* @__PURE__ */ new WeakMap(), getVariantExtras = function(styleState) {
|
|
9654
9651
|
if (cache$1.has(styleState)) return cache$1.get(styleState);
|
|
9655
9652
|
var {
|
|
@@ -9816,9 +9813,9 @@ var propMapper = function(key, value, styleState, disabled, map) {
|
|
|
9816
9813
|
}
|
|
9817
9814
|
styleProps2.disableExpandShorthands || key in conf2.shorthands && (key = conf2.shorthands[key]);
|
|
9818
9815
|
var originalValue = value;
|
|
9819
|
-
if (value != null && (typeof value == "string" && value[0] === "$" ? value = getTokenForKey(key, value, styleProps2, styleState) : (key === "boxShadow" || key === "filter") && typeof value == "string" && value.includes("$") ? value = value.replace(/(\$[\w.-]+)/g, function(
|
|
9820
|
-
var r = getTokenForKey("size",
|
|
9821
|
-
return r == null && (r = getTokenForKey("color",
|
|
9816
|
+
if (value != null && (typeof value == "string" && value[0] === "$" ? value = getTokenForKey(key, value, styleProps2, styleState) : (key === "boxShadow" || key === "filter") && typeof value == "string" && value.includes("$") ? value = value.replace(/(\$[\w.-]+)/g, function(t) {
|
|
9817
|
+
var r = getTokenForKey("size", t, styleProps2, styleState);
|
|
9818
|
+
return r == null && (r = getTokenForKey("color", t, styleProps2, styleState)), r != null ? String(r) : t;
|
|
9822
9819
|
}) : isVariable(value) ? value = resolveVariableValue(key, value, styleProps2.resolveValues) : isRemValue(value) && (value = resolveRem(value))), value != null) {
|
|
9823
9820
|
key === "fontFamily" && lastFontFamilyToken && (styleState.fontFamily = lastFontFamilyToken);
|
|
9824
9821
|
var expanded = styleProps2.noExpand ? null : expandStyle(key, value);
|
|
@@ -10044,8 +10041,8 @@ function resolveVariableValue(key, valOrVar, resolveValues) {
|
|
|
10044
10041
|
}
|
|
10045
10042
|
return valOrVar;
|
|
10046
10043
|
}
|
|
10047
|
-
var sortString = function(a,
|
|
10048
|
-
return a <
|
|
10044
|
+
var sortString = function(a, b) {
|
|
10045
|
+
return a < b ? -1 : a > b ? 1 : 0;
|
|
10049
10046
|
};
|
|
10050
10047
|
function transformsToString(transforms) {
|
|
10051
10048
|
return transforms.map(
|
|
@@ -10367,8 +10364,8 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
10367
10364
|
};
|
|
10368
10365
|
function mergeFlatTransforms(target, flatTransforms) {
|
|
10369
10366
|
Object.entries(flatTransforms).sort(function(param, param1) {
|
|
10370
|
-
var [a] = param, [
|
|
10371
|
-
return sortString(a,
|
|
10367
|
+
var [a] = param, [b] = param1;
|
|
10368
|
+
return sortString(a, b);
|
|
10372
10369
|
}).forEach(function(param) {
|
|
10373
10370
|
var [key, val] = param;
|
|
10374
10371
|
mergeTransform(target, key, val, true);
|
|
@@ -10452,8 +10449,8 @@ var getSubStyle = function(styleState, subKey, styleIn, avoidMergeTransform) {
|
|
|
10452
10449
|
} else flatTransforms && mergeFlatTransforms(styleOut, flatTransforms);
|
|
10453
10450
|
}
|
|
10454
10451
|
return styleProps2.noNormalize || fixStyles(styleOut), originalValues && styleOriginalValues.set(styleOut, originalValues), styleOut;
|
|
10455
|
-
}, useSplitStyles = function(a,
|
|
10456
|
-
var res = getSplitStyles(a,
|
|
10452
|
+
}, useSplitStyles = function(a, b, c, d, e, f, g, h, i, j, k, l) {
|
|
10453
|
+
var res = getSplitStyles(a, b, c, d, e, f, g, h, i, j, k, l);
|
|
10457
10454
|
return res;
|
|
10458
10455
|
};
|
|
10459
10456
|
var defaultColor = process.env.TAMAGUI_DEFAULT_COLOR || "rgba(0,0,0,0)", animatableDefaults = __spreadProps(__spreadValues({}, Object.fromEntries(Object.entries(tokenCategories.color).map(function(param) {
|
|
@@ -10608,7 +10605,7 @@ var Theme = /* @__PURE__ */ React.forwardRef(function(props, ref) {
|
|
|
10608
10605
|
React.Children.only(finalChildren), finalChildren = /* @__PURE__ */ React.cloneElement(finalChildren, {
|
|
10609
10606
|
ref
|
|
10610
10607
|
});
|
|
10611
|
-
} catch (
|
|
10608
|
+
} catch (e) {
|
|
10612
10609
|
}
|
|
10613
10610
|
var stateRef = React.useRef({
|
|
10614
10611
|
hasEverThemed: false
|
|
@@ -11121,8 +11118,8 @@ function createComponent(staticConfig) {
|
|
|
11121
11118
|
animations && (animations.ref && (animatedRef = animations.ref), isHydrated && animations && (animationStyles = animations.style, viewProps.style = animationStyles, animations.className && (viewProps.className = `${state.unmounted === "should-enter" ? "t_unmounted " : ""}${viewProps.className || ""} ${animations.className}`)));
|
|
11122
11119
|
}
|
|
11123
11120
|
!isPassthrough && groupContext && // avoids onLayout if we don't need it
|
|
11124
|
-
props.containerType !== "normal" && (nonTamaguiProps.onLayout = composeEventHandlers(nonTamaguiProps.onLayout, function(
|
|
11125
|
-
var _stateRef_current_group, layout =
|
|
11121
|
+
props.containerType !== "normal" && (nonTamaguiProps.onLayout = composeEventHandlers(nonTamaguiProps.onLayout, function(e) {
|
|
11122
|
+
var _stateRef_current_group, layout = e.nativeEvent.layout;
|
|
11126
11123
|
groupContext.state.layout = layout, (_stateRef_current_group = stateRef.current.group) === null || _stateRef_current_group === void 0 || _stateRef_current_group.emit({
|
|
11127
11124
|
layout
|
|
11128
11125
|
}), !stateRef.current.hasMeasured && props.untilMeasured === "hide" && setState(function(prev) {
|
|
@@ -11178,45 +11175,45 @@ function createComponent(staticConfig) {
|
|
|
11178
11175
|
}, [groupContext, groupEmitter, state]);
|
|
11179
11176
|
var runtimePressStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.pressStyle), runtimeFocusStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.focusStyle), runtimeFocusVisibleStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.focusVisibleStyle), attachFocus = !!(runtimePressStyle || runtimeFocusStyle || runtimeFocusVisibleStyle || onFocus || onBlur || componentContext.setParentFocusState), hasDynamicGroupChildren = !!(groupName && state.hasDynGroupChildren), attachPress = !!(hasDynamicGroupChildren || runtimePressStyle || onPress || onPressOut || onPressIn || onMouseDown || onMouseUp || onLongPress || onClick || (pseudos == null ? void 0 : pseudos.focusVisibleStyle)), runtimeHoverStyle = !disabled && noClass && (pseudos == null ? void 0 : pseudos.hoverStyle), needsHoverState = !!(hasDynamicGroupChildren || runtimeHoverStyle), attachHover = isWeb, shouldAttach = !disabled && !props.asChild && !!(attachFocus || attachPress || attachHover || runtimePressStyle || runtimeHoverStyle || runtimeFocusStyle), needsPressState = !!(hasDynamicGroupChildren || runtimePressStyle);
|
|
11180
11177
|
var events = shouldAttach ? __spreadValues(__spreadValues(__spreadProps(__spreadValues({
|
|
11181
|
-
onPressOut: attachPress ? function(
|
|
11182
|
-
unPress(), onPressOut == null ? void 0 : onPressOut(
|
|
11178
|
+
onPressOut: attachPress ? function(e) {
|
|
11179
|
+
unPress(), onPressOut == null ? void 0 : onPressOut(e), onMouseUp == null ? void 0 : onMouseUp(e);
|
|
11183
11180
|
} : void 0
|
|
11184
11181
|
}, attachPress && {
|
|
11185
|
-
onMouseEnter: function(
|
|
11182
|
+
onMouseEnter: function(e) {
|
|
11186
11183
|
var next = {};
|
|
11187
|
-
needsHoverState && true && (next.hover = true), needsPressState && state.pressIn && (next.press = true), setStateShallow(next), onHoverIn == null ? void 0 : onHoverIn(
|
|
11184
|
+
needsHoverState && true && (next.hover = true), needsPressState && state.pressIn && (next.press = true), setStateShallow(next), onHoverIn == null ? void 0 : onHoverIn(e), onMouseEnter == null ? void 0 : onMouseEnter(e);
|
|
11188
11185
|
},
|
|
11189
|
-
onMouseLeave: function(
|
|
11186
|
+
onMouseLeave: function(e) {
|
|
11190
11187
|
var next = {};
|
|
11191
|
-
needsHoverState && (next.hover = false), needsPressState && (next.press = false, next.pressIn = false), setStateShallow(next), onHoverOut == null ? void 0 : onHoverOut(
|
|
11188
|
+
needsHoverState && (next.hover = false), needsPressState && (next.press = false, next.pressIn = false), setStateShallow(next), onHoverOut == null ? void 0 : onHoverOut(e), onMouseLeave == null ? void 0 : onMouseLeave(e);
|
|
11192
11189
|
}
|
|
11193
11190
|
}), {
|
|
11194
|
-
onPressIn: attachPress ? function(
|
|
11191
|
+
onPressIn: attachPress ? function(e) {
|
|
11195
11192
|
needsPressState && setStateShallow({
|
|
11196
11193
|
press: true,
|
|
11197
11194
|
pressIn: true
|
|
11198
|
-
}), onPressIn == null ? void 0 : onPressIn(
|
|
11195
|
+
}), onPressIn == null ? void 0 : onPressIn(e), onMouseDown == null ? void 0 : onMouseDown(e);
|
|
11199
11196
|
} : void 0,
|
|
11200
|
-
onPress: attachPress ? function(
|
|
11201
|
-
unPress(), onPress == null ? void 0 : onPress(
|
|
11197
|
+
onPress: attachPress ? function(e) {
|
|
11198
|
+
unPress(), onPress == null ? void 0 : onPress(e);
|
|
11202
11199
|
} : void 0
|
|
11203
11200
|
}), attachPress && onLongPress && {
|
|
11204
|
-
onLongPress: function(
|
|
11205
|
-
unPress(), onLongPress == null ? void 0 : onLongPress(
|
|
11201
|
+
onLongPress: function(e) {
|
|
11202
|
+
unPress(), onLongPress == null ? void 0 : onLongPress(e);
|
|
11206
11203
|
}
|
|
11207
11204
|
}), attachFocus && {
|
|
11208
|
-
onFocus: function(
|
|
11205
|
+
onFocus: function(e) {
|
|
11209
11206
|
var next = {};
|
|
11210
|
-
componentContext.setParentFocusState && (next.focusWithin = true), (pseudos == null ? void 0 : pseudos.focusVisibleStyle) && lastInteractionWasKeyboard.value ? next.focusVisible = true : next.focus = true, setStateShallow(next), onFocus == null ? void 0 : onFocus(
|
|
11207
|
+
componentContext.setParentFocusState && (next.focusWithin = true), (pseudos == null ? void 0 : pseudos.focusVisibleStyle) && lastInteractionWasKeyboard.value ? next.focusVisible = true : next.focus = true, setStateShallow(next), onFocus == null ? void 0 : onFocus(e);
|
|
11211
11208
|
},
|
|
11212
|
-
onBlur: function(
|
|
11209
|
+
onBlur: function(e) {
|
|
11213
11210
|
componentContext.setParentFocusState && componentContext.setParentFocusState({
|
|
11214
11211
|
focusWithin: false
|
|
11215
11212
|
}), setStateShallow({
|
|
11216
11213
|
focus: false,
|
|
11217
11214
|
focusVisible: false,
|
|
11218
11215
|
focusWithin: false
|
|
11219
|
-
}), onBlur == null ? void 0 : onBlur(
|
|
11216
|
+
}), onBlur == null ? void 0 : onBlur(e);
|
|
11220
11217
|
}
|
|
11221
11218
|
}) : null;
|
|
11222
11219
|
if (events && !asChild) {
|
|
@@ -11710,8 +11707,8 @@ function getThemesDeduped(themes2, colorTokens) {
|
|
|
11710
11707
|
for (var _iterator = sortedThemeNames[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
|
|
11711
11708
|
var themeName = _step.value, darkOrLightSpecificPrefix = themeName.startsWith("dark") ? "dark" : themeName.startsWith("light") ? "light" : "", rawTheme = themes2[themeName], key = darkOrLightSpecificPrefix + JSON.stringify(rawTheme);
|
|
11712
11709
|
if (existing.has(key)) {
|
|
11713
|
-
var
|
|
11714
|
-
|
|
11710
|
+
var e = existing.get(key);
|
|
11711
|
+
e.names.push(themeName);
|
|
11715
11712
|
continue;
|
|
11716
11713
|
}
|
|
11717
11714
|
var theme = __spreadValues(__spreadValues({}, colorTokens), rawTheme);
|