koylu-vampir-design 1.0.24 → 1.0.25

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.
@@ -1 +1 @@
1
- {"version":3,"file":"AlertButtons.d.ts","sourceRoot":"","sources":["../../src/Alerts/AlertButtons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,aAAK,KAAK,GAAG;IACX,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,OAAO,CAAC,EAAE,GAAG,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA+BxC,CAAC"}
1
+ {"version":3,"file":"AlertButtons.d.ts","sourceRoot":"","sources":["../../src/Alerts/AlertButtons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,aAAK,KAAK,GAAG;IACX,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,OAAO,CAAC,EAAE,GAAG,CAAC;CACf,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAkCxC,CAAC"}
@@ -14,19 +14,23 @@ const AlertButtons = ({ options, payload }) => {
14
14
  options.onAccept(payload);
15
15
  };
16
16
  return (react_1.default.createElement(react_native_1.View, { style: styles.buttons },
17
- react_1.default.createElement(__1.MenuButton, { style: styles.button, size: "medium", type: options.cancelType || "outline", onPress: options.onClose ? options.onClose : () => closeAlert() }, options.cancelText ? options.cancelText : options.onAccept ? "VAZGEÇ" : "KAPAT"),
17
+ react_1.default.createElement(__1.MenuButton, { style: styles.button, size: "medium", type: options.cancelType || "outline", onPress: options.onClose ? options.onClose : () => closeAlert() }, options.cancelText
18
+ ? options.cancelText
19
+ : options.onAccept
20
+ ? "VAZGEÇ"
21
+ : "KAPAT"),
18
22
  !!options.onAccept && (react_1.default.createElement(__1.MenuButton, { style: styles.button, size: "medium", type: options.acceptType || "success", onPress: onAcceptPress }, options.acceptText || "UYGULA"))));
19
23
  };
20
24
  exports.AlertButtons = AlertButtons;
21
25
  const styles = react_native_1.StyleSheet.create({
22
26
  base: {
23
- marginTop: "auto"
27
+ marginTop: "auto",
24
28
  },
25
29
  background: {
26
30
  position: "relative",
27
31
  padding: 32,
28
32
  borderTopLeftRadius: 32,
29
- borderTopRightRadius: 32
33
+ borderTopRightRadius: 32,
30
34
  },
31
35
  message: {
32
36
  alignItems: "center",
@@ -34,11 +38,11 @@ const styles = react_native_1.StyleSheet.create({
34
38
  width: "100%",
35
39
  padding: 0,
36
40
  minHeight: 100,
37
- marginBottom: 20
41
+ marginBottom: 20,
38
42
  },
39
43
  messageText: {
40
44
  textAlign: "center",
41
- width: "100%"
45
+ width: "100%",
42
46
  },
43
47
  buttons: {
44
48
  borderColor: "#77777733",
@@ -46,11 +50,12 @@ const styles = react_native_1.StyleSheet.create({
46
50
  paddingTop: 20,
47
51
  flexDirection: "row",
48
52
  alignItems: "center",
49
- justifyContent: "space-evenly"
53
+ justifyContent: "space-evenly",
50
54
  },
51
55
  button: {
52
56
  marginBottom: 0,
53
- minWidth: 120
57
+ minWidth: 120,
58
+ elevation: 0,
54
59
  },
55
60
  title: {
56
61
  position: "absolute",
@@ -68,17 +73,17 @@ const styles = react_native_1.StyleSheet.create({
68
73
  shadowColor: "#000000",
69
74
  shadowOffset: {
70
75
  width: 2,
71
- height: 5
76
+ height: 5,
72
77
  },
73
78
  shadowOpacity: 0.25,
74
79
  shadowRadius: 0,
75
- elevation: 5
80
+ elevation: 0,
76
81
  },
77
82
  titleText: {
78
83
  color: "#ffffff",
79
84
  fontWeight: "bold",
80
85
  fontFamily: "Righteous-Regular",
81
86
  fontSize: 14,
82
- lineHeight: 20
83
- }
87
+ lineHeight: 20,
88
+ },
84
89
  });
@@ -59,7 +59,7 @@ const styles = react_native_1.StyleSheet.create({
59
59
  },
60
60
  shadowOpacity: 0.25,
61
61
  shadowRadius: 5,
62
- elevation: 5,
62
+ elevation: 0,
63
63
  },
64
64
  blue: {
65
65
  backgroundColor: "#00B3FF",
@@ -1 +1 @@
1
- {"version":3,"file":"ProfileScoreButton.d.ts","sourceRoot":"","sources":["../../src/Buttons/ProfileScoreButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAc,MAAM,cAAc,CAAC;AAIjE,oBAAY,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,CAAC,KAAK,CAAC,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACjD,WAAW,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACtD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAsBxD,CAAC"}
1
+ {"version":3,"file":"ProfileScoreButton.d.ts","sourceRoot":"","sources":["../../src/Buttons/ProfileScoreButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAc,MAAM,cAAc,CAAC;AAIjE,oBAAY,eAAe,GAAG;IAC5B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,CAAC,KAAK,CAAC,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACjD,WAAW,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,qBAAqB,KAAK,IAAI,CAAC;IACtD,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAyBxD,CAAC"}
@@ -24,14 +24,18 @@ const React = __importStar(require("react"));
24
24
  const react_native_1 = require("react-native");
25
25
  const Themes_1 = require("../Themes");
26
26
  const MenuButton_1 = require("./MenuButton");
27
- const ProfileScoreButton = ({ children, onPress, onLongPress, icon, disabled, color }) => {
27
+ const ProfileScoreButton = ({ children, onPress, onLongPress, icon, disabled, color, }) => {
28
28
  const colors = Themes_1.useColors();
29
29
  return (React.createElement(MenuButton_1.MenuButton, { type: "outline-success", out: false, style: styles.button, textStyle: { color: color || colors.primaryColor }, size: "medium", onPress: onPress, onLongPress: onLongPress, disabled: disabled, icon: icon }, children));
30
30
  };
31
31
  exports.ProfileScoreButton = ProfileScoreButton;
32
32
  const styles = react_native_1.StyleSheet.create({
33
- button: { borderWidth: 0, paddingHorizontal: 16, borderRadius: 16,
33
+ button: {
34
+ borderWidth: 0,
35
+ paddingHorizontal: 16,
36
+ borderRadius: 16,
34
37
  minWidth: 120,
35
- backgroundColor: "#88888822"
36
- }
38
+ backgroundColor: "#88888822",
39
+ elevation: 0,
40
+ },
37
41
  });
@@ -1 +1 @@
1
- {"version":3,"file":"GiftPackBar.d.ts","sourceRoot":"","sources":["../../src/GameParts/GiftPackBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,aAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,UAAU,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAChC,IAAI,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAqHvC,CAAC"}
1
+ {"version":3,"file":"GiftPackBar.d.ts","sourceRoot":"","sources":["../../src/GameParts/GiftPackBar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,aAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,UAAU,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,IAAI,CAAC;IAChC,IAAI,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;IAC7B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAsHvC,CAAC"}
@@ -29,14 +29,14 @@ const GiftPackBar = ({ title, onSelect, onBuyPress, pack, selected, remain, }) =
29
29
  "Kalan Kullan\u0131m: ",
30
30
  remain))),
31
31
  (pack.priceType !== "ad" || loaded) && (react_1.default.createElement(Buttons_1.GiftBuyButton, { onPress: () => onBuyPress(pack) }, buttonText || pack.buttonText))))),
32
- react_1.default.createElement(react_native_1.View, { style: [styles.buttonIcons, { opacity: remain == 0 ? 0.6 : 1 }] },
33
- !!customGifts.length && (react_1.default.createElement(react_native_1.View, { style: [
34
- styles.buttonIcons,
35
- { opacity: remain == 0 ? 0.6 : 1, marginBottom: 0 },
36
- ] }, customGifts.map((item, key) => {
32
+ react_1.default.createElement(react_native_1.View, { style: [styles.buttonIcons] },
33
+ !!customGifts.length && (react_1.default.createElement(react_native_1.View, { style: [styles.buttonIcons, { marginBottom: 0 }] }, customGifts.map((item, key) => {
37
34
  let giftElement = react_1.default.createElement(react_native_1.Text, null, item);
38
35
  if (item.indexOf("a") === 0) {
39
- giftElement = (react_1.default.createElement(react_native_1.Image, { style: { width: 30, height: 30 }, accessibilityLabel: item, source: Utils_1.Assets.getSource("gift", item, "icon") }));
36
+ giftElement = (react_1.default.createElement(react_native_1.Image, { style: [
37
+ { width: 16, height: 16 },
38
+ { opacity: remain == 0 ? 0.7 : 1 },
39
+ ], accessibilityLabel: item, source: Utils_1.Assets.getSource("gift", item, "icon") }));
40
40
  }
41
41
  return (react_1.default.createElement(Views_1.TouchableView, { out: true, key: key, onPress: () => onSelect(item, pack.id), style: [
42
42
  styles.button,
@@ -46,7 +46,10 @@ const GiftPackBar = ({ title, onSelect, onBuyPress, pack, selected, remain, }) =
46
46
  gifts.map((item, key) => {
47
47
  let giftElement = react_1.default.createElement(react_native_1.Text, null, item);
48
48
  if (item.indexOf("a") === 0) {
49
- giftElement = (react_1.default.createElement(react_native_1.Image, { style: { width: 30, height: 30 }, accessibilityLabel: item.toString(), source: Utils_1.Assets.getSource("gift", item, "icon") }));
49
+ giftElement = (react_1.default.createElement(react_native_1.Image, { style: [
50
+ { width: 16, height: 16 },
51
+ { opacity: remain == 0 ? 0.7 : 1 },
52
+ ], accessibilityLabel: item.toString(), source: Utils_1.Assets.getSource("gift", item, "icon") }));
50
53
  }
51
54
  return (react_1.default.createElement(Views_1.TouchableView, { out: true, key: key, onPress: () => onSelect(item, pack.id), style: [
52
55
  styles.button,
@@ -76,9 +79,6 @@ const styles = react_native_1.StyleSheet.create({
76
79
  lineHeight: 14,
77
80
  fontSize: 12,
78
81
  color: "#ffffff",
79
- textShadowColor: "rgba(0, 0, 0, 0.45)",
80
- textShadowOffset: { width: 1, height: 1 },
81
- textShadowRadius: 4,
82
82
  fontWeight: "bold",
83
83
  },
84
84
  sendWrapper: {
@@ -96,14 +96,14 @@ const styles = react_native_1.StyleSheet.create({
96
96
  },
97
97
  button: {
98
98
  padding: height < 700 ? (isMiniDevice ? 4 : 4) : 4,
99
- backgroundColor: "#ffffff55",
99
+ backgroundColor: "#66aadd",
100
100
  margin: 1,
101
101
  borderRadius: 4,
102
102
  borderWidth: 1,
103
- borderColor: "#ffffff44",
103
+ borderColor: "#66aadd",
104
104
  },
105
105
  buttonSelected: {
106
- backgroundColor: "#ffffffff",
106
+ backgroundColor: "#ffffff",
107
107
  borderWidth: 1,
108
108
  borderColor: "#F9A01C",
109
109
  },
@@ -1 +1 @@
1
- {"version":3,"file":"TreasureInfo.d.ts","sourceRoot":"","sources":["../../src/GameParts/TreasureInfo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAiC,MAAM,cAAc,CAAC;AAMpF,aAAK,KAAK,GAAG;IACX,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,CAAC,KAAK,CAAC,EAAE,qBAAqB,KAAK,IAAI,CAAC;CACvD,CAAA;AACD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAuBvC,CAAC"}
1
+ {"version":3,"file":"TreasureInfo.d.ts","sourceRoot":"","sources":["../../src/GameParts/TreasureInfo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,qBAAqB,EAKtB,MAAM,cAAc,CAAC;AAMtB,aAAK,KAAK,GAAG;IACX,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,CAAC,KAAK,CAAC,EAAE,qBAAqB,KAAK,IAAI,CAAC;CACvD,CAAC;AACF,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CA0BxC,CAAC"}
@@ -47,11 +47,11 @@ const styles = react_native_1.StyleSheet.create({
47
47
  shadowColor: "#000000",
48
48
  shadowOffset: {
49
49
  width: 4,
50
- height: 6
50
+ height: 6,
51
51
  },
52
- shadowOpacity: .25,
52
+ shadowOpacity: 0.25,
53
53
  shadowRadius: 5,
54
- elevation: 5
54
+ elevation: 0,
55
55
  },
56
56
  frame: {
57
57
  flex: 1,
@@ -61,28 +61,28 @@ const styles = react_native_1.StyleSheet.create({
61
61
  justifyContent: "space-evenly",
62
62
  alignItems: "center",
63
63
  paddingTop: 30,
64
- paddingHorizontal: 30
64
+ paddingHorizontal: 30,
65
65
  },
66
66
  infoText: {
67
67
  flex: 1,
68
68
  fontSize: 14,
69
69
  color: "#ffffff",
70
- textAlign: "center"
70
+ textAlign: "center",
71
71
  },
72
72
  boldText: {
73
73
  fontWeight: "bold",
74
- fontSize: 20
74
+ fontSize: 20,
75
75
  },
76
76
  infoImage: {
77
77
  width: 120,
78
78
  height: 100,
79
79
  resizeMode: "contain",
80
80
  marginLeft: -10,
81
- marginRight: -10
81
+ marginRight: -10,
82
82
  },
83
83
  info: {
84
84
  flexDirection: "row",
85
85
  alignItems: "center",
86
- marginBottom: 20
87
- }
86
+ marginBottom: 20,
87
+ },
88
88
  });
@@ -8,6 +8,7 @@ declare type Props = {
8
8
  faded?: boolean;
9
9
  deadFocus?: boolean;
10
10
  vampiresFocus?: boolean;
11
+ myName?: string;
11
12
  appearance?: "dark" | "light";
12
13
  messages: Array<MessageItem>;
13
14
  labelFormatter: (user: string) => {
@@ -1 +1 @@
1
- {"version":3,"file":"MessageList.d.ts","sourceRoot":"","sources":["../../src/Messages/MessageList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAoD,SAAS,EAAE,MAAM,cAAc,CAAC;AAI3F,aAAK,WAAW,GAAG;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAAA;AAED,aAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IACvB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC9B,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAC7B,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,GAAG,CAAA;KAAE,CAAC;CAC5E,CAAA;AAGD,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAuFvC,CAAC"}
1
+ {"version":3,"file":"MessageList.d.ts","sourceRoot":"","sources":["../../src/Messages/MessageList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAML,SAAS,EACV,MAAM,cAAc,CAAC;AAItB,aAAK,WAAW,GAAG;IACjB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CAAC;AAEF,aAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IACvB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;IAC9B,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAC7B,cAAc,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK;QAAE,WAAW,EAAE,MAAM,CAAC;QAAC,UAAU,EAAE,GAAG,CAAA;KAAE,CAAC;CAC5E,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAqIvC,CAAC"}
@@ -26,21 +26,23 @@ exports.MessageList = void 0;
26
26
  const react_1 = __importDefault(require("react"));
27
27
  const react_native_1 = require("react-native");
28
28
  const Animatable = __importStar(require("react-native-animatable"));
29
- const Views_1 = require("../Views");
30
- const MessageList = ({ style, messages, labelFormatter, appearance = "light", faded, deadFocus, vampiresFocus }) => {
29
+ const MessageList = ({ style, messages, labelFormatter, appearance = "light", faded, myName, deadFocus, vampiresFocus, }) => {
31
30
  const flatListRef = react_1.default.useRef(null);
32
- const userLabelFormatter = !!labelFormatter ? labelFormatter : user => {
33
- let displayName = user;
34
- let labelStyle = {};
35
- return { displayName, labelStyle };
36
- };
31
+ const userLabelFormatter = !!labelFormatter
32
+ ? labelFormatter
33
+ : (user) => {
34
+ let displayName = user;
35
+ let labelStyle = {};
36
+ return { displayName, labelStyle };
37
+ };
38
+ const [scrollOffset, setScrollOffset] = react_1.default.useState(0);
37
39
  const _renderItem = ({ item, index }) => {
38
40
  const unFocusMessage = {};
39
41
  const isDark = appearance === "dark";
40
42
  const textColor = isDark ? styles.lightText : styles.darkText;
41
43
  const { displayName, labelStyle } = userLabelFormatter(item.user);
42
44
  if (item.vampirsOnly) {
43
- labelStyle.backgroundColor = 'red';
45
+ labelStyle.backgroundColor = "red";
44
46
  }
45
47
  if (deadFocus && !item.deathsOnly) {
46
48
  unFocusMessage.opacity = 0.3;
@@ -54,50 +56,74 @@ const MessageList = ({ style, messages, labelFormatter, appearance = "light", fa
54
56
  if (!vampiresFocus && item.vampirsOnly) {
55
57
  return null;
56
58
  }
57
- return react_1.default.createElement(Animatable.View, { animation: "fadeInUp", duration: 300, style: [styles.messageRow] },
58
- react_1.default.createElement(react_native_1.View, { style: [styles.messageWrapper, unFocusMessage] },
59
- react_1.default.createElement(react_native_1.View, { accessible: true, accessibilityLabel: `${item.number ? item.number + ' numara.' : ''} ${displayName}: ${item.message}`, style: [
59
+ const isSpecial = !item.number;
60
+ return (react_1.default.createElement(Animatable.View, { animation: "fadeInUp", duration: 300, style: [styles.messageRow] },
61
+ react_1.default.createElement(react_native_1.View, { style: [
62
+ styles.messageWrapper,
63
+ unFocusMessage,
64
+ myName === item.user ? styles.myMessageRow : {},
65
+ ] },
66
+ react_1.default.createElement(react_native_1.View, { accessible: true, accessibilityLabel: `${item.number ? item.number + " numara." : ""} ${displayName}: ${item.message}`, style: [
60
67
  styles.messageUserLabel,
61
68
  isDark ? styles.messageUserLabelNight : {},
62
- labelStyle
69
+ isSpecial ? styles.messageUserCenter : {},
70
+ myName === item.user ? styles.myMessage : {},
63
71
  ] },
64
- !!item.number && (react_1.default.createElement(react_native_1.View, { style: styles.messageNumber },
65
- react_1.default.createElement(react_native_1.Text, { style: styles.messageNumberText, accessible: false }, item.number))),
66
- react_1.default.createElement(react_native_1.Text, { style: [styles.messageUser], accessible: false }, displayName)),
67
- react_1.default.createElement(react_native_1.Text, { style: [styles.messageText, textColor], accessible: false }, item.message)));
72
+ !!item.number && (react_1.default.createElement(react_native_1.View, { style: [
73
+ styles.messageNumber,
74
+ myName === item.user ? styles.myMessageNumber : {},
75
+ ] },
76
+ react_1.default.createElement(react_native_1.Text, { style: [
77
+ styles.messageNumberText,
78
+ myName === item.user ? styles.myMessageNumberText : {},
79
+ ], accessible: false }, item.number))),
80
+ react_1.default.createElement(react_native_1.View, { style: [styles.messageUserView, labelStyle] },
81
+ react_1.default.createElement(react_native_1.Text, { style: [styles.messageUser], accessible: false }, displayName))),
82
+ react_1.default.createElement(react_native_1.Text, { style: [
83
+ styles.messageText,
84
+ myName === item.user ? styles.myMessageText : {},
85
+ textColor,
86
+ isSpecial ? styles.messageTextCenter : {},
87
+ ], accessible: false }, item.message))));
68
88
  };
69
89
  const _onContentSizeChange = () => {
70
90
  var _a;
71
- if (messages.length > 3) {
91
+ if (messages.length > 3 && scrollOffset < 50) {
72
92
  (_a = flatListRef.current) === null || _a === void 0 ? void 0 : _a.scrollToOffset({ offset: 0, animated: true });
73
93
  }
74
94
  };
75
- return react_1.default.createElement(Views_1.MaskedGradientView, { style: [styles.wrapper, style] },
76
- react_1.default.createElement(react_native_1.FlatList, { ref: flatListRef, inverted: true, ListHeaderComponent: react_1.default.createElement(react_native_1.View, { style: styles.listBottomSpace }), keyExtractor: item => item.key, onContentSizeChange: _onContentSizeChange, data: messages, style: [styles.flatList, appearance === "dark" && styles.flatListDark], renderItem: _renderItem }));
95
+ return (react_1.default.createElement(react_native_1.View, { style: [styles.wrapper, style] },
96
+ react_1.default.createElement(react_native_1.FlatList, { ref: flatListRef, inverted: true, ListHeaderComponent: react_1.default.createElement(react_native_1.View, { style: styles.listBottomSpace }), keyExtractor: (item) => item.key, onContentSizeChange: _onContentSizeChange, onScroll: (event) => {
97
+ setScrollOffset(event.nativeEvent.contentOffset.y);
98
+ }, data: messages, contentContainerStyle: { paddingBottom: 10 }, style: [styles.flatList, appearance === "dark" && styles.flatListDark], renderItem: _renderItem })));
77
99
  };
78
100
  exports.MessageList = MessageList;
79
101
  const styles = react_native_1.StyleSheet.create({
80
102
  wrapper: {
81
103
  flex: 1,
82
104
  paddingHorizontal: 10,
83
- marginBottom: -35
105
+ marginBottom: -35,
84
106
  },
85
107
  flatList: {
86
108
  paddingHorizontal: 8,
87
- backgroundColor: "#ffffff99",
88
- borderRadius: 16
109
+ backgroundColor: "#E2D2EE",
110
+ borderRadius: 16,
89
111
  },
90
112
  flatListDark: {
91
113
  backgroundColor: "#000000aa",
92
114
  },
93
115
  listBottomSpace: {
94
- height: 35
116
+ height: 35,
95
117
  },
96
118
  messageRow: {
97
- paddingBottom: 8
119
+ paddingBottom: 8,
120
+ paddingRight: 30,
121
+ },
122
+ myMessageRow: {
123
+ flexDirection: "column",
98
124
  },
99
125
  messageWrapper: {
100
- flexDirection: "row",
126
+ flexDirection: "column",
101
127
  },
102
128
  messageUserLabel: {
103
129
  flexDirection: "row",
@@ -105,45 +131,74 @@ const styles = react_native_1.StyleSheet.create({
105
131
  justifyContent: "center",
106
132
  alignSelf: "flex-start",
107
133
  borderRadius: 6,
108
- paddingVertical: 3,
134
+ paddingVertical: 0,
109
135
  paddingHorizontal: 6,
110
- backgroundColor: "rgba(42,40,40,0.4)",
111
136
  marginRight: 5,
112
- marginBottom: 5
137
+ marginBottom: 2,
138
+ },
139
+ myMessage: {
140
+ flexDirection: "row-reverse",
141
+ alignSelf: "flex-end",
113
142
  },
114
143
  messageUserLabelNight: {
115
- backgroundColor: "rgba(162,157,157,0.4)"
144
+ // backgroundColor: "rgba(162,157,157,0.4)",
145
+ },
146
+ messageUserCenter: {
147
+ alignSelf: "center",
148
+ paddingLeft: 30,
149
+ },
150
+ messageUserView: {
151
+ backgroundColor: "rgba(42,40,40,0.4)",
152
+ borderRadius: 12,
153
+ marginLeft: 6,
154
+ marginRight: 6,
116
155
  },
117
156
  messageUser: {
118
- lineHeight: 16,
119
- paddingBottom: 0,
120
- marginBottom: 0,
157
+ lineHeight: 14,
121
158
  color: "#ffffff",
122
- fontSize: 14
159
+ fontSize: 10,
160
+ paddingVertical: 2,
161
+ paddingHorizontal: 8,
123
162
  },
124
163
  messageText: {
125
- alignSelf: "center",
126
- marginBottom: 2,
164
+ alignSelf: "flex-start",
165
+ paddingLeft: 36,
166
+ marginBottom: 5,
127
167
  flex: 1,
128
- fontSize: 12
168
+ fontSize: 12,
169
+ },
170
+ myMessageText: {
171
+ alignSelf: "flex-end",
172
+ paddingRight: 36,
173
+ },
174
+ messageTextCenter: {
175
+ paddingHorizontal: 20,
176
+ alignSelf: "center",
177
+ textAlign: "center",
129
178
  },
130
179
  messageNumber: {
131
180
  backgroundColor: "rgba(42,40,40,0.4)",
132
181
  width: 20,
133
182
  borderRadius: 10,
134
- marginRight: 6,
135
183
  alignItems: "center",
136
- justifyContent: "center"
184
+ justifyContent: "center",
185
+ },
186
+ myMessageNumber: {
187
+ backgroundColor: "#fefe11",
188
+ },
189
+ myMessageNumberText: {
190
+ color: "#000000",
137
191
  },
138
192
  messageNumberText: {
139
193
  color: "#ffffff",
140
194
  textAlign: "center",
141
- fontSize: 12
195
+ fontWeight: "bold",
196
+ fontSize: 12,
142
197
  },
143
198
  lightText: {
144
- color: "#cecece"
199
+ color: "#cecece",
145
200
  },
146
201
  darkText: {
147
- color: "#343434"
148
- }
202
+ color: "#343434",
203
+ },
149
204
  });
@@ -1 +1 @@
1
- {"version":3,"file":"ScreenBase.d.ts","sourceRoot":"","sources":["../../src/Screens/ScreenBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAmB,mBAAmB,EAAc,SAAS,EAAoB,MAAM,cAAc,CAAC;AAO7G,oBAAY,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IACvB,YAAY,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IAC9B,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,CAAC,GAAG,KAAA,KAAK,IAAI,CAAC;IACvB,UAAU,CAAC,EAAE,mBAAmB,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,GAAG,KAAA,KAAK,IAAI,CAAC;IACzB,WAAW,CAAC,EAAE,CAAC,GAAG,KAAA,KAAK,IAAI,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,EAAE,GAAG,GAAG,CAAC,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;CAC3E,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CA4FhD,CAAC"}
1
+ {"version":3,"file":"ScreenBase.d.ts","sourceRoot":"","sources":["../../src/Screens/ScreenBase.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,mBAAmB,EAEnB,SAAS,EAGV,MAAM,cAAc,CAAC;AAOtB,oBAAY,eAAe,GAAG;IAC5B,KAAK,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IACvB,YAAY,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IAC9B,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,CAAC,GAAG,KAAA,KAAK,IAAI,CAAC;IACvB,UAAU,CAAC,EAAE,mBAAmB,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,QAAQ,CAAC,EAAE,CAAC,GAAG,KAAA,KAAK,IAAI,CAAC;IACzB,WAAW,CAAC,EAAE,CAAC,GAAG,KAAA,KAAK,IAAI,CAAC;IAC5B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,EAAE,GAAG,GAAG,CAAC,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;CAC3E,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAqGhD,CAAC"}
@@ -11,7 +11,7 @@ const ScreenFooter_1 = require("./ScreenFooter");
11
11
  const ScreenHeader_1 = require("./ScreenHeader");
12
12
  const Themes_1 = require("../Themes");
13
13
  const react_native_safe_area_context_1 = require("react-native-safe-area-context");
14
- const ScreenBase = ({ children, style, contentStyle = {}, icon, title, onBack, background, scrollable, transparent, onAccept, noPaddings, renderHeader, acceptText, onLeftPress, leftButtonIcon, leftButtonLabel, leftButtonFont }) => {
14
+ const ScreenBase = ({ children, style, contentStyle = {}, icon, title, onBack, background, scrollable, transparent, onAccept, noPaddings, renderHeader, acceptText, onLeftPress, leftButtonIcon, leftButtonLabel, leftButtonFont, }) => {
15
15
  const { dimBackgroundColorTransparent } = Themes_1.useColors();
16
16
  const insets = react_native_safe_area_context_1.useSafeAreaInsets();
17
17
  const renderContent = () => {
@@ -22,9 +22,9 @@ const ScreenBase = ({ children, style, contentStyle = {}, icon, title, onBack, b
22
22
  styles.scrollBack,
23
23
  {
24
24
  marginBottom: -Math.max(10, insets.bottom),
25
- backgroundColor: dimBackgroundColorTransparent
25
+ backgroundColor: dimBackgroundColorTransparent,
26
26
  },
27
- contentStyle
27
+ contentStyle,
28
28
  ] },
29
29
  react_1.default.createElement(react_native_1.ScrollView, { style: [styles.scroll] },
30
30
  !noPaddings && react_1.default.createElement(Utils_1.Margin, { size: "xlarge" }),
@@ -40,11 +40,17 @@ const ScreenBase = ({ children, style, contentStyle = {}, icon, title, onBack, b
40
40
  position: "relative",
41
41
  zIndex: 1,
42
42
  marginTop: hasCustomheader ? 0 : insets.top,
43
- marginBottom: Math.max(0, insets.bottom)
43
+ marginBottom: Math.max(0, insets.bottom),
44
44
  } },
45
45
  react_1.default.createElement(react_native_1.View, { style: { flex: 1, position: "relative", zIndex: 1 } },
46
46
  renderContent(),
47
- !hasCustomheader ? (react_1.default.createElement(ScreenHeader_1.ScreenHeader, Object.assign({}, { icon, onLeftPress, leftButtonIcon, leftButtonFont, leftButtonLabel }), title)) : null)),
47
+ !hasCustomheader ? (react_1.default.createElement(ScreenHeader_1.ScreenHeader, Object.assign({}, {
48
+ icon,
49
+ onLeftPress,
50
+ leftButtonIcon,
51
+ leftButtonFont,
52
+ leftButtonLabel,
53
+ }), title)) : null)),
48
54
  react_1.default.createElement(ScreenFooter_1.ScreenFooter, { onBack: onBack, onAccept: onAccept, acceptText: acceptText })));
49
55
  };
50
56
  if (transparent) {
@@ -56,7 +62,7 @@ exports.ScreenBase = ScreenBase;
56
62
  const styles = react_native_1.StyleSheet.create({
57
63
  base: {
58
64
  flex: 1,
59
- position: "relative"
65
+ position: "relative",
60
66
  },
61
67
  scrollBack: {
62
68
  flex: 1,
@@ -65,18 +71,18 @@ const styles = react_native_1.StyleSheet.create({
65
71
  backgroundColor: "#00000099",
66
72
  borderRadius: 32,
67
73
  borderBottomStartRadius: 0,
68
- borderBottomEndRadius: 0
74
+ borderBottomEndRadius: 0,
69
75
  },
70
76
  scroll: {
71
77
  flex: 1,
72
78
  borderRadius: 32,
73
79
  paddingBottom: 40,
74
80
  borderBottomStartRadius: 0,
75
- borderBottomEndRadius: 0
81
+ borderBottomEndRadius: 0,
76
82
  },
77
83
  fixedBottom: {
78
84
  position: "absolute",
79
85
  left: 0,
80
- bottom: 0
81
- }
86
+ bottom: 0,
87
+ },
82
88
  });
@@ -1 +1 @@
1
- {"version":3,"file":"SplitScreen.d.ts","sourceRoot":"","sources":["../../src/Screens/SplitScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAmB,mBAAmB,EAAc,SAAS,EAAoB,MAAM,cAAc,CAAC;AAM7G,aAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IACvB,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,CAAC,GAAG,KAAA,KAAK,IAAI,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,mBAAmB,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,GAAG,KAAA,KAAK,IAAI,CAAC;IACzB,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,EAAE,GAAG,MAAM,GAAG,MAAM,CAAC;CAC7D,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAiFvC,CAAC"}
1
+ {"version":3,"file":"SplitScreen.d.ts","sourceRoot":"","sources":["../../src/Screens/SplitScreen.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,mBAAmB,EAEnB,SAAS,EAGV,MAAM,cAAc,CAAC;AAMtB,aAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IACvB,IAAI,CAAC,EAAE,mBAAmB,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,CAAC,GAAG,KAAA,KAAK,IAAI,CAAC;IACvB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,mBAAmB,CAAC;IACjC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,CAAC,GAAG,KAAA,KAAK,IAAI,CAAC;IACzB,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,KAAK,CAAC,EAAE,GAAG,MAAM,GAAG,MAAM,CAAC;CAC7D,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAkFvC,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "koylu-vampir-design",
3
- "version": "1.0.24",
3
+ "version": "1.0.25",
4
4
  "description": "Design System for Koylu Vampir Game",
5
5
  "keywords": [
6
6
  "react-native",