@buoy-gg/images 7.0.41 → 7.0.43
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/README.md +11 -70
- package/lib/commonjs/autoCapture.js +1 -4
- package/lib/commonjs/autoCapture.web.js +1 -6
- package/lib/commonjs/capture/actions.js +1 -243
- package/lib/commonjs/capture/install.js +1 -45
- package/lib/commonjs/capture/install.web.js +1 -250
- package/lib/commonjs/capture/installExpoImage.js +1 -99
- package/lib/commonjs/capture/installRnImage.js +1 -132
- package/lib/commonjs/capture/nativeImageModules.js +1 -30
- package/lib/commonjs/capture/nativeImageModules.web.js +1 -18
- package/lib/commonjs/capture/overrides.js +1 -346
- package/lib/commonjs/capture/rnDecoratorEarly.js +1 -55
- package/lib/commonjs/capture/savings.js +1 -209
- package/lib/commonjs/capture/savings.web.js +1 -71
- package/lib/commonjs/capture/shared.js +1 -378
- package/lib/commonjs/components/ImageDetail.js +1 -455
- package/lib/commonjs/components/ImageDetailFooter.js +1 -158
- package/lib/commonjs/components/ImageRow.js +1 -156
- package/lib/commonjs/components/ImagesHeader.js +1 -63
- package/lib/commonjs/components/ImagesIcon.js +1 -19
- package/lib/commonjs/components/ImagesListFooter.js +1 -126
- package/lib/commonjs/components/ImagesModal.js +1 -240
- package/lib/commonjs/components/ImagesRoot.js +1 -24
- package/lib/commonjs/components/ImagesRoot.web.js +1 -13
- package/lib/commonjs/components/InsightsBar.js +1 -59
- package/lib/commonjs/export.js +1 -81
- package/lib/commonjs/format.js +1 -117
- package/lib/commonjs/hooks/useImageRecords.js +1 -20
- package/lib/commonjs/index.js +1 -261
- package/lib/commonjs/preset.js +1 -39
- package/lib/commonjs/register.js +1 -19
- package/lib/commonjs/registerEarly.js +1 -14
- package/lib/commonjs/remote.js +1 -42
- package/lib/commonjs/state.js +1 -58
- package/lib/commonjs/store/imageEventStore.js +1 -238
- package/lib/commonjs/store/insights.js +1 -76
- package/lib/commonjs/sync/imagesSyncAdapter.js +1 -361
- package/lib/commonjs/types.js +0 -1
- package/lib/module/autoCapture.js +1 -4
- package/lib/module/autoCapture.web.js +1 -5
- package/lib/module/capture/actions.js +1 -230
- package/lib/module/capture/install.js +1 -40
- package/lib/module/capture/install.web.js +1 -243
- package/lib/module/capture/installExpoImage.js +1 -94
- package/lib/module/capture/installRnImage.js +1 -125
- package/lib/module/capture/nativeImageModules.js +1 -24
- package/lib/module/capture/nativeImageModules.web.js +1 -12
- package/lib/module/capture/overrides.js +1 -329
- package/lib/module/capture/rnDecoratorEarly.js +1 -50
- package/lib/module/capture/savings.js +1 -205
- package/lib/module/capture/savings.web.js +1 -67
- package/lib/module/capture/shared.js +1 -369
- package/lib/module/components/ImageDetail.js +1 -451
- package/lib/module/components/ImageDetailFooter.js +1 -154
- package/lib/module/components/ImageRow.js +1 -152
- package/lib/module/components/ImagesHeader.js +1 -59
- package/lib/module/components/ImagesIcon.js +1 -12
- package/lib/module/components/ImagesListFooter.js +1 -122
- package/lib/module/components/ImagesModal.js +1 -235
- package/lib/module/components/ImagesRoot.js +1 -20
- package/lib/module/components/ImagesRoot.web.js +1 -9
- package/lib/module/components/InsightsBar.js +1 -55
- package/lib/module/export.js +1 -76
- package/lib/module/format.js +1 -108
- package/lib/module/hooks/useImageRecords.js +1 -16
- package/lib/module/index.js +1 -79
- package/lib/module/preset.js +1 -35
- package/lib/module/register.js +1 -19
- package/lib/module/registerEarly.js +1 -14
- package/lib/module/remote.js +1 -36
- package/lib/module/state.js +1 -54
- package/lib/module/store/imageEventStore.js +1 -221
- package/lib/module/store/insights.js +1 -71
- package/lib/module/sync/imagesSyncAdapter.js +1 -356
- package/lib/module/types.js +0 -1
- package/lib/web/chunks/chunk-TTS5EH4R.mjs +1 -2
- package/lib/web/index.mjs +3 -4
- package/lib/web/register.mjs +1 -2
- package/package.json +3 -7
- package/register.js +1 -15
- package/lib/commonjs/autoCapture.js.map +0 -1
- package/lib/commonjs/autoCapture.web.js.map +0 -1
- package/lib/commonjs/capture/actions.js.map +0 -1
- package/lib/commonjs/capture/install.js.map +0 -1
- package/lib/commonjs/capture/install.web.js.map +0 -1
- package/lib/commonjs/capture/installExpoImage.js.map +0 -1
- package/lib/commonjs/capture/installRnImage.js.map +0 -1
- package/lib/commonjs/capture/nativeImageModules.js.map +0 -1
- package/lib/commonjs/capture/nativeImageModules.web.js.map +0 -1
- package/lib/commonjs/capture/overrides.js.map +0 -1
- package/lib/commonjs/capture/rnDecoratorEarly.js.map +0 -1
- package/lib/commonjs/capture/savings.js.map +0 -1
- package/lib/commonjs/capture/savings.web.js.map +0 -1
- package/lib/commonjs/capture/shared.js.map +0 -1
- package/lib/commonjs/components/ImageDetail.js.map +0 -1
- package/lib/commonjs/components/ImageDetailFooter.js.map +0 -1
- package/lib/commonjs/components/ImageRow.js.map +0 -1
- package/lib/commonjs/components/ImagesHeader.js.map +0 -1
- package/lib/commonjs/components/ImagesIcon.js.map +0 -1
- package/lib/commonjs/components/ImagesListFooter.js.map +0 -1
- package/lib/commonjs/components/ImagesModal.js.map +0 -1
- package/lib/commonjs/components/ImagesRoot.js.map +0 -1
- package/lib/commonjs/components/ImagesRoot.web.js.map +0 -1
- package/lib/commonjs/components/InsightsBar.js.map +0 -1
- package/lib/commonjs/export.js.map +0 -1
- package/lib/commonjs/format.js.map +0 -1
- package/lib/commonjs/hooks/useImageRecords.js.map +0 -1
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/preset.js.map +0 -1
- package/lib/commonjs/register.js.map +0 -1
- package/lib/commonjs/registerEarly.js.map +0 -1
- package/lib/commonjs/remote.js.map +0 -1
- package/lib/commonjs/state.js.map +0 -1
- package/lib/commonjs/store/imageEventStore.js.map +0 -1
- package/lib/commonjs/store/insights.js.map +0 -1
- package/lib/commonjs/sync/imagesSyncAdapter.js.map +0 -1
- package/lib/commonjs/types.js.map +0 -1
- package/lib/module/autoCapture.js.map +0 -1
- package/lib/module/autoCapture.web.js.map +0 -1
- package/lib/module/capture/actions.js.map +0 -1
- package/lib/module/capture/install.js.map +0 -1
- package/lib/module/capture/install.web.js.map +0 -1
- package/lib/module/capture/installExpoImage.js.map +0 -1
- package/lib/module/capture/installRnImage.js.map +0 -1
- package/lib/module/capture/nativeImageModules.js.map +0 -1
- package/lib/module/capture/nativeImageModules.web.js.map +0 -1
- package/lib/module/capture/overrides.js.map +0 -1
- package/lib/module/capture/rnDecoratorEarly.js.map +0 -1
- package/lib/module/capture/savings.js.map +0 -1
- package/lib/module/capture/savings.web.js.map +0 -1
- package/lib/module/capture/shared.js.map +0 -1
- package/lib/module/components/ImageDetail.js.map +0 -1
- package/lib/module/components/ImageDetailFooter.js.map +0 -1
- package/lib/module/components/ImageRow.js.map +0 -1
- package/lib/module/components/ImagesHeader.js.map +0 -1
- package/lib/module/components/ImagesIcon.js.map +0 -1
- package/lib/module/components/ImagesListFooter.js.map +0 -1
- package/lib/module/components/ImagesModal.js.map +0 -1
- package/lib/module/components/ImagesRoot.js.map +0 -1
- package/lib/module/components/ImagesRoot.web.js.map +0 -1
- package/lib/module/components/InsightsBar.js.map +0 -1
- package/lib/module/export.js.map +0 -1
- package/lib/module/format.js.map +0 -1
- package/lib/module/hooks/useImageRecords.js.map +0 -1
- package/lib/module/index.js.map +0 -1
- package/lib/module/preset.js.map +0 -1
- package/lib/module/register.js.map +0 -1
- package/lib/module/registerEarly.js.map +0 -1
- package/lib/module/remote.js.map +0 -1
- package/lib/module/state.js.map +0 -1
- package/lib/module/store/imageEventStore.js.map +0 -1
- package/lib/module/store/insights.js.map +0 -1
- package/lib/module/sync/imagesSyncAdapter.js.map +0 -1
- package/lib/module/types.js.map +0 -1
- package/lib/typescript/autoCapture.d.ts.map +0 -1
- package/lib/typescript/autoCapture.web.d.ts.map +0 -1
- package/lib/typescript/capture/actions.d.ts.map +0 -1
- package/lib/typescript/capture/install.d.ts.map +0 -1
- package/lib/typescript/capture/install.web.d.ts.map +0 -1
- package/lib/typescript/capture/installExpoImage.d.ts.map +0 -1
- package/lib/typescript/capture/installRnImage.d.ts.map +0 -1
- package/lib/typescript/capture/nativeImageModules.d.ts.map +0 -1
- package/lib/typescript/capture/nativeImageModules.web.d.ts.map +0 -1
- package/lib/typescript/capture/overrides.d.ts.map +0 -1
- package/lib/typescript/capture/rnDecoratorEarly.d.ts.map +0 -1
- package/lib/typescript/capture/savings.d.ts.map +0 -1
- package/lib/typescript/capture/savings.web.d.ts.map +0 -1
- package/lib/typescript/capture/shared.d.ts.map +0 -1
- package/lib/typescript/components/ImageDetail.d.ts.map +0 -1
- package/lib/typescript/components/ImageDetailFooter.d.ts.map +0 -1
- package/lib/typescript/components/ImageRow.d.ts.map +0 -1
- package/lib/typescript/components/ImagesHeader.d.ts.map +0 -1
- package/lib/typescript/components/ImagesIcon.d.ts.map +0 -1
- package/lib/typescript/components/ImagesListFooter.d.ts.map +0 -1
- package/lib/typescript/components/ImagesModal.d.ts.map +0 -1
- package/lib/typescript/components/ImagesRoot.d.ts.map +0 -1
- package/lib/typescript/components/ImagesRoot.web.d.ts.map +0 -1
- package/lib/typescript/components/InsightsBar.d.ts.map +0 -1
- package/lib/typescript/export.d.ts.map +0 -1
- package/lib/typescript/format.d.ts.map +0 -1
- package/lib/typescript/hooks/useImageRecords.d.ts.map +0 -1
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/preset.d.ts.map +0 -1
- package/lib/typescript/register.d.ts.map +0 -1
- package/lib/typescript/registerEarly.d.ts.map +0 -1
- package/lib/typescript/remote.d.ts.map +0 -1
- package/lib/typescript/state.d.ts.map +0 -1
- package/lib/typescript/store/imageEventStore.d.ts.map +0 -1
- package/lib/typescript/store/insights.d.ts.map +0 -1
- package/lib/typescript/sync/imagesSyncAdapter.d.ts.map +0 -1
- package/lib/typescript/types.d.ts.map +0 -1
- package/lib/web/chunks/chunk-7CWLRQ2L.mjs +0 -2
- package/lib/web/chunks/chunk-B5A6CYSS.mjs +0 -2
- package/lib/web/chunks/chunk-LKTR6X2V.mjs +0 -2
|
@@ -1,156 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ImageRow = ImageRow;
|
|
7
|
-
var _reactNative = require("react-native");
|
|
8
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
9
|
-
var _format = require("../format");
|
|
10
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
/**
|
|
12
|
-
* ImageRow — one captured image in the list: thumbnail, filename, library +
|
|
13
|
-
* cache badges, load time, and the size verdict.
|
|
14
|
-
*
|
|
15
|
-
* Thumbnails carry the buoy-internal testID so the capture layer skips them —
|
|
16
|
-
* the tool must never appear in its own registry.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
function ImageRow({
|
|
20
|
-
record,
|
|
21
|
-
onPress
|
|
22
|
-
}) {
|
|
23
|
-
const verdict = (0, _format.sizeVerdict)(record);
|
|
24
|
-
const cache = (0, _format.cacheBadge)(record);
|
|
25
|
-
const showThumb = record.sourceKind === "network" || record.sourceKind === "asset" || record.sourceKind === "file";
|
|
26
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.TouchableOpacity, {
|
|
27
|
-
style: styles.row,
|
|
28
|
-
testID: `buoy-image-row-${record.id}`,
|
|
29
|
-
onPress: () => onPress(record.id),
|
|
30
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
31
|
-
style: styles.thumbBox,
|
|
32
|
-
children: [showThumb && record.uri ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
|
|
33
|
-
testID: "buoy-internal-images-thumb",
|
|
34
|
-
source: {
|
|
35
|
-
uri: record.uri
|
|
36
|
-
},
|
|
37
|
-
style: styles.thumb,
|
|
38
|
-
resizeMode: "cover"
|
|
39
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
40
|
-
style: styles.thumbFallback,
|
|
41
|
-
children: "?"
|
|
42
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
43
|
-
style: [styles.statusDot, {
|
|
44
|
-
backgroundColor: (0, _format.statusColor)(record)
|
|
45
|
-
}]
|
|
46
|
-
})]
|
|
47
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
48
|
-
style: styles.main,
|
|
49
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
50
|
-
style: styles.name,
|
|
51
|
-
numberOfLines: 1,
|
|
52
|
-
children: (0, _format.uriTail)(record.uri)
|
|
53
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
54
|
-
style: styles.metaRow,
|
|
55
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Pill, {
|
|
56
|
-
variant: "text",
|
|
57
|
-
label: record.lib === "web" ? "WEB" : record.lib === "expo" ? "EXPO" : "RN",
|
|
58
|
-
color: _sharedUi.night.color.textTertiary
|
|
59
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Pill, {
|
|
60
|
-
variant: "text",
|
|
61
|
-
label: cache.label,
|
|
62
|
-
color: cache.color
|
|
63
|
-
}), record.overrideLabel ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.Pill, {
|
|
64
|
-
variant: "text",
|
|
65
|
-
label: "SIM",
|
|
66
|
-
color: _sharedUi.night.color.warning
|
|
67
|
-
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
68
|
-
style: styles.meta,
|
|
69
|
-
children: (0, _format.formatMs)(record.durationMs)
|
|
70
|
-
}), record.intrinsic ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
71
|
-
style: styles.meta,
|
|
72
|
-
children: [record.intrinsic.width, "\xD7", record.intrinsic.height]
|
|
73
|
-
}) : null]
|
|
74
|
-
})]
|
|
75
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
76
|
-
style: styles.right,
|
|
77
|
-
children: record.status === "error" ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
78
|
-
style: [styles.verdict, {
|
|
79
|
-
color: _sharedUi.macOSColors.semantic.error
|
|
80
|
-
}],
|
|
81
|
-
children: "FAILED"
|
|
82
|
-
}) : verdict.label ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
83
|
-
style: [styles.verdict, {
|
|
84
|
-
color: verdict.color
|
|
85
|
-
}],
|
|
86
|
-
children: verdict.label
|
|
87
|
-
}) : null
|
|
88
|
-
})]
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
const styles = _reactNative.StyleSheet.create({
|
|
92
|
-
row: {
|
|
93
|
-
flexDirection: "row",
|
|
94
|
-
alignItems: "center",
|
|
95
|
-
paddingHorizontal: 12,
|
|
96
|
-
paddingVertical: 8,
|
|
97
|
-
borderBottomWidth: _reactNative.StyleSheet.hairlineWidth,
|
|
98
|
-
borderBottomColor: _sharedUi.night.color.border,
|
|
99
|
-
gap: 10
|
|
100
|
-
},
|
|
101
|
-
thumbBox: {
|
|
102
|
-
width: 40,
|
|
103
|
-
height: 40,
|
|
104
|
-
borderRadius: 6,
|
|
105
|
-
backgroundColor: _sharedUi.night.color.bg,
|
|
106
|
-
alignItems: "center",
|
|
107
|
-
justifyContent: "center",
|
|
108
|
-
overflow: "hidden"
|
|
109
|
-
},
|
|
110
|
-
thumb: {
|
|
111
|
-
width: 40,
|
|
112
|
-
height: 40
|
|
113
|
-
},
|
|
114
|
-
thumbFallback: {
|
|
115
|
-
color: _sharedUi.night.color.textTertiary,
|
|
116
|
-
fontSize: 16,
|
|
117
|
-
fontWeight: "700"
|
|
118
|
-
},
|
|
119
|
-
statusDot: {
|
|
120
|
-
position: "absolute",
|
|
121
|
-
right: 2,
|
|
122
|
-
bottom: 2,
|
|
123
|
-
width: 8,
|
|
124
|
-
height: 8,
|
|
125
|
-
borderRadius: 4,
|
|
126
|
-
borderWidth: 1,
|
|
127
|
-
borderColor: _sharedUi.night.color.bg
|
|
128
|
-
},
|
|
129
|
-
main: {
|
|
130
|
-
flex: 1,
|
|
131
|
-
gap: 2
|
|
132
|
-
},
|
|
133
|
-
name: {
|
|
134
|
-
color: _sharedUi.night.color.text,
|
|
135
|
-
fontSize: 12,
|
|
136
|
-
fontWeight: "600"
|
|
137
|
-
},
|
|
138
|
-
metaRow: {
|
|
139
|
-
flexDirection: "row",
|
|
140
|
-
alignItems: "center",
|
|
141
|
-
gap: 8
|
|
142
|
-
},
|
|
143
|
-
meta: {
|
|
144
|
-
color: _sharedUi.night.color.textSecondary,
|
|
145
|
-
fontSize: 10,
|
|
146
|
-
fontVariant: ["tabular-nums"]
|
|
147
|
-
},
|
|
148
|
-
right: {
|
|
149
|
-
alignItems: "flex-end"
|
|
150
|
-
},
|
|
151
|
-
verdict: {
|
|
152
|
-
fontSize: 10,
|
|
153
|
-
fontWeight: "700"
|
|
154
|
-
}
|
|
155
|
-
});
|
|
156
|
-
//# sourceMappingURL=ImageRow.js.map
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.ImageRow=ImageRow;var _reactNative=require("react-native");var _sharedUi=require("@buoy-gg/shared-ui");var _format=require("../format");var _jsxRuntime=require("react/jsx-runtime");function ImageRow({record:t,onPress:o}){const e=(0,_format.sizeVerdict)(t);const i=(0,_format.cacheBadge)(t);const r=t.sourceKind==="network"||t.sourceKind==="asset"||t.sourceKind==="file";return(0,_jsxRuntime.jsxs)(_reactNative.TouchableOpacity,{style:styles.row,testID:`buoy-image-row-${t.id}`,onPress:()=>o(t.id),children:[(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.thumbBox,children:[r&&t.uri?(0,_jsxRuntime.jsx)(_reactNative.Image,{testID:"buoy-internal-images-thumb",source:{uri:t.uri},style:styles.thumb,resizeMode:"cover"}):(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.thumbFallback,children:"?"}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:[styles.statusDot,{backgroundColor:(0,_format.statusColor)(t)}]})]}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.main,children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.name,numberOfLines:1,children:(0,_format.uriTail)(t.uri)}),(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.metaRow,children:[(0,_jsxRuntime.jsx)(_sharedUi.Pill,{variant:"text",label:t.lib==="web"?"WEB":t.lib==="expo"?"EXPO":"RN",color:_sharedUi.night.color.textTertiary}),(0,_jsxRuntime.jsx)(_sharedUi.Pill,{variant:"text",label:i.label,color:i.color}),t.overrideLabel?(0,_jsxRuntime.jsx)(_sharedUi.Pill,{variant:"text",label:"SIM",color:_sharedUi.night.color.warning}):null,(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.meta,children:(0,_format.formatMs)(t.durationMs)}),t.intrinsic?(0,_jsxRuntime.jsxs)(_reactNative.Text,{style:styles.meta,children:[t.intrinsic.width,"\xD7",t.intrinsic.height]}):null]})]}),(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.right,children:t.status==="error"?(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.verdict,{color:_sharedUi.macOSColors.semantic.error}],children:"FAILED"}):e.label?(0,_jsxRuntime.jsx)(_reactNative.Text,{style:[styles.verdict,{color:e.color}],children:e.label}):null})]})}const styles=_reactNative.StyleSheet.create({row:{flexDirection:"row",alignItems:"center",paddingHorizontal:12,paddingVertical:8,borderBottomWidth:_reactNative.StyleSheet.hairlineWidth,borderBottomColor:_sharedUi.night.color.border,gap:10},thumbBox:{width:40,height:40,borderRadius:6,backgroundColor:_sharedUi.night.color.bg,alignItems:"center",justifyContent:"center",overflow:"hidden"},thumb:{width:40,height:40},thumbFallback:{color:_sharedUi.night.color.textTertiary,fontSize:16,fontWeight:"700"},statusDot:{position:"absolute",right:2,bottom:2,width:8,height:8,borderRadius:4,borderWidth:1,borderColor:_sharedUi.night.color.bg},main:{flex:1,gap:2},name:{color:_sharedUi.night.color.text,fontSize:12,fontWeight:"600"},metaRow:{flexDirection:"row",alignItems:"center",gap:8},meta:{color:_sharedUi.night.color.textSecondary,fontSize:10,fontVariant:["tabular-nums"]},right:{alignItems:"flex-end"},verdict:{fontSize:10,fontWeight:"700"}});
|
|
@@ -1,63 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ImagesHeader = ImagesHeader;
|
|
7
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
8
|
-
var _format = require("../format");
|
|
9
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
-
/**
|
|
11
|
-
* ImagesHeader — shared ModalHeader wiring for the Images tool, matching the
|
|
12
|
-
* Console/Network header pattern. List mode shows aggregate stats, the shared
|
|
13
|
-
* ToolbarCopyButton (full registry report) and the shared ToolbarClearButton;
|
|
14
|
-
* detail mode shows back navigation plus the copy button for that record's
|
|
15
|
-
* report. Copy behavior (Pro gating, hint banner, success/error feedback)
|
|
16
|
-
* comes from shared-ui — identical to every other tool.
|
|
17
|
-
*/
|
|
18
|
-
|
|
19
|
-
function ImagesHeader({
|
|
20
|
-
stats,
|
|
21
|
-
detailOpen,
|
|
22
|
-
detailIndex = -1,
|
|
23
|
-
detailTotal = 0,
|
|
24
|
-
onCloseDetail,
|
|
25
|
-
onClear,
|
|
26
|
-
getReport,
|
|
27
|
-
onBack
|
|
28
|
-
}) {
|
|
29
|
-
if (detailOpen) {
|
|
30
|
-
const counter = detailIndex >= 0 && detailTotal > 0 ? `${detailIndex + 1} of ${detailTotal}` : undefined;
|
|
31
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_sharedUi.ModalHeader, {
|
|
32
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ModalHeader.Navigation, {
|
|
33
|
-
onBack: onCloseDetail
|
|
34
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ModalHeader.Content, {
|
|
35
|
-
title: "Image detail",
|
|
36
|
-
subtitle: counter
|
|
37
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ModalHeader.Actions, {
|
|
38
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ToolbarCopyButton, {
|
|
39
|
-
value: getReport
|
|
40
|
-
})
|
|
41
|
-
})]
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
const subtitleParts = [`${stats.total} images`, `${stats.errors} failed`, `≈${(0, _format.formatBytes)(stats.estDecodedBytes)} decoded`];
|
|
45
|
-
if (stats.estWastedBytes > 0) {
|
|
46
|
-
subtitleParts.push(`${(0, _format.formatBytes)(stats.estWastedBytes)} wasted`);
|
|
47
|
-
}
|
|
48
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_sharedUi.ModalHeader, {
|
|
49
|
-
children: [onBack ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ModalHeader.Navigation, {
|
|
50
|
-
onBack: onBack
|
|
51
|
-
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ModalHeader.Content, {
|
|
52
|
-
title: "Images",
|
|
53
|
-
subtitle: subtitleParts.join(" · ")
|
|
54
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_sharedUi.ModalHeader.Actions, {
|
|
55
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ToolbarCopyButton, {
|
|
56
|
-
value: getReport
|
|
57
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ToolbarClearButton, {
|
|
58
|
-
onPress: onClear
|
|
59
|
-
})]
|
|
60
|
-
})]
|
|
61
|
-
});
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=ImagesHeader.js.map
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.ImagesHeader=ImagesHeader;var _sharedUi=require("@buoy-gg/shared-ui");var _format=require("../format");var _jsxRuntime=require("react/jsx-runtime");function ImagesHeader({stats:e,detailOpen:d,detailIndex:r=-1,detailTotal:t=0,onCloseDetail:i,onClear:n,getReport:a,onBack:o}){if(d){const l=r>=0&&t>0?`${r+1} of ${t}`:void 0;return(0,_jsxRuntime.jsxs)(_sharedUi.ModalHeader,{children:[(0,_jsxRuntime.jsx)(_sharedUi.ModalHeader.Navigation,{onBack:i}),(0,_jsxRuntime.jsx)(_sharedUi.ModalHeader.Content,{title:"Image detail",subtitle:l}),(0,_jsxRuntime.jsx)(_sharedUi.ModalHeader.Actions,{children:(0,_jsxRuntime.jsx)(_sharedUi.ToolbarCopyButton,{value:a})})]})}const s=[`${e.total} images`,`${e.errors} failed`,`\u2248${(0,_format.formatBytes)(e.estDecodedBytes)} decoded`];if(e.estWastedBytes>0){s.push(`${(0,_format.formatBytes)(e.estWastedBytes)} wasted`)}return(0,_jsxRuntime.jsxs)(_sharedUi.ModalHeader,{children:[o?(0,_jsxRuntime.jsx)(_sharedUi.ModalHeader.Navigation,{onBack:o}):null,(0,_jsxRuntime.jsx)(_sharedUi.ModalHeader.Content,{title:"Images",subtitle:s.join(" \xB7 ")}),(0,_jsxRuntime.jsxs)(_sharedUi.ModalHeader.Actions,{children:[(0,_jsxRuntime.jsx)(_sharedUi.ToolbarCopyButton,{value:a}),(0,_jsxRuntime.jsx)(_sharedUi.ToolbarClearButton,{onPress:n})]})]})}
|
|
@@ -1,19 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
Object.defineProperty(exports, "IMAGES_ICON_COLOR", {
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _sharedUi.IMAGES_ICON_COLOR;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "ImagesIcon", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _sharedUi.ImagesIcon;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
19
|
-
//# sourceMappingURL=ImagesIcon.js.map
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});Object.defineProperty(exports,"IMAGES_ICON_COLOR",{enumerable:true,get:function(){return _sharedUi.IMAGES_ICON_COLOR}});Object.defineProperty(exports,"ImagesIcon",{enumerable:true,get:function(){return _sharedUi.ImagesIcon}});var _sharedUi=require("@buoy-gg/shared-ui");
|
|
@@ -1,126 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ImagesListFooter = ImagesListFooter;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
10
|
-
var _actions = require("../capture/actions");
|
|
11
|
-
var _overrides = require("../capture/overrides");
|
|
12
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
/**
|
|
14
|
-
* ImagesListFooter — the list screen's action bar: mass simulations applied
|
|
15
|
-
* to EVERY mounted image at once (error / loading / blank), mass hard-reload,
|
|
16
|
-
* flash everything, restore all — plus the global network simulation modes
|
|
17
|
-
* (Normal / Offline / Cold). Styled to match the detail footer.
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
const NETWORK_MODES = [{
|
|
21
|
-
key: "normal",
|
|
22
|
-
label: "Normal"
|
|
23
|
-
}, {
|
|
24
|
-
key: "offline",
|
|
25
|
-
label: "Offline"
|
|
26
|
-
}, {
|
|
27
|
-
key: "cold",
|
|
28
|
-
label: "Cold"
|
|
29
|
-
}];
|
|
30
|
-
function ImagesListFooter() {
|
|
31
|
-
const [message, setMessage] = (0, _react.useState)(null);
|
|
32
|
-
const network = (0, _react.useSyncExternalStore)(_actions.subscribeActions, () => (0, _overrides.getGlobalModes)().network);
|
|
33
|
-
const massOverride = (source, label) => {
|
|
34
|
-
const count = (0, _overrides.setOverrideForAllMounted)(source, label);
|
|
35
|
-
setMessage(count > 0 ? `${label} on ${count} image${count === 1 ? "" : "s"} — Restore all to undo` : "No mounted images");
|
|
36
|
-
};
|
|
37
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_sharedUi.ToolFooter, {
|
|
38
|
-
paddingBottom: 10,
|
|
39
|
-
style: {
|
|
40
|
-
paddingTop: 8
|
|
41
|
-
},
|
|
42
|
-
children: [message ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.FooterMessage, {
|
|
43
|
-
children: message
|
|
44
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.FooterCaption, {
|
|
45
|
-
children: "MASS ACTIONS \u2014 every image on screen"
|
|
46
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_sharedUi.FooterRow, {
|
|
47
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(MassButton, {
|
|
48
|
-
label: "Error",
|
|
49
|
-
onPress: () => massOverride({
|
|
50
|
-
type: "error"
|
|
51
|
-
}, "Forced error")
|
|
52
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(MassButton, {
|
|
53
|
-
label: "Loading",
|
|
54
|
-
onPress: () => massOverride({
|
|
55
|
-
type: "hang"
|
|
56
|
-
}, "Forced loading")
|
|
57
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(MassButton, {
|
|
58
|
-
label: "Blank",
|
|
59
|
-
onPress: () => massOverride({
|
|
60
|
-
type: "blank"
|
|
61
|
-
}, "Blanked")
|
|
62
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(MassButton, {
|
|
63
|
-
label: "Reload",
|
|
64
|
-
onPress: () => {
|
|
65
|
-
setMessage("…");
|
|
66
|
-
(0, _actions.hardReloadAllMounted)().then(r => setMessage(r.message));
|
|
67
|
-
}
|
|
68
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(MassButton, {
|
|
69
|
-
label: "Find",
|
|
70
|
-
onPress: () => {
|
|
71
|
-
const count = (0, _overrides.flashAllMounted)();
|
|
72
|
-
setMessage(`Flashing ${count} image${count === 1 ? "" : "s"} (2.5s)`);
|
|
73
|
-
}
|
|
74
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(MassButton, {
|
|
75
|
-
label: "Restore",
|
|
76
|
-
accent: true,
|
|
77
|
-
onPress: () => {
|
|
78
|
-
const count = (0, _overrides.clearAllOverrides)();
|
|
79
|
-
setMessage(count > 0 ? `Restored ${count} image${count === 1 ? "" : "s"}` : "No overrides active");
|
|
80
|
-
}
|
|
81
|
-
})]
|
|
82
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_sharedUi.FooterRow, {
|
|
83
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
84
|
-
style: styles.netLabel,
|
|
85
|
-
children: "NET"
|
|
86
|
-
}), NETWORK_MODES.map(mode => {
|
|
87
|
-
const active = network === mode.key;
|
|
88
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.FooterButton, {
|
|
89
|
-
label: mode.label,
|
|
90
|
-
active: active,
|
|
91
|
-
style: {
|
|
92
|
-
paddingVertical: 6
|
|
93
|
-
},
|
|
94
|
-
onPress: () => {
|
|
95
|
-
(0, _overrides.setNetworkMode)(mode.key);
|
|
96
|
-
// Modes only affect loads that happen AFTER they're set — an
|
|
97
|
-
// on-screen image keeps its bitmap until something reloads it.
|
|
98
|
-
setMessage(mode.key === "normal" ? "Network simulation off — tap RELOAD to load normally again" : mode.key === "offline" ? "Offline: network images FAIL (bundled assets still load) — tap RELOAD to apply to on-screen images" : "Cold (bypass caches) — tap RELOAD: everything refetches like first launch");
|
|
99
|
-
}
|
|
100
|
-
}, mode.key);
|
|
101
|
-
})]
|
|
102
|
-
})]
|
|
103
|
-
});
|
|
104
|
-
}
|
|
105
|
-
function MassButton({
|
|
106
|
-
label,
|
|
107
|
-
onPress,
|
|
108
|
-
accent
|
|
109
|
-
}) {
|
|
110
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.FooterButton, {
|
|
111
|
-
label: label,
|
|
112
|
-
onPress: onPress,
|
|
113
|
-
accent: accent
|
|
114
|
-
});
|
|
115
|
-
}
|
|
116
|
-
const styles = _reactNative.StyleSheet.create({
|
|
117
|
-
netLabel: {
|
|
118
|
-
color: _sharedUi.night.color.textTertiary,
|
|
119
|
-
fontSize: 9,
|
|
120
|
-
fontWeight: "700",
|
|
121
|
-
letterSpacing: 0.8,
|
|
122
|
-
alignSelf: "center",
|
|
123
|
-
marginRight: 2
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
//# sourceMappingURL=ImagesListFooter.js.map
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.ImagesListFooter=ImagesListFooter;var _react=require("react");var _reactNative=require("react-native");var _sharedUi=require("@buoy-gg/shared-ui");var _actions=require("../capture/actions");var _overrides=require("../capture/overrides");var _jsxRuntime=require("react/jsx-runtime");const NETWORK_MODES=[{key:"normal",label:"Normal"},{key:"offline",label:"Offline"},{key:"cold",label:"Cold"}];function ImagesListFooter(){const[r,t]=(0,_react.useState)(null);const s=(0,_react.useSyncExternalStore)(_actions.subscribeActions,()=>(0,_overrides.getGlobalModes)().network);const a=(e,o)=>{const n=(0,_overrides.setOverrideForAllMounted)(e,o);t(n>0?`${o} on ${n} image${n===1?"":"s"} \u2014 Restore all to undo`:"No mounted images")};return(0,_jsxRuntime.jsxs)(_sharedUi.ToolFooter,{paddingBottom:10,style:{paddingTop:8},children:[r?(0,_jsxRuntime.jsx)(_sharedUi.FooterMessage,{children:r}):(0,_jsxRuntime.jsx)(_sharedUi.FooterCaption,{children:"MASS ACTIONS \u2014 every image on screen"}),(0,_jsxRuntime.jsxs)(_sharedUi.FooterRow,{children:[(0,_jsxRuntime.jsx)(MassButton,{label:"Error",onPress:()=>a({type:"error"},"Forced error")}),(0,_jsxRuntime.jsx)(MassButton,{label:"Loading",onPress:()=>a({type:"hang"},"Forced loading")}),(0,_jsxRuntime.jsx)(MassButton,{label:"Blank",onPress:()=>a({type:"blank"},"Blanked")}),(0,_jsxRuntime.jsx)(MassButton,{label:"Reload",onPress:()=>{t("\u2026");(0,_actions.hardReloadAllMounted)().then(e=>t(e.message))}}),(0,_jsxRuntime.jsx)(MassButton,{label:"Find",onPress:()=>{const e=(0,_overrides.flashAllMounted)();t(`Flashing ${e} image${e===1?"":"s"} (2.5s)`)}}),(0,_jsxRuntime.jsx)(MassButton,{label:"Restore",accent:true,onPress:()=>{const e=(0,_overrides.clearAllOverrides)();t(e>0?`Restored ${e} image${e===1?"":"s"}`:"No overrides active")}})]}),(0,_jsxRuntime.jsxs)(_sharedUi.FooterRow,{children:[(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.netLabel,children:"NET"}),NETWORK_MODES.map(e=>{const o=s===e.key;return(0,_jsxRuntime.jsx)(_sharedUi.FooterButton,{label:e.label,active:o,style:{paddingVertical:6},onPress:()=>{(0,_overrides.setNetworkMode)(e.key);t(e.key==="normal"?"Network simulation off \u2014 tap RELOAD to load normally again":e.key==="offline"?"Offline: network images FAIL (bundled assets still load) \u2014 tap RELOAD to apply to on-screen images":"Cold (bypass caches) \u2014 tap RELOAD: everything refetches like first launch")}},e.key)})]})]})}function MassButton({label:r,onPress:t,accent:s}){return(0,_jsxRuntime.jsx)(_sharedUi.FooterButton,{label:r,onPress:t,accent:s})}const styles=_reactNative.StyleSheet.create({netLabel:{color:_sharedUi.night.color.textTertiary,fontSize:9,fontWeight:"700",letterSpacing:.8,alignSelf:"center",marginRight:2}});
|
|
@@ -1,240 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ImagesModal = ImagesModal;
|
|
7
|
-
exports.ImagesToolView = ImagesToolView;
|
|
8
|
-
var _react = require("react");
|
|
9
|
-
var _reactNative = require("react-native");
|
|
10
|
-
var _sharedUi = require("@buoy-gg/shared-ui");
|
|
11
|
-
var _install = require("../capture/install");
|
|
12
|
-
var _overrides = require("../capture/overrides");
|
|
13
|
-
var _export = require("../export");
|
|
14
|
-
var _useImageRecords = require("../hooks/useImageRecords");
|
|
15
|
-
var _remote = require("../remote");
|
|
16
|
-
var _imageEventStore = require("../store/imageEventStore");
|
|
17
|
-
var _ImageDetail = require("./ImageDetail");
|
|
18
|
-
var _ImageDetailFooter = require("./ImageDetailFooter");
|
|
19
|
-
var _ImageRow = require("./ImageRow");
|
|
20
|
-
var _ImagesHeader = require("./ImagesHeader");
|
|
21
|
-
var _ImagesListFooter = require("./ImagesListFooter");
|
|
22
|
-
var _InsightsBar = require("./InsightsBar");
|
|
23
|
-
var _insights = require("../store/insights");
|
|
24
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
|
-
/**
|
|
26
|
-
* ImagesModal — bottom-sheet wrapper rendered by FloatingDevTools when the
|
|
27
|
-
* Images tool is opened. List of captured images → tap for detail. Also
|
|
28
|
-
* surfaces the capture status so a mis-ordered install is self-diagnosing
|
|
29
|
-
* instead of silently empty.
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
function CaptureNotice() {
|
|
33
|
-
const status = (0, _install.getCaptureStatus)();
|
|
34
|
-
const notices = [];
|
|
35
|
-
if (status.rnDecoratorTooLate) {
|
|
36
|
-
notices.push('RN <Image> instrumentation missed the module-load race — add `import "@buoy-gg/images/register"` as the FIRST import of your entry file.');
|
|
37
|
-
}
|
|
38
|
-
if (!status.browserObserverActive && !status.expoAvailable && !status.rnDecoratorActive && !status.rnDecoratorTooLate) {
|
|
39
|
-
notices.push("Waiting for images… render some <Image> components to populate the list.");
|
|
40
|
-
}
|
|
41
|
-
if (notices.length === 0) return null;
|
|
42
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
43
|
-
style: styles.notice,
|
|
44
|
-
children: notices.map(n => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
45
|
-
style: styles.noticeText,
|
|
46
|
-
children: n
|
|
47
|
-
}, n))
|
|
48
|
-
});
|
|
49
|
-
}
|
|
50
|
-
function EmptyState() {
|
|
51
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.ToolEmptyState, {
|
|
52
|
-
testID: "buoy-images-empty"
|
|
53
|
-
// listening: capture is armed, waiting for the first image load.
|
|
54
|
-
,
|
|
55
|
-
otto: "listening",
|
|
56
|
-
title: "No images captured yet",
|
|
57
|
-
message: "Every RN <Image> and expo-image load is recorded here with cache verdicts, timings, and oversize checks."
|
|
58
|
-
});
|
|
59
|
-
}
|
|
60
|
-
function ImagesModal({
|
|
61
|
-
visible,
|
|
62
|
-
onClose,
|
|
63
|
-
onBack,
|
|
64
|
-
onMinimize,
|
|
65
|
-
persistenceKey,
|
|
66
|
-
inline = false
|
|
67
|
-
}) {
|
|
68
|
-
// Safety net: ensures capture is live even without the early register
|
|
69
|
-
// import (expo-image capture is timing-immune, so this still gets most data).
|
|
70
|
-
(0, _install.installImageCapture)();
|
|
71
|
-
const {
|
|
72
|
-
records,
|
|
73
|
-
stats
|
|
74
|
-
} = (0, _useImageRecords.useImageRecords)();
|
|
75
|
-
const [selectedId, setSelectedId] = (0, _react.useState)(null);
|
|
76
|
-
const selected = selectedId != null ? (0, _imageEventStore.getRecord)(selectedId) : undefined;
|
|
77
|
-
|
|
78
|
-
// Mirror mode: the synced wire records omit errorHeaders (detail-only data)
|
|
79
|
-
// — pull them from the device the first time a failed record is opened.
|
|
80
|
-
const wantHeadersFor = selected?.status === "error" && selected.errorHeaders == null ? selected.id : null;
|
|
81
|
-
(0, _react.useEffect)(() => {
|
|
82
|
-
const remote = (0, _remote.remoteImagesDispatch)();
|
|
83
|
-
if (wantHeadersFor == null || !remote) return;
|
|
84
|
-
let cancelled = false;
|
|
85
|
-
remote("getDetail", {
|
|
86
|
-
id: wantHeadersFor
|
|
87
|
-
}).then(detail => {
|
|
88
|
-
if (cancelled) return;
|
|
89
|
-
const headers = detail?.errorHeaders;
|
|
90
|
-
// `{}` (not undefined) so a headerless error doesn't refetch forever.
|
|
91
|
-
(0, _imageEventStore.updateRecord)(wantHeadersFor, {
|
|
92
|
-
errorHeaders: headers ?? {}
|
|
93
|
-
});
|
|
94
|
-
}).catch(() => {});
|
|
95
|
-
return () => {
|
|
96
|
-
cancelled = true;
|
|
97
|
-
};
|
|
98
|
-
}, [wantHeadersFor]);
|
|
99
|
-
|
|
100
|
-
// Stepping is relative to the live list (newest first): previous = newer.
|
|
101
|
-
const selectedIndex = selected ? records.findIndex(r => r.id === selected.id) : -1;
|
|
102
|
-
const stepTo = index => {
|
|
103
|
-
const target = records[index];
|
|
104
|
-
if (target) setSelectedId(target.id);
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
// Mode-appropriate report: single record in detail, full registry (stats +
|
|
108
|
-
// insights + table) in the list. The shared ToolbarCopyButton resolves this
|
|
109
|
-
// lazily on press and handles clipboard + feedback + gating.
|
|
110
|
-
const getReport = () => selected ? (0, _export.formatRecordMarkdown)(selected) : (0, _export.formatRegistryMarkdown)(records, stats, (0, _insights.computeInsights)(records), (0, _install.getCaptureStatus)(), (0, _overrides.getGlobalModes)());
|
|
111
|
-
const headerContent = /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImagesHeader.ImagesHeader, {
|
|
112
|
-
stats: stats,
|
|
113
|
-
detailOpen: selected != null,
|
|
114
|
-
detailIndex: selectedIndex,
|
|
115
|
-
detailTotal: records.length,
|
|
116
|
-
onCloseDetail: () => setSelectedId(null),
|
|
117
|
-
onClear: _imageEventStore.clearRecords,
|
|
118
|
-
getReport: getReport,
|
|
119
|
-
onBack: onBack
|
|
120
|
-
});
|
|
121
|
-
const body = selected ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
122
|
-
style: styles.detailContainer,
|
|
123
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageDetail.ImageDetail, {
|
|
124
|
-
record: selected
|
|
125
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageDetailFooter.ImageDetailFooter, {
|
|
126
|
-
record: selected,
|
|
127
|
-
hasPrevious: selectedIndex > 0,
|
|
128
|
-
hasNext: selectedIndex >= 0 && selectedIndex < records.length - 1,
|
|
129
|
-
onPrevious: () => stepTo(selectedIndex - 1),
|
|
130
|
-
onNext: () => stepTo(selectedIndex + 1)
|
|
131
|
-
}, selected.id)]
|
|
132
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
133
|
-
style: styles.listContainer,
|
|
134
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_InsightsBar.InsightsBar, {
|
|
135
|
-
insights: (0, _insights.computeInsights)(records)
|
|
136
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(CaptureNotice, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.FlatList, {
|
|
137
|
-
data: records,
|
|
138
|
-
keyExtractor: item => String(item.id),
|
|
139
|
-
renderItem: ({
|
|
140
|
-
item
|
|
141
|
-
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImageRow.ImageRow, {
|
|
142
|
-
record: item,
|
|
143
|
-
onPress: setSelectedId
|
|
144
|
-
}),
|
|
145
|
-
ListEmptyComponent: /*#__PURE__*/(0, _jsxRuntime.jsx)(EmptyState, {})
|
|
146
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_ImagesListFooter.ImagesListFooter, {})]
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
// The ONLY difference between the phone and the desktop dashboard is which
|
|
150
|
-
// shell the header and body go in. Everything above this is shared.
|
|
151
|
-
if (inline) {
|
|
152
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
153
|
-
style: styles.inlineRoot,
|
|
154
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
155
|
-
style: styles.inlineHeader,
|
|
156
|
-
..._sharedUi.windowDragProps,
|
|
157
|
-
children: headerContent
|
|
158
|
-
}), body]
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_sharedUi.JsModal, {
|
|
162
|
-
visible: visible,
|
|
163
|
-
onClose: onClose,
|
|
164
|
-
onMinimize: onMinimize,
|
|
165
|
-
persistenceKey: persistenceKey,
|
|
166
|
-
header: {
|
|
167
|
-
showToggleButton: true,
|
|
168
|
-
customContent: headerContent
|
|
169
|
-
},
|
|
170
|
-
enablePersistence: true,
|
|
171
|
-
initialMode: "bottomSheet",
|
|
172
|
-
disableScrollWrapper: true,
|
|
173
|
-
children: body
|
|
174
|
-
});
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
/**
|
|
178
|
-
* The same Images tool as `ImagesModal`, rendered INLINE for hosts that place
|
|
179
|
-
* tools in a panel rather than a modal (the desktop dashboard). Exists so
|
|
180
|
-
* there is exactly one implementation of the tool's header, list and detail.
|
|
181
|
-
*/
|
|
182
|
-
function ImagesToolView(props = {}) {
|
|
183
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(ImagesModal, {
|
|
184
|
-
...props,
|
|
185
|
-
inline: true,
|
|
186
|
-
visible: true,
|
|
187
|
-
onClose: () => {}
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
const styles = _reactNative.StyleSheet.create({
|
|
191
|
-
inlineRoot: {
|
|
192
|
-
flex: 1,
|
|
193
|
-
minHeight: 0,
|
|
194
|
-
// Transparent so the desktop workbench's hoisted sky (one field spanning
|
|
195
|
-
// sidebar + panel) shows through — the shell paints its base beneath it.
|
|
196
|
-
backgroundColor: "transparent"
|
|
197
|
-
},
|
|
198
|
-
inlineHeader: {
|
|
199
|
-
paddingHorizontal: 12,
|
|
200
|
-
paddingVertical: 8,
|
|
201
|
-
borderBottomWidth: 1,
|
|
202
|
-
borderBottomColor: _sharedUi.macOSColors.border.default,
|
|
203
|
-
// Clear, like Bench — the host's hoisted sky shows through the header.
|
|
204
|
-
backgroundColor: "transparent"
|
|
205
|
-
},
|
|
206
|
-
listContainer: {
|
|
207
|
-
flex: 1
|
|
208
|
-
},
|
|
209
|
-
detailContainer: {
|
|
210
|
-
flex: 1
|
|
211
|
-
},
|
|
212
|
-
notice: {
|
|
213
|
-
margin: 10,
|
|
214
|
-
padding: 10,
|
|
215
|
-
borderRadius: 8,
|
|
216
|
-
backgroundColor: _sharedUi.night.color.warningSoft,
|
|
217
|
-
gap: 4
|
|
218
|
-
},
|
|
219
|
-
noticeText: {
|
|
220
|
-
color: _sharedUi.night.color.warning,
|
|
221
|
-
fontSize: 11
|
|
222
|
-
},
|
|
223
|
-
empty: {
|
|
224
|
-
alignItems: "center",
|
|
225
|
-
padding: 32,
|
|
226
|
-
gap: 8
|
|
227
|
-
},
|
|
228
|
-
emptyTitle: {
|
|
229
|
-
color: _sharedUi.night.color.text,
|
|
230
|
-
fontSize: 13,
|
|
231
|
-
fontWeight: "600"
|
|
232
|
-
},
|
|
233
|
-
emptyText: {
|
|
234
|
-
color: _sharedUi.night.color.textSecondary,
|
|
235
|
-
fontSize: 11,
|
|
236
|
-
textAlign: "center",
|
|
237
|
-
lineHeight: 16
|
|
238
|
-
}
|
|
239
|
-
});
|
|
240
|
-
//# sourceMappingURL=ImagesModal.js.map
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.ImagesModal=ImagesModal;exports.ImagesToolView=ImagesToolView;var _react=require("react");var _reactNative=require("react-native");var _sharedUi=require("@buoy-gg/shared-ui");var _install=require("../capture/install");var _overrides=require("../capture/overrides");var _export=require("../export");var _useImageRecords=require("../hooks/useImageRecords");var _remote=require("../remote");var _imageEventStore=require("../store/imageEventStore");var _ImageDetail=require("./ImageDetail");var _ImageDetailFooter=require("./ImageDetailFooter");var _ImageRow=require("./ImageRow");var _ImagesHeader=require("./ImagesHeader");var _ImagesListFooter=require("./ImagesListFooter");var _InsightsBar=require("./InsightsBar");var _insights=require("../store/insights");var _jsxRuntime=require("react/jsx-runtime");function CaptureNotice(){const r=(0,_install.getCaptureStatus)();const i=[];if(r.rnDecoratorTooLate){i.push('RN <Image> instrumentation missed the module-load race \u2014 add `import "@buoy-gg/images/register"` as the FIRST import of your entry file.')}if(!r.browserObserverActive&&!r.expoAvailable&&!r.rnDecoratorActive&&!r.rnDecoratorTooLate){i.push("Waiting for images\u2026 render some <Image> components to populate the list.")}if(i.length===0)return null;return(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.notice,children:i.map(n=>(0,_jsxRuntime.jsx)(_reactNative.Text,{style:styles.noticeText,children:n},n))})}function EmptyState(){return(0,_jsxRuntime.jsx)(_sharedUi.ToolEmptyState,{testID:"buoy-images-empty",otto:"listening",title:"No images captured yet",message:"Every RN <Image> and expo-image load is recorded here with cache verdicts, timings, and oversize checks."})}function ImagesModal({visible:r,onClose:i,onBack:n,onMinimize:h,persistenceKey:x,inline:I=false}){(0,_install.installImageCapture)();const{records:o,stats:c}=(0,_useImageRecords.useImageRecords)();const[u,d]=(0,_react.useState)(null);const e=u!=null?(0,_imageEventStore.getRecord)(u):void 0;const l=e?.status==="error"&&e.errorHeaders==null?e.id:null;(0,_react.useEffect)(()=>{const t=(0,_remote.remoteImagesDispatch)();if(l==null||!t)return;let s=false;t("getDetail",{id:l}).then(f=>{if(s)return;const y=f?.errorHeaders;(0,_imageEventStore.updateRecord)(l,{errorHeaders:y??{}})}).catch(()=>{});return()=>{s=true}},[l]);const a=e?o.findIndex(t=>t.id===e.id):-1;const g=t=>{const s=o[t];if(s)d(s.id)};const v=()=>e?(0,_export.formatRecordMarkdown)(e):(0,_export.formatRegistryMarkdown)(o,c,(0,_insights.computeInsights)(o),(0,_install.getCaptureStatus)(),(0,_overrides.getGlobalModes)());const m=(0,_jsxRuntime.jsx)(_ImagesHeader.ImagesHeader,{stats:c,detailOpen:e!=null,detailIndex:a,detailTotal:o.length,onCloseDetail:()=>d(null),onClear:_imageEventStore.clearRecords,getReport:v,onBack:n});const p=e?(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.detailContainer,children:[(0,_jsxRuntime.jsx)(_ImageDetail.ImageDetail,{record:e}),(0,_jsxRuntime.jsx)(_ImageDetailFooter.ImageDetailFooter,{record:e,hasPrevious:a>0,hasNext:a>=0&&a<o.length-1,onPrevious:()=>g(a-1),onNext:()=>g(a+1)},e.id)]}):(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.listContainer,children:[(0,_jsxRuntime.jsx)(_InsightsBar.InsightsBar,{insights:(0,_insights.computeInsights)(o)}),(0,_jsxRuntime.jsx)(CaptureNotice,{}),(0,_jsxRuntime.jsx)(_reactNative.FlatList,{data:o,keyExtractor:t=>String(t.id),renderItem:({item:t})=>(0,_jsxRuntime.jsx)(_ImageRow.ImageRow,{record:t,onPress:d}),ListEmptyComponent:(0,_jsxRuntime.jsx)(EmptyState,{})}),(0,_jsxRuntime.jsx)(_ImagesListFooter.ImagesListFooter,{})]});if(I){return(0,_jsxRuntime.jsxs)(_reactNative.View,{style:styles.inlineRoot,children:[(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.inlineHeader,..._sharedUi.windowDragProps,children:m}),p]})}return(0,_jsxRuntime.jsx)(_sharedUi.JsModal,{visible:r,onClose:i,onMinimize:h,persistenceKey:x,header:{showToggleButton:true,customContent:m},enablePersistence:true,initialMode:"bottomSheet",disableScrollWrapper:true,children:p})}function ImagesToolView(r={}){return(0,_jsxRuntime.jsx)(ImagesModal,{...r,inline:true,visible:true,onClose:()=>{}})}const styles=_reactNative.StyleSheet.create({inlineRoot:{flex:1,minHeight:0,backgroundColor:"transparent"},inlineHeader:{paddingHorizontal:12,paddingVertical:8,borderBottomWidth:1,borderBottomColor:_sharedUi.macOSColors.border.default,backgroundColor:"transparent"},listContainer:{flex:1},detailContainer:{flex:1},notice:{margin:10,padding:10,borderRadius:8,backgroundColor:_sharedUi.night.color.warningSoft,gap:4},noticeText:{color:_sharedUi.night.color.warning,fontSize:11},empty:{alignItems:"center",padding:32,gap:8},emptyTitle:{color:_sharedUi.night.color.text,fontSize:13,fontWeight:"600"},emptyText:{color:_sharedUi.night.color.textSecondary,fontSize:11,textAlign:"center",lineHeight:16}});
|
|
@@ -1,24 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ImagesRoot = ImagesRoot;
|
|
7
|
-
var _install = require("../capture/install");
|
|
8
|
-
/**
|
|
9
|
-
* Mount once near the app root to start image capture immediately.
|
|
10
|
-
*
|
|
11
|
-
* NOTE: for full RN-core <Image> coverage prefer the side-effect import
|
|
12
|
-
* `import "@buoy-gg/images/register"` as the first import of your entry file —
|
|
13
|
-
* the RN decorator must be installed before React Native's Image module first
|
|
14
|
-
* evaluates. ImagesRoot alone still captures every expo-image instance
|
|
15
|
-
* (timing-immune) and reports whether the RN hook landed.
|
|
16
|
-
*/
|
|
17
|
-
|
|
18
|
-
function ImagesRoot() {
|
|
19
|
-
// Synchronous on first render — earlier than an effect, though still later
|
|
20
|
-
// than the register import. Idempotent.
|
|
21
|
-
(0, _install.installImageCapture)();
|
|
22
|
-
return null;
|
|
23
|
-
}
|
|
24
|
-
//# sourceMappingURL=ImagesRoot.js.map
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.ImagesRoot=ImagesRoot;var _install=require("../capture/install");function ImagesRoot(){(0,_install.installImageCapture)();return null}
|
|
@@ -1,13 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.ImagesRoot = ImagesRoot;
|
|
7
|
-
var _react = require("react");
|
|
8
|
-
var _install = require("../capture/install.web");
|
|
9
|
-
function ImagesRoot() {
|
|
10
|
-
(0, _react.useEffect)(_install.startBrowserImageCapture, []);
|
|
11
|
-
return null;
|
|
12
|
-
}
|
|
13
|
-
//# sourceMappingURL=ImagesRoot.web.js.map
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:true});exports.ImagesRoot=ImagesRoot;var _react=require("react");var _install=require("../capture/install.web");function ImagesRoot(){(0,_react.useEffect)(_install.startBrowserImageCapture,[]);return null}
|