@buoy-gg/highlight-updates 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 (110) hide show
  1. package/README.md +11 -67
  2. package/lib/commonjs/highlight-updates/HighlightUpdatesOverlay.js +1 -281
  3. package/lib/commonjs/highlight-updates/components/HighlightFilterView.js +1 -1474
  4. package/lib/commonjs/highlight-updates/components/HighlightUpdatesModal.js +1 -641
  5. package/lib/commonjs/highlight-updates/components/IdentifierBadge.js +1 -273
  6. package/lib/commonjs/highlight-updates/components/IsolatedRenderList.js +1 -188
  7. package/lib/commonjs/highlight-updates/components/ModalHeaderContent.js +1 -293
  8. package/lib/commonjs/highlight-updates/components/RenderCauseBadge.js +1 -508
  9. package/lib/commonjs/highlight-updates/components/RenderDetailView.js +1 -846
  10. package/lib/commonjs/highlight-updates/components/RenderHistoryViewer.js +1 -915
  11. package/lib/commonjs/highlight-updates/components/RenderListItem.js +1 -235
  12. package/lib/commonjs/highlight-updates/components/RendersCopySettingsView.js +1 -469
  13. package/lib/commonjs/highlight-updates/components/StatsDisplay.js +1 -73
  14. package/lib/commonjs/highlight-updates/types/copySettings.js +1 -107
  15. package/lib/commonjs/highlight-updates/utils/CommitProfiler.js +1 -446
  16. package/lib/commonjs/highlight-updates/utils/HighlightUpdatesController.js +1 -1920
  17. package/lib/commonjs/highlight-updates/utils/PerformanceLogger.js +26 -359
  18. package/lib/commonjs/highlight-updates/utils/ProfilerInterceptor.js +1 -371
  19. package/lib/commonjs/highlight-updates/utils/RenderCauseDetector.js +5 -1840
  20. package/lib/commonjs/highlight-updates/utils/RenderTracker.js +1 -952
  21. package/lib/commonjs/highlight-updates/utils/ViewTypeMapper.js +1 -264
  22. package/lib/commonjs/highlight-updates/utils/copySettingsStorage.js +1 -32
  23. package/lib/commonjs/highlight-updates/utils/devtoolsComponentNames.js +1 -188
  24. package/lib/commonjs/highlight-updates/utils/namedComposite.js +1 -41
  25. package/lib/commonjs/highlight-updates/utils/ownStateChanged.js +1 -103
  26. package/lib/commonjs/highlight-updates/utils/rawEventEmitter.js +1 -50
  27. package/lib/commonjs/highlight-updates/utils/rawEventEmitter.web.js +1 -0
  28. package/lib/commonjs/highlight-updates/utils/renderExportFormatter.js +1 -58
  29. package/lib/commonjs/highlight-updates/utils/rendersExportFormatter.js +1 -485
  30. package/lib/commonjs/highlight-updates/utils/screenElements.js +1 -1248
  31. package/lib/commonjs/highlight-updates/utils/tapMatch.js +1 -83
  32. package/lib/commonjs/highlight-updates/utils/testIDs.js +1 -68
  33. package/lib/commonjs/highlight-updates/utils/touchCapture.js +1 -277
  34. package/lib/commonjs/index.js +1 -429
  35. package/lib/commonjs/preset.js +1 -278
  36. package/lib/commonjs/sync/highlightUpdatesSyncAdapter.js +1 -235
  37. package/lib/module/highlight-updates/HighlightUpdatesOverlay.js +1 -274
  38. package/lib/module/highlight-updates/components/HighlightFilterView.js +1 -1468
  39. package/lib/module/highlight-updates/components/HighlightUpdatesModal.js +1 -634
  40. package/lib/module/highlight-updates/components/IdentifierBadge.js +1 -265
  41. package/lib/module/highlight-updates/components/IsolatedRenderList.js +1 -183
  42. package/lib/module/highlight-updates/components/ModalHeaderContent.js +1 -288
  43. package/lib/module/highlight-updates/components/RenderCauseBadge.js +1 -499
  44. package/lib/module/highlight-updates/components/RenderDetailView.js +1 -840
  45. package/lib/module/highlight-updates/components/RenderHistoryViewer.js +1 -908
  46. package/lib/module/highlight-updates/components/RenderListItem.js +1 -230
  47. package/lib/module/highlight-updates/components/RendersCopySettingsView.js +1 -465
  48. package/lib/module/highlight-updates/components/StatsDisplay.js +1 -70
  49. package/lib/module/highlight-updates/types/copySettings.js +1 -102
  50. package/lib/module/highlight-updates/utils/CommitProfiler.js +1 -442
  51. package/lib/module/highlight-updates/utils/HighlightUpdatesController.js +1 -1916
  52. package/lib/module/highlight-updates/utils/PerformanceLogger.js +26 -353
  53. package/lib/module/highlight-updates/utils/ProfilerInterceptor.js +1 -358
  54. package/lib/module/highlight-updates/utils/RenderCauseDetector.js +5 -1830
  55. package/lib/module/highlight-updates/utils/RenderTracker.js +1 -949
  56. package/lib/module/highlight-updates/utils/ViewTypeMapper.js +1 -255
  57. package/lib/module/highlight-updates/utils/copySettingsStorage.js +1 -26
  58. package/lib/module/highlight-updates/utils/devtoolsComponentNames.js +1 -178
  59. package/lib/module/highlight-updates/utils/namedComposite.js +1 -36
  60. package/lib/module/highlight-updates/utils/ownStateChanged.js +1 -98
  61. package/lib/module/highlight-updates/utils/rawEventEmitter.js +1 -46
  62. package/lib/module/highlight-updates/utils/rawEventEmitter.web.js +1 -0
  63. package/lib/module/highlight-updates/utils/renderExportFormatter.js +1 -54
  64. package/lib/module/highlight-updates/utils/rendersExportFormatter.js +1 -478
  65. package/lib/module/highlight-updates/utils/screenElements.js +1 -1242
  66. package/lib/module/highlight-updates/utils/tapMatch.js +1 -76
  67. package/lib/module/highlight-updates/utils/testIDs.js +1 -60
  68. package/lib/module/highlight-updates/utils/touchCapture.js +1 -270
  69. package/lib/module/index.js +1 -130
  70. package/lib/module/preset.js +1 -272
  71. package/lib/module/sync/highlightUpdatesSyncAdapter.js +1 -230
  72. package/lib/typescript/highlight-updates/utils/HighlightUpdatesController.d.ts +0 -26
  73. package/lib/typescript/highlight-updates/utils/rawEventEmitter.web.d.ts +3 -0
  74. package/lib/typescript/highlight-updates/utils/screenElements.d.ts +0 -19
  75. package/lib/web/index.mjs +38 -0
  76. package/package.json +34 -14
  77. package/lib/typescript/highlight-updates/HighlightUpdatesOverlay.d.ts.map +0 -1
  78. package/lib/typescript/highlight-updates/components/HighlightFilterView.d.ts.map +0 -1
  79. package/lib/typescript/highlight-updates/components/HighlightUpdatesModal.d.ts.map +0 -1
  80. package/lib/typescript/highlight-updates/components/IdentifierBadge.d.ts.map +0 -1
  81. package/lib/typescript/highlight-updates/components/IsolatedRenderList.d.ts.map +0 -1
  82. package/lib/typescript/highlight-updates/components/ModalHeaderContent.d.ts.map +0 -1
  83. package/lib/typescript/highlight-updates/components/RenderCauseBadge.d.ts.map +0 -1
  84. package/lib/typescript/highlight-updates/components/RenderDetailView.d.ts.map +0 -1
  85. package/lib/typescript/highlight-updates/components/RenderHistoryViewer.d.ts.map +0 -1
  86. package/lib/typescript/highlight-updates/components/RenderListItem.d.ts.map +0 -1
  87. package/lib/typescript/highlight-updates/components/RendersCopySettingsView.d.ts.map +0 -1
  88. package/lib/typescript/highlight-updates/components/StatsDisplay.d.ts.map +0 -1
  89. package/lib/typescript/highlight-updates/types/copySettings.d.ts.map +0 -1
  90. package/lib/typescript/highlight-updates/utils/CommitProfiler.d.ts.map +0 -1
  91. package/lib/typescript/highlight-updates/utils/HighlightUpdatesController.d.ts.map +0 -1
  92. package/lib/typescript/highlight-updates/utils/PerformanceLogger.d.ts.map +0 -1
  93. package/lib/typescript/highlight-updates/utils/ProfilerInterceptor.d.ts.map +0 -1
  94. package/lib/typescript/highlight-updates/utils/RenderCauseDetector.d.ts.map +0 -1
  95. package/lib/typescript/highlight-updates/utils/RenderTracker.d.ts.map +0 -1
  96. package/lib/typescript/highlight-updates/utils/ViewTypeMapper.d.ts.map +0 -1
  97. package/lib/typescript/highlight-updates/utils/copySettingsStorage.d.ts.map +0 -1
  98. package/lib/typescript/highlight-updates/utils/devtoolsComponentNames.d.ts.map +0 -1
  99. package/lib/typescript/highlight-updates/utils/namedComposite.d.ts.map +0 -1
  100. package/lib/typescript/highlight-updates/utils/ownStateChanged.d.ts.map +0 -1
  101. package/lib/typescript/highlight-updates/utils/rawEventEmitter.d.ts.map +0 -1
  102. package/lib/typescript/highlight-updates/utils/renderExportFormatter.d.ts.map +0 -1
  103. package/lib/typescript/highlight-updates/utils/rendersExportFormatter.d.ts.map +0 -1
  104. package/lib/typescript/highlight-updates/utils/screenElements.d.ts.map +0 -1
  105. package/lib/typescript/highlight-updates/utils/tapMatch.d.ts.map +0 -1
  106. package/lib/typescript/highlight-updates/utils/testIDs.d.ts.map +0 -1
  107. package/lib/typescript/highlight-updates/utils/touchCapture.d.ts.map +0 -1
  108. package/lib/typescript/index.d.ts.map +0 -1
  109. package/lib/typescript/preset.d.ts.map +0 -1
  110. package/lib/typescript/sync/highlightUpdatesSyncAdapter.d.ts.map +0 -1
@@ -1,273 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.CategoryBadge = CategoryBadge;
7
- exports.IDENTIFIER_CONFIG = void 0;
8
- exports.IdentifierBadge = IdentifierBadge;
9
- exports.default = void 0;
10
- var _react = _interopRequireDefault(require("react"));
11
- var _reactNative = require("react-native");
12
- var _sharedUi = require("@buoy-gg/shared-ui");
13
- var _jsxRuntime = require("react/jsx-runtime");
14
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
15
- /**
16
- * IdentifierBadge
17
- *
18
- * Shared badge component for displaying component identifiers.
19
- * Used throughout the highlight-updates package for consistent styling.
20
- */
21
-
22
- // All possible identifier types
23
-
24
- // Badge configuration for each identifier type
25
- const IDENTIFIER_CONFIG = exports.IDENTIFIER_CONFIG = {
26
- viewType: {
27
- label: "ViewType",
28
- shortLabel: "View",
29
- color: _sharedUi.night.color.accent,
30
- icon: _sharedUi.Box
31
- },
32
- testID: {
33
- label: "testID",
34
- shortLabel: "test",
35
- color: _sharedUi.buoyColors.success,
36
- icon: _sharedUi.Hash
37
- },
38
- nativeID: {
39
- label: "nativeID",
40
- shortLabel: "native",
41
- color: "#f59e0b",
42
- // amber
43
- icon: _sharedUi.Hash
44
- },
45
- component: {
46
- label: "Component",
47
- shortLabel: "Comp",
48
- color: "#a855f7",
49
- // purple
50
- icon: _sharedUi.FileCode
51
- },
52
- accessibilityLabel: {
53
- label: "a11y",
54
- shortLabel: "a11y",
55
- color: "#ec4899",
56
- // pink
57
- icon: _sharedUi.Eye
58
- },
59
- nativeTag: {
60
- label: "tag",
61
- shortLabel: "tag",
62
- color: _sharedUi.buoyColors.textMuted,
63
- icon: _sharedUi.Layers
64
- },
65
- any: {
66
- label: "Any",
67
- shortLabel: "Any",
68
- color: _sharedUi.buoyColors.warning,
69
- icon: _sharedUi.Search
70
- }
71
- };
72
- function IdentifierBadge({
73
- type,
74
- value,
75
- compact = false,
76
- badgeOnly = false,
77
- valueOnly = false,
78
- shortLabel = false,
79
- showIcon = false,
80
- testID
81
- }) {
82
- const config = IDENTIFIER_CONFIG[type];
83
- const IconComponent = config.icon;
84
- const label = shortLabel ? config.shortLabel : config.label;
85
- if (valueOnly) {
86
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
87
- testID: testID ? `${testID}-value` : undefined,
88
- style: [styles.valueOnly, compact && styles.valueOnlyCompact, {
89
- color: config.color
90
- }],
91
- numberOfLines: 1,
92
- children: value
93
- });
94
- }
95
- if (badgeOnly) {
96
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
97
- testID: testID,
98
- style: [styles.badgeOnly, compact && styles.badgeOnlyCompact, {
99
- backgroundColor: config.color + "20",
100
- borderColor: config.color + "40"
101
- }],
102
- children: [showIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(IconComponent, {
103
- size: compact ? 10 : 12,
104
- color: config.color
105
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
106
- style: [styles.badgeOnlyText, compact && styles.badgeOnlyTextCompact, {
107
- color: config.color
108
- }],
109
- children: label
110
- })]
111
- });
112
- }
113
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
114
- testID: testID,
115
- accessibilityLabel: `${config.label} ${value}`,
116
- style: [styles.container, compact && styles.containerCompact],
117
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
118
- style: [styles.badge, compact && styles.badgeCompact, {
119
- backgroundColor: config.color + "20"
120
- }],
121
- children: [showIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(IconComponent, {
122
- size: compact ? 8 : 10,
123
- color: config.color
124
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
125
- style: [styles.badgeText, compact && styles.badgeTextCompact, {
126
- color: config.color
127
- }],
128
- children: label
129
- })]
130
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
131
- testID: testID ? `${testID}-value` : undefined,
132
- style: [styles.value, compact && styles.valueCompact],
133
- numberOfLines: 1,
134
- children: value
135
- })]
136
- });
137
- }
138
-
139
- // Standalone badge (no value) for category selection
140
-
141
- function CategoryBadge({
142
- type,
143
- count,
144
- isSelected = false,
145
- showIcon = true
146
- }) {
147
- const config = IDENTIFIER_CONFIG[type];
148
- const IconComponent = config.icon;
149
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
150
- style: [styles.categoryBadge, {
151
- backgroundColor: config.color + "15",
152
- borderColor: isSelected ? config.color : config.color + "40",
153
- borderWidth: isSelected ? 2 : 1
154
- }],
155
- children: [showIcon && /*#__PURE__*/(0, _jsxRuntime.jsx)(IconComponent, {
156
- size: 12,
157
- color: config.color
158
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
159
- style: [styles.categoryBadgeText, {
160
- color: config.color
161
- }],
162
- children: config.label
163
- }), count !== undefined && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
164
- style: [styles.categoryBadgeCount, {
165
- backgroundColor: config.color + "25"
166
- }],
167
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
168
- style: [styles.categoryBadgeCountText, {
169
- color: config.color
170
- }],
171
- children: count
172
- })
173
- })]
174
- });
175
- }
176
- const styles = _reactNative.StyleSheet.create({
177
- // Full badge with value
178
- container: {
179
- flexDirection: "row",
180
- alignItems: "center",
181
- gap: 6
182
- },
183
- containerCompact: {
184
- gap: 4
185
- },
186
- badge: {
187
- flexDirection: "row",
188
- alignItems: "center",
189
- paddingVertical: 3,
190
- paddingHorizontal: 6,
191
- borderRadius: 4,
192
- gap: 4
193
- },
194
- badgeCompact: {
195
- paddingVertical: 2,
196
- paddingHorizontal: 5,
197
- gap: 3
198
- },
199
- badgeText: {
200
- fontSize: 10,
201
- fontWeight: "700"
202
- },
203
- badgeTextCompact: {
204
- fontSize: 9
205
- },
206
- value: {
207
- fontSize: 12,
208
- color: _sharedUi.night.color.text,
209
- fontFamily: _sharedUi.monoFont,
210
- flex: 1
211
- },
212
- valueCompact: {
213
- fontSize: 11
214
- },
215
- // Badge only (no value)
216
- badgeOnly: {
217
- flexDirection: "row",
218
- alignItems: "center",
219
- paddingVertical: 4,
220
- paddingHorizontal: 8,
221
- borderRadius: 6,
222
- borderWidth: 1,
223
- gap: 5
224
- },
225
- badgeOnlyCompact: {
226
- paddingVertical: 2,
227
- paddingHorizontal: 6,
228
- borderRadius: 4,
229
- gap: 4
230
- },
231
- badgeOnlyText: {
232
- fontSize: 11,
233
- fontWeight: "600"
234
- },
235
- badgeOnlyTextCompact: {
236
- fontSize: 9,
237
- fontWeight: "700"
238
- },
239
- // Value only
240
- valueOnly: {
241
- fontSize: 12,
242
- fontFamily: _sharedUi.monoFont
243
- },
244
- valueOnlyCompact: {
245
- fontSize: 11
246
- },
247
- // Category badge (for filter selection)
248
- categoryBadge: {
249
- flexDirection: "row",
250
- alignItems: "center",
251
- paddingVertical: 8,
252
- paddingLeft: 10,
253
- paddingRight: 6,
254
- borderRadius: 8,
255
- gap: 6
256
- },
257
- categoryBadgeText: {
258
- fontSize: 11,
259
- fontWeight: "600"
260
- },
261
- categoryBadgeCount: {
262
- paddingHorizontal: 6,
263
- paddingVertical: 2,
264
- borderRadius: 10,
265
- minWidth: 20,
266
- alignItems: "center"
267
- },
268
- categoryBadgeCountText: {
269
- fontSize: 10,
270
- fontWeight: "600"
271
- }
272
- });
273
- var _default = exports.default = IdentifierBadge;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.CategoryBadge=CategoryBadge;exports.IDENTIFIER_CONFIG=void 0;exports.IdentifierBadge=IdentifierBadge;exports.default=void 0;var _react=_interopRequireDefault(require("react"));var _reactNative=require("react-native");var _sharedUi=require("@buoy-gg/shared-ui");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireDefault(r){return r&&r.__esModule?r:{default:r}}const IDENTIFIER_CONFIG=exports.IDENTIFIER_CONFIG={viewType:{label:"ViewType",shortLabel:"View",color:_sharedUi.night.color.accent,icon:_sharedUi.Box},testID:{label:"testID",shortLabel:"test",color:_sharedUi.buoyColors.success,icon:_sharedUi.Hash},nativeID:{label:"nativeID",shortLabel:"native",color:"#f59e0b",icon:_sharedUi.Hash},component:{label:"Component",shortLabel:"Comp",color:"#a855f7",icon:_sharedUi.FileCode},accessibilityLabel:{label:"a11y",shortLabel:"a11y",color:"#ec4899",icon:_sharedUi.Eye},nativeTag:{label:"tag",shortLabel:"tag",color:_sharedUi.buoyColors.textMuted,icon:_sharedUi.Layers},any:{label:"Any",shortLabel:"Any",color:_sharedUi.buoyColors.warning,icon:_sharedUi.Search}};function IdentifierBadge({type:r,value:a,compact:e=false,badgeOnly:l=false,valueOnly:t=false,shortLabel:i=false,showIcon:c=false,testID:n}){const o=IDENTIFIER_CONFIG[r];const d=o.icon;const s=i?o.shortLabel:o.label;if(t){return(0,_jsxRuntime.jsx)(_reactNative.Text,{testID:n?`${n}-value`:void 0,style:[styles.valueOnly,e&&styles.valueOnlyCompact,{color:o.color}],numberOfLines:1,children:a})}if(l){return(0,_jsxRuntime.jsxs)(_reactNative.View,{testID:n,style:[styles.badgeOnly,e&&styles.badgeOnlyCompact,{backgroundColor:o.color+"20",borderColor:o.color+"40"}],children:[c&&(0,_jsxRuntime.jsx)(d,{size:e?10:12,color:o.color}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.badgeOnlyText,e&&styles.badgeOnlyTextCompact,{color:o.color}],children:s})]})}return(0,_jsxRuntime.jsxs)(_reactNative.View,{testID:n,accessibilityLabel:`${o.label} ${a}`,style:[styles.container,e&&styles.containerCompact],children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.badge,e&&styles.badgeCompact,{backgroundColor:o.color+"20"}],children:[c&&(0,_jsxRuntime.jsx)(d,{size:e?8:10,color:o.color}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.badgeText,e&&styles.badgeTextCompact,{color:o.color}],children:s})]}),(0,_jsxRuntime.jsx)(_reactNative.Text,{testID:n?`${n}-value`:void 0,style:[styles.value,e&&styles.valueCompact],numberOfLines:1,children:a})]})}function CategoryBadge({type:r,count:a,isSelected:e=false,showIcon:l=true}){const t=IDENTIFIER_CONFIG[r];const i=t.icon;return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.categoryBadge,{backgroundColor:t.color+"15",borderColor:e?t.color:t.color+"40",borderWidth:e?2:1}],children:[l&&(0,_jsxRuntime.jsx)(i,{size:12,color:t.color}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.categoryBadgeText,{color:t.color}],children:t.label}),a!==void 0&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.categoryBadgeCount,{backgroundColor:t.color+"25"}],children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.categoryBadgeCountText,{color:t.color}],children:a})})]})}const styles=_reactNative.StyleSheet.create({container:{flexDirection:"row",alignItems:"center",gap:6},containerCompact:{gap:4},badge:{flexDirection:"row",alignItems:"center",paddingVertical:3,paddingHorizontal:6,borderRadius:4,gap:4},badgeCompact:{paddingVertical:2,paddingHorizontal:5,gap:3},badgeText:{fontSize:10,fontWeight:"700"},badgeTextCompact:{fontSize:9},value:{fontSize:12,color:_sharedUi.night.color.text,fontFamily:_sharedUi.monoFont,flex:1},valueCompact:{fontSize:11},badgeOnly:{flexDirection:"row",alignItems:"center",paddingVertical:4,paddingHorizontal:8,borderRadius:6,borderWidth:1,gap:5},badgeOnlyCompact:{paddingVertical:2,paddingHorizontal:6,borderRadius:4,gap:4},badgeOnlyText:{fontSize:11,fontWeight:"600"},badgeOnlyTextCompact:{fontSize:9,fontWeight:"700"},valueOnly:{fontSize:12,fontFamily:_sharedUi.monoFont},valueOnlyCompact:{fontSize:11},categoryBadge:{flexDirection:"row",alignItems:"center",paddingVertical:8,paddingLeft:10,paddingRight:6,borderRadius:8,gap:6},categoryBadgeText:{fontSize:11,fontWeight:"600"},categoryBadgeCount:{paddingHorizontal:6,paddingVertical:2,borderRadius:10,minWidth:20,alignItems:"center"},categoryBadgeCountText:{fontSize:10,fontWeight:"600"}});var _default=exports.default=IdentifierBadge;
@@ -1,188 +1 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = exports.IsolatedRenderList = void 0;
7
- var _react = _interopRequireWildcard(require("react"));
8
- var _reactNative = require("react-native");
9
- var _RenderTracker = require("../utils/RenderTracker");
10
- var _RenderListItem = require("./RenderListItem");
11
- var _sharedUi = require("@buoy-gg/shared-ui");
12
- var _jsxRuntime = require("react/jsx-runtime");
13
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
14
- /**
15
- * IsolatedRenderList
16
- *
17
- * Performance-optimized component that isolates the render tracking subscription
18
- * to prevent parent re-renders. Only this component re-renders when new renders
19
- * are tracked, keeping the modal UI stable.
20
- *
21
- * Following the optimization guide: move subscriptions to child components to
22
- * prevent parent re-renders.
23
- */
24
-
25
- // Free tier limit for tracked components
26
-
27
- /**
28
- * Isolated list component that owns the render subscription.
29
- * Parent component does NOT re-render when renders change.
30
- */
31
- function IsolatedRenderListInner({
32
- searchText,
33
- filters,
34
- onSelectRender,
35
- onStatsChange,
36
- onRendersChange,
37
- isTracking,
38
- isPro = false
39
- }) {
40
- // Initialize with current data to avoid flash of empty state
41
- const [renders, setRenders] = (0, _react.useState)(() => _RenderTracker.RenderTracker.getFilteredRenders(searchText));
42
- const flatListRef = (0, _react.useRef)(null);
43
-
44
- // Subscribe to RenderTracker updates - ONLY this component re-renders
45
- (0, _react.useEffect)(() => {
46
- const unsubscribe = _RenderTracker.RenderTracker.subscribe(() => {
47
- const newRenders = _RenderTracker.RenderTracker.getFilteredRenders(searchText);
48
- setRenders(newRenders);
49
- // Notify parent of stats via callback (parent uses ref, no re-render)
50
- onStatsChange(_RenderTracker.RenderTracker.getStats());
51
- // Notify parent of renders list for navigation
52
- onRendersChange?.(newRenders);
53
- });
54
- return unsubscribe;
55
- }, [searchText, onStatsChange, onRendersChange]);
56
-
57
- // Update filtered renders when search or filters change
58
- (0, _react.useEffect)(() => {
59
- const newRenders = _RenderTracker.RenderTracker.getFilteredRenders(searchText);
60
- setRenders(newRenders);
61
- onRendersChange?.(newRenders);
62
- }, [searchText, filters, onRendersChange]);
63
-
64
- // Limit visible components for free tier
65
- // `isPro` stays a prop so callers can force the unlimited view; the tier cap
66
- // applies otherwise. useLimit() already returns Infinity for Pro, so the two
67
- // agree — this only preserves the prop contract for cross-package callers.
68
- const tierLimit = (0, _sharedUi.useLimit)("highlightUpdates.components");
69
- const componentLimit = isPro ? Infinity : tierLimit;
70
- const visibleRenders = (0, _react.useMemo)(() => {
71
- return renders.slice(0, componentLimit);
72
- }, [renders, componentLimit]);
73
-
74
- // Calculate locked component count
75
- const lockedComponentCount = (0, _react.useMemo)(() => {
76
- return Math.max(0, renders.length - componentLimit);
77
- }, [renders.length, componentLimit]);
78
-
79
- // Stable keyExtractor - moved outside to avoid recreation
80
- const keyExtractor = (0, _react.useCallback)(item => item.id, []);
81
-
82
- // Stable renderItem - uses stable onSelectRender callback
83
- const renderItem = (0, _react.useCallback)(({
84
- item,
85
- index
86
- }) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_RenderListItem.RenderListItem, {
87
- render: item,
88
- onPress: () => onSelectRender(item, index, visibleRenders)
89
- }), [onSelectRender, visibleRenders]);
90
-
91
- // Locked banner footer
92
- const renderFooter = (0, _react.useCallback)(() => {
93
- if (lockedComponentCount <= 0) return null;
94
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
95
- testID: "buoy-highlight-locked",
96
- style: styles.lockedBanner,
97
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Lock, {
98
- size: 14,
99
- color: _sharedUi.night.color.warning
100
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
101
- testID: "buoy-highlight-locked-text",
102
- style: styles.lockedBannerText,
103
- children: [lockedComponentCount, " more ", lockedComponentCount === 1 ? 'component' : 'components', " locked"]
104
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
105
- style: styles.lockedBannerSubtext,
106
- children: "Upgrade to Pro"
107
- })]
108
- });
109
- }, [lockedComponentCount]);
110
-
111
- // Show empty state when no renders
112
- if (renders.length === 0) {
113
- const term = searchText.trim();
114
-
115
- // Read straight off the tracker rather than held in state: this runs only
116
- // on the empty branch, so it costs nothing on the hot path, and it is
117
- // always the current truth. `totalTracked` is every component the tracker
118
- // holds; `unsearched` is what the settings and filters allow BEFORE the
119
- // search box.
120
- const totalTracked = _RenderTracker.RenderTracker.getStats().totalComponents;
121
- const unsearched = term ? _RenderTracker.RenderTracker.getFilteredRenders("").length : 0;
122
- const content = (0, _sharedUi.resolveListEmptyState)({
123
- subject: "components",
124
- verb: "tracked",
125
- search: searchText,
126
- // The denominator is what the FILTERS left, not the raw tracker count —
127
- // "clear the search to see them" has to be true of what you get back.
128
- total: term ? unsearched : totalTracked,
129
- capturing: isTracking,
130
- blocked: term && unsearched === 0 && totalTracked > 0 ? "The active filters hide everything tracked, so there is nothing to search." : undefined,
131
- waiting: {
132
- // stare = "watching for a specific event; recording armed".
133
- otto: "stare",
134
- title: "No renders tracked",
135
- message: "Component renders will appear here"
136
- },
137
- paused: {
138
- title: "No renders tracked",
139
- message: "Enable tracking to start capturing"
140
- }
141
- });
142
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ToolEmptyState, {
143
- ...content,
144
- testID: "buoy-highlight-empty"
145
- });
146
- }
147
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.FlatList, {
148
- testID: "buoy-highlight-list",
149
- ref: flatListRef,
150
- data: visibleRenders,
151
- renderItem: renderItem,
152
- keyExtractor: keyExtractor,
153
- contentContainerStyle: styles.listContent,
154
- showsVerticalScrollIndicator: true,
155
- initialNumToRender: 10,
156
- maxToRenderPerBatch: 10,
157
- windowSize: 10,
158
- scrollEnabled: false,
159
- ListFooterComponent: renderFooter
160
- });
161
- }
162
-
163
- // Memoize to prevent re-renders from parent state changes
164
- const IsolatedRenderList = exports.IsolatedRenderList = /*#__PURE__*/(0, _react.memo)(IsolatedRenderListInner);
165
- const styles = _reactNative.StyleSheet.create({
166
- listContent: {
167
- paddingTop: 8
168
- },
169
- lockedBanner: {
170
- flexDirection: "row",
171
- alignItems: "center",
172
- justifyContent: "center",
173
- paddingVertical: 12,
174
- paddingHorizontal: 16,
175
- marginTop: 8,
176
- gap: 8
177
- },
178
- lockedBannerText: {
179
- color: _sharedUi.night.color.warning,
180
- fontSize: 13,
181
- fontWeight: "500"
182
- },
183
- lockedBannerSubtext: {
184
- color: _sharedUi.night.color.textTertiary,
185
- fontSize: 12
186
- }
187
- });
188
- var _default = exports.default = IsolatedRenderList;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.default=exports.IsolatedRenderList=void 0;var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _RenderTracker=require("../utils/RenderTracker");var _RenderListItem=require("./RenderListItem");var _sharedUi=require("@buoy-gg/shared-ui");var _jsxRuntime=require("react/jsx-runtime");function _interopRequireWildcard(n,f){if("function"==typeof WeakMap)var c=new WeakMap,l=new WeakMap;return(_interopRequireWildcard=function(e,d){if(!d&&e&&e.__esModule)return e;var o,r,i={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return i;if(o=d?l:c){if(o.has(e))return o.get(e);o.set(e,i)}for(const s in e)"default"!==s&&{}.hasOwnProperty.call(e,s)&&((r=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,s))&&(r.get||r.set)?o(i,s,r):i[s]=e[s]);return i})(n,f)}function IsolatedRenderListInner({searchText:n,filters:f,onSelectRender:c,onStatsChange:l,onRendersChange:e,isTracking:d,isPro:o=false}){const[r,i]=(0,_react.useState)(()=>_RenderTracker.RenderTracker.getFilteredRenders(n));const s=(0,_react.useRef)(null);(0,_react.useEffect)(()=>{const t=_RenderTracker.RenderTracker.subscribe(()=>{const a=_RenderTracker.RenderTracker.getFilteredRenders(n);i(a);l(_RenderTracker.RenderTracker.getStats());e?.(a)});return t},[n,l,e]);(0,_react.useEffect)(()=>{const t=_RenderTracker.RenderTracker.getFilteredRenders(n);i(t);e?.(t)},[n,f,e]);const m=(0,_sharedUi.useLimit)("highlightUpdates.components");const u=o?Infinity:m;const g=(0,_react.useMemo)(()=>{return r.slice(0,u)},[r,u]);const p=(0,_react.useMemo)(()=>{return Math.max(0,r.length-u)},[r.length,u]);const h=(0,_react.useCallback)(t=>t.id,[]);const y=(0,_react.useCallback)(({item:t,index:a})=>(0,_jsxRuntime.jsx)(_RenderListItem.RenderListItem,{render:t,onPress:()=>c(t,a,g)}),[c,g]);const R=(0,_react.useCallback)(()=>{if(p<=0)return null;return(0,_jsxRuntime.jsxs)(_reactNative.View,{testID:"buoy-highlight-locked",style:styles.lockedBanner,children:[(0,_jsxRuntime.jsx)(_sharedUi.Lock,{size:14,color:_sharedUi.night.color.warning}),(0,_jsxRuntime.jsxs)(_reactNative.Text,{testID:"buoy-highlight-locked-text",style:styles.lockedBannerText,children:[p," more ",p===1?"component":"components"," locked"]}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.lockedBannerSubtext,children:"Upgrade to Pro"})]})},[p]);if(r.length===0){const t=n.trim();const a=_RenderTracker.RenderTracker.getStats().totalComponents;const k=t?_RenderTracker.RenderTracker.getFilteredRenders("").length:0;const b=(0,_sharedUi.resolveListEmptyState)({subject:"components",verb:"tracked",search:n,total:t?k:a,capturing:d,blocked:t&&k===0&&a>0?"The active filters hide everything tracked, so there is nothing to search.":void 0,waiting:{otto:"stare",title:"No renders tracked",message:"Component renders will appear here"},paused:{title:"No renders tracked",message:"Enable tracking to start capturing"}});return(0,_jsxRuntime.jsx)(_sharedUi.ToolEmptyState,{...b,testID:"buoy-highlight-empty"})}return(0,_jsxRuntime.jsx)(_reactNative.FlatList,{testID:"buoy-highlight-list",ref:s,data:g,renderItem:y,keyExtractor:h,contentContainerStyle:styles.listContent,showsVerticalScrollIndicator:true,initialNumToRender:10,maxToRenderPerBatch:10,windowSize:10,scrollEnabled:false,ListFooterComponent:R})}const IsolatedRenderList=exports.IsolatedRenderList=(0,_react.memo)(IsolatedRenderListInner);const styles=_reactNative.StyleSheet.create({listContent:{paddingTop:8},lockedBanner:{flexDirection:"row",alignItems:"center",justifyContent:"center",paddingVertical:12,paddingHorizontal:16,marginTop:8,gap:8},lockedBannerText:{color:_sharedUi.night.color.warning,fontSize:13,fontWeight:"500"},lockedBannerSubtext:{color:_sharedUi.night.color.textTertiary,fontSize:12}});var _default=exports.default=IsolatedRenderList;