@buoy-gg/storage 7.0.40 → 7.0.42

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