@appilots/sdk 0.3.0 → 0.4.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/dist/{chunk-BKFO4DHW.mjs → chunk-42WI3UDB.mjs} +322 -1479
- package/dist/{chunk-N2I3CA7Q.js → chunk-CHY5D2PV.js} +5 -5
- package/dist/{chunk-DUSYQXAQ.mjs → chunk-GEKCGVJN.mjs} +1 -1
- package/dist/{chunk-QMSMXTED.mjs → chunk-JBOLV5AM.mjs} +1435 -51
- package/dist/{chunk-MCY5YFYD.js → chunk-V3TUIIT2.js} +1442 -57
- package/dist/{chunk-XNKPS7W3.js → chunk-Y7EA6R2G.js} +394 -1551
- package/dist/hooks/index.d.mts +1 -2
- package/dist/hooks/index.d.ts +1 -2
- package/dist/hooks/index.js +11 -11
- package/dist/hooks/index.mjs +2 -2
- package/dist/index-Cb0D6uKH.d.mts +1543 -0
- package/dist/index-Cb0D6uKH.d.ts +1543 -0
- package/dist/index.d.mts +5 -282
- package/dist/index.d.ts +5 -282
- package/dist/index.js +65 -65
- package/dist/index.mjs +5 -5
- package/dist/navigation/index.js +13 -13
- package/dist/navigation/index.mjs +2 -2
- package/hooks/package.json +9 -0
- package/metro.d.ts +49 -0
- package/metro.js +0 -37
- package/navigation/package.json +9 -0
- package/package.json +31 -12
- package/dist/index-BYVRBzjJ.d.mts +0 -619
- package/dist/index-BYVRBzjJ.d.ts +0 -619
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var chunkV3TUIIT2_js = require('./chunk-V3TUIIT2.js');
|
|
4
4
|
var React = require('react');
|
|
5
5
|
|
|
6
6
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -15,11 +15,11 @@ function getActiveRouteName(state) {
|
|
|
15
15
|
return route.name;
|
|
16
16
|
}
|
|
17
17
|
function AppilotsNavigationContainer({ children }) {
|
|
18
|
-
const { emit } =
|
|
18
|
+
const { emit } = chunkV3TUIIT2_js.useAppilotsContext();
|
|
19
19
|
const internalRef = React.useRef(null);
|
|
20
20
|
const handleRef = React.useCallback((instance) => {
|
|
21
21
|
internalRef.current = instance;
|
|
22
|
-
|
|
22
|
+
chunkV3TUIIT2_js.setNavigationRef(instance);
|
|
23
23
|
const childRef = children.ref;
|
|
24
24
|
if (typeof childRef === "function") childRef(instance);
|
|
25
25
|
else if (childRef && typeof childRef === "object") childRef.current = instance;
|
|
@@ -32,7 +32,7 @@ function AppilotsNavigationContainer({ children }) {
|
|
|
32
32
|
const routeName = getActiveRouteName(state);
|
|
33
33
|
if (routeName) {
|
|
34
34
|
console.log(`[Appilots] Screen changed \u2192 "${routeName}"`);
|
|
35
|
-
|
|
35
|
+
chunkV3TUIIT2_js.setCurrentScreen(routeName);
|
|
36
36
|
emit({
|
|
37
37
|
type: "navigation:change",
|
|
38
38
|
timestamp: Date.now(),
|
|
@@ -48,7 +48,7 @@ function AppilotsNavigationContainer({ children }) {
|
|
|
48
48
|
const route = internalRef.current?.getCurrentRoute?.();
|
|
49
49
|
if (route?.name) {
|
|
50
50
|
console.log(`[Appilots] Initial screen \u2192 "${route.name}"`);
|
|
51
|
-
|
|
51
|
+
chunkV3TUIIT2_js.setCurrentScreen(route.name);
|
|
52
52
|
emit({
|
|
53
53
|
type: "navigation:change",
|
|
54
54
|
timestamp: Date.now(),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useAppilotsContext, setNavigationRef, setCurrentScreen } from './chunk-
|
|
1
|
+
import { useAppilotsContext, setNavigationRef, setCurrentScreen } from './chunk-JBOLV5AM.mjs';
|
|
2
2
|
import React, { useRef, useCallback, useEffect } from 'react';
|
|
3
3
|
|
|
4
4
|
function getActiveRouteName(state) {
|