@buoy-gg/shared-ui 7.0.3 → 7.0.5

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 (191) hide show
  1. package/lib/commonjs/colors/index.js +49 -0
  2. package/lib/commonjs/dataViewer/DataTreeActionBar.js +389 -0
  3. package/lib/commonjs/dataViewer/DataTreeActionDock.js +222 -0
  4. package/lib/commonjs/dataViewer/DataViewer.js +18 -3
  5. package/lib/commonjs/dataViewer/VirtualizedDataExplorer.js +227 -28
  6. package/lib/commonjs/dataViewer/index.js +88 -0
  7. package/lib/commonjs/dataViewer/jsonOps.js +320 -0
  8. package/lib/commonjs/dataViewer/lineDiff.js +285 -83
  9. package/lib/commonjs/dataViewer/tree/TreeDiffViewer.js +20 -5
  10. package/lib/commonjs/dataViewer/treeActions.js +167 -0
  11. package/lib/commonjs/env/EnvironmentSelector.js +2 -2
  12. package/lib/commonjs/env/EnvironmentSelectorInline.js +2 -2
  13. package/lib/commonjs/hooks/safe-area-impl.js +1 -1
  14. package/lib/commonjs/icons/index.js +79 -3
  15. package/lib/commonjs/icons/lucide-icons-original-full.js +5 -1
  16. package/lib/commonjs/icons/lucide-icons.js +59 -2
  17. package/lib/commonjs/index.js +35 -0
  18. package/lib/commonjs/settings/components/BubbleSettingsSection.js +21 -19
  19. package/lib/commonjs/storage/devToolsStorageKeys.js +6 -3
  20. package/lib/commonjs/ui/components/Badge.js +2 -0
  21. package/lib/commonjs/ui/components/CompactRow.js +7 -0
  22. package/lib/commonjs/ui/components/CopyButton.js +27 -4
  23. package/lib/commonjs/ui/components/DevToolsCard.js +11 -0
  24. package/lib/commonjs/ui/components/DynamicFilterView.js +8 -1
  25. package/lib/commonjs/ui/components/EmptyState.js +12 -5
  26. package/lib/commonjs/ui/components/ErrorBoundary.js +3 -2
  27. package/lib/commonjs/ui/components/EventHistoryViewer/EventHistoryViewer.js +63 -11
  28. package/lib/commonjs/ui/components/ExpandableSection.js +4 -3
  29. package/lib/commonjs/ui/components/ExpandableSectionHeader.js +2 -1
  30. package/lib/commonjs/ui/components/FilterViewPattern.js +8 -7
  31. package/lib/commonjs/ui/components/ListItem.js +7 -5
  32. package/lib/commonjs/ui/components/PowerToggleButton.js +4 -1
  33. package/lib/commonjs/ui/components/TabSelector.js +3 -0
  34. package/lib/commonjs/ui/console/CyberpunkConsoleSection.js +1 -1
  35. package/lib/commonjs/ui/console/GalaxyButton.js +1 -1
  36. package/lib/commonjs/ui/gameUI/components/GameUICompactStats.js +2 -2
  37. package/lib/commonjs/ui/gameUI/constants/gameUIColors.js +28 -6
  38. package/lib/commonjs/ui/gameUI/constants/macOSDesignSystemColors.js +22 -4
  39. package/lib/commonjs/utils/index.js +25 -0
  40. package/lib/commonjs/utils/reloadApp.js +144 -0
  41. package/lib/module/colors/index.js +21 -0
  42. package/lib/module/dataViewer/DataTreeActionBar.js +384 -0
  43. package/lib/module/dataViewer/DataTreeActionDock.js +218 -0
  44. package/lib/module/dataViewer/DataViewer.js +18 -3
  45. package/lib/module/dataViewer/VirtualizedDataExplorer.js +228 -30
  46. package/lib/module/dataViewer/index.js +16 -1
  47. package/lib/module/dataViewer/jsonOps.js +311 -0
  48. package/lib/module/dataViewer/lineDiff.js +284 -82
  49. package/lib/module/dataViewer/tree/TreeDiffViewer.js +20 -5
  50. package/lib/module/dataViewer/treeActions.js +161 -0
  51. package/lib/module/env/EnvironmentSelector.js +2 -2
  52. package/lib/module/env/EnvironmentSelectorInline.js +2 -2
  53. package/lib/module/hooks/safe-area-impl.js +1 -1
  54. package/lib/module/icons/index.js +10 -1
  55. package/lib/module/icons/lucide-icons-original-full.js +5 -1
  56. package/lib/module/icons/lucide-icons.js +56 -0
  57. package/lib/module/index.js +4 -0
  58. package/lib/module/settings/components/BubbleSettingsSection.js +21 -19
  59. package/lib/module/storage/devToolsStorageKeys.js +6 -3
  60. package/lib/module/ui/components/Badge.js +2 -0
  61. package/lib/module/ui/components/CompactRow.js +7 -0
  62. package/lib/module/ui/components/CopyButton.js +29 -6
  63. package/lib/module/ui/components/DevToolsCard.js +11 -0
  64. package/lib/module/ui/components/DynamicFilterView.js +8 -1
  65. package/lib/module/ui/components/EmptyState.js +12 -5
  66. package/lib/module/ui/components/ErrorBoundary.js +3 -2
  67. package/lib/module/ui/components/EventHistoryViewer/EventHistoryViewer.js +63 -11
  68. package/lib/module/ui/components/ExpandableSection.js +4 -3
  69. package/lib/module/ui/components/ExpandableSectionHeader.js +2 -1
  70. package/lib/module/ui/components/FilterViewPattern.js +9 -7
  71. package/lib/module/ui/components/ListItem.js +7 -5
  72. package/lib/module/ui/components/PowerToggleButton.js +4 -1
  73. package/lib/module/ui/components/TabSelector.js +3 -0
  74. package/lib/module/ui/console/CyberpunkConsoleSection.js +1 -1
  75. package/lib/module/ui/console/GalaxyButton.js +1 -1
  76. package/lib/module/ui/gameUI/components/GameUICompactStats.js +2 -2
  77. package/lib/module/ui/gameUI/constants/gameUIColors.js +27 -6
  78. package/lib/module/ui/gameUI/constants/macOSDesignSystemColors.js +19 -2
  79. package/lib/module/utils/index.js +1 -0
  80. package/lib/module/utils/reloadApp.js +137 -0
  81. package/lib/typescript/commonjs/colors/index.d.ts +22 -0
  82. package/lib/typescript/commonjs/colors/index.d.ts.map +1 -0
  83. package/lib/typescript/commonjs/dataViewer/DataTreeActionBar.d.ts +53 -0
  84. package/lib/typescript/commonjs/dataViewer/DataTreeActionBar.d.ts.map +1 -0
  85. package/lib/typescript/commonjs/dataViewer/DataTreeActionDock.d.ts +33 -0
  86. package/lib/typescript/commonjs/dataViewer/DataTreeActionDock.d.ts.map +1 -0
  87. package/lib/typescript/commonjs/dataViewer/DataViewer.d.ts +14 -1
  88. package/lib/typescript/commonjs/dataViewer/DataViewer.d.ts.map +1 -1
  89. package/lib/typescript/commonjs/dataViewer/VirtualizedDataExplorer.d.ts +30 -1
  90. package/lib/typescript/commonjs/dataViewer/VirtualizedDataExplorer.d.ts.map +1 -1
  91. package/lib/typescript/commonjs/dataViewer/__tests__/jsonOps.test.d.ts +19 -0
  92. package/lib/typescript/commonjs/dataViewer/__tests__/jsonOps.test.d.ts.map +1 -0
  93. package/lib/typescript/commonjs/dataViewer/index.d.ts +5 -1
  94. package/lib/typescript/commonjs/dataViewer/index.d.ts.map +1 -1
  95. package/lib/typescript/commonjs/dataViewer/jsonOps.d.ts +124 -0
  96. package/lib/typescript/commonjs/dataViewer/jsonOps.d.ts.map +1 -0
  97. package/lib/typescript/commonjs/dataViewer/lineDiff.d.ts +27 -0
  98. package/lib/typescript/commonjs/dataViewer/lineDiff.d.ts.map +1 -1
  99. package/lib/typescript/commonjs/dataViewer/tree/TreeDiffViewer.d.ts +8 -1
  100. package/lib/typescript/commonjs/dataViewer/tree/TreeDiffViewer.d.ts.map +1 -1
  101. package/lib/typescript/commonjs/dataViewer/treeActions.d.ts +83 -0
  102. package/lib/typescript/commonjs/dataViewer/treeActions.d.ts.map +1 -0
  103. package/lib/typescript/commonjs/hooks/safe-area-impl.d.ts +1 -1
  104. package/lib/typescript/commonjs/icons/index.d.ts +6 -1
  105. package/lib/typescript/commonjs/icons/index.d.ts.map +1 -1
  106. package/lib/typescript/commonjs/icons/lucide-icons-original-full.d.ts.map +1 -1
  107. package/lib/typescript/commonjs/icons/lucide-icons.d.ts +9 -0
  108. package/lib/typescript/commonjs/icons/lucide-icons.d.ts.map +1 -1
  109. package/lib/typescript/commonjs/index.d.ts +2 -1
  110. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  111. package/lib/typescript/commonjs/settings/components/BubbleSettingsSection.d.ts.map +1 -1
  112. package/lib/typescript/commonjs/storage/devToolsStorageKeys.d.ts +5 -1
  113. package/lib/typescript/commonjs/storage/devToolsStorageKeys.d.ts.map +1 -1
  114. package/lib/typescript/commonjs/ui/components/CopyButton.d.ts +7 -1
  115. package/lib/typescript/commonjs/ui/components/CopyButton.d.ts.map +1 -1
  116. package/lib/typescript/commonjs/ui/components/EmptyState.d.ts.map +1 -1
  117. package/lib/typescript/commonjs/ui/components/ErrorBoundary.d.ts.map +1 -1
  118. package/lib/typescript/commonjs/ui/components/EventHistoryViewer/EventHistoryViewer.d.ts.map +1 -1
  119. package/lib/typescript/commonjs/ui/components/EventHistoryViewer/types.d.ts +23 -7
  120. package/lib/typescript/commonjs/ui/components/EventHistoryViewer/types.d.ts.map +1 -1
  121. package/lib/typescript/commonjs/ui/components/ExpandableSection.d.ts.map +1 -1
  122. package/lib/typescript/commonjs/ui/components/ExpandableSectionHeader.d.ts.map +1 -1
  123. package/lib/typescript/commonjs/ui/components/FilterViewPattern.d.ts.map +1 -1
  124. package/lib/typescript/commonjs/ui/components/ListItem.d.ts.map +1 -1
  125. package/lib/typescript/commonjs/ui/gameUI/constants/gameUIColors.d.ts +36 -30
  126. package/lib/typescript/commonjs/ui/gameUI/constants/gameUIColors.d.ts.map +1 -1
  127. package/lib/typescript/commonjs/ui/gameUI/constants/macOSDesignSystemColors.d.ts +5 -0
  128. package/lib/typescript/commonjs/ui/gameUI/constants/macOSDesignSystemColors.d.ts.map +1 -1
  129. package/lib/typescript/commonjs/utils/index.d.ts +1 -0
  130. package/lib/typescript/commonjs/utils/index.d.ts.map +1 -1
  131. package/lib/typescript/commonjs/utils/reloadApp.d.ts +68 -0
  132. package/lib/typescript/commonjs/utils/reloadApp.d.ts.map +1 -0
  133. package/lib/typescript/module/colors/index.d.ts +22 -0
  134. package/lib/typescript/module/colors/index.d.ts.map +1 -0
  135. package/lib/typescript/module/dataViewer/DataTreeActionBar.d.ts +53 -0
  136. package/lib/typescript/module/dataViewer/DataTreeActionBar.d.ts.map +1 -0
  137. package/lib/typescript/module/dataViewer/DataTreeActionDock.d.ts +33 -0
  138. package/lib/typescript/module/dataViewer/DataTreeActionDock.d.ts.map +1 -0
  139. package/lib/typescript/module/dataViewer/DataViewer.d.ts +14 -1
  140. package/lib/typescript/module/dataViewer/DataViewer.d.ts.map +1 -1
  141. package/lib/typescript/module/dataViewer/VirtualizedDataExplorer.d.ts +30 -1
  142. package/lib/typescript/module/dataViewer/VirtualizedDataExplorer.d.ts.map +1 -1
  143. package/lib/typescript/module/dataViewer/__tests__/jsonOps.test.d.ts +19 -0
  144. package/lib/typescript/module/dataViewer/__tests__/jsonOps.test.d.ts.map +1 -0
  145. package/lib/typescript/module/dataViewer/index.d.ts +5 -1
  146. package/lib/typescript/module/dataViewer/index.d.ts.map +1 -1
  147. package/lib/typescript/module/dataViewer/jsonOps.d.ts +124 -0
  148. package/lib/typescript/module/dataViewer/jsonOps.d.ts.map +1 -0
  149. package/lib/typescript/module/dataViewer/lineDiff.d.ts +27 -0
  150. package/lib/typescript/module/dataViewer/lineDiff.d.ts.map +1 -1
  151. package/lib/typescript/module/dataViewer/tree/TreeDiffViewer.d.ts +8 -1
  152. package/lib/typescript/module/dataViewer/tree/TreeDiffViewer.d.ts.map +1 -1
  153. package/lib/typescript/module/dataViewer/treeActions.d.ts +83 -0
  154. package/lib/typescript/module/dataViewer/treeActions.d.ts.map +1 -0
  155. package/lib/typescript/module/hooks/safe-area-impl.d.ts +1 -1
  156. package/lib/typescript/module/icons/index.d.ts +6 -1
  157. package/lib/typescript/module/icons/index.d.ts.map +1 -1
  158. package/lib/typescript/module/icons/lucide-icons-original-full.d.ts.map +1 -1
  159. package/lib/typescript/module/icons/lucide-icons.d.ts +9 -0
  160. package/lib/typescript/module/icons/lucide-icons.d.ts.map +1 -1
  161. package/lib/typescript/module/index.d.ts +2 -1
  162. package/lib/typescript/module/index.d.ts.map +1 -1
  163. package/lib/typescript/module/settings/components/BubbleSettingsSection.d.ts.map +1 -1
  164. package/lib/typescript/module/storage/devToolsStorageKeys.d.ts +5 -1
  165. package/lib/typescript/module/storage/devToolsStorageKeys.d.ts.map +1 -1
  166. package/lib/typescript/module/ui/components/CopyButton.d.ts +7 -1
  167. package/lib/typescript/module/ui/components/CopyButton.d.ts.map +1 -1
  168. package/lib/typescript/module/ui/components/EmptyState.d.ts.map +1 -1
  169. package/lib/typescript/module/ui/components/ErrorBoundary.d.ts.map +1 -1
  170. package/lib/typescript/module/ui/components/EventHistoryViewer/EventHistoryViewer.d.ts.map +1 -1
  171. package/lib/typescript/module/ui/components/EventHistoryViewer/types.d.ts +23 -7
  172. package/lib/typescript/module/ui/components/EventHistoryViewer/types.d.ts.map +1 -1
  173. package/lib/typescript/module/ui/components/ExpandableSection.d.ts.map +1 -1
  174. package/lib/typescript/module/ui/components/ExpandableSectionHeader.d.ts.map +1 -1
  175. package/lib/typescript/module/ui/components/FilterViewPattern.d.ts.map +1 -1
  176. package/lib/typescript/module/ui/components/ListItem.d.ts.map +1 -1
  177. package/lib/typescript/module/ui/gameUI/constants/gameUIColors.d.ts +36 -30
  178. package/lib/typescript/module/ui/gameUI/constants/gameUIColors.d.ts.map +1 -1
  179. package/lib/typescript/module/ui/gameUI/constants/macOSDesignSystemColors.d.ts +5 -0
  180. package/lib/typescript/module/ui/gameUI/constants/macOSDesignSystemColors.d.ts.map +1 -1
  181. package/lib/typescript/module/utils/index.d.ts +1 -0
  182. package/lib/typescript/module/utils/index.d.ts.map +1 -1
  183. package/lib/typescript/module/utils/reloadApp.d.ts +68 -0
  184. package/lib/typescript/module/utils/reloadApp.d.ts.map +1 -0
  185. package/package.json +15 -4
  186. package/lib/commonjs/icons/ImageOverlayIcon.js +0 -142
  187. package/lib/module/icons/ImageOverlayIcon.js +0 -137
  188. package/lib/typescript/commonjs/icons/ImageOverlayIcon.d.ts +0 -14
  189. package/lib/typescript/commonjs/icons/ImageOverlayIcon.d.ts.map +0 -1
  190. package/lib/typescript/module/icons/ImageOverlayIcon.d.ts +0 -14
  191. package/lib/typescript/module/icons/ImageOverlayIcon.d.ts.map +0 -1
@@ -3,6 +3,7 @@
3
3
  import { useState } from "react";
4
4
  import { StyleSheet, View, Animated } from "react-native";
5
5
  import { ExpandableSectionHeader } from "./ExpandableSectionHeader.js";
6
+ import { macOSColors } from "../gameUI/constants/macOSDesignSystemColors.js";
6
7
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
8
  export function ExpandableSection({
8
9
  icon,
@@ -47,10 +48,10 @@ export function ExpandableSection({
47
48
  }
48
49
  const styles = StyleSheet.create({
49
50
  container: {
50
- backgroundColor: "#1F1F1F",
51
+ backgroundColor: macOSColors.background.card,
51
52
  borderRadius: 12,
52
53
  borderWidth: 1,
53
- borderColor: "rgba(255, 255, 255, 0.08)",
54
+ borderColor: "rgba(128, 128, 128, 0.16)",
54
55
  overflow: "hidden",
55
56
  marginHorizontal: 8,
56
57
  marginBottom: 16
@@ -61,7 +62,7 @@ const styles = StyleSheet.create({
61
62
  divider: {
62
63
  height: 1,
63
64
  width: "100%",
64
- backgroundColor: "rgba(255, 255, 255, 0.06)",
65
+ backgroundColor: "rgba(128, 128, 128, 0.12)",
65
66
  marginBottom: 24
66
67
  }
67
68
  });
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { StyleSheet, Text, TouchableOpacity, View } from "react-native";
4
4
  import { ChevronDown, ChevronRight } from "../../icons/index.js";
5
+ import { buoyColors } from "../gameUI/constants/gameUIColors.js";
5
6
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
7
  export function ExpandableSectionHeader({
7
8
  icon: Icon,
@@ -74,7 +75,7 @@ const styles = StyleSheet.create({
74
75
  },
75
76
  subtitle: {
76
77
  fontSize: 16,
77
- color: "#9CA3AF"
78
+ color: buoyColors.textSecondary
78
79
  },
79
80
  chevronContainer: {
80
81
  paddingTop: 6
@@ -3,6 +3,8 @@
3
3
  import { View, Text, TouchableOpacity, StyleSheet, ScrollView } from "react-native";
4
4
  import { Plus } from "../../icons/index.js";
5
5
  import { gameUIColors } from "../gameUI/constants/gameUIColors.js";
6
+ import { buoyColors } from "../gameUI/constants/gameUIColors.js";
7
+ import { macOSColors } from "../gameUI/constants/macOSDesignSystemColors.js";
6
8
  import { useFilterManager } from "../../hooks/useFilterManager.js";
7
9
  import { FilterSection, AddFilterInput, AddFilterButton, FilterList } from "./FilterComponents.js";
8
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
@@ -118,17 +120,17 @@ const styles = StyleSheet.create({
118
120
  backgroundColor: "transparent"
119
121
  },
120
122
  suggestedContainer: {
121
- backgroundColor: "rgba(255, 255, 255, 0.03)",
123
+ backgroundColor: "rgba(128, 128, 128, 0.06)",
122
124
  borderRadius: 8,
123
125
  padding: 12,
124
126
  marginBottom: 16,
125
127
  maxHeight: 300,
126
128
  borderWidth: 1,
127
- borderColor: "rgba(255, 255, 255, 0.08)"
129
+ borderColor: "rgba(128, 128, 128, 0.16)"
128
130
  },
129
131
  suggestedTitle: {
130
132
  fontSize: 10,
131
- color: "#6B7280",
133
+ color: macOSColors.text.icon,
132
134
  fontWeight: "600",
133
135
  letterSpacing: 0.5,
134
136
  marginBottom: 12,
@@ -140,24 +142,24 @@ const styles = StyleSheet.create({
140
142
  suggestedItem: {
141
143
  flexDirection: "row",
142
144
  alignItems: "center",
143
- backgroundColor: "rgba(255, 255, 255, 0.02)",
145
+ backgroundColor: "rgba(128, 128, 128, 0.04)",
144
146
  borderRadius: 6,
145
147
  paddingHorizontal: 10,
146
148
  paddingVertical: 10,
147
149
  marginBottom: 6,
148
150
  borderWidth: 1,
149
- borderColor: "rgba(255, 255, 255, 0.05)"
151
+ borderColor: "rgba(128, 128, 128, 0.1)"
150
152
  },
151
153
  suggestedText: {
152
154
  flex: 1,
153
155
  fontSize: 12,
154
- color: "#E5E7EB",
156
+ color: buoyColors.text,
155
157
  fontFamily: "monospace",
156
158
  marginLeft: 4
157
159
  },
158
160
  emptyText: {
159
161
  fontSize: 11,
160
- color: "#6B7280",
162
+ color: macOSColors.text.icon,
161
163
  fontStyle: "italic",
162
164
  padding: 12,
163
165
  textAlign: "center"
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
 
3
3
  import { TouchableOpacity, View, Text, StyleSheet } from "react-native";
4
+ import { macOSColors } from "../gameUI/constants/macOSDesignSystemColors.js";
5
+ import { buoyColors } from "../gameUI/constants/gameUIColors.js";
4
6
 
5
7
  // Base ListItem container component
6
8
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -120,13 +122,13 @@ ListItem.Metadata = Metadata;
120
122
  ListItem.Actions = Actions;
121
123
  const styles = StyleSheet.create({
122
124
  container: {
123
- backgroundColor: "#1A1A1A",
125
+ backgroundColor: buoyColors.card,
124
126
  borderRadius: 8,
125
127
  padding: 12,
126
128
  marginHorizontal: 16,
127
129
  marginVertical: 4,
128
130
  borderWidth: 1,
129
- borderColor: "rgba(255, 255, 255, 0.05)"
131
+ borderColor: "rgba(128, 128, 128, 0.1)"
130
132
  },
131
133
  header: {
132
134
  flexDirection: "row",
@@ -146,17 +148,17 @@ const styles = StyleSheet.create({
146
148
  title: {
147
149
  fontSize: 16,
148
150
  fontWeight: "600",
149
- color: "#E5E7EB",
151
+ color: buoyColors.text,
150
152
  marginBottom: 4
151
153
  },
152
154
  subtitle: {
153
155
  fontSize: 14,
154
- color: "#9CA3AF",
156
+ color: buoyColors.textSecondary,
155
157
  lineHeight: 20
156
158
  },
157
159
  metadata: {
158
160
  fontSize: 12,
159
- color: "#6B7280"
161
+ color: macOSColors.text.icon
160
162
  },
161
163
  actions: {
162
164
  flexDirection: "row",
@@ -59,9 +59,12 @@ const styles = StyleSheet.create({
59
59
  backgroundColor: macOSColors.semantic.successBackground,
60
60
  borderColor: macOSColors.semantic.success + "40"
61
61
  },
62
+ // OFF stays red on both chromes: capture being disabled is exactly the kind
63
+ // of state the user needs to notice, so it keeps its colour.
62
64
  disabledButton: {
63
65
  backgroundColor: macOSColors.semantic.errorBackground,
64
- borderColor: macOSColors.semantic.error + "40"
66
+ borderColor: macOSColors.semantic.error + "40",
67
+ borderWidth: 1
65
68
  },
66
69
  buttonDisabled: {
67
70
  opacity: 0.55
@@ -43,6 +43,9 @@ const styles = StyleSheet.create({
43
43
  flex: 1,
44
44
  marginHorizontal: 1
45
45
  },
46
+ /**
47
+ * The selected tab is marked with an accent ring.
48
+ */
46
49
  tabButtonActive: {
47
50
  backgroundColor: buoyColors.primary + "20",
48
51
  borderWidth: 1,
@@ -502,7 +502,7 @@ const styles = StyleSheet.create({
502
502
  },
503
503
  glassShimmer: {
504
504
  ...absoluteFill,
505
- backgroundColor: "rgba(255, 255, 255, 0.03)",
505
+ backgroundColor: "rgba(128, 128, 128, 0.06)",
506
506
  opacity: 0.6
507
507
  },
508
508
  glitchOverlayLayer: {
@@ -69,7 +69,7 @@ const styles = StyleSheet.create({
69
69
  backgroundColor: "rgba(31, 31, 31, 0.85)",
70
70
  borderRadius: 12,
71
71
  borderWidth: 1,
72
- borderColor: "rgba(255, 255, 255, 0.12)",
72
+ borderColor: "rgba(128, 128, 128, 0.24)",
73
73
  overflow: "hidden"
74
74
  },
75
75
  starsContainer: {
@@ -164,7 +164,7 @@ const styles = StyleSheet.create({
164
164
  marginBottom: 8,
165
165
  paddingBottom: 8,
166
166
  borderBottomWidth: 1,
167
- borderBottomColor: "rgba(255, 255, 255, 0.05)"
167
+ borderBottomColor: "rgba(128, 128, 128, 0.1)"
168
168
  },
169
169
  headerLeft: {
170
170
  gap: 1
@@ -219,7 +219,7 @@ const styles = StyleSheet.create({
219
219
  },
220
220
  healthBarBg: {
221
221
  height: 4,
222
- backgroundColor: "rgba(255, 255, 255, 0.05)",
222
+ backgroundColor: "rgba(128, 128, 128, 0.1)",
223
223
  borderRadius: 2,
224
224
  overflow: "hidden"
225
225
  },
@@ -9,7 +9,7 @@
9
9
  * 3. Save and refresh
10
10
  */
11
11
 
12
- import { macOSGameUIColors } from "./macOSDesignSystemColors.js";
12
+ import { macOSGameUIColors, refreshMacOSGameUIColors } from "./macOSDesignSystemColors.js";
13
13
 
14
14
  // ============================================
15
15
  // THEME DEFINITIONS
@@ -126,9 +126,18 @@ const activeTheme = macOSTheme; // macOS - Apple HIG design system
126
126
  // GAME UI COLORS (uses selected theme)
127
127
  // ============================================
128
128
 
129
- export const gameUIColors = {
130
- ...activeTheme,
131
- // Defaults (dark-ish) which can be overridden by theme spreads
129
+ /* NOTE ON KEY ORDER — the spread comes LAST on purpose.
130
+ *
131
+ * These seven keys are fallbacks for `defaultTheme`, which doesn't define them.
132
+ * They used to sit AFTER the spread, which meant they silently overrode the
133
+ * active theme: `background`/`panel`/`buttonBackground` stayed hardcoded dark
134
+ * and `primary`/`primaryLight` stayed hardcoded white, no matter what palette
135
+ * was selected, so a theme could not override them at all. With the spread
136
+ * last, an active theme that defines them wins and only `defaultTheme` falls
137
+ * back. */
138
+ /** Fallbacks (dark-ish) for themes that don't define these keys — only
139
+ * `defaultTheme` needs them; `macOSTheme` supplies all seven. */
140
+ const fallbacks = {
132
141
  background: "rgba(8, 12, 21, 0.98)",
133
142
  panel: "rgba(16, 22, 35, 0.98)",
134
143
  backdrop: "rgba(0, 0, 0, 0.85)",
@@ -137,9 +146,21 @@ export const gameUIColors = {
137
146
  // Default text colors for dark background
138
147
  primary: "#FFFFFF",
139
148
  primaryLight: "#F1F5F9"
140
-
141
- // Theme-specific colors (later spread overrides defaults when present)
142
149
  };
150
+ export const gameUIColors = {
151
+ ...fallbacks,
152
+ ...activeTheme
153
+ };
154
+ /** Re-derive the theme-driven values in place after `macOSColors` has been
155
+ * re-tinted at runtime (desktop dashboard theme switch only — see
156
+ * in place). Keeps object identity so every
157
+ * `gameUIColors.x` read at render time picks the new value up. Module-level
158
+ * captures (`const BG = gameUIColors.panel`) still need a reload. */
159
+ export const refreshGameUIColors = () => {
160
+ refreshMacOSGameUIColors();
161
+ Object.assign(gameUIColors, activeTheme);
162
+ };
163
+
143
164
  // ============================================
144
165
  // BUOY BRAND COLORS
145
166
  // ============================================
@@ -156,8 +156,14 @@ export const macOSColors = {
156
156
  }
157
157
  };
158
158
 
159
- // Create a compatible gameUIColors object for gradual migration
160
- export const macOSGameUIColors = {
159
+ /* `macOSGameUIColors` is a DERIVED SNAPSHOT: every field below copies a string
160
+ * value out of `macOSColors` at module-evaluation time, so later edits to
161
+ * `macOSColors` do not reach it. The desktop dashboard re-tints the palette by
162
+ * mutating `macOSColors` in place,
163
+ * which is why the snapshot is built by a factory and can be refreshed with
164
+ * `refreshMacOSGameUIColors()`. Nested objects (`dataTypes`, `diff`) are shared
165
+ * REFERENCES, not copies, so those already follow a re-tint on their own. */
166
+ const buildMacOSGameUIColors = () => ({
161
167
  // Base backgrounds
162
168
  background: macOSColors.background.base,
163
169
  panel: macOSColors.background.card,
@@ -199,4 +205,15 @@ export const macOSGameUIColors = {
199
205
  secondary: macOSColors.semantic.debug,
200
206
  tertiary: macOSColors.semantic.success
201
207
  }
208
+ });
209
+
210
+ // Create a compatible gameUIColors object for gradual migration
211
+ export const macOSGameUIColors = buildMacOSGameUIColors();
212
+
213
+ /** Re-derive the snapshot above from the current `macOSColors` values, keeping
214
+ * the object identity so existing importers see the new colors. Only the
215
+ * desktop dashboard's theme switcher calls this; on device the palette never
216
+ * changes, so this is a no-op that is never invoked. */
217
+ export const refreshMacOSGameUIColors = () => {
218
+ Object.assign(macOSGameUIColors, buildMacOSGameUIColors());
202
219
  };
@@ -9,6 +9,7 @@ export { getValueType, isPrimitive, isJsonSerializable, isValidJson, getConstruc
9
9
  export { parseValue, formatValue, getTypeColor, truncateText, flattenObject, formatPath } from "./valueFormatting.js";
10
10
  export { loadOptionalModule, getCachedOptionalModule } from "./loadOptionalModule.js";
11
11
  export { setRenderCaptureProvider, getRenderCaptureProvider } from "./renderCaptureRegistry.js";
12
+ export { reloadApp, scheduleReloadApp, resolveReloadStrategy, REMOTE_RELOAD_DELAY_MS } from "./reloadApp.js";
12
13
  export { Subscribable } from "./subscribable.js";
13
14
  export { subscriberCountNotifier, subscribeToSubscriberCountChanges, notifySubscriberCountChange } from "./subscriberCountNotifier.js";
14
15
  export { useSafeRouter, useSafePathname, useSafeSegments, useSafeGlobalSearchParams, getSafeRouter, getSafeCurrentPathname, isExpoRouterAvailable } from "./safeExpoRouter.js";
@@ -0,0 +1,137 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * reloadApp
5
+ *
6
+ * Programmatic JS-bundle reload primitive. Two strategies, picked at runtime:
7
+ *
8
+ * - `dev-settings`: React Native core's `DevSettings.reload()`. Works in
9
+ * __DEV__ builds (including Expo Go) with zero deps, but throws in
10
+ * release.
11
+ * - `expo-updates`: `Updates.reloadAsync()` from the `expo-updates`
12
+ * package. Works in dev clients and production, but fails in Expo Go
13
+ * and is not bundled with any Buoy package — host apps opt in by
14
+ * installing `expo-updates` separately.
15
+ *
16
+ * "auto" prefers `dev-settings` in __DEV__ and falls back to
17
+ * `expo-updates` otherwise. The dynamic `require` keeps `expo-updates` an
18
+ * optional peer — Expo Go users never load it.
19
+ *
20
+ * Lives in shared (not in a tool package) because BOTH the always-installed
21
+ * core — whose `app` sync adapter exposes reload to remote drivers like the
22
+ * MCP server — and perf-monitor's batch runner (reload between cases) need it,
23
+ * and reloading must not require a tool with native peer deps.
24
+ *
25
+ * IMPORTANT: callers must persist any state they need to survive BEFORE
26
+ * invoking this. Once the reload fires, the JS realm is gone — there is
27
+ * no "after" code path.
28
+ */
29
+
30
+ /** The concrete mechanism a `ReloadStrategy` resolves to at runtime. */
31
+
32
+ function loadDevSettings() {
33
+ try {
34
+ // Prefer the core RN module; cast to unknown first so TS doesn't try
35
+ // to follow into RN's typings (the package may not be in the type
36
+ // graph in some build setups).
37
+ const rn = require("react-native");
38
+ const ds = rn?.DevSettings;
39
+ if (ds && typeof ds.reload === "function") {
40
+ return ds;
41
+ }
42
+ } catch {
43
+ // fall through
44
+ }
45
+ return null;
46
+ }
47
+ function loadExpoUpdates() {
48
+ try {
49
+ const mod = require("expo-updates");
50
+ if (mod && typeof mod.reloadAsync === "function") {
51
+ return mod;
52
+ }
53
+ } catch {
54
+ // expo-updates not installed
55
+ }
56
+ return null;
57
+ }
58
+
59
+ /**
60
+ * Which mechanism `strategy` would actually use right now, or null when none
61
+ * is available. Lets a caller check reloadability BEFORE committing (e.g. a
62
+ * remote driver that must answer "will this work?" over the wire, since after
63
+ * the reload fires there is no code path left to answer from).
64
+ */
65
+ export function resolveReloadStrategy(strategy = "auto") {
66
+ if (strategy === "dev-settings") {
67
+ return loadDevSettings() ? "dev-settings" : null;
68
+ }
69
+ if (strategy === "expo-updates") {
70
+ return loadExpoUpdates() ? "expo-updates" : null;
71
+ }
72
+ if (__DEV__ && loadDevSettings()) return "dev-settings";
73
+ return loadExpoUpdates() ? "expo-updates" : null;
74
+ }
75
+
76
+ /** Why `strategy` can't run, phrased for the person who has to fix it. */
77
+ function unavailableMessage(strategy) {
78
+ if (strategy === "dev-settings") {
79
+ return "[buoy] DevSettings.reload() unavailable — strategy 'dev-settings' requires React Native dev mode.";
80
+ }
81
+ if (strategy === "expo-updates") {
82
+ return "[buoy] expo-updates not installed — strategy 'expo-updates' requires the host app to add the dependency.";
83
+ }
84
+ return "[buoy] No reload mechanism available. Run in __DEV__ or install expo-updates.";
85
+ }
86
+
87
+ /**
88
+ * Trigger a full JS bundle reload. Resolves to a never-resolving promise
89
+ * because the realm is being torn down — code after the call should not
90
+ * execute. Throws synchronously if no strategy is available.
91
+ */
92
+ export async function reloadApp(strategy = "auto", reason = "buoy reload") {
93
+ const resolved = resolveReloadStrategy(strategy);
94
+ if (!resolved) throw new Error(unavailableMessage(strategy));
95
+ if (resolved === "dev-settings") {
96
+ loadDevSettings().reload(reason);
97
+ } else {
98
+ await loadExpoUpdates().reloadAsync();
99
+ }
100
+ return await new Promise(() => {});
101
+ }
102
+
103
+ /**
104
+ * Delay before a remotely-requested reload actually fires. The realm dies the
105
+ * instant it does, so a remote caller's acknowledgement (an action result on
106
+ * the sync socket) must be flushed to the broker first — this is the window
107
+ * that lets it get out.
108
+ */
109
+ export const REMOTE_RELOAD_DELAY_MS = 250;
110
+
111
+ /**
112
+ * Arm a reload to fire shortly, and report which mechanism will do it.
113
+ *
114
+ * Unlike {@link reloadApp}, this returns — synchronously and BEFORE the realm
115
+ * is torn down — so a remote driver (Buoy Desktop, the MCP server) can answer
116
+ * "reload accepted, via dev-settings" over the socket. Throws (without
117
+ * scheduling anything) when no mechanism is available, so an impossible reload
118
+ * fails loudly instead of looking accepted and silently doing nothing.
119
+ */
120
+ export function scheduleReloadApp(options) {
121
+ const strategy = options?.strategy ?? "auto";
122
+ const resolved = resolveReloadStrategy(strategy);
123
+ if (!resolved) throw new Error(unavailableMessage(strategy));
124
+ const delayMs = Math.max(0, options?.delayMs ?? REMOTE_RELOAD_DELAY_MS);
125
+ const reason = options?.reason ?? "buoy remote reload";
126
+ setTimeout(() => {
127
+ void reloadApp(resolved, reason).catch(() => {
128
+ // Nothing left to report to — the caller already got its ack, and the
129
+ // pre-flight resolve above means this only trips on a mechanism that
130
+ // broke between scheduling and firing.
131
+ });
132
+ }, delayMs);
133
+ return {
134
+ strategy: resolved,
135
+ delayMs
136
+ };
137
+ }
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Palette-only entry point.
3
+ *
4
+ * WHY THIS EXISTS: the desktop dashboard re-tints the design system by mutating
5
+ * these objects in place, and that has to happen BEFORE any component module is
6
+ * evaluated — React Native `StyleSheet.create({...})` calls run at module load
7
+ * and freeze whatever colors they read.
8
+ *
9
+ * Importing the palettes from the package root (`@buoy-gg/shared-ui`) does the
10
+ * opposite: the root barrel re-exports every component, so pulling one constant
11
+ * out of it evaluates all of their StyleSheets first, and the re-tint lands too
12
+ * late — panels keep dark surfaces while inline reads go light.
13
+ *
14
+ * This subpath pulls in the two constants modules and nothing else, so the
15
+ * bootstrap can swap palettes with an empty component graph behind it. Import
16
+ * from here in anything that runs before the app mounts.
17
+ */
18
+ export { macOSColors, macOSGameUIColors, refreshMacOSGameUIColors, } from "../ui/gameUI/constants/macOSDesignSystemColors";
19
+ export { gameUIColors, buoyColors, dialColors, refreshGameUIColors, } from "../ui/gameUI/constants/gameUIColors";
20
+ export type { GameUIColorKey, BuoyColorKey, } from "../ui/gameUI/constants/gameUIColors";
21
+ export type { MacOSColorKey } from "../ui/gameUI/constants/macOSDesignSystemColors";
22
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/colors/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,wBAAwB,GACzB,MAAM,gDAAgD,CAAC;AACxD,OAAO,EACL,YAAY,EACZ,UAAU,EACV,UAAU,EACV,mBAAmB,GACpB,MAAM,qCAAqC,CAAC;AAC7C,YAAY,EACV,cAAc,EACd,YAAY,GACb,MAAM,qCAAqC,CAAC;AAC7C,YAAY,EAAE,aAAa,EAAE,MAAM,gDAAgD,CAAC"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Footer bar for the data explorer's selected node — the editor's controls.
3
+ *
4
+ * Ports the action strip from the desktop mockup ("Desktop app network dev
5
+ * tools redesign" → Value card footer): the selected node's label and type on
6
+ * the left, its available operations on the right, and a hint line when nothing
7
+ * is selected yet.
8
+ *
9
+ * The controls deliberately do NOT live inside the tree rows. A row is 28px
10
+ * tall and already carries a caret, a key, a value and a copy button, so
11
+ * per-row icon buttons land around 20px — under the touch target a phone needs,
12
+ * and immediately beside the copy button, which makes mis-taps easy. Hosting
13
+ * them in one bar keeps every target full size and in a predictable place.
14
+ *
15
+ * So the split is: the tree owns SELECTION, this bar owns ACTIONS.
16
+ *
17
+ * Nothing here mutates. Each control emits a {@link JsonOp} against the
18
+ * selection's path and the host applies it, so the explorer stays a pure view.
19
+ */
20
+ import { type ViewStyle } from "react-native";
21
+ import type { JsonOp } from "./jsonOps";
22
+ import { type DataTreeSelection } from "./treeActions";
23
+ export type { DataTreeSelection };
24
+ export interface DataTreeActionBarProps {
25
+ /** The whole document, so the bar can see the selection's PARENT. */
26
+ root: unknown;
27
+ /** Null renders the discoverability hint instead of controls. */
28
+ selection: DataTreeSelection | null;
29
+ onEdit: (op: JsonOp) => void;
30
+ /**
31
+ * Start editing the selected scalar. The tree renders the field in the row
32
+ * itself (matching the mockup), so the host owns that state — this is the
33
+ * button-driven way in, alongside double-tapping the row.
34
+ */
35
+ onRequestInlineEdit: () => void;
36
+ /** Extra style for the buttons, so a host can match its own chrome. */
37
+ chipStyle?: ViewStyle;
38
+ }
39
+ export declare function DataTreeActionBar({ root, selection, onEdit, onRequestInlineEdit, chipStyle, }: DataTreeActionBarProps): import("react").JSX.Element;
40
+ /**
41
+ * The field that replaces a row's value while editing it, per the mockup.
42
+ *
43
+ * Type-preserving by construction rather than by parsing guesswork: the
44
+ * ORIGINAL value's type decides how the draft is read back, so editing a number
45
+ * can only ever produce a number. Booleans skip text entirely — there is
46
+ * nothing to type, so they commit straight from a two-way toggle.
47
+ */
48
+ export declare function DataTreeInlineEditor({ value, onCommit, onCancel, }: {
49
+ value: unknown;
50
+ onCommit: (next: unknown) => void;
51
+ onCancel: () => void;
52
+ }): import("react").JSX.Element;
53
+ //# sourceMappingURL=DataTreeActionBar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTreeActionBar.d.ts","sourceRoot":"","sources":["../../../../src/dataViewer/DataTreeActionBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAGH,OAAO,EAML,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAGtB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAKL,KAAK,iBAAiB,EACvB,MAAM,eAAe,CAAC;AAEvB,YAAY,EAAE,iBAAiB,EAAE,CAAC;AAsBlC,MAAM,WAAW,sBAAsB;IACrC,qEAAqE;IACrE,IAAI,EAAE,OAAO,CAAC;IACd,iEAAiE;IACjE,SAAS,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACpC,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B;;;;OAIG;IACH,mBAAmB,EAAE,MAAM,IAAI,CAAC;IAChC,uEAAuE;IACvE,SAAS,CAAC,EAAE,SAAS,CAAC;CACvB;AA+CD,wBAAgB,iBAAiB,CAAC,EAChC,IAAI,EACJ,SAAS,EACT,MAAM,EACN,mBAAmB,EACnB,SAAS,GACV,EAAE,sBAAsB,+BA4ExB;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,KAAK,EACL,QAAQ,EACR,QAAQ,GACT,EAAE;IACD,KAAK,EAAE,OAAO,CAAC;IACf,QAAQ,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAClC,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB,+BAuEA"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * The phone's edit controls — a fixed grid of six thumb-sized tiles, docked
3
+ * under a full-screen tree.
4
+ *
5
+ * The dashboard renders the same six actions as {@link DataTreeActionBar}: a
6
+ * row of small chips, which is right beside a cursor and wrong under a thumb.
7
+ * Both read their list from `treeActionsFor`, so what's legal can't drift
8
+ * between them — only the shape does.
9
+ *
10
+ * Two tiles per row of three, always in the same slots, disabled rather than
11
+ * hidden. See `treeActionsFor` for why the list is fixed-length.
12
+ */
13
+ import type { JsonOp } from "./jsonOps";
14
+ import { type DataTreeSelection } from "./treeActions";
15
+ export interface DataTreeActionDockProps {
16
+ /** The whole document, so the dock can see the selection's PARENT. */
17
+ root: unknown;
18
+ /** Null dims every tile and shows the discoverability hint. */
19
+ selection: DataTreeSelection | null;
20
+ /** Apply one structural edit. */
21
+ onEdit: (op: JsonOp) => void;
22
+ /** Move the highlight, for the ops that create or relocate a node. */
23
+ onSelectPath: (path: string[]) => void;
24
+ /** Open the host's value editor for the current selection. */
25
+ onEditValue: () => void;
26
+ /**
27
+ * Whether the host's value editor handles arrays and objects (a raw-JSON
28
+ * mode). The phone's does.
29
+ */
30
+ containersEditable?: boolean;
31
+ }
32
+ export declare function DataTreeActionDock({ root, selection, onEdit, onSelectPath, onEditValue, containersEditable, }: DataTreeActionDockProps): import("react").JSX.Element;
33
+ //# sourceMappingURL=DataTreeActionDock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DataTreeActionDock.d.ts","sourceRoot":"","sources":["../../../../src/dataViewer/DataTreeActionDock.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAKH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAIL,KAAK,iBAAiB,EAGvB,MAAM,eAAe,CAAC;AAqCvB,MAAM,WAAW,uBAAuB;IACtC,sEAAsE;IACtE,IAAI,EAAE,OAAO,CAAC;IACd,+DAA+D;IAC/D,SAAS,EAAE,iBAAiB,GAAG,IAAI,CAAC;IACpC,iCAAiC;IACjC,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7B,sEAAsE;IACtE,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACvC,8DAA8D;IAC9D,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B;AAoCD,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,SAAS,EACT,MAAM,EACN,YAAY,EACZ,WAAW,EACX,kBAAyB,GAC1B,EAAE,uBAAuB,+BAwCzB"}
@@ -1,5 +1,6 @@
1
- import { FC } from "react";
1
+ import { type FC, type ReactElement } from "react";
2
2
  import { JsonValue } from "../types/types";
3
+ import type { DataTreeSelection } from "./DataTreeActionBar";
3
4
  interface DataViewerProps {
4
5
  title: string;
5
6
  data: JsonValue;
@@ -9,6 +10,18 @@ interface DataViewerProps {
9
10
  initialExpanded?: boolean;
10
11
  /** When true, disables copy functionality and shows upgrade modal (for Pro gating) */
11
12
  disableCopy?: boolean;
13
+ /**
14
+ * Opt in to selection — see `VirtualizedDataExplorer`. Pair with
15
+ * `DataTreeActionBar` to turn the selection into edit actions.
16
+ *
17
+ * Ignored while a type filter is active (see below).
18
+ */
19
+ onSelectionChange?: (selection: DataTreeSelection | null) => void;
20
+ /** Inline editing pass-throughs — see `VirtualizedDataExplorer`. */
21
+ onRequestInlineEdit?: (selection: DataTreeSelection) => void;
22
+ inlineEditPath?: string[] | null;
23
+ renderInlineEditor?: (selection: DataTreeSelection) => ReactElement | null;
24
+ selectPath?: string[] | null;
12
25
  }
13
26
  /**
14
27
  * DataViewer component that combines VirtualizedDataExplorer with TypeLegend
@@ -1 +1 @@
1
- {"version":3,"file":"DataViewer.d.ts","sourceRoot":"","sources":["../../../../src/dataViewer/DataViewer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,EAAE,EAAE,MAAM,OAAO,CAAC;AAG9C,OAAO,EAAE,SAAS,EAAiB,MAAM,gBAAgB,CAAC;AAG1D,UAAU,eAAe;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,sFAAsF;IACtF,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA4I1C,CAAC"}
1
+ {"version":3,"file":"DataViewer.d.ts","sourceRoot":"","sources":["../../../../src/dataViewer/DataViewer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,EAAE,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAGtE,OAAO,EAAE,SAAS,EAAiB,MAAM,gBAAgB,CAAC;AAE1D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAE7D,UAAU,eAAe;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,sFAAsF;IACtF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;OAKG;IACH,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,iBAAiB,GAAG,IAAI,KAAK,IAAI,CAAC;IAClE,oEAAoE;IACpE,mBAAmB,CAAC,EAAE,CAAC,SAAS,EAAE,iBAAiB,KAAK,IAAI,CAAC;IAC7D,cAAc,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IACjC,kBAAkB,CAAC,EAAE,CAAC,SAAS,EAAE,iBAAiB,KAAK,YAAY,GAAG,IAAI,CAAC;IAC3E,UAAU,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;CAC9B;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,UAAU,EAAE,EAAE,CAAC,eAAe,CA2J1C,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { JsonValue } from "../types/types";
2
- import { FC } from "react";
2
+ import { FC, ReactElement } from "react";
3
+ import type { DataTreeSelection } from "./DataTreeActionBar";
3
4
  interface VirtualizedDataExplorerProps {
4
5
  title: string;
5
6
  description?: string;
@@ -8,6 +9,34 @@ interface VirtualizedDataExplorerProps {
8
9
  rawMode?: boolean;
9
10
  initialExpanded?: boolean;
10
11
  disableCopy?: boolean;
12
+ /**
13
+ * Opt in to selection: rows become tappable-to-select (including leaves) and
14
+ * the chosen node is reported here. Pair it with `DataTreeActionBar`, which
15
+ * turns a selection into edit actions — those live OUTSIDE the tree because a
16
+ * 24px row cannot hold a touch-sized button.
17
+ *
18
+ * Omit this and every row renders and behaves exactly as it always has.
19
+ */
20
+ onSelectionChange?: (selection: DataTreeSelection | null) => void;
21
+ /**
22
+ * Double-tapping a scalar row asks the host to start editing it. The field
23
+ * renders in the row itself (see `inlineEditPath` / `renderInlineEditor`),
24
+ * matching the mockup's double-click-to-edit.
25
+ */
26
+ onRequestInlineEdit?: (selection: DataTreeSelection) => void;
27
+ /** Data path of the row currently being edited, or null. */
28
+ inlineEditPath?: string[] | null;
29
+ /** Renders the editing field for that row. */
30
+ renderInlineEditor?: (selection: DataTreeSelection) => ReactElement | null;
31
+ /**
32
+ * Move the selection from outside. The host sets this after an edit that
33
+ * relocates the selected node (see `selectionPathAfterOp`) so the highlight
34
+ * follows the thing that moved instead of staying on the slot it left.
35
+ *
36
+ * Semi-controlled on purpose: the explorer still owns selection for ordinary
37
+ * taps, and only re-syncs when this path CHANGES.
38
+ */
39
+ selectPath?: string[] | null;
11
40
  }
12
41
  export declare const VirtualizedDataExplorer: FC<VirtualizedDataExplorerProps>;
13
42
  export {};