@comergehq/studio 0.1.30 → 0.1.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1408 -777
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1332 -700
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -1
- package/src/assets/lottie/remix-x-loop.lottie.json +470 -0
- package/src/components/icons/RemixUpIcon.tsx +20 -0
- package/src/components/icons/RemixXLoopLottie.tsx +22 -0
- package/src/studio/ui/PreviewPanel.tsx +9 -5
- package/src/studio/ui/StudioOverlay.tsx +5 -3
- package/src/studio/ui/preview-panel/PreviewPanelHeader.tsx +37 -212
- package/src/studio/ui/preview-panel/PreviewRelatedAppsSection.tsx +285 -0
package/dist/index.js
CHANGED
|
@@ -5,6 +5,9 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
5
5
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
6
|
var __getProtoOf = Object.getPrototypeOf;
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __commonJS = (cb, mod) => function __require() {
|
|
9
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
10
|
+
};
|
|
8
11
|
var __export = (target, all) => {
|
|
9
12
|
for (var name in all)
|
|
10
13
|
__defProp(target, name, { get: all[name], enumerable: true });
|
|
@@ -27,6 +30,482 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
27
30
|
));
|
|
28
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
32
|
|
|
33
|
+
// src/assets/lottie/remix-x-loop.lottie.json
|
|
34
|
+
var require_remix_x_loop_lottie = __commonJS({
|
|
35
|
+
"src/assets/lottie/remix-x-loop.lottie.json"(exports2, module2) {
|
|
36
|
+
module2.exports = {
|
|
37
|
+
v: "5.7.4",
|
|
38
|
+
fr: 30,
|
|
39
|
+
ip: 0,
|
|
40
|
+
op: 50,
|
|
41
|
+
w: 120,
|
|
42
|
+
h: 120,
|
|
43
|
+
nm: "Remix X Loop",
|
|
44
|
+
ddd: 0,
|
|
45
|
+
assets: [],
|
|
46
|
+
layers: [
|
|
47
|
+
{
|
|
48
|
+
ddd: 0,
|
|
49
|
+
ind: 1,
|
|
50
|
+
ty: 3,
|
|
51
|
+
nm: "Controller",
|
|
52
|
+
ks: {
|
|
53
|
+
o: { a: 0, k: 100 },
|
|
54
|
+
r: {
|
|
55
|
+
a: 1,
|
|
56
|
+
k: [
|
|
57
|
+
{ t: 0, s: [0] },
|
|
58
|
+
{ t: 5, s: [0] },
|
|
59
|
+
{ t: 9, s: [40] },
|
|
60
|
+
{ t: 13, s: [180] },
|
|
61
|
+
{ t: 17, s: [320] },
|
|
62
|
+
{ t: 20, s: [360] },
|
|
63
|
+
{ t: 29, s: [360] },
|
|
64
|
+
{ t: 33, s: [400] },
|
|
65
|
+
{ t: 37, s: [540] },
|
|
66
|
+
{ t: 41, s: [680] },
|
|
67
|
+
{ t: 44, s: [720] },
|
|
68
|
+
{ t: 50, s: [720] }
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
p: { a: 0, k: [60, 60, 0] },
|
|
72
|
+
a: { a: 0, k: [35, 35, 0] },
|
|
73
|
+
s: { a: 0, k: [100, 100, 100] }
|
|
74
|
+
},
|
|
75
|
+
ao: 0,
|
|
76
|
+
ip: 0,
|
|
77
|
+
op: 50,
|
|
78
|
+
st: 0,
|
|
79
|
+
bm: 0
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
ddd: 0,
|
|
83
|
+
ind: 2,
|
|
84
|
+
ty: 4,
|
|
85
|
+
nm: "Chevron Right",
|
|
86
|
+
parent: 1,
|
|
87
|
+
ks: {
|
|
88
|
+
o: {
|
|
89
|
+
a: 1,
|
|
90
|
+
k: [
|
|
91
|
+
{ t: 0, s: [100] },
|
|
92
|
+
{ t: 17, s: [100] },
|
|
93
|
+
{ t: 20, s: [0] },
|
|
94
|
+
{ t: 29, s: [0] },
|
|
95
|
+
{ t: 44, s: [100] },
|
|
96
|
+
{ t: 50, s: [100] }
|
|
97
|
+
]
|
|
98
|
+
},
|
|
99
|
+
r: { a: 0, k: 0 },
|
|
100
|
+
p: {
|
|
101
|
+
a: 1,
|
|
102
|
+
k: [
|
|
103
|
+
{ t: 0, s: [73, 35, 0] },
|
|
104
|
+
{ t: 5, s: [73, 35, 0] },
|
|
105
|
+
{ t: 9, s: [69, 35, 0] },
|
|
106
|
+
{ t: 13, s: [54, 35, 0] },
|
|
107
|
+
{ t: 17, s: [39, 35, 0] },
|
|
108
|
+
{ t: 20, s: [35, 35, 0] },
|
|
109
|
+
{ t: 29, s: [35, 35, 0] },
|
|
110
|
+
{ t: 33, s: [39, 35, 0] },
|
|
111
|
+
{ t: 37, s: [54, 35, 0] },
|
|
112
|
+
{ t: 41, s: [69, 35, 0] },
|
|
113
|
+
{ t: 44, s: [73, 35, 0] },
|
|
114
|
+
{ t: 50, s: [73, 35, 0] }
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
a: { a: 0, k: [35, 35, 0] },
|
|
118
|
+
s: { a: 0, k: [100, 100, 100] }
|
|
119
|
+
},
|
|
120
|
+
ao: 0,
|
|
121
|
+
shapes: [
|
|
122
|
+
{
|
|
123
|
+
ty: "gr",
|
|
124
|
+
nm: "Right",
|
|
125
|
+
it: [
|
|
126
|
+
{
|
|
127
|
+
ty: "sh",
|
|
128
|
+
nm: "Path",
|
|
129
|
+
ks: {
|
|
130
|
+
a: 0,
|
|
131
|
+
k: {
|
|
132
|
+
i: [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]],
|
|
133
|
+
o: [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]],
|
|
134
|
+
v: [[48.2249, 34.8401], [13.266, 69.546], [0, 56.28], [21.44, 34.84], [0, 13.266], [13.266, 0], [48.2249, 34.8401]],
|
|
135
|
+
c: true
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
ty: "fl",
|
|
141
|
+
nm: "Fill",
|
|
142
|
+
c: { a: 0, k: [0, 0.7961, 0.7529, 1] },
|
|
143
|
+
o: { a: 0, k: 100 },
|
|
144
|
+
r: 1
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
ty: "tr",
|
|
148
|
+
nm: "Transform",
|
|
149
|
+
p: { a: 0, k: [0, 0] },
|
|
150
|
+
a: { a: 0, k: [0, 0] },
|
|
151
|
+
s: { a: 0, k: [100, 100] },
|
|
152
|
+
r: { a: 0, k: 0 },
|
|
153
|
+
o: { a: 0, k: 100 },
|
|
154
|
+
sk: { a: 0, k: 0 },
|
|
155
|
+
sa: { a: 0, k: 0 }
|
|
156
|
+
}
|
|
157
|
+
]
|
|
158
|
+
}
|
|
159
|
+
],
|
|
160
|
+
ip: 0,
|
|
161
|
+
op: 50,
|
|
162
|
+
st: 0,
|
|
163
|
+
bm: 0
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
ddd: 0,
|
|
167
|
+
ind: 3,
|
|
168
|
+
ty: 4,
|
|
169
|
+
nm: "Chevron Left",
|
|
170
|
+
parent: 1,
|
|
171
|
+
ks: {
|
|
172
|
+
o: {
|
|
173
|
+
a: 1,
|
|
174
|
+
k: [
|
|
175
|
+
{ t: 0, s: [100] },
|
|
176
|
+
{ t: 17, s: [100] },
|
|
177
|
+
{ t: 20, s: [0] },
|
|
178
|
+
{ t: 29, s: [0] },
|
|
179
|
+
{ t: 44, s: [100] },
|
|
180
|
+
{ t: 50, s: [100] }
|
|
181
|
+
]
|
|
182
|
+
},
|
|
183
|
+
r: { a: 0, k: 0 },
|
|
184
|
+
p: {
|
|
185
|
+
a: 1,
|
|
186
|
+
k: [
|
|
187
|
+
{ t: 0, s: [-3, 35, 0] },
|
|
188
|
+
{ t: 5, s: [-3, 35, 0] },
|
|
189
|
+
{ t: 9, s: [1, 35, 0] },
|
|
190
|
+
{ t: 13, s: [16, 35, 0] },
|
|
191
|
+
{ t: 17, s: [31, 35, 0] },
|
|
192
|
+
{ t: 20, s: [35, 35, 0] },
|
|
193
|
+
{ t: 29, s: [35, 35, 0] },
|
|
194
|
+
{ t: 33, s: [31, 35, 0] },
|
|
195
|
+
{ t: 37, s: [16, 35, 0] },
|
|
196
|
+
{ t: 41, s: [1, 35, 0] },
|
|
197
|
+
{ t: 44, s: [-3, 35, 0] },
|
|
198
|
+
{ t: 50, s: [-3, 35, 0] }
|
|
199
|
+
]
|
|
200
|
+
},
|
|
201
|
+
a: { a: 0, k: [35, 35, 0] },
|
|
202
|
+
s: { a: 0, k: [100, 100, 100] }
|
|
203
|
+
},
|
|
204
|
+
ao: 0,
|
|
205
|
+
shapes: [
|
|
206
|
+
{
|
|
207
|
+
ty: "gr",
|
|
208
|
+
nm: "Left",
|
|
209
|
+
it: [
|
|
210
|
+
{
|
|
211
|
+
ty: "sh",
|
|
212
|
+
nm: "Path",
|
|
213
|
+
ks: {
|
|
214
|
+
a: 0,
|
|
215
|
+
k: {
|
|
216
|
+
i: [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]],
|
|
217
|
+
o: [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]],
|
|
218
|
+
v: [[48.106, 56.28], [34.84, 69.546], [0, 34.84], [34.84, 0], [48.106, 13.266], [26.532, 34.84], [48.106, 56.28]],
|
|
219
|
+
c: true
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
ty: "fl",
|
|
225
|
+
nm: "Fill",
|
|
226
|
+
c: { a: 0, k: [1, 0.0941, 0.1255, 1] },
|
|
227
|
+
o: { a: 0, k: 100 },
|
|
228
|
+
r: 1
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
ty: "tr",
|
|
232
|
+
nm: "Transform",
|
|
233
|
+
p: { a: 0, k: [21, 0] },
|
|
234
|
+
a: { a: 0, k: [0, 0] },
|
|
235
|
+
s: { a: 0, k: [100, 100] },
|
|
236
|
+
r: { a: 0, k: 0 },
|
|
237
|
+
o: { a: 0, k: 100 },
|
|
238
|
+
sk: { a: 0, k: 0 },
|
|
239
|
+
sa: { a: 0, k: 0 }
|
|
240
|
+
}
|
|
241
|
+
]
|
|
242
|
+
}
|
|
243
|
+
],
|
|
244
|
+
ip: 0,
|
|
245
|
+
op: 50,
|
|
246
|
+
st: 0,
|
|
247
|
+
bm: 0
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
ddd: 0,
|
|
251
|
+
ind: 4,
|
|
252
|
+
ty: 4,
|
|
253
|
+
nm: "Diamond",
|
|
254
|
+
parent: 1,
|
|
255
|
+
ks: {
|
|
256
|
+
o: {
|
|
257
|
+
a: 1,
|
|
258
|
+
k: [
|
|
259
|
+
{ t: 0, s: [0] },
|
|
260
|
+
{ t: 1, s: [0] },
|
|
261
|
+
{ t: 2, s: [0] },
|
|
262
|
+
{ t: 3, s: [0] },
|
|
263
|
+
{ t: 4, s: [0] },
|
|
264
|
+
{ t: 5, s: [0] },
|
|
265
|
+
{ t: 6, s: [0] },
|
|
266
|
+
{ t: 7, s: [0] },
|
|
267
|
+
{ t: 8, s: [0] },
|
|
268
|
+
{ t: 9, s: [0] },
|
|
269
|
+
{ t: 10, s: [5] },
|
|
270
|
+
{ t: 11, s: [33.889] },
|
|
271
|
+
{ t: 12, s: [66.111] },
|
|
272
|
+
{ t: 13, s: [95] },
|
|
273
|
+
{ t: 14, s: [100] },
|
|
274
|
+
{ t: 15, s: [71.111] },
|
|
275
|
+
{ t: 16, s: [40] },
|
|
276
|
+
{ t: 17, s: [17.778] },
|
|
277
|
+
{ t: 18, s: [4.444] },
|
|
278
|
+
{ t: 19, s: [0] },
|
|
279
|
+
{ t: 20, s: [0] },
|
|
280
|
+
{ t: 21, s: [0] },
|
|
281
|
+
{ t: 22, s: [0] },
|
|
282
|
+
{ t: 23, s: [0] },
|
|
283
|
+
{ t: 24, s: [0] },
|
|
284
|
+
{ t: 25, s: [0] },
|
|
285
|
+
{ t: 26, s: [0] },
|
|
286
|
+
{ t: 27, s: [0] },
|
|
287
|
+
{ t: 28, s: [0] },
|
|
288
|
+
{ t: 29, s: [4.444] },
|
|
289
|
+
{ t: 30, s: [17.778] },
|
|
290
|
+
{ t: 31, s: [40] },
|
|
291
|
+
{ t: 32, s: [71.111] },
|
|
292
|
+
{ t: 33, s: [100] },
|
|
293
|
+
{ t: 34, s: [95] },
|
|
294
|
+
{ t: 35, s: [66.111] },
|
|
295
|
+
{ t: 36, s: [33.889] },
|
|
296
|
+
{ t: 37, s: [5] },
|
|
297
|
+
{ t: 38, s: [0] },
|
|
298
|
+
{ t: 39, s: [0] },
|
|
299
|
+
{ t: 40, s: [0] },
|
|
300
|
+
{ t: 41, s: [0] },
|
|
301
|
+
{ t: 42, s: [0] },
|
|
302
|
+
{ t: 43, s: [0] },
|
|
303
|
+
{ t: 44, s: [0] },
|
|
304
|
+
{ t: 45, s: [0] },
|
|
305
|
+
{ t: 46, s: [0] },
|
|
306
|
+
{ t: 47, s: [0] },
|
|
307
|
+
{ t: 48, s: [0] },
|
|
308
|
+
{ t: 49, s: [0] },
|
|
309
|
+
{ t: 50, s: [0] }
|
|
310
|
+
]
|
|
311
|
+
},
|
|
312
|
+
r: { a: 0, k: 0 },
|
|
313
|
+
p: { a: 0, k: [35, 35, 0] },
|
|
314
|
+
a: { a: 0, k: [35, 35, 0] },
|
|
315
|
+
s: { a: 0, k: [100, 100, 100] }
|
|
316
|
+
},
|
|
317
|
+
ao: 0,
|
|
318
|
+
shapes: [
|
|
319
|
+
{
|
|
320
|
+
ty: "gr",
|
|
321
|
+
nm: "Diamond",
|
|
322
|
+
it: [
|
|
323
|
+
{
|
|
324
|
+
ty: "sh",
|
|
325
|
+
nm: "Path",
|
|
326
|
+
ks: {
|
|
327
|
+
a: 0,
|
|
328
|
+
k: {
|
|
329
|
+
i: [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0]],
|
|
330
|
+
o: [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0]],
|
|
331
|
+
v: [[13.3257, 515e-7], [0, 13.2661], [13.266, 26.5321], [26.532, 13.2661], [13.3257, 515e-7]],
|
|
332
|
+
c: true
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
ty: "fl",
|
|
338
|
+
nm: "Fill",
|
|
339
|
+
c: { a: 0, k: [0, 0.1961, 0.1647, 1] },
|
|
340
|
+
o: { a: 0, k: 100 },
|
|
341
|
+
r: 1
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
ty: "tr",
|
|
345
|
+
nm: "Transform",
|
|
346
|
+
p: { a: 0, k: [21.5, 21.5] },
|
|
347
|
+
a: { a: 0, k: [0, 0] },
|
|
348
|
+
s: { a: 0, k: [100, 100] },
|
|
349
|
+
r: { a: 0, k: 0 },
|
|
350
|
+
o: { a: 0, k: 100 },
|
|
351
|
+
sk: { a: 0, k: 0 },
|
|
352
|
+
sa: { a: 0, k: 0 }
|
|
353
|
+
}
|
|
354
|
+
]
|
|
355
|
+
}
|
|
356
|
+
],
|
|
357
|
+
ip: 0,
|
|
358
|
+
op: 50,
|
|
359
|
+
st: 0,
|
|
360
|
+
bm: 0
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
ddd: 0,
|
|
364
|
+
ind: 5,
|
|
365
|
+
ty: 4,
|
|
366
|
+
nm: "Final X",
|
|
367
|
+
parent: 1,
|
|
368
|
+
ks: {
|
|
369
|
+
o: {
|
|
370
|
+
a: 1,
|
|
371
|
+
k: [
|
|
372
|
+
{ t: 0, s: [0] },
|
|
373
|
+
{ t: 17, s: [0] },
|
|
374
|
+
{ t: 20, s: [100] },
|
|
375
|
+
{ t: 29, s: [100] },
|
|
376
|
+
{ t: 44, s: [0] },
|
|
377
|
+
{ t: 50, s: [0] }
|
|
378
|
+
]
|
|
379
|
+
},
|
|
380
|
+
r: { a: 0, k: 0 },
|
|
381
|
+
p: { a: 0, k: [35, 35, 0] },
|
|
382
|
+
a: { a: 0, k: [35, 35, 0] },
|
|
383
|
+
s: { a: 0, k: [100, 100, 100] }
|
|
384
|
+
},
|
|
385
|
+
ao: 0,
|
|
386
|
+
shapes: [
|
|
387
|
+
{
|
|
388
|
+
ty: "gr",
|
|
389
|
+
nm: "Teal Arm",
|
|
390
|
+
it: [
|
|
391
|
+
{
|
|
392
|
+
ty: "sh",
|
|
393
|
+
nm: "Path",
|
|
394
|
+
ks: {
|
|
395
|
+
a: 0,
|
|
396
|
+
k: {
|
|
397
|
+
i: [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]],
|
|
398
|
+
o: [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]],
|
|
399
|
+
v: [[34.706, 48.106], [13.266, 69.546], [0, 56.28], [21.44, 34.84], [0, 13.266], [13.266, 0], [34.706, 21.574], [21.44, 34.84], [34.706, 48.106]],
|
|
400
|
+
c: true
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
ty: "fl",
|
|
406
|
+
nm: "Fill",
|
|
407
|
+
c: { a: 0, k: [0, 0.7961, 0.7529, 1] },
|
|
408
|
+
o: { a: 0, k: 100 },
|
|
409
|
+
r: 1
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
ty: "tr",
|
|
413
|
+
nm: "Transform",
|
|
414
|
+
p: { a: 0, k: [0, 0] },
|
|
415
|
+
a: { a: 0, k: [0, 0] },
|
|
416
|
+
s: { a: 0, k: [100, 100] },
|
|
417
|
+
r: { a: 0, k: 0 },
|
|
418
|
+
o: { a: 0, k: 100 },
|
|
419
|
+
sk: { a: 0, k: 0 },
|
|
420
|
+
sa: { a: 0, k: 0 }
|
|
421
|
+
}
|
|
422
|
+
]
|
|
423
|
+
},
|
|
424
|
+
{
|
|
425
|
+
ty: "gr",
|
|
426
|
+
nm: "Red Arm",
|
|
427
|
+
it: [
|
|
428
|
+
{
|
|
429
|
+
ty: "sh",
|
|
430
|
+
nm: "Path",
|
|
431
|
+
ks: {
|
|
432
|
+
a: 0,
|
|
433
|
+
k: {
|
|
434
|
+
i: [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]],
|
|
435
|
+
o: [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]],
|
|
436
|
+
v: [[69.546, 56.2801], [56.28, 69.5461], [34.706, 48.106], [47.972, 34.8401], [34.706, 21.574], [56.28, 534e-7], [69.546, 13.2661], [47.972, 34.8401], [69.546, 56.2801]],
|
|
437
|
+
c: true
|
|
438
|
+
}
|
|
439
|
+
}
|
|
440
|
+
},
|
|
441
|
+
{
|
|
442
|
+
ty: "fl",
|
|
443
|
+
nm: "Fill",
|
|
444
|
+
c: { a: 0, k: [1, 0.0941, 0.1255, 1] },
|
|
445
|
+
o: { a: 0, k: 100 },
|
|
446
|
+
r: 1
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
ty: "tr",
|
|
450
|
+
nm: "Transform",
|
|
451
|
+
p: { a: 0, k: [0, 0] },
|
|
452
|
+
a: { a: 0, k: [0, 0] },
|
|
453
|
+
s: { a: 0, k: [100, 100] },
|
|
454
|
+
r: { a: 0, k: 0 },
|
|
455
|
+
o: { a: 0, k: 100 },
|
|
456
|
+
sk: { a: 0, k: 0 },
|
|
457
|
+
sa: { a: 0, k: 0 }
|
|
458
|
+
}
|
|
459
|
+
]
|
|
460
|
+
},
|
|
461
|
+
{
|
|
462
|
+
ty: "gr",
|
|
463
|
+
nm: "Center Diamond",
|
|
464
|
+
it: [
|
|
465
|
+
{
|
|
466
|
+
ty: "sh",
|
|
467
|
+
nm: "Path",
|
|
468
|
+
ks: {
|
|
469
|
+
a: 0,
|
|
470
|
+
k: {
|
|
471
|
+
i: [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0]],
|
|
472
|
+
o: [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0]],
|
|
473
|
+
v: [[34.7656, 48.1061], [21.44, 34.84], [34.706, 21.574], [47.972, 34.8401], [34.7656, 48.1061]],
|
|
474
|
+
c: true
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
ty: "fl",
|
|
480
|
+
nm: "Fill",
|
|
481
|
+
c: { a: 0, k: [0, 0.1961, 0.1647, 1] },
|
|
482
|
+
o: { a: 0, k: 100 },
|
|
483
|
+
r: 1
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
ty: "tr",
|
|
487
|
+
nm: "Transform",
|
|
488
|
+
p: { a: 0, k: [0, 0] },
|
|
489
|
+
a: { a: 0, k: [0, 0] },
|
|
490
|
+
s: { a: 0, k: [100, 100] },
|
|
491
|
+
r: { a: 0, k: 0 },
|
|
492
|
+
o: { a: 0, k: 100 },
|
|
493
|
+
sk: { a: 0, k: 0 },
|
|
494
|
+
sa: { a: 0, k: 0 }
|
|
495
|
+
}
|
|
496
|
+
]
|
|
497
|
+
}
|
|
498
|
+
],
|
|
499
|
+
ip: 0,
|
|
500
|
+
op: 50,
|
|
501
|
+
st: 0,
|
|
502
|
+
bm: 0
|
|
503
|
+
}
|
|
504
|
+
]
|
|
505
|
+
};
|
|
506
|
+
}
|
|
507
|
+
});
|
|
508
|
+
|
|
30
509
|
// src/index.ts
|
|
31
510
|
var index_exports = {};
|
|
32
511
|
__export(index_exports, {
|
|
@@ -38,7 +517,7 @@ module.exports = __toCommonJS(index_exports);
|
|
|
38
517
|
|
|
39
518
|
// src/studio/ComergeStudio.tsx
|
|
40
519
|
var React51 = __toESM(require("react"));
|
|
41
|
-
var
|
|
520
|
+
var import_react_native61 = require("react-native");
|
|
42
521
|
var import_bottom_sheet6 = require("@gorhom/bottom-sheet");
|
|
43
522
|
var import_runtime2 = require("@comergehq/runtime");
|
|
44
523
|
|
|
@@ -2737,7 +3216,7 @@ function RuntimeRenderer({
|
|
|
2737
3216
|
|
|
2738
3217
|
// src/studio/ui/StudioOverlay.tsx
|
|
2739
3218
|
var React46 = __toESM(require("react"));
|
|
2740
|
-
var
|
|
3219
|
+
var import_react_native60 = require("react-native");
|
|
2741
3220
|
|
|
2742
3221
|
// src/components/studio-sheet/StudioBottomSheet.tsx
|
|
2743
3222
|
var React12 = __toESM(require("react"));
|
|
@@ -4640,7 +5119,7 @@ function AppCommentsSheet({ appId, onClose, onCountChange, onPlayApp }) {
|
|
|
4640
5119
|
|
|
4641
5120
|
// src/studio/ui/PreviewPanel.tsx
|
|
4642
5121
|
var React36 = __toESM(require("react"));
|
|
4643
|
-
var
|
|
5122
|
+
var import_react_native46 = require("react-native");
|
|
4644
5123
|
|
|
4645
5124
|
// src/components/preview/PreviewPage.tsx
|
|
4646
5125
|
var import_react_native24 = require("react-native");
|
|
@@ -4669,8 +5148,7 @@ function PreviewPage({ header, children, contentStyle }) {
|
|
|
4669
5148
|
}
|
|
4670
5149
|
|
|
4671
5150
|
// src/studio/ui/preview-panel/PreviewPanelHeader.tsx
|
|
4672
|
-
var
|
|
4673
|
-
var import_react_native30 = require("react-native");
|
|
5151
|
+
var import_react_native27 = require("react-native");
|
|
4674
5152
|
|
|
4675
5153
|
// src/components/studio-sheet/StudioSheetHeader.tsx
|
|
4676
5154
|
var import_react_native25 = require("react-native");
|
|
@@ -4789,12 +5267,56 @@ function StudioSheetHeaderIconButton({
|
|
|
4789
5267
|
) });
|
|
4790
5268
|
}
|
|
4791
5269
|
|
|
4792
|
-
// src/
|
|
4793
|
-
var
|
|
5270
|
+
// src/studio/ui/preview-panel/PreviewPanelHeader.tsx
|
|
5271
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
|
5272
|
+
function PreviewPanelHeader({
|
|
5273
|
+
isOwner,
|
|
5274
|
+
isPublic,
|
|
5275
|
+
onClose,
|
|
5276
|
+
onNavigateHome,
|
|
5277
|
+
onGoToChat,
|
|
5278
|
+
onShare
|
|
5279
|
+
}) {
|
|
5280
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
5281
|
+
StudioSheetHeader,
|
|
5282
|
+
{
|
|
5283
|
+
left: onNavigateHome ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StudioSheetHeaderIconButton, { onPress: onNavigateHome, accessibilityLabel: "Home", appearance: "glass", intent: "primary", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(IconHome, { size: 20, colorToken: "onPrimary" }) }) : null,
|
|
5284
|
+
center: null,
|
|
5285
|
+
right: /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(import_react_native27.View, { style: { flexDirection: "row", alignItems: "center" }, children: [
|
|
5286
|
+
isOwner ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
5287
|
+
StudioSheetHeaderIconButton,
|
|
5288
|
+
{
|
|
5289
|
+
onPress: onGoToChat,
|
|
5290
|
+
accessibilityLabel: "Chat",
|
|
5291
|
+
intent: "primary",
|
|
5292
|
+
appearance: "glass",
|
|
5293
|
+
style: { marginRight: 8 },
|
|
5294
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(IconChat, { size: 20, colorToken: "onPrimary" })
|
|
5295
|
+
}
|
|
5296
|
+
) : null,
|
|
5297
|
+
isPublic && onShare ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
|
5298
|
+
StudioSheetHeaderIconButton,
|
|
5299
|
+
{
|
|
5300
|
+
onPress: onShare,
|
|
5301
|
+
accessibilityLabel: "Share",
|
|
5302
|
+
intent: "primary",
|
|
5303
|
+
appearance: "glass",
|
|
5304
|
+
style: { marginRight: 8 },
|
|
5305
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(IconShare, { size: 20, colorToken: "onPrimary" })
|
|
5306
|
+
}
|
|
5307
|
+
) : null,
|
|
5308
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(StudioSheetHeaderIconButton, { onPress: onClose, accessibilityLabel: "Close", appearance: "glass", intent: "primary", children: /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(IconClose, { size: 20, colorToken: "onPrimary" }) })
|
|
5309
|
+
] })
|
|
5310
|
+
}
|
|
5311
|
+
);
|
|
5312
|
+
}
|
|
5313
|
+
|
|
5314
|
+
// src/components/preview/PreviewHeroCard.tsx
|
|
5315
|
+
var import_react_native29 = require("react-native");
|
|
4794
5316
|
|
|
4795
5317
|
// src/components/primitives/Surface.tsx
|
|
4796
|
-
var
|
|
4797
|
-
var
|
|
5318
|
+
var import_react_native28 = require("react-native");
|
|
5319
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
|
4798
5320
|
function backgroundFor(variant, theme) {
|
|
4799
5321
|
const { colors } = theme;
|
|
4800
5322
|
switch (variant) {
|
|
@@ -4811,8 +5333,8 @@ function backgroundFor(variant, theme) {
|
|
|
4811
5333
|
}
|
|
4812
5334
|
function Surface({ variant = "surface", border = false, style, ...props }) {
|
|
4813
5335
|
const theme = useTheme();
|
|
4814
|
-
return /* @__PURE__ */ (0,
|
|
4815
|
-
|
|
5336
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(
|
|
5337
|
+
import_react_native28.View,
|
|
4816
5338
|
{
|
|
4817
5339
|
...props,
|
|
4818
5340
|
style: [
|
|
@@ -4825,12 +5347,12 @@ function Surface({ variant = "surface", border = false, style, ...props }) {
|
|
|
4825
5347
|
}
|
|
4826
5348
|
|
|
4827
5349
|
// src/components/primitives/Card.tsx
|
|
4828
|
-
var
|
|
5350
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
|
4829
5351
|
function Card({ variant = "surface", padded = true, border = true, style, ...props }) {
|
|
4830
5352
|
const theme = useTheme();
|
|
4831
5353
|
const radius = theme.radii.lg;
|
|
4832
5354
|
const padding = padded ? theme.spacing.lg : 0;
|
|
4833
|
-
return /* @__PURE__ */ (0,
|
|
5355
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
4834
5356
|
Surface,
|
|
4835
5357
|
{
|
|
4836
5358
|
...props,
|
|
@@ -4841,325 +5363,59 @@ function Card({ variant = "surface", padded = true, border = true, style, ...pro
|
|
|
4841
5363
|
);
|
|
4842
5364
|
}
|
|
4843
5365
|
|
|
4844
|
-
// src/components/
|
|
4845
|
-
var
|
|
4846
|
-
function
|
|
4847
|
-
|
|
4848
|
-
|
|
4849
|
-
|
|
4850
|
-
|
|
4851
|
-
|
|
5366
|
+
// src/components/preview/PreviewHeroCard.tsx
|
|
5367
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
5368
|
+
function PreviewHeroCard({
|
|
5369
|
+
aspectRatio = 4 / 3,
|
|
5370
|
+
overlayTopLeft,
|
|
5371
|
+
background,
|
|
5372
|
+
image,
|
|
5373
|
+
overlayBottom,
|
|
5374
|
+
style
|
|
4852
5375
|
}) {
|
|
4853
5376
|
const theme = useTheme();
|
|
4854
|
-
|
|
4855
|
-
|
|
5377
|
+
const radius = 16;
|
|
5378
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
|
5379
|
+
Card,
|
|
4856
5380
|
{
|
|
4857
|
-
|
|
4858
|
-
|
|
4859
|
-
|
|
4860
|
-
|
|
4861
|
-
|
|
4862
|
-
|
|
4863
|
-
|
|
4864
|
-
|
|
4865
|
-
|
|
4866
|
-
|
|
4867
|
-
|
|
4868
|
-
|
|
4869
|
-
|
|
4870
|
-
/* @__PURE__ */ (0,
|
|
5381
|
+
variant: "surfaceRaised",
|
|
5382
|
+
padded: false,
|
|
5383
|
+
border: false,
|
|
5384
|
+
style: [
|
|
5385
|
+
{
|
|
5386
|
+
width: "100%",
|
|
5387
|
+
aspectRatio,
|
|
5388
|
+
borderRadius: radius,
|
|
5389
|
+
overflow: "hidden"
|
|
5390
|
+
},
|
|
5391
|
+
style
|
|
5392
|
+
],
|
|
5393
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_react_native29.View, { style: { flex: 1 }, children: [
|
|
5394
|
+
background ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_native29.View, { style: { position: "absolute", inset: 0 }, children: background }) : null,
|
|
5395
|
+
image ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_native29.View, { style: { position: "absolute", inset: 0 }, children: image }) : null,
|
|
5396
|
+
overlayTopLeft ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_native29.View, { style: { position: "absolute", top: theme.spacing.sm, left: theme.spacing.sm, zIndex: 2 }, children: overlayTopLeft }) : null,
|
|
5397
|
+
overlayBottom ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react_native29.View, { style: { flex: 1, justifyContent: "flex-end" }, children: overlayBottom }) : null
|
|
4871
5398
|
] })
|
|
4872
5399
|
}
|
|
4873
5400
|
);
|
|
4874
5401
|
}
|
|
4875
5402
|
|
|
4876
|
-
// src/components/preview/
|
|
4877
|
-
var
|
|
4878
|
-
var
|
|
4879
|
-
|
|
4880
|
-
// src/data/apps/types.ts
|
|
4881
|
-
var APP_STATUS_LABEL = {
|
|
4882
|
-
ready: "Ready",
|
|
4883
|
-
creating: "Creating",
|
|
4884
|
-
editing: "Editing",
|
|
4885
|
-
forking: "Forking",
|
|
4886
|
-
merging: "Merging",
|
|
4887
|
-
error: "Error",
|
|
4888
|
-
archived: "Archived"
|
|
4889
|
-
};
|
|
4890
|
-
|
|
4891
|
-
// src/components/preview/PreviewStatusBadge.tsx
|
|
4892
|
-
var import_jsx_runtime27 = require("react/jsx-runtime");
|
|
4893
|
-
var STATUS_BG = {
|
|
4894
|
-
ready: "#10B981",
|
|
4895
|
-
// emerald-500
|
|
4896
|
-
creating: "#3B82F6",
|
|
4897
|
-
// blue-500
|
|
4898
|
-
editing: "#F59E0B",
|
|
4899
|
-
// amber-500
|
|
4900
|
-
forking: "#00CBC0",
|
|
4901
|
-
// brand teal
|
|
4902
|
-
merging: "#06B6D4",
|
|
4903
|
-
// cyan-500
|
|
4904
|
-
error: "#F43F5E",
|
|
4905
|
-
// rose-500
|
|
4906
|
-
archived: "#71717A"
|
|
4907
|
-
// zinc-500
|
|
4908
|
-
};
|
|
4909
|
-
var STATUS_ICON = {
|
|
4910
|
-
ready: import_lucide_react_native5.CheckCircle2,
|
|
4911
|
-
creating: import_lucide_react_native5.Sparkles,
|
|
4912
|
-
editing: import_lucide_react_native5.Pencil,
|
|
4913
|
-
forking: import_lucide_react_native5.GitFork,
|
|
4914
|
-
merging: import_lucide_react_native5.GitMerge,
|
|
4915
|
-
error: import_lucide_react_native5.AlertTriangle,
|
|
4916
|
-
archived: import_lucide_react_native5.Archive
|
|
4917
|
-
};
|
|
4918
|
-
function PreviewStatusBadge({ status }) {
|
|
4919
|
-
const IconComp = STATUS_ICON[status];
|
|
4920
|
-
const label = APP_STATUS_LABEL[status] ?? status;
|
|
4921
|
-
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(
|
|
4922
|
-
import_react_native29.View,
|
|
4923
|
-
{
|
|
4924
|
-
style: {
|
|
4925
|
-
flexDirection: "row",
|
|
4926
|
-
alignItems: "center",
|
|
4927
|
-
borderRadius: 999,
|
|
4928
|
-
paddingHorizontal: 10,
|
|
4929
|
-
paddingVertical: 4,
|
|
4930
|
-
backgroundColor: STATUS_BG[status]
|
|
4931
|
-
},
|
|
4932
|
-
children: [
|
|
4933
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(IconComp, { size: 12, color: "#FFFFFF", style: { marginRight: 4 } }),
|
|
4934
|
-
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(Text, { style: { color: "#FFFFFF", fontSize: 11, lineHeight: 14 }, children: label })
|
|
4935
|
-
]
|
|
4936
|
-
}
|
|
4937
|
-
);
|
|
4938
|
-
}
|
|
4939
|
-
|
|
4940
|
-
// src/studio/ui/preview-panel/PreviewPanelHeader.tsx
|
|
5403
|
+
// src/components/preview/PreviewPlaceholder.tsx
|
|
5404
|
+
var React26 = __toESM(require("react"));
|
|
5405
|
+
var import_react_native30 = require("react-native");
|
|
5406
|
+
var import_expo_linear_gradient2 = require("expo-linear-gradient");
|
|
4941
5407
|
var import_jsx_runtime28 = require("react/jsx-runtime");
|
|
4942
|
-
function PreviewPanelHeader({
|
|
4943
|
-
isOwner,
|
|
4944
|
-
isPublic,
|
|
4945
|
-
onClose,
|
|
4946
|
-
onNavigateHome,
|
|
4947
|
-
onGoToChat,
|
|
4948
|
-
onShare,
|
|
4949
|
-
relatedApps,
|
|
4950
|
-
relatedAppsLoading,
|
|
4951
|
-
switchingRelatedAppId,
|
|
4952
|
-
onOpenRelatedApps,
|
|
4953
|
-
onSwitchRelatedApp
|
|
4954
|
-
}) {
|
|
4955
|
-
var _a;
|
|
4956
|
-
const theme = useTheme();
|
|
4957
|
-
const [relatedAppsOpen, setRelatedAppsOpen] = React26.useState(false);
|
|
4958
|
-
const relatedAppItems = React26.useMemo(() => {
|
|
4959
|
-
if (!relatedApps) return [];
|
|
4960
|
-
const items = [];
|
|
4961
|
-
if (relatedApps.original) {
|
|
4962
|
-
items.push({ app: relatedApps.original, section: "original" });
|
|
4963
|
-
}
|
|
4964
|
-
for (const remix of relatedApps.remixes) {
|
|
4965
|
-
items.push({ app: remix, section: "remix" });
|
|
4966
|
-
}
|
|
4967
|
-
return items;
|
|
4968
|
-
}, [relatedApps]);
|
|
4969
|
-
const uniqueRelatedCount = React26.useMemo(() => {
|
|
4970
|
-
return new Set(relatedAppItems.map((item) => item.app.id)).size;
|
|
4971
|
-
}, [relatedAppItems]);
|
|
4972
|
-
const shouldShowRelatedApps = uniqueRelatedCount >= 2;
|
|
4973
|
-
const currentAppId = relatedApps == null ? void 0 : relatedApps.current.id;
|
|
4974
|
-
const originalAppId = ((_a = relatedApps == null ? void 0 : relatedApps.original) == null ? void 0 : _a.id) ?? null;
|
|
4975
|
-
const sectionedRelatedApps = React26.useMemo(() => {
|
|
4976
|
-
const original = [];
|
|
4977
|
-
const remixes = [];
|
|
4978
|
-
const seenIds = /* @__PURE__ */ new Set();
|
|
4979
|
-
for (const item of relatedAppItems) {
|
|
4980
|
-
if (seenIds.has(item.app.id)) continue;
|
|
4981
|
-
seenIds.add(item.app.id);
|
|
4982
|
-
if (item.section === "original") {
|
|
4983
|
-
original.push(item);
|
|
4984
|
-
} else {
|
|
4985
|
-
remixes.push(item);
|
|
4986
|
-
}
|
|
4987
|
-
}
|
|
4988
|
-
return { original, remixes };
|
|
4989
|
-
}, [relatedAppItems]);
|
|
4990
|
-
const openRelatedApps = React26.useCallback(() => {
|
|
4991
|
-
setRelatedAppsOpen(true);
|
|
4992
|
-
onOpenRelatedApps == null ? void 0 : onOpenRelatedApps();
|
|
4993
|
-
}, [onOpenRelatedApps]);
|
|
4994
|
-
const closeRelatedApps = React26.useCallback(() => {
|
|
4995
|
-
setRelatedAppsOpen(false);
|
|
4996
|
-
}, []);
|
|
4997
|
-
const handleSelectRelatedApp = React26.useCallback(
|
|
4998
|
-
(targetAppId) => {
|
|
4999
|
-
if (!relatedApps) return;
|
|
5000
|
-
if (targetAppId === relatedApps.current.id) return;
|
|
5001
|
-
onSwitchRelatedApp == null ? void 0 : onSwitchRelatedApp(targetAppId);
|
|
5002
|
-
setRelatedAppsOpen(false);
|
|
5003
|
-
},
|
|
5004
|
-
[onSwitchRelatedApp, relatedApps]
|
|
5005
|
-
);
|
|
5006
|
-
const renderRelatedRow = React26.useCallback(
|
|
5007
|
-
(item) => {
|
|
5008
|
-
const app = item.app;
|
|
5009
|
-
const isCurrent = app.id === currentAppId;
|
|
5010
|
-
const isOriginal = app.id === originalAppId;
|
|
5011
|
-
const isReady = app.status === "ready";
|
|
5012
|
-
const isSwitching = switchingRelatedAppId === app.id;
|
|
5013
|
-
const disabled = isCurrent || !isReady || Boolean(switchingRelatedAppId);
|
|
5014
|
-
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5015
|
-
import_react_native30.Pressable,
|
|
5016
|
-
{
|
|
5017
|
-
accessibilityRole: "button",
|
|
5018
|
-
accessibilityLabel: `Switch to ${app.name}`,
|
|
5019
|
-
disabled,
|
|
5020
|
-
onPress: () => handleSelectRelatedApp(app.id),
|
|
5021
|
-
style: {
|
|
5022
|
-
borderRadius: theme.radii.md,
|
|
5023
|
-
borderWidth: 1,
|
|
5024
|
-
borderColor: theme.colors.border,
|
|
5025
|
-
backgroundColor: theme.colors.surface,
|
|
5026
|
-
paddingHorizontal: theme.spacing.md,
|
|
5027
|
-
paddingVertical: theme.spacing.sm,
|
|
5028
|
-
marginBottom: theme.spacing.sm,
|
|
5029
|
-
opacity: disabled ? 0.6 : 1
|
|
5030
|
-
},
|
|
5031
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_react_native30.View, { style: { flexDirection: "row", alignItems: "center", justifyContent: "space-between", gap: 8 }, children: [
|
|
5032
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_react_native30.View, { style: { flex: 1, paddingRight: 8 }, children: [
|
|
5033
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { numberOfLines: 1, style: { color: theme.colors.text, fontWeight: theme.typography.fontWeight.semibold }, children: app.name }),
|
|
5034
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_native30.View, { style: { height: 4 } }),
|
|
5035
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_react_native30.View, { style: { flexDirection: "row", alignItems: "center", flexWrap: "wrap", gap: 6 }, children: [
|
|
5036
|
-
isOriginal ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_native30.View, { style: { borderRadius: 999, paddingHorizontal: 8, paddingVertical: 2, backgroundColor: theme.colors.neutral }, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { style: { color: theme.colors.textMuted, fontSize: 11 }, children: "Original" }) }) : null,
|
|
5037
|
-
isCurrent ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_native30.View, { style: { borderRadius: 999, paddingHorizontal: 8, paddingVertical: 2, backgroundColor: theme.colors.primary }, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { style: { color: theme.colors.onPrimary, fontSize: 11 }, children: "Current" }) }) : null
|
|
5038
|
-
] })
|
|
5039
|
-
] }),
|
|
5040
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_react_native30.View, { style: { alignItems: "flex-end", gap: 8 }, children: [
|
|
5041
|
-
app.status ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(PreviewStatusBadge, { status: app.status }) : null,
|
|
5042
|
-
isSwitching ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_native30.ActivityIndicator, { size: "small", color: theme.colors.primary }) : null
|
|
5043
|
-
] })
|
|
5044
|
-
] })
|
|
5045
|
-
},
|
|
5046
|
-
app.id
|
|
5047
|
-
);
|
|
5048
|
-
},
|
|
5049
|
-
[currentAppId, handleSelectRelatedApp, originalAppId, switchingRelatedAppId, theme]
|
|
5050
|
-
);
|
|
5051
|
-
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
|
|
5052
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5053
|
-
StudioSheetHeader,
|
|
5054
|
-
{
|
|
5055
|
-
left: onNavigateHome ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(StudioSheetHeaderIconButton, { onPress: onNavigateHome, accessibilityLabel: "Home", appearance: "glass", intent: "primary", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(IconHome, { size: 20, colorToken: "onPrimary" }) }) : null,
|
|
5056
|
-
center: null,
|
|
5057
|
-
right: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_react_native30.View, { style: { flexDirection: "row", alignItems: "center" }, children: [
|
|
5058
|
-
isOwner ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5059
|
-
StudioSheetHeaderIconButton,
|
|
5060
|
-
{
|
|
5061
|
-
onPress: onGoToChat,
|
|
5062
|
-
accessibilityLabel: "Chat",
|
|
5063
|
-
intent: "primary",
|
|
5064
|
-
appearance: "glass",
|
|
5065
|
-
style: { marginRight: 8 },
|
|
5066
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(IconChat, { size: 20, colorToken: "onPrimary" })
|
|
5067
|
-
}
|
|
5068
|
-
) : null,
|
|
5069
|
-
isPublic && onShare ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5070
|
-
StudioSheetHeaderIconButton,
|
|
5071
|
-
{
|
|
5072
|
-
onPress: onShare,
|
|
5073
|
-
accessibilityLabel: "Share",
|
|
5074
|
-
intent: "primary",
|
|
5075
|
-
appearance: "glass",
|
|
5076
|
-
style: { marginRight: 8 },
|
|
5077
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(IconShare, { size: 20, colorToken: "onPrimary" })
|
|
5078
|
-
}
|
|
5079
|
-
) : null,
|
|
5080
|
-
shouldShowRelatedApps ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5081
|
-
StudioSheetHeaderIconButton,
|
|
5082
|
-
{
|
|
5083
|
-
onPress: openRelatedApps,
|
|
5084
|
-
accessibilityLabel: "Related apps",
|
|
5085
|
-
intent: "primary",
|
|
5086
|
-
appearance: "glass",
|
|
5087
|
-
style: { marginRight: 8 },
|
|
5088
|
-
children: relatedAppsLoading ? /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_native30.ActivityIndicator, { size: "small", color: theme.colors.onPrimary }) : /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(IconChevronDown, { size: 20, colorToken: "onPrimary" })
|
|
5089
|
-
}
|
|
5090
|
-
) : null,
|
|
5091
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(StudioSheetHeaderIconButton, { onPress: onClose, accessibilityLabel: "Close", appearance: "glass", intent: "primary", children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(IconClose, { size: 20, colorToken: "onPrimary" }) })
|
|
5092
|
-
] })
|
|
5093
|
-
}
|
|
5094
|
-
),
|
|
5095
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Modal, { visible: relatedAppsOpen, onRequestClose: closeRelatedApps, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_react_native30.View, { style: { gap: theme.spacing.sm }, children: [
|
|
5096
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { style: { color: theme.colors.text, fontSize: 18, fontWeight: theme.typography.fontWeight.semibold }, children: "Related apps" }),
|
|
5097
|
-
sectionedRelatedApps.original.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_react_native30.View, { children: [
|
|
5098
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { style: { color: theme.colors.textMuted, marginBottom: theme.spacing.xs }, children: "Original" }),
|
|
5099
|
-
sectionedRelatedApps.original.map(renderRelatedRow)
|
|
5100
|
-
] }) : null,
|
|
5101
|
-
sectionedRelatedApps.remixes.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_react_native30.View, { children: [
|
|
5102
|
-
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(Text, { style: { color: theme.colors.textMuted, marginBottom: theme.spacing.xs }, children: "Remixes" }),
|
|
5103
|
-
sectionedRelatedApps.remixes.map(renderRelatedRow)
|
|
5104
|
-
] }) : null
|
|
5105
|
-
] }) })
|
|
5106
|
-
] });
|
|
5107
|
-
}
|
|
5108
|
-
|
|
5109
|
-
// src/components/preview/PreviewHeroCard.tsx
|
|
5110
|
-
var import_react_native31 = require("react-native");
|
|
5111
|
-
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
5112
|
-
function PreviewHeroCard({
|
|
5113
|
-
aspectRatio = 4 / 3,
|
|
5114
|
-
overlayTopLeft,
|
|
5115
|
-
background,
|
|
5116
|
-
image,
|
|
5117
|
-
overlayBottom,
|
|
5118
|
-
style
|
|
5119
|
-
}) {
|
|
5120
|
-
const theme = useTheme();
|
|
5121
|
-
const radius = 16;
|
|
5122
|
-
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5123
|
-
Card,
|
|
5124
|
-
{
|
|
5125
|
-
variant: "surfaceRaised",
|
|
5126
|
-
padded: false,
|
|
5127
|
-
border: false,
|
|
5128
|
-
style: [
|
|
5129
|
-
{
|
|
5130
|
-
width: "100%",
|
|
5131
|
-
aspectRatio,
|
|
5132
|
-
borderRadius: radius,
|
|
5133
|
-
overflow: "hidden"
|
|
5134
|
-
},
|
|
5135
|
-
style
|
|
5136
|
-
],
|
|
5137
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_react_native31.View, { style: { flex: 1 }, children: [
|
|
5138
|
-
background ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native31.View, { style: { position: "absolute", inset: 0 }, children: background }) : null,
|
|
5139
|
-
image ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native31.View, { style: { position: "absolute", inset: 0 }, children: image }) : null,
|
|
5140
|
-
overlayTopLeft ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native31.View, { style: { position: "absolute", top: theme.spacing.sm, left: theme.spacing.sm, zIndex: 2 }, children: overlayTopLeft }) : null,
|
|
5141
|
-
overlayBottom ? /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react_native31.View, { style: { flex: 1, justifyContent: "flex-end" }, children: overlayBottom }) : null
|
|
5142
|
-
] })
|
|
5143
|
-
}
|
|
5144
|
-
);
|
|
5145
|
-
}
|
|
5146
|
-
|
|
5147
|
-
// src/components/preview/PreviewPlaceholder.tsx
|
|
5148
|
-
var React27 = __toESM(require("react"));
|
|
5149
|
-
var import_react_native32 = require("react-native");
|
|
5150
|
-
var import_expo_linear_gradient2 = require("expo-linear-gradient");
|
|
5151
|
-
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
5152
5408
|
function PreviewPlaceholder({ visible, style }) {
|
|
5153
5409
|
if (!visible) return null;
|
|
5154
|
-
const opacityAnim =
|
|
5155
|
-
|
|
5410
|
+
const opacityAnim = React26.useRef(new import_react_native30.Animated.Value(0)).current;
|
|
5411
|
+
React26.useEffect(() => {
|
|
5156
5412
|
if (!visible) return;
|
|
5157
|
-
const animation =
|
|
5158
|
-
|
|
5159
|
-
|
|
5160
|
-
|
|
5161
|
-
|
|
5162
|
-
|
|
5413
|
+
const animation = import_react_native30.Animated.loop(
|
|
5414
|
+
import_react_native30.Animated.sequence([
|
|
5415
|
+
import_react_native30.Animated.timing(opacityAnim, { toValue: 1, duration: 1500, useNativeDriver: true }),
|
|
5416
|
+
import_react_native30.Animated.timing(opacityAnim, { toValue: 2, duration: 1500, useNativeDriver: true }),
|
|
5417
|
+
import_react_native30.Animated.timing(opacityAnim, { toValue: 3, duration: 1500, useNativeDriver: true }),
|
|
5418
|
+
import_react_native30.Animated.timing(opacityAnim, { toValue: 0, duration: 1500, useNativeDriver: true })
|
|
5163
5419
|
])
|
|
5164
5420
|
);
|
|
5165
5421
|
animation.start();
|
|
@@ -5169,8 +5425,8 @@ function PreviewPlaceholder({ visible, style }) {
|
|
|
5169
5425
|
const opacity2 = opacityAnim.interpolate({ inputRange: [0, 1, 2, 3], outputRange: [0, 1, 0, 0] });
|
|
5170
5426
|
const opacity3 = opacityAnim.interpolate({ inputRange: [0, 1, 2, 3], outputRange: [0, 0, 1, 0] });
|
|
5171
5427
|
const opacity4 = opacityAnim.interpolate({ inputRange: [0, 1, 2, 3], outputRange: [0, 0, 0, 1] });
|
|
5172
|
-
return /* @__PURE__ */ (0,
|
|
5173
|
-
/* @__PURE__ */ (0,
|
|
5428
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_jsx_runtime28.Fragment, { children: [
|
|
5429
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_native30.Animated.View, { style: [{ position: "absolute", inset: 0, opacity: opacity1 }, style], children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5174
5430
|
import_expo_linear_gradient2.LinearGradient,
|
|
5175
5431
|
{
|
|
5176
5432
|
colors: ["rgba(98, 0, 238, 0.45)", "rgba(168, 85, 247, 0.35)"],
|
|
@@ -5179,7 +5435,7 @@ function PreviewPlaceholder({ visible, style }) {
|
|
|
5179
5435
|
style: { width: "100%", height: "100%" }
|
|
5180
5436
|
}
|
|
5181
5437
|
) }),
|
|
5182
|
-
/* @__PURE__ */ (0,
|
|
5438
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_native30.Animated.View, { style: [{ position: "absolute", inset: 0, opacity: opacity2 }, style], children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5183
5439
|
import_expo_linear_gradient2.LinearGradient,
|
|
5184
5440
|
{
|
|
5185
5441
|
colors: ["rgba(168, 85, 247, 0.45)", "rgba(139, 92, 246, 0.35)"],
|
|
@@ -5188,7 +5444,7 @@ function PreviewPlaceholder({ visible, style }) {
|
|
|
5188
5444
|
style: { width: "100%", height: "100%" }
|
|
5189
5445
|
}
|
|
5190
5446
|
) }),
|
|
5191
|
-
/* @__PURE__ */ (0,
|
|
5447
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_native30.Animated.View, { style: [{ position: "absolute", inset: 0, opacity: opacity3 }, style], children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5192
5448
|
import_expo_linear_gradient2.LinearGradient,
|
|
5193
5449
|
{
|
|
5194
5450
|
colors: ["rgba(139, 92, 246, 0.45)", "rgba(126, 34, 206, 0.35)"],
|
|
@@ -5197,7 +5453,7 @@ function PreviewPlaceholder({ visible, style }) {
|
|
|
5197
5453
|
style: { width: "100%", height: "100%" }
|
|
5198
5454
|
}
|
|
5199
5455
|
) }),
|
|
5200
|
-
/* @__PURE__ */ (0,
|
|
5456
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react_native30.Animated.View, { style: [{ position: "absolute", inset: 0, opacity: opacity4 }, style], children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
|
5201
5457
|
import_expo_linear_gradient2.LinearGradient,
|
|
5202
5458
|
{
|
|
5203
5459
|
colors: ["rgba(126, 34, 206, 0.45)", "rgba(98, 0, 238, 0.35)"],
|
|
@@ -5210,12 +5466,12 @@ function PreviewPlaceholder({ visible, style }) {
|
|
|
5210
5466
|
}
|
|
5211
5467
|
|
|
5212
5468
|
// src/components/preview/PreviewImage.tsx
|
|
5213
|
-
var
|
|
5214
|
-
var
|
|
5469
|
+
var import_react_native31 = require("react-native");
|
|
5470
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
|
5215
5471
|
function PreviewImage({ uri, onLoad, style }) {
|
|
5216
5472
|
if (!uri) return null;
|
|
5217
|
-
return /* @__PURE__ */ (0,
|
|
5218
|
-
|
|
5473
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsx)(
|
|
5474
|
+
import_react_native31.Image,
|
|
5219
5475
|
{
|
|
5220
5476
|
source: { uri },
|
|
5221
5477
|
resizeMode: "cover",
|
|
@@ -5226,15 +5482,15 @@ function PreviewImage({ uri, onLoad, style }) {
|
|
|
5226
5482
|
}
|
|
5227
5483
|
|
|
5228
5484
|
// src/components/preview/StatsBar.tsx
|
|
5229
|
-
var
|
|
5485
|
+
var import_react_native32 = require("react-native");
|
|
5230
5486
|
var import_liquid_glass7 = require("@callstack/liquid-glass");
|
|
5231
|
-
var
|
|
5487
|
+
var import_lucide_react_native5 = require("lucide-react-native");
|
|
5232
5488
|
|
|
5233
5489
|
// src/components/icons/MergeIcon.tsx
|
|
5234
5490
|
var import_react_native_svg2 = __toESM(require("react-native-svg"));
|
|
5235
|
-
var
|
|
5491
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
|
5236
5492
|
function MergeIcon({ color = "currentColor", width = 24, height = 24, ...props }) {
|
|
5237
|
-
return /* @__PURE__ */ (0,
|
|
5493
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_react_native_svg2.default, { viewBox: "0 0 486 486", width, height, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(
|
|
5238
5494
|
import_react_native_svg2.Path,
|
|
5239
5495
|
{
|
|
5240
5496
|
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",
|
|
@@ -5244,7 +5500,7 @@ function MergeIcon({ color = "currentColor", width = 24, height = 24, ...props }
|
|
|
5244
5500
|
}
|
|
5245
5501
|
|
|
5246
5502
|
// src/components/preview/StatsBar.tsx
|
|
5247
|
-
var
|
|
5503
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
|
5248
5504
|
function StatsBar({
|
|
5249
5505
|
likeCount,
|
|
5250
5506
|
commentCount,
|
|
@@ -5258,15 +5514,15 @@ function StatsBar({
|
|
|
5258
5514
|
}) {
|
|
5259
5515
|
const theme = useTheme();
|
|
5260
5516
|
const statsBgColor = theme.scheme === "dark" ? "rgba(24, 24, 27, 0.5)" : "rgba(255, 255, 255, 0.5)";
|
|
5261
|
-
return /* @__PURE__ */ (0,
|
|
5262
|
-
|
|
5517
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5518
|
+
import_react_native32.View,
|
|
5263
5519
|
{
|
|
5264
5520
|
style: [
|
|
5265
5521
|
{ position: "absolute", bottom: 12, width: "100%", paddingHorizontal: 12 },
|
|
5266
5522
|
centered && { alignItems: "center" },
|
|
5267
5523
|
style
|
|
5268
5524
|
],
|
|
5269
|
-
children: /* @__PURE__ */ (0,
|
|
5525
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5270
5526
|
ResettableLiquidGlassView,
|
|
5271
5527
|
{
|
|
5272
5528
|
style: [
|
|
@@ -5275,17 +5531,17 @@ function StatsBar({
|
|
|
5275
5531
|
!import_liquid_glass7.isLiquidGlassSupported && { backgroundColor: statsBgColor }
|
|
5276
5532
|
],
|
|
5277
5533
|
effect: "clear",
|
|
5278
|
-
children: /* @__PURE__ */ (0,
|
|
5279
|
-
/* @__PURE__ */ (0,
|
|
5280
|
-
|
|
5534
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react_native32.View, { style: { flexDirection: "row", alignItems: "center", justifyContent: "space-between", paddingHorizontal: 16 }, children: [
|
|
5535
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5536
|
+
import_react_native32.Pressable,
|
|
5281
5537
|
{
|
|
5282
5538
|
disabled: !onPressLike,
|
|
5283
5539
|
onPress: onPressLike,
|
|
5284
5540
|
hitSlop: 8,
|
|
5285
5541
|
style: { paddingVertical: 8 },
|
|
5286
|
-
children: /* @__PURE__ */ (0,
|
|
5287
|
-
/* @__PURE__ */ (0,
|
|
5288
|
-
|
|
5542
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react_native32.View, { style: { flexDirection: "row", alignItems: "center" }, children: [
|
|
5543
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5544
|
+
import_lucide_react_native5.Heart,
|
|
5289
5545
|
{
|
|
5290
5546
|
size: 16,
|
|
5291
5547
|
strokeWidth: 2.5,
|
|
@@ -5293,8 +5549,8 @@ function StatsBar({
|
|
|
5293
5549
|
fill: isLiked ? theme.colors.danger : "transparent"
|
|
5294
5550
|
}
|
|
5295
5551
|
),
|
|
5296
|
-
/* @__PURE__ */ (0,
|
|
5297
|
-
/* @__PURE__ */ (0,
|
|
5552
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_native32.View, { style: { width: 4 } }),
|
|
5553
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5298
5554
|
Text,
|
|
5299
5555
|
{
|
|
5300
5556
|
variant: "caption",
|
|
@@ -5308,72 +5564,415 @@ function StatsBar({
|
|
|
5308
5564
|
] })
|
|
5309
5565
|
}
|
|
5310
5566
|
),
|
|
5311
|
-
/* @__PURE__ */ (0,
|
|
5312
|
-
|
|
5567
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
|
5568
|
+
import_react_native32.Pressable,
|
|
5313
5569
|
{
|
|
5314
5570
|
disabled: !onPressComments,
|
|
5315
5571
|
onPress: onPressComments,
|
|
5316
5572
|
hitSlop: 8,
|
|
5317
5573
|
style: { paddingVertical: 8 },
|
|
5318
|
-
children: /* @__PURE__ */ (0,
|
|
5319
|
-
/* @__PURE__ */ (0,
|
|
5320
|
-
/* @__PURE__ */ (0,
|
|
5321
|
-
/* @__PURE__ */ (0,
|
|
5574
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react_native32.View, { style: { flexDirection: "row", alignItems: "center" }, children: [
|
|
5575
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_lucide_react_native5.MessageCircle, { size: 16, strokeWidth: 2.5, color: "#FFFFFF" }),
|
|
5576
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_native32.View, { style: { width: 4 } }),
|
|
5577
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { variant: "caption", style: { color: "#FFFFFF", fontWeight: theme.typography.fontWeight.bold }, children: commentCount })
|
|
5322
5578
|
] })
|
|
5323
5579
|
}
|
|
5324
5580
|
),
|
|
5325
|
-
/* @__PURE__ */ (0,
|
|
5326
|
-
/* @__PURE__ */ (0,
|
|
5327
|
-
/* @__PURE__ */ (0,
|
|
5328
|
-
/* @__PURE__ */ (0,
|
|
5581
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react_native32.View, { style: { flexDirection: "row", alignItems: "center", paddingVertical: 8 }, children: [
|
|
5582
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_native32.View, { style: { transform: [{ scaleY: -1 }] }, children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(MergeIcon, { width: 14, height: 14, color: "#FFFFFF" }) }),
|
|
5583
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react_native32.View, { style: { width: 4 } }),
|
|
5584
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(Text, { variant: "caption", style: { color: "#FFFFFF", fontWeight: theme.typography.fontWeight.bold }, children: forkCount })
|
|
5329
5585
|
] })
|
|
5330
5586
|
] })
|
|
5331
5587
|
}
|
|
5332
5588
|
)
|
|
5333
5589
|
}
|
|
5334
5590
|
);
|
|
5335
|
-
}
|
|
5336
|
-
|
|
5337
|
-
// src/
|
|
5338
|
-
var
|
|
5339
|
-
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5352
|
-
|
|
5353
|
-
|
|
5354
|
-
|
|
5591
|
+
}
|
|
5592
|
+
|
|
5593
|
+
// src/components/preview/PreviewStatusBadge.tsx
|
|
5594
|
+
var import_react_native33 = require("react-native");
|
|
5595
|
+
var import_lucide_react_native6 = require("lucide-react-native");
|
|
5596
|
+
|
|
5597
|
+
// src/data/apps/types.ts
|
|
5598
|
+
var APP_STATUS_LABEL = {
|
|
5599
|
+
ready: "Ready",
|
|
5600
|
+
creating: "Creating",
|
|
5601
|
+
editing: "Editing",
|
|
5602
|
+
forking: "Forking",
|
|
5603
|
+
merging: "Merging",
|
|
5604
|
+
error: "Error",
|
|
5605
|
+
archived: "Archived"
|
|
5606
|
+
};
|
|
5607
|
+
|
|
5608
|
+
// src/components/preview/PreviewStatusBadge.tsx
|
|
5609
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
|
5610
|
+
var STATUS_BG = {
|
|
5611
|
+
ready: "#10B981",
|
|
5612
|
+
// emerald-500
|
|
5613
|
+
creating: "#3B82F6",
|
|
5614
|
+
// blue-500
|
|
5615
|
+
editing: "#F59E0B",
|
|
5616
|
+
// amber-500
|
|
5617
|
+
forking: "#00CBC0",
|
|
5618
|
+
// brand teal
|
|
5619
|
+
merging: "#06B6D4",
|
|
5620
|
+
// cyan-500
|
|
5621
|
+
error: "#F43F5E",
|
|
5622
|
+
// rose-500
|
|
5623
|
+
archived: "#71717A"
|
|
5624
|
+
// zinc-500
|
|
5625
|
+
};
|
|
5626
|
+
var STATUS_ICON = {
|
|
5627
|
+
ready: import_lucide_react_native6.CheckCircle2,
|
|
5628
|
+
creating: import_lucide_react_native6.Sparkles,
|
|
5629
|
+
editing: import_lucide_react_native6.Pencil,
|
|
5630
|
+
forking: import_lucide_react_native6.GitFork,
|
|
5631
|
+
merging: import_lucide_react_native6.GitMerge,
|
|
5632
|
+
error: import_lucide_react_native6.AlertTriangle,
|
|
5633
|
+
archived: import_lucide_react_native6.Archive
|
|
5634
|
+
};
|
|
5635
|
+
function PreviewStatusBadge({ status }) {
|
|
5636
|
+
const IconComp = STATUS_ICON[status];
|
|
5637
|
+
const label = APP_STATUS_LABEL[status] ?? status;
|
|
5638
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(
|
|
5639
|
+
import_react_native33.View,
|
|
5640
|
+
{
|
|
5641
|
+
style: {
|
|
5642
|
+
flexDirection: "row",
|
|
5643
|
+
alignItems: "center",
|
|
5644
|
+
borderRadius: 999,
|
|
5645
|
+
paddingHorizontal: 10,
|
|
5646
|
+
paddingVertical: 4,
|
|
5647
|
+
backgroundColor: STATUS_BG[status]
|
|
5648
|
+
},
|
|
5649
|
+
children: [
|
|
5650
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(IconComp, { size: 12, color: "#FFFFFF", style: { marginRight: 4 } }),
|
|
5651
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(Text, { style: { color: "#FFFFFF", fontSize: 11, lineHeight: 14 }, children: label })
|
|
5652
|
+
]
|
|
5653
|
+
}
|
|
5654
|
+
);
|
|
5655
|
+
}
|
|
5656
|
+
|
|
5657
|
+
// src/studio/ui/preview-panel/PreviewHeroSection.tsx
|
|
5658
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
|
5659
|
+
function PreviewHeroSection({
|
|
5660
|
+
appStatus,
|
|
5661
|
+
showProcessing,
|
|
5662
|
+
imageUrl,
|
|
5663
|
+
imageLoaded,
|
|
5664
|
+
onImageLoad,
|
|
5665
|
+
stats
|
|
5666
|
+
}) {
|
|
5667
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
5668
|
+
PreviewHeroCard,
|
|
5669
|
+
{
|
|
5670
|
+
overlayTopLeft: showProcessing ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(PreviewStatusBadge, { status: appStatus }) : null,
|
|
5671
|
+
background: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(PreviewPlaceholder, { visible: !imageLoaded }),
|
|
5672
|
+
image: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(PreviewImage, { uri: imageUrl, onLoad: onImageLoad }),
|
|
5673
|
+
overlayBottom: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(
|
|
5674
|
+
StatsBar,
|
|
5675
|
+
{
|
|
5676
|
+
likeCount: stats.likeCount,
|
|
5677
|
+
commentCount: stats.commentCount,
|
|
5678
|
+
forkCount: stats.forkCount,
|
|
5679
|
+
isLiked: stats.isLiked,
|
|
5680
|
+
onPressLike: () => void stats.handleLike(),
|
|
5681
|
+
onPressComments: stats.handleOpenComments,
|
|
5682
|
+
centered: true,
|
|
5683
|
+
fixedWidth: 160
|
|
5684
|
+
}
|
|
5685
|
+
),
|
|
5686
|
+
style: { marginBottom: 16 }
|
|
5687
|
+
}
|
|
5688
|
+
);
|
|
5689
|
+
}
|
|
5690
|
+
|
|
5691
|
+
// src/studio/ui/preview-panel/PreviewRelatedAppsSection.tsx
|
|
5692
|
+
var React27 = __toESM(require("react"));
|
|
5693
|
+
var import_react_native35 = require("react-native");
|
|
5694
|
+
|
|
5695
|
+
// src/components/primitives/Modal.tsx
|
|
5696
|
+
var import_react_native34 = require("react-native");
|
|
5697
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
|
5698
|
+
function Modal({
|
|
5699
|
+
visible,
|
|
5700
|
+
onRequestClose,
|
|
5701
|
+
dismissOnBackdropPress = true,
|
|
5702
|
+
children,
|
|
5703
|
+
contentStyle
|
|
5704
|
+
}) {
|
|
5705
|
+
const theme = useTheme();
|
|
5706
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5707
|
+
import_react_native34.Modal,
|
|
5708
|
+
{
|
|
5709
|
+
visible,
|
|
5710
|
+
transparent: true,
|
|
5711
|
+
animationType: "fade",
|
|
5712
|
+
onRequestClose,
|
|
5713
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react_native34.View, { style: { flex: 1, backgroundColor: theme.colors.backdrop, justifyContent: "center", padding: theme.spacing.lg }, children: [
|
|
5714
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(
|
|
5715
|
+
import_react_native34.Pressable,
|
|
5716
|
+
{
|
|
5717
|
+
accessibilityRole: "button",
|
|
5718
|
+
onPress: dismissOnBackdropPress ? onRequestClose : void 0,
|
|
5719
|
+
style: { position: "absolute", inset: 0 }
|
|
5720
|
+
}
|
|
5721
|
+
),
|
|
5722
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(Card, { variant: "surfaceRaised", padded: true, style: [{ borderRadius: theme.radii.xl }, contentStyle], children })
|
|
5723
|
+
] })
|
|
5724
|
+
}
|
|
5725
|
+
);
|
|
5726
|
+
}
|
|
5727
|
+
|
|
5728
|
+
// src/studio/ui/preview-panel/SectionTitle.tsx
|
|
5729
|
+
var import_jsx_runtime35 = require("react/jsx-runtime");
|
|
5730
|
+
function SectionTitle({ children, marginTop }) {
|
|
5731
|
+
const theme = useTheme();
|
|
5732
|
+
return /* @__PURE__ */ (0, import_jsx_runtime35.jsx)(
|
|
5733
|
+
Text,
|
|
5734
|
+
{
|
|
5735
|
+
style: {
|
|
5736
|
+
color: theme.colors.textMuted,
|
|
5737
|
+
fontSize: 12,
|
|
5738
|
+
lineHeight: 16,
|
|
5739
|
+
textTransform: "uppercase",
|
|
5740
|
+
letterSpacing: 0.8,
|
|
5741
|
+
marginTop: marginTop ?? theme.spacing.sm,
|
|
5742
|
+
marginBottom: theme.spacing.sm,
|
|
5743
|
+
fontWeight: theme.typography.fontWeight.bold
|
|
5744
|
+
},
|
|
5745
|
+
children
|
|
5746
|
+
}
|
|
5747
|
+
);
|
|
5748
|
+
}
|
|
5749
|
+
|
|
5750
|
+
// src/studio/ui/preview-panel/PreviewRelatedAppsSection.tsx
|
|
5751
|
+
var import_jsx_runtime36 = require("react/jsx-runtime");
|
|
5752
|
+
var INLINE_VISIBLE_COUNT = 4;
|
|
5753
|
+
function formatRelativeUpdatedAt(updatedAt) {
|
|
5754
|
+
const parsed = new Date(updatedAt);
|
|
5755
|
+
const ms = parsed.getTime();
|
|
5756
|
+
if (!Number.isFinite(ms)) return "Updated recently";
|
|
5757
|
+
const diffMs = Date.now() - ms;
|
|
5758
|
+
if (diffMs < 6e4) return "Updated just now";
|
|
5759
|
+
const minutes = Math.floor(diffMs / 6e4);
|
|
5760
|
+
if (minutes < 60) return `Updated ${minutes}m ago`;
|
|
5761
|
+
const hours = Math.floor(minutes / 60);
|
|
5762
|
+
if (hours < 24) return `Updated ${hours}h ago`;
|
|
5763
|
+
const days = Math.floor(hours / 24);
|
|
5764
|
+
if (days === 1) return "Updated yesterday";
|
|
5765
|
+
if (days < 7) return `Updated ${days}d ago`;
|
|
5766
|
+
return `Updated ${parsed.toLocaleDateString(void 0, { month: "short", day: "numeric" })}`;
|
|
5767
|
+
}
|
|
5768
|
+
function PreviewRelatedAppsSection({
|
|
5769
|
+
relatedApps,
|
|
5770
|
+
relatedAppsLoading,
|
|
5771
|
+
switchingRelatedAppId,
|
|
5772
|
+
onOpenRelatedApps,
|
|
5773
|
+
onSwitchRelatedApp
|
|
5774
|
+
}) {
|
|
5775
|
+
var _a;
|
|
5776
|
+
const theme = useTheme();
|
|
5777
|
+
const [relatedAppsOpen, setRelatedAppsOpen] = React27.useState(false);
|
|
5778
|
+
const relatedAppItems = React27.useMemo(() => {
|
|
5779
|
+
if (!relatedApps) return [];
|
|
5780
|
+
const items = [];
|
|
5781
|
+
if (relatedApps.original) {
|
|
5782
|
+
items.push({ app: relatedApps.original, section: "original" });
|
|
5783
|
+
}
|
|
5784
|
+
for (const remix of relatedApps.remixes) {
|
|
5785
|
+
items.push({ app: remix, section: "remix" });
|
|
5786
|
+
}
|
|
5787
|
+
return items;
|
|
5788
|
+
}, [relatedApps]);
|
|
5789
|
+
const dedupedRelatedApps = React27.useMemo(() => {
|
|
5790
|
+
const seen = /* @__PURE__ */ new Set();
|
|
5791
|
+
const items = [];
|
|
5792
|
+
for (const item of relatedAppItems) {
|
|
5793
|
+
if (seen.has(item.app.id)) continue;
|
|
5794
|
+
seen.add(item.app.id);
|
|
5795
|
+
items.push(item);
|
|
5796
|
+
}
|
|
5797
|
+
return items;
|
|
5798
|
+
}, [relatedAppItems]);
|
|
5799
|
+
const uniqueRelatedCount = dedupedRelatedApps.length;
|
|
5800
|
+
const shouldShowRelatedApps = uniqueRelatedCount >= 2;
|
|
5801
|
+
const currentAppId = relatedApps == null ? void 0 : relatedApps.current.id;
|
|
5802
|
+
const originalAppId = ((_a = relatedApps == null ? void 0 : relatedApps.original) == null ? void 0 : _a.id) ?? null;
|
|
5803
|
+
const sectionedRelatedApps = React27.useMemo(() => {
|
|
5804
|
+
const original = [];
|
|
5805
|
+
const remixes = [];
|
|
5806
|
+
for (const item of dedupedRelatedApps) {
|
|
5807
|
+
if (item.section === "original") {
|
|
5808
|
+
original.push(item);
|
|
5809
|
+
} else {
|
|
5810
|
+
remixes.push(item);
|
|
5811
|
+
}
|
|
5812
|
+
}
|
|
5813
|
+
return { original, remixes };
|
|
5814
|
+
}, [dedupedRelatedApps]);
|
|
5815
|
+
const inlineItems = React27.useMemo(() => dedupedRelatedApps.slice(0, INLINE_VISIBLE_COUNT), [dedupedRelatedApps]);
|
|
5816
|
+
const overflowCount = Math.max(0, uniqueRelatedCount - inlineItems.length);
|
|
5817
|
+
const canOpenModal = overflowCount > 0;
|
|
5818
|
+
const closeRelatedApps = React27.useCallback(() => {
|
|
5819
|
+
setRelatedAppsOpen(false);
|
|
5820
|
+
}, []);
|
|
5821
|
+
const openRelatedApps = React27.useCallback(() => {
|
|
5822
|
+
if (!canOpenModal) return;
|
|
5823
|
+
setRelatedAppsOpen(true);
|
|
5824
|
+
onOpenRelatedApps == null ? void 0 : onOpenRelatedApps();
|
|
5825
|
+
}, [canOpenModal, onOpenRelatedApps]);
|
|
5826
|
+
const handleSelectRelatedApp = React27.useCallback(
|
|
5827
|
+
(targetAppId) => {
|
|
5828
|
+
if (!relatedApps) return;
|
|
5829
|
+
if (targetAppId === relatedApps.current.id) return;
|
|
5830
|
+
onSwitchRelatedApp == null ? void 0 : onSwitchRelatedApp(targetAppId);
|
|
5831
|
+
setRelatedAppsOpen(false);
|
|
5832
|
+
},
|
|
5833
|
+
[onSwitchRelatedApp, relatedApps]
|
|
5834
|
+
);
|
|
5835
|
+
const renderBadges = React27.useCallback(
|
|
5836
|
+
(item, isCurrent) => {
|
|
5837
|
+
const badges = [];
|
|
5838
|
+
if (item.app.id === originalAppId) {
|
|
5839
|
+
badges.push(
|
|
5840
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5841
|
+
import_react_native35.View,
|
|
5842
|
+
{
|
|
5843
|
+
style: { borderRadius: 999, paddingHorizontal: 8, paddingVertical: 2, backgroundColor: withAlpha(theme.colors.neutral, 0.4) },
|
|
5844
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { style: { color: theme.colors.textMuted, fontSize: 11 }, children: "Original" })
|
|
5845
|
+
},
|
|
5846
|
+
"original"
|
|
5847
|
+
)
|
|
5848
|
+
);
|
|
5849
|
+
}
|
|
5850
|
+
if (isCurrent) {
|
|
5851
|
+
badges.push(
|
|
5852
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5853
|
+
import_react_native35.View,
|
|
5854
|
+
{
|
|
5855
|
+
style: { borderRadius: 999, paddingHorizontal: 8, paddingVertical: 2, backgroundColor: theme.colors.primary },
|
|
5856
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { style: { color: theme.colors.onPrimary, fontSize: 11 }, children: "Current" })
|
|
5857
|
+
},
|
|
5858
|
+
"current"
|
|
5859
|
+
)
|
|
5860
|
+
);
|
|
5861
|
+
}
|
|
5862
|
+
return badges;
|
|
5863
|
+
},
|
|
5864
|
+
[originalAppId, theme.colors.neutral, theme.colors.onPrimary, theme.colors.primary, theme.colors.textMuted]
|
|
5865
|
+
);
|
|
5866
|
+
const renderRelatedCard = React27.useCallback(
|
|
5867
|
+
(item, options) => {
|
|
5868
|
+
const isCurrent = item.app.id === currentAppId;
|
|
5869
|
+
const isReady = item.app.status === "ready";
|
|
5870
|
+
const isSwitching = switchingRelatedAppId === item.app.id;
|
|
5871
|
+
const disabled = isCurrent || !isReady || Boolean(switchingRelatedAppId);
|
|
5872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5873
|
+
import_react_native35.Pressable,
|
|
5355
5874
|
{
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5875
|
+
accessibilityRole: "button",
|
|
5876
|
+
accessibilityLabel: `Switch to ${item.app.name}, ${formatRelativeUpdatedAt(item.app.updatedAt).toLowerCase()}`,
|
|
5877
|
+
disabled,
|
|
5878
|
+
onPress: () => handleSelectRelatedApp(item.app.id),
|
|
5879
|
+
style: {
|
|
5880
|
+
borderRadius: theme.radii.md,
|
|
5881
|
+
borderWidth: 1,
|
|
5882
|
+
borderColor: withAlpha(theme.colors.border, isCurrent ? 1 : 0.8),
|
|
5883
|
+
backgroundColor: isCurrent ? withAlpha(theme.colors.primary, 0.09) : withAlpha(theme.colors.surfaceRaised, 0.5),
|
|
5884
|
+
paddingHorizontal: theme.spacing.sm,
|
|
5885
|
+
paddingVertical: 8,
|
|
5886
|
+
opacity: disabled ? 0.7 : 1,
|
|
5887
|
+
width: (options == null ? void 0 : options.fullWidth) ? void 0 : 188,
|
|
5888
|
+
minWidth: (options == null ? void 0 : options.fullWidth) ? void 0 : 188,
|
|
5889
|
+
marginBottom: (options == null ? void 0 : options.fullWidth) ? theme.spacing.sm : 0
|
|
5890
|
+
},
|
|
5891
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react_native35.View, { style: { flexDirection: "row", alignItems: "flex-start", justifyContent: "space-between", gap: 8 }, children: [
|
|
5892
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react_native35.View, { style: { flex: 1, minWidth: 0 }, children: [
|
|
5893
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { numberOfLines: 1, style: { color: theme.colors.text, fontWeight: theme.typography.fontWeight.semibold }, children: item.app.name }),
|
|
5894
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { style: { marginTop: 2, color: theme.colors.textMuted, fontSize: 12 }, children: formatRelativeUpdatedAt(item.app.updatedAt) }),
|
|
5895
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5896
|
+
import_react_native35.View,
|
|
5897
|
+
{
|
|
5898
|
+
style: {
|
|
5899
|
+
marginTop: 4,
|
|
5900
|
+
minHeight: 20,
|
|
5901
|
+
flexDirection: "row",
|
|
5902
|
+
alignItems: "center",
|
|
5903
|
+
flexWrap: "wrap",
|
|
5904
|
+
gap: 6
|
|
5905
|
+
},
|
|
5906
|
+
children: renderBadges(item, isCurrent)
|
|
5907
|
+
}
|
|
5908
|
+
)
|
|
5909
|
+
] }),
|
|
5910
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react_native35.View, { style: { alignItems: "flex-end", gap: 6 }, children: [
|
|
5911
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_native35.View, { style: { minHeight: 20, justifyContent: "center" }, children: !isReady ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(PreviewStatusBadge, { status: item.app.status }) : null }),
|
|
5912
|
+
isSwitching ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_native35.ActivityIndicator, { size: "small", color: theme.colors.primary }) : null
|
|
5913
|
+
] })
|
|
5914
|
+
] })
|
|
5915
|
+
},
|
|
5916
|
+
item.app.id
|
|
5917
|
+
);
|
|
5918
|
+
},
|
|
5919
|
+
[currentAppId, handleSelectRelatedApp, renderBadges, switchingRelatedAppId, theme]
|
|
5368
5920
|
);
|
|
5921
|
+
if (!relatedAppsLoading && !shouldShowRelatedApps) return null;
|
|
5922
|
+
return /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_jsx_runtime36.Fragment, { children: [
|
|
5923
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(SectionTitle, { children: "Related Apps" }),
|
|
5924
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5925
|
+
import_react_native35.View,
|
|
5926
|
+
{
|
|
5927
|
+
style: {
|
|
5928
|
+
flexDirection: "row",
|
|
5929
|
+
alignItems: "center",
|
|
5930
|
+
justifyContent: "flex-end",
|
|
5931
|
+
marginBottom: theme.spacing.xs,
|
|
5932
|
+
paddingHorizontal: theme.spacing.md
|
|
5933
|
+
},
|
|
5934
|
+
children: canOpenModal ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_native35.Pressable, { accessibilityRole: "button", accessibilityLabel: "Open all related apps", onPress: openRelatedApps, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(Text, { style: { color: theme.colors.primary, fontSize: 12, fontWeight: theme.typography.fontWeight.semibold }, children: [
|
|
5935
|
+
"See all (",
|
|
5936
|
+
uniqueRelatedCount,
|
|
5937
|
+
")"
|
|
5938
|
+
] }) }) : null
|
|
5939
|
+
}
|
|
5940
|
+
),
|
|
5941
|
+
relatedAppsLoading ? /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_native35.View, { style: { height: 72, alignItems: "center", justifyContent: "center", marginBottom: theme.spacing.xs }, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(import_react_native35.ActivityIndicator, { color: theme.colors.primary }) }) : /* @__PURE__ */ (0, import_jsx_runtime36.jsx)(
|
|
5942
|
+
import_react_native35.ScrollView,
|
|
5943
|
+
{
|
|
5944
|
+
horizontal: true,
|
|
5945
|
+
showsHorizontalScrollIndicator: false,
|
|
5946
|
+
style: { flexGrow: 0 },
|
|
5947
|
+
contentContainerStyle: {
|
|
5948
|
+
paddingHorizontal: theme.spacing.md,
|
|
5949
|
+
gap: theme.spacing.sm,
|
|
5950
|
+
paddingBottom: theme.spacing.xs,
|
|
5951
|
+
alignItems: "flex-start"
|
|
5952
|
+
},
|
|
5953
|
+
children: inlineItems.map((item) => renderRelatedCard(item))
|
|
5954
|
+
}
|
|
5955
|
+
),
|
|
5956
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Modal, { visible: relatedAppsOpen, onRequestClose: closeRelatedApps, children: /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react_native35.View, { style: { gap: theme.spacing.sm }, children: [
|
|
5957
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { style: { color: theme.colors.text, fontSize: 18, fontWeight: theme.typography.fontWeight.semibold }, children: "Related apps" }),
|
|
5958
|
+
sectionedRelatedApps.original.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react_native35.View, { children: [
|
|
5959
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { style: { color: theme.colors.textMuted, marginBottom: theme.spacing.xs }, children: "Original" }),
|
|
5960
|
+
sectionedRelatedApps.original.map((item) => renderRelatedCard(item, { fullWidth: true }))
|
|
5961
|
+
] }) : null,
|
|
5962
|
+
sectionedRelatedApps.remixes.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime36.jsxs)(import_react_native35.View, { children: [
|
|
5963
|
+
/* @__PURE__ */ (0, import_jsx_runtime36.jsx)(Text, { style: { color: theme.colors.textMuted, marginBottom: theme.spacing.xs }, children: "Remixes" }),
|
|
5964
|
+
sectionedRelatedApps.remixes.map((item) => renderRelatedCard(item, { fullWidth: true }))
|
|
5965
|
+
] }) : null
|
|
5966
|
+
] }) })
|
|
5967
|
+
] });
|
|
5369
5968
|
}
|
|
5370
5969
|
|
|
5371
5970
|
// src/studio/ui/preview-panel/PreviewMetaSection.tsx
|
|
5372
|
-
var
|
|
5971
|
+
var import_react_native37 = require("react-native");
|
|
5373
5972
|
|
|
5374
5973
|
// src/components/preview/PreviewMetaRow.tsx
|
|
5375
|
-
var
|
|
5376
|
-
var
|
|
5974
|
+
var import_react_native36 = require("react-native");
|
|
5975
|
+
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
5377
5976
|
function PreviewMetaRow({
|
|
5378
5977
|
avatarUri,
|
|
5379
5978
|
creatorName,
|
|
@@ -5384,11 +5983,11 @@ function PreviewMetaRow({
|
|
|
5384
5983
|
style
|
|
5385
5984
|
}) {
|
|
5386
5985
|
const theme = useTheme();
|
|
5387
|
-
return /* @__PURE__ */ (0,
|
|
5388
|
-
/* @__PURE__ */ (0,
|
|
5389
|
-
/* @__PURE__ */ (0,
|
|
5390
|
-
/* @__PURE__ */ (0,
|
|
5391
|
-
/* @__PURE__ */ (0,
|
|
5986
|
+
return /* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_react_native36.View, { style: [{ alignSelf: "stretch" }, style], children: [
|
|
5987
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_react_native36.View, { style: { flexDirection: "row", alignItems: "center" }, children: [
|
|
5988
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(Avatar, { uri: avatarUri, name: creatorName, size: 24, style: { marginRight: theme.spacing.sm } }),
|
|
5989
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsxs)(import_react_native36.View, { style: { flexDirection: "row", alignItems: "center", flex: 1, minWidth: 0, marginRight: theme.spacing.sm }, children: [
|
|
5990
|
+
/* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5392
5991
|
Text,
|
|
5393
5992
|
{
|
|
5394
5993
|
numberOfLines: 1,
|
|
@@ -5402,11 +6001,11 @@ function PreviewMetaRow({
|
|
|
5402
6001
|
children: title
|
|
5403
6002
|
}
|
|
5404
6003
|
),
|
|
5405
|
-
tag ? /* @__PURE__ */ (0,
|
|
6004
|
+
tag ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_native36.View, { style: { marginLeft: theme.spacing.sm }, children: tag }) : null
|
|
5406
6005
|
] }),
|
|
5407
|
-
rightMetric ? /* @__PURE__ */ (0,
|
|
6006
|
+
rightMetric ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(import_react_native36.View, { children: rightMetric }) : null
|
|
5408
6007
|
] }),
|
|
5409
|
-
subtitle ? /* @__PURE__ */ (0,
|
|
6008
|
+
subtitle ? /* @__PURE__ */ (0, import_jsx_runtime37.jsx)(
|
|
5410
6009
|
Text,
|
|
5411
6010
|
{
|
|
5412
6011
|
numberOfLines: 2,
|
|
@@ -5449,20 +6048,20 @@ function statusDescription(status, statusError) {
|
|
|
5449
6048
|
}
|
|
5450
6049
|
|
|
5451
6050
|
// src/studio/ui/preview-panel/PreviewMetaSection.tsx
|
|
5452
|
-
var
|
|
6051
|
+
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
5453
6052
|
function PreviewMetaSection({ app, isOwner, creator, downloadsCount }) {
|
|
5454
6053
|
var _a;
|
|
5455
6054
|
const theme = useTheme();
|
|
5456
|
-
return /* @__PURE__ */ (0,
|
|
6055
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5457
6056
|
PreviewMetaRow,
|
|
5458
6057
|
{
|
|
5459
6058
|
title: app.name,
|
|
5460
6059
|
subtitle: app.description,
|
|
5461
6060
|
avatarUri: (creator == null ? void 0 : creator.avatar) ?? null,
|
|
5462
6061
|
creatorName: (creator == null ? void 0 : creator.name) ?? null,
|
|
5463
|
-
tag: isOwner || app.forkedFromAppId ? /* @__PURE__ */ (0,
|
|
5464
|
-
rightMetric: /* @__PURE__ */ (0,
|
|
5465
|
-
|
|
6062
|
+
tag: isOwner || app.forkedFromAppId ? /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_react_native37.View, { style: { paddingHorizontal: 8, paddingVertical: 2, borderRadius: 999, backgroundColor: "#007A75" }, children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Text, { variant: "caption", style: { color: "#fff", fontWeight: theme.typography.fontWeight.semibold }, children: app.forkedFromAppId ? "Remix" : "Owner" }) }) : null,
|
|
6063
|
+
rightMetric: /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(
|
|
6064
|
+
import_react_native37.View,
|
|
5466
6065
|
{
|
|
5467
6066
|
style: {
|
|
5468
6067
|
flexDirection: "row",
|
|
@@ -5473,7 +6072,7 @@ function PreviewMetaSection({ app, isOwner, creator, downloadsCount }) {
|
|
|
5473
6072
|
backgroundColor: withAlpha(theme.colors.neutral, 0.3)
|
|
5474
6073
|
},
|
|
5475
6074
|
children: [
|
|
5476
|
-
/* @__PURE__ */ (0,
|
|
6075
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5477
6076
|
Text,
|
|
5478
6077
|
{
|
|
5479
6078
|
style: {
|
|
@@ -5486,7 +6085,7 @@ function PreviewMetaSection({ app, isOwner, creator, downloadsCount }) {
|
|
|
5486
6085
|
children: formatCount(downloadsCount ?? ((_a = app.insights) == null ? void 0 : _a.totalDownloads) ?? 0)
|
|
5487
6086
|
}
|
|
5488
6087
|
),
|
|
5489
|
-
/* @__PURE__ */ (0,
|
|
6088
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(IconPlay, { size: 14, colorToken: "textMuted", fill: theme.colors.textMuted })
|
|
5490
6089
|
]
|
|
5491
6090
|
}
|
|
5492
6091
|
),
|
|
@@ -5496,11 +6095,11 @@ function PreviewMetaSection({ app, isOwner, creator, downloadsCount }) {
|
|
|
5496
6095
|
}
|
|
5497
6096
|
|
|
5498
6097
|
// src/studio/ui/preview-panel/PreviewCustomizeSection.tsx
|
|
5499
|
-
var
|
|
6098
|
+
var import_react_native39 = require("react-native");
|
|
5500
6099
|
|
|
5501
6100
|
// src/studio/ui/preview-panel/PressableCardRow.tsx
|
|
5502
|
-
var
|
|
5503
|
-
var
|
|
6101
|
+
var import_react_native38 = require("react-native");
|
|
6102
|
+
var import_jsx_runtime39 = require("react/jsx-runtime");
|
|
5504
6103
|
function PressableCardRow({
|
|
5505
6104
|
accessibilityLabel,
|
|
5506
6105
|
onPress,
|
|
@@ -5511,50 +6110,28 @@ function PressableCardRow({
|
|
|
5511
6110
|
right,
|
|
5512
6111
|
style
|
|
5513
6112
|
}) {
|
|
5514
|
-
return /* @__PURE__ */ (0,
|
|
5515
|
-
|
|
6113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(
|
|
6114
|
+
import_react_native38.Pressable,
|
|
5516
6115
|
{
|
|
5517
6116
|
accessibilityRole: "button",
|
|
5518
6117
|
accessibilityLabel,
|
|
5519
6118
|
disabled,
|
|
5520
6119
|
onPress,
|
|
5521
6120
|
style: ({ pressed }) => ({ opacity: disabled ? 0.6 : pressed ? 0.85 : 1 }),
|
|
5522
|
-
children: /* @__PURE__ */ (0,
|
|
6121
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Card, { padded: false, border: false, style, children: /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react_native38.View, { style: { flexDirection: "row", alignItems: "center" }, children: [
|
|
5523
6122
|
left,
|
|
5524
|
-
/* @__PURE__ */ (0,
|
|
6123
|
+
/* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_react_native38.View, { style: { flex: 1, minWidth: 0 }, children: [
|
|
5525
6124
|
title,
|
|
5526
6125
|
subtitle ? subtitle : null
|
|
5527
6126
|
] }),
|
|
5528
|
-
right ? /* @__PURE__ */ (0,
|
|
6127
|
+
right ? /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(import_react_native38.View, { style: { marginLeft: 16 }, children: right }) : null
|
|
5529
6128
|
] }) })
|
|
5530
6129
|
}
|
|
5531
6130
|
);
|
|
5532
6131
|
}
|
|
5533
6132
|
|
|
5534
|
-
// src/studio/ui/preview-panel/SectionTitle.tsx
|
|
5535
|
-
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
5536
|
-
function SectionTitle({ children, marginTop }) {
|
|
5537
|
-
const theme = useTheme();
|
|
5538
|
-
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(
|
|
5539
|
-
Text,
|
|
5540
|
-
{
|
|
5541
|
-
style: {
|
|
5542
|
-
color: theme.colors.textMuted,
|
|
5543
|
-
fontSize: 12,
|
|
5544
|
-
lineHeight: 16,
|
|
5545
|
-
textTransform: "uppercase",
|
|
5546
|
-
letterSpacing: 0.8,
|
|
5547
|
-
marginTop: marginTop ?? theme.spacing.sm,
|
|
5548
|
-
marginBottom: theme.spacing.sm,
|
|
5549
|
-
fontWeight: theme.typography.fontWeight.bold
|
|
5550
|
-
},
|
|
5551
|
-
children
|
|
5552
|
-
}
|
|
5553
|
-
);
|
|
5554
|
-
}
|
|
5555
|
-
|
|
5556
6133
|
// src/studio/ui/preview-panel/PreviewCustomizeSection.tsx
|
|
5557
|
-
var
|
|
6134
|
+
var import_jsx_runtime40 = require("react/jsx-runtime");
|
|
5558
6135
|
function PreviewCustomizeSection({
|
|
5559
6136
|
app,
|
|
5560
6137
|
isOwner,
|
|
@@ -5564,10 +6141,10 @@ function PreviewCustomizeSection({
|
|
|
5564
6141
|
onStartDraw
|
|
5565
6142
|
}) {
|
|
5566
6143
|
const theme = useTheme();
|
|
5567
|
-
return /* @__PURE__ */ (0,
|
|
5568
|
-
/* @__PURE__ */ (0,
|
|
5569
|
-
showProcessing ? /* @__PURE__ */ (0,
|
|
5570
|
-
|
|
6144
|
+
return /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_jsx_runtime40.Fragment, { children: [
|
|
6145
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(SectionTitle, { children: "Customize" }),
|
|
6146
|
+
showProcessing ? /* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(
|
|
6147
|
+
import_react_native39.View,
|
|
5571
6148
|
{
|
|
5572
6149
|
style: {
|
|
5573
6150
|
flexDirection: "row",
|
|
@@ -5580,8 +6157,8 @@ function PreviewCustomizeSection({
|
|
|
5580
6157
|
marginBottom: theme.spacing.sm
|
|
5581
6158
|
},
|
|
5582
6159
|
children: [
|
|
5583
|
-
/* @__PURE__ */ (0,
|
|
5584
|
-
|
|
6160
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6161
|
+
import_react_native39.View,
|
|
5585
6162
|
{
|
|
5586
6163
|
style: {
|
|
5587
6164
|
width: 40,
|
|
@@ -5592,17 +6169,17 @@ function PreviewCustomizeSection({
|
|
|
5592
6169
|
backgroundColor: withAlpha(theme.colors.warning, 0.1),
|
|
5593
6170
|
marginRight: theme.spacing.lg
|
|
5594
6171
|
},
|
|
5595
|
-
children: /* @__PURE__ */ (0,
|
|
6172
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(import_react_native39.ActivityIndicator, { color: theme.colors.warning, size: "small" })
|
|
5596
6173
|
}
|
|
5597
6174
|
),
|
|
5598
|
-
/* @__PURE__ */ (0,
|
|
5599
|
-
/* @__PURE__ */ (0,
|
|
5600
|
-
/* @__PURE__ */ (0,
|
|
6175
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsxs)(import_react_native39.View, { style: { flex: 1, minWidth: 0 }, children: [
|
|
6176
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text, { style: { color: theme.colors.text, fontSize: 16, lineHeight: 20, fontWeight: theme.typography.fontWeight.semibold }, children: app.status === "error" ? "Error" : "Processing" }),
|
|
6177
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text, { style: { color: theme.colors.textMuted, fontSize: 12, lineHeight: 16, marginTop: 2 }, children: statusDescription(app.status, app.statusError) })
|
|
5601
6178
|
] })
|
|
5602
6179
|
]
|
|
5603
6180
|
}
|
|
5604
6181
|
) : null,
|
|
5605
|
-
/* @__PURE__ */ (0,
|
|
6182
|
+
/* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5606
6183
|
PressableCardRow,
|
|
5607
6184
|
{
|
|
5608
6185
|
accessibilityLabel: isOwner ? "Edit app" : "Remix app",
|
|
@@ -5615,8 +6192,8 @@ function PreviewCustomizeSection({
|
|
|
5615
6192
|
borderColor: withAlpha(theme.colors.primary, 0.1),
|
|
5616
6193
|
marginBottom: theme.spacing.sm
|
|
5617
6194
|
},
|
|
5618
|
-
left: /* @__PURE__ */ (0,
|
|
5619
|
-
|
|
6195
|
+
left: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6196
|
+
import_react_native39.View,
|
|
5620
6197
|
{
|
|
5621
6198
|
style: {
|
|
5622
6199
|
width: 40,
|
|
@@ -5627,15 +6204,15 @@ function PreviewCustomizeSection({
|
|
|
5627
6204
|
backgroundColor: withAlpha(theme.colors.primary, 0.1),
|
|
5628
6205
|
marginRight: theme.spacing.lg
|
|
5629
6206
|
},
|
|
5630
|
-
children: /* @__PURE__ */ (0,
|
|
6207
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(IconChat, { size: 20, colorToken: "primary" })
|
|
5631
6208
|
}
|
|
5632
6209
|
),
|
|
5633
|
-
title: /* @__PURE__ */ (0,
|
|
5634
|
-
subtitle: /* @__PURE__ */ (0,
|
|
5635
|
-
right: /* @__PURE__ */ (0,
|
|
6210
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(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" }),
|
|
6211
|
+
subtitle: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(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" }),
|
|
6212
|
+
right: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(IconChevronRight, { size: 20, colorToken: "textMuted" })
|
|
5636
6213
|
}
|
|
5637
6214
|
),
|
|
5638
|
-
isOwner && onStartDraw ? /* @__PURE__ */ (0,
|
|
6215
|
+
isOwner && onStartDraw ? /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
5639
6216
|
PressableCardRow,
|
|
5640
6217
|
{
|
|
5641
6218
|
accessibilityLabel: "Draw changes",
|
|
@@ -5648,8 +6225,8 @@ function PreviewCustomizeSection({
|
|
|
5648
6225
|
borderColor: withAlpha(theme.colors.danger, 0.1),
|
|
5649
6226
|
marginBottom: theme.spacing.sm
|
|
5650
6227
|
},
|
|
5651
|
-
left: /* @__PURE__ */ (0,
|
|
5652
|
-
|
|
6228
|
+
left: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(
|
|
6229
|
+
import_react_native39.View,
|
|
5653
6230
|
{
|
|
5654
6231
|
style: {
|
|
5655
6232
|
width: 40,
|
|
@@ -5660,12 +6237,12 @@ function PreviewCustomizeSection({
|
|
|
5660
6237
|
backgroundColor: withAlpha(theme.colors.danger, 0.1),
|
|
5661
6238
|
marginRight: theme.spacing.lg
|
|
5662
6239
|
},
|
|
5663
|
-
children: /* @__PURE__ */ (0,
|
|
6240
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(IconDraw, { size: 20, colorToken: "danger" })
|
|
5664
6241
|
}
|
|
5665
6242
|
),
|
|
5666
|
-
title: /* @__PURE__ */ (0,
|
|
5667
|
-
subtitle: /* @__PURE__ */ (0,
|
|
5668
|
-
right: /* @__PURE__ */ (0,
|
|
6243
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text, { style: { color: theme.colors.text, fontSize: 16, lineHeight: 20, fontWeight: theme.typography.fontWeight.semibold }, children: "Draw Changes" }),
|
|
6244
|
+
subtitle: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(Text, { style: { color: theme.colors.textMuted, fontSize: 12, lineHeight: 16, marginTop: 2 }, children: "Annotate the app with drawings" }),
|
|
6245
|
+
right: /* @__PURE__ */ (0, import_jsx_runtime40.jsx)(IconChevronRight, { size: 20, colorToken: "textMuted" })
|
|
5669
6246
|
}
|
|
5670
6247
|
) : null
|
|
5671
6248
|
] });
|
|
@@ -5673,19 +6250,19 @@ function PreviewCustomizeSection({
|
|
|
5673
6250
|
|
|
5674
6251
|
// src/studio/ui/preview-panel/PreviewCollaborateSection.tsx
|
|
5675
6252
|
var React33 = __toESM(require("react"));
|
|
5676
|
-
var
|
|
6253
|
+
var import_react_native45 = require("react-native");
|
|
5677
6254
|
var import_lucide_react_native9 = require("lucide-react-native");
|
|
5678
6255
|
|
|
5679
6256
|
// src/components/merge-requests/MergeRequestStatusCard.tsx
|
|
5680
6257
|
var React29 = __toESM(require("react"));
|
|
5681
|
-
var
|
|
6258
|
+
var import_react_native41 = require("react-native");
|
|
5682
6259
|
var import_lucide_react_native7 = require("lucide-react-native");
|
|
5683
6260
|
|
|
5684
6261
|
// src/components/primitives/MarkdownText.tsx
|
|
5685
|
-
var
|
|
6262
|
+
var import_react_native40 = require("react-native");
|
|
5686
6263
|
var import_react_native_markdown_display = __toESM(require("react-native-markdown-display"));
|
|
5687
6264
|
var import_react2 = require("react");
|
|
5688
|
-
var
|
|
6265
|
+
var import_jsx_runtime41 = require("react/jsx-runtime");
|
|
5689
6266
|
function copyMarkdownToClipboard(markdown) {
|
|
5690
6267
|
var _a;
|
|
5691
6268
|
if (!markdown) {
|
|
@@ -5726,7 +6303,7 @@ function MarkdownText({ markdown, variant = "chat", bodyColor, style }) {
|
|
|
5726
6303
|
const codeTextColor = isDark ? "#FFFFFF" : theme.colors.text;
|
|
5727
6304
|
const paragraphBottom = variant === "mergeRequest" ? 8 : 6;
|
|
5728
6305
|
const baseLineHeight = variant === "mergeRequest" ? 22 : 20;
|
|
5729
|
-
const screen =
|
|
6306
|
+
const screen = import_react_native40.Dimensions.get("window");
|
|
5730
6307
|
const tooltipPadding = theme.spacing.sm;
|
|
5731
6308
|
const tooltipYOffset = theme.spacing.lg + 32;
|
|
5732
6309
|
const minTooltipY = theme.spacing.xl;
|
|
@@ -5756,8 +6333,8 @@ function MarkdownText({ markdown, variant = "chat", bodyColor, style }) {
|
|
|
5756
6333
|
setShowCopied(false);
|
|
5757
6334
|
}, 1200);
|
|
5758
6335
|
};
|
|
5759
|
-
return /* @__PURE__ */ (0,
|
|
5760
|
-
/* @__PURE__ */ (0,
|
|
6336
|
+
return /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_native40.Pressable, { style, onPress: import_react_native40.Keyboard.dismiss, onLongPress: handleLongPress, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsxs)(import_react_native40.View, { style: { position: "relative" }, children: [
|
|
6337
|
+
/* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
5761
6338
|
import_react_native_markdown_display.default,
|
|
5762
6339
|
{
|
|
5763
6340
|
style: {
|
|
@@ -5770,7 +6347,7 @@ function MarkdownText({ markdown, variant = "chat", bodyColor, style }) {
|
|
|
5770
6347
|
paddingHorizontal: variant === "mergeRequest" ? 6 : 4,
|
|
5771
6348
|
paddingVertical: variant === "mergeRequest" ? 2 : 0,
|
|
5772
6349
|
borderRadius: variant === "mergeRequest" ? 6 : 4,
|
|
5773
|
-
fontFamily:
|
|
6350
|
+
fontFamily: import_react_native40.Platform.OS === "ios" ? "Menlo" : "monospace",
|
|
5774
6351
|
fontSize: 13
|
|
5775
6352
|
},
|
|
5776
6353
|
code_block: {
|
|
@@ -5791,8 +6368,8 @@ function MarkdownText({ markdown, variant = "chat", bodyColor, style }) {
|
|
|
5791
6368
|
children: markdown
|
|
5792
6369
|
}
|
|
5793
6370
|
),
|
|
5794
|
-
showCopied && tooltipAnchor ? /* @__PURE__ */ (0,
|
|
5795
|
-
|
|
6371
|
+
showCopied && tooltipAnchor ? /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_native40.Modal, { transparent: true, visible: true, statusBarTranslucent: true, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(import_react_native40.View, { pointerEvents: "none", style: { flex: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6372
|
+
import_react_native40.View,
|
|
5796
6373
|
{
|
|
5797
6374
|
pointerEvents: "none",
|
|
5798
6375
|
style: {
|
|
@@ -5805,8 +6382,8 @@ function MarkdownText({ markdown, variant = "chat", bodyColor, style }) {
|
|
|
5805
6382
|
paddingVertical: theme.spacing.xs
|
|
5806
6383
|
},
|
|
5807
6384
|
onLayout: (event) => setTooltipWidth(event.nativeEvent.layout.width),
|
|
5808
|
-
children: /* @__PURE__ */ (0,
|
|
5809
|
-
|
|
6385
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime41.jsx)(
|
|
6386
|
+
import_react_native40.Text,
|
|
5810
6387
|
{
|
|
5811
6388
|
style: {
|
|
5812
6389
|
color: theme.colors.onSuccess,
|
|
@@ -5865,7 +6442,7 @@ function useControlledExpansion(props) {
|
|
|
5865
6442
|
}
|
|
5866
6443
|
|
|
5867
6444
|
// src/components/merge-requests/MergeRequestStatusCard.tsx
|
|
5868
|
-
var
|
|
6445
|
+
var import_jsx_runtime42 = require("react/jsx-runtime");
|
|
5869
6446
|
function MergeRequestStatusCard({
|
|
5870
6447
|
mergeRequest,
|
|
5871
6448
|
expanded: expandedProp,
|
|
@@ -5910,15 +6487,15 @@ function MergeRequestStatusCard({
|
|
|
5910
6487
|
const createdIso = toIsoString(mergeRequest.createdAt ?? null);
|
|
5911
6488
|
const headerTimeAgo = updatedIso ? formatTimeAgo(updatedIso) : "";
|
|
5912
6489
|
const createdTimeAgo = createdIso ? formatTimeAgo(createdIso) : "";
|
|
5913
|
-
const rotate = React29.useRef(new
|
|
6490
|
+
const rotate = React29.useRef(new import_react_native41.Animated.Value(expanded ? 1 : 0)).current;
|
|
5914
6491
|
React29.useEffect(() => {
|
|
5915
|
-
|
|
6492
|
+
import_react_native41.Animated.timing(rotate, {
|
|
5916
6493
|
toValue: expanded ? 1 : 0,
|
|
5917
6494
|
duration: 200,
|
|
5918
6495
|
useNativeDriver: true
|
|
5919
6496
|
}).start();
|
|
5920
6497
|
}, [expanded, rotate]);
|
|
5921
|
-
return /* @__PURE__ */ (0,
|
|
6498
|
+
return /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native41.Pressable, { onPress: () => setExpanded(!expanded), style: ({ pressed }) => [{ opacity: pressed ? 0.95 : 1 }], children: /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(
|
|
5922
6499
|
Card,
|
|
5923
6500
|
{
|
|
5924
6501
|
padded: false,
|
|
@@ -5931,11 +6508,11 @@ function MergeRequestStatusCard({
|
|
|
5931
6508
|
style
|
|
5932
6509
|
],
|
|
5933
6510
|
children: [
|
|
5934
|
-
/* @__PURE__ */ (0,
|
|
5935
|
-
/* @__PURE__ */ (0,
|
|
5936
|
-
/* @__PURE__ */ (0,
|
|
5937
|
-
/* @__PURE__ */ (0,
|
|
5938
|
-
/* @__PURE__ */ (0,
|
|
6511
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_react_native41.View, { style: { flexDirection: "row", alignItems: "center", gap: theme.spacing.lg }, children: [
|
|
6512
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native41.View, { style: { width: 40, height: 40, borderRadius: 999, alignItems: "center", justifyContent: "center", backgroundColor: bgColor }, children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(StatusIcon, { size: 20, color: iconColor }) }),
|
|
6513
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_react_native41.View, { style: { flex: 1, minWidth: 0 }, children: [
|
|
6514
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_react_native41.View, { style: { flexDirection: "row", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
6515
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5939
6516
|
Text,
|
|
5940
6517
|
{
|
|
5941
6518
|
style: {
|
|
@@ -5949,12 +6526,12 @@ function MergeRequestStatusCard({
|
|
|
5949
6526
|
children: statusText
|
|
5950
6527
|
}
|
|
5951
6528
|
),
|
|
5952
|
-
headerTimeAgo ? /* @__PURE__ */ (0,
|
|
6529
|
+
headerTimeAgo ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { style: { fontSize: 10, lineHeight: 14, marginLeft: theme.spacing.sm, color: withAlpha(theme.colors.textMuted, 0.6) }, children: headerTimeAgo }) : null
|
|
5953
6530
|
] }),
|
|
5954
|
-
/* @__PURE__ */ (0,
|
|
6531
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { style: { fontSize: 12, lineHeight: 16, color: theme.colors.textMuted }, numberOfLines: 1, children: mergeRequest.title ?? "Untitled merge request" })
|
|
5955
6532
|
] }),
|
|
5956
|
-
headerRight ? /* @__PURE__ */ (0,
|
|
5957
|
-
|
|
6533
|
+
headerRight ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_react_native41.View, { children: headerRight }) : /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
6534
|
+
import_react_native41.Animated.View,
|
|
5958
6535
|
{
|
|
5959
6536
|
style: {
|
|
5960
6537
|
transform: [
|
|
@@ -5963,12 +6540,12 @@ function MergeRequestStatusCard({
|
|
|
5963
6540
|
}
|
|
5964
6541
|
]
|
|
5965
6542
|
},
|
|
5966
|
-
children: /* @__PURE__ */ (0,
|
|
6543
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(import_lucide_react_native7.ChevronDown, { size: 20, color: withAlpha(theme.colors.textMuted, 0.4) })
|
|
5967
6544
|
}
|
|
5968
6545
|
)
|
|
5969
6546
|
] }),
|
|
5970
|
-
expanded ? /* @__PURE__ */ (0,
|
|
5971
|
-
/* @__PURE__ */ (0,
|
|
6547
|
+
expanded ? /* @__PURE__ */ (0, import_jsx_runtime42.jsxs)(import_react_native41.View, { style: { marginTop: 16, marginLeft: 56 }, children: [
|
|
6548
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5972
6549
|
Text,
|
|
5973
6550
|
{
|
|
5974
6551
|
style: {
|
|
@@ -5982,7 +6559,7 @@ function MergeRequestStatusCard({
|
|
|
5982
6559
|
children: status.text
|
|
5983
6560
|
}
|
|
5984
6561
|
),
|
|
5985
|
-
createdTimeAgo ? /* @__PURE__ */ (0,
|
|
6562
|
+
createdTimeAgo ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(
|
|
5986
6563
|
Text,
|
|
5987
6564
|
{
|
|
5988
6565
|
style: {
|
|
@@ -5993,8 +6570,8 @@ function MergeRequestStatusCard({
|
|
|
5993
6570
|
children: createdTimeAgo
|
|
5994
6571
|
}
|
|
5995
6572
|
) : null,
|
|
5996
|
-
/* @__PURE__ */ (0,
|
|
5997
|
-
mergeRequest.description ? /* @__PURE__ */ (0,
|
|
6573
|
+
/* @__PURE__ */ (0, import_jsx_runtime42.jsx)(Text, { style: { fontSize: 16, fontWeight: "600", color: textColor, marginBottom: 8 }, children: mergeRequest.title ?? "Untitled merge request" }),
|
|
6574
|
+
mergeRequest.description ? /* @__PURE__ */ (0, import_jsx_runtime42.jsx)(MarkdownText, { markdown: mergeRequest.description, variant: "mergeRequest" }) : null
|
|
5998
6575
|
] }) : null
|
|
5999
6576
|
]
|
|
6000
6577
|
}
|
|
@@ -6003,17 +6580,17 @@ function MergeRequestStatusCard({
|
|
|
6003
6580
|
|
|
6004
6581
|
// src/components/merge-requests/ReviewMergeRequestCarousel.tsx
|
|
6005
6582
|
var React32 = __toESM(require("react"));
|
|
6006
|
-
var
|
|
6583
|
+
var import_react_native44 = require("react-native");
|
|
6007
6584
|
|
|
6008
6585
|
// src/components/merge-requests/ReviewMergeRequestCard.tsx
|
|
6009
6586
|
var React31 = __toESM(require("react"));
|
|
6010
|
-
var
|
|
6587
|
+
var import_react_native43 = require("react-native");
|
|
6011
6588
|
var import_lucide_react_native8 = require("lucide-react-native");
|
|
6012
6589
|
|
|
6013
6590
|
// src/components/merge-requests/ReviewMergeRequestActionButton.tsx
|
|
6014
6591
|
var React30 = __toESM(require("react"));
|
|
6015
|
-
var
|
|
6016
|
-
var
|
|
6592
|
+
var import_react_native42 = require("react-native");
|
|
6593
|
+
var import_jsx_runtime43 = require("react/jsx-runtime");
|
|
6017
6594
|
function ReviewMergeRequestActionButton({
|
|
6018
6595
|
accessibilityLabel,
|
|
6019
6596
|
backgroundColor,
|
|
@@ -6028,8 +6605,8 @@ function ReviewMergeRequestActionButton({
|
|
|
6028
6605
|
const paddingHorizontal = iconOnly ? 0 : 16;
|
|
6029
6606
|
const paddingVertical = iconOnly ? 0 : 8;
|
|
6030
6607
|
const opacity = disabled ? 0.5 : pressed ? 0.9 : 1;
|
|
6031
|
-
return /* @__PURE__ */ (0,
|
|
6032
|
-
|
|
6608
|
+
return /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
6609
|
+
import_react_native42.View,
|
|
6033
6610
|
{
|
|
6034
6611
|
style: {
|
|
6035
6612
|
width,
|
|
@@ -6043,8 +6620,8 @@ function ReviewMergeRequestActionButton({
|
|
|
6043
6620
|
paddingVertical,
|
|
6044
6621
|
justifyContent: "center"
|
|
6045
6622
|
},
|
|
6046
|
-
children: /* @__PURE__ */ (0,
|
|
6047
|
-
|
|
6623
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime43.jsx)(
|
|
6624
|
+
import_react_native42.Pressable,
|
|
6048
6625
|
{
|
|
6049
6626
|
accessibilityRole: "button",
|
|
6050
6627
|
accessibilityLabel,
|
|
@@ -6067,7 +6644,7 @@ function ReviewMergeRequestActionButton({
|
|
|
6067
6644
|
}
|
|
6068
6645
|
|
|
6069
6646
|
// src/components/merge-requests/ReviewMergeRequestCard.tsx
|
|
6070
|
-
var
|
|
6647
|
+
var import_jsx_runtime44 = require("react/jsx-runtime");
|
|
6071
6648
|
function ReviewMergeRequestCard({
|
|
6072
6649
|
mr,
|
|
6073
6650
|
index,
|
|
@@ -6086,12 +6663,12 @@ function ReviewMergeRequestCard({
|
|
|
6086
6663
|
const theme = useTheme();
|
|
6087
6664
|
const status = React31.useMemo(() => getMergeRequestStatusDisplay(mr.status), [mr.status]);
|
|
6088
6665
|
const canAct = mr.status === "open";
|
|
6089
|
-
const rotate = React31.useRef(new
|
|
6666
|
+
const rotate = React31.useRef(new import_react_native43.Animated.Value(isExpanded ? 1 : 0)).current;
|
|
6090
6667
|
React31.useEffect(() => {
|
|
6091
|
-
|
|
6668
|
+
import_react_native43.Animated.timing(rotate, { toValue: isExpanded ? 1 : 0, duration: 200, useNativeDriver: true }).start();
|
|
6092
6669
|
}, [isExpanded, rotate]);
|
|
6093
6670
|
const position = total > 1 ? `${index + 1}/${total}` : "Merge request";
|
|
6094
|
-
return /* @__PURE__ */ (0,
|
|
6671
|
+
return /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native43.Pressable, { onPress: onToggle, style: ({ pressed }) => ({ opacity: pressed ? 0.95 : 1 }), children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(
|
|
6095
6672
|
Card,
|
|
6096
6673
|
{
|
|
6097
6674
|
padded: false,
|
|
@@ -6104,10 +6681,10 @@ function ReviewMergeRequestCard({
|
|
|
6104
6681
|
}
|
|
6105
6682
|
],
|
|
6106
6683
|
children: [
|
|
6107
|
-
/* @__PURE__ */ (0,
|
|
6108
|
-
/* @__PURE__ */ (0,
|
|
6109
|
-
/* @__PURE__ */ (0,
|
|
6110
|
-
/* @__PURE__ */ (0,
|
|
6684
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_native43.View, { style: { flexDirection: "row", alignItems: "center", gap: 12 }, children: [
|
|
6685
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Avatar, { size: 40, uri: (creator == null ? void 0 : creator.avatar) ?? null, name: (creator == null ? void 0 : creator.name) ?? void 0 }),
|
|
6686
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_native43.View, { style: { flex: 1, minWidth: 0 }, children: [
|
|
6687
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6111
6688
|
Text,
|
|
6112
6689
|
{
|
|
6113
6690
|
style: { fontWeight: theme.typography.fontWeight.semibold, color: theme.colors.text, fontSize: 16, lineHeight: 20 },
|
|
@@ -6115,24 +6692,24 @@ function ReviewMergeRequestCard({
|
|
|
6115
6692
|
children: mr.title ?? "Untitled merge request"
|
|
6116
6693
|
}
|
|
6117
6694
|
),
|
|
6118
|
-
/* @__PURE__ */ (0,
|
|
6695
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(Text, { style: { color: theme.colors.textMuted, fontSize: 12, lineHeight: 16 }, numberOfLines: 1, children: [
|
|
6119
6696
|
(creator == null ? void 0 : creator.name) ?? "Loading...",
|
|
6120
6697
|
" \xB7 ",
|
|
6121
6698
|
position
|
|
6122
6699
|
] })
|
|
6123
6700
|
] }),
|
|
6124
|
-
/* @__PURE__ */ (0,
|
|
6125
|
-
|
|
6701
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6702
|
+
import_react_native43.Animated.View,
|
|
6126
6703
|
{
|
|
6127
6704
|
style: {
|
|
6128
6705
|
transform: [{ rotate: rotate.interpolate({ inputRange: [0, 1], outputRange: ["0deg", "180deg"] }) }]
|
|
6129
6706
|
},
|
|
6130
|
-
children: /* @__PURE__ */ (0,
|
|
6707
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react_native8.ChevronDown, { size: 20, color: withAlpha(theme.colors.textMuted, 0.4) })
|
|
6131
6708
|
}
|
|
6132
6709
|
)
|
|
6133
6710
|
] }),
|
|
6134
|
-
isExpanded ? /* @__PURE__ */ (0,
|
|
6135
|
-
/* @__PURE__ */ (0,
|
|
6711
|
+
isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_native43.View, { style: { marginTop: 16 }, children: [
|
|
6712
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6136
6713
|
Text,
|
|
6137
6714
|
{
|
|
6138
6715
|
style: {
|
|
@@ -6146,13 +6723,13 @@ function ReviewMergeRequestCard({
|
|
|
6146
6723
|
children: status.text
|
|
6147
6724
|
}
|
|
6148
6725
|
),
|
|
6149
|
-
/* @__PURE__ */ (0,
|
|
6150
|
-
mr.description ? /* @__PURE__ */ (0,
|
|
6726
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { style: { color: theme.colors.textMuted, fontSize: 12, lineHeight: 16, marginBottom: 12 }, children: creator ? `${creator.approvedOrMergedMergeRequests} approved merge${creator.approvedOrMergedMergeRequests !== 1 ? "s" : ""}` : "Loading stats..." }),
|
|
6727
|
+
mr.description ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(MarkdownText, { markdown: mr.description, variant: "mergeRequest" }) : null
|
|
6151
6728
|
] }) : null,
|
|
6152
|
-
/* @__PURE__ */ (0,
|
|
6153
|
-
/* @__PURE__ */ (0,
|
|
6154
|
-
/* @__PURE__ */ (0,
|
|
6155
|
-
/* @__PURE__ */ (0,
|
|
6729
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native43.View, { style: { height: 1, backgroundColor: withAlpha(theme.colors.borderStrong, 0.5), marginTop: 12, marginBottom: 12 } }),
|
|
6730
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_native43.View, { style: { flexDirection: "row", alignItems: "center", justifyContent: "space-between" }, children: [
|
|
6731
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_native43.View, { style: { flexDirection: "row", gap: 8 }, children: [
|
|
6732
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6156
6733
|
ReviewMergeRequestActionButton,
|
|
6157
6734
|
{
|
|
6158
6735
|
accessibilityLabel: "Reject",
|
|
@@ -6160,13 +6737,13 @@ function ReviewMergeRequestCard({
|
|
|
6160
6737
|
disabled: !canAct || isAnyProcessing,
|
|
6161
6738
|
onPress: onReject,
|
|
6162
6739
|
iconOnly: !isExpanded,
|
|
6163
|
-
children: /* @__PURE__ */ (0,
|
|
6164
|
-
/* @__PURE__ */ (0,
|
|
6165
|
-
isExpanded ? /* @__PURE__ */ (0,
|
|
6740
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_native43.View, { style: { flexDirection: "row", alignItems: "center", gap: isExpanded ? 4 : 0 }, children: [
|
|
6741
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react_native8.X, { size: 18, color: "#FFFFFF" }),
|
|
6742
|
+
isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { style: { fontSize: 13, color: "#FFFFFF", fontWeight: theme.typography.fontWeight.semibold }, children: "Reject" }) : null
|
|
6166
6743
|
] })
|
|
6167
6744
|
}
|
|
6168
6745
|
),
|
|
6169
|
-
/* @__PURE__ */ (0,
|
|
6746
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6170
6747
|
ReviewMergeRequestActionButton,
|
|
6171
6748
|
{
|
|
6172
6749
|
accessibilityLabel: !canAct ? "Not actionable" : isProcessing ? "Processing" : "Approve",
|
|
@@ -6174,17 +6751,17 @@ function ReviewMergeRequestCard({
|
|
|
6174
6751
|
disabled: !canAct || isAnyProcessing,
|
|
6175
6752
|
onPress: onApprove,
|
|
6176
6753
|
iconOnly: !isExpanded,
|
|
6177
|
-
children: isProcessing ? /* @__PURE__ */ (0,
|
|
6178
|
-
/* @__PURE__ */ (0,
|
|
6179
|
-
isExpanded ? /* @__PURE__ */ (0,
|
|
6180
|
-
] }) : /* @__PURE__ */ (0,
|
|
6181
|
-
/* @__PURE__ */ (0,
|
|
6182
|
-
isExpanded ? /* @__PURE__ */ (0,
|
|
6754
|
+
children: isProcessing ? /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_native43.View, { style: { flexDirection: "row", alignItems: "center", gap: isExpanded ? 4 : 0 }, children: [
|
|
6755
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native43.ActivityIndicator, { size: "small", color: "#FFFFFF" }),
|
|
6756
|
+
isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { style: { fontSize: 13, color: "#FFFFFF", fontWeight: theme.typography.fontWeight.semibold }, children: "Processing" }) : null
|
|
6757
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_native43.View, { style: { flexDirection: "row", alignItems: "center", gap: isExpanded ? 4 : 0 }, children: [
|
|
6758
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react_native8.Check, { size: 18, color: "#FFFFFF" }),
|
|
6759
|
+
isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { style: { fontSize: 13, color: "#FFFFFF", fontWeight: theme.typography.fontWeight.semibold }, children: "Approve" }) : null
|
|
6183
6760
|
] })
|
|
6184
6761
|
}
|
|
6185
6762
|
)
|
|
6186
6763
|
] }),
|
|
6187
|
-
/* @__PURE__ */ (0,
|
|
6764
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(
|
|
6188
6765
|
ReviewMergeRequestActionButton,
|
|
6189
6766
|
{
|
|
6190
6767
|
accessibilityLabel: "Test",
|
|
@@ -6192,9 +6769,9 @@ function ReviewMergeRequestCard({
|
|
|
6192
6769
|
disabled: isBuilding || isTestingThis,
|
|
6193
6770
|
onPress: onTest,
|
|
6194
6771
|
iconOnly: !isExpanded,
|
|
6195
|
-
children: isTestingThis ? /* @__PURE__ */ (0,
|
|
6196
|
-
/* @__PURE__ */ (0,
|
|
6197
|
-
isExpanded ? /* @__PURE__ */ (0,
|
|
6772
|
+
children: isTestingThis ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_react_native43.ActivityIndicator, { size: "small", color: "#888" }) : /* @__PURE__ */ (0, import_jsx_runtime44.jsxs)(import_react_native43.View, { style: { flexDirection: "row", alignItems: "center", gap: isExpanded ? 4 : 0 }, children: [
|
|
6773
|
+
/* @__PURE__ */ (0, import_jsx_runtime44.jsx)(import_lucide_react_native8.Play, { size: 14, color: theme.colors.text }),
|
|
6774
|
+
isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime44.jsx)(Text, { style: { fontSize: 13, color: theme.colors.text, fontWeight: theme.typography.fontWeight.semibold }, children: "Test" }) : null
|
|
6198
6775
|
] })
|
|
6199
6776
|
}
|
|
6200
6777
|
)
|
|
@@ -6205,7 +6782,7 @@ function ReviewMergeRequestCard({
|
|
|
6205
6782
|
}
|
|
6206
6783
|
|
|
6207
6784
|
// src/components/merge-requests/ReviewMergeRequestCarousel.tsx
|
|
6208
|
-
var
|
|
6785
|
+
var import_jsx_runtime45 = require("react/jsx-runtime");
|
|
6209
6786
|
function ReviewMergeRequestCarousel({
|
|
6210
6787
|
mergeRequests,
|
|
6211
6788
|
creatorStatsById,
|
|
@@ -6218,32 +6795,32 @@ function ReviewMergeRequestCarousel({
|
|
|
6218
6795
|
style
|
|
6219
6796
|
}) {
|
|
6220
6797
|
const theme = useTheme();
|
|
6221
|
-
const { width } = (0,
|
|
6798
|
+
const { width } = (0, import_react_native44.useWindowDimensions)();
|
|
6222
6799
|
const [expanded, setExpanded] = React32.useState({});
|
|
6223
|
-
const carouselScrollX = React32.useRef(new
|
|
6800
|
+
const carouselScrollX = React32.useRef(new import_react_native44.Animated.Value(0)).current;
|
|
6224
6801
|
const peekAmount = 24;
|
|
6225
6802
|
const gap = 16;
|
|
6226
6803
|
const cardWidth = React32.useMemo(() => Math.max(1, width - theme.spacing.lg * 2 - peekAmount), [peekAmount, theme.spacing.lg, width]);
|
|
6227
6804
|
const snapInterval = cardWidth + gap;
|
|
6228
6805
|
const dotColor = theme.scheme === "dark" ? "#FFFFFF" : "#000000";
|
|
6229
6806
|
if (mergeRequests.length === 0) return null;
|
|
6230
|
-
return /* @__PURE__ */ (0,
|
|
6231
|
-
/* @__PURE__ */ (0,
|
|
6232
|
-
|
|
6807
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsxs)(import_react_native44.View, { style: [{ marginHorizontal: -theme.spacing.lg }, style], children: [
|
|
6808
|
+
/* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
6809
|
+
import_react_native44.FlatList,
|
|
6233
6810
|
{
|
|
6234
6811
|
horizontal: true,
|
|
6235
6812
|
data: mergeRequests,
|
|
6236
6813
|
keyExtractor: (mr) => mr.id,
|
|
6237
6814
|
showsHorizontalScrollIndicator: false,
|
|
6238
6815
|
contentContainerStyle: { paddingHorizontal: theme.spacing.lg, paddingVertical: theme.spacing.sm },
|
|
6239
|
-
ItemSeparatorComponent: () => /* @__PURE__ */ (0,
|
|
6816
|
+
ItemSeparatorComponent: () => /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native44.View, { style: { width: gap } }),
|
|
6240
6817
|
snapToAlignment: "start",
|
|
6241
6818
|
decelerationRate: "fast",
|
|
6242
6819
|
snapToInterval: snapInterval,
|
|
6243
6820
|
disableIntervalMomentum: true,
|
|
6244
6821
|
style: { paddingRight: peekAmount },
|
|
6245
|
-
ListFooterComponent: /* @__PURE__ */ (0,
|
|
6246
|
-
onScroll:
|
|
6822
|
+
ListFooterComponent: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native44.View, { style: { width: peekAmount } }),
|
|
6823
|
+
onScroll: import_react_native44.Animated.event([{ nativeEvent: { contentOffset: { x: carouselScrollX } } }], {
|
|
6247
6824
|
useNativeDriver: false
|
|
6248
6825
|
}),
|
|
6249
6826
|
scrollEventThrottle: 16,
|
|
@@ -6254,7 +6831,7 @@ function ReviewMergeRequestCarousel({
|
|
|
6254
6831
|
const isProcessing = Boolean(processingMrId && processingMrId === item.id);
|
|
6255
6832
|
const isAnyProcessing = Boolean(processingMrId);
|
|
6256
6833
|
const isTestingThis = Boolean(testingMrId && testingMrId === item.id);
|
|
6257
|
-
return /* @__PURE__ */ (0,
|
|
6834
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native44.View, { style: { width: cardWidth }, children: /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
6258
6835
|
ReviewMergeRequestCard,
|
|
6259
6836
|
{
|
|
6260
6837
|
mr: item,
|
|
@@ -6275,7 +6852,7 @@ function ReviewMergeRequestCarousel({
|
|
|
6275
6852
|
}
|
|
6276
6853
|
}
|
|
6277
6854
|
),
|
|
6278
|
-
mergeRequests.length >= 1 ? /* @__PURE__ */ (0,
|
|
6855
|
+
mergeRequests.length >= 1 ? /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(import_react_native44.View, { style: { flexDirection: "row", justifyContent: "center", columnGap: 8, marginTop: theme.spacing.md }, children: mergeRequests.map((mr, index) => {
|
|
6279
6856
|
const inputRange = [(index - 1) * snapInterval, index * snapInterval, (index + 1) * snapInterval];
|
|
6280
6857
|
const scale = carouselScrollX.interpolate({
|
|
6281
6858
|
inputRange,
|
|
@@ -6287,8 +6864,8 @@ function ReviewMergeRequestCarousel({
|
|
|
6287
6864
|
outputRange: [0.4, 1, 0.4],
|
|
6288
6865
|
extrapolate: "clamp"
|
|
6289
6866
|
});
|
|
6290
|
-
return /* @__PURE__ */ (0,
|
|
6291
|
-
|
|
6867
|
+
return /* @__PURE__ */ (0, import_jsx_runtime45.jsx)(
|
|
6868
|
+
import_react_native44.Animated.View,
|
|
6292
6869
|
{
|
|
6293
6870
|
style: {
|
|
6294
6871
|
width: 8,
|
|
@@ -6306,7 +6883,7 @@ function ReviewMergeRequestCarousel({
|
|
|
6306
6883
|
}
|
|
6307
6884
|
|
|
6308
6885
|
// src/studio/ui/preview-panel/PreviewCollaborateSection.tsx
|
|
6309
|
-
var
|
|
6886
|
+
var import_jsx_runtime46 = require("react/jsx-runtime");
|
|
6310
6887
|
function PreviewCollaborateSection({
|
|
6311
6888
|
canSubmitMergeRequest,
|
|
6312
6889
|
canSyncUpstream,
|
|
@@ -6332,9 +6909,9 @@ function PreviewCollaborateSection({
|
|
|
6332
6909
|
if (!hasSection) return null;
|
|
6333
6910
|
const isSyncing = Boolean(syncingUpstream || syncingLocal);
|
|
6334
6911
|
const showActionsSubtitle = canSubmitMergeRequest && onSubmitMergeRequest || canSyncUpstream && onSyncUpstream || onTestMr && incomingMergeRequests.length > 0;
|
|
6335
|
-
return /* @__PURE__ */ (0,
|
|
6336
|
-
/* @__PURE__ */ (0,
|
|
6337
|
-
showActionsSubtitle ? /* @__PURE__ */ (0,
|
|
6912
|
+
return /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
6913
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(SectionTitle, { marginTop: theme.spacing.xl, children: "Collaborate" }),
|
|
6914
|
+
showActionsSubtitle ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6338
6915
|
Text,
|
|
6339
6916
|
{
|
|
6340
6917
|
style: {
|
|
@@ -6349,13 +6926,13 @@ function PreviewCollaborateSection({
|
|
|
6349
6926
|
children: "Actions"
|
|
6350
6927
|
}
|
|
6351
6928
|
) : null,
|
|
6352
|
-
canSubmitMergeRequest && onSubmitMergeRequest ? /* @__PURE__ */ (0,
|
|
6929
|
+
canSubmitMergeRequest && onSubmitMergeRequest ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6353
6930
|
PressableCardRow,
|
|
6354
6931
|
{
|
|
6355
6932
|
accessibilityLabel: "Submit merge request",
|
|
6356
6933
|
disabled: submittingMr,
|
|
6357
6934
|
onPress: () => {
|
|
6358
|
-
|
|
6935
|
+
import_react_native45.Alert.alert(
|
|
6359
6936
|
"Submit Merge Request",
|
|
6360
6937
|
"Are you sure you want to submit your changes to the original app?",
|
|
6361
6938
|
[
|
|
@@ -6380,8 +6957,8 @@ function PreviewCollaborateSection({
|
|
|
6380
6957
|
borderColor: withAlpha("#03DAC6", 0.2),
|
|
6381
6958
|
marginBottom: theme.spacing.sm
|
|
6382
6959
|
},
|
|
6383
|
-
left: /* @__PURE__ */ (0,
|
|
6384
|
-
|
|
6960
|
+
left: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6961
|
+
import_react_native45.View,
|
|
6385
6962
|
{
|
|
6386
6963
|
style: {
|
|
6387
6964
|
width: 40,
|
|
@@ -6392,21 +6969,21 @@ function PreviewCollaborateSection({
|
|
|
6392
6969
|
backgroundColor: withAlpha("#03DAC6", 0.1),
|
|
6393
6970
|
marginRight: theme.spacing.lg
|
|
6394
6971
|
},
|
|
6395
|
-
children: submittingMr ? /* @__PURE__ */ (0,
|
|
6972
|
+
children: submittingMr ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native45.ActivityIndicator, { color: "#03DAC6", size: "small" }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(MergeIcon, { width: 20, height: 20, color: "#03DAC6" })
|
|
6396
6973
|
}
|
|
6397
6974
|
),
|
|
6398
|
-
title: /* @__PURE__ */ (0,
|
|
6399
|
-
subtitle: /* @__PURE__ */ (0,
|
|
6400
|
-
right: /* @__PURE__ */ (0,
|
|
6975
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text, { style: { color: theme.colors.text, fontSize: 16, lineHeight: 20, fontWeight: theme.typography.fontWeight.semibold }, children: "Submit your new changes" }),
|
|
6976
|
+
subtitle: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text, { style: { color: theme.colors.textMuted, fontSize: 12, lineHeight: 16, marginTop: 2 }, children: "Ask to merge this remix to the original app" }),
|
|
6977
|
+
right: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react_native9.Send, { size: 16, color: "#03DAC6" })
|
|
6401
6978
|
}
|
|
6402
6979
|
) : null,
|
|
6403
|
-
canSyncUpstream && onSyncUpstream ? /* @__PURE__ */ (0,
|
|
6980
|
+
canSyncUpstream && onSyncUpstream ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6404
6981
|
PressableCardRow,
|
|
6405
6982
|
{
|
|
6406
6983
|
accessibilityLabel: "Sync from original",
|
|
6407
6984
|
disabled: isSyncing,
|
|
6408
6985
|
onPress: () => {
|
|
6409
|
-
|
|
6986
|
+
import_react_native45.Alert.alert(
|
|
6410
6987
|
"Sync from Original",
|
|
6411
6988
|
"This will pull the latest upstream changes into your remix.",
|
|
6412
6989
|
[
|
|
@@ -6418,12 +6995,12 @@ function PreviewCollaborateSection({
|
|
|
6418
6995
|
setSyncingLocal(true);
|
|
6419
6996
|
Promise.resolve(onSyncUpstream()).then((result) => {
|
|
6420
6997
|
if ((result == null ? void 0 : result.status) === "up-to-date") {
|
|
6421
|
-
|
|
6998
|
+
import_react_native45.Alert.alert("Up to date", "Your remix already includes the latest upstream changes.");
|
|
6422
6999
|
} else {
|
|
6423
|
-
|
|
7000
|
+
import_react_native45.Alert.alert("Sync started", "Upstream changes are being merged into your remix.");
|
|
6424
7001
|
}
|
|
6425
7002
|
}).catch(() => {
|
|
6426
|
-
|
|
7003
|
+
import_react_native45.Alert.alert("Sync failed", "We could not start the sync. Please try again.");
|
|
6427
7004
|
}).finally(() => setSyncingLocal(false));
|
|
6428
7005
|
}
|
|
6429
7006
|
}
|
|
@@ -6438,8 +7015,8 @@ function PreviewCollaborateSection({
|
|
|
6438
7015
|
borderColor: withAlpha(theme.colors.primary, 0.25),
|
|
6439
7016
|
marginBottom: theme.spacing.sm
|
|
6440
7017
|
},
|
|
6441
|
-
left: /* @__PURE__ */ (0,
|
|
6442
|
-
|
|
7018
|
+
left: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
7019
|
+
import_react_native45.View,
|
|
6443
7020
|
{
|
|
6444
7021
|
style: {
|
|
6445
7022
|
width: 40,
|
|
@@ -6450,15 +7027,15 @@ function PreviewCollaborateSection({
|
|
|
6450
7027
|
backgroundColor: withAlpha(theme.colors.primary, 0.12),
|
|
6451
7028
|
marginRight: theme.spacing.lg
|
|
6452
7029
|
},
|
|
6453
|
-
children: isSyncing ? /* @__PURE__ */ (0,
|
|
7030
|
+
children: isSyncing ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native45.ActivityIndicator, { color: theme.colors.primary, size: "small" }) : /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react_native9.RefreshCw, { size: 18, color: theme.colors.primary })
|
|
6454
7031
|
}
|
|
6455
7032
|
),
|
|
6456
|
-
title: /* @__PURE__ */ (0,
|
|
6457
|
-
subtitle: /* @__PURE__ */ (0,
|
|
6458
|
-
right: /* @__PURE__ */ (0,
|
|
7033
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text, { style: { color: theme.colors.text, fontSize: 16, lineHeight: 20, fontWeight: theme.typography.fontWeight.semibold }, children: "Sync from Original" }),
|
|
7034
|
+
subtitle: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(Text, { style: { color: theme.colors.textMuted, fontSize: 12, lineHeight: 16, marginTop: 2 }, children: isSyncing ? "Syncing upstream changes..." : upstreamSyncStatus === "up-to-date" ? "You are already up to date with the original app" : "Pull the latest upstream changes into this remix" }),
|
|
7035
|
+
right: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_lucide_react_native9.RefreshCw, { size: 16, color: theme.colors.primary })
|
|
6459
7036
|
}
|
|
6460
7037
|
) : null,
|
|
6461
|
-
onTestMr && incomingMergeRequests.length > 0 ? /* @__PURE__ */ (0,
|
|
7038
|
+
onTestMr && incomingMergeRequests.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6462
7039
|
ReviewMergeRequestCarousel,
|
|
6463
7040
|
{
|
|
6464
7041
|
mergeRequests: incomingMergeRequests,
|
|
@@ -6471,8 +7048,8 @@ function PreviewCollaborateSection({
|
|
|
6471
7048
|
onTest: (mr) => onTestMr ? onTestMr(mr) : void 0
|
|
6472
7049
|
}
|
|
6473
7050
|
) : null,
|
|
6474
|
-
outgoingMergeRequests.length > 0 ? /* @__PURE__ */ (0,
|
|
6475
|
-
/* @__PURE__ */ (0,
|
|
7051
|
+
outgoingMergeRequests.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime46.jsxs)(import_jsx_runtime46.Fragment, { children: [
|
|
7052
|
+
/* @__PURE__ */ (0, import_jsx_runtime46.jsx)(
|
|
6476
7053
|
Text,
|
|
6477
7054
|
{
|
|
6478
7055
|
style: {
|
|
@@ -6488,7 +7065,7 @@ function PreviewCollaborateSection({
|
|
|
6488
7065
|
children: "History"
|
|
6489
7066
|
}
|
|
6490
7067
|
),
|
|
6491
|
-
outgoingMergeRequests.map((mr) => /* @__PURE__ */ (0,
|
|
7068
|
+
outgoingMergeRequests.map((mr) => /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(import_react_native45.View, { style: { marginBottom: theme.spacing.sm }, children: /* @__PURE__ */ (0, import_jsx_runtime46.jsx)(MergeRequestStatusCard, { mergeRequest: toMergeRequestSummary(mr) }) }, mr.id))
|
|
6492
7069
|
] }) : null
|
|
6493
7070
|
] });
|
|
6494
7071
|
}
|
|
@@ -6796,7 +7373,7 @@ function usePreviewPanelData(params) {
|
|
|
6796
7373
|
}
|
|
6797
7374
|
|
|
6798
7375
|
// src/studio/ui/PreviewPanel.tsx
|
|
6799
|
-
var
|
|
7376
|
+
var import_jsx_runtime47 = require("react/jsx-runtime");
|
|
6800
7377
|
function PreviewPanel({
|
|
6801
7378
|
app,
|
|
6802
7379
|
loading,
|
|
@@ -6836,7 +7413,7 @@ ${shareUrl}` : `Check out this app on Remix
|
|
|
6836
7413
|
${shareUrl}`;
|
|
6837
7414
|
try {
|
|
6838
7415
|
const title = app.name ?? "Remix app";
|
|
6839
|
-
const payload =
|
|
7416
|
+
const payload = import_react_native46.Platform.OS === "ios" ? {
|
|
6840
7417
|
title,
|
|
6841
7418
|
message
|
|
6842
7419
|
} : {
|
|
@@ -6844,7 +7421,7 @@ ${shareUrl}`;
|
|
|
6844
7421
|
message,
|
|
6845
7422
|
url: shareUrl
|
|
6846
7423
|
};
|
|
6847
|
-
await
|
|
7424
|
+
await import_react_native46.Share.share(payload);
|
|
6848
7425
|
await trackShareApp({
|
|
6849
7426
|
appId: app.id,
|
|
6850
7427
|
success: true
|
|
@@ -6875,7 +7452,7 @@ ${shareUrl}`;
|
|
|
6875
7452
|
onOpenComments,
|
|
6876
7453
|
commentCountOverride
|
|
6877
7454
|
});
|
|
6878
|
-
const header = /* @__PURE__ */ (0,
|
|
7455
|
+
const header = /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6879
7456
|
PreviewPanelHeader,
|
|
6880
7457
|
{
|
|
6881
7458
|
isOwner,
|
|
@@ -6883,23 +7460,18 @@ ${shareUrl}`;
|
|
|
6883
7460
|
onClose,
|
|
6884
7461
|
onNavigateHome,
|
|
6885
7462
|
onGoToChat,
|
|
6886
|
-
onShare: handleShare
|
|
6887
|
-
relatedApps,
|
|
6888
|
-
relatedAppsLoading,
|
|
6889
|
-
switchingRelatedAppId,
|
|
6890
|
-
onOpenRelatedApps,
|
|
6891
|
-
onSwitchRelatedApp
|
|
7463
|
+
onShare: handleShare
|
|
6892
7464
|
}
|
|
6893
7465
|
);
|
|
6894
7466
|
if (loading || !app) {
|
|
6895
|
-
return /* @__PURE__ */ (0,
|
|
6896
|
-
/* @__PURE__ */ (0,
|
|
6897
|
-
/* @__PURE__ */ (0,
|
|
6898
|
-
/* @__PURE__ */ (0,
|
|
7467
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsx)(PreviewPage, { header, children: /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(import_react_native46.View, { style: { flex: 1, justifyContent: "center", alignItems: "center", padding: 24 }, children: [
|
|
7468
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native46.ActivityIndicator, {}),
|
|
7469
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(import_react_native46.View, { style: { height: 12 } }),
|
|
7470
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(Text, { variant: "bodyMuted", children: "Loading app\u2026" })
|
|
6899
7471
|
] }) });
|
|
6900
7472
|
}
|
|
6901
|
-
return /* @__PURE__ */ (0,
|
|
6902
|
-
/* @__PURE__ */ (0,
|
|
7473
|
+
return /* @__PURE__ */ (0, import_jsx_runtime47.jsxs)(PreviewPage, { header, children: [
|
|
7474
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6903
7475
|
PreviewHeroSection,
|
|
6904
7476
|
{
|
|
6905
7477
|
appStatus: app.status,
|
|
@@ -6917,8 +7489,18 @@ ${shareUrl}`;
|
|
|
6917
7489
|
}
|
|
6918
7490
|
}
|
|
6919
7491
|
),
|
|
6920
|
-
/* @__PURE__ */ (0,
|
|
6921
|
-
/* @__PURE__ */ (0,
|
|
7492
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(PreviewMetaSection, { app, isOwner, creator, downloadsCount: insights.downloads }),
|
|
7493
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
7494
|
+
PreviewRelatedAppsSection,
|
|
7495
|
+
{
|
|
7496
|
+
relatedApps,
|
|
7497
|
+
relatedAppsLoading,
|
|
7498
|
+
switchingRelatedAppId,
|
|
7499
|
+
onOpenRelatedApps,
|
|
7500
|
+
onSwitchRelatedApp
|
|
7501
|
+
}
|
|
7502
|
+
),
|
|
7503
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6922
7504
|
PreviewCustomizeSection,
|
|
6923
7505
|
{
|
|
6924
7506
|
app,
|
|
@@ -6929,7 +7511,7 @@ ${shareUrl}`;
|
|
|
6929
7511
|
onStartDraw
|
|
6930
7512
|
}
|
|
6931
7513
|
),
|
|
6932
|
-
/* @__PURE__ */ (0,
|
|
7514
|
+
/* @__PURE__ */ (0, import_jsx_runtime47.jsx)(
|
|
6933
7515
|
PreviewCollaborateSection,
|
|
6934
7516
|
{
|
|
6935
7517
|
canSubmitMergeRequest,
|
|
@@ -6955,26 +7537,26 @@ ${shareUrl}`;
|
|
|
6955
7537
|
|
|
6956
7538
|
// src/studio/ui/ChatPanel.tsx
|
|
6957
7539
|
var React43 = __toESM(require("react"));
|
|
6958
|
-
var
|
|
7540
|
+
var import_react_native58 = require("react-native");
|
|
6959
7541
|
|
|
6960
7542
|
// src/components/chat/ChatPage.tsx
|
|
6961
7543
|
var React40 = __toESM(require("react"));
|
|
6962
|
-
var
|
|
7544
|
+
var import_react_native51 = require("react-native");
|
|
6963
7545
|
var import_react_native_safe_area_context4 = require("react-native-safe-area-context");
|
|
6964
7546
|
|
|
6965
7547
|
// src/components/chat/ChatMessageList.tsx
|
|
6966
7548
|
var React39 = __toESM(require("react"));
|
|
6967
|
-
var
|
|
7549
|
+
var import_react_native50 = require("react-native");
|
|
6968
7550
|
var import_bottom_sheet5 = require("@gorhom/bottom-sheet");
|
|
6969
7551
|
|
|
6970
7552
|
// src/components/chat/ChatMessageBubble.tsx
|
|
6971
7553
|
var React37 = __toESM(require("react"));
|
|
6972
|
-
var
|
|
7554
|
+
var import_react_native48 = require("react-native");
|
|
6973
7555
|
var import_lucide_react_native10 = require("lucide-react-native");
|
|
6974
7556
|
|
|
6975
7557
|
// src/components/primitives/Button.tsx
|
|
6976
|
-
var
|
|
6977
|
-
var
|
|
7558
|
+
var import_react_native47 = require("react-native");
|
|
7559
|
+
var import_jsx_runtime48 = require("react/jsx-runtime");
|
|
6978
7560
|
function backgroundFor2(variant, theme, pressed, disabled) {
|
|
6979
7561
|
const { colors } = theme;
|
|
6980
7562
|
if (variant === "ghost") return "transparent";
|
|
@@ -7010,8 +7592,8 @@ function Button({
|
|
|
7010
7592
|
}) {
|
|
7011
7593
|
const theme = useTheme();
|
|
7012
7594
|
const isDisabled = disabled ?? void 0;
|
|
7013
|
-
return /* @__PURE__ */ (0,
|
|
7014
|
-
|
|
7595
|
+
return /* @__PURE__ */ (0, import_jsx_runtime48.jsx)(
|
|
7596
|
+
import_react_native47.Pressable,
|
|
7015
7597
|
{
|
|
7016
7598
|
...props,
|
|
7017
7599
|
disabled: isDisabled,
|
|
@@ -7036,7 +7618,7 @@ function Button({
|
|
|
7036
7618
|
}
|
|
7037
7619
|
|
|
7038
7620
|
// src/components/chat/ChatMessageBubble.tsx
|
|
7039
|
-
var
|
|
7621
|
+
var import_jsx_runtime49 = require("react/jsx-runtime");
|
|
7040
7622
|
function areMessageMetaEqual(a, b) {
|
|
7041
7623
|
if (a === b) return true;
|
|
7042
7624
|
if (!a || !b) return a === b;
|
|
@@ -7069,8 +7651,8 @@ function ChatMessageBubbleInner({
|
|
|
7069
7651
|
const handleRetryPress = React37.useCallback(() => {
|
|
7070
7652
|
onRetryMessage == null ? void 0 : onRetryMessage(message.id);
|
|
7071
7653
|
}, [message.id, onRetryMessage]);
|
|
7072
|
-
return /* @__PURE__ */ (0,
|
|
7073
|
-
/* @__PURE__ */ (0,
|
|
7654
|
+
return /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_react_native48.View, { style: [align, style], children: [
|
|
7655
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
7074
7656
|
Surface,
|
|
7075
7657
|
{
|
|
7076
7658
|
variant: bubbleVariant,
|
|
@@ -7085,14 +7667,14 @@ function ChatMessageBubbleInner({
|
|
|
7085
7667
|
},
|
|
7086
7668
|
cornerStyle
|
|
7087
7669
|
],
|
|
7088
|
-
children: /* @__PURE__ */ (0,
|
|
7089
|
-
isMergeCompleted || isSyncCompleted ? /* @__PURE__ */ (0,
|
|
7090
|
-
isMergeApproved || isSyncStarted ? /* @__PURE__ */ (0,
|
|
7091
|
-
/* @__PURE__ */ (0,
|
|
7670
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_react_native48.View, { style: { flexDirection: "row", alignItems: "center" }, children: [
|
|
7671
|
+
isMergeCompleted || isSyncCompleted ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react_native10.CheckCheck, { size: 16, color: theme.colors.success, style: { marginRight: theme.spacing.sm } }) : null,
|
|
7672
|
+
isMergeApproved || isSyncStarted ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react_native10.GitMerge, { size: 16, color: theme.colors.text, style: { marginRight: theme.spacing.sm } }) : null,
|
|
7673
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react_native48.View, { style: { flexShrink: 1, minWidth: 0 }, children: renderContent ? renderContent(message) : /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(MarkdownText, { markdown: message.content, variant: "chat", bodyColor }) })
|
|
7092
7674
|
] })
|
|
7093
7675
|
}
|
|
7094
7676
|
),
|
|
7095
|
-
showRetry ? /* @__PURE__ */ (0,
|
|
7677
|
+
showRetry ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_react_native48.View, { style: { marginTop: theme.spacing.xs, alignSelf: align.alignSelf }, children: /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
7096
7678
|
Button,
|
|
7097
7679
|
{
|
|
7098
7680
|
variant: "ghost",
|
|
@@ -7101,9 +7683,9 @@ function ChatMessageBubbleInner({
|
|
|
7101
7683
|
disabled: retrying,
|
|
7102
7684
|
style: { borderColor: theme.colors.danger },
|
|
7103
7685
|
accessibilityLabel: "Retry send",
|
|
7104
|
-
children: /* @__PURE__ */ (0,
|
|
7105
|
-
!retrying ? /* @__PURE__ */ (0,
|
|
7106
|
-
/* @__PURE__ */ (0,
|
|
7686
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime49.jsxs)(import_react_native48.View, { style: { flexDirection: "row", alignItems: "center" }, children: [
|
|
7687
|
+
!retrying ? /* @__PURE__ */ (0, import_jsx_runtime49.jsx)(import_lucide_react_native10.RotateCcw, { size: 14, color: theme.colors.danger }) : null,
|
|
7688
|
+
/* @__PURE__ */ (0, import_jsx_runtime49.jsx)(
|
|
7107
7689
|
Text,
|
|
7108
7690
|
{
|
|
7109
7691
|
variant: "caption",
|
|
@@ -7126,23 +7708,23 @@ ChatMessageBubble.displayName = "ChatMessageBubble";
|
|
|
7126
7708
|
|
|
7127
7709
|
// src/components/chat/TypingIndicator.tsx
|
|
7128
7710
|
var React38 = __toESM(require("react"));
|
|
7129
|
-
var
|
|
7130
|
-
var
|
|
7711
|
+
var import_react_native49 = require("react-native");
|
|
7712
|
+
var import_jsx_runtime50 = require("react/jsx-runtime");
|
|
7131
7713
|
function TypingIndicator({ style }) {
|
|
7132
7714
|
const theme = useTheme();
|
|
7133
7715
|
const dotColor = theme.colors.textSubtle;
|
|
7134
7716
|
const anims = React38.useMemo(
|
|
7135
|
-
() => [new
|
|
7717
|
+
() => [new import_react_native49.Animated.Value(0.3), new import_react_native49.Animated.Value(0.3), new import_react_native49.Animated.Value(0.3)],
|
|
7136
7718
|
[]
|
|
7137
7719
|
);
|
|
7138
7720
|
React38.useEffect(() => {
|
|
7139
7721
|
const loops = [];
|
|
7140
7722
|
anims.forEach((a, idx) => {
|
|
7141
|
-
const seq =
|
|
7142
|
-
|
|
7143
|
-
|
|
7723
|
+
const seq = import_react_native49.Animated.sequence([
|
|
7724
|
+
import_react_native49.Animated.timing(a, { toValue: 1, duration: 420, useNativeDriver: true, delay: idx * 140 }),
|
|
7725
|
+
import_react_native49.Animated.timing(a, { toValue: 0.3, duration: 420, useNativeDriver: true })
|
|
7144
7726
|
]);
|
|
7145
|
-
const loop =
|
|
7727
|
+
const loop = import_react_native49.Animated.loop(seq);
|
|
7146
7728
|
loops.push(loop);
|
|
7147
7729
|
loop.start();
|
|
7148
7730
|
});
|
|
@@ -7150,8 +7732,8 @@ function TypingIndicator({ style }) {
|
|
|
7150
7732
|
loops.forEach((l) => l.stop());
|
|
7151
7733
|
};
|
|
7152
7734
|
}, [anims]);
|
|
7153
|
-
return /* @__PURE__ */ (0,
|
|
7154
|
-
|
|
7735
|
+
return /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_react_native49.View, { style: [{ flexDirection: "row", alignItems: "center" }, style], children: anims.map((a, i) => /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
|
|
7736
|
+
import_react_native49.Animated.View,
|
|
7155
7737
|
{
|
|
7156
7738
|
style: {
|
|
7157
7739
|
width: 8,
|
|
@@ -7160,7 +7742,7 @@ function TypingIndicator({ style }) {
|
|
|
7160
7742
|
marginHorizontal: 3,
|
|
7161
7743
|
backgroundColor: dotColor,
|
|
7162
7744
|
opacity: a,
|
|
7163
|
-
transform: [{ translateY:
|
|
7745
|
+
transform: [{ translateY: import_react_native49.Animated.multiply(import_react_native49.Animated.subtract(a, 0.3), 2) }]
|
|
7164
7746
|
}
|
|
7165
7747
|
},
|
|
7166
7748
|
i
|
|
@@ -7168,7 +7750,7 @@ function TypingIndicator({ style }) {
|
|
|
7168
7750
|
}
|
|
7169
7751
|
|
|
7170
7752
|
// src/components/chat/ChatMessageList.tsx
|
|
7171
|
-
var
|
|
7753
|
+
var import_jsx_runtime51 = require("react/jsx-runtime");
|
|
7172
7754
|
var ChatMessageList = React39.forwardRef(
|
|
7173
7755
|
({
|
|
7174
7756
|
messages,
|
|
@@ -7244,16 +7826,16 @@ var ChatMessageList = React39.forwardRef(
|
|
|
7244
7826
|
],
|
|
7245
7827
|
[contentStyle, theme.spacing.lg, theme.spacing.sm]
|
|
7246
7828
|
);
|
|
7247
|
-
const renderSeparator = React39.useCallback(() => /* @__PURE__ */ (0,
|
|
7829
|
+
const renderSeparator = React39.useCallback(() => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react_native50.View, { style: { height: theme.spacing.sm } }), [theme.spacing.sm]);
|
|
7248
7830
|
const listHeader = React39.useMemo(
|
|
7249
|
-
() => /* @__PURE__ */ (0,
|
|
7250
|
-
showTypingIndicator ? /* @__PURE__ */ (0,
|
|
7251
|
-
bottomInset > 0 ? /* @__PURE__ */ (0,
|
|
7831
|
+
() => /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(import_react_native50.View, { children: [
|
|
7832
|
+
showTypingIndicator ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react_native50.View, { style: { marginTop: theme.spacing.sm, alignSelf: "flex-start", paddingHorizontal: theme.spacing.lg }, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(TypingIndicator, {}) }) : null,
|
|
7833
|
+
bottomInset > 0 ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_react_native50.View, { style: { height: bottomInset } }) : null
|
|
7252
7834
|
] }),
|
|
7253
7835
|
[bottomInset, showTypingIndicator, theme.spacing.lg, theme.spacing.sm]
|
|
7254
7836
|
);
|
|
7255
7837
|
const renderItem = React39.useCallback(
|
|
7256
|
-
({ item }) => /* @__PURE__ */ (0,
|
|
7838
|
+
({ item }) => /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7257
7839
|
ChatMessageBubble,
|
|
7258
7840
|
{
|
|
7259
7841
|
message: item,
|
|
@@ -7265,7 +7847,7 @@ var ChatMessageList = React39.forwardRef(
|
|
|
7265
7847
|
),
|
|
7266
7848
|
[isRetryingMessage, lastMessageId, onRetryMessage, renderMessageContent]
|
|
7267
7849
|
);
|
|
7268
|
-
return /* @__PURE__ */ (0,
|
|
7850
|
+
return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
|
|
7269
7851
|
import_bottom_sheet5.BottomSheetFlatList,
|
|
7270
7852
|
{
|
|
7271
7853
|
ref: listRef,
|
|
@@ -7288,7 +7870,7 @@ var ChatMessageList = React39.forwardRef(
|
|
|
7288
7870
|
ChatMessageList.displayName = "ChatMessageList";
|
|
7289
7871
|
|
|
7290
7872
|
// src/components/chat/ChatPage.tsx
|
|
7291
|
-
var
|
|
7873
|
+
var import_jsx_runtime52 = require("react/jsx-runtime");
|
|
7292
7874
|
function ChatPage({
|
|
7293
7875
|
header,
|
|
7294
7876
|
messages,
|
|
@@ -7309,7 +7891,7 @@ function ChatPage({
|
|
|
7309
7891
|
const insets = (0, import_react_native_safe_area_context4.useSafeAreaInsets)();
|
|
7310
7892
|
const [composerHeight, setComposerHeight] = React40.useState(0);
|
|
7311
7893
|
const [composerTopHeight, setComposerTopHeight] = React40.useState(0);
|
|
7312
|
-
const footerBottomPadding =
|
|
7894
|
+
const footerBottomPadding = import_react_native51.Platform.OS === "ios" ? insets.bottom - 24 : insets.bottom + 10;
|
|
7313
7895
|
const totalComposerHeight = composerHeight + composerTopHeight;
|
|
7314
7896
|
const overlayBottom = totalComposerHeight + footerBottomPadding + theme.spacing.lg;
|
|
7315
7897
|
const bottomInset = totalComposerHeight + footerBottomPadding + theme.spacing.xl;
|
|
@@ -7326,16 +7908,16 @@ function ChatPage({
|
|
|
7326
7908
|
if (composerTop) return;
|
|
7327
7909
|
setComposerTopHeight(0);
|
|
7328
7910
|
}, [composerTop]);
|
|
7329
|
-
return /* @__PURE__ */ (0,
|
|
7330
|
-
header ? /* @__PURE__ */ (0,
|
|
7331
|
-
topBanner ? /* @__PURE__ */ (0,
|
|
7332
|
-
/* @__PURE__ */ (0,
|
|
7333
|
-
/* @__PURE__ */ (0,
|
|
7334
|
-
|
|
7911
|
+
return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_react_native51.View, { style: [{ flex: 1 }, style], children: [
|
|
7912
|
+
header ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react_native51.View, { children: header }) : null,
|
|
7913
|
+
topBanner ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(import_react_native51.View, { style: { paddingHorizontal: theme.spacing.lg, paddingTop: theme.spacing.sm }, children: topBanner }) : null,
|
|
7914
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(import_react_native51.View, { style: { flex: 1 }, children: [
|
|
7915
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
7916
|
+
import_react_native51.View,
|
|
7335
7917
|
{
|
|
7336
7918
|
style: { flex: 1 },
|
|
7337
7919
|
children: [
|
|
7338
|
-
/* @__PURE__ */ (0,
|
|
7920
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
7339
7921
|
ChatMessageList,
|
|
7340
7922
|
{
|
|
7341
7923
|
ref: listRef,
|
|
@@ -7352,8 +7934,8 @@ function ChatPage({
|
|
|
7352
7934
|
]
|
|
7353
7935
|
}
|
|
7354
7936
|
),
|
|
7355
|
-
/* @__PURE__ */ (0,
|
|
7356
|
-
|
|
7937
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(
|
|
7938
|
+
import_react_native51.View,
|
|
7357
7939
|
{
|
|
7358
7940
|
style: {
|
|
7359
7941
|
position: "absolute",
|
|
@@ -7365,15 +7947,15 @@ function ChatPage({
|
|
|
7365
7947
|
paddingBottom: footerBottomPadding
|
|
7366
7948
|
},
|
|
7367
7949
|
children: [
|
|
7368
|
-
composerTop ? /* @__PURE__ */ (0,
|
|
7369
|
-
|
|
7950
|
+
composerTop ? /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
7951
|
+
import_react_native51.View,
|
|
7370
7952
|
{
|
|
7371
7953
|
style: { marginBottom: theme.spacing.sm },
|
|
7372
7954
|
onLayout: (e) => setComposerTopHeight(e.nativeEvent.layout.height),
|
|
7373
7955
|
children: composerTop
|
|
7374
7956
|
}
|
|
7375
7957
|
) : null,
|
|
7376
|
-
/* @__PURE__ */ (0,
|
|
7958
|
+
/* @__PURE__ */ (0, import_jsx_runtime52.jsx)(
|
|
7377
7959
|
ChatComposer,
|
|
7378
7960
|
{
|
|
7379
7961
|
...composer,
|
|
@@ -7390,9 +7972,9 @@ function ChatPage({
|
|
|
7390
7972
|
|
|
7391
7973
|
// src/components/chat/ScrollToBottomButton.tsx
|
|
7392
7974
|
var React41 = __toESM(require("react"));
|
|
7393
|
-
var
|
|
7975
|
+
var import_react_native52 = require("react-native");
|
|
7394
7976
|
var import_react_native_reanimated2 = __toESM(require("react-native-reanimated"));
|
|
7395
|
-
var
|
|
7977
|
+
var import_jsx_runtime53 = require("react/jsx-runtime");
|
|
7396
7978
|
function ScrollToBottomButton({ visible, onPress, children, style }) {
|
|
7397
7979
|
const theme = useTheme();
|
|
7398
7980
|
const progress = (0, import_react_native_reanimated2.useSharedValue)(visible ? 1 : 0);
|
|
@@ -7406,7 +7988,7 @@ function ScrollToBottomButton({ visible, onPress, children, style }) {
|
|
|
7406
7988
|
}));
|
|
7407
7989
|
const bg = theme.scheme === "dark" ? "rgba(39,39,42,0.9)" : "rgba(244,244,245,0.95)";
|
|
7408
7990
|
const border = theme.scheme === "dark" ? withAlpha("#FFFFFF", 0.12) : withAlpha("#000000", 0.08);
|
|
7409
|
-
return /* @__PURE__ */ (0,
|
|
7991
|
+
return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
7410
7992
|
import_react_native_reanimated2.default.View,
|
|
7411
7993
|
{
|
|
7412
7994
|
pointerEvents: visible ? "auto" : "none",
|
|
@@ -7420,8 +8002,8 @@ function ScrollToBottomButton({ visible, onPress, children, style }) {
|
|
|
7420
8002
|
style,
|
|
7421
8003
|
animStyle
|
|
7422
8004
|
],
|
|
7423
|
-
children: /* @__PURE__ */ (0,
|
|
7424
|
-
|
|
8005
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
8006
|
+
import_react_native52.View,
|
|
7425
8007
|
{
|
|
7426
8008
|
style: {
|
|
7427
8009
|
width: 44,
|
|
@@ -7439,8 +8021,8 @@ function ScrollToBottomButton({ visible, onPress, children, style }) {
|
|
|
7439
8021
|
elevation: 5,
|
|
7440
8022
|
opacity: pressed ? 0.85 : 1
|
|
7441
8023
|
},
|
|
7442
|
-
children: /* @__PURE__ */ (0,
|
|
7443
|
-
|
|
8024
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
|
|
8025
|
+
import_react_native52.Pressable,
|
|
7444
8026
|
{
|
|
7445
8027
|
onPress,
|
|
7446
8028
|
onPressIn: () => setPressed(true),
|
|
@@ -7457,16 +8039,16 @@ function ScrollToBottomButton({ visible, onPress, children, style }) {
|
|
|
7457
8039
|
}
|
|
7458
8040
|
|
|
7459
8041
|
// src/components/chat/ChatHeader.tsx
|
|
7460
|
-
var
|
|
7461
|
-
var
|
|
8042
|
+
var import_react_native53 = require("react-native");
|
|
8043
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
7462
8044
|
function ChatHeader({ left, right, center, style }) {
|
|
7463
|
-
const flattenedStyle =
|
|
8045
|
+
const flattenedStyle = import_react_native53.StyleSheet.flatten([
|
|
7464
8046
|
{
|
|
7465
8047
|
paddingTop: 0
|
|
7466
8048
|
},
|
|
7467
8049
|
style
|
|
7468
8050
|
]);
|
|
7469
|
-
return /* @__PURE__ */ (0,
|
|
8051
|
+
return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
|
|
7470
8052
|
StudioSheetHeader,
|
|
7471
8053
|
{
|
|
7472
8054
|
left,
|
|
@@ -7478,13 +8060,13 @@ function ChatHeader({ left, right, center, style }) {
|
|
|
7478
8060
|
}
|
|
7479
8061
|
|
|
7480
8062
|
// src/components/chat/ForkNoticeBanner.tsx
|
|
7481
|
-
var
|
|
7482
|
-
var
|
|
8063
|
+
var import_react_native54 = require("react-native");
|
|
8064
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
7483
8065
|
function ForkNoticeBanner({ isOwner = true, title, description, style }) {
|
|
7484
8066
|
const theme = useTheme();
|
|
7485
8067
|
const resolvedTitle = title ?? (isOwner ? "Remixed app" : "Remix app");
|
|
7486
8068
|
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.");
|
|
7487
|
-
return /* @__PURE__ */ (0,
|
|
8069
|
+
return /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
7488
8070
|
Card,
|
|
7489
8071
|
{
|
|
7490
8072
|
variant: "surfaceRaised",
|
|
@@ -7499,8 +8081,8 @@ function ForkNoticeBanner({ isOwner = true, title, description, style }) {
|
|
|
7499
8081
|
},
|
|
7500
8082
|
style
|
|
7501
8083
|
],
|
|
7502
|
-
children: /* @__PURE__ */ (0,
|
|
7503
|
-
/* @__PURE__ */ (0,
|
|
8084
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(import_react_native54.View, { style: { minWidth: 0 }, children: [
|
|
8085
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
7504
8086
|
Text,
|
|
7505
8087
|
{
|
|
7506
8088
|
style: {
|
|
@@ -7514,7 +8096,7 @@ function ForkNoticeBanner({ isOwner = true, title, description, style }) {
|
|
|
7514
8096
|
children: resolvedTitle
|
|
7515
8097
|
}
|
|
7516
8098
|
),
|
|
7517
|
-
/* @__PURE__ */ (0,
|
|
8099
|
+
/* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
|
|
7518
8100
|
Text,
|
|
7519
8101
|
{
|
|
7520
8102
|
style: {
|
|
@@ -7533,8 +8115,8 @@ function ForkNoticeBanner({ isOwner = true, title, description, style }) {
|
|
|
7533
8115
|
|
|
7534
8116
|
// src/components/chat/ChatQueue.tsx
|
|
7535
8117
|
var React42 = __toESM(require("react"));
|
|
7536
|
-
var
|
|
7537
|
-
var
|
|
8118
|
+
var import_react_native55 = require("react-native");
|
|
8119
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
7538
8120
|
function ChatQueue({ items, onRemove }) {
|
|
7539
8121
|
const theme = useTheme();
|
|
7540
8122
|
const [expanded, setExpanded] = React42.useState({});
|
|
@@ -7566,8 +8148,8 @@ ${trimmedLine2}\u2026 `;
|
|
|
7566
8148
|
setRemoving((prev) => Object.fromEntries(Object.entries(prev).filter(([id]) => ids.has(id))));
|
|
7567
8149
|
}, [items]);
|
|
7568
8150
|
if (items.length === 0) return null;
|
|
7569
|
-
return /* @__PURE__ */ (0,
|
|
7570
|
-
|
|
8151
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
8152
|
+
import_react_native55.View,
|
|
7571
8153
|
{
|
|
7572
8154
|
style: {
|
|
7573
8155
|
borderWidth: 1,
|
|
@@ -7578,16 +8160,16 @@ ${trimmedLine2}\u2026 `;
|
|
|
7578
8160
|
backgroundColor: "transparent"
|
|
7579
8161
|
},
|
|
7580
8162
|
children: [
|
|
7581
|
-
/* @__PURE__ */ (0,
|
|
7582
|
-
/* @__PURE__ */ (0,
|
|
8163
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Text, { variant: "caption", style: { marginBottom: theme.spacing.sm }, children: "Queue" }),
|
|
8164
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react_native55.View, { style: { gap: theme.spacing.sm }, children: items.map((item) => {
|
|
7583
8165
|
const isExpanded = Boolean(expanded[item.id]);
|
|
7584
8166
|
const showToggle = Boolean(canExpand[item.id]);
|
|
7585
8167
|
const prompt = item.prompt ?? "";
|
|
7586
8168
|
const moreLabel = "more";
|
|
7587
8169
|
const displayPrompt = !isExpanded && showToggle && collapsedText[item.id] ? collapsedText[item.id] : prompt;
|
|
7588
8170
|
const isRemoving = Boolean(removing[item.id]);
|
|
7589
|
-
return /* @__PURE__ */ (0,
|
|
7590
|
-
|
|
8171
|
+
return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
8172
|
+
import_react_native55.View,
|
|
7591
8173
|
{
|
|
7592
8174
|
style: {
|
|
7593
8175
|
flexDirection: "row",
|
|
@@ -7599,8 +8181,8 @@ ${trimmedLine2}\u2026 `;
|
|
|
7599
8181
|
backgroundColor: withAlpha(theme.colors.surface, theme.scheme === "dark" ? 0.8 : 0.9)
|
|
7600
8182
|
},
|
|
7601
8183
|
children: [
|
|
7602
|
-
/* @__PURE__ */ (0,
|
|
7603
|
-
!canExpand[item.id] ? /* @__PURE__ */ (0,
|
|
8184
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(import_react_native55.View, { style: { flex: 1 }, children: [
|
|
8185
|
+
!canExpand[item.id] ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
7604
8186
|
Text,
|
|
7605
8187
|
{
|
|
7606
8188
|
style: { position: "absolute", opacity: 0, zIndex: -1, width: "100%" },
|
|
@@ -7619,14 +8201,14 @@ ${trimmedLine2}\u2026 `;
|
|
|
7619
8201
|
children: prompt
|
|
7620
8202
|
}
|
|
7621
8203
|
) : null,
|
|
7622
|
-
/* @__PURE__ */ (0,
|
|
8204
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsxs)(
|
|
7623
8205
|
Text,
|
|
7624
8206
|
{
|
|
7625
8207
|
variant: "bodyMuted",
|
|
7626
8208
|
numberOfLines: isExpanded ? void 0 : 2,
|
|
7627
8209
|
children: [
|
|
7628
8210
|
displayPrompt,
|
|
7629
|
-
!isExpanded && showToggle ? /* @__PURE__ */ (0,
|
|
8211
|
+
!isExpanded && showToggle ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
7630
8212
|
Text,
|
|
7631
8213
|
{
|
|
7632
8214
|
color: theme.colors.text,
|
|
@@ -7638,18 +8220,18 @@ ${trimmedLine2}\u2026 `;
|
|
|
7638
8220
|
]
|
|
7639
8221
|
}
|
|
7640
8222
|
),
|
|
7641
|
-
showToggle && isExpanded ? /* @__PURE__ */ (0,
|
|
7642
|
-
|
|
8223
|
+
showToggle && isExpanded ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
8224
|
+
import_react_native55.Pressable,
|
|
7643
8225
|
{
|
|
7644
8226
|
onPress: () => setExpanded((prev) => ({ ...prev, [item.id]: false })),
|
|
7645
8227
|
hitSlop: 6,
|
|
7646
8228
|
style: { alignSelf: "flex-start", marginTop: 4 },
|
|
7647
|
-
children: /* @__PURE__ */ (0,
|
|
8229
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(Text, { variant: "captionMuted", color: theme.colors.text, children: "less" })
|
|
7648
8230
|
}
|
|
7649
8231
|
) : null
|
|
7650
8232
|
] }),
|
|
7651
|
-
/* @__PURE__ */ (0,
|
|
7652
|
-
|
|
8233
|
+
/* @__PURE__ */ (0, import_jsx_runtime56.jsx)(
|
|
8234
|
+
import_react_native55.Pressable,
|
|
7653
8235
|
{
|
|
7654
8236
|
onPress: () => {
|
|
7655
8237
|
if (!onRemove || isRemoving) return;
|
|
@@ -7664,7 +8246,7 @@ ${trimmedLine2}\u2026 `;
|
|
|
7664
8246
|
},
|
|
7665
8247
|
hitSlop: 8,
|
|
7666
8248
|
style: { alignSelf: "center" },
|
|
7667
|
-
children: isRemoving ? /* @__PURE__ */ (0,
|
|
8249
|
+
children: isRemoving ? /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(import_react_native55.ActivityIndicator, { size: "small", color: theme.colors.text }) : /* @__PURE__ */ (0, import_jsx_runtime56.jsx)(IconClose, { size: 14, colorToken: "text" })
|
|
7668
8250
|
}
|
|
7669
8251
|
)
|
|
7670
8252
|
]
|
|
@@ -7678,8 +8260,8 @@ ${trimmedLine2}\u2026 `;
|
|
|
7678
8260
|
}
|
|
7679
8261
|
|
|
7680
8262
|
// src/components/chat/AgentProgressCard.tsx
|
|
7681
|
-
var
|
|
7682
|
-
var
|
|
8263
|
+
var import_react_native56 = require("react-native");
|
|
8264
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
7683
8265
|
function titleForPhase(phase) {
|
|
7684
8266
|
if (phase === "planning") return "Planning";
|
|
7685
8267
|
if (phase === "reasoning") return "Reasoning";
|
|
@@ -7703,8 +8285,8 @@ function AgentProgressCard({ progress }) {
|
|
|
7703
8285
|
const phaseLabel = titleForPhase(progress.phase);
|
|
7704
8286
|
const subtitle = progress.latestMessage || `Agent is ${phaseLabel.toLowerCase()}...`;
|
|
7705
8287
|
const todo = progress.todoSummary;
|
|
7706
|
-
return /* @__PURE__ */ (0,
|
|
7707
|
-
|
|
8288
|
+
return /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(
|
|
8289
|
+
import_react_native56.View,
|
|
7708
8290
|
{
|
|
7709
8291
|
style: {
|
|
7710
8292
|
borderWidth: 1,
|
|
@@ -7715,20 +8297,20 @@ function AgentProgressCard({ progress }) {
|
|
|
7715
8297
|
backgroundColor: withAlpha(theme.colors.surface, theme.scheme === "dark" ? 0.84 : 0.94)
|
|
7716
8298
|
},
|
|
7717
8299
|
children: [
|
|
7718
|
-
/* @__PURE__ */ (0,
|
|
7719
|
-
/* @__PURE__ */ (0,
|
|
7720
|
-
/* @__PURE__ */ (0,
|
|
8300
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(import_react_native56.View, { style: { flexDirection: "row", alignItems: "center", justifyContent: "space-between", marginBottom: 4 }, children: [
|
|
8301
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Text, { variant: "caption", children: statusLabel }),
|
|
8302
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Text, { variant: "captionMuted", children: phaseLabel })
|
|
7721
8303
|
] }),
|
|
7722
|
-
/* @__PURE__ */ (0,
|
|
7723
|
-
progress.changedFilesCount > 0 ? /* @__PURE__ */ (0,
|
|
8304
|
+
/* @__PURE__ */ (0, import_jsx_runtime57.jsx)(Text, { variant: "bodyMuted", children: subtitle }),
|
|
8305
|
+
progress.changedFilesCount > 0 ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Text, { variant: "captionMuted", style: { marginTop: 8 }, children: [
|
|
7724
8306
|
"Updated files: ",
|
|
7725
8307
|
progress.changedFilesCount
|
|
7726
8308
|
] }) : null,
|
|
7727
|
-
progress.recentFiles.length > 0 ? /* @__PURE__ */ (0,
|
|
8309
|
+
progress.recentFiles.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_react_native56.View, { style: { marginTop: 6 }, children: progress.recentFiles.map((path) => /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Text, { variant: "captionMuted", numberOfLines: 1, children: [
|
|
7728
8310
|
"\u2022 ",
|
|
7729
8311
|
path
|
|
7730
8312
|
] }, path)) }) : null,
|
|
7731
|
-
todo ? /* @__PURE__ */ (0,
|
|
8313
|
+
todo ? /* @__PURE__ */ (0, import_jsx_runtime57.jsxs)(Text, { variant: "captionMuted", style: { marginTop: 8 }, children: [
|
|
7732
8314
|
"Todos: ",
|
|
7733
8315
|
todo.completed,
|
|
7734
8316
|
"/",
|
|
@@ -7742,8 +8324,8 @@ function AgentProgressCard({ progress }) {
|
|
|
7742
8324
|
}
|
|
7743
8325
|
|
|
7744
8326
|
// src/components/chat/BundleProgressCard.tsx
|
|
7745
|
-
var
|
|
7746
|
-
var
|
|
8327
|
+
var import_react_native57 = require("react-native");
|
|
8328
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
7747
8329
|
function titleForStatus2(status) {
|
|
7748
8330
|
if (status === "succeeded") return "Completed";
|
|
7749
8331
|
if (status === "failed") return "Failed";
|
|
@@ -7755,8 +8337,8 @@ function BundleProgressCard({ progress }) {
|
|
|
7755
8337
|
const percent = Math.round(Math.max(0, Math.min(1, progress.progressValue)) * 100);
|
|
7756
8338
|
const fillColor = progress.status === "failed" ? theme.colors.danger : progress.status === "succeeded" ? theme.colors.success : theme.colors.warning;
|
|
7757
8339
|
const detail = progress.errorMessage || progress.phaseLabel;
|
|
7758
|
-
return /* @__PURE__ */ (0,
|
|
7759
|
-
|
|
8340
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(
|
|
8341
|
+
import_react_native57.View,
|
|
7760
8342
|
{
|
|
7761
8343
|
accessible: true,
|
|
7762
8344
|
accessibilityRole: "progressbar",
|
|
@@ -7771,15 +8353,15 @@ function BundleProgressCard({ progress }) {
|
|
|
7771
8353
|
backgroundColor: withAlpha(theme.colors.surface, theme.scheme === "dark" ? 0.84 : 0.94)
|
|
7772
8354
|
},
|
|
7773
8355
|
children: [
|
|
7774
|
-
/* @__PURE__ */ (0,
|
|
7775
|
-
/* @__PURE__ */ (0,
|
|
7776
|
-
/* @__PURE__ */ (0,
|
|
8356
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(import_react_native57.View, { style: { flexDirection: "row", alignItems: "center", justifyContent: "space-between", marginBottom: 8 }, children: [
|
|
8357
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { variant: "caption", children: statusLabel }),
|
|
8358
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Text, { variant: "captionMuted", children: [
|
|
7777
8359
|
percent,
|
|
7778
8360
|
"%"
|
|
7779
8361
|
] })
|
|
7780
8362
|
] }),
|
|
7781
|
-
/* @__PURE__ */ (0,
|
|
7782
|
-
|
|
8363
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
8364
|
+
import_react_native57.View,
|
|
7783
8365
|
{
|
|
7784
8366
|
style: {
|
|
7785
8367
|
width: "100%",
|
|
@@ -7788,8 +8370,8 @@ function BundleProgressCard({ progress }) {
|
|
|
7788
8370
|
backgroundColor: withAlpha(theme.colors.border, theme.scheme === "dark" ? 0.5 : 0.6),
|
|
7789
8371
|
overflow: "hidden"
|
|
7790
8372
|
},
|
|
7791
|
-
children: /* @__PURE__ */ (0,
|
|
7792
|
-
|
|
8373
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(
|
|
8374
|
+
import_react_native57.View,
|
|
7793
8375
|
{
|
|
7794
8376
|
style: {
|
|
7795
8377
|
width: `${percent}%`,
|
|
@@ -7800,14 +8382,14 @@ function BundleProgressCard({ progress }) {
|
|
|
7800
8382
|
)
|
|
7801
8383
|
}
|
|
7802
8384
|
),
|
|
7803
|
-
/* @__PURE__ */ (0,
|
|
8385
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Text, { variant: "captionMuted", numberOfLines: 1, style: { marginTop: 8, minHeight: 16 }, children: detail })
|
|
7804
8386
|
]
|
|
7805
8387
|
}
|
|
7806
8388
|
);
|
|
7807
8389
|
}
|
|
7808
8390
|
|
|
7809
8391
|
// src/studio/ui/ChatPanel.tsx
|
|
7810
|
-
var
|
|
8392
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
7811
8393
|
function ChatPanel({
|
|
7812
8394
|
title = "Chat",
|
|
7813
8395
|
messages,
|
|
@@ -7852,21 +8434,21 @@ function ChatPanel({
|
|
|
7852
8434
|
var _a;
|
|
7853
8435
|
(_a = listRef.current) == null ? void 0 : _a.scrollToBottom({ animated: true });
|
|
7854
8436
|
}, []);
|
|
7855
|
-
const header = /* @__PURE__ */ (0,
|
|
8437
|
+
const header = /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7856
8438
|
ChatHeader,
|
|
7857
8439
|
{
|
|
7858
|
-
left: /* @__PURE__ */ (0,
|
|
7859
|
-
/* @__PURE__ */ (0,
|
|
7860
|
-
onNavigateHome ? /* @__PURE__ */ (0,
|
|
8440
|
+
left: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_react_native58.View, { style: { flexDirection: "row", alignItems: "center" }, children: [
|
|
8441
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(StudioSheetHeaderIconButton, { onPress: onBack, accessibilityLabel: "Back", style: { marginRight: 8 }, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(IconBack, { size: 20, colorToken: "floatingContent" }) }),
|
|
8442
|
+
onNavigateHome ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(StudioSheetHeaderIconButton, { onPress: onNavigateHome, accessibilityLabel: "Home", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(IconHome, { size: 20, colorToken: "floatingContent" }) }) : null
|
|
7861
8443
|
] }),
|
|
7862
|
-
right: /* @__PURE__ */ (0,
|
|
7863
|
-
onStartDraw ? /* @__PURE__ */ (0,
|
|
7864
|
-
/* @__PURE__ */ (0,
|
|
8444
|
+
right: /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_react_native58.View, { style: { flexDirection: "row", alignItems: "center" }, children: [
|
|
8445
|
+
onStartDraw ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(StudioSheetHeaderIconButton, { onPress: onStartDraw, accessibilityLabel: "Draw", intent: "danger", style: { marginRight: 8 }, children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(IconDraw, { size: 20, colorToken: "onDanger" }) }) : null,
|
|
8446
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(StudioSheetHeaderIconButton, { onPress: onClose, accessibilityLabel: "Close", children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(IconClose, { size: 20, colorToken: "floatingContent" }) })
|
|
7865
8447
|
] }),
|
|
7866
8448
|
center: null
|
|
7867
8449
|
}
|
|
7868
8450
|
);
|
|
7869
|
-
const topBanner = shouldForkOnEdit ? /* @__PURE__ */ (0,
|
|
8451
|
+
const topBanner = shouldForkOnEdit ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7870
8452
|
ForkNoticeBanner,
|
|
7871
8453
|
{
|
|
7872
8454
|
isOwner: !shouldForkOnEdit,
|
|
@@ -7875,22 +8457,22 @@ function ChatPanel({
|
|
|
7875
8457
|
) : null;
|
|
7876
8458
|
const showMessagesLoading = Boolean(loading) && messages.length === 0 || forking;
|
|
7877
8459
|
if (showMessagesLoading) {
|
|
7878
|
-
return /* @__PURE__ */ (0,
|
|
7879
|
-
/* @__PURE__ */ (0,
|
|
7880
|
-
topBanner ? /* @__PURE__ */ (0,
|
|
7881
|
-
/* @__PURE__ */ (0,
|
|
7882
|
-
/* @__PURE__ */ (0,
|
|
7883
|
-
/* @__PURE__ */ (0,
|
|
7884
|
-
/* @__PURE__ */ (0,
|
|
8460
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_react_native58.View, { style: { flex: 1 }, children: [
|
|
8461
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react_native58.View, { children: header }),
|
|
8462
|
+
topBanner ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react_native58.View, { style: { paddingHorizontal: 16, paddingTop: 8 }, children: topBanner }) : null,
|
|
8463
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_react_native58.View, { style: { flex: 1, alignItems: "center", justifyContent: "center", paddingHorizontal: 24, paddingVertical: 12 }, children: [
|
|
8464
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react_native58.ActivityIndicator, {}),
|
|
8465
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(import_react_native58.View, { style: { height: 12 } }),
|
|
8466
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)(Text, { variant: "bodyMuted", children: forking ? "Creating your copy\u2026" : "Loading messages\u2026" })
|
|
7885
8467
|
] })
|
|
7886
8468
|
] });
|
|
7887
8469
|
}
|
|
7888
8470
|
const bundleProgress = (progress == null ? void 0 : progress.bundle) ?? null;
|
|
7889
|
-
const queueTop = progress || queueItems.length > 0 ? /* @__PURE__ */ (0,
|
|
7890
|
-
progress ? bundleProgress ? /* @__PURE__ */ (0,
|
|
7891
|
-
queueItems.length > 0 ? /* @__PURE__ */ (0,
|
|
8471
|
+
const queueTop = progress || queueItems.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)(import_react_native58.View, { style: { gap: theme.spacing.sm }, children: [
|
|
8472
|
+
progress ? bundleProgress ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(BundleProgressCard, { progress: bundleProgress }) : /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(AgentProgressCard, { progress }) : null,
|
|
8473
|
+
queueItems.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(ChatQueue, { items: queueItems, onRemove: onRemoveQueueItem }) : null
|
|
7892
8474
|
] }) : null;
|
|
7893
|
-
return /* @__PURE__ */ (0,
|
|
8475
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7894
8476
|
ChatPage,
|
|
7895
8477
|
{
|
|
7896
8478
|
header,
|
|
@@ -7903,13 +8485,13 @@ function ChatPanel({
|
|
|
7903
8485
|
composerHorizontalPadding: 0,
|
|
7904
8486
|
listRef,
|
|
7905
8487
|
onNearBottomChange: setNearBottom,
|
|
7906
|
-
overlay: /* @__PURE__ */ (0,
|
|
8488
|
+
overlay: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(
|
|
7907
8489
|
ScrollToBottomButton,
|
|
7908
8490
|
{
|
|
7909
8491
|
visible: !nearBottom,
|
|
7910
8492
|
onPress: handleScrollToBottom,
|
|
7911
8493
|
style: { bottom: 80 },
|
|
7912
|
-
children: /* @__PURE__ */ (0,
|
|
8494
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime59.jsx)(IconArrowDown, { size: 20, colorToken: "floatingContent" })
|
|
7913
8495
|
}
|
|
7914
8496
|
),
|
|
7915
8497
|
composer: {
|
|
@@ -7930,8 +8512,8 @@ function ChatPanel({
|
|
|
7930
8512
|
|
|
7931
8513
|
// src/components/dialogs/ConfirmMergeRequestDialog.tsx
|
|
7932
8514
|
var React44 = __toESM(require("react"));
|
|
7933
|
-
var
|
|
7934
|
-
var
|
|
8515
|
+
var import_react_native59 = require("react-native");
|
|
8516
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
7935
8517
|
function ConfirmMergeRequestDialog({
|
|
7936
8518
|
visible,
|
|
7937
8519
|
onOpenChange,
|
|
@@ -7961,7 +8543,7 @@ function ConfirmMergeRequestDialog({
|
|
|
7961
8543
|
justifyContent: "center",
|
|
7962
8544
|
alignSelf: "stretch"
|
|
7963
8545
|
};
|
|
7964
|
-
return /* @__PURE__ */ (0,
|
|
8546
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
|
|
7965
8547
|
Modal,
|
|
7966
8548
|
{
|
|
7967
8549
|
visible,
|
|
@@ -7972,7 +8554,7 @@ function ConfirmMergeRequestDialog({
|
|
|
7972
8554
|
backgroundColor: theme.colors.background
|
|
7973
8555
|
},
|
|
7974
8556
|
children: [
|
|
7975
|
-
/* @__PURE__ */ (0,
|
|
8557
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react_native59.View, { children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
7976
8558
|
Text,
|
|
7977
8559
|
{
|
|
7978
8560
|
style: {
|
|
@@ -7984,9 +8566,9 @@ function ConfirmMergeRequestDialog({
|
|
|
7984
8566
|
children: "Are you sure you want to approve this merge request?"
|
|
7985
8567
|
}
|
|
7986
8568
|
) }),
|
|
7987
|
-
/* @__PURE__ */ (0,
|
|
7988
|
-
/* @__PURE__ */ (0,
|
|
7989
|
-
|
|
8569
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(import_react_native59.View, { style: { marginTop: 16 }, children: [
|
|
8570
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
8571
|
+
import_react_native59.View,
|
|
7990
8572
|
{
|
|
7991
8573
|
style: [
|
|
7992
8574
|
fullWidthButtonBase,
|
|
@@ -7995,22 +8577,22 @@ function ConfirmMergeRequestDialog({
|
|
|
7995
8577
|
opacity: canConfirm ? 1 : 0.5
|
|
7996
8578
|
}
|
|
7997
8579
|
],
|
|
7998
|
-
children: /* @__PURE__ */ (0,
|
|
7999
|
-
|
|
8580
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
8581
|
+
import_react_native59.Pressable,
|
|
8000
8582
|
{
|
|
8001
8583
|
accessibilityRole: "button",
|
|
8002
8584
|
accessibilityLabel: "Approve Merge",
|
|
8003
8585
|
disabled: !canConfirm,
|
|
8004
8586
|
onPress: handleConfirm,
|
|
8005
8587
|
style: [fullWidthButtonBase, { flex: 1 }],
|
|
8006
|
-
children: /* @__PURE__ */ (0,
|
|
8588
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Text, { style: { textAlign: "center", color: theme.colors.onPrimary }, children: "Approve Merge" })
|
|
8007
8589
|
}
|
|
8008
8590
|
)
|
|
8009
8591
|
}
|
|
8010
8592
|
),
|
|
8011
|
-
/* @__PURE__ */ (0,
|
|
8012
|
-
/* @__PURE__ */ (0,
|
|
8013
|
-
|
|
8593
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react_native59.View, { style: { height: 8 } }),
|
|
8594
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
8595
|
+
import_react_native59.View,
|
|
8014
8596
|
{
|
|
8015
8597
|
style: [
|
|
8016
8598
|
fullWidthButtonBase,
|
|
@@ -8021,22 +8603,22 @@ function ConfirmMergeRequestDialog({
|
|
|
8021
8603
|
opacity: isBuilding || !mergeRequest ? 0.5 : 1
|
|
8022
8604
|
}
|
|
8023
8605
|
],
|
|
8024
|
-
children: /* @__PURE__ */ (0,
|
|
8025
|
-
|
|
8606
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
8607
|
+
import_react_native59.Pressable,
|
|
8026
8608
|
{
|
|
8027
8609
|
accessibilityRole: "button",
|
|
8028
8610
|
accessibilityLabel: isBuilding ? "Preparing\u2026" : "Test edits first",
|
|
8029
8611
|
disabled: isBuilding || !mergeRequest,
|
|
8030
8612
|
onPress: handleTestFirst,
|
|
8031
8613
|
style: [fullWidthButtonBase, { flex: 1 }],
|
|
8032
|
-
children: /* @__PURE__ */ (0,
|
|
8614
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Text, { style: { textAlign: "center", color: theme.colors.text }, children: isBuilding ? "Preparing\u2026" : "Test edits first" })
|
|
8033
8615
|
}
|
|
8034
8616
|
)
|
|
8035
8617
|
}
|
|
8036
8618
|
),
|
|
8037
|
-
/* @__PURE__ */ (0,
|
|
8038
|
-
/* @__PURE__ */ (0,
|
|
8039
|
-
|
|
8619
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(import_react_native59.View, { style: { height: 8 } }),
|
|
8620
|
+
/* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
8621
|
+
import_react_native59.View,
|
|
8040
8622
|
{
|
|
8041
8623
|
style: [
|
|
8042
8624
|
fullWidthButtonBase,
|
|
@@ -8046,14 +8628,14 @@ function ConfirmMergeRequestDialog({
|
|
|
8046
8628
|
borderColor: theme.colors.border
|
|
8047
8629
|
}
|
|
8048
8630
|
],
|
|
8049
|
-
children: /* @__PURE__ */ (0,
|
|
8050
|
-
|
|
8631
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
8632
|
+
import_react_native59.Pressable,
|
|
8051
8633
|
{
|
|
8052
8634
|
accessibilityRole: "button",
|
|
8053
8635
|
accessibilityLabel: "Cancel",
|
|
8054
8636
|
onPress: close,
|
|
8055
8637
|
style: [fullWidthButtonBase, { flex: 1 }],
|
|
8056
|
-
children: /* @__PURE__ */ (0,
|
|
8638
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Text, { style: { textAlign: "center", color: theme.colors.text }, children: "Cancel" })
|
|
8057
8639
|
}
|
|
8058
8640
|
)
|
|
8059
8641
|
}
|
|
@@ -8065,7 +8647,7 @@ function ConfirmMergeRequestDialog({
|
|
|
8065
8647
|
}
|
|
8066
8648
|
|
|
8067
8649
|
// src/studio/ui/ConfirmMergeFlow.tsx
|
|
8068
|
-
var
|
|
8650
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
8069
8651
|
function ConfirmMergeFlow({
|
|
8070
8652
|
visible,
|
|
8071
8653
|
onOpenChange,
|
|
@@ -8076,7 +8658,7 @@ function ConfirmMergeFlow({
|
|
|
8076
8658
|
onConfirm,
|
|
8077
8659
|
onTestFirst
|
|
8078
8660
|
}) {
|
|
8079
|
-
return /* @__PURE__ */ (0,
|
|
8661
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
8080
8662
|
ConfirmMergeRequestDialog,
|
|
8081
8663
|
{
|
|
8082
8664
|
visible,
|
|
@@ -8228,7 +8810,55 @@ function useOptimisticChatMessages({
|
|
|
8228
8810
|
|
|
8229
8811
|
// src/studio/ui/StudioOverlay.tsx
|
|
8230
8812
|
var import_studio_control = require("@comergehq/studio-control");
|
|
8231
|
-
|
|
8813
|
+
|
|
8814
|
+
// src/components/icons/RemixUpIcon.tsx
|
|
8815
|
+
var import_react_native_svg3 = __toESM(require("react-native-svg"));
|
|
8816
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
8817
|
+
function RemixUpIcon({ width = 24, height = 24, ...props }) {
|
|
8818
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)(import_react_native_svg3.default, { viewBox: "0 0 70 49", width, height, fill: "none", ...props, children: [
|
|
8819
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
8820
|
+
import_react_native_svg3.Path,
|
|
8821
|
+
{
|
|
8822
|
+
d: "M34.706 7.62939e-05L34.7656 2.28882e-05L21.44 13.2661L0 34.8401L13.266 48.1061L34.706 26.5321L21.44 13.2661L34.706 7.62939e-05Z",
|
|
8823
|
+
fill: "#00CBC0"
|
|
8824
|
+
}
|
|
8825
|
+
),
|
|
8826
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
8827
|
+
import_react_native_svg3.Path,
|
|
8828
|
+
{
|
|
8829
|
+
d: "M47.972 13.266L34.7656 2.28882e-05L34.706 7.62939e-05L47.972 13.266L34.706 26.5321L56.28 48.106L69.546 34.84L47.972 13.266Z",
|
|
8830
|
+
fill: "#FF1820"
|
|
8831
|
+
}
|
|
8832
|
+
),
|
|
8833
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsx)(
|
|
8834
|
+
import_react_native_svg3.Path,
|
|
8835
|
+
{
|
|
8836
|
+
d: "M34.7656 2.28882e-05L21.44 13.2661L34.706 26.5321L47.972 13.266L34.7656 2.28882e-05Z",
|
|
8837
|
+
fill: "#00322A"
|
|
8838
|
+
}
|
|
8839
|
+
)
|
|
8840
|
+
] });
|
|
8841
|
+
}
|
|
8842
|
+
|
|
8843
|
+
// src/components/icons/RemixXLoopLottie.tsx
|
|
8844
|
+
var import_lottie_react_native = __toESM(require("lottie-react-native"));
|
|
8845
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
8846
|
+
var remixXLoopSource = require_remix_x_loop_lottie();
|
|
8847
|
+
var Lottie = import_lottie_react_native.default;
|
|
8848
|
+
function RemixXLoopLottie({ size = 24, style }) {
|
|
8849
|
+
return /* @__PURE__ */ (0, import_jsx_runtime63.jsx)(
|
|
8850
|
+
Lottie,
|
|
8851
|
+
{
|
|
8852
|
+
source: remixXLoopSource,
|
|
8853
|
+
autoPlay: true,
|
|
8854
|
+
loop: true,
|
|
8855
|
+
style: [{ width: size, height: size }, style]
|
|
8856
|
+
}
|
|
8857
|
+
);
|
|
8858
|
+
}
|
|
8859
|
+
|
|
8860
|
+
// src/studio/ui/StudioOverlay.tsx
|
|
8861
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
8232
8862
|
function StudioOverlay({
|
|
8233
8863
|
captureTargetRef,
|
|
8234
8864
|
app,
|
|
@@ -8272,7 +8902,7 @@ function StudioOverlay({
|
|
|
8272
8902
|
onSwitchRelatedApp
|
|
8273
8903
|
}) {
|
|
8274
8904
|
const theme = useTheme();
|
|
8275
|
-
const { width } = (0,
|
|
8905
|
+
const { width } = (0, import_react_native60.useWindowDimensions)();
|
|
8276
8906
|
const [sheetOpen, setSheetOpen] = React46.useState(false);
|
|
8277
8907
|
const sheetOpenRef = React46.useRef(sheetOpen);
|
|
8278
8908
|
const pendingNavigateHomeRef = React46.useRef(false);
|
|
@@ -8283,6 +8913,7 @@ function StudioOverlay({
|
|
|
8283
8913
|
const [commentsCount, setCommentsCount] = React46.useState(null);
|
|
8284
8914
|
const threadId = (app == null ? void 0 : app.threadId) ?? null;
|
|
8285
8915
|
const isForking = chatForking || (app == null ? void 0 : app.status) === "forking";
|
|
8916
|
+
const isBubbleLoading = (app == null ? void 0 : app.status) === "editing" || isBaseBundleDownloading;
|
|
8286
8917
|
const queueItemsForChat = isForking ? [] : chatQueueItems;
|
|
8287
8918
|
const disableOptimistic = Boolean(queueItemsForChat && queueItemsForChat.length > 0) || (app == null ? void 0 : app.status) === "editing";
|
|
8288
8919
|
const optimistic = useOptimisticChatMessages({
|
|
@@ -8299,7 +8930,7 @@ function StudioOverlay({
|
|
|
8299
8930
|
);
|
|
8300
8931
|
const handleSheetOpenChange = React46.useCallback((open) => {
|
|
8301
8932
|
setSheetOpen(open);
|
|
8302
|
-
if (!open)
|
|
8933
|
+
if (!open) import_react_native60.Keyboard.dismiss();
|
|
8303
8934
|
}, []);
|
|
8304
8935
|
const closeSheet = React46.useCallback(() => {
|
|
8305
8936
|
handleSheetOpenChange(false);
|
|
@@ -8310,8 +8941,8 @@ function StudioOverlay({
|
|
|
8310
8941
|
openSheet();
|
|
8311
8942
|
}, [openSheet]);
|
|
8312
8943
|
const backToPreview = React46.useCallback(() => {
|
|
8313
|
-
if (
|
|
8314
|
-
|
|
8944
|
+
if (import_react_native60.Platform.OS !== "ios") {
|
|
8945
|
+
import_react_native60.Keyboard.dismiss();
|
|
8315
8946
|
setActivePage("preview");
|
|
8316
8947
|
return;
|
|
8317
8948
|
}
|
|
@@ -8323,9 +8954,9 @@ function StudioOverlay({
|
|
|
8323
8954
|
clearTimeout(t);
|
|
8324
8955
|
setActivePage("preview");
|
|
8325
8956
|
};
|
|
8326
|
-
const sub =
|
|
8957
|
+
const sub = import_react_native60.Keyboard.addListener("keyboardDidHide", finalize);
|
|
8327
8958
|
const t = setTimeout(finalize, 350);
|
|
8328
|
-
|
|
8959
|
+
import_react_native60.Keyboard.dismiss();
|
|
8329
8960
|
}, []);
|
|
8330
8961
|
const startDraw = React46.useCallback(() => {
|
|
8331
8962
|
setDrawing(true);
|
|
@@ -8362,26 +8993,26 @@ function StudioOverlay({
|
|
|
8362
8993
|
);
|
|
8363
8994
|
const handleNavigateHome = React46.useCallback(() => {
|
|
8364
8995
|
if (!onNavigateHome) return;
|
|
8365
|
-
if (
|
|
8996
|
+
if (import_react_native60.Platform.OS !== "android") {
|
|
8366
8997
|
onNavigateHome();
|
|
8367
8998
|
return;
|
|
8368
8999
|
}
|
|
8369
9000
|
if (!sheetOpenRef.current) {
|
|
8370
|
-
|
|
9001
|
+
import_react_native60.InteractionManager.runAfterInteractions(() => {
|
|
8371
9002
|
onNavigateHome();
|
|
8372
9003
|
});
|
|
8373
9004
|
return;
|
|
8374
9005
|
}
|
|
8375
9006
|
pendingNavigateHomeRef.current = true;
|
|
8376
|
-
|
|
9007
|
+
import_react_native60.Keyboard.dismiss();
|
|
8377
9008
|
setActivePage("preview");
|
|
8378
9009
|
closeSheet();
|
|
8379
9010
|
}, [closeSheet, onNavigateHome]);
|
|
8380
9011
|
const handleSheetDismiss = React46.useCallback(() => {
|
|
8381
|
-
if (
|
|
9012
|
+
if (import_react_native60.Platform.OS !== "android") return;
|
|
8382
9013
|
if (!pendingNavigateHomeRef.current) return;
|
|
8383
9014
|
pendingNavigateHomeRef.current = false;
|
|
8384
|
-
|
|
9015
|
+
import_react_native60.InteractionManager.runAfterInteractions(() => {
|
|
8385
9016
|
onNavigateHome == null ? void 0 : onNavigateHome();
|
|
8386
9017
|
});
|
|
8387
9018
|
}, [onNavigateHome]);
|
|
@@ -8410,14 +9041,14 @@ function StudioOverlay({
|
|
|
8410
9041
|
React46.useEffect(() => {
|
|
8411
9042
|
void (0, import_studio_control.publishComergeStudioUIState)(sheetOpen, studioControlOptions);
|
|
8412
9043
|
}, [sheetOpen, studioControlOptions]);
|
|
8413
|
-
return /* @__PURE__ */ (0,
|
|
8414
|
-
/* @__PURE__ */ (0,
|
|
8415
|
-
/* @__PURE__ */ (0,
|
|
9044
|
+
return /* @__PURE__ */ (0, import_jsx_runtime64.jsxs)(import_jsx_runtime64.Fragment, { children: [
|
|
9045
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(EdgeGlowFrame, { visible: isTesting, role: "accent", thickness: 40, intensity: 1 }),
|
|
9046
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(StudioBottomSheet, { open: sheetOpen, onOpenChange: handleSheetOpenChange, onDismiss: handleSheetDismiss, children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
8416
9047
|
StudioSheetPager,
|
|
8417
9048
|
{
|
|
8418
9049
|
activePage,
|
|
8419
9050
|
width,
|
|
8420
|
-
preview: /* @__PURE__ */ (0,
|
|
9051
|
+
preview: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
8421
9052
|
PreviewPanel,
|
|
8422
9053
|
{
|
|
8423
9054
|
app,
|
|
@@ -8451,7 +9082,7 @@ function StudioOverlay({
|
|
|
8451
9082
|
onSwitchRelatedApp
|
|
8452
9083
|
}
|
|
8453
9084
|
),
|
|
8454
|
-
chat: /* @__PURE__ */ (0,
|
|
9085
|
+
chat: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
8455
9086
|
ChatPanel,
|
|
8456
9087
|
{
|
|
8457
9088
|
messages: optimistic.messages,
|
|
@@ -8478,19 +9109,19 @@ function StudioOverlay({
|
|
|
8478
9109
|
)
|
|
8479
9110
|
}
|
|
8480
9111
|
) }),
|
|
8481
|
-
showBubble && /* @__PURE__ */ (0,
|
|
9112
|
+
showBubble && /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
8482
9113
|
Bubble,
|
|
8483
9114
|
{
|
|
8484
9115
|
visible: !sheetOpen && !drawing,
|
|
8485
9116
|
ariaLabel: sheetOpen ? "Hide studio" : "Show studio",
|
|
8486
9117
|
badgeCount: incomingMergeRequests.length,
|
|
8487
9118
|
onPress: toggleSheet,
|
|
8488
|
-
isLoading:
|
|
9119
|
+
isLoading: isBubbleLoading,
|
|
8489
9120
|
loadingBorderTone: isBaseBundleDownloading ? "warning" : "default",
|
|
8490
|
-
children: /* @__PURE__ */ (0,
|
|
9121
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(import_react_native60.View, { style: { width: 28, height: 28, alignItems: "center", justifyContent: "center" }, children: isBubbleLoading ? /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(RemixXLoopLottie, { size: 24 }) : /* @__PURE__ */ (0, import_jsx_runtime64.jsx)(RemixUpIcon, { width: 24, height: 24 }) })
|
|
8491
9122
|
}
|
|
8492
9123
|
),
|
|
8493
|
-
/* @__PURE__ */ (0,
|
|
9124
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
8494
9125
|
DrawModeOverlay,
|
|
8495
9126
|
{
|
|
8496
9127
|
visible: drawing,
|
|
@@ -8499,7 +9130,7 @@ function StudioOverlay({
|
|
|
8499
9130
|
onCapture: handleDrawCapture
|
|
8500
9131
|
}
|
|
8501
9132
|
),
|
|
8502
|
-
/* @__PURE__ */ (0,
|
|
9133
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
8503
9134
|
ConfirmMergeFlow,
|
|
8504
9135
|
{
|
|
8505
9136
|
visible: Boolean(confirmMr),
|
|
@@ -8513,7 +9144,7 @@ function StudioOverlay({
|
|
|
8513
9144
|
onTestFirst: handleTestMr
|
|
8514
9145
|
}
|
|
8515
9146
|
),
|
|
8516
|
-
/* @__PURE__ */ (0,
|
|
9147
|
+
/* @__PURE__ */ (0, import_jsx_runtime64.jsx)(
|
|
8517
9148
|
AppCommentsSheet,
|
|
8518
9149
|
{
|
|
8519
9150
|
appId: commentsAppId,
|
|
@@ -9152,7 +9783,7 @@ function useRelatedApps(appId) {
|
|
|
9152
9783
|
}
|
|
9153
9784
|
|
|
9154
9785
|
// src/studio/ComergeStudio.tsx
|
|
9155
|
-
var
|
|
9786
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
9156
9787
|
function ComergeStudio({
|
|
9157
9788
|
appId,
|
|
9158
9789
|
clientKey: clientKey2,
|
|
@@ -9170,20 +9801,20 @@ function ComergeStudio({
|
|
|
9170
9801
|
const [activeAppId, setActiveAppId] = React51.useState(appId);
|
|
9171
9802
|
const [runtimeAppId, setRuntimeAppId] = React51.useState(appId);
|
|
9172
9803
|
const [pendingRuntimeTargetAppId, setPendingRuntimeTargetAppId] = React51.useState(null);
|
|
9173
|
-
const platform = React51.useMemo(() =>
|
|
9804
|
+
const platform = React51.useMemo(() => import_react_native61.Platform.OS === "ios" ? "ios" : "android", []);
|
|
9174
9805
|
React51.useEffect(() => {
|
|
9175
9806
|
setActiveAppId(appId);
|
|
9176
9807
|
setRuntimeAppId(appId);
|
|
9177
9808
|
setPendingRuntimeTargetAppId(null);
|
|
9178
9809
|
}, [appId]);
|
|
9179
9810
|
const captureTargetRef = React51.useRef(null);
|
|
9180
|
-
return /* @__PURE__ */ (0,
|
|
9811
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
9181
9812
|
StudioBootstrap,
|
|
9182
9813
|
{
|
|
9183
9814
|
clientKey: clientKey2,
|
|
9184
9815
|
analyticsEnabled,
|
|
9185
|
-
fallback: /* @__PURE__ */ (0,
|
|
9186
|
-
children: ({ userId }) => /* @__PURE__ */ (0,
|
|
9816
|
+
fallback: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react_native61.View, { style: { flex: 1 } }),
|
|
9817
|
+
children: ({ userId }) => /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_bottom_sheet6.BottomSheetModalProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(LiquidGlassResetProvider, { resetTriggers: [appId, activeAppId, runtimeAppId], children: /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
9187
9818
|
ComergeStudioInner,
|
|
9188
9819
|
{
|
|
9189
9820
|
userId,
|
|
@@ -9465,8 +10096,8 @@ function ComergeStudioInner({
|
|
|
9465
10096
|
setRuntimeAppId
|
|
9466
10097
|
]
|
|
9467
10098
|
);
|
|
9468
|
-
return /* @__PURE__ */ (0,
|
|
9469
|
-
/* @__PURE__ */ (0,
|
|
10099
|
+
return /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(import_react_native61.View, { style: [{ flex: 1 }, style], children: /* @__PURE__ */ (0, import_jsx_runtime65.jsxs)(import_react_native61.View, { ref: captureTargetRef, style: { flex: 1 }, collapsable: false, children: [
|
|
10100
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
9470
10101
|
RuntimeRenderer,
|
|
9471
10102
|
{
|
|
9472
10103
|
appKey,
|
|
@@ -9490,7 +10121,7 @@ function ComergeStudioInner({
|
|
|
9490
10121
|
}
|
|
9491
10122
|
}
|
|
9492
10123
|
),
|
|
9493
|
-
/* @__PURE__ */ (0,
|
|
10124
|
+
/* @__PURE__ */ (0, import_jsx_runtime65.jsx)(
|
|
9494
10125
|
StudioOverlay,
|
|
9495
10126
|
{
|
|
9496
10127
|
captureTargetRef,
|