@tamagui/core 2.0.0-rc.30 → 2.0.0-rc.31
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 +64 -19
- package/dist/test.native.cjs +62 -17
- package/package.json +10 -10
- package/dist/cjs/index.js +0 -100
- package/dist/cjs/index.js.map +0 -6
package/dist/native.cjs
CHANGED
|
@@ -8441,21 +8441,62 @@ var defaultComponentState = {
|
|
|
8441
8441
|
}), defaultComponentStateShouldEnter = __spreadProps(__spreadValues({}, defaultComponentState), {
|
|
8442
8442
|
unmounted: "should-enter"
|
|
8443
8443
|
});
|
|
8444
|
-
var
|
|
8445
|
-
onBlur: true,
|
|
8446
|
-
onFocus: true
|
|
8447
|
-
}, emptyConfig = {}, usePressability = null;
|
|
8444
|
+
var DEFAULT_LONG_PRESS_DELAY = 500, DEFAULT_MIN_PRESS_DURATION = 130;
|
|
8448
8445
|
function useMainThreadPressEvents(events, viewProps) {
|
|
8449
|
-
var enabled = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : true;
|
|
8450
|
-
|
|
8451
|
-
|
|
8452
|
-
|
|
8453
|
-
|
|
8454
|
-
|
|
8455
|
-
|
|
8456
|
-
|
|
8457
|
-
|
|
8458
|
-
|
|
8446
|
+
var enabled = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : true, ref = React.useRef(null);
|
|
8447
|
+
if (ref.current || (ref.current = {
|
|
8448
|
+
state: "idle",
|
|
8449
|
+
pressInTimer: null,
|
|
8450
|
+
pressOutTimer: null,
|
|
8451
|
+
longPressTimer: null,
|
|
8452
|
+
activateTime: 0
|
|
8453
|
+
}), !enabled || !events) return;
|
|
8454
|
+
var _events_delayPressIn, delayPressIn = Math.max(0, (_events_delayPressIn = events.delayPressIn) !== null && _events_delayPressIn !== void 0 ? _events_delayPressIn : 0), _events_delayPressOut, delayPressOut = Math.max(0, (_events_delayPressOut = events.delayPressOut) !== null && _events_delayPressOut !== void 0 ? _events_delayPressOut : 0), _events_delayLongPress, delayLongPress = Math.max(0, (_events_delayLongPress = events.delayLongPress) !== null && _events_delayLongPress !== void 0 ? _events_delayLongPress : DEFAULT_LONG_PRESS_DELAY), _events_minPressDuration, minPressDuration = Math.max(0, (_events_minPressDuration = events.minPressDuration) !== null && _events_minPressDuration !== void 0 ? _events_minPressDuration : DEFAULT_MIN_PRESS_DURATION);
|
|
8455
|
+
function activate(e) {
|
|
8456
|
+
var _events_onPressIn;
|
|
8457
|
+
ref.current.state = "active", ref.current.activateTime = Date.now(), (_events_onPressIn = events.onPressIn) === null || _events_onPressIn === void 0 || _events_onPressIn.call(events, e);
|
|
8458
|
+
}
|
|
8459
|
+
function deactivate(e) {
|
|
8460
|
+
var pressDuration = Date.now() - ref.current.activateTime, remaining = Math.max(minPressDuration - pressDuration, delayPressOut);
|
|
8461
|
+
if (remaining > 0) ref.current.pressOutTimer = setTimeout(function() {
|
|
8462
|
+
var _events_onPressOut2;
|
|
8463
|
+
(_events_onPressOut2 = events.onPressOut) === null || _events_onPressOut2 === void 0 || _events_onPressOut2.call(events, e);
|
|
8464
|
+
}, remaining);
|
|
8465
|
+
else {
|
|
8466
|
+
var _events_onPressOut;
|
|
8467
|
+
(_events_onPressOut = events.onPressOut) === null || _events_onPressOut === void 0 || _events_onPressOut.call(events, e);
|
|
8468
|
+
}
|
|
8469
|
+
}
|
|
8470
|
+
function cleanup() {
|
|
8471
|
+
ref.current.pressInTimer && clearTimeout(ref.current.pressInTimer), ref.current.pressOutTimer && clearTimeout(ref.current.pressOutTimer), ref.current.longPressTimer && clearTimeout(ref.current.longPressTimer), ref.current.pressInTimer = null, ref.current.pressOutTimer = null, ref.current.longPressTimer = null;
|
|
8472
|
+
}
|
|
8473
|
+
viewProps.onStartShouldSetResponder = function() {
|
|
8474
|
+
return !events.disabled;
|
|
8475
|
+
}, viewProps.onResponderGrant = function(e) {
|
|
8476
|
+
cleanup(), ref.current.state = "pressing", delayPressIn > 0 ? ref.current.pressInTimer = setTimeout(function() {
|
|
8477
|
+
return activate(e);
|
|
8478
|
+
}, delayPressIn) : activate(e), events.onLongPress && (ref.current.longPressTimer = setTimeout(function() {
|
|
8479
|
+
if (ref.current.state === "active") {
|
|
8480
|
+
var _events_onLongPress;
|
|
8481
|
+
ref.current.state = "longPressed", (_events_onLongPress = events.onLongPress) === null || _events_onLongPress === void 0 || _events_onLongPress.call(events, e);
|
|
8482
|
+
}
|
|
8483
|
+
}, delayLongPress + delayPressIn));
|
|
8484
|
+
}, viewProps.onResponderRelease = function(e) {
|
|
8485
|
+
ref.current.state === "active";
|
|
8486
|
+
var wasLongPressed = ref.current.state === "longPressed";
|
|
8487
|
+
if (cleanup(), ref.current.state === "pressing" && activate(e), !wasLongPressed) {
|
|
8488
|
+
var _events_onPress;
|
|
8489
|
+
(_events_onPress = events.onPress) === null || _events_onPress === void 0 || _events_onPress.call(events, e);
|
|
8490
|
+
}
|
|
8491
|
+
deactivate(e), ref.current.state = "idle";
|
|
8492
|
+
}, viewProps.onResponderTerminate = function(e) {
|
|
8493
|
+
cleanup(), (ref.current.state === "active" || ref.current.state === "longPressed") && deactivate(e), ref.current.state = "idle";
|
|
8494
|
+
}, viewProps.onResponderTerminationRequest = function() {
|
|
8495
|
+
return events.cancelable !== false;
|
|
8496
|
+
}, viewProps.onResponderMove = function(e) {
|
|
8497
|
+
var _events_onPressMove;
|
|
8498
|
+
(_events_onPressMove = events.onPressMove) === null || _events_onPressMove === void 0 || _events_onPressMove.call(events, e);
|
|
8499
|
+
};
|
|
8459
8500
|
}
|
|
8460
8501
|
function useEvents(events, viewProps, stateRef, staticConfig, isHOC, isInsideNativeMenu) {
|
|
8461
8502
|
events && (events.onFocus && (viewProps.onFocus = events.onFocus), events.onBlur && (viewProps.onBlur = events.onBlur));
|
|
@@ -9444,7 +9485,8 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
9444
9485
|
}
|
|
9445
9486
|
}
|
|
9446
9487
|
if (keyInit in skipProps && !noSkip && !isHOC) {
|
|
9447
|
-
|
|
9488
|
+
var _driver_animations;
|
|
9489
|
+
if (!(keyInit === "transition" && typeof valInit == "string" && !(!(driver == null || (_driver_animations = driver.animations) === null || _driver_animations === void 0) && _driver_animations[valInit]))) return "continue";
|
|
9448
9490
|
}
|
|
9449
9491
|
var isValidStyleKeyInit = isValidStyleKey(keyInit, validStyles$1, accept);
|
|
9450
9492
|
if (!isValidStyleKeyInit) {
|
|
@@ -9459,7 +9501,10 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
9459
9501
|
var shouldPassProp = !isStyleProp && isHOC || // is in parent variants
|
|
9460
9502
|
isHOC && parentVariants && keyInit in parentVariants || (inlineProps == null ? void 0 : inlineProps.has(keyInit)), parentVariant = parentVariants == null ? void 0 : parentVariants[keyInit], isHOCShouldPassThrough = !!(isHOC && (isValidStyleKeyInit || isMediaOrPseudo || parentVariant || keyInit in skipProps)), shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
|
|
9461
9503
|
if (shouldPassThrough && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo), !isVariant)) return "continue";
|
|
9462
|
-
if (!noSkip
|
|
9504
|
+
if (!noSkip) {
|
|
9505
|
+
var _driver_animations1;
|
|
9506
|
+
if (keyInit in skipProps && !(keyInit === "transition" && typeof valInit == "string" && !(!(driver == null || (_driver_animations1 = driver.animations) === null || _driver_animations1 === void 0) && _driver_animations1[valInit]))) return "continue";
|
|
9507
|
+
}
|
|
9463
9508
|
(isText || isInput) && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit);
|
|
9464
9509
|
var disablePropMap = isMediaOrPseudo || !isStyleLikeKey;
|
|
9465
9510
|
if (propMapper(keyInit, valInit, styleState, disablePropMap, function(key5, val2, originalVal) {
|
|
@@ -9777,17 +9822,17 @@ var getSubStyle = function(styleState, subKey, styleIn, avoidMergeTransform) {
|
|
|
9777
9822
|
var _loop2 = function(key1) {
|
|
9778
9823
|
var val = styleIn[key1];
|
|
9779
9824
|
if (key1 = conf2.shorthands[key1] || key1, key1 === "transition") {
|
|
9780
|
-
var _styleState;
|
|
9825
|
+
var _driver_animations, _styleState;
|
|
9781
9826
|
(_styleState = styleState).pseudoTransitions || (_styleState.pseudoTransitions = {}), styleState.pseudoTransitions[subKey] = val;
|
|
9782
9827
|
var driver = styleState.animationDriver;
|
|
9783
9828
|
if ((driver == null ? void 0 : driver.outputStyle) === "css") {
|
|
9784
|
-
var
|
|
9829
|
+
var _driver_animations1, animationConfig = (_driver_animations1 = driver.animations) === null || _driver_animations1 === void 0 ? void 0 : _driver_animations1[val];
|
|
9785
9830
|
if (animationConfig) {
|
|
9786
9831
|
var important = subKey[0] === "$" ? " !important" : "";
|
|
9787
9832
|
styleOut.transition = `all ${animationConfig}${important}`;
|
|
9788
9833
|
}
|
|
9789
9834
|
}
|
|
9790
|
-
return key = key1, "continue";
|
|
9835
|
+
return !styleOut.transition && typeof val == "string" && !(!(driver == null || (_driver_animations = driver.animations) === null || _driver_animations === void 0) && _driver_animations[val]) && (styleOut.transition = val), key = key1, "continue";
|
|
9791
9836
|
}
|
|
9792
9837
|
var shouldSkip = !staticConfig.isHOC && key1 in skipProps && !styleProps2.noSkip;
|
|
9793
9838
|
if (shouldSkip) return key = key1, "continue";
|
package/dist/test.native.cjs
CHANGED
|
@@ -1466,21 +1466,62 @@ var defaultComponentState = {
|
|
|
1466
1466
|
}), defaultComponentStateShouldEnter = __spreadProps(__spreadValues({}, defaultComponentState), {
|
|
1467
1467
|
unmounted: "should-enter"
|
|
1468
1468
|
});
|
|
1469
|
-
var
|
|
1470
|
-
onBlur: true,
|
|
1471
|
-
onFocus: true
|
|
1472
|
-
}, emptyConfig = {}, usePressability = null;
|
|
1469
|
+
var DEFAULT_LONG_PRESS_DELAY = 500, DEFAULT_MIN_PRESS_DURATION = 130;
|
|
1473
1470
|
function useMainThreadPressEvents(events, viewProps) {
|
|
1474
|
-
var enabled = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : true;
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
|
|
1479
|
-
|
|
1480
|
-
|
|
1481
|
-
|
|
1471
|
+
var enabled = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : true, ref = React.useRef(null);
|
|
1472
|
+
if (ref.current || (ref.current = {
|
|
1473
|
+
state: "idle",
|
|
1474
|
+
pressInTimer: null,
|
|
1475
|
+
pressOutTimer: null,
|
|
1476
|
+
longPressTimer: null,
|
|
1477
|
+
activateTime: 0
|
|
1478
|
+
}), !enabled || !events) return;
|
|
1479
|
+
var _events_delayPressIn, delayPressIn = Math.max(0, (_events_delayPressIn = events.delayPressIn) !== null && _events_delayPressIn !== void 0 ? _events_delayPressIn : 0), _events_delayPressOut, delayPressOut = Math.max(0, (_events_delayPressOut = events.delayPressOut) !== null && _events_delayPressOut !== void 0 ? _events_delayPressOut : 0), _events_delayLongPress, delayLongPress = Math.max(0, (_events_delayLongPress = events.delayLongPress) !== null && _events_delayLongPress !== void 0 ? _events_delayLongPress : DEFAULT_LONG_PRESS_DELAY), _events_minPressDuration, minPressDuration = Math.max(0, (_events_minPressDuration = events.minPressDuration) !== null && _events_minPressDuration !== void 0 ? _events_minPressDuration : DEFAULT_MIN_PRESS_DURATION);
|
|
1480
|
+
function activate(e) {
|
|
1481
|
+
var _events_onPressIn;
|
|
1482
|
+
ref.current.state = "active", ref.current.activateTime = Date.now(), (_events_onPressIn = events.onPressIn) === null || _events_onPressIn === void 0 || _events_onPressIn.call(events, e);
|
|
1483
|
+
}
|
|
1484
|
+
function deactivate(e) {
|
|
1485
|
+
var pressDuration = Date.now() - ref.current.activateTime, remaining = Math.max(minPressDuration - pressDuration, delayPressOut);
|
|
1486
|
+
if (remaining > 0) ref.current.pressOutTimer = setTimeout(function() {
|
|
1487
|
+
var _events_onPressOut2;
|
|
1488
|
+
(_events_onPressOut2 = events.onPressOut) === null || _events_onPressOut2 === void 0 || _events_onPressOut2.call(events, e);
|
|
1489
|
+
}, remaining);
|
|
1490
|
+
else {
|
|
1491
|
+
var _events_onPressOut;
|
|
1492
|
+
(_events_onPressOut = events.onPressOut) === null || _events_onPressOut === void 0 || _events_onPressOut.call(events, e);
|
|
1482
1493
|
}
|
|
1483
1494
|
}
|
|
1495
|
+
function cleanup() {
|
|
1496
|
+
ref.current.pressInTimer && clearTimeout(ref.current.pressInTimer), ref.current.pressOutTimer && clearTimeout(ref.current.pressOutTimer), ref.current.longPressTimer && clearTimeout(ref.current.longPressTimer), ref.current.pressInTimer = null, ref.current.pressOutTimer = null, ref.current.longPressTimer = null;
|
|
1497
|
+
}
|
|
1498
|
+
viewProps.onStartShouldSetResponder = function() {
|
|
1499
|
+
return !events.disabled;
|
|
1500
|
+
}, viewProps.onResponderGrant = function(e) {
|
|
1501
|
+
cleanup(), ref.current.state = "pressing", delayPressIn > 0 ? ref.current.pressInTimer = setTimeout(function() {
|
|
1502
|
+
return activate(e);
|
|
1503
|
+
}, delayPressIn) : activate(e), events.onLongPress && (ref.current.longPressTimer = setTimeout(function() {
|
|
1504
|
+
if (ref.current.state === "active") {
|
|
1505
|
+
var _events_onLongPress;
|
|
1506
|
+
ref.current.state = "longPressed", (_events_onLongPress = events.onLongPress) === null || _events_onLongPress === void 0 || _events_onLongPress.call(events, e);
|
|
1507
|
+
}
|
|
1508
|
+
}, delayLongPress + delayPressIn));
|
|
1509
|
+
}, viewProps.onResponderRelease = function(e) {
|
|
1510
|
+
ref.current.state === "active";
|
|
1511
|
+
var wasLongPressed = ref.current.state === "longPressed";
|
|
1512
|
+
if (cleanup(), ref.current.state === "pressing" && activate(e), !wasLongPressed) {
|
|
1513
|
+
var _events_onPress;
|
|
1514
|
+
(_events_onPress = events.onPress) === null || _events_onPress === void 0 || _events_onPress.call(events, e);
|
|
1515
|
+
}
|
|
1516
|
+
deactivate(e), ref.current.state = "idle";
|
|
1517
|
+
}, viewProps.onResponderTerminate = function(e) {
|
|
1518
|
+
cleanup(), (ref.current.state === "active" || ref.current.state === "longPressed") && deactivate(e), ref.current.state = "idle";
|
|
1519
|
+
}, viewProps.onResponderTerminationRequest = function() {
|
|
1520
|
+
return events.cancelable !== false;
|
|
1521
|
+
}, viewProps.onResponderMove = function(e) {
|
|
1522
|
+
var _events_onPressMove;
|
|
1523
|
+
(_events_onPressMove = events.onPressMove) === null || _events_onPressMove === void 0 || _events_onPressMove.call(events, e);
|
|
1524
|
+
};
|
|
1484
1525
|
}
|
|
1485
1526
|
function useEvents(events, viewProps, stateRef, staticConfig, isHOC, isInsideNativeMenu) {
|
|
1486
1527
|
events && (events.onFocus && (viewProps.onFocus = events.onFocus), events.onBlur && (viewProps.onBlur = events.onBlur));
|
|
@@ -3015,7 +3056,8 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
3015
3056
|
}
|
|
3016
3057
|
}
|
|
3017
3058
|
if (keyInit in skipProps && !noSkip && !isHOC) {
|
|
3018
|
-
|
|
3059
|
+
var _driver_animations;
|
|
3060
|
+
if (!(keyInit === "transition" && typeof valInit == "string" && !(!(driver == null || (_driver_animations = driver.animations) === null || _driver_animations === void 0) && _driver_animations[valInit]))) return "continue";
|
|
3019
3061
|
}
|
|
3020
3062
|
var isValidStyleKeyInit = isValidStyleKey(keyInit, validStyles$1, accept);
|
|
3021
3063
|
if (!isValidStyleKeyInit) {
|
|
@@ -3030,7 +3072,10 @@ var getSplitStyles = function(props, staticConfig, theme, themeName, componentSt
|
|
|
3030
3072
|
var shouldPassProp = !isStyleProp && isHOC || // is in parent variants
|
|
3031
3073
|
isHOC && parentVariants && keyInit in parentVariants || (inlineProps == null ? void 0 : inlineProps.has(keyInit)), parentVariant = parentVariants == null ? void 0 : parentVariants[keyInit], isHOCShouldPassThrough = !!(isHOC && (isValidStyleKeyInit || isMediaOrPseudo || parentVariant || keyInit in skipProps)), shouldPassThrough = shouldPassProp || isHOCShouldPassThrough;
|
|
3032
3074
|
if (shouldPassThrough && (passDownProp(viewProps, keyInit, valInit, isMediaOrPseudo), !isVariant)) return "continue";
|
|
3033
|
-
if (!noSkip
|
|
3075
|
+
if (!noSkip) {
|
|
3076
|
+
var _driver_animations1;
|
|
3077
|
+
if (keyInit in skipProps && !(keyInit === "transition" && typeof valInit == "string" && !(!(driver == null || (_driver_animations1 = driver.animations) === null || _driver_animations1 === void 0) && _driver_animations1[valInit]))) return "continue";
|
|
3078
|
+
}
|
|
3034
3079
|
(isText || isInput) && valInit && (keyInit === "fontFamily" || keyInit === shorthands.fontFamily) && valInit in conf.fontsParsed && (styleState.fontFamily = valInit);
|
|
3035
3080
|
var disablePropMap = isMediaOrPseudo || !isStyleLikeKey;
|
|
3036
3081
|
if (propMapper(keyInit, valInit, styleState, disablePropMap, function(key5, val2, originalVal) {
|
|
@@ -3348,17 +3393,17 @@ var getSubStyle = function(styleState, subKey, styleIn, avoidMergeTransform) {
|
|
|
3348
3393
|
var _loop2 = function(key1) {
|
|
3349
3394
|
var val = styleIn[key1];
|
|
3350
3395
|
if (key1 = conf2.shorthands[key1] || key1, key1 === "transition") {
|
|
3351
|
-
var _styleState;
|
|
3396
|
+
var _driver_animations, _styleState;
|
|
3352
3397
|
(_styleState = styleState).pseudoTransitions || (_styleState.pseudoTransitions = {}), styleState.pseudoTransitions[subKey] = val;
|
|
3353
3398
|
var driver = styleState.animationDriver;
|
|
3354
3399
|
if ((driver == null ? void 0 : driver.outputStyle) === "css") {
|
|
3355
|
-
var
|
|
3400
|
+
var _driver_animations1, animationConfig = (_driver_animations1 = driver.animations) === null || _driver_animations1 === void 0 ? void 0 : _driver_animations1[val];
|
|
3356
3401
|
if (animationConfig) {
|
|
3357
3402
|
var important = subKey[0] === "$" ? " !important" : "";
|
|
3358
3403
|
styleOut.transition = `all ${animationConfig}${important}`;
|
|
3359
3404
|
}
|
|
3360
3405
|
}
|
|
3361
|
-
return key = key1, "continue";
|
|
3406
|
+
return !styleOut.transition && typeof val == "string" && !(!(driver == null || (_driver_animations = driver.animations) === null || _driver_animations === void 0) && _driver_animations[val]) && (styleOut.transition = val), key = key1, "continue";
|
|
3362
3407
|
}
|
|
3363
3408
|
var shouldSkip = !staticConfig.isHOC && key1 in skipProps && !styleProps.noSkip;
|
|
3364
3409
|
if (shouldSkip) return key = key1, "continue";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/core",
|
|
3
|
-
"version": "2.0.0-rc.
|
|
3
|
+
"version": "2.0.0-rc.31",
|
|
4
4
|
"gitHead": "a49cc7ea6b93ba384e77a4880ae48ac4a5635c14",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -79,17 +79,17 @@
|
|
|
79
79
|
"clean:build": "tamagui-build clean:build"
|
|
80
80
|
},
|
|
81
81
|
"dependencies": {
|
|
82
|
-
"@tamagui/helpers": "2.0.0-rc.
|
|
83
|
-
"@tamagui/react-native-media-driver": "2.0.0-rc.
|
|
84
|
-
"@tamagui/react-native-use-pressable": "2.0.0-rc.
|
|
85
|
-
"@tamagui/use-element-layout": "2.0.0-rc.
|
|
86
|
-
"@tamagui/use-event": "2.0.0-rc.
|
|
87
|
-
"@tamagui/web": "2.0.0-rc.
|
|
82
|
+
"@tamagui/helpers": "2.0.0-rc.31",
|
|
83
|
+
"@tamagui/react-native-media-driver": "2.0.0-rc.31",
|
|
84
|
+
"@tamagui/react-native-use-pressable": "2.0.0-rc.31",
|
|
85
|
+
"@tamagui/use-element-layout": "2.0.0-rc.31",
|
|
86
|
+
"@tamagui/use-event": "2.0.0-rc.31",
|
|
87
|
+
"@tamagui/web": "2.0.0-rc.31"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
|
-
"@tamagui/build": "2.0.0-rc.
|
|
91
|
-
"@tamagui/native-bundle": "2.0.0-rc.
|
|
92
|
-
"@tamagui/react-native-web-lite": "2.0.0-rc.
|
|
90
|
+
"@tamagui/build": "2.0.0-rc.31",
|
|
91
|
+
"@tamagui/native-bundle": "2.0.0-rc.31",
|
|
92
|
+
"@tamagui/react-native-web-lite": "2.0.0-rc.31",
|
|
93
93
|
"@testing-library/react": "^16.1.0",
|
|
94
94
|
"csstype": "^3.0.10",
|
|
95
95
|
"react": ">=19",
|
package/dist/cjs/index.js
DELETED
|
@@ -1,100 +0,0 @@
|
|
|
1
|
-
var __defProp = Object.defineProperty;
|
|
2
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
3
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
4
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
|
-
var __export = (target, all) => {
|
|
6
|
-
for (var name in all) __defProp(target, name, {
|
|
7
|
-
get: all[name],
|
|
8
|
-
enumerable: !0
|
|
9
|
-
});
|
|
10
|
-
},
|
|
11
|
-
__copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
|
|
13
|
-
get: () => from[key],
|
|
14
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
15
|
-
});
|
|
16
|
-
return to;
|
|
17
|
-
},
|
|
18
|
-
__reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
|
|
19
|
-
var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
|
|
20
|
-
value: !0
|
|
21
|
-
}), mod);
|
|
22
|
-
var index_exports = {};
|
|
23
|
-
__export(index_exports, {
|
|
24
|
-
LayoutMeasurementController: () => import_use_element_layout2.LayoutMeasurementController,
|
|
25
|
-
TamaguiProvider: () => TamaguiProvider,
|
|
26
|
-
Text: () => Text,
|
|
27
|
-
View: () => View,
|
|
28
|
-
createTamagui: () => createTamagui,
|
|
29
|
-
registerLayoutNode: () => import_use_element_layout2.registerLayoutNode,
|
|
30
|
-
setOnLayoutStrategy: () => import_use_element_layout2.setOnLayoutStrategy
|
|
31
|
-
});
|
|
32
|
-
module.exports = __toCommonJS(index_exports);
|
|
33
|
-
__reExport(index_exports, require("@tamagui/web"), module.exports);
|
|
34
|
-
var import_react_native_media_driver = require("@tamagui/react-native-media-driver"),
|
|
35
|
-
import_use_element_layout = require("@tamagui/use-element-layout"),
|
|
36
|
-
import_web = require("@tamagui/web"),
|
|
37
|
-
import_createOptimizedView = require("./createOptimizedView.cjs"),
|
|
38
|
-
import_getBaseViews = require("./getBaseViews.cjs"),
|
|
39
|
-
import_use_element_layout2 = require("@tamagui/use-element-layout");
|
|
40
|
-
__reExport(index_exports, require("./reactNativeTypes.cjs"), module.exports);
|
|
41
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
42
|
-
const TamaguiProvider = props => ((0, import_web.useIsomorphicLayoutEffect)(() => {
|
|
43
|
-
(0, import_use_element_layout.enable)();
|
|
44
|
-
}, []), /* @__PURE__ */(0, import_jsx_runtime.jsx)(import_web.TamaguiProvider, {
|
|
45
|
-
...props
|
|
46
|
-
})),
|
|
47
|
-
createTamagui = conf => (0, import_web.createTamagui)(conf),
|
|
48
|
-
baseViews = (0, import_getBaseViews.getBaseViews)();
|
|
49
|
-
(0, import_web.setupHooks)({
|
|
50
|
-
getBaseViews: import_getBaseViews.getBaseViews,
|
|
51
|
-
setElementProps: node => {
|
|
52
|
-
node && !node.measure && (node.measure ||= (0, import_use_element_layout.createMeasure)(node), node.measureInWindow ||= (0, import_use_element_layout.createMeasureInWindow)(node), node.measureLayout ||= (0, import_use_element_layout.createMeasureLayout)(node));
|
|
53
|
-
},
|
|
54
|
-
usePropsTransform(elementType, propsIn, stateRef, willHydrate) {
|
|
55
|
-
{
|
|
56
|
-
const isDOM = typeof elementType == "string",
|
|
57
|
-
{
|
|
58
|
-
// remove event props handles by useResponderEvents
|
|
59
|
-
onMoveShouldSetResponder,
|
|
60
|
-
onMoveShouldSetResponderCapture,
|
|
61
|
-
onResponderEnd,
|
|
62
|
-
onResponderGrant,
|
|
63
|
-
onResponderMove,
|
|
64
|
-
onResponderReject,
|
|
65
|
-
onResponderRelease,
|
|
66
|
-
onResponderStart,
|
|
67
|
-
onResponderTerminate,
|
|
68
|
-
onResponderTerminationRequest,
|
|
69
|
-
onScrollShouldSetResponder,
|
|
70
|
-
onScrollShouldSetResponderCapture,
|
|
71
|
-
onSelectionChangeShouldSetResponder,
|
|
72
|
-
onSelectionChangeShouldSetResponderCapture,
|
|
73
|
-
onStartShouldSetResponder,
|
|
74
|
-
onStartShouldSetResponderCapture,
|
|
75
|
-
// android
|
|
76
|
-
collapsable,
|
|
77
|
-
focusable,
|
|
78
|
-
// deprecated,
|
|
79
|
-
accessible,
|
|
80
|
-
accessibilityDisabled,
|
|
81
|
-
onLayout,
|
|
82
|
-
hrefAttrs,
|
|
83
|
-
...plainDOMProps
|
|
84
|
-
} = propsIn;
|
|
85
|
-
if ((willHydrate || isDOM) && (0, import_use_element_layout.useElementLayout)(stateRef, isDOM ? onLayout : void 0), isDOM) {
|
|
86
|
-
if (plainDOMProps.href && hrefAttrs) {
|
|
87
|
-
const {
|
|
88
|
-
download,
|
|
89
|
-
rel,
|
|
90
|
-
target
|
|
91
|
-
} = hrefAttrs;
|
|
92
|
-
download != null && (plainDOMProps.download = download), rel && (plainDOMProps.rel = rel), typeof target == "string" && (plainDOMProps.target = target.charAt(0) !== "_" ? `_${target}` : target);
|
|
93
|
-
}
|
|
94
|
-
return plainDOMProps;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
const View = import_web.View,
|
|
100
|
-
Text = import_web.Text;
|
package/dist/cjs/index.js.map
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/index.tsx"],
|
|
4
|
-
"mappings": ";;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACA,0BAAc,yBADd;AAGA,uCAA4B,+CAC5B,4BAMO,wCAaP,aAOO,yBACP,6BAAoC,kCACpC,sBAA6B,2BAI7BA,6BAKO;AA8BP,0BAAc,+BAvEd;AA+ES;AALF,MAAM,kBAAkB,CAAC,eAC9B,sCAA0B,MAAM;AAC9B,wCAAO;AACT,GAAG,CAAC,CAAC,GAEE,4CAAC,WAAAC,iBAAA,EAAoB,GAAG,OAAO,IAI3B,gBAAyC,CAAC,aAM9C,WAAAC,eAAiB,IAAI,GAGxB,gBAAY,kCAAa;AAAA,IAI/B,uBAAW;AAAA,EACT;AAAA,EAEA,iBAAiB,CAAC,SAAS;AAGvB,IAAI,QAAQ,CAAC,KAAK,YAChB,KAAK,gBAAY,yCAAc,IAAI,GACnC,KAAK,wBAAoB,iDAAsB,IAAI,GACnD,KAAK,sBAAkB,+CAAoB,IAAI;AAAA,EAGrD;AAAA,EAEA,kBAAkB,aAAa,SAAS,UAAU,aAAa;AACnB;AACxC,YAAM,QAAQ,OAAO,eAAgB,UAG/B;AAAA;AAAA,QAEJ;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA;AAAA,QAGA;AAAA,QACA;AAAA;AAAA,QAGA;AAAA,QACA;AAAA,QAEA;AAAA,QACA;AAAA,QAEA,GAAG;AAAA,MACL,IAAI;AAQJ,WANI,eAAe,cACjB,4CAAiB,UAAW,QAAqB,WAAb,MAA6B,GAK/D,OAAO;AAET,YAAI,cAAc,QAAQ,WAAW;AACnC,gBAAM,EAAE,UAAU,KAAK,OAAO,IAAI;AAClC,UAAI,YAAY,SACd,cAAc,WAAW,WAEvB,QACF,cAAc,MAAM,MAElB,OAAO,UAAW,aACpB,cAAc,SAAS,OAAO,OAAO,CAAC,MAAM,MAAM,IAAI,MAAM,KAAK;AAAA,QAErE;AACA,eAAO;AAAA,MACT;AAAA,IACF;AAAA,EACF;AAgBF,CAAC;AAIM,MAAM,OAAO,WAAAC,MACP,OAAO,WAAAC;",
|
|
5
|
-
"names": ["import_use_element_layout", "WebTamaguiProvider", "createTamaguiWeb", "WebView", "WebText"]
|
|
6
|
-
}
|