@comergehq/studio 0.1.10 → 0.1.11
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/index.js +854 -819
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +646 -611
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/chat/ChatComposer.tsx +9 -7
- package/src/components/comments/AppCommentsSheet.tsx +6 -6
- package/src/components/floating-draggable-button/FloatingDraggableButton.tsx +12 -27
- package/src/components/preview/StatsBar.tsx +4 -3
- package/src/components/studio-sheet/StudioSheetBackground.tsx +3 -2
- package/src/components/studio-sheet/StudioSheetHeaderIconButton.tsx +7 -5
- package/src/components/utils/ResettableLiquidGlassView.tsx +28 -0
- package/src/components/utils/liquidGlassReset.tsx +36 -0
- package/src/studio/ComergeStudio.tsx +17 -14
package/dist/index.mjs
CHANGED
|
@@ -6,7 +6,7 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
|
|
|
6
6
|
});
|
|
7
7
|
|
|
8
8
|
// src/studio/ComergeStudio.tsx
|
|
9
|
-
import * as
|
|
9
|
+
import * as React42 from "react";
|
|
10
10
|
import { Platform as RNPlatform, View as View45 } from "react-native";
|
|
11
11
|
import { BottomSheetModalProvider } from "@gorhom/bottom-sheet";
|
|
12
12
|
|
|
@@ -1782,25 +1782,76 @@ function RuntimeRenderer({ appKey, bundlePath, forcePreparing, renderToken, styl
|
|
|
1782
1782
|
}
|
|
1783
1783
|
|
|
1784
1784
|
// src/studio/ui/StudioOverlay.tsx
|
|
1785
|
-
import * as
|
|
1786
|
-
import { Keyboard as Keyboard5, Platform as
|
|
1785
|
+
import * as React41 from "react";
|
|
1786
|
+
import { Keyboard as Keyboard5, Platform as Platform10, View as View44, useWindowDimensions as useWindowDimensions4 } from "react-native";
|
|
1787
1787
|
|
|
1788
1788
|
// src/components/studio-sheet/StudioBottomSheet.tsx
|
|
1789
|
-
import * as
|
|
1790
|
-
import { AppState as
|
|
1789
|
+
import * as React11 from "react";
|
|
1790
|
+
import { AppState as AppState3, Keyboard, View as View4 } from "react-native";
|
|
1791
1791
|
import BottomSheet from "@gorhom/bottom-sheet";
|
|
1792
1792
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
1793
1793
|
|
|
1794
1794
|
// src/components/studio-sheet/StudioSheetBackground.tsx
|
|
1795
|
-
import { Platform as
|
|
1796
|
-
import {
|
|
1797
|
-
|
|
1795
|
+
import { Platform as Platform3, View as View3 } from "react-native";
|
|
1796
|
+
import { isLiquidGlassSupported } from "@callstack/liquid-glass";
|
|
1797
|
+
|
|
1798
|
+
// src/components/utils/ResettableLiquidGlassView.tsx
|
|
1799
|
+
import * as React10 from "react";
|
|
1800
|
+
import { LiquidGlassView } from "@callstack/liquid-glass";
|
|
1801
|
+
|
|
1802
|
+
// src/components/utils/liquidGlassReset.tsx
|
|
1803
|
+
import * as React9 from "react";
|
|
1804
|
+
import { AppState as AppState2, Platform as Platform2 } from "react-native";
|
|
1805
|
+
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
1806
|
+
var LiquidGlassResetContext = React9.createContext(0);
|
|
1807
|
+
function LiquidGlassResetProvider({
|
|
1808
|
+
children,
|
|
1809
|
+
resetTriggers = []
|
|
1810
|
+
}) {
|
|
1811
|
+
const [token, setToken] = React9.useState(0);
|
|
1812
|
+
React9.useEffect(() => {
|
|
1813
|
+
if (Platform2.OS !== "ios") return;
|
|
1814
|
+
const onChange = (state) => {
|
|
1815
|
+
if (state === "active") setToken((t) => t + 1);
|
|
1816
|
+
};
|
|
1817
|
+
const sub = AppState2.addEventListener("change", onChange);
|
|
1818
|
+
return () => sub.remove();
|
|
1819
|
+
}, []);
|
|
1820
|
+
React9.useEffect(() => {
|
|
1821
|
+
setToken((t) => t + 1);
|
|
1822
|
+
}, resetTriggers);
|
|
1823
|
+
return /* @__PURE__ */ jsx4(LiquidGlassResetContext.Provider, { value: token, children });
|
|
1824
|
+
}
|
|
1825
|
+
function useLiquidGlassResetToken() {
|
|
1826
|
+
return React9.useContext(LiquidGlassResetContext);
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1829
|
+
// src/components/utils/ResettableLiquidGlassView.tsx
|
|
1830
|
+
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
1831
|
+
function ResettableLiquidGlassView({ children, ...props }) {
|
|
1832
|
+
const token = useLiquidGlassResetToken();
|
|
1833
|
+
const [layoutBootKey, setLayoutBootKey] = React10.useState(0);
|
|
1834
|
+
const sawNonZeroLayoutRef = React10.useRef(false);
|
|
1835
|
+
const onLayout = (e) => {
|
|
1836
|
+
var _a;
|
|
1837
|
+
(_a = props.onLayout) == null ? void 0 : _a.call(props, e);
|
|
1838
|
+
const { width, height } = e.nativeEvent.layout;
|
|
1839
|
+
if (width > 0 && height > 0 && !sawNonZeroLayoutRef.current) {
|
|
1840
|
+
sawNonZeroLayoutRef.current = true;
|
|
1841
|
+
setLayoutBootKey((k) => k + 1);
|
|
1842
|
+
}
|
|
1843
|
+
};
|
|
1844
|
+
return /* @__PURE__ */ jsx5(LiquidGlassView, { ...props, onLayout, children }, `liquid-glass-${token}-${layoutBootKey}`);
|
|
1845
|
+
}
|
|
1846
|
+
|
|
1847
|
+
// src/components/studio-sheet/StudioSheetBackground.tsx
|
|
1848
|
+
import { Fragment as Fragment2, jsx as jsx6, jsxs } from "react/jsx-runtime";
|
|
1798
1849
|
function StudioSheetBackground({
|
|
1799
1850
|
style,
|
|
1800
1851
|
renderBackground
|
|
1801
1852
|
}) {
|
|
1802
1853
|
const theme = useTheme();
|
|
1803
|
-
const radius =
|
|
1854
|
+
const radius = Platform3.OS === "ios" ? 39 : 16;
|
|
1804
1855
|
const fallbackBgColor = theme.scheme === "dark" ? "rgba(11, 8, 15, 0.85)" : "rgba(255, 255, 255, 0.85)";
|
|
1805
1856
|
const secondaryBgBaseColor = theme.scheme === "dark" ? "rgb(24, 24, 27)" : "rgb(173, 173, 173)";
|
|
1806
1857
|
const containerStyle = {
|
|
@@ -1810,17 +1861,17 @@ function StudioSheetBackground({
|
|
|
1810
1861
|
overflow: "hidden"
|
|
1811
1862
|
};
|
|
1812
1863
|
if (renderBackground) {
|
|
1813
|
-
return /* @__PURE__ */
|
|
1864
|
+
return /* @__PURE__ */ jsx6(Fragment2, { children: renderBackground({ style: containerStyle }) });
|
|
1814
1865
|
}
|
|
1815
1866
|
return /* @__PURE__ */ jsxs(Fragment2, { children: [
|
|
1816
|
-
/* @__PURE__ */
|
|
1817
|
-
|
|
1867
|
+
/* @__PURE__ */ jsx6(
|
|
1868
|
+
ResettableLiquidGlassView,
|
|
1818
1869
|
{
|
|
1819
1870
|
style: [containerStyle, !isLiquidGlassSupported && { backgroundColor: fallbackBgColor }],
|
|
1820
1871
|
effect: "regular"
|
|
1821
1872
|
}
|
|
1822
1873
|
),
|
|
1823
|
-
isLiquidGlassSupported && /* @__PURE__ */
|
|
1874
|
+
isLiquidGlassSupported && /* @__PURE__ */ jsx6(
|
|
1824
1875
|
View3,
|
|
1825
1876
|
{
|
|
1826
1877
|
style: [
|
|
@@ -1842,7 +1893,7 @@ function StudioSheetBackground({
|
|
|
1842
1893
|
}
|
|
1843
1894
|
|
|
1844
1895
|
// src/components/studio-sheet/StudioBottomSheet.tsx
|
|
1845
|
-
import { jsx as
|
|
1896
|
+
import { jsx as jsx7 } from "react/jsx-runtime";
|
|
1846
1897
|
function StudioBottomSheet({
|
|
1847
1898
|
open,
|
|
1848
1899
|
onOpenChange,
|
|
@@ -1854,12 +1905,12 @@ function StudioBottomSheet({
|
|
|
1854
1905
|
}) {
|
|
1855
1906
|
const theme = useTheme();
|
|
1856
1907
|
const insets = useSafeAreaInsets();
|
|
1857
|
-
const internalSheetRef =
|
|
1908
|
+
const internalSheetRef = React11.useRef(null);
|
|
1858
1909
|
const resolvedSheetRef = sheetRef ?? internalSheetRef;
|
|
1859
|
-
const currentIndexRef =
|
|
1860
|
-
const lastAppStateRef =
|
|
1861
|
-
|
|
1862
|
-
const sub =
|
|
1910
|
+
const currentIndexRef = React11.useRef(open ? snapPoints.length - 1 : -1);
|
|
1911
|
+
const lastAppStateRef = React11.useRef(AppState3.currentState);
|
|
1912
|
+
React11.useEffect(() => {
|
|
1913
|
+
const sub = AppState3.addEventListener("change", (state) => {
|
|
1863
1914
|
const prev = lastAppStateRef.current;
|
|
1864
1915
|
lastAppStateRef.current = state;
|
|
1865
1916
|
if (state === "background" || state === "inactive") {
|
|
@@ -1878,7 +1929,7 @@ function StudioBottomSheet({
|
|
|
1878
1929
|
});
|
|
1879
1930
|
return () => sub.remove();
|
|
1880
1931
|
}, [open, resolvedSheetRef]);
|
|
1881
|
-
|
|
1932
|
+
React11.useEffect(() => {
|
|
1882
1933
|
const sheet = resolvedSheetRef.current;
|
|
1883
1934
|
if (!sheet) return;
|
|
1884
1935
|
if (open) {
|
|
@@ -1887,14 +1938,14 @@ function StudioBottomSheet({
|
|
|
1887
1938
|
sheet.close();
|
|
1888
1939
|
}
|
|
1889
1940
|
}, [open, resolvedSheetRef, snapPoints.length]);
|
|
1890
|
-
const handleChange =
|
|
1941
|
+
const handleChange = React11.useCallback(
|
|
1891
1942
|
(index) => {
|
|
1892
1943
|
currentIndexRef.current = index;
|
|
1893
1944
|
onOpenChange == null ? void 0 : onOpenChange(index >= 0);
|
|
1894
1945
|
},
|
|
1895
1946
|
[onOpenChange]
|
|
1896
1947
|
);
|
|
1897
|
-
return /* @__PURE__ */
|
|
1948
|
+
return /* @__PURE__ */ jsx7(
|
|
1898
1949
|
BottomSheet,
|
|
1899
1950
|
{
|
|
1900
1951
|
ref: resolvedSheetRef,
|
|
@@ -1904,24 +1955,24 @@ function StudioBottomSheet({
|
|
|
1904
1955
|
enablePanDownToClose: true,
|
|
1905
1956
|
enableContentPanningGesture: false,
|
|
1906
1957
|
android_keyboardInputMode: "adjustResize",
|
|
1907
|
-
backgroundComponent: (props) => /* @__PURE__ */
|
|
1958
|
+
backgroundComponent: (props) => /* @__PURE__ */ jsx7(StudioSheetBackground, { ...props, renderBackground: background == null ? void 0 : background.renderBackground }),
|
|
1908
1959
|
topInset: insets.top,
|
|
1909
1960
|
bottomInset: 0,
|
|
1910
1961
|
handleIndicatorStyle: { backgroundColor: theme.colors.handleIndicator },
|
|
1911
1962
|
onChange: handleChange,
|
|
1912
1963
|
...bottomSheetProps,
|
|
1913
|
-
children: /* @__PURE__ */
|
|
1964
|
+
children: /* @__PURE__ */ jsx7(View4, { style: { flex: 1, overflow: "hidden" }, children })
|
|
1914
1965
|
}
|
|
1915
1966
|
);
|
|
1916
1967
|
}
|
|
1917
1968
|
|
|
1918
1969
|
// src/components/studio-sheet/StudioSheetPager.tsx
|
|
1919
|
-
import * as
|
|
1970
|
+
import * as React12 from "react";
|
|
1920
1971
|
import { Animated } from "react-native";
|
|
1921
|
-
import { jsx as
|
|
1972
|
+
import { jsx as jsx8, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
1922
1973
|
function StudioSheetPager({ activePage, width, preview, chat, style }) {
|
|
1923
|
-
const anim =
|
|
1924
|
-
|
|
1974
|
+
const anim = React12.useRef(new Animated.Value(activePage === "chat" ? 1 : 0)).current;
|
|
1975
|
+
React12.useEffect(() => {
|
|
1925
1976
|
Animated.spring(anim, {
|
|
1926
1977
|
toValue: activePage === "chat" ? 1 : 0,
|
|
1927
1978
|
useNativeDriver: true,
|
|
@@ -1932,7 +1983,7 @@ function StudioSheetPager({ activePage, width, preview, chat, style }) {
|
|
|
1932
1983
|
const previewTranslateX = anim.interpolate({ inputRange: [0, 1], outputRange: [0, -width] });
|
|
1933
1984
|
const chatTranslateX = anim.interpolate({ inputRange: [0, 1], outputRange: [width, 0] });
|
|
1934
1985
|
return /* @__PURE__ */ jsxs2(Animated.View, { style: [{ flex: 1 }, style], children: [
|
|
1935
|
-
/* @__PURE__ */
|
|
1986
|
+
/* @__PURE__ */ jsx8(
|
|
1936
1987
|
Animated.View,
|
|
1937
1988
|
{
|
|
1938
1989
|
style: [
|
|
@@ -1949,7 +2000,7 @@ function StudioSheetPager({ activePage, width, preview, chat, style }) {
|
|
|
1949
2000
|
children: preview
|
|
1950
2001
|
}
|
|
1951
2002
|
),
|
|
1952
|
-
/* @__PURE__ */
|
|
2003
|
+
/* @__PURE__ */ jsx8(
|
|
1953
2004
|
Animated.View,
|
|
1954
2005
|
{
|
|
1955
2006
|
style: [
|
|
@@ -1970,7 +2021,7 @@ function StudioSheetPager({ activePage, width, preview, chat, style }) {
|
|
|
1970
2021
|
}
|
|
1971
2022
|
|
|
1972
2023
|
// src/components/floating-draggable-button/FloatingDraggableButton.tsx
|
|
1973
|
-
import { useCallback as useCallback8, useEffect as
|
|
2024
|
+
import { useCallback as useCallback8, useEffect as useEffect10, useMemo as useMemo3, useRef as useRef7 } from "react";
|
|
1974
2025
|
import {
|
|
1975
2026
|
PanResponder,
|
|
1976
2027
|
Pressable,
|
|
@@ -1991,7 +2042,7 @@ import Animated2, {
|
|
|
1991
2042
|
withSpring,
|
|
1992
2043
|
withTiming
|
|
1993
2044
|
} from "react-native-reanimated";
|
|
1994
|
-
import {
|
|
2045
|
+
import { isLiquidGlassSupported as isLiquidGlassSupported2 } from "@callstack/liquid-glass";
|
|
1995
2046
|
|
|
1996
2047
|
// src/components/floating-draggable-button/constants.ts
|
|
1997
2048
|
var DEFAULT_SIZE = 48;
|
|
@@ -2002,11 +2053,10 @@ var DEFAULT_OFFSET = {
|
|
|
2002
2053
|
};
|
|
2003
2054
|
var ENTER_SCALE_FROM = 0.3;
|
|
2004
2055
|
var ENTER_ROTATION_FROM_DEG = -180;
|
|
2005
|
-
var HIDDEN_OPACITY = 0.3;
|
|
2006
2056
|
var PULSE_DURATION_MS = 900;
|
|
2007
2057
|
|
|
2008
2058
|
// src/components/floating-draggable-button/FloatingDraggableButton.tsx
|
|
2009
|
-
import { jsx as
|
|
2059
|
+
import { jsx as jsx9, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
2010
2060
|
var HIDDEN_OFFSET_X = 20;
|
|
2011
2061
|
var SPRING_POSITION = { damping: 12, stiffness: 100, mass: 0.8 };
|
|
2012
2062
|
var SPRING_SCALE_IN = { damping: 10, stiffness: 200 };
|
|
@@ -2014,8 +2064,6 @@ var SPRING_SCALE_OUT = { damping: 12, stiffness: 150 };
|
|
|
2014
2064
|
var SPRING_ROTATION_IN = { damping: 15, stiffness: 80 };
|
|
2015
2065
|
var SPRING_ROTATION_GRAB = { damping: 20 };
|
|
2016
2066
|
var SPRING_SCALE_GRAB = { damping: 15, stiffness: 200 };
|
|
2017
|
-
var TIMING_OPACITY_IN = { duration: 300, easing: Easing.out(Easing.ease) };
|
|
2018
|
-
var TIMING_OPACITY_OUT = { duration: 250, easing: Easing.in(Easing.ease) };
|
|
2019
2067
|
function clamp(value, min, max) {
|
|
2020
2068
|
"worklet";
|
|
2021
2069
|
return Math.max(min, Math.min(max, value));
|
|
@@ -2049,8 +2097,8 @@ function FloatingDraggableButton({
|
|
|
2049
2097
|
const theme = useTheme();
|
|
2050
2098
|
const { width, height } = useWindowDimensions();
|
|
2051
2099
|
const isDanger = variant === "danger";
|
|
2052
|
-
const onPressRef =
|
|
2053
|
-
|
|
2100
|
+
const onPressRef = useRef7(onPress);
|
|
2101
|
+
useEffect10(() => {
|
|
2054
2102
|
onPressRef.current = onPress;
|
|
2055
2103
|
}, [onPress]);
|
|
2056
2104
|
const fallbackBgColor = useMemo3(() => {
|
|
@@ -2062,30 +2110,20 @@ function FloatingDraggableButton({
|
|
|
2062
2110
|
const translateY = useSharedValue(getHiddenTranslateY(height));
|
|
2063
2111
|
const scale = useSharedValue(ENTER_SCALE_FROM);
|
|
2064
2112
|
const rotation = useSharedValue(ENTER_ROTATION_FROM_DEG);
|
|
2065
|
-
const opacity = useSharedValue(1);
|
|
2066
2113
|
const borderPulse = useSharedValue(0);
|
|
2067
|
-
const startPos =
|
|
2068
|
-
const isAnimatingOut =
|
|
2114
|
+
const startPos = useRef7({ x: 0, y: 0 });
|
|
2115
|
+
const isAnimatingOut = useRef7(false);
|
|
2069
2116
|
const animateToHidden = useCallback8(
|
|
2070
2117
|
(options) => {
|
|
2071
|
-
|
|
2118
|
+
const finish = options == null ? void 0 : options.onFinish;
|
|
2119
|
+
translateX.value = withSpring(getHiddenTranslateX(size), SPRING_POSITION, (finished) => {
|
|
2120
|
+
if (finished && finish) runOnJS(finish)();
|
|
2121
|
+
});
|
|
2072
2122
|
translateY.value = withSpring(getHiddenTranslateY(height), SPRING_POSITION);
|
|
2073
2123
|
scale.value = withSpring(ENTER_SCALE_FROM, SPRING_SCALE_IN);
|
|
2074
2124
|
rotation.value = withSpring(ENTER_ROTATION_FROM_DEG, SPRING_ROTATION_IN);
|
|
2075
|
-
const finish = options == null ? void 0 : options.onFinish;
|
|
2076
|
-
if (!finish) {
|
|
2077
|
-
opacity.value = withTiming(HIDDEN_OPACITY, TIMING_OPACITY_OUT);
|
|
2078
|
-
return;
|
|
2079
|
-
}
|
|
2080
|
-
opacity.value = withTiming(
|
|
2081
|
-
HIDDEN_OPACITY,
|
|
2082
|
-
TIMING_OPACITY_OUT,
|
|
2083
|
-
(finished) => {
|
|
2084
|
-
if (finished) runOnJS(finish)();
|
|
2085
|
-
}
|
|
2086
|
-
);
|
|
2087
2125
|
},
|
|
2088
|
-
[height,
|
|
2126
|
+
[height, rotation, scale, size, translateX, translateY]
|
|
2089
2127
|
);
|
|
2090
2128
|
const animateOut = useCallback8(() => {
|
|
2091
2129
|
if (isAnimatingOut.current) return;
|
|
@@ -2101,7 +2139,7 @@ function FloatingDraggableButton({
|
|
|
2101
2139
|
}
|
|
2102
2140
|
});
|
|
2103
2141
|
}, [animateToHidden]);
|
|
2104
|
-
|
|
2142
|
+
useEffect10(() => {
|
|
2105
2143
|
if (isLoading) {
|
|
2106
2144
|
borderPulse.value = withRepeat(
|
|
2107
2145
|
withSequence(
|
|
@@ -2125,9 +2163,8 @@ function FloatingDraggableButton({
|
|
|
2125
2163
|
withSpring(1, SPRING_SCALE_OUT)
|
|
2126
2164
|
);
|
|
2127
2165
|
rotation.value = withSpring(0, SPRING_ROTATION_IN);
|
|
2128
|
-
|
|
2129
|
-
|
|
2130
|
-
useEffect9(() => {
|
|
2166
|
+
}, [height, offset.bottom, offset.left, rotation, scale, size, translateX, translateY]);
|
|
2167
|
+
useEffect10(() => {
|
|
2131
2168
|
const timer = setTimeout(() => {
|
|
2132
2169
|
if (visible) {
|
|
2133
2170
|
animateIn();
|
|
@@ -2135,7 +2172,7 @@ function FloatingDraggableButton({
|
|
|
2135
2172
|
}, 100);
|
|
2136
2173
|
return () => clearTimeout(timer);
|
|
2137
2174
|
}, []);
|
|
2138
|
-
|
|
2175
|
+
useEffect10(() => {
|
|
2139
2176
|
if (visible && isAnimatingOut.current) {
|
|
2140
2177
|
animateIn();
|
|
2141
2178
|
} else if (!visible && !isAnimatingOut.current) {
|
|
@@ -2143,13 +2180,13 @@ function FloatingDraggableButton({
|
|
|
2143
2180
|
isAnimatingOut.current = true;
|
|
2144
2181
|
}
|
|
2145
2182
|
}, [visible, animateIn, animateToHidden]);
|
|
2146
|
-
|
|
2183
|
+
useEffect10(() => {
|
|
2147
2184
|
if (forceShowTrigger > 0 && visible) {
|
|
2148
2185
|
isAnimatingOut.current = false;
|
|
2149
2186
|
animateIn();
|
|
2150
2187
|
}
|
|
2151
2188
|
}, [forceShowTrigger, visible, animateIn]);
|
|
2152
|
-
const panResponder =
|
|
2189
|
+
const panResponder = useRef7(
|
|
2153
2190
|
PanResponder.create({
|
|
2154
2191
|
onStartShouldSetPanResponder: () => true,
|
|
2155
2192
|
onMoveShouldSetPanResponder: () => true,
|
|
@@ -2182,8 +2219,7 @@ function FloatingDraggableButton({
|
|
|
2182
2219
|
{ translateY: translateY.value },
|
|
2183
2220
|
{ scale: scale.value },
|
|
2184
2221
|
{ rotate: `${rotation.value}deg` }
|
|
2185
|
-
]
|
|
2186
|
-
opacity: opacity.value
|
|
2222
|
+
]
|
|
2187
2223
|
}));
|
|
2188
2224
|
const borderAnimatedStyle = useAnimatedStyle(() => {
|
|
2189
2225
|
const borderColor = interpolateColor(
|
|
@@ -2206,13 +2242,13 @@ function FloatingDraggableButton({
|
|
|
2206
2242
|
accessibilityRole: "button",
|
|
2207
2243
|
accessibilityLabel: ariaLabel,
|
|
2208
2244
|
children: [
|
|
2209
|
-
/* @__PURE__ */
|
|
2210
|
-
|
|
2245
|
+
/* @__PURE__ */ jsx9(Animated2.View, { style: [{ width: size, height: size, borderRadius: size / 2 }, borderAnimatedStyle], children: /* @__PURE__ */ jsx9(
|
|
2246
|
+
ResettableLiquidGlassView,
|
|
2211
2247
|
{
|
|
2212
2248
|
style: [{ flex: 1, borderRadius: size / 2 }, !isLiquidGlassSupported2 && { backgroundColor: fallbackBgColor }],
|
|
2213
2249
|
interactive: true,
|
|
2214
2250
|
effect: "clear",
|
|
2215
|
-
children: /* @__PURE__ */
|
|
2251
|
+
children: /* @__PURE__ */ jsx9(
|
|
2216
2252
|
Pressable,
|
|
2217
2253
|
{
|
|
2218
2254
|
onPress: () => {
|
|
@@ -2220,12 +2256,12 @@ function FloatingDraggableButton({
|
|
|
2220
2256
|
},
|
|
2221
2257
|
style: styles.buttonInner,
|
|
2222
2258
|
android_ripple: { color: "rgba(255, 255, 255, 0.3)", borderless: true },
|
|
2223
|
-
children: children ?? /* @__PURE__ */
|
|
2259
|
+
children: children ?? /* @__PURE__ */ jsx9(View5, {})
|
|
2224
2260
|
}
|
|
2225
2261
|
)
|
|
2226
2262
|
}
|
|
2227
2263
|
) }),
|
|
2228
|
-
badgeCount > 0 && /* @__PURE__ */
|
|
2264
|
+
badgeCount > 0 && /* @__PURE__ */ jsx9(View5, { style: [styles.badge, { backgroundColor: theme.colors.danger }], children: /* @__PURE__ */ jsx9(Text2, { style: [styles.badgeText, { color: theme.colors.onDanger }], children: badgeCount > 99 ? "99+" : badgeCount }) })
|
|
2229
2265
|
]
|
|
2230
2266
|
}
|
|
2231
2267
|
);
|
|
@@ -2266,7 +2302,7 @@ var styles = StyleSheet.create({
|
|
|
2266
2302
|
});
|
|
2267
2303
|
|
|
2268
2304
|
// src/components/overlays/EdgeGlowFrame.tsx
|
|
2269
|
-
import * as
|
|
2305
|
+
import * as React13 from "react";
|
|
2270
2306
|
import { Animated as Animated3, View as View6 } from "react-native";
|
|
2271
2307
|
import { LinearGradient } from "expo-linear-gradient";
|
|
2272
2308
|
|
|
@@ -2286,7 +2322,7 @@ function withAlpha(color, alpha) {
|
|
|
2286
2322
|
}
|
|
2287
2323
|
|
|
2288
2324
|
// src/components/overlays/EdgeGlowFrame.tsx
|
|
2289
|
-
import { jsx as
|
|
2325
|
+
import { jsx as jsx10, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
2290
2326
|
function baseColor(role, theme) {
|
|
2291
2327
|
switch (role) {
|
|
2292
2328
|
case "danger":
|
|
@@ -2309,8 +2345,8 @@ function EdgeGlowFrame({
|
|
|
2309
2345
|
}) {
|
|
2310
2346
|
const theme = useTheme();
|
|
2311
2347
|
const alpha = Math.max(0, Math.min(1, intensity));
|
|
2312
|
-
const anim =
|
|
2313
|
-
|
|
2348
|
+
const anim = React13.useRef(new Animated3.Value(visible ? 1 : 0)).current;
|
|
2349
|
+
React13.useEffect(() => {
|
|
2314
2350
|
Animated3.timing(anim, {
|
|
2315
2351
|
toValue: visible ? 1 : 0,
|
|
2316
2352
|
duration: 300,
|
|
@@ -2321,7 +2357,7 @@ function EdgeGlowFrame({
|
|
|
2321
2357
|
const strong = withAlpha(c, 0.6 * alpha);
|
|
2322
2358
|
const soft = withAlpha(c, 0.22 * alpha);
|
|
2323
2359
|
return /* @__PURE__ */ jsxs4(Animated3.View, { pointerEvents: "none", style: [{ position: "absolute", inset: 0, opacity: anim }, style], children: [
|
|
2324
|
-
/* @__PURE__ */
|
|
2360
|
+
/* @__PURE__ */ jsx10(View6, { style: { position: "absolute", top: 0, left: 0, right: 0, height: thickness }, children: /* @__PURE__ */ jsx10(
|
|
2325
2361
|
LinearGradient,
|
|
2326
2362
|
{
|
|
2327
2363
|
colors: [strong, soft, "transparent"],
|
|
@@ -2330,7 +2366,7 @@ function EdgeGlowFrame({
|
|
|
2330
2366
|
style: { width: "100%", height: "100%" }
|
|
2331
2367
|
}
|
|
2332
2368
|
) }),
|
|
2333
|
-
/* @__PURE__ */
|
|
2369
|
+
/* @__PURE__ */ jsx10(View6, { style: { position: "absolute", bottom: 0, left: 0, right: 0, height: thickness }, children: /* @__PURE__ */ jsx10(
|
|
2334
2370
|
LinearGradient,
|
|
2335
2371
|
{
|
|
2336
2372
|
colors: ["transparent", soft, strong],
|
|
@@ -2339,7 +2375,7 @@ function EdgeGlowFrame({
|
|
|
2339
2375
|
style: { width: "100%", height: "100%" }
|
|
2340
2376
|
}
|
|
2341
2377
|
) }),
|
|
2342
|
-
/* @__PURE__ */
|
|
2378
|
+
/* @__PURE__ */ jsx10(View6, { style: { position: "absolute", top: 0, bottom: 0, left: 0, width: thickness }, children: /* @__PURE__ */ jsx10(
|
|
2343
2379
|
LinearGradient,
|
|
2344
2380
|
{
|
|
2345
2381
|
colors: [strong, soft, "transparent"],
|
|
@@ -2348,7 +2384,7 @@ function EdgeGlowFrame({
|
|
|
2348
2384
|
style: { width: "100%", height: "100%" }
|
|
2349
2385
|
}
|
|
2350
2386
|
) }),
|
|
2351
|
-
/* @__PURE__ */
|
|
2387
|
+
/* @__PURE__ */ jsx10(View6, { style: { position: "absolute", top: 0, bottom: 0, right: 0, width: thickness }, children: /* @__PURE__ */ jsx10(
|
|
2352
2388
|
LinearGradient,
|
|
2353
2389
|
{
|
|
2354
2390
|
colors: ["transparent", soft, strong],
|
|
@@ -2361,12 +2397,12 @@ function EdgeGlowFrame({
|
|
|
2361
2397
|
}
|
|
2362
2398
|
|
|
2363
2399
|
// src/components/draw/DrawModeOverlay.tsx
|
|
2364
|
-
import * as
|
|
2400
|
+
import * as React16 from "react";
|
|
2365
2401
|
import { StyleSheet as StyleSheet3, View as View10 } from "react-native";
|
|
2366
2402
|
import { captureRef } from "react-native-view-shot";
|
|
2367
2403
|
|
|
2368
2404
|
// src/components/draw/DrawSurface.tsx
|
|
2369
|
-
import * as
|
|
2405
|
+
import * as React14 from "react";
|
|
2370
2406
|
import { PanResponder as PanResponder2, StyleSheet as StyleSheet2, View as View7 } from "react-native";
|
|
2371
2407
|
import Svg, { Path } from "react-native-svg";
|
|
2372
2408
|
|
|
@@ -2389,7 +2425,7 @@ function pointsToSmoothPath(points) {
|
|
|
2389
2425
|
}
|
|
2390
2426
|
|
|
2391
2427
|
// src/components/draw/DrawSurface.tsx
|
|
2392
|
-
import { jsx as
|
|
2428
|
+
import { jsx as jsx11, jsxs as jsxs5 } from "react/jsx-runtime";
|
|
2393
2429
|
function DrawSurface({
|
|
2394
2430
|
color,
|
|
2395
2431
|
strokeWidth,
|
|
@@ -2398,25 +2434,25 @@ function DrawSurface({
|
|
|
2398
2434
|
style,
|
|
2399
2435
|
minDistance = 1
|
|
2400
2436
|
}) {
|
|
2401
|
-
const [renderTick, setRenderTick] =
|
|
2402
|
-
const currentPointsRef =
|
|
2403
|
-
const rafRef =
|
|
2404
|
-
const triggerRender =
|
|
2437
|
+
const [renderTick, setRenderTick] = React14.useState(0);
|
|
2438
|
+
const currentPointsRef = React14.useRef([]);
|
|
2439
|
+
const rafRef = React14.useRef(null);
|
|
2440
|
+
const triggerRender = React14.useCallback(() => {
|
|
2405
2441
|
if (rafRef.current !== null) return;
|
|
2406
2442
|
rafRef.current = requestAnimationFrame(() => {
|
|
2407
2443
|
rafRef.current = null;
|
|
2408
2444
|
setRenderTick((n) => n + 1);
|
|
2409
2445
|
});
|
|
2410
2446
|
}, []);
|
|
2411
|
-
|
|
2447
|
+
React14.useEffect(() => () => {
|
|
2412
2448
|
if (rafRef.current !== null) cancelAnimationFrame(rafRef.current);
|
|
2413
2449
|
}, []);
|
|
2414
|
-
const onStart =
|
|
2450
|
+
const onStart = React14.useCallback((e) => {
|
|
2415
2451
|
const { locationX, locationY } = e.nativeEvent;
|
|
2416
2452
|
currentPointsRef.current = [{ x: locationX, y: locationY }];
|
|
2417
2453
|
triggerRender();
|
|
2418
2454
|
}, [triggerRender]);
|
|
2419
|
-
const onMove =
|
|
2455
|
+
const onMove = React14.useCallback((e, _g) => {
|
|
2420
2456
|
const { locationX, locationY } = e.nativeEvent;
|
|
2421
2457
|
const pts = currentPointsRef.current;
|
|
2422
2458
|
if (pts.length > 0) {
|
|
@@ -2429,7 +2465,7 @@ function DrawSurface({
|
|
|
2429
2465
|
currentPointsRef.current = [...pts, { x: locationX, y: locationY }];
|
|
2430
2466
|
triggerRender();
|
|
2431
2467
|
}, [minDistance, triggerRender]);
|
|
2432
|
-
const onEnd =
|
|
2468
|
+
const onEnd = React14.useCallback(() => {
|
|
2433
2469
|
const points = currentPointsRef.current;
|
|
2434
2470
|
if (points.length > 0) {
|
|
2435
2471
|
onAddStroke({ points, color, width: strokeWidth });
|
|
@@ -2437,7 +2473,7 @@ function DrawSurface({
|
|
|
2437
2473
|
currentPointsRef.current = [];
|
|
2438
2474
|
triggerRender();
|
|
2439
2475
|
}, [color, onAddStroke, strokeWidth, triggerRender]);
|
|
2440
|
-
const panResponder =
|
|
2476
|
+
const panResponder = React14.useMemo(
|
|
2441
2477
|
() => PanResponder2.create({
|
|
2442
2478
|
onStartShouldSetPanResponder: () => true,
|
|
2443
2479
|
onMoveShouldSetPanResponder: () => true,
|
|
@@ -2450,11 +2486,11 @@ function DrawSurface({
|
|
|
2450
2486
|
);
|
|
2451
2487
|
const currentPath = pointsToSmoothPath(currentPointsRef.current);
|
|
2452
2488
|
void renderTick;
|
|
2453
|
-
return /* @__PURE__ */
|
|
2489
|
+
return /* @__PURE__ */ jsx11(View7, { style: [StyleSheet2.absoluteFill, styles2.container, style], ...panResponder.panHandlers, children: /* @__PURE__ */ jsxs5(Svg, { style: StyleSheet2.absoluteFill, width: "100%", height: "100%", children: [
|
|
2454
2490
|
strokes.map((s, idx) => {
|
|
2455
2491
|
const d = pointsToSmoothPath(s.points);
|
|
2456
2492
|
if (!d) return null;
|
|
2457
|
-
return /* @__PURE__ */
|
|
2493
|
+
return /* @__PURE__ */ jsx11(
|
|
2458
2494
|
Path,
|
|
2459
2495
|
{
|
|
2460
2496
|
d,
|
|
@@ -2467,7 +2503,7 @@ function DrawSurface({
|
|
|
2467
2503
|
idx
|
|
2468
2504
|
);
|
|
2469
2505
|
}),
|
|
2470
|
-
currentPath ? /* @__PURE__ */
|
|
2506
|
+
currentPath ? /* @__PURE__ */ jsx11(
|
|
2471
2507
|
Path,
|
|
2472
2508
|
{
|
|
2473
2509
|
d: currentPath,
|
|
@@ -2487,7 +2523,7 @@ var styles2 = StyleSheet2.create({
|
|
|
2487
2523
|
});
|
|
2488
2524
|
|
|
2489
2525
|
// src/components/draw/DrawToolbar.tsx
|
|
2490
|
-
import * as
|
|
2526
|
+
import * as React15 from "react";
|
|
2491
2527
|
import {
|
|
2492
2528
|
ActivityIndicator,
|
|
2493
2529
|
Animated as Animated4,
|
|
@@ -2515,7 +2551,7 @@ async function impact(style) {
|
|
|
2515
2551
|
|
|
2516
2552
|
// src/components/draw/DrawColorPicker.tsx
|
|
2517
2553
|
import { Pressable as Pressable2, View as View8 } from "react-native";
|
|
2518
|
-
import { jsx as
|
|
2554
|
+
import { jsx as jsx12 } from "react/jsx-runtime";
|
|
2519
2555
|
function DrawColorPicker({
|
|
2520
2556
|
colors,
|
|
2521
2557
|
selected,
|
|
@@ -2549,9 +2585,9 @@ function DrawColorPicker({
|
|
|
2549
2585
|
return { ...base, ...selectedStyle, ...whiteStyle };
|
|
2550
2586
|
};
|
|
2551
2587
|
if (!expanded) {
|
|
2552
|
-
return /* @__PURE__ */
|
|
2588
|
+
return /* @__PURE__ */ jsx12(Pressable2, { onPress: onToggle, style: [swatchStyle(selected, true), style] });
|
|
2553
2589
|
}
|
|
2554
|
-
return /* @__PURE__ */
|
|
2590
|
+
return /* @__PURE__ */ jsx12(View8, { style: [{ flexDirection: "row", alignItems: "center", gap: 8 }, style], children: colors.map((c, idx) => /* @__PURE__ */ jsx12(
|
|
2555
2591
|
Pressable2,
|
|
2556
2592
|
{
|
|
2557
2593
|
onPress: () => {
|
|
@@ -2565,7 +2601,7 @@ function DrawColorPicker({
|
|
|
2565
2601
|
}
|
|
2566
2602
|
|
|
2567
2603
|
// src/components/draw/DrawToolbar.tsx
|
|
2568
|
-
import { jsx as
|
|
2604
|
+
import { jsx as jsx13, jsxs as jsxs6 } from "react/jsx-runtime";
|
|
2569
2605
|
function DrawToolbar({
|
|
2570
2606
|
colors,
|
|
2571
2607
|
selectedColor,
|
|
@@ -2584,11 +2620,11 @@ function DrawToolbar({
|
|
|
2584
2620
|
}) {
|
|
2585
2621
|
const insets = useSafeAreaInsets2();
|
|
2586
2622
|
const { width: screenWidth, height: screenHeight } = useWindowDimensions2();
|
|
2587
|
-
const [expanded, setExpanded] =
|
|
2588
|
-
const pos =
|
|
2589
|
-
const start =
|
|
2590
|
-
const currentPos =
|
|
2591
|
-
|
|
2623
|
+
const [expanded, setExpanded] = React15.useState(false);
|
|
2624
|
+
const pos = React15.useRef(new Animated4.ValueXY({ x: screenWidth / 2 - 110, y: -140 })).current;
|
|
2625
|
+
const start = React15.useRef({ x: 0, y: 0 });
|
|
2626
|
+
const currentPos = React15.useRef({ x: 0, y: 0 });
|
|
2627
|
+
React15.useEffect(() => {
|
|
2592
2628
|
if (hidden) return;
|
|
2593
2629
|
Animated4.spring(pos.y, {
|
|
2594
2630
|
toValue: insets.top + 60,
|
|
@@ -2598,7 +2634,7 @@ function DrawToolbar({
|
|
|
2598
2634
|
mass: 0.8
|
|
2599
2635
|
}).start();
|
|
2600
2636
|
}, [hidden, insets.top, pos.y]);
|
|
2601
|
-
|
|
2637
|
+
React15.useEffect(() => {
|
|
2602
2638
|
const id = pos.addListener((v) => {
|
|
2603
2639
|
currentPos.current = { x: v.x ?? 0, y: v.y ?? 0 };
|
|
2604
2640
|
});
|
|
@@ -2606,7 +2642,7 @@ function DrawToolbar({
|
|
|
2606
2642
|
pos.removeListener(id);
|
|
2607
2643
|
};
|
|
2608
2644
|
}, [pos]);
|
|
2609
|
-
const clamp2 =
|
|
2645
|
+
const clamp2 = React15.useCallback(
|
|
2610
2646
|
(x, y) => {
|
|
2611
2647
|
const minX = 10;
|
|
2612
2648
|
const maxX = Math.max(10, screenWidth - 230);
|
|
@@ -2616,7 +2652,7 @@ function DrawToolbar({
|
|
|
2616
2652
|
},
|
|
2617
2653
|
[insets.top, screenHeight, screenWidth]
|
|
2618
2654
|
);
|
|
2619
|
-
const panResponder =
|
|
2655
|
+
const panResponder = React15.useMemo(
|
|
2620
2656
|
() => PanResponder3.create({
|
|
2621
2657
|
onStartShouldSetPanResponder: () => false,
|
|
2622
2658
|
onMoveShouldSetPanResponder: (_e, g) => Math.abs(g.dx) > 5 || Math.abs(g.dy) > 5,
|
|
@@ -2644,8 +2680,8 @@ function DrawToolbar({
|
|
|
2644
2680
|
children
|
|
2645
2681
|
}) {
|
|
2646
2682
|
const isDisabled = Boolean(disabled) || Boolean(capturingDisabled);
|
|
2647
|
-
const [pressed, setPressed] =
|
|
2648
|
-
return /* @__PURE__ */
|
|
2683
|
+
const [pressed, setPressed] = React15.useState(false);
|
|
2684
|
+
return /* @__PURE__ */ jsx13(
|
|
2649
2685
|
View9,
|
|
2650
2686
|
{
|
|
2651
2687
|
style: {
|
|
@@ -2657,7 +2693,7 @@ function DrawToolbar({
|
|
|
2657
2693
|
backgroundColor,
|
|
2658
2694
|
opacity: isDisabled ? 0.5 : pressed ? 0.85 : 1
|
|
2659
2695
|
},
|
|
2660
|
-
children: /* @__PURE__ */
|
|
2696
|
+
children: /* @__PURE__ */ jsx13(
|
|
2661
2697
|
Pressable3,
|
|
2662
2698
|
{
|
|
2663
2699
|
accessibilityRole: "button",
|
|
@@ -2674,7 +2710,7 @@ function DrawToolbar({
|
|
|
2674
2710
|
}
|
|
2675
2711
|
);
|
|
2676
2712
|
}
|
|
2677
|
-
return /* @__PURE__ */
|
|
2713
|
+
return /* @__PURE__ */ jsx13(
|
|
2678
2714
|
Animated4.View,
|
|
2679
2715
|
{
|
|
2680
2716
|
style: [
|
|
@@ -2691,7 +2727,7 @@ function DrawToolbar({
|
|
|
2691
2727
|
style
|
|
2692
2728
|
],
|
|
2693
2729
|
...panResponder.panHandlers,
|
|
2694
|
-
children: /* @__PURE__ */
|
|
2730
|
+
children: /* @__PURE__ */ jsx13(
|
|
2695
2731
|
View9,
|
|
2696
2732
|
{
|
|
2697
2733
|
style: {
|
|
@@ -2701,8 +2737,8 @@ function DrawToolbar({
|
|
|
2701
2737
|
minWidth: 220
|
|
2702
2738
|
},
|
|
2703
2739
|
children: /* @__PURE__ */ jsxs6(View9, { style: { flexDirection: "row", alignItems: "center", gap: 8 }, children: [
|
|
2704
|
-
renderDragHandle ? renderDragHandle() : /* @__PURE__ */
|
|
2705
|
-
/* @__PURE__ */
|
|
2740
|
+
renderDragHandle ? renderDragHandle() : /* @__PURE__ */ jsx13(GripVertical, { size: 20, color: "rgba(255, 255, 255, 0.6)" }),
|
|
2741
|
+
/* @__PURE__ */ jsx13(
|
|
2706
2742
|
DrawColorPicker,
|
|
2707
2743
|
{
|
|
2708
2744
|
colors,
|
|
@@ -2718,8 +2754,8 @@ function DrawToolbar({
|
|
|
2718
2754
|
}
|
|
2719
2755
|
}
|
|
2720
2756
|
),
|
|
2721
|
-
/* @__PURE__ */
|
|
2722
|
-
/* @__PURE__ */
|
|
2757
|
+
/* @__PURE__ */ jsx13(View9, { style: { width: 1, height: 20, backgroundColor: "rgba(255, 255, 255, 0.3)", marginHorizontal: 4 } }),
|
|
2758
|
+
/* @__PURE__ */ jsx13(
|
|
2723
2759
|
CircleActionButton,
|
|
2724
2760
|
{
|
|
2725
2761
|
accessibilityLabel: "Undo",
|
|
@@ -2730,10 +2766,10 @@ function DrawToolbar({
|
|
|
2730
2766
|
void impact("light");
|
|
2731
2767
|
onUndo();
|
|
2732
2768
|
},
|
|
2733
|
-
children: renderUndoIcon ? renderUndoIcon() : /* @__PURE__ */
|
|
2769
|
+
children: renderUndoIcon ? renderUndoIcon() : /* @__PURE__ */ jsx13(Undo2, { size: 16, color: canUndo ? "#FFFFFF" : "rgba(255,255,255,0.4)" })
|
|
2734
2770
|
}
|
|
2735
2771
|
),
|
|
2736
|
-
/* @__PURE__ */
|
|
2772
|
+
/* @__PURE__ */ jsx13(
|
|
2737
2773
|
CircleActionButton,
|
|
2738
2774
|
{
|
|
2739
2775
|
accessibilityLabel: "Cancel",
|
|
@@ -2743,10 +2779,10 @@ function DrawToolbar({
|
|
|
2743
2779
|
void impact("medium");
|
|
2744
2780
|
onCancel();
|
|
2745
2781
|
},
|
|
2746
|
-
children: renderCancelIcon ? renderCancelIcon() : /* @__PURE__ */
|
|
2782
|
+
children: renderCancelIcon ? renderCancelIcon() : /* @__PURE__ */ jsx13(X, { size: 16, color: "#FFFFFF" })
|
|
2747
2783
|
}
|
|
2748
2784
|
),
|
|
2749
|
-
/* @__PURE__ */
|
|
2785
|
+
/* @__PURE__ */ jsx13(
|
|
2750
2786
|
CircleActionButton,
|
|
2751
2787
|
{
|
|
2752
2788
|
accessibilityLabel: "Done",
|
|
@@ -2756,7 +2792,7 @@ function DrawToolbar({
|
|
|
2756
2792
|
void impact("medium");
|
|
2757
2793
|
onDone();
|
|
2758
2794
|
},
|
|
2759
|
-
children: capturing ? /* @__PURE__ */
|
|
2795
|
+
children: capturing ? /* @__PURE__ */ jsx13(ActivityIndicator, { color: "#FFFFFF", size: "small" }) : renderDoneIcon ? renderDoneIcon() : /* @__PURE__ */ jsx13(Check, { size: 16, color: "#FFFFFF" })
|
|
2760
2796
|
}
|
|
2761
2797
|
)
|
|
2762
2798
|
] })
|
|
@@ -2767,7 +2803,7 @@ function DrawToolbar({
|
|
|
2767
2803
|
}
|
|
2768
2804
|
|
|
2769
2805
|
// src/components/draw/DrawModeOverlay.tsx
|
|
2770
|
-
import { jsx as
|
|
2806
|
+
import { jsx as jsx14, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
2771
2807
|
function DrawModeOverlay({
|
|
2772
2808
|
visible,
|
|
2773
2809
|
captureTargetRef,
|
|
@@ -2782,7 +2818,7 @@ function DrawModeOverlay({
|
|
|
2782
2818
|
renderDragHandle
|
|
2783
2819
|
}) {
|
|
2784
2820
|
const theme = useTheme();
|
|
2785
|
-
const defaultPalette =
|
|
2821
|
+
const defaultPalette = React16.useMemo(
|
|
2786
2822
|
() => [
|
|
2787
2823
|
"#EF4444",
|
|
2788
2824
|
// Red
|
|
@@ -2800,11 +2836,11 @@ function DrawModeOverlay({
|
|
|
2800
2836
|
[]
|
|
2801
2837
|
);
|
|
2802
2838
|
const colors = palette && palette.length > 0 ? palette : defaultPalette;
|
|
2803
|
-
const [selectedColor, setSelectedColor] =
|
|
2804
|
-
const [strokes, setStrokes] =
|
|
2805
|
-
const [capturing, setCapturing] =
|
|
2806
|
-
const [hideUi, setHideUi] =
|
|
2807
|
-
|
|
2839
|
+
const [selectedColor, setSelectedColor] = React16.useState(colors[0] ?? "#EF4444");
|
|
2840
|
+
const [strokes, setStrokes] = React16.useState([]);
|
|
2841
|
+
const [capturing, setCapturing] = React16.useState(false);
|
|
2842
|
+
const [hideUi, setHideUi] = React16.useState(false);
|
|
2843
|
+
React16.useEffect(() => {
|
|
2808
2844
|
if (!visible) return;
|
|
2809
2845
|
setStrokes([]);
|
|
2810
2846
|
setSelectedColor(colors[0] ?? "#EF4444");
|
|
@@ -2812,14 +2848,14 @@ function DrawModeOverlay({
|
|
|
2812
2848
|
setHideUi(false);
|
|
2813
2849
|
}, [colors, visible]);
|
|
2814
2850
|
const canUndo = strokes.length > 0;
|
|
2815
|
-
const handleUndo =
|
|
2851
|
+
const handleUndo = React16.useCallback(() => {
|
|
2816
2852
|
setStrokes((prev) => prev.slice(0, -1));
|
|
2817
2853
|
}, []);
|
|
2818
|
-
const handleCancel =
|
|
2854
|
+
const handleCancel = React16.useCallback(() => {
|
|
2819
2855
|
setStrokes([]);
|
|
2820
2856
|
onCancel();
|
|
2821
2857
|
}, [onCancel]);
|
|
2822
|
-
const handleDone =
|
|
2858
|
+
const handleDone = React16.useCallback(async () => {
|
|
2823
2859
|
if (!captureTargetRef.current || capturing) return;
|
|
2824
2860
|
try {
|
|
2825
2861
|
setCapturing(true);
|
|
@@ -2842,8 +2878,8 @@ function DrawModeOverlay({
|
|
|
2842
2878
|
}, [captureTargetRef, capturing, onCapture]);
|
|
2843
2879
|
if (!visible) return null;
|
|
2844
2880
|
return /* @__PURE__ */ jsxs7(View10, { style: [StyleSheet3.absoluteFill, styles3.root, style], pointerEvents: "box-none", children: [
|
|
2845
|
-
/* @__PURE__ */
|
|
2846
|
-
/* @__PURE__ */
|
|
2881
|
+
/* @__PURE__ */ jsx14(EdgeGlowFrame, { visible: !hideUi, role: "danger", thickness: 50, intensity: 1 }),
|
|
2882
|
+
/* @__PURE__ */ jsx14(
|
|
2847
2883
|
DrawSurface,
|
|
2848
2884
|
{
|
|
2849
2885
|
color: selectedColor,
|
|
@@ -2852,7 +2888,7 @@ function DrawModeOverlay({
|
|
|
2852
2888
|
onAddStroke: (stroke) => setStrokes((prev) => [...prev, stroke])
|
|
2853
2889
|
}
|
|
2854
2890
|
),
|
|
2855
|
-
/* @__PURE__ */
|
|
2891
|
+
/* @__PURE__ */ jsx14(
|
|
2856
2892
|
DrawToolbar,
|
|
2857
2893
|
{
|
|
2858
2894
|
hidden: hideUi,
|
|
@@ -2879,19 +2915,19 @@ var styles3 = StyleSheet3.create({
|
|
|
2879
2915
|
});
|
|
2880
2916
|
|
|
2881
2917
|
// src/components/comments/AppCommentsSheet.tsx
|
|
2882
|
-
import * as
|
|
2883
|
-
import { ActivityIndicator as ActivityIndicator3, Keyboard as Keyboard3, Platform as
|
|
2918
|
+
import * as React23 from "react";
|
|
2919
|
+
import { ActivityIndicator as ActivityIndicator3, Keyboard as Keyboard3, Platform as Platform6, Pressable as Pressable5, View as View14 } from "react-native";
|
|
2884
2920
|
import {
|
|
2885
2921
|
BottomSheetBackdrop,
|
|
2886
2922
|
BottomSheetModal,
|
|
2887
2923
|
BottomSheetScrollView
|
|
2888
2924
|
} from "@gorhom/bottom-sheet";
|
|
2889
2925
|
import { useSafeAreaInsets as useSafeAreaInsets3 } from "react-native-safe-area-context";
|
|
2890
|
-
import {
|
|
2926
|
+
import { isLiquidGlassSupported as isLiquidGlassSupported4 } from "@callstack/liquid-glass";
|
|
2891
2927
|
import { Play as Play2 } from "lucide-react-native";
|
|
2892
2928
|
|
|
2893
2929
|
// src/components/chat/ChatComposer.tsx
|
|
2894
|
-
import * as
|
|
2930
|
+
import * as React18 from "react";
|
|
2895
2931
|
import {
|
|
2896
2932
|
ActivityIndicator as ActivityIndicator2,
|
|
2897
2933
|
Animated as Animated5,
|
|
@@ -2901,15 +2937,15 @@ import {
|
|
|
2901
2937
|
ScrollView,
|
|
2902
2938
|
View as View11
|
|
2903
2939
|
} from "react-native";
|
|
2904
|
-
import {
|
|
2940
|
+
import { isLiquidGlassSupported as isLiquidGlassSupported3 } from "@callstack/liquid-glass";
|
|
2905
2941
|
import { Plus } from "lucide-react-native";
|
|
2906
2942
|
|
|
2907
2943
|
// src/components/chat/MultilineTextInput.tsx
|
|
2908
|
-
import * as
|
|
2944
|
+
import * as React17 from "react";
|
|
2909
2945
|
import { TextInput } from "react-native";
|
|
2910
2946
|
import { BottomSheetTextInput } from "@gorhom/bottom-sheet";
|
|
2911
|
-
import { jsx as
|
|
2912
|
-
var MultilineTextInput =
|
|
2947
|
+
import { jsx as jsx15 } from "react/jsx-runtime";
|
|
2948
|
+
var MultilineTextInput = React17.forwardRef(function MultilineTextInput2({ useBottomSheetTextInput = false, placeholder, placeholderTextColor, style, ...props }, ref) {
|
|
2913
2949
|
const theme = useTheme();
|
|
2914
2950
|
const baseStyle = {
|
|
2915
2951
|
minHeight: 44,
|
|
@@ -2929,7 +2965,7 @@ var MultilineTextInput = React15.forwardRef(function MultilineTextInput2({ useBo
|
|
|
2929
2965
|
style: [baseStyle, style],
|
|
2930
2966
|
textAlignVertical: "top"
|
|
2931
2967
|
};
|
|
2932
|
-
return useBottomSheetTextInput ? /* @__PURE__ */
|
|
2968
|
+
return useBottomSheetTextInput ? /* @__PURE__ */ jsx15(BottomSheetTextInput, { ref, ...commonProps }) : /* @__PURE__ */ jsx15(TextInput, { ref, ...commonProps });
|
|
2933
2969
|
});
|
|
2934
2970
|
|
|
2935
2971
|
// src/components/icons/StudioIcons.tsx
|
|
@@ -2946,7 +2982,7 @@ import {
|
|
|
2946
2982
|
X as X2,
|
|
2947
2983
|
Check as Check2
|
|
2948
2984
|
} from "lucide-react-native";
|
|
2949
|
-
import { jsx as
|
|
2985
|
+
import { jsx as jsx16 } from "react/jsx-runtime";
|
|
2950
2986
|
function useResolvedIconColor(token) {
|
|
2951
2987
|
const theme = useTheme();
|
|
2952
2988
|
switch (token) {
|
|
@@ -2970,7 +3006,7 @@ function useResolvedIconColor(token) {
|
|
|
2970
3006
|
function makeIcon(Comp) {
|
|
2971
3007
|
return function StudioIcon({ size = 20, strokeWidth = 2, colorToken = "floatingContent", ...rest }) {
|
|
2972
3008
|
const color = useResolvedIconColor(colorToken);
|
|
2973
|
-
return /* @__PURE__ */
|
|
3009
|
+
return /* @__PURE__ */ jsx16(Comp, { size, strokeWidth, color, ...rest });
|
|
2974
3010
|
};
|
|
2975
3011
|
}
|
|
2976
3012
|
var IconHome = makeIcon(Home);
|
|
@@ -2986,16 +3022,16 @@ var IconArrowDown = makeIcon(ArrowDown);
|
|
|
2986
3022
|
var IconApprove = makeIcon(Check2);
|
|
2987
3023
|
|
|
2988
3024
|
// src/components/chat/ChatComposer.tsx
|
|
2989
|
-
import { jsx as
|
|
3025
|
+
import { jsx as jsx17, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
2990
3026
|
var THUMBNAIL_HEIGHT = 90;
|
|
2991
3027
|
function AspectRatioThumbnail({
|
|
2992
3028
|
uri,
|
|
2993
3029
|
onRemove,
|
|
2994
3030
|
renderRemoveIcon
|
|
2995
3031
|
}) {
|
|
2996
|
-
const [aspectRatio, setAspectRatio] =
|
|
3032
|
+
const [aspectRatio, setAspectRatio] = React18.useState(1);
|
|
2997
3033
|
return /* @__PURE__ */ jsxs8(View11, { style: { height: THUMBNAIL_HEIGHT, aspectRatio, position: "relative" }, children: [
|
|
2998
|
-
/* @__PURE__ */
|
|
3034
|
+
/* @__PURE__ */ jsx17(View11, { style: { flex: 1, borderRadius: 8, overflow: "hidden" }, children: /* @__PURE__ */ jsx17(
|
|
2999
3035
|
Image,
|
|
3000
3036
|
{
|
|
3001
3037
|
source: { uri },
|
|
@@ -3008,7 +3044,7 @@ function AspectRatioThumbnail({
|
|
|
3008
3044
|
}
|
|
3009
3045
|
}
|
|
3010
3046
|
) }),
|
|
3011
|
-
onRemove ? /* @__PURE__ */
|
|
3047
|
+
onRemove ? /* @__PURE__ */ jsx17(
|
|
3012
3048
|
Pressable4,
|
|
3013
3049
|
{
|
|
3014
3050
|
style: {
|
|
@@ -3025,7 +3061,7 @@ function AspectRatioThumbnail({
|
|
|
3025
3061
|
},
|
|
3026
3062
|
onPress: onRemove,
|
|
3027
3063
|
hitSlop: 10,
|
|
3028
|
-
children: renderRemoveIcon ? renderRemoveIcon() : /* @__PURE__ */
|
|
3064
|
+
children: renderRemoveIcon ? renderRemoveIcon() : /* @__PURE__ */ jsx17(IconClose, { size: 12, colorToken: "onPrimary" })
|
|
3029
3065
|
}
|
|
3030
3066
|
) : null
|
|
3031
3067
|
] });
|
|
@@ -3050,19 +3086,19 @@ function ChatComposer({
|
|
|
3050
3086
|
style
|
|
3051
3087
|
}) {
|
|
3052
3088
|
const theme = useTheme();
|
|
3053
|
-
const [internal, setInternal] =
|
|
3089
|
+
const [internal, setInternal] = React18.useState("");
|
|
3054
3090
|
const text = value ?? internal;
|
|
3055
3091
|
const setText = onChangeValue ?? setInternal;
|
|
3056
3092
|
const hasAttachments = attachments.length > 0;
|
|
3057
3093
|
const hasText = text.trim().length > 0;
|
|
3058
3094
|
const composerMinHeight = hasAttachments ? THUMBNAIL_HEIGHT + 44 + 24 : 44;
|
|
3059
3095
|
const isButtonDisabled = sending || disabled || sendDisabled;
|
|
3060
|
-
const maxInputHeight =
|
|
3061
|
-
const shakeAnim =
|
|
3062
|
-
const [sendPressed, setSendPressed] =
|
|
3063
|
-
const inputRef =
|
|
3064
|
-
const prevAutoFocusRef =
|
|
3065
|
-
|
|
3096
|
+
const maxInputHeight = React18.useMemo(() => Dimensions.get("window").height * 0.5, []);
|
|
3097
|
+
const shakeAnim = React18.useRef(new Animated5.Value(0)).current;
|
|
3098
|
+
const [sendPressed, setSendPressed] = React18.useState(false);
|
|
3099
|
+
const inputRef = React18.useRef(null);
|
|
3100
|
+
const prevAutoFocusRef = React18.useRef(false);
|
|
3101
|
+
React18.useEffect(() => {
|
|
3066
3102
|
const shouldFocus = autoFocus && !prevAutoFocusRef.current && !disabled && !sending;
|
|
3067
3103
|
prevAutoFocusRef.current = autoFocus;
|
|
3068
3104
|
if (!shouldFocus) return;
|
|
@@ -3072,7 +3108,7 @@ function ChatComposer({
|
|
|
3072
3108
|
}, 75);
|
|
3073
3109
|
return () => clearTimeout(t);
|
|
3074
3110
|
}, [autoFocus, disabled, sending]);
|
|
3075
|
-
const triggerShake =
|
|
3111
|
+
const triggerShake = React18.useCallback(() => {
|
|
3076
3112
|
shakeAnim.setValue(0);
|
|
3077
3113
|
Animated5.sequence([
|
|
3078
3114
|
Animated5.timing(shakeAnim, { toValue: 10, duration: 50, useNativeDriver: true }),
|
|
@@ -3082,7 +3118,7 @@ function ChatComposer({
|
|
|
3082
3118
|
Animated5.timing(shakeAnim, { toValue: 0, duration: 50, useNativeDriver: true })
|
|
3083
3119
|
]).start();
|
|
3084
3120
|
}, [shakeAnim]);
|
|
3085
|
-
const handleSend =
|
|
3121
|
+
const handleSend = React18.useCallback(async () => {
|
|
3086
3122
|
if (isButtonDisabled) return;
|
|
3087
3123
|
if (!hasText) {
|
|
3088
3124
|
triggerShake();
|
|
@@ -3094,14 +3130,15 @@ function ChatComposer({
|
|
|
3094
3130
|
}, [attachments, hasText, isButtonDisabled, onSend, setText, text, triggerShake]);
|
|
3095
3131
|
const textareaBgColor = theme.scheme === "dark" ? "#18181B" : "#F6F6F6";
|
|
3096
3132
|
const placeholderTextColor = theme.scheme === "dark" ? "#A1A1AA" : "#71717A";
|
|
3097
|
-
|
|
3133
|
+
const sendBg = withAlpha(theme.colors.primary, isButtonDisabled ? 0.6 : sendPressed ? 0.9 : 1);
|
|
3134
|
+
return /* @__PURE__ */ jsx17(
|
|
3098
3135
|
View11,
|
|
3099
3136
|
{
|
|
3100
3137
|
style: [{ paddingHorizontal: 16, paddingBottom: 12, paddingTop: 8 }, style],
|
|
3101
3138
|
onLayout: (e) => onLayout == null ? void 0 : onLayout({ height: e.nativeEvent.layout.height }),
|
|
3102
3139
|
children: /* @__PURE__ */ jsxs8(View11, { style: { flexDirection: "row", alignItems: "flex-end", gap: 8 }, children: [
|
|
3103
|
-
/* @__PURE__ */
|
|
3104
|
-
|
|
3140
|
+
/* @__PURE__ */ jsx17(Animated5.View, { style: { flex: 1, transform: [{ translateX: shakeAnim }] }, children: /* @__PURE__ */ jsxs8(
|
|
3141
|
+
ResettableLiquidGlassView,
|
|
3105
3142
|
{
|
|
3106
3143
|
style: [
|
|
3107
3144
|
// LiquidGlassView doesn't reliably auto-size to children; ensure enough height for the
|
|
@@ -3120,7 +3157,7 @@ function ChatComposer({
|
|
|
3120
3157
|
keyboardShouldPersistTaps: "handled",
|
|
3121
3158
|
contentContainerStyle: { gap: 8, paddingHorizontal: 12, paddingTop: 12 },
|
|
3122
3159
|
children: [
|
|
3123
|
-
attachments.map((uri, index) => /* @__PURE__ */
|
|
3160
|
+
attachments.map((uri, index) => /* @__PURE__ */ jsx17(
|
|
3124
3161
|
AspectRatioThumbnail,
|
|
3125
3162
|
{
|
|
3126
3163
|
uri,
|
|
@@ -3129,7 +3166,7 @@ function ChatComposer({
|
|
|
3129
3166
|
},
|
|
3130
3167
|
`attachment-${index}`
|
|
3131
3168
|
)),
|
|
3132
|
-
onAddAttachment ? renderAddAttachment ? renderAddAttachment() : /* @__PURE__ */
|
|
3169
|
+
onAddAttachment ? renderAddAttachment ? renderAddAttachment() : /* @__PURE__ */ jsx17(
|
|
3133
3170
|
Pressable4,
|
|
3134
3171
|
{
|
|
3135
3172
|
style: {
|
|
@@ -3144,13 +3181,13 @@ function ChatComposer({
|
|
|
3144
3181
|
backgroundColor: "rgba(255, 255, 255, 0.05)"
|
|
3145
3182
|
},
|
|
3146
3183
|
onPress: onAddAttachment,
|
|
3147
|
-
children: /* @__PURE__ */
|
|
3184
|
+
children: /* @__PURE__ */ jsx17(Plus, { size: 24, color: "rgba(255, 255, 255, 0.5)" })
|
|
3148
3185
|
}
|
|
3149
3186
|
) : null
|
|
3150
3187
|
]
|
|
3151
3188
|
}
|
|
3152
3189
|
) : null,
|
|
3153
|
-
/* @__PURE__ */
|
|
3190
|
+
/* @__PURE__ */ jsx17(
|
|
3154
3191
|
MultilineTextInput,
|
|
3155
3192
|
{
|
|
3156
3193
|
ref: inputRef,
|
|
@@ -3175,13 +3212,13 @@ function ChatComposer({
|
|
|
3175
3212
|
]
|
|
3176
3213
|
}
|
|
3177
3214
|
) }),
|
|
3178
|
-
/* @__PURE__ */
|
|
3179
|
-
|
|
3215
|
+
/* @__PURE__ */ jsx17(
|
|
3216
|
+
ResettableLiquidGlassView,
|
|
3180
3217
|
{
|
|
3181
3218
|
style: [{ borderRadius: 100 }, !isLiquidGlassSupported3 && { backgroundColor: textareaBgColor }],
|
|
3182
3219
|
interactive: true,
|
|
3183
3220
|
effect: "clear",
|
|
3184
|
-
children: /* @__PURE__ */
|
|
3221
|
+
children: /* @__PURE__ */ jsx17(
|
|
3185
3222
|
View11,
|
|
3186
3223
|
{
|
|
3187
3224
|
style: {
|
|
@@ -3189,10 +3226,9 @@ function ChatComposer({
|
|
|
3189
3226
|
height: 44,
|
|
3190
3227
|
borderRadius: 22,
|
|
3191
3228
|
overflow: "hidden",
|
|
3192
|
-
backgroundColor:
|
|
3193
|
-
opacity: isButtonDisabled ? 0.6 : sendPressed ? 0.9 : 1
|
|
3229
|
+
backgroundColor: sendBg
|
|
3194
3230
|
},
|
|
3195
|
-
children: /* @__PURE__ */
|
|
3231
|
+
children: /* @__PURE__ */ jsx17(
|
|
3196
3232
|
Pressable4,
|
|
3197
3233
|
{
|
|
3198
3234
|
accessibilityRole: "button",
|
|
@@ -3202,7 +3238,7 @@ function ChatComposer({
|
|
|
3202
3238
|
onPressIn: () => setSendPressed(true),
|
|
3203
3239
|
onPressOut: () => setSendPressed(false),
|
|
3204
3240
|
style: { flex: 1, alignItems: "center", justifyContent: "center" },
|
|
3205
|
-
children: sending ? /* @__PURE__ */
|
|
3241
|
+
children: sending ? /* @__PURE__ */ jsx17(ActivityIndicator2, {}) : renderSendIcon ? renderSendIcon() : /* @__PURE__ */ jsx17(IconChevronRight, { size: 20, colorToken: "onPrimary" })
|
|
3206
3242
|
}
|
|
3207
3243
|
)
|
|
3208
3244
|
}
|
|
@@ -3215,12 +3251,12 @@ function ChatComposer({
|
|
|
3215
3251
|
}
|
|
3216
3252
|
|
|
3217
3253
|
// src/components/comments/CommentRow.tsx
|
|
3218
|
-
import * as
|
|
3254
|
+
import * as React19 from "react";
|
|
3219
3255
|
import { View as View13 } from "react-native";
|
|
3220
3256
|
|
|
3221
3257
|
// src/components/primitives/Avatar.tsx
|
|
3222
3258
|
import { Image as Image2, View as View12 } from "react-native";
|
|
3223
|
-
import { jsx as
|
|
3259
|
+
import { jsx as jsx18 } from "react/jsx-runtime";
|
|
3224
3260
|
function initialsFrom(name) {
|
|
3225
3261
|
var _a, _b;
|
|
3226
3262
|
const trimmed = (name ?? "").trim();
|
|
@@ -3238,7 +3274,7 @@ function Avatar({
|
|
|
3238
3274
|
const theme = useTheme();
|
|
3239
3275
|
const radius = size / 2;
|
|
3240
3276
|
const fallbackBg = fallbackBackgroundColor ?? theme.colors.neutral;
|
|
3241
|
-
return /* @__PURE__ */
|
|
3277
|
+
return /* @__PURE__ */ jsx18(
|
|
3242
3278
|
View12,
|
|
3243
3279
|
{
|
|
3244
3280
|
style: [
|
|
@@ -3253,14 +3289,14 @@ function Avatar({
|
|
|
3253
3289
|
},
|
|
3254
3290
|
style
|
|
3255
3291
|
],
|
|
3256
|
-
children: uri ? /* @__PURE__ */
|
|
3292
|
+
children: uri ? /* @__PURE__ */ jsx18(
|
|
3257
3293
|
Image2,
|
|
3258
3294
|
{
|
|
3259
3295
|
source: { uri },
|
|
3260
3296
|
style: [{ width: size, height: size }, imageStyle],
|
|
3261
3297
|
resizeMode: "cover"
|
|
3262
3298
|
}
|
|
3263
|
-
) : /* @__PURE__ */
|
|
3299
|
+
) : /* @__PURE__ */ jsx18(Text, { variant: "caption", style: { color: theme.colors.onNeutral }, children: initialsFrom(name) })
|
|
3264
3300
|
}
|
|
3265
3301
|
);
|
|
3266
3302
|
}
|
|
@@ -3284,12 +3320,12 @@ function formatTimeAgo(iso) {
|
|
|
3284
3320
|
}
|
|
3285
3321
|
|
|
3286
3322
|
// src/components/comments/CommentRow.tsx
|
|
3287
|
-
import { jsx as
|
|
3323
|
+
import { jsx as jsx19, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
3288
3324
|
function CommentRow({ comment, showDivider }) {
|
|
3289
3325
|
const theme = useTheme();
|
|
3290
|
-
const [authorName, setAuthorName] =
|
|
3291
|
-
const [authorAvatar, setAuthorAvatar] =
|
|
3292
|
-
|
|
3326
|
+
const [authorName, setAuthorName] = React19.useState(null);
|
|
3327
|
+
const [authorAvatar, setAuthorAvatar] = React19.useState(null);
|
|
3328
|
+
React19.useEffect(() => {
|
|
3293
3329
|
let cancelled = false;
|
|
3294
3330
|
(async () => {
|
|
3295
3331
|
try {
|
|
@@ -3315,13 +3351,13 @@ function CommentRow({ comment, showDivider }) {
|
|
|
3315
3351
|
borderBottomColor: withAlpha(theme.colors.border, 0.5)
|
|
3316
3352
|
},
|
|
3317
3353
|
children: [
|
|
3318
|
-
/* @__PURE__ */
|
|
3354
|
+
/* @__PURE__ */ jsx19(Avatar, { size: 32, uri: authorAvatar, name: authorName ?? comment.authorId, style: { marginTop: 6 } }),
|
|
3319
3355
|
/* @__PURE__ */ jsxs9(View13, { style: { flex: 1, minWidth: 0, gap: 4 }, children: [
|
|
3320
3356
|
/* @__PURE__ */ jsxs9(View13, { style: { flexDirection: "row", alignItems: "center", gap: theme.spacing.sm }, children: [
|
|
3321
|
-
/* @__PURE__ */
|
|
3322
|
-
/* @__PURE__ */
|
|
3357
|
+
/* @__PURE__ */ jsx19(Text, { style: { fontSize: 14, lineHeight: 18, fontWeight: theme.typography.fontWeight.bold, color: theme.colors.text }, children: authorName ?? "Unknown User" }),
|
|
3358
|
+
/* @__PURE__ */ jsx19(Text, { style: { fontSize: 12, lineHeight: 16, color: theme.colors.textMuted }, children: formatTimeAgo(comment.createdAt) })
|
|
3323
3359
|
] }),
|
|
3324
|
-
/* @__PURE__ */
|
|
3360
|
+
/* @__PURE__ */ jsx19(Text, { style: { fontSize: 14, lineHeight: 20, color: theme.colors.text }, children: comment.body ?? comment.description ?? "" })
|
|
3325
3361
|
] })
|
|
3326
3362
|
]
|
|
3327
3363
|
}
|
|
@@ -3329,7 +3365,7 @@ function CommentRow({ comment, showDivider }) {
|
|
|
3329
3365
|
}
|
|
3330
3366
|
|
|
3331
3367
|
// src/components/comments/useAppComments.ts
|
|
3332
|
-
import * as
|
|
3368
|
+
import * as React20 from "react";
|
|
3333
3369
|
|
|
3334
3370
|
// src/data/comments/remote.ts
|
|
3335
3371
|
var AppCommentsRemoteDataSourceImpl = class extends BaseRemote {
|
|
@@ -3401,18 +3437,18 @@ var appCommentsRepository = new AppCommentsRepositoryImpl(appCommentsRemoteDataS
|
|
|
3401
3437
|
|
|
3402
3438
|
// src/components/comments/useAppComments.ts
|
|
3403
3439
|
function useAppComments(appId) {
|
|
3404
|
-
const [comments, setComments] =
|
|
3405
|
-
const [loading, setLoading] =
|
|
3406
|
-
const [sending, setSending] =
|
|
3407
|
-
const [error, setError] =
|
|
3408
|
-
const sortByCreatedAtAsc =
|
|
3440
|
+
const [comments, setComments] = React20.useState([]);
|
|
3441
|
+
const [loading, setLoading] = React20.useState(false);
|
|
3442
|
+
const [sending, setSending] = React20.useState(false);
|
|
3443
|
+
const [error, setError] = React20.useState(null);
|
|
3444
|
+
const sortByCreatedAtAsc = React20.useCallback((items) => {
|
|
3409
3445
|
return [...items].sort((a, b) => {
|
|
3410
3446
|
const at = a.createdAt ? new Date(a.createdAt).getTime() : 0;
|
|
3411
3447
|
const bt = b.createdAt ? new Date(b.createdAt).getTime() : 0;
|
|
3412
3448
|
return at - bt;
|
|
3413
3449
|
});
|
|
3414
3450
|
}, []);
|
|
3415
|
-
const refresh =
|
|
3451
|
+
const refresh = React20.useCallback(async () => {
|
|
3416
3452
|
if (!appId) {
|
|
3417
3453
|
setComments([]);
|
|
3418
3454
|
return;
|
|
@@ -3429,10 +3465,10 @@ function useAppComments(appId) {
|
|
|
3429
3465
|
setLoading(false);
|
|
3430
3466
|
}
|
|
3431
3467
|
}, [appId, sortByCreatedAtAsc]);
|
|
3432
|
-
|
|
3468
|
+
React20.useEffect(() => {
|
|
3433
3469
|
void refresh();
|
|
3434
3470
|
}, [refresh]);
|
|
3435
|
-
const create =
|
|
3471
|
+
const create = React20.useCallback(
|
|
3436
3472
|
async (text) => {
|
|
3437
3473
|
if (!appId) return;
|
|
3438
3474
|
const trimmed = text.trim();
|
|
@@ -3455,11 +3491,11 @@ function useAppComments(appId) {
|
|
|
3455
3491
|
}
|
|
3456
3492
|
|
|
3457
3493
|
// src/components/comments/useAppDetails.ts
|
|
3458
|
-
import * as
|
|
3494
|
+
import * as React21 from "react";
|
|
3459
3495
|
function useAppDetails(appId) {
|
|
3460
|
-
const [app, setApp] =
|
|
3461
|
-
const [loading, setLoading] =
|
|
3462
|
-
|
|
3496
|
+
const [app, setApp] = React21.useState(null);
|
|
3497
|
+
const [loading, setLoading] = React21.useState(false);
|
|
3498
|
+
React21.useEffect(() => {
|
|
3463
3499
|
if (!appId) {
|
|
3464
3500
|
setApp(null);
|
|
3465
3501
|
return;
|
|
@@ -3484,12 +3520,12 @@ function useAppDetails(appId) {
|
|
|
3484
3520
|
}
|
|
3485
3521
|
|
|
3486
3522
|
// src/components/comments/useIosKeyboardSnapFix.ts
|
|
3487
|
-
import * as
|
|
3488
|
-
import { Keyboard as Keyboard2, Platform as
|
|
3523
|
+
import * as React22 from "react";
|
|
3524
|
+
import { Keyboard as Keyboard2, Platform as Platform5 } from "react-native";
|
|
3489
3525
|
function useIosKeyboardSnapFix(sheetRef, options) {
|
|
3490
|
-
const [keyboardVisible, setKeyboardVisible] =
|
|
3491
|
-
|
|
3492
|
-
if (
|
|
3526
|
+
const [keyboardVisible, setKeyboardVisible] = React22.useState(false);
|
|
3527
|
+
React22.useEffect(() => {
|
|
3528
|
+
if (Platform5.OS !== "ios") return;
|
|
3493
3529
|
const show = Keyboard2.addListener("keyboardWillShow", () => setKeyboardVisible(true));
|
|
3494
3530
|
const hide = Keyboard2.addListener("keyboardWillHide", () => {
|
|
3495
3531
|
var _a;
|
|
@@ -3512,20 +3548,20 @@ function useIosKeyboardSnapFix(sheetRef, options) {
|
|
|
3512
3548
|
}
|
|
3513
3549
|
|
|
3514
3550
|
// src/components/comments/AppCommentsSheet.tsx
|
|
3515
|
-
import { jsx as
|
|
3551
|
+
import { jsx as jsx20, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
3516
3552
|
function AppCommentsSheet({ appId, onClose, onCountChange, onPlayApp }) {
|
|
3517
3553
|
const theme = useTheme();
|
|
3518
3554
|
const insets = useSafeAreaInsets3();
|
|
3519
|
-
const sheetRef =
|
|
3520
|
-
const snapPoints =
|
|
3521
|
-
const currentIndexRef =
|
|
3555
|
+
const sheetRef = React23.useRef(null);
|
|
3556
|
+
const snapPoints = React23.useMemo(() => ["50%", "90%"], []);
|
|
3557
|
+
const currentIndexRef = React23.useRef(1);
|
|
3522
3558
|
const { comments, loading, sending, error, create, refresh } = useAppComments(appId);
|
|
3523
3559
|
const { app, loading: loadingApp } = useAppDetails(appId);
|
|
3524
3560
|
const { keyboardVisible } = useIosKeyboardSnapFix(sheetRef, {
|
|
3525
3561
|
getCurrentIndex: () => currentIndexRef.current,
|
|
3526
3562
|
targetIndex: 1
|
|
3527
3563
|
});
|
|
3528
|
-
|
|
3564
|
+
React23.useEffect(() => {
|
|
3529
3565
|
var _a, _b;
|
|
3530
3566
|
if (appId) {
|
|
3531
3567
|
(_a = sheetRef.current) == null ? void 0 : _a.present();
|
|
@@ -3534,29 +3570,29 @@ function AppCommentsSheet({ appId, onClose, onCountChange, onPlayApp }) {
|
|
|
3534
3570
|
(_b = sheetRef.current) == null ? void 0 : _b.dismiss();
|
|
3535
3571
|
}
|
|
3536
3572
|
}, [appId, refresh]);
|
|
3537
|
-
|
|
3573
|
+
React23.useEffect(() => {
|
|
3538
3574
|
if (!appId) return;
|
|
3539
3575
|
onCountChange == null ? void 0 : onCountChange(comments.length);
|
|
3540
3576
|
}, [appId, comments.length, onCountChange]);
|
|
3541
|
-
const renderBackdrop =
|
|
3542
|
-
(props) => /* @__PURE__ */
|
|
3577
|
+
const renderBackdrop = React23.useCallback(
|
|
3578
|
+
(props) => /* @__PURE__ */ jsx20(BottomSheetBackdrop, { ...props, disappearsOnIndex: -1, appearsOnIndex: 0, opacity: 0.5 }),
|
|
3543
3579
|
[]
|
|
3544
3580
|
);
|
|
3545
|
-
const handleChange =
|
|
3581
|
+
const handleChange = React23.useCallback(
|
|
3546
3582
|
(index) => {
|
|
3547
3583
|
currentIndexRef.current = index;
|
|
3548
3584
|
if (index === -1) onClose();
|
|
3549
3585
|
},
|
|
3550
3586
|
[onClose]
|
|
3551
3587
|
);
|
|
3552
|
-
const handlePlay =
|
|
3588
|
+
const handlePlay = React23.useCallback(async () => {
|
|
3553
3589
|
var _a;
|
|
3554
3590
|
if (!appId) return;
|
|
3555
3591
|
(_a = sheetRef.current) == null ? void 0 : _a.dismiss();
|
|
3556
3592
|
await (onPlayApp == null ? void 0 : onPlayApp(appId));
|
|
3557
3593
|
onClose();
|
|
3558
3594
|
}, [appId, onClose, onPlayApp]);
|
|
3559
|
-
return /* @__PURE__ */
|
|
3595
|
+
return /* @__PURE__ */ jsx20(
|
|
3560
3596
|
BottomSheetModal,
|
|
3561
3597
|
{
|
|
3562
3598
|
ref: sheetRef,
|
|
@@ -3567,8 +3603,8 @@ function AppCommentsSheet({ appId, onClose, onCountChange, onPlayApp }) {
|
|
|
3567
3603
|
onChange: handleChange,
|
|
3568
3604
|
backgroundStyle: {
|
|
3569
3605
|
backgroundColor: theme.scheme === "dark" ? "#0B080F" : "#FFFFFF",
|
|
3570
|
-
borderTopLeftRadius:
|
|
3571
|
-
borderTopRightRadius:
|
|
3606
|
+
borderTopLeftRadius: Platform6.OS === "ios" ? 39 : 16,
|
|
3607
|
+
borderTopRightRadius: Platform6.OS === "ios" ? 39 : 16
|
|
3572
3608
|
},
|
|
3573
3609
|
handleIndicatorStyle: { backgroundColor: theme.colors.handleIndicator },
|
|
3574
3610
|
keyboardBehavior: "interactive",
|
|
@@ -3589,7 +3625,7 @@ function AppCommentsSheet({ appId, onClose, onCountChange, onPlayApp }) {
|
|
|
3589
3625
|
borderBottomColor: withAlpha(theme.colors.border, 0.1)
|
|
3590
3626
|
},
|
|
3591
3627
|
children: [
|
|
3592
|
-
/* @__PURE__ */
|
|
3628
|
+
/* @__PURE__ */ jsx20(
|
|
3593
3629
|
Text,
|
|
3594
3630
|
{
|
|
3595
3631
|
numberOfLines: 1,
|
|
@@ -3603,8 +3639,8 @@ function AppCommentsSheet({ appId, onClose, onCountChange, onPlayApp }) {
|
|
|
3603
3639
|
children: loadingApp ? "Loading..." : (app == null ? void 0 : app.name) || "Comments"
|
|
3604
3640
|
}
|
|
3605
3641
|
),
|
|
3606
|
-
/* @__PURE__ */
|
|
3607
|
-
|
|
3642
|
+
/* @__PURE__ */ jsx20(
|
|
3643
|
+
ResettableLiquidGlassView,
|
|
3608
3644
|
{
|
|
3609
3645
|
style: [
|
|
3610
3646
|
{ borderRadius: 24 },
|
|
@@ -3612,19 +3648,18 @@ function AppCommentsSheet({ appId, onClose, onCountChange, onPlayApp }) {
|
|
|
3612
3648
|
],
|
|
3613
3649
|
interactive: true,
|
|
3614
3650
|
effect: "clear",
|
|
3615
|
-
children: /* @__PURE__ */
|
|
3651
|
+
children: /* @__PURE__ */ jsx20(
|
|
3616
3652
|
View14,
|
|
3617
3653
|
{
|
|
3618
3654
|
style: {
|
|
3619
3655
|
width: 32,
|
|
3620
3656
|
height: 32,
|
|
3621
3657
|
borderRadius: 999,
|
|
3622
|
-
backgroundColor: theme.colors.primary,
|
|
3658
|
+
backgroundColor: withAlpha(theme.colors.primary, appId ? 1 : 0.5),
|
|
3623
3659
|
alignItems: "center",
|
|
3624
|
-
justifyContent: "center"
|
|
3625
|
-
opacity: appId ? 1 : 0.5
|
|
3660
|
+
justifyContent: "center"
|
|
3626
3661
|
},
|
|
3627
|
-
children: /* @__PURE__ */
|
|
3662
|
+
children: /* @__PURE__ */ jsx20(
|
|
3628
3663
|
Pressable5,
|
|
3629
3664
|
{
|
|
3630
3665
|
disabled: !appId,
|
|
@@ -3637,9 +3672,9 @@ function AppCommentsSheet({ appId, onClose, onCountChange, onPlayApp }) {
|
|
|
3637
3672
|
alignItems: "center",
|
|
3638
3673
|
justifyContent: "center"
|
|
3639
3674
|
},
|
|
3640
|
-
pressed ? {
|
|
3675
|
+
pressed ? { transform: [{ scale: 0.96 }] } : null
|
|
3641
3676
|
],
|
|
3642
|
-
children: /* @__PURE__ */
|
|
3677
|
+
children: /* @__PURE__ */ jsx20(Play2, { size: 16, color: theme.colors.onPrimary })
|
|
3643
3678
|
}
|
|
3644
3679
|
)
|
|
3645
3680
|
}
|
|
@@ -3660,12 +3695,12 @@ function AppCommentsSheet({ appId, onClose, onCountChange, onPlayApp }) {
|
|
|
3660
3695
|
},
|
|
3661
3696
|
keyboardShouldPersistTaps: "handled",
|
|
3662
3697
|
children: [
|
|
3663
|
-
loading && comments.length === 0 ? /* @__PURE__ */
|
|
3664
|
-
error ? /* @__PURE__ */
|
|
3698
|
+
loading && comments.length === 0 ? /* @__PURE__ */ jsx20(View14, { style: { flex: 1, alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ jsx20(ActivityIndicator3, {}) }) : comments.length === 0 ? /* @__PURE__ */ jsx20(View14, { style: { flex: 1, alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ jsx20(Text, { variant: "bodyMuted", style: { textAlign: "center" }, children: "No comments yet" }) }) : comments.map((c, idx) => /* @__PURE__ */ jsx20(CommentRow, { comment: c, showDivider: idx < comments.length - 1 }, c.id)),
|
|
3699
|
+
error ? /* @__PURE__ */ jsx20(Text, { variant: "captionMuted", style: { marginTop: theme.spacing.lg }, children: "Failed to load comments." }) : null
|
|
3665
3700
|
]
|
|
3666
3701
|
}
|
|
3667
3702
|
),
|
|
3668
|
-
/* @__PURE__ */
|
|
3703
|
+
/* @__PURE__ */ jsx20(
|
|
3669
3704
|
View14,
|
|
3670
3705
|
{
|
|
3671
3706
|
style: {
|
|
@@ -3675,12 +3710,12 @@ function AppCommentsSheet({ appId, onClose, onCountChange, onPlayApp }) {
|
|
|
3675
3710
|
bottom: 0,
|
|
3676
3711
|
paddingHorizontal: theme.spacing.lg,
|
|
3677
3712
|
paddingTop: theme.spacing.sm,
|
|
3678
|
-
paddingBottom:
|
|
3713
|
+
paddingBottom: Platform6.OS === "ios" ? keyboardVisible ? theme.spacing.lg : insets.bottom : insets.bottom + 10,
|
|
3679
3714
|
borderTopWidth: 1,
|
|
3680
3715
|
borderTopColor: withAlpha(theme.colors.border, 0.1),
|
|
3681
3716
|
backgroundColor: withAlpha(theme.colors.background, 0.8)
|
|
3682
3717
|
},
|
|
3683
|
-
children: /* @__PURE__ */
|
|
3718
|
+
children: /* @__PURE__ */ jsx20(
|
|
3684
3719
|
ChatComposer,
|
|
3685
3720
|
{
|
|
3686
3721
|
placeholder: "Write a comment...",
|
|
@@ -3706,12 +3741,12 @@ import { ActivityIndicator as ActivityIndicator7, View as View33 } from "react-n
|
|
|
3706
3741
|
// src/components/preview/PreviewPage.tsx
|
|
3707
3742
|
import { View as View15 } from "react-native";
|
|
3708
3743
|
import { BottomSheetScrollView as BottomSheetScrollView2 } from "@gorhom/bottom-sheet";
|
|
3709
|
-
import { jsx as
|
|
3744
|
+
import { jsx as jsx21, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
3710
3745
|
function PreviewPage({ header, children, contentStyle }) {
|
|
3711
3746
|
const theme = useTheme();
|
|
3712
3747
|
return /* @__PURE__ */ jsxs11(View15, { style: { flex: 1 }, children: [
|
|
3713
|
-
header ? /* @__PURE__ */
|
|
3714
|
-
/* @__PURE__ */
|
|
3748
|
+
header ? /* @__PURE__ */ jsx21(View15, { children: header }) : null,
|
|
3749
|
+
/* @__PURE__ */ jsx21(
|
|
3715
3750
|
BottomSheetScrollView2,
|
|
3716
3751
|
{
|
|
3717
3752
|
style: { flex: 1 },
|
|
@@ -3734,7 +3769,7 @@ import { View as View18 } from "react-native";
|
|
|
3734
3769
|
|
|
3735
3770
|
// src/components/studio-sheet/StudioSheetHeader.tsx
|
|
3736
3771
|
import { View as View16 } from "react-native";
|
|
3737
|
-
import { jsx as
|
|
3772
|
+
import { jsx as jsx22, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
3738
3773
|
function StudioSheetHeader({ left, center, right, style }) {
|
|
3739
3774
|
const theme = useTheme();
|
|
3740
3775
|
return /* @__PURE__ */ jsxs12(
|
|
@@ -3751,19 +3786,19 @@ function StudioSheetHeader({ left, center, right, style }) {
|
|
|
3751
3786
|
style
|
|
3752
3787
|
],
|
|
3753
3788
|
children: [
|
|
3754
|
-
/* @__PURE__ */
|
|
3755
|
-
/* @__PURE__ */
|
|
3756
|
-
/* @__PURE__ */
|
|
3789
|
+
/* @__PURE__ */ jsx22(View16, { style: { flexDirection: "row", alignItems: "center" }, children: left }),
|
|
3790
|
+
/* @__PURE__ */ jsx22(View16, { style: { flex: 1, alignItems: "center" }, children: center }),
|
|
3791
|
+
/* @__PURE__ */ jsx22(View16, { style: { flexDirection: "row", alignItems: "center" }, children: right })
|
|
3757
3792
|
]
|
|
3758
3793
|
}
|
|
3759
3794
|
);
|
|
3760
3795
|
}
|
|
3761
3796
|
|
|
3762
3797
|
// src/components/studio-sheet/StudioSheetHeaderIconButton.tsx
|
|
3763
|
-
import * as
|
|
3798
|
+
import * as React24 from "react";
|
|
3764
3799
|
import { Pressable as Pressable6, View as View17 } from "react-native";
|
|
3765
|
-
import {
|
|
3766
|
-
import { jsx as
|
|
3800
|
+
import { isLiquidGlassSupported as isLiquidGlassSupported5 } from "@callstack/liquid-glass";
|
|
3801
|
+
import { jsx as jsx23 } from "react/jsx-runtime";
|
|
3767
3802
|
function StudioSheetHeaderIconButton({
|
|
3768
3803
|
onPress,
|
|
3769
3804
|
disabled,
|
|
@@ -3775,18 +3810,19 @@ function StudioSheetHeaderIconButton({
|
|
|
3775
3810
|
}) {
|
|
3776
3811
|
const theme = useTheme();
|
|
3777
3812
|
const size = 44;
|
|
3778
|
-
const [pressed, setPressed] =
|
|
3813
|
+
const [pressed, setPressed] = React24.useState(false);
|
|
3779
3814
|
const solidBg = intent === "danger" ? theme.colors.danger : intent === "primary" ? theme.colors.primary : theme.colors.neutral;
|
|
3780
3815
|
const glassFallbackBg = theme.scheme === "dark" ? "#18181B" : "#F6F6F6";
|
|
3781
3816
|
const glassInnerBg = intent === "danger" ? theme.colors.danger : theme.colors.primary;
|
|
3782
3817
|
const resolvedOpacity = disabled ? 0.6 : pressed ? 0.9 : 1;
|
|
3783
|
-
|
|
3784
|
-
|
|
3818
|
+
const glassBg = withAlpha(glassInnerBg, resolvedOpacity);
|
|
3819
|
+
return /* @__PURE__ */ jsx23(View17, { style, children: appearance === "glass" ? /* @__PURE__ */ jsx23(
|
|
3820
|
+
ResettableLiquidGlassView,
|
|
3785
3821
|
{
|
|
3786
3822
|
style: [{ borderRadius: 100 }, !isLiquidGlassSupported5 && { backgroundColor: glassFallbackBg }],
|
|
3787
3823
|
interactive: true,
|
|
3788
3824
|
effect: "clear",
|
|
3789
|
-
children: /* @__PURE__ */
|
|
3825
|
+
children: /* @__PURE__ */ jsx23(
|
|
3790
3826
|
View17,
|
|
3791
3827
|
{
|
|
3792
3828
|
style: {
|
|
@@ -3795,10 +3831,9 @@ function StudioSheetHeaderIconButton({
|
|
|
3795
3831
|
borderRadius: 100,
|
|
3796
3832
|
alignItems: "center",
|
|
3797
3833
|
justifyContent: "center",
|
|
3798
|
-
backgroundColor:
|
|
3799
|
-
opacity: resolvedOpacity
|
|
3834
|
+
backgroundColor: glassBg
|
|
3800
3835
|
},
|
|
3801
|
-
children: /* @__PURE__ */
|
|
3836
|
+
children: /* @__PURE__ */ jsx23(
|
|
3802
3837
|
Pressable6,
|
|
3803
3838
|
{
|
|
3804
3839
|
accessibilityRole: "button",
|
|
@@ -3817,7 +3852,7 @@ function StudioSheetHeaderIconButton({
|
|
|
3817
3852
|
}
|
|
3818
3853
|
)
|
|
3819
3854
|
}
|
|
3820
|
-
) : /* @__PURE__ */
|
|
3855
|
+
) : /* @__PURE__ */ jsx23(
|
|
3821
3856
|
View17,
|
|
3822
3857
|
{
|
|
3823
3858
|
style: {
|
|
@@ -3829,7 +3864,7 @@ function StudioSheetHeaderIconButton({
|
|
|
3829
3864
|
backgroundColor: solidBg,
|
|
3830
3865
|
opacity: resolvedOpacity
|
|
3831
3866
|
},
|
|
3832
|
-
children: /* @__PURE__ */
|
|
3867
|
+
children: /* @__PURE__ */ jsx23(
|
|
3833
3868
|
Pressable6,
|
|
3834
3869
|
{
|
|
3835
3870
|
accessibilityRole: "button",
|
|
@@ -3850,15 +3885,15 @@ function StudioSheetHeaderIconButton({
|
|
|
3850
3885
|
}
|
|
3851
3886
|
|
|
3852
3887
|
// src/studio/ui/preview-panel/PreviewPanelHeader.tsx
|
|
3853
|
-
import { jsx as
|
|
3888
|
+
import { jsx as jsx24, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
3854
3889
|
function PreviewPanelHeader({ isOwner, onClose, onNavigateHome, onGoToChat }) {
|
|
3855
|
-
return /* @__PURE__ */
|
|
3890
|
+
return /* @__PURE__ */ jsx24(
|
|
3856
3891
|
StudioSheetHeader,
|
|
3857
3892
|
{
|
|
3858
|
-
left: onNavigateHome ? /* @__PURE__ */
|
|
3893
|
+
left: onNavigateHome ? /* @__PURE__ */ jsx24(StudioSheetHeaderIconButton, { onPress: onNavigateHome, accessibilityLabel: "Home", appearance: "glass", intent: "primary", children: /* @__PURE__ */ jsx24(IconHome, { size: 20, colorToken: "onPrimary" }) }) : null,
|
|
3859
3894
|
center: null,
|
|
3860
3895
|
right: /* @__PURE__ */ jsxs13(View18, { style: { flexDirection: "row", alignItems: "center" }, children: [
|
|
3861
|
-
isOwner ? /* @__PURE__ */
|
|
3896
|
+
isOwner ? /* @__PURE__ */ jsx24(
|
|
3862
3897
|
StudioSheetHeaderIconButton,
|
|
3863
3898
|
{
|
|
3864
3899
|
onPress: onGoToChat,
|
|
@@ -3866,10 +3901,10 @@ function PreviewPanelHeader({ isOwner, onClose, onNavigateHome, onGoToChat }) {
|
|
|
3866
3901
|
intent: "primary",
|
|
3867
3902
|
appearance: "glass",
|
|
3868
3903
|
style: { marginRight: 8 },
|
|
3869
|
-
children: /* @__PURE__ */
|
|
3904
|
+
children: /* @__PURE__ */ jsx24(IconChat, { size: 20, colorToken: "onPrimary" })
|
|
3870
3905
|
}
|
|
3871
3906
|
) : null,
|
|
3872
|
-
/* @__PURE__ */
|
|
3907
|
+
/* @__PURE__ */ jsx24(StudioSheetHeaderIconButton, { onPress: onClose, accessibilityLabel: "Close", appearance: "glass", intent: "primary", children: /* @__PURE__ */ jsx24(IconClose, { size: 20, colorToken: "onPrimary" }) })
|
|
3873
3908
|
] })
|
|
3874
3909
|
}
|
|
3875
3910
|
);
|
|
@@ -3880,7 +3915,7 @@ import { View as View20 } from "react-native";
|
|
|
3880
3915
|
|
|
3881
3916
|
// src/components/primitives/Surface.tsx
|
|
3882
3917
|
import { View as View19 } from "react-native";
|
|
3883
|
-
import { jsx as
|
|
3918
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
3884
3919
|
function backgroundFor(variant, theme) {
|
|
3885
3920
|
const { colors } = theme;
|
|
3886
3921
|
switch (variant) {
|
|
@@ -3897,7 +3932,7 @@ function backgroundFor(variant, theme) {
|
|
|
3897
3932
|
}
|
|
3898
3933
|
function Surface({ variant = "surface", border = false, style, ...props }) {
|
|
3899
3934
|
const theme = useTheme();
|
|
3900
|
-
return /* @__PURE__ */
|
|
3935
|
+
return /* @__PURE__ */ jsx25(
|
|
3901
3936
|
View19,
|
|
3902
3937
|
{
|
|
3903
3938
|
...props,
|
|
@@ -3911,12 +3946,12 @@ function Surface({ variant = "surface", border = false, style, ...props }) {
|
|
|
3911
3946
|
}
|
|
3912
3947
|
|
|
3913
3948
|
// src/components/primitives/Card.tsx
|
|
3914
|
-
import { jsx as
|
|
3949
|
+
import { jsx as jsx26 } from "react/jsx-runtime";
|
|
3915
3950
|
function Card({ variant = "surface", padded = true, border = true, style, ...props }) {
|
|
3916
3951
|
const theme = useTheme();
|
|
3917
3952
|
const radius = theme.radii.lg;
|
|
3918
3953
|
const padding = padded ? theme.spacing.lg : 0;
|
|
3919
|
-
return /* @__PURE__ */
|
|
3954
|
+
return /* @__PURE__ */ jsx26(
|
|
3920
3955
|
Surface,
|
|
3921
3956
|
{
|
|
3922
3957
|
...props,
|
|
@@ -3928,7 +3963,7 @@ function Card({ variant = "surface", padded = true, border = true, style, ...pro
|
|
|
3928
3963
|
}
|
|
3929
3964
|
|
|
3930
3965
|
// src/components/preview/PreviewHeroCard.tsx
|
|
3931
|
-
import { jsx as
|
|
3966
|
+
import { jsx as jsx27, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3932
3967
|
function PreviewHeroCard({
|
|
3933
3968
|
aspectRatio = 4 / 3,
|
|
3934
3969
|
overlayTopLeft,
|
|
@@ -3939,7 +3974,7 @@ function PreviewHeroCard({
|
|
|
3939
3974
|
}) {
|
|
3940
3975
|
const theme = useTheme();
|
|
3941
3976
|
const radius = 16;
|
|
3942
|
-
return /* @__PURE__ */
|
|
3977
|
+
return /* @__PURE__ */ jsx27(
|
|
3943
3978
|
Card,
|
|
3944
3979
|
{
|
|
3945
3980
|
variant: "surfaceRaised",
|
|
@@ -3955,24 +3990,24 @@ function PreviewHeroCard({
|
|
|
3955
3990
|
style
|
|
3956
3991
|
],
|
|
3957
3992
|
children: /* @__PURE__ */ jsxs14(View20, { style: { flex: 1 }, children: [
|
|
3958
|
-
background ? /* @__PURE__ */
|
|
3959
|
-
image ? /* @__PURE__ */
|
|
3960
|
-
overlayTopLeft ? /* @__PURE__ */
|
|
3961
|
-
overlayBottom ? /* @__PURE__ */
|
|
3993
|
+
background ? /* @__PURE__ */ jsx27(View20, { style: { position: "absolute", inset: 0 }, children: background }) : null,
|
|
3994
|
+
image ? /* @__PURE__ */ jsx27(View20, { style: { position: "absolute", inset: 0 }, children: image }) : null,
|
|
3995
|
+
overlayTopLeft ? /* @__PURE__ */ jsx27(View20, { style: { position: "absolute", top: theme.spacing.sm, left: theme.spacing.sm, zIndex: 2 }, children: overlayTopLeft }) : null,
|
|
3996
|
+
overlayBottom ? /* @__PURE__ */ jsx27(View20, { style: { flex: 1, justifyContent: "flex-end" }, children: overlayBottom }) : null
|
|
3962
3997
|
] })
|
|
3963
3998
|
}
|
|
3964
3999
|
);
|
|
3965
4000
|
}
|
|
3966
4001
|
|
|
3967
4002
|
// src/components/preview/PreviewPlaceholder.tsx
|
|
3968
|
-
import * as
|
|
4003
|
+
import * as React25 from "react";
|
|
3969
4004
|
import { Animated as Animated6 } from "react-native";
|
|
3970
4005
|
import { LinearGradient as LinearGradient2 } from "expo-linear-gradient";
|
|
3971
|
-
import { Fragment as Fragment3, jsx as
|
|
4006
|
+
import { Fragment as Fragment3, jsx as jsx28, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
3972
4007
|
function PreviewPlaceholder({ visible, style }) {
|
|
3973
4008
|
if (!visible) return null;
|
|
3974
|
-
const opacityAnim =
|
|
3975
|
-
|
|
4009
|
+
const opacityAnim = React25.useRef(new Animated6.Value(0)).current;
|
|
4010
|
+
React25.useEffect(() => {
|
|
3976
4011
|
if (!visible) return;
|
|
3977
4012
|
const animation = Animated6.loop(
|
|
3978
4013
|
Animated6.sequence([
|
|
@@ -3990,7 +4025,7 @@ function PreviewPlaceholder({ visible, style }) {
|
|
|
3990
4025
|
const opacity3 = opacityAnim.interpolate({ inputRange: [0, 1, 2, 3], outputRange: [0, 0, 1, 0] });
|
|
3991
4026
|
const opacity4 = opacityAnim.interpolate({ inputRange: [0, 1, 2, 3], outputRange: [0, 0, 0, 1] });
|
|
3992
4027
|
return /* @__PURE__ */ jsxs15(Fragment3, { children: [
|
|
3993
|
-
/* @__PURE__ */
|
|
4028
|
+
/* @__PURE__ */ jsx28(Animated6.View, { style: [{ position: "absolute", inset: 0, opacity: opacity1 }, style], children: /* @__PURE__ */ jsx28(
|
|
3994
4029
|
LinearGradient2,
|
|
3995
4030
|
{
|
|
3996
4031
|
colors: ["rgba(98, 0, 238, 0.45)", "rgba(168, 85, 247, 0.35)"],
|
|
@@ -3999,7 +4034,7 @@ function PreviewPlaceholder({ visible, style }) {
|
|
|
3999
4034
|
style: { width: "100%", height: "100%" }
|
|
4000
4035
|
}
|
|
4001
4036
|
) }),
|
|
4002
|
-
/* @__PURE__ */
|
|
4037
|
+
/* @__PURE__ */ jsx28(Animated6.View, { style: [{ position: "absolute", inset: 0, opacity: opacity2 }, style], children: /* @__PURE__ */ jsx28(
|
|
4003
4038
|
LinearGradient2,
|
|
4004
4039
|
{
|
|
4005
4040
|
colors: ["rgba(168, 85, 247, 0.45)", "rgba(139, 92, 246, 0.35)"],
|
|
@@ -4008,7 +4043,7 @@ function PreviewPlaceholder({ visible, style }) {
|
|
|
4008
4043
|
style: { width: "100%", height: "100%" }
|
|
4009
4044
|
}
|
|
4010
4045
|
) }),
|
|
4011
|
-
/* @__PURE__ */
|
|
4046
|
+
/* @__PURE__ */ jsx28(Animated6.View, { style: [{ position: "absolute", inset: 0, opacity: opacity3 }, style], children: /* @__PURE__ */ jsx28(
|
|
4012
4047
|
LinearGradient2,
|
|
4013
4048
|
{
|
|
4014
4049
|
colors: ["rgba(139, 92, 246, 0.45)", "rgba(126, 34, 206, 0.35)"],
|
|
@@ -4017,7 +4052,7 @@ function PreviewPlaceholder({ visible, style }) {
|
|
|
4017
4052
|
style: { width: "100%", height: "100%" }
|
|
4018
4053
|
}
|
|
4019
4054
|
) }),
|
|
4020
|
-
/* @__PURE__ */
|
|
4055
|
+
/* @__PURE__ */ jsx28(Animated6.View, { style: [{ position: "absolute", inset: 0, opacity: opacity4 }, style], children: /* @__PURE__ */ jsx28(
|
|
4021
4056
|
LinearGradient2,
|
|
4022
4057
|
{
|
|
4023
4058
|
colors: ["rgba(126, 34, 206, 0.45)", "rgba(98, 0, 238, 0.35)"],
|
|
@@ -4031,10 +4066,10 @@ function PreviewPlaceholder({ visible, style }) {
|
|
|
4031
4066
|
|
|
4032
4067
|
// src/components/preview/PreviewImage.tsx
|
|
4033
4068
|
import { Image as Image3 } from "react-native";
|
|
4034
|
-
import { jsx as
|
|
4069
|
+
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
4035
4070
|
function PreviewImage({ uri, onLoad, style }) {
|
|
4036
4071
|
if (!uri) return null;
|
|
4037
|
-
return /* @__PURE__ */
|
|
4072
|
+
return /* @__PURE__ */ jsx29(
|
|
4038
4073
|
Image3,
|
|
4039
4074
|
{
|
|
4040
4075
|
source: { uri },
|
|
@@ -4047,14 +4082,14 @@ function PreviewImage({ uri, onLoad, style }) {
|
|
|
4047
4082
|
|
|
4048
4083
|
// src/components/preview/StatsBar.tsx
|
|
4049
4084
|
import { Pressable as Pressable7, View as View21 } from "react-native";
|
|
4050
|
-
import {
|
|
4085
|
+
import { isLiquidGlassSupported as isLiquidGlassSupported6 } from "@callstack/liquid-glass";
|
|
4051
4086
|
import { Heart, MessageCircle } from "lucide-react-native";
|
|
4052
4087
|
|
|
4053
4088
|
// src/components/icons/MergeIcon.tsx
|
|
4054
4089
|
import Svg2, { Path as Path2 } from "react-native-svg";
|
|
4055
|
-
import { jsx as
|
|
4090
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
4056
4091
|
function MergeIcon({ color = "currentColor", width = 24, height = 24, ...props }) {
|
|
4057
|
-
return /* @__PURE__ */
|
|
4092
|
+
return /* @__PURE__ */ jsx30(Svg2, { viewBox: "0 0 486 486", width, height, ...props, children: /* @__PURE__ */ jsx30(
|
|
4058
4093
|
Path2,
|
|
4059
4094
|
{
|
|
4060
4095
|
d: "M237.025 0H243.664C254.876 95.0361 275.236 175.597 304.743 241.684C334.249 307.478 367.002 357.774 403 392.572L389.722 486C361.691 458.22 338.233 429.417 319.349 399.59C300.464 369.764 284.531 335.843 271.548 297.829C258.565 259.522 246.615 214.343 235.697 162.292L237.91 161.415C228.468 214.928 217.993 261.569 206.485 301.338C194.978 341.107 179.634 375.904 160.455 405.731C141.571 435.265 115.752 462.022 83 486L96.278 392.572C124.014 369.179 147.62 336.72 167.094 295.197C186.864 253.381 202.65 206.886 214.452 155.713C226.255 104.247 233.779 52.343 237.025 0Z",
|
|
@@ -4064,7 +4099,7 @@ function MergeIcon({ color = "currentColor", width = 24, height = 24, ...props }
|
|
|
4064
4099
|
}
|
|
4065
4100
|
|
|
4066
4101
|
// src/components/preview/StatsBar.tsx
|
|
4067
|
-
import { jsx as
|
|
4102
|
+
import { jsx as jsx31, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
4068
4103
|
function StatsBar({
|
|
4069
4104
|
likeCount,
|
|
4070
4105
|
commentCount,
|
|
@@ -4078,7 +4113,7 @@ function StatsBar({
|
|
|
4078
4113
|
}) {
|
|
4079
4114
|
const theme = useTheme();
|
|
4080
4115
|
const statsBgColor = theme.scheme === "dark" ? "rgba(24, 24, 27, 0.5)" : "rgba(255, 255, 255, 0.5)";
|
|
4081
|
-
return /* @__PURE__ */
|
|
4116
|
+
return /* @__PURE__ */ jsx31(
|
|
4082
4117
|
View21,
|
|
4083
4118
|
{
|
|
4084
4119
|
style: [
|
|
@@ -4086,8 +4121,8 @@ function StatsBar({
|
|
|
4086
4121
|
centered && { alignItems: "center" },
|
|
4087
4122
|
style
|
|
4088
4123
|
],
|
|
4089
|
-
children: /* @__PURE__ */
|
|
4090
|
-
|
|
4124
|
+
children: /* @__PURE__ */ jsx31(
|
|
4125
|
+
ResettableLiquidGlassView,
|
|
4091
4126
|
{
|
|
4092
4127
|
style: [
|
|
4093
4128
|
{ borderRadius: 100, overflow: "hidden" },
|
|
@@ -4096,7 +4131,7 @@ function StatsBar({
|
|
|
4096
4131
|
],
|
|
4097
4132
|
effect: "clear",
|
|
4098
4133
|
children: /* @__PURE__ */ jsxs16(View21, { style: { flexDirection: "row", alignItems: "center", justifyContent: "space-between", paddingHorizontal: 16 }, children: [
|
|
4099
|
-
/* @__PURE__ */
|
|
4134
|
+
/* @__PURE__ */ jsx31(
|
|
4100
4135
|
Pressable7,
|
|
4101
4136
|
{
|
|
4102
4137
|
disabled: !onPressLike,
|
|
@@ -4104,7 +4139,7 @@ function StatsBar({
|
|
|
4104
4139
|
hitSlop: 8,
|
|
4105
4140
|
style: { paddingVertical: 8 },
|
|
4106
4141
|
children: /* @__PURE__ */ jsxs16(View21, { style: { flexDirection: "row", alignItems: "center" }, children: [
|
|
4107
|
-
/* @__PURE__ */
|
|
4142
|
+
/* @__PURE__ */ jsx31(
|
|
4108
4143
|
Heart,
|
|
4109
4144
|
{
|
|
4110
4145
|
size: 16,
|
|
@@ -4113,8 +4148,8 @@ function StatsBar({
|
|
|
4113
4148
|
fill: isLiked ? theme.colors.danger : "transparent"
|
|
4114
4149
|
}
|
|
4115
4150
|
),
|
|
4116
|
-
/* @__PURE__ */
|
|
4117
|
-
/* @__PURE__ */
|
|
4151
|
+
/* @__PURE__ */ jsx31(View21, { style: { width: 4 } }),
|
|
4152
|
+
/* @__PURE__ */ jsx31(
|
|
4118
4153
|
Text,
|
|
4119
4154
|
{
|
|
4120
4155
|
variant: "caption",
|
|
@@ -4128,7 +4163,7 @@ function StatsBar({
|
|
|
4128
4163
|
] })
|
|
4129
4164
|
}
|
|
4130
4165
|
),
|
|
4131
|
-
/* @__PURE__ */
|
|
4166
|
+
/* @__PURE__ */ jsx31(
|
|
4132
4167
|
Pressable7,
|
|
4133
4168
|
{
|
|
4134
4169
|
disabled: !onPressComments,
|
|
@@ -4136,16 +4171,16 @@ function StatsBar({
|
|
|
4136
4171
|
hitSlop: 8,
|
|
4137
4172
|
style: { paddingVertical: 8 },
|
|
4138
4173
|
children: /* @__PURE__ */ jsxs16(View21, { style: { flexDirection: "row", alignItems: "center" }, children: [
|
|
4139
|
-
/* @__PURE__ */
|
|
4140
|
-
/* @__PURE__ */
|
|
4141
|
-
/* @__PURE__ */
|
|
4174
|
+
/* @__PURE__ */ jsx31(MessageCircle, { size: 16, strokeWidth: 2.5, color: "#FFFFFF" }),
|
|
4175
|
+
/* @__PURE__ */ jsx31(View21, { style: { width: 4 } }),
|
|
4176
|
+
/* @__PURE__ */ jsx31(Text, { variant: "caption", style: { color: "#FFFFFF", fontWeight: theme.typography.fontWeight.bold }, children: commentCount })
|
|
4142
4177
|
] })
|
|
4143
4178
|
}
|
|
4144
4179
|
),
|
|
4145
4180
|
/* @__PURE__ */ jsxs16(View21, { style: { flexDirection: "row", alignItems: "center", paddingVertical: 8 }, children: [
|
|
4146
|
-
/* @__PURE__ */
|
|
4147
|
-
/* @__PURE__ */
|
|
4148
|
-
/* @__PURE__ */
|
|
4181
|
+
/* @__PURE__ */ jsx31(View21, { style: { transform: [{ scaleY: -1 }] }, children: /* @__PURE__ */ jsx31(MergeIcon, { width: 14, height: 14, color: "#FFFFFF" }) }),
|
|
4182
|
+
/* @__PURE__ */ jsx31(View21, { style: { width: 4 } }),
|
|
4183
|
+
/* @__PURE__ */ jsx31(Text, { variant: "caption", style: { color: "#FFFFFF", fontWeight: theme.typography.fontWeight.bold }, children: forkCount })
|
|
4149
4184
|
] })
|
|
4150
4185
|
] })
|
|
4151
4186
|
}
|
|
@@ -4178,7 +4213,7 @@ var APP_STATUS_LABEL = {
|
|
|
4178
4213
|
};
|
|
4179
4214
|
|
|
4180
4215
|
// src/components/preview/PreviewStatusBadge.tsx
|
|
4181
|
-
import { jsx as
|
|
4216
|
+
import { jsx as jsx32, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
4182
4217
|
var STATUS_BG = {
|
|
4183
4218
|
ready: "#10B981",
|
|
4184
4219
|
// emerald-500
|
|
@@ -4219,15 +4254,15 @@ function PreviewStatusBadge({ status }) {
|
|
|
4219
4254
|
backgroundColor: STATUS_BG[status]
|
|
4220
4255
|
},
|
|
4221
4256
|
children: [
|
|
4222
|
-
/* @__PURE__ */
|
|
4223
|
-
/* @__PURE__ */
|
|
4257
|
+
/* @__PURE__ */ jsx32(IconComp, { size: 12, color: "#FFFFFF", style: { marginRight: 4 } }),
|
|
4258
|
+
/* @__PURE__ */ jsx32(Text, { style: { color: "#FFFFFF", fontSize: 11, lineHeight: 14 }, children: label })
|
|
4224
4259
|
]
|
|
4225
4260
|
}
|
|
4226
4261
|
);
|
|
4227
4262
|
}
|
|
4228
4263
|
|
|
4229
4264
|
// src/studio/ui/preview-panel/PreviewHeroSection.tsx
|
|
4230
|
-
import { jsx as
|
|
4265
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
4231
4266
|
function PreviewHeroSection({
|
|
4232
4267
|
appStatus,
|
|
4233
4268
|
showProcessing,
|
|
@@ -4236,13 +4271,13 @@ function PreviewHeroSection({
|
|
|
4236
4271
|
onImageLoad,
|
|
4237
4272
|
stats
|
|
4238
4273
|
}) {
|
|
4239
|
-
return /* @__PURE__ */
|
|
4274
|
+
return /* @__PURE__ */ jsx33(
|
|
4240
4275
|
PreviewHeroCard,
|
|
4241
4276
|
{
|
|
4242
|
-
overlayTopLeft: showProcessing ? /* @__PURE__ */
|
|
4243
|
-
background: /* @__PURE__ */
|
|
4244
|
-
image: /* @__PURE__ */
|
|
4245
|
-
overlayBottom: /* @__PURE__ */
|
|
4277
|
+
overlayTopLeft: showProcessing ? /* @__PURE__ */ jsx33(PreviewStatusBadge, { status: appStatus }) : null,
|
|
4278
|
+
background: /* @__PURE__ */ jsx33(PreviewPlaceholder, { visible: !imageLoaded }),
|
|
4279
|
+
image: /* @__PURE__ */ jsx33(PreviewImage, { uri: imageUrl, onLoad: onImageLoad }),
|
|
4280
|
+
overlayBottom: /* @__PURE__ */ jsx33(
|
|
4246
4281
|
StatsBar,
|
|
4247
4282
|
{
|
|
4248
4283
|
likeCount: stats.likeCount,
|
|
@@ -4265,7 +4300,7 @@ import { View as View24 } from "react-native";
|
|
|
4265
4300
|
|
|
4266
4301
|
// src/components/preview/PreviewMetaRow.tsx
|
|
4267
4302
|
import { View as View23 } from "react-native";
|
|
4268
|
-
import { jsx as
|
|
4303
|
+
import { jsx as jsx34, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4269
4304
|
function PreviewMetaRow({
|
|
4270
4305
|
avatarUri,
|
|
4271
4306
|
creatorName,
|
|
@@ -4278,9 +4313,9 @@ function PreviewMetaRow({
|
|
|
4278
4313
|
const theme = useTheme();
|
|
4279
4314
|
return /* @__PURE__ */ jsxs18(View23, { style: [{ alignSelf: "stretch" }, style], children: [
|
|
4280
4315
|
/* @__PURE__ */ jsxs18(View23, { style: { flexDirection: "row", alignItems: "center" }, children: [
|
|
4281
|
-
/* @__PURE__ */
|
|
4316
|
+
/* @__PURE__ */ jsx34(Avatar, { uri: avatarUri, name: creatorName, size: 24, style: { marginRight: theme.spacing.sm } }),
|
|
4282
4317
|
/* @__PURE__ */ jsxs18(View23, { style: { flexDirection: "row", alignItems: "center", flex: 1, minWidth: 0, marginRight: theme.spacing.sm }, children: [
|
|
4283
|
-
/* @__PURE__ */
|
|
4318
|
+
/* @__PURE__ */ jsx34(
|
|
4284
4319
|
Text,
|
|
4285
4320
|
{
|
|
4286
4321
|
numberOfLines: 1,
|
|
@@ -4294,11 +4329,11 @@ function PreviewMetaRow({
|
|
|
4294
4329
|
children: title
|
|
4295
4330
|
}
|
|
4296
4331
|
),
|
|
4297
|
-
tag ? /* @__PURE__ */
|
|
4332
|
+
tag ? /* @__PURE__ */ jsx34(View23, { style: { marginLeft: theme.spacing.sm }, children: tag }) : null
|
|
4298
4333
|
] }),
|
|
4299
|
-
rightMetric ? /* @__PURE__ */
|
|
4334
|
+
rightMetric ? /* @__PURE__ */ jsx34(View23, { children: rightMetric }) : null
|
|
4300
4335
|
] }),
|
|
4301
|
-
subtitle ? /* @__PURE__ */
|
|
4336
|
+
subtitle ? /* @__PURE__ */ jsx34(
|
|
4302
4337
|
Text,
|
|
4303
4338
|
{
|
|
4304
4339
|
numberOfLines: 2,
|
|
@@ -4341,18 +4376,18 @@ function statusDescription(status, statusError) {
|
|
|
4341
4376
|
}
|
|
4342
4377
|
|
|
4343
4378
|
// src/studio/ui/preview-panel/PreviewMetaSection.tsx
|
|
4344
|
-
import { jsx as
|
|
4379
|
+
import { jsx as jsx35, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4345
4380
|
function PreviewMetaSection({ app, isOwner, creator, downloadsCount }) {
|
|
4346
4381
|
var _a;
|
|
4347
4382
|
const theme = useTheme();
|
|
4348
|
-
return /* @__PURE__ */
|
|
4383
|
+
return /* @__PURE__ */ jsx35(
|
|
4349
4384
|
PreviewMetaRow,
|
|
4350
4385
|
{
|
|
4351
4386
|
title: app.name,
|
|
4352
4387
|
subtitle: app.description,
|
|
4353
4388
|
avatarUri: (creator == null ? void 0 : creator.avatar) ?? null,
|
|
4354
4389
|
creatorName: (creator == null ? void 0 : creator.name) ?? null,
|
|
4355
|
-
tag: isOwner || app.forkedFromAppId ? /* @__PURE__ */
|
|
4390
|
+
tag: isOwner || app.forkedFromAppId ? /* @__PURE__ */ jsx35(View24, { style: { paddingHorizontal: 8, paddingVertical: 2, borderRadius: 999, backgroundColor: "#3700B3" }, children: /* @__PURE__ */ jsx35(Text, { variant: "caption", style: { color: "#fff", fontWeight: theme.typography.fontWeight.semibold }, children: app.forkedFromAppId ? "Remix" : "Owner" }) }) : null,
|
|
4356
4391
|
rightMetric: /* @__PURE__ */ jsxs19(
|
|
4357
4392
|
View24,
|
|
4358
4393
|
{
|
|
@@ -4365,7 +4400,7 @@ function PreviewMetaSection({ app, isOwner, creator, downloadsCount }) {
|
|
|
4365
4400
|
backgroundColor: withAlpha(theme.colors.neutral, 0.3)
|
|
4366
4401
|
},
|
|
4367
4402
|
children: [
|
|
4368
|
-
/* @__PURE__ */
|
|
4403
|
+
/* @__PURE__ */ jsx35(
|
|
4369
4404
|
Text,
|
|
4370
4405
|
{
|
|
4371
4406
|
style: {
|
|
@@ -4378,7 +4413,7 @@ function PreviewMetaSection({ app, isOwner, creator, downloadsCount }) {
|
|
|
4378
4413
|
children: formatCount(downloadsCount ?? ((_a = app.insights) == null ? void 0 : _a.totalDownloads) ?? 0)
|
|
4379
4414
|
}
|
|
4380
4415
|
),
|
|
4381
|
-
/* @__PURE__ */
|
|
4416
|
+
/* @__PURE__ */ jsx35(IconPlay, { size: 14, colorToken: "textMuted", fill: theme.colors.textMuted })
|
|
4382
4417
|
]
|
|
4383
4418
|
}
|
|
4384
4419
|
),
|
|
@@ -4392,7 +4427,7 @@ import { ActivityIndicator as ActivityIndicator4, View as View26 } from "react-n
|
|
|
4392
4427
|
|
|
4393
4428
|
// src/studio/ui/preview-panel/PressableCardRow.tsx
|
|
4394
4429
|
import { Pressable as Pressable8, View as View25 } from "react-native";
|
|
4395
|
-
import { jsx as
|
|
4430
|
+
import { jsx as jsx36, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4396
4431
|
function PressableCardRow({
|
|
4397
4432
|
accessibilityLabel,
|
|
4398
4433
|
onPress,
|
|
@@ -4403,7 +4438,7 @@ function PressableCardRow({
|
|
|
4403
4438
|
right,
|
|
4404
4439
|
style
|
|
4405
4440
|
}) {
|
|
4406
|
-
return /* @__PURE__ */
|
|
4441
|
+
return /* @__PURE__ */ jsx36(
|
|
4407
4442
|
Pressable8,
|
|
4408
4443
|
{
|
|
4409
4444
|
accessibilityRole: "button",
|
|
@@ -4411,23 +4446,23 @@ function PressableCardRow({
|
|
|
4411
4446
|
disabled,
|
|
4412
4447
|
onPress,
|
|
4413
4448
|
style: ({ pressed }) => ({ opacity: disabled ? 0.6 : pressed ? 0.85 : 1 }),
|
|
4414
|
-
children: /* @__PURE__ */
|
|
4449
|
+
children: /* @__PURE__ */ jsx36(Card, { padded: false, border: false, style, children: /* @__PURE__ */ jsxs20(View25, { style: { flexDirection: "row", alignItems: "center" }, children: [
|
|
4415
4450
|
left,
|
|
4416
4451
|
/* @__PURE__ */ jsxs20(View25, { style: { flex: 1, minWidth: 0 }, children: [
|
|
4417
4452
|
title,
|
|
4418
4453
|
subtitle ? subtitle : null
|
|
4419
4454
|
] }),
|
|
4420
|
-
right ? /* @__PURE__ */
|
|
4455
|
+
right ? /* @__PURE__ */ jsx36(View25, { style: { marginLeft: 16 }, children: right }) : null
|
|
4421
4456
|
] }) })
|
|
4422
4457
|
}
|
|
4423
4458
|
);
|
|
4424
4459
|
}
|
|
4425
4460
|
|
|
4426
4461
|
// src/studio/ui/preview-panel/SectionTitle.tsx
|
|
4427
|
-
import { jsx as
|
|
4462
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
4428
4463
|
function SectionTitle({ children, marginTop }) {
|
|
4429
4464
|
const theme = useTheme();
|
|
4430
|
-
return /* @__PURE__ */
|
|
4465
|
+
return /* @__PURE__ */ jsx37(
|
|
4431
4466
|
Text,
|
|
4432
4467
|
{
|
|
4433
4468
|
style: {
|
|
@@ -4446,7 +4481,7 @@ function SectionTitle({ children, marginTop }) {
|
|
|
4446
4481
|
}
|
|
4447
4482
|
|
|
4448
4483
|
// src/studio/ui/preview-panel/PreviewCustomizeSection.tsx
|
|
4449
|
-
import { Fragment as Fragment4, jsx as
|
|
4484
|
+
import { Fragment as Fragment4, jsx as jsx38, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4450
4485
|
function PreviewCustomizeSection({
|
|
4451
4486
|
app,
|
|
4452
4487
|
isOwner,
|
|
@@ -4457,7 +4492,7 @@ function PreviewCustomizeSection({
|
|
|
4457
4492
|
}) {
|
|
4458
4493
|
const theme = useTheme();
|
|
4459
4494
|
return /* @__PURE__ */ jsxs21(Fragment4, { children: [
|
|
4460
|
-
/* @__PURE__ */
|
|
4495
|
+
/* @__PURE__ */ jsx38(SectionTitle, { children: "Customize" }),
|
|
4461
4496
|
showProcessing ? /* @__PURE__ */ jsxs21(
|
|
4462
4497
|
View26,
|
|
4463
4498
|
{
|
|
@@ -4472,7 +4507,7 @@ function PreviewCustomizeSection({
|
|
|
4472
4507
|
marginBottom: theme.spacing.sm
|
|
4473
4508
|
},
|
|
4474
4509
|
children: [
|
|
4475
|
-
/* @__PURE__ */
|
|
4510
|
+
/* @__PURE__ */ jsx38(
|
|
4476
4511
|
View26,
|
|
4477
4512
|
{
|
|
4478
4513
|
style: {
|
|
@@ -4484,17 +4519,17 @@ function PreviewCustomizeSection({
|
|
|
4484
4519
|
backgroundColor: withAlpha(theme.colors.warning, 0.1),
|
|
4485
4520
|
marginRight: theme.spacing.lg
|
|
4486
4521
|
},
|
|
4487
|
-
children: /* @__PURE__ */
|
|
4522
|
+
children: /* @__PURE__ */ jsx38(ActivityIndicator4, { color: theme.colors.warning, size: "small" })
|
|
4488
4523
|
}
|
|
4489
4524
|
),
|
|
4490
4525
|
/* @__PURE__ */ jsxs21(View26, { style: { flex: 1, minWidth: 0 }, children: [
|
|
4491
|
-
/* @__PURE__ */
|
|
4492
|
-
/* @__PURE__ */
|
|
4526
|
+
/* @__PURE__ */ jsx38(Text, { style: { color: theme.colors.text, fontSize: 16, lineHeight: 20, fontWeight: theme.typography.fontWeight.semibold }, children: app.status === "error" ? "Error" : "Processing" }),
|
|
4527
|
+
/* @__PURE__ */ jsx38(Text, { style: { color: theme.colors.textMuted, fontSize: 12, lineHeight: 16, marginTop: 2 }, children: statusDescription(app.status, app.statusError) })
|
|
4493
4528
|
] })
|
|
4494
4529
|
]
|
|
4495
4530
|
}
|
|
4496
4531
|
) : null,
|
|
4497
|
-
/* @__PURE__ */
|
|
4532
|
+
/* @__PURE__ */ jsx38(
|
|
4498
4533
|
PressableCardRow,
|
|
4499
4534
|
{
|
|
4500
4535
|
accessibilityLabel: isOwner ? "Edit app" : "Remix app",
|
|
@@ -4507,7 +4542,7 @@ function PreviewCustomizeSection({
|
|
|
4507
4542
|
borderColor: withAlpha(theme.colors.primary, 0.1),
|
|
4508
4543
|
marginBottom: theme.spacing.sm
|
|
4509
4544
|
},
|
|
4510
|
-
left: /* @__PURE__ */
|
|
4545
|
+
left: /* @__PURE__ */ jsx38(
|
|
4511
4546
|
View26,
|
|
4512
4547
|
{
|
|
4513
4548
|
style: {
|
|
@@ -4519,15 +4554,15 @@ function PreviewCustomizeSection({
|
|
|
4519
4554
|
backgroundColor: withAlpha(theme.colors.primary, 0.1),
|
|
4520
4555
|
marginRight: theme.spacing.lg
|
|
4521
4556
|
},
|
|
4522
|
-
children: /* @__PURE__ */
|
|
4557
|
+
children: /* @__PURE__ */ jsx38(IconChat, { size: 20, colorToken: "primary" })
|
|
4523
4558
|
}
|
|
4524
4559
|
),
|
|
4525
|
-
title: /* @__PURE__ */
|
|
4526
|
-
subtitle: /* @__PURE__ */
|
|
4527
|
-
right: /* @__PURE__ */
|
|
4560
|
+
title: /* @__PURE__ */ jsx38(Text, { style: { color: theme.colors.text, fontSize: 16, lineHeight: 20, fontWeight: theme.typography.fontWeight.semibold }, children: isOwner ? app.forkedFromAppId ? "Edit your Remix" : "Edit Your App" : "Remix App" }),
|
|
4561
|
+
subtitle: /* @__PURE__ */ jsx38(Text, { style: { color: theme.colors.textMuted, fontSize: 12, lineHeight: 16, marginTop: 2 }, children: isOwner && app.forkedFromAppId ? "Make changes to your remix with chat" : shouldForkOnEdit ? "Chat to create your own copy and edit it" : "Chat to apply changes" }),
|
|
4562
|
+
right: /* @__PURE__ */ jsx38(IconChevronRight, { size: 20, colorToken: "textMuted" })
|
|
4528
4563
|
}
|
|
4529
4564
|
),
|
|
4530
|
-
isOwner && onStartDraw ? /* @__PURE__ */
|
|
4565
|
+
isOwner && onStartDraw ? /* @__PURE__ */ jsx38(
|
|
4531
4566
|
PressableCardRow,
|
|
4532
4567
|
{
|
|
4533
4568
|
accessibilityLabel: "Draw changes",
|
|
@@ -4540,7 +4575,7 @@ function PreviewCustomizeSection({
|
|
|
4540
4575
|
borderColor: withAlpha(theme.colors.danger, 0.1),
|
|
4541
4576
|
marginBottom: theme.spacing.sm
|
|
4542
4577
|
},
|
|
4543
|
-
left: /* @__PURE__ */
|
|
4578
|
+
left: /* @__PURE__ */ jsx38(
|
|
4544
4579
|
View26,
|
|
4545
4580
|
{
|
|
4546
4581
|
style: {
|
|
@@ -4552,31 +4587,31 @@ function PreviewCustomizeSection({
|
|
|
4552
4587
|
backgroundColor: withAlpha(theme.colors.danger, 0.1),
|
|
4553
4588
|
marginRight: theme.spacing.lg
|
|
4554
4589
|
},
|
|
4555
|
-
children: /* @__PURE__ */
|
|
4590
|
+
children: /* @__PURE__ */ jsx38(IconDraw, { size: 20, colorToken: "danger" })
|
|
4556
4591
|
}
|
|
4557
4592
|
),
|
|
4558
|
-
title: /* @__PURE__ */
|
|
4559
|
-
subtitle: /* @__PURE__ */
|
|
4560
|
-
right: /* @__PURE__ */
|
|
4593
|
+
title: /* @__PURE__ */ jsx38(Text, { style: { color: theme.colors.text, fontSize: 16, lineHeight: 20, fontWeight: theme.typography.fontWeight.semibold }, children: "Draw Changes" }),
|
|
4594
|
+
subtitle: /* @__PURE__ */ jsx38(Text, { style: { color: theme.colors.textMuted, fontSize: 12, lineHeight: 16, marginTop: 2 }, children: "Annotate the app with drawings" }),
|
|
4595
|
+
right: /* @__PURE__ */ jsx38(IconChevronRight, { size: 20, colorToken: "textMuted" })
|
|
4561
4596
|
}
|
|
4562
4597
|
) : null
|
|
4563
4598
|
] });
|
|
4564
4599
|
}
|
|
4565
4600
|
|
|
4566
4601
|
// src/studio/ui/preview-panel/PreviewCollaborateSection.tsx
|
|
4567
|
-
import * as
|
|
4602
|
+
import * as React31 from "react";
|
|
4568
4603
|
import { ActivityIndicator as ActivityIndicator6, Alert, View as View32 } from "react-native";
|
|
4569
4604
|
import { Send as Send2 } from "lucide-react-native";
|
|
4570
4605
|
|
|
4571
4606
|
// src/components/merge-requests/MergeRequestStatusCard.tsx
|
|
4572
|
-
import * as
|
|
4607
|
+
import * as React27 from "react";
|
|
4573
4608
|
import { Animated as Animated7, Pressable as Pressable9, View as View28 } from "react-native";
|
|
4574
4609
|
import { Ban, Check as Check3, CheckCheck, ChevronDown as ChevronDown2 } from "lucide-react-native";
|
|
4575
4610
|
|
|
4576
4611
|
// src/components/primitives/MarkdownText.tsx
|
|
4577
|
-
import { Platform as
|
|
4612
|
+
import { Platform as Platform7, View as View27 } from "react-native";
|
|
4578
4613
|
import Markdown from "react-native-markdown-display";
|
|
4579
|
-
import { jsx as
|
|
4614
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
4580
4615
|
function MarkdownText({ markdown, variant = "chat", bodyColor, style }) {
|
|
4581
4616
|
const theme = useTheme();
|
|
4582
4617
|
const isDark = theme.scheme === "dark";
|
|
@@ -4587,7 +4622,7 @@ function MarkdownText({ markdown, variant = "chat", bodyColor, style }) {
|
|
|
4587
4622
|
const codeTextColor = isDark ? "#FFFFFF" : theme.colors.text;
|
|
4588
4623
|
const paragraphBottom = variant === "mergeRequest" ? 8 : 6;
|
|
4589
4624
|
const baseLineHeight = variant === "mergeRequest" ? 22 : 20;
|
|
4590
|
-
return /* @__PURE__ */
|
|
4625
|
+
return /* @__PURE__ */ jsx39(View27, { style, children: /* @__PURE__ */ jsx39(
|
|
4591
4626
|
Markdown,
|
|
4592
4627
|
{
|
|
4593
4628
|
style: {
|
|
@@ -4600,7 +4635,7 @@ function MarkdownText({ markdown, variant = "chat", bodyColor, style }) {
|
|
|
4600
4635
|
paddingHorizontal: variant === "mergeRequest" ? 6 : 4,
|
|
4601
4636
|
paddingVertical: variant === "mergeRequest" ? 2 : 0,
|
|
4602
4637
|
borderRadius: variant === "mergeRequest" ? 6 : 4,
|
|
4603
|
-
fontFamily:
|
|
4638
|
+
fontFamily: Platform7.OS === "ios" ? "Menlo" : "monospace",
|
|
4604
4639
|
fontSize: 13
|
|
4605
4640
|
},
|
|
4606
4641
|
code_block: {
|
|
@@ -4651,11 +4686,11 @@ function toIsoString(input) {
|
|
|
4651
4686
|
}
|
|
4652
4687
|
|
|
4653
4688
|
// src/components/merge-requests/useControlledExpansion.ts
|
|
4654
|
-
import * as
|
|
4689
|
+
import * as React26 from "react";
|
|
4655
4690
|
function useControlledExpansion(props) {
|
|
4656
|
-
const [uncontrolled, setUncontrolled] =
|
|
4691
|
+
const [uncontrolled, setUncontrolled] = React26.useState(false);
|
|
4657
4692
|
const expanded = props.expanded ?? uncontrolled;
|
|
4658
|
-
const setExpanded =
|
|
4693
|
+
const setExpanded = React26.useCallback(
|
|
4659
4694
|
(next) => {
|
|
4660
4695
|
var _a;
|
|
4661
4696
|
(_a = props.onExpandedChange) == null ? void 0 : _a.call(props, next);
|
|
@@ -4667,7 +4702,7 @@ function useControlledExpansion(props) {
|
|
|
4667
4702
|
}
|
|
4668
4703
|
|
|
4669
4704
|
// src/components/merge-requests/MergeRequestStatusCard.tsx
|
|
4670
|
-
import { jsx as
|
|
4705
|
+
import { jsx as jsx40, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4671
4706
|
function MergeRequestStatusCard({
|
|
4672
4707
|
mergeRequest,
|
|
4673
4708
|
expanded: expandedProp,
|
|
@@ -4680,8 +4715,8 @@ function MergeRequestStatusCard({
|
|
|
4680
4715
|
const isDark = theme.scheme === "dark";
|
|
4681
4716
|
const textColor = isDark ? "#FFFFFF" : "#000000";
|
|
4682
4717
|
const subTextColor = isDark ? "#A1A1AA" : "#71717A";
|
|
4683
|
-
const status =
|
|
4684
|
-
const { StatusIcon, iconColor, bgColor, statusText } =
|
|
4718
|
+
const status = React27.useMemo(() => getMergeRequestStatusDisplay(String(mergeRequest.status)), [mergeRequest.status]);
|
|
4719
|
+
const { StatusIcon, iconColor, bgColor, statusText } = React27.useMemo(() => {
|
|
4685
4720
|
switch (mergeRequest.status) {
|
|
4686
4721
|
case "approved":
|
|
4687
4722
|
case "merged":
|
|
@@ -4712,15 +4747,15 @@ function MergeRequestStatusCard({
|
|
|
4712
4747
|
const createdIso = toIsoString(mergeRequest.createdAt ?? null);
|
|
4713
4748
|
const headerTimeAgo = updatedIso ? formatTimeAgo(updatedIso) : "";
|
|
4714
4749
|
const createdTimeAgo = createdIso ? formatTimeAgo(createdIso) : "";
|
|
4715
|
-
const rotate =
|
|
4716
|
-
|
|
4750
|
+
const rotate = React27.useRef(new Animated7.Value(expanded ? 1 : 0)).current;
|
|
4751
|
+
React27.useEffect(() => {
|
|
4717
4752
|
Animated7.timing(rotate, {
|
|
4718
4753
|
toValue: expanded ? 1 : 0,
|
|
4719
4754
|
duration: 200,
|
|
4720
4755
|
useNativeDriver: true
|
|
4721
4756
|
}).start();
|
|
4722
4757
|
}, [expanded, rotate]);
|
|
4723
|
-
return /* @__PURE__ */
|
|
4758
|
+
return /* @__PURE__ */ jsx40(Pressable9, { onPress: () => setExpanded(!expanded), style: ({ pressed }) => [{ opacity: pressed ? 0.95 : 1 }], children: /* @__PURE__ */ jsxs22(
|
|
4724
4759
|
Card,
|
|
4725
4760
|
{
|
|
4726
4761
|
padded: false,
|
|
@@ -4734,10 +4769,10 @@ function MergeRequestStatusCard({
|
|
|
4734
4769
|
],
|
|
4735
4770
|
children: [
|
|
4736
4771
|
/* @__PURE__ */ jsxs22(View28, { style: { flexDirection: "row", alignItems: "center", gap: theme.spacing.lg }, children: [
|
|
4737
|
-
/* @__PURE__ */
|
|
4772
|
+
/* @__PURE__ */ jsx40(View28, { style: { width: 40, height: 40, borderRadius: 999, alignItems: "center", justifyContent: "center", backgroundColor: bgColor }, children: /* @__PURE__ */ jsx40(StatusIcon, { size: 20, color: iconColor }) }),
|
|
4738
4773
|
/* @__PURE__ */ jsxs22(View28, { style: { flex: 1, minWidth: 0 }, children: [
|
|
4739
4774
|
/* @__PURE__ */ jsxs22(View28, { style: { flexDirection: "row", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
4740
|
-
/* @__PURE__ */
|
|
4775
|
+
/* @__PURE__ */ jsx40(
|
|
4741
4776
|
Text,
|
|
4742
4777
|
{
|
|
4743
4778
|
style: {
|
|
@@ -4751,11 +4786,11 @@ function MergeRequestStatusCard({
|
|
|
4751
4786
|
children: statusText
|
|
4752
4787
|
}
|
|
4753
4788
|
),
|
|
4754
|
-
headerTimeAgo ? /* @__PURE__ */
|
|
4789
|
+
headerTimeAgo ? /* @__PURE__ */ jsx40(Text, { style: { fontSize: 10, lineHeight: 14, marginLeft: theme.spacing.sm, color: withAlpha(theme.colors.textMuted, 0.6) }, children: headerTimeAgo }) : null
|
|
4755
4790
|
] }),
|
|
4756
|
-
/* @__PURE__ */
|
|
4791
|
+
/* @__PURE__ */ jsx40(Text, { style: { fontSize: 12, lineHeight: 16, color: theme.colors.textMuted }, numberOfLines: 1, children: mergeRequest.title ?? "Untitled merge request" })
|
|
4757
4792
|
] }),
|
|
4758
|
-
headerRight ? /* @__PURE__ */
|
|
4793
|
+
headerRight ? /* @__PURE__ */ jsx40(View28, { children: headerRight }) : /* @__PURE__ */ jsx40(
|
|
4759
4794
|
Animated7.View,
|
|
4760
4795
|
{
|
|
4761
4796
|
style: {
|
|
@@ -4765,12 +4800,12 @@ function MergeRequestStatusCard({
|
|
|
4765
4800
|
}
|
|
4766
4801
|
]
|
|
4767
4802
|
},
|
|
4768
|
-
children: /* @__PURE__ */
|
|
4803
|
+
children: /* @__PURE__ */ jsx40(ChevronDown2, { size: 20, color: withAlpha(theme.colors.textMuted, 0.4) })
|
|
4769
4804
|
}
|
|
4770
4805
|
)
|
|
4771
4806
|
] }),
|
|
4772
4807
|
expanded ? /* @__PURE__ */ jsxs22(View28, { style: { marginTop: 16, marginLeft: 56 }, children: [
|
|
4773
|
-
/* @__PURE__ */
|
|
4808
|
+
/* @__PURE__ */ jsx40(
|
|
4774
4809
|
Text,
|
|
4775
4810
|
{
|
|
4776
4811
|
style: {
|
|
@@ -4784,7 +4819,7 @@ function MergeRequestStatusCard({
|
|
|
4784
4819
|
children: status.text
|
|
4785
4820
|
}
|
|
4786
4821
|
),
|
|
4787
|
-
createdTimeAgo ? /* @__PURE__ */
|
|
4822
|
+
createdTimeAgo ? /* @__PURE__ */ jsx40(
|
|
4788
4823
|
Text,
|
|
4789
4824
|
{
|
|
4790
4825
|
style: {
|
|
@@ -4795,8 +4830,8 @@ function MergeRequestStatusCard({
|
|
|
4795
4830
|
children: createdTimeAgo
|
|
4796
4831
|
}
|
|
4797
4832
|
) : null,
|
|
4798
|
-
/* @__PURE__ */
|
|
4799
|
-
mergeRequest.description ? /* @__PURE__ */
|
|
4833
|
+
/* @__PURE__ */ jsx40(Text, { style: { fontSize: 16, fontWeight: "600", color: textColor, marginBottom: 8 }, children: mergeRequest.title ?? "Untitled merge request" }),
|
|
4834
|
+
mergeRequest.description ? /* @__PURE__ */ jsx40(MarkdownText, { markdown: mergeRequest.description, variant: "mergeRequest" }) : null
|
|
4800
4835
|
] }) : null
|
|
4801
4836
|
]
|
|
4802
4837
|
}
|
|
@@ -4804,18 +4839,18 @@ function MergeRequestStatusCard({
|
|
|
4804
4839
|
}
|
|
4805
4840
|
|
|
4806
4841
|
// src/components/merge-requests/ReviewMergeRequestCarousel.tsx
|
|
4807
|
-
import * as
|
|
4842
|
+
import * as React30 from "react";
|
|
4808
4843
|
import { Animated as Animated9, FlatList, View as View31, useWindowDimensions as useWindowDimensions3 } from "react-native";
|
|
4809
4844
|
|
|
4810
4845
|
// src/components/merge-requests/ReviewMergeRequestCard.tsx
|
|
4811
|
-
import * as
|
|
4846
|
+
import * as React29 from "react";
|
|
4812
4847
|
import { ActivityIndicator as ActivityIndicator5, Animated as Animated8, Pressable as Pressable11, View as View30 } from "react-native";
|
|
4813
4848
|
import { Check as Check4, ChevronDown as ChevronDown3, Play as Play3, X as X3 } from "lucide-react-native";
|
|
4814
4849
|
|
|
4815
4850
|
// src/components/merge-requests/ReviewMergeRequestActionButton.tsx
|
|
4816
|
-
import * as
|
|
4851
|
+
import * as React28 from "react";
|
|
4817
4852
|
import { Pressable as Pressable10, View as View29 } from "react-native";
|
|
4818
|
-
import { jsx as
|
|
4853
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
4819
4854
|
function ReviewMergeRequestActionButton({
|
|
4820
4855
|
accessibilityLabel,
|
|
4821
4856
|
backgroundColor,
|
|
@@ -4824,13 +4859,13 @@ function ReviewMergeRequestActionButton({
|
|
|
4824
4859
|
children,
|
|
4825
4860
|
iconOnly
|
|
4826
4861
|
}) {
|
|
4827
|
-
const [pressed, setPressed] =
|
|
4862
|
+
const [pressed, setPressed] = React28.useState(false);
|
|
4828
4863
|
const height = iconOnly ? 36 : 40;
|
|
4829
4864
|
const width = iconOnly ? 36 : void 0;
|
|
4830
4865
|
const paddingHorizontal = iconOnly ? 0 : 16;
|
|
4831
4866
|
const paddingVertical = iconOnly ? 0 : 8;
|
|
4832
4867
|
const opacity = disabled ? 0.5 : pressed ? 0.9 : 1;
|
|
4833
|
-
return /* @__PURE__ */
|
|
4868
|
+
return /* @__PURE__ */ jsx41(
|
|
4834
4869
|
View29,
|
|
4835
4870
|
{
|
|
4836
4871
|
style: {
|
|
@@ -4845,7 +4880,7 @@ function ReviewMergeRequestActionButton({
|
|
|
4845
4880
|
paddingVertical,
|
|
4846
4881
|
justifyContent: "center"
|
|
4847
4882
|
},
|
|
4848
|
-
children: /* @__PURE__ */
|
|
4883
|
+
children: /* @__PURE__ */ jsx41(
|
|
4849
4884
|
Pressable10,
|
|
4850
4885
|
{
|
|
4851
4886
|
accessibilityRole: "button",
|
|
@@ -4869,7 +4904,7 @@ function ReviewMergeRequestActionButton({
|
|
|
4869
4904
|
}
|
|
4870
4905
|
|
|
4871
4906
|
// src/components/merge-requests/ReviewMergeRequestCard.tsx
|
|
4872
|
-
import { jsx as
|
|
4907
|
+
import { jsx as jsx42, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
4873
4908
|
function ReviewMergeRequestCard({
|
|
4874
4909
|
mr,
|
|
4875
4910
|
index,
|
|
@@ -4886,14 +4921,14 @@ function ReviewMergeRequestCard({
|
|
|
4886
4921
|
onTest
|
|
4887
4922
|
}) {
|
|
4888
4923
|
const theme = useTheme();
|
|
4889
|
-
const status =
|
|
4924
|
+
const status = React29.useMemo(() => getMergeRequestStatusDisplay(mr.status), [mr.status]);
|
|
4890
4925
|
const canAct = mr.status === "open";
|
|
4891
|
-
const rotate =
|
|
4892
|
-
|
|
4926
|
+
const rotate = React29.useRef(new Animated8.Value(isExpanded ? 1 : 0)).current;
|
|
4927
|
+
React29.useEffect(() => {
|
|
4893
4928
|
Animated8.timing(rotate, { toValue: isExpanded ? 1 : 0, duration: 200, useNativeDriver: true }).start();
|
|
4894
4929
|
}, [isExpanded, rotate]);
|
|
4895
4930
|
const position = total > 1 ? `${index + 1}/${total}` : "Merge request";
|
|
4896
|
-
return /* @__PURE__ */
|
|
4931
|
+
return /* @__PURE__ */ jsx42(Pressable11, { onPress: onToggle, style: ({ pressed }) => ({ opacity: pressed ? 0.95 : 1 }), children: /* @__PURE__ */ jsxs23(
|
|
4897
4932
|
Card,
|
|
4898
4933
|
{
|
|
4899
4934
|
padded: false,
|
|
@@ -4907,9 +4942,9 @@ function ReviewMergeRequestCard({
|
|
|
4907
4942
|
],
|
|
4908
4943
|
children: [
|
|
4909
4944
|
/* @__PURE__ */ jsxs23(View30, { style: { flexDirection: "row", alignItems: "center", gap: 12 }, children: [
|
|
4910
|
-
/* @__PURE__ */
|
|
4945
|
+
/* @__PURE__ */ jsx42(Avatar, { size: 40, uri: (creator == null ? void 0 : creator.avatar) ?? null, name: (creator == null ? void 0 : creator.name) ?? void 0 }),
|
|
4911
4946
|
/* @__PURE__ */ jsxs23(View30, { style: { flex: 1, minWidth: 0 }, children: [
|
|
4912
|
-
/* @__PURE__ */
|
|
4947
|
+
/* @__PURE__ */ jsx42(
|
|
4913
4948
|
Text,
|
|
4914
4949
|
{
|
|
4915
4950
|
style: { fontWeight: theme.typography.fontWeight.semibold, color: theme.colors.text, fontSize: 16, lineHeight: 20 },
|
|
@@ -4923,18 +4958,18 @@ function ReviewMergeRequestCard({
|
|
|
4923
4958
|
position
|
|
4924
4959
|
] })
|
|
4925
4960
|
] }),
|
|
4926
|
-
/* @__PURE__ */
|
|
4961
|
+
/* @__PURE__ */ jsx42(
|
|
4927
4962
|
Animated8.View,
|
|
4928
4963
|
{
|
|
4929
4964
|
style: {
|
|
4930
4965
|
transform: [{ rotate: rotate.interpolate({ inputRange: [0, 1], outputRange: ["0deg", "180deg"] }) }]
|
|
4931
4966
|
},
|
|
4932
|
-
children: /* @__PURE__ */
|
|
4967
|
+
children: /* @__PURE__ */ jsx42(ChevronDown3, { size: 20, color: withAlpha(theme.colors.textMuted, 0.4) })
|
|
4933
4968
|
}
|
|
4934
4969
|
)
|
|
4935
4970
|
] }),
|
|
4936
4971
|
isExpanded ? /* @__PURE__ */ jsxs23(View30, { style: { marginTop: 16 }, children: [
|
|
4937
|
-
/* @__PURE__ */
|
|
4972
|
+
/* @__PURE__ */ jsx42(
|
|
4938
4973
|
Text,
|
|
4939
4974
|
{
|
|
4940
4975
|
style: {
|
|
@@ -4948,13 +4983,13 @@ function ReviewMergeRequestCard({
|
|
|
4948
4983
|
children: status.text
|
|
4949
4984
|
}
|
|
4950
4985
|
),
|
|
4951
|
-
/* @__PURE__ */
|
|
4952
|
-
mr.description ? /* @__PURE__ */
|
|
4986
|
+
/* @__PURE__ */ jsx42(Text, { style: { color: theme.colors.textMuted, fontSize: 12, lineHeight: 16, marginBottom: 12 }, children: creator ? `${creator.approvedOpenedMergeRequests} approved merge${creator.approvedOpenedMergeRequests !== 1 ? "s" : ""}` : "Loading stats..." }),
|
|
4987
|
+
mr.description ? /* @__PURE__ */ jsx42(MarkdownText, { markdown: mr.description, variant: "mergeRequest" }) : null
|
|
4953
4988
|
] }) : null,
|
|
4954
|
-
/* @__PURE__ */
|
|
4989
|
+
/* @__PURE__ */ jsx42(View30, { style: { height: 1, backgroundColor: withAlpha(theme.colors.borderStrong, 0.5), marginTop: 12, marginBottom: 12 } }),
|
|
4955
4990
|
/* @__PURE__ */ jsxs23(View30, { style: { flexDirection: "row", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
4956
4991
|
/* @__PURE__ */ jsxs23(View30, { style: { flexDirection: "row", gap: 8 }, children: [
|
|
4957
|
-
/* @__PURE__ */
|
|
4992
|
+
/* @__PURE__ */ jsx42(
|
|
4958
4993
|
ReviewMergeRequestActionButton,
|
|
4959
4994
|
{
|
|
4960
4995
|
accessibilityLabel: "Reject",
|
|
@@ -4963,12 +4998,12 @@ function ReviewMergeRequestCard({
|
|
|
4963
4998
|
onPress: onReject,
|
|
4964
4999
|
iconOnly: !isExpanded,
|
|
4965
5000
|
children: /* @__PURE__ */ jsxs23(View30, { style: { flexDirection: "row", alignItems: "center", gap: isExpanded ? 4 : 0 }, children: [
|
|
4966
|
-
/* @__PURE__ */
|
|
4967
|
-
isExpanded ? /* @__PURE__ */
|
|
5001
|
+
/* @__PURE__ */ jsx42(X3, { size: 18, color: "#FFFFFF" }),
|
|
5002
|
+
isExpanded ? /* @__PURE__ */ jsx42(Text, { style: { fontSize: 13, color: "#FFFFFF", fontWeight: theme.typography.fontWeight.semibold }, children: "Reject" }) : null
|
|
4968
5003
|
] })
|
|
4969
5004
|
}
|
|
4970
5005
|
),
|
|
4971
|
-
/* @__PURE__ */
|
|
5006
|
+
/* @__PURE__ */ jsx42(
|
|
4972
5007
|
ReviewMergeRequestActionButton,
|
|
4973
5008
|
{
|
|
4974
5009
|
accessibilityLabel: !canAct ? "Not actionable" : isProcessing ? "Processing" : "Approve",
|
|
@@ -4977,16 +5012,16 @@ function ReviewMergeRequestCard({
|
|
|
4977
5012
|
onPress: onApprove,
|
|
4978
5013
|
iconOnly: !isExpanded,
|
|
4979
5014
|
children: isProcessing ? /* @__PURE__ */ jsxs23(View30, { style: { flexDirection: "row", alignItems: "center", gap: isExpanded ? 4 : 0 }, children: [
|
|
4980
|
-
/* @__PURE__ */
|
|
4981
|
-
isExpanded ? /* @__PURE__ */
|
|
5015
|
+
/* @__PURE__ */ jsx42(ActivityIndicator5, { size: "small", color: "#FFFFFF" }),
|
|
5016
|
+
isExpanded ? /* @__PURE__ */ jsx42(Text, { style: { fontSize: 13, color: "#FFFFFF", fontWeight: theme.typography.fontWeight.semibold }, children: "Processing" }) : null
|
|
4982
5017
|
] }) : /* @__PURE__ */ jsxs23(View30, { style: { flexDirection: "row", alignItems: "center", gap: isExpanded ? 4 : 0 }, children: [
|
|
4983
|
-
/* @__PURE__ */
|
|
4984
|
-
isExpanded ? /* @__PURE__ */
|
|
5018
|
+
/* @__PURE__ */ jsx42(Check4, { size: 18, color: "#FFFFFF" }),
|
|
5019
|
+
isExpanded ? /* @__PURE__ */ jsx42(Text, { style: { fontSize: 13, color: "#FFFFFF", fontWeight: theme.typography.fontWeight.semibold }, children: "Approve" }) : null
|
|
4985
5020
|
] })
|
|
4986
5021
|
}
|
|
4987
5022
|
)
|
|
4988
5023
|
] }),
|
|
4989
|
-
/* @__PURE__ */
|
|
5024
|
+
/* @__PURE__ */ jsx42(
|
|
4990
5025
|
ReviewMergeRequestActionButton,
|
|
4991
5026
|
{
|
|
4992
5027
|
accessibilityLabel: "Test",
|
|
@@ -4994,9 +5029,9 @@ function ReviewMergeRequestCard({
|
|
|
4994
5029
|
disabled: isBuilding || isTestingThis,
|
|
4995
5030
|
onPress: onTest,
|
|
4996
5031
|
iconOnly: !isExpanded,
|
|
4997
|
-
children: isTestingThis ? /* @__PURE__ */
|
|
4998
|
-
/* @__PURE__ */
|
|
4999
|
-
isExpanded ? /* @__PURE__ */
|
|
5032
|
+
children: isTestingThis ? /* @__PURE__ */ jsx42(ActivityIndicator5, { size: "small", color: "#888" }) : /* @__PURE__ */ jsxs23(View30, { style: { flexDirection: "row", alignItems: "center", gap: isExpanded ? 4 : 0 }, children: [
|
|
5033
|
+
/* @__PURE__ */ jsx42(Play3, { size: 14, color: theme.colors.text }),
|
|
5034
|
+
isExpanded ? /* @__PURE__ */ jsx42(Text, { style: { fontSize: 13, color: theme.colors.text, fontWeight: theme.typography.fontWeight.semibold }, children: "Test" }) : null
|
|
5000
5035
|
] })
|
|
5001
5036
|
}
|
|
5002
5037
|
)
|
|
@@ -5007,7 +5042,7 @@ function ReviewMergeRequestCard({
|
|
|
5007
5042
|
}
|
|
5008
5043
|
|
|
5009
5044
|
// src/components/merge-requests/ReviewMergeRequestCarousel.tsx
|
|
5010
|
-
import { jsx as
|
|
5045
|
+
import { jsx as jsx43, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
5011
5046
|
function ReviewMergeRequestCarousel({
|
|
5012
5047
|
mergeRequests,
|
|
5013
5048
|
creatorStatsById,
|
|
@@ -5021,16 +5056,16 @@ function ReviewMergeRequestCarousel({
|
|
|
5021
5056
|
}) {
|
|
5022
5057
|
const theme = useTheme();
|
|
5023
5058
|
const { width } = useWindowDimensions3();
|
|
5024
|
-
const [expanded, setExpanded] =
|
|
5025
|
-
const carouselScrollX =
|
|
5059
|
+
const [expanded, setExpanded] = React30.useState({});
|
|
5060
|
+
const carouselScrollX = React30.useRef(new Animated9.Value(0)).current;
|
|
5026
5061
|
const peekAmount = 24;
|
|
5027
5062
|
const gap = 16;
|
|
5028
|
-
const cardWidth =
|
|
5063
|
+
const cardWidth = React30.useMemo(() => Math.max(1, width - theme.spacing.lg * 2 - peekAmount), [peekAmount, theme.spacing.lg, width]);
|
|
5029
5064
|
const snapInterval = cardWidth + gap;
|
|
5030
5065
|
const dotColor = theme.scheme === "dark" ? "#FFFFFF" : "#000000";
|
|
5031
5066
|
if (mergeRequests.length === 0) return null;
|
|
5032
5067
|
return /* @__PURE__ */ jsxs24(View31, { style: [{ marginHorizontal: -theme.spacing.lg }, style], children: [
|
|
5033
|
-
/* @__PURE__ */
|
|
5068
|
+
/* @__PURE__ */ jsx43(
|
|
5034
5069
|
FlatList,
|
|
5035
5070
|
{
|
|
5036
5071
|
horizontal: true,
|
|
@@ -5038,13 +5073,13 @@ function ReviewMergeRequestCarousel({
|
|
|
5038
5073
|
keyExtractor: (mr) => mr.id,
|
|
5039
5074
|
showsHorizontalScrollIndicator: false,
|
|
5040
5075
|
contentContainerStyle: { paddingHorizontal: theme.spacing.lg, paddingVertical: theme.spacing.sm },
|
|
5041
|
-
ItemSeparatorComponent: () => /* @__PURE__ */
|
|
5076
|
+
ItemSeparatorComponent: () => /* @__PURE__ */ jsx43(View31, { style: { width: gap } }),
|
|
5042
5077
|
snapToAlignment: "start",
|
|
5043
5078
|
decelerationRate: "fast",
|
|
5044
5079
|
snapToInterval: snapInterval,
|
|
5045
5080
|
disableIntervalMomentum: true,
|
|
5046
5081
|
style: { paddingRight: peekAmount },
|
|
5047
|
-
ListFooterComponent: /* @__PURE__ */
|
|
5082
|
+
ListFooterComponent: /* @__PURE__ */ jsx43(View31, { style: { width: peekAmount } }),
|
|
5048
5083
|
onScroll: Animated9.event([{ nativeEvent: { contentOffset: { x: carouselScrollX } } }], {
|
|
5049
5084
|
useNativeDriver: false
|
|
5050
5085
|
}),
|
|
@@ -5056,7 +5091,7 @@ function ReviewMergeRequestCarousel({
|
|
|
5056
5091
|
const isProcessing = Boolean(processingMrId && processingMrId === item.id);
|
|
5057
5092
|
const isAnyProcessing = Boolean(processingMrId);
|
|
5058
5093
|
const isTestingThis = Boolean(testingMrId && testingMrId === item.id);
|
|
5059
|
-
return /* @__PURE__ */
|
|
5094
|
+
return /* @__PURE__ */ jsx43(View31, { style: { width: cardWidth }, children: /* @__PURE__ */ jsx43(
|
|
5060
5095
|
ReviewMergeRequestCard,
|
|
5061
5096
|
{
|
|
5062
5097
|
mr: item,
|
|
@@ -5077,7 +5112,7 @@ function ReviewMergeRequestCarousel({
|
|
|
5077
5112
|
}
|
|
5078
5113
|
}
|
|
5079
5114
|
),
|
|
5080
|
-
mergeRequests.length >= 1 ? /* @__PURE__ */
|
|
5115
|
+
mergeRequests.length >= 1 ? /* @__PURE__ */ jsx43(View31, { style: { flexDirection: "row", justifyContent: "center", columnGap: 8, marginTop: theme.spacing.md }, children: mergeRequests.map((mr, index) => {
|
|
5081
5116
|
const inputRange = [(index - 1) * snapInterval, index * snapInterval, (index + 1) * snapInterval];
|
|
5082
5117
|
const scale = carouselScrollX.interpolate({
|
|
5083
5118
|
inputRange,
|
|
@@ -5089,7 +5124,7 @@ function ReviewMergeRequestCarousel({
|
|
|
5089
5124
|
outputRange: [0.4, 1, 0.4],
|
|
5090
5125
|
extrapolate: "clamp"
|
|
5091
5126
|
});
|
|
5092
|
-
return /* @__PURE__ */
|
|
5127
|
+
return /* @__PURE__ */ jsx43(
|
|
5093
5128
|
Animated9.View,
|
|
5094
5129
|
{
|
|
5095
5130
|
style: {
|
|
@@ -5108,7 +5143,7 @@ function ReviewMergeRequestCarousel({
|
|
|
5108
5143
|
}
|
|
5109
5144
|
|
|
5110
5145
|
// src/studio/ui/preview-panel/PreviewCollaborateSection.tsx
|
|
5111
|
-
import { Fragment as Fragment5, jsx as
|
|
5146
|
+
import { Fragment as Fragment5, jsx as jsx44, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
5112
5147
|
function PreviewCollaborateSection({
|
|
5113
5148
|
canSubmitMergeRequest,
|
|
5114
5149
|
incomingMergeRequests,
|
|
@@ -5124,13 +5159,13 @@ function PreviewCollaborateSection({
|
|
|
5124
5159
|
onTestMr
|
|
5125
5160
|
}) {
|
|
5126
5161
|
const theme = useTheme();
|
|
5127
|
-
const [submittingMr, setSubmittingMr] =
|
|
5162
|
+
const [submittingMr, setSubmittingMr] = React31.useState(false);
|
|
5128
5163
|
const hasSection = canSubmitMergeRequest || incomingMergeRequests.length > 0 || outgoingMergeRequests.length > 0;
|
|
5129
5164
|
if (!hasSection) return null;
|
|
5130
5165
|
const showActionsSubtitle = canSubmitMergeRequest && onSubmitMergeRequest || onTestMr && incomingMergeRequests.length > 0;
|
|
5131
5166
|
return /* @__PURE__ */ jsxs25(Fragment5, { children: [
|
|
5132
|
-
/* @__PURE__ */
|
|
5133
|
-
showActionsSubtitle ? /* @__PURE__ */
|
|
5167
|
+
/* @__PURE__ */ jsx44(SectionTitle, { marginTop: theme.spacing.xl, children: "Collaborate" }),
|
|
5168
|
+
showActionsSubtitle ? /* @__PURE__ */ jsx44(
|
|
5134
5169
|
Text,
|
|
5135
5170
|
{
|
|
5136
5171
|
style: {
|
|
@@ -5145,7 +5180,7 @@ function PreviewCollaborateSection({
|
|
|
5145
5180
|
children: "Actions"
|
|
5146
5181
|
}
|
|
5147
5182
|
) : null,
|
|
5148
|
-
canSubmitMergeRequest && onSubmitMergeRequest ? /* @__PURE__ */
|
|
5183
|
+
canSubmitMergeRequest && onSubmitMergeRequest ? /* @__PURE__ */ jsx44(
|
|
5149
5184
|
PressableCardRow,
|
|
5150
5185
|
{
|
|
5151
5186
|
accessibilityLabel: "Submit merge request",
|
|
@@ -5176,7 +5211,7 @@ function PreviewCollaborateSection({
|
|
|
5176
5211
|
borderColor: withAlpha("#03DAC6", 0.2),
|
|
5177
5212
|
marginBottom: theme.spacing.sm
|
|
5178
5213
|
},
|
|
5179
|
-
left: /* @__PURE__ */
|
|
5214
|
+
left: /* @__PURE__ */ jsx44(
|
|
5180
5215
|
View32,
|
|
5181
5216
|
{
|
|
5182
5217
|
style: {
|
|
@@ -5188,15 +5223,15 @@ function PreviewCollaborateSection({
|
|
|
5188
5223
|
backgroundColor: withAlpha("#03DAC6", 0.1),
|
|
5189
5224
|
marginRight: theme.spacing.lg
|
|
5190
5225
|
},
|
|
5191
|
-
children: submittingMr ? /* @__PURE__ */
|
|
5226
|
+
children: submittingMr ? /* @__PURE__ */ jsx44(ActivityIndicator6, { color: "#03DAC6", size: "small" }) : /* @__PURE__ */ jsx44(MergeIcon, { width: 20, height: 20, color: "#03DAC6" })
|
|
5192
5227
|
}
|
|
5193
5228
|
),
|
|
5194
|
-
title: /* @__PURE__ */
|
|
5195
|
-
subtitle: /* @__PURE__ */
|
|
5196
|
-
right: /* @__PURE__ */
|
|
5229
|
+
title: /* @__PURE__ */ jsx44(Text, { style: { color: theme.colors.text, fontSize: 16, lineHeight: 20, fontWeight: theme.typography.fontWeight.semibold }, children: "Submit your new changes" }),
|
|
5230
|
+
subtitle: /* @__PURE__ */ jsx44(Text, { style: { color: theme.colors.textMuted, fontSize: 12, lineHeight: 16, marginTop: 2 }, children: "Ask to merge this remix to the original app" }),
|
|
5231
|
+
right: /* @__PURE__ */ jsx44(Send2, { size: 16, color: "#03DAC6" })
|
|
5197
5232
|
}
|
|
5198
5233
|
) : null,
|
|
5199
|
-
onTestMr && incomingMergeRequests.length > 0 ? /* @__PURE__ */
|
|
5234
|
+
onTestMr && incomingMergeRequests.length > 0 ? /* @__PURE__ */ jsx44(
|
|
5200
5235
|
ReviewMergeRequestCarousel,
|
|
5201
5236
|
{
|
|
5202
5237
|
mergeRequests: incomingMergeRequests,
|
|
@@ -5210,7 +5245,7 @@ function PreviewCollaborateSection({
|
|
|
5210
5245
|
}
|
|
5211
5246
|
) : null,
|
|
5212
5247
|
outgoingMergeRequests.length > 0 ? /* @__PURE__ */ jsxs25(Fragment5, { children: [
|
|
5213
|
-
/* @__PURE__ */
|
|
5248
|
+
/* @__PURE__ */ jsx44(
|
|
5214
5249
|
Text,
|
|
5215
5250
|
{
|
|
5216
5251
|
style: {
|
|
@@ -5226,13 +5261,13 @@ function PreviewCollaborateSection({
|
|
|
5226
5261
|
children: "History"
|
|
5227
5262
|
}
|
|
5228
5263
|
),
|
|
5229
|
-
outgoingMergeRequests.map((mr) => /* @__PURE__ */
|
|
5264
|
+
outgoingMergeRequests.map((mr) => /* @__PURE__ */ jsx44(View32, { style: { marginBottom: theme.spacing.sm }, children: /* @__PURE__ */ jsx44(MergeRequestStatusCard, { mergeRequest: toMergeRequestSummary(mr) }) }, mr.id))
|
|
5230
5265
|
] }) : null
|
|
5231
5266
|
] });
|
|
5232
5267
|
}
|
|
5233
5268
|
|
|
5234
5269
|
// src/studio/ui/preview-panel/usePreviewPanelData.ts
|
|
5235
|
-
import * as
|
|
5270
|
+
import * as React33 from "react";
|
|
5236
5271
|
|
|
5237
5272
|
// src/data/apps/images/remote.ts
|
|
5238
5273
|
var AppImagesRemoteDataSourceImpl = class extends BaseRemote {
|
|
@@ -5283,7 +5318,7 @@ var AppImagesRepositoryImpl = class extends BaseRepository {
|
|
|
5283
5318
|
var appImagesRepository = new AppImagesRepositoryImpl(appImagesRemoteDataSource);
|
|
5284
5319
|
|
|
5285
5320
|
// src/studio/hooks/useAppStats.ts
|
|
5286
|
-
import * as
|
|
5321
|
+
import * as React32 from "react";
|
|
5287
5322
|
import * as Haptics2 from "expo-haptics";
|
|
5288
5323
|
|
|
5289
5324
|
// src/data/likes/remote.ts
|
|
@@ -5352,34 +5387,34 @@ function useAppStats({
|
|
|
5352
5387
|
initialIsLiked = false,
|
|
5353
5388
|
onOpenComments
|
|
5354
5389
|
}) {
|
|
5355
|
-
const [likeCount, setLikeCount] =
|
|
5356
|
-
const [commentCount, setCommentCount] =
|
|
5357
|
-
const [forkCount, setForkCount] =
|
|
5358
|
-
const [isLiked, setIsLiked] =
|
|
5359
|
-
const didMutateRef =
|
|
5360
|
-
const lastAppIdRef =
|
|
5361
|
-
|
|
5390
|
+
const [likeCount, setLikeCount] = React32.useState(initialLikes);
|
|
5391
|
+
const [commentCount, setCommentCount] = React32.useState(initialComments);
|
|
5392
|
+
const [forkCount, setForkCount] = React32.useState(initialForks);
|
|
5393
|
+
const [isLiked, setIsLiked] = React32.useState(initialIsLiked);
|
|
5394
|
+
const didMutateRef = React32.useRef(false);
|
|
5395
|
+
const lastAppIdRef = React32.useRef("");
|
|
5396
|
+
React32.useEffect(() => {
|
|
5362
5397
|
if (lastAppIdRef.current === appId) return;
|
|
5363
5398
|
lastAppIdRef.current = appId;
|
|
5364
5399
|
didMutateRef.current = false;
|
|
5365
5400
|
}, [appId]);
|
|
5366
|
-
|
|
5401
|
+
React32.useEffect(() => {
|
|
5367
5402
|
if (didMutateRef.current) return;
|
|
5368
5403
|
setLikeCount(initialLikes);
|
|
5369
5404
|
}, [appId, initialLikes]);
|
|
5370
|
-
|
|
5405
|
+
React32.useEffect(() => {
|
|
5371
5406
|
if (didMutateRef.current) return;
|
|
5372
5407
|
setCommentCount(initialComments);
|
|
5373
5408
|
}, [appId, initialComments]);
|
|
5374
|
-
|
|
5409
|
+
React32.useEffect(() => {
|
|
5375
5410
|
if (didMutateRef.current) return;
|
|
5376
5411
|
setForkCount(initialForks);
|
|
5377
5412
|
}, [appId, initialForks]);
|
|
5378
|
-
|
|
5413
|
+
React32.useEffect(() => {
|
|
5379
5414
|
if (didMutateRef.current) return;
|
|
5380
5415
|
setIsLiked(initialIsLiked);
|
|
5381
5416
|
}, [appId, initialIsLiked]);
|
|
5382
|
-
const handleLike =
|
|
5417
|
+
const handleLike = React32.useCallback(async () => {
|
|
5383
5418
|
var _a, _b;
|
|
5384
5419
|
if (!appId) return;
|
|
5385
5420
|
didMutateRef.current = true;
|
|
@@ -5403,7 +5438,7 @@ function useAppStats({
|
|
|
5403
5438
|
setLikeCount((prev) => Math.max(0, prev + (newIsLiked ? -1 : 1)));
|
|
5404
5439
|
}
|
|
5405
5440
|
}, [appId, isLiked, likeCount]);
|
|
5406
|
-
const handleOpenComments =
|
|
5441
|
+
const handleOpenComments = React32.useCallback(() => {
|
|
5407
5442
|
if (!appId) return;
|
|
5408
5443
|
try {
|
|
5409
5444
|
void Haptics2.impactAsync(Haptics2.ImpactFeedbackStyle.Light);
|
|
@@ -5418,11 +5453,11 @@ function useAppStats({
|
|
|
5418
5453
|
var LIKE_DEBUG_PREFIX = "[COMERGE_LIKE_DEBUG]";
|
|
5419
5454
|
function usePreviewPanelData(params) {
|
|
5420
5455
|
const { app, isOwner, outgoingMergeRequests, onOpenComments, commentCountOverride } = params;
|
|
5421
|
-
const [imageUrl, setImageUrl] =
|
|
5422
|
-
const [imageLoaded, setImageLoaded] =
|
|
5423
|
-
const [insights, setInsights] =
|
|
5424
|
-
const [creator, setCreator] =
|
|
5425
|
-
|
|
5456
|
+
const [imageUrl, setImageUrl] = React33.useState(null);
|
|
5457
|
+
const [imageLoaded, setImageLoaded] = React33.useState(false);
|
|
5458
|
+
const [insights, setInsights] = React33.useState({ likes: 0, comments: 0, forks: 0, downloads: 0 });
|
|
5459
|
+
const [creator, setCreator] = React33.useState(null);
|
|
5460
|
+
React33.useEffect(() => {
|
|
5426
5461
|
if (!(app == null ? void 0 : app.id)) return;
|
|
5427
5462
|
let cancelled = false;
|
|
5428
5463
|
(async () => {
|
|
@@ -5437,7 +5472,7 @@ function usePreviewPanelData(params) {
|
|
|
5437
5472
|
cancelled = true;
|
|
5438
5473
|
};
|
|
5439
5474
|
}, [app == null ? void 0 : app.id]);
|
|
5440
|
-
|
|
5475
|
+
React33.useEffect(() => {
|
|
5441
5476
|
if (!(app == null ? void 0 : app.createdBy)) return;
|
|
5442
5477
|
let cancelled = false;
|
|
5443
5478
|
(async () => {
|
|
@@ -5453,10 +5488,10 @@ function usePreviewPanelData(params) {
|
|
|
5453
5488
|
cancelled = true;
|
|
5454
5489
|
};
|
|
5455
5490
|
}, [app == null ? void 0 : app.createdBy]);
|
|
5456
|
-
|
|
5491
|
+
React33.useEffect(() => {
|
|
5457
5492
|
setImageLoaded(false);
|
|
5458
5493
|
}, [app == null ? void 0 : app.id]);
|
|
5459
|
-
|
|
5494
|
+
React33.useEffect(() => {
|
|
5460
5495
|
if (!(app == null ? void 0 : app.id)) return;
|
|
5461
5496
|
let cancelled = false;
|
|
5462
5497
|
(async () => {
|
|
@@ -5481,7 +5516,7 @@ function usePreviewPanelData(params) {
|
|
|
5481
5516
|
cancelled = true;
|
|
5482
5517
|
};
|
|
5483
5518
|
}, [app == null ? void 0 : app.id]);
|
|
5484
|
-
|
|
5519
|
+
React33.useEffect(() => {
|
|
5485
5520
|
if (!(app == null ? void 0 : app.id)) return;
|
|
5486
5521
|
log.debug(
|
|
5487
5522
|
`${LIKE_DEBUG_PREFIX} usePreviewPanelData.appChanged appId=${app.id} app.isLiked=${String(app.isLiked)}`
|
|
@@ -5495,7 +5530,7 @@ function usePreviewPanelData(params) {
|
|
|
5495
5530
|
initialIsLiked: Boolean(app == null ? void 0 : app.isLiked),
|
|
5496
5531
|
onOpenComments
|
|
5497
5532
|
});
|
|
5498
|
-
const canSubmitMergeRequest =
|
|
5533
|
+
const canSubmitMergeRequest = React33.useMemo(() => {
|
|
5499
5534
|
if (!isOwner) return false;
|
|
5500
5535
|
if (!app) return false;
|
|
5501
5536
|
if (!app.forkedFromAppId) return false;
|
|
@@ -5517,7 +5552,7 @@ function usePreviewPanelData(params) {
|
|
|
5517
5552
|
}
|
|
5518
5553
|
|
|
5519
5554
|
// src/studio/ui/PreviewPanel.tsx
|
|
5520
|
-
import { jsx as
|
|
5555
|
+
import { jsx as jsx45, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
5521
5556
|
function PreviewPanel({
|
|
5522
5557
|
app,
|
|
5523
5558
|
loading,
|
|
@@ -5548,16 +5583,16 @@ function PreviewPanel({
|
|
|
5548
5583
|
onOpenComments,
|
|
5549
5584
|
commentCountOverride
|
|
5550
5585
|
});
|
|
5551
|
-
const header = /* @__PURE__ */
|
|
5586
|
+
const header = /* @__PURE__ */ jsx45(PreviewPanelHeader, { isOwner, onClose, onNavigateHome, onGoToChat });
|
|
5552
5587
|
if (loading || !app) {
|
|
5553
|
-
return /* @__PURE__ */
|
|
5554
|
-
/* @__PURE__ */
|
|
5555
|
-
/* @__PURE__ */
|
|
5556
|
-
/* @__PURE__ */
|
|
5588
|
+
return /* @__PURE__ */ jsx45(PreviewPage, { header, children: /* @__PURE__ */ jsxs26(View33, { style: { flex: 1, justifyContent: "center", alignItems: "center", padding: 24 }, children: [
|
|
5589
|
+
/* @__PURE__ */ jsx45(ActivityIndicator7, {}),
|
|
5590
|
+
/* @__PURE__ */ jsx45(View33, { style: { height: 12 } }),
|
|
5591
|
+
/* @__PURE__ */ jsx45(Text, { variant: "bodyMuted", children: "Loading app\u2026" })
|
|
5557
5592
|
] }) });
|
|
5558
5593
|
}
|
|
5559
5594
|
return /* @__PURE__ */ jsxs26(PreviewPage, { header, children: [
|
|
5560
|
-
/* @__PURE__ */
|
|
5595
|
+
/* @__PURE__ */ jsx45(
|
|
5561
5596
|
PreviewHeroSection,
|
|
5562
5597
|
{
|
|
5563
5598
|
appStatus: app.status,
|
|
@@ -5575,8 +5610,8 @@ function PreviewPanel({
|
|
|
5575
5610
|
}
|
|
5576
5611
|
}
|
|
5577
5612
|
),
|
|
5578
|
-
/* @__PURE__ */
|
|
5579
|
-
/* @__PURE__ */
|
|
5613
|
+
/* @__PURE__ */ jsx45(PreviewMetaSection, { app, isOwner, creator, downloadsCount: insights.downloads }),
|
|
5614
|
+
/* @__PURE__ */ jsx45(
|
|
5580
5615
|
PreviewCustomizeSection,
|
|
5581
5616
|
{
|
|
5582
5617
|
app,
|
|
@@ -5587,7 +5622,7 @@ function PreviewPanel({
|
|
|
5587
5622
|
onStartDraw
|
|
5588
5623
|
}
|
|
5589
5624
|
),
|
|
5590
|
-
/* @__PURE__ */
|
|
5625
|
+
/* @__PURE__ */ jsx45(
|
|
5591
5626
|
PreviewCollaborateSection,
|
|
5592
5627
|
{
|
|
5593
5628
|
canSubmitMergeRequest,
|
|
@@ -5608,23 +5643,23 @@ function PreviewPanel({
|
|
|
5608
5643
|
}
|
|
5609
5644
|
|
|
5610
5645
|
// src/studio/ui/ChatPanel.tsx
|
|
5611
|
-
import * as
|
|
5646
|
+
import * as React38 from "react";
|
|
5612
5647
|
import { ActivityIndicator as ActivityIndicator8, View as View41 } from "react-native";
|
|
5613
5648
|
|
|
5614
5649
|
// src/components/chat/ChatPage.tsx
|
|
5615
|
-
import * as
|
|
5616
|
-
import { Keyboard as Keyboard4, Platform as
|
|
5650
|
+
import * as React36 from "react";
|
|
5651
|
+
import { Keyboard as Keyboard4, Platform as Platform9, View as View37 } from "react-native";
|
|
5617
5652
|
import { useSafeAreaInsets as useSafeAreaInsets4 } from "react-native-safe-area-context";
|
|
5618
5653
|
|
|
5619
5654
|
// src/components/chat/ChatMessageList.tsx
|
|
5620
|
-
import * as
|
|
5655
|
+
import * as React35 from "react";
|
|
5621
5656
|
import { View as View36 } from "react-native";
|
|
5622
5657
|
import { BottomSheetFlatList } from "@gorhom/bottom-sheet";
|
|
5623
5658
|
|
|
5624
5659
|
// src/components/chat/ChatMessageBubble.tsx
|
|
5625
5660
|
import { View as View34 } from "react-native";
|
|
5626
5661
|
import { CheckCheck as CheckCheck2, GitMerge as GitMerge2 } from "lucide-react-native";
|
|
5627
|
-
import { jsx as
|
|
5662
|
+
import { jsx as jsx46, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
5628
5663
|
function ChatMessageBubble({ message, renderContent, style }) {
|
|
5629
5664
|
var _a, _b;
|
|
5630
5665
|
const theme = useTheme();
|
|
@@ -5638,7 +5673,7 @@ function ChatMessageBubble({ message, renderContent, style }) {
|
|
|
5638
5673
|
const bubbleVariant = isHuman ? "surface" : "surfaceRaised";
|
|
5639
5674
|
const cornerStyle = isHuman ? { borderTopRightRadius: 0 } : { borderTopLeftRadius: 0 };
|
|
5640
5675
|
const bodyColor = metaStatus === "success" ? theme.colors.success : metaStatus === "error" ? theme.colors.danger : void 0;
|
|
5641
|
-
return /* @__PURE__ */
|
|
5676
|
+
return /* @__PURE__ */ jsx46(View34, { style: [align, style], children: /* @__PURE__ */ jsx46(
|
|
5642
5677
|
Surface,
|
|
5643
5678
|
{
|
|
5644
5679
|
variant: bubbleVariant,
|
|
@@ -5654,26 +5689,26 @@ function ChatMessageBubble({ message, renderContent, style }) {
|
|
|
5654
5689
|
cornerStyle
|
|
5655
5690
|
],
|
|
5656
5691
|
children: /* @__PURE__ */ jsxs27(View34, { style: { flexDirection: "row", alignItems: "center" }, children: [
|
|
5657
|
-
isMergeCompleted ? /* @__PURE__ */
|
|
5658
|
-
isMergeApproved ? /* @__PURE__ */
|
|
5659
|
-
/* @__PURE__ */
|
|
5692
|
+
isMergeCompleted ? /* @__PURE__ */ jsx46(CheckCheck2, { size: 16, color: theme.colors.success, style: { marginRight: theme.spacing.sm } }) : null,
|
|
5693
|
+
isMergeApproved ? /* @__PURE__ */ jsx46(GitMerge2, { size: 16, color: theme.colors.text, style: { marginRight: theme.spacing.sm } }) : null,
|
|
5694
|
+
/* @__PURE__ */ jsx46(View34, { style: { flexShrink: 1, minWidth: 0 }, children: renderContent ? renderContent(message) : /* @__PURE__ */ jsx46(MarkdownText, { markdown: message.content, variant: "chat", bodyColor }) })
|
|
5660
5695
|
] })
|
|
5661
5696
|
}
|
|
5662
5697
|
) });
|
|
5663
5698
|
}
|
|
5664
5699
|
|
|
5665
5700
|
// src/components/chat/TypingIndicator.tsx
|
|
5666
|
-
import * as
|
|
5701
|
+
import * as React34 from "react";
|
|
5667
5702
|
import { Animated as Animated10, View as View35 } from "react-native";
|
|
5668
|
-
import { jsx as
|
|
5703
|
+
import { jsx as jsx47 } from "react/jsx-runtime";
|
|
5669
5704
|
function TypingIndicator({ style }) {
|
|
5670
5705
|
const theme = useTheme();
|
|
5671
5706
|
const dotColor = theme.colors.textSubtle;
|
|
5672
|
-
const anims =
|
|
5707
|
+
const anims = React34.useMemo(
|
|
5673
5708
|
() => [new Animated10.Value(0.3), new Animated10.Value(0.3), new Animated10.Value(0.3)],
|
|
5674
5709
|
[]
|
|
5675
5710
|
);
|
|
5676
|
-
|
|
5711
|
+
React34.useEffect(() => {
|
|
5677
5712
|
const loops = [];
|
|
5678
5713
|
anims.forEach((a, idx) => {
|
|
5679
5714
|
const seq = Animated10.sequence([
|
|
@@ -5688,7 +5723,7 @@ function TypingIndicator({ style }) {
|
|
|
5688
5723
|
loops.forEach((l) => l.stop());
|
|
5689
5724
|
};
|
|
5690
5725
|
}, [anims]);
|
|
5691
|
-
return /* @__PURE__ */
|
|
5726
|
+
return /* @__PURE__ */ jsx47(View35, { style: [{ flexDirection: "row", alignItems: "center" }, style], children: anims.map((a, i) => /* @__PURE__ */ jsx47(
|
|
5692
5727
|
Animated10.View,
|
|
5693
5728
|
{
|
|
5694
5729
|
style: {
|
|
@@ -5706,8 +5741,8 @@ function TypingIndicator({ style }) {
|
|
|
5706
5741
|
}
|
|
5707
5742
|
|
|
5708
5743
|
// src/components/chat/ChatMessageList.tsx
|
|
5709
|
-
import { jsx as
|
|
5710
|
-
var ChatMessageList =
|
|
5744
|
+
import { jsx as jsx48, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
5745
|
+
var ChatMessageList = React35.forwardRef(
|
|
5711
5746
|
({
|
|
5712
5747
|
messages,
|
|
5713
5748
|
showTypingIndicator = false,
|
|
@@ -5718,20 +5753,20 @@ var ChatMessageList = React33.forwardRef(
|
|
|
5718
5753
|
nearBottomThreshold = 200
|
|
5719
5754
|
}, ref) => {
|
|
5720
5755
|
const theme = useTheme();
|
|
5721
|
-
const listRef =
|
|
5722
|
-
const nearBottomRef =
|
|
5723
|
-
const initialScrollDoneRef =
|
|
5724
|
-
const lastMessageIdRef =
|
|
5725
|
-
const data =
|
|
5756
|
+
const listRef = React35.useRef(null);
|
|
5757
|
+
const nearBottomRef = React35.useRef(true);
|
|
5758
|
+
const initialScrollDoneRef = React35.useRef(false);
|
|
5759
|
+
const lastMessageIdRef = React35.useRef(null);
|
|
5760
|
+
const data = React35.useMemo(() => {
|
|
5726
5761
|
return [...messages].reverse();
|
|
5727
5762
|
}, [messages]);
|
|
5728
|
-
const scrollToBottom =
|
|
5763
|
+
const scrollToBottom = React35.useCallback((options) => {
|
|
5729
5764
|
var _a;
|
|
5730
5765
|
const animated = (options == null ? void 0 : options.animated) ?? true;
|
|
5731
5766
|
(_a = listRef.current) == null ? void 0 : _a.scrollToOffset({ offset: 0, animated });
|
|
5732
5767
|
}, []);
|
|
5733
|
-
|
|
5734
|
-
const handleScroll =
|
|
5768
|
+
React35.useImperativeHandle(ref, () => ({ scrollToBottom }), [scrollToBottom]);
|
|
5769
|
+
const handleScroll = React35.useCallback(
|
|
5735
5770
|
(e) => {
|
|
5736
5771
|
const { contentOffset, contentSize, layoutMeasurement } = e.nativeEvent;
|
|
5737
5772
|
const distanceFromBottom = Math.max(contentOffset.y - Math.max(bottomInset, 0), 0);
|
|
@@ -5743,7 +5778,7 @@ var ChatMessageList = React33.forwardRef(
|
|
|
5743
5778
|
},
|
|
5744
5779
|
[bottomInset, nearBottomThreshold, onNearBottomChange]
|
|
5745
5780
|
);
|
|
5746
|
-
|
|
5781
|
+
React35.useEffect(() => {
|
|
5747
5782
|
if (!initialScrollDoneRef.current) return;
|
|
5748
5783
|
const lastId = messages.length > 0 ? messages[messages.length - 1].id : null;
|
|
5749
5784
|
const prevLastId = lastMessageIdRef.current;
|
|
@@ -5753,14 +5788,14 @@ var ChatMessageList = React33.forwardRef(
|
|
|
5753
5788
|
const id = requestAnimationFrame(() => scrollToBottom({ animated: true }));
|
|
5754
5789
|
return () => cancelAnimationFrame(id);
|
|
5755
5790
|
}, [messages, scrollToBottom]);
|
|
5756
|
-
|
|
5791
|
+
React35.useEffect(() => {
|
|
5757
5792
|
if (showTypingIndicator && nearBottomRef.current) {
|
|
5758
5793
|
const id = requestAnimationFrame(() => scrollToBottom({ animated: true }));
|
|
5759
5794
|
return () => cancelAnimationFrame(id);
|
|
5760
5795
|
}
|
|
5761
5796
|
return void 0;
|
|
5762
5797
|
}, [showTypingIndicator, scrollToBottom]);
|
|
5763
|
-
return /* @__PURE__ */
|
|
5798
|
+
return /* @__PURE__ */ jsx48(
|
|
5764
5799
|
BottomSheetFlatList,
|
|
5765
5800
|
{
|
|
5766
5801
|
ref: listRef,
|
|
@@ -5786,11 +5821,11 @@ var ChatMessageList = React33.forwardRef(
|
|
|
5786
5821
|
},
|
|
5787
5822
|
contentStyle
|
|
5788
5823
|
],
|
|
5789
|
-
ItemSeparatorComponent: () => /* @__PURE__ */
|
|
5790
|
-
renderItem: ({ item }) => /* @__PURE__ */
|
|
5824
|
+
ItemSeparatorComponent: () => /* @__PURE__ */ jsx48(View36, { style: { height: theme.spacing.sm } }),
|
|
5825
|
+
renderItem: ({ item }) => /* @__PURE__ */ jsx48(ChatMessageBubble, { message: item, renderContent: renderMessageContent }),
|
|
5791
5826
|
ListHeaderComponent: /* @__PURE__ */ jsxs28(View36, { children: [
|
|
5792
|
-
showTypingIndicator ? /* @__PURE__ */
|
|
5793
|
-
bottomInset > 0 ? /* @__PURE__ */
|
|
5827
|
+
showTypingIndicator ? /* @__PURE__ */ jsx48(View36, { style: { marginTop: theme.spacing.sm, alignSelf: "flex-start", paddingHorizontal: theme.spacing.lg }, children: /* @__PURE__ */ jsx48(TypingIndicator, {}) }) : null,
|
|
5828
|
+
bottomInset > 0 ? /* @__PURE__ */ jsx48(View36, { style: { height: bottomInset } }) : null
|
|
5794
5829
|
] })
|
|
5795
5830
|
}
|
|
5796
5831
|
);
|
|
@@ -5799,7 +5834,7 @@ var ChatMessageList = React33.forwardRef(
|
|
|
5799
5834
|
ChatMessageList.displayName = "ChatMessageList";
|
|
5800
5835
|
|
|
5801
5836
|
// src/components/chat/ChatPage.tsx
|
|
5802
|
-
import { jsx as
|
|
5837
|
+
import { jsx as jsx49, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
5803
5838
|
function ChatPage({
|
|
5804
5839
|
header,
|
|
5805
5840
|
messages,
|
|
@@ -5815,10 +5850,10 @@ function ChatPage({
|
|
|
5815
5850
|
}) {
|
|
5816
5851
|
const theme = useTheme();
|
|
5817
5852
|
const insets = useSafeAreaInsets4();
|
|
5818
|
-
const [composerHeight, setComposerHeight] =
|
|
5819
|
-
const [keyboardVisible, setKeyboardVisible] =
|
|
5820
|
-
|
|
5821
|
-
if (
|
|
5853
|
+
const [composerHeight, setComposerHeight] = React36.useState(0);
|
|
5854
|
+
const [keyboardVisible, setKeyboardVisible] = React36.useState(false);
|
|
5855
|
+
React36.useEffect(() => {
|
|
5856
|
+
if (Platform9.OS !== "ios") return;
|
|
5822
5857
|
const show = Keyboard4.addListener("keyboardWillShow", () => setKeyboardVisible(true));
|
|
5823
5858
|
const hide = Keyboard4.addListener("keyboardWillHide", () => setKeyboardVisible(false));
|
|
5824
5859
|
return () => {
|
|
@@ -5826,28 +5861,28 @@ function ChatPage({
|
|
|
5826
5861
|
hide.remove();
|
|
5827
5862
|
};
|
|
5828
5863
|
}, []);
|
|
5829
|
-
const footerBottomPadding =
|
|
5864
|
+
const footerBottomPadding = Platform9.OS === "ios" ? keyboardVisible ? 0 : insets.bottom : insets.bottom + 10;
|
|
5830
5865
|
const overlayBottom = composerHeight + footerBottomPadding + theme.spacing.lg;
|
|
5831
5866
|
const bottomInset = composerHeight + footerBottomPadding + theme.spacing.xl;
|
|
5832
|
-
const resolvedOverlay =
|
|
5867
|
+
const resolvedOverlay = React36.useMemo(() => {
|
|
5833
5868
|
var _a;
|
|
5834
5869
|
if (!overlay) return null;
|
|
5835
|
-
if (!
|
|
5870
|
+
if (!React36.isValidElement(overlay)) return overlay;
|
|
5836
5871
|
const prevStyle = (_a = overlay.props) == null ? void 0 : _a.style;
|
|
5837
|
-
return
|
|
5872
|
+
return React36.cloneElement(overlay, {
|
|
5838
5873
|
style: [prevStyle, { bottom: overlayBottom }]
|
|
5839
5874
|
});
|
|
5840
5875
|
}, [overlay, overlayBottom]);
|
|
5841
5876
|
return /* @__PURE__ */ jsxs29(View37, { style: [{ flex: 1 }, style], children: [
|
|
5842
|
-
header ? /* @__PURE__ */
|
|
5843
|
-
topBanner ? /* @__PURE__ */
|
|
5877
|
+
header ? /* @__PURE__ */ jsx49(View37, { children: header }) : null,
|
|
5878
|
+
topBanner ? /* @__PURE__ */ jsx49(View37, { style: { paddingHorizontal: theme.spacing.lg, paddingTop: theme.spacing.sm }, children: topBanner }) : null,
|
|
5844
5879
|
/* @__PURE__ */ jsxs29(View37, { style: { flex: 1 }, children: [
|
|
5845
5880
|
/* @__PURE__ */ jsxs29(
|
|
5846
5881
|
View37,
|
|
5847
5882
|
{
|
|
5848
5883
|
style: { flex: 1 },
|
|
5849
5884
|
children: [
|
|
5850
|
-
/* @__PURE__ */
|
|
5885
|
+
/* @__PURE__ */ jsx49(
|
|
5851
5886
|
ChatMessageList,
|
|
5852
5887
|
{
|
|
5853
5888
|
ref: listRef,
|
|
@@ -5862,7 +5897,7 @@ function ChatPage({
|
|
|
5862
5897
|
]
|
|
5863
5898
|
}
|
|
5864
5899
|
),
|
|
5865
|
-
/* @__PURE__ */
|
|
5900
|
+
/* @__PURE__ */ jsx49(
|
|
5866
5901
|
View37,
|
|
5867
5902
|
{
|
|
5868
5903
|
style: {
|
|
@@ -5874,7 +5909,7 @@ function ChatPage({
|
|
|
5874
5909
|
paddingTop: theme.spacing.sm,
|
|
5875
5910
|
paddingBottom: footerBottomPadding
|
|
5876
5911
|
},
|
|
5877
|
-
children: /* @__PURE__ */
|
|
5912
|
+
children: /* @__PURE__ */ jsx49(
|
|
5878
5913
|
ChatComposer,
|
|
5879
5914
|
{
|
|
5880
5915
|
...composer,
|
|
@@ -5889,15 +5924,15 @@ function ChatPage({
|
|
|
5889
5924
|
}
|
|
5890
5925
|
|
|
5891
5926
|
// src/components/chat/ScrollToBottomButton.tsx
|
|
5892
|
-
import * as
|
|
5927
|
+
import * as React37 from "react";
|
|
5893
5928
|
import { Pressable as Pressable12, View as View38 } from "react-native";
|
|
5894
5929
|
import Animated11, { Easing as Easing2, useAnimatedStyle as useAnimatedStyle2, useSharedValue as useSharedValue2, withTiming as withTiming2 } from "react-native-reanimated";
|
|
5895
|
-
import { jsx as
|
|
5930
|
+
import { jsx as jsx50 } from "react/jsx-runtime";
|
|
5896
5931
|
function ScrollToBottomButton({ visible, onPress, children, style }) {
|
|
5897
5932
|
const theme = useTheme();
|
|
5898
5933
|
const progress = useSharedValue2(visible ? 1 : 0);
|
|
5899
|
-
const [pressed, setPressed] =
|
|
5900
|
-
|
|
5934
|
+
const [pressed, setPressed] = React37.useState(false);
|
|
5935
|
+
React37.useEffect(() => {
|
|
5901
5936
|
progress.value = withTiming2(visible ? 1 : 0, { duration: 200, easing: Easing2.out(Easing2.ease) });
|
|
5902
5937
|
}, [progress, visible]);
|
|
5903
5938
|
const animStyle = useAnimatedStyle2(() => ({
|
|
@@ -5906,7 +5941,7 @@ function ScrollToBottomButton({ visible, onPress, children, style }) {
|
|
|
5906
5941
|
}));
|
|
5907
5942
|
const bg = theme.scheme === "dark" ? "rgba(39,39,42,0.9)" : "rgba(244,244,245,0.95)";
|
|
5908
5943
|
const border = theme.scheme === "dark" ? withAlpha("#FFFFFF", 0.12) : withAlpha("#000000", 0.08);
|
|
5909
|
-
return /* @__PURE__ */
|
|
5944
|
+
return /* @__PURE__ */ jsx50(
|
|
5910
5945
|
Animated11.View,
|
|
5911
5946
|
{
|
|
5912
5947
|
pointerEvents: visible ? "auto" : "none",
|
|
@@ -5920,7 +5955,7 @@ function ScrollToBottomButton({ visible, onPress, children, style }) {
|
|
|
5920
5955
|
style,
|
|
5921
5956
|
animStyle
|
|
5922
5957
|
],
|
|
5923
|
-
children: /* @__PURE__ */
|
|
5958
|
+
children: /* @__PURE__ */ jsx50(
|
|
5924
5959
|
View38,
|
|
5925
5960
|
{
|
|
5926
5961
|
style: {
|
|
@@ -5939,7 +5974,7 @@ function ScrollToBottomButton({ visible, onPress, children, style }) {
|
|
|
5939
5974
|
elevation: 5,
|
|
5940
5975
|
opacity: pressed ? 0.85 : 1
|
|
5941
5976
|
},
|
|
5942
|
-
children: /* @__PURE__ */
|
|
5977
|
+
children: /* @__PURE__ */ jsx50(
|
|
5943
5978
|
Pressable12,
|
|
5944
5979
|
{
|
|
5945
5980
|
onPress,
|
|
@@ -5958,7 +5993,7 @@ function ScrollToBottomButton({ visible, onPress, children, style }) {
|
|
|
5958
5993
|
|
|
5959
5994
|
// src/components/chat/ChatHeader.tsx
|
|
5960
5995
|
import { StyleSheet as StyleSheet4 } from "react-native";
|
|
5961
|
-
import { jsx as
|
|
5996
|
+
import { jsx as jsx51 } from "react/jsx-runtime";
|
|
5962
5997
|
function ChatHeader({ left, right, center, style }) {
|
|
5963
5998
|
const flattenedStyle = StyleSheet4.flatten([
|
|
5964
5999
|
{
|
|
@@ -5966,7 +6001,7 @@ function ChatHeader({ left, right, center, style }) {
|
|
|
5966
6001
|
},
|
|
5967
6002
|
style
|
|
5968
6003
|
]);
|
|
5969
|
-
return /* @__PURE__ */
|
|
6004
|
+
return /* @__PURE__ */ jsx51(
|
|
5970
6005
|
StudioSheetHeader,
|
|
5971
6006
|
{
|
|
5972
6007
|
left,
|
|
@@ -5979,12 +6014,12 @@ function ChatHeader({ left, right, center, style }) {
|
|
|
5979
6014
|
|
|
5980
6015
|
// src/components/chat/ForkNoticeBanner.tsx
|
|
5981
6016
|
import { View as View40 } from "react-native";
|
|
5982
|
-
import { jsx as
|
|
6017
|
+
import { jsx as jsx52, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
5983
6018
|
function ForkNoticeBanner({ isOwner = true, title, description, style }) {
|
|
5984
6019
|
const theme = useTheme();
|
|
5985
6020
|
const resolvedTitle = title ?? (isOwner ? "Remixed app" : "Remix app");
|
|
5986
6021
|
const resolvedDescription = description ?? (isOwner ? "Any changes you make will be a remix of the original app. You can view the edited version in the Remix tab in your apps page." : "Once you make edits, this remixed version will appear on your Remixed apps page.");
|
|
5987
|
-
return /* @__PURE__ */
|
|
6022
|
+
return /* @__PURE__ */ jsx52(
|
|
5988
6023
|
Card,
|
|
5989
6024
|
{
|
|
5990
6025
|
variant: "surfaceRaised",
|
|
@@ -6000,7 +6035,7 @@ function ForkNoticeBanner({ isOwner = true, title, description, style }) {
|
|
|
6000
6035
|
style
|
|
6001
6036
|
],
|
|
6002
6037
|
children: /* @__PURE__ */ jsxs30(View40, { style: { minWidth: 0 }, children: [
|
|
6003
|
-
/* @__PURE__ */
|
|
6038
|
+
/* @__PURE__ */ jsx52(
|
|
6004
6039
|
Text,
|
|
6005
6040
|
{
|
|
6006
6041
|
style: {
|
|
@@ -6014,7 +6049,7 @@ function ForkNoticeBanner({ isOwner = true, title, description, style }) {
|
|
|
6014
6049
|
children: resolvedTitle
|
|
6015
6050
|
}
|
|
6016
6051
|
),
|
|
6017
|
-
/* @__PURE__ */
|
|
6052
|
+
/* @__PURE__ */ jsx52(
|
|
6018
6053
|
Text,
|
|
6019
6054
|
{
|
|
6020
6055
|
style: {
|
|
@@ -6032,7 +6067,7 @@ function ForkNoticeBanner({ isOwner = true, title, description, style }) {
|
|
|
6032
6067
|
}
|
|
6033
6068
|
|
|
6034
6069
|
// src/studio/ui/ChatPanel.tsx
|
|
6035
|
-
import { jsx as
|
|
6070
|
+
import { jsx as jsx53, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
6036
6071
|
function ChatPanel({
|
|
6037
6072
|
title = "Chat",
|
|
6038
6073
|
autoFocusComposer = false,
|
|
@@ -6052,9 +6087,9 @@ function ChatPanel({
|
|
|
6052
6087
|
onStartDraw,
|
|
6053
6088
|
onSend
|
|
6054
6089
|
}) {
|
|
6055
|
-
const listRef =
|
|
6056
|
-
const [nearBottom, setNearBottom] =
|
|
6057
|
-
const handleSend =
|
|
6090
|
+
const listRef = React38.useRef(null);
|
|
6091
|
+
const [nearBottom, setNearBottom] = React38.useState(true);
|
|
6092
|
+
const handleSend = React38.useCallback(
|
|
6058
6093
|
async (text, composerAttachments) => {
|
|
6059
6094
|
const all = composerAttachments ?? attachments;
|
|
6060
6095
|
await onSend(text, all.length > 0 ? all : void 0);
|
|
@@ -6068,25 +6103,25 @@ function ChatPanel({
|
|
|
6068
6103
|
},
|
|
6069
6104
|
[attachments, nearBottom, onClearAttachments, onSend]
|
|
6070
6105
|
);
|
|
6071
|
-
const handleScrollToBottom =
|
|
6106
|
+
const handleScrollToBottom = React38.useCallback(() => {
|
|
6072
6107
|
var _a;
|
|
6073
6108
|
(_a = listRef.current) == null ? void 0 : _a.scrollToBottom({ animated: true });
|
|
6074
6109
|
}, []);
|
|
6075
|
-
const header = /* @__PURE__ */
|
|
6110
|
+
const header = /* @__PURE__ */ jsx53(
|
|
6076
6111
|
ChatHeader,
|
|
6077
6112
|
{
|
|
6078
6113
|
left: /* @__PURE__ */ jsxs31(View41, { style: { flexDirection: "row", alignItems: "center" }, children: [
|
|
6079
|
-
/* @__PURE__ */
|
|
6080
|
-
onNavigateHome ? /* @__PURE__ */
|
|
6114
|
+
/* @__PURE__ */ jsx53(StudioSheetHeaderIconButton, { onPress: onBack, accessibilityLabel: "Back", style: { marginRight: 8 }, children: /* @__PURE__ */ jsx53(IconBack, { size: 20, colorToken: "floatingContent" }) }),
|
|
6115
|
+
onNavigateHome ? /* @__PURE__ */ jsx53(StudioSheetHeaderIconButton, { onPress: onNavigateHome, accessibilityLabel: "Home", children: /* @__PURE__ */ jsx53(IconHome, { size: 20, colorToken: "floatingContent" }) }) : null
|
|
6081
6116
|
] }),
|
|
6082
6117
|
right: /* @__PURE__ */ jsxs31(View41, { style: { flexDirection: "row", alignItems: "center" }, children: [
|
|
6083
|
-
onStartDraw ? /* @__PURE__ */
|
|
6084
|
-
/* @__PURE__ */
|
|
6118
|
+
onStartDraw ? /* @__PURE__ */ jsx53(StudioSheetHeaderIconButton, { onPress: onStartDraw, accessibilityLabel: "Draw", intent: "danger", style: { marginRight: 8 }, children: /* @__PURE__ */ jsx53(IconDraw, { size: 20, colorToken: "onDanger" }) }) : null,
|
|
6119
|
+
/* @__PURE__ */ jsx53(StudioSheetHeaderIconButton, { onPress: onClose, accessibilityLabel: "Close", children: /* @__PURE__ */ jsx53(IconClose, { size: 20, colorToken: "floatingContent" }) })
|
|
6085
6120
|
] }),
|
|
6086
6121
|
center: null
|
|
6087
6122
|
}
|
|
6088
6123
|
);
|
|
6089
|
-
const topBanner = shouldForkOnEdit ? /* @__PURE__ */
|
|
6124
|
+
const topBanner = shouldForkOnEdit ? /* @__PURE__ */ jsx53(
|
|
6090
6125
|
ForkNoticeBanner,
|
|
6091
6126
|
{
|
|
6092
6127
|
isOwner: !shouldForkOnEdit,
|
|
@@ -6096,16 +6131,16 @@ function ChatPanel({
|
|
|
6096
6131
|
const showMessagesLoading = Boolean(loading) && messages.length === 0 || forking;
|
|
6097
6132
|
if (showMessagesLoading) {
|
|
6098
6133
|
return /* @__PURE__ */ jsxs31(View41, { style: { flex: 1 }, children: [
|
|
6099
|
-
/* @__PURE__ */
|
|
6100
|
-
topBanner ? /* @__PURE__ */
|
|
6134
|
+
/* @__PURE__ */ jsx53(View41, { children: header }),
|
|
6135
|
+
topBanner ? /* @__PURE__ */ jsx53(View41, { style: { paddingHorizontal: 16, paddingTop: 8 }, children: topBanner }) : null,
|
|
6101
6136
|
/* @__PURE__ */ jsxs31(View41, { style: { flex: 1, alignItems: "center", justifyContent: "center", paddingHorizontal: 24, paddingVertical: 12 }, children: [
|
|
6102
|
-
/* @__PURE__ */
|
|
6103
|
-
/* @__PURE__ */
|
|
6104
|
-
/* @__PURE__ */
|
|
6137
|
+
/* @__PURE__ */ jsx53(ActivityIndicator8, {}),
|
|
6138
|
+
/* @__PURE__ */ jsx53(View41, { style: { height: 12 } }),
|
|
6139
|
+
/* @__PURE__ */ jsx53(Text, { variant: "bodyMuted", children: forking ? "Creating your copy\u2026" : "Loading messages\u2026" })
|
|
6105
6140
|
] })
|
|
6106
6141
|
] });
|
|
6107
6142
|
}
|
|
6108
|
-
return /* @__PURE__ */
|
|
6143
|
+
return /* @__PURE__ */ jsx53(
|
|
6109
6144
|
ChatPage,
|
|
6110
6145
|
{
|
|
6111
6146
|
header,
|
|
@@ -6115,13 +6150,13 @@ function ChatPanel({
|
|
|
6115
6150
|
composerHorizontalPadding: 0,
|
|
6116
6151
|
listRef,
|
|
6117
6152
|
onNearBottomChange: setNearBottom,
|
|
6118
|
-
overlay: /* @__PURE__ */
|
|
6153
|
+
overlay: /* @__PURE__ */ jsx53(
|
|
6119
6154
|
ScrollToBottomButton,
|
|
6120
6155
|
{
|
|
6121
6156
|
visible: !nearBottom,
|
|
6122
6157
|
onPress: handleScrollToBottom,
|
|
6123
6158
|
style: { bottom: 80 },
|
|
6124
|
-
children: /* @__PURE__ */
|
|
6159
|
+
children: /* @__PURE__ */ jsx53(IconArrowDown, { size: 20, colorToken: "floatingContent" })
|
|
6125
6160
|
}
|
|
6126
6161
|
),
|
|
6127
6162
|
composer: {
|
|
@@ -6142,7 +6177,7 @@ function ChatPanel({
|
|
|
6142
6177
|
}
|
|
6143
6178
|
|
|
6144
6179
|
// src/components/dialogs/ConfirmMergeRequestDialog.tsx
|
|
6145
|
-
import * as
|
|
6180
|
+
import * as React39 from "react";
|
|
6146
6181
|
import { Pressable as Pressable14, View as View43 } from "react-native";
|
|
6147
6182
|
|
|
6148
6183
|
// src/components/primitives/Modal.tsx
|
|
@@ -6151,7 +6186,7 @@ import {
|
|
|
6151
6186
|
Pressable as Pressable13,
|
|
6152
6187
|
View as View42
|
|
6153
6188
|
} from "react-native";
|
|
6154
|
-
import { jsx as
|
|
6189
|
+
import { jsx as jsx54, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
6155
6190
|
function Modal({
|
|
6156
6191
|
visible,
|
|
6157
6192
|
onRequestClose,
|
|
@@ -6160,7 +6195,7 @@ function Modal({
|
|
|
6160
6195
|
contentStyle
|
|
6161
6196
|
}) {
|
|
6162
6197
|
const theme = useTheme();
|
|
6163
|
-
return /* @__PURE__ */
|
|
6198
|
+
return /* @__PURE__ */ jsx54(
|
|
6164
6199
|
RNModal,
|
|
6165
6200
|
{
|
|
6166
6201
|
visible,
|
|
@@ -6168,7 +6203,7 @@ function Modal({
|
|
|
6168
6203
|
animationType: "fade",
|
|
6169
6204
|
onRequestClose,
|
|
6170
6205
|
children: /* @__PURE__ */ jsxs32(View42, { style: { flex: 1, backgroundColor: theme.colors.backdrop, justifyContent: "center", padding: theme.spacing.lg }, children: [
|
|
6171
|
-
/* @__PURE__ */
|
|
6206
|
+
/* @__PURE__ */ jsx54(
|
|
6172
6207
|
Pressable13,
|
|
6173
6208
|
{
|
|
6174
6209
|
accessibilityRole: "button",
|
|
@@ -6176,14 +6211,14 @@ function Modal({
|
|
|
6176
6211
|
style: { position: "absolute", inset: 0 }
|
|
6177
6212
|
}
|
|
6178
6213
|
),
|
|
6179
|
-
/* @__PURE__ */
|
|
6214
|
+
/* @__PURE__ */ jsx54(Card, { variant: "surfaceRaised", padded: true, style: [{ borderRadius: theme.radii.xl }, contentStyle], children })
|
|
6180
6215
|
] })
|
|
6181
6216
|
}
|
|
6182
6217
|
);
|
|
6183
6218
|
}
|
|
6184
6219
|
|
|
6185
6220
|
// src/components/dialogs/ConfirmMergeRequestDialog.tsx
|
|
6186
|
-
import { jsx as
|
|
6221
|
+
import { jsx as jsx55, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
6187
6222
|
function ConfirmMergeRequestDialog({
|
|
6188
6223
|
visible,
|
|
6189
6224
|
onOpenChange,
|
|
@@ -6194,14 +6229,14 @@ function ConfirmMergeRequestDialog({
|
|
|
6194
6229
|
onTestFirst
|
|
6195
6230
|
}) {
|
|
6196
6231
|
const theme = useTheme();
|
|
6197
|
-
const close =
|
|
6232
|
+
const close = React39.useCallback(() => onOpenChange(false), [onOpenChange]);
|
|
6198
6233
|
const canConfirm = Boolean(mergeRequest) && !approveDisabled;
|
|
6199
|
-
const handleConfirm =
|
|
6234
|
+
const handleConfirm = React39.useCallback(() => {
|
|
6200
6235
|
if (!mergeRequest) return;
|
|
6201
6236
|
onOpenChange(false);
|
|
6202
6237
|
void onConfirm();
|
|
6203
6238
|
}, [mergeRequest, onConfirm, onOpenChange]);
|
|
6204
|
-
const handleTestFirst =
|
|
6239
|
+
const handleTestFirst = React39.useCallback(() => {
|
|
6205
6240
|
if (!mergeRequest) return;
|
|
6206
6241
|
onOpenChange(false);
|
|
6207
6242
|
void onTestFirst(mergeRequest);
|
|
@@ -6224,7 +6259,7 @@ function ConfirmMergeRequestDialog({
|
|
|
6224
6259
|
backgroundColor: theme.colors.background
|
|
6225
6260
|
},
|
|
6226
6261
|
children: [
|
|
6227
|
-
/* @__PURE__ */
|
|
6262
|
+
/* @__PURE__ */ jsx55(View43, { children: /* @__PURE__ */ jsx55(
|
|
6228
6263
|
Text,
|
|
6229
6264
|
{
|
|
6230
6265
|
style: {
|
|
@@ -6237,7 +6272,7 @@ function ConfirmMergeRequestDialog({
|
|
|
6237
6272
|
}
|
|
6238
6273
|
) }),
|
|
6239
6274
|
/* @__PURE__ */ jsxs33(View43, { style: { marginTop: 16 }, children: [
|
|
6240
|
-
/* @__PURE__ */
|
|
6275
|
+
/* @__PURE__ */ jsx55(
|
|
6241
6276
|
View43,
|
|
6242
6277
|
{
|
|
6243
6278
|
style: [
|
|
@@ -6247,7 +6282,7 @@ function ConfirmMergeRequestDialog({
|
|
|
6247
6282
|
opacity: canConfirm ? 1 : 0.5
|
|
6248
6283
|
}
|
|
6249
6284
|
],
|
|
6250
|
-
children: /* @__PURE__ */
|
|
6285
|
+
children: /* @__PURE__ */ jsx55(
|
|
6251
6286
|
Pressable14,
|
|
6252
6287
|
{
|
|
6253
6288
|
accessibilityRole: "button",
|
|
@@ -6255,13 +6290,13 @@ function ConfirmMergeRequestDialog({
|
|
|
6255
6290
|
disabled: !canConfirm,
|
|
6256
6291
|
onPress: handleConfirm,
|
|
6257
6292
|
style: [fullWidthButtonBase, { flex: 1 }],
|
|
6258
|
-
children: /* @__PURE__ */
|
|
6293
|
+
children: /* @__PURE__ */ jsx55(Text, { style: { textAlign: "center", color: theme.colors.onPrimary }, children: "Approve Merge" })
|
|
6259
6294
|
}
|
|
6260
6295
|
)
|
|
6261
6296
|
}
|
|
6262
6297
|
),
|
|
6263
|
-
/* @__PURE__ */
|
|
6264
|
-
/* @__PURE__ */
|
|
6298
|
+
/* @__PURE__ */ jsx55(View43, { style: { height: 8 } }),
|
|
6299
|
+
/* @__PURE__ */ jsx55(
|
|
6265
6300
|
View43,
|
|
6266
6301
|
{
|
|
6267
6302
|
style: [
|
|
@@ -6273,7 +6308,7 @@ function ConfirmMergeRequestDialog({
|
|
|
6273
6308
|
opacity: isBuilding || !mergeRequest ? 0.5 : 1
|
|
6274
6309
|
}
|
|
6275
6310
|
],
|
|
6276
|
-
children: /* @__PURE__ */
|
|
6311
|
+
children: /* @__PURE__ */ jsx55(
|
|
6277
6312
|
Pressable14,
|
|
6278
6313
|
{
|
|
6279
6314
|
accessibilityRole: "button",
|
|
@@ -6281,13 +6316,13 @@ function ConfirmMergeRequestDialog({
|
|
|
6281
6316
|
disabled: isBuilding || !mergeRequest,
|
|
6282
6317
|
onPress: handleTestFirst,
|
|
6283
6318
|
style: [fullWidthButtonBase, { flex: 1 }],
|
|
6284
|
-
children: /* @__PURE__ */
|
|
6319
|
+
children: /* @__PURE__ */ jsx55(Text, { style: { textAlign: "center", color: theme.colors.text }, children: isBuilding ? "Preparing\u2026" : "Test edits first" })
|
|
6285
6320
|
}
|
|
6286
6321
|
)
|
|
6287
6322
|
}
|
|
6288
6323
|
),
|
|
6289
|
-
/* @__PURE__ */
|
|
6290
|
-
/* @__PURE__ */
|
|
6324
|
+
/* @__PURE__ */ jsx55(View43, { style: { height: 8 } }),
|
|
6325
|
+
/* @__PURE__ */ jsx55(
|
|
6291
6326
|
View43,
|
|
6292
6327
|
{
|
|
6293
6328
|
style: [
|
|
@@ -6298,14 +6333,14 @@ function ConfirmMergeRequestDialog({
|
|
|
6298
6333
|
borderColor: theme.colors.border
|
|
6299
6334
|
}
|
|
6300
6335
|
],
|
|
6301
|
-
children: /* @__PURE__ */
|
|
6336
|
+
children: /* @__PURE__ */ jsx55(
|
|
6302
6337
|
Pressable14,
|
|
6303
6338
|
{
|
|
6304
6339
|
accessibilityRole: "button",
|
|
6305
6340
|
accessibilityLabel: "Cancel",
|
|
6306
6341
|
onPress: close,
|
|
6307
6342
|
style: [fullWidthButtonBase, { flex: 1 }],
|
|
6308
|
-
children: /* @__PURE__ */
|
|
6343
|
+
children: /* @__PURE__ */ jsx55(Text, { style: { textAlign: "center", color: theme.colors.text }, children: "Cancel" })
|
|
6309
6344
|
}
|
|
6310
6345
|
)
|
|
6311
6346
|
}
|
|
@@ -6317,7 +6352,7 @@ function ConfirmMergeRequestDialog({
|
|
|
6317
6352
|
}
|
|
6318
6353
|
|
|
6319
6354
|
// src/studio/ui/ConfirmMergeFlow.tsx
|
|
6320
|
-
import { jsx as
|
|
6355
|
+
import { jsx as jsx56 } from "react/jsx-runtime";
|
|
6321
6356
|
function ConfirmMergeFlow({
|
|
6322
6357
|
visible,
|
|
6323
6358
|
onOpenChange,
|
|
@@ -6328,7 +6363,7 @@ function ConfirmMergeFlow({
|
|
|
6328
6363
|
onConfirm,
|
|
6329
6364
|
onTestFirst
|
|
6330
6365
|
}) {
|
|
6331
|
-
return /* @__PURE__ */
|
|
6366
|
+
return /* @__PURE__ */ jsx56(
|
|
6332
6367
|
ConfirmMergeRequestDialog,
|
|
6333
6368
|
{
|
|
6334
6369
|
visible,
|
|
@@ -6350,7 +6385,7 @@ function ConfirmMergeFlow({
|
|
|
6350
6385
|
}
|
|
6351
6386
|
|
|
6352
6387
|
// src/studio/hooks/useOptimisticChatMessages.ts
|
|
6353
|
-
import * as
|
|
6388
|
+
import * as React40 from "react";
|
|
6354
6389
|
function makeOptimisticId() {
|
|
6355
6390
|
return `optimistic:${Date.now().toString(36)}:${Math.random().toString(36).slice(2, 10)}`;
|
|
6356
6391
|
}
|
|
@@ -6388,11 +6423,11 @@ function useOptimisticChatMessages({
|
|
|
6388
6423
|
chatMessages,
|
|
6389
6424
|
onSendChat
|
|
6390
6425
|
}) {
|
|
6391
|
-
const [optimisticChat, setOptimisticChat] =
|
|
6392
|
-
|
|
6426
|
+
const [optimisticChat, setOptimisticChat] = React40.useState([]);
|
|
6427
|
+
React40.useEffect(() => {
|
|
6393
6428
|
setOptimisticChat([]);
|
|
6394
6429
|
}, [threadId]);
|
|
6395
|
-
const messages =
|
|
6430
|
+
const messages = React40.useMemo(() => {
|
|
6396
6431
|
if (!optimisticChat || optimisticChat.length === 0) return chatMessages;
|
|
6397
6432
|
const unresolved = optimisticChat.filter((o) => !isOptimisticResolvedByServer(chatMessages, o));
|
|
6398
6433
|
if (unresolved.length === 0) return chatMessages;
|
|
@@ -6408,7 +6443,7 @@ function useOptimisticChatMessages({
|
|
|
6408
6443
|
merged.sort((a, b) => String(a.createdAt).localeCompare(String(b.createdAt)));
|
|
6409
6444
|
return merged;
|
|
6410
6445
|
}, [chatMessages, optimisticChat]);
|
|
6411
|
-
|
|
6446
|
+
React40.useEffect(() => {
|
|
6412
6447
|
if (optimisticChat.length === 0) return;
|
|
6413
6448
|
setOptimisticChat((prev) => {
|
|
6414
6449
|
if (prev.length === 0) return prev;
|
|
@@ -6416,7 +6451,7 @@ function useOptimisticChatMessages({
|
|
|
6416
6451
|
return next.length === prev.length ? prev : next;
|
|
6417
6452
|
});
|
|
6418
6453
|
}, [chatMessages, optimisticChat.length]);
|
|
6419
|
-
const onSend =
|
|
6454
|
+
const onSend = React40.useCallback(
|
|
6420
6455
|
async (text, attachments) => {
|
|
6421
6456
|
if (shouldForkOnEdit) {
|
|
6422
6457
|
await onSendChat(text, attachments);
|
|
@@ -6436,7 +6471,7 @@ function useOptimisticChatMessages({
|
|
|
6436
6471
|
}
|
|
6437
6472
|
|
|
6438
6473
|
// src/studio/ui/StudioOverlay.tsx
|
|
6439
|
-
import { Fragment as Fragment6, jsx as
|
|
6474
|
+
import { Fragment as Fragment6, jsx as jsx57, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
6440
6475
|
function StudioOverlay({
|
|
6441
6476
|
captureTargetRef,
|
|
6442
6477
|
app,
|
|
@@ -6467,12 +6502,12 @@ function StudioOverlay({
|
|
|
6467
6502
|
}) {
|
|
6468
6503
|
const theme = useTheme();
|
|
6469
6504
|
const { width } = useWindowDimensions4();
|
|
6470
|
-
const [sheetOpen, setSheetOpen] =
|
|
6471
|
-
const [activePage, setActivePage] =
|
|
6472
|
-
const [drawing, setDrawing] =
|
|
6473
|
-
const [chatAttachments, setChatAttachments] =
|
|
6474
|
-
const [commentsAppId, setCommentsAppId] =
|
|
6475
|
-
const [commentsCount, setCommentsCount] =
|
|
6505
|
+
const [sheetOpen, setSheetOpen] = React41.useState(false);
|
|
6506
|
+
const [activePage, setActivePage] = React41.useState("preview");
|
|
6507
|
+
const [drawing, setDrawing] = React41.useState(false);
|
|
6508
|
+
const [chatAttachments, setChatAttachments] = React41.useState([]);
|
|
6509
|
+
const [commentsAppId, setCommentsAppId] = React41.useState(null);
|
|
6510
|
+
const [commentsCount, setCommentsCount] = React41.useState(null);
|
|
6476
6511
|
const threadId = (app == null ? void 0 : app.threadId) ?? null;
|
|
6477
6512
|
const optimistic = useOptimisticChatMessages({
|
|
6478
6513
|
threadId,
|
|
@@ -6480,25 +6515,25 @@ function StudioOverlay({
|
|
|
6480
6515
|
chatMessages,
|
|
6481
6516
|
onSendChat
|
|
6482
6517
|
});
|
|
6483
|
-
const [confirmMrId, setConfirmMrId] =
|
|
6484
|
-
const confirmMr =
|
|
6518
|
+
const [confirmMrId, setConfirmMrId] = React41.useState(null);
|
|
6519
|
+
const confirmMr = React41.useMemo(
|
|
6485
6520
|
() => confirmMrId ? incomingMergeRequests.find((m) => m.id === confirmMrId) ?? null : null,
|
|
6486
6521
|
[confirmMrId, incomingMergeRequests]
|
|
6487
6522
|
);
|
|
6488
|
-
const handleSheetOpenChange =
|
|
6523
|
+
const handleSheetOpenChange = React41.useCallback((open) => {
|
|
6489
6524
|
setSheetOpen(open);
|
|
6490
6525
|
if (!open) Keyboard5.dismiss();
|
|
6491
6526
|
}, []);
|
|
6492
|
-
const closeSheet =
|
|
6527
|
+
const closeSheet = React41.useCallback(() => {
|
|
6493
6528
|
handleSheetOpenChange(false);
|
|
6494
6529
|
}, [handleSheetOpenChange]);
|
|
6495
|
-
const openSheet =
|
|
6496
|
-
const goToChat =
|
|
6530
|
+
const openSheet = React41.useCallback(() => setSheetOpen(true), []);
|
|
6531
|
+
const goToChat = React41.useCallback(() => {
|
|
6497
6532
|
setActivePage("chat");
|
|
6498
6533
|
openSheet();
|
|
6499
6534
|
}, [openSheet]);
|
|
6500
|
-
const backToPreview =
|
|
6501
|
-
if (
|
|
6535
|
+
const backToPreview = React41.useCallback(() => {
|
|
6536
|
+
if (Platform10.OS !== "ios") {
|
|
6502
6537
|
Keyboard5.dismiss();
|
|
6503
6538
|
setActivePage("preview");
|
|
6504
6539
|
return;
|
|
@@ -6515,11 +6550,11 @@ function StudioOverlay({
|
|
|
6515
6550
|
const t = setTimeout(finalize, 350);
|
|
6516
6551
|
Keyboard5.dismiss();
|
|
6517
6552
|
}, []);
|
|
6518
|
-
const startDraw =
|
|
6553
|
+
const startDraw = React41.useCallback(() => {
|
|
6519
6554
|
setDrawing(true);
|
|
6520
6555
|
closeSheet();
|
|
6521
6556
|
}, [closeSheet]);
|
|
6522
|
-
const handleDrawCapture =
|
|
6557
|
+
const handleDrawCapture = React41.useCallback(
|
|
6523
6558
|
(dataUrl) => {
|
|
6524
6559
|
setChatAttachments((prev) => [...prev, dataUrl]);
|
|
6525
6560
|
setDrawing(false);
|
|
@@ -6528,7 +6563,7 @@ function StudioOverlay({
|
|
|
6528
6563
|
},
|
|
6529
6564
|
[openSheet]
|
|
6530
6565
|
);
|
|
6531
|
-
const toggleSheet =
|
|
6566
|
+
const toggleSheet = React41.useCallback(async () => {
|
|
6532
6567
|
if (!sheetOpen) {
|
|
6533
6568
|
const shouldExitTest = Boolean(testingMrId) || isTesting;
|
|
6534
6569
|
if (shouldExitTest) {
|
|
@@ -6540,7 +6575,7 @@ function StudioOverlay({
|
|
|
6540
6575
|
closeSheet();
|
|
6541
6576
|
}
|
|
6542
6577
|
}, [closeSheet, isTesting, onRestoreBase, sheetOpen, testingMrId]);
|
|
6543
|
-
const handleTestMr =
|
|
6578
|
+
const handleTestMr = React41.useCallback(
|
|
6544
6579
|
async (mr) => {
|
|
6545
6580
|
if (!onTestMr) return;
|
|
6546
6581
|
await onTestMr(mr);
|
|
@@ -6549,13 +6584,13 @@ function StudioOverlay({
|
|
|
6549
6584
|
[closeSheet, onTestMr]
|
|
6550
6585
|
);
|
|
6551
6586
|
return /* @__PURE__ */ jsxs34(Fragment6, { children: [
|
|
6552
|
-
/* @__PURE__ */
|
|
6553
|
-
/* @__PURE__ */
|
|
6587
|
+
/* @__PURE__ */ jsx57(EdgeGlowFrame, { visible: isTesting, role: "accent", thickness: 40, intensity: 1 }),
|
|
6588
|
+
/* @__PURE__ */ jsx57(StudioBottomSheet, { open: sheetOpen, onOpenChange: handleSheetOpenChange, children: /* @__PURE__ */ jsx57(
|
|
6554
6589
|
StudioSheetPager,
|
|
6555
6590
|
{
|
|
6556
6591
|
activePage,
|
|
6557
6592
|
width,
|
|
6558
|
-
preview: /* @__PURE__ */
|
|
6593
|
+
preview: /* @__PURE__ */ jsx57(
|
|
6559
6594
|
PreviewPanel,
|
|
6560
6595
|
{
|
|
6561
6596
|
app,
|
|
@@ -6581,7 +6616,7 @@ function StudioOverlay({
|
|
|
6581
6616
|
commentCountOverride: commentsCount ?? void 0
|
|
6582
6617
|
}
|
|
6583
6618
|
),
|
|
6584
|
-
chat: /* @__PURE__ */
|
|
6619
|
+
chat: /* @__PURE__ */ jsx57(
|
|
6585
6620
|
ChatPanel,
|
|
6586
6621
|
{
|
|
6587
6622
|
messages: optimistic.messages,
|
|
@@ -6604,7 +6639,7 @@ function StudioOverlay({
|
|
|
6604
6639
|
)
|
|
6605
6640
|
}
|
|
6606
6641
|
) }),
|
|
6607
|
-
/* @__PURE__ */
|
|
6642
|
+
/* @__PURE__ */ jsx57(
|
|
6608
6643
|
FloatingDraggableButton,
|
|
6609
6644
|
{
|
|
6610
6645
|
visible: !sheetOpen && !drawing,
|
|
@@ -6612,10 +6647,10 @@ function StudioOverlay({
|
|
|
6612
6647
|
badgeCount: incomingMergeRequests.length,
|
|
6613
6648
|
onPress: toggleSheet,
|
|
6614
6649
|
isLoading: (app == null ? void 0 : app.status) === "editing",
|
|
6615
|
-
children: /* @__PURE__ */
|
|
6650
|
+
children: /* @__PURE__ */ jsx57(View44, { style: { width: 28, height: 28, alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ jsx57(MergeIcon, { width: 24, height: 24, color: theme.colors.floatingContent }) })
|
|
6616
6651
|
}
|
|
6617
6652
|
),
|
|
6618
|
-
/* @__PURE__ */
|
|
6653
|
+
/* @__PURE__ */ jsx57(
|
|
6619
6654
|
DrawModeOverlay,
|
|
6620
6655
|
{
|
|
6621
6656
|
visible: drawing,
|
|
@@ -6624,7 +6659,7 @@ function StudioOverlay({
|
|
|
6624
6659
|
onCapture: handleDrawCapture
|
|
6625
6660
|
}
|
|
6626
6661
|
),
|
|
6627
|
-
/* @__PURE__ */
|
|
6662
|
+
/* @__PURE__ */ jsx57(
|
|
6628
6663
|
ConfirmMergeFlow,
|
|
6629
6664
|
{
|
|
6630
6665
|
visible: Boolean(confirmMr),
|
|
@@ -6637,7 +6672,7 @@ function StudioOverlay({
|
|
|
6637
6672
|
onTestFirst: handleTestMr
|
|
6638
6673
|
}
|
|
6639
6674
|
),
|
|
6640
|
-
/* @__PURE__ */
|
|
6675
|
+
/* @__PURE__ */ jsx57(
|
|
6641
6676
|
AppCommentsSheet,
|
|
6642
6677
|
{
|
|
6643
6678
|
appId: commentsAppId,
|
|
@@ -6650,7 +6685,7 @@ function StudioOverlay({
|
|
|
6650
6685
|
}
|
|
6651
6686
|
|
|
6652
6687
|
// src/studio/ComergeStudio.tsx
|
|
6653
|
-
import { jsx as
|
|
6688
|
+
import { jsx as jsx58, jsxs as jsxs35 } from "react/jsx-runtime";
|
|
6654
6689
|
function ComergeStudio({
|
|
6655
6690
|
appId,
|
|
6656
6691
|
apiKey,
|
|
@@ -6658,17 +6693,17 @@ function ComergeStudio({
|
|
|
6658
6693
|
onNavigateHome,
|
|
6659
6694
|
style
|
|
6660
6695
|
}) {
|
|
6661
|
-
const [activeAppId, setActiveAppId] =
|
|
6662
|
-
const [runtimeAppId, setRuntimeAppId] =
|
|
6663
|
-
const [pendingRuntimeTargetAppId, setPendingRuntimeTargetAppId] =
|
|
6664
|
-
const platform =
|
|
6665
|
-
|
|
6696
|
+
const [activeAppId, setActiveAppId] = React42.useState(appId);
|
|
6697
|
+
const [runtimeAppId, setRuntimeAppId] = React42.useState(appId);
|
|
6698
|
+
const [pendingRuntimeTargetAppId, setPendingRuntimeTargetAppId] = React42.useState(null);
|
|
6699
|
+
const platform = React42.useMemo(() => RNPlatform.OS === "ios" ? "ios" : "android", []);
|
|
6700
|
+
React42.useEffect(() => {
|
|
6666
6701
|
setActiveAppId(appId);
|
|
6667
6702
|
setRuntimeAppId(appId);
|
|
6668
6703
|
setPendingRuntimeTargetAppId(null);
|
|
6669
6704
|
}, [appId]);
|
|
6670
|
-
const captureTargetRef =
|
|
6671
|
-
return /* @__PURE__ */
|
|
6705
|
+
const captureTargetRef = React42.useRef(null);
|
|
6706
|
+
return /* @__PURE__ */ jsx58(StudioBootstrap, { apiKey, children: ({ userId }) => /* @__PURE__ */ jsx58(BottomSheetModalProvider, { children: /* @__PURE__ */ jsx58(LiquidGlassResetProvider, { resetTriggers: [appId, activeAppId, runtimeAppId], children: /* @__PURE__ */ jsx58(
|
|
6672
6707
|
ComergeStudioInner,
|
|
6673
6708
|
{
|
|
6674
6709
|
userId,
|
|
@@ -6684,7 +6719,7 @@ function ComergeStudio({
|
|
|
6684
6719
|
captureTargetRef,
|
|
6685
6720
|
style
|
|
6686
6721
|
}
|
|
6687
|
-
) }) });
|
|
6722
|
+
) }) }) });
|
|
6688
6723
|
}
|
|
6689
6724
|
function ComergeStudioInner({
|
|
6690
6725
|
userId,
|
|
@@ -6703,11 +6738,11 @@ function ComergeStudioInner({
|
|
|
6703
6738
|
const { app, loading: appLoading } = useApp(activeAppId);
|
|
6704
6739
|
const { app: runtimeAppFromHook } = useApp(runtimeAppId, { enabled: runtimeAppId !== activeAppId });
|
|
6705
6740
|
const runtimeApp = runtimeAppId === activeAppId ? app : runtimeAppFromHook;
|
|
6706
|
-
const sawEditingOnPendingTargetRef =
|
|
6707
|
-
|
|
6741
|
+
const sawEditingOnPendingTargetRef = React42.useRef(false);
|
|
6742
|
+
React42.useEffect(() => {
|
|
6708
6743
|
sawEditingOnPendingTargetRef.current = false;
|
|
6709
6744
|
}, [pendingRuntimeTargetAppId]);
|
|
6710
|
-
|
|
6745
|
+
React42.useEffect(() => {
|
|
6711
6746
|
if (!pendingRuntimeTargetAppId) return;
|
|
6712
6747
|
if (activeAppId !== pendingRuntimeTargetAppId) return;
|
|
6713
6748
|
if ((app == null ? void 0 : app.status) === "editing") {
|
|
@@ -6724,13 +6759,13 @@ function ComergeStudioInner({
|
|
|
6724
6759
|
platform,
|
|
6725
6760
|
canRequestLatest: (runtimeApp == null ? void 0 : runtimeApp.status) === "ready"
|
|
6726
6761
|
});
|
|
6727
|
-
const sawEditingOnActiveAppRef =
|
|
6728
|
-
const [showPostEditPreparing, setShowPostEditPreparing] =
|
|
6729
|
-
|
|
6762
|
+
const sawEditingOnActiveAppRef = React42.useRef(false);
|
|
6763
|
+
const [showPostEditPreparing, setShowPostEditPreparing] = React42.useState(false);
|
|
6764
|
+
React42.useEffect(() => {
|
|
6730
6765
|
sawEditingOnActiveAppRef.current = false;
|
|
6731
6766
|
setShowPostEditPreparing(false);
|
|
6732
6767
|
}, [activeAppId]);
|
|
6733
|
-
|
|
6768
|
+
React42.useEffect(() => {
|
|
6734
6769
|
if (!(app == null ? void 0 : app.id)) return;
|
|
6735
6770
|
if (app.status === "editing") {
|
|
6736
6771
|
sawEditingOnActiveAppRef.current = true;
|
|
@@ -6742,7 +6777,7 @@ function ComergeStudioInner({
|
|
|
6742
6777
|
sawEditingOnActiveAppRef.current = false;
|
|
6743
6778
|
}
|
|
6744
6779
|
}, [app == null ? void 0 : app.id, app == null ? void 0 : app.status]);
|
|
6745
|
-
|
|
6780
|
+
React42.useEffect(() => {
|
|
6746
6781
|
if (!showPostEditPreparing) return;
|
|
6747
6782
|
const stillProcessingBaseBundle = bundle.loading && bundle.loadingMode === "base" && !bundle.isTesting;
|
|
6748
6783
|
if (!stillProcessingBaseBundle) {
|
|
@@ -6752,10 +6787,10 @@ function ComergeStudioInner({
|
|
|
6752
6787
|
const threadId = (app == null ? void 0 : app.threadId) ?? "";
|
|
6753
6788
|
const thread = useThreadMessages(threadId);
|
|
6754
6789
|
const mergeRequests = useMergeRequests({ appId: activeAppId });
|
|
6755
|
-
const hasOpenOutgoingMr =
|
|
6790
|
+
const hasOpenOutgoingMr = React42.useMemo(() => {
|
|
6756
6791
|
return mergeRequests.lists.outgoing.some((mr) => mr.status === "open");
|
|
6757
6792
|
}, [mergeRequests.lists.outgoing]);
|
|
6758
|
-
const incomingReviewMrs =
|
|
6793
|
+
const incomingReviewMrs = React42.useMemo(() => {
|
|
6759
6794
|
if (!userId) return mergeRequests.lists.incoming;
|
|
6760
6795
|
return mergeRequests.lists.incoming.filter((mr) => mr.createdBy !== userId);
|
|
6761
6796
|
}, [mergeRequests.lists.incoming, userId]);
|
|
@@ -6777,17 +6812,17 @@ function ComergeStudioInner({
|
|
|
6777
6812
|
uploadAttachments: uploader.uploadBase64Images
|
|
6778
6813
|
});
|
|
6779
6814
|
const chatSendDisabled = hasNoOutcomeAfterLastHuman(thread.raw);
|
|
6780
|
-
const [processingMrId, setProcessingMrId] =
|
|
6781
|
-
const [testingMrId, setTestingMrId] =
|
|
6782
|
-
const chatShowTypingIndicator =
|
|
6815
|
+
const [processingMrId, setProcessingMrId] = React42.useState(null);
|
|
6816
|
+
const [testingMrId, setTestingMrId] = React42.useState(null);
|
|
6817
|
+
const chatShowTypingIndicator = React42.useMemo(() => {
|
|
6783
6818
|
var _a;
|
|
6784
6819
|
if (!thread.raw || thread.raw.length === 0) return false;
|
|
6785
6820
|
const last = thread.raw[thread.raw.length - 1];
|
|
6786
6821
|
const payloadType = typeof ((_a = last.payload) == null ? void 0 : _a.type) === "string" ? String(last.payload.type) : void 0;
|
|
6787
6822
|
return payloadType !== "outcome";
|
|
6788
6823
|
}, [thread.raw]);
|
|
6789
|
-
return /* @__PURE__ */
|
|
6790
|
-
/* @__PURE__ */
|
|
6824
|
+
return /* @__PURE__ */ jsx58(View45, { style: [{ flex: 1 }, style], children: /* @__PURE__ */ jsxs35(View45, { ref: captureTargetRef, style: { flex: 1 }, collapsable: false, children: [
|
|
6825
|
+
/* @__PURE__ */ jsx58(
|
|
6791
6826
|
RuntimeRenderer,
|
|
6792
6827
|
{
|
|
6793
6828
|
appKey,
|
|
@@ -6796,7 +6831,7 @@ function ComergeStudioInner({
|
|
|
6796
6831
|
renderToken: bundle.renderToken
|
|
6797
6832
|
}
|
|
6798
6833
|
),
|
|
6799
|
-
/* @__PURE__ */
|
|
6834
|
+
/* @__PURE__ */ jsx58(
|
|
6800
6835
|
StudioOverlay,
|
|
6801
6836
|
{
|
|
6802
6837
|
captureTargetRef,
|