145 lines
5.1 KiB
React
145 lines
5.1 KiB
React
// Metro module 1834 (f1835).
|
|
import { useCallback, useMemo, forwardRef } from "react";
|
|
import { StyleSheet } from "react-native";
|
|
import Module1606, { makeMutable, useAnimatedRef, useDerivedValue, useAnimatedStyle } from "./Module1606";
|
|
import _default from "./_default_1814";
|
|
import { useChatKeyboard } from "./Module1835";
|
|
import { useExtraContentPadding } from "./Module1837";
|
|
import { useEndVisible } from "./Module1839";
|
|
import Module1820 from "./Module1820";
|
|
let styles;
|
|
const extraContentPadding = makeMutable(0);
|
|
const blankSpace = makeMutable(0);
|
|
const __initData = {
|
|
code: "function pnpm_indexTsx1(){const{freeze}=this.__closure;return typeof freeze===\"boolean\"?freeze:freeze.value;}"
|
|
};
|
|
const __initData2 = {
|
|
code: "function pnpm_indexTsx2(){const{blankSpace,padding,extraContentPadding}=this.__closure;return Math.max(blankSpace.value,padding.value+extraContentPadding.value);}"
|
|
};
|
|
const __initData3 = {
|
|
code: "function pnpm_indexTsx3(){const{padding,extraContentPadding}=this.__closure;return padding.value+extraContentPadding.value;}"
|
|
};
|
|
const __initData4 = {
|
|
code: "function pnpm_indexTsx4(){const{currentHeight}=this.__closure;return{transform:[{translateY:-currentHeight.value}]};}"
|
|
};
|
|
const r41 = forwardRef((a0, a1) => {
|
|
const { children, ScrollViewComponent = Module1606.ScrollView, inverted = false, keyboardLiftBehavior = "always", freeze = false, offset: _offset, extraContentPadding: _extraContentPadding, blankSpace: _blankSpace, applyWorkaroundForContentInsetHitTestBug: _applyWorkaroundForContentInsetHitTestBug, onLayout, onContentSizeChange, onEndVisible, ...props } = a0;
|
|
let padding, currentHeight, onLayout2, onContentSizeChange2, animatedStyle;
|
|
let c13254_0 = freeze;
|
|
const { offset = 0, extraContentPadding: extraContentPadding2 = extraContentPadding } = a0;
|
|
let c13254_1 = extraContentPadding2;
|
|
let blankSpace2 = a0.blankSpace;
|
|
if (blankSpace2 === void 0) {
|
|
blankSpace2 = blankSpace;
|
|
}
|
|
let c13254_2 = blankSpace2;
|
|
let applyWorkaroundForContentInsetHitTestBug = a0.applyWorkaroundForContentInsetHitTestBug;
|
|
if (applyWorkaroundForContentInsetHitTestBug === void 0) {
|
|
applyWorkaroundForContentInsetHitTestBug = false;
|
|
}
|
|
padding = void 0;
|
|
currentHeight = void 0;
|
|
onLayout2 = void 0;
|
|
onContentSizeChange2 = void 0;
|
|
animatedStyle = void 0;
|
|
const animatedRef = useAnimatedRef();
|
|
const ref = _default(a1, animatedRef);
|
|
const M = () => {
|
|
let r2 = c13254_0;
|
|
if (typeof r2 !== "boolean") {
|
|
r2 = c13254_0.value;
|
|
}
|
|
return r2;
|
|
};
|
|
M.__closure = {
|
|
freeze
|
|
};
|
|
M.__workletHash = 1441280506731;
|
|
M.__initData = __initData;
|
|
const derivedValue = useDerivedValue(M);
|
|
const chatKeyboard = useChatKeyboard(animatedRef, {
|
|
inverted,
|
|
keyboardLiftBehavior,
|
|
freeze: derivedValue,
|
|
offset,
|
|
blankSpace: blankSpace2,
|
|
extraContentPadding: extraContentPadding2
|
|
});
|
|
padding = chatKeyboard.padding;
|
|
currentHeight = chatKeyboard.currentHeight;
|
|
const { contentOffsetY, scroll, layout, size } = chatKeyboard;
|
|
onLayout2 = chatKeyboard.onLayout;
|
|
onContentSizeChange2 = chatKeyboard.onContentSizeChange;
|
|
useExtraContentPadding({
|
|
scrollViewRef: animatedRef,
|
|
extraContentPadding: extraContentPadding2,
|
|
keyboardPadding: padding,
|
|
blankSpace: blankSpace2,
|
|
scroll,
|
|
layout,
|
|
size,
|
|
contentOffsetY,
|
|
inverted,
|
|
keyboardLiftBehavior,
|
|
freeze: derivedValue
|
|
});
|
|
useEndVisible({
|
|
scroll,
|
|
layout,
|
|
size,
|
|
inverted,
|
|
onEndVisible
|
|
});
|
|
const q = () => Math.max(c13254_2.value, padding.value + c13254_1.value);
|
|
q.__closure = {
|
|
blankSpace: blankSpace2,
|
|
padding,
|
|
extraContentPadding: extraContentPadding2
|
|
};
|
|
q.__workletHash = 5812718828105;
|
|
q.__initData = __initData2;
|
|
const derivedValue2 = useDerivedValue(q);
|
|
const G = () => padding.value + c13254_1.value;
|
|
G.__closure = {
|
|
padding,
|
|
extraContentPadding: extraContentPadding2
|
|
};
|
|
G.__workletHash = 17005251423398;
|
|
G.__initData = __initData3;
|
|
const derivedValue3 = useDerivedValue(G);
|
|
const callback = useCallback((a0) => {
|
|
onLayout2(a0);
|
|
if (onLayout != null) {
|
|
onLayout(a0);
|
|
}
|
|
}, [onLayout2, onLayout]);
|
|
const callback2 = useCallback((a0, a1) => {
|
|
onContentSizeChange2(a0, a1);
|
|
if (onContentSizeChange != null) {
|
|
onContentSizeChange(a0, a1);
|
|
}
|
|
}, [onContentSizeChange2, onContentSizeChange]);
|
|
const J = () => ({
|
|
transform: [{
|
|
translateY: -currentHeight.value
|
|
}]
|
|
});
|
|
J.__closure = {
|
|
currentHeight
|
|
};
|
|
J.__workletHash = 2509855764315;
|
|
J.__initData = __initData4;
|
|
animatedStyle = useAnimatedStyle(J, []);
|
|
return <>
|
|
<Module1820 ref={ref} {...props} applyWorkaroundForContentInsetHitTestBug={applyWorkaroundForContentInsetHitTestBug} bottomPadding={derivedValue2} contentOffsetY={contentOffsetY} inverted={inverted} scrollIndicatorPadding={derivedValue3} ScrollViewComponent={ScrollViewComponent} onContentSizeChange={callback2} onLayout={callback}>{children}</Module1820>
|
|
<Module1606.View style={useMemo(() => [styles.commitView, animatedStyle], [animatedStyle])} />
|
|
</>;
|
|
});
|
|
styles = StyleSheet.create({
|
|
commitView: {
|
|
display: "none",
|
|
position: "absolute"
|
|
}
|
|
});
|
|
export default r41;
|