@buoy-gg/images 7.0.3

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 (195) hide show
  1. package/LICENSE +58 -0
  2. package/README.md +58 -0
  3. package/lib/commonjs/capture/actions.js +227 -0
  4. package/lib/commonjs/capture/actions.js.map +1 -0
  5. package/lib/commonjs/capture/install.js +41 -0
  6. package/lib/commonjs/capture/install.js.map +1 -0
  7. package/lib/commonjs/capture/installExpoImage.js +99 -0
  8. package/lib/commonjs/capture/installExpoImage.js.map +1 -0
  9. package/lib/commonjs/capture/installRnImage.js +128 -0
  10. package/lib/commonjs/capture/installRnImage.js.map +1 -0
  11. package/lib/commonjs/capture/overrides.js +286 -0
  12. package/lib/commonjs/capture/overrides.js.map +1 -0
  13. package/lib/commonjs/capture/savings.js +193 -0
  14. package/lib/commonjs/capture/savings.js.map +1 -0
  15. package/lib/commonjs/capture/shared.js +367 -0
  16. package/lib/commonjs/capture/shared.js.map +1 -0
  17. package/lib/commonjs/components/ImageDetail.js +444 -0
  18. package/lib/commonjs/components/ImageDetail.js.map +1 -0
  19. package/lib/commonjs/components/ImageDetailFooter.js +232 -0
  20. package/lib/commonjs/components/ImageDetailFooter.js.map +1 -0
  21. package/lib/commonjs/components/ImageRow.js +164 -0
  22. package/lib/commonjs/components/ImageRow.js.map +1 -0
  23. package/lib/commonjs/components/ImagesHeader.js +63 -0
  24. package/lib/commonjs/components/ImagesHeader.js.map +1 -0
  25. package/lib/commonjs/components/ImagesIcon.js +59 -0
  26. package/lib/commonjs/components/ImagesIcon.js.map +1 -0
  27. package/lib/commonjs/components/ImagesListFooter.js +194 -0
  28. package/lib/commonjs/components/ImagesListFooter.js.map +1 -0
  29. package/lib/commonjs/components/ImagesModal.js +173 -0
  30. package/lib/commonjs/components/ImagesModal.js.map +1 -0
  31. package/lib/commonjs/components/ImagesRoot.js +24 -0
  32. package/lib/commonjs/components/ImagesRoot.js.map +1 -0
  33. package/lib/commonjs/components/InsightsBar.js +59 -0
  34. package/lib/commonjs/components/InsightsBar.js.map +1 -0
  35. package/lib/commonjs/export.js +81 -0
  36. package/lib/commonjs/export.js.map +1 -0
  37. package/lib/commonjs/format.js +117 -0
  38. package/lib/commonjs/format.js.map +1 -0
  39. package/lib/commonjs/hooks/useImageRecords.js +20 -0
  40. package/lib/commonjs/hooks/useImageRecords.js.map +1 -0
  41. package/lib/commonjs/index.js +236 -0
  42. package/lib/commonjs/index.js.map +1 -0
  43. package/lib/commonjs/package.json +1 -0
  44. package/lib/commonjs/preset.js +45 -0
  45. package/lib/commonjs/preset.js.map +1 -0
  46. package/lib/commonjs/register.js +19 -0
  47. package/lib/commonjs/register.js.map +1 -0
  48. package/lib/commonjs/state.js +54 -0
  49. package/lib/commonjs/state.js.map +1 -0
  50. package/lib/commonjs/store/imageEventStore.js +160 -0
  51. package/lib/commonjs/store/imageEventStore.js.map +1 -0
  52. package/lib/commonjs/store/insights.js +76 -0
  53. package/lib/commonjs/store/insights.js.map +1 -0
  54. package/lib/commonjs/sync/imagesSyncAdapter.js +315 -0
  55. package/lib/commonjs/sync/imagesSyncAdapter.js.map +1 -0
  56. package/lib/commonjs/types.js +2 -0
  57. package/lib/commonjs/types.js.map +1 -0
  58. package/lib/module/capture/actions.js +214 -0
  59. package/lib/module/capture/actions.js.map +1 -0
  60. package/lib/module/capture/install.js +36 -0
  61. package/lib/module/capture/install.js.map +1 -0
  62. package/lib/module/capture/installExpoImage.js +94 -0
  63. package/lib/module/capture/installExpoImage.js.map +1 -0
  64. package/lib/module/capture/installRnImage.js +122 -0
  65. package/lib/module/capture/installRnImage.js.map +1 -0
  66. package/lib/module/capture/overrides.js +269 -0
  67. package/lib/module/capture/overrides.js.map +1 -0
  68. package/lib/module/capture/savings.js +189 -0
  69. package/lib/module/capture/savings.js.map +1 -0
  70. package/lib/module/capture/shared.js +359 -0
  71. package/lib/module/capture/shared.js.map +1 -0
  72. package/lib/module/components/ImageDetail.js +440 -0
  73. package/lib/module/components/ImageDetail.js.map +1 -0
  74. package/lib/module/components/ImageDetailFooter.js +228 -0
  75. package/lib/module/components/ImageDetailFooter.js.map +1 -0
  76. package/lib/module/components/ImageRow.js +160 -0
  77. package/lib/module/components/ImageRow.js.map +1 -0
  78. package/lib/module/components/ImagesHeader.js +59 -0
  79. package/lib/module/components/ImagesHeader.js.map +1 -0
  80. package/lib/module/components/ImagesIcon.js +55 -0
  81. package/lib/module/components/ImagesIcon.js.map +1 -0
  82. package/lib/module/components/ImagesListFooter.js +190 -0
  83. package/lib/module/components/ImagesListFooter.js.map +1 -0
  84. package/lib/module/components/ImagesModal.js +169 -0
  85. package/lib/module/components/ImagesModal.js.map +1 -0
  86. package/lib/module/components/ImagesRoot.js +20 -0
  87. package/lib/module/components/ImagesRoot.js.map +1 -0
  88. package/lib/module/components/InsightsBar.js +55 -0
  89. package/lib/module/components/InsightsBar.js.map +1 -0
  90. package/lib/module/export.js +76 -0
  91. package/lib/module/export.js.map +1 -0
  92. package/lib/module/format.js +108 -0
  93. package/lib/module/format.js.map +1 -0
  94. package/lib/module/hooks/useImageRecords.js +16 -0
  95. package/lib/module/hooks/useImageRecords.js.map +1 -0
  96. package/lib/module/index.js +73 -0
  97. package/lib/module/index.js.map +1 -0
  98. package/lib/module/preset.js +40 -0
  99. package/lib/module/preset.js.map +1 -0
  100. package/lib/module/register.js +19 -0
  101. package/lib/module/register.js.map +1 -0
  102. package/lib/module/state.js +50 -0
  103. package/lib/module/state.js.map +1 -0
  104. package/lib/module/store/imageEventStore.js +146 -0
  105. package/lib/module/store/imageEventStore.js.map +1 -0
  106. package/lib/module/store/insights.js +71 -0
  107. package/lib/module/store/insights.js.map +1 -0
  108. package/lib/module/sync/imagesSyncAdapter.js +311 -0
  109. package/lib/module/sync/imagesSyncAdapter.js.map +1 -0
  110. package/lib/module/types.js +2 -0
  111. package/lib/module/types.js.map +1 -0
  112. package/lib/typescript/capture/actions.d.ts +49 -0
  113. package/lib/typescript/capture/actions.d.ts.map +1 -0
  114. package/lib/typescript/capture/install.d.ts +15 -0
  115. package/lib/typescript/capture/install.d.ts.map +1 -0
  116. package/lib/typescript/capture/installExpoImage.d.ts +23 -0
  117. package/lib/typescript/capture/installExpoImage.d.ts.map +1 -0
  118. package/lib/typescript/capture/installRnImage.d.ts +24 -0
  119. package/lib/typescript/capture/installRnImage.d.ts.map +1 -0
  120. package/lib/typescript/capture/overrides.d.ts +83 -0
  121. package/lib/typescript/capture/overrides.d.ts.map +1 -0
  122. package/lib/typescript/capture/savings.d.ts +37 -0
  123. package/lib/typescript/capture/savings.d.ts.map +1 -0
  124. package/lib/typescript/capture/shared.d.ts +61 -0
  125. package/lib/typescript/capture/shared.d.ts.map +1 -0
  126. package/lib/typescript/components/ImageDetail.d.ts +13 -0
  127. package/lib/typescript/components/ImageDetail.d.ts.map +1 -0
  128. package/lib/typescript/components/ImageDetailFooter.d.ts +19 -0
  129. package/lib/typescript/components/ImageDetailFooter.d.ts.map +1 -0
  130. package/lib/typescript/components/ImageRow.d.ts +15 -0
  131. package/lib/typescript/components/ImageRow.d.ts.map +1 -0
  132. package/lib/typescript/components/ImagesHeader.d.ts +25 -0
  133. package/lib/typescript/components/ImagesHeader.d.ts.map +1 -0
  134. package/lib/typescript/components/ImagesIcon.d.ts +13 -0
  135. package/lib/typescript/components/ImagesIcon.d.ts.map +1 -0
  136. package/lib/typescript/components/ImagesListFooter.d.ts +8 -0
  137. package/lib/typescript/components/ImagesListFooter.d.ts.map +1 -0
  138. package/lib/typescript/components/ImagesModal.d.ts +17 -0
  139. package/lib/typescript/components/ImagesModal.d.ts.map +1 -0
  140. package/lib/typescript/components/ImagesRoot.d.ts +11 -0
  141. package/lib/typescript/components/ImagesRoot.d.ts.map +1 -0
  142. package/lib/typescript/components/InsightsBar.d.ts +13 -0
  143. package/lib/typescript/components/InsightsBar.d.ts.map +1 -0
  144. package/lib/typescript/export.d.ts +12 -0
  145. package/lib/typescript/export.d.ts.map +1 -0
  146. package/lib/typescript/format.d.ts +26 -0
  147. package/lib/typescript/format.d.ts.map +1 -0
  148. package/lib/typescript/hooks/useImageRecords.d.ts +11 -0
  149. package/lib/typescript/hooks/useImageRecords.d.ts.map +1 -0
  150. package/lib/typescript/index.d.ts +33 -0
  151. package/lib/typescript/index.d.ts.map +1 -0
  152. package/lib/typescript/preset.d.ts +38 -0
  153. package/lib/typescript/preset.d.ts.map +1 -0
  154. package/lib/typescript/register.d.ts +15 -0
  155. package/lib/typescript/register.d.ts.map +1 -0
  156. package/lib/typescript/state.d.ts +54 -0
  157. package/lib/typescript/state.d.ts.map +1 -0
  158. package/lib/typescript/store/imageEventStore.d.ts +34 -0
  159. package/lib/typescript/store/imageEventStore.d.ts.map +1 -0
  160. package/lib/typescript/store/insights.d.ts +11 -0
  161. package/lib/typescript/store/insights.d.ts.map +1 -0
  162. package/lib/typescript/sync/imagesSyncAdapter.d.ts +205 -0
  163. package/lib/typescript/sync/imagesSyncAdapter.d.ts.map +1 -0
  164. package/lib/typescript/types.d.ts +121 -0
  165. package/lib/typescript/types.d.ts.map +1 -0
  166. package/package.json +67 -0
  167. package/register.d.ts +1 -0
  168. package/register.js +15 -0
  169. package/src/capture/actions.ts +206 -0
  170. package/src/capture/install.ts +36 -0
  171. package/src/capture/installExpoImage.ts +115 -0
  172. package/src/capture/installRnImage.tsx +133 -0
  173. package/src/capture/overrides.ts +282 -0
  174. package/src/capture/savings.ts +193 -0
  175. package/src/capture/shared.ts +387 -0
  176. package/src/components/ImageDetail.tsx +456 -0
  177. package/src/components/ImageDetailFooter.tsx +270 -0
  178. package/src/components/ImageRow.tsx +148 -0
  179. package/src/components/ImagesHeader.tsx +77 -0
  180. package/src/components/ImagesIcon.tsx +66 -0
  181. package/src/components/ImagesListFooter.tsx +193 -0
  182. package/src/components/ImagesModal.tsx +195 -0
  183. package/src/components/ImagesRoot.tsx +18 -0
  184. package/src/components/InsightsBar.tsx +51 -0
  185. package/src/export.ts +100 -0
  186. package/src/format.ts +85 -0
  187. package/src/hooks/useImageRecords.ts +24 -0
  188. package/src/index.tsx +108 -0
  189. package/src/preset.tsx +35 -0
  190. package/src/register.ts +17 -0
  191. package/src/state.ts +88 -0
  192. package/src/store/imageEventStore.ts +162 -0
  193. package/src/store/insights.ts +66 -0
  194. package/src/sync/imagesSyncAdapter.ts +261 -0
  195. package/src/types.ts +111 -0
@@ -0,0 +1,61 @@
1
+ /**
2
+ * Capture core shared by the RN <Image> decorator and the expo-image patch.
3
+ *
4
+ * ImageInstanceTracker: one per live image component instance. It rolls a new
5
+ * ImageRecord whenever the instance's source URI changes, and exposes wrapped
6
+ * event handlers that feed the store while still calling through to whatever
7
+ * handlers the app passed.
8
+ */
9
+ import type { ImageLib, SourceKind } from "../types";
10
+ /**
11
+ * Images rendered by Buoy's own UI (e.g. thumbnails inside the Images modal)
12
+ * carry this testID prefix and are excluded from capture, so the tool doesn't
13
+ * pollute its own registry.
14
+ */
15
+ export declare const INTERNAL_TEST_ID_PREFIX = "buoy-internal";
16
+ export declare function isInternalImage(testID: unknown): boolean;
17
+ /**
18
+ * React Native's own devtools UI loads images too (LogBox icons resolve to
19
+ * Metro asset URLs under Libraries/LogBox). They're noise in an app-focused
20
+ * registry — skip them.
21
+ */
22
+ export declare function isNoiseUri(uri: string): boolean;
23
+ export declare function classifyUri(uri: string): SourceKind;
24
+ /**
25
+ * Best-effort URI extraction from any source prop shape (RN or expo-image):
26
+ * string, number (Metro asset), {uri}, arrays of those, ImageRef.
27
+ */
28
+ export declare function resolveSourceUri(source: unknown): {
29
+ uri: string;
30
+ kind: SourceKind;
31
+ };
32
+ /** The event-handler subset we intercept, normalized across both libraries. */
33
+ export interface OriginalHandlers {
34
+ onLoadStart?: (event: unknown) => void;
35
+ onProgress?: (event: unknown) => void;
36
+ onLoad?: (event: unknown) => void;
37
+ onError?: (event: unknown) => void;
38
+ onLoadEnd?: (event: unknown) => void;
39
+ onDisplay?: (event: unknown) => void;
40
+ onLayout?: (event: unknown) => void;
41
+ }
42
+ export type WrappedHandlers = Required<Pick<OriginalHandlers, "onLoadStart" | "onProgress" | "onLoad" | "onError" | "onLayout">> & Pick<OriginalHandlers, "onLoadEnd" | "onDisplay">;
43
+ export declare class ImageInstanceTracker {
44
+ private readonly lib;
45
+ private recordId;
46
+ private uri;
47
+ private handlerCache;
48
+ constructor(lib: ImageLib);
49
+ getRecordId(): number | null;
50
+ /** Record accessibility presence (called per render; writes only on change). */
51
+ noteA11y(hasAltText: boolean): void;
52
+ /** Call on every render with the current source prop. Rolls records on change. */
53
+ syncSource(source: unknown): void;
54
+ unmount(): void;
55
+ /**
56
+ * Wrapped handlers for the current originals. Cached by handler identity so
57
+ * re-renders with unchanged props reuse the same functions.
58
+ */
59
+ handlers(orig: OriginalHandlers): WrappedHandlers;
60
+ }
61
+ //# sourceMappingURL=shared.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/capture/shared.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,KAAK,EAAgB,QAAQ,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AASnE;;;;GAIG;AACH,eAAO,MAAM,uBAAuB,kBAAkB,CAAC;AAEvD,wBAAgB,eAAe,CAAC,MAAM,EAAE,OAAO,GAAG,OAAO,CAExD;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAM/C;AAED,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,UAAU,CAKnD;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,OAAO,GAAG;IACjD,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,UAAU,CAAC;CAClB,CAoCA;AAED,+EAA+E;AAC/E,MAAM,WAAW,gBAAgB;IAC/B,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACvC,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAClC,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACnC,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACrC;AAED,MAAM,MAAM,eAAe,GAAG,QAAQ,CACpC,IAAI,CACF,gBAAgB,EAChB,aAAa,GAAG,YAAY,GAAG,QAAQ,GAAG,SAAS,GAAG,UAAU,CACjE,CACF,GACC,IAAI,CAAC,gBAAgB,EAAE,WAAW,GAAG,WAAW,CAAC,CAAC;AAmDpD,qBAAa,oBAAoB;IAC/B,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAW;IAC/B,OAAO,CAAC,QAAQ,CAAuB;IACvC,OAAO,CAAC,GAAG,CAAuB;IAClC,OAAO,CAAC,YAAY,CAAyD;gBAEjE,GAAG,EAAE,QAAQ;IAIzB,WAAW,IAAI,MAAM,GAAG,IAAI;IAI5B,gFAAgF;IAChF,QAAQ,CAAC,UAAU,EAAE,OAAO,GAAG,IAAI;IAQnC,kFAAkF;IAClF,UAAU,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI;IAcjC,OAAO,IAAI,IAAI;IAOf;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,gBAAgB,GAAG,eAAe;CA+KlD"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * ImageDetail — full record view: preview, source, load timeline, dimensions
3
+ * with the oversize verdict + estimated decoded/wasted memory, cache verdict,
4
+ * and error details (including HTTP status/headers when the platform provides
5
+ * them). Cache actions live here too (expo-image global clears).
6
+ */
7
+ import type { ImageRecord } from "../types";
8
+ interface ImageDetailProps {
9
+ record: ImageRecord;
10
+ }
11
+ export declare function ImageDetail({ record }: ImageDetailProps): import("react").JSX.Element;
12
+ export {};
13
+ //# sourceMappingURL=ImageDetail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImageDetail.d.ts","sourceRoot":"","sources":["../../../src/components/ImageDetail.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAuBH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,UAAU,gBAAgB;IACxB,MAAM,EAAE,WAAW,CAAC;CACrB;AAwJD,wBAAgB,WAAW,CAAC,EAAE,MAAM,EAAE,EAAE,gBAAgB,+BAsKvD"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * ImageDetailFooter — bottom navbar for the detail view: previous/next
3
+ * stepping through the captured list at the edges, per-image actions in the
4
+ * middle (hard reload / retry), with inline action feedback. Styling matches
5
+ * shared-ui's EventStepperFooter so it reads like the rest of Buoy.
6
+ *
7
+ * Mount with key={record.id} so action feedback resets when stepping.
8
+ */
9
+ import type { ImageRecord } from "../types";
10
+ interface ImageDetailFooterProps {
11
+ record: ImageRecord;
12
+ hasPrevious: boolean;
13
+ hasNext: boolean;
14
+ onPrevious: () => void;
15
+ onNext: () => void;
16
+ }
17
+ export declare function ImageDetailFooter({ record, hasPrevious, hasNext, onPrevious, onNext, }: ImageDetailFooterProps): import("react").JSX.Element;
18
+ export {};
19
+ //# sourceMappingURL=ImageDetailFooter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImageDetailFooter.d.ts","sourceRoot":"","sources":["../../../src/components/ImageDetailFooter.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAcH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,UAAU,sBAAsB;IAC9B,MAAM,EAAE,WAAW,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,wBAAgB,iBAAiB,CAAC,EAChC,MAAM,EACN,WAAW,EACX,OAAO,EACP,UAAU,EACV,MAAM,GACP,EAAE,sBAAsB,+BA4HxB"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * ImageRow — one captured image in the list: thumbnail, filename, library +
3
+ * cache badges, load time, and the size verdict.
4
+ *
5
+ * Thumbnails carry the buoy-internal testID so the capture layer skips them —
6
+ * the tool must never appear in its own registry.
7
+ */
8
+ import type { ImageRecord } from "../types";
9
+ interface ImageRowProps {
10
+ record: ImageRecord;
11
+ onPress: (id: number) => void;
12
+ }
13
+ export declare function ImageRow({ record, onPress }: ImageRowProps): import("react").JSX.Element;
14
+ export {};
15
+ //# sourceMappingURL=ImageRow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImageRow.d.ts","sourceRoot":"","sources":["../../../src/components/ImageRow.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAKH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C,UAAU,aAAa;IACrB,MAAM,EAAE,WAAW,CAAC;IACpB,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAC/B;AAED,wBAAgB,QAAQ,CAAC,EAAE,MAAM,EAAE,OAAO,EAAE,EAAE,aAAa,+BA0D1D"}
@@ -0,0 +1,25 @@
1
+ /**
2
+ * ImagesHeader — shared ModalHeader wiring for the Images tool, matching the
3
+ * Console/Network header pattern. List mode shows aggregate stats, the shared
4
+ * ToolbarCopyButton (full registry report) and the shared ToolbarClearButton;
5
+ * detail mode shows back navigation plus the copy button for that record's
6
+ * report. Copy behavior (Pro gating, hint banner, success/error feedback)
7
+ * comes from shared-ui — identical to every other tool.
8
+ */
9
+ import type { ImageStats } from "../types";
10
+ interface ImagesHeaderProps {
11
+ stats: ImageStats;
12
+ detailOpen: boolean;
13
+ /** Index of the open record in the list (-1 when unknown). */
14
+ detailIndex?: number;
15
+ detailTotal?: number;
16
+ onCloseDetail: () => void;
17
+ onClear: () => void;
18
+ /** Builds the mode-appropriate report (registry or single record). */
19
+ getReport: () => string;
20
+ /** App-stack back (from the floating menu's AppHost). */
21
+ onBack?: () => void;
22
+ }
23
+ export declare function ImagesHeader({ stats, detailOpen, detailIndex, detailTotal, onCloseDetail, onClear, getReport, onBack, }: ImagesHeaderProps): import("react").JSX.Element;
24
+ export {};
25
+ //# sourceMappingURL=ImagesHeader.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImagesHeader.d.ts","sourceRoot":"","sources":["../../../src/components/ImagesHeader.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAQH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,UAAU,iBAAiB;IACzB,KAAK,EAAE,UAAU,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,8DAA8D;IAC9D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,sEAAsE;IACtE,SAAS,EAAE,MAAM,MAAM,CAAC;IACxB,yDAAyD;IACzD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,UAAU,EACV,WAAgB,EAChB,WAAe,EACf,aAAa,EACb,OAAO,EACP,SAAS,EACT,MAAM,GACP,EAAE,iBAAiB,+BAoCnB"}
@@ -0,0 +1,13 @@
1
+ /** Tool accent color (photo violet). */
2
+ export declare const IMAGES_ICON_COLOR = "#C084FC";
3
+ interface ImagesIconProps {
4
+ size: number;
5
+ color?: string;
6
+ }
7
+ /**
8
+ * Dependency-free "picture" glyph: rounded frame with a sun dot and a
9
+ * mountain-ish baseline, rendered from plain views.
10
+ */
11
+ export declare function ImagesIcon({ size, color }: ImagesIconProps): import("react").JSX.Element;
12
+ export {};
13
+ //# sourceMappingURL=ImagesIcon.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImagesIcon.d.ts","sourceRoot":"","sources":["../../../src/components/ImagesIcon.tsx"],"names":[],"mappings":"AAEA,wCAAwC;AACxC,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAE3C,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;GAGG;AACH,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,KAAyB,EAAE,EAAE,eAAe,+BAuC9E"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * ImagesListFooter — the list screen's action bar: mass simulations applied
3
+ * to EVERY mounted image at once (error / loading / blank), mass hard-reload,
4
+ * flash everything, restore all — plus the global network simulation modes
5
+ * (Normal / Offline / Cold). Styled to match the detail footer.
6
+ */
7
+ export declare function ImagesListFooter(): import("react").JSX.Element;
8
+ //# sourceMappingURL=ImagesListFooter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImagesListFooter.d.ts","sourceRoot":"","sources":["../../../src/components/ImagesListFooter.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAqBH,wBAAgB,gBAAgB,gCAiF/B"}
@@ -0,0 +1,17 @@
1
+ /**
2
+ * ImagesModal — bottom-sheet wrapper rendered by FloatingDevTools when the
3
+ * Images tool is opened. List of captured images → tap for detail. Also
4
+ * surfaces the capture status so a mis-ordered install is self-diagnosing
5
+ * instead of silently empty.
6
+ */
7
+ import type { ModalState } from "@buoy-gg/shared-ui";
8
+ interface ImagesModalProps {
9
+ visible: boolean;
10
+ onClose: () => void;
11
+ onBack?: () => void;
12
+ onMinimize?: (modalState: ModalState) => void;
13
+ persistenceKey?: string;
14
+ }
15
+ export declare function ImagesModal({ visible, onClose, onBack, onMinimize, persistenceKey, }: ImagesModalProps): import("react").JSX.Element;
16
+ export {};
17
+ //# sourceMappingURL=ImagesModal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImagesModal.d.ts","sourceRoot":"","sources":["../../../src/components/ImagesModal.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAKH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAerD,UAAU,gBAAgB;IACxB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IAC9C,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAqCD,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,OAAO,EACP,MAAM,EACN,UAAU,EACV,cAAc,GACf,EAAE,gBAAgB,+BAoFlB"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Mount once near the app root to start image capture immediately.
3
+ *
4
+ * NOTE: for full RN-core <Image> coverage prefer the side-effect import
5
+ * `import "@buoy-gg/images/register"` as the first import of your entry file —
6
+ * the RN decorator must be installed before React Native's Image module first
7
+ * evaluates. ImagesRoot alone still captures every expo-image instance
8
+ * (timing-immune) and reports whether the RN hook landed.
9
+ */
10
+ export declare function ImagesRoot(): null;
11
+ //# sourceMappingURL=ImagesRoot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ImagesRoot.d.ts","sourceRoot":"","sources":["../../../src/components/ImagesRoot.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,wBAAgB,UAAU,IAAI,IAAI,CAKjC"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * InsightsBar — compact warning chips above the list when cross-record
3
+ * findings exist (duplicates, retry storms, queue saturation, missing alt,
4
+ * layout shifts). Renders nothing when all clear.
5
+ *
6
+ * A wrapping row (not a horizontal ScrollView — that under-measures its
7
+ * height inside the modal's flex column and clips the chips).
8
+ */
9
+ import type { ImageInsights } from "../types";
10
+ export declare function InsightsBar({ insights }: {
11
+ insights: ImageInsights;
12
+ }): import("react").JSX.Element | null;
13
+ //# sourceMappingURL=InsightsBar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InsightsBar.d.ts","sourceRoot":"","sources":["../../../src/components/InsightsBar.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAKH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,wBAAgB,WAAW,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,EAAE,aAAa,CAAA;CAAE,sCAYpE"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Copy-friendly markdown reports — paste-ready context for an issue, PR, or
3
+ * an AI chat. One for the whole registry (list header copy) and one for a
4
+ * single record (detail header copy).
5
+ */
6
+ import type { CaptureStatus, ImageInsights, ImageRecord, ImageStats } from "./types";
7
+ export declare function formatRecordMarkdown(record: ImageRecord): string;
8
+ export declare function formatRegistryMarkdown(records: ImageRecord[], stats: ImageStats, insights: ImageInsights, captureStatus: CaptureStatus, modes: {
9
+ network: string;
10
+ blank: boolean;
11
+ }): string;
12
+ //# sourceMappingURL=export.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"export.d.ts","sourceRoot":"","sources":["../../src/export.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAUH,OAAO,KAAK,EAAE,aAAa,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErF,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAqChE;AAED,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,WAAW,EAAE,EACtB,KAAK,EAAE,UAAU,EACjB,QAAQ,EAAE,aAAa,EACvB,aAAa,EAAE,aAAa,EAC5B,KAAK,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,OAAO,CAAA;CAAE,GACzC,MAAM,CAsCR"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Formatting + verdict helpers shared by list rows and the detail view.
3
+ */
4
+ import type { ImageRecord } from "./types";
5
+ export declare function formatBytes(bytes: number): string;
6
+ export declare function formatMs(ms: number | undefined): string;
7
+ /** Last path segment of a URI, for compact row display. */
8
+ export declare function uriTail(uri: string): string;
9
+ export interface SizeVerdict {
10
+ label: string;
11
+ color: string;
12
+ /** Linear factor (2 = twice as wide/tall as needed). */
13
+ factor: number | null;
14
+ }
15
+ /**
16
+ * Fresco-style fit verdict: green within 10%, yellow within 50%, red beyond.
17
+ * Undersized sources (upscaled, likely blurry) get their own callout.
18
+ */
19
+ export declare function sizeVerdict(record: ImageRecord): SizeVerdict;
20
+ export declare function statusColor(record: ImageRecord): string;
21
+ /** Cache verdict badge text + tint (memory=green, disk=yellow, network=red). */
22
+ export declare function cacheBadge(record: ImageRecord): {
23
+ label: string;
24
+ color: string;
25
+ };
26
+ //# sourceMappingURL=format.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/format.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKjD;AAED,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAIvD;AAED,2DAA2D;AAC3D,wBAAgB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAQ3C;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,wDAAwD;IACxD,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW,CAa5D;AAED,wBAAgB,WAAW,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAWvD;AAED,gFAAgF;AAChF,wBAAgB,UAAU,CAAC,MAAM,EAAE,WAAW,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAYhF"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * React bindings for the image event store.
3
+ */
4
+ import type { ImageRecord, ImageStats } from "../types";
5
+ export interface UseImageRecordsResult {
6
+ /** Newest first. */
7
+ records: ImageRecord[];
8
+ stats: ImageStats;
9
+ }
10
+ export declare function useImageRecords(): UseImageRecordsResult;
11
+ //# sourceMappingURL=useImageRecords.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useImageRecords.d.ts","sourceRoot":"","sources":["../../../src/hooks/useImageRecords.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAExD,MAAM,WAAW,qBAAqB;IACpC,oBAAoB;IACpB,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,KAAK,EAAE,UAAU,CAAC;CACnB;AAED,wBAAgB,eAAe,IAAI,qBAAqB,CASvD"}
@@ -0,0 +1,33 @@
1
+ /**
2
+ * @buoy-gg/images
3
+ *
4
+ * Image debugger for React Native: a live registry of every image the app
5
+ * loads — RN core <Image> (via the official component-decorator hook) and
6
+ * expo-image (via a timing-immune class patch) — with cache verdicts
7
+ * (memory/disk/network), load timings, decoded-vs-displayed oversize checks,
8
+ * estimated decoded/wasted memory, and a failure log with HTTP details where
9
+ * the platform provides them.
10
+ *
11
+ * Image HTTP traffic never touches the JS network stack, so network devtools
12
+ * cannot see it — this tool is the visibility layer for images.
13
+ */
14
+ import "./register";
15
+ export { imagesToolPreset, createImagesTool } from "./preset";
16
+ export { ImagesRoot } from "./components/ImagesRoot";
17
+ export { ImagesModal } from "./components/ImagesModal";
18
+ export { ImagesIcon, IMAGES_ICON_COLOR } from "./components/ImagesIcon";
19
+ export { installImageCapture, getCaptureStatus } from "./capture/install";
20
+ export { hardReloadRecord, retryRecord, evictExpoDiskEntry, } from "./capture/actions";
21
+ export type { ActionResult } from "./capture/actions";
22
+ export { setOverride, clearOverride, getOverride, flashRecord, setNetworkMode, setBlankImages, getGlobalModes, setOverrideForAllMounted, clearAllOverrides, flashAllMounted, } from "./capture/overrides";
23
+ export { hardReloadAllMounted } from "./capture/actions";
24
+ export type { ImageOverride, OverrideSource, NetworkMode } from "./capture/overrides";
25
+ export { proveSavings } from "./capture/savings";
26
+ export type { SavingsResult } from "./capture/savings";
27
+ export { computeInsights, insightChips } from "./store/insights";
28
+ export { formatRecordMarkdown, formatRegistryMarkdown } from "./export";
29
+ export { imagesSyncAdapter } from "./sync/imagesSyncAdapter";
30
+ export { useImageRecords } from "./hooks/useImageRecords";
31
+ export { clearRecords, getSnapshot as getImageRecords, subscribe as subscribeImageRecords, computeStats, oversizeFactor, estDecodedBytes, estWastedBytes, } from "./store/imageEventStore";
32
+ export type { ImageRecord, ImageStats, ImageInsights, ImageLib, ImageStatus, CacheVerdict, SourceKind, CaptureStatus, } from "./types";
33
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,OAAO,YAAY,CAAC;AAKpB,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAK9D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAKrD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAKxE,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAK1E,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAKtD,OAAO,EACL,WAAW,EACX,aAAa,EACb,WAAW,EACX,WAAW,EACX,cAAc,EACd,cAAc,EACd,cAAc,EACd,wBAAwB,EACxB,iBAAiB,EACjB,eAAe,GAChB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AACzD,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAKtF,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AACjE,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAKxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAK7D,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EACL,YAAY,EACZ,WAAW,IAAI,eAAe,EAC9B,SAAS,IAAI,qBAAqB,EAClC,YAAY,EACZ,cAAc,EACd,eAAe,EACf,cAAc,GACf,MAAM,yBAAyB,CAAC;AAKjC,YAAY,EACV,WAAW,EACX,UAAU,EACV,aAAa,EACb,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,UAAU,EACV,aAAa,GACd,MAAM,SAAS,CAAC"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Pre-configured Images tool for FloatingDevTools.
3
+ *
4
+ * @example
5
+ * ```tsx
6
+ * import { imagesToolPreset } from '@buoy-gg/images';
7
+ *
8
+ * <FloatingDevTools apps={[imagesToolPreset]} />
9
+ * ```
10
+ */
11
+ import { ImagesModal } from "./components/ImagesModal";
12
+ export declare const imagesToolPreset: {
13
+ id: string;
14
+ name: string;
15
+ description: string;
16
+ slot: "both";
17
+ icon: ({ size, color }: {
18
+ size: number;
19
+ color?: string;
20
+ }) => import("react").JSX.Element;
21
+ component: typeof ImagesModal;
22
+ };
23
+ /** Create a custom Images tool configuration. */
24
+ export declare function createImagesTool(options?: {
25
+ name?: string;
26
+ description?: string;
27
+ }): {
28
+ name: string;
29
+ description: string;
30
+ id: string;
31
+ slot: "both";
32
+ icon: ({ size, color }: {
33
+ size: number;
34
+ color?: string;
35
+ }) => import("react").JSX.Element;
36
+ component: typeof ImagesModal;
37
+ };
38
+ //# sourceMappingURL=preset.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preset.d.ts","sourceRoot":"","sources":["../../src/preset.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,eAAO,MAAM,gBAAgB;;;;;4BAKH;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE;;CAIzD,CAAC;AAEF,iDAAiD;AACjD,wBAAgB,gBAAgB,CAC9B,OAAO,GAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAO;;;;;4BAR7B;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE;;EAezD"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Side-effect entry: installs image capture on import.
3
+ *
4
+ * Import this FIRST in your app entry file so the RN-core <Image> decorator
5
+ * lands before React Native's Image module is evaluated:
6
+ *
7
+ * ```ts
8
+ * import "@buoy-gg/images/register";
9
+ * ```
10
+ *
11
+ * This module intentionally imports nothing that touches react-native's Image
12
+ * (directly or transitively) before installing.
13
+ */
14
+ export {};
15
+ //# sourceMappingURL=register.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../src/register.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG"}
@@ -0,0 +1,54 @@
1
+ /**
2
+ * Global singleton state for the Images tool.
3
+ *
4
+ * The package can get evaluated twice as two separate module instances (e.g.
5
+ * the `/register` entry shim resolving to one copy while the package root
6
+ * import resolves to another — lib vs src). If capture state lived in module
7
+ * scope, the early copy would install the RN decorator and collect records
8
+ * while the UI copy read an empty store and a false "decorator never ran"
9
+ * flag. Keying all mutable state on globalThis under a well-known symbol makes
10
+ * every copy operate on the same data.
11
+ */
12
+ import type { ImageRecord } from "./types";
13
+ export interface ImagesGlobalState {
14
+ records: ImageRecord[];
15
+ byId: Map<number, ImageRecord>;
16
+ nextId: number;
17
+ listeners: Set<() => void>;
18
+ snapshot: ImageRecord[];
19
+ emitScheduled: boolean;
20
+ captureInstalled: boolean;
21
+ rnInstalled: boolean;
22
+ expoInstalled: boolean;
23
+ decoratorRegistered: boolean;
24
+ decoratorInvoked: boolean;
25
+ attachSeen: number;
26
+ expoAvailable: boolean;
27
+ expoPatched: boolean;
28
+ /** recordId → pending reload request for the RN wrapper to consume. */
29
+ reloadRequests: Map<number, {
30
+ nonce: number;
31
+ bust: boolean;
32
+ }>;
33
+ /** Notified when a reload request is issued (wrappers re-check their nonce). */
34
+ actionListeners: Set<() => void>;
35
+ /** recordId → live expo-image class instance (has reloadAsync etc.). */
36
+ expoInstances: Map<number, unknown>;
37
+ /** recordId → active override (source swap / forced error / style merge). */
38
+ overrides: Map<number, unknown>;
39
+ /** recordId → epoch-ms until which the locate-flash border is shown. */
40
+ flashUntil: Map<number, number>;
41
+ /** Per-record render version (bumped by any action touching that record). */
42
+ recordVersions: Map<number, number>;
43
+ /** Render version for global-mode changes (affects every image). */
44
+ globalVersion: number;
45
+ /** Monotonic counter feeding both version maps. */
46
+ versionCounter: number;
47
+ /** App-wide simulation modes. */
48
+ globalModes: {
49
+ network: "normal" | "offline" | "cold";
50
+ blank: boolean;
51
+ };
52
+ }
53
+ export declare function imagesState(): ImagesGlobalState;
54
+ //# sourceMappingURL=state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state.d.ts","sourceRoot":"","sources":["../../src/state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,MAAM,WAAW,iBAAiB;IAEhC,OAAO,EAAE,WAAW,EAAE,CAAC;IACvB,IAAI,EAAE,GAAG,CAAC,MAAM,EAAE,WAAW,CAAC,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;IAC3B,QAAQ,EAAE,WAAW,EAAE,CAAC;IACxB,aAAa,EAAE,OAAO,CAAC;IAEvB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,OAAO,CAAC;IAEvB,mBAAmB,EAAE,OAAO,CAAC;IAC7B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,UAAU,EAAE,MAAM,CAAC;IAEnB,aAAa,EAAE,OAAO,CAAC;IACvB,WAAW,EAAE,OAAO,CAAC;IAErB,uEAAuE;IACvE,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAC9D,gFAAgF;IAChF,eAAe,EAAE,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC;IACjC,wEAAwE;IACxE,aAAa,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEpC,6EAA6E;IAC7E,SAAS,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,wEAAwE;IACxE,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,6EAA6E;IAC7E,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpC,oEAAoE;IACpE,aAAa,EAAE,MAAM,CAAC;IACtB,mDAAmD;IACnD,cAAc,EAAE,MAAM,CAAC;IACvB,iCAAiC;IACjC,WAAW,EAAE;QAAE,OAAO,EAAE,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC;CACzE;AAID,wBAAgB,WAAW,IAAI,iBAAiB,CA8B/C"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * imageEventStore
3
+ *
4
+ * Bounded buffer of ImageRecords fed by the capture layer (installRnImage /
5
+ * installExpoImage). Follows the console tool's store shape — Set of
6
+ * listeners, frame-coalesced emit so bursty image grids don't turn every
7
+ * event into its own React commit — but ALL mutable state lives on the
8
+ * globalThis singleton (see ../state.ts) so a dual module instance of this
9
+ * package still reads/writes one shared store.
10
+ */
11
+ import type { ImageRecord, ImageStats } from "../types";
12
+ export declare function createRecord(partial: Omit<ImageRecord, "id" | "createdAt" | "loadCount" | "mounted" | "status">): ImageRecord;
13
+ /** Mutate a record in place (records are owned by the store) and notify. */
14
+ export declare function updateRecord(id: number, patch: Partial<ImageRecord>): ImageRecord | undefined;
15
+ export declare function getRecord(id: number): ImageRecord | undefined;
16
+ export declare function getSnapshot(): ImageRecord[];
17
+ export declare function subscribe(listener: () => void): () => void;
18
+ export declare function clearRecords(): void;
19
+ /** Physical pixels actually needed to fill the laid-out view 1:1. */
20
+ export declare function neededPixels(record: ImageRecord): {
21
+ width: number;
22
+ height: number;
23
+ } | null;
24
+ /**
25
+ * Linear oversize factor: how many times larger (per axis, area-normalized)
26
+ * the decoded bitmap is vs what the view needs. 1 = perfect, 2 = 4× the pixels.
27
+ */
28
+ export declare function oversizeFactor(record: ImageRecord): number | null;
29
+ /** Estimated decoded-bitmap memory for a loaded record (RGBA8888). */
30
+ export declare function estDecodedBytes(record: ImageRecord): number;
31
+ /** Decoded bytes beyond what the laid-out size needs (0 if not oversized). */
32
+ export declare function estWastedBytes(record: ImageRecord): number;
33
+ export declare function computeStats(list: ImageRecord[]): ImageStats;
34
+ //# sourceMappingURL=imageEventStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"imageEventStore.d.ts","sourceRoot":"","sources":["../../../src/store/imageEventStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAsBxD,wBAAgB,YAAY,CAC1B,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,IAAI,GAAG,WAAW,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,CAAC,GAClF,WAAW,CAkBb;AAED,4EAA4E;AAC5E,wBAAgB,YAAY,CAC1B,EAAE,EAAE,MAAM,EACV,KAAK,EAAE,OAAO,CAAC,WAAW,CAAC,GAC1B,WAAW,GAAG,SAAS,CAOzB;AAED,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAE7D;AAED,wBAAgB,WAAW,IAAI,WAAW,EAAE,CAE3C;AAED,wBAAgB,SAAS,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAI1D;AAED,wBAAgB,YAAY,IAAI,IAAI,CAQnC;AAMD,qEAAqE;AACrE,wBAAgB,YAAY,CAAC,MAAM,EAAE,WAAW,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAO1F;AAED;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,GAAG,IAAI,CAOjE;AAED,sEAAsE;AACtE,wBAAgB,eAAe,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAG3D;AAED,8EAA8E;AAC9E,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,CAQ1D;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,UAAU,CAuB5D"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Cross-record insights — findings computed purely from data the registry
3
+ * already holds (no extra instrumentation): duplicate simultaneous loads,
4
+ * retry storms, iOS image-queue saturation, missing alt text, and
5
+ * layout-shifting images.
6
+ */
7
+ import type { ImageInsights, ImageRecord } from "../types";
8
+ export declare function computeInsights(records: ImageRecord[]): ImageInsights;
9
+ /** Compact one-line chips for UI/MCP surfacing. Empty array = all clear. */
10
+ export declare function insightChips(insights: ImageInsights): string[];
11
+ //# sourceMappingURL=insights.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"insights.d.ts","sourceRoot":"","sources":["../../../src/store/insights.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAO3D,wBAAgB,eAAe,CAAC,OAAO,EAAE,WAAW,EAAE,GAAG,aAAa,CAiCrE;AAED,4EAA4E;AAC5E,wBAAgB,YAAY,CAAC,QAAQ,EAAE,aAAa,GAAG,MAAM,EAAE,CAe9D"}