@buoy-gg/redux 4.0.2 → 6.0.0

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.
@@ -3,7 +3,8 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.ReduxActionItem = ReduxActionItem;
6
+ exports.ReduxActionItem = void 0;
7
+ var _react = require("react");
7
8
  var _reactNative = require("react-native");
8
9
  var _sharedUi = require("@buoy-gg/shared-ui");
9
10
  var _reduxActionStore = require("../utils/reduxActionStore");
@@ -206,11 +207,15 @@ function getPrimaryText(action) {
206
207
  }
207
208
  return action.type;
208
209
  }
209
- function ReduxActionItem({
210
+
211
+ // Memo justified by profiling (tool-bench 2026-07-06): ReduxActionItem
212
+ // x172 renders during a 5s idle dwell at 200 seeded actions. The relative
213
+ // timestamp is delegated to the shared <RelativeTime/> leaf so the 5s
214
+ // tick re-renders only that Text, not this row.
215
+ const ReduxActionItem = exports.ReduxActionItem = /*#__PURE__*/(0, _react.memo)(function ReduxActionItem({
210
216
  action,
211
217
  onPress
212
218
  }) {
213
- const relativeTime = (0, _sharedUi.useRelativeTime)(action.timestamp);
214
219
  const sliceName = action.sliceName ?? undefined;
215
220
  const statusColor = getStatusColor(action.category, action.hasStateChange, sliceName);
216
221
  const statusLabel = getStatusLabel(action.category, sliceName);
@@ -323,7 +328,9 @@ function ReduxActionItem({
323
328
  statusLabel: statusLabel,
324
329
  statusSublabel: sublabel,
325
330
  primaryText: primaryText,
326
- bottomRightText: relativeTime
331
+ bottomRightText: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.RelativeTime, {
332
+ timestamp: action.timestamp
333
+ })
327
334
  // Use customBadge if we have special indicators, otherwise show action badge as text
328
335
  ,
329
336
  customBadge: customBadge,
@@ -332,7 +339,7 @@ function ReduxActionItem({
332
339
  showChevron: true,
333
340
  onPress: () => onPress(action)
334
341
  });
335
- }
342
+ });
336
343
  const styles = _reactNative.StyleSheet.create({
337
344
  badgeContainer: {
338
345
  flexDirection: "row",
@@ -281,6 +281,10 @@ function ReduxModal({
281
281
  onIndexChange: handleIndexChange
282
282
  }) : null;
283
283
  const footerHeight = selectedAction && visibleActions.length > 1 ? 68 : 0;
284
+
285
+ // The action list owns its scrolling so FlatList virtualization works
286
+ // (see ZustandModal — same pattern, same tool-bench evidence).
287
+ const listOwnsScroll = selectedAction == null;
284
288
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_sharedUi.TickProvider, {
285
289
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.JsModal, {
286
290
  visible: visible,
@@ -295,6 +299,7 @@ function ReduxModal({
295
299
  enablePersistence: true,
296
300
  initialMode: "bottomSheet",
297
301
  enableGlitchEffects: true,
302
+ disableScrollWrapper: listOwnsScroll,
298
303
  styles: {},
299
304
  footer: footerNode,
300
305
  footerHeight: footerHeight,
@@ -350,10 +355,10 @@ function ReduxModal({
350
355
  contentContainerStyle: styles.listContent,
351
356
  showsVerticalScrollIndicator: true,
352
357
  removeClippedSubviews: true,
353
- initialNumToRender: 15,
354
- maxToRenderPerBatch: 10,
355
- windowSize: 10,
356
- scrollEnabled: false
358
+ initialNumToRender: 12,
359
+ maxToRenderPerBatch: 8,
360
+ windowSize: 5,
361
+ updateCellsBatchingPeriod: 50
357
362
  }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(EmptyState, {
358
363
  isEnabled: isEnabled
359
364
  })]
@@ -5,8 +5,9 @@
5
5
  * Uses shared CompactRow for consistent styling with React Query devtools
6
6
  */
7
7
 
8
+ import { memo } from "react";
8
9
  import { View, Text, StyleSheet } from "react-native";
9
- import { CompactRow, buoyColors, Zap, AlertCircle, Clock, useRelativeTime } from "@buoy-gg/shared-ui";
10
+ import { CompactRow, buoyColors, Zap, AlertCircle, Clock, RelativeTime } from "@buoy-gg/shared-ui";
10
11
  import { reduxActionStore } from "../utils/reduxActionStore";
11
12
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
12
13
  /**
@@ -202,11 +203,15 @@ function getPrimaryText(action) {
202
203
  }
203
204
  return action.type;
204
205
  }
205
- export function ReduxActionItem({
206
+
207
+ // Memo justified by profiling (tool-bench 2026-07-06): ReduxActionItem
208
+ // x172 renders during a 5s idle dwell at 200 seeded actions. The relative
209
+ // timestamp is delegated to the shared <RelativeTime/> leaf so the 5s
210
+ // tick re-renders only that Text, not this row.
211
+ export const ReduxActionItem = /*#__PURE__*/memo(function ReduxActionItem({
206
212
  action,
207
213
  onPress
208
214
  }) {
209
- const relativeTime = useRelativeTime(action.timestamp);
210
215
  const sliceName = action.sliceName ?? undefined;
211
216
  const statusColor = getStatusColor(action.category, action.hasStateChange, sliceName);
212
217
  const statusLabel = getStatusLabel(action.category, sliceName);
@@ -319,7 +324,9 @@ export function ReduxActionItem({
319
324
  statusLabel: statusLabel,
320
325
  statusSublabel: sublabel,
321
326
  primaryText: primaryText,
322
- bottomRightText: relativeTime
327
+ bottomRightText: /*#__PURE__*/_jsx(RelativeTime, {
328
+ timestamp: action.timestamp
329
+ })
323
330
  // Use customBadge if we have special indicators, otherwise show action badge as text
324
331
  ,
325
332
  customBadge: customBadge,
@@ -328,7 +335,7 @@ export function ReduxActionItem({
328
335
  showChevron: true,
329
336
  onPress: () => onPress(action)
330
337
  });
331
- }
338
+ });
332
339
  const styles = StyleSheet.create({
333
340
  badgeContainer: {
334
341
  flexDirection: "row",
@@ -276,6 +276,10 @@ export function ReduxModal({
276
276
  onIndexChange: handleIndexChange
277
277
  }) : null;
278
278
  const footerHeight = selectedAction && visibleActions.length > 1 ? 68 : 0;
279
+
280
+ // The action list owns its scrolling so FlatList virtualization works
281
+ // (see ZustandModal — same pattern, same tool-bench evidence).
282
+ const listOwnsScroll = selectedAction == null;
279
283
  return /*#__PURE__*/_jsxs(TickProvider, {
280
284
  children: [/*#__PURE__*/_jsx(JsModal, {
281
285
  visible: visible,
@@ -290,6 +294,7 @@ export function ReduxModal({
290
294
  enablePersistence: true,
291
295
  initialMode: "bottomSheet",
292
296
  enableGlitchEffects: true,
297
+ disableScrollWrapper: listOwnsScroll,
293
298
  styles: {},
294
299
  footer: footerNode,
295
300
  footerHeight: footerHeight,
@@ -345,10 +350,10 @@ export function ReduxModal({
345
350
  contentContainerStyle: styles.listContent,
346
351
  showsVerticalScrollIndicator: true,
347
352
  removeClippedSubviews: true,
348
- initialNumToRender: 15,
349
- maxToRenderPerBatch: 10,
350
- windowSize: 10,
351
- scrollEnabled: false
353
+ initialNumToRender: 12,
354
+ maxToRenderPerBatch: 8,
355
+ windowSize: 5,
356
+ updateCellsBatchingPeriod: 50
352
357
  }) : /*#__PURE__*/_jsx(EmptyState, {
353
358
  isEnabled: isEnabled
354
359
  })]
@@ -7,6 +7,6 @@ interface ReduxActionItemProps {
7
7
  action: ReduxAction;
8
8
  onPress: (action: ReduxAction) => void;
9
9
  }
10
- export declare function ReduxActionItem({ action, onPress }: ReduxActionItemProps): import("react").JSX.Element;
10
+ export declare const ReduxActionItem: import("react").NamedExoticComponent<ReduxActionItemProps>;
11
11
  export {};
12
12
  //# sourceMappingURL=ReduxActionItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ReduxActionItem.d.ts","sourceRoot":"","sources":["../../../../src/redux/components/ReduxActionItem.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAkB,MAAM,UAAU,CAAC;AAG5D,UAAU,oBAAoB;IAC5B,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;CACxC;AA+JD,wBAAgB,eAAe,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,oBAAoB,+BAmGxE"}
1
+ {"version":3,"file":"ReduxActionItem.d.ts","sourceRoot":"","sources":["../../../../src/redux/components/ReduxActionItem.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,OAAO,KAAK,EAAE,WAAW,EAAkB,MAAM,UAAU,CAAC;AAG5D,UAAU,oBAAoB;IAC5B,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,IAAI,CAAC;CACxC;AAmKD,eAAO,MAAM,eAAe,4DAkG1B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ReduxModal.d.ts","sourceRoot":"","sources":["../../../../src/redux/components/ReduxModal.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AA2CH,yCAAyC;AACzC,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC,UAAU,eAAe;IACvB,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;CACvC;AAgBD,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,OAAO,EACP,MAAM,EACN,UAAU,EACV,2BAAmC,GACpC,EAAE,eAAe,sCA4XjB"}
1
+ {"version":3,"file":"ReduxModal.d.ts","sourceRoot":"","sources":["../../../../src/redux/components/ReduxModal.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AA2CH,yCAAyC;AACzC,eAAO,MAAM,sBAAsB,KAAK,CAAC;AAEzC,UAAU,eAAe;IACvB,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;CACvC;AAgBD,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,OAAO,EACP,MAAM,EACN,UAAU,EACV,2BAAmC,GACpC,EAAE,eAAe,sCAiYjB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@buoy-gg/redux",
3
- "version": "4.0.2",
3
+ "version": "6.0.0",
4
4
  "description": "Redux Toolkit DevTools for React Native",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",
@@ -26,9 +26,9 @@
26
26
  ],
27
27
  "sideEffects": false,
28
28
  "dependencies": {
29
- "@buoy-gg/shared-ui": "4.0.2",
30
- "@buoy-gg/floating-tools-core": "4.0.2",
31
- "@buoy-gg/license": "4.0.2"
29
+ "@buoy-gg/shared-ui": "6.0.0",
30
+ "@buoy-gg/license": "6.0.0",
31
+ "@buoy-gg/floating-tools-core": "6.0.0"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "@reduxjs/toolkit": ">=2.0.0",