@adminide-stack/yantra-mobile 12.0.175 → 12.0.176-alpha.0
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/lib/features/agent-chat/NativeAgentChat.js +1 -1
- package/lib/features/agent-chat/NativeAgentChat.js.map +1 -1
- package/lib/features/chat/ChatTranscript.js +22 -9
- package/lib/features/chat/ChatTranscript.js.map +1 -1
- package/lib/features/chat/MessageActionBar.js +1 -1
- package/lib/features/chat/MessageActionBar.js.map +1 -1
- package/lib/features/games/cubeforge3D.js +39 -14
- package/lib/features/games/cubeforge3D.js.map +1 -1
- package/lib/features/games/cubeforgeFriends.js +17 -1
- package/lib/features/games/cubeforgeFriends.js.map +1 -1
- package/lib/features/games/cubeforgeHelper.js +3 -2
- package/lib/features/games/cubeforgeHelper.js.map +1 -1
- package/lib/features/games/gameInvite.js +6 -1
- package/lib/features/games/gameInvite.js.map +1 -1
- package/lib/features/games/gameNotifications.js +9 -0
- package/lib/features/games/gameNotifications.js.map +1 -0
- package/lib/features/games/gameOrientation.js +10 -0
- package/lib/features/games/gameOrientation.js.map +1 -0
- package/lib/features/games/useCubeforgeFriends.js +86 -38
- package/lib/features/games/useCubeforgeFriends.js.map +1 -1
- package/lib/features/games/vendored/core/cubeforge/openingMemory.js +31 -0
- package/lib/features/games/vendored/core/cubeforge/openingMemory.js.map +1 -0
- package/lib/features/games/vendored/core/cubeforge/sharedWorlds.js +66 -2
- package/lib/features/games/vendored/core/cubeforge/sharedWorlds.js.map +1 -1
- package/lib/features/games/vendored/ui/GamesRoot.js +62 -6
- package/lib/features/games/vendored/ui/GamesRoot.js.map +1 -1
- package/lib/features/games/vendored/ui/components/primitives.js +1 -1
- package/lib/features/games/vendored/ui/screens/Cubeforge3DHomeScreen.js +128 -16
- package/lib/features/games/vendored/ui/screens/Cubeforge3DHomeScreen.js.map +1 -1
- package/lib/features/games/vendored/ui/screens/HowToPlayScreen.js +474 -0
- package/lib/features/games/vendored/ui/screens/HowToPlayScreen.js.map +1 -0
- package/lib/features/reporting/ReportAiContentButton.js +13 -0
- package/lib/features/reporting/ReportAiContentButton.js.map +1 -0
- package/lib/features/reporting/reportAiContent.js +55 -0
- package/lib/features/reporting/reportAiContent.js.map +1 -0
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/screens/Account/index.js +6 -1
- package/lib/screens/Account/index.js.map +1 -1
- package/lib/screens/GamesNative/index.js +4 -3
- package/lib/screens/GamesNative/index.js.map +1 -1
- package/package.json +4 -4
|
@@ -0,0 +1,474 @@
|
|
|
1
|
+
import {jsxs,jsx,Fragment}from'react/jsx-runtime';import {useState,useRef,useEffect}from'react';import {View,ScrollView,StyleSheet,Text,Animated,AccessibilityInfo,Easing}from'react-native';import {Button}from'../components/primitives.js';import {spacing,radius}from'../theme.js';import {ScreenHeader}from'./ScreenHeader.js';const STEPS = [{
|
|
2
|
+
demo: "walk",
|
|
3
|
+
title: "Walk",
|
|
4
|
+
body: "Drag your thumb on the left side of the screen. Push further to go faster, and tap JUMP to climb up a block."
|
|
5
|
+
}, {
|
|
6
|
+
demo: "look",
|
|
7
|
+
title: "Look around",
|
|
8
|
+
body: "Drag on the right side of the screen to turn and to look up or down."
|
|
9
|
+
}, {
|
|
10
|
+
demo: "mine",
|
|
11
|
+
title: "Break blocks",
|
|
12
|
+
body: "Point the cross at a block, then press and hold on the right side until it breaks. A quick tap attacks."
|
|
13
|
+
}, {
|
|
14
|
+
demo: "build",
|
|
15
|
+
title: "Build",
|
|
16
|
+
body: "Tap a slot in the bar at the bottom to hold that block. Point at a spot and tap USE to place it. USE also opens doors and chests."
|
|
17
|
+
}, {
|
|
18
|
+
demo: "menus",
|
|
19
|
+
title: "Craft and stay safe",
|
|
20
|
+
body: "BAG shows what you carry and CRAFT turns it into tools and blocks. Nights are dangerous, so build a shelter. REST skips to morning when no enemies are close."
|
|
21
|
+
}, {
|
|
22
|
+
demo: "friends",
|
|
23
|
+
title: "Play with friends",
|
|
24
|
+
body: "Tap BACK, then Play with friends, and choose people from your chats. When a friend invites you, you get a notification and a Join button that says who is asking."
|
|
25
|
+
}];
|
|
26
|
+
const STAGE_WIDTH = 288;
|
|
27
|
+
const STAGE_HEIGHT = 162;
|
|
28
|
+
const LOOP_MS = 2600;
|
|
29
|
+
function useLoop() {
|
|
30
|
+
const value = useRef(new Animated.Value(0.5)).current;
|
|
31
|
+
useEffect(() => {
|
|
32
|
+
let live = true;
|
|
33
|
+
let loop = null;
|
|
34
|
+
AccessibilityInfo.isReduceMotionEnabled().catch(() => false).then((reduced) => {
|
|
35
|
+
if (!live || reduced) return;
|
|
36
|
+
value.setValue(0);
|
|
37
|
+
loop = Animated.loop(Animated.timing(value, {
|
|
38
|
+
toValue: 1,
|
|
39
|
+
duration: LOOP_MS,
|
|
40
|
+
easing: Easing.inOut(Easing.quad),
|
|
41
|
+
useNativeDriver: true
|
|
42
|
+
}));
|
|
43
|
+
loop.start();
|
|
44
|
+
});
|
|
45
|
+
return () => {
|
|
46
|
+
live = false;
|
|
47
|
+
loop == null ? void 0 : loop.stop();
|
|
48
|
+
};
|
|
49
|
+
}, [value]);
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
function Person(props) {
|
|
53
|
+
return /* @__PURE__ */ jsxs(View, { style: props.style, children: [
|
|
54
|
+
/* @__PURE__ */ jsx(View, { style: styles.personHead }),
|
|
55
|
+
/* @__PURE__ */ jsx(View, { style: [styles.personBody, {
|
|
56
|
+
backgroundColor: props.shirt
|
|
57
|
+
}] }),
|
|
58
|
+
/* @__PURE__ */ jsx(View, { style: styles.personLegs })
|
|
59
|
+
] });
|
|
60
|
+
}
|
|
61
|
+
function DemoStage(props) {
|
|
62
|
+
const {
|
|
63
|
+
demo,
|
|
64
|
+
label
|
|
65
|
+
} = props;
|
|
66
|
+
const t = useLoop();
|
|
67
|
+
const at = (inputRange, outputRange) => t.interpolate({
|
|
68
|
+
inputRange,
|
|
69
|
+
outputRange,
|
|
70
|
+
extrapolate: "clamp"
|
|
71
|
+
});
|
|
72
|
+
const finger = {
|
|
73
|
+
walk: {
|
|
74
|
+
x: [50, 50, 50, 50],
|
|
75
|
+
y: [130, 104, 104, 130]
|
|
76
|
+
},
|
|
77
|
+
look: {
|
|
78
|
+
x: [214, 140, 140, 214],
|
|
79
|
+
y: [78, 78, 78, 78]
|
|
80
|
+
},
|
|
81
|
+
mine: {
|
|
82
|
+
x: [206, 206, 206, 206],
|
|
83
|
+
y: [84, 84, 84, 84]
|
|
84
|
+
},
|
|
85
|
+
build: {
|
|
86
|
+
x: [176, 226, 226, 176],
|
|
87
|
+
y: [60, 116, 116, 60]
|
|
88
|
+
},
|
|
89
|
+
menus: {
|
|
90
|
+
x: [150, 261, 261, 261],
|
|
91
|
+
y: [90, 17, 39, 39]
|
|
92
|
+
},
|
|
93
|
+
friends: {
|
|
94
|
+
x: [120, 144, 144, 120],
|
|
95
|
+
y: [130, 94, 94, 130]
|
|
96
|
+
}
|
|
97
|
+
};
|
|
98
|
+
const fingerStops = [0, 0.3, 0.7, 1];
|
|
99
|
+
const worldMotion = demo === "walk" ? {
|
|
100
|
+
transform: [{
|
|
101
|
+
scale: at(fingerStops, [1, 1.3, 1.3, 1])
|
|
102
|
+
}]
|
|
103
|
+
} : demo === "look" ? {
|
|
104
|
+
transform: [{
|
|
105
|
+
translateX: at(fingerStops, [0, 46, 46, 0])
|
|
106
|
+
}]
|
|
107
|
+
} : null;
|
|
108
|
+
const flash = (start, end) => ({
|
|
109
|
+
opacity: at([start, start + 0.05, end - 0.05, end], [0, 1, 1, 0])
|
|
110
|
+
});
|
|
111
|
+
return /* @__PURE__ */ jsxs(View, { accessible: true, accessibilityRole: "image", accessibilityLabel: `${label} demonstration`, style: styles.stage, children: [
|
|
112
|
+
/* @__PURE__ */ jsxs(Animated.View, { style: [styles.world, worldMotion], children: [
|
|
113
|
+
/* @__PURE__ */ jsx(View, { style: styles.ground }),
|
|
114
|
+
/* @__PURE__ */ jsx(View, { style: [styles.trunk, {
|
|
115
|
+
left: 44
|
|
116
|
+
}] }),
|
|
117
|
+
/* @__PURE__ */ jsx(View, { style: [styles.leaves, {
|
|
118
|
+
left: 24
|
|
119
|
+
}] }),
|
|
120
|
+
/* @__PURE__ */ jsx(View, { style: [styles.trunk, {
|
|
121
|
+
left: 240
|
|
122
|
+
}] }),
|
|
123
|
+
/* @__PURE__ */ jsx(View, { style: [styles.leaves, {
|
|
124
|
+
left: 220
|
|
125
|
+
}] }),
|
|
126
|
+
/* @__PURE__ */ jsx(Animated.View, { style: [styles.block, demo === "mine" ? {
|
|
127
|
+
opacity: at([0, 0.68, 0.74, 0.92, 1], [1, 1, 0, 0, 1])
|
|
128
|
+
} : null], children: demo === "mine" ? /* @__PURE__ */ jsx(Animated.View, { style: [styles.crack, {
|
|
129
|
+
opacity: at([0, 0.68, 0.74], [0, 1, 0])
|
|
130
|
+
}] }) : null }),
|
|
131
|
+
demo === "build" ? /* @__PURE__ */ jsx(Animated.View, { style: [styles.block, styles.blockAbove, {
|
|
132
|
+
opacity: at([0, 0.32, 0.36, 0.9, 1], [0, 0, 1, 1, 0]),
|
|
133
|
+
transform: [{
|
|
134
|
+
scale: at([0.32, 0.42], [0.3, 1])
|
|
135
|
+
}]
|
|
136
|
+
}] }) : null,
|
|
137
|
+
demo === "friends" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
138
|
+
/* @__PURE__ */ jsx(Person, { shirt: "#3f7fbf", style: styles.personYou }),
|
|
139
|
+
/* @__PURE__ */ jsx(Animated.View, { style: [styles.personFriend, {
|
|
140
|
+
transform: [{
|
|
141
|
+
translateX: at([0.1, 0.6], [110, 0])
|
|
142
|
+
}]
|
|
143
|
+
}], children: /* @__PURE__ */ jsx(Person, { shirt: "#c98a2b" }) })
|
|
144
|
+
] }) : null
|
|
145
|
+
] }),
|
|
146
|
+
/* @__PURE__ */ jsx(Text, { style: styles.cross, children: "+" }),
|
|
147
|
+
/* @__PURE__ */ jsx(View, { style: styles.hotbar, children: [0, 1, 2, 3, 4].map((slot) => /* @__PURE__ */ jsx(View, { style: [styles.slot, slot === 0 ? styles.slotHeld : null], children: slot < 3 ? /* @__PURE__ */ jsx(View, { style: [styles.slotItem, slot === 1 ? styles.slotItemWood : null] }) : null }, slot)) }),
|
|
148
|
+
/* @__PURE__ */ jsx(View, { style: [styles.pill, {
|
|
149
|
+
top: 8
|
|
150
|
+
}], children: /* @__PURE__ */ jsx(Text, { style: styles.pillLabel, children: "BAG" }) }),
|
|
151
|
+
/* @__PURE__ */ jsx(View, { style: [styles.pill, {
|
|
152
|
+
top: 30
|
|
153
|
+
}], children: /* @__PURE__ */ jsx(Text, { style: styles.pillLabel, children: "CRAFT" }) }),
|
|
154
|
+
demo === "menus" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
155
|
+
/* @__PURE__ */ jsx(Animated.View, { style: [styles.pill, styles.pillLit, {
|
|
156
|
+
top: 8
|
|
157
|
+
}, flash(0.2, 0.5)] }),
|
|
158
|
+
/* @__PURE__ */ jsx(Animated.View, { style: [styles.pill, styles.pillLit, {
|
|
159
|
+
top: 30
|
|
160
|
+
}, flash(0.55, 0.9)] })
|
|
161
|
+
] }) : null,
|
|
162
|
+
/* @__PURE__ */ jsx(View, { style: [styles.round, {
|
|
163
|
+
left: 208,
|
|
164
|
+
top: 98
|
|
165
|
+
}], children: /* @__PURE__ */ jsx(Text, { style: styles.roundLabel, children: "USE" }) }),
|
|
166
|
+
/* @__PURE__ */ jsx(View, { style: [styles.round, {
|
|
167
|
+
left: 248,
|
|
168
|
+
top: 66
|
|
169
|
+
}], children: /* @__PURE__ */ jsx(Text, { style: styles.roundLabel, children: "JUMP" }) }),
|
|
170
|
+
demo === "build" ? /* @__PURE__ */ jsx(Animated.View, { style: [styles.round, styles.roundLit, {
|
|
171
|
+
left: 208,
|
|
172
|
+
top: 98
|
|
173
|
+
}, flash(0.28, 0.5)] }) : null,
|
|
174
|
+
demo === "walk" ? /* @__PURE__ */ jsx(View, { style: styles.joystick, children: /* @__PURE__ */ jsx(Animated.View, { style: [styles.knob, {
|
|
175
|
+
transform: [{
|
|
176
|
+
translateY: at(fingerStops, [0, -26, -26, 0])
|
|
177
|
+
}]
|
|
178
|
+
}] }) }) : null,
|
|
179
|
+
demo === "friends" ? /* @__PURE__ */ jsx(Animated.View, { style: [styles.inviteCard, {
|
|
180
|
+
opacity: at([0, 0.12, 0.95, 1], [0, 1, 1, 0])
|
|
181
|
+
}], children: /* @__PURE__ */ jsx(Text, { style: styles.inviteText, children: "Tap Join" }) }) : null,
|
|
182
|
+
/* @__PURE__ */ jsx(Animated.View, { style: [styles.finger, {
|
|
183
|
+
transform: [{
|
|
184
|
+
translateX: at(fingerStops, finger[demo].x)
|
|
185
|
+
}, {
|
|
186
|
+
translateY: at(fingerStops, finger[demo].y)
|
|
187
|
+
}, ...demo === "mine" ? [{
|
|
188
|
+
scale: at([0, 0.35, 0.7], [1, 0.82, 1])
|
|
189
|
+
}] : []]
|
|
190
|
+
}] })
|
|
191
|
+
] });
|
|
192
|
+
}
|
|
193
|
+
function HowToPlayScreen(props) {
|
|
194
|
+
const {
|
|
195
|
+
theme,
|
|
196
|
+
onDone
|
|
197
|
+
} = props;
|
|
198
|
+
const [index, setIndex] = useState(0);
|
|
199
|
+
const step = STEPS[index];
|
|
200
|
+
const last = index === STEPS.length - 1;
|
|
201
|
+
return /* @__PURE__ */ jsxs(View, { style: {
|
|
202
|
+
flex: 1,
|
|
203
|
+
backgroundColor: theme.bg
|
|
204
|
+
}, children: [
|
|
205
|
+
/* @__PURE__ */ jsx(ScreenHeader, { theme, title: "How to play", onBack: onDone, backLabel: "Skip" }),
|
|
206
|
+
/* @__PURE__ */ jsxs(ScrollView, { contentContainerStyle: styles.content, children: [
|
|
207
|
+
/* @__PURE__ */ jsx(DemoStage, { demo: step.demo, label: step.title }, step.demo),
|
|
208
|
+
/* @__PURE__ */ jsx(Text, { accessibilityRole: "header", style: [styles.title, {
|
|
209
|
+
color: theme.text
|
|
210
|
+
}], children: step.title }),
|
|
211
|
+
/* @__PURE__ */ jsx(Text, { style: [styles.body, {
|
|
212
|
+
color: theme.textMuted
|
|
213
|
+
}], children: step.body })
|
|
214
|
+
] }),
|
|
215
|
+
/* @__PURE__ */ jsxs(View, { style: [styles.footer, {
|
|
216
|
+
backgroundColor: theme.surface,
|
|
217
|
+
borderTopColor: theme.border
|
|
218
|
+
}], children: [
|
|
219
|
+
/* @__PURE__ */ jsx(View, { style: styles.dots, accessibilityLabel: `Step ${index + 1} of ${STEPS.length}`, children: STEPS.map((s, i) => /* @__PURE__ */ jsx(View, { style: [styles.dot, {
|
|
220
|
+
backgroundColor: i === index ? theme.primary : theme.border
|
|
221
|
+
}] }, s.demo)) }),
|
|
222
|
+
/* @__PURE__ */ jsxs(View, { style: styles.buttons, children: [
|
|
223
|
+
index > 0 ? /* @__PURE__ */ jsx(Button, { theme, variant: "secondary", label: "Back", onPress: () => setIndex(index - 1), style: styles.button }) : null,
|
|
224
|
+
/* @__PURE__ */ jsx(Button, { theme, label: last ? "Start playing" : "Next", onPress: () => last ? onDone() : setIndex(index + 1), style: styles.button })
|
|
225
|
+
] })
|
|
226
|
+
] })
|
|
227
|
+
] });
|
|
228
|
+
}
|
|
229
|
+
const BLOCK_SIZE = 30;
|
|
230
|
+
const GROUND_TOP = 104;
|
|
231
|
+
const styles = StyleSheet.create({
|
|
232
|
+
content: {
|
|
233
|
+
padding: spacing.lg,
|
|
234
|
+
paddingTop: spacing.xxl,
|
|
235
|
+
gap: spacing.md,
|
|
236
|
+
alignItems: "center"
|
|
237
|
+
},
|
|
238
|
+
stage: {
|
|
239
|
+
width: STAGE_WIDTH,
|
|
240
|
+
height: STAGE_HEIGHT,
|
|
241
|
+
borderRadius: radius.lg,
|
|
242
|
+
overflow: "hidden",
|
|
243
|
+
backgroundColor: "#8ec5f0"
|
|
244
|
+
},
|
|
245
|
+
world: {
|
|
246
|
+
position: "absolute",
|
|
247
|
+
left: 0,
|
|
248
|
+
top: 0,
|
|
249
|
+
width: STAGE_WIDTH,
|
|
250
|
+
height: STAGE_HEIGHT
|
|
251
|
+
},
|
|
252
|
+
ground: {
|
|
253
|
+
position: "absolute",
|
|
254
|
+
left: -80,
|
|
255
|
+
right: -80,
|
|
256
|
+
top: GROUND_TOP,
|
|
257
|
+
bottom: -40,
|
|
258
|
+
backgroundColor: "#6fae5a"
|
|
259
|
+
},
|
|
260
|
+
trunk: {
|
|
261
|
+
position: "absolute",
|
|
262
|
+
top: 62,
|
|
263
|
+
width: 14,
|
|
264
|
+
height: 42,
|
|
265
|
+
backgroundColor: "#7a5230"
|
|
266
|
+
},
|
|
267
|
+
leaves: {
|
|
268
|
+
position: "absolute",
|
|
269
|
+
top: 30,
|
|
270
|
+
width: 54,
|
|
271
|
+
height: 40,
|
|
272
|
+
backgroundColor: "#3f8a4a"
|
|
273
|
+
},
|
|
274
|
+
block: {
|
|
275
|
+
position: "absolute",
|
|
276
|
+
left: STAGE_WIDTH / 2 - BLOCK_SIZE / 2,
|
|
277
|
+
top: GROUND_TOP - BLOCK_SIZE,
|
|
278
|
+
width: BLOCK_SIZE,
|
|
279
|
+
height: BLOCK_SIZE,
|
|
280
|
+
backgroundColor: "#9aa0a6",
|
|
281
|
+
borderTopWidth: 5,
|
|
282
|
+
borderTopColor: "#b9bec4"
|
|
283
|
+
},
|
|
284
|
+
blockAbove: {
|
|
285
|
+
top: GROUND_TOP - BLOCK_SIZE * 2
|
|
286
|
+
},
|
|
287
|
+
crack: {
|
|
288
|
+
flex: 1,
|
|
289
|
+
backgroundColor: "rgba(30,30,30,0.45)"
|
|
290
|
+
},
|
|
291
|
+
cross: {
|
|
292
|
+
position: "absolute",
|
|
293
|
+
left: STAGE_WIDTH / 2 - 8,
|
|
294
|
+
top: GROUND_TOP - BLOCK_SIZE / 2 - 14,
|
|
295
|
+
width: 16,
|
|
296
|
+
textAlign: "center",
|
|
297
|
+
color: "#ffffff",
|
|
298
|
+
fontSize: 20,
|
|
299
|
+
fontWeight: "700"
|
|
300
|
+
},
|
|
301
|
+
hotbar: {
|
|
302
|
+
position: "absolute",
|
|
303
|
+
left: 78,
|
|
304
|
+
bottom: 6,
|
|
305
|
+
width: 132,
|
|
306
|
+
flexDirection: "row",
|
|
307
|
+
justifyContent: "space-between"
|
|
308
|
+
},
|
|
309
|
+
slot: {
|
|
310
|
+
width: 24,
|
|
311
|
+
height: 24,
|
|
312
|
+
alignItems: "center",
|
|
313
|
+
justifyContent: "center",
|
|
314
|
+
borderWidth: 1,
|
|
315
|
+
borderColor: "rgba(255,255,255,0.35)",
|
|
316
|
+
backgroundColor: "rgba(0,0,0,0.35)"
|
|
317
|
+
},
|
|
318
|
+
slotHeld: {
|
|
319
|
+
borderColor: "#ffffff",
|
|
320
|
+
borderWidth: 2
|
|
321
|
+
},
|
|
322
|
+
slotItem: {
|
|
323
|
+
width: 13,
|
|
324
|
+
height: 13,
|
|
325
|
+
backgroundColor: "#9aa0a6"
|
|
326
|
+
},
|
|
327
|
+
slotItemWood: {
|
|
328
|
+
backgroundColor: "#a9783f"
|
|
329
|
+
},
|
|
330
|
+
pill: {
|
|
331
|
+
position: "absolute",
|
|
332
|
+
left: 240,
|
|
333
|
+
width: 42,
|
|
334
|
+
height: 18,
|
|
335
|
+
borderRadius: 3,
|
|
336
|
+
alignItems: "center",
|
|
337
|
+
justifyContent: "center",
|
|
338
|
+
backgroundColor: "rgba(30,38,48,0.78)"
|
|
339
|
+
},
|
|
340
|
+
pillLit: {
|
|
341
|
+
backgroundColor: "rgba(255,255,255,0.55)"
|
|
342
|
+
},
|
|
343
|
+
pillLabel: {
|
|
344
|
+
color: "#ffffff",
|
|
345
|
+
fontSize: 9,
|
|
346
|
+
fontWeight: "700"
|
|
347
|
+
},
|
|
348
|
+
round: {
|
|
349
|
+
position: "absolute",
|
|
350
|
+
width: 36,
|
|
351
|
+
height: 36,
|
|
352
|
+
borderRadius: 18,
|
|
353
|
+
alignItems: "center",
|
|
354
|
+
justifyContent: "center",
|
|
355
|
+
borderWidth: 1,
|
|
356
|
+
borderColor: "rgba(255,255,255,0.7)",
|
|
357
|
+
backgroundColor: "rgba(30,38,48,0.6)"
|
|
358
|
+
},
|
|
359
|
+
roundLit: {
|
|
360
|
+
backgroundColor: "rgba(255,255,255,0.55)"
|
|
361
|
+
},
|
|
362
|
+
roundLabel: {
|
|
363
|
+
color: "#ffffff",
|
|
364
|
+
fontSize: 9,
|
|
365
|
+
fontWeight: "700"
|
|
366
|
+
},
|
|
367
|
+
joystick: {
|
|
368
|
+
position: "absolute",
|
|
369
|
+
left: 22,
|
|
370
|
+
top: 102,
|
|
371
|
+
width: 56,
|
|
372
|
+
height: 56,
|
|
373
|
+
borderRadius: 28,
|
|
374
|
+
alignItems: "center",
|
|
375
|
+
justifyContent: "center",
|
|
376
|
+
borderWidth: 1,
|
|
377
|
+
borderColor: "rgba(255,255,255,0.7)",
|
|
378
|
+
backgroundColor: "rgba(255,255,255,0.14)"
|
|
379
|
+
},
|
|
380
|
+
knob: {
|
|
381
|
+
width: 26,
|
|
382
|
+
height: 26,
|
|
383
|
+
borderRadius: 13,
|
|
384
|
+
backgroundColor: "rgba(255,255,255,0.6)"
|
|
385
|
+
},
|
|
386
|
+
finger: {
|
|
387
|
+
position: "absolute",
|
|
388
|
+
left: -13,
|
|
389
|
+
top: -13,
|
|
390
|
+
width: 26,
|
|
391
|
+
height: 26,
|
|
392
|
+
borderRadius: 13,
|
|
393
|
+
borderWidth: 2,
|
|
394
|
+
borderColor: "#ffffff",
|
|
395
|
+
backgroundColor: "rgba(255,255,255,0.45)"
|
|
396
|
+
},
|
|
397
|
+
personHead: {
|
|
398
|
+
width: 14,
|
|
399
|
+
height: 14,
|
|
400
|
+
marginLeft: 3,
|
|
401
|
+
backgroundColor: "#d9a57a"
|
|
402
|
+
},
|
|
403
|
+
personBody: {
|
|
404
|
+
width: 20,
|
|
405
|
+
height: 20
|
|
406
|
+
},
|
|
407
|
+
personLegs: {
|
|
408
|
+
width: 14,
|
|
409
|
+
height: 14,
|
|
410
|
+
marginLeft: 3,
|
|
411
|
+
backgroundColor: "#35506b"
|
|
412
|
+
},
|
|
413
|
+
personYou: {
|
|
414
|
+
position: "absolute",
|
|
415
|
+
left: 76,
|
|
416
|
+
top: GROUND_TOP - 48
|
|
417
|
+
},
|
|
418
|
+
personFriend: {
|
|
419
|
+
position: "absolute",
|
|
420
|
+
left: 188,
|
|
421
|
+
top: GROUND_TOP - 48
|
|
422
|
+
},
|
|
423
|
+
inviteCard: {
|
|
424
|
+
position: "absolute",
|
|
425
|
+
left: 108,
|
|
426
|
+
top: 82,
|
|
427
|
+
width: 72,
|
|
428
|
+
height: 24,
|
|
429
|
+
borderRadius: 6,
|
|
430
|
+
alignItems: "center",
|
|
431
|
+
justifyContent: "center",
|
|
432
|
+
backgroundColor: "#2f7d57"
|
|
433
|
+
},
|
|
434
|
+
inviteText: {
|
|
435
|
+
color: "#ffffff",
|
|
436
|
+
fontSize: 11,
|
|
437
|
+
fontWeight: "700"
|
|
438
|
+
},
|
|
439
|
+
title: {
|
|
440
|
+
alignSelf: "stretch",
|
|
441
|
+
fontSize: 22,
|
|
442
|
+
fontWeight: "700",
|
|
443
|
+
marginTop: spacing.sm
|
|
444
|
+
},
|
|
445
|
+
body: {
|
|
446
|
+
alignSelf: "stretch",
|
|
447
|
+
fontSize: 16,
|
|
448
|
+
lineHeight: 23
|
|
449
|
+
},
|
|
450
|
+
footer: {
|
|
451
|
+
gap: spacing.md,
|
|
452
|
+
paddingHorizontal: spacing.lg,
|
|
453
|
+
paddingTop: spacing.md,
|
|
454
|
+
paddingBottom: spacing.xxl,
|
|
455
|
+
borderTopWidth: StyleSheet.hairlineWidth
|
|
456
|
+
},
|
|
457
|
+
dots: {
|
|
458
|
+
flexDirection: "row",
|
|
459
|
+
justifyContent: "center",
|
|
460
|
+
gap: 6
|
|
461
|
+
},
|
|
462
|
+
dot: {
|
|
463
|
+
width: 7,
|
|
464
|
+
height: 7,
|
|
465
|
+
borderRadius: 4
|
|
466
|
+
},
|
|
467
|
+
buttons: {
|
|
468
|
+
flexDirection: "row",
|
|
469
|
+
gap: spacing.sm
|
|
470
|
+
},
|
|
471
|
+
button: {
|
|
472
|
+
flex: 1
|
|
473
|
+
}
|
|
474
|
+
});export{HowToPlayScreen};//# sourceMappingURL=HowToPlayScreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HowToPlayScreen.js","sources":["../../../../../../src/features/games/vendored/ui/screens/HowToPlayScreen.tsx"],"sourcesContent":["import * as React from 'react';\nimport { useEffect, useRef, useState } from 'react';\nimport { AccessibilityInfo, Animated, Easing, ScrollView, StyleSheet, Text, View } from 'react-native';\nimport { Button } from '../components/primitives';\nimport { radius, spacing, type Theme } from '../theme';\nimport { ScreenHeader } from './ScreenHeader';\n\ntype Demo = 'walk' | 'look' | 'mine' | 'build' | 'menus' | 'friends';\n\ninterface Step {\n demo: Demo;\n title: string;\n body: string;\n}\n\nconst STEPS: Step[] = [\n {\n demo: 'walk',\n title: 'Walk',\n body: 'Drag your thumb on the left side of the screen. Push further to go faster, and tap JUMP to climb up a block.',\n },\n {\n demo: 'look',\n title: 'Look around',\n body: 'Drag on the right side of the screen to turn and to look up or down.',\n },\n {\n demo: 'mine',\n title: 'Break blocks',\n body: 'Point the cross at a block, then press and hold on the right side until it breaks. A quick tap attacks.',\n },\n {\n demo: 'build',\n title: 'Build',\n body: 'Tap a slot in the bar at the bottom to hold that block. Point at a spot and tap USE to place it. USE also opens doors and chests.',\n },\n {\n demo: 'menus',\n title: 'Craft and stay safe',\n body: 'BAG shows what you carry and CRAFT turns it into tools and blocks. Nights are dangerous, so build a shelter. REST skips to morning when no enemies are close.',\n },\n {\n demo: 'friends',\n title: 'Play with friends',\n body: 'Tap BACK, then Play with friends, and choose people from your chats. When a friend invites you, you get a notification and a Join button that says who is asking.',\n },\n];\n\nconst STAGE_WIDTH = 288;\nconst STAGE_HEIGHT = 162;\nconst LOOP_MS = 2600;\n\n/** A value that runs from 0 to 1 over and over, or holds still for people who ask for less motion. */\nfunction useLoop(): Animated.Value {\n const value = useRef(new Animated.Value(0.5)).current;\n useEffect(() => {\n let live = true;\n let loop: Animated.CompositeAnimation | null = null;\n AccessibilityInfo.isReduceMotionEnabled()\n .catch(() => false)\n .then((reduced) => {\n if (!live || reduced) return;\n value.setValue(0);\n loop = Animated.loop(\n Animated.timing(value, {\n toValue: 1,\n duration: LOOP_MS,\n easing: Easing.inOut(Easing.quad),\n useNativeDriver: true,\n }),\n );\n loop.start();\n });\n return () => {\n live = false;\n loop?.stop();\n };\n }, [value]);\n return value;\n}\n\nfunction Person(props: { shirt: string; style?: object }): React.ReactElement {\n return (\n <View style={props.style}>\n <View style={styles.personHead} />\n <View style={[styles.personBody, { backgroundColor: props.shirt }]} />\n <View style={styles.personLegs} />\n </View>\n );\n}\n\nfunction DemoStage(props: { demo: Demo; label: string }): React.ReactElement {\n const { demo, label } = props;\n const t = useLoop();\n const at = (inputRange: number[], outputRange: number[]) =>\n t.interpolate({ inputRange, outputRange, extrapolate: 'clamp' });\n\n const finger: Record<Demo, { x: number[]; y: number[] }> = {\n walk: { x: [50, 50, 50, 50], y: [130, 104, 104, 130] },\n look: { x: [214, 140, 140, 214], y: [78, 78, 78, 78] },\n mine: { x: [206, 206, 206, 206], y: [84, 84, 84, 84] },\n build: { x: [176, 226, 226, 176], y: [60, 116, 116, 60] },\n menus: { x: [150, 261, 261, 261], y: [90, 17, 39, 39] },\n friends: { x: [120, 144, 144, 120], y: [130, 94, 94, 130] },\n };\n const fingerStops = [0, 0.3, 0.7, 1];\n\n const worldMotion =\n demo === 'walk'\n ? { transform: [{ scale: at(fingerStops, [1, 1.3, 1.3, 1]) }] }\n : demo === 'look'\n ? { transform: [{ translateX: at(fingerStops, [0, 46, 46, 0]) }] }\n : null;\n\n const flash = (start: number, end: number) => ({\n opacity: at([start, start + 0.05, end - 0.05, end], [0, 1, 1, 0]),\n });\n\n return (\n <View accessible accessibilityRole=\"image\" accessibilityLabel={`${label} demonstration`} style={styles.stage}>\n <Animated.View style={[styles.world, worldMotion]}>\n <View style={styles.ground} />\n <View style={[styles.trunk, { left: 44 }]} />\n <View style={[styles.leaves, { left: 24 }]} />\n <View style={[styles.trunk, { left: 240 }]} />\n <View style={[styles.leaves, { left: 220 }]} />\n <Animated.View\n style={[\n styles.block,\n demo === 'mine' ? { opacity: at([0, 0.68, 0.74, 0.92, 1], [1, 1, 0, 0, 1]) } : null,\n ]}\n >\n {demo === 'mine' ? (\n <Animated.View style={[styles.crack, { opacity: at([0, 0.68, 0.74], [0, 1, 0]) }]} />\n ) : null}\n </Animated.View>\n {demo === 'build' ? (\n <Animated.View\n style={[\n styles.block,\n styles.blockAbove,\n {\n opacity: at([0, 0.32, 0.36, 0.9, 1], [0, 0, 1, 1, 0]),\n transform: [{ scale: at([0.32, 0.42], [0.3, 1]) }],\n },\n ]}\n />\n ) : null}\n {demo === 'friends' ? (\n <>\n <Person shirt=\"#3f7fbf\" style={styles.personYou} />\n <Animated.View\n style={[styles.personFriend, { transform: [{ translateX: at([0.1, 0.6], [110, 0]) }] }]}\n >\n <Person shirt=\"#c98a2b\" />\n </Animated.View>\n </>\n ) : null}\n </Animated.View>\n\n <Text style={styles.cross}>+</Text>\n\n <View style={styles.hotbar}>\n {[0, 1, 2, 3, 4].map((slot) => (\n <View key={slot} style={[styles.slot, slot === 0 ? styles.slotHeld : null]}>\n {slot < 3 ? <View style={[styles.slotItem, slot === 1 ? styles.slotItemWood : null]} /> : null}\n </View>\n ))}\n </View>\n\n <View style={[styles.pill, { top: 8 }]}>\n <Text style={styles.pillLabel}>BAG</Text>\n </View>\n <View style={[styles.pill, { top: 30 }]}>\n <Text style={styles.pillLabel}>CRAFT</Text>\n </View>\n {demo === 'menus' ? (\n <>\n <Animated.View style={[styles.pill, styles.pillLit, { top: 8 }, flash(0.2, 0.5)]} />\n <Animated.View style={[styles.pill, styles.pillLit, { top: 30 }, flash(0.55, 0.9)]} />\n </>\n ) : null}\n\n <View style={[styles.round, { left: 208, top: 98 }]}>\n <Text style={styles.roundLabel}>USE</Text>\n </View>\n <View style={[styles.round, { left: 248, top: 66 }]}>\n <Text style={styles.roundLabel}>JUMP</Text>\n </View>\n {demo === 'build' ? (\n <Animated.View style={[styles.round, styles.roundLit, { left: 208, top: 98 }, flash(0.28, 0.5)]} />\n ) : null}\n\n {demo === 'walk' ? (\n <View style={styles.joystick}>\n <Animated.View\n style={[styles.knob, { transform: [{ translateY: at(fingerStops, [0, -26, -26, 0]) }] }]}\n />\n </View>\n ) : null}\n\n {demo === 'friends' ? (\n <Animated.View style={[styles.inviteCard, { opacity: at([0, 0.12, 0.95, 1], [0, 1, 1, 0]) }]}>\n <Text style={styles.inviteText}>Tap Join</Text>\n </Animated.View>\n ) : null}\n\n <Animated.View\n style={[\n styles.finger,\n {\n transform: [\n { translateX: at(fingerStops, finger[demo].x) },\n { translateY: at(fingerStops, finger[demo].y) },\n ...(demo === 'mine' ? [{ scale: at([0, 0.35, 0.7], [1, 0.82, 1]) }] : []),\n ],\n },\n ]}\n />\n </View>\n );\n}\n\nexport function HowToPlayScreen(props: { theme: Theme; onDone: () => void }): React.ReactElement {\n const { theme, onDone } = props;\n const [index, setIndex] = useState(0);\n const step = STEPS[index] as Step;\n const last = index === STEPS.length - 1;\n return (\n <View style={{ flex: 1, backgroundColor: theme.bg }}>\n <ScreenHeader theme={theme} title=\"How to play\" onBack={onDone} backLabel=\"Skip\" />\n <ScrollView contentContainerStyle={styles.content}>\n <DemoStage key={step.demo} demo={step.demo} label={step.title} />\n <Text accessibilityRole=\"header\" style={[styles.title, { color: theme.text }]}>\n {step.title}\n </Text>\n <Text style={[styles.body, { color: theme.textMuted }]}>{step.body}</Text>\n </ScrollView>\n <View style={[styles.footer, { backgroundColor: theme.surface, borderTopColor: theme.border }]}>\n <View style={styles.dots} accessibilityLabel={`Step ${index + 1} of ${STEPS.length}`}>\n {STEPS.map((s, i) => (\n <View\n key={s.demo}\n style={[styles.dot, { backgroundColor: i === index ? theme.primary : theme.border }]}\n />\n ))}\n </View>\n <View style={styles.buttons}>\n {index > 0 ? (\n <Button\n theme={theme}\n variant=\"secondary\"\n label=\"Back\"\n onPress={() => setIndex(index - 1)}\n style={styles.button}\n />\n ) : null}\n <Button\n theme={theme}\n label={last ? 'Start playing' : 'Next'}\n onPress={() => (last ? onDone() : setIndex(index + 1))}\n style={styles.button}\n />\n </View>\n </View>\n </View>\n );\n}\n\nconst BLOCK_SIZE = 30;\nconst GROUND_TOP = 104;\n\nconst styles = StyleSheet.create({\n content: { padding: spacing.lg, paddingTop: spacing.xxl, gap: spacing.md, alignItems: 'center' },\n stage: {\n width: STAGE_WIDTH,\n height: STAGE_HEIGHT,\n borderRadius: radius.lg,\n overflow: 'hidden',\n backgroundColor: '#8ec5f0',\n },\n world: { position: 'absolute', left: 0, top: 0, width: STAGE_WIDTH, height: STAGE_HEIGHT },\n ground: {\n position: 'absolute',\n left: -80,\n right: -80,\n top: GROUND_TOP,\n bottom: -40,\n backgroundColor: '#6fae5a',\n },\n trunk: { position: 'absolute', top: 62, width: 14, height: 42, backgroundColor: '#7a5230' },\n leaves: { position: 'absolute', top: 30, width: 54, height: 40, backgroundColor: '#3f8a4a' },\n block: {\n position: 'absolute',\n left: STAGE_WIDTH / 2 - BLOCK_SIZE / 2,\n top: GROUND_TOP - BLOCK_SIZE,\n width: BLOCK_SIZE,\n height: BLOCK_SIZE,\n backgroundColor: '#9aa0a6',\n borderTopWidth: 5,\n borderTopColor: '#b9bec4',\n },\n blockAbove: { top: GROUND_TOP - BLOCK_SIZE * 2 },\n crack: { flex: 1, backgroundColor: 'rgba(30,30,30,0.45)' },\n cross: {\n position: 'absolute',\n left: STAGE_WIDTH / 2 - 8,\n top: GROUND_TOP - BLOCK_SIZE / 2 - 14,\n width: 16,\n textAlign: 'center',\n color: '#ffffff',\n fontSize: 20,\n fontWeight: '700',\n },\n hotbar: {\n position: 'absolute',\n left: 78,\n bottom: 6,\n width: 132,\n flexDirection: 'row',\n justifyContent: 'space-between',\n },\n slot: {\n width: 24,\n height: 24,\n alignItems: 'center',\n justifyContent: 'center',\n borderWidth: 1,\n borderColor: 'rgba(255,255,255,0.35)',\n backgroundColor: 'rgba(0,0,0,0.35)',\n },\n slotHeld: { borderColor: '#ffffff', borderWidth: 2 },\n slotItem: { width: 13, height: 13, backgroundColor: '#9aa0a6' },\n slotItemWood: { backgroundColor: '#a9783f' },\n pill: {\n position: 'absolute',\n left: 240,\n width: 42,\n height: 18,\n borderRadius: 3,\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: 'rgba(30,38,48,0.78)',\n },\n pillLit: { backgroundColor: 'rgba(255,255,255,0.55)' },\n pillLabel: { color: '#ffffff', fontSize: 9, fontWeight: '700' },\n round: {\n position: 'absolute',\n width: 36,\n height: 36,\n borderRadius: 18,\n alignItems: 'center',\n justifyContent: 'center',\n borderWidth: 1,\n borderColor: 'rgba(255,255,255,0.7)',\n backgroundColor: 'rgba(30,38,48,0.6)',\n },\n roundLit: { backgroundColor: 'rgba(255,255,255,0.55)' },\n roundLabel: { color: '#ffffff', fontSize: 9, fontWeight: '700' },\n joystick: {\n position: 'absolute',\n left: 22,\n top: 102,\n width: 56,\n height: 56,\n borderRadius: 28,\n alignItems: 'center',\n justifyContent: 'center',\n borderWidth: 1,\n borderColor: 'rgba(255,255,255,0.7)',\n backgroundColor: 'rgba(255,255,255,0.14)',\n },\n knob: { width: 26, height: 26, borderRadius: 13, backgroundColor: 'rgba(255,255,255,0.6)' },\n finger: {\n position: 'absolute',\n left: -13,\n top: -13,\n width: 26,\n height: 26,\n borderRadius: 13,\n borderWidth: 2,\n borderColor: '#ffffff',\n backgroundColor: 'rgba(255,255,255,0.45)',\n },\n personHead: { width: 14, height: 14, marginLeft: 3, backgroundColor: '#d9a57a' },\n personBody: { width: 20, height: 20 },\n personLegs: { width: 14, height: 14, marginLeft: 3, backgroundColor: '#35506b' },\n personYou: { position: 'absolute', left: 76, top: GROUND_TOP - 48 },\n personFriend: { position: 'absolute', left: 188, top: GROUND_TOP - 48 },\n inviteCard: {\n position: 'absolute',\n left: 108,\n top: 82,\n width: 72,\n height: 24,\n borderRadius: 6,\n alignItems: 'center',\n justifyContent: 'center',\n backgroundColor: '#2f7d57',\n },\n inviteText: { color: '#ffffff', fontSize: 11, fontWeight: '700' },\n title: { alignSelf: 'stretch', fontSize: 22, fontWeight: '700', marginTop: spacing.sm },\n body: { alignSelf: 'stretch', fontSize: 16, lineHeight: 23 },\n footer: {\n gap: spacing.md,\n paddingHorizontal: spacing.lg,\n paddingTop: spacing.md,\n paddingBottom: spacing.xxl,\n borderTopWidth: StyleSheet.hairlineWidth,\n },\n dots: { flexDirection: 'row', justifyContent: 'center', gap: 6 },\n dot: { width: 7, height: 7, borderRadius: 4 },\n buttons: { flexDirection: 'row', gap: spacing.sm },\n button: { flex: 1 },\n});\n"],"names":[],"mappings":"oUAYA,MAAM,QAAgB,CAAC;AAAA,EACrB,IAAM,EAAA,MAAA;AAAA,EACN,KAAO,EAAA,MAAA;AAAA,EACP,IAAM,EAAA;AACR,CAAG,EAAA;AAAA,EACD,IAAM,EAAA,MAAA;AAAA,EACN,KAAO,EAAA,aAAA;AAAA,EACP,IAAM,EAAA;AACR,CAAG,EAAA;AAAA,EACD,IAAM,EAAA,MAAA;AAAA,EACN,KAAO,EAAA,cAAA;AAAA,EACP,IAAM,EAAA;AACR,CAAG,EAAA;AAAA,EACD,IAAM,EAAA,OAAA;AAAA,EACN,KAAO,EAAA,OAAA;AAAA,EACP,IAAM,EAAA;AACR,CAAG,EAAA;AAAA,EACD,IAAM,EAAA,OAAA;AAAA,EACN,KAAO,EAAA,qBAAA;AAAA,EACP,IAAM,EAAA;AACR,CAAG,EAAA;AAAA,EACD,IAAM,EAAA,SAAA;AAAA,EACN,KAAO,EAAA,mBAAA;AAAA,EACP,IAAM,EAAA;AACR,CAAC,CAAA;AACD,MAAM,WAAc,GAAA,GAAA;AACpB,MAAM,YAAe,GAAA,GAAA;AACrB,MAAM,OAAU,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A,IAChB,eAAiB,EAAA;AAAA,GACnB;AAAA,EACA,UAAY,EAAA;AAAA,IACV,KAAO,EAAA,SAAA;AAAA,IACP,QAAU,EAAA,EAAA;AAAA,IACV,UAAY,EAAA;AAAA,GACd;AAAA,EACA,KAAO,EAAA;AAAA,IACL,SAAW,EAAA,SAAA;AAAA,IACX,QAAU,EAAA,EAAA;AAAA,IACV,UAAY,EAAA,KAAA;AAAA,IACZ,WAAW,OAAQ,CAAA;AAAA,GACrB;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,SAAW,EAAA,SAAA;AAAA,IACX,QAAU,EAAA,EAAA;AAAA,IACV,UAAY,EAAA;AAAA,GACd;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,KAAK,OAAQ,CAAA,EAAA;AAAA,IACb,mBAAmB,OAAQ,CAAA,EAAA;AAAA,IAC3B,YAAY,OAAQ,CAAA,EAAA;AAAA,IACpB,eAAe,OAAQ,CAAA,GAAA;AAAA,IACvB,gBAAgB,UAAW,CAAA;AAAA,GAC7B;AAAA,EACA,IAAM,EAAA;AAAA,IACJ,aAAe,EAAA,KAAA;AAAA,IACf,cAAgB,EAAA,QAAA;AAAA,IAChB,GAAK,EAAA;AAAA,GACP;AAAA,EACA,GAAK,EAAA;AAAA,IACH,KAAO,EAAA,CAAA;AAAA,IACP,MAAQ,EAAA,CAAA;AAAA,IACR,YAAc,EAAA;AAAA,GAChB;AAAA,EACA,OAAS,EAAA;AAAA,IACP,aAAe,EAAA,KAAA;AAAA,IACf,KAAK,OAAQ,CAAA;AAAA,GACf;AAAA,EACA,MAAQ,EAAA;AAAA,IACN,IAAM,EAAA;AAAA;AAEV,CAAC,CAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {jsx}from'react/jsx-runtime';import {useContext}from'react';import {getApolloContext}from'@apollo/client/index.js';import {ActionButton}from'../chat/MessageActionBar.js';import {reportAiContent}from'./reportAiContent.js';function ReportAiContentButton({
|
|
2
|
+
content,
|
|
3
|
+
surface
|
|
4
|
+
}) {
|
|
5
|
+
const {
|
|
6
|
+
client
|
|
7
|
+
} = useContext(getApolloContext());
|
|
8
|
+
if (!client) return null;
|
|
9
|
+
return /* @__PURE__ */ jsx(ActionButton, { icon: "flag-outline", label: "Report this AI response", onPress: () => reportAiContent(client, {
|
|
10
|
+
surface,
|
|
11
|
+
content
|
|
12
|
+
}) });
|
|
13
|
+
}export{ReportAiContentButton};//# sourceMappingURL=ReportAiContentButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReportAiContentButton.js","sources":["../../../src/features/reporting/ReportAiContentButton.tsx"],"sourcesContent":["/** A small flag under something the AI made, drawn like the buttons beside it. */\nimport React, { useContext } from 'react';\nimport { getApolloContext } from '@apollo/client';\nimport { ActionButton } from '../chat/MessageActionBar';\nimport { reportAiContent } from './reportAiContent';\n\nexport function ReportAiContentButton({ content, surface }: { content: string; surface: string }) {\n const { client } = useContext(getApolloContext());\n if (!client) return null;\n return (\n <ActionButton\n icon=\"flag-outline\"\n label=\"Report this AI response\"\n onPress={() => reportAiContent(client, { surface, content })}\n />\n );\n}\n"],"names":[],"mappings":"oOAKO,SAAS,qBAAsB,CAAA;AAAA,EACpC,OAAA;AAAA,EACA;AACF,CAGG,EAAA;AACD,EAAM,MAAA;AAAA,IACJ;AAAA,GACF,GAAI,UAAW,CAAA,gBAAA,EAAkB,CAAA;AACjC,EAAI,IAAA,CAAC,QAAe,OAAA,IAAA;AACpB,EAAO,uBAAA,GAAA,CAAC,gBAAa,IAAK,EAAA,cAAA,EAAe,OAAM,yBAA0B,EAAA,OAAA,EAAS,MAAM,eAAA,CAAgB,MAAQ,EAAA;AAAA,IAC9G,OAAA;AAAA,IACA;AAAA,GACD,CAAG,EAAA,CAAA;AACN"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import {Alert}from'react-native';import {gql}from'@apollo/client/index.js';const SUBMIT_AI_REPORT = gql`
|
|
2
|
+
mutation ReportAiContent($input: SubmitFeedbackInput!) {
|
|
3
|
+
submitFeedback(input: $input) {
|
|
4
|
+
identifier
|
|
5
|
+
}
|
|
6
|
+
}
|
|
7
|
+
`;
|
|
8
|
+
const MAX_QUOTED_CHARS = 1500;
|
|
9
|
+
function aiReportInput(report, reason) {
|
|
10
|
+
const quoted = report.content.trim().slice(0, MAX_QUOTED_CHARS);
|
|
11
|
+
const label = reason === "offensive" ? "offensive" : "harmful or unsafe";
|
|
12
|
+
return {
|
|
13
|
+
kind: "ISSUE",
|
|
14
|
+
title: `Reported AI content: ${label} (${report.surface})`,
|
|
15
|
+
description: `Someone reported AI-generated content as **${label}** in \`${report.surface}\`.${quoted ? `
|
|
16
|
+
|
|
17
|
+
${quoted.replace(/^/gm, "> ")}` : ""}`,
|
|
18
|
+
priority: "HIGH",
|
|
19
|
+
labels: ["ai-content-report", `reason:${reason}`, `surface:${report.surface}`],
|
|
20
|
+
metadata: {
|
|
21
|
+
source: "in-app-report",
|
|
22
|
+
surface: report.surface,
|
|
23
|
+
reason
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
async function sendAiReport(client, report, reason) {
|
|
28
|
+
try {
|
|
29
|
+
await client.mutate({
|
|
30
|
+
mutation: SUBMIT_AI_REPORT,
|
|
31
|
+
variables: {
|
|
32
|
+
input: aiReportInput(report, reason)
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
Alert.alert("Thanks for telling us", "Our team will review this.");
|
|
36
|
+
} catch (e) {
|
|
37
|
+
Alert.alert("Could not send your report", "Please check your connection and try again.");
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
function reportAiContent(client, report) {
|
|
41
|
+
Alert.alert("Report this AI content?", "Our team reviews every report.", [{
|
|
42
|
+
text: "Offensive",
|
|
43
|
+
onPress: () => {
|
|
44
|
+
sendAiReport(client, report, "offensive");
|
|
45
|
+
}
|
|
46
|
+
}, {
|
|
47
|
+
text: "Harmful or unsafe",
|
|
48
|
+
onPress: () => {
|
|
49
|
+
sendAiReport(client, report, "harmful");
|
|
50
|
+
}
|
|
51
|
+
}, {
|
|
52
|
+
text: "Cancel",
|
|
53
|
+
style: "cancel"
|
|
54
|
+
}]);
|
|
55
|
+
}export{SUBMIT_AI_REPORT,aiReportInput,reportAiContent,sendAiReport};//# sourceMappingURL=reportAiContent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reportAiContent.js","sources":["../../../src/features/reporting/reportAiContent.ts"],"sourcesContent":["/**\n * Letting someone report what the AI made, without leaving the app. Google Play's\n * AI-Generated Content policy requires it. Reports go to the team's tracker.\n */\nimport { Alert } from 'react-native';\nimport { gql, type ApolloClient } from '@apollo/client';\n\nexport const SUBMIT_AI_REPORT = gql`\n mutation ReportAiContent($input: SubmitFeedbackInput!) {\n submitFeedback(input: $input) {\n identifier\n }\n }\n`;\n\n/** What can be quoted back to the team. */\nconst MAX_QUOTED_CHARS = 1500;\n\nexport interface AiContentReport {\n /** Where it was seen, such as `ai-chat`. */\n surface: string;\n /** What the AI said. Empty when the report is not about one reply. */\n content: string;\n}\n\nexport type ReportReason = 'offensive' | 'harmful';\n\n// `ApolloClient<object>` is what the app's provider hands out.\ntype Client = Pick<ApolloClient<object>, 'mutate'>;\n\nexport function aiReportInput(report: AiContentReport, reason: ReportReason) {\n const quoted = report.content.trim().slice(0, MAX_QUOTED_CHARS);\n const label = reason === 'offensive' ? 'offensive' : 'harmful or unsafe';\n return {\n kind: 'ISSUE',\n title: `Reported AI content: ${label} (${report.surface})`,\n description: `Someone reported AI-generated content as **${label}** in \\`${report.surface}\\`.${\n quoted ? `\\n\\n${quoted.replace(/^/gm, '> ')}` : ''\n }`,\n priority: 'HIGH',\n labels: ['ai-content-report', `reason:${reason}`, `surface:${report.surface}`],\n metadata: { source: 'in-app-report', surface: report.surface, reason },\n };\n}\n\nexport async function sendAiReport(client: Client, report: AiContentReport, reason: ReportReason): Promise<void> {\n try {\n await client.mutate({ mutation: SUBMIT_AI_REPORT, variables: { input: aiReportInput(report, reason) } });\n Alert.alert('Thanks for telling us', 'Our team will review this.');\n } catch {\n Alert.alert('Could not send your report', 'Please check your connection and try again.');\n }\n}\n\n/** Ask what is wrong, then send it. */\nexport function reportAiContent(client: Client, report: AiContentReport): void {\n Alert.alert('Report this AI content?', 'Our team reviews every report.', [\n {\n text: 'Offensive',\n onPress: () => {\n sendAiReport(client, report, 'offensive');\n },\n },\n {\n text: 'Harmful or unsafe',\n onPress: () => {\n sendAiReport(client, report, 'harmful');\n },\n },\n { text: 'Cancel', style: 'cancel' },\n ]);\n}\n"],"names":[],"mappings":"2EAMO,MAAM,gBAAmB,GAAA,GAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAShC,MAAM,gBAAmB,GAAA,IAAA;AAWT,SAAA,aAAA,CAAc,QAAyB,MAAsB,EAAA;AAC3E,EAAA,MAAM,SAAS,MAAO,CAAA,OAAA,CAAQ,MAAO,CAAA,KAAA,CAAM,GAAG,gBAAgB,CAAA;AAC9D,EAAM,MAAA,KAAA,GAAQ,MAAW,KAAA,WAAA,GAAc,WAAc,GAAA,mBAAA;AACrD,EAAO,OAAA;AAAA,IACL,IAAM,EAAA,OAAA;AAAA,IACN,KAAO,EAAA,CAAA,qBAAA,EAAwB,KAAK,CAAA,EAAA,EAAK,OAAO,OAAO,CAAA,CAAA,CAAA;AAAA,IACvD,aAAa,CAA8C,2CAAA,EAAA,KAAK,WAAW,MAAO,CAAA,OAAO,MAAM,MAAS,GAAA;;AAAA,EAAO,OAAO,OAAQ,CAAA,KAAA,EAAO,IAAI,CAAC,KAAK,EAAE,CAAA,CAAA;AAAA,IACjJ,QAAU,EAAA,MAAA;AAAA,IACV,MAAA,EAAQ,CAAC,mBAAqB,EAAA,CAAA,OAAA,EAAU,MAAM,CAAI,CAAA,EAAA,CAAA,QAAA,EAAW,MAAO,CAAA,OAAO,CAAE,CAAA,CAAA;AAAA,IAC7E,QAAU,EAAA;AAAA,MACR,MAAQ,EAAA,eA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