@flamingo-stack/openframe-frontend-core 0.0.853 → 0.0.855

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 (214) hide show
  1. package/dist/build/export-map.json +1 -1
  2. package/dist/{case-study-card-WP5Z234Q.cjs → case-study-card-6VAMNHLU.cjs} +8 -8
  3. package/dist/{chunk-2W22LY3W.cjs → chunk-2JCA7BRK.cjs} +19 -19
  4. package/dist/{chunk-53QPG7SJ.cjs → chunk-2MCPK6AX.cjs} +28 -28
  5. package/dist/{chunk-QOW2GP3V.cjs → chunk-2P72KAG5.cjs} +23 -23
  6. package/dist/{chunk-NMWLXHFH.cjs → chunk-3GJ75OUL.cjs} +183 -183
  7. package/dist/{chunk-P63CRPWI.cjs → chunk-4H3J57AN.cjs} +25 -25
  8. package/dist/{chunk-6GWRPW6B.cjs → chunk-5NK3FUHY.cjs} +4 -4
  9. package/dist/{chunk-DLTPSP5F.cjs → chunk-5TYG5JNB.cjs} +2 -2
  10. package/dist/{chunk-EIACEY2L.cjs → chunk-65NMKAPQ.cjs} +12 -12
  11. package/dist/{chunk-IGVAPIEW.cjs → chunk-6C4OR4MZ.cjs} +2 -2
  12. package/dist/{chunk-GG466XFQ.cjs → chunk-6DMH4GXN.cjs} +30 -5
  13. package/dist/{chunk-EF2FZ7GT.cjs → chunk-6VVQJU76.cjs} +54 -54
  14. package/dist/{chunk-G7GF4PWA.cjs → chunk-77GX573I.cjs} +9 -9
  15. package/dist/{chunk-7RZHSBNX.cjs → chunk-AOOHJLXS.cjs} +90 -90
  16. package/dist/{chunk-O3EKOXFZ.cjs → chunk-AYMY2VNB.cjs} +37 -43
  17. package/dist/{chunk-67CZ2Q5K.cjs → chunk-BSPIGZCC.cjs} +36 -36
  18. package/dist/{chunk-FW7RKWPY.cjs → chunk-D6GEMVHD.cjs} +3 -3
  19. package/dist/{chunk-KEV6F3QN.cjs → chunk-DPNFI5XM.cjs} +100 -100
  20. package/dist/{chunk-6V2M2X3M.cjs → chunk-DTZ6KASI.cjs} +6 -6
  21. package/dist/{chunk-SSKMGH5O.cjs → chunk-DXVGGWLG.cjs} +10 -10
  22. package/dist/{chunk-IO6NN3SL.cjs → chunk-EOUEUYCQ.cjs} +54 -54
  23. package/dist/{chunk-5RMBLOJ5.cjs → chunk-ESGE7CUX.cjs} +14 -14
  24. package/dist/{chunk-ETZFBB7O.cjs → chunk-EXQSIX2I.cjs} +4 -4
  25. package/dist/{chunk-IC4IJJB2.cjs → chunk-F33EAPD2.cjs} +124 -124
  26. package/dist/{chunk-COWMXUHN.cjs → chunk-GK577ZLJ.cjs} +6 -14
  27. package/dist/{chunk-E4MFQKPC.cjs → chunk-GZYRDLJW.cjs} +103 -103
  28. package/dist/{chunk-LFEURIZN.cjs → chunk-HML3JUXF.cjs} +324 -322
  29. package/dist/{chunk-BNHTBLAG.cjs → chunk-J3CFRGZ2.cjs} +17 -17
  30. package/dist/{chunk-USPUZO53.cjs → chunk-KZAQPRTA.cjs} +9 -11
  31. package/dist/{chunk-HTYJUMFB.cjs → chunk-LSLRJJFP.cjs} +2 -2
  32. package/dist/{chunk-TBGQMHCG.cjs → chunk-MINFN3IG.cjs} +8 -8
  33. package/dist/{chunk-KHOB3TES.cjs → chunk-MX52LZ6M.cjs} +6 -6
  34. package/dist/{chunk-OH5TXFRR.cjs → chunk-O4CPT3RK.cjs} +7 -7
  35. package/dist/{chunk-HF3V6WBJ.cjs → chunk-OTHQ2KQW.cjs} +3 -3
  36. package/dist/{chunk-IUDBG3HJ.cjs → chunk-PCQ2HKU3.cjs} +5 -5
  37. package/dist/{chunk-BNG6JOGZ.cjs → chunk-QPHXYE5P.cjs} +27 -27
  38. package/dist/{chunk-UO2EJGRJ.cjs → chunk-QZXCUY36.cjs} +53 -53
  39. package/dist/{chunk-COJG2ATY.cjs → chunk-RIJU4HZ2.cjs} +51 -55
  40. package/dist/{chunk-KKFDRCQF.cjs → chunk-RY7INTYU.cjs} +14 -1
  41. package/dist/{chunk-GI3MMBP3.cjs → chunk-SQ7YHWEP.cjs} +228 -15
  42. package/dist/{chunk-U767P4JU.cjs → chunk-STV6VJ3U.cjs} +21 -21
  43. package/dist/chunk-T54I5ZZY.cjs +62 -0
  44. package/dist/{chunk-UV45EPXN.cjs → chunk-TW5Y4D5I.cjs} +7 -7
  45. package/dist/{chunk-FX35L4Y6.cjs → chunk-XCQ5I27Z.cjs} +3 -3
  46. package/dist/{chunk-AZEO7HBB.cjs → chunk-Y44EF4JW.cjs} +2 -2
  47. package/dist/{chunk-W7OFAROY.cjs → chunk-YSXVRTGT.cjs} +9 -12
  48. package/dist/{chunk-GI6ECCWB.cjs → chunk-ZUGJLCYP.cjs} +1272 -856
  49. package/dist/{chunk-KNN2GCMW.cjs → chunk-ZYAVIRQV.cjs} +25 -25
  50. package/dist/{cloud-tenants-QUL2XPAS.cjs → cloud-tenants-2XFIDDGU.cjs} +28 -29
  51. package/dist/components/case-studies/index.cjs +44 -45
  52. package/dist/components/chat/chat-message-row.d.ts +1 -1
  53. package/dist/components/chat/chat-message-row.d.ts.map +1 -1
  54. package/dist/components/chat/chat-message-row.js +4 -4
  55. package/dist/components/chat/entity-cards/use-cover-image-fallback.d.ts +7 -13
  56. package/dist/components/chat/entity-cards/use-cover-image-fallback.d.ts.map +1 -1
  57. package/dist/components/chat/entity-cards/use-cover-image-fallback.js +2 -8
  58. package/dist/components/chat/hooks/use-chat-attachment-image-gallery.d.ts.map +1 -1
  59. package/dist/components/chat/hooks/use-chat-attachment-image-gallery.js +8 -4
  60. package/dist/components/chat/index.cjs +22 -23
  61. package/dist/components/contact/index.cjs +29 -30
  62. package/dist/components/docs/index.cjs +32 -33
  63. package/dist/components/embeds/index.cjs +29 -30
  64. package/dist/components/faq/index.cjs +30 -31
  65. package/dist/components/features/cloud-tenants/index.d.ts +7 -5
  66. package/dist/components/features/cloud-tenants/index.d.ts.map +1 -1
  67. package/dist/components/features/cloud-tenants/index.js +8 -1
  68. package/dist/components/features/cloud-tenants/single-customer-tenants-table-view.d.ts +26 -0
  69. package/dist/components/features/cloud-tenants/single-customer-tenants-table-view.d.ts.map +1 -0
  70. package/dist/components/features/cloud-tenants/single-customer-tenants-table-view.js +176 -0
  71. package/dist/components/features/cloud-tenants/tenant-access-cell.d.ts +4 -2
  72. package/dist/components/features/cloud-tenants/tenant-access-cell.d.ts.map +1 -1
  73. package/dist/components/features/cloud-tenants/tenant-access-cell.js +3 -2
  74. package/dist/components/features/cloud-tenants/tenant-customer-cell.d.ts +12 -5
  75. package/dist/components/features/cloud-tenants/tenant-customer-cell.d.ts.map +1 -1
  76. package/dist/components/features/cloud-tenants/tenant-customer-cell.js +38 -7
  77. package/dist/components/features/cloud-tenants/tenant-licenses-cell.d.ts +7 -0
  78. package/dist/components/features/cloud-tenants/tenant-licenses-cell.d.ts.map +1 -0
  79. package/dist/components/features/cloud-tenants/tenant-licenses-cell.js +17 -0
  80. package/dist/components/features/cloud-tenants/tenant-presentation.d.ts +19 -0
  81. package/dist/components/features/cloud-tenants/tenant-presentation.d.ts.map +1 -1
  82. package/dist/components/features/cloud-tenants/tenant-presentation.js +24 -3
  83. package/dist/components/features/cloud-tenants/tenant-row.d.ts +35 -8
  84. package/dist/components/features/cloud-tenants/tenant-row.d.ts.map +1 -1
  85. package/dist/components/features/cloud-tenants/tenants-table-columns.d.ts +9 -3
  86. package/dist/components/features/cloud-tenants/tenants-table-columns.d.ts.map +1 -1
  87. package/dist/components/features/cloud-tenants/tenants-table-columns.js +5 -3
  88. package/dist/components/features/cloud-tenants/tenants-table-view.d.ts +27 -6
  89. package/dist/components/features/cloud-tenants/tenants-table-view.d.ts.map +1 -1
  90. package/dist/components/features/cloud-tenants/tenants-table-view.js +75 -17
  91. package/dist/components/features/devices/device-directory.d.ts +18 -0
  92. package/dist/components/features/devices/device-directory.d.ts.map +1 -0
  93. package/dist/components/features/devices/device-directory.js +35 -0
  94. package/dist/components/features/devices/devices-filter-toolbar.d.ts +3 -1
  95. package/dist/components/features/devices/devices-filter-toolbar.d.ts.map +1 -1
  96. package/dist/components/features/devices/devices-filter-toolbar.js +2 -1
  97. package/dist/components/features/devices/devices-panel-view.d.ts +3 -1
  98. package/dist/components/features/devices/devices-panel-view.d.ts.map +1 -1
  99. package/dist/components/features/devices/devices-panel-view.js +11 -2
  100. package/dist/components/features/devices/devices-table-columns.d.ts +17 -3
  101. package/dist/components/features/devices/devices-table-columns.d.ts.map +1 -1
  102. package/dist/components/features/devices/devices-table-columns.js +80 -10
  103. package/dist/components/features/devices/index.d.ts +1 -0
  104. package/dist/components/features/devices/index.d.ts.map +1 -1
  105. package/dist/components/features/devices/index.js +8 -0
  106. package/dist/components/features/devices/types.d.ts +14 -0
  107. package/dist/components/features/devices/types.d.ts.map +1 -1
  108. package/dist/components/features/devices/use-tag-filter-modal.d.ts +1 -0
  109. package/dist/components/features/devices/use-tag-filter-modal.d.ts.map +1 -1
  110. package/dist/components/features/devices/use-tag-filter-modal.js +13 -8
  111. package/dist/components/features/index.cjs +42 -29
  112. package/dist/components/help-center-pages/index.cjs +134 -135
  113. package/dist/components/index.cjs +126 -113
  114. package/dist/components/meeting-scheduler/index.cjs +102 -103
  115. package/dist/components/navigation/app-layout.js +2 -2
  116. package/dist/components/navigation/index.cjs +31 -32
  117. package/dist/components/onboarding-guides/index.cjs +31 -32
  118. package/dist/components/product-demo/index.cjs +39 -40
  119. package/dist/components/related-content/index.cjs +16 -17
  120. package/dist/components/tickets/index.cjs +35 -36
  121. package/dist/components/ui/date-picker.d.ts +2 -0
  122. package/dist/components/ui/date-picker.d.ts.map +1 -1
  123. package/dist/components/ui/date-picker.js +19 -6
  124. package/dist/components/ui/entity-image.d.ts +1 -2
  125. package/dist/components/ui/entity-image.d.ts.map +1 -1
  126. package/dist/components/ui/entity-image.js +4 -8
  127. package/dist/components/ui/index.cjs +28 -29
  128. package/dist/components/ui/markdown/base-components.d.ts +0 -13
  129. package/dist/components/ui/markdown/base-components.d.ts.map +1 -1
  130. package/dist/components/ui/markdown/base-components.js +7 -7
  131. package/dist/components/ui/square-avatar.d.ts.map +1 -1
  132. package/dist/components/ui/square-avatar.js +3 -8
  133. package/dist/{devices-LNB4CYPP.cjs → devices-O3DYGIZB.cjs} +29 -30
  134. package/dist/embed-shims/index.cjs +3 -2
  135. package/dist/embed-shims/next-image.cjs +3 -2
  136. package/dist/embed-shims/next-image.d.ts +2 -0
  137. package/dist/embed-shims/next-image.d.ts.map +1 -1
  138. package/dist/embed-shims/next-image.js +14 -4
  139. package/dist/{embeddable-chat-SJEEJI4N.cjs → embeddable-chat-QD7NFD2H.cjs} +100 -101
  140. package/dist/hooks/index.cjs +27 -16
  141. package/dist/hooks/index.d.ts +1 -0
  142. package/dist/hooks/index.d.ts.map +1 -1
  143. package/dist/hooks/index.js +1 -0
  144. package/dist/hooks/ui/use-content-breakpoint.d.ts +8 -0
  145. package/dist/hooks/ui/use-content-breakpoint.d.ts.map +1 -1
  146. package/dist/hooks/ui/use-content-breakpoint.js +17 -3
  147. package/dist/hooks/ui/use-media-query.d.ts +1 -0
  148. package/dist/hooks/ui/use-media-query.d.ts.map +1 -1
  149. package/dist/hooks/ui/use-media-query.js +3 -1
  150. package/dist/hooks/use-authed-asset-src.d.ts +77 -2
  151. package/dist/hooks/use-authed-asset-src.d.ts.map +1 -1
  152. package/dist/hooks/use-authed-asset-src.js +185 -73
  153. package/dist/hooks/use-authed-image-src.d.ts +11 -4
  154. package/dist/hooks/use-authed-image-src.d.ts.map +1 -1
  155. package/dist/hooks/use-authed-image-src.js +6 -2
  156. package/dist/hooks/use-image-fallback.d.ts +16 -0
  157. package/dist/hooks/use-image-fallback.d.ts.map +1 -0
  158. package/dist/hooks/use-image-fallback.js +14 -0
  159. package/dist/index.cjs +58 -36
  160. package/dist/{knowledge-UTWKB6XG.cjs → knowledge-K7AFNZNO.cjs} +29 -30
  161. package/dist/{logs-PMXIWMBQ.cjs → logs-MZ3BR2FR.cjs} +35 -36
  162. package/dist/{policies-6DCMFDL7.cjs → policies-XVKQ2W7S.cjs} +32 -33
  163. package/dist/{remote-session-SG44CNOK.cjs → remote-session-VOZJXDM4.cjs} +13 -14
  164. package/dist/{scripts-2G7LXW7Z.cjs → scripts-IBPMBS6G.cjs} +35 -36
  165. package/dist/{software-update-MYLKHDHC.cjs → software-update-PXTANMAO.cjs} +32 -33
  166. package/dist/{tickets-board-SQY2Y6QV.cjs → tickets-board-POYZS7BW.cjs} +16 -17
  167. package/dist/utils/app-origins.d.ts +3 -6
  168. package/dist/utils/app-origins.d.ts.map +1 -1
  169. package/dist/utils/app-origins.js +8 -1
  170. package/dist/utils/embed-authed-fetch.d.ts +46 -26
  171. package/dist/utils/embed-authed-fetch.d.ts.map +1 -1
  172. package/dist/utils/embed-authed-fetch.js +24 -8
  173. package/dist/utils/index.cjs +4 -1
  174. package/dist/utils/presentation-for.d.ts +6 -0
  175. package/dist/utils/presentation-for.d.ts.map +1 -0
  176. package/dist/utils/presentation-for.js +7 -0
  177. package/dist/{video-file-player-XMOB234V.cjs → video-file-player-RIOT24NT.cjs} +3 -4
  178. package/package.json +1 -1
  179. package/src/components/chat/chat-message-row.tsx +8 -7
  180. package/src/components/chat/entity-cards/use-cover-image-fallback.ts +8 -28
  181. package/src/components/chat/hooks/use-chat-attachment-image-gallery.tsx +19 -8
  182. package/src/components/features/cloud-tenants/index.ts +8 -3
  183. package/src/components/features/cloud-tenants/single-customer-tenants-table-view.tsx +234 -0
  184. package/src/components/features/cloud-tenants/tenant-access-cell.tsx +12 -5
  185. package/src/components/features/cloud-tenants/tenant-customer-cell.tsx +48 -12
  186. package/src/components/features/cloud-tenants/tenant-licenses-cell.tsx +28 -0
  187. package/src/components/features/cloud-tenants/tenant-presentation.ts +46 -4
  188. package/src/components/features/cloud-tenants/tenant-row.ts +38 -8
  189. package/src/components/features/cloud-tenants/tenants-table-columns.ts +8 -5
  190. package/src/components/features/cloud-tenants/tenants-table-view.tsx +123 -28
  191. package/src/components/features/devices/device-directory.ts +55 -0
  192. package/src/components/features/devices/devices-filter-toolbar.tsx +4 -1
  193. package/src/components/features/devices/devices-panel-view.tsx +12 -2
  194. package/src/components/features/devices/devices-table-columns.tsx +123 -8
  195. package/src/components/features/devices/index.ts +7 -0
  196. package/src/components/features/devices/types.ts +14 -0
  197. package/src/components/features/devices/use-tag-filter-modal.ts +32 -14
  198. package/src/components/navigation/app-layout.tsx +4 -4
  199. package/src/components/ui/date-picker.tsx +21 -3
  200. package/src/components/ui/entity-image.tsx +4 -12
  201. package/src/components/ui/markdown/base-components.tsx +15 -20
  202. package/src/components/ui/square-avatar.tsx +5 -8
  203. package/src/embed-shims/next-image.tsx +34 -3
  204. package/src/hooks/index.ts +1 -0
  205. package/src/hooks/ui/use-content-breakpoint.ts +21 -2
  206. package/src/hooks/ui/use-media-query.ts +1 -0
  207. package/src/hooks/use-authed-asset-src.ts +323 -107
  208. package/src/hooks/use-authed-image-src.ts +15 -5
  209. package/src/hooks/use-image-fallback.ts +31 -0
  210. package/src/utils/app-origins.ts +12 -7
  211. package/src/utils/embed-authed-fetch.ts +71 -32
  212. package/src/utils/presentation-for.ts +10 -0
  213. package/dist/chunk-UAI4VMEF.cjs +0 -46
  214. package/dist/chunk-YSDB6HGQ.cjs +0 -102
@@ -1,14 +1,21 @@
1
- import { clearAuthedAssetCache } from './use-authed-asset-src';
1
+ import { type AuthedAsset, clearAuthedAssetCache } from './use-authed-asset-src';
2
2
  /**
3
- * Image flavor of `useAuthedAssetSrc` — see that hook for the full contract.
4
- * Kept as its own export because it is the lib's most-used consumer (avatars,
5
- * entity images, markdown `<img>`) and because hosts already import this name.
3
+ * Image flavor of `useAuthedAsset` — see that hook for the full contract. The
4
+ * one place a picture's `Accept` is stated: a store entry keeps the `Accept` of
5
+ * whichever consumer acquired it first, so the boxed `Image` and every picture
6
+ * component around it must ask the same.
6
7
  *
7
8
  * Distinct from the legacy `useAuthenticatedImage`, which ALWAYS blob-fetches
8
9
  * with `credentials: 'include'` and its own global config. This hook is
9
10
  * pass-through-first and keys off the single auth knob the lib already has:
10
11
  * the registered `EmbedAuthAdapter`.
11
12
  */
13
+ export declare function useAuthedImage(src?: string | null): AuthedAsset;
14
+ /**
15
+ * `useAuthedImage`'s `src`. Kept as its own export because it is the lib's
16
+ * most-used consumer (avatars, entity images, markdown `<img>`) and because
17
+ * hosts already import this name.
18
+ */
12
19
  export declare function useAuthedImageSrc(src?: string | null): string | undefined;
13
20
  /**
14
21
  * Session-end cache drop. Now an alias of `clearAuthedAssetCache` — one cache
@@ -1 +1 @@
1
- {"version":3,"file":"use-authed-image-src.d.ts","sourceRoot":"","sources":["../../src/hooks/use-authed-image-src.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,qBAAqB,EAAqB,MAAM,wBAAwB,CAAC;AAElF;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAEzE;AAED;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,8BAAwB,CAAC"}
1
+ {"version":3,"file":"use-authed-image-src.d.ts","sourceRoot":"","sources":["../../src/hooks/use-authed-image-src.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,WAAW,EAAE,qBAAqB,EAAkB,MAAM,wBAAwB,CAAC;AAEjG;;;;;;;;;;GAUG;AACH,wBAAgB,cAAc,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,WAAW,CAE/D;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,SAAS,CAEzE;AAED;;;;GAIG;AACH,eAAO,MAAM,qBAAqB,8BAAwB,CAAC"}
@@ -1,10 +1,14 @@
1
1
  "use client";
2
- import { clearAuthedAssetCache, useAuthedAssetSrc } from "./use-authed-asset-src.js";
2
+ import { clearAuthedAssetCache, useAuthedAsset } from "./use-authed-asset-src.js";
3
+ function useAuthedImage(src) {
4
+ return useAuthedAsset(src, "image/*");
5
+ }
3
6
  function useAuthedImageSrc(src) {
4
- return useAuthedAssetSrc(src, "image/*");
7
+ return useAuthedImage(src).src;
5
8
  }
6
9
  const clearAuthedImageCache = clearAuthedAssetCache;
7
10
  export {
8
11
  clearAuthedImageCache,
12
+ useAuthedImage,
9
13
  useAuthedImageSrc
10
14
  };
@@ -0,0 +1,16 @@
1
+ export interface ImageFallback {
2
+ /** The first candidate that has not failed, else null: draw your own fallback (initials, a placeholder, nothing). */
3
+ src: string | null;
4
+ /** Wire to the picture's `onError`. */
5
+ onError: () => void;
6
+ }
7
+ /**
8
+ * A picture's fallback chain, keyed by URL: how a component falls back from a picture that did not load
9
+ * (`SquareAvatar`, `EntityImage`, `ChatMessageRow`, the entity cards' covers). State is the SET of URLs that failed
10
+ * and `src` is derived, so a new URL is simply not one of them: the picture comes back with no reset effect, and a
11
+ * URL that failed once is not retried in a loop. Never hide the element or reveal a fallback by writing to the DOM
12
+ * in `onError` instead (the legacy `hideOnError`): React does not undo the write, so the fallback outlives the URL
13
+ * it was about.
14
+ */
15
+ export declare function useImageFallback(...candidates: (string | null | undefined)[]): ImageFallback;
16
+ //# sourceMappingURL=use-image-fallback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-image-fallback.d.ts","sourceRoot":"","sources":["../../src/hooks/use-image-fallback.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,aAAa;IAC5B,qHAAqH;IACrH,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,uCAAuC;IACvC,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,UAAU,EAAE,CAAC,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC,EAAE,GAAG,aAAa,CAW5F"}
@@ -0,0 +1,14 @@
1
+ "use client";
2
+ import { useCallback, useState } from "react";
3
+ function useImageFallback(...candidates) {
4
+ const [failed, setFailed] = useState(() => /* @__PURE__ */ new Set());
5
+ const src = candidates.find((candidate) => !!candidate && !failed.has(candidate)) ?? null;
6
+ const onError = useCallback(() => {
7
+ if (!src) return;
8
+ setFailed((prev) => new Set(prev).add(src));
9
+ }, [src]);
10
+ return { src, onError };
11
+ }
12
+ export {
13
+ useImageFallback
14
+ };