@buoy-gg/storage 1.7.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 (187) hide show
  1. package/README.md +607 -0
  2. package/lib/commonjs/index.js +34 -0
  3. package/lib/commonjs/package.json +1 -0
  4. package/lib/commonjs/preset.js +94 -0
  5. package/lib/commonjs/storage/components/DiffViewer/DiffOptionsPanel.js +356 -0
  6. package/lib/commonjs/storage/components/DiffViewer/TreeDiffViewer.js +29 -0
  7. package/lib/commonjs/storage/components/DiffViewer/components/DiffSummary.js +121 -0
  8. package/lib/commonjs/storage/components/DiffViewer/modes/ThemedSplitView.js +419 -0
  9. package/lib/commonjs/storage/components/DiffViewer/themes/diffThemes.js +122 -0
  10. package/lib/commonjs/storage/components/GameUIStorageBrowser.js +924 -0
  11. package/lib/commonjs/storage/components/GameUIStorageStats.js +746 -0
  12. package/lib/commonjs/storage/components/MMKVInstanceInfoPanel.js +257 -0
  13. package/lib/commonjs/storage/components/MMKVInstanceSelector.js +418 -0
  14. package/lib/commonjs/storage/components/SelectionActionBar.js +224 -0
  15. package/lib/commonjs/storage/components/StorageActionButtons.js +239 -0
  16. package/lib/commonjs/storage/components/StorageActions.js +192 -0
  17. package/lib/commonjs/storage/components/StorageBrowserMode.js +31 -0
  18. package/lib/commonjs/storage/components/StorageEventDetailContent.js +1025 -0
  19. package/lib/commonjs/storage/components/StorageEventFilterView.js +141 -0
  20. package/lib/commonjs/storage/components/StorageEventListener.js +357 -0
  21. package/lib/commonjs/storage/components/StorageEventsSection.js +24 -0
  22. package/lib/commonjs/storage/components/StorageFilterCards.js +345 -0
  23. package/lib/commonjs/storage/components/StorageFilterViewV2.js +42 -0
  24. package/lib/commonjs/storage/components/StorageKeyCard.js +516 -0
  25. package/lib/commonjs/storage/components/StorageKeyRow.js +356 -0
  26. package/lib/commonjs/storage/components/StorageKeySection.js +105 -0
  27. package/lib/commonjs/storage/components/StorageKeyStats.js +344 -0
  28. package/lib/commonjs/storage/components/StorageModalWithTabs.js +871 -0
  29. package/lib/commonjs/storage/components/StorageSection.js +43 -0
  30. package/lib/commonjs/storage/hooks/useAsyncStorageKeys.js +126 -0
  31. package/lib/commonjs/storage/hooks/useMMKVInstances.js +221 -0
  32. package/lib/commonjs/storage/hooks/useMMKVKeys.js +362 -0
  33. package/lib/commonjs/storage/hooks/useTickEverySecond.js +21 -0
  34. package/lib/commonjs/storage/index.js +148 -0
  35. package/lib/commonjs/storage/types.js +5 -0
  36. package/lib/commonjs/storage/utils/AsyncStorageListener.js +510 -0
  37. package/lib/commonjs/storage/utils/MMKVInstanceRegistry.js +202 -0
  38. package/lib/commonjs/storage/utils/MMKVListener.js +380 -0
  39. package/lib/commonjs/storage/utils/clearAllStorage.js +47 -0
  40. package/lib/commonjs/storage/utils/index.js +180 -0
  41. package/lib/commonjs/storage/utils/lineDiff.js +363 -0
  42. package/lib/commonjs/storage/utils/mmkvAvailability.js +62 -0
  43. package/lib/commonjs/storage/utils/mmkvTypeDetection.js +139 -0
  44. package/lib/commonjs/storage/utils/objectDiff.js +157 -0
  45. package/lib/commonjs/storage/utils/safeAsyncStorage.js +140 -0
  46. package/lib/commonjs/storage/utils/storageActionHelpers.js +46 -0
  47. package/lib/commonjs/storage/utils/storageQueryUtils.js +35 -0
  48. package/lib/commonjs/storage/utils/valueType.js +18 -0
  49. package/lib/module/index.js +7 -0
  50. package/lib/module/preset.js +89 -0
  51. package/lib/module/storage/components/DiffViewer/DiffOptionsPanel.js +352 -0
  52. package/lib/module/storage/components/DiffViewer/TreeDiffViewer.js +25 -0
  53. package/lib/module/storage/components/DiffViewer/components/DiffSummary.js +117 -0
  54. package/lib/module/storage/components/DiffViewer/modes/ThemedSplitView.js +415 -0
  55. package/lib/module/storage/components/DiffViewer/themes/diffThemes.js +118 -0
  56. package/lib/module/storage/components/GameUIStorageBrowser.js +922 -0
  57. package/lib/module/storage/components/GameUIStorageStats.js +742 -0
  58. package/lib/module/storage/components/MMKVInstanceInfoPanel.js +253 -0
  59. package/lib/module/storage/components/MMKVInstanceSelector.js +414 -0
  60. package/lib/module/storage/components/SelectionActionBar.js +221 -0
  61. package/lib/module/storage/components/StorageActionButtons.js +236 -0
  62. package/lib/module/storage/components/StorageActions.js +189 -0
  63. package/lib/module/storage/components/StorageBrowserMode.js +27 -0
  64. package/lib/module/storage/components/StorageEventDetailContent.js +1020 -0
  65. package/lib/module/storage/components/StorageEventFilterView.js +137 -0
  66. package/lib/module/storage/components/StorageEventListener.js +354 -0
  67. package/lib/module/storage/components/StorageEventsSection.js +20 -0
  68. package/lib/module/storage/components/StorageFilterCards.js +341 -0
  69. package/lib/module/storage/components/StorageFilterViewV2.js +38 -0
  70. package/lib/module/storage/components/StorageKeyCard.js +513 -0
  71. package/lib/module/storage/components/StorageKeyRow.js +353 -0
  72. package/lib/module/storage/components/StorageKeySection.js +101 -0
  73. package/lib/module/storage/components/StorageKeyStats.js +340 -0
  74. package/lib/module/storage/components/StorageModalWithTabs.js +867 -0
  75. package/lib/module/storage/components/StorageSection.js +40 -0
  76. package/lib/module/storage/hooks/useAsyncStorageKeys.js +121 -0
  77. package/lib/module/storage/hooks/useMMKVInstances.js +216 -0
  78. package/lib/module/storage/hooks/useMMKVKeys.js +359 -0
  79. package/lib/module/storage/hooks/useTickEverySecond.js +18 -0
  80. package/lib/module/storage/index.js +25 -0
  81. package/lib/module/storage/types.js +3 -0
  82. package/lib/module/storage/utils/AsyncStorageListener.js +500 -0
  83. package/lib/module/storage/utils/MMKVInstanceRegistry.js +196 -0
  84. package/lib/module/storage/utils/MMKVListener.js +367 -0
  85. package/lib/module/storage/utils/clearAllStorage.js +42 -0
  86. package/lib/module/storage/utils/index.js +22 -0
  87. package/lib/module/storage/utils/lineDiff.js +359 -0
  88. package/lib/module/storage/utils/mmkvAvailability.js +56 -0
  89. package/lib/module/storage/utils/mmkvTypeDetection.js +133 -0
  90. package/lib/module/storage/utils/objectDiff.js +153 -0
  91. package/lib/module/storage/utils/safeAsyncStorage.js +134 -0
  92. package/lib/module/storage/utils/storageActionHelpers.js +42 -0
  93. package/lib/module/storage/utils/storageQueryUtils.js +30 -0
  94. package/lib/module/storage/utils/valueType.js +14 -0
  95. package/lib/typescript/index.d.ts +3 -0
  96. package/lib/typescript/index.d.ts.map +1 -0
  97. package/lib/typescript/preset.d.ts +90 -0
  98. package/lib/typescript/preset.d.ts.map +1 -0
  99. package/lib/typescript/storage/components/DiffViewer/DiffOptionsPanel.d.ts +18 -0
  100. package/lib/typescript/storage/components/DiffViewer/DiffOptionsPanel.d.ts.map +1 -0
  101. package/lib/typescript/storage/components/DiffViewer/TreeDiffViewer.d.ts +7 -0
  102. package/lib/typescript/storage/components/DiffViewer/TreeDiffViewer.d.ts.map +1 -0
  103. package/lib/typescript/storage/components/DiffViewer/components/DiffSummary.d.ts +12 -0
  104. package/lib/typescript/storage/components/DiffViewer/components/DiffSummary.d.ts.map +1 -0
  105. package/lib/typescript/storage/components/DiffViewer/modes/ThemedSplitView.d.ts +13 -0
  106. package/lib/typescript/storage/components/DiffViewer/modes/ThemedSplitView.d.ts.map +1 -0
  107. package/lib/typescript/storage/components/DiffViewer/themes/diffThemes.d.ts +64 -0
  108. package/lib/typescript/storage/components/DiffViewer/themes/diffThemes.d.ts.map +1 -0
  109. package/lib/typescript/storage/components/GameUIStorageBrowser.d.ts +16 -0
  110. package/lib/typescript/storage/components/GameUIStorageBrowser.d.ts.map +1 -0
  111. package/lib/typescript/storage/components/GameUIStorageStats.d.ts +7 -0
  112. package/lib/typescript/storage/components/GameUIStorageStats.d.ts.map +1 -0
  113. package/lib/typescript/storage/components/MMKVInstanceInfoPanel.d.ts +42 -0
  114. package/lib/typescript/storage/components/MMKVInstanceInfoPanel.d.ts.map +1 -0
  115. package/lib/typescript/storage/components/MMKVInstanceSelector.d.ts +35 -0
  116. package/lib/typescript/storage/components/MMKVInstanceSelector.d.ts.map +1 -0
  117. package/lib/typescript/storage/components/SelectionActionBar.d.ts +21 -0
  118. package/lib/typescript/storage/components/SelectionActionBar.d.ts.map +1 -0
  119. package/lib/typescript/storage/components/StorageActionButtons.d.ts +21 -0
  120. package/lib/typescript/storage/components/StorageActionButtons.d.ts.map +1 -0
  121. package/lib/typescript/storage/components/StorageActions.d.ts +10 -0
  122. package/lib/typescript/storage/components/StorageActions.d.ts.map +1 -0
  123. package/lib/typescript/storage/components/StorageBrowserMode.d.ts +18 -0
  124. package/lib/typescript/storage/components/StorageBrowserMode.d.ts.map +1 -0
  125. package/lib/typescript/storage/components/StorageEventDetailContent.d.ts +40 -0
  126. package/lib/typescript/storage/components/StorageEventDetailContent.d.ts.map +1 -0
  127. package/lib/typescript/storage/components/StorageEventFilterView.d.ts +11 -0
  128. package/lib/typescript/storage/components/StorageEventFilterView.d.ts.map +1 -0
  129. package/lib/typescript/storage/components/StorageEventListener.d.ts +6 -0
  130. package/lib/typescript/storage/components/StorageEventListener.d.ts.map +1 -0
  131. package/lib/typescript/storage/components/StorageEventsSection.d.ts +7 -0
  132. package/lib/typescript/storage/components/StorageEventsSection.d.ts.map +1 -0
  133. package/lib/typescript/storage/components/StorageFilterCards.d.ts +36 -0
  134. package/lib/typescript/storage/components/StorageFilterCards.d.ts.map +1 -0
  135. package/lib/typescript/storage/components/StorageFilterViewV2.d.ts +9 -0
  136. package/lib/typescript/storage/components/StorageFilterViewV2.d.ts.map +1 -0
  137. package/lib/typescript/storage/components/StorageKeyCard.d.ts +17 -0
  138. package/lib/typescript/storage/components/StorageKeyCard.d.ts.map +1 -0
  139. package/lib/typescript/storage/components/StorageKeyRow.d.ts +15 -0
  140. package/lib/typescript/storage/components/StorageKeyRow.d.ts.map +1 -0
  141. package/lib/typescript/storage/components/StorageKeySection.d.ts +25 -0
  142. package/lib/typescript/storage/components/StorageKeySection.d.ts.map +1 -0
  143. package/lib/typescript/storage/components/StorageKeyStats.d.ts +15 -0
  144. package/lib/typescript/storage/components/StorageKeyStats.d.ts.map +1 -0
  145. package/lib/typescript/storage/components/StorageModalWithTabs.d.ts +13 -0
  146. package/lib/typescript/storage/components/StorageModalWithTabs.d.ts.map +1 -0
  147. package/lib/typescript/storage/components/StorageSection.d.ts +10 -0
  148. package/lib/typescript/storage/components/StorageSection.d.ts.map +1 -0
  149. package/lib/typescript/storage/hooks/useAsyncStorageKeys.d.ts +10 -0
  150. package/lib/typescript/storage/hooks/useAsyncStorageKeys.d.ts.map +1 -0
  151. package/lib/typescript/storage/hooks/useMMKVInstances.d.ts +114 -0
  152. package/lib/typescript/storage/hooks/useMMKVInstances.d.ts.map +1 -0
  153. package/lib/typescript/storage/hooks/useMMKVKeys.d.ts +94 -0
  154. package/lib/typescript/storage/hooks/useMMKVKeys.d.ts.map +1 -0
  155. package/lib/typescript/storage/hooks/useTickEverySecond.d.ts +6 -0
  156. package/lib/typescript/storage/hooks/useTickEverySecond.d.ts.map +1 -0
  157. package/lib/typescript/storage/index.d.ts +15 -0
  158. package/lib/typescript/storage/index.d.ts.map +1 -0
  159. package/lib/typescript/storage/types.d.ts +41 -0
  160. package/lib/typescript/storage/types.d.ts.map +1 -0
  161. package/lib/typescript/storage/utils/AsyncStorageListener.d.ts +195 -0
  162. package/lib/typescript/storage/utils/AsyncStorageListener.d.ts.map +1 -0
  163. package/lib/typescript/storage/utils/MMKVInstanceRegistry.d.ts +224 -0
  164. package/lib/typescript/storage/utils/MMKVInstanceRegistry.d.ts.map +1 -0
  165. package/lib/typescript/storage/utils/MMKVListener.d.ts +218 -0
  166. package/lib/typescript/storage/utils/MMKVListener.d.ts.map +1 -0
  167. package/lib/typescript/storage/utils/clearAllStorage.d.ts +11 -0
  168. package/lib/typescript/storage/utils/clearAllStorage.d.ts.map +1 -0
  169. package/lib/typescript/storage/utils/index.d.ts +8 -0
  170. package/lib/typescript/storage/utils/index.d.ts.map +1 -0
  171. package/lib/typescript/storage/utils/lineDiff.d.ts +34 -0
  172. package/lib/typescript/storage/utils/lineDiff.d.ts.map +1 -0
  173. package/lib/typescript/storage/utils/mmkvAvailability.d.ts +23 -0
  174. package/lib/typescript/storage/utils/mmkvAvailability.d.ts.map +1 -0
  175. package/lib/typescript/storage/utils/mmkvTypeDetection.d.ts +71 -0
  176. package/lib/typescript/storage/utils/mmkvTypeDetection.d.ts.map +1 -0
  177. package/lib/typescript/storage/utils/objectDiff.d.ts +35 -0
  178. package/lib/typescript/storage/utils/objectDiff.d.ts.map +1 -0
  179. package/lib/typescript/storage/utils/safeAsyncStorage.d.ts +56 -0
  180. package/lib/typescript/storage/utils/safeAsyncStorage.d.ts.map +1 -0
  181. package/lib/typescript/storage/utils/storageActionHelpers.d.ts +5 -0
  182. package/lib/typescript/storage/utils/storageActionHelpers.d.ts.map +1 -0
  183. package/lib/typescript/storage/utils/storageQueryUtils.d.ts +6 -0
  184. package/lib/typescript/storage/utils/storageQueryUtils.d.ts.map +1 -0
  185. package/lib/typescript/storage/utils/valueType.d.ts +3 -0
  186. package/lib/typescript/storage/utils/valueType.d.ts.map +1 -0
  187. package/package.json +68 -0
@@ -0,0 +1,352 @@
1
+ "use strict";
2
+
3
+ import { View, Text, StyleSheet, TouchableOpacity, Switch } from "react-native";
4
+ import { macOSColors, Settings, Hash, FileText, Filter } from "@buoy-gg/shared-ui";
5
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
+ const COMPARE_METHODS = [{
7
+ id: "chars",
8
+ label: "Chars",
9
+ description: "Shows every single character change. Best for spotting typos or small edits in strings."
10
+ }, {
11
+ id: "words",
12
+ label: "Words",
13
+ description: "Highlights changed words while preserving context. Default mode, ideal for most text changes."
14
+ }, {
15
+ id: "lines",
16
+ label: "Lines",
17
+ description: "Shows entire line as changed without word-level detail. Good for completely rewritten lines."
18
+ }, {
19
+ id: "trimmedLines",
20
+ label: "Trim",
21
+ description: "Ignores leading/trailing spaces when comparing. Useful when indentation changes."
22
+ }];
23
+ const CONTEXT_OPTIONS = [0, 1, 3, 5, 10];
24
+ export function DiffOptionsPanel({
25
+ options,
26
+ onOptionsChange,
27
+ isExpanded,
28
+ onToggleExpanded
29
+ }) {
30
+ const updateOption = (key, value) => {
31
+ onOptionsChange({
32
+ ...options,
33
+ [key]: value
34
+ });
35
+ };
36
+
37
+ // Check if any non-default options are active
38
+ const hasActiveFilters = options.hideLineNumbers || options.disableWordDiff || options.showDiffOnly || options.compareMethod !== "words";
39
+ return /*#__PURE__*/_jsxs(View, {
40
+ style: styles.container,
41
+ children: [/*#__PURE__*/_jsxs(TouchableOpacity, {
42
+ style: styles.toggleButton,
43
+ onPress: onToggleExpanded,
44
+ activeOpacity: 0.7,
45
+ children: [/*#__PURE__*/_jsx(Settings, {
46
+ size: 12,
47
+ color: macOSColors.semantic.info
48
+ }), /*#__PURE__*/_jsx(Text, {
49
+ style: styles.toggleText,
50
+ children: "Options"
51
+ }), hasActiveFilters && /*#__PURE__*/_jsx(View, {
52
+ style: styles.activeIndicator,
53
+ children: /*#__PURE__*/_jsx(Text, {
54
+ style: styles.activeIndicatorText,
55
+ children: [options.hideLineNumbers && "No#", options.disableWordDiff && "NoWord", options.showDiffOnly && `Diff${options.contextLines}`, options.compareMethod !== "words" && options.compareMethod].filter(Boolean).join(" ")
56
+ })
57
+ }), /*#__PURE__*/_jsx(Text, {
58
+ style: styles.toggleIndicator,
59
+ children: isExpanded ? "▼" : "▶"
60
+ })]
61
+ }), isExpanded && /*#__PURE__*/_jsxs(View, {
62
+ style: styles.optionsContent,
63
+ children: [/*#__PURE__*/_jsxs(View, {
64
+ style: styles.section,
65
+ children: [/*#__PURE__*/_jsx(Text, {
66
+ style: styles.sectionTitle,
67
+ children: "DISPLAY"
68
+ }), /*#__PURE__*/_jsxs(View, {
69
+ style: styles.optionContainer,
70
+ children: [/*#__PURE__*/_jsxs(View, {
71
+ style: styles.option,
72
+ children: [/*#__PURE__*/_jsxs(View, {
73
+ style: styles.optionLeft,
74
+ children: [/*#__PURE__*/_jsx(Hash, {
75
+ size: 11,
76
+ color: macOSColors.text.secondary
77
+ }), /*#__PURE__*/_jsx(Text, {
78
+ style: styles.optionLabel,
79
+ children: "Line Numbers"
80
+ })]
81
+ }), /*#__PURE__*/_jsx(Switch, {
82
+ value: !options.hideLineNumbers,
83
+ onValueChange: value => updateOption("hideLineNumbers", !value),
84
+ trackColor: {
85
+ false: macOSColors.border.default,
86
+ true: macOSColors.semantic.success + "60"
87
+ },
88
+ thumbColor: !options.hideLineNumbers ? macOSColors.semantic.success : macOSColors.text.muted,
89
+ style: styles.switch
90
+ })]
91
+ }), /*#__PURE__*/_jsx(Text, {
92
+ style: styles.optionDescription,
93
+ children: !options.hideLineNumbers ? "Shows line numbers for easier navigation and reference" : "Line numbers hidden for cleaner view"
94
+ })]
95
+ }), /*#__PURE__*/_jsxs(View, {
96
+ style: styles.optionContainer,
97
+ children: [/*#__PURE__*/_jsxs(View, {
98
+ style: styles.option,
99
+ children: [/*#__PURE__*/_jsxs(View, {
100
+ style: styles.optionLeft,
101
+ children: [/*#__PURE__*/_jsx(FileText, {
102
+ size: 11,
103
+ color: macOSColors.text.secondary
104
+ }), /*#__PURE__*/_jsx(Text, {
105
+ style: styles.optionLabel,
106
+ children: "Word Diff"
107
+ })]
108
+ }), /*#__PURE__*/_jsx(Switch, {
109
+ value: !options.disableWordDiff,
110
+ onValueChange: value => updateOption("disableWordDiff", !value),
111
+ trackColor: {
112
+ false: macOSColors.border.default,
113
+ true: macOSColors.semantic.success + "60"
114
+ },
115
+ thumbColor: !options.disableWordDiff ? macOSColors.semantic.success : macOSColors.text.muted,
116
+ style: styles.switch
117
+ })]
118
+ }), /*#__PURE__*/_jsx(Text, {
119
+ style: styles.optionDescription,
120
+ children: !options.disableWordDiff ? "Highlights specific words/characters that changed within modified lines" : "Shows entire lines as changed without detailed highlighting"
121
+ })]
122
+ }), /*#__PURE__*/_jsxs(View, {
123
+ style: styles.optionContainer,
124
+ children: [/*#__PURE__*/_jsxs(View, {
125
+ style: styles.option,
126
+ children: [/*#__PURE__*/_jsxs(View, {
127
+ style: styles.optionLeft,
128
+ children: [/*#__PURE__*/_jsx(Filter, {
129
+ size: 11,
130
+ color: macOSColors.text.secondary
131
+ }), /*#__PURE__*/_jsx(Text, {
132
+ style: styles.optionLabel,
133
+ children: "Diff Only"
134
+ })]
135
+ }), /*#__PURE__*/_jsx(Switch, {
136
+ value: options.showDiffOnly,
137
+ onValueChange: value => updateOption("showDiffOnly", value),
138
+ trackColor: {
139
+ false: macOSColors.border.default,
140
+ true: macOSColors.semantic.success + "60"
141
+ },
142
+ thumbColor: options.showDiffOnly ? macOSColors.semantic.success : macOSColors.text.muted,
143
+ style: styles.switch
144
+ })]
145
+ }), /*#__PURE__*/_jsx(Text, {
146
+ style: styles.optionDescription,
147
+ children: options.showDiffOnly ? `Shows only changed lines with ${options.contextLines} lines of context around them` : "Shows complete content with all lines visible"
148
+ })]
149
+ })]
150
+ }), /*#__PURE__*/_jsxs(View, {
151
+ style: styles.section,
152
+ children: [/*#__PURE__*/_jsx(Text, {
153
+ style: styles.sectionTitle,
154
+ children: "COMPARE METHOD"
155
+ }), /*#__PURE__*/_jsx(View, {
156
+ style: styles.methodButtons,
157
+ children: COMPARE_METHODS.map(method => /*#__PURE__*/_jsx(TouchableOpacity, {
158
+ style: [styles.methodButton, options.compareMethod === method.id && styles.methodButtonActive],
159
+ onPress: () => updateOption("compareMethod", method.id),
160
+ activeOpacity: 0.7,
161
+ children: /*#__PURE__*/_jsx(Text, {
162
+ style: [styles.methodButtonText, options.compareMethod === method.id && styles.methodButtonTextActive],
163
+ children: method.label
164
+ })
165
+ }, method.id))
166
+ }), /*#__PURE__*/_jsx(Text, {
167
+ style: styles.methodDescription,
168
+ children: COMPARE_METHODS.find(m => m.id === options.compareMethod)?.description
169
+ })]
170
+ }), options.showDiffOnly && /*#__PURE__*/_jsxs(View, {
171
+ style: styles.section,
172
+ children: [/*#__PURE__*/_jsx(Text, {
173
+ style: styles.sectionTitle,
174
+ children: "CONTEXT LINES"
175
+ }), /*#__PURE__*/_jsx(View, {
176
+ style: styles.contextButtons,
177
+ children: CONTEXT_OPTIONS.map(lines => /*#__PURE__*/_jsx(TouchableOpacity, {
178
+ style: [styles.contextButton, options.contextLines === lines && styles.contextButtonActive],
179
+ onPress: () => updateOption("contextLines", lines),
180
+ activeOpacity: 0.7,
181
+ children: /*#__PURE__*/_jsx(Text, {
182
+ style: [styles.contextButtonText, options.contextLines === lines && styles.contextButtonTextActive],
183
+ children: lines
184
+ })
185
+ }, lines))
186
+ }), /*#__PURE__*/_jsx(Text, {
187
+ style: styles.contextDescription,
188
+ children: options.contextLines === 0 ? "Shows only the exact lines that changed with no surrounding context" : `Shows ${options.contextLines} unchanged line${options.contextLines === 1 ? "" : "s"} before and after each change for context`
189
+ })]
190
+ })]
191
+ })]
192
+ });
193
+ }
194
+ const styles = StyleSheet.create({
195
+ container: {
196
+ marginVertical: 8
197
+ },
198
+ toggleButton: {
199
+ flexDirection: "row",
200
+ alignItems: "center",
201
+ backgroundColor: macOSColors.background.card,
202
+ paddingVertical: 6,
203
+ paddingHorizontal: 10,
204
+ borderRadius: 4,
205
+ gap: 6
206
+ },
207
+ toggleText: {
208
+ fontSize: 10,
209
+ fontWeight: "600",
210
+ color: macOSColors.semantic.info,
211
+ fontFamily: "monospace",
212
+ flex: 1
213
+ },
214
+ toggleIndicator: {
215
+ fontSize: 8,
216
+ color: macOSColors.text.muted,
217
+ fontFamily: "monospace"
218
+ },
219
+ optionsContent: {
220
+ marginTop: 8,
221
+ backgroundColor: macOSColors.background.input,
222
+ borderRadius: 6,
223
+ padding: 12,
224
+ gap: 16
225
+ },
226
+ section: {
227
+ gap: 8
228
+ },
229
+ sectionTitle: {
230
+ fontSize: 9,
231
+ fontWeight: "700",
232
+ color: macOSColors.semantic.info,
233
+ fontFamily: "monospace",
234
+ letterSpacing: 0.5,
235
+ marginBottom: 4
236
+ },
237
+ optionContainer: {
238
+ marginBottom: 12
239
+ },
240
+ option: {
241
+ flexDirection: "row",
242
+ alignItems: "center",
243
+ justifyContent: "space-between",
244
+ paddingVertical: 4
245
+ },
246
+ optionLeft: {
247
+ flexDirection: "row",
248
+ alignItems: "center",
249
+ gap: 8
250
+ },
251
+ optionLabel: {
252
+ fontSize: 11,
253
+ color: macOSColors.text.primary,
254
+ fontFamily: "monospace"
255
+ },
256
+ optionDescription: {
257
+ fontSize: 9,
258
+ color: macOSColors.text.muted,
259
+ fontFamily: "monospace",
260
+ marginTop: 4,
261
+ marginLeft: 19,
262
+ lineHeight: 12
263
+ },
264
+ switch: {
265
+ transform: [{
266
+ scaleX: 0.8
267
+ }, {
268
+ scaleY: 0.8
269
+ }]
270
+ },
271
+ methodButtons: {
272
+ flexDirection: "row",
273
+ gap: 4,
274
+ flexWrap: "wrap"
275
+ },
276
+ methodButton: {
277
+ paddingVertical: 6,
278
+ paddingHorizontal: 10,
279
+ backgroundColor: macOSColors.background.input,
280
+ borderRadius: 4,
281
+ borderWidth: 1,
282
+ borderColor: macOSColors.border.default
283
+ },
284
+ methodButtonActive: {
285
+ backgroundColor: macOSColors.semantic.infoBackground,
286
+ borderColor: macOSColors.semantic.info + "40"
287
+ },
288
+ methodButtonText: {
289
+ fontSize: 9,
290
+ fontFamily: "monospace",
291
+ color: macOSColors.text.muted,
292
+ fontWeight: "600"
293
+ },
294
+ methodButtonTextActive: {
295
+ color: macOSColors.semantic.info
296
+ },
297
+ methodDescription: {
298
+ fontSize: 9,
299
+ color: macOSColors.text.muted,
300
+ fontFamily: "monospace",
301
+ marginTop: 8,
302
+ lineHeight: 12
303
+ },
304
+ contextButtons: {
305
+ flexDirection: "row",
306
+ gap: 6
307
+ },
308
+ contextButton: {
309
+ width: 32,
310
+ height: 28,
311
+ justifyContent: "center",
312
+ alignItems: "center",
313
+ backgroundColor: macOSColors.background.input,
314
+ borderRadius: 4,
315
+ borderWidth: 1,
316
+ borderColor: macOSColors.border.default
317
+ },
318
+ contextButtonActive: {
319
+ backgroundColor: macOSColors.semantic.warningBackground,
320
+ borderColor: macOSColors.semantic.warning + "40"
321
+ },
322
+ contextButtonText: {
323
+ fontSize: 10,
324
+ fontFamily: "monospace",
325
+ color: macOSColors.text.muted,
326
+ fontWeight: "600"
327
+ },
328
+ contextButtonTextActive: {
329
+ color: macOSColors.semantic.warning
330
+ },
331
+ contextDescription: {
332
+ fontSize: 9,
333
+ color: macOSColors.text.muted,
334
+ fontFamily: "monospace",
335
+ marginTop: 8,
336
+ lineHeight: 12
337
+ },
338
+ activeIndicator: {
339
+ backgroundColor: macOSColors.semantic.warningBackground,
340
+ paddingHorizontal: 6,
341
+ paddingVertical: 2,
342
+ borderRadius: 3,
343
+ marginLeft: "auto",
344
+ marginRight: 4
345
+ },
346
+ activeIndicatorText: {
347
+ fontSize: 8,
348
+ fontFamily: "monospace",
349
+ color: macOSColors.semantic.warning,
350
+ fontWeight: "600"
351
+ }
352
+ });
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ import { View, StyleSheet } from "react-native";
4
+ import { gameUIColors } from "@buoy-gg/shared-ui";
5
+ import { TreeDiffViewer as SharedTreeDiffViewer } from "@buoy-gg/shared-ui/dataViewer";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ export function TreeDiffViewer({
8
+ oldValue,
9
+ newValue
10
+ }) {
11
+ return /*#__PURE__*/_jsx(View, {
12
+ style: styles.container,
13
+ children: /*#__PURE__*/_jsx(SharedTreeDiffViewer, {
14
+ oldValue: oldValue,
15
+ newValue: newValue,
16
+ theme: "dark"
17
+ })
18
+ });
19
+ }
20
+ const styles = StyleSheet.create({
21
+ container: {
22
+ flex: 1,
23
+ backgroundColor: gameUIColors.background
24
+ }
25
+ });
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+
3
+ import { View, Text, StyleSheet } from "react-native";
4
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
5
+ export function DiffSummary({
6
+ added,
7
+ removed,
8
+ modified,
9
+ theme,
10
+ style
11
+ }) {
12
+ const hasChanges = added > 0 || removed > 0 || modified > 0;
13
+ if (!hasChanges) {
14
+ return null;
15
+ }
16
+ return /*#__PURE__*/_jsxs(View, {
17
+ style: [styles.container, {
18
+ backgroundColor: theme.summaryBackground,
19
+ borderTopColor: theme.borderColor
20
+ }, style],
21
+ children: [added > 0 && /*#__PURE__*/_jsxs(View, {
22
+ style: [styles.badge, {
23
+ backgroundColor: theme.addedBackground
24
+ }],
25
+ children: [/*#__PURE__*/_jsx(Text, {
26
+ style: [styles.icon, {
27
+ color: theme.summaryAddedText
28
+ }],
29
+ children: "+"
30
+ }), /*#__PURE__*/_jsx(Text, {
31
+ style: [styles.count, {
32
+ color: theme.summaryAddedText
33
+ }],
34
+ children: added
35
+ }), /*#__PURE__*/_jsx(Text, {
36
+ style: [styles.label, {
37
+ color: theme.summaryAddedText
38
+ }],
39
+ children: "new"
40
+ })]
41
+ }), removed > 0 && /*#__PURE__*/_jsxs(View, {
42
+ style: [styles.badge, {
43
+ backgroundColor: theme.removedBackground
44
+ }],
45
+ children: [/*#__PURE__*/_jsx(Text, {
46
+ style: [styles.icon, {
47
+ color: theme.summaryRemovedText
48
+ }],
49
+ children: "\u2212"
50
+ }), /*#__PURE__*/_jsx(Text, {
51
+ style: [styles.count, {
52
+ color: theme.summaryRemovedText
53
+ }],
54
+ children: removed
55
+ }), /*#__PURE__*/_jsx(Text, {
56
+ style: [styles.label, {
57
+ color: theme.summaryRemovedText
58
+ }],
59
+ children: "gone"
60
+ })]
61
+ }), modified > 0 && /*#__PURE__*/_jsxs(View, {
62
+ style: [styles.badge, {
63
+ backgroundColor: theme.modifiedBackground
64
+ }],
65
+ children: [/*#__PURE__*/_jsx(Text, {
66
+ style: [styles.icon, {
67
+ color: theme.summaryModifiedText
68
+ }],
69
+ children: "\u2248"
70
+ }), /*#__PURE__*/_jsx(Text, {
71
+ style: [styles.count, {
72
+ color: theme.summaryModifiedText
73
+ }],
74
+ children: modified
75
+ }), /*#__PURE__*/_jsx(Text, {
76
+ style: [styles.label, {
77
+ color: theme.summaryModifiedText
78
+ }],
79
+ children: "modified"
80
+ })]
81
+ })]
82
+ });
83
+ }
84
+ const styles = StyleSheet.create({
85
+ container: {
86
+ flexDirection: "row",
87
+ alignItems: "center",
88
+ justifyContent: "center",
89
+ gap: 12,
90
+ paddingVertical: 6,
91
+ paddingHorizontal: 12,
92
+ borderTopWidth: 1
93
+ },
94
+ badge: {
95
+ flexDirection: "row",
96
+ alignItems: "center",
97
+ gap: 3,
98
+ paddingHorizontal: 6,
99
+ paddingVertical: 2,
100
+ borderRadius: 10
101
+ },
102
+ icon: {
103
+ fontSize: 11,
104
+ fontFamily: "monospace",
105
+ fontWeight: "700"
106
+ },
107
+ count: {
108
+ fontSize: 10,
109
+ fontFamily: "monospace",
110
+ fontWeight: "600"
111
+ },
112
+ label: {
113
+ fontSize: 9,
114
+ fontFamily: "monospace",
115
+ opacity: 0.9
116
+ }
117
+ });