@buoy-gg/shared-ui 7.0.30 → 7.0.31

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 (129) hide show
  1. package/lib/commonjs/JsModal.js +18 -2
  2. package/lib/commonjs/JsModal.web.js +7 -4
  3. package/lib/commonjs/dataViewer/DataTreeActionDock.js +4 -2
  4. package/lib/commonjs/dataViewer/LiveExplorer.js +930 -0
  5. package/lib/commonjs/dataViewer/ValueEditModal.js +385 -0
  6. package/lib/commonjs/dataViewer/index.js +47 -0
  7. package/lib/commonjs/dataViewer/nestedPath.js +115 -0
  8. package/lib/commonjs/dataViewer/treeActions.js +3 -2
  9. package/lib/commonjs/dataViewer/useTreeDraft.js +125 -0
  10. package/lib/commonjs/dataViewer/useTreeEditor.js +105 -0
  11. package/lib/commonjs/env/EnvironmentIndicator.js +7 -1
  12. package/lib/commonjs/hooks/safe-area-impl.js +1 -1
  13. package/lib/commonjs/index.js +24 -0
  14. package/lib/commonjs/license/tierLimits.js +14 -0
  15. package/lib/commonjs/storage/devToolsStorageKeys.js +36 -0
  16. package/lib/commonjs/sync/toolActionRegistry.js +166 -0
  17. package/lib/commonjs/sync/toolUiBridge.js +74 -0
  18. package/lib/commonjs/ui/components/CompactRow.js +4 -0
  19. package/lib/commonjs/ui/components/EventHistoryViewer/DiffModeTabs.js +9 -1
  20. package/lib/commonjs/ui/components/ExpandedInfoRow.js +3 -1
  21. package/lib/commonjs/ui/components/ModalHeader.js +7 -4
  22. package/lib/commonjs/ui/components/SearchBar.js +5 -109
  23. package/lib/commonjs/ui/components/ToolButton.js +5 -2
  24. package/lib/module/JsModal.js +18 -2
  25. package/lib/module/JsModal.web.js +7 -4
  26. package/lib/module/dataViewer/DataTreeActionDock.js +4 -2
  27. package/lib/module/dataViewer/LiveExplorer.js +925 -0
  28. package/lib/module/dataViewer/ValueEditModal.js +381 -0
  29. package/lib/module/dataViewer/index.js +10 -1
  30. package/lib/module/dataViewer/nestedPath.js +109 -0
  31. package/lib/module/dataViewer/treeActions.js +3 -2
  32. package/lib/module/dataViewer/useTreeDraft.js +121 -0
  33. package/lib/module/dataViewer/useTreeEditor.js +101 -0
  34. package/lib/module/env/EnvironmentIndicator.js +7 -1
  35. package/lib/module/hooks/safe-area-impl.js +1 -1
  36. package/lib/module/index.js +2 -0
  37. package/lib/module/license/tierLimits.js +14 -0
  38. package/lib/module/storage/devToolsStorageKeys.js +36 -0
  39. package/lib/module/sync/toolActionRegistry.js +154 -0
  40. package/lib/module/sync/toolUiBridge.js +68 -0
  41. package/lib/module/ui/components/CompactRow.js +4 -0
  42. package/lib/module/ui/components/EventHistoryViewer/DiffModeTabs.js +9 -1
  43. package/lib/module/ui/components/ExpandedInfoRow.js +3 -1
  44. package/lib/module/ui/components/ModalHeader.js +7 -4
  45. package/lib/module/ui/components/SearchBar.js +8 -112
  46. package/lib/module/ui/components/ToolButton.js +5 -2
  47. package/lib/typescript/commonjs/JsModal.d.ts.map +1 -1
  48. package/lib/typescript/commonjs/JsModal.web.d.ts.map +1 -1
  49. package/lib/typescript/commonjs/dataViewer/DataTreeActionDock.d.ts +6 -1
  50. package/lib/typescript/commonjs/dataViewer/DataTreeActionDock.d.ts.map +1 -1
  51. package/lib/typescript/commonjs/dataViewer/LiveExplorer.d.ts +73 -0
  52. package/lib/typescript/commonjs/dataViewer/LiveExplorer.d.ts.map +1 -0
  53. package/lib/typescript/commonjs/dataViewer/ValueEditModal.d.ts +40 -0
  54. package/lib/typescript/commonjs/dataViewer/ValueEditModal.d.ts.map +1 -0
  55. package/lib/typescript/commonjs/dataViewer/index.d.ts +5 -0
  56. package/lib/typescript/commonjs/dataViewer/index.d.ts.map +1 -1
  57. package/lib/typescript/commonjs/dataViewer/nestedPath.d.ts +20 -0
  58. package/lib/typescript/commonjs/dataViewer/nestedPath.d.ts.map +1 -0
  59. package/lib/typescript/commonjs/dataViewer/treeActions.d.ts +10 -0
  60. package/lib/typescript/commonjs/dataViewer/treeActions.d.ts.map +1 -1
  61. package/lib/typescript/commonjs/dataViewer/useTreeDraft.d.ts +81 -0
  62. package/lib/typescript/commonjs/dataViewer/useTreeDraft.d.ts.map +1 -0
  63. package/lib/typescript/commonjs/dataViewer/useTreeEditor.d.ts +52 -0
  64. package/lib/typescript/commonjs/dataViewer/useTreeEditor.d.ts.map +1 -0
  65. package/lib/typescript/commonjs/env/EnvironmentIndicator.d.ts.map +1 -1
  66. package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
  67. package/lib/typescript/commonjs/index.d.ts +2 -0
  68. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  69. package/lib/typescript/commonjs/license/tierLimits.d.ts +10 -0
  70. package/lib/typescript/commonjs/license/tierLimits.d.ts.map +1 -1
  71. package/lib/typescript/commonjs/storage/devToolsStorageKeys.d.ts +36 -0
  72. package/lib/typescript/commonjs/storage/devToolsStorageKeys.d.ts.map +1 -1
  73. package/lib/typescript/commonjs/sync/toolActionRegistry.d.ts +85 -0
  74. package/lib/typescript/commonjs/sync/toolActionRegistry.d.ts.map +1 -0
  75. package/lib/typescript/commonjs/sync/toolUiBridge.d.ts +39 -0
  76. package/lib/typescript/commonjs/sync/toolUiBridge.d.ts.map +1 -0
  77. package/lib/typescript/commonjs/ui/components/CompactRow.d.ts +5 -1
  78. package/lib/typescript/commonjs/ui/components/CompactRow.d.ts.map +1 -1
  79. package/lib/typescript/commonjs/ui/components/EventHistoryViewer/DiffModeTabs.d.ts.map +1 -1
  80. package/lib/typescript/commonjs/ui/components/EventHistoryViewer/types.d.ts +6 -0
  81. package/lib/typescript/commonjs/ui/components/EventHistoryViewer/types.d.ts.map +1 -1
  82. package/lib/typescript/commonjs/ui/components/ExpandedInfoRow.d.ts +7 -1
  83. package/lib/typescript/commonjs/ui/components/ExpandedInfoRow.d.ts.map +1 -1
  84. package/lib/typescript/commonjs/ui/components/SearchBar.d.ts +1 -3
  85. package/lib/typescript/commonjs/ui/components/SearchBar.d.ts.map +1 -1
  86. package/lib/typescript/commonjs/ui/components/ToolButton.d.ts +5 -1
  87. package/lib/typescript/commonjs/ui/components/ToolButton.d.ts.map +1 -1
  88. package/lib/typescript/module/JsModal.d.ts.map +1 -1
  89. package/lib/typescript/module/JsModal.web.d.ts.map +1 -1
  90. package/lib/typescript/module/dataViewer/DataTreeActionDock.d.ts +6 -1
  91. package/lib/typescript/module/dataViewer/DataTreeActionDock.d.ts.map +1 -1
  92. package/lib/typescript/module/dataViewer/LiveExplorer.d.ts +73 -0
  93. package/lib/typescript/module/dataViewer/LiveExplorer.d.ts.map +1 -0
  94. package/lib/typescript/module/dataViewer/ValueEditModal.d.ts +40 -0
  95. package/lib/typescript/module/dataViewer/ValueEditModal.d.ts.map +1 -0
  96. package/lib/typescript/module/dataViewer/index.d.ts +5 -0
  97. package/lib/typescript/module/dataViewer/index.d.ts.map +1 -1
  98. package/lib/typescript/module/dataViewer/nestedPath.d.ts +20 -0
  99. package/lib/typescript/module/dataViewer/nestedPath.d.ts.map +1 -0
  100. package/lib/typescript/module/dataViewer/treeActions.d.ts +10 -0
  101. package/lib/typescript/module/dataViewer/treeActions.d.ts.map +1 -1
  102. package/lib/typescript/module/dataViewer/useTreeDraft.d.ts +81 -0
  103. package/lib/typescript/module/dataViewer/useTreeDraft.d.ts.map +1 -0
  104. package/lib/typescript/module/dataViewer/useTreeEditor.d.ts +52 -0
  105. package/lib/typescript/module/dataViewer/useTreeEditor.d.ts.map +1 -0
  106. package/lib/typescript/module/env/EnvironmentIndicator.d.ts.map +1 -1
  107. package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
  108. package/lib/typescript/module/index.d.ts +2 -0
  109. package/lib/typescript/module/index.d.ts.map +1 -1
  110. package/lib/typescript/module/license/tierLimits.d.ts +10 -0
  111. package/lib/typescript/module/license/tierLimits.d.ts.map +1 -1
  112. package/lib/typescript/module/storage/devToolsStorageKeys.d.ts +36 -0
  113. package/lib/typescript/module/storage/devToolsStorageKeys.d.ts.map +1 -1
  114. package/lib/typescript/module/sync/toolActionRegistry.d.ts +85 -0
  115. package/lib/typescript/module/sync/toolActionRegistry.d.ts.map +1 -0
  116. package/lib/typescript/module/sync/toolUiBridge.d.ts +39 -0
  117. package/lib/typescript/module/sync/toolUiBridge.d.ts.map +1 -0
  118. package/lib/typescript/module/ui/components/CompactRow.d.ts +5 -1
  119. package/lib/typescript/module/ui/components/CompactRow.d.ts.map +1 -1
  120. package/lib/typescript/module/ui/components/EventHistoryViewer/DiffModeTabs.d.ts.map +1 -1
  121. package/lib/typescript/module/ui/components/EventHistoryViewer/types.d.ts +6 -0
  122. package/lib/typescript/module/ui/components/EventHistoryViewer/types.d.ts.map +1 -1
  123. package/lib/typescript/module/ui/components/ExpandedInfoRow.d.ts +7 -1
  124. package/lib/typescript/module/ui/components/ExpandedInfoRow.d.ts.map +1 -1
  125. package/lib/typescript/module/ui/components/SearchBar.d.ts +1 -3
  126. package/lib/typescript/module/ui/components/SearchBar.d.ts.map +1 -1
  127. package/lib/typescript/module/ui/components/ToolButton.d.ts +5 -1
  128. package/lib/typescript/module/ui/components/ToolButton.d.ts.map +1 -1
  129. package/package.json +4 -4
@@ -190,10 +190,13 @@ const styles = _reactNative.StyleSheet.create({
190
190
  flex: 1,
191
191
  gap: 8,
192
192
  minHeight: 32,
193
- paddingLeft: 4,
194
- // Traffic-light window controls sit absolutely in this corner. Reserve
195
- // space so Copy / search / extra actions never paint under them.
196
- paddingRight: 56
193
+ paddingLeft: 4
194
+ // No right inset: the traffic-light window controls are cleared
195
+ // VERTICALLY — JsModal's drag-indicator strip owns their band (see
196
+ // WINDOW_CONTROLS_BAND) — so nothing here has to be pushed sideways to
197
+ // stay out from under them. `headerActions` already ends 4pt off the
198
+ // edge, matching the left, and hosts that render this header with no
199
+ // window controls at all (the desktop inline panels) get no phantom gap.
197
200
  },
198
201
  navigationButton: {
199
202
  padding: 4
@@ -14,8 +14,6 @@ function SearchBar({
14
14
  onChange,
15
15
  onClear,
16
16
  placeholder = "Search...",
17
- suggestions = [],
18
- recentSearches = [],
19
17
  showFilters = false,
20
18
  onFilterPress,
21
19
  style,
@@ -26,30 +24,13 @@ function SearchBar({
26
24
  returnKeyType
27
25
  }) {
28
26
  const [isFocused, setIsFocused] = (0, _react.useState)(false);
29
- const [showSuggestions, setShowSuggestions] = (0, _react.useState)(false);
30
- const blurTimeoutRef = (0, _react.useRef)(null);
31
-
32
- // Cleanup timeout on unmount
33
- (0, _react.useEffect)(() => {
34
- return () => {
35
- if (blurTimeoutRef.current) {
36
- clearTimeout(blurTimeoutRef.current);
37
- }
38
- };
39
- }, []);
40
27
  const handleClear = () => {
41
28
  onChange("");
42
29
  onClear?.();
43
30
  };
44
- const handleSuggestionPress = suggestion => {
45
- onChange(suggestion);
46
- setShowSuggestions(false);
47
- };
48
- const filteredSuggestions = suggestions.filter(s => s.toLowerCase().includes(value.toLowerCase()));
49
- const shouldShowSuggestions = isFocused && (filteredSuggestions.length > 0 || value === "" && recentSearches.length > 0);
50
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
31
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
51
32
  style: [styles.container, containerStyle],
52
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
33
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
53
34
  style: [styles.searchBar, isFocused && styles.searchBarFocused],
54
35
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Search, {
55
36
  size: 16,
@@ -60,22 +41,8 @@ function SearchBar({
60
41
  placeholderTextColor: _index2.gameUIColors.tertiary,
61
42
  value: value,
62
43
  onChangeText: onChange,
63
- onFocus: () => {
64
- setIsFocused(true);
65
- setShowSuggestions(true);
66
- },
67
- onBlur: () => {
68
- setIsFocused(false);
69
- // Clear any existing timeout
70
- if (blurTimeoutRef.current) {
71
- clearTimeout(blurTimeoutRef.current);
72
- }
73
- // Set new timeout with proper cleanup
74
- blurTimeoutRef.current = setTimeout(() => {
75
- setShowSuggestions(false);
76
- blurTimeoutRef.current = null;
77
- }, 200);
78
- },
44
+ onFocus: () => setIsFocused(true),
45
+ onBlur: () => setIsFocused(false),
79
46
  autoFocus: autoFocus,
80
47
  autoCapitalize: "none",
81
48
  autoCorrect: false,
@@ -100,40 +67,7 @@ function SearchBar({
100
67
  color: _index2.gameUIColors.primary
101
68
  })
102
69
  })]
103
- }), shouldShowSuggestions && showSuggestions && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
104
- style: styles.suggestionsContainer,
105
- children: [value === "" && recentSearches.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
106
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
107
- style: styles.suggestionsTitle,
108
- children: "Recent"
109
- }), recentSearches.slice(0, 5).map((search, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
110
- style: styles.suggestionItem,
111
- onPress: () => handleSuggestionPress(search),
112
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Clock, {
113
- size: 12,
114
- color: _index2.gameUIColors.tertiary
115
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
116
- style: styles.suggestionText,
117
- children: search
118
- })]
119
- }, index))]
120
- }), filteredSuggestions.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
121
- children: [value !== "" && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
122
- style: styles.suggestionsTitle,
123
- children: "Suggestions"
124
- }), filteredSuggestions.slice(0, 5).map((suggestion, index) => /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
125
- style: styles.suggestionItem,
126
- onPress: () => handleSuggestionPress(suggestion),
127
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_index.Search, {
128
- size: 12,
129
- color: _index2.gameUIColors.tertiary
130
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
131
- style: styles.suggestionText,
132
- children: suggestion
133
- })]
134
- }, index))]
135
- })]
136
- })]
70
+ })
137
71
  });
138
72
  }
139
73
  SearchBar.Quick = function QuickSearch({
@@ -208,44 +142,6 @@ const styles = _reactNative.StyleSheet.create({
208
142
  borderRadius: 4,
209
143
  backgroundColor: _index2.gameUIColors.primary + "20"
210
144
  },
211
- suggestionsContainer: {
212
- position: "absolute",
213
- top: "100%",
214
- left: 0,
215
- right: 0,
216
- backgroundColor: _index2.gameUIColors.panel,
217
- borderRadius: 8,
218
- marginTop: 4,
219
- paddingVertical: 4,
220
- maxHeight: 200,
221
- shadowColor: "#000",
222
- shadowOffset: {
223
- width: 0,
224
- height: 2
225
- },
226
- shadowOpacity: 0.1,
227
- shadowRadius: 4,
228
- elevation: 3
229
- },
230
- suggestionsTitle: {
231
- fontSize: 10,
232
- fontWeight: "600",
233
- color: _index2.gameUIColors.secondary,
234
- textTransform: "uppercase",
235
- paddingHorizontal: 12,
236
- paddingVertical: 4
237
- },
238
- suggestionItem: {
239
- flexDirection: "row",
240
- alignItems: "center",
241
- paddingHorizontal: 12,
242
- paddingVertical: 8,
243
- gap: 8
244
- },
245
- suggestionText: {
246
- fontSize: 13,
247
- color: _index2.gameUIColors.text
248
- },
249
145
  withFiltersContainer: {
250
146
  position: "relative"
251
147
  },
@@ -18,12 +18,15 @@ function ToolButton({
18
18
  size = "medium",
19
19
  disabled = false,
20
20
  icon,
21
- style
21
+ style,
22
+ testID,
23
+ accessibilityLabel
22
24
  }) {
23
25
  const palette = VARIANTS[variant];
24
26
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
25
27
  accessibilityRole: "button",
26
- accessibilityLabel: label,
28
+ accessibilityLabel: accessibilityLabel ?? label,
29
+ testID: testID,
27
30
  onPress: onPress,
28
31
  disabled: disabled,
29
32
  style: [styles.base, size === "small" ? styles.small : styles.medium, {
@@ -50,6 +50,16 @@ const FLOATING_HEIGHT = 500;
50
50
  const FLOATING_MIN_WIDTH = SCREEN.width * 0.25; // 1/4 of screen width
51
51
  const FLOATING_MIN_HEIGHT = 80; // Just a bit more than header height (60px header + 20px content)
52
52
 
53
+ /**
54
+ * Vertical band the absolutely-positioned window controls occupy at the top
55
+ * right of the chrome: `windowControlsContainer` top 4 + the expandable
56
+ * trigger's 2pt padding + a 12pt dot + 2 = 20. The drag-indicator strip above
57
+ * custom header content reserves exactly this, which is what lets a tool's
58
+ * header row below run the FULL width instead of buying its clearance with a
59
+ * right inset (that inset read as a hole on the right of every tool's nav).
60
+ */
61
+ const WINDOW_CONTROLS_BAND = 20;
62
+
53
63
  // ============================================================================
54
64
  // STORAGE - Modal state persistence with AsyncStorage
55
65
  // ============================================================================
@@ -1572,9 +1582,15 @@ const styles = StyleSheet.create({
1572
1582
  paddingVertical: 8,
1573
1583
  backgroundColor: "transparent"
1574
1584
  },
1585
+ /**
1586
+ * With custom header content the pill shares the top band with the window
1587
+ * controls, so the strip claims that band (and centres the pill in it)
1588
+ * rather than the header row below paying for the clearance sideways.
1589
+ */
1575
1590
  dragIndicatorContainerCustom: {
1576
- paddingTop: 6,
1577
- paddingBottom: 2,
1591
+ minHeight: WINDOW_CONTROLS_BAND,
1592
+ justifyContent: "center",
1593
+ paddingVertical: 0,
1578
1594
  backgroundColor: "transparent"
1579
1595
  },
1580
1596
  dragIndicator: {
@@ -485,10 +485,13 @@ const DragIndicator = /*#__PURE__*/memo(function DragIndicator({
485
485
  flexDirection: "column",
486
486
  alignItems: "center",
487
487
  position: "relative",
488
- // native dragIndicatorContainer: paddingVertical 8;
489
- // custom variant: paddingTop 6, paddingBottom 2
490
- paddingTop: hasCustomContent ? 6 : 8,
491
- paddingBottom: hasCustomContent ? 2 : 8,
488
+ // native dragIndicatorContainer: paddingVertical 8; custom variant
489
+ // claims the 20pt window-controls band (native WINDOW_CONTROLS_BAND)
490
+ // so the header row below can run the full width.
491
+ justifyContent: hasCustomContent ? "center" : undefined,
492
+ minHeight: hasCustomContent ? 20 : undefined,
493
+ paddingTop: hasCustomContent ? 0 : 8,
494
+ paddingBottom: hasCustomContent ? 0 : 8,
492
495
  backgroundColor: "transparent"
493
496
  },
494
497
  children: [/*#__PURE__*/_jsx("div", {
@@ -107,10 +107,12 @@ export function DataTreeActionDock({
107
107
  onEdit,
108
108
  onSelectPath,
109
109
  onEditValue,
110
- containersEditable = true
110
+ containersEditable = true,
111
+ rootEntriesLocked = false
111
112
  }) {
112
113
  const actions = treeActionsFor(root, selection, {
113
- containersEditable
114
+ containersEditable,
115
+ rootEntriesLocked
114
116
  });
115
117
  const has = selection != null;
116
118
  const run = action => {