@comergehq/studio 0.1.2 → 0.1.4
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.d.mts +2 -10
- package/dist/index.d.ts +2 -10
- package/dist/index.js +293 -264
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +251 -222
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -5
- package/src/components/chat/ChatComposer.tsx +277 -0
- package/src/components/chat/ChatHeader.tsx +31 -0
- package/src/components/chat/ChatMessageBubble.tsx +69 -0
- package/src/components/chat/ChatMessageList.tsx +137 -0
- package/src/components/chat/ChatPage.tsx +69 -0
- package/src/components/chat/ForkNoticeBanner.tsx +66 -0
- package/src/components/chat/MultilineTextInput.tsx +46 -0
- package/src/components/chat/ScrollToBottomButton.tsx +78 -0
- package/src/components/chat/TypingIndicator.tsx +54 -0
- package/src/components/chat/index.ts +28 -0
- package/src/components/comments/AppCommentsSheet.tsx +213 -0
- package/src/components/comments/CommentRow.tsx +63 -0
- package/src/components/comments/formatTimeAgo.ts +3 -0
- package/src/components/comments/index.ts +3 -0
- package/src/components/comments/useAppComments.ts +74 -0
- package/src/components/comments/useAppDetails.ts +35 -0
- package/src/components/comments/useIosKeyboardSnapFix.ts +24 -0
- package/src/components/dialogs/ConfirmMergeRequestDialog.tsx +156 -0
- package/src/components/dialogs/index.ts +4 -0
- package/src/components/draw/DrawColorPicker.tsx +77 -0
- package/src/components/draw/DrawModeOverlay.tsx +144 -0
- package/src/components/draw/DrawSurface.tsx +127 -0
- package/src/components/draw/DrawToolbar.tsx +253 -0
- package/src/components/draw/index.ts +15 -0
- package/src/components/draw/optionalHaptics.ts +15 -0
- package/src/components/draw/strokes.ts +21 -0
- package/src/components/draw/types.ts +9 -0
- package/src/components/floating-draggable-button/FloatingDraggableButton.tsx +323 -0
- package/src/components/floating-draggable-button/constants.ts +17 -0
- package/src/components/floating-draggable-button/index.ts +4 -0
- package/src/components/floating-draggable-button/types.ts +63 -0
- package/src/components/icons/MergeIcon.tsx +14 -0
- package/src/components/icons/StudioIcons.tsx +66 -0
- package/src/components/index.ts +17 -0
- package/src/components/merge-requests/MergeRequestStatusCard.tsx +179 -0
- package/src/components/merge-requests/ReviewMergeRequestActionButton.tsx +62 -0
- package/src/components/merge-requests/ReviewMergeRequestCard.tsx +192 -0
- package/src/components/merge-requests/ReviewMergeRequestCarousel.tsx +132 -0
- package/src/components/merge-requests/index.ts +7 -0
- package/src/components/merge-requests/mergeRequestStatusDisplay.ts +23 -0
- package/src/components/merge-requests/toIsoString.ts +9 -0
- package/src/components/merge-requests/useControlledExpansion.ts +16 -0
- package/src/components/models/index.ts +9 -0
- package/src/components/models/types.ts +43 -0
- package/src/components/overlays/EdgeGlowFrame.tsx +105 -0
- package/src/components/overlays/index.ts +4 -0
- package/src/components/preview/PreviewHeroCard.tsx +58 -0
- package/src/components/preview/PreviewImage.tsx +22 -0
- package/src/components/preview/PreviewMetaRow.tsx +70 -0
- package/src/components/preview/PreviewPage.tsx +36 -0
- package/src/components/preview/PreviewPlaceholder.tsx +72 -0
- package/src/components/preview/PreviewStatusBadge.tsx +63 -0
- package/src/components/preview/StatsBar.tsx +109 -0
- package/src/components/preview/index.ts +22 -0
- package/src/components/primitives/Avatar.tsx +68 -0
- package/src/components/primitives/Button.tsx +102 -0
- package/src/components/primitives/Card.tsx +30 -0
- package/src/components/primitives/Divider.tsx +17 -0
- package/src/components/primitives/Icon.tsx +40 -0
- package/src/components/primitives/MarkdownText.tsx +72 -0
- package/src/components/primitives/Modal.tsx +53 -0
- package/src/components/primitives/Surface.tsx +42 -0
- package/src/components/primitives/Text.tsx +83 -0
- package/src/components/primitives/index.ts +35 -0
- package/src/components/primitives/types.ts +30 -0
- package/src/components/studio-sheet/StudioBottomSheet.tsx +114 -0
- package/src/components/studio-sheet/StudioSheetBackground.tsx +63 -0
- package/src/components/studio-sheet/StudioSheetHeader.tsx +35 -0
- package/src/components/studio-sheet/StudioSheetHeaderIconButton.tsx +109 -0
- package/src/components/studio-sheet/StudioSheetPager.tsx +66 -0
- package/src/components/studio-sheet/index.ts +18 -0
- package/src/components/studio-sheet/types.ts +5 -0
- package/src/components/utils/color.ts +25 -0
- package/src/components/utils/formatTimeAgo.ts +19 -0
- package/src/core/logger.ts +42 -0
- package/src/core/services/http/baseUrl.ts +3 -0
- package/src/core/services/http/index.ts +128 -0
- package/src/core/services/http/public.ts +33 -0
- package/src/core/services/supabase/auth.ts +41 -0
- package/src/core/services/supabase/client.ts +43 -0
- package/src/core/services/supabase/index.ts +7 -0
- package/src/data/agent/remote.ts +30 -0
- package/src/data/agent/repository.ts +34 -0
- package/src/data/agent/types.ts +28 -0
- package/src/data/apps/bundles/remote.ts +47 -0
- package/src/data/apps/bundles/repository.ts +35 -0
- package/src/data/apps/bundles/types.ts +27 -0
- package/src/data/apps/images/remote.ts +61 -0
- package/src/data/apps/images/repository.ts +47 -0
- package/src/data/apps/remote.ts +97 -0
- package/src/data/apps/repository.ts +185 -0
- package/src/data/apps/types.ts +206 -0
- package/src/data/attachment/remote.ts +32 -0
- package/src/data/attachment/repository.ts +40 -0
- package/src/data/attachment/types.ts +42 -0
- package/src/data/base-remote.ts +3 -0
- package/src/data/base-repository.ts +11 -0
- package/src/data/comments/likes/remote.ts +87 -0
- package/src/data/comments/likes/repository.ts +61 -0
- package/src/data/comments/likes/types.ts +47 -0
- package/src/data/comments/remote.ts +71 -0
- package/src/data/comments/repository.ts +53 -0
- package/src/data/comments/types.ts +60 -0
- package/src/data/github/remote.ts +23 -0
- package/src/data/github/repository.ts +35 -0
- package/src/data/github/types.ts +23 -0
- package/src/data/home/remote.ts +24 -0
- package/src/data/home/repository.ts +28 -0
- package/src/data/home/types.ts +70 -0
- package/src/data/index.ts +3 -0
- package/src/data/likes/remote.ts +57 -0
- package/src/data/likes/repository.ts +47 -0
- package/src/data/likes/types.ts +46 -0
- package/src/data/me/remote.ts +28 -0
- package/src/data/me/repository.ts +30 -0
- package/src/data/me/types.ts +14 -0
- package/src/data/merge-requests/remote.ts +76 -0
- package/src/data/merge-requests/repository.ts +66 -0
- package/src/data/merge-requests/types.ts +33 -0
- package/src/data/messages/remote.ts +21 -0
- package/src/data/messages/repository.ts +104 -0
- package/src/data/messages/types.ts +20 -0
- package/src/data/public/studio-config/remote.ts +19 -0
- package/src/data/public/studio-config/repository.ts +23 -0
- package/src/data/public/studio-config/types.ts +6 -0
- package/src/data/ratings/remote.ts +76 -0
- package/src/data/ratings/repository.ts +63 -0
- package/src/data/ratings/types.ts +57 -0
- package/src/data/threads/remote.ts +40 -0
- package/src/data/threads/repository.ts +41 -0
- package/src/data/threads/types.ts +25 -0
- package/src/data/types.ts +8 -0
- package/src/data/users/remote.ts +31 -0
- package/src/data/users/repository.ts +45 -0
- package/src/data/users/types.ts +15 -0
- package/src/index.ts +6 -0
- package/src/studio/ComergeStudio.tsx +239 -0
- package/src/studio/bootstrap/StudioBootstrap.tsx +45 -0
- package/src/studio/bootstrap/useStudioBootstrap.ts +55 -0
- package/src/studio/hooks/useApp.ts +83 -0
- package/src/studio/hooks/useAppStats.ts +111 -0
- package/src/studio/hooks/useAttachmentUpload.ts +59 -0
- package/src/studio/hooks/useBundleManager.ts +389 -0
- package/src/studio/hooks/useMergeRequests.ts +173 -0
- package/src/studio/hooks/useStudioActions.ts +96 -0
- package/src/studio/hooks/useThreadMessages.ts +85 -0
- package/src/studio/lib/chat.ts +34 -0
- package/src/studio/ui/ChatPanel.tsx +154 -0
- package/src/studio/ui/ConfirmMergeFlow.tsx +55 -0
- package/src/studio/ui/PreviewPanel.tsx +131 -0
- package/src/studio/ui/RuntimeRenderer.tsx +40 -0
- package/src/studio/ui/StudioOverlay.tsx +257 -0
- package/src/studio/ui/preview-panel/PressableCardRow.tsx +49 -0
- package/src/studio/ui/preview-panel/PreviewCollaborateSection.tsx +174 -0
- package/src/studio/ui/preview-panel/PreviewCustomizeSection.tsx +160 -0
- package/src/studio/ui/preview-panel/PreviewHeroSection.tsx +56 -0
- package/src/studio/ui/preview-panel/PreviewMetaSection.tsx +67 -0
- package/src/studio/ui/preview-panel/PreviewPanelHeader.tsx +48 -0
- package/src/studio/ui/preview-panel/SectionTitle.tsx +31 -0
- package/src/studio/ui/preview-panel/usePreviewPanelData.ts +132 -0
- package/src/studio/ui/preview-panel/utils.ts +29 -0
- package/src/theme/index.ts +5 -0
- package/src/theme/tokens.ts +118 -0
- package/src/theme/types.ts +90 -0
- package/src/theme/useTheme.ts +11 -0
- package/dist/assets/images/merge.svg +0 -3
- package/dist/merge-72UG27QV.svg +0 -3
package/dist/index.mjs
CHANGED
|
@@ -184,6 +184,39 @@ function Text({
|
|
|
184
184
|
// src/studio/bootstrap/useStudioBootstrap.ts
|
|
185
185
|
import * as React from "react";
|
|
186
186
|
|
|
187
|
+
// src/core/services/http/public.ts
|
|
188
|
+
import axios from "axios";
|
|
189
|
+
|
|
190
|
+
// src/core/services/http/baseUrl.ts
|
|
191
|
+
var BASE_URL = "http://192.168.8.175:8080";
|
|
192
|
+
|
|
193
|
+
// src/core/services/http/public.ts
|
|
194
|
+
var CLIENT_KEY_HEADER = "x-comerge-api-key";
|
|
195
|
+
var clientApiKey = null;
|
|
196
|
+
var publicApi = axios.create({
|
|
197
|
+
baseURL: BASE_URL,
|
|
198
|
+
timeout: 3e4,
|
|
199
|
+
headers: {
|
|
200
|
+
Accept: "application/json",
|
|
201
|
+
"Content-Type": "application/json"
|
|
202
|
+
}
|
|
203
|
+
});
|
|
204
|
+
function setClientApiKey(apiKey) {
|
|
205
|
+
var _a;
|
|
206
|
+
const trimmed = ((_a = apiKey == null ? void 0 : apiKey.trim) == null ? void 0 : _a.call(apiKey)) ?? "";
|
|
207
|
+
if (!trimmed) {
|
|
208
|
+
throw new Error("comerge-studio: apiKey is required");
|
|
209
|
+
}
|
|
210
|
+
clientApiKey = trimmed;
|
|
211
|
+
publicApi.defaults.headers.common[CLIENT_KEY_HEADER] = trimmed;
|
|
212
|
+
}
|
|
213
|
+
publicApi.interceptors.request.use((config) => {
|
|
214
|
+
if (!clientApiKey) return config;
|
|
215
|
+
config.headers = config.headers ?? {};
|
|
216
|
+
config.headers[CLIENT_KEY_HEADER] = clientApiKey;
|
|
217
|
+
return config;
|
|
218
|
+
});
|
|
219
|
+
|
|
187
220
|
// src/core/services/supabase/client.ts
|
|
188
221
|
import { createClient } from "@supabase/supabase-js";
|
|
189
222
|
var clientSingleton = null;
|
|
@@ -254,22 +287,6 @@ var BaseRepository = class {
|
|
|
254
287
|
}
|
|
255
288
|
};
|
|
256
289
|
|
|
257
|
-
// src/core/services/http/public.ts
|
|
258
|
-
import axios from "axios";
|
|
259
|
-
|
|
260
|
-
// src/core/services/http/baseUrl.ts
|
|
261
|
-
var BASE_URL = "http://192.168.8.175:8080";
|
|
262
|
-
|
|
263
|
-
// src/core/services/http/public.ts
|
|
264
|
-
var publicApi = axios.create({
|
|
265
|
-
baseURL: BASE_URL,
|
|
266
|
-
timeout: 3e4,
|
|
267
|
-
headers: {
|
|
268
|
-
Accept: "application/json",
|
|
269
|
-
"Content-Type": "application/json"
|
|
270
|
-
}
|
|
271
|
-
});
|
|
272
|
-
|
|
273
290
|
// src/data/base-remote.ts
|
|
274
291
|
var BaseRemote = class {
|
|
275
292
|
};
|
|
@@ -307,6 +324,7 @@ function useStudioBootstrap(options) {
|
|
|
307
324
|
let cancelled = false;
|
|
308
325
|
(async () => {
|
|
309
326
|
try {
|
|
327
|
+
setClientApiKey(options.apiKey);
|
|
310
328
|
const requireAuth = isSupabaseClientInjected();
|
|
311
329
|
if (!requireAuth) {
|
|
312
330
|
const cfg = await studioConfigRepository.get();
|
|
@@ -324,14 +342,14 @@ function useStudioBootstrap(options) {
|
|
|
324
342
|
return () => {
|
|
325
343
|
cancelled = true;
|
|
326
344
|
};
|
|
327
|
-
}, []);
|
|
345
|
+
}, [options.apiKey]);
|
|
328
346
|
return state;
|
|
329
347
|
}
|
|
330
348
|
|
|
331
349
|
// src/studio/bootstrap/StudioBootstrap.tsx
|
|
332
350
|
import { Fragment, jsx as jsx2 } from "react/jsx-runtime";
|
|
333
|
-
function StudioBootstrap({ children, fallback, renderError }) {
|
|
334
|
-
const { ready, error, userId } = useStudioBootstrap({});
|
|
351
|
+
function StudioBootstrap({ children, fallback, renderError, apiKey }) {
|
|
352
|
+
const { ready, error, userId } = useStudioBootstrap({ apiKey });
|
|
335
353
|
if (error) {
|
|
336
354
|
return /* @__PURE__ */ jsx2(View, { style: { flex: 1, justifyContent: "center", alignItems: "center", padding: 24 }, children: renderError ? renderError(error) : /* @__PURE__ */ jsx2(Text, { variant: "bodyMuted", children: error.message }) });
|
|
337
355
|
}
|
|
@@ -3852,11 +3870,21 @@ import { Pressable as Pressable7, View as View21 } from "react-native";
|
|
|
3852
3870
|
import { LiquidGlassView as LiquidGlassView6, isLiquidGlassSupported as isLiquidGlassSupported6 } from "@callstack/liquid-glass";
|
|
3853
3871
|
import { Heart, MessageCircle } from "lucide-react-native";
|
|
3854
3872
|
|
|
3855
|
-
// src/
|
|
3856
|
-
|
|
3873
|
+
// src/components/icons/MergeIcon.tsx
|
|
3874
|
+
import Svg2, { Path as Path2 } from "react-native-svg";
|
|
3875
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
3876
|
+
function MergeIcon({ color = "currentColor", width = 24, height = 24, ...props }) {
|
|
3877
|
+
return /* @__PURE__ */ jsx28(Svg2, { viewBox: "0 0 486 486", width, height, ...props, children: /* @__PURE__ */ jsx28(
|
|
3878
|
+
Path2,
|
|
3879
|
+
{
|
|
3880
|
+
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",
|
|
3881
|
+
fill: color
|
|
3882
|
+
}
|
|
3883
|
+
) });
|
|
3884
|
+
}
|
|
3857
3885
|
|
|
3858
3886
|
// src/components/preview/StatsBar.tsx
|
|
3859
|
-
import { jsx as
|
|
3887
|
+
import { jsx as jsx29, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
3860
3888
|
function StatsBar({
|
|
3861
3889
|
likeCount,
|
|
3862
3890
|
commentCount,
|
|
@@ -3870,7 +3898,7 @@ function StatsBar({
|
|
|
3870
3898
|
}) {
|
|
3871
3899
|
const theme = useTheme();
|
|
3872
3900
|
const statsBgColor = theme.scheme === "dark" ? "rgba(24, 24, 27, 0.5)" : "rgba(255, 255, 255, 0.5)";
|
|
3873
|
-
return /* @__PURE__ */
|
|
3901
|
+
return /* @__PURE__ */ jsx29(
|
|
3874
3902
|
View21,
|
|
3875
3903
|
{
|
|
3876
3904
|
style: [
|
|
@@ -3878,7 +3906,7 @@ function StatsBar({
|
|
|
3878
3906
|
centered && { alignItems: "center" },
|
|
3879
3907
|
style
|
|
3880
3908
|
],
|
|
3881
|
-
children: /* @__PURE__ */
|
|
3909
|
+
children: /* @__PURE__ */ jsx29(
|
|
3882
3910
|
LiquidGlassView6,
|
|
3883
3911
|
{
|
|
3884
3912
|
style: [
|
|
@@ -3888,7 +3916,7 @@ function StatsBar({
|
|
|
3888
3916
|
],
|
|
3889
3917
|
effect: "clear",
|
|
3890
3918
|
children: /* @__PURE__ */ jsxs16(View21, { style: { flexDirection: "row", alignItems: "center", justifyContent: "space-between", paddingHorizontal: 16 }, children: [
|
|
3891
|
-
/* @__PURE__ */
|
|
3919
|
+
/* @__PURE__ */ jsx29(
|
|
3892
3920
|
Pressable7,
|
|
3893
3921
|
{
|
|
3894
3922
|
disabled: !onPressLike,
|
|
@@ -3896,7 +3924,7 @@ function StatsBar({
|
|
|
3896
3924
|
hitSlop: 8,
|
|
3897
3925
|
style: { paddingVertical: 8 },
|
|
3898
3926
|
children: /* @__PURE__ */ jsxs16(View21, { style: { flexDirection: "row", alignItems: "center" }, children: [
|
|
3899
|
-
/* @__PURE__ */
|
|
3927
|
+
/* @__PURE__ */ jsx29(
|
|
3900
3928
|
Heart,
|
|
3901
3929
|
{
|
|
3902
3930
|
size: 16,
|
|
@@ -3905,8 +3933,8 @@ function StatsBar({
|
|
|
3905
3933
|
fill: isLiked ? theme.colors.danger : "transparent"
|
|
3906
3934
|
}
|
|
3907
3935
|
),
|
|
3908
|
-
/* @__PURE__ */
|
|
3909
|
-
/* @__PURE__ */
|
|
3936
|
+
/* @__PURE__ */ jsx29(View21, { style: { width: 4 } }),
|
|
3937
|
+
/* @__PURE__ */ jsx29(
|
|
3910
3938
|
Text,
|
|
3911
3939
|
{
|
|
3912
3940
|
variant: "caption",
|
|
@@ -3920,7 +3948,7 @@ function StatsBar({
|
|
|
3920
3948
|
] })
|
|
3921
3949
|
}
|
|
3922
3950
|
),
|
|
3923
|
-
/* @__PURE__ */
|
|
3951
|
+
/* @__PURE__ */ jsx29(
|
|
3924
3952
|
Pressable7,
|
|
3925
3953
|
{
|
|
3926
3954
|
disabled: !onPressComments,
|
|
@@ -3928,16 +3956,16 @@ function StatsBar({
|
|
|
3928
3956
|
hitSlop: 8,
|
|
3929
3957
|
style: { paddingVertical: 8 },
|
|
3930
3958
|
children: /* @__PURE__ */ jsxs16(View21, { style: { flexDirection: "row", alignItems: "center" }, children: [
|
|
3931
|
-
/* @__PURE__ */
|
|
3932
|
-
/* @__PURE__ */
|
|
3933
|
-
/* @__PURE__ */
|
|
3959
|
+
/* @__PURE__ */ jsx29(MessageCircle, { size: 16, strokeWidth: 2.5, color: "#FFFFFF" }),
|
|
3960
|
+
/* @__PURE__ */ jsx29(View21, { style: { width: 4 } }),
|
|
3961
|
+
/* @__PURE__ */ jsx29(Text, { variant: "caption", style: { color: "#FFFFFF", fontWeight: theme.typography.fontWeight.bold }, children: commentCount })
|
|
3934
3962
|
] })
|
|
3935
3963
|
}
|
|
3936
3964
|
),
|
|
3937
3965
|
/* @__PURE__ */ jsxs16(View21, { style: { flexDirection: "row", alignItems: "center", paddingVertical: 8 }, children: [
|
|
3938
|
-
/* @__PURE__ */
|
|
3939
|
-
/* @__PURE__ */
|
|
3940
|
-
/* @__PURE__ */
|
|
3966
|
+
/* @__PURE__ */ jsx29(View21, { style: { transform: [{ scaleY: -1 }] }, children: /* @__PURE__ */ jsx29(MergeIcon, { width: 14, height: 14, color: "#FFFFFF" }) }),
|
|
3967
|
+
/* @__PURE__ */ jsx29(View21, { style: { width: 4 } }),
|
|
3968
|
+
/* @__PURE__ */ jsx29(Text, { variant: "caption", style: { color: "#FFFFFF", fontWeight: theme.typography.fontWeight.bold }, children: forkCount })
|
|
3941
3969
|
] })
|
|
3942
3970
|
] })
|
|
3943
3971
|
}
|
|
@@ -3970,7 +3998,7 @@ var APP_STATUS_LABEL = {
|
|
|
3970
3998
|
};
|
|
3971
3999
|
|
|
3972
4000
|
// src/components/preview/PreviewStatusBadge.tsx
|
|
3973
|
-
import { jsx as
|
|
4001
|
+
import { jsx as jsx30, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
3974
4002
|
var STATUS_BG = {
|
|
3975
4003
|
ready: "#10B981",
|
|
3976
4004
|
// emerald-500
|
|
@@ -4011,15 +4039,15 @@ function PreviewStatusBadge({ status }) {
|
|
|
4011
4039
|
backgroundColor: STATUS_BG[status]
|
|
4012
4040
|
},
|
|
4013
4041
|
children: [
|
|
4014
|
-
/* @__PURE__ */
|
|
4015
|
-
/* @__PURE__ */
|
|
4042
|
+
/* @__PURE__ */ jsx30(IconComp, { size: 12, color: "#FFFFFF", style: { marginRight: 4 } }),
|
|
4043
|
+
/* @__PURE__ */ jsx30(Text, { style: { color: "#FFFFFF", fontSize: 11, lineHeight: 14 }, children: label })
|
|
4016
4044
|
]
|
|
4017
4045
|
}
|
|
4018
4046
|
);
|
|
4019
4047
|
}
|
|
4020
4048
|
|
|
4021
4049
|
// src/studio/ui/preview-panel/PreviewHeroSection.tsx
|
|
4022
|
-
import { jsx as
|
|
4050
|
+
import { jsx as jsx31 } from "react/jsx-runtime";
|
|
4023
4051
|
function PreviewHeroSection({
|
|
4024
4052
|
appStatus,
|
|
4025
4053
|
showProcessing,
|
|
@@ -4028,13 +4056,13 @@ function PreviewHeroSection({
|
|
|
4028
4056
|
onImageLoad,
|
|
4029
4057
|
stats
|
|
4030
4058
|
}) {
|
|
4031
|
-
return /* @__PURE__ */
|
|
4059
|
+
return /* @__PURE__ */ jsx31(
|
|
4032
4060
|
PreviewHeroCard,
|
|
4033
4061
|
{
|
|
4034
|
-
overlayTopLeft: showProcessing ? /* @__PURE__ */
|
|
4035
|
-
background: /* @__PURE__ */
|
|
4036
|
-
image: /* @__PURE__ */
|
|
4037
|
-
overlayBottom: /* @__PURE__ */
|
|
4062
|
+
overlayTopLeft: showProcessing ? /* @__PURE__ */ jsx31(PreviewStatusBadge, { status: appStatus }) : null,
|
|
4063
|
+
background: /* @__PURE__ */ jsx31(PreviewPlaceholder, { visible: !imageLoaded }),
|
|
4064
|
+
image: /* @__PURE__ */ jsx31(PreviewImage, { uri: imageUrl, onLoad: onImageLoad }),
|
|
4065
|
+
overlayBottom: /* @__PURE__ */ jsx31(
|
|
4038
4066
|
StatsBar,
|
|
4039
4067
|
{
|
|
4040
4068
|
likeCount: stats.likeCount,
|
|
@@ -4057,7 +4085,7 @@ import { View as View24 } from "react-native";
|
|
|
4057
4085
|
|
|
4058
4086
|
// src/components/preview/PreviewMetaRow.tsx
|
|
4059
4087
|
import { View as View23 } from "react-native";
|
|
4060
|
-
import { jsx as
|
|
4088
|
+
import { jsx as jsx32, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
4061
4089
|
function PreviewMetaRow({
|
|
4062
4090
|
avatarUri,
|
|
4063
4091
|
creatorName,
|
|
@@ -4070,9 +4098,9 @@ function PreviewMetaRow({
|
|
|
4070
4098
|
const theme = useTheme();
|
|
4071
4099
|
return /* @__PURE__ */ jsxs18(View23, { style: [{ alignSelf: "stretch" }, style], children: [
|
|
4072
4100
|
/* @__PURE__ */ jsxs18(View23, { style: { flexDirection: "row", alignItems: "center" }, children: [
|
|
4073
|
-
/* @__PURE__ */
|
|
4101
|
+
/* @__PURE__ */ jsx32(Avatar, { uri: avatarUri, name: creatorName, size: 24, style: { marginRight: theme.spacing.sm } }),
|
|
4074
4102
|
/* @__PURE__ */ jsxs18(View23, { style: { flexDirection: "row", alignItems: "center", flex: 1, minWidth: 0, marginRight: theme.spacing.sm }, children: [
|
|
4075
|
-
/* @__PURE__ */
|
|
4103
|
+
/* @__PURE__ */ jsx32(
|
|
4076
4104
|
Text,
|
|
4077
4105
|
{
|
|
4078
4106
|
numberOfLines: 1,
|
|
@@ -4086,11 +4114,11 @@ function PreviewMetaRow({
|
|
|
4086
4114
|
children: title
|
|
4087
4115
|
}
|
|
4088
4116
|
),
|
|
4089
|
-
tag ? /* @__PURE__ */
|
|
4117
|
+
tag ? /* @__PURE__ */ jsx32(View23, { style: { marginLeft: theme.spacing.sm }, children: tag }) : null
|
|
4090
4118
|
] }),
|
|
4091
|
-
rightMetric ? /* @__PURE__ */
|
|
4119
|
+
rightMetric ? /* @__PURE__ */ jsx32(View23, { children: rightMetric }) : null
|
|
4092
4120
|
] }),
|
|
4093
|
-
subtitle ? /* @__PURE__ */
|
|
4121
|
+
subtitle ? /* @__PURE__ */ jsx32(
|
|
4094
4122
|
Text,
|
|
4095
4123
|
{
|
|
4096
4124
|
numberOfLines: 2,
|
|
@@ -4133,18 +4161,18 @@ function statusDescription(status, statusError) {
|
|
|
4133
4161
|
}
|
|
4134
4162
|
|
|
4135
4163
|
// src/studio/ui/preview-panel/PreviewMetaSection.tsx
|
|
4136
|
-
import { jsx as
|
|
4164
|
+
import { jsx as jsx33, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
4137
4165
|
function PreviewMetaSection({ app, isOwner, creator, downloadsCount }) {
|
|
4138
4166
|
var _a;
|
|
4139
4167
|
const theme = useTheme();
|
|
4140
|
-
return /* @__PURE__ */
|
|
4168
|
+
return /* @__PURE__ */ jsx33(
|
|
4141
4169
|
PreviewMetaRow,
|
|
4142
4170
|
{
|
|
4143
4171
|
title: app.name,
|
|
4144
4172
|
subtitle: app.description,
|
|
4145
4173
|
avatarUri: (creator == null ? void 0 : creator.avatar) ?? null,
|
|
4146
4174
|
creatorName: (creator == null ? void 0 : creator.name) ?? null,
|
|
4147
|
-
tag: isOwner || app.forkedFromAppId ? /* @__PURE__ */
|
|
4175
|
+
tag: isOwner || app.forkedFromAppId ? /* @__PURE__ */ jsx33(View24, { style: { paddingHorizontal: 8, paddingVertical: 2, borderRadius: 999, backgroundColor: "#3700B3" }, children: /* @__PURE__ */ jsx33(Text, { variant: "caption", style: { color: "#fff", fontWeight: theme.typography.fontWeight.semibold }, children: app.forkedFromAppId ? "Remix" : "Owner" }) }) : null,
|
|
4148
4176
|
rightMetric: /* @__PURE__ */ jsxs19(
|
|
4149
4177
|
View24,
|
|
4150
4178
|
{
|
|
@@ -4157,7 +4185,7 @@ function PreviewMetaSection({ app, isOwner, creator, downloadsCount }) {
|
|
|
4157
4185
|
backgroundColor: withAlpha(theme.colors.neutral, 0.3)
|
|
4158
4186
|
},
|
|
4159
4187
|
children: [
|
|
4160
|
-
/* @__PURE__ */
|
|
4188
|
+
/* @__PURE__ */ jsx33(
|
|
4161
4189
|
Text,
|
|
4162
4190
|
{
|
|
4163
4191
|
style: {
|
|
@@ -4170,7 +4198,7 @@ function PreviewMetaSection({ app, isOwner, creator, downloadsCount }) {
|
|
|
4170
4198
|
children: formatCount(downloadsCount ?? ((_a = app.insights) == null ? void 0 : _a.totalDownloads) ?? 0)
|
|
4171
4199
|
}
|
|
4172
4200
|
),
|
|
4173
|
-
/* @__PURE__ */
|
|
4201
|
+
/* @__PURE__ */ jsx33(IconPlay, { size: 14, colorToken: "textMuted", fill: theme.colors.textMuted })
|
|
4174
4202
|
]
|
|
4175
4203
|
}
|
|
4176
4204
|
),
|
|
@@ -4184,7 +4212,7 @@ import { ActivityIndicator as ActivityIndicator4, View as View26 } from "react-n
|
|
|
4184
4212
|
|
|
4185
4213
|
// src/studio/ui/preview-panel/PressableCardRow.tsx
|
|
4186
4214
|
import { Pressable as Pressable8, View as View25 } from "react-native";
|
|
4187
|
-
import { jsx as
|
|
4215
|
+
import { jsx as jsx34, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
4188
4216
|
function PressableCardRow({
|
|
4189
4217
|
accessibilityLabel,
|
|
4190
4218
|
onPress,
|
|
@@ -4195,7 +4223,7 @@ function PressableCardRow({
|
|
|
4195
4223
|
right,
|
|
4196
4224
|
style
|
|
4197
4225
|
}) {
|
|
4198
|
-
return /* @__PURE__ */
|
|
4226
|
+
return /* @__PURE__ */ jsx34(
|
|
4199
4227
|
Pressable8,
|
|
4200
4228
|
{
|
|
4201
4229
|
accessibilityRole: "button",
|
|
@@ -4203,23 +4231,23 @@ function PressableCardRow({
|
|
|
4203
4231
|
disabled,
|
|
4204
4232
|
onPress,
|
|
4205
4233
|
style: ({ pressed }) => ({ opacity: disabled ? 0.6 : pressed ? 0.85 : 1 }),
|
|
4206
|
-
children: /* @__PURE__ */
|
|
4234
|
+
children: /* @__PURE__ */ jsx34(Card, { padded: false, border: false, style, children: /* @__PURE__ */ jsxs20(View25, { style: { flexDirection: "row", alignItems: "center" }, children: [
|
|
4207
4235
|
left,
|
|
4208
4236
|
/* @__PURE__ */ jsxs20(View25, { style: { flex: 1, minWidth: 0 }, children: [
|
|
4209
4237
|
title,
|
|
4210
4238
|
subtitle ? subtitle : null
|
|
4211
4239
|
] }),
|
|
4212
|
-
right ? /* @__PURE__ */
|
|
4240
|
+
right ? /* @__PURE__ */ jsx34(View25, { style: { marginLeft: 16 }, children: right }) : null
|
|
4213
4241
|
] }) })
|
|
4214
4242
|
}
|
|
4215
4243
|
);
|
|
4216
4244
|
}
|
|
4217
4245
|
|
|
4218
4246
|
// src/studio/ui/preview-panel/SectionTitle.tsx
|
|
4219
|
-
import { jsx as
|
|
4247
|
+
import { jsx as jsx35 } from "react/jsx-runtime";
|
|
4220
4248
|
function SectionTitle({ children, marginTop }) {
|
|
4221
4249
|
const theme = useTheme();
|
|
4222
|
-
return /* @__PURE__ */
|
|
4250
|
+
return /* @__PURE__ */ jsx35(
|
|
4223
4251
|
Text,
|
|
4224
4252
|
{
|
|
4225
4253
|
style: {
|
|
@@ -4238,7 +4266,7 @@ function SectionTitle({ children, marginTop }) {
|
|
|
4238
4266
|
}
|
|
4239
4267
|
|
|
4240
4268
|
// src/studio/ui/preview-panel/PreviewCustomizeSection.tsx
|
|
4241
|
-
import { Fragment as Fragment4, jsx as
|
|
4269
|
+
import { Fragment as Fragment4, jsx as jsx36, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
4242
4270
|
function PreviewCustomizeSection({
|
|
4243
4271
|
app,
|
|
4244
4272
|
isOwner,
|
|
@@ -4249,7 +4277,7 @@ function PreviewCustomizeSection({
|
|
|
4249
4277
|
}) {
|
|
4250
4278
|
const theme = useTheme();
|
|
4251
4279
|
return /* @__PURE__ */ jsxs21(Fragment4, { children: [
|
|
4252
|
-
/* @__PURE__ */
|
|
4280
|
+
/* @__PURE__ */ jsx36(SectionTitle, { children: "Customize" }),
|
|
4253
4281
|
showProcessing ? /* @__PURE__ */ jsxs21(
|
|
4254
4282
|
View26,
|
|
4255
4283
|
{
|
|
@@ -4264,7 +4292,7 @@ function PreviewCustomizeSection({
|
|
|
4264
4292
|
marginBottom: theme.spacing.sm
|
|
4265
4293
|
},
|
|
4266
4294
|
children: [
|
|
4267
|
-
/* @__PURE__ */
|
|
4295
|
+
/* @__PURE__ */ jsx36(
|
|
4268
4296
|
View26,
|
|
4269
4297
|
{
|
|
4270
4298
|
style: {
|
|
@@ -4276,17 +4304,17 @@ function PreviewCustomizeSection({
|
|
|
4276
4304
|
backgroundColor: withAlpha(theme.colors.warning, 0.1),
|
|
4277
4305
|
marginRight: theme.spacing.lg
|
|
4278
4306
|
},
|
|
4279
|
-
children: /* @__PURE__ */
|
|
4307
|
+
children: /* @__PURE__ */ jsx36(ActivityIndicator4, { color: theme.colors.warning, size: "small" })
|
|
4280
4308
|
}
|
|
4281
4309
|
),
|
|
4282
4310
|
/* @__PURE__ */ jsxs21(View26, { style: { flex: 1, minWidth: 0 }, children: [
|
|
4283
|
-
/* @__PURE__ */
|
|
4284
|
-
/* @__PURE__ */
|
|
4311
|
+
/* @__PURE__ */ jsx36(Text, { style: { color: theme.colors.text, fontSize: 16, lineHeight: 20, fontWeight: theme.typography.fontWeight.semibold }, children: app.status === "error" ? "Error" : "Processing" }),
|
|
4312
|
+
/* @__PURE__ */ jsx36(Text, { style: { color: theme.colors.textMuted, fontSize: 12, lineHeight: 16, marginTop: 2 }, children: statusDescription(app.status, app.statusError) })
|
|
4285
4313
|
] })
|
|
4286
4314
|
]
|
|
4287
4315
|
}
|
|
4288
4316
|
) : null,
|
|
4289
|
-
/* @__PURE__ */
|
|
4317
|
+
/* @__PURE__ */ jsx36(
|
|
4290
4318
|
PressableCardRow,
|
|
4291
4319
|
{
|
|
4292
4320
|
accessibilityLabel: isOwner ? "Edit app" : "Remix app",
|
|
@@ -4299,7 +4327,7 @@ function PreviewCustomizeSection({
|
|
|
4299
4327
|
borderColor: withAlpha(theme.colors.primary, 0.1),
|
|
4300
4328
|
marginBottom: theme.spacing.sm
|
|
4301
4329
|
},
|
|
4302
|
-
left: /* @__PURE__ */
|
|
4330
|
+
left: /* @__PURE__ */ jsx36(
|
|
4303
4331
|
View26,
|
|
4304
4332
|
{
|
|
4305
4333
|
style: {
|
|
@@ -4311,15 +4339,15 @@ function PreviewCustomizeSection({
|
|
|
4311
4339
|
backgroundColor: withAlpha(theme.colors.primary, 0.1),
|
|
4312
4340
|
marginRight: theme.spacing.lg
|
|
4313
4341
|
},
|
|
4314
|
-
children: /* @__PURE__ */
|
|
4342
|
+
children: /* @__PURE__ */ jsx36(IconChat, { size: 20, colorToken: "primary" })
|
|
4315
4343
|
}
|
|
4316
4344
|
),
|
|
4317
|
-
title: /* @__PURE__ */
|
|
4318
|
-
subtitle: /* @__PURE__ */
|
|
4319
|
-
right: /* @__PURE__ */
|
|
4345
|
+
title: /* @__PURE__ */ jsx36(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" }),
|
|
4346
|
+
subtitle: /* @__PURE__ */ jsx36(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" }),
|
|
4347
|
+
right: /* @__PURE__ */ jsx36(IconChevronRight, { size: 20, colorToken: "textMuted" })
|
|
4320
4348
|
}
|
|
4321
4349
|
),
|
|
4322
|
-
isOwner && onStartDraw ? /* @__PURE__ */
|
|
4350
|
+
isOwner && onStartDraw ? /* @__PURE__ */ jsx36(
|
|
4323
4351
|
PressableCardRow,
|
|
4324
4352
|
{
|
|
4325
4353
|
accessibilityLabel: "Draw changes",
|
|
@@ -4332,7 +4360,7 @@ function PreviewCustomizeSection({
|
|
|
4332
4360
|
borderColor: withAlpha(theme.colors.danger, 0.1),
|
|
4333
4361
|
marginBottom: theme.spacing.sm
|
|
4334
4362
|
},
|
|
4335
|
-
left: /* @__PURE__ */
|
|
4363
|
+
left: /* @__PURE__ */ jsx36(
|
|
4336
4364
|
View26,
|
|
4337
4365
|
{
|
|
4338
4366
|
style: {
|
|
@@ -4344,12 +4372,12 @@ function PreviewCustomizeSection({
|
|
|
4344
4372
|
backgroundColor: withAlpha(theme.colors.danger, 0.1),
|
|
4345
4373
|
marginRight: theme.spacing.lg
|
|
4346
4374
|
},
|
|
4347
|
-
children: /* @__PURE__ */
|
|
4375
|
+
children: /* @__PURE__ */ jsx36(IconDraw, { size: 20, colorToken: "danger" })
|
|
4348
4376
|
}
|
|
4349
4377
|
),
|
|
4350
|
-
title: /* @__PURE__ */
|
|
4351
|
-
subtitle: /* @__PURE__ */
|
|
4352
|
-
right: /* @__PURE__ */
|
|
4378
|
+
title: /* @__PURE__ */ jsx36(Text, { style: { color: theme.colors.text, fontSize: 16, lineHeight: 20, fontWeight: theme.typography.fontWeight.semibold }, children: "Draw Changes" }),
|
|
4379
|
+
subtitle: /* @__PURE__ */ jsx36(Text, { style: { color: theme.colors.textMuted, fontSize: 12, lineHeight: 16, marginTop: 2 }, children: "Annotate the app with drawings" }),
|
|
4380
|
+
right: /* @__PURE__ */ jsx36(IconChevronRight, { size: 20, colorToken: "textMuted" })
|
|
4353
4381
|
}
|
|
4354
4382
|
) : null
|
|
4355
4383
|
] });
|
|
@@ -4368,7 +4396,7 @@ import { Ban, Check as Check3, CheckCheck, ChevronDown as ChevronDown2 } from "l
|
|
|
4368
4396
|
// src/components/primitives/MarkdownText.tsx
|
|
4369
4397
|
import { Platform as Platform4, View as View27 } from "react-native";
|
|
4370
4398
|
import Markdown from "react-native-markdown-display";
|
|
4371
|
-
import { jsx as
|
|
4399
|
+
import { jsx as jsx37 } from "react/jsx-runtime";
|
|
4372
4400
|
function MarkdownText({ markdown, variant = "chat", bodyColor, style }) {
|
|
4373
4401
|
const theme = useTheme();
|
|
4374
4402
|
const isDark = theme.scheme === "dark";
|
|
@@ -4379,7 +4407,7 @@ function MarkdownText({ markdown, variant = "chat", bodyColor, style }) {
|
|
|
4379
4407
|
const codeTextColor = isDark ? "#FFFFFF" : theme.colors.text;
|
|
4380
4408
|
const paragraphBottom = variant === "mergeRequest" ? 8 : 6;
|
|
4381
4409
|
const baseLineHeight = variant === "mergeRequest" ? 22 : 20;
|
|
4382
|
-
return /* @__PURE__ */
|
|
4410
|
+
return /* @__PURE__ */ jsx37(View27, { style, children: /* @__PURE__ */ jsx37(
|
|
4383
4411
|
Markdown,
|
|
4384
4412
|
{
|
|
4385
4413
|
style: {
|
|
@@ -4459,7 +4487,7 @@ function useControlledExpansion(props) {
|
|
|
4459
4487
|
}
|
|
4460
4488
|
|
|
4461
4489
|
// src/components/merge-requests/MergeRequestStatusCard.tsx
|
|
4462
|
-
import { jsx as
|
|
4490
|
+
import { jsx as jsx38, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
4463
4491
|
function MergeRequestStatusCard({
|
|
4464
4492
|
mergeRequest,
|
|
4465
4493
|
expanded: expandedProp,
|
|
@@ -4512,7 +4540,7 @@ function MergeRequestStatusCard({
|
|
|
4512
4540
|
useNativeDriver: true
|
|
4513
4541
|
}).start();
|
|
4514
4542
|
}, [expanded, rotate]);
|
|
4515
|
-
return /* @__PURE__ */
|
|
4543
|
+
return /* @__PURE__ */ jsx38(Pressable9, { onPress: () => setExpanded(!expanded), style: ({ pressed }) => [{ opacity: pressed ? 0.95 : 1 }], children: /* @__PURE__ */ jsxs22(
|
|
4516
4544
|
Card,
|
|
4517
4545
|
{
|
|
4518
4546
|
padded: false,
|
|
@@ -4526,10 +4554,10 @@ function MergeRequestStatusCard({
|
|
|
4526
4554
|
],
|
|
4527
4555
|
children: [
|
|
4528
4556
|
/* @__PURE__ */ jsxs22(View28, { style: { flexDirection: "row", alignItems: "center", gap: theme.spacing.lg }, children: [
|
|
4529
|
-
/* @__PURE__ */
|
|
4557
|
+
/* @__PURE__ */ jsx38(View28, { style: { width: 40, height: 40, borderRadius: 999, alignItems: "center", justifyContent: "center", backgroundColor: bgColor }, children: /* @__PURE__ */ jsx38(StatusIcon, { size: 20, color: iconColor }) }),
|
|
4530
4558
|
/* @__PURE__ */ jsxs22(View28, { style: { flex: 1, minWidth: 0 }, children: [
|
|
4531
4559
|
/* @__PURE__ */ jsxs22(View28, { style: { flexDirection: "row", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
4532
|
-
/* @__PURE__ */
|
|
4560
|
+
/* @__PURE__ */ jsx38(
|
|
4533
4561
|
Text,
|
|
4534
4562
|
{
|
|
4535
4563
|
style: {
|
|
@@ -4543,11 +4571,11 @@ function MergeRequestStatusCard({
|
|
|
4543
4571
|
children: statusText
|
|
4544
4572
|
}
|
|
4545
4573
|
),
|
|
4546
|
-
headerTimeAgo ? /* @__PURE__ */
|
|
4574
|
+
headerTimeAgo ? /* @__PURE__ */ jsx38(Text, { style: { fontSize: 10, lineHeight: 14, marginLeft: theme.spacing.sm, color: withAlpha(theme.colors.textMuted, 0.6) }, children: headerTimeAgo }) : null
|
|
4547
4575
|
] }),
|
|
4548
|
-
/* @__PURE__ */
|
|
4576
|
+
/* @__PURE__ */ jsx38(Text, { style: { fontSize: 12, lineHeight: 16, color: theme.colors.textMuted }, numberOfLines: 1, children: mergeRequest.title ?? "Untitled merge request" })
|
|
4549
4577
|
] }),
|
|
4550
|
-
headerRight ? /* @__PURE__ */
|
|
4578
|
+
headerRight ? /* @__PURE__ */ jsx38(View28, { children: headerRight }) : /* @__PURE__ */ jsx38(
|
|
4551
4579
|
Animated7.View,
|
|
4552
4580
|
{
|
|
4553
4581
|
style: {
|
|
@@ -4557,12 +4585,12 @@ function MergeRequestStatusCard({
|
|
|
4557
4585
|
}
|
|
4558
4586
|
]
|
|
4559
4587
|
},
|
|
4560
|
-
children: /* @__PURE__ */
|
|
4588
|
+
children: /* @__PURE__ */ jsx38(ChevronDown2, { size: 20, color: withAlpha(theme.colors.textMuted, 0.4) })
|
|
4561
4589
|
}
|
|
4562
4590
|
)
|
|
4563
4591
|
] }),
|
|
4564
4592
|
expanded ? /* @__PURE__ */ jsxs22(View28, { style: { marginTop: 16, marginLeft: 56 }, children: [
|
|
4565
|
-
/* @__PURE__ */
|
|
4593
|
+
/* @__PURE__ */ jsx38(
|
|
4566
4594
|
Text,
|
|
4567
4595
|
{
|
|
4568
4596
|
style: {
|
|
@@ -4576,7 +4604,7 @@ function MergeRequestStatusCard({
|
|
|
4576
4604
|
children: status.text
|
|
4577
4605
|
}
|
|
4578
4606
|
),
|
|
4579
|
-
createdTimeAgo ? /* @__PURE__ */
|
|
4607
|
+
createdTimeAgo ? /* @__PURE__ */ jsx38(
|
|
4580
4608
|
Text,
|
|
4581
4609
|
{
|
|
4582
4610
|
style: {
|
|
@@ -4587,8 +4615,8 @@ function MergeRequestStatusCard({
|
|
|
4587
4615
|
children: createdTimeAgo
|
|
4588
4616
|
}
|
|
4589
4617
|
) : null,
|
|
4590
|
-
/* @__PURE__ */
|
|
4591
|
-
mergeRequest.description ? /* @__PURE__ */
|
|
4618
|
+
/* @__PURE__ */ jsx38(Text, { style: { fontSize: 16, fontWeight: "600", color: textColor, marginBottom: 8 }, children: mergeRequest.title ?? "Untitled merge request" }),
|
|
4619
|
+
mergeRequest.description ? /* @__PURE__ */ jsx38(MarkdownText, { markdown: mergeRequest.description, variant: "mergeRequest" }) : null
|
|
4592
4620
|
] }) : null
|
|
4593
4621
|
]
|
|
4594
4622
|
}
|
|
@@ -4607,7 +4635,7 @@ import { Check as Check4, ChevronDown as ChevronDown3, Play as Play3, X as X3 }
|
|
|
4607
4635
|
// src/components/merge-requests/ReviewMergeRequestActionButton.tsx
|
|
4608
4636
|
import * as React25 from "react";
|
|
4609
4637
|
import { Pressable as Pressable10, View as View29 } from "react-native";
|
|
4610
|
-
import { jsx as
|
|
4638
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
4611
4639
|
function ReviewMergeRequestActionButton({
|
|
4612
4640
|
accessibilityLabel,
|
|
4613
4641
|
backgroundColor,
|
|
@@ -4622,7 +4650,7 @@ function ReviewMergeRequestActionButton({
|
|
|
4622
4650
|
const paddingHorizontal = iconOnly ? 0 : 16;
|
|
4623
4651
|
const paddingVertical = iconOnly ? 0 : 8;
|
|
4624
4652
|
const opacity = disabled ? 0.5 : pressed ? 0.9 : 1;
|
|
4625
|
-
return /* @__PURE__ */
|
|
4653
|
+
return /* @__PURE__ */ jsx39(
|
|
4626
4654
|
View29,
|
|
4627
4655
|
{
|
|
4628
4656
|
style: {
|
|
@@ -4637,7 +4665,7 @@ function ReviewMergeRequestActionButton({
|
|
|
4637
4665
|
paddingVertical,
|
|
4638
4666
|
justifyContent: "center"
|
|
4639
4667
|
},
|
|
4640
|
-
children: /* @__PURE__ */
|
|
4668
|
+
children: /* @__PURE__ */ jsx39(
|
|
4641
4669
|
Pressable10,
|
|
4642
4670
|
{
|
|
4643
4671
|
accessibilityRole: "button",
|
|
@@ -4661,7 +4689,7 @@ function ReviewMergeRequestActionButton({
|
|
|
4661
4689
|
}
|
|
4662
4690
|
|
|
4663
4691
|
// src/components/merge-requests/ReviewMergeRequestCard.tsx
|
|
4664
|
-
import { jsx as
|
|
4692
|
+
import { jsx as jsx40, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
4665
4693
|
function ReviewMergeRequestCard({
|
|
4666
4694
|
mr,
|
|
4667
4695
|
index,
|
|
@@ -4685,7 +4713,7 @@ function ReviewMergeRequestCard({
|
|
|
4685
4713
|
Animated8.timing(rotate, { toValue: isExpanded ? 1 : 0, duration: 200, useNativeDriver: true }).start();
|
|
4686
4714
|
}, [isExpanded, rotate]);
|
|
4687
4715
|
const position = total > 1 ? `${index + 1}/${total}` : "Merge request";
|
|
4688
|
-
return /* @__PURE__ */
|
|
4716
|
+
return /* @__PURE__ */ jsx40(Pressable11, { onPress: onToggle, style: ({ pressed }) => ({ opacity: pressed ? 0.95 : 1 }), children: /* @__PURE__ */ jsxs23(
|
|
4689
4717
|
Card,
|
|
4690
4718
|
{
|
|
4691
4719
|
padded: false,
|
|
@@ -4699,9 +4727,9 @@ function ReviewMergeRequestCard({
|
|
|
4699
4727
|
],
|
|
4700
4728
|
children: [
|
|
4701
4729
|
/* @__PURE__ */ jsxs23(View30, { style: { flexDirection: "row", alignItems: "center", gap: 12 }, children: [
|
|
4702
|
-
/* @__PURE__ */
|
|
4730
|
+
/* @__PURE__ */ jsx40(Avatar, { size: 40, uri: (creator == null ? void 0 : creator.avatar) ?? null, name: (creator == null ? void 0 : creator.name) ?? void 0 }),
|
|
4703
4731
|
/* @__PURE__ */ jsxs23(View30, { style: { flex: 1, minWidth: 0 }, children: [
|
|
4704
|
-
/* @__PURE__ */
|
|
4732
|
+
/* @__PURE__ */ jsx40(
|
|
4705
4733
|
Text,
|
|
4706
4734
|
{
|
|
4707
4735
|
style: { fontWeight: theme.typography.fontWeight.semibold, color: theme.colors.text, fontSize: 16, lineHeight: 20 },
|
|
@@ -4715,18 +4743,18 @@ function ReviewMergeRequestCard({
|
|
|
4715
4743
|
position
|
|
4716
4744
|
] })
|
|
4717
4745
|
] }),
|
|
4718
|
-
/* @__PURE__ */
|
|
4746
|
+
/* @__PURE__ */ jsx40(
|
|
4719
4747
|
Animated8.View,
|
|
4720
4748
|
{
|
|
4721
4749
|
style: {
|
|
4722
4750
|
transform: [{ rotate: rotate.interpolate({ inputRange: [0, 1], outputRange: ["0deg", "180deg"] }) }]
|
|
4723
4751
|
},
|
|
4724
|
-
children: /* @__PURE__ */
|
|
4752
|
+
children: /* @__PURE__ */ jsx40(ChevronDown3, { size: 20, color: withAlpha(theme.colors.textMuted, 0.4) })
|
|
4725
4753
|
}
|
|
4726
4754
|
)
|
|
4727
4755
|
] }),
|
|
4728
4756
|
isExpanded ? /* @__PURE__ */ jsxs23(View30, { style: { marginTop: 16 }, children: [
|
|
4729
|
-
/* @__PURE__ */
|
|
4757
|
+
/* @__PURE__ */ jsx40(
|
|
4730
4758
|
Text,
|
|
4731
4759
|
{
|
|
4732
4760
|
style: {
|
|
@@ -4740,13 +4768,13 @@ function ReviewMergeRequestCard({
|
|
|
4740
4768
|
children: status.text
|
|
4741
4769
|
}
|
|
4742
4770
|
),
|
|
4743
|
-
/* @__PURE__ */
|
|
4744
|
-
mr.description ? /* @__PURE__ */
|
|
4771
|
+
/* @__PURE__ */ jsx40(Text, { style: { color: theme.colors.textMuted, fontSize: 12, lineHeight: 16, marginBottom: 12 }, children: creator ? `${creator.approvedOpenedMergeRequests} approved merge${creator.approvedOpenedMergeRequests !== 1 ? "s" : ""}` : "Loading stats..." }),
|
|
4772
|
+
mr.description ? /* @__PURE__ */ jsx40(MarkdownText, { markdown: mr.description, variant: "mergeRequest" }) : null
|
|
4745
4773
|
] }) : null,
|
|
4746
|
-
/* @__PURE__ */
|
|
4774
|
+
/* @__PURE__ */ jsx40(View30, { style: { height: 1, backgroundColor: withAlpha(theme.colors.borderStrong, 0.5), marginTop: 12, marginBottom: 12 } }),
|
|
4747
4775
|
/* @__PURE__ */ jsxs23(View30, { style: { flexDirection: "row", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
4748
4776
|
/* @__PURE__ */ jsxs23(View30, { style: { flexDirection: "row", gap: 8 }, children: [
|
|
4749
|
-
/* @__PURE__ */
|
|
4777
|
+
/* @__PURE__ */ jsx40(
|
|
4750
4778
|
ReviewMergeRequestActionButton,
|
|
4751
4779
|
{
|
|
4752
4780
|
accessibilityLabel: "Reject",
|
|
@@ -4755,12 +4783,12 @@ function ReviewMergeRequestCard({
|
|
|
4755
4783
|
onPress: onReject,
|
|
4756
4784
|
iconOnly: !isExpanded,
|
|
4757
4785
|
children: /* @__PURE__ */ jsxs23(View30, { style: { flexDirection: "row", alignItems: "center", gap: isExpanded ? 4 : 0 }, children: [
|
|
4758
|
-
/* @__PURE__ */
|
|
4759
|
-
isExpanded ? /* @__PURE__ */
|
|
4786
|
+
/* @__PURE__ */ jsx40(X3, { size: 18, color: "#FFFFFF" }),
|
|
4787
|
+
isExpanded ? /* @__PURE__ */ jsx40(Text, { style: { fontSize: 13, color: "#FFFFFF", fontWeight: theme.typography.fontWeight.semibold }, children: "Reject" }) : null
|
|
4760
4788
|
] })
|
|
4761
4789
|
}
|
|
4762
4790
|
),
|
|
4763
|
-
/* @__PURE__ */
|
|
4791
|
+
/* @__PURE__ */ jsx40(
|
|
4764
4792
|
ReviewMergeRequestActionButton,
|
|
4765
4793
|
{
|
|
4766
4794
|
accessibilityLabel: !canAct ? "Not actionable" : isProcessing ? "Processing" : "Approve",
|
|
@@ -4769,16 +4797,16 @@ function ReviewMergeRequestCard({
|
|
|
4769
4797
|
onPress: onApprove,
|
|
4770
4798
|
iconOnly: !isExpanded,
|
|
4771
4799
|
children: isProcessing ? /* @__PURE__ */ jsxs23(View30, { style: { flexDirection: "row", alignItems: "center", gap: isExpanded ? 4 : 0 }, children: [
|
|
4772
|
-
/* @__PURE__ */
|
|
4773
|
-
isExpanded ? /* @__PURE__ */
|
|
4800
|
+
/* @__PURE__ */ jsx40(ActivityIndicator5, { size: "small", color: "#FFFFFF" }),
|
|
4801
|
+
isExpanded ? /* @__PURE__ */ jsx40(Text, { style: { fontSize: 13, color: "#FFFFFF", fontWeight: theme.typography.fontWeight.semibold }, children: "Processing" }) : null
|
|
4774
4802
|
] }) : /* @__PURE__ */ jsxs23(View30, { style: { flexDirection: "row", alignItems: "center", gap: isExpanded ? 4 : 0 }, children: [
|
|
4775
|
-
/* @__PURE__ */
|
|
4776
|
-
isExpanded ? /* @__PURE__ */
|
|
4803
|
+
/* @__PURE__ */ jsx40(Check4, { size: 18, color: "#FFFFFF" }),
|
|
4804
|
+
isExpanded ? /* @__PURE__ */ jsx40(Text, { style: { fontSize: 13, color: "#FFFFFF", fontWeight: theme.typography.fontWeight.semibold }, children: "Approve" }) : null
|
|
4777
4805
|
] })
|
|
4778
4806
|
}
|
|
4779
4807
|
)
|
|
4780
4808
|
] }),
|
|
4781
|
-
/* @__PURE__ */
|
|
4809
|
+
/* @__PURE__ */ jsx40(
|
|
4782
4810
|
ReviewMergeRequestActionButton,
|
|
4783
4811
|
{
|
|
4784
4812
|
accessibilityLabel: "Test",
|
|
@@ -4786,9 +4814,9 @@ function ReviewMergeRequestCard({
|
|
|
4786
4814
|
disabled: isBuilding || isTestingThis,
|
|
4787
4815
|
onPress: onTest,
|
|
4788
4816
|
iconOnly: !isExpanded,
|
|
4789
|
-
children: isTestingThis ? /* @__PURE__ */
|
|
4790
|
-
/* @__PURE__ */
|
|
4791
|
-
isExpanded ? /* @__PURE__ */
|
|
4817
|
+
children: isTestingThis ? /* @__PURE__ */ jsx40(ActivityIndicator5, { size: "small", color: "#888" }) : /* @__PURE__ */ jsxs23(View30, { style: { flexDirection: "row", alignItems: "center", gap: isExpanded ? 4 : 0 }, children: [
|
|
4818
|
+
/* @__PURE__ */ jsx40(Play3, { size: 14, color: theme.colors.text }),
|
|
4819
|
+
isExpanded ? /* @__PURE__ */ jsx40(Text, { style: { fontSize: 13, color: theme.colors.text, fontWeight: theme.typography.fontWeight.semibold }, children: "Test" }) : null
|
|
4792
4820
|
] })
|
|
4793
4821
|
}
|
|
4794
4822
|
)
|
|
@@ -4799,7 +4827,7 @@ function ReviewMergeRequestCard({
|
|
|
4799
4827
|
}
|
|
4800
4828
|
|
|
4801
4829
|
// src/components/merge-requests/ReviewMergeRequestCarousel.tsx
|
|
4802
|
-
import { jsx as
|
|
4830
|
+
import { jsx as jsx41, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
4803
4831
|
function ReviewMergeRequestCarousel({
|
|
4804
4832
|
mergeRequests,
|
|
4805
4833
|
creatorStatsById,
|
|
@@ -4822,7 +4850,7 @@ function ReviewMergeRequestCarousel({
|
|
|
4822
4850
|
const dotColor = theme.scheme === "dark" ? "#FFFFFF" : "#000000";
|
|
4823
4851
|
if (mergeRequests.length === 0) return null;
|
|
4824
4852
|
return /* @__PURE__ */ jsxs24(View31, { style: [{ marginHorizontal: -theme.spacing.lg }, style], children: [
|
|
4825
|
-
/* @__PURE__ */
|
|
4853
|
+
/* @__PURE__ */ jsx41(
|
|
4826
4854
|
FlatList,
|
|
4827
4855
|
{
|
|
4828
4856
|
horizontal: true,
|
|
@@ -4830,13 +4858,13 @@ function ReviewMergeRequestCarousel({
|
|
|
4830
4858
|
keyExtractor: (mr) => mr.id,
|
|
4831
4859
|
showsHorizontalScrollIndicator: false,
|
|
4832
4860
|
contentContainerStyle: { paddingHorizontal: theme.spacing.lg, paddingVertical: theme.spacing.sm },
|
|
4833
|
-
ItemSeparatorComponent: () => /* @__PURE__ */
|
|
4861
|
+
ItemSeparatorComponent: () => /* @__PURE__ */ jsx41(View31, { style: { width: gap } }),
|
|
4834
4862
|
snapToAlignment: "start",
|
|
4835
4863
|
decelerationRate: "fast",
|
|
4836
4864
|
snapToInterval: snapInterval,
|
|
4837
4865
|
disableIntervalMomentum: true,
|
|
4838
4866
|
style: { paddingRight: peekAmount },
|
|
4839
|
-
ListFooterComponent: /* @__PURE__ */
|
|
4867
|
+
ListFooterComponent: /* @__PURE__ */ jsx41(View31, { style: { width: peekAmount } }),
|
|
4840
4868
|
onScroll: Animated9.event([{ nativeEvent: { contentOffset: { x: carouselScrollX } } }], {
|
|
4841
4869
|
useNativeDriver: false
|
|
4842
4870
|
}),
|
|
@@ -4848,7 +4876,7 @@ function ReviewMergeRequestCarousel({
|
|
|
4848
4876
|
const isProcessing = Boolean(processingMrId && processingMrId === item.id);
|
|
4849
4877
|
const isAnyProcessing = Boolean(processingMrId);
|
|
4850
4878
|
const isTestingThis = Boolean(testingMrId && testingMrId === item.id);
|
|
4851
|
-
return /* @__PURE__ */
|
|
4879
|
+
return /* @__PURE__ */ jsx41(View31, { style: { width: cardWidth }, children: /* @__PURE__ */ jsx41(
|
|
4852
4880
|
ReviewMergeRequestCard,
|
|
4853
4881
|
{
|
|
4854
4882
|
mr: item,
|
|
@@ -4869,7 +4897,7 @@ function ReviewMergeRequestCarousel({
|
|
|
4869
4897
|
}
|
|
4870
4898
|
}
|
|
4871
4899
|
),
|
|
4872
|
-
mergeRequests.length >= 1 ? /* @__PURE__ */
|
|
4900
|
+
mergeRequests.length >= 1 ? /* @__PURE__ */ jsx41(View31, { style: { flexDirection: "row", justifyContent: "center", columnGap: 8, marginTop: theme.spacing.md }, children: mergeRequests.map((mr, index) => {
|
|
4873
4901
|
const inputRange = [(index - 1) * snapInterval, index * snapInterval, (index + 1) * snapInterval];
|
|
4874
4902
|
const scale = carouselScrollX.interpolate({
|
|
4875
4903
|
inputRange,
|
|
@@ -4881,7 +4909,7 @@ function ReviewMergeRequestCarousel({
|
|
|
4881
4909
|
outputRange: [0.4, 1, 0.4],
|
|
4882
4910
|
extrapolate: "clamp"
|
|
4883
4911
|
});
|
|
4884
|
-
return /* @__PURE__ */
|
|
4912
|
+
return /* @__PURE__ */ jsx41(
|
|
4885
4913
|
Animated9.View,
|
|
4886
4914
|
{
|
|
4887
4915
|
style: {
|
|
@@ -4900,7 +4928,7 @@ function ReviewMergeRequestCarousel({
|
|
|
4900
4928
|
}
|
|
4901
4929
|
|
|
4902
4930
|
// src/studio/ui/preview-panel/PreviewCollaborateSection.tsx
|
|
4903
|
-
import { Fragment as Fragment5, jsx as
|
|
4931
|
+
import { Fragment as Fragment5, jsx as jsx42, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
4904
4932
|
function PreviewCollaborateSection({
|
|
4905
4933
|
canSubmitMergeRequest,
|
|
4906
4934
|
incomingMergeRequests,
|
|
@@ -4921,8 +4949,8 @@ function PreviewCollaborateSection({
|
|
|
4921
4949
|
if (!hasSection) return null;
|
|
4922
4950
|
const showActionsSubtitle = canSubmitMergeRequest && onSubmitMergeRequest || onTestMr && incomingMergeRequests.length > 0;
|
|
4923
4951
|
return /* @__PURE__ */ jsxs25(Fragment5, { children: [
|
|
4924
|
-
/* @__PURE__ */
|
|
4925
|
-
showActionsSubtitle ? /* @__PURE__ */
|
|
4952
|
+
/* @__PURE__ */ jsx42(SectionTitle, { marginTop: theme.spacing.xl, children: "Collaborate" }),
|
|
4953
|
+
showActionsSubtitle ? /* @__PURE__ */ jsx42(
|
|
4926
4954
|
Text,
|
|
4927
4955
|
{
|
|
4928
4956
|
style: {
|
|
@@ -4937,7 +4965,7 @@ function PreviewCollaborateSection({
|
|
|
4937
4965
|
children: "Actions"
|
|
4938
4966
|
}
|
|
4939
4967
|
) : null,
|
|
4940
|
-
canSubmitMergeRequest && onSubmitMergeRequest ? /* @__PURE__ */
|
|
4968
|
+
canSubmitMergeRequest && onSubmitMergeRequest ? /* @__PURE__ */ jsx42(
|
|
4941
4969
|
PressableCardRow,
|
|
4942
4970
|
{
|
|
4943
4971
|
accessibilityLabel: "Submit merge request",
|
|
@@ -4968,7 +4996,7 @@ function PreviewCollaborateSection({
|
|
|
4968
4996
|
borderColor: withAlpha("#03DAC6", 0.2),
|
|
4969
4997
|
marginBottom: theme.spacing.sm
|
|
4970
4998
|
},
|
|
4971
|
-
left: /* @__PURE__ */
|
|
4999
|
+
left: /* @__PURE__ */ jsx42(
|
|
4972
5000
|
View32,
|
|
4973
5001
|
{
|
|
4974
5002
|
style: {
|
|
@@ -4980,15 +5008,15 @@ function PreviewCollaborateSection({
|
|
|
4980
5008
|
backgroundColor: withAlpha("#03DAC6", 0.1),
|
|
4981
5009
|
marginRight: theme.spacing.lg
|
|
4982
5010
|
},
|
|
4983
|
-
children: submittingMr ? /* @__PURE__ */
|
|
5011
|
+
children: submittingMr ? /* @__PURE__ */ jsx42(ActivityIndicator6, { color: "#03DAC6", size: "small" }) : /* @__PURE__ */ jsx42(MergeIcon, { width: 20, height: 20, color: "#03DAC6" })
|
|
4984
5012
|
}
|
|
4985
5013
|
),
|
|
4986
|
-
title: /* @__PURE__ */
|
|
4987
|
-
subtitle: /* @__PURE__ */
|
|
4988
|
-
right: /* @__PURE__ */
|
|
5014
|
+
title: /* @__PURE__ */ jsx42(Text, { style: { color: theme.colors.text, fontSize: 16, lineHeight: 20, fontWeight: theme.typography.fontWeight.semibold }, children: "Submit your new changes" }),
|
|
5015
|
+
subtitle: /* @__PURE__ */ jsx42(Text, { style: { color: theme.colors.textMuted, fontSize: 12, lineHeight: 16, marginTop: 2 }, children: "Ask to merge this remix to the original app" }),
|
|
5016
|
+
right: /* @__PURE__ */ jsx42(Send2, { size: 16, color: "#03DAC6" })
|
|
4989
5017
|
}
|
|
4990
5018
|
) : null,
|
|
4991
|
-
onTestMr && incomingMergeRequests.length > 0 ? /* @__PURE__ */
|
|
5019
|
+
onTestMr && incomingMergeRequests.length > 0 ? /* @__PURE__ */ jsx42(
|
|
4992
5020
|
ReviewMergeRequestCarousel,
|
|
4993
5021
|
{
|
|
4994
5022
|
mergeRequests: incomingMergeRequests,
|
|
@@ -5002,7 +5030,7 @@ function PreviewCollaborateSection({
|
|
|
5002
5030
|
}
|
|
5003
5031
|
) : null,
|
|
5004
5032
|
outgoingMergeRequests.length > 0 ? /* @__PURE__ */ jsxs25(Fragment5, { children: [
|
|
5005
|
-
/* @__PURE__ */
|
|
5033
|
+
/* @__PURE__ */ jsx42(
|
|
5006
5034
|
Text,
|
|
5007
5035
|
{
|
|
5008
5036
|
style: {
|
|
@@ -5018,7 +5046,7 @@ function PreviewCollaborateSection({
|
|
|
5018
5046
|
children: "History"
|
|
5019
5047
|
}
|
|
5020
5048
|
),
|
|
5021
|
-
outgoingMergeRequests.map((mr) => /* @__PURE__ */
|
|
5049
|
+
outgoingMergeRequests.map((mr) => /* @__PURE__ */ jsx42(View32, { style: { marginBottom: theme.spacing.sm }, children: /* @__PURE__ */ jsx42(MergeRequestStatusCard, { mergeRequest: toMergeRequestSummary(mr) }) }, mr.id))
|
|
5022
5050
|
] }) : null
|
|
5023
5051
|
] });
|
|
5024
5052
|
}
|
|
@@ -5309,7 +5337,7 @@ function usePreviewPanelData(params) {
|
|
|
5309
5337
|
}
|
|
5310
5338
|
|
|
5311
5339
|
// src/studio/ui/PreviewPanel.tsx
|
|
5312
|
-
import { jsx as
|
|
5340
|
+
import { jsx as jsx43, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
5313
5341
|
function PreviewPanel({
|
|
5314
5342
|
app,
|
|
5315
5343
|
loading,
|
|
@@ -5340,16 +5368,16 @@ function PreviewPanel({
|
|
|
5340
5368
|
onOpenComments,
|
|
5341
5369
|
commentCountOverride
|
|
5342
5370
|
});
|
|
5343
|
-
const header = /* @__PURE__ */
|
|
5371
|
+
const header = /* @__PURE__ */ jsx43(PreviewPanelHeader, { isOwner, onClose, onNavigateHome, onGoToChat });
|
|
5344
5372
|
if (loading || !app) {
|
|
5345
|
-
return /* @__PURE__ */
|
|
5346
|
-
/* @__PURE__ */
|
|
5347
|
-
/* @__PURE__ */
|
|
5348
|
-
/* @__PURE__ */
|
|
5373
|
+
return /* @__PURE__ */ jsx43(PreviewPage, { header, children: /* @__PURE__ */ jsxs26(View33, { style: { flex: 1, justifyContent: "center", alignItems: "center", padding: 24 }, children: [
|
|
5374
|
+
/* @__PURE__ */ jsx43(ActivityIndicator7, {}),
|
|
5375
|
+
/* @__PURE__ */ jsx43(View33, { style: { height: 12 } }),
|
|
5376
|
+
/* @__PURE__ */ jsx43(Text, { variant: "bodyMuted", children: "Loading app\u2026" })
|
|
5349
5377
|
] }) });
|
|
5350
5378
|
}
|
|
5351
5379
|
return /* @__PURE__ */ jsxs26(PreviewPage, { header, children: [
|
|
5352
|
-
/* @__PURE__ */
|
|
5380
|
+
/* @__PURE__ */ jsx43(
|
|
5353
5381
|
PreviewHeroSection,
|
|
5354
5382
|
{
|
|
5355
5383
|
appStatus: app.status,
|
|
@@ -5367,8 +5395,8 @@ function PreviewPanel({
|
|
|
5367
5395
|
}
|
|
5368
5396
|
}
|
|
5369
5397
|
),
|
|
5370
|
-
/* @__PURE__ */
|
|
5371
|
-
/* @__PURE__ */
|
|
5398
|
+
/* @__PURE__ */ jsx43(PreviewMetaSection, { app, isOwner, creator, downloadsCount: insights.downloads }),
|
|
5399
|
+
/* @__PURE__ */ jsx43(
|
|
5372
5400
|
PreviewCustomizeSection,
|
|
5373
5401
|
{
|
|
5374
5402
|
app,
|
|
@@ -5379,7 +5407,7 @@ function PreviewPanel({
|
|
|
5379
5407
|
onStartDraw
|
|
5380
5408
|
}
|
|
5381
5409
|
),
|
|
5382
|
-
/* @__PURE__ */
|
|
5410
|
+
/* @__PURE__ */ jsx43(
|
|
5383
5411
|
PreviewCollaborateSection,
|
|
5384
5412
|
{
|
|
5385
5413
|
canSubmitMergeRequest,
|
|
@@ -5415,7 +5443,7 @@ import { BottomSheetFlatList } from "@gorhom/bottom-sheet";
|
|
|
5415
5443
|
// src/components/chat/ChatMessageBubble.tsx
|
|
5416
5444
|
import { View as View34 } from "react-native";
|
|
5417
5445
|
import { CheckCheck as CheckCheck2, GitMerge as GitMerge2 } from "lucide-react-native";
|
|
5418
|
-
import { jsx as
|
|
5446
|
+
import { jsx as jsx44, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
5419
5447
|
function ChatMessageBubble({ message, renderContent, style }) {
|
|
5420
5448
|
var _a, _b;
|
|
5421
5449
|
const theme = useTheme();
|
|
@@ -5429,7 +5457,7 @@ function ChatMessageBubble({ message, renderContent, style }) {
|
|
|
5429
5457
|
const bubbleVariant = isHuman ? "surface" : "surfaceRaised";
|
|
5430
5458
|
const cornerStyle = isHuman ? { borderTopRightRadius: 0 } : { borderTopLeftRadius: 0 };
|
|
5431
5459
|
const bodyColor = metaStatus === "success" ? theme.colors.success : metaStatus === "error" ? theme.colors.danger : void 0;
|
|
5432
|
-
return /* @__PURE__ */
|
|
5460
|
+
return /* @__PURE__ */ jsx44(View34, { style: [align, style], children: /* @__PURE__ */ jsx44(
|
|
5433
5461
|
Surface,
|
|
5434
5462
|
{
|
|
5435
5463
|
variant: bubbleVariant,
|
|
@@ -5445,9 +5473,9 @@ function ChatMessageBubble({ message, renderContent, style }) {
|
|
|
5445
5473
|
cornerStyle
|
|
5446
5474
|
],
|
|
5447
5475
|
children: /* @__PURE__ */ jsxs27(View34, { style: { flexDirection: "row", alignItems: "center" }, children: [
|
|
5448
|
-
isMergeCompleted ? /* @__PURE__ */
|
|
5449
|
-
isMergeApproved ? /* @__PURE__ */
|
|
5450
|
-
/* @__PURE__ */
|
|
5476
|
+
isMergeCompleted ? /* @__PURE__ */ jsx44(CheckCheck2, { size: 16, color: theme.colors.success, style: { marginRight: theme.spacing.sm } }) : null,
|
|
5477
|
+
isMergeApproved ? /* @__PURE__ */ jsx44(GitMerge2, { size: 16, color: theme.colors.text, style: { marginRight: theme.spacing.sm } }) : null,
|
|
5478
|
+
/* @__PURE__ */ jsx44(View34, { style: { flexShrink: 1, minWidth: 0 }, children: renderContent ? renderContent(message) : /* @__PURE__ */ jsx44(MarkdownText, { markdown: message.content, variant: "chat", bodyColor }) })
|
|
5451
5479
|
] })
|
|
5452
5480
|
}
|
|
5453
5481
|
) });
|
|
@@ -5456,7 +5484,7 @@ function ChatMessageBubble({ message, renderContent, style }) {
|
|
|
5456
5484
|
// src/components/chat/TypingIndicator.tsx
|
|
5457
5485
|
import * as React31 from "react";
|
|
5458
5486
|
import { Animated as Animated10, View as View35 } from "react-native";
|
|
5459
|
-
import { jsx as
|
|
5487
|
+
import { jsx as jsx45 } from "react/jsx-runtime";
|
|
5460
5488
|
function TypingIndicator({ style }) {
|
|
5461
5489
|
const theme = useTheme();
|
|
5462
5490
|
const dotColor = theme.colors.textSubtle;
|
|
@@ -5479,7 +5507,7 @@ function TypingIndicator({ style }) {
|
|
|
5479
5507
|
loops.forEach((l) => l.stop());
|
|
5480
5508
|
};
|
|
5481
5509
|
}, [anims]);
|
|
5482
|
-
return /* @__PURE__ */
|
|
5510
|
+
return /* @__PURE__ */ jsx45(View35, { style: [{ flexDirection: "row", alignItems: "center" }, style], children: anims.map((a, i) => /* @__PURE__ */ jsx45(
|
|
5483
5511
|
Animated10.View,
|
|
5484
5512
|
{
|
|
5485
5513
|
style: {
|
|
@@ -5497,7 +5525,7 @@ function TypingIndicator({ style }) {
|
|
|
5497
5525
|
}
|
|
5498
5526
|
|
|
5499
5527
|
// src/components/chat/ChatMessageList.tsx
|
|
5500
|
-
import { jsx as
|
|
5528
|
+
import { jsx as jsx46 } from "react/jsx-runtime";
|
|
5501
5529
|
var ChatMessageList = React32.forwardRef(
|
|
5502
5530
|
({
|
|
5503
5531
|
messages,
|
|
@@ -5556,7 +5584,7 @@ var ChatMessageList = React32.forwardRef(
|
|
|
5556
5584
|
}
|
|
5557
5585
|
return void 0;
|
|
5558
5586
|
}, [showTypingIndicator, scrollToBottom]);
|
|
5559
|
-
return /* @__PURE__ */
|
|
5587
|
+
return /* @__PURE__ */ jsx46(
|
|
5560
5588
|
BottomSheetFlatList,
|
|
5561
5589
|
{
|
|
5562
5590
|
ref: listRef,
|
|
@@ -5573,8 +5601,8 @@ var ChatMessageList = React32.forwardRef(
|
|
|
5573
5601
|
},
|
|
5574
5602
|
contentStyle
|
|
5575
5603
|
],
|
|
5576
|
-
renderItem: ({ item, index }) => /* @__PURE__ */
|
|
5577
|
-
ListFooterComponent: showTypingIndicator ? /* @__PURE__ */
|
|
5604
|
+
renderItem: ({ item, index }) => /* @__PURE__ */ jsx46(View36, { style: { marginTop: index === 0 ? 0 : theme.spacing.sm }, children: /* @__PURE__ */ jsx46(ChatMessageBubble, { message: item, renderContent: renderMessageContent }) }),
|
|
5605
|
+
ListFooterComponent: showTypingIndicator ? /* @__PURE__ */ jsx46(View36, { style: { marginTop: theme.spacing.sm, alignSelf: "flex-start", paddingHorizontal: theme.spacing.lg }, children: /* @__PURE__ */ jsx46(TypingIndicator, {}) }) : null,
|
|
5578
5606
|
maintainVisibleContentPosition: { minIndexForVisible: 0, autoscrollToTopThreshold: nearBottomThreshold }
|
|
5579
5607
|
}
|
|
5580
5608
|
);
|
|
@@ -5583,7 +5611,7 @@ var ChatMessageList = React32.forwardRef(
|
|
|
5583
5611
|
ChatMessageList.displayName = "ChatMessageList";
|
|
5584
5612
|
|
|
5585
5613
|
// src/components/chat/ChatPage.tsx
|
|
5586
|
-
import { jsx as
|
|
5614
|
+
import { jsx as jsx47, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
5587
5615
|
function ChatPage({
|
|
5588
5616
|
header,
|
|
5589
5617
|
messages,
|
|
@@ -5599,10 +5627,10 @@ function ChatPage({
|
|
|
5599
5627
|
const theme = useTheme();
|
|
5600
5628
|
const [composerHeight, setComposerHeight] = React33.useState(0);
|
|
5601
5629
|
return /* @__PURE__ */ jsxs28(View37, { style: [{ flex: 1 }, style], children: [
|
|
5602
|
-
header ? /* @__PURE__ */
|
|
5603
|
-
topBanner ? /* @__PURE__ */
|
|
5630
|
+
header ? /* @__PURE__ */ jsx47(View37, { children: header }) : null,
|
|
5631
|
+
topBanner ? /* @__PURE__ */ jsx47(View37, { style: { paddingHorizontal: theme.spacing.lg, paddingTop: theme.spacing.sm }, children: topBanner }) : null,
|
|
5604
5632
|
/* @__PURE__ */ jsxs28(View37, { style: { flex: 1 }, children: [
|
|
5605
|
-
/* @__PURE__ */
|
|
5633
|
+
/* @__PURE__ */ jsx47(
|
|
5606
5634
|
ChatMessageList,
|
|
5607
5635
|
{
|
|
5608
5636
|
ref: listRef,
|
|
@@ -5615,7 +5643,7 @@ function ChatPage({
|
|
|
5615
5643
|
),
|
|
5616
5644
|
overlay
|
|
5617
5645
|
] }),
|
|
5618
|
-
/* @__PURE__ */
|
|
5646
|
+
/* @__PURE__ */ jsx47(
|
|
5619
5647
|
ChatComposer,
|
|
5620
5648
|
{
|
|
5621
5649
|
...composer,
|
|
@@ -5630,7 +5658,7 @@ function ChatPage({
|
|
|
5630
5658
|
import * as React34 from "react";
|
|
5631
5659
|
import { Pressable as Pressable12, View as View38 } from "react-native";
|
|
5632
5660
|
import Animated11, { Easing as Easing2, useAnimatedStyle as useAnimatedStyle2, useSharedValue as useSharedValue2, withTiming as withTiming2 } from "react-native-reanimated";
|
|
5633
|
-
import { jsx as
|
|
5661
|
+
import { jsx as jsx48 } from "react/jsx-runtime";
|
|
5634
5662
|
function ScrollToBottomButton({ visible, onPress, children, style }) {
|
|
5635
5663
|
const theme = useTheme();
|
|
5636
5664
|
const progress = useSharedValue2(visible ? 1 : 0);
|
|
@@ -5644,7 +5672,7 @@ function ScrollToBottomButton({ visible, onPress, children, style }) {
|
|
|
5644
5672
|
}));
|
|
5645
5673
|
const bg = theme.scheme === "dark" ? "rgba(39,39,42,0.9)" : "rgba(244,244,245,0.95)";
|
|
5646
5674
|
const border = theme.scheme === "dark" ? withAlpha("#FFFFFF", 0.12) : withAlpha("#000000", 0.08);
|
|
5647
|
-
return /* @__PURE__ */
|
|
5675
|
+
return /* @__PURE__ */ jsx48(
|
|
5648
5676
|
Animated11.View,
|
|
5649
5677
|
{
|
|
5650
5678
|
pointerEvents: visible ? "auto" : "none",
|
|
@@ -5658,7 +5686,7 @@ function ScrollToBottomButton({ visible, onPress, children, style }) {
|
|
|
5658
5686
|
style,
|
|
5659
5687
|
animStyle
|
|
5660
5688
|
],
|
|
5661
|
-
children: /* @__PURE__ */
|
|
5689
|
+
children: /* @__PURE__ */ jsx48(
|
|
5662
5690
|
View38,
|
|
5663
5691
|
{
|
|
5664
5692
|
style: {
|
|
@@ -5677,7 +5705,7 @@ function ScrollToBottomButton({ visible, onPress, children, style }) {
|
|
|
5677
5705
|
elevation: 5,
|
|
5678
5706
|
opacity: pressed ? 0.85 : 1
|
|
5679
5707
|
},
|
|
5680
|
-
children: /* @__PURE__ */
|
|
5708
|
+
children: /* @__PURE__ */ jsx48(
|
|
5681
5709
|
Pressable12,
|
|
5682
5710
|
{
|
|
5683
5711
|
onPress,
|
|
@@ -5696,7 +5724,7 @@ function ScrollToBottomButton({ visible, onPress, children, style }) {
|
|
|
5696
5724
|
|
|
5697
5725
|
// src/components/chat/ChatHeader.tsx
|
|
5698
5726
|
import { StyleSheet as StyleSheet4 } from "react-native";
|
|
5699
|
-
import { jsx as
|
|
5727
|
+
import { jsx as jsx49 } from "react/jsx-runtime";
|
|
5700
5728
|
function ChatHeader({ left, right, center, style }) {
|
|
5701
5729
|
const flattenedStyle = StyleSheet4.flatten([
|
|
5702
5730
|
{
|
|
@@ -5704,7 +5732,7 @@ function ChatHeader({ left, right, center, style }) {
|
|
|
5704
5732
|
},
|
|
5705
5733
|
style
|
|
5706
5734
|
]);
|
|
5707
|
-
return /* @__PURE__ */
|
|
5735
|
+
return /* @__PURE__ */ jsx49(
|
|
5708
5736
|
StudioSheetHeader,
|
|
5709
5737
|
{
|
|
5710
5738
|
left,
|
|
@@ -5717,12 +5745,12 @@ function ChatHeader({ left, right, center, style }) {
|
|
|
5717
5745
|
|
|
5718
5746
|
// src/components/chat/ForkNoticeBanner.tsx
|
|
5719
5747
|
import { View as View40 } from "react-native";
|
|
5720
|
-
import { jsx as
|
|
5748
|
+
import { jsx as jsx50, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
5721
5749
|
function ForkNoticeBanner({ isOwner = true, title, description, style }) {
|
|
5722
5750
|
const theme = useTheme();
|
|
5723
5751
|
const resolvedTitle = title ?? (isOwner ? "Remixed app" : "Remix app");
|
|
5724
5752
|
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.");
|
|
5725
|
-
return /* @__PURE__ */
|
|
5753
|
+
return /* @__PURE__ */ jsx50(
|
|
5726
5754
|
Card,
|
|
5727
5755
|
{
|
|
5728
5756
|
variant: "surfaceRaised",
|
|
@@ -5738,7 +5766,7 @@ function ForkNoticeBanner({ isOwner = true, title, description, style }) {
|
|
|
5738
5766
|
style
|
|
5739
5767
|
],
|
|
5740
5768
|
children: /* @__PURE__ */ jsxs29(View40, { style: { minWidth: 0 }, children: [
|
|
5741
|
-
/* @__PURE__ */
|
|
5769
|
+
/* @__PURE__ */ jsx50(
|
|
5742
5770
|
Text,
|
|
5743
5771
|
{
|
|
5744
5772
|
style: {
|
|
@@ -5752,7 +5780,7 @@ function ForkNoticeBanner({ isOwner = true, title, description, style }) {
|
|
|
5752
5780
|
children: resolvedTitle
|
|
5753
5781
|
}
|
|
5754
5782
|
),
|
|
5755
|
-
/* @__PURE__ */
|
|
5783
|
+
/* @__PURE__ */ jsx50(
|
|
5756
5784
|
Text,
|
|
5757
5785
|
{
|
|
5758
5786
|
style: {
|
|
@@ -5770,7 +5798,7 @@ function ForkNoticeBanner({ isOwner = true, title, description, style }) {
|
|
|
5770
5798
|
}
|
|
5771
5799
|
|
|
5772
5800
|
// src/studio/ui/ChatPanel.tsx
|
|
5773
|
-
import { jsx as
|
|
5801
|
+
import { jsx as jsx51, jsxs as jsxs30 } from "react/jsx-runtime";
|
|
5774
5802
|
function ChatPanel({
|
|
5775
5803
|
title = "Chat",
|
|
5776
5804
|
autoFocusComposer = false,
|
|
@@ -5808,21 +5836,21 @@ function ChatPanel({
|
|
|
5808
5836
|
var _a;
|
|
5809
5837
|
(_a = listRef.current) == null ? void 0 : _a.scrollToBottom({ animated: true });
|
|
5810
5838
|
}, []);
|
|
5811
|
-
const header = /* @__PURE__ */
|
|
5839
|
+
const header = /* @__PURE__ */ jsx51(
|
|
5812
5840
|
ChatHeader,
|
|
5813
5841
|
{
|
|
5814
5842
|
left: /* @__PURE__ */ jsxs30(View41, { style: { flexDirection: "row", alignItems: "center" }, children: [
|
|
5815
|
-
/* @__PURE__ */
|
|
5816
|
-
onNavigateHome ? /* @__PURE__ */
|
|
5843
|
+
/* @__PURE__ */ jsx51(StudioSheetHeaderIconButton, { onPress: onBack, accessibilityLabel: "Back", style: { marginRight: 8 }, children: /* @__PURE__ */ jsx51(IconBack, { size: 20, colorToken: "floatingContent" }) }),
|
|
5844
|
+
onNavigateHome ? /* @__PURE__ */ jsx51(StudioSheetHeaderIconButton, { onPress: onNavigateHome, accessibilityLabel: "Home", children: /* @__PURE__ */ jsx51(IconHome, { size: 20, colorToken: "floatingContent" }) }) : null
|
|
5817
5845
|
] }),
|
|
5818
5846
|
right: /* @__PURE__ */ jsxs30(View41, { style: { flexDirection: "row", alignItems: "center" }, children: [
|
|
5819
|
-
onStartDraw ? /* @__PURE__ */
|
|
5820
|
-
/* @__PURE__ */
|
|
5847
|
+
onStartDraw ? /* @__PURE__ */ jsx51(StudioSheetHeaderIconButton, { onPress: onStartDraw, accessibilityLabel: "Draw", intent: "danger", style: { marginRight: 8 }, children: /* @__PURE__ */ jsx51(IconDraw, { size: 20, colorToken: "onDanger" }) }) : null,
|
|
5848
|
+
/* @__PURE__ */ jsx51(StudioSheetHeaderIconButton, { onPress: onClose, accessibilityLabel: "Close", children: /* @__PURE__ */ jsx51(IconClose, { size: 20, colorToken: "floatingContent" }) })
|
|
5821
5849
|
] }),
|
|
5822
5850
|
center: null
|
|
5823
5851
|
}
|
|
5824
5852
|
);
|
|
5825
|
-
const topBanner = shouldForkOnEdit ? /* @__PURE__ */
|
|
5853
|
+
const topBanner = shouldForkOnEdit ? /* @__PURE__ */ jsx51(
|
|
5826
5854
|
ForkNoticeBanner,
|
|
5827
5855
|
{
|
|
5828
5856
|
isOwner: !shouldForkOnEdit,
|
|
@@ -5832,16 +5860,16 @@ function ChatPanel({
|
|
|
5832
5860
|
const showMessagesLoading = Boolean(loading) && messages.length === 0 || forking;
|
|
5833
5861
|
if (showMessagesLoading) {
|
|
5834
5862
|
return /* @__PURE__ */ jsxs30(View41, { style: { flex: 1 }, children: [
|
|
5835
|
-
/* @__PURE__ */
|
|
5836
|
-
topBanner ? /* @__PURE__ */
|
|
5863
|
+
/* @__PURE__ */ jsx51(View41, { children: header }),
|
|
5864
|
+
topBanner ? /* @__PURE__ */ jsx51(View41, { style: { paddingHorizontal: 16, paddingTop: 8 }, children: topBanner }) : null,
|
|
5837
5865
|
/* @__PURE__ */ jsxs30(View41, { style: { flex: 1, alignItems: "center", justifyContent: "center", paddingHorizontal: 24, paddingVertical: 12 }, children: [
|
|
5838
|
-
/* @__PURE__ */
|
|
5839
|
-
/* @__PURE__ */
|
|
5840
|
-
/* @__PURE__ */
|
|
5866
|
+
/* @__PURE__ */ jsx51(ActivityIndicator8, {}),
|
|
5867
|
+
/* @__PURE__ */ jsx51(View41, { style: { height: 12 } }),
|
|
5868
|
+
/* @__PURE__ */ jsx51(Text, { variant: "bodyMuted", children: forking ? "Creating your copy\u2026" : "Loading messages\u2026" })
|
|
5841
5869
|
] })
|
|
5842
5870
|
] });
|
|
5843
5871
|
}
|
|
5844
|
-
return /* @__PURE__ */
|
|
5872
|
+
return /* @__PURE__ */ jsx51(
|
|
5845
5873
|
ChatPage,
|
|
5846
5874
|
{
|
|
5847
5875
|
header,
|
|
@@ -5850,13 +5878,13 @@ function ChatPanel({
|
|
|
5850
5878
|
topBanner,
|
|
5851
5879
|
listRef,
|
|
5852
5880
|
onNearBottomChange: setNearBottom,
|
|
5853
|
-
overlay: /* @__PURE__ */
|
|
5881
|
+
overlay: /* @__PURE__ */ jsx51(
|
|
5854
5882
|
ScrollToBottomButton,
|
|
5855
5883
|
{
|
|
5856
5884
|
visible: !nearBottom,
|
|
5857
5885
|
onPress: handleScrollToBottom,
|
|
5858
5886
|
style: { bottom: 80 },
|
|
5859
|
-
children: /* @__PURE__ */
|
|
5887
|
+
children: /* @__PURE__ */ jsx51(IconArrowDown, { size: 20, colorToken: "floatingContent" })
|
|
5860
5888
|
}
|
|
5861
5889
|
),
|
|
5862
5890
|
composer: {
|
|
@@ -5883,7 +5911,7 @@ import {
|
|
|
5883
5911
|
Pressable as Pressable13,
|
|
5884
5912
|
View as View42
|
|
5885
5913
|
} from "react-native";
|
|
5886
|
-
import { jsx as
|
|
5914
|
+
import { jsx as jsx52, jsxs as jsxs31 } from "react/jsx-runtime";
|
|
5887
5915
|
function Modal({
|
|
5888
5916
|
visible,
|
|
5889
5917
|
onRequestClose,
|
|
@@ -5892,7 +5920,7 @@ function Modal({
|
|
|
5892
5920
|
contentStyle
|
|
5893
5921
|
}) {
|
|
5894
5922
|
const theme = useTheme();
|
|
5895
|
-
return /* @__PURE__ */
|
|
5923
|
+
return /* @__PURE__ */ jsx52(
|
|
5896
5924
|
RNModal,
|
|
5897
5925
|
{
|
|
5898
5926
|
visible,
|
|
@@ -5900,7 +5928,7 @@ function Modal({
|
|
|
5900
5928
|
animationType: "fade",
|
|
5901
5929
|
onRequestClose,
|
|
5902
5930
|
children: /* @__PURE__ */ jsxs31(View42, { style: { flex: 1, backgroundColor: theme.colors.backdrop, justifyContent: "center", padding: theme.spacing.lg }, children: [
|
|
5903
|
-
/* @__PURE__ */
|
|
5931
|
+
/* @__PURE__ */ jsx52(
|
|
5904
5932
|
Pressable13,
|
|
5905
5933
|
{
|
|
5906
5934
|
accessibilityRole: "button",
|
|
@@ -5908,14 +5936,14 @@ function Modal({
|
|
|
5908
5936
|
style: { position: "absolute", inset: 0 }
|
|
5909
5937
|
}
|
|
5910
5938
|
),
|
|
5911
|
-
/* @__PURE__ */
|
|
5939
|
+
/* @__PURE__ */ jsx52(Card, { variant: "surfaceRaised", padded: true, style: [{ borderRadius: theme.radii.xl }, contentStyle], children })
|
|
5912
5940
|
] })
|
|
5913
5941
|
}
|
|
5914
5942
|
);
|
|
5915
5943
|
}
|
|
5916
5944
|
|
|
5917
5945
|
// src/components/dialogs/ConfirmMergeRequestDialog.tsx
|
|
5918
|
-
import { jsx as
|
|
5946
|
+
import { jsx as jsx53, jsxs as jsxs32 } from "react/jsx-runtime";
|
|
5919
5947
|
function ConfirmMergeRequestDialog({
|
|
5920
5948
|
visible,
|
|
5921
5949
|
onOpenChange,
|
|
@@ -5956,7 +5984,7 @@ function ConfirmMergeRequestDialog({
|
|
|
5956
5984
|
backgroundColor: theme.colors.background
|
|
5957
5985
|
},
|
|
5958
5986
|
children: [
|
|
5959
|
-
/* @__PURE__ */
|
|
5987
|
+
/* @__PURE__ */ jsx53(View43, { children: /* @__PURE__ */ jsx53(
|
|
5960
5988
|
Text,
|
|
5961
5989
|
{
|
|
5962
5990
|
style: {
|
|
@@ -5969,7 +5997,7 @@ function ConfirmMergeRequestDialog({
|
|
|
5969
5997
|
}
|
|
5970
5998
|
) }),
|
|
5971
5999
|
/* @__PURE__ */ jsxs32(View43, { style: { marginTop: 16 }, children: [
|
|
5972
|
-
/* @__PURE__ */
|
|
6000
|
+
/* @__PURE__ */ jsx53(
|
|
5973
6001
|
View43,
|
|
5974
6002
|
{
|
|
5975
6003
|
style: [
|
|
@@ -5979,7 +6007,7 @@ function ConfirmMergeRequestDialog({
|
|
|
5979
6007
|
opacity: canConfirm ? 1 : 0.5
|
|
5980
6008
|
}
|
|
5981
6009
|
],
|
|
5982
|
-
children: /* @__PURE__ */
|
|
6010
|
+
children: /* @__PURE__ */ jsx53(
|
|
5983
6011
|
Pressable14,
|
|
5984
6012
|
{
|
|
5985
6013
|
accessibilityRole: "button",
|
|
@@ -5987,13 +6015,13 @@ function ConfirmMergeRequestDialog({
|
|
|
5987
6015
|
disabled: !canConfirm,
|
|
5988
6016
|
onPress: handleConfirm,
|
|
5989
6017
|
style: [fullWidthButtonBase, { flex: 1 }],
|
|
5990
|
-
children: /* @__PURE__ */
|
|
6018
|
+
children: /* @__PURE__ */ jsx53(Text, { style: { textAlign: "center", color: theme.colors.onPrimary }, children: "Approve Merge" })
|
|
5991
6019
|
}
|
|
5992
6020
|
)
|
|
5993
6021
|
}
|
|
5994
6022
|
),
|
|
5995
|
-
/* @__PURE__ */
|
|
5996
|
-
/* @__PURE__ */
|
|
6023
|
+
/* @__PURE__ */ jsx53(View43, { style: { height: 8 } }),
|
|
6024
|
+
/* @__PURE__ */ jsx53(
|
|
5997
6025
|
View43,
|
|
5998
6026
|
{
|
|
5999
6027
|
style: [
|
|
@@ -6005,7 +6033,7 @@ function ConfirmMergeRequestDialog({
|
|
|
6005
6033
|
opacity: isBuilding || !mergeRequest ? 0.5 : 1
|
|
6006
6034
|
}
|
|
6007
6035
|
],
|
|
6008
|
-
children: /* @__PURE__ */
|
|
6036
|
+
children: /* @__PURE__ */ jsx53(
|
|
6009
6037
|
Pressable14,
|
|
6010
6038
|
{
|
|
6011
6039
|
accessibilityRole: "button",
|
|
@@ -6013,13 +6041,13 @@ function ConfirmMergeRequestDialog({
|
|
|
6013
6041
|
disabled: isBuilding || !mergeRequest,
|
|
6014
6042
|
onPress: handleTestFirst,
|
|
6015
6043
|
style: [fullWidthButtonBase, { flex: 1 }],
|
|
6016
|
-
children: /* @__PURE__ */
|
|
6044
|
+
children: /* @__PURE__ */ jsx53(Text, { style: { textAlign: "center", color: theme.colors.text }, children: isBuilding ? "Preparing\u2026" : "Test edits first" })
|
|
6017
6045
|
}
|
|
6018
6046
|
)
|
|
6019
6047
|
}
|
|
6020
6048
|
),
|
|
6021
|
-
/* @__PURE__ */
|
|
6022
|
-
/* @__PURE__ */
|
|
6049
|
+
/* @__PURE__ */ jsx53(View43, { style: { height: 8 } }),
|
|
6050
|
+
/* @__PURE__ */ jsx53(
|
|
6023
6051
|
View43,
|
|
6024
6052
|
{
|
|
6025
6053
|
style: [
|
|
@@ -6030,14 +6058,14 @@ function ConfirmMergeRequestDialog({
|
|
|
6030
6058
|
borderColor: theme.colors.border
|
|
6031
6059
|
}
|
|
6032
6060
|
],
|
|
6033
|
-
children: /* @__PURE__ */
|
|
6061
|
+
children: /* @__PURE__ */ jsx53(
|
|
6034
6062
|
Pressable14,
|
|
6035
6063
|
{
|
|
6036
6064
|
accessibilityRole: "button",
|
|
6037
6065
|
accessibilityLabel: "Cancel",
|
|
6038
6066
|
onPress: close,
|
|
6039
6067
|
style: [fullWidthButtonBase, { flex: 1 }],
|
|
6040
|
-
children: /* @__PURE__ */
|
|
6068
|
+
children: /* @__PURE__ */ jsx53(Text, { style: { textAlign: "center", color: theme.colors.text }, children: "Cancel" })
|
|
6041
6069
|
}
|
|
6042
6070
|
)
|
|
6043
6071
|
}
|
|
@@ -6049,7 +6077,7 @@ function ConfirmMergeRequestDialog({
|
|
|
6049
6077
|
}
|
|
6050
6078
|
|
|
6051
6079
|
// src/studio/ui/ConfirmMergeFlow.tsx
|
|
6052
|
-
import { jsx as
|
|
6080
|
+
import { jsx as jsx54 } from "react/jsx-runtime";
|
|
6053
6081
|
function ConfirmMergeFlow({
|
|
6054
6082
|
visible,
|
|
6055
6083
|
onOpenChange,
|
|
@@ -6060,7 +6088,7 @@ function ConfirmMergeFlow({
|
|
|
6060
6088
|
onConfirm,
|
|
6061
6089
|
onTestFirst
|
|
6062
6090
|
}) {
|
|
6063
|
-
return /* @__PURE__ */
|
|
6091
|
+
return /* @__PURE__ */ jsx54(
|
|
6064
6092
|
ConfirmMergeRequestDialog,
|
|
6065
6093
|
{
|
|
6066
6094
|
visible,
|
|
@@ -6082,7 +6110,7 @@ function ConfirmMergeFlow({
|
|
|
6082
6110
|
}
|
|
6083
6111
|
|
|
6084
6112
|
// src/studio/ui/StudioOverlay.tsx
|
|
6085
|
-
import { Fragment as Fragment6, jsx as
|
|
6113
|
+
import { Fragment as Fragment6, jsx as jsx55, jsxs as jsxs33 } from "react/jsx-runtime";
|
|
6086
6114
|
function StudioOverlay({
|
|
6087
6115
|
captureTargetRef,
|
|
6088
6116
|
app,
|
|
@@ -6171,13 +6199,13 @@ function StudioOverlay({
|
|
|
6171
6199
|
[closeSheet, onTestMr]
|
|
6172
6200
|
);
|
|
6173
6201
|
return /* @__PURE__ */ jsxs33(Fragment6, { children: [
|
|
6174
|
-
/* @__PURE__ */
|
|
6175
|
-
/* @__PURE__ */
|
|
6202
|
+
/* @__PURE__ */ jsx55(EdgeGlowFrame, { visible: isTesting, role: "accent", thickness: 40, intensity: 1 }),
|
|
6203
|
+
/* @__PURE__ */ jsx55(StudioBottomSheet, { open: sheetOpen, onOpenChange: setSheetOpen, children: /* @__PURE__ */ jsx55(
|
|
6176
6204
|
StudioSheetPager,
|
|
6177
6205
|
{
|
|
6178
6206
|
activePage,
|
|
6179
6207
|
width,
|
|
6180
|
-
preview: /* @__PURE__ */
|
|
6208
|
+
preview: /* @__PURE__ */ jsx55(
|
|
6181
6209
|
PreviewPanel,
|
|
6182
6210
|
{
|
|
6183
6211
|
app,
|
|
@@ -6203,7 +6231,7 @@ function StudioOverlay({
|
|
|
6203
6231
|
commentCountOverride: commentsCount ?? void 0
|
|
6204
6232
|
}
|
|
6205
6233
|
),
|
|
6206
|
-
chat: /* @__PURE__ */
|
|
6234
|
+
chat: /* @__PURE__ */ jsx55(
|
|
6207
6235
|
ChatPanel,
|
|
6208
6236
|
{
|
|
6209
6237
|
messages: chatMessages,
|
|
@@ -6226,7 +6254,7 @@ function StudioOverlay({
|
|
|
6226
6254
|
)
|
|
6227
6255
|
}
|
|
6228
6256
|
) }),
|
|
6229
|
-
/* @__PURE__ */
|
|
6257
|
+
/* @__PURE__ */ jsx55(
|
|
6230
6258
|
FloatingDraggableButton,
|
|
6231
6259
|
{
|
|
6232
6260
|
visible: !sheetOpen && !drawing,
|
|
@@ -6234,10 +6262,10 @@ function StudioOverlay({
|
|
|
6234
6262
|
badgeCount: incomingMergeRequests.length,
|
|
6235
6263
|
onPress: toggleSheet,
|
|
6236
6264
|
isLoading: (app == null ? void 0 : app.status) === "editing",
|
|
6237
|
-
children: /* @__PURE__ */
|
|
6265
|
+
children: /* @__PURE__ */ jsx55(View44, { style: { width: 28, height: 28, alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ jsx55(MergeIcon, { width: 24, height: 24, color: theme.colors.floatingContent }) })
|
|
6238
6266
|
}
|
|
6239
6267
|
),
|
|
6240
|
-
/* @__PURE__ */
|
|
6268
|
+
/* @__PURE__ */ jsx55(
|
|
6241
6269
|
DrawModeOverlay,
|
|
6242
6270
|
{
|
|
6243
6271
|
visible: drawing,
|
|
@@ -6246,7 +6274,7 @@ function StudioOverlay({
|
|
|
6246
6274
|
onCapture: handleDrawCapture
|
|
6247
6275
|
}
|
|
6248
6276
|
),
|
|
6249
|
-
/* @__PURE__ */
|
|
6277
|
+
/* @__PURE__ */ jsx55(
|
|
6250
6278
|
ConfirmMergeFlow,
|
|
6251
6279
|
{
|
|
6252
6280
|
visible: Boolean(confirmMr),
|
|
@@ -6259,7 +6287,7 @@ function StudioOverlay({
|
|
|
6259
6287
|
onTestFirst: handleTestMr
|
|
6260
6288
|
}
|
|
6261
6289
|
),
|
|
6262
|
-
/* @__PURE__ */
|
|
6290
|
+
/* @__PURE__ */ jsx55(
|
|
6263
6291
|
AppCommentsSheet,
|
|
6264
6292
|
{
|
|
6265
6293
|
appId: commentsAppId,
|
|
@@ -6272,9 +6300,10 @@ function StudioOverlay({
|
|
|
6272
6300
|
}
|
|
6273
6301
|
|
|
6274
6302
|
// src/studio/ComergeStudio.tsx
|
|
6275
|
-
import { jsx as
|
|
6303
|
+
import { jsx as jsx56, jsxs as jsxs34 } from "react/jsx-runtime";
|
|
6276
6304
|
function ComergeStudio({
|
|
6277
6305
|
appId,
|
|
6306
|
+
apiKey,
|
|
6278
6307
|
appKey = "MicroMain",
|
|
6279
6308
|
onNavigateHome,
|
|
6280
6309
|
style
|
|
@@ -6289,7 +6318,7 @@ function ComergeStudio({
|
|
|
6289
6318
|
setPendingRuntimeTargetAppId(null);
|
|
6290
6319
|
}, [appId]);
|
|
6291
6320
|
const captureTargetRef = React38.useRef(null);
|
|
6292
|
-
return /* @__PURE__ */
|
|
6321
|
+
return /* @__PURE__ */ jsx56(StudioBootstrap, { apiKey, children: ({ userId }) => /* @__PURE__ */ jsx56(BottomSheetModalProvider, { children: /* @__PURE__ */ jsx56(
|
|
6293
6322
|
ComergeStudioInner,
|
|
6294
6323
|
{
|
|
6295
6324
|
userId,
|
|
@@ -6382,9 +6411,9 @@ function ComergeStudioInner({
|
|
|
6382
6411
|
const payloadType = typeof ((_a = last.payload) == null ? void 0 : _a.type) === "string" ? String(last.payload.type) : void 0;
|
|
6383
6412
|
return payloadType !== "outcome";
|
|
6384
6413
|
}, [thread.raw]);
|
|
6385
|
-
return /* @__PURE__ */
|
|
6386
|
-
/* @__PURE__ */
|
|
6387
|
-
/* @__PURE__ */
|
|
6414
|
+
return /* @__PURE__ */ jsx56(View45, { style: [{ flex: 1 }, style], children: /* @__PURE__ */ jsxs34(View45, { ref: captureTargetRef, style: { flex: 1 }, collapsable: false, children: [
|
|
6415
|
+
/* @__PURE__ */ jsx56(RuntimeRenderer, { appKey, bundlePath: bundle.bundlePath, renderToken: bundle.renderToken }),
|
|
6416
|
+
/* @__PURE__ */ jsx56(
|
|
6388
6417
|
StudioOverlay,
|
|
6389
6418
|
{
|
|
6390
6419
|
captureTargetRef,
|