@blario/react-native 0.1.1 → 0.1.3
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/src/chat/widget-shell.ts
CHANGED
|
@@ -23,7 +23,7 @@ export interface WidgetShellOptions {
|
|
|
23
23
|
identity: ShellIdentity | null;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
const MESSAGE_CREATE_PATH = '/api/ai/contact-sessions
|
|
26
|
+
const MESSAGE_CREATE_PATH = '/api/ai/contact-sessions/\\d+/widget/messages/create/';
|
|
27
27
|
|
|
28
28
|
function safeJson(value: unknown): string {
|
|
29
29
|
return JSON.stringify(value).replace(/</g, '\\u003c').replace(/\u2028/g, '\\u2028').replace(/\u2029/g, '\\u2029');
|
package/src/snapshot/modals.ts
CHANGED
|
@@ -2,6 +2,10 @@ import { childrenOf, propsOf } from '../fiber/reader.ts';
|
|
|
2
2
|
import type { Fiber } from '../fiber/types.ts';
|
|
3
3
|
import { AGENT_OVERLAY_TEST_ID, isOpenModal } from './collect.ts';
|
|
4
4
|
|
|
5
|
+
// react-native-screens renders an iOS screen presented as a modal or sheet as RNSModalScreen: a UIKit presentation
|
|
6
|
+
// too, which covers the agent layer.
|
|
7
|
+
const PRESENTED_SCREEN = 'RNSModalScreen';
|
|
8
|
+
|
|
5
9
|
export function countOpenModals(fiber: Fiber): number {
|
|
6
10
|
const pending = [fiber];
|
|
7
11
|
let count = 0;
|
|
@@ -10,7 +14,7 @@ export function countOpenModals(fiber: Fiber): number {
|
|
|
10
14
|
if (current === undefined || propsOf(current).testID === AGENT_OVERLAY_TEST_ID) {
|
|
11
15
|
continue;
|
|
12
16
|
}
|
|
13
|
-
if (isOpenModal(current)) {
|
|
17
|
+
if (isOpenModal(current) || current.type === PRESENTED_SCREEN) {
|
|
14
18
|
count += 1;
|
|
15
19
|
}
|
|
16
20
|
for (const child of childrenOf(current)) {
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = '0.1.
|
|
1
|
+
export const SDK_VERSION = '0.1.3';
|