@appilots/sdk 0.8.0 → 0.10.0

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/README.md CHANGED
@@ -15,7 +15,8 @@ pnpm add @appilots/sdk
15
15
  ## Quick Start
16
16
 
17
17
  ```tsx
18
- import { AppilotsProvider, AppilotsChat } from '@appilots/sdk';
18
+ import { AppilotsProvider, AppilotsNavigationContainer, AppilotsChat } from '@appilots/sdk';
19
+ import { NavigationContainer } from '@react-navigation/native';
19
20
 
20
21
  function App() {
21
22
  return (
@@ -24,9 +25,9 @@ function App() {
24
25
  projectId: 'your-project-id',
25
26
  }}
26
27
  >
27
- <NavigationContainer>
28
- {/* Your app screens */}
29
- </NavigationContainer>
28
+ <AppilotsNavigationContainer>
29
+ <NavigationContainer>{/* Your app screens */}</NavigationContainer>
30
+ </AppilotsNavigationContainer>
30
31
  <AppilotsChat />
31
32
  </AppilotsProvider>
32
33
  );
@@ -0,0 +1,5 @@
1
+ {
2
+ "sourceHash": "cb3f70407bf9512b",
3
+ "gitSha": "00511f555d4bc51c481138de6dc3ad90ce2e60e3",
4
+ "builtAt": "2026-08-24T18:34:11.310Z"
5
+ }
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkAYWMBMSN_js = require('./chunk-AYWMBMSN.js');
3
+ var chunkYB77RYCC_js = require('./chunk-YB77RYCC.js');
4
4
  var React = require('react');
5
5
 
6
6
  function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
@@ -15,24 +15,27 @@ function getActiveRouteName(state) {
15
15
  return route.name;
16
16
  }
17
17
  function AppilotsNavigationContainer({ children }) {
18
- const { emit } = chunkAYWMBMSN_js.useAppilotsContext();
18
+ const { emit } = chunkYB77RYCC_js.useAppilotsContext();
19
19
  const internalRef = React.useRef(null);
20
- const handleRef = React.useCallback((instance) => {
21
- internalRef.current = instance;
22
- chunkAYWMBMSN_js.setNavigationRef(instance);
23
- const childRef = children.ref;
24
- if (typeof childRef === "function") childRef(instance);
25
- else if (childRef && typeof childRef === "object") childRef.current = instance;
26
- if (instance) {
27
- console.log("[Appilots] NavigationContainer ref captured");
28
- }
29
- }, [children]);
20
+ const handleRef = React.useCallback(
21
+ (instance) => {
22
+ internalRef.current = instance;
23
+ chunkYB77RYCC_js.setNavigationRef(instance);
24
+ const childRef = children.ref;
25
+ if (typeof childRef === "function") childRef(instance);
26
+ else if (childRef && typeof childRef === "object") childRef.current = instance;
27
+ if (instance) {
28
+ chunkYB77RYCC_js.appilotsDebugLog("NavigationContainer ref captured");
29
+ }
30
+ },
31
+ [children]
32
+ );
30
33
  const handleStateChange = React.useCallback(
31
34
  (state) => {
32
35
  const routeName = getActiveRouteName(state);
33
36
  if (routeName) {
34
- console.log(`[Appilots] Screen changed \u2192 "${routeName}"`);
35
- chunkAYWMBMSN_js.setCurrentScreen(routeName);
37
+ chunkYB77RYCC_js.appilotsDebugLog(`Screen changed \u2192 "${routeName}"`);
38
+ chunkYB77RYCC_js.setCurrentScreen(routeName);
36
39
  emit({
37
40
  type: "navigation:change",
38
41
  timestamp: Date.now(),
@@ -47,8 +50,8 @@ function AppilotsNavigationContainer({ children }) {
47
50
  const timer = setTimeout(() => {
48
51
  const route = internalRef.current?.getCurrentRoute?.();
49
52
  if (route?.name) {
50
- console.log(`[Appilots] Initial screen \u2192 "${route.name}"`);
51
- chunkAYWMBMSN_js.setCurrentScreen(route.name);
53
+ chunkYB77RYCC_js.appilotsDebugLog(`Initial screen \u2192 "${route.name}"`);
54
+ chunkYB77RYCC_js.setCurrentScreen(route.name);
52
55
  emit({
53
56
  type: "navigation:change",
54
57
  timestamp: Date.now(),