@dubsdotapp/expo 0.5.16 → 0.5.17

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.mjs CHANGED
@@ -5846,13 +5846,15 @@ function JoinGameSheet({
5846
5846
  ] }) })
5847
5847
  ] })
5848
5848
  ] }),
5849
- !isCustomGame && !isPoolModeEnabled && !alreadyJoined && /* @__PURE__ */ jsxs15(View16, { style: styles15.section, children: [
5850
- /* @__PURE__ */ jsx18(Text16, { style: [styles15.sectionLabel, { color: t.textSecondary }], children: "Pick Your Side" }),
5851
- /* @__PURE__ */ jsxs15(View16, { style: styles15.teamsRow, children: [
5849
+ !isCustomGame && !isPoolModeEnabled && !alreadyJoined && (hasDrawOption ? (
5850
+ /* ── 3-way layout: Home / VS / Away / OR / Draw ── */
5851
+ /* @__PURE__ */ jsxs15(View16, { style: styles15.section, children: [
5852
+ /* @__PURE__ */ jsx18(Text16, { style: [styles15.sectionLabel, { color: t.textSecondary }], children: "Who will win?" }),
5852
5853
  /* @__PURE__ */ jsx18(
5853
- TeamButton,
5854
+ PickRow,
5854
5855
  {
5855
5856
  name: homeName,
5857
+ subtitle: "Home Team",
5856
5858
  imageUrl: opponents[0]?.imageUrl,
5857
5859
  odds: homeOdds,
5858
5860
  bets: homeBets,
@@ -5866,10 +5868,16 @@ function JoinGameSheet({
5866
5868
  t
5867
5869
  }
5868
5870
  ),
5871
+ /* @__PURE__ */ jsxs15(View16, { style: styles15.dividerRow, children: [
5872
+ /* @__PURE__ */ jsx18(View16, { style: [styles15.dividerLine, { backgroundColor: t.border }] }),
5873
+ /* @__PURE__ */ jsx18(Text16, { style: [styles15.dividerText, { color: t.textMuted }], children: "VS" }),
5874
+ /* @__PURE__ */ jsx18(View16, { style: [styles15.dividerLine, { backgroundColor: t.border }] })
5875
+ ] }),
5869
5876
  /* @__PURE__ */ jsx18(
5870
- TeamButton,
5877
+ PickRow,
5871
5878
  {
5872
5879
  name: awayName,
5880
+ subtitle: "Away Team",
5873
5881
  imageUrl: opponents[1]?.imageUrl,
5874
5882
  odds: awayOdds,
5875
5883
  bets: awayBets,
@@ -5882,24 +5890,71 @@ function JoinGameSheet({
5882
5890
  ImageComponent,
5883
5891
  t
5884
5892
  }
5893
+ ),
5894
+ /* @__PURE__ */ jsxs15(View16, { style: styles15.dividerRow, children: [
5895
+ /* @__PURE__ */ jsx18(View16, { style: [styles15.dividerLine, { backgroundColor: t.border }] }),
5896
+ /* @__PURE__ */ jsx18(Text16, { style: [styles15.dividerText, { color: t.textMuted }], children: "OR" }),
5897
+ /* @__PURE__ */ jsx18(View16, { style: [styles15.dividerLine, { backgroundColor: t.border }] })
5898
+ ] }),
5899
+ /* @__PURE__ */ jsx18(
5900
+ PickRow,
5901
+ {
5902
+ name: "Draw",
5903
+ subtitle: "Match ends in a tie",
5904
+ odds: drawOdds,
5905
+ bets: drawBets,
5906
+ color: drawColor,
5907
+ selected: selectedTeam === "draw",
5908
+ onPress: () => {
5909
+ setSelectedTeam("draw");
5910
+ onTeamSelect?.("draw");
5911
+ },
5912
+ t
5913
+ }
5885
5914
  )
5886
- ] }),
5887
- hasDrawOption && /* @__PURE__ */ jsx18(View16, { style: styles15.drawRow, children: /* @__PURE__ */ jsx18(
5888
- TeamButton,
5889
- {
5890
- name: "Draw",
5891
- odds: drawOdds,
5892
- bets: drawBets,
5893
- color: drawColor,
5894
- selected: selectedTeam === "draw",
5895
- onPress: () => {
5896
- setSelectedTeam("draw");
5897
- onTeamSelect?.("draw");
5898
- },
5899
- t
5900
- }
5901
- ) })
5902
- ] }),
5915
+ ] })
5916
+ ) : (
5917
+ /* ── 2-way layout: side by side ── */
5918
+ /* @__PURE__ */ jsxs15(View16, { style: styles15.section, children: [
5919
+ /* @__PURE__ */ jsx18(Text16, { style: [styles15.sectionLabel, { color: t.textSecondary }], children: "Pick Your Side" }),
5920
+ /* @__PURE__ */ jsxs15(View16, { style: styles15.teamsRow, children: [
5921
+ /* @__PURE__ */ jsx18(
5922
+ TeamButton,
5923
+ {
5924
+ name: homeName,
5925
+ imageUrl: opponents[0]?.imageUrl,
5926
+ odds: homeOdds,
5927
+ bets: homeBets,
5928
+ color: homeColor,
5929
+ selected: selectedTeam === "home",
5930
+ onPress: () => {
5931
+ setSelectedTeam("home");
5932
+ onTeamSelect?.("home");
5933
+ },
5934
+ ImageComponent,
5935
+ t
5936
+ }
5937
+ ),
5938
+ /* @__PURE__ */ jsx18(
5939
+ TeamButton,
5940
+ {
5941
+ name: awayName,
5942
+ imageUrl: opponents[1]?.imageUrl,
5943
+ odds: awayOdds,
5944
+ bets: awayBets,
5945
+ color: awayColor,
5946
+ selected: selectedTeam === "away",
5947
+ onPress: () => {
5948
+ setSelectedTeam("away");
5949
+ onTeamSelect?.("away");
5950
+ },
5951
+ ImageComponent,
5952
+ t
5953
+ }
5954
+ )
5955
+ ] })
5956
+ ] })
5957
+ )),
5903
5958
  alreadyJoined && myBet && /* @__PURE__ */ jsxs15(View16, { style: [styles15.myBetCard, { backgroundColor: (myBet.team === "home" ? homeColor : myBet.team === "away" ? awayColor : drawColor) + "15", borderColor: myBet.team === "home" ? homeColor : myBet.team === "away" ? awayColor : drawColor }], children: [
5904
5959
  /* @__PURE__ */ jsx18(Text16, { style: [styles15.myBetLabel, { color: myBet.team === "home" ? homeColor : myBet.team === "away" ? awayColor : drawColor }], children: "YOUR BET" }),
5905
5960
  /* @__PURE__ */ jsx18(Text16, { style: [styles15.myBetTeam, { color: t.text }], children: myBet.team === "home" ? homeName : myBet.team === "away" ? awayName : "Draw" }),
@@ -5982,6 +6037,100 @@ function JoinGameSheet({
5982
6037
  }
5983
6038
  );
5984
6039
  }
6040
+ function PickRow({
6041
+ name,
6042
+ subtitle,
6043
+ imageUrl,
6044
+ odds,
6045
+ bets,
6046
+ color,
6047
+ selected,
6048
+ onPress,
6049
+ ImageComponent,
6050
+ t
6051
+ }) {
6052
+ const [imgFailed, setImgFailed] = useState31(false);
6053
+ const Img = ImageComponent || __require("react-native").Image;
6054
+ const showImage = imageUrl && !imgFailed;
6055
+ return /* @__PURE__ */ jsxs15(
6056
+ TouchableOpacity11,
6057
+ {
6058
+ style: [pickStyles.row, { borderColor: selected ? color : t.border, backgroundColor: selected ? color + "12" : t.background }],
6059
+ onPress,
6060
+ activeOpacity: 0.7,
6061
+ children: [
6062
+ showImage ? /* @__PURE__ */ jsx18(Img, { source: { uri: imageUrl }, style: pickStyles.logo, resizeMode: "contain", onError: () => setImgFailed(true) }) : /* @__PURE__ */ jsx18(View16, { style: [pickStyles.logoPlaceholder, { backgroundColor: color + "20" }], children: /* @__PURE__ */ jsx18(Text16, { style: [pickStyles.logoEmoji, { color }], children: name === "Draw" ? "\u{1F91D}" : name.charAt(0) }) }),
6063
+ /* @__PURE__ */ jsxs15(View16, { style: pickStyles.info, children: [
6064
+ /* @__PURE__ */ jsx18(Text16, { style: [pickStyles.name, { color: t.text }], children: name }),
6065
+ subtitle && /* @__PURE__ */ jsx18(Text16, { style: [pickStyles.subtitle, { color: t.textMuted }], children: subtitle })
6066
+ ] }),
6067
+ odds !== "\u2014" && /* @__PURE__ */ jsxs15(Text16, { style: [pickStyles.odds, { color }], children: [
6068
+ odds,
6069
+ "x"
6070
+ ] }),
6071
+ bets > 0 && /* @__PURE__ */ jsx18(Text16, { style: [pickStyles.bets, { color: t.textMuted }], children: bets }),
6072
+ selected && /* @__PURE__ */ jsx18(View16, { style: [pickStyles.check, { backgroundColor: color }], children: /* @__PURE__ */ jsx18(Text16, { style: pickStyles.checkText, children: "\u2713" }) })
6073
+ ]
6074
+ }
6075
+ );
6076
+ }
6077
+ var pickStyles = StyleSheet16.create({
6078
+ row: {
6079
+ flexDirection: "row",
6080
+ alignItems: "center",
6081
+ borderWidth: 1.5,
6082
+ borderRadius: 14,
6083
+ paddingVertical: 12,
6084
+ paddingHorizontal: 14,
6085
+ gap: 12
6086
+ },
6087
+ logo: {
6088
+ width: 36,
6089
+ height: 36,
6090
+ borderRadius: 18
6091
+ },
6092
+ logoPlaceholder: {
6093
+ width: 36,
6094
+ height: 36,
6095
+ borderRadius: 18,
6096
+ alignItems: "center",
6097
+ justifyContent: "center"
6098
+ },
6099
+ logoEmoji: {
6100
+ fontSize: 16,
6101
+ fontWeight: "800"
6102
+ },
6103
+ info: {
6104
+ flex: 1
6105
+ },
6106
+ name: {
6107
+ fontSize: 15,
6108
+ fontWeight: "700"
6109
+ },
6110
+ subtitle: {
6111
+ fontSize: 12,
6112
+ marginTop: 1
6113
+ },
6114
+ odds: {
6115
+ fontSize: 16,
6116
+ fontWeight: "800"
6117
+ },
6118
+ bets: {
6119
+ fontSize: 12
6120
+ },
6121
+ check: {
6122
+ width: 22,
6123
+ height: 22,
6124
+ borderRadius: 11,
6125
+ alignItems: "center",
6126
+ justifyContent: "center"
6127
+ },
6128
+ checkText: {
6129
+ color: "#FFF",
6130
+ fontSize: 13,
6131
+ fontWeight: "800"
6132
+ }
6133
+ });
5985
6134
  var styles15 = StyleSheet16.create({
5986
6135
  overlay: {
5987
6136
  ...StyleSheet16.absoluteFillObject,
@@ -6104,6 +6253,20 @@ var styles15 = StyleSheet16.create({
6104
6253
  drawRow: {
6105
6254
  marginTop: 8
6106
6255
  },
6256
+ dividerRow: {
6257
+ flexDirection: "row",
6258
+ alignItems: "center",
6259
+ gap: 12,
6260
+ marginVertical: 6
6261
+ },
6262
+ dividerLine: {
6263
+ flex: 1,
6264
+ height: 1
6265
+ },
6266
+ dividerText: {
6267
+ fontSize: 12,
6268
+ fontWeight: "700"
6269
+ },
6107
6270
  summaryCard: {
6108
6271
  marginTop: 20,
6109
6272
  borderRadius: 16,