@dubsdotapp/expo 0.3.4 → 0.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +80 -32
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +83 -33
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/ui/game/EnterArcadePoolSheet.tsx +93 -33
package/dist/index.mjs
CHANGED
|
@@ -5949,7 +5949,9 @@ import {
|
|
|
5949
5949
|
Animated as Animated6,
|
|
5950
5950
|
StyleSheet as StyleSheet16,
|
|
5951
5951
|
KeyboardAvoidingView as KeyboardAvoidingView6,
|
|
5952
|
-
Platform as Platform9
|
|
5952
|
+
Platform as Platform9,
|
|
5953
|
+
Image as Image6,
|
|
5954
|
+
ScrollView as ScrollView5
|
|
5953
5955
|
} from "react-native";
|
|
5954
5956
|
import { Fragment as Fragment6, jsx as jsx18, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
5955
5957
|
var STATUS_LABELS5 = {
|
|
@@ -5963,6 +5965,8 @@ function EnterArcadePoolSheet({
|
|
|
5963
5965
|
onDismiss,
|
|
5964
5966
|
pool,
|
|
5965
5967
|
stats,
|
|
5968
|
+
leaderboard,
|
|
5969
|
+
mode = "join",
|
|
5966
5970
|
onSuccess,
|
|
5967
5971
|
onError
|
|
5968
5972
|
}) {
|
|
@@ -6010,6 +6014,10 @@ function EnterArcadePoolSheet({
|
|
|
6010
6014
|
}
|
|
6011
6015
|
}, [wallet.publicKey, mutation.execute, pool.id]);
|
|
6012
6016
|
const statusLabel = STATUS_LABELS5[mutation.status] || "";
|
|
6017
|
+
const isRejoin = mode === "rejoin";
|
|
6018
|
+
const headerTitle = isRejoin ? "Play Again" : "Join Pool";
|
|
6019
|
+
const ctaLabel = isRejoin ? `Play Again \u2014 ${buyInSol} SOL` : `Join Pool \u2014 ${buyInSol} SOL`;
|
|
6020
|
+
const successLabel = isRejoin ? "Lives refilled!" : "Joined!";
|
|
6013
6021
|
return /* @__PURE__ */ jsxs16(
|
|
6014
6022
|
Modal5,
|
|
6015
6023
|
{
|
|
@@ -6027,42 +6035,70 @@ function EnterArcadePoolSheet({
|
|
|
6027
6035
|
children: /* @__PURE__ */ jsx18(View15, { style: styles15.sheetPositioner, children: /* @__PURE__ */ jsxs16(View15, { style: [styles15.sheet, { backgroundColor: t.background }], children: [
|
|
6028
6036
|
/* @__PURE__ */ jsx18(View15, { style: styles15.handleRow, children: /* @__PURE__ */ jsx18(View15, { style: [styles15.handle, { backgroundColor: t.textMuted }] }) }),
|
|
6029
6037
|
/* @__PURE__ */ jsxs16(View15, { style: styles15.header, children: [
|
|
6030
|
-
/* @__PURE__ */ jsx18(Text16, { style: [styles15.headerTitle, { color: t.text }], children:
|
|
6038
|
+
/* @__PURE__ */ jsx18(Text16, { style: [styles15.headerTitle, { color: t.text }], children: headerTitle }),
|
|
6031
6039
|
/* @__PURE__ */ jsx18(TouchableOpacity12, { onPress: onDismiss, activeOpacity: 0.8, children: /* @__PURE__ */ jsx18(Text16, { style: [styles15.closeButton, { color: t.textMuted }], children: "\u2715" }) })
|
|
6032
6040
|
] }),
|
|
6033
6041
|
/* @__PURE__ */ jsx18(Text16, { style: [styles15.poolName, { color: t.textSecondary }], children: pool.name }),
|
|
6034
|
-
/* @__PURE__ */ jsxs16(
|
|
6035
|
-
/* @__PURE__ */ jsxs16(View15, { style: styles15.
|
|
6036
|
-
/* @__PURE__ */
|
|
6037
|
-
|
|
6038
|
-
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6042
|
-
|
|
6043
|
-
|
|
6044
|
-
/* @__PURE__ */
|
|
6045
|
-
|
|
6046
|
-
|
|
6047
|
-
|
|
6048
|
-
|
|
6049
|
-
/* @__PURE__ */
|
|
6050
|
-
|
|
6051
|
-
|
|
6052
|
-
|
|
6053
|
-
|
|
6054
|
-
|
|
6055
|
-
|
|
6056
|
-
/* @__PURE__ */ jsxs16(View15, { style: styles15.summaryRow, children: [
|
|
6057
|
-
/* @__PURE__ */ jsx18(Text16, { style: [styles15.summaryLabel, { color: t.textMuted }], children: "Lives" }),
|
|
6058
|
-
/* @__PURE__ */ jsx18(Text16, { style: [styles15.summaryValue, { color: t.text }], children: pool.max_lives })
|
|
6059
|
-
] }),
|
|
6060
|
-
topScore > 0 && /* @__PURE__ */ jsxs16(Fragment6, { children: [
|
|
6042
|
+
/* @__PURE__ */ jsxs16(ScrollView5, { style: styles15.scrollBody, bounces: false, children: [
|
|
6043
|
+
/* @__PURE__ */ jsxs16(View15, { style: [styles15.summaryCard, { backgroundColor: t.surface, borderColor: t.border }], children: [
|
|
6044
|
+
/* @__PURE__ */ jsxs16(View15, { style: styles15.summaryRow, children: [
|
|
6045
|
+
/* @__PURE__ */ jsx18(Text16, { style: [styles15.summaryLabel, { color: t.textMuted }], children: "Buy-in" }),
|
|
6046
|
+
/* @__PURE__ */ jsxs16(Text16, { style: [styles15.summaryValue, { color: t.text }], children: [
|
|
6047
|
+
buyInSol,
|
|
6048
|
+
" SOL"
|
|
6049
|
+
] })
|
|
6050
|
+
] }),
|
|
6051
|
+
/* @__PURE__ */ jsx18(View15, { style: [styles15.summarySep, { backgroundColor: t.border }] }),
|
|
6052
|
+
/* @__PURE__ */ jsxs16(View15, { style: styles15.summaryRow, children: [
|
|
6053
|
+
/* @__PURE__ */ jsx18(Text16, { style: [styles15.summaryLabel, { color: t.textMuted }], children: "Players in" }),
|
|
6054
|
+
/* @__PURE__ */ jsx18(Text16, { style: [styles15.summaryValue, { color: t.text }], children: totalPlayers })
|
|
6055
|
+
] }),
|
|
6056
|
+
/* @__PURE__ */ jsx18(View15, { style: [styles15.summarySep, { backgroundColor: t.border }] }),
|
|
6057
|
+
/* @__PURE__ */ jsxs16(View15, { style: styles15.summaryRow, children: [
|
|
6058
|
+
/* @__PURE__ */ jsx18(Text16, { style: [styles15.summaryLabel, { color: t.textMuted }], children: "Current pot" }),
|
|
6059
|
+
/* @__PURE__ */ jsxs16(Text16, { style: [styles15.summaryValue, { color: t.success }], children: [
|
|
6060
|
+
potSol,
|
|
6061
|
+
" SOL"
|
|
6062
|
+
] })
|
|
6063
|
+
] }),
|
|
6061
6064
|
/* @__PURE__ */ jsx18(View15, { style: [styles15.summarySep, { backgroundColor: t.border }] }),
|
|
6062
6065
|
/* @__PURE__ */ jsxs16(View15, { style: styles15.summaryRow, children: [
|
|
6063
|
-
/* @__PURE__ */ jsx18(Text16, { style: [styles15.summaryLabel, { color: t.textMuted }], children: "
|
|
6064
|
-
/* @__PURE__ */ jsx18(Text16, { style: [styles15.summaryValue, { color: t.text }], children:
|
|
6066
|
+
/* @__PURE__ */ jsx18(Text16, { style: [styles15.summaryLabel, { color: t.textMuted }], children: "Lives" }),
|
|
6067
|
+
/* @__PURE__ */ jsx18(Text16, { style: [styles15.summaryValue, { color: t.text }], children: pool.max_lives })
|
|
6068
|
+
] }),
|
|
6069
|
+
topScore > 0 && /* @__PURE__ */ jsxs16(Fragment6, { children: [
|
|
6070
|
+
/* @__PURE__ */ jsx18(View15, { style: [styles15.summarySep, { backgroundColor: t.border }] }),
|
|
6071
|
+
/* @__PURE__ */ jsxs16(View15, { style: styles15.summaryRow, children: [
|
|
6072
|
+
/* @__PURE__ */ jsx18(Text16, { style: [styles15.summaryLabel, { color: t.textMuted }], children: "Top score" }),
|
|
6073
|
+
/* @__PURE__ */ jsx18(Text16, { style: [styles15.summaryValue, { color: t.text }], children: topScore })
|
|
6074
|
+
] })
|
|
6065
6075
|
] })
|
|
6076
|
+
] }),
|
|
6077
|
+
leaderboard && leaderboard.length > 0 && /* @__PURE__ */ jsxs16(View15, { style: styles15.leaderboardSection, children: [
|
|
6078
|
+
/* @__PURE__ */ jsx18(Text16, { style: [styles15.leaderboardTitle, { color: t.text }], children: "Leaderboard" }),
|
|
6079
|
+
leaderboard.map((entry, i) => /* @__PURE__ */ jsxs16(
|
|
6080
|
+
View15,
|
|
6081
|
+
{
|
|
6082
|
+
style: [
|
|
6083
|
+
styles15.lbRow,
|
|
6084
|
+
{ backgroundColor: i % 2 === 0 ? t.surface : "transparent" }
|
|
6085
|
+
],
|
|
6086
|
+
children: [
|
|
6087
|
+
/* @__PURE__ */ jsx18(Text16, { style: [styles15.lbRank, { color: t.textMuted }], children: i === 0 ? "\u{1F947}" : i === 1 ? "\u{1F948}" : i === 2 ? "\u{1F949}" : `${i + 1}` }),
|
|
6088
|
+
entry.avatar ? /* @__PURE__ */ jsx18(Image6, { source: { uri: entry.avatar }, style: styles15.lbAvatar }) : /* @__PURE__ */ jsx18(View15, { style: [styles15.lbAvatar, { backgroundColor: t.border }] }),
|
|
6089
|
+
/* @__PURE__ */ jsx18(
|
|
6090
|
+
Text16,
|
|
6091
|
+
{
|
|
6092
|
+
style: [styles15.lbName, { color: t.text }],
|
|
6093
|
+
numberOfLines: 1,
|
|
6094
|
+
children: entry.username || `${entry.wallet_address.slice(0, 4)}...${entry.wallet_address.slice(-4)}`
|
|
6095
|
+
}
|
|
6096
|
+
),
|
|
6097
|
+
/* @__PURE__ */ jsx18(Text16, { style: [styles15.lbScore, { color: t.accent }], children: entry.best_score })
|
|
6098
|
+
]
|
|
6099
|
+
},
|
|
6100
|
+
entry.id
|
|
6101
|
+
))
|
|
6066
6102
|
] })
|
|
6067
6103
|
] }),
|
|
6068
6104
|
mutation.error && /* @__PURE__ */ jsx18(View15, { style: [styles15.errorBox, { backgroundColor: t.errorBg, borderColor: t.errorBorder }], children: /* @__PURE__ */ jsx18(Text16, { style: [styles15.errorText, { color: t.errorText }], children: mutation.error.message }) }),
|
|
@@ -6079,7 +6115,7 @@ function EnterArcadePoolSheet({
|
|
|
6079
6115
|
children: isMutating ? /* @__PURE__ */ jsxs16(View15, { style: styles15.ctaLoading, children: [
|
|
6080
6116
|
/* @__PURE__ */ jsx18(ActivityIndicator9, { size: "small", color: "#FFFFFF" }),
|
|
6081
6117
|
/* @__PURE__ */ jsx18(Text16, { style: styles15.ctaText, children: statusLabel })
|
|
6082
|
-
] }) : mutation.status === "success" ? /* @__PURE__ */ jsx18(Text16, { style: styles15.ctaText, children:
|
|
6118
|
+
] }) : mutation.status === "success" ? /* @__PURE__ */ jsx18(Text16, { style: styles15.ctaText, children: successLabel }) : /* @__PURE__ */ jsx18(Text16, { style: [styles15.ctaText, !canJoin && { opacity: 0.5 }], children: ctaLabel })
|
|
6083
6119
|
}
|
|
6084
6120
|
)
|
|
6085
6121
|
] }) })
|
|
@@ -6145,7 +6181,21 @@ var styles15 = StyleSheet16.create({
|
|
|
6145
6181
|
alignItems: "center"
|
|
6146
6182
|
},
|
|
6147
6183
|
ctaText: { color: "#FFFFFF", fontSize: 16, fontWeight: "700" },
|
|
6148
|
-
ctaLoading: { flexDirection: "row", alignItems: "center", gap: 10 }
|
|
6184
|
+
ctaLoading: { flexDirection: "row", alignItems: "center", gap: 10 },
|
|
6185
|
+
scrollBody: { maxHeight: 400 },
|
|
6186
|
+
leaderboardSection: { marginTop: 16 },
|
|
6187
|
+
leaderboardTitle: { fontSize: 16, fontWeight: "700", marginBottom: 8 },
|
|
6188
|
+
lbRow: {
|
|
6189
|
+
flexDirection: "row",
|
|
6190
|
+
alignItems: "center",
|
|
6191
|
+
paddingVertical: 10,
|
|
6192
|
+
paddingHorizontal: 12,
|
|
6193
|
+
borderRadius: 10
|
|
6194
|
+
},
|
|
6195
|
+
lbRank: { width: 28, fontSize: 15, fontWeight: "700", textAlign: "center" },
|
|
6196
|
+
lbAvatar: { width: 28, height: 28, borderRadius: 14, marginRight: 10 },
|
|
6197
|
+
lbName: { flex: 1, fontSize: 14, fontWeight: "600" },
|
|
6198
|
+
lbScore: { fontSize: 16, fontWeight: "800" }
|
|
6149
6199
|
});
|
|
6150
6200
|
export {
|
|
6151
6201
|
AuthGate,
|