@repzo/widget-react-native 1.0.0 → 1.0.1

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.
Files changed (126) hide show
  1. package/README.md +167 -74
  2. package/lib/commonjs/api/client.js.map +1 -1
  3. package/lib/commonjs/attachments/pickers.js +493 -0
  4. package/lib/commonjs/attachments/pickers.js.map +1 -0
  5. package/lib/commonjs/i18n.js +19 -0
  6. package/lib/commonjs/i18n.js.map +1 -1
  7. package/lib/commonjs/index.js.map +1 -1
  8. package/lib/commonjs/locales.js +16 -0
  9. package/lib/commonjs/locales.js.map +1 -1
  10. package/lib/commonjs/state/widget-store.js +147 -13
  11. package/lib/commonjs/state/widget-store.js.map +1 -1
  12. package/lib/commonjs/types.js +14 -0
  13. package/lib/commonjs/types.js.map +1 -1
  14. package/lib/commonjs/ui/WidgetProvider.js +53 -8
  15. package/lib/commonjs/ui/WidgetProvider.js.map +1 -1
  16. package/lib/commonjs/ui/components/AttachmentChips.js +135 -0
  17. package/lib/commonjs/ui/components/AttachmentChips.js.map +1 -0
  18. package/lib/commonjs/ui/components/AttachmentMenu.js +125 -0
  19. package/lib/commonjs/ui/components/AttachmentMenu.js.map +1 -0
  20. package/lib/commonjs/ui/components/ImageViewer.js +181 -0
  21. package/lib/commonjs/ui/components/ImageViewer.js.map +1 -0
  22. package/lib/commonjs/ui/components/InAppNotification.js +210 -0
  23. package/lib/commonjs/ui/components/InAppNotification.js.map +1 -0
  24. package/lib/commonjs/ui/screens/chat/ChatView.js +198 -18
  25. package/lib/commonjs/ui/screens/chat/ChatView.js.map +1 -1
  26. package/lib/commonjs/ui/screens/chat/ChatView.styles.js +19 -0
  27. package/lib/commonjs/ui/screens/chat/ChatView.styles.js.map +1 -1
  28. package/lib/module/api/client.js.map +1 -1
  29. package/lib/module/attachments/pickers.js +479 -0
  30. package/lib/module/attachments/pickers.js.map +1 -0
  31. package/lib/module/i18n.js +19 -0
  32. package/lib/module/i18n.js.map +1 -1
  33. package/lib/module/index.js.map +1 -1
  34. package/lib/module/locales.js +16 -0
  35. package/lib/module/locales.js.map +1 -1
  36. package/lib/module/state/widget-store.js +147 -13
  37. package/lib/module/state/widget-store.js.map +1 -1
  38. package/lib/module/types.js +14 -0
  39. package/lib/module/types.js.map +1 -1
  40. package/lib/module/ui/WidgetProvider.js +53 -8
  41. package/lib/module/ui/WidgetProvider.js.map +1 -1
  42. package/lib/module/ui/components/AttachmentChips.js +131 -0
  43. package/lib/module/ui/components/AttachmentChips.js.map +1 -0
  44. package/lib/module/ui/components/AttachmentMenu.js +120 -0
  45. package/lib/module/ui/components/AttachmentMenu.js.map +1 -0
  46. package/lib/module/ui/components/ImageViewer.js +177 -0
  47. package/lib/module/ui/components/ImageViewer.js.map +1 -0
  48. package/lib/module/ui/components/InAppNotification.js +208 -0
  49. package/lib/module/ui/components/InAppNotification.js.map +1 -0
  50. package/lib/module/ui/screens/chat/ChatView.js +201 -21
  51. package/lib/module/ui/screens/chat/ChatView.js.map +1 -1
  52. package/lib/module/ui/screens/chat/ChatView.styles.js +19 -0
  53. package/lib/module/ui/screens/chat/ChatView.styles.js.map +1 -1
  54. package/lib/typescript/commonjs/api/client.d.ts +8 -2
  55. package/lib/typescript/commonjs/api/client.d.ts.map +1 -1
  56. package/lib/typescript/commonjs/attachments/pickers.d.ts +81 -0
  57. package/lib/typescript/commonjs/attachments/pickers.d.ts.map +1 -0
  58. package/lib/typescript/commonjs/i18n.d.ts +16 -0
  59. package/lib/typescript/commonjs/i18n.d.ts.map +1 -1
  60. package/lib/typescript/commonjs/index.d.ts +1 -1
  61. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  62. package/lib/typescript/commonjs/locales.d.ts.map +1 -1
  63. package/lib/typescript/commonjs/state/widget-store.d.ts +23 -2
  64. package/lib/typescript/commonjs/state/widget-store.d.ts.map +1 -1
  65. package/lib/typescript/commonjs/types.d.ts +74 -0
  66. package/lib/typescript/commonjs/types.d.ts.map +1 -1
  67. package/lib/typescript/commonjs/ui/WidgetProvider.d.ts.map +1 -1
  68. package/lib/typescript/commonjs/ui/components/AttachmentChips.d.ts +16 -0
  69. package/lib/typescript/commonjs/ui/components/AttachmentChips.d.ts.map +1 -0
  70. package/lib/typescript/commonjs/ui/components/AttachmentMenu.d.ts +28 -0
  71. package/lib/typescript/commonjs/ui/components/AttachmentMenu.d.ts.map +1 -0
  72. package/lib/typescript/commonjs/ui/components/ImageViewer.d.ts +23 -0
  73. package/lib/typescript/commonjs/ui/components/ImageViewer.d.ts.map +1 -0
  74. package/lib/typescript/commonjs/ui/components/InAppNotification.d.ts +28 -0
  75. package/lib/typescript/commonjs/ui/components/InAppNotification.d.ts.map +1 -0
  76. package/lib/typescript/commonjs/ui/screens/chat/ChatView.d.ts +3 -2
  77. package/lib/typescript/commonjs/ui/screens/chat/ChatView.d.ts.map +1 -1
  78. package/lib/typescript/commonjs/ui/screens/chat/ChatView.styles.d.ts +18 -0
  79. package/lib/typescript/commonjs/ui/screens/chat/ChatView.styles.d.ts.map +1 -1
  80. package/lib/typescript/commonjs/ui/screens/chat/ChatView.types.d.ts +28 -2
  81. package/lib/typescript/commonjs/ui/screens/chat/ChatView.types.d.ts.map +1 -1
  82. package/lib/typescript/module/api/client.d.ts +8 -2
  83. package/lib/typescript/module/api/client.d.ts.map +1 -1
  84. package/lib/typescript/module/attachments/pickers.d.ts +81 -0
  85. package/lib/typescript/module/attachments/pickers.d.ts.map +1 -0
  86. package/lib/typescript/module/i18n.d.ts +16 -0
  87. package/lib/typescript/module/i18n.d.ts.map +1 -1
  88. package/lib/typescript/module/index.d.ts +1 -1
  89. package/lib/typescript/module/index.d.ts.map +1 -1
  90. package/lib/typescript/module/locales.d.ts.map +1 -1
  91. package/lib/typescript/module/state/widget-store.d.ts +23 -2
  92. package/lib/typescript/module/state/widget-store.d.ts.map +1 -1
  93. package/lib/typescript/module/types.d.ts +74 -0
  94. package/lib/typescript/module/types.d.ts.map +1 -1
  95. package/lib/typescript/module/ui/WidgetProvider.d.ts.map +1 -1
  96. package/lib/typescript/module/ui/components/AttachmentChips.d.ts +16 -0
  97. package/lib/typescript/module/ui/components/AttachmentChips.d.ts.map +1 -0
  98. package/lib/typescript/module/ui/components/AttachmentMenu.d.ts +28 -0
  99. package/lib/typescript/module/ui/components/AttachmentMenu.d.ts.map +1 -0
  100. package/lib/typescript/module/ui/components/ImageViewer.d.ts +23 -0
  101. package/lib/typescript/module/ui/components/ImageViewer.d.ts.map +1 -0
  102. package/lib/typescript/module/ui/components/InAppNotification.d.ts +28 -0
  103. package/lib/typescript/module/ui/components/InAppNotification.d.ts.map +1 -0
  104. package/lib/typescript/module/ui/screens/chat/ChatView.d.ts +3 -2
  105. package/lib/typescript/module/ui/screens/chat/ChatView.d.ts.map +1 -1
  106. package/lib/typescript/module/ui/screens/chat/ChatView.styles.d.ts +18 -0
  107. package/lib/typescript/module/ui/screens/chat/ChatView.styles.d.ts.map +1 -1
  108. package/lib/typescript/module/ui/screens/chat/ChatView.types.d.ts +28 -2
  109. package/lib/typescript/module/ui/screens/chat/ChatView.types.d.ts.map +1 -1
  110. package/metro.js +17 -32
  111. package/package.json +18 -1
  112. package/src/api/client.ts +2 -2
  113. package/src/attachments/pickers.ts +515 -0
  114. package/src/i18n.ts +20 -0
  115. package/src/index.tsx +4 -0
  116. package/src/locales.ts +16 -0
  117. package/src/state/widget-store.ts +152 -16
  118. package/src/types.ts +79 -0
  119. package/src/ui/WidgetProvider.tsx +65 -6
  120. package/src/ui/components/AttachmentChips.tsx +135 -0
  121. package/src/ui/components/AttachmentMenu.tsx +132 -0
  122. package/src/ui/components/ImageViewer.tsx +178 -0
  123. package/src/ui/components/InAppNotification.tsx +225 -0
  124. package/src/ui/screens/chat/ChatView.styles.ts +19 -0
  125. package/src/ui/screens/chat/ChatView.tsx +235 -16
  126. package/src/ui/screens/chat/ChatView.types.ts +38 -2
@@ -0,0 +1,181 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ImageViewer = ImageViewer;
7
+ var _react = require("react");
8
+ var _reactNative = require("react-native");
9
+ var _useWidgetInsets = require("../hooks/use-widget-insets.js");
10
+ var _theme = require("../styles/theme.js");
11
+ var _icons = require("./icons.js");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ /**
14
+ * Full-screen viewer for image attachments, so a tap on a photo the agent sent
15
+ * stays inside the messenger instead of bouncing to the browser. Pinch-to-zoom
16
+ * uses the native ScrollView zoom (iOS); Android shows the image fitted.
17
+ */
18
+
19
+ function ImageViewer({
20
+ image,
21
+ labels,
22
+ onClose,
23
+ onOpenExternally
24
+ }) {
25
+ const insets = (0, _useWidgetInsets.useWidgetInsets)();
26
+ // Keyed by URL so opening another image starts from a clean loading state.
27
+ const [status, setStatus] = (0, _react.useState)({
28
+ url: null,
29
+ state: 'loading'
30
+ });
31
+ const state = status.url === image?.url ? status.state : 'loading';
32
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Modal, {
33
+ visible: !!image,
34
+ transparent: true,
35
+ animationType: "fade",
36
+ statusBarTranslucent: true,
37
+ onRequestClose: onClose,
38
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
39
+ style: styles.backdrop,
40
+ accessibilityViewIsModal: true,
41
+ children: [image ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
42
+ style: styles.fill,
43
+ contentContainerStyle: styles.center,
44
+ maximumZoomScale: 4,
45
+ minimumZoomScale: 1,
46
+ centerContent: true,
47
+ showsHorizontalScrollIndicator: false,
48
+ showsVerticalScrollIndicator: false,
49
+ bouncesZoom: true,
50
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
51
+ source: {
52
+ uri: image.url
53
+ },
54
+ style: styles.image,
55
+ resizeMode: "contain",
56
+ accessibilityLabel: image.name,
57
+ accessibilityIgnoresInvertColors: true,
58
+ onLoad: () => setStatus({
59
+ url: image.url,
60
+ state: 'ready'
61
+ }),
62
+ onError: () => setStatus({
63
+ url: image.url,
64
+ state: 'failed'
65
+ })
66
+ })
67
+ }) : null, image && state === 'loading' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
68
+ style: _reactNative.StyleSheet.absoluteFill,
69
+ color: _theme.palette.white
70
+ }) : null, image && state === 'failed' ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
71
+ style: [_reactNative.StyleSheet.absoluteFill, styles.center, styles.failed],
72
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
73
+ style: styles.failedText,
74
+ children: labels.loadFailed
75
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
76
+ onPress: () => onOpenExternally(image.url),
77
+ accessibilityRole: "button",
78
+ style: ({
79
+ pressed
80
+ }) => [styles.externalButton, pressed && styles.pressed],
81
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
82
+ style: styles.externalLabel,
83
+ children: labels.openExternally
84
+ })
85
+ })]
86
+ }) : null, /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
87
+ style: [styles.header, {
88
+ paddingTop: insets.top + _theme.spacing.sm
89
+ }],
90
+ pointerEvents: "box-none",
91
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
92
+ style: styles.title,
93
+ numberOfLines: 1,
94
+ children: image?.name ?? ''
95
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
96
+ onPress: onClose,
97
+ accessibilityRole: "button",
98
+ accessibilityLabel: labels.close,
99
+ hitSlop: 12,
100
+ style: ({
101
+ pressed
102
+ }) => [styles.closeButton, pressed && styles.pressed],
103
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_icons.CloseIcon, {
104
+ size: 20,
105
+ color: _theme.palette.white
106
+ })
107
+ })]
108
+ })]
109
+ })
110
+ });
111
+ }
112
+ const styles = _reactNative.StyleSheet.create({
113
+ backdrop: {
114
+ flex: 1,
115
+ backgroundColor: '#000000'
116
+ },
117
+ fill: {
118
+ flex: 1
119
+ },
120
+ center: {
121
+ flexGrow: 1,
122
+ alignItems: 'center',
123
+ justifyContent: 'center'
124
+ },
125
+ image: {
126
+ width: '100%',
127
+ height: '100%'
128
+ },
129
+ header: {
130
+ position: 'absolute',
131
+ top: 0,
132
+ left: 0,
133
+ right: 0,
134
+ flexDirection: 'row',
135
+ alignItems: 'center',
136
+ gap: _theme.spacing.md,
137
+ paddingHorizontal: _theme.spacing.lg,
138
+ paddingBottom: _theme.spacing.sm,
139
+ backgroundColor: 'rgba(0,0,0,0.45)'
140
+ },
141
+ title: {
142
+ flex: 1,
143
+ minWidth: 0,
144
+ color: _theme.palette.white,
145
+ fontSize: _theme.fontSize.body,
146
+ fontWeight: '600'
147
+ },
148
+ closeButton: {
149
+ width: 36,
150
+ height: 36,
151
+ borderRadius: 18,
152
+ alignItems: 'center',
153
+ justifyContent: 'center',
154
+ backgroundColor: 'rgba(255,255,255,0.14)'
155
+ },
156
+ pressed: {
157
+ opacity: 0.7
158
+ },
159
+ failed: {
160
+ gap: _theme.spacing.md,
161
+ paddingHorizontal: _theme.spacing.xxl
162
+ },
163
+ failedText: {
164
+ color: _theme.palette.white,
165
+ fontSize: _theme.fontSize.body,
166
+ textAlign: 'center'
167
+ },
168
+ externalButton: {
169
+ paddingHorizontal: _theme.spacing.lg,
170
+ paddingVertical: _theme.spacing.sm,
171
+ borderRadius: 999,
172
+ borderWidth: _reactNative.StyleSheet.hairlineWidth,
173
+ borderColor: 'rgba(255,255,255,0.5)'
174
+ },
175
+ externalLabel: {
176
+ color: _theme.palette.white,
177
+ fontSize: _theme.fontSize.meta,
178
+ fontWeight: _reactNative.Platform.OS === 'ios' ? '600' : 'bold'
179
+ }
180
+ });
181
+ //# sourceMappingURL=ImageViewer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNative","_useWidgetInsets","_theme","_icons","_jsxRuntime","ImageViewer","image","labels","onClose","onOpenExternally","insets","useWidgetInsets","status","setStatus","useState","url","state","jsx","Modal","visible","transparent","animationType","statusBarTranslucent","onRequestClose","children","jsxs","View","style","styles","backdrop","accessibilityViewIsModal","ScrollView","fill","contentContainerStyle","center","maximumZoomScale","minimumZoomScale","centerContent","showsHorizontalScrollIndicator","showsVerticalScrollIndicator","bouncesZoom","Image","source","uri","resizeMode","accessibilityLabel","name","accessibilityIgnoresInvertColors","onLoad","onError","ActivityIndicator","StyleSheet","absoluteFill","color","palette","white","failed","Text","failedText","loadFailed","Pressable","onPress","accessibilityRole","pressed","externalButton","externalLabel","openExternally","header","paddingTop","top","spacing","sm","pointerEvents","title","numberOfLines","close","hitSlop","closeButton","CloseIcon","size","create","flex","backgroundColor","flexGrow","alignItems","justifyContent","width","height","position","left","right","flexDirection","gap","md","paddingHorizontal","lg","paddingBottom","minWidth","fontSize","body","fontWeight","borderRadius","opacity","xxl","textAlign","paddingVertical","borderWidth","hairlineWidth","borderColor","meta","Platform","OS"],"sourceRoot":"../../../../src","sources":["ui/components/ImageViewer.tsx"],"mappings":";;;;;;AAMA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAYA,IAAAE,gBAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AAAoC,IAAAK,WAAA,GAAAL,OAAA;AArBpC;AACA;AACA;AACA;AACA;;AAiCO,SAASM,WAAWA,CAAC;EAAEC,KAAK;EAAEC,MAAM;EAAEC,OAAO;EAAEC;AAAmC,CAAC,EAAE;EAC1F,MAAMC,MAAM,GAAG,IAAAC,gCAAe,EAAC,CAAC;EAChC;EACA,MAAM,CAACC,MAAM,EAAEC,SAAS,CAAC,GAAG,IAAAC,eAAQ,EAClC;IAAEC,GAAG,EAAE,IAAI;IAAEC,KAAK,EAAE;EAAU,CAChC,CAAC;EACD,MAAMA,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AAI;IACvBT,UAAU,EAAEU,qBAAQ,CAACC,EAAE,KAAK,KAAK,GAAG,KAAK,GAAG;EAC9C;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,210 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.InAppNotification = InAppNotification;
7
+ var _react = require("react");
8
+ var _reactNative = require("react-native");
9
+ var _i18n = require("../../i18n.js");
10
+ var _useReduceMotion = require("../hooks/use-reduce-motion.js");
11
+ var _theme = require("../styles/theme.js");
12
+ var _rtl = require("../utils/rtl.js");
13
+ var _Avatar = require("./Avatar.js");
14
+ var _jsxRuntime = require("react/jsx-runtime");
15
+ /**
16
+ * The card that floats over the host app when a team reply arrives while the
17
+ * messenger is closed — Intercom's in-app notification. It never times out:
18
+ * tapping it opens the conversation, swiping it left or right dismisses it
19
+ * (the thread stays unread). The store takes it down on its own once the
20
+ * messenger opens or the thread is read.
21
+ *
22
+ * Pure JS gestures (PanResponder), so hosts need no gesture library.
23
+ */
24
+
25
+ /** Share of the card's width a drag must travel to count as a dismiss. */const DISMISS_DISTANCE_RATIO = 0.35;
26
+ /** A quick flick dismisses even when it travels less than that. */
27
+ const DISMISS_VELOCITY = 0.6;
28
+ function InAppNotification({
29
+ notification,
30
+ color,
31
+ bottomInset,
32
+ labels,
33
+ onOpen,
34
+ onDismiss
35
+ }) {
36
+ const {
37
+ width
38
+ } = (0, _reactNative.useWindowDimensions)();
39
+ const reduceMotion = (0, _useReduceMotion.useReduceMotion)();
40
+ // Read as "hold still" until the setting is known (see useReduceMotion).
41
+ const animate = reduceMotion === false;
42
+ const entry = (0, _react.useRef)(new _reactNative.Animated.Value(animate ? 0 : 1)).current;
43
+ const dragX = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current;
44
+ const preview = notification.preview || (notification.hasAttachments ? labels.attachment : '');
45
+ const sender = notification.senderName ? (0, _i18n.formatLabel)(labels.replyFrom, {
46
+ name: notification.senderName
47
+ }) : labels.newReply;
48
+ const accessibilityLabel = [preview, sender].filter(Boolean).join(', ');
49
+
50
+ // Mounted once per reply (the provider keys it by message id), so this runs
51
+ // for every new card: slide it in and tell screen-reader users it arrived.
52
+ (0, _react.useEffect)(() => {
53
+ if (animate) {
54
+ _reactNative.Animated.spring(entry, {
55
+ toValue: 1,
56
+ useNativeDriver: true,
57
+ speed: 16,
58
+ bounciness: 4
59
+ }).start();
60
+ }
61
+ _reactNative.AccessibilityInfo.announceForAccessibility(accessibilityLabel);
62
+ // eslint-disable-next-line react-hooks/exhaustive-deps
63
+ }, []);
64
+ const panResponder = (0, _react.useMemo)(() => {
65
+ const settle = () => _reactNative.Animated.spring(dragX, {
66
+ toValue: 0,
67
+ useNativeDriver: true,
68
+ bounciness: 6
69
+ }).start();
70
+ return _reactNative.PanResponder.create({
71
+ // Capture so a horizontal drag wins over the Pressable underneath; taps
72
+ // and vertical movement still reach it.
73
+ onMoveShouldSetPanResponderCapture: (_, gesture) => Math.abs(gesture.dx) > 8 && Math.abs(gesture.dx) > Math.abs(gesture.dy) * 1.5,
74
+ onPanResponderMove: (_, gesture) => dragX.setValue(gesture.dx),
75
+ onPanResponderTerminationRequest: () => false,
76
+ onPanResponderRelease: (_, gesture) => {
77
+ const farEnough = Math.abs(gesture.dx) > width * DISMISS_DISTANCE_RATIO;
78
+ const fastEnough = Math.abs(gesture.vx) > DISMISS_VELOCITY;
79
+ if (!farEnough && !fastEnough) {
80
+ settle();
81
+ return;
82
+ }
83
+ const direction = (gesture.dx || gesture.vx) < 0 ? -1 : 1;
84
+ _reactNative.Animated.timing(dragX, {
85
+ toValue: direction * width,
86
+ duration: animate ? 180 : 0,
87
+ useNativeDriver: true
88
+ }).start(() => onDismiss());
89
+ },
90
+ onPanResponderTerminate: settle
91
+ });
92
+ }, [animate, dragX, onDismiss, width]);
93
+ const handleAccessibilityAction = event => {
94
+ if (event.nativeEvent.actionName === 'dismiss') onDismiss();
95
+ if (event.nativeEvent.actionName === 'activate') onOpen(notification.conversationId);
96
+ };
97
+ const opacity = _reactNative.Animated.multiply(entry, dragX.interpolate({
98
+ inputRange: [-width, 0, width],
99
+ outputRange: [0, 1, 0],
100
+ extrapolate: 'clamp'
101
+ }));
102
+ const translateY = entry.interpolate({
103
+ inputRange: [0, 1],
104
+ outputRange: [_theme.spacing.lg, 0]
105
+ });
106
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
107
+ pointerEvents: "box-none",
108
+ style: [styles.wrapper, {
109
+ bottom: bottomInset + _theme.spacing.md
110
+ }],
111
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Animated.View, {
112
+ ...panResponder.panHandlers,
113
+ style: [styles.card, {
114
+ opacity,
115
+ transform: [{
116
+ translateX: dragX
117
+ }, {
118
+ translateY
119
+ }]
120
+ }],
121
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
122
+ onPress: () => onOpen(notification.conversationId),
123
+ accessibilityRole: "button",
124
+ accessibilityLabel: accessibilityLabel,
125
+ accessibilityHint: labels.openHint,
126
+ accessibilityActions: [{
127
+ name: 'activate'
128
+ }, {
129
+ name: 'dismiss',
130
+ label: labels.dismiss
131
+ }],
132
+ onAccessibilityAction: handleAccessibilityAction,
133
+ style: ({
134
+ pressed
135
+ }) => [styles.row, pressed && styles.pressed],
136
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Avatar.Avatar, {
137
+ avatar: notification.senderAvatar,
138
+ name: notification.senderName,
139
+ color: color,
140
+ size: 40,
141
+ style: styles.avatar
142
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
143
+ style: styles.text,
144
+ children: [preview ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
145
+ numberOfLines: 2,
146
+ style: styles.preview,
147
+ children: preview
148
+ }) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
149
+ numberOfLines: 1,
150
+ style: styles.sender,
151
+ children: sender
152
+ })]
153
+ })]
154
+ })
155
+ })
156
+ });
157
+ }
158
+ const styles = _reactNative.StyleSheet.create({
159
+ wrapper: {
160
+ position: 'absolute',
161
+ left: 0,
162
+ right: 0,
163
+ paddingHorizontal: _theme.spacing.lg,
164
+ alignItems: 'center',
165
+ // Above the host's navigator even when the provider is mounted before it.
166
+ zIndex: 1000,
167
+ elevation: 1000
168
+ },
169
+ card: {
170
+ width: '100%',
171
+ maxWidth: 480,
172
+ borderRadius: _theme.radius.xl,
173
+ backgroundColor: _theme.palette.text,
174
+ ..._theme.shadows.floating
175
+ },
176
+ row: {
177
+ flexDirection: 'row',
178
+ alignItems: 'center',
179
+ gap: _theme.spacing.md,
180
+ minHeight: 64,
181
+ paddingVertical: _theme.spacing.md,
182
+ paddingHorizontal: _theme.spacing.lg,
183
+ borderRadius: _theme.radius.xl
184
+ },
185
+ pressed: {
186
+ opacity: 0.85
187
+ },
188
+ avatar: {
189
+ borderWidth: 1,
190
+ borderColor: (0, _theme.withAlpha)(_theme.palette.white, 0.1)
191
+ },
192
+ text: {
193
+ flex: 1,
194
+ minWidth: 0,
195
+ gap: 2
196
+ },
197
+ preview: {
198
+ color: _theme.palette.white,
199
+ fontSize: _theme.fontSize.body,
200
+ fontWeight: '600',
201
+ lineHeight: 20,
202
+ textAlign: _rtl.START_ALIGN
203
+ },
204
+ sender: {
205
+ color: (0, _theme.withAlpha)(_theme.palette.white, 0.64),
206
+ fontSize: _theme.fontSize.meta,
207
+ textAlign: _rtl.START_ALIGN
208
+ }
209
+ });
210
+ //# sourceMappingURL=InAppNotification.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNative","_i18n","_useReduceMotion","_theme","_rtl","_Avatar","_jsxRuntime","DISMISS_DISTANCE_RATIO","DISMISS_VELOCITY","InAppNotification","notification","color","bottomInset","labels","onOpen","onDismiss","width","useWindowDimensions","reduceMotion","useReduceMotion","animate","entry","useRef","Animated","Value","current","dragX","preview","hasAttachments","attachment","sender","senderName","formatLabel","replyFrom","name","newReply","accessibilityLabel","filter","Boolean","join","useEffect","spring","toValue","useNativeDriver","speed","bounciness","start","AccessibilityInfo","announceForAccessibility","panResponder","useMemo","settle","PanResponder","create","onMoveShouldSetPanResponderCapture","_","gesture","Math","abs","dx","dy","onPanResponderMove","setValue","onPanResponderTerminationRequest","onPanResponderRelease","farEnough","fastEnough","vx","direction","timing","duration","onPanResponderTerminate","handleAccessibilityAction","event","nativeEvent","actionName","conversationId","opacity","multiply","interpolate","inputRange","outputRange","extrapolate","translateY","spacing","lg","jsx","View","pointerEvents","style","styles","wrapper","bottom","md","children","panHandlers","card","transform","translateX","jsxs","Pressable","onPress","accessibilityRole","accessibilityHint","openHint","accessibilityActions","label","dismiss","onAccessibilityAction","pressed","row","Avatar","avatar","senderAvatar","size","text","Text","numberOfLines","StyleSheet","position","left","right","paddingHorizontal","alignItems","zIndex","elevation","maxWidth","borderRadius","radius","xl","backgroundColor","palette","shadows","floating","flexDirection","gap","minHeight","paddingVertical","borderWidth","borderColor","withAlpha","white","flex","minWidth","fontSize","body","fontWeight","lineHeight","textAlign","START_ALIGN","meta"],"sourceRoot":"../../../../src","sources":["ui/components/InAppNotification.tsx"],"mappings":";;;;;;AAUA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAYA,IAAAE,KAAA,GAAAF,OAAA;AAEA,IAAAG,gBAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,IAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAAkC,IAAAO,WAAA,GAAAP,OAAA;AA5BlC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAsBA,0EACA,MAAMQ,sBAAsB,GAAG,IAAI;AACnC;AACA,MAAMC,gBAAgB,GAAG,GAAG;AAkBrB,SAASC,iBAAiBA,CAAC;EAChCC,YAAY;EACZC,KAAK;EACLC,WAAW;EACXC,MA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