@buoy-gg/highlight-updates 2.1.12 → 2.1.14
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.
- package/lib/commonjs/highlight-updates/HighlightUpdatesOverlay.js +1 -285
- package/lib/commonjs/highlight-updates/components/HighlightFilterView.js +1 -1371
- package/lib/commonjs/highlight-updates/components/HighlightUpdatesModal.js +1 -591
- package/lib/commonjs/highlight-updates/components/IdentifierBadge.js +1 -267
- package/lib/commonjs/highlight-updates/components/IsolatedRenderList.js +1 -178
- package/lib/commonjs/highlight-updates/components/ModalHeaderContent.js +1 -303
- package/lib/commonjs/highlight-updates/components/RenderCauseBadge.js +1 -500
- package/lib/commonjs/highlight-updates/components/RenderDetailView.js +1 -830
- package/lib/commonjs/highlight-updates/components/RenderHistoryViewer.js +1 -894
- package/lib/commonjs/highlight-updates/components/RenderListItem.js +1 -220
- package/lib/commonjs/highlight-updates/components/StatsDisplay.js +1 -70
- package/lib/commonjs/highlight-updates/components/index.js +1 -97
- package/lib/commonjs/highlight-updates/utils/HighlightUpdatesController.js +1 -1435
- package/lib/commonjs/highlight-updates/utils/PerformanceLogger.js +1 -359
- package/lib/commonjs/highlight-updates/utils/ProfilerInterceptor.js +1 -371
- package/lib/commonjs/highlight-updates/utils/RenderCauseDetector.js +1 -1828
- package/lib/commonjs/highlight-updates/utils/RenderTracker.js +1 -903
- package/lib/commonjs/highlight-updates/utils/ViewTypeMapper.js +1 -264
- package/lib/commonjs/highlight-updates/utils/renderExportFormatter.js +1 -58
- package/lib/commonjs/index.js +1 -311
- package/lib/commonjs/preset.js +1 -278
- package/lib/module/highlight-updates/HighlightUpdatesOverlay.js +1 -278
- package/lib/module/highlight-updates/components/HighlightFilterView.js +1 -1365
- package/lib/module/highlight-updates/components/HighlightUpdatesModal.js +1 -585
- package/lib/module/highlight-updates/components/IdentifierBadge.js +1 -259
- package/lib/module/highlight-updates/components/IsolatedRenderList.js +1 -174
- package/lib/module/highlight-updates/components/ModalHeaderContent.js +1 -298
- package/lib/module/highlight-updates/components/RenderCauseBadge.js +1 -491
- package/lib/module/highlight-updates/components/RenderDetailView.js +1 -826
- package/lib/module/highlight-updates/components/RenderHistoryViewer.js +1 -888
- package/lib/module/highlight-updates/components/RenderListItem.js +1 -215
- package/lib/module/highlight-updates/components/StatsDisplay.js +1 -67
- package/lib/module/highlight-updates/components/index.js +1 -16
- package/lib/module/highlight-updates/utils/HighlightUpdatesController.js +1 -1431
- package/lib/module/highlight-updates/utils/PerformanceLogger.js +1 -353
- package/lib/module/highlight-updates/utils/ProfilerInterceptor.js +1 -358
- package/lib/module/highlight-updates/utils/RenderCauseDetector.js +1 -1818
- package/lib/module/highlight-updates/utils/RenderTracker.js +1 -900
- package/lib/module/highlight-updates/utils/ViewTypeMapper.js +1 -255
- package/lib/module/highlight-updates/utils/renderExportFormatter.js +1 -54
- package/lib/module/index.js +1 -71
- package/lib/module/preset.js +1 -272
- package/package.json +7 -7
- package/lib/typescript/highlight-updates/HighlightUpdatesOverlay.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/components/HighlightFilterView.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/components/HighlightUpdatesModal.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/components/IdentifierBadge.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/components/IsolatedRenderList.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/components/ModalHeaderContent.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/components/RenderCauseBadge.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/components/RenderDetailView.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/components/RenderHistoryViewer.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/components/RenderListItem.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/components/StatsDisplay.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/components/index.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/utils/HighlightUpdatesController.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/utils/PerformanceLogger.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/utils/ProfilerInterceptor.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/utils/RenderCauseDetector.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/utils/RenderTracker.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/utils/ViewTypeMapper.d.ts.map +0 -1
- package/lib/typescript/highlight-updates/utils/renderExportFormatter.d.ts.map +0 -1
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/preset.d.ts.map +0 -1
|
@@ -1,220 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports.RenderListItem = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
10
|
-
var _IdentifierBadge = require("./IdentifierBadge");
|
|
11
|
-
var _RenderCauseBadge = require("./RenderCauseBadge");
|
|
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
|
-
* RenderListItem
|
|
16
|
-
*
|
|
17
|
-
* Compact list item showing a tracked component render.
|
|
18
|
-
* Displays viewType, identifier (testID/nativeID/component), render count, and timing.
|
|
19
|
-
*/
|
|
20
|
-
|
|
21
|
-
function RenderListItemInner({
|
|
22
|
-
render,
|
|
23
|
-
onPress
|
|
24
|
-
}) {
|
|
25
|
-
// Get best identifier to show (primary)
|
|
26
|
-
const identifier = (0, _react.useMemo)(() => {
|
|
27
|
-
if (render.testID) return {
|
|
28
|
-
type: "testID",
|
|
29
|
-
value: render.testID
|
|
30
|
-
};
|
|
31
|
-
if (render.nativeID) return {
|
|
32
|
-
type: "nativeID",
|
|
33
|
-
value: render.nativeID
|
|
34
|
-
};
|
|
35
|
-
if (render.componentName) return {
|
|
36
|
-
type: "component",
|
|
37
|
-
value: render.componentName
|
|
38
|
-
};
|
|
39
|
-
if (render.accessibilityLabel) return {
|
|
40
|
-
type: "accessibilityLabel",
|
|
41
|
-
value: render.accessibilityLabel
|
|
42
|
-
};
|
|
43
|
-
return {
|
|
44
|
-
type: "nativeTag",
|
|
45
|
-
value: String(render.nativeTag)
|
|
46
|
-
};
|
|
47
|
-
}, [render.testID, render.nativeID, render.componentName, render.accessibilityLabel, render.nativeTag]);
|
|
48
|
-
|
|
49
|
-
// Get secondary identifier (accessibilityLabel if not already primary)
|
|
50
|
-
const secondaryIdentifier = (0, _react.useMemo)(() => {
|
|
51
|
-
if (render.accessibilityLabel && identifier.type !== "accessibilityLabel") {
|
|
52
|
-
return {
|
|
53
|
-
type: "accessibilityLabel",
|
|
54
|
-
value: render.accessibilityLabel
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
return null;
|
|
58
|
-
}, [render.accessibilityLabel, identifier.type]);
|
|
59
|
-
|
|
60
|
-
// Format time since last render (live-updating)
|
|
61
|
-
const timeSinceRender = (0, _sharedUi.useRelativeTime)(render.lastRenderTime);
|
|
62
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
63
|
-
style: styles.container,
|
|
64
|
-
onPress: () => onPress(render),
|
|
65
|
-
activeOpacity: 0.7,
|
|
66
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
67
|
-
style: [styles.colorIndicator, {
|
|
68
|
-
backgroundColor: render.color
|
|
69
|
-
}]
|
|
70
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
71
|
-
style: styles.content,
|
|
72
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
73
|
-
style: styles.topRow,
|
|
74
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
75
|
-
style: styles.viewTypeContainer,
|
|
76
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
77
|
-
style: styles.viewType,
|
|
78
|
-
numberOfLines: 1,
|
|
79
|
-
children: render.displayName
|
|
80
|
-
}), secondaryIdentifier ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_IdentifierBadge.IdentifierBadge, {
|
|
81
|
-
type: secondaryIdentifier.type,
|
|
82
|
-
value: secondaryIdentifier.value,
|
|
83
|
-
compact: true,
|
|
84
|
-
shortLabel: true
|
|
85
|
-
}) : render.displayName !== render.viewType ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
86
|
-
style: styles.nativeType,
|
|
87
|
-
numberOfLines: 1,
|
|
88
|
-
children: render.viewType
|
|
89
|
-
}) : null]
|
|
90
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
91
|
-
style: [styles.renderCountBadge, {
|
|
92
|
-
backgroundColor: render.color + "30"
|
|
93
|
-
}],
|
|
94
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
95
|
-
style: [styles.renderCount, {
|
|
96
|
-
color: render.color
|
|
97
|
-
}],
|
|
98
|
-
children: [render.renderCount, "x"]
|
|
99
|
-
})
|
|
100
|
-
})]
|
|
101
|
-
}), render.lastRenderCause && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
102
|
-
style: styles.causeRow,
|
|
103
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_RenderCauseBadge.RenderCauseBadge, {
|
|
104
|
-
cause: render.lastRenderCause,
|
|
105
|
-
compact: true,
|
|
106
|
-
showKeys: true,
|
|
107
|
-
showTwoLevel: true
|
|
108
|
-
})
|
|
109
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
110
|
-
style: styles.bottomRow,
|
|
111
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
112
|
-
style: styles.identifierContainer,
|
|
113
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_IdentifierBadge.IdentifierBadge, {
|
|
114
|
-
type: identifier.type,
|
|
115
|
-
value: identifier.value,
|
|
116
|
-
compact: true,
|
|
117
|
-
shortLabel: true
|
|
118
|
-
})
|
|
119
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
120
|
-
style: styles.timing,
|
|
121
|
-
children: timeSinceRender
|
|
122
|
-
})]
|
|
123
|
-
})]
|
|
124
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ChevronRight, {
|
|
125
|
-
size: 16,
|
|
126
|
-
color: _sharedUi.buoyColors.textMuted
|
|
127
|
-
})]
|
|
128
|
-
});
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
// Memoize with custom comparison - only re-render when relevant props change
|
|
132
|
-
// This is critical for performance when the modal is open during rapid renders
|
|
133
|
-
const RenderListItem = exports.RenderListItem = /*#__PURE__*/_react.default.memo(RenderListItemInner, (prevProps, nextProps) => {
|
|
134
|
-
// Return true if props are EQUAL (skip re-render)
|
|
135
|
-
// Return false if props are DIFFERENT (trigger re-render)
|
|
136
|
-
const prevRender = prevProps.render;
|
|
137
|
-
const nextRender = nextProps.render;
|
|
138
|
-
return prevRender.id === nextRender.id && prevRender.renderCount === nextRender.renderCount && prevRender.color === nextRender.color && prevRender.lastRenderTime === nextRender.lastRenderTime && prevRender.lastRenderCause?.type === nextRender.lastRenderCause?.type && prevRender.lastRenderCause?.componentCause === nextRender.lastRenderCause?.componentCause && prevProps.onPress === nextProps.onPress;
|
|
139
|
-
});
|
|
140
|
-
const styles = _reactNative.StyleSheet.create({
|
|
141
|
-
container: {
|
|
142
|
-
flexDirection: "row",
|
|
143
|
-
alignItems: "center",
|
|
144
|
-
paddingVertical: 10,
|
|
145
|
-
paddingHorizontal: 12,
|
|
146
|
-
marginHorizontal: 12,
|
|
147
|
-
marginBottom: 6,
|
|
148
|
-
backgroundColor: _sharedUi.buoyColors.card,
|
|
149
|
-
borderRadius: 8,
|
|
150
|
-
borderWidth: 1,
|
|
151
|
-
borderColor: _sharedUi.buoyColors.border
|
|
152
|
-
},
|
|
153
|
-
colorIndicator: {
|
|
154
|
-
width: 4,
|
|
155
|
-
height: 36,
|
|
156
|
-
borderRadius: 2,
|
|
157
|
-
marginRight: 10
|
|
158
|
-
},
|
|
159
|
-
content: {
|
|
160
|
-
flex: 1,
|
|
161
|
-
marginRight: 8
|
|
162
|
-
},
|
|
163
|
-
topRow: {
|
|
164
|
-
flexDirection: "row",
|
|
165
|
-
alignItems: "center",
|
|
166
|
-
marginBottom: 4
|
|
167
|
-
},
|
|
168
|
-
causeRow: {
|
|
169
|
-
marginBottom: 4
|
|
170
|
-
},
|
|
171
|
-
viewTypeContainer: {
|
|
172
|
-
flex: 1,
|
|
173
|
-
marginRight: 8
|
|
174
|
-
},
|
|
175
|
-
viewType: {
|
|
176
|
-
fontSize: 13,
|
|
177
|
-
fontWeight: "600",
|
|
178
|
-
color: _sharedUi.buoyColors.text
|
|
179
|
-
},
|
|
180
|
-
nativeType: {
|
|
181
|
-
fontSize: 10,
|
|
182
|
-
color: _sharedUi.buoyColors.textMuted,
|
|
183
|
-
fontFamily: "monospace",
|
|
184
|
-
marginTop: 1
|
|
185
|
-
},
|
|
186
|
-
accessibilityLabel: {
|
|
187
|
-
fontSize: 10,
|
|
188
|
-
color: _sharedUi.buoyColors.primary,
|
|
189
|
-
fontStyle: "italic",
|
|
190
|
-
marginTop: 1
|
|
191
|
-
},
|
|
192
|
-
renderCountBadge: {
|
|
193
|
-
paddingHorizontal: 8,
|
|
194
|
-
paddingVertical: 2,
|
|
195
|
-
borderRadius: 10
|
|
196
|
-
},
|
|
197
|
-
renderCount: {
|
|
198
|
-
fontSize: 11,
|
|
199
|
-
fontWeight: "700",
|
|
200
|
-
fontFamily: "monospace"
|
|
201
|
-
},
|
|
202
|
-
bottomRow: {
|
|
203
|
-
flexDirection: "row",
|
|
204
|
-
alignItems: "center",
|
|
205
|
-
justifyContent: "space-between",
|
|
206
|
-
gap: 8
|
|
207
|
-
},
|
|
208
|
-
identifierContainer: {
|
|
209
|
-
flex: 1,
|
|
210
|
-
flexShrink: 1,
|
|
211
|
-
overflow: "hidden"
|
|
212
|
-
},
|
|
213
|
-
timing: {
|
|
214
|
-
fontSize: 10,
|
|
215
|
-
color: _sharedUi.buoyColors.textMuted,
|
|
216
|
-
fontWeight: "500",
|
|
217
|
-
flexShrink: 0
|
|
218
|
-
}
|
|
219
|
-
});
|
|
220
|
-
var _default = exports.default = RenderListItem;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.RenderListItem=void 0;var _react=_interopRequireWildcard(require("react")),_reactNative=require("react-native"),_sharedUi=require("@buoy-gg/shared-ui"),_IdentifierBadge=require("./IdentifierBadge"),_RenderCauseBadge=require("./RenderCauseBadge"),_jsxRuntime=require("react/jsx-runtime");function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var i=new WeakMap,r=new WeakMap;return(_interopRequireWildcard=function(e,t){if(!t&&e&&e.__esModule)return e;var n,a,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(n=t?r:i){if(n.has(e))return n.get(e);n.set(e,s)}for(const t in e)"default"!==t&&{}.hasOwnProperty.call(e,t)&&((a=(n=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,t))&&(a.get||a.set)?n(s,t,a):s[t]=e[t]);return s})(e,t)}function RenderListItemInner({render:e,onPress:t}){const i=(0,_react.useMemo)(()=>e.testID?{type:"testID",value:e.testID}:e.nativeID?{type:"nativeID",value:e.nativeID}:e.componentName?{type:"component",value:e.componentName}:e.accessibilityLabel?{type:"accessibilityLabel",value:e.accessibilityLabel}:{type:"nativeTag",value:String(e.nativeTag)},[e.testID,e.nativeID,e.componentName,e.accessibilityLabel,e.nativeTag]),r=(0,_react.useMemo)(()=>e.accessibilityLabel&&"accessibilityLabel"!==i.type?{type:"accessibilityLabel",value:e.accessibilityLabel}:null,[e.accessibilityLabel,i.type]),n=(0,_sharedUi.useRelativeTime)(e.lastRenderTime);return(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{style:styles.container,onPress:()=>t(e),activeOpacity:.7,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.colorIndicator,{backgroundColor:e.color}]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.content,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.topRow,children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.viewTypeContainer,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.viewType,numberOfLines:1,children:e.displayName}),r?(0,_jsxRuntime.jsx)(_IdentifierBadge.IdentifierBadge,{type:r.type,value:r.value,compact:!0,shortLabel:!0}):e.displayName!==e.viewType?(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.nativeType,numberOfLines:1,children:e.viewType}):null]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.renderCountBadge,{backgroundColor:e.color+"30"}],children:(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:[styles.renderCount,{color:e.color}],children:[e.renderCount,"x"]})})]}),e.lastRenderCause&&(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.causeRow,children:(0,_jsxRuntime.jsx)(_RenderCauseBadge.RenderCauseBadge,{cause:e.lastRenderCause,compact:!0,showKeys:!0,showTwoLevel:!0})}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.bottomRow,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.identifierContainer,children:(0,_jsxRuntime.jsx)(_IdentifierBadge.IdentifierBadge,{type:i.type,value:i.value,compact:!0,shortLabel:!0})}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.timing,children:n})]})]}),(0,_jsxRuntime.jsx)(_sharedUi.ChevronRight,{size:16,color:_sharedUi.buoyColors.textMuted})]})}const RenderListItem=exports.RenderListItem=_react.default.memo(RenderListItemInner,(e,t)=>{const i=e.render,r=t.render;return i.id===r.id&&i.renderCount===r.renderCount&&i.color===r.color&&i.lastRenderTime===r.lastRenderTime&&i.lastRenderCause?.type===r.lastRenderCause?.type&&i.lastRenderCause?.componentCause===r.lastRenderCause?.componentCause&&e.onPress===t.onPress}),styles=_reactNative.StyleSheet.create({container:{flexDirection:"row",alignItems:"center",paddingVertical:10,paddingHorizontal:12,marginHorizontal:12,marginBottom:6,backgroundColor:_sharedUi.buoyColors.card,borderRadius:8,borderWidth:1,borderColor:_sharedUi.buoyColors.border},colorIndicator:{width:4,height:36,borderRadius:2,marginRight:10},content:{flex:1,marginRight:8},topRow:{flexDirection:"row",alignItems:"center",marginBottom:4},causeRow:{marginBottom:4},viewTypeContainer:{flex:1,marginRight:8},viewType:{fontSize:13,fontWeight:"600",color:_sharedUi.buoyColors.text},nativeType:{fontSize:10,color:_sharedUi.buoyColors.textMuted,fontFamily:"monospace",marginTop:1},accessibilityLabel:{fontSize:10,color:_sharedUi.buoyColors.primary,fontStyle:"italic",marginTop:1},renderCountBadge:{paddingHorizontal:8,paddingVertical:2,borderRadius:10},renderCount:{fontSize:11,fontWeight:"700",fontFamily:"monospace"},bottomRow:{flexDirection:"row",alignItems:"center",justifyContent:"space-between",gap:8},identifierContainer:{flex:1,flexShrink:1,overflow:"hidden"},timing:{fontSize:10,color:_sharedUi.buoyColors.textMuted,fontWeight:"500",flexShrink:0}});var _default=exports.default=RenderListItem;
|
|
@@ -1,70 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = exports.StatsDisplay = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
10
|
-
var _RenderTracker = require("../utils/RenderTracker");
|
|
11
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
-
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); }
|
|
13
|
-
/**
|
|
14
|
-
* StatsDisplay
|
|
15
|
-
*
|
|
16
|
-
* Isolated component for displaying render statistics in the header.
|
|
17
|
-
* Subscribes to RenderTracker updates independently so parent header
|
|
18
|
-
* doesn't re-render when stats change.
|
|
19
|
-
*
|
|
20
|
-
* Following the optimization guide: move subscriptions to child components.
|
|
21
|
-
*/
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Isolated stats display that owns its own subscription.
|
|
25
|
-
* Only this component re-renders when stats change.
|
|
26
|
-
*/function StatsDisplayInner() {
|
|
27
|
-
const [stats, setStats] = (0, _react.useState)({
|
|
28
|
-
totalComponents: 0,
|
|
29
|
-
totalRenders: 0
|
|
30
|
-
});
|
|
31
|
-
(0, _react.useEffect)(() => {
|
|
32
|
-
const unsubscribe = _RenderTracker.RenderTracker.subscribe(() => {
|
|
33
|
-
setStats(_RenderTracker.RenderTracker.getStats());
|
|
34
|
-
});
|
|
35
|
-
return unsubscribe;
|
|
36
|
-
}, []);
|
|
37
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
38
|
-
nativeID: "__rn_buoy__stats-row",
|
|
39
|
-
style: styles.headerChip,
|
|
40
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Activity, {
|
|
41
|
-
size: 12,
|
|
42
|
-
color: _sharedUi.buoyColors.primary
|
|
43
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
44
|
-
style: [styles.headerChipValue, {
|
|
45
|
-
color: _sharedUi.buoyColors.primary
|
|
46
|
-
}],
|
|
47
|
-
children: stats.totalComponents
|
|
48
|
-
})]
|
|
49
|
-
});
|
|
50
|
-
}
|
|
51
|
-
const StatsDisplay = exports.StatsDisplay = /*#__PURE__*/(0, _react.memo)(StatsDisplayInner);
|
|
52
|
-
const styles = _reactNative.StyleSheet.create({
|
|
53
|
-
headerChip: {
|
|
54
|
-
flexDirection: "row",
|
|
55
|
-
alignItems: "center",
|
|
56
|
-
gap: 4,
|
|
57
|
-
backgroundColor: _sharedUi.buoyColors.hover,
|
|
58
|
-
paddingHorizontal: 8,
|
|
59
|
-
paddingVertical: 5,
|
|
60
|
-
borderRadius: 12,
|
|
61
|
-
borderWidth: 1,
|
|
62
|
-
borderColor: _sharedUi.buoyColors.border
|
|
63
|
-
},
|
|
64
|
-
headerChipValue: {
|
|
65
|
-
fontSize: 12,
|
|
66
|
-
fontWeight: "600",
|
|
67
|
-
fontFamily: "monospace"
|
|
68
|
-
}
|
|
69
|
-
});
|
|
70
|
-
var _default = exports.default = StatsDisplay;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=exports.StatsDisplay=void 0;var _react=_interopRequireWildcard(require("react")),_reactNative=require("react-native"),_sharedUi=require("@buoy-gg/shared-ui"),_RenderTracker=require("../utils/RenderTracker"),_jsxRuntime=require("react/jsx-runtime");function _interopRequireWildcard(e,r){if("function"==typeof WeakMap)var t=new WeakMap,a=new WeakMap;return(_interopRequireWildcard=function(e,r){if(!r&&e&&e.__esModule)return e;var i,o,s={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return s;if(i=r?a:t){if(i.has(e))return i.get(e);i.set(e,s)}for(const r in e)"default"!==r&&{}.hasOwnProperty.call(e,r)&&((o=(i=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,r))&&(o.get||o.set)?i(s,r,o):s[r]=e[r]);return s})(e,r)}function StatsDisplayInner(){const[e,r]=(0,_react.useState)({totalComponents:0,totalRenders:0});return(0,_react.useEffect)(()=>_RenderTracker.RenderTracker.subscribe(()=>{r(_RenderTracker.RenderTracker.getStats())}),[]),(0,_jsxRuntime.jsxs)(_reactNative.View,{nativeID:"__rn_buoy__stats-row",style:styles.headerChip,children:[(0,_jsxRuntime.jsx)(_sharedUi.Activity,{size:12,color:_sharedUi.buoyColors.primary}),(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.headerChipValue,{color:_sharedUi.buoyColors.primary}],children:e.totalComponents})]})}const StatsDisplay=exports.StatsDisplay=(0,_react.memo)(StatsDisplayInner),styles=_reactNative.StyleSheet.create({headerChip:{flexDirection:"row",alignItems:"center",gap:4,backgroundColor:_sharedUi.buoyColors.hover,paddingHorizontal:8,paddingVertical:5,borderRadius:12,borderWidth:1,borderColor:_sharedUi.buoyColors.border},headerChipValue:{fontSize:12,fontWeight:"600",fontFamily:"monospace"}});var _default=exports.default=StatsDisplay;
|
|
@@ -1,97 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "CategoryBadge", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _IdentifierBadge.CategoryBadge;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "DetailViewHeader", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _ModalHeaderContent.DetailViewHeader;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "FilterViewHeader", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _ModalHeaderContent.FilterViewHeader;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "HeaderActions", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () {
|
|
27
|
-
return _ModalHeaderContent.HeaderActions;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "HighlightFilterView", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () {
|
|
33
|
-
return _HighlightFilterView.HighlightFilterView;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "HighlightUpdatesModal", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function () {
|
|
39
|
-
return _HighlightUpdatesModal.HighlightUpdatesModal;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
Object.defineProperty(exports, "IDENTIFIER_CONFIG", {
|
|
43
|
-
enumerable: true,
|
|
44
|
-
get: function () {
|
|
45
|
-
return _IdentifierBadge.IDENTIFIER_CONFIG;
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
Object.defineProperty(exports, "IdentifierBadge", {
|
|
49
|
-
enumerable: true,
|
|
50
|
-
get: function () {
|
|
51
|
-
return _IdentifierBadge.IdentifierBadge;
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
Object.defineProperty(exports, "IsolatedRenderList", {
|
|
55
|
-
enumerable: true,
|
|
56
|
-
get: function () {
|
|
57
|
-
return _IsolatedRenderList.IsolatedRenderList;
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
Object.defineProperty(exports, "MainListHeader", {
|
|
61
|
-
enumerable: true,
|
|
62
|
-
get: function () {
|
|
63
|
-
return _ModalHeaderContent.MainListHeader;
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
Object.defineProperty(exports, "RenderDetailView", {
|
|
67
|
-
enumerable: true,
|
|
68
|
-
get: function () {
|
|
69
|
-
return _RenderDetailView.RenderDetailView;
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
Object.defineProperty(exports, "RenderListItem", {
|
|
73
|
-
enumerable: true,
|
|
74
|
-
get: function () {
|
|
75
|
-
return _RenderListItem.RenderListItem;
|
|
76
|
-
}
|
|
77
|
-
});
|
|
78
|
-
Object.defineProperty(exports, "SearchSection", {
|
|
79
|
-
enumerable: true,
|
|
80
|
-
get: function () {
|
|
81
|
-
return _ModalHeaderContent.SearchSection;
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
Object.defineProperty(exports, "StatsDisplay", {
|
|
85
|
-
enumerable: true,
|
|
86
|
-
get: function () {
|
|
87
|
-
return _StatsDisplay.StatsDisplay;
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
var _HighlightUpdatesModal = require("./HighlightUpdatesModal");
|
|
91
|
-
var _RenderListItem = require("./RenderListItem");
|
|
92
|
-
var _RenderDetailView = require("./RenderDetailView");
|
|
93
|
-
var _HighlightFilterView = require("./HighlightFilterView");
|
|
94
|
-
var _IdentifierBadge = require("./IdentifierBadge");
|
|
95
|
-
var _IsolatedRenderList = require("./IsolatedRenderList");
|
|
96
|
-
var _StatsDisplay = require("./StatsDisplay");
|
|
97
|
-
var _ModalHeaderContent = require("./ModalHeaderContent");
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"CategoryBadge",{enumerable:!0,get:function(){return _IdentifierBadge.CategoryBadge}}),Object.defineProperty(exports,"DetailViewHeader",{enumerable:!0,get:function(){return _ModalHeaderContent.DetailViewHeader}}),Object.defineProperty(exports,"FilterViewHeader",{enumerable:!0,get:function(){return _ModalHeaderContent.FilterViewHeader}}),Object.defineProperty(exports,"HeaderActions",{enumerable:!0,get:function(){return _ModalHeaderContent.HeaderActions}}),Object.defineProperty(exports,"HighlightFilterView",{enumerable:!0,get:function(){return _HighlightFilterView.HighlightFilterView}}),Object.defineProperty(exports,"HighlightUpdatesModal",{enumerable:!0,get:function(){return _HighlightUpdatesModal.HighlightUpdatesModal}}),Object.defineProperty(exports,"IDENTIFIER_CONFIG",{enumerable:!0,get:function(){return _IdentifierBadge.IDENTIFIER_CONFIG}}),Object.defineProperty(exports,"IdentifierBadge",{enumerable:!0,get:function(){return _IdentifierBadge.IdentifierBadge}}),Object.defineProperty(exports,"IsolatedRenderList",{enumerable:!0,get:function(){return _IsolatedRenderList.IsolatedRenderList}}),Object.defineProperty(exports,"MainListHeader",{enumerable:!0,get:function(){return _ModalHeaderContent.MainListHeader}}),Object.defineProperty(exports,"RenderDetailView",{enumerable:!0,get:function(){return _RenderDetailView.RenderDetailView}}),Object.defineProperty(exports,"RenderListItem",{enumerable:!0,get:function(){return _RenderListItem.RenderListItem}}),Object.defineProperty(exports,"SearchSection",{enumerable:!0,get:function(){return _ModalHeaderContent.SearchSection}}),Object.defineProperty(exports,"StatsDisplay",{enumerable:!0,get:function(){return _StatsDisplay.StatsDisplay}});var _HighlightUpdatesModal=require("./HighlightUpdatesModal"),_RenderListItem=require("./RenderListItem"),_RenderDetailView=require("./RenderDetailView"),_HighlightFilterView=require("./HighlightFilterView"),_IdentifierBadge=require("./IdentifierBadge"),_IsolatedRenderList=require("./IsolatedRenderList"),_StatsDisplay=require("./StatsDisplay"),_ModalHeaderContent=require("./ModalHeaderContent");
|