@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
@@ -15,24 +15,24 @@ var _chunkFDZOE5TLcjs = require('./chunk-FDZOE5TL.cjs');
15
15
 
16
16
 
17
17
 
18
- var _chunkGI6ECCWBcjs = require('./chunk-GI6ECCWB.cjs');
19
- require('./chunk-USPUZO53.cjs');
18
+ var _chunkZUGJLCYPcjs = require('./chunk-ZUGJLCYP.cjs');
19
+ require('./chunk-KZAQPRTA.cjs');
20
20
 
21
21
 
22
- var _chunkCOJG2ATYcjs = require('./chunk-COJG2ATY.cjs');
23
- require('./chunk-P63CRPWI.cjs');
22
+ var _chunkRIJU4HZ2cjs = require('./chunk-RIJU4HZ2.cjs');
23
+ require('./chunk-4H3J57AN.cjs');
24
24
  require('./chunk-HQQE74RO.cjs');
25
25
  require('./chunk-DEY6XXGO.cjs');
26
- require('./chunk-UO2EJGRJ.cjs');
26
+ require('./chunk-QZXCUY36.cjs');
27
27
  require('./chunk-24I6RFVU.cjs');
28
- require('./chunk-IUDBG3HJ.cjs');
28
+ require('./chunk-PCQ2HKU3.cjs');
29
29
  require('./chunk-MZ4KBSH7.cjs');
30
30
  require('./chunk-ZZDFMUEU.cjs');
31
- require('./chunk-IC4IJJB2.cjs');
32
- require('./chunk-LFEURIZN.cjs');
31
+ require('./chunk-F33EAPD2.cjs');
32
+ require('./chunk-HML3JUXF.cjs');
33
33
  require('./chunk-OT6P57ZS.cjs');
34
- require('./chunk-EIACEY2L.cjs');
35
- require('./chunk-U767P4JU.cjs');
34
+ require('./chunk-65NMKAPQ.cjs');
35
+ require('./chunk-STV6VJ3U.cjs');
36
36
  require('./chunk-KXFIYO4O.cjs');
37
37
  require('./chunk-PGAMWM6C.cjs');
38
38
  require('./chunk-7HH4Y27U.cjs');
@@ -1825,22 +1825,22 @@ require('./chunk-LMBYZITR.cjs');
1825
1825
  require('./chunk-TMVC7S2R.cjs');
1826
1826
  require('./chunk-IYHH5EIO.cjs');
1827
1827
  require('./chunk-XIBCMGBW.cjs');
1828
- require('./chunk-OH5TXFRR.cjs');
1829
- require('./chunk-G7GF4PWA.cjs');
1830
- require('./chunk-FW7RKWPY.cjs');
1831
- require('./chunk-IGVAPIEW.cjs');
1828
+ require('./chunk-O4CPT3RK.cjs');
1829
+ require('./chunk-77GX573I.cjs');
1830
+ require('./chunk-D6GEMVHD.cjs');
1831
+ require('./chunk-6C4OR4MZ.cjs');
1832
1832
  require('./chunk-JKX2C3I2.cjs');
1833
1833
  require('./chunk-WWUSFOJ7.cjs');
1834
1834
  require('./chunk-SKI6NKOE.cjs');
1835
1835
  require('./chunk-EWPR7662.cjs');
1836
1836
  require('./chunk-IX2E3AN7.cjs');
1837
1837
  require('./chunk-7DNL734S.cjs');
1838
- require('./chunk-2W22LY3W.cjs');
1839
- require('./chunk-NMWLXHFH.cjs');
1840
- require('./chunk-HTYJUMFB.cjs');
1841
- require('./chunk-W7OFAROY.cjs');
1842
- require('./chunk-O3EKOXFZ.cjs');
1843
- require('./chunk-SSKMGH5O.cjs');
1838
+ require('./chunk-2JCA7BRK.cjs');
1839
+ require('./chunk-3GJ75OUL.cjs');
1840
+ require('./chunk-LSLRJJFP.cjs');
1841
+ require('./chunk-YSXVRTGT.cjs');
1842
+ require('./chunk-AYMY2VNB.cjs');
1843
+ require('./chunk-DXVGGWLG.cjs');
1844
1844
  require('./chunk-X432Y6RM.cjs');
1845
1845
  require('./chunk-S5C3OZCO.cjs');
1846
1846
  require('./chunk-32ASZMTV.cjs');
@@ -1850,15 +1850,14 @@ require('./chunk-6VOOPMP5.cjs');
1850
1850
  require('./chunk-ORO54HDF.cjs');
1851
1851
  require('./chunk-RUHKTWGB.cjs');
1852
1852
  require('./chunk-BLH2SFOO.cjs');
1853
- require('./chunk-UAI4VMEF.cjs');
1854
- require('./chunk-COWMXUHN.cjs');
1855
- require('./chunk-YSDB6HGQ.cjs');
1856
- require('./chunk-ETZFBB7O.cjs');
1857
- require('./chunk-FX35L4Y6.cjs');
1858
- require('./chunk-KKFDRCQF.cjs');
1853
+ require('./chunk-T54I5ZZY.cjs');
1854
+ require('./chunk-GK577ZLJ.cjs');
1855
+ require('./chunk-EXQSIX2I.cjs');
1856
+ require('./chunk-XCQ5I27Z.cjs');
1857
+ require('./chunk-RY7INTYU.cjs');
1859
1858
  require('./chunk-NTPX5GXI.cjs');
1860
- require('./chunk-GI3MMBP3.cjs');
1861
- require('./chunk-GG466XFQ.cjs');
1859
+ require('./chunk-6DMH4GXN.cjs');
1860
+ require('./chunk-SQ7YHWEP.cjs');
1862
1861
  require('./chunk-UJ7AXHRZ.cjs');
1863
1862
  require('./chunk-HXURNKXI.cjs');
1864
1863
  require('./chunk-VCFQHPOO.cjs');
@@ -1923,14 +1922,14 @@ var noop = () => {
1923
1922
  var HIDDEN_WHEN_COMPACT = ["organization"];
1924
1923
  function StaticPackageField({ value }) {
1925
1924
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1926
- _chunkCOJG2ATYcjs.Autocomplete,
1925
+ _chunkRIJU4HZ2cjs.Autocomplete,
1927
1926
  {
1928
- label: _chunkGI6ECCWBcjs.PACKAGE_SEARCH_LABEL,
1927
+ label: _chunkZUGJLCYPcjs.PACKAGE_SEARCH_LABEL,
1929
1928
  labelVariant: "large",
1930
1929
  options: value ? [{ value: value.id, label: value.name, description: _nullishCoalesce(value.description, () => ( void 0)) }] : [],
1931
1930
  value: _nullishCoalesce(_optionalChain([value, 'optionalAccess', _ => _.id]), () => ( null)),
1932
1931
  onChange: noop,
1933
- placeholder: _chunkGI6ECCWBcjs.PACKAGE_SEARCH_PLACEHOLDER
1932
+ placeholder: _chunkZUGJLCYPcjs.PACKAGE_SEARCH_PLACEHOLDER
1934
1933
  }
1935
1934
  );
1936
1935
  }
@@ -1944,7 +1943,7 @@ function SoftwareUpdateScreen({ compact = false }) {
1944
1943
  [fixture.devices, fixture.selectedIds]
1945
1944
  );
1946
1945
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-full bg-ods-bg pt-[var(--spacing-system-l)]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-full", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1947
- _chunkGI6ECCWBcjs.SoftwareActionForm,
1946
+ _chunkZUGJLCYPcjs.SoftwareActionForm,
1948
1947
  {
1949
1948
  action: fixture.action,
1950
1949
  showHeader: false,
@@ -1956,7 +1955,7 @@ function SoftwareUpdateScreen({ compact = false }) {
1956
1955
  initialValues: fixture.initialValues,
1957
1956
  renderPackageSearch,
1958
1957
  renderDevicePicker: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1959
- _chunkGI6ECCWBcjs.DeviceSelector,
1958
+ _chunkZUGJLCYPcjs.DeviceSelector,
1960
1959
  {
1961
1960
  devices: selected,
1962
1961
  loading: false,
@@ -10,9 +10,9 @@ var _chunkFDZOE5TLcjs = require('./chunk-FDZOE5TL.cjs');
10
10
 
11
11
 
12
12
 
13
- var _chunkP63CRPWIcjs = require('./chunk-P63CRPWI.cjs');
14
- require('./chunk-IUDBG3HJ.cjs');
15
- require('./chunk-U767P4JU.cjs');
13
+ var _chunk4H3J57ANcjs = require('./chunk-4H3J57AN.cjs');
14
+ require('./chunk-PCQ2HKU3.cjs');
15
+ require('./chunk-STV6VJ3U.cjs');
16
16
  require('./chunk-KXFIYO4O.cjs');
17
17
  require('./chunk-7HH4Y27U.cjs');
18
18
  require('./chunk-QKCF77NZ.cjs');
@@ -1804,11 +1804,11 @@ require('./chunk-LMBYZITR.cjs');
1804
1804
  require('./chunk-TMVC7S2R.cjs');
1805
1805
  require('./chunk-IYHH5EIO.cjs');
1806
1806
  require('./chunk-XIBCMGBW.cjs');
1807
- require('./chunk-IGVAPIEW.cjs');
1807
+ require('./chunk-6C4OR4MZ.cjs');
1808
1808
  require('./chunk-WWUSFOJ7.cjs');
1809
1809
  require('./chunk-SKI6NKOE.cjs');
1810
- require('./chunk-W7OFAROY.cjs');
1811
- require('./chunk-SSKMGH5O.cjs');
1810
+ require('./chunk-YSXVRTGT.cjs');
1811
+ require('./chunk-DXVGGWLG.cjs');
1812
1812
  require('./chunk-S5C3OZCO.cjs');
1813
1813
  require('./chunk-32ASZMTV.cjs');
1814
1814
  require('./chunk-OOYBIS7D.cjs');
@@ -1816,12 +1816,11 @@ require('./chunk-4IYNDV3G.cjs');
1816
1816
  require('./chunk-6VOOPMP5.cjs');
1817
1817
  require('./chunk-ORO54HDF.cjs');
1818
1818
  require('./chunk-RUHKTWGB.cjs');
1819
- require('./chunk-COWMXUHN.cjs');
1820
- require('./chunk-YSDB6HGQ.cjs');
1821
- require('./chunk-FX35L4Y6.cjs');
1822
- require('./chunk-KKFDRCQF.cjs');
1823
- require('./chunk-GI3MMBP3.cjs');
1824
- require('./chunk-GG466XFQ.cjs');
1819
+ require('./chunk-GK577ZLJ.cjs');
1820
+ require('./chunk-XCQ5I27Z.cjs');
1821
+ require('./chunk-RY7INTYU.cjs');
1822
+ require('./chunk-6DMH4GXN.cjs');
1823
+ require('./chunk-SQ7YHWEP.cjs');
1825
1824
  require('./chunk-VCFQHPOO.cjs');
1826
1825
  require('./chunk-Z74QE57T.cjs');
1827
1826
  require('./chunk-XZJCBIYR.cjs');
@@ -1842,7 +1841,7 @@ function buildTicketsBoardFixture(cast) {
1842
1841
  const dana = assignee(cast.person("dana"));
1843
1842
  const alex = assignee(cast.person("alex"));
1844
1843
  return [
1845
- _chunkP63CRPWIcjs.columnFromTicketStatus.call(void 0, "ACTIVE", [
1844
+ _chunk4H3J57ANcjs.columnFromTicketStatus.call(void 0, "ACTIVE", [
1846
1845
  ticket("tk-1051", "Printer offline at the front desk", "ACTIVE", {
1847
1846
  ticketNumber: "1051",
1848
1847
  agent: "fae",
@@ -1860,7 +1859,7 @@ function buildTicketsBoardFixture(cast) {
1860
1859
  tags: ["onboarding"]
1861
1860
  })
1862
1861
  ]),
1863
- _chunkP63CRPWIcjs.columnFromTicketStatus.call(void 0, "TECH_REQUIRED", [
1862
+ _chunk4H3J57ANcjs.columnFromTicketStatus.call(void 0, "TECH_REQUIRED", [
1864
1863
  ticket("tk-1049", "Acrobat Pro for Maya", "TECH_REQUIRED", {
1865
1864
  ticketNumber: "1049",
1866
1865
  agent: "fae",
@@ -1884,7 +1883,7 @@ function buildTicketsBoardFixture(cast) {
1884
1883
  escalatedByUser: true
1885
1884
  })
1886
1885
  ]),
1887
- _chunkP63CRPWIcjs.columnFromTicketStatus.call(void 0, "ON_HOLD", [
1886
+ _chunk4H3J57ANcjs.columnFromTicketStatus.call(void 0, "ON_HOLD", [
1888
1887
  ticket("tk-1046", "Replace the conference room display", "ON_HOLD", {
1889
1888
  ticketNumber: "1046",
1890
1889
  organizationName: _chunkFDZOE5TLcjs.DEMO_ORGANIZATIONS.acme.name,
@@ -1893,7 +1892,7 @@ function buildTicketsBoardFixture(cast) {
1893
1892
  activity: { kind: "waiting-external" }
1894
1893
  })
1895
1894
  ]),
1896
- _chunkP63CRPWIcjs.columnFromTicketStatus.call(void 0,
1895
+ _chunk4H3J57ANcjs.columnFromTicketStatus.call(void 0,
1897
1896
  "RESOLVED",
1898
1897
  [
1899
1898
  ticket("tk-1048", "Slow laptop", "RESOLVED", {
@@ -1929,7 +1928,7 @@ function TicketsBoardScreen({ compact = false }) {
1929
1928
  const cast = _chunkLHV2R6QUcjs.useProductDemoCast.call(void 0, );
1930
1929
  const board = _react.useMemo.call(void 0, () => buildTicketsBoardFixture(cast), [cast]);
1931
1930
  const columns = compact ? board.filter((column) => column.id !== "ON_HOLD") : board;
1932
- return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-full bg-ods-bg p-[var(--spacing-system-m)]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkP63CRPWIcjs.Board, { columns, onChange: noop, initialCollapsed: compact ? void 0 : FOLDED }) });
1931
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "h-full bg-ods-bg p-[var(--spacing-system-m)]", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunk4H3J57ANcjs.Board, { columns, onChange: noop, initialCollapsed: compact ? void 0 : FOLDED }) });
1933
1932
  }
1934
1933
 
1935
1934
 
@@ -18,12 +18,9 @@ export declare const SERVER_APP_ORIGINS: AppOrigins;
18
18
  export declare function readAppOrigins(): AppOrigins;
19
19
  /** Called when a host registers, replaces or clears its auth adapter, which can change `allowedOrigins`. */
20
20
  export declare const subscribeAppOrigins: (listener: () => void) => () => void;
21
- /**
22
- * `url` resolved against the page when it belongs to the app, otherwise `null`.
23
- *
24
- * The page match compares scheme and host instead of `URL.origin`, which is
25
- * `"null"` for a `capacitor://` page.
26
- */
21
+ /** Whether `target` is on the page's own origin rather than on an origin the host sanctioned. */
22
+ export declare function isPageOriginUrl(target: URL, origins?: AppOrigins): boolean;
23
+ /** `url` resolved against the page when it belongs to the app, otherwise `null`. */
27
24
  export declare function resolveAppOriginUrl(url: string, origins?: AppOrigins): URL | null;
28
25
  /**
29
26
  * Whether `url` loads from the app itself rather than from a third party.
@@ -1 +1 @@
1
- {"version":3,"file":"app-origins.d.ts","sourceRoot":"","sources":["../../src/utils/app-origins.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,qHAAqH;IACrH,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;CAC5C;AAED,6GAA6G;AAC7G,eAAO,MAAM,kBAAkB,EAAE,UAAgF,CAAC;AAOlH;;;GAGG;AACH,wBAAgB,cAAc,IAAI,UAAU,CAqB3C;AAED,4GAA4G;AAC5G,eAAO,MAAM,mBAAmB,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAiC,CAAC;AAEpG;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,UAA6B,GAAG,GAAG,GAAG,IAAI,CAYnG;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,CAEzE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,UAA6B,GAAG,MAAM,GAAG,IAAI,CAOlG"}
1
+ {"version":3,"file":"app-origins.d.ts","sourceRoot":"","sources":["../../src/utils/app-origins.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,WAAW,UAAU;IACzB,qHAAqH;IACrH,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,cAAc,EAAE,SAAS,MAAM,EAAE,CAAC;CAC5C;AAED,6GAA6G;AAC7G,eAAO,MAAM,kBAAkB,EAAE,UAAgF,CAAC;AAOlH;;;GAGG;AACH,wBAAgB,cAAc,IAAI,UAAU,CAqB3C;AAED,4GAA4G;AAC5G,eAAO,MAAM,mBAAmB,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAiC,CAAC;AAOpG,iGAAiG;AACjG,wBAAgB,eAAe,CAAC,MAAM,EAAE,GAAG,EAAE,OAAO,GAAE,UAA6B,GAAG,OAAO,CAE5F;AAED,oFAAoF;AACpF,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,UAA6B,GAAG,GAAG,GAAG,IAAI,CAYnG;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,UAAU,GAAG,OAAO,CAEzE;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,UAA6B,GAAG,MAAM,GAAG,IAAI,CAOlG"}
@@ -17,6 +17,12 @@ function readAppOrigins() {
17
17
  return snapshot;
18
18
  }
19
19
  const subscribeAppOrigins = subscribeRegisteredAdapter;
20
+ function isOnPage(target, page) {
21
+ return target.protocol === page.protocol && target.host === page.host;
22
+ }
23
+ function isPageOriginUrl(target, origins = readAppOrigins()) {
24
+ return isOnPage(target, new URL(origins.pageUrl ?? SERVER_PAGE_URL));
25
+ }
20
26
  function resolveAppOriginUrl(url, origins = readAppOrigins()) {
21
27
  let page;
22
28
  let target;
@@ -26,7 +32,7 @@ function resolveAppOriginUrl(url, origins = readAppOrigins()) {
26
32
  } catch {
27
33
  return null;
28
34
  }
29
- if (target.protocol === page.protocol && target.host === page.host) return target;
35
+ if (isOnPage(target, page)) return target;
30
36
  if (target.protocol !== "http:" && target.protocol !== "https:") return null;
31
37
  return origins.allowedOrigins.includes(target.origin) ? target : null;
32
38
  }
@@ -45,6 +51,7 @@ export {
45
51
  SERVER_APP_ORIGINS,
46
52
  absoluteHttpUrl,
47
53
  isAppOriginUrl,
54
+ isPageOriginUrl,
48
55
  readAppOrigins,
49
56
  resolveAppOriginUrl,
50
57
  subscribeAppOrigins
@@ -99,6 +99,27 @@ export interface EmbedAuthAdapter {
99
99
  * remains the rule, this is the narrow exception.
100
100
  */
101
101
  allowedOrigins?: string[];
102
+ /**
103
+ * Optional: where a picture or other asset URL found in the host's data actually lives. Every asset the lib
104
+ * loads natively (the boxed `Image`, and everything drawn through `useAuthedAsset`) passes its URL through
105
+ * this first. A backend path that the page's origin does not serve, such as `/images/user/1` stored on a
106
+ * record but served at `{gateway}/api/images/user/1`, then loads from the gateway on every host, including a
107
+ * native shell, whose page origin has no server behind it.
108
+ *
109
+ * Must be idempotent. It must return absolute URLs and `data:` / `blob:` URLs unchanged, and leave the host's
110
+ * own static assets alone. Omit it when every URL in the host's data is already loadable as it stands. A host
111
+ * that registers `next/image` with its optimizer on must allow the hosts this returns in its image config.
112
+ */
113
+ resolveAssetUrl?: (url: string) => string;
114
+ /**
115
+ * Optional, side-effect-free: whether `getHeaders()` would carry an `Authorization` header now. Declaring it also
116
+ * says the host authenticates by header: a picture on an origin in `allowedOrigins` then waits for the credential
117
+ * (`assetLoadMode`'s `awaiting-credential`) instead of loading natively into a 401. The lib asks it for every
118
+ * mounted picture and right after every credential change, so a host whose `getHeaders` has per-call side effects
119
+ * needs it to keep classifying from counting as sending.
120
+ * Without it the lib reads `getHeaders()` and never waits.
121
+ */
122
+ hasCredential?: () => boolean;
102
123
  /**
103
124
  * Optional: call `listener` whenever `getHeaders()` starts returning a NEW
104
125
  * credential (a rotation the host ran on its own — e.g. a native shell's
@@ -137,34 +158,28 @@ export declare function hasEmbedAuthAdapter(): boolean;
137
158
  */
138
159
  export declare function subscribeEmbedCredentialChange(listener: () => void): () => void;
139
160
  /**
140
- * Whether `url` is an asset the browser CANNOT load natively because its
141
- * auth rides in request headers.
161
+ * How the browser has to load an asset URL on this host. Native asset loads (`<img src>`, `<track src>`, CSS
162
+ * `background-image`) can't carry custom headers, so where the host authenticates by HEADER (its adapter has a
163
+ * credential: `hasCredential`, else an `Authorization` from `getHeaders`) nothing the browser fetches on its own is
164
+ * authenticated:
142
165
  *
143
- * Native asset loads (`<img src>`, `<track src>`, CSS `background-image`)
144
- * can't carry custom headers, so a URL this returns `true` for must go
145
- * through `embedAuthedFetch` → blob object-URL instead (see
146
- * `useAuthedAssetSrc` / `useAuthedImageSrc`).
147
- *
148
- * The single signal is the registered adapter: when it supplies an
149
- * `Authorization` header, the host authenticates by HEADER, so nothing the
150
- * browser fetches on its own is authenticated. That holds for BOTH shapes a
151
- * header-auth host takes:
152
- *
153
- * - a cross-origin gateway URL — sanctioned via `allowedOrigins` (native
154
- * shells, whose page origin is `capacitor://` / `tauri://`);
155
- * - a same-origin / relative reverse-proxy path (`/content/api/...`) —
156
- * dev-ticket web, where the token lives in localStorage and there is NO
157
- * session cookie to fall back on. This case used to be excluded on the
158
- * assumption that same-origin implies "cookies work"; true for a cookie
159
- * session, false for every header-auth host, which is exactly when this
160
- * predicate is consulted at all.
161
- *
162
- * Everything else loads natively, unchanged: cookie-auth web (the adapter
163
- * supplies no `Authorization`), no adapter at all (the hub), and third-party
164
- * origins the bearer does NOT belong to (public images) — those stay out of
165
- * reach of the token by the same origin rules `embedAuthedFetch` enforces.
166
+ * - `native`: hand it to the element as it stands. Cookie-auth web (no credential), no adapter at all (the hub), a
167
+ * third-party origin the bearer does NOT belong to (public images: out of the token's reach by the same origin
168
+ * rules `embedAuthedFetch` enforces), or a non-http(s) URL (`data:`, `blob:`, a native shell's own bundle).
169
+ * - `bearer`: fetch it with the adapter's credential (`embedAuthedFetch`) and draw the blob. That covers both shapes
170
+ * a header-auth host takes: a cross-origin gateway sanctioned in `allowedOrigins` (native shells, whose page
171
+ * origin is `capacitor://` / `tauri://`), and a same-origin or relative reverse-proxy path (`/content/api/...`)
172
+ * on dev-ticket web, where the token lives in localStorage and there is NO session cookie to fall back on.
173
+ * - `awaiting-credential`: it lives on a gateway the host sanctioned in `allowedOrigins`, which only the bearer
174
+ * opens, and the host, which declared header auth (`hasCredential`), has no credential yet. A native shell
175
+ * renders before its tokens arrive: a native load at that moment is a guaranteed 401, so the caller waits for
176
+ * `subscribeEmbedCredentialChange` instead.
166
177
  */
167
- export declare function needsBearerAssetFetch(url: string): boolean;
178
+ export type AssetLoadMode = 'native' | 'bearer' | 'awaiting-credential';
179
+ /** `url`'s `AssetLoadMode` on this host now. Pass the URL after `resolveAssetUrl`. */
180
+ export declare function assetLoadMode(url: string): AssetLoadMode;
181
+ /** `url` where the host says it lives (`EmbedAuthAdapter.resolveAssetUrl`); unchanged when no host says. */
182
+ export declare function resolveAssetUrl(url: string): string;
168
183
  /**
169
184
  * `fetch` wrapper that attaches embed-proxy bearer headers (when
170
185
  * present in sessionStorage) and forces `credentials: 'same-origin'`
@@ -201,4 +216,9 @@ export declare function needsBearerAssetFetch(url: string): boolean;
201
216
  * the wrapper behaves exactly as described above.
202
217
  */
203
218
  export declare function embedAuthedFetch(url: string, init?: RequestInit): Promise<Response>;
219
+ /**
220
+ * Whether `response` answered the retry `embedAuthedFetch` sent after refreshing the credential: a 401 here is a
221
+ * refusal of a credential just issued, which another refresh will not lift.
222
+ */
223
+ export declare function answeredAfterRefresh(response: Response): boolean;
204
224
  //# sourceMappingURL=embed-authed-fetch.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"embed-authed-fetch.d.ts","sourceRoot":"","sources":["../../src/utils/embed-authed-fetch.ts"],"names":[],"mappings":"AA8BA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;4EAMwE;IACxE,UAAU,CAAC,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACtD;;6EAEyE;IACzE,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IACjC;;;;;;;;;;;;OAYG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C;;;;;;;;;;;;OAYG;IACH,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D;;;;;;;;;;;OAWG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;CAClD;AAOD;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI,GAAG,IAAI,CAS1E;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAE7C;AAED;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAE/E;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAM1D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAkCvF"}
1
+ {"version":3,"file":"embed-authed-fetch.d.ts","sourceRoot":"","sources":["../../src/utils/embed-authed-fetch.ts"],"names":[],"mappings":"AA8BA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;;;;;4EAMwE;IACxE,UAAU,CAAC,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACtD;;6EAEyE;IACzE,WAAW,CAAC,EAAE,kBAAkB,CAAC;IACjC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,CAAC,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;IACjC;;;;;;;;;;;;OAYG;IACH,aAAa,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC3C;;;;;;;;;;;;OAYG;IACH,UAAU,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1D;;;;;;;;;;;OAWG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B;;;;;;;;;;OAUG;IACH,eAAe,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,CAAC;IAC1C;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,MAAM,OAAO,CAAC;IAC9B;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;CAClD;AAOD;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,gBAAgB,GAAG,IAAI,GAAG,IAAI,CAS1E;AAED;;;;;GAKG;AACH,wBAAgB,mBAAmB,IAAI,OAAO,CAE7C;AAED;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAE/E;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,QAAQ,GAAG,qBAAqB,CAAC;AAExE,sFAAsF;AACtF,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,aAAa,CAaxD;AAED,4GAA4G;AAC5G,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAGnD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,GAAE,WAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC,CAkCvF;AAwDD;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAEhE"}
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { resolveAppOriginUrl } from "./app-origins.js";
2
+ import { isPageOriginUrl, readAppOrigins, resolveAppOriginUrl } from "./app-origins.js";
3
3
  import { readRegisteredAdapter, writeRegisteredAdapter } from "./embed-auth-adapter-registry.js";
4
4
  import { applyProxyAuth } from "./embed-proxy-auth-storage.js";
5
5
  function getRegisteredAuthAdapter() {
@@ -20,12 +20,20 @@ function subscribeEmbedCredentialChange(listener) {
20
20
  return getRegisteredAuthAdapter()?.subscribe?.(listener) ?? (() => {
21
21
  });
22
22
  }
23
- function needsBearerAssetFetch(url) {
24
- if (typeof window === "undefined") return false;
23
+ function assetLoadMode(url) {
24
+ if (typeof window === "undefined") return "native";
25
25
  const adapter = getRegisteredAuthAdapter();
26
- if (!adapter || adapter.getHeaders?.().Authorization === void 0) return false;
27
- const target = resolveAppOriginUrl(url);
28
- return target !== null && (target.protocol === "http:" || target.protocol === "https:");
26
+ if (!adapter) return "native";
27
+ const origins = readAppOrigins();
28
+ const target = resolveAppOriginUrl(url, origins);
29
+ if (!target || target.protocol !== "http:" && target.protocol !== "https:") return "native";
30
+ if (!adapter.hasCredential) return adapter.getHeaders?.().Authorization !== void 0 ? "bearer" : "native";
31
+ if (adapter.hasCredential()) return "bearer";
32
+ return isPageOriginUrl(target, origins) ? "native" : "awaiting-credential";
33
+ }
34
+ function resolveAssetUrl(url) {
35
+ const resolve = getRegisteredAuthAdapter()?.resolveAssetUrl;
36
+ return resolve ? resolve(url) : url;
29
37
  }
30
38
  function embedAuthedFetch(url, init = {}) {
31
39
  assertSameOrigin(url);
@@ -68,6 +76,10 @@ function dedupedRefresh() {
68
76
  }
69
77
  return inFlightRefresh;
70
78
  }
79
+ const answersAfterRefresh = /* @__PURE__ */ new WeakSet();
80
+ function answeredAfterRefresh(response) {
81
+ return answersAfterRefresh.has(response);
82
+ }
71
83
  async function fetchWithRefresh(url, init, baseHeaders, isRetry) {
72
84
  const adapter = getRegisteredAuthAdapter();
73
85
  await adapter?.beforeRequest?.();
@@ -92,7 +104,9 @@ async function fetchWithRefresh(url, init, baseHeaders, isRetry) {
92
104
  if (response.status === 401 && !isRetry && adapter?.refresh) {
93
105
  const refreshed = await dedupedRefresh();
94
106
  if (refreshed) {
95
- return fetchWithRefresh(url, init, baseHeaders, true);
107
+ const retried = await fetchWithRefresh(url, init, baseHeaders, true);
108
+ answersAfterRefresh.add(retried);
109
+ return retried;
96
110
  }
97
111
  }
98
112
  return response;
@@ -128,9 +142,11 @@ function assertSameOrigin(url) {
128
142
  }
129
143
  }
130
144
  export {
145
+ answeredAfterRefresh,
146
+ assetLoadMode,
131
147
  embedAuthedFetch,
132
148
  hasEmbedAuthAdapter,
133
- needsBearerAssetFetch,
149
+ resolveAssetUrl,
134
150
  setEmbedAuthAdapter,
135
151
  subscribeEmbedCredentialChange
136
152
  };
@@ -83636,6 +83636,7 @@ function dedupedRefresh() {
83636
83636
  }
83637
83637
  return inFlightRefresh;
83638
83638
  }
83639
+ var answersAfterRefresh = /* @__PURE__ */ new WeakSet();
83639
83640
  async function fetchWithRefresh(url, init, baseHeaders, isRetry) {
83640
83641
  const adapter2 = getRegisteredAuthAdapter();
83641
83642
  await adapter2?.beforeRequest?.();
@@ -83660,7 +83661,9 @@ async function fetchWithRefresh(url, init, baseHeaders, isRetry) {
83660
83661
  if (response.status === 401 && !isRetry && adapter2?.refresh) {
83661
83662
  const refreshed = await dedupedRefresh();
83662
83663
  if (refreshed) {
83663
- return fetchWithRefresh(url, init, baseHeaders, true);
83664
+ const retried = await fetchWithRefresh(url, init, baseHeaders, true);
83665
+ answersAfterRefresh.add(retried);
83666
+ return retried;
83664
83667
  }
83665
83668
  }
83666
83669
  return response;
@@ -0,0 +1,6 @@
1
+ /**
2
+ * The entry of a value → presentation table for a value off the wire, `undefined` for one the table does not know.
3
+ * Own keys only: `in` or a bare index would answer `toString` or `constructor` with the prototype's function.
4
+ */
5
+ export declare function presentationFor<K extends string, V>(map: Readonly<Record<K, V>>, key: string | null | undefined): V | undefined;
6
+ //# sourceMappingURL=presentation-for.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"presentation-for.d.ts","sourceRoot":"","sources":["../../src/utils/presentation-for.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,wBAAgB,eAAe,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,EACjD,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAC3B,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC7B,CAAC,GAAG,SAAS,CAEf"}
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ function presentationFor(map, key) {
3
+ return key != null && Object.prototype.hasOwnProperty.call(map, key) ? map[key] : void 0;
4
+ }
5
+ export {
6
+ presentationFor
7
+ };
@@ -16,11 +16,10 @@ var _chunkJKX2C3I2cjs = require('./chunk-JKX2C3I2.cjs');
16
16
  var _chunkX432Y6RMcjs = require('./chunk-X432Y6RM.cjs');
17
17
  require('./chunk-S5C3OZCO.cjs');
18
18
  require('./chunk-4IYNDV3G.cjs');
19
+ require('./chunk-NTPX5GXI.cjs');
19
20
 
20
21
 
21
- var _chunkYSDB6HGQcjs = require('./chunk-YSDB6HGQ.cjs');
22
- require('./chunk-NTPX5GXI.cjs');
23
- require('./chunk-GI3MMBP3.cjs');
22
+ var _chunkSQ7YHWEPcjs = require('./chunk-SQ7YHWEP.cjs');
24
23
  require('./chunk-UJ7AXHRZ.cjs');
25
24
 
26
25
 
@@ -416,7 +415,7 @@ function FilePlayer({
416
415
  const hover = useHoverPlayback(mediaRef, sound, { playOnHover, playWhenHovered, mutedIntent });
417
416
  const health = usePlaybackHealth(mediaRef, url, !chromeless);
418
417
  useIosNativeVideoFullscreen(mediaRef);
419
- const captions = _chunkYSDB6HGQcjs.useAuthedAssetSrc.call(void 0, captionsUrl, "text/vtt, */*");
418
+ const captions = _chunkSQ7YHWEPcjs.useAuthedAssetSrc.call(void 0, captionsUrl, "text/vtt, */*");
420
419
  const player = /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
421
420
  _muxplayerreact2.default,
422
421
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flamingo-stack/openframe-frontend-core",
3
- "version": "0.0.853",
3
+ "version": "0.0.855",
4
4
  "description": "Shared design system and components for all Flamingo platforms",
5
5
  "type": "module",
6
6
  "sideEffects": [
@@ -19,8 +19,10 @@
19
19
  * "N replies" badge; the ticket feed passes `<TicketAttachmentsList>`.
20
20
  */
21
21
 
22
- import { useState, type ReactNode } from 'react';
22
+ import type { ReactNode } from 'react';
23
23
  import Image from '../../embed-shims/next-image';
24
+ import { useAuthedImageSrc } from '../../hooks/use-authed-image-src';
25
+ import { useImageFallback } from '../../hooks/use-image-fallback';
24
26
  import { AVATAR_SIZE_PX } from '../../styles/component-sizes';
25
27
  import { cn } from '../../utils/cn';
26
28
  import { personInitials } from '../../utils/format';
@@ -84,11 +86,10 @@ function ChatMessageRowLoaded(props: ChatMessageRowProps) {
84
86
  const proxiedAvatar = useProxiedImageUrl(avatarUrl ?? '');
85
87
  const resolvedAvatar = proxiedAvatar || avatarUrl || undefined;
86
88
  // Fall back to the initials box if the avatar load FAILS (transient CDN 429,
87
- // ad-blocker, dead URL) instead of showing a broken image. Keyed on the URL
88
- // (not a bool) so a later render with a DIFFERENT avatar re-attempts the load
89
- // rather than inheriting a stale failure.
90
- const [failedSrc, setFailedSrc] = useState<string | null>(null);
91
- const src = resolvedAvatar && resolvedAvatar !== failedSrc ? resolvedAvatar : undefined;
89
+ // ad-blocker, dead URL) instead of showing a broken image.
90
+ // Keyed on the store's answer, not the URL: this row keeps holding the avatar's store entry, so where it needs the
91
+ // bearer, a fetch that got no answer, or a 401 the session can refresh past, is retried and the picture comes back.
92
+ const { src, onError } = useImageFallback(useAuthedImageSrc(resolvedAvatar));
92
93
  const hasBody = typeof body === 'string' ? body.trim().length > 0 : body != null && body !== false;
93
94
 
94
95
  return (
@@ -103,7 +104,7 @@ function ChatMessageRowLoaded(props: ChatMessageRowProps) {
103
104
  className={cn(AVATAR_BOX_CLASS, 'object-cover')}
104
105
  width={AVATAR_SIZE_PX.md}
105
106
  height={AVATAR_SIZE_PX.md}
106
- onError={() => setFailedSrc(resolvedAvatar ?? null)}
107
+ onError={onError}
107
108
  />
108
109
  ) : (
109
110
  <div
@@ -8,42 +8,22 @@
8
8
  * ternary (they drift: the pre-hook BlogCard chain couldn't recover from a
9
9
  * FAILING placeholder, EntityPortraitCard duplicated the same logic with
10
10
  * different state). Cards wire `src` + `onError` and render their own
11
- * empty-state when `src` is null.
12
- *
13
- * Implementation note: state is the SET of candidate URLs that failed, and
14
- * `src` is derived — so a prop change (new cover URL) re-resolves instantly
15
- * with no reset effect, and a URL that failed once isn't retried in a loop.
11
+ * empty-state when `src` is null. The chain itself is `useImageFallback`.
16
12
  */
17
13
 
18
- import { useCallback, useState, type SyntheticEvent } from 'react';
14
+ import type { SyntheticEvent } from 'react';
15
+ import { type ImageFallback, useImageFallback } from '../../../hooks/use-image-fallback';
19
16
 
20
- export interface CoverImageFallback {
21
- /** Resolved source: first non-failed of [imageUrl, placeholderUrl], else null. */
22
- src: string | null;
23
- /** Wire to the media element's `onError`. */
24
- onError: () => void;
25
- }
17
+ export type CoverImageFallback = ImageFallback;
26
18
 
27
19
  export function useCoverImageFallback(imageUrl?: string | null, placeholderUrl?: string | null): CoverImageFallback {
28
- const [failed, setFailed] = useState<ReadonlySet<string>>(() => new Set());
29
-
30
- const src =
31
- imageUrl && !failed.has(imageUrl)
32
- ? imageUrl
33
- : placeholderUrl && !failed.has(placeholderUrl)
34
- ? placeholderUrl
35
- : null;
36
-
37
- const onError = useCallback(() => {
38
- if (!src) return;
39
- setFailed(prev => new Set(prev).add(src));
40
- }, [src]);
41
-
42
- return { src, onError };
20
+ return useImageFallback(imageUrl, placeholderUrl);
43
21
  }
44
22
 
45
23
  /** Fallback for cards with NO placeholder chain (compact/sm image slots):
46
- * a broken cover simply disappears, leaving the slot's background. */
24
+ * a broken cover simply disappears, leaving the slot's background.
25
+ * Legacy: a DOM write in `onError`, which the next src does not undo. New
26
+ * code renders nothing when `useImageFallback(url).src` is null instead. */
47
27
  export const hideOnError = (e: SyntheticEvent<HTMLImageElement>) => {
48
28
  const img = e.currentTarget;
49
29
  img.style.display = 'none';