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