@regantis-sdk/react-native-chat 0.1.4 → 0.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@regantis-sdk/react-native-chat",
3
- "version": "0.1.4",
3
+ "version": "0.1.5",
4
4
  "description": "Regantis customer support chat SDK for React Native Android and iOS",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -25,7 +25,8 @@ const { RegantisChatClient } = require('./client');
25
25
 
26
26
  const REGANTIS_LOGO_BLACK = require('../assets/regantis_logo_black.png');
27
27
  const REGANTIS_LOGO_WHITE = require('../assets/regantis_logo_white.png');
28
- const SOFT_GLOW = require('../assets/soft_glow.png');
28
+ const WELCOME_BACKGROUND_LIGHT = require('../assets/welcome_background_light.png');
29
+ const WELCOME_BACKGROUND_DARK = require('../assets/welcome_background_dark.png');
29
30
 
30
31
  const EMOJIS = ['🙂', '😁', '😂', '😊', '😍', '😐', '🤔', '😞', '😢', '😭', '🎉', '❤️', '👌', '👍', '👎', '🙏'];
31
32
 
@@ -270,9 +271,6 @@ function makePalette(settings) {
270
271
  agentText: advanced ? settings.agent_text : (dark ? '#F5F6F7' : '#17181B'),
271
272
  danger: '#DF2917',
272
273
  heroBase: dark ? '#151B21' : '#EEF5FC',
273
- heroGlowA: dark ? '#495398' : '#7689FF',
274
- heroGlowB: dark ? '#227EA8' : '#60DED7',
275
- heroGlowC: dark ? '#293038' : '#FFFFFF',
276
274
  };
277
275
  }
278
276
 
@@ -532,9 +530,6 @@ function RegantisChat(props) {
532
530
  palette.agentBubble,
533
531
  palette.agentText,
534
532
  palette.heroBase,
535
- palette.heroGlowA,
536
- palette.heroGlowB,
537
- palette.heroGlowC,
538
533
  ]);
539
534
 
540
535
  const c = state.conversation || {};
@@ -795,9 +790,12 @@ function RegantisChat(props) {
795
790
  return (
796
791
  <View style={styles.screen}>
797
792
  <View style={styles.homeHero}>
798
- <Image pointerEvents="none" source={SOFT_GLOW} style={[styles.heroGlow, styles.heroGlowA, { tintColor: palette.heroGlowA }]} resizeMode="stretch" />
799
- <Image pointerEvents="none" source={SOFT_GLOW} style={[styles.heroGlow, styles.heroGlowB, { tintColor: palette.heroGlowB }]} resizeMode="stretch" />
800
- <Image pointerEvents="none" source={SOFT_GLOW} style={[styles.heroGlow, styles.heroGlowC, { tintColor: palette.heroGlowC }]} resizeMode="stretch" />
793
+ <Image
794
+ pointerEvents="none"
795
+ source={palette.dark ? WELCOME_BACKGROUND_DARK : WELCOME_BACKGROUND_LIGHT}
796
+ style={styles.homeHeroBackground}
797
+ resizeMode="cover"
798
+ />
801
799
 
802
800
  <View style={styles.homeTop}>
803
801
  <View style={styles.homeTopLeft}>
@@ -1167,10 +1165,7 @@ function buildStyles(p) {
1167
1165
  errorText: { color: p.text, fontSize: 14, textAlign: 'center', marginBottom: 12 },
1168
1166
 
1169
1167
  homeHero: { position: 'relative', overflow: 'hidden', paddingHorizontal: 18, paddingTop: 24, paddingBottom: 28, backgroundColor: p.heroBase },
1170
- heroGlow: { position: 'absolute', opacity: p.dark ? 0.34 : 0.72 },
1171
- heroGlowA: { width: 390, height: 390, top: -235, left: -165 },
1172
- heroGlowB: { width: 360, height: 360, top: 20, right: -170, opacity: p.dark ? 0.26 : 0.62 },
1173
- heroGlowC: { width: 300, height: 300, right: -135, bottom: -185, opacity: p.dark ? 0.09 : 0.34 },
1168
+ homeHeroBackground: { ...StyleSheet.absoluteFillObject, width: '100%', height: '100%' },
1174
1169
  homeTop: { minHeight: 42, flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', zIndex: 2 },
1175
1170
  homeTopLeft: { flexDirection: 'row', alignItems: 'center', gap: 9 },
1176
1171
  homeBackIcon: { color: p.text, fontSize: 37, lineHeight: 38, marginTop: -5 },
Binary file