@buoy-gg/shared-ui 1.7.5 → 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.
Files changed (91) hide show
  1. package/lib/commonjs/clipboard/clipboard-impl.js +1 -1
  2. package/lib/commonjs/clipboard/copyToClipboard.js +0 -2
  3. package/lib/commonjs/dataViewer/diffThemes.js +35 -32
  4. package/lib/commonjs/history/HistoryProvider.js +246 -0
  5. package/lib/commonjs/history/components/HistoryEntryRow.js +146 -0
  6. package/lib/commonjs/history/components/HistoryList.js +174 -0
  7. package/lib/commonjs/history/components/index.js +25 -0
  8. package/lib/commonjs/history/index.js +61 -0
  9. package/lib/commonjs/history/types.js +5 -0
  10. package/lib/commonjs/hooks/safe-area-impl.js +1 -1
  11. package/lib/commonjs/index.js +37 -11
  12. package/lib/commonjs/license/FeatureGate.js +13 -42
  13. package/lib/commonjs/license/index.js +43 -1
  14. package/lib/commonjs/ui/components/CopyButton.js +11 -24
  15. package/lib/commonjs/ui/components/EventHistoryViewer/EventHistoryViewer.js +2 -1
  16. package/lib/commonjs/ui/components/ExpandablePopover.js +7 -7
  17. package/lib/commonjs/utils/formatting/httpFormatting.js +0 -6
  18. package/lib/module/clipboard/clipboard-impl.js +1 -1
  19. package/lib/module/clipboard/copyToClipboard.js +0 -2
  20. package/lib/module/dataViewer/diffThemes.js +35 -32
  21. package/lib/module/history/HistoryProvider.js +237 -0
  22. package/lib/module/history/components/HistoryEntryRow.js +142 -0
  23. package/lib/module/history/components/HistoryList.js +169 -0
  24. package/lib/module/history/components/index.js +8 -0
  25. package/lib/module/history/index.js +15 -0
  26. package/lib/module/history/types.js +3 -0
  27. package/lib/module/hooks/safe-area-impl.js +1 -1
  28. package/lib/module/index.js +4 -1
  29. package/lib/module/license/FeatureGate.js +11 -40
  30. package/lib/module/license/index.js +41 -1
  31. package/lib/module/ui/components/CopyButton.js +9 -23
  32. package/lib/module/ui/components/EventHistoryViewer/EventHistoryViewer.js +2 -1
  33. package/lib/module/ui/components/ExpandablePopover.js +8 -8
  34. package/lib/module/utils/formatting/httpFormatting.js +0 -6
  35. package/lib/typescript/commonjs/clipboard/clipboard-impl.d.ts +1 -1
  36. package/lib/typescript/commonjs/clipboard/copyToClipboard.d.ts.map +1 -1
  37. package/lib/typescript/commonjs/dataViewer/diffThemes.d.ts +1 -1
  38. package/lib/typescript/commonjs/dataViewer/diffThemes.d.ts.map +1 -1
  39. package/lib/typescript/commonjs/history/HistoryProvider.d.ts +56 -0
  40. package/lib/typescript/commonjs/history/HistoryProvider.d.ts.map +1 -0
  41. package/lib/typescript/commonjs/history/components/HistoryEntryRow.d.ts +22 -0
  42. package/lib/typescript/commonjs/history/components/HistoryEntryRow.d.ts.map +1 -0
  43. package/lib/typescript/commonjs/history/components/HistoryList.d.ts +47 -0
  44. package/lib/typescript/commonjs/history/components/HistoryList.d.ts.map +1 -0
  45. package/lib/typescript/commonjs/history/components/index.d.ts +6 -0
  46. package/lib/typescript/commonjs/history/components/index.d.ts.map +1 -0
  47. package/lib/typescript/commonjs/history/index.d.ts +9 -0
  48. package/lib/typescript/commonjs/history/index.d.ts.map +1 -0
  49. package/lib/typescript/commonjs/history/types.d.ts +171 -0
  50. package/lib/typescript/commonjs/history/types.d.ts.map +1 -0
  51. package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
  52. package/lib/typescript/commonjs/index.d.ts +2 -1
  53. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  54. package/lib/typescript/commonjs/license/FeatureGate.d.ts.map +1 -1
  55. package/lib/typescript/commonjs/license/LicenseEntryModal.d.ts +5 -0
  56. package/lib/typescript/commonjs/license/LicenseEntryModal.d.ts.map +1 -1
  57. package/lib/typescript/commonjs/license/index.d.ts +15 -0
  58. package/lib/typescript/commonjs/license/index.d.ts.map +1 -1
  59. package/lib/typescript/commonjs/ui/components/CopyButton.d.ts.map +1 -1
  60. package/lib/typescript/commonjs/ui/components/EventHistoryViewer/EventHistoryViewer.d.ts.map +1 -1
  61. package/lib/typescript/commonjs/utils/formatting/httpFormatting.d.ts.map +1 -1
  62. package/lib/typescript/module/clipboard/clipboard-impl.d.ts +1 -1
  63. package/lib/typescript/module/clipboard/copyToClipboard.d.ts.map +1 -1
  64. package/lib/typescript/module/dataViewer/diffThemes.d.ts +1 -1
  65. package/lib/typescript/module/dataViewer/diffThemes.d.ts.map +1 -1
  66. package/lib/typescript/module/history/HistoryProvider.d.ts +56 -0
  67. package/lib/typescript/module/history/HistoryProvider.d.ts.map +1 -0
  68. package/lib/typescript/module/history/components/HistoryEntryRow.d.ts +22 -0
  69. package/lib/typescript/module/history/components/HistoryEntryRow.d.ts.map +1 -0
  70. package/lib/typescript/module/history/components/HistoryList.d.ts +47 -0
  71. package/lib/typescript/module/history/components/HistoryList.d.ts.map +1 -0
  72. package/lib/typescript/module/history/components/index.d.ts +6 -0
  73. package/lib/typescript/module/history/components/index.d.ts.map +1 -0
  74. package/lib/typescript/module/history/index.d.ts +9 -0
  75. package/lib/typescript/module/history/index.d.ts.map +1 -0
  76. package/lib/typescript/module/history/types.d.ts +171 -0
  77. package/lib/typescript/module/history/types.d.ts.map +1 -0
  78. package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
  79. package/lib/typescript/module/index.d.ts +2 -1
  80. package/lib/typescript/module/index.d.ts.map +1 -1
  81. package/lib/typescript/module/license/FeatureGate.d.ts.map +1 -1
  82. package/lib/typescript/module/license/LicenseEntryModal.d.ts +5 -0
  83. package/lib/typescript/module/license/LicenseEntryModal.d.ts.map +1 -1
  84. package/lib/typescript/module/license/index.d.ts +15 -0
  85. package/lib/typescript/module/license/index.d.ts.map +1 -1
  86. package/lib/typescript/module/ui/components/CopyButton.d.ts.map +1 -1
  87. package/lib/typescript/module/ui/components/EventHistoryViewer/EventHistoryViewer.d.ts.map +1 -1
  88. package/lib/typescript/module/utils/formatting/httpFormatting.d.ts.map +1 -1
  89. package/package.json +31 -7
  90. package/scripts/detect-clipboard.js +63 -1
  91. package/scripts/detect-safe-area.js +63 -1
@@ -11,6 +11,7 @@ import { View, Text, StyleSheet, TouchableOpacity, Linking, Modal } from "react-
11
11
  import { gameUIColors, buoyColors } from "../ui/gameUI/constants/gameUIColors.js";
12
12
  import { LockIcon, X, Zap, Shield, Clock, Check } from "../icons/lucide-icons.js";
13
13
  import { LicenseEntryModal } from "./LicenseEntryModal.js";
14
+ import { useIsPro, useLicense } from "@buoy-gg/license";
14
15
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
15
16
  /**
16
17
  * Simple Pro badge for marking premium features
@@ -42,32 +43,6 @@ export const ProUpgradeModal = ({
42
43
  description: `${featureName} requires a Pro subscription.`
43
44
  });
44
45
  };
45
-
46
- // Lazy load the license hooks to avoid circular dependencies
47
- let _useIsPro = null;
48
- let _useLicense = null;
49
- let _loadAttempted = false;
50
- function loadLicenseModule() {
51
- if (_loadAttempted) return;
52
- _loadAttempted = true;
53
- try {
54
- const mod = require("@buoy-gg/license");
55
- if (mod) {
56
- _useIsPro = mod.useIsPro ?? null;
57
- _useLicense = mod.useLicense ?? null;
58
- }
59
- } catch {
60
- // License package not available - will use fallback
61
- }
62
- }
63
- function getUseIsPro() {
64
- loadLicenseModule();
65
- return _useIsPro ?? (() => false);
66
- }
67
- function getUseLicense() {
68
- loadLicenseModule();
69
- return _useLicense;
70
- }
71
46
  /**
72
47
  * Default upgrade prompt shown when user doesn't have Pro access
73
48
  * Opens LicenseEntryModal when clicked (unless custom onUpgradePress provided)
@@ -78,10 +53,7 @@ export const UpgradePrompt = ({
78
53
  compact = false
79
54
  }) => {
80
55
  const [showLicenseModal, setShowLicenseModal] = useState(false);
81
-
82
- // Get license hook if available
83
- const useLicenseHook = getUseLicense();
84
- const license = useLicenseHook?.();
56
+ const license = useLicense();
85
57
  const handlePress = useCallback(() => {
86
58
  if (onUpgradePress) {
87
59
  onUpgradePress();
@@ -165,7 +137,6 @@ export const FeatureGate = ({
165
137
  previewMode = false,
166
138
  onUpgradePress
167
139
  }) => {
168
- const useIsPro = getUseIsPro();
169
140
  const isPro = useIsPro();
170
141
 
171
142
  // Pro users see the full content
@@ -213,7 +184,6 @@ export const FeatureGate = ({
213
184
  * Returns { hasAccess, isPro, showUpgrade }
214
185
  */
215
186
  export function useFeatureGate() {
216
- const useIsPro = getUseIsPro();
217
187
  const isPro = useIsPro();
218
188
  const showUpgrade = () => {
219
189
  Linking.openURL("https://buoy.gg/pro");
@@ -236,10 +206,7 @@ export const ProFeatureBanner = ({
236
206
  benefits
237
207
  }) => {
238
208
  const [showLicenseModal, setShowLicenseModal] = useState(false);
239
-
240
- // Get license hook if available
241
- const useLicenseHook = getUseLicense();
242
- const license = useLicenseHook?.();
209
+ const license = useLicense();
243
210
  const handleUpgrade = useCallback(() => {
244
211
  setShowLicenseModal(true);
245
212
  }, []);
@@ -315,16 +282,19 @@ export const UpgradeModal = ({
315
282
  }) => {
316
283
  const hasBenefits = benefits && benefits.length > 0;
317
284
  const [showLicenseModal, setShowLicenseModal] = useState(false);
318
-
319
- // Get license hook if available
320
- const useLicenseHook = getUseLicense();
321
- const license = useLicenseHook?.();
285
+ const license = useLicense();
322
286
  const handleUpgrade = useCallback(() => {
323
287
  setShowLicenseModal(true);
324
288
  }, []);
325
289
  const handleCloseLicenseModal = useCallback(() => {
326
290
  setShowLicenseModal(false);
327
291
  }, []);
292
+
293
+ // When license activation succeeds, close both modals
294
+ const handleLicenseSuccess = useCallback(() => {
295
+ setShowLicenseModal(false);
296
+ onClose();
297
+ }, [onClose]);
328
298
  if (!visible) return null;
329
299
  return /*#__PURE__*/_jsxs(_Fragment, {
330
300
  children: [/*#__PURE__*/_jsx(Modal, {
@@ -428,6 +398,7 @@ export const UpgradeModal = ({
428
398
  }), /*#__PURE__*/_jsx(LicenseEntryModal, {
429
399
  visible: showLicenseModal,
430
400
  onClose: handleCloseLicenseModal,
401
+ onSuccess: handleLicenseSuccess,
431
402
  license: license
432
403
  })]
433
404
  });
@@ -2,4 +2,44 @@
2
2
 
3
3
  export { FeatureGate, UpgradePrompt, useFeatureGate, ProFeatureBanner, UpgradeModal, ProBadge, ProUpgradeModal } from "./FeatureGate.js";
4
4
  export { LicenseEntryModal } from "./LicenseEntryModal.js";
5
- export { ManageDevicesModal } from "./ManageDevicesModal.js";
5
+ export { ManageDevicesModal } from "./ManageDevicesModal.js";
6
+ // Centralized lazy loading for license hooks to avoid duplication across packages
7
+ // This is the SINGLE source of truth - all packages should import from here
8
+ let _useIsPro = null;
9
+ let _useLicense = null;
10
+ let _licenseLoadAttempted = false;
11
+ function loadLicenseModuleCentral() {
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
+ _useLicense = mod.useLicense ?? null;
19
+ }
20
+ } catch {
21
+ // License package not available - will use fallback
22
+ }
23
+ }
24
+
25
+ /**
26
+ * Get the useIsPro hook from @buoy-gg/license
27
+ * Falls back to () => false if license package is not available
28
+ *
29
+ * IMPORTANT: Use this instead of doing your own lazy loading in other packages
30
+ */
31
+ export function getUseIsPro() {
32
+ loadLicenseModuleCentral();
33
+ return _useIsPro ?? (() => false);
34
+ }
35
+
36
+ /**
37
+ * Get the useLicense hook from @buoy-gg/license
38
+ * Returns null if license package is not available
39
+ *
40
+ * IMPORTANT: Use this instead of doing your own lazy loading in other packages
41
+ */
42
+ export function getUseLicense() {
43
+ loadLicenseModuleCentral();
44
+ return _useLicense;
45
+ }
@@ -9,28 +9,9 @@ import { ClipboardHintBanner } from "./ClipboardHintBanner.js";
9
9
  import { devToolsStorageKeys } from "../../storage/devToolsStorageKeys.js";
10
10
  import { safeGetItem, safeSetItem } from "../../utils/safeAsyncStorage.js";
11
11
  import { useHintsDisabled } from "../../context/index.js";
12
- import { ProUpgradeModal } from "../../license/FeatureGate.js";
13
-
14
- // Lazy load the license hooks to avoid circular dependencies
12
+ import { ProUpgradeModal } from "../../license/index.js";
13
+ import { useIsPro } from "@buoy-gg/license";
15
14
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
16
- let _useIsPro = null;
17
- let _licenseLoadAttempted = false;
18
- function loadLicenseModule() {
19
- if (_licenseLoadAttempted) return;
20
- _licenseLoadAttempted = true;
21
- try {
22
- const mod = require("@buoy-gg/license");
23
- if (mod) {
24
- _useIsPro = mod.useIsPro ?? null;
25
- }
26
- } catch {
27
- // License package not available - will use fallback (assume not Pro)
28
- }
29
- }
30
- function getUseIsPro() {
31
- loadLicenseModule();
32
- return _useIsPro ?? (() => false);
33
- }
34
15
  /**
35
16
  * Reusable copy button component with visual feedback
36
17
  * Shows different icons for idle, success, and error states
@@ -81,12 +62,17 @@ export const CopyButton = /*#__PURE__*/memo(function CopyButton({
81
62
  // Ignored - Pro status checked internally
82
63
  ...touchableProps
83
64
  }) {
84
- // Check Pro status internally - copy is a Pro-only feature
85
- const useIsPro = getUseIsPro();
86
65
  const isPro = useIsPro();
87
66
  const [copyState, setCopyState] = useState("idle");
88
67
  const [showHint, setShowHint] = useState(false);
89
68
  const [showLicenseModal, setShowLicenseModal] = useState(false);
69
+
70
+ // Auto-close upgrade modal when user becomes Pro
71
+ useEffect(() => {
72
+ if (showLicenseModal && isPro) {
73
+ setShowLicenseModal(false);
74
+ }
75
+ }, [showLicenseModal, isPro]);
90
76
  const hintsDisabled = useHintsDisabled();
91
77
  const valueRef = useRef(value);
92
78
  const timeoutRef = useRef(null);
@@ -64,7 +64,8 @@ export const EventHistoryViewer = /*#__PURE__*/memo(function EventHistoryViewer(
64
64
  return /*#__PURE__*/_jsxs(_Fragment, {
65
65
  children: [/*#__PURE__*/_jsxs(View, {
66
66
  style: [styles.container, {
67
- paddingBottom: !disableInternalFooter && footerTotalItems > 1 ? 80 : 0
67
+ // Add padding when footer is shown (internal or external via modal)
68
+ paddingBottom: footerTotalItems > 1 ? 96 : 0
68
69
  }],
69
70
  children: [/*#__PURE__*/_jsx(ViewToggleCards, {
70
71
  activeView: activeView,
@@ -3,7 +3,7 @@
3
3
  import React, { useCallback, useEffect, useRef, useState } from "react";
4
4
  import { Animated, TouchableOpacity, View, Text, StyleSheet } from "react-native";
5
5
  import { ChevronUp } from "../../icons/index.js";
6
- import { gameUIColors } from "../gameUI/constants/gameUIColors.js";
6
+ import { buoyColors } from "../gameUI/constants/gameUIColors.js";
7
7
 
8
8
  // ============================================================================
9
9
  // Types
@@ -60,7 +60,7 @@ function CollapsedPeek({
60
60
  children: customContent || /*#__PURE__*/_jsxs(_Fragment, {
61
61
  children: [/*#__PURE__*/_jsx(ChevronUp, {
62
62
  size: 12,
63
- color: gameUIColors.muted,
63
+ color: buoyColors.textMuted,
64
64
  strokeWidth: 2
65
65
  }), showCount && count !== undefined && count > 1 && /*#__PURE__*/_jsx(Text, {
66
66
  style: styles.peekCount,
@@ -107,7 +107,7 @@ function ExpandedWrapper({
107
107
  accessibilityRole: "button",
108
108
  children: /*#__PURE__*/_jsx(ChevronUp, {
109
109
  size: 12,
110
- color: gameUIColors.muted,
110
+ color: buoyColors.textMuted,
111
111
  style: {
112
112
  transform: [{
113
113
  rotate: "180deg"
@@ -294,12 +294,12 @@ const styles = StyleSheet.create({
294
294
  borderTopRightRadius: 6,
295
295
  borderBottomLeftRadius: 0,
296
296
  borderBottomRightRadius: 0,
297
- backgroundColor: gameUIColors.panel,
297
+ backgroundColor: buoyColors.card,
298
298
  borderTopWidth: 1,
299
299
  borderLeftWidth: 1,
300
300
  borderRightWidth: 1,
301
301
  borderBottomWidth: 0,
302
- borderColor: gameUIColors.muted + "66",
302
+ borderColor: buoyColors.textMuted + "66",
303
303
  flexDirection: "row",
304
304
  alignItems: "center",
305
305
  justifyContent: "center",
@@ -308,11 +308,11 @@ const styles = StyleSheet.create({
308
308
  peekCount: {
309
309
  fontSize: 9,
310
310
  fontWeight: "600",
311
- color: gameUIColors.muted,
311
+ color: buoyColors.textMuted,
312
312
  marginLeft: 1
313
313
  },
314
314
  expandedContainer: {
315
- backgroundColor: gameUIColors.panel,
315
+ backgroundColor: buoyColors.card,
316
316
  borderTopLeftRadius: 6,
317
317
  borderTopRightRadius: 6,
318
318
  borderBottomLeftRadius: 0,
@@ -321,7 +321,7 @@ const styles = StyleSheet.create({
321
321
  borderLeftWidth: 1,
322
322
  borderRightWidth: 1,
323
323
  borderBottomWidth: 0,
324
- borderColor: gameUIColors.muted + "66"
324
+ borderColor: buoyColors.textMuted + "66"
325
325
  },
326
326
  expandedInner: {
327
327
  alignItems: "center",
@@ -129,17 +129,11 @@ export function parseUrl(url) {
129
129
  try {
130
130
  const parsed = new URL(url);
131
131
  return {
132
- //@ts-expect-error - URL is not typed
133
132
  protocol: parsed.protocol.replace(":", ""),
134
- //@ts-expect-error - URL is not typed
135
133
  host: parsed.hostname,
136
- //@ts-expect-error - URL is not typed
137
134
  port: parsed.port || undefined,
138
- //@ts-expect-error - URL is not typed
139
135
  pathname: parsed.pathname,
140
- //@ts-expect-error - URL is not typed
141
136
  search: parsed.search || undefined,
142
- //@ts-expect-error - URL is not typed
143
137
  hash: parsed.hash || undefined
144
138
  };
145
139
  } catch {
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Auto-generated clipboard implementation
3
3
  * Detected: none
4
- * Generated at: 2026-01-03T17:31:10.965Z
4
+ * Generated at: 2026-01-09T18:05:40.988Z
5
5
  *
6
6
  * DO NOT EDIT - This file is generated by scripts/detect-clipboard.js
7
7
  *
@@ -1 +1 @@
1
- {"version":3,"file":"copyToClipboard.d.ts","sourceRoot":"","sources":["../../../../src/clipboard/copyToClipboard.ts"],"names":[],"mappings":"AAOA;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CA0CtE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAK9C"}
1
+ {"version":3,"file":"copyToClipboard.d.ts","sourceRoot":"","sources":["../../../../src/clipboard/copyToClipboard.ts"],"names":[],"mappings":"AAOA;;;;GAIG;AACH,wBAAsB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAwCtE;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,OAAO,CAK9C"}
@@ -48,7 +48,7 @@ export interface DiffTheme {
48
48
  export declare const gitClassicTheme: DiffTheme;
49
49
  /**
50
50
  * Dev Tools Default Theme
51
- * Clean dark theme using our gameUIColors
51
+ * Clean dark theme matching Buoy website brand colors
52
52
  */
53
53
  export declare const devToolsDefaultTheme: DiffTheme;
54
54
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"diffThemes.d.ts","sourceRoot":"","sources":["../../../../src/dataViewer/diffThemes.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IAGpB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,gBAAgB,EAAE,MAAM,CAAC;IAGzB,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,iBAAiB,EAAE,MAAM,CAAC;IAG1B,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IAGtB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,oBAAoB,EAAE,MAAM,CAAC;IAG7B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IAGzB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,uBAAuB,EAAE,MAAM,CAAC;IAChC,wBAAwB,EAAE,MAAM,CAAC;IACjC,UAAU,EAAE,M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M,CAAC;IAC3B,oBAAoB,EAAE,MAAM,CAAC;IAG7B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,CAAC;IAGzB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,uBAAuB,EAAE,MAAM,CAAC;IAChC,wBAAwB,EAAE,MAAM,CAAC;IACjC,UAAU,EAAE,MAAM,CAAC;IAGnB,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IAGrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,gBAAgB,EAAE,MAAM,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mBAAmB,EAAE,MAAM,CAAC;IAG5B,cAAc,EAAE,MAAM,CAAC;IAGvB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,aAAa,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,EAAE,SA2C7B,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAwDlC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU;;;CAGb,CAAC;AAEX,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,UAAU,CAAC"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * HistoryProvider - Context for Universal History DevTools
3
+ *
4
+ * Manages registered adapters and provides unified access to history
5
+ * from Redux, Zustand, MMKV, React Query, etc.
6
+ */
7
+ import { ReactNode } from "react";
8
+ import type { HistoryAdapter, HistoryEntry, HistoryFilter, AdapterRegistration } from "./types";
9
+ interface HistoryContextValue {
10
+ /** All registered adapters */
11
+ adapters: HistoryAdapter[];
12
+ /** Get adapter by id */
13
+ getAdapter: (id: string) => HistoryAdapter | undefined;
14
+ /** Register a new adapter */
15
+ registerAdapter: (registration: AdapterRegistration) => void;
16
+ /** Unregister an adapter */
17
+ unregisterAdapter: (id: string) => void;
18
+ /** Get combined entries from all adapters (or filtered) */
19
+ getAllEntries: (filter?: HistoryFilter) => HistoryEntry[];
20
+ /** Get entry counts per source */
21
+ getEntryCounts: () => Record<string, number>;
22
+ /** Currently selected adapter id (null = all) */
23
+ selectedAdapterId: string | null;
24
+ /** Set selected adapter */
25
+ setSelectedAdapterId: (id: string | null) => void;
26
+ /** Force refresh (trigger re-render) */
27
+ refresh: () => void;
28
+ }
29
+ interface HistoryProviderProps {
30
+ children: ReactNode;
31
+ /** Initial adapters to register */
32
+ initialAdapters?: AdapterRegistration[];
33
+ }
34
+ export declare function HistoryProvider({ children, initialAdapters, }: HistoryProviderProps): import("react").JSX.Element;
35
+ /**
36
+ * Get the full history context
37
+ */
38
+ export declare function useHistoryContext(): HistoryContextValue;
39
+ /**
40
+ * Get all registered adapters
41
+ */
42
+ export declare function useHistoryAdapters(): HistoryAdapter[];
43
+ /**
44
+ * Get a specific adapter by id
45
+ */
46
+ export declare function useHistoryAdapter(id: string): HistoryAdapter | undefined;
47
+ /**
48
+ * Get combined entries from all adapters
49
+ */
50
+ export declare function useAllHistoryEntries(filter?: HistoryFilter): HistoryEntry[];
51
+ /**
52
+ * Get entry counts per source
53
+ */
54
+ export declare function useHistoryEntryCounts(): Record<string, number>;
55
+ export {};
56
+ //# sourceMappingURL=HistoryProvider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HistoryProvider.d.ts","sourceRoot":"","sources":["../../../../src/history/HistoryProvider.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAOL,SAAS,EACV,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EACV,cAAc,EACd,YAAY,EACZ,aAAa,EACb,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAMjB,UAAU,mBAAmB;IAC3B,8BAA8B;IAC9B,QAAQ,EAAE,cAAc,E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
+ /**
2
+ * HistoryEntryRow - Universal row component for history entries
3
+ *
4
+ * Wraps CompactRow to display entries from any adapter (Redux, Zustand, MMKV, etc.)
5
+ */
6
+ import type { HistoryEntry, HistoryAdapter } from "../types";
7
+ export interface HistoryEntryRowProps {
8
+ /** The history entry to display */
9
+ entry: HistoryEntry;
10
+ /** Optional adapter for additional context */
11
+ adapter?: HistoryAdapter;
12
+ /** Whether this row is selected */
13
+ isSelected?: boolean;
14
+ /** Callback when row is pressed */
15
+ onPress?: (entry: HistoryEntry) => void;
16
+ /** Whether to show the source icon/badge */
17
+ showSource?: boolean;
18
+ /** Whether to show duration if available */
19
+ showDuration?: boolean;
20
+ }
21
+ export declare function HistoryEntryRow({ entry, adapter, isSelected, onPress, showSource, showDuration, }: HistoryEntryRowProps): import("react").JSX.Element;
22
+ //# sourceMappingURL=HistoryEntryRow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HistoryEntryRow.d.ts","sourceRoot":"","sources":["../../../../../src/history/components/HistoryEntryRow.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAiF7D,MAAM,WAAW,oBAAoB;IACnC,mCAAmC;IACnC,KAAK,EAAE,YAAY,CAAC;IACpB,8CAA8C;IAC9C,OAAO,CAAC,EAAE,cAAc,CAAC;IACzB,mCAAmC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,mCAAmC;IACnC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IACxC,4CAA4C;IAC5C,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,4CAA4C;IAC5C,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED,wBAAgB,eAAe,CAAC,EAC9B,KAAK,EACL,OAAO,EACP,UAAU,EACV,OAAO,EACP,UAAiB,EACjB,YAAmB,GACpB,EAAE,oBAAoB,+BA+BtB"}
@@ -0,0 +1,47 @@
1
+ /**
2
+ * HistoryList - Virtualized list of history entries
3
+ *
4
+ * Displays entries from one or all adapters with filtering and search.
5
+ */
6
+ import type { HistoryEntry, HistoryFilter, HistoryAdapter } from "../types";
7
+ export interface HistoryListProps {
8
+ /** Optional filter to apply */
9
+ filter?: HistoryFilter;
10
+ /** Currently selected entry id */
11
+ selectedEntryId?: string | number | null;
12
+ /** Callback when an entry is selected */
13
+ onSelectEntry?: (entry: HistoryEntry) => void;
14
+ /** Whether to show source badges on each row */
15
+ showSource?: boolean;
16
+ /** Custom empty state message */
17
+ emptyMessage?: string;
18
+ /** Custom list header */
19
+ ListHeaderComponent?: React.ComponentType<any> | React.ReactElement | null;
20
+ /** Custom list footer */
21
+ ListFooterComponent?: React.ComponentType<any> | React.ReactElement | null;
22
+ }
23
+ export declare function HistoryList({ filter, selectedEntryId, onSelectEntry, showSource, emptyMessage, ListHeaderComponent, ListFooterComponent, }: HistoryListProps): import("react").JSX.Element;
24
+ /**
25
+ * Standalone HistoryList that doesn't require HistoryProvider
26
+ * Use this when you want to pass entries directly
27
+ */
28
+ export interface StandaloneHistoryListProps {
29
+ /** Entries to display */
30
+ entries: HistoryEntry[];
31
+ /** Optional adapters for context */
32
+ adapters?: HistoryAdapter[];
33
+ /** Currently selected entry id */
34
+ selectedEntryId?: string | number | null;
35
+ /** Callback when an entry is selected */
36
+ onSelectEntry?: (entry: HistoryEntry) => void;
37
+ /** Whether to show source badges */
38
+ showSource?: boolean;
39
+ /** Custom empty message */
40
+ emptyMessage?: string;
41
+ /** Custom list header */
42
+ ListHeaderComponent?: React.ComponentType<any> | React.ReactElement | null;
43
+ /** Custom list footer */
44
+ ListFooterComponent?: React.ComponentType<any> | React.ReactElement | null;
45
+ }
46
+ export declare function StandaloneHistoryList({ entries, adapters, selectedEntryId, onSelectEntry, showSource, emptyMessage, ListHeaderComponent, ListFooterComponent, }: StandaloneHistoryListProps): import("react").JSX.Element;
47
+ //# sourceMappingURL=HistoryList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HistoryList.d.ts","sourceRoot":"","sources":["../../../../../src/history/components/HistoryList.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAM5E,MAAM,WAAW,gBAAgB;IAC/B,+BAA+B;IAC/B,MAAM,CAAC,EAAE,aAAa,CAAC;IACvB,kCAAkC;IAClC,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACzC,yCAAyC;IACzC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IAC9C,gDAAgD;IAChD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iCAAiC;IACjC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yBAAyB;IACzB,mBAAmB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;IAC3E,yBAAyB;IACzB,mBAAmB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;CAC5E;AAED,wBAAgB,WAAW,CAAC,EAC1B,MAAM,EACN,eAAe,EACf,aAAa,EACb,UAAiB,EACjB,YAAuC,EACvC,mBAAmB,EACnB,mBAAmB,GACpB,EAAE,gBAAgB,+BAiElB;AAED;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC,yBAAyB;IACzB,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,oCAAoC;IACpC,QAAQ,CAAC,EAAE,cAAc,EAAE,CAAC;IAC5B,kCAAkC;IAClC,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IACzC,yCAAyC;IACzC,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,CAAC;IAC9C,oCAAoC;IACpC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,2BAA2B;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yBAAyB;IACzB,mBAAmB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;IAC3E,yBAAyB;IACzB,mBAAmB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,YAAY,GAAG,IAAI,CAAC;CAC5E;AAED,wBAAgB,qBAAqB,CAAC,EACpC,OAAO,EACP,QAAa,EACb,eAAe,EACf,aAAa,EACb,UAAiB,EACjB,YAAuC,EACvC,mBAAmB,EACnB,mBAAmB,GACpB,EAAE,0BAA0B,+BA4D5B"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Universal History DevTools Components
3
+ */
4
+ export { HistoryEntryRow, type HistoryEntryRowProps } from "./HistoryEntryRow";
5
+ export { HistoryList, StandaloneHistoryList, type HistoryListProps, type StandaloneHistoryListProps, } from "./HistoryList";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/history/components/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC/E,OAAO,EACL,WAAW,EACX,qBAAqB,EACrB,KAAK,gBAAgB,EACrB,KAAK,0BAA0B,GAChC,MAAM,eAAe,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Universal History DevTools
3
+ *
4
+ * A unified devtools experience for Redux, Zustand, MMKV, React Query, and more.
5
+ */
6
+ export type { HistorySource, HistoryEntry, AdapterCapabilities, HistoryAdapter, AdapterRegistration, HistoryFilter, HistoryDisplayOptions, } from "./types";
7
+ export { HistoryProvider, useHistoryContext, useHistoryAdapters, useHistoryAdapter, useAllHistoryEntries, useHistoryEntryCounts, } from "./HistoryProvider";
8
+ export { HistoryEntryRow, HistoryList, StandaloneHistoryList, type HistoryEntryRowProps, type HistoryListProps, type StandaloneHistoryListProps, } from "./components";
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/history/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,YAAY,EACV,aAAa,EACb,YAAY,EACZ,mBAAmB,EACnB,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,qBAAqB,GACtB,MAAM,SAAS,CAAC;AAGjB,OAAO,EACL,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,eAAe,EACf,WAAW,EACX,qBAAqB,EACrB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,0BAA0B,GAChC,MAAM,cAAc,CAAC"}