@buoy-gg/redux 7.0.21 → 7.0.23

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.
@@ -23,8 +23,12 @@ var _jsxRuntime = require("react/jsx-runtime");
23
23
  * providing zero-config action capture for the DevTools.
24
24
  */
25
25
 
26
- /** Free tier limit for action history */
27
- const FREE_TIER_ACTION_LIMIT = exports.FREE_TIER_ACTION_LIMIT = 25;
26
+ /**
27
+ * @deprecated Read the live limit with `useLimit("redux.actions")` — this
28
+ * constant only ever reports the FREE tier's value and is blind to the
29
+ * anonymous tier. Kept because it is part of the package's public exports.
30
+ */
31
+ const FREE_TIER_ACTION_LIMIT = exports.FREE_TIER_ACTION_LIMIT = _sharedUi.TIER_LIMITS["redux.actions"].free;
28
32
  function EmptyState({
29
33
  isEnabled
30
34
  }) {
@@ -54,6 +58,7 @@ function ReduxModal({
54
58
  initialDetailView
55
59
  }) {
56
60
  const isPro = (0, _license.useIsPro)();
61
+ const actionLimit = (0, _sharedUi.useLimit)("redux.actions");
57
62
  const [showProModal, setShowProModal] = (0, _react.useState)(false);
58
63
 
59
64
  // Auto-instrument the Redux store (zero-config)
@@ -74,17 +79,10 @@ function ReduxModal({
74
79
  toggleCapture
75
80
  } = (0, _useReduxActions.useReduxActions)();
76
81
 
77
- // For free users, limit visible actions to FREE_TIER_ACTION_LIMIT
78
- const visibleActions = (0, _react.useMemo)(() => {
79
- if (isPro) return filteredActions;
80
- return filteredActions.slice(0, FREE_TIER_ACTION_LIMIT);
81
- }, [filteredActions, isPro]);
82
-
83
- // Calculate how many actions are locked
84
- const lockedActionCount = (0, _react.useMemo)(() => {
85
- if (isPro) return 0;
86
- return Math.max(0, filteredActions.length - FREE_TIER_ACTION_LIMIT);
87
- }, [filteredActions.length, isPro]);
82
+ // Pro is Infinity here, so slice() returns everything and the locked count
83
+ // floors at 0 — no tier branching needed at the call site.
84
+ const visibleActions = (0, _react.useMemo)(() => filteredActions.slice(0, actionLimit), [filteredActions, actionLimit]);
85
+ const lockedActionCount = (0, _react.useMemo)(() => Math.max(0, filteredActions.length - actionLimit), [filteredActions.length, actionLimit]);
88
86
  const hasLockedActions = lockedActionCount > 0;
89
87
 
90
88
  // Selection state - track index for navigation
@@ -9,7 +9,7 @@
9
9
 
10
10
  import { useState, useMemo, useRef, useCallback, useEffect } from "react";
11
11
  import { View, Text, StyleSheet, FlatList, TextInput, TouchableOpacity } from "react-native";
12
- import { JsModal, ModalHeader, macOSColors, buoyColors, Search, Trash2, Power, X, Zap, CheckCircle, Copy, Lock, AlertTriangle, devToolsStorageKeys, copyToClipboard, ProUpgradeModal, PowerToggleButton, TickProvider } from "@buoy-gg/shared-ui";
12
+ import { JsModal, ModalHeader, macOSColors, buoyColors, Search, Trash2, Power, X, Zap, CheckCircle, Copy, Lock, AlertTriangle, devToolsStorageKeys, copyToClipboard, ProUpgradeModal, PowerToggleButton, TickProvider, useLimit, TIER_LIMITS } from "@buoy-gg/shared-ui";
13
13
  import { useIsPro } from "@buoy-gg/license";
14
14
  import { useReduxActions } from "../hooks/useReduxActions";
15
15
  import { reduxActionStore } from "../utils/reduxActionStore";
@@ -17,8 +17,12 @@ import { useAutoInstrumentRedux } from "../hooks/useAutoInstrumentRedux";
17
17
  import { ReduxActionItem } from "./ReduxActionItem";
18
18
  import { ReduxActionDetailContent, ReduxActionDetailFooter } from "./ReduxActionDetailContent";
19
19
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
20
- /** Free tier limit for action history */
21
- export const FREE_TIER_ACTION_LIMIT = 25;
20
+ /**
21
+ * @deprecated Read the live limit with `useLimit("redux.actions")` — this
22
+ * constant only ever reports the FREE tier's value and is blind to the
23
+ * anonymous tier. Kept because it is part of the package's public exports.
24
+ */
25
+ export const FREE_TIER_ACTION_LIMIT = TIER_LIMITS["redux.actions"].free;
22
26
  function EmptyState({
23
27
  isEnabled
24
28
  }) {
@@ -48,6 +52,7 @@ export function ReduxModal({
48
52
  initialDetailView
49
53
  }) {
50
54
  const isPro = useIsPro();
55
+ const actionLimit = useLimit("redux.actions");
51
56
  const [showProModal, setShowProModal] = useState(false);
52
57
 
53
58
  // Auto-instrument the Redux store (zero-config)
@@ -68,17 +73,10 @@ export function ReduxModal({
68
73
  toggleCapture
69
74
  } = useReduxActions();
70
75
 
71
- // For free users, limit visible actions to FREE_TIER_ACTION_LIMIT
72
- const visibleActions = useMemo(() => {
73
- if (isPro) return filteredActions;
74
- return filteredActions.slice(0, FREE_TIER_ACTION_LIMIT);
75
- }, [filteredActions, isPro]);
76
-
77
- // Calculate how many actions are locked
78
- const lockedActionCount = useMemo(() => {
79
- if (isPro) return 0;
80
- return Math.max(0, filteredActions.length - FREE_TIER_ACTION_LIMIT);
81
- }, [filteredActions.length, isPro]);
76
+ // Pro is Infinity here, so slice() returns everything and the locked count
77
+ // floors at 0 — no tier branching needed at the call site.
78
+ const visibleActions = useMemo(() => filteredActions.slice(0, actionLimit), [filteredActions, actionLimit]);
79
+ const lockedActionCount = useMemo(() => Math.max(0, filteredActions.length - actionLimit), [filteredActions.length, actionLimit]);
82
80
  const hasLockedActions = lockedActionCount > 0;
83
81
 
84
82
  // Selection state - track index for navigation
@@ -6,8 +6,12 @@
6
6
  */
7
7
  import type { ReduxDetailViewMode } from "./ReduxDetailViewToggle";
8
8
  import type { ReduxAction } from "../types";
9
- /** Free tier limit for action history */
10
- export declare const FREE_TIER_ACTION_LIMIT = 25;
9
+ /**
10
+ * @deprecated Read the live limit with `useLimit("redux.actions")` — this
11
+ * constant only ever reports the FREE tier's value and is blind to the
12
+ * anonymous tier. Kept because it is part of the package's public exports.
13
+ */
14
+ export declare const FREE_TIER_ACTION_LIMIT: number;
11
15
  interface ReduxModalProps {
12
16
  /**
13
17
  * Render as a header-bar + body (+ footer) stack instead of inside `JsModal`,
@@ -1 +1 @@
1
- {"version":3,"file":"ReduxModal.d.ts","sourceRoot":"","sources":["../../../../src/redux/components/ReduxModal.tsx"],"names":[],"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sBAAsB,QAAoC,CAAC;AAExE,UAAU,eAAe;IACvB;;;;;OAKG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC;;;;OAIG;IACH,cAAc,CAAC,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;IAC/C;;;;;;;OAOG;IACH,uBAAuB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,+EAA+E;IAC/E,iBAAiB,CAAC,EAAE,mBAAmB,CAAC;CACzC;AAgBD,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,OAAO,EACP,MAAM,EACN,UAAU,EACV,2BAAmC,EACnC,MAAc,EACd,cAAc,EACd,uBAAuB,EACvB,iBAAiB,GAClB,EAAE,eAAe,sCAocjB;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAC3B,KAAK,GAAE,IAAI,CAAC,eAAe,EAAE,SAAS,GAAG,SAAS,GAAG,QAAQ,CAAM,+BAGpE"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buoy-gg/redux",
3
- "version": "7.0.21",
3
+ "version": "7.0.23",
4
4
  "description": "Redux DevTools inside your React Native app — action log, state diffs & time travel with zero store changes. Part of Buoy devtools.",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -31,9 +31,9 @@
31
31
  "**/snapshotProvider.ts"
32
32
  ],
33
33
  "dependencies": {
34
- "@buoy-gg/shared-ui": "^7.0.21",
35
- "@buoy-gg/floating-tools-core": "^7.0.21",
36
- "@buoy-gg/license": "^7.0.21"
34
+ "@buoy-gg/shared-ui": "^7.0.23",
35
+ "@buoy-gg/license": "^7.0.23",
36
+ "@buoy-gg/floating-tools-core": "^7.0.23"
37
37
  },
38
38
  "peerDependencies": {
39
39
  "@reduxjs/toolkit": ">=1.9.0",
@@ -80,7 +80,7 @@
80
80
  "bugs": {
81
81
  "url": "https://github.com/LovesWorking/react-native-buoy/issues"
82
82
  },
83
- "homepage": "https://buoy.gg/tools/redux",
83
+ "homepage": "https://buoy.gg/buoy/latest/docs/tools/redux",
84
84
  "publishConfig": {
85
85
  "access": "public",
86
86
  "tag": "latest"