@buoy-gg/route-events 1.7.7 → 1.7.8
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/lib/commonjs/components/NavigationStack.js +9 -22
- package/lib/commonjs/components/RouteEventsModalWithTabs.js +9 -22
- package/lib/commonjs/components/RoutesSitemap.js +9 -22
- package/lib/module/components/NavigationStack.js +9 -22
- package/lib/module/components/RouteEventsModalWithTabs.js +8 -21
- package/lib/module/components/RoutesSitemap.js +9 -22
- package/lib/typescript/components/NavigationStack.d.ts.map +1 -1
- package/lib/typescript/components/RouteEventsModalWithTabs.d.ts.map +1 -1
- package/lib/typescript/components/RoutesSitemap.d.ts.map +1 -1
- package/package.json +11 -4
|
@@ -7,6 +7,7 @@ exports.NavigationStack = NavigationStack;
|
|
|
7
7
|
var _react = require("react");
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
10
|
+
var _license = require("@buoy-gg/license");
|
|
10
11
|
var _dataViewer = require("@buoy-gg/shared-ui/dataViewer");
|
|
11
12
|
var _useNavigationStack = require("../useNavigationStack");
|
|
12
13
|
var _expoRouter = require("expo-router");
|
|
@@ -18,26 +19,6 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
18
19
|
* and provides controls to manipulate the stack.
|
|
19
20
|
*/
|
|
20
21
|
|
|
21
|
-
// Lazy load the license hooks to avoid circular dependencies
|
|
22
|
-
let _useIsPro = null;
|
|
23
|
-
let _licenseLoadAttempted = false;
|
|
24
|
-
function loadLicenseModule() {
|
|
25
|
-
if (_licenseLoadAttempted) return;
|
|
26
|
-
_licenseLoadAttempted = true;
|
|
27
|
-
try {
|
|
28
|
-
const mod = require("@buoy-gg/license");
|
|
29
|
-
if (mod) {
|
|
30
|
-
_useIsPro = mod.useIsPro ?? null;
|
|
31
|
-
}
|
|
32
|
-
} catch {
|
|
33
|
-
// License package not available
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
function getUseIsPro() {
|
|
37
|
-
loadLicenseModule();
|
|
38
|
-
return _useIsPro ?? (() => false);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
22
|
// ============================================================================
|
|
42
23
|
// Types
|
|
43
24
|
// ============================================================================
|
|
@@ -66,8 +47,14 @@ function NavigationStack({
|
|
|
66
47
|
const [showUpgradeModal, setShowUpgradeModal] = (0, _react.useState)(false);
|
|
67
48
|
|
|
68
49
|
// Check Pro status internally
|
|
69
|
-
const
|
|
70
|
-
|
|
50
|
+
const isPro = (0, _license.useIsPro)();
|
|
51
|
+
|
|
52
|
+
// Auto-close upgrade modal when user becomes Pro
|
|
53
|
+
(0, _react.useEffect)(() => {
|
|
54
|
+
if (showUpgradeModal && isPro) {
|
|
55
|
+
setShowUpgradeModal(false);
|
|
56
|
+
}
|
|
57
|
+
}, [showUpgradeModal, isPro]);
|
|
71
58
|
|
|
72
59
|
// ✅ All hooks must be called BEFORE any conditional returns
|
|
73
60
|
// Prepare stack data for copying
|
|
@@ -8,32 +8,13 @@ var _react = require("react");
|
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _expoRouter = require("expo-router");
|
|
10
10
|
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
11
|
+
var _license = require("@buoy-gg/license");
|
|
11
12
|
var _RouteObserver = require("../RouteObserver");
|
|
12
13
|
var _RouteFilterViewV = require("./RouteFilterViewV2");
|
|
13
14
|
var _RoutesSitemap = require("./RoutesSitemap");
|
|
14
15
|
var _NavigationStack = require("./NavigationStack");
|
|
15
16
|
var _RouteEventsTimeline = require("./RouteEventsTimeline");
|
|
16
17
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
// Lazy load the license hooks to avoid circular dependencies
|
|
18
|
-
let _useIsPro = null;
|
|
19
|
-
let _licenseLoadAttempted = false;
|
|
20
|
-
function loadLicenseModule() {
|
|
21
|
-
if (_licenseLoadAttempted) return;
|
|
22
|
-
_licenseLoadAttempted = true;
|
|
23
|
-
try {
|
|
24
|
-
const mod = require("@buoy-gg/license");
|
|
25
|
-
if (mod) {
|
|
26
|
-
_useIsPro = mod.useIsPro ?? null;
|
|
27
|
-
}
|
|
28
|
-
} catch {
|
|
29
|
-
// License package not available
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
function getUseIsPro() {
|
|
33
|
-
loadLicenseModule();
|
|
34
|
-
return _useIsPro ?? (() => false);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
18
|
// Free tier limit for route events
|
|
38
19
|
const FREE_TIER_EVENT_LIMIT = 3;
|
|
39
20
|
function RouteEventsModalWithTabs({
|
|
@@ -49,8 +30,14 @@ function RouteEventsModalWithTabs({
|
|
|
49
30
|
const [showUpgradeModal, setShowUpgradeModal] = (0, _react.useState)(false);
|
|
50
31
|
|
|
51
32
|
// Check Pro status internally
|
|
52
|
-
const
|
|
53
|
-
|
|
33
|
+
const isPro = (0, _license.useIsPro)();
|
|
34
|
+
|
|
35
|
+
// Auto-close upgrade modal when user becomes Pro
|
|
36
|
+
(0, _react.useEffect)(() => {
|
|
37
|
+
if (showUpgradeModal && isPro) {
|
|
38
|
+
setShowUpgradeModal(false);
|
|
39
|
+
}
|
|
40
|
+
}, [showUpgradeModal, isPro]);
|
|
54
41
|
|
|
55
42
|
// NOTE: Route tracking requires <RouteTracker /> to be placed inside the navigation tree.
|
|
56
43
|
// The useRouteObserver hook uses expo-router hooks that only work inside Stack/Tabs/Slot.
|
|
@@ -8,6 +8,7 @@ var _react = require("react");
|
|
|
8
8
|
var _reactNative = require("react-native");
|
|
9
9
|
var _expoRouter = require("expo-router");
|
|
10
10
|
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
11
|
+
var _license = require("@buoy-gg/license");
|
|
11
12
|
var _useRouteSitemap = require("../useRouteSitemap");
|
|
12
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
14
|
/**
|
|
@@ -21,26 +22,6 @@ var _jsxRuntime = require("react/jsx-runtime");
|
|
|
21
22
|
* - Navigation
|
|
22
23
|
*/
|
|
23
24
|
|
|
24
|
-
// Lazy load the license hooks to avoid circular dependencies
|
|
25
|
-
let _useIsPro = null;
|
|
26
|
-
let _licenseLoadAttempted = false;
|
|
27
|
-
function loadLicenseModule() {
|
|
28
|
-
if (_licenseLoadAttempted) return;
|
|
29
|
-
_licenseLoadAttempted = true;
|
|
30
|
-
try {
|
|
31
|
-
const mod = require("@buoy-gg/license");
|
|
32
|
-
if (mod) {
|
|
33
|
-
_useIsPro = mod.useIsPro ?? null;
|
|
34
|
-
}
|
|
35
|
-
} catch {
|
|
36
|
-
// License package not available
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
function getUseIsPro() {
|
|
40
|
-
loadLicenseModule();
|
|
41
|
-
return _useIsPro ?? (() => false);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
25
|
// ============================================================================
|
|
45
26
|
// Types
|
|
46
27
|
// ============================================================================
|
|
@@ -59,8 +40,14 @@ function RoutesSitemap({
|
|
|
59
40
|
const [showUpgradeModal, setShowUpgradeModal] = (0, _react.useState)(false);
|
|
60
41
|
|
|
61
42
|
// Check Pro status internally
|
|
62
|
-
const
|
|
63
|
-
|
|
43
|
+
const isPro = (0, _license.useIsPro)();
|
|
44
|
+
|
|
45
|
+
// Auto-close upgrade modal when user becomes Pro
|
|
46
|
+
(0, _react.useEffect)(() => {
|
|
47
|
+
if (showUpgradeModal && isPro) {
|
|
48
|
+
setShowUpgradeModal(false);
|
|
49
|
+
}
|
|
50
|
+
}, [showUpgradeModal, isPro]);
|
|
64
51
|
const router = (0, _expoRouter.useRouter)();
|
|
65
52
|
const {
|
|
66
53
|
groups,
|
|
@@ -7,29 +7,10 @@
|
|
|
7
7
|
* and provides controls to manipulate the stack.
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
import { useState, useMemo } from "react";
|
|
10
|
+
import { useState, useMemo, useEffect } from "react";
|
|
11
11
|
import { View, Text, ScrollView, TouchableOpacity, StyleSheet, Alert } from "react-native";
|
|
12
12
|
import { ChevronDown, ChevronRight, Info, InlineCopyButton, ProUpgradeModal, buoyColors } from "@buoy-gg/shared-ui";
|
|
13
|
-
|
|
14
|
-
// Lazy load the license hooks to avoid circular dependencies
|
|
15
|
-
let _useIsPro = null;
|
|
16
|
-
let _licenseLoadAttempted = false;
|
|
17
|
-
function loadLicenseModule() {
|
|
18
|
-
if (_licenseLoadAttempted) return;
|
|
19
|
-
_licenseLoadAttempted = true;
|
|
20
|
-
try {
|
|
21
|
-
const mod = require("@buoy-gg/license");
|
|
22
|
-
if (mod) {
|
|
23
|
-
_useIsPro = mod.useIsPro ?? null;
|
|
24
|
-
}
|
|
25
|
-
} catch {
|
|
26
|
-
// License package not available
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
function getUseIsPro() {
|
|
30
|
-
loadLicenseModule();
|
|
31
|
-
return _useIsPro ?? (() => false);
|
|
32
|
-
}
|
|
13
|
+
import { useIsPro } from "@buoy-gg/license";
|
|
33
14
|
import { DataViewer } from "@buoy-gg/shared-ui/dataViewer";
|
|
34
15
|
import { useNavigationStack } from "../useNavigationStack";
|
|
35
16
|
import { useRouter } from "expo-router";
|
|
@@ -62,9 +43,15 @@ export function NavigationStack({
|
|
|
62
43
|
const [showUpgradeModal, setShowUpgradeModal] = useState(false);
|
|
63
44
|
|
|
64
45
|
// Check Pro status internally
|
|
65
|
-
const useIsPro = getUseIsPro();
|
|
66
46
|
const isPro = useIsPro();
|
|
67
47
|
|
|
48
|
+
// Auto-close upgrade modal when user becomes Pro
|
|
49
|
+
useEffect(() => {
|
|
50
|
+
if (showUpgradeModal && isPro) {
|
|
51
|
+
setShowUpgradeModal(false);
|
|
52
|
+
}
|
|
53
|
+
}, [showUpgradeModal, isPro]);
|
|
54
|
+
|
|
68
55
|
// ✅ All hooks must be called BEFORE any conditional returns
|
|
69
56
|
// Prepare stack data for copying
|
|
70
57
|
const stackDataForCopy = useMemo(() => {
|
|
@@ -4,26 +4,7 @@ import { useState, useCallback, useEffect, useRef, useMemo } from "react";
|
|
|
4
4
|
import { Text, View, TouchableOpacity, StyleSheet, Alert } from "react-native";
|
|
5
5
|
import { useRouter } from "expo-router";
|
|
6
6
|
import { JsModal, ModalHeader, TabSelector, formatRelativeTime, devToolsStorageKeys, Navigation, Pause, Play, Trash2, Filter, SearchBar, safeGetItem, safeSetItem, ToolbarCopyButton, Lock, ProUpgradeModal, buoyColors } from "@buoy-gg/shared-ui";
|
|
7
|
-
|
|
8
|
-
// Lazy load the license hooks to avoid circular dependencies
|
|
9
|
-
let _useIsPro = null;
|
|
10
|
-
let _licenseLoadAttempted = false;
|
|
11
|
-
function loadLicenseModule() {
|
|
12
|
-
if (_licenseLoadAttempted) return;
|
|
13
|
-
_licenseLoadAttempted = true;
|
|
14
|
-
try {
|
|
15
|
-
const mod = require("@buoy-gg/license");
|
|
16
|
-
if (mod) {
|
|
17
|
-
_useIsPro = mod.useIsPro ?? null;
|
|
18
|
-
}
|
|
19
|
-
} catch {
|
|
20
|
-
// License package not available
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
function getUseIsPro() {
|
|
24
|
-
loadLicenseModule();
|
|
25
|
-
return _useIsPro ?? (() => false);
|
|
26
|
-
}
|
|
7
|
+
import { useIsPro } from "@buoy-gg/license";
|
|
27
8
|
|
|
28
9
|
// Free tier limit for route events
|
|
29
10
|
const FREE_TIER_EVENT_LIMIT = 3;
|
|
@@ -46,9 +27,15 @@ export function RouteEventsModalWithTabs({
|
|
|
46
27
|
const [showUpgradeModal, setShowUpgradeModal] = useState(false);
|
|
47
28
|
|
|
48
29
|
// Check Pro status internally
|
|
49
|
-
const useIsPro = getUseIsPro();
|
|
50
30
|
const isPro = useIsPro();
|
|
51
31
|
|
|
32
|
+
// Auto-close upgrade modal when user becomes Pro
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
if (showUpgradeModal && isPro) {
|
|
35
|
+
setShowUpgradeModal(false);
|
|
36
|
+
}
|
|
37
|
+
}, [showUpgradeModal, isPro]);
|
|
38
|
+
|
|
52
39
|
// NOTE: Route tracking requires <RouteTracker /> to be placed inside the navigation tree.
|
|
53
40
|
// The useRouteObserver hook uses expo-router hooks that only work inside Stack/Tabs/Slot.
|
|
54
41
|
// See the RouteTracker component export for easy setup.
|
|
@@ -11,30 +11,11 @@
|
|
|
11
11
|
* - Navigation
|
|
12
12
|
*/
|
|
13
13
|
|
|
14
|
-
import { useState, useCallback, useMemo } from "react";
|
|
14
|
+
import { useState, useCallback, useMemo, useEffect } from "react";
|
|
15
15
|
import { View, Text, TextInput, TouchableOpacity, ScrollView, StyleSheet, Alert } from "react-native";
|
|
16
16
|
import { useRouter } from "expo-router";
|
|
17
17
|
import { Search, ChevronDown, ChevronRight, InlineCopyButton, ToolbarCopyButton, RefreshCw, formatRelativeTime, ProUpgradeModal, buoyColors } from "@buoy-gg/shared-ui";
|
|
18
|
-
|
|
19
|
-
// Lazy load the license hooks to avoid circular dependencies
|
|
20
|
-
let _useIsPro = null;
|
|
21
|
-
let _licenseLoadAttempted = false;
|
|
22
|
-
function loadLicenseModule() {
|
|
23
|
-
if (_licenseLoadAttempted) return;
|
|
24
|
-
_licenseLoadAttempted = true;
|
|
25
|
-
try {
|
|
26
|
-
const mod = require("@buoy-gg/license");
|
|
27
|
-
if (mod) {
|
|
28
|
-
_useIsPro = mod.useIsPro ?? null;
|
|
29
|
-
}
|
|
30
|
-
} catch {
|
|
31
|
-
// License package not available
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
function getUseIsPro() {
|
|
35
|
-
loadLicenseModule();
|
|
36
|
-
return _useIsPro ?? (() => false);
|
|
37
|
-
}
|
|
18
|
+
import { useIsPro } from "@buoy-gg/license";
|
|
38
19
|
import { useRouteSitemap } from "../useRouteSitemap";
|
|
39
20
|
|
|
40
21
|
// ============================================================================
|
|
@@ -55,8 +36,14 @@ export function RoutesSitemap({
|
|
|
55
36
|
const [showUpgradeModal, setShowUpgradeModal] = useState(false);
|
|
56
37
|
|
|
57
38
|
// Check Pro status internally
|
|
58
|
-
const useIsPro = getUseIsPro();
|
|
59
39
|
const isPro = useIsPro();
|
|
40
|
+
|
|
41
|
+
// Auto-close upgrade modal when user becomes Pro
|
|
42
|
+
useEffect(() => {
|
|
43
|
+
if (showUpgradeModal && isPro) {
|
|
44
|
+
setShowUpgradeModal(false);
|
|
45
|
+
}
|
|
46
|
+
}, [showUpgradeModal, isPro]);
|
|
60
47
|
const router = useRouter();
|
|
61
48
|
const {
|
|
62
49
|
groups,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationStack.d.ts","sourceRoot":"","sources":["../../../src/components/NavigationStack.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;
|
|
1
|
+
{"version":3,"file":"NavigationStack.d.ts","sourceRoot":"","sources":["../../../src/components/NavigationStack.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AA6BH,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,EAAE,GAAG,CAAC;CACb;AAMD,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,EAAE,oBAAoB,+BAyZ9D"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RouteEventsModalWithTabs.d.ts","sourceRoot":"","sources":["../../../src/components/RouteEventsModalWithTabs.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RouteEventsModalWithTabs.d.ts","sourceRoot":"","sources":["../../../src/components/RouteEventsModalWithTabs.tsx"],"names":[],"mappings":"AAoCA,OAAO,EACL,aAAa,IAAI,oBAAoB,EAEtC,MAAM,kBAAkB,CAAC;AAU1B,MAAM,WAAW,6BAA6B;IAC5C,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,CAAC,UAAU,EAAE,GAAG,KAAK,IAAI,CAAC;IACvC,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,oBAAoB,CAAC;CAC7C;AAID,wBAAgB,wBAAwB,CAAC,EACvC,OAAO,EACP,OAAO,EACP,MAAM,EACN,UAAU,EACV,2BAAmC,EACnC,aAAoC,GACrC,EAAE,6BAA6B,sCA4hB/B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RoutesSitemap.d.ts","sourceRoot":"","sources":["../../../src/components/RoutesSitemap.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;
|
|
1
|
+
{"version":3,"file":"RoutesSitemap.d.ts","sourceRoot":"","sources":["../../../src/components/RoutesSitemap.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAgCH,MAAM,WAAW,kBAAkB;IACjC,KAAK,CAAC,EAAE,GAAG,CAAC;CACb;AAmBD,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,EAAE,kBAAkB,+BA2W1D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@buoy-gg/route-events",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.8",
|
|
4
4
|
"description": "route-events package",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -12,23 +12,30 @@
|
|
|
12
12
|
],
|
|
13
13
|
"sideEffects": false,
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@buoy-gg/floating-tools-core": "1.7.
|
|
16
|
-
"@buoy-gg/shared-ui": "1.7.
|
|
15
|
+
"@buoy-gg/floating-tools-core": "1.7.8",
|
|
16
|
+
"@buoy-gg/shared-ui": "1.7.8"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
|
+
"@buoy-gg/license": "*",
|
|
19
20
|
"@react-native-async-storage/async-storage": "*",
|
|
20
21
|
"@react-navigation/native": "*",
|
|
21
22
|
"expo-router": "*",
|
|
22
23
|
"react": "*",
|
|
23
24
|
"react-native": "*"
|
|
24
25
|
},
|
|
26
|
+
"peerDependenciesMeta": {
|
|
27
|
+
"@buoy-gg/license": {
|
|
28
|
+
"optional": true
|
|
29
|
+
}
|
|
30
|
+
},
|
|
25
31
|
"devDependencies": {
|
|
26
32
|
"@react-native-async-storage/async-storage": "^2.1.0",
|
|
27
33
|
"@react-navigation/native": "^7.1.18",
|
|
28
34
|
"@types/react": "^19.1.0",
|
|
29
35
|
"@types/react-native": "^0.73.0",
|
|
30
36
|
"expo-router": "~5.0.7",
|
|
31
|
-
"typescript": "~5.8.3"
|
|
37
|
+
"typescript": "~5.8.3",
|
|
38
|
+
"@buoy-gg/license": "1.7.8"
|
|
32
39
|
},
|
|
33
40
|
"react-native-builder-bob": {
|
|
34
41
|
"source": "src",
|