@buoy-gg/shared-ui 1.7.8 → 2.1.2

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 (99) hide show
  1. package/lib/commonjs/JsModal.js +33 -8
  2. package/lib/commonjs/clipboard/clipboard-impl.js +1 -1
  3. package/lib/commonjs/dataViewer/VirtualizedDataExplorer.js +20 -23
  4. package/lib/commonjs/hooks/safe-area-impl.js +1 -1
  5. package/lib/commonjs/hooks/useSafeAreaInsets.js +1 -22
  6. package/lib/commonjs/index.js +0 -42
  7. package/lib/commonjs/license/DeviceLimitModal.js +479 -0
  8. package/lib/commonjs/license/FeatureGate.js +4 -9
  9. package/lib/commonjs/license/LicenseEntryModal.js +205 -770
  10. package/lib/commonjs/license/index.js +0 -7
  11. package/lib/commonjs/settings/components/BubbleSettingsSection.js +7 -7
  12. package/lib/commonjs/storage/devToolsStorageKeys.js +11 -0
  13. package/lib/commonjs/ui/components/CopyButton.js +3 -5
  14. package/lib/commonjs/ui/components/DevToolsCard.js +106 -0
  15. package/lib/commonjs/ui/components/ExpandablePopover.js +6 -6
  16. package/lib/commonjs/ui/components/PowerToggleButton.js +73 -0
  17. package/lib/commonjs/ui/components/index.js +20 -0
  18. package/lib/commonjs/utils/index.js +0 -31
  19. package/lib/module/JsModal.js +34 -9
  20. package/lib/module/clipboard/clipboard-impl.js +1 -1
  21. package/lib/module/dataViewer/VirtualizedDataExplorer.js +20 -23
  22. package/lib/module/hooks/safe-area-impl.js +1 -1
  23. package/lib/module/hooks/useSafeAreaInsets.js +0 -20
  24. package/lib/module/index.js +2 -4
  25. package/lib/module/license/DeviceLimitModal.js +473 -0
  26. package/lib/module/license/FeatureGate.js +4 -9
  27. package/lib/module/license/LicenseEntryModal.js +209 -773
  28. package/lib/module/license/index.js +0 -1
  29. package/lib/module/settings/components/BubbleSettingsSection.js +7 -7
  30. package/lib/module/storage/devToolsStorageKeys.js +11 -0
  31. package/lib/module/ui/components/CopyButton.js +3 -5
  32. package/lib/module/ui/components/DevToolsCard.js +102 -0
  33. package/lib/module/ui/components/ExpandablePopover.js +6 -6
  34. package/lib/module/ui/components/PowerToggleButton.js +69 -0
  35. package/lib/module/ui/components/index.js +2 -0
  36. package/lib/module/utils/index.js +0 -1
  37. package/lib/typescript/commonjs/JsModal.d.ts +2 -0
  38. package/lib/typescript/commonjs/JsModal.d.ts.map +1 -1
  39. package/lib/typescript/commonjs/clipboard/clipboard-impl.d.ts +1 -1
  40. package/lib/typescript/commonjs/dataViewer/VirtualizedDataExplorer.d.ts.map +1 -1
  41. package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
  42. package/lib/typescript/commonjs/hooks/useSafeAreaInsets.d.ts +0 -13
  43. package/lib/typescript/commonjs/hooks/useSafeAreaInsets.d.ts.map +1 -1
  44. package/lib/typescript/commonjs/index.d.ts +3 -3
  45. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  46. package/lib/typescript/commonjs/license/DeviceLimitModal.d.ts +23 -0
  47. package/lib/typescript/commonjs/license/DeviceLimitModal.d.ts.map +1 -0
  48. package/lib/typescript/commonjs/license/FeatureGate.d.ts.map +1 -1
  49. package/lib/typescript/commonjs/license/LicenseEntryModal.d.ts +10 -62
  50. package/lib/typescript/commonjs/license/LicenseEntryModal.d.ts.map +1 -1
  51. package/lib/typescript/commonjs/license/index.d.ts +0 -2
  52. package/lib/typescript/commonjs/license/index.d.ts.map +1 -1
  53. package/lib/typescript/commonjs/storage/devToolsStorageKeys.d.ts +11 -0
  54. package/lib/typescript/commonjs/storage/devToolsStorageKeys.d.ts.map +1 -1
  55. package/lib/typescript/commonjs/ui/components/CopyButton.d.ts +0 -2
  56. package/lib/typescript/commonjs/ui/components/CopyButton.d.ts.map +1 -1
  57. package/lib/typescript/commonjs/ui/components/DevToolsCard.d.ts +54 -0
  58. package/lib/typescript/commonjs/ui/components/DevToolsCard.d.ts.map +1 -0
  59. package/lib/typescript/commonjs/ui/components/PowerToggleButton.d.ts +32 -0
  60. package/lib/typescript/commonjs/ui/components/PowerToggleButton.d.ts.map +1 -0
  61. package/lib/typescript/commonjs/ui/components/index.d.ts +4 -0
  62. package/lib/typescript/commonjs/ui/components/index.d.ts.map +1 -1
  63. package/lib/typescript/commonjs/utils/index.d.ts +0 -1
  64. package/lib/typescript/commonjs/utils/index.d.ts.map +1 -1
  65. package/lib/typescript/module/JsModal.d.ts +2 -0
  66. package/lib/typescript/module/JsModal.d.ts.map +1 -1
  67. package/lib/typescript/module/clipboard/clipboard-impl.d.ts +1 -1
  68. package/lib/typescript/module/dataViewer/VirtualizedDataExplorer.d.ts.map +1 -1
  69. package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
  70. package/lib/typescript/module/hooks/useSafeAreaInsets.d.ts +0 -13
  71. package/lib/typescript/module/hooks/useSafeAreaInsets.d.ts.map +1 -1
  72. package/lib/typescript/module/index.d.ts +3 -3
  73. package/lib/typescript/module/index.d.ts.map +1 -1
  74. package/lib/typescript/module/license/DeviceLimitModal.d.ts +23 -0
  75. package/lib/typescript/module/license/DeviceLimitModal.d.ts.map +1 -0
  76. package/lib/typescript/module/license/FeatureGate.d.ts.map +1 -1
  77. package/lib/typescript/module/license/LicenseEntryModal.d.ts +10 -62
  78. package/lib/typescript/module/license/LicenseEntryModal.d.ts.map +1 -1
  79. package/lib/typescript/module/license/index.d.ts +0 -2
  80. package/lib/typescript/module/license/index.d.ts.map +1 -1
  81. package/lib/typescript/module/storage/devToolsStorageKeys.d.ts +11 -0
  82. package/lib/typescript/module/storage/devToolsStorageKeys.d.ts.map +1 -1
  83. package/lib/typescript/module/ui/components/CopyButton.d.ts +0 -2
  84. package/lib/typescript/module/ui/components/CopyButton.d.ts.map +1 -1
  85. package/lib/typescript/module/ui/components/DevToolsCard.d.ts +54 -0
  86. package/lib/typescript/module/ui/components/DevToolsCard.d.ts.map +1 -0
  87. package/lib/typescript/module/ui/components/PowerToggleButton.d.ts +32 -0
  88. package/lib/typescript/module/ui/components/PowerToggleButton.d.ts.map +1 -0
  89. package/lib/typescript/module/ui/components/index.d.ts +4 -0
  90. package/lib/typescript/module/ui/components/index.d.ts.map +1 -1
  91. package/lib/typescript/module/utils/index.d.ts +0 -1
  92. package/lib/typescript/module/utils/index.d.ts.map +1 -1
  93. package/package.json +3 -3
  94. package/lib/commonjs/utils/safeAsyncStorage.js +0 -71
  95. package/lib/module/utils/safeAsyncStorage.js +0 -64
  96. package/lib/typescript/commonjs/utils/safeAsyncStorage.d.ts +0 -35
  97. package/lib/typescript/commonjs/utils/safeAsyncStorage.d.ts.map +0 -1
  98. package/lib/typescript/module/utils/safeAsyncStorage.d.ts +0 -35
  99. package/lib/typescript/module/utils/safeAsyncStorage.d.ts.map +0 -1
@@ -9,7 +9,7 @@ var _reactNative = require("react-native");
9
9
  var _useSafeAreaInsets = require("./hooks/useSafeAreaInsets.js");
10
10
  var _index = require("./ui/gameUI/index.js");
11
11
  var _index2 = require("./ui/components/index.js");
12
- var _safeAsyncStorage = require("./utils/safeAsyncStorage.js");
12
+ var _persistentStorage = require("./utils/persistentStorage.js");
13
13
  var _devToolsStorageKeys = require("./storage/devToolsStorageKeys.js");
14
14
  var _index3 = require("./context/index.js");
15
15
  var _jsxRuntime = require("react/jsx-runtime");
@@ -58,7 +58,7 @@ class ModalStorage {
58
58
  static async save(key, value) {
59
59
  try {
60
60
  this.memoryCache[key] = value;
61
- await (0, _safeAsyncStorage.safeSetItem)(key, JSON.stringify(value));
61
+ await _persistentStorage.persistentStorage.setItem(key, JSON.stringify(value));
62
62
  } catch (error) {
63
63
  // Failed to save modal state
64
64
  }
@@ -78,7 +78,7 @@ class ModalStorage {
78
78
  }
79
79
 
80
80
  // Load from storage (AsyncStorage or memory fallback)
81
- const stored = await (0, _safeAsyncStorage.safeGetItem)(key);
81
+ const stored = await _persistentStorage.persistentStorage.getItem(key);
82
82
  if (stored) {
83
83
  const parsed = JSON.parse(stored);
84
84
  this.memoryCache[key] = parsed;
@@ -339,7 +339,8 @@ const JsModalComponent = ({
339
339
  onMinimize,
340
340
  minimizeTargetPosition,
341
341
  initialModalState,
342
- zIndex
342
+ zIndex,
343
+ disableScrollWrapper = false
343
344
  }) => {
344
345
  const insets = (0, _useSafeAreaInsets.useSafeAreaInsets)();
345
346
  const [isStateLoaded, setIsStateLoaded] = (0, _react.useState)(!enablePersistence);
@@ -429,7 +430,7 @@ const JsModalComponent = ({
429
430
  const loadHintStatus = async () => {
430
431
  try {
431
432
  const hintKey = _devToolsStorageKeys.devToolsStorageKeys.modal.hintAcknowledged();
432
- const acknowledged = await (0, _safeAsyncStorage.safeGetItem)(hintKey);
433
+ const acknowledged = await _persistentStorage.persistentStorage.getItem(hintKey);
433
434
  if (mounted) {
434
435
  // Show hint if not acknowledged yet
435
436
  setShowHint(acknowledged !== "true");
@@ -453,7 +454,7 @@ const JsModalComponent = ({
453
454
  const handleHintAcknowledge = (0, _react.useCallback)(async () => {
454
455
  try {
455
456
  const hintKey = _devToolsStorageKeys.devToolsStorageKeys.modal.hintAcknowledged();
456
- await (0, _safeAsyncStorage.safeSetItem)(hintKey, "true");
457
+ await _persistentStorage.persistentStorage.setItem(hintKey, "true");
457
458
  setShowHint(false);
458
459
  } catch (error) {
459
460
  // Failed to save hint acknowledgment, just hide it locally
@@ -1101,7 +1102,19 @@ const JsModalComponent = ({
1101
1102
  })
1102
1103
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1103
1104
  style: [styles.content, customStyles.content],
1104
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
1105
+ children: [disableScrollWrapper ?
1106
+ /*#__PURE__*/
1107
+ // Render children directly when they manage their own scrolling (FlatList, etc.)
1108
+ (0, _jsxRuntime.jsx)(_reactNative.View, {
1109
+ style: {
1110
+ flex: 1,
1111
+ paddingBottom: footerHeight
1112
+ },
1113
+ children: children
1114
+ }) :
1115
+ /*#__PURE__*/
1116
+ // Wrap in ScrollView for content that needs scrolling
1117
+ (0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
1105
1118
  style: {
1106
1119
  flex: 1
1107
1120
  },
@@ -1190,7 +1203,19 @@ const JsModalComponent = ({
1190
1203
  onAcknowledge: handleHintAcknowledge
1191
1204
  }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
1192
1205
  style: [styles.content, customStyles.content],
1193
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
1206
+ children: [disableScrollWrapper ?
1207
+ /*#__PURE__*/
1208
+ // Render children directly when they manage their own scrolling (FlatList, etc.)
1209
+ (0, _jsxRuntime.jsx)(_reactNative.View, {
1210
+ style: {
1211
+ flex: 1,
1212
+ paddingBottom: footerHeight
1213
+ },
1214
+ children: children
1215
+ }) :
1216
+ /*#__PURE__*/
1217
+ // Wrap in ScrollView for content that needs scrolling
1218
+ (0, _jsxRuntime.jsx)(_reactNative.ScrollView, {
1194
1219
  style: {
1195
1220
  flex: 1
1196
1221
  },
@@ -7,7 +7,7 @@ exports.isClipboardAvailable = exports.clipboardType = exports.clipboardFunction
7
7
  /**
8
8
  * Auto-generated clipboard implementation
9
9
  * Detected: none
10
- * Generated at: 2026-01-09T18:05:40.988Z
10
+ * Generated at: 2026-01-29T01:02:34.738Z
11
11
  *
12
12
  * DO NOT EDIT - This file is generated by scripts/detect-clipboard.js
13
13
  *
@@ -730,8 +730,7 @@ const VirtualizedItemComponent = ({
730
730
  data,
731
731
  index,
732
732
  onSelect,
733
- isSelected,
734
- disableCopy = false
733
+ isSelected
735
734
  }) => {
736
735
  const [isPressed, setIsPressed] = (0, _react.useState)(false);
737
736
  const [showFullKey, setShowFullKey] = (0, _react.useState)(false);
@@ -754,9 +753,9 @@ const VirtualizedItemComponent = ({
754
753
 
755
754
  // Always show full key for better identification
756
755
  const displayKey = item.key;
757
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
756
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
758
757
  style: [STABLE_STYLES.itemContainer, indentStyle],
759
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
758
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
760
759
  "sentry-label": "ignore devtools data explorer item",
761
760
  style: [STABLE_STYLES.itemTouchable, isPressed && STABLE_STYLES.itemTouchablePressed, isSelected && STABLE_STYLES.itemSelected, isLongKey && {
762
761
  minHeight: LONG_ITEM_HEIGHT,
@@ -778,21 +777,12 @@ const VirtualizedItemComponent = ({
778
777
  style: STABLE_STYLES.labelText,
779
778
  numberOfLines: 1,
780
779
  children: [item.key, ":"]
781
- }), item.isExpandable ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
782
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
783
- style: [STABLE_STYLES.valueText, {
784
- color: _index.gameUIColors.secondary
785
- }],
786
- numberOfLines: 1,
787
- children: [item.valueType, " (", item.childCount, " ", item.childCount === 1 ? "item" : "items", ")"]
788
- }), item.id === "root" && data && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CopyButton.CopyButton, {
789
- value: data,
790
- size: 16,
791
- buttonStyle: {
792
- marginLeft: 8
793
- },
794
- disabled: disableCopy
795
- })]
780
+ }), item.isExpandable ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
781
+ style: [STABLE_STYLES.valueText, {
782
+ color: _index.gameUIColors.secondary
783
+ }],
784
+ numberOfLines: 1,
785
+ children: [item.valueType, " (", item.childCount, " ", item.childCount === 1 ? "item" : "items", ")"]
796
786
  }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
797
787
  style: [STABLE_STYLES.valueText, {
798
788
  color
@@ -801,7 +791,14 @@ const VirtualizedItemComponent = ({
801
791
  children: formatValue(item.value, item.valueType)
802
792
  })]
803
793
  })]
804
- })
794
+ }), item.id === "root" && data !== undefined && data !== null ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_CopyButton.CopyButton, {
795
+ value: data,
796
+ size: 16,
797
+ buttonStyle: {
798
+ marginLeft: 8,
799
+ marginRight: 8
800
+ }
801
+ }) : null]
805
802
  });
806
803
  };
807
804
  VirtualizedItemComponent.displayName = "VirtualizedItem";
@@ -816,7 +813,8 @@ const VirtualizedDataExplorer = ({
816
813
  maxDepth = 10,
817
814
  rawMode = false,
818
815
  initialExpanded = false,
819
- disableCopy = false
816
+ // disableCopy is accepted for API compatibility but CopyButton handles Pro gating internally
817
+ disableCopy: _disableCopy = false
820
818
  }) => {
821
819
  const [isExpanded, setIsExpanded] = (0, _react.useState)(rawMode); // Auto-expand in raw mode
822
820
  const {
@@ -882,8 +880,7 @@ const VirtualizedDataExplorer = ({
882
880
  onToggleExpanded: toggleExpanded,
883
881
  data: data,
884
882
  onSelect: setSelectedIndex,
885
- isSelected: selectedIndex === index,
886
- disableCopy: disableCopy
883
+ isSelected: selectedIndex === index
887
884
  });
888
885
 
889
886
  // Uniform row height for crisp guide geometry
@@ -7,7 +7,7 @@ exports.useNativeSafeAreaInsets = exports.safeAreaType = exports.hasSafeAreaPack
7
7
  /**
8
8
  * Auto-generated safe area implementation
9
9
  * Detected: none
10
- * Generated at: 2026-01-09T18:05:41.014Z
10
+ * Generated at: 2026-01-29T01:02:34.764Z
11
11
  *
12
12
  * DO NOT EDIT - This file is generated by scripts/detect-safe-area.js
13
13
  *
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useSafeAreaInsets = exports.useSafeAreaFrame = exports.hasNotch = exports.getSafeAreaInsets = exports.SafeAreaConfig = void 0;
6
+ exports.useSafeAreaInsets = exports.hasNotch = exports.getSafeAreaInsets = exports.SafeAreaConfig = void 0;
7
7
  var _react = require("react");
8
8
  var _reactNative = require("react-native");
9
9
  var _safeAreaImpl = require("./safe-area-impl.js");
@@ -221,26 +221,6 @@ const SafeAreaConfig = exports.SafeAreaConfig = {
221
221
  }
222
222
  };
223
223
 
224
- /**
225
- * Compatibility hook that returns the window frame dimensions
226
- *
227
- * @returns Frame object with x, y, width, height properties
228
- *
229
- * @deprecated Use Dimensions.get("window") directly instead
230
- */
231
- const useSafeAreaFrame = () => {
232
- const {
233
- width,
234
- height
235
- } = _reactNative.Dimensions.get("window");
236
- return {
237
- x: 0,
238
- y: 0,
239
- width,
240
- height
241
- };
242
- };
243
-
244
224
  /**
245
225
  * Export the pure JS implementation directly for compatibility
246
226
  *
@@ -252,5 +232,4 @@ const useSafeAreaFrame = () => {
252
232
  * console.log(`Top inset: ${insets.top}px`);
253
233
  * ```
254
234
  */
255
- exports.useSafeAreaFrame = useSafeAreaFrame;
256
235
  const getSafeAreaInsets = exports.getSafeAreaInsets = getPureJSSafeAreaInsets;
@@ -7,11 +7,6 @@ var _exportNames = {
7
7
  displayValue: true,
8
8
  parseDisplayValue: true,
9
9
  getSafeAreaInsets: true,
10
- safeGetItem: true,
11
- safeSetItem: true,
12
- safeRemoveItem: true,
13
- isPersistentStorageAvailable: true,
14
- useSafeAsyncStorage: true,
15
10
  persistentStorage: true,
16
11
  isUsingPersistentStorage: true,
17
12
  getStorageBackendType: true,
@@ -54,7 +49,6 @@ var _exportNames = {
54
49
  ProFeatureBanner: true,
55
50
  UpgradeModal: true,
56
51
  LicenseEntryModal: true,
57
- ManageDevicesModal: true,
58
52
  ProBadge: true,
59
53
  ProUpgradeModal: true,
60
54
  getUseIsPro: true,
@@ -102,12 +96,6 @@ Object.defineProperty(exports, "LicenseEntryModal", {
102
96
  return _index11.LicenseEntryModal;
103
97
  }
104
98
  });
105
- Object.defineProperty(exports, "ManageDevicesModal", {
106
- enumerable: true,
107
- get: function () {
108
- return _index11.ManageDevicesModal;
109
- }
110
- });
111
99
  Object.defineProperty(exports, "ProBadge", {
112
100
  enumerable: true,
113
101
  get: function () {
@@ -252,12 +240,6 @@ Object.defineProperty(exports, "isJsonSerializable", {
252
240
  return _index2.isJsonSerializable;
253
241
  }
254
242
  });
255
- Object.defineProperty(exports, "isPersistentStorageAvailable", {
256
- enumerable: true,
257
- get: function () {
258
- return _index2.isPersistentStorageAvailable;
259
- }
260
- });
261
243
  Object.defineProperty(exports, "isPlainObjectUtil", {
262
244
  enumerable: true,
263
245
  get: function () {
@@ -318,24 +300,6 @@ Object.defineProperty(exports, "persistentStorage", {
318
300
  return _index2.persistentStorage;
319
301
  }
320
302
  });
321
- Object.defineProperty(exports, "safeGetItem", {
322
- enumerable: true,
323
- get: function () {
324
- return _index2.safeGetItem;
325
- }
326
- });
327
- Object.defineProperty(exports, "safeRemoveItem", {
328
- enumerable: true,
329
- get: function () {
330
- return _index2.safeRemoveItem;
331
- }
332
- });
333
- Object.defineProperty(exports, "safeSetItem", {
334
- enumerable: true,
335
- get: function () {
336
- return _index2.safeSetItem;
337
- }
338
- });
339
303
  Object.defineProperty(exports, "safeStringify", {
340
304
  enumerable: true,
341
305
  get: function () {
@@ -384,12 +348,6 @@ Object.defineProperty(exports, "useSafeAreaInsets", {
384
348
  return _index0.useSafeAreaInsets;
385
349
  }
386
350
  });
387
- Object.defineProperty(exports, "useSafeAsyncStorage", {
388
- enumerable: true,
389
- get: function () {
390
- return _index2.useSafeAsyncStorage;
391
- }
392
- });
393
351
  var _index = require("./ui/index.js");
394
352
  Object.keys(_index).forEach(function (key) {
395
353
  if (key === "default" || key === "__esModule") return;