@buoy-gg/highlight-updates 7.0.38 → 7.0.39

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 (103) hide show
  1. package/lib/commonjs/highlight-updates/HighlightUpdatesOverlay.js +281 -1
  2. package/lib/commonjs/highlight-updates/components/HighlightFilterView.js +1474 -1
  3. package/lib/commonjs/highlight-updates/components/HighlightUpdatesModal.js +641 -1
  4. package/lib/commonjs/highlight-updates/components/IdentifierBadge.js +273 -1
  5. package/lib/commonjs/highlight-updates/components/IsolatedRenderList.js +188 -1
  6. package/lib/commonjs/highlight-updates/components/ModalHeaderContent.js +293 -1
  7. package/lib/commonjs/highlight-updates/components/RenderCauseBadge.js +508 -1
  8. package/lib/commonjs/highlight-updates/components/RenderDetailView.js +846 -1
  9. package/lib/commonjs/highlight-updates/components/RenderHistoryViewer.js +915 -1
  10. package/lib/commonjs/highlight-updates/components/RenderListItem.js +235 -1
  11. package/lib/commonjs/highlight-updates/components/RendersCopySettingsView.js +469 -1
  12. package/lib/commonjs/highlight-updates/components/StatsDisplay.js +73 -1
  13. package/lib/commonjs/highlight-updates/types/copySettings.js +107 -1
  14. package/lib/commonjs/highlight-updates/utils/CommitProfiler.js +446 -1
  15. package/lib/commonjs/highlight-updates/utils/HighlightUpdatesController.js +1920 -1
  16. package/lib/commonjs/highlight-updates/utils/PerformanceLogger.js +359 -1
  17. package/lib/commonjs/highlight-updates/utils/ProfilerInterceptor.js +371 -1
  18. package/lib/commonjs/highlight-updates/utils/RenderCauseDetector.js +1840 -1
  19. package/lib/commonjs/highlight-updates/utils/RenderTracker.js +952 -1
  20. package/lib/commonjs/highlight-updates/utils/ViewTypeMapper.js +264 -1
  21. package/lib/commonjs/highlight-updates/utils/copySettingsStorage.js +32 -1
  22. package/lib/commonjs/highlight-updates/utils/devtoolsComponentNames.js +188 -1
  23. package/lib/commonjs/highlight-updates/utils/namedComposite.js +41 -1
  24. package/lib/commonjs/highlight-updates/utils/ownStateChanged.js +103 -1
  25. package/lib/commonjs/highlight-updates/utils/rawEventEmitter.js +50 -1
  26. package/lib/commonjs/highlight-updates/utils/renderExportFormatter.js +58 -1
  27. package/lib/commonjs/highlight-updates/utils/rendersExportFormatter.js +485 -1
  28. package/lib/commonjs/highlight-updates/utils/screenElements.js +1248 -1
  29. package/lib/commonjs/highlight-updates/utils/tapMatch.js +83 -1
  30. package/lib/commonjs/highlight-updates/utils/testIDs.js +68 -1
  31. package/lib/commonjs/highlight-updates/utils/touchCapture.js +277 -1
  32. package/lib/commonjs/index.js +429 -1
  33. package/lib/commonjs/preset.js +278 -1
  34. package/lib/commonjs/sync/highlightUpdatesSyncAdapter.js +235 -1
  35. package/lib/module/highlight-updates/HighlightUpdatesOverlay.js +274 -1
  36. package/lib/module/highlight-updates/components/HighlightFilterView.js +1468 -1
  37. package/lib/module/highlight-updates/components/HighlightUpdatesModal.js +634 -1
  38. package/lib/module/highlight-updates/components/IdentifierBadge.js +265 -1
  39. package/lib/module/highlight-updates/components/IsolatedRenderList.js +183 -1
  40. package/lib/module/highlight-updates/components/ModalHeaderContent.js +288 -1
  41. package/lib/module/highlight-updates/components/RenderCauseBadge.js +499 -1
  42. package/lib/module/highlight-updates/components/RenderDetailView.js +840 -1
  43. package/lib/module/highlight-updates/components/RenderHistoryViewer.js +908 -1
  44. package/lib/module/highlight-updates/components/RenderListItem.js +230 -1
  45. package/lib/module/highlight-updates/components/RendersCopySettingsView.js +465 -1
  46. package/lib/module/highlight-updates/components/StatsDisplay.js +70 -1
  47. package/lib/module/highlight-updates/types/copySettings.js +102 -1
  48. package/lib/module/highlight-updates/utils/CommitProfiler.js +442 -1
  49. package/lib/module/highlight-updates/utils/HighlightUpdatesController.js +1916 -1
  50. package/lib/module/highlight-updates/utils/PerformanceLogger.js +353 -1
  51. package/lib/module/highlight-updates/utils/ProfilerInterceptor.js +358 -1
  52. package/lib/module/highlight-updates/utils/RenderCauseDetector.js +1830 -1
  53. package/lib/module/highlight-updates/utils/RenderTracker.js +949 -1
  54. package/lib/module/highlight-updates/utils/ViewTypeMapper.js +255 -1
  55. package/lib/module/highlight-updates/utils/copySettingsStorage.js +26 -1
  56. package/lib/module/highlight-updates/utils/devtoolsComponentNames.js +178 -1
  57. package/lib/module/highlight-updates/utils/namedComposite.js +36 -1
  58. package/lib/module/highlight-updates/utils/ownStateChanged.js +98 -1
  59. package/lib/module/highlight-updates/utils/rawEventEmitter.js +46 -1
  60. package/lib/module/highlight-updates/utils/renderExportFormatter.js +54 -1
  61. package/lib/module/highlight-updates/utils/rendersExportFormatter.js +478 -1
  62. package/lib/module/highlight-updates/utils/screenElements.js +1242 -1
  63. package/lib/module/highlight-updates/utils/tapMatch.js +76 -1
  64. package/lib/module/highlight-updates/utils/testIDs.js +60 -1
  65. package/lib/module/highlight-updates/utils/touchCapture.js +270 -1
  66. package/lib/module/index.js +130 -1
  67. package/lib/module/preset.js +272 -1
  68. package/lib/module/sync/highlightUpdatesSyncAdapter.js +230 -1
  69. package/lib/typescript/highlight-updates/HighlightUpdatesOverlay.d.ts.map +1 -0
  70. package/lib/typescript/highlight-updates/components/HighlightFilterView.d.ts.map +1 -0
  71. package/lib/typescript/highlight-updates/components/HighlightUpdatesModal.d.ts.map +1 -0
  72. package/lib/typescript/highlight-updates/components/IdentifierBadge.d.ts.map +1 -0
  73. package/lib/typescript/highlight-updates/components/IsolatedRenderList.d.ts.map +1 -0
  74. package/lib/typescript/highlight-updates/components/ModalHeaderContent.d.ts.map +1 -0
  75. package/lib/typescript/highlight-updates/components/RenderCauseBadge.d.ts.map +1 -0
  76. package/lib/typescript/highlight-updates/components/RenderDetailView.d.ts.map +1 -0
  77. package/lib/typescript/highlight-updates/components/RenderHistoryViewer.d.ts.map +1 -0
  78. package/lib/typescript/highlight-updates/components/RenderListItem.d.ts.map +1 -0
  79. package/lib/typescript/highlight-updates/components/RendersCopySettingsView.d.ts.map +1 -0
  80. package/lib/typescript/highlight-updates/components/StatsDisplay.d.ts.map +1 -0
  81. package/lib/typescript/highlight-updates/types/copySettings.d.ts.map +1 -0
  82. package/lib/typescript/highlight-updates/utils/CommitProfiler.d.ts.map +1 -0
  83. package/lib/typescript/highlight-updates/utils/HighlightUpdatesController.d.ts.map +1 -0
  84. package/lib/typescript/highlight-updates/utils/PerformanceLogger.d.ts.map +1 -0
  85. package/lib/typescript/highlight-updates/utils/ProfilerInterceptor.d.ts.map +1 -0
  86. package/lib/typescript/highlight-updates/utils/RenderCauseDetector.d.ts.map +1 -0
  87. package/lib/typescript/highlight-updates/utils/RenderTracker.d.ts.map +1 -0
  88. package/lib/typescript/highlight-updates/utils/ViewTypeMapper.d.ts.map +1 -0
  89. package/lib/typescript/highlight-updates/utils/copySettingsStorage.d.ts.map +1 -0
  90. package/lib/typescript/highlight-updates/utils/devtoolsComponentNames.d.ts.map +1 -0
  91. package/lib/typescript/highlight-updates/utils/namedComposite.d.ts.map +1 -0
  92. package/lib/typescript/highlight-updates/utils/ownStateChanged.d.ts.map +1 -0
  93. package/lib/typescript/highlight-updates/utils/rawEventEmitter.d.ts.map +1 -0
  94. package/lib/typescript/highlight-updates/utils/renderExportFormatter.d.ts.map +1 -0
  95. package/lib/typescript/highlight-updates/utils/rendersExportFormatter.d.ts.map +1 -0
  96. package/lib/typescript/highlight-updates/utils/screenElements.d.ts.map +1 -0
  97. package/lib/typescript/highlight-updates/utils/tapMatch.d.ts.map +1 -0
  98. package/lib/typescript/highlight-updates/utils/testIDs.d.ts.map +1 -0
  99. package/lib/typescript/highlight-updates/utils/touchCapture.d.ts.map +1 -0
  100. package/lib/typescript/index.d.ts.map +1 -0
  101. package/lib/typescript/preset.d.ts.map +1 -0
  102. package/lib/typescript/sync/highlightUpdatesSyncAdapter.d.ts.map +1 -0
  103. package/package.json +7 -7
@@ -1 +1,273 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CategoryBadge=CategoryBadge,exports.IDENTIFIER_CONFIG=void 0,exports.IdentifierBadge=IdentifierBadge,exports.default=void 0;var _react=_interopRequireDefault(require("react")),_reactNative=require("react-native"),_sharedUi=require("@buoy-gg/shared-ui"),_jsxRuntime=require("react/jsx-runtime");function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}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:e,value:t,compact:o=!1,badgeOnly:a=!1,valueOnly:r=!1,shortLabel:i=!1,showIcon:l=!1,testID:n}){const s=IDENTIFIER_CONFIG[e],c=s.icon,d=i?s.shortLabel:s.label;return r?(0,_jsxRuntime.jsx)(_reactNative.Text,{testID:n?`${n}-value`:void 0,style:[styles.valueOnly,o&&styles.valueOnlyCompact,{color:s.color}],numberOfLines:1,children:t}):a?(0,_jsxRuntime.jsxs)(_reactNative.View,{testID:n,style:[styles.badgeOnly,o&&styles.badgeOnlyCompact,{backgroundColor:s.color+"20",borderColor:s.color+"40"}],children:[l&&(0,_jsxRuntime.jsx)(c,{size:o?10:12,color:s.color}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.badgeOnlyText,o&&styles.badgeOnlyTextCompact,{color:s.color}],children:d})]}):(0,_jsxRuntime.jsxs)(_reactNative.View,{testID:n,accessibilityLabel:`${s.label} ${t}`,style:[styles.container,o&&styles.containerCompact],children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.badge,o&&styles.badgeCompact,{backgroundColor:s.color+"20"}],children:[l&&(0,_jsxRuntime.jsx)(c,{size:o?8:10,color:s.color}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.badgeText,o&&styles.badgeTextCompact,{color:s.color}],children:d})]}),(0,_jsxRuntime.jsx)(_reactNative.Text,{testID:n?`${n}-value`:void 0,style:[styles.value,o&&styles.valueCompact],numberOfLines:1,children:t})]})}function CategoryBadge({type:e,count:t,isSelected:o=!1,showIcon:a=!0}){const r=IDENTIFIER_CONFIG[e],i=r.icon;return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:[styles.categoryBadge,{backgroundColor:r.color+"15",borderColor:o?r.color:r.color+"40",borderWidth:o?2:1}],children:[a&&(0,_jsxRuntime.jsx)(i,{size:12,color:r.color}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.categoryBadgeText,{color:r.color}],children:r.label}),void 0!==t&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.categoryBadgeCount,{backgroundColor:r.color+"25"}],children:(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.categoryBadgeCountText,{color:r.color}],children:t})})]})}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
+ "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 +1,188 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.IsolatedRenderList=void 0;var _react=_interopRequireWildcard(require("react")),_reactNative=require("react-native"),_RenderTracker=require("../utils/RenderTracker"),_RenderListItem=require("./RenderListItem"),_sharedUi=require("@buoy-gg/shared-ui"),_jsxRuntime=require("react/jsx-runtime");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 a,i,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(a=t?n:r){if(a.has(e))return a.get(e);a.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((i=(a=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(i.get||i.set)?a(s,t,i):s[t]=e[t]);return s})(e,t)}function IsolatedRenderListInner({searchText:e,filters:t,onSelectRender:r,onStatsChange:n,onRendersChange:a,isTracking:i,isPro:s=!1}){const[o,c]=(0,_react.useState)(()=>_RenderTracker.RenderTracker.getFilteredRenders(e)),d=(0,_react.useRef)(null);(0,_react.useEffect)(()=>_RenderTracker.RenderTracker.subscribe(()=>{const t=_RenderTracker.RenderTracker.getFilteredRenders(e);c(t),n(_RenderTracker.RenderTracker.getStats()),a?.(t)}),[e,n,a]),(0,_react.useEffect)(()=>{const t=_RenderTracker.RenderTracker.getFilteredRenders(e);c(t),a?.(t)},[e,t,a]);const l=(0,_sharedUi.useLimit)("highlightUpdates.components"),u=s?1/0:l,_=(0,_react.useMemo)(()=>o.slice(0,u),[o,u]),h=(0,_react.useMemo)(()=>Math.max(0,o.length-u),[o.length,u]),g=(0,_react.useCallback)(e=>e.id,[]),R=(0,_react.useCallback)(({item:e,index:t})=>(0,_jsxRuntime.jsx)(_RenderListItem.RenderListItem,{render:e,onPress:()=>r(e,t,_)}),[r,_]),p=(0,_react.useCallback)(()=>h<=0?null:(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:[h," more ",1===h?"component":"components"," locked"]}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.lockedBannerSubtext,children:"Upgrade to Pro"})]}),[h]);if(0===o.length){const t=e.trim(),r=_RenderTracker.RenderTracker.getStats().totalComponents,n=t?_RenderTracker.RenderTracker.getFilteredRenders("").length:0,a=(0,_sharedUi.resolveListEmptyState)({subject:"components",verb:"tracked",search:e,total:t?n:r,capturing:i,blocked:t&&0===n&&r>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,{...a,testID:"buoy-highlight-empty"})}return(0,_jsxRuntime.jsx)(_reactNative.FlatList,{testID:"buoy-highlight-list",ref:d,data:_,renderItem:R,keyExtractor:g,contentContainerStyle:styles.listContent,showsVerticalScrollIndicator:!0,initialNumToRender:10,maxToRenderPerBatch:10,windowSize:10,scrollEnabled:!1,ListFooterComponent:p})}const IsolatedRenderList=exports.IsolatedRenderList=(0,_react.memo)(IsolatedRenderListInner),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;
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;