@buoy-gg/route-events 7.0.41 → 7.0.43

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 (102) hide show
  1. package/README.md +11 -64
  2. package/lib/commonjs/RouteObserver.js +1 -54
  3. package/lib/commonjs/RouteParser.js +1 -314
  4. package/lib/commonjs/RouteTracker.js +1 -112
  5. package/lib/commonjs/RouteTracker.web.js +1 -12
  6. package/lib/commonjs/browserRouteRegistry.js +1 -30
  7. package/lib/commonjs/browserRoutes.js +1 -96
  8. package/lib/commonjs/components/NavigationStack.js +2 -572
  9. package/lib/commonjs/components/ReactNavigationRoutes.js +1 -836
  10. package/lib/commonjs/components/ReactNavigationRoutes.web.js +1 -12
  11. package/lib/commonjs/components/RouteEventDetail.js +1 -97
  12. package/lib/commonjs/components/RouteEventExpandedContent.js +1 -204
  13. package/lib/commonjs/components/RouteEventItemCompact.js +1 -191
  14. package/lib/commonjs/components/RouteEventsModalWithTabs.js +1 -734
  15. package/lib/commonjs/components/RouteEventsTimeline.js +1 -107
  16. package/lib/commonjs/components/RouteFilterViewV2.js +1 -42
  17. package/lib/commonjs/components/RoutesSitemap.js +2 -1035
  18. package/lib/commonjs/expoRouterStore.js +1 -121
  19. package/lib/commonjs/expoRouterStore.web.js +1 -44
  20. package/lib/commonjs/hooks/useRouteEvents.js +1 -57
  21. package/lib/commonjs/index.js +1 -168
  22. package/lib/commonjs/preset.js +1 -69
  23. package/lib/commonjs/stores/navigationStackStore.js +1 -45
  24. package/lib/commonjs/stores/routeEventStore.js +1 -136
  25. package/lib/commonjs/sync/routeEventsSyncAdapter.js +1 -275
  26. package/lib/commonjs/useNavigationStack.js +1 -408
  27. package/lib/commonjs/useNavigationStack.web.js +1 -32
  28. package/lib/commonjs/useRouteObserver.js +1 -73
  29. package/lib/commonjs/useRouteObserverReactNavigation.js +1 -109
  30. package/lib/commonjs/useRouteSitemap.js +1 -255
  31. package/lib/commonjs/utils/routeTemplate.js +1 -79
  32. package/lib/commonjs/utils/safeReactNavigation.js +1 -194
  33. package/lib/commonjs/utils/safeReactNavigation.web.js +1 -36
  34. package/lib/commonjs/utils/testIDs.js +1 -63
  35. package/lib/module/RouteObserver.js +1 -49
  36. package/lib/module/RouteParser.js +1 -309
  37. package/lib/module/RouteTracker.js +1 -109
  38. package/lib/module/RouteTracker.web.js +1 -8
  39. package/lib/module/browserRouteRegistry.js +1 -24
  40. package/lib/module/browserRoutes.js +1 -92
  41. package/lib/module/components/NavigationStack.js +2 -568
  42. package/lib/module/components/ReactNavigationRoutes.js +1 -832
  43. package/lib/module/components/ReactNavigationRoutes.web.js +1 -3
  44. package/lib/module/components/RouteEventDetail.js +1 -93
  45. package/lib/module/components/RouteEventExpandedContent.js +1 -200
  46. package/lib/module/components/RouteEventItemCompact.js +1 -187
  47. package/lib/module/components/RouteEventsModalWithTabs.js +1 -731
  48. package/lib/module/components/RouteEventsTimeline.js +1 -103
  49. package/lib/module/components/RouteFilterViewV2.js +1 -38
  50. package/lib/module/components/RoutesSitemap.js +2 -1033
  51. package/lib/module/expoRouterStore.js +1 -114
  52. package/lib/module/expoRouterStore.web.js +1 -37
  53. package/lib/module/hooks/useRouteEvents.js +1 -54
  54. package/lib/module/index.js +1 -70
  55. package/lib/module/preset.js +1 -66
  56. package/lib/module/stores/navigationStackStore.js +1 -41
  57. package/lib/module/stores/routeEventStore.js +1 -128
  58. package/lib/module/sync/routeEventsSyncAdapter.js +1 -273
  59. package/lib/module/useNavigationStack.js +1 -404
  60. package/lib/module/useNavigationStack.web.js +1 -28
  61. package/lib/module/useRouteObserver.js +1 -70
  62. package/lib/module/useRouteObserverReactNavigation.js +1 -106
  63. package/lib/module/useRouteSitemap.js +1 -250
  64. package/lib/module/utils/routeTemplate.js +1 -73
  65. package/lib/module/utils/safeReactNavigation.js +1 -185
  66. package/lib/module/utils/safeReactNavigation.web.js +1 -27
  67. package/lib/module/utils/testIDs.js +1 -55
  68. package/lib/web/index.mjs +4 -5
  69. package/package.json +6 -11
  70. package/lib/typescript/RouteObserver.d.ts.map +0 -1
  71. package/lib/typescript/RouteParser.d.ts.map +0 -1
  72. package/lib/typescript/RouteTracker.d.ts.map +0 -1
  73. package/lib/typescript/RouteTracker.web.d.ts.map +0 -1
  74. package/lib/typescript/browserRouteRegistry.d.ts.map +0 -1
  75. package/lib/typescript/browserRoutes.d.ts.map +0 -1
  76. package/lib/typescript/components/NavigationStack.d.ts.map +0 -1
  77. package/lib/typescript/components/ReactNavigationRoutes.d.ts.map +0 -1
  78. package/lib/typescript/components/ReactNavigationRoutes.web.d.ts.map +0 -1
  79. package/lib/typescript/components/RouteEventDetail.d.ts.map +0 -1
  80. package/lib/typescript/components/RouteEventExpandedContent.d.ts.map +0 -1
  81. package/lib/typescript/components/RouteEventItemCompact.d.ts.map +0 -1
  82. package/lib/typescript/components/RouteEventsModalWithTabs.d.ts.map +0 -1
  83. package/lib/typescript/components/RouteEventsTimeline.d.ts.map +0 -1
  84. package/lib/typescript/components/RouteFilterViewV2.d.ts.map +0 -1
  85. package/lib/typescript/components/RoutesSitemap.d.ts.map +0 -1
  86. package/lib/typescript/expoRouterStore.d.ts.map +0 -1
  87. package/lib/typescript/expoRouterStore.web.d.ts.map +0 -1
  88. package/lib/typescript/hooks/useRouteEvents.d.ts.map +0 -1
  89. package/lib/typescript/index.d.ts.map +0 -1
  90. package/lib/typescript/preset.d.ts.map +0 -1
  91. package/lib/typescript/stores/navigationStackStore.d.ts.map +0 -1
  92. package/lib/typescript/stores/routeEventStore.d.ts.map +0 -1
  93. package/lib/typescript/sync/routeEventsSyncAdapter.d.ts.map +0 -1
  94. package/lib/typescript/useNavigationStack.d.ts.map +0 -1
  95. package/lib/typescript/useNavigationStack.web.d.ts.map +0 -1
  96. package/lib/typescript/useRouteObserver.d.ts.map +0 -1
  97. package/lib/typescript/useRouteObserverReactNavigation.d.ts.map +0 -1
  98. package/lib/typescript/useRouteSitemap.d.ts.map +0 -1
  99. package/lib/typescript/utils/routeTemplate.d.ts.map +0 -1
  100. package/lib/typescript/utils/safeReactNavigation.d.ts.map +0 -1
  101. package/lib/typescript/utils/safeReactNavigation.web.d.ts.map +0 -1
  102. package/lib/typescript/utils/testIDs.d.ts.map +0 -1
@@ -1,103 +1 @@
1
- "use strict";
2
-
3
- /**
4
- * RouteEventsTimeline - Chronological timeline of route navigation events
5
- *
6
- * Shows events in the order they happened (most recent first),
7
- * providing a clear history of navigation actions.
8
- *
9
- * Tapping a row opens the full-screen detail view (parity with the Events
10
- * tool) via onSelectEvent — rows no longer expand inline.
11
- */
12
-
13
- import { useCallback } from "react";
14
- import { View, Text, FlatList, StyleSheet } from "react-native";
15
- import { Navigation, night, EVENT_LIST_PRESET, monoFont } from "@buoy-gg/shared-ui";
16
- import { RouteEventItemCompact } from "./RouteEventItemCompact";
17
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
18
- export function RouteEventsTimeline({
19
- events,
20
- visitCounts,
21
- onNavigate,
22
- onSelectEvent
23
- }) {
24
- const handleItemPress = useCallback(index => {
25
- const event = events[index];
26
- if (!event) return;
27
- onSelectEvent(event, visitCounts.get(event) || 1);
28
- }, [events, visitCounts, onSelectEvent]);
29
- if (events.length === 0) {
30
- return /*#__PURE__*/_jsxs(View, {
31
- style: styles.emptyState,
32
- testID: "buoy-routes-empty",
33
- children: [/*#__PURE__*/_jsx(Navigation, {
34
- size: 48,
35
- color: night.color.textTertiary
36
- }), /*#__PURE__*/_jsx(Text, {
37
- style: styles.emptyTitle,
38
- testID: "buoy-routes-empty-title",
39
- children: "No events yet"
40
- }), /*#__PURE__*/_jsx(Text, {
41
- style: styles.emptySubtitle,
42
- testID: "buoy-routes-empty-subtitle",
43
- children: "Navigation events will appear here"
44
- })]
45
- });
46
- }
47
- return (
48
- /*#__PURE__*/
49
- // Virtualized — the previous ScrollView + map mounted ALL events (at
50
- // the 500-event cap that measured 32.8 JS FPS during an idle dwell,
51
- // tool-bench 2026-07-06).
52
- _jsx(FlatList, {
53
- testID: "buoy-routes-timeline",
54
- contentContainerStyle: styles.listContent,
55
- data: events
56
- // STABLE content keys — index-based keys remount every row when a new
57
- // event prepends (measured 4 JS FPS during automation, which emits
58
- // route events on every bounce; tool-bench 2026-07-06).
59
- ,
60
- keyExtractor: event => `${event.timestamp}-${event.pathname}`,
61
- renderItem: ({
62
- item: event,
63
- index
64
- }) => /*#__PURE__*/_jsx(RouteEventItemCompact, {
65
- event: event,
66
- visitNumber: visitCounts.get(event) || 1,
67
- isExpanded: false,
68
- index: index,
69
- onPress: handleItemPress,
70
- onNavigate: onNavigate
71
- }),
72
- showsVerticalScrollIndicator: true,
73
- ...EVENT_LIST_PRESET
74
- })
75
- );
76
- }
77
- const styles = StyleSheet.create({
78
- listContent: {
79
- paddingVertical: 8
80
- },
81
- emptyState: {
82
- flex: 1,
83
- justifyContent: "center",
84
- alignItems: "center",
85
- padding: 32
86
- },
87
- emptyTitle: {
88
- color: night.color.text,
89
- fontSize: 16,
90
- fontWeight: "600",
91
- marginTop: 16,
92
- marginBottom: 8,
93
- fontFamily: monoFont,
94
- letterSpacing: 0.5,
95
- textTransform: "uppercase"
96
- },
97
- emptySubtitle: {
98
- color: night.color.textSecondary,
99
- fontSize: 14,
100
- textAlign: "center",
101
- fontFamily: monoFont
102
- }
103
- });
1
+ "use strict";import{useCallback as y}from"react";import{View as u,Text as s,FlatList as f,StyleSheet as d}from"react-native";import{Navigation as g,night as a,EVENT_LIST_PRESET as x,monoFont as m}from"@buoy-gg/shared-ui";import{RouteEventItemCompact as S}from"./RouteEventItemCompact";import{jsx as o,jsxs as h}from"react/jsx-runtime";export function RouteEventsTimeline({events:r,visitCounts:n,onNavigate:c,onSelectEvent:l}){const p=y(t=>{const e=r[t];if(!e)return;l(e,n.get(e)||1)},[r,n,l]);if(r.length===0){return h(u,{style:i.emptyState,testID:"buoy-routes-empty",children:[o(g,{size:48,color:a.color.textTertiary}),o(s,{style:i.emptyTitle,testID:"buoy-routes-empty-title",children:"No events yet"}),o(s,{style:i.emptySubtitle,testID:"buoy-routes-empty-subtitle",children:"Navigation events will appear here"})]})}return o(f,{testID:"buoy-routes-timeline",contentContainerStyle:i.listContent,data:r,keyExtractor:t=>`${t.timestamp}-${t.pathname}`,renderItem:({item:t,index:e})=>o(S,{event:t,visitNumber:n.get(t)||1,isExpanded:false,index:e,onPress:p,onNavigate:c}),showsVerticalScrollIndicator:true,...x})}const i=d.create({listContent:{paddingVertical:8},emptyState:{flex:1,justifyContent:"center",alignItems:"center",padding:32},emptyTitle:{color:a.color.text,fontSize:16,fontWeight:"600",marginTop:16,marginBottom:8,fontFamily:m,letterSpacing:.5,textTransform:"uppercase"},emptySubtitle:{color:a.color.textSecondary,fontSize:14,textAlign:"center",fontFamily:m}});
@@ -1,38 +1 @@
1
- "use strict";
2
-
3
- import { Filter, DynamicFilterView } from "@buoy-gg/shared-ui";
4
- import { jsx as _jsx } from "react/jsx-runtime";
5
- export function RouteFilterViewV2({
6
- ignoredPatterns,
7
- onTogglePattern,
8
- onAddPattern,
9
- availablePathnames = []
10
- }) {
11
- const filterConfig = {
12
- addFilterSection: {
13
- enabled: true,
14
- placeholder: "Enter pattern (e.g., /_sitemap)",
15
- title: "ACTIVE FILTERS",
16
- icon: Filter
17
- },
18
- availableItemsSection: {
19
- enabled: true,
20
- title: "AVAILABLE ROUTES FROM EVENTS",
21
- emptyMessage: "No routes available. Routes from navigation events will appear here.",
22
- items: availablePathnames
23
- },
24
- howItWorksSection: {
25
- enabled: true,
26
- title: "HOW FILTERS WORK",
27
- description: "Filtered routes will not appear in the route events list. Patterns match if the route contains the specified text.",
28
- examples: ["• /_sitemap → filters /_sitemap routes", "• /api → filters /api/users, /api/posts", "• [id] → filters all routes with [id] param"],
29
- icon: Filter
30
- },
31
- onPatternToggle: onTogglePattern,
32
- onPatternAdd: onAddPattern,
33
- activePatterns: ignoredPatterns
34
- };
35
- return /*#__PURE__*/_jsx(DynamicFilterView, {
36
- ...filterConfig
37
- });
38
- }
1
+ "use strict";import{Filter as e,DynamicFilterView as o}from"@buoy-gg/shared-ui";import{jsx as n}from"react/jsx-runtime";export function RouteFilterViewV2({ignoredPatterns:t,onTogglePattern:i,onAddPattern:r,availablePathnames:a=[]}){const s={addFilterSection:{enabled:true,placeholder:"Enter pattern (e.g., /_sitemap)",title:"ACTIVE FILTERS",icon:e},availableItemsSection:{enabled:true,title:"AVAILABLE ROUTES FROM EVENTS",emptyMessage:"No routes available. Routes from navigation events will appear here.",items:a},howItWorksSection:{enabled:true,title:"HOW FILTERS WORK",description:"Filtered routes will not appear in the route events list. Patterns match if the route contains the specified text.",examples:["\u2022 /_sitemap \u2192 filters /_sitemap routes","\u2022 /api \u2192 filters /api/users, /api/posts","\u2022 [id] \u2192 filters all routes with [id] param"],icon:e},onPatternToggle:i,onPatternAdd:r,activePatterns:t};return n(o,{...s})}