@buoy-gg/route-events 7.0.26 → 7.0.28

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 (39) hide show
  1. package/lib/commonjs/RouteParser.js +8 -4
  2. package/lib/commonjs/components/NavigationStack.js +19 -18
  3. package/lib/commonjs/components/ReactNavigationRoutes.js +108 -106
  4. package/lib/commonjs/components/RouteEventDetail.js +9 -6
  5. package/lib/commonjs/components/RouteEventExpandedContent.js +3 -3
  6. package/lib/commonjs/components/RouteEventItemCompact.js +5 -4
  7. package/lib/commonjs/components/RouteEventsModalWithTabs.js +48 -25
  8. package/lib/commonjs/components/RouteEventsTimeline.js +3 -3
  9. package/lib/commonjs/components/RoutesSitemap.js +129 -129
  10. package/lib/commonjs/sync/routeEventsSyncAdapter.js +9 -3
  11. package/lib/commonjs/useNavigationStack.js +4 -5
  12. package/lib/commonjs/useRouteObserverReactNavigation.js +1 -5
  13. package/lib/commonjs/utils/safeReactNavigation.js +62 -6
  14. package/lib/module/RouteParser.js +8 -4
  15. package/lib/module/components/NavigationStack.js +20 -19
  16. package/lib/module/components/ReactNavigationRoutes.js +111 -109
  17. package/lib/module/components/RouteEventDetail.js +10 -7
  18. package/lib/module/components/RouteEventExpandedContent.js +4 -4
  19. package/lib/module/components/RouteEventItemCompact.js +6 -5
  20. package/lib/module/components/RouteEventsModalWithTabs.js +51 -28
  21. package/lib/module/components/RouteEventsTimeline.js +4 -4
  22. package/lib/module/components/RoutesSitemap.js +131 -131
  23. package/lib/module/sync/routeEventsSyncAdapter.js +9 -3
  24. package/lib/module/useNavigationStack.js +6 -7
  25. package/lib/module/useRouteObserverReactNavigation.js +3 -7
  26. package/lib/module/utils/safeReactNavigation.js +62 -6
  27. package/lib/typescript/RouteParser.d.ts.map +1 -1
  28. package/lib/typescript/components/NavigationStack.d.ts.map +1 -1
  29. package/lib/typescript/components/ReactNavigationRoutes.d.ts.map +1 -1
  30. package/lib/typescript/components/RouteEventsModalWithTabs.d.ts +7 -0
  31. package/lib/typescript/components/RouteEventsModalWithTabs.d.ts.map +1 -1
  32. package/lib/typescript/components/RoutesSitemap.d.ts.map +1 -1
  33. package/lib/typescript/sync/routeEventsSyncAdapter.d.ts +1 -0
  34. package/lib/typescript/sync/routeEventsSyncAdapter.d.ts.map +1 -1
  35. package/lib/typescript/useNavigationStack.d.ts.map +1 -1
  36. package/lib/typescript/useRouteObserverReactNavigation.d.ts.map +1 -1
  37. package/lib/typescript/utils/safeReactNavigation.d.ts +6 -5
  38. package/lib/typescript/utils/safeReactNavigation.d.ts.map +1 -1
  39. package/package.json +5 -5
@@ -10,7 +10,7 @@
10
10
  */
11
11
 
12
12
  import { View, Text, StyleSheet } from "react-native";
13
- import { InlineCopyButton, buoyColors } from "@buoy-gg/shared-ui";
13
+ import { InlineCopyButton, night } from "@buoy-gg/shared-ui";
14
14
  import { DataViewer } from "@buoy-gg/shared-ui/dataViewer";
15
15
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
16
  // Format duration in milliseconds to human-readable string
@@ -152,14 +152,14 @@ const styles = StyleSheet.create({
152
152
  },
153
153
  detailLabel: {
154
154
  fontSize: 10,
155
- color: buoyColors.textSecondary,
155
+ color: night.color.textSecondary,
156
156
  fontFamily: "monospace",
157
157
  fontWeight: "600",
158
158
  minWidth: 70
159
159
  },
160
160
  detailValue: {
161
161
  fontSize: 11,
162
- color: buoyColors.text,
162
+ color: night.color.text,
163
163
  fontFamily: "monospace",
164
164
  flex: 1
165
165
  },
@@ -178,7 +178,7 @@ const styles = StyleSheet.create({
178
178
  },
179
179
  dataViewerTitle: {
180
180
  fontSize: 11,
181
- color: buoyColors.textSecondary,
181
+ color: night.color.textSecondary,
182
182
  fontFamily: "monospace",
183
183
  fontWeight: "600"
184
184
  }
@@ -8,7 +8,7 @@
8
8
 
9
9
  import { memo, useMemo } from "react";
10
10
  import { View, Text, TouchableOpacity, StyleSheet } from "react-native";
11
- import { CompactRow, RelativeTime, buoyColors } from "@buoy-gg/shared-ui";
11
+ import { CompactRow, RelativeTime, buoyColors, night } from "@buoy-gg/shared-ui";
12
12
  import { RouteEventExpandedContent } from "./RouteEventExpandedContent";
13
13
  import { getRouteTemplate } from "../utils/routeTemplate";
14
14
 
@@ -34,11 +34,11 @@ function getRouteTypeColor(routeType) {
34
34
  case "home":
35
35
  return buoyColors.success;
36
36
  case "dynamic":
37
- return buoyColors.primary;
37
+ return night.color.accent;
38
38
  case "with-params":
39
39
  return buoyColors.warning;
40
40
  default:
41
- return buoyColors.textSecondary;
41
+ return night.color.textSecondary;
42
42
  // More visible than border color
43
43
  }
44
44
  }
@@ -176,7 +176,7 @@ const styles = StyleSheet.create({
176
176
  fontFamily: "monospace"
177
177
  },
178
178
  goButton: {
179
- backgroundColor: buoyColors.primary,
179
+ backgroundColor: night.color.accent,
180
180
  paddingHorizontal: 8,
181
181
  paddingVertical: 4,
182
182
  borderRadius: 4
@@ -184,7 +184,8 @@ const styles = StyleSheet.create({
184
184
  goButtonText: {
185
185
  fontSize: 10,
186
186
  fontWeight: "600",
187
- color: "#FFFFFF",
187
+ // Ink on a filled accent surface — the night accent takes dark ink.
188
+ color: night.color.onAccent,
188
189
  fontFamily: "monospace"
189
190
  }
190
191
  });
@@ -1,16 +1,15 @@
1
1
  "use strict";
2
2
 
3
- import { useState, useCallback, useContext, useEffect, useRef, useMemo } from "react";
3
+ import { useState, useCallback, useEffect, useRef, useMemo } from "react";
4
4
  import { Text, View, TouchableOpacity, StyleSheet, Alert } from "react-native";
5
- import { getCommonActions, getNavigationContainerRefContext } from "../utils/safeReactNavigation";
5
+ import { getCommonActions, useSafeNavigationContainerRef } from "../utils/safeReactNavigation";
6
6
 
7
- // Resolved once at module load; null when @react-navigation/native is absent
8
- // (the fallback context then yields an undefined containerRef, so the
9
- // dispatch paths below never execute).
7
+ // Resolved once at module load; null when React Navigation is absent
8
+ // (useSafeNavigationContainerRef then yields undefined, so the dispatch
9
+ // paths below never execute).
10
10
  const CommonActions = getCommonActions();
11
- const NavigationContainerRefContext = getNavigationContainerRefContext();
12
11
  import { useSafeRouter, isExpoRouterAvailable } from "@buoy-gg/shared-ui";
13
- import { JsModal, ModalHeader, TabSelector, formatRelativeTime, devToolsStorageKeys, Navigation, Trash2, Filter, SearchBar, persistentStorage, ToolbarCopyButton, Lock, ProUpgradeModal, PowerToggleButton, buoyColors, TickProvider, useLimit } from "@buoy-gg/shared-ui";
12
+ import { JsModal, ModalHeader, TabSelector, formatRelativeTime, devToolsStorageKeys, Navigation, Trash2, Filter, SearchBar, persistentStorage, ToolbarCopyButton, Lock, ProUpgradeModal, PowerToggleButton, buoyColors, night, TickProvider, useLimit } from "@buoy-gg/shared-ui";
14
13
  import { useIsPro } from "@buoy-gg/license";
15
14
 
16
15
  // Free tier limit for route events
@@ -81,7 +80,7 @@ export function RouteEventsModalWithTabs({
81
80
  remote
82
81
  }) {
83
82
  const router = useSafeRouter();
84
- const containerRef = useContext(NavigationContainerRefContext);
83
+ const containerRef = useSafeNavigationContainerRef();
85
84
  const hasExpoRouter = isExpoRouterAvailable();
86
85
  const [activeTab, setActiveTab] = useState("events");
87
86
  const [showUpgradeModal, setShowUpgradeModal] = useState(false);
@@ -135,6 +134,19 @@ export function RouteEventsModalWithTabs({
135
134
  }, []);
136
135
  const handleNavigate = useCallback(pathname => {
137
136
  try {
137
+ // A remote host (Buoy Desktop) means the events belong to a synced
138
+ // device — this process has no router, so delegate over the socket.
139
+ // Same Pro gate as remote sitemap navigation: Home stays free so a
140
+ // free user can always get the device back to a known screen.
141
+ if (remote) {
142
+ if (!remote.onNavigatePath) return;
143
+ if (!isPro && pathname !== "/") {
144
+ setShowUpgradeModal(true);
145
+ return;
146
+ }
147
+ remote.onNavigatePath(pathname);
148
+ return;
149
+ }
138
150
  if (hasExpoRouter) {
139
151
  router.push(pathname);
140
152
  } else if (containerRef) {
@@ -158,11 +170,15 @@ export function RouteEventsModalWithTabs({
158
170
  containerRef.dispatch(CommonActions.navigate({
159
171
  name: screenName
160
172
  }));
173
+ } else {
174
+ // Neither Expo Router nor a navigation container — say so instead
175
+ // of swallowing the tap.
176
+ Alert.alert("Navigation Unavailable", "No Expo Router or React Navigation container was found in this app.");
161
177
  }
162
178
  } catch (error) {
163
179
  Alert.alert("Navigation Error", String(error));
164
180
  }
165
- }, [router, containerRef, hasExpoRouter]);
181
+ }, [router, containerRef, hasExpoRouter, remote, isPro]);
166
182
 
167
183
  // Load persisted tab state on mount
168
184
  useEffect(() => {
@@ -443,7 +459,7 @@ export function RouteEventsModalWithTabs({
443
459
  style: styles.emptyState,
444
460
  children: [/*#__PURE__*/_jsx(Navigation, {
445
461
  size: 48,
446
- color: buoyColors.textMuted
462
+ color: night.color.textTertiary
447
463
  }), /*#__PURE__*/_jsx(Text, {
448
464
  style: styles.emptyTitle,
449
465
  children: searchQuery.trim() ? "No matching events" : isListening ? "No route events yet" : "Event listener is paused"
@@ -469,7 +485,7 @@ export function RouteEventsModalWithTabs({
469
485
  style: styles.lockedEventsBanner,
470
486
  children: [/*#__PURE__*/_jsx(Lock, {
471
487
  size: 14,
472
- color: buoyColors.warning
488
+ color: night.color.warning
473
489
  }), /*#__PURE__*/_jsxs(Text, {
474
490
  style: styles.lockedEventsBannerText,
475
491
  children: [lockedEventCount, " older ", lockedEventCount === 1 ? 'event' : 'events', " locked"]
@@ -544,7 +560,7 @@ export function RouteEventsModalWithTabs({
544
560
  style: [styles.iconButton, ignoredPatterns.size > 0 && styles.activeFilterButton],
545
561
  children: /*#__PURE__*/_jsx(Filter, {
546
562
  size: 14,
547
- color: ignoredPatterns.size > 0 ? buoyColors.primary : buoyColors.textSecondary
563
+ color: ignoredPatterns.size > 0 ? night.color.accent : night.color.textSecondary
548
564
  })
549
565
  }), /*#__PURE__*/_jsx(PowerToggleButton, {
550
566
  isEnabled: isListening,
@@ -555,7 +571,7 @@ export function RouteEventsModalWithTabs({
555
571
  style: styles.iconButton,
556
572
  children: /*#__PURE__*/_jsx(Trash2, {
557
573
  size: 14,
558
- color: buoyColors.error
574
+ color: night.color.danger
559
575
  })
560
576
  })]
561
577
  })]
@@ -608,7 +624,11 @@ export function RouteEventsModalWithTabs({
608
624
  onModeChange: handleModeChange,
609
625
  enablePersistence: true,
610
626
  initialMode: "bottomSheet",
611
- enableGlitchEffects: true,
627
+ enableGlitchEffects: true
628
+ // Every screen owns its scrolling (timeline FlatList, sitemap/stack/
629
+ // detail/filter ScrollViews) — the default wrapper would nest them.
630
+ ,
631
+ disableScrollWrapper: true,
612
632
  styles: {},
613
633
  footer: footerNode,
614
634
  footerHeight: footerNode ? 68 : 0,
@@ -635,7 +655,9 @@ const styles = StyleSheet.create({
635
655
  inlineRoot: {
636
656
  flex: 1,
637
657
  minHeight: 0,
638
- backgroundColor: buoyColors.base
658
+ // Transparent so the desktop workbench's hoisted sky (one field spanning
659
+ // sidebar + panel) shows through — the shell paints its base beneath it.
660
+ backgroundColor: "transparent"
639
661
  },
640
662
  inlineHeader: {
641
663
  paddingHorizontal: 12,
@@ -647,10 +669,10 @@ const styles = StyleSheet.create({
647
669
  iconButton: {
648
670
  padding: 6,
649
671
  borderRadius: 6,
650
- backgroundColor: buoyColors.input
672
+ backgroundColor: night.color.buttonSurface
651
673
  },
652
674
  activeFilterButton: {
653
- backgroundColor: buoyColors.primary + "1A"
675
+ backgroundColor: night.color.accentSoft
654
676
  },
655
677
  emptyState: {
656
678
  flex: 1,
@@ -659,7 +681,7 @@ const styles = StyleSheet.create({
659
681
  padding: 32
660
682
  },
661
683
  emptyTitle: {
662
- color: buoyColors.text,
684
+ color: night.color.text,
663
685
  fontSize: 16,
664
686
  fontWeight: "600",
665
687
  marginTop: 16,
@@ -669,7 +691,7 @@ const styles = StyleSheet.create({
669
691
  textTransform: "uppercase"
670
692
  },
671
693
  emptySubtitle: {
672
- color: buoyColors.textSecondary,
694
+ color: night.color.textSecondary,
673
695
  fontSize: 14,
674
696
  textAlign: "center",
675
697
  fontFamily: "monospace"
@@ -680,32 +702,33 @@ const styles = StyleSheet.create({
680
702
  statsContainer: {
681
703
  paddingHorizontal: 16,
682
704
  paddingVertical: 8,
683
- backgroundColor: buoyColors.card,
705
+ backgroundColor: night.color.surface,
684
706
  borderBottomWidth: 1,
685
- borderBottomColor: buoyColors.border
707
+ borderBottomColor: night.color.border
686
708
  },
687
709
  statsText: {
688
710
  fontSize: 11,
689
- color: buoyColors.textSecondary,
711
+ color: night.color.textSecondary,
690
712
  fontFamily: "monospace",
691
713
  textAlign: "center"
692
714
  },
693
715
  statsWarning: {
694
- color: buoyColors.warning,
716
+ color: night.color.warning,
695
717
  fontWeight: "600"
696
718
  },
697
719
  searchContainer: {
698
720
  paddingHorizontal: 16,
699
721
  paddingVertical: 8,
700
- backgroundColor: buoyColors.base
722
+ // Transparent so the night sheet's star field shows through.
723
+ backgroundColor: "transparent"
701
724
  },
702
725
  lockedEventsBanner: {
703
726
  flexDirection: "row",
704
727
  alignItems: "center",
705
728
  gap: 8,
706
- backgroundColor: buoyColors.warning + "15",
729
+ backgroundColor: night.color.warningSoft,
707
730
  borderWidth: 1,
708
- borderColor: buoyColors.warning + "30",
731
+ borderColor: night.color.warning + "30",
709
732
  borderRadius: 8,
710
733
  paddingVertical: 10,
711
734
  paddingHorizontal: 14,
@@ -715,12 +738,12 @@ const styles = StyleSheet.create({
715
738
  lockedEventsBannerText: {
716
739
  fontSize: 12,
717
740
  fontWeight: "600",
718
- color: buoyColors.warning,
741
+ color: night.color.warning,
719
742
  fontFamily: "monospace"
720
743
  },
721
744
  lockedEventsBannerSubtext: {
722
745
  fontSize: 11,
723
- color: buoyColors.textSecondary,
746
+ color: night.color.textSecondary,
724
747
  marginLeft: "auto"
725
748
  }
726
749
  });
@@ -12,7 +12,7 @@
12
12
 
13
13
  import { useCallback } from "react";
14
14
  import { View, Text, FlatList, StyleSheet } from "react-native";
15
- import { Navigation, buoyColors } from "@buoy-gg/shared-ui";
15
+ import { Navigation, night } from "@buoy-gg/shared-ui";
16
16
  import { RouteEventItemCompact } from "./RouteEventItemCompact";
17
17
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
18
18
  export function RouteEventsTimeline({
@@ -31,7 +31,7 @@ export function RouteEventsTimeline({
31
31
  style: styles.emptyState,
32
32
  children: [/*#__PURE__*/_jsx(Navigation, {
33
33
  size: 48,
34
- color: buoyColors.textMuted
34
+ color: night.color.textTertiary
35
35
  }), /*#__PURE__*/_jsx(Text, {
36
36
  style: styles.emptyTitle,
37
37
  children: "No events yet"
@@ -85,7 +85,7 @@ const styles = StyleSheet.create({
85
85
  padding: 32
86
86
  },
87
87
  emptyTitle: {
88
- color: buoyColors.text,
88
+ color: night.color.text,
89
89
  fontSize: 16,
90
90
  fontWeight: "600",
91
91
  marginTop: 16,
@@ -95,7 +95,7 @@ const styles = StyleSheet.create({
95
95
  textTransform: "uppercase"
96
96
  },
97
97
  emptySubtitle: {
98
- color: buoyColors.textSecondary,
98
+ color: night.color.textSecondary,
99
99
  fontSize: 14,
100
100
  textAlign: "center",
101
101
  fontFamily: "monospace"