@flamingo-stack/openframe-frontend-core 0.0.802 → 0.0.804

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 (247) hide show
  1. package/dist/build/export-map.json +1 -1
  2. package/dist/{case-study-card-K6HYMHL6.cjs → case-study-card-MEWJNF4N.cjs} +5 -5
  3. package/dist/{chunk-DSIIRR3G.cjs → chunk-2NVIGBJC.cjs} +80 -80
  4. package/dist/{chunk-HRMLGU6A.cjs → chunk-3EPG56RK.cjs} +8 -8
  5. package/dist/{chunk-UYGXJ5SQ.cjs → chunk-3WNCFZGN.cjs} +2 -2
  6. package/dist/{chunk-2JCY5KQL.cjs → chunk-4W77VLQV.cjs} +4 -4
  7. package/dist/{chunk-M7E7ILE5.cjs → chunk-55TGW6BF.cjs} +6 -6
  8. package/dist/{chunk-E56LN23H.cjs → chunk-66ZQ7LDR.cjs} +73 -48
  9. package/dist/{chunk-VMQAJIQC.cjs → chunk-6JRQ57DU.cjs} +884 -895
  10. package/dist/{chunk-A7NRENMU.cjs → chunk-6UGNFMZB.cjs} +36 -36
  11. package/dist/{chunk-Y5XHMEBB.cjs → chunk-76NE67PK.cjs} +5 -5
  12. package/dist/{chunk-NCQJIYDN.cjs → chunk-AC5EBHAX.cjs} +28 -28
  13. package/dist/{chunk-OG4XH6C5.cjs → chunk-AZJYMTBS.cjs} +33 -33
  14. package/dist/{chunk-D3IQHAGL.cjs → chunk-BVSZTKI3.cjs} +34 -21
  15. package/dist/{chunk-7E4BC3AF.cjs → chunk-F2VN3UUB.cjs} +485 -513
  16. package/dist/{chunk-DTBIIFZG.cjs → chunk-FLW2VL5W.cjs} +21 -21
  17. package/dist/{chunk-FS4TVAE7.cjs → chunk-FQ4LYYBI.cjs} +52 -52
  18. package/dist/{chunk-VVLL37EM.cjs → chunk-GAHXURKJ.cjs} +6 -6
  19. package/dist/{chunk-7MV23NNT.cjs → chunk-JLKGLPDC.cjs} +109 -21
  20. package/dist/{chunk-3NGJ7NPT.cjs → chunk-KVJKKVB3.cjs} +7 -7
  21. package/dist/{chunk-52NI57KM.cjs → chunk-LZIQXGAW.cjs} +91 -88
  22. package/dist/{chunk-DYDS2P5G.cjs → chunk-MEDSJCEX.cjs} +4 -4
  23. package/dist/{chunk-FFRFKWTZ.cjs → chunk-MHH7CHNI.cjs} +17 -14
  24. package/dist/{chunk-CRVXQYUZ.cjs → chunk-NBLQFJ4I.cjs} +100 -99
  25. package/dist/{chunk-YD344MMX.cjs → chunk-NXJ3O4WO.cjs} +15 -15
  26. package/dist/{chunk-YBTORXFY.cjs → chunk-PRCGRDHV.cjs} +40 -25
  27. package/dist/{chunk-75BFVMNA.cjs → chunk-QPBP7FKI.cjs} +52 -52
  28. package/dist/{chunk-ZPVFFPQM.cjs → chunk-RIRIA3FO.cjs} +4 -4
  29. package/dist/{chunk-XR323UBY.cjs → chunk-STLJCAIZ.cjs} +6 -3
  30. package/dist/{chunk-6UKH22NQ.cjs → chunk-TGOJHOQR.cjs} +2 -1
  31. package/dist/{chunk-FAUVDMH4.cjs → chunk-THY2XVGY.cjs} +198 -164
  32. package/dist/{chunk-6GCXQIUU.cjs → chunk-TT64NRFU.cjs} +4 -4
  33. package/dist/{chunk-3W2PBWD5.cjs → chunk-TTERV57X.cjs} +4 -4
  34. package/dist/{chunk-A7IT7MZO.cjs → chunk-UCBR27JM.cjs} +13 -13
  35. package/dist/{chunk-KVGWOJCX.cjs → chunk-V3T5MDJV.cjs} +2 -2
  36. package/dist/{chunk-5RGGUQ4Y.cjs → chunk-VXXOUM2K.cjs} +67 -1
  37. package/dist/{chunk-EJVJDLYC.cjs → chunk-WSKMV2QS.cjs} +3 -3
  38. package/dist/{chunk-2BUSXRZ7.cjs → chunk-XXARXK62.cjs} +26 -26
  39. package/dist/{chunk-HATRCNXJ.cjs → chunk-XYZBN6D7.cjs} +2 -2
  40. package/dist/{chunk-YMPCACQX.cjs → chunk-Z6Y5X5SF.cjs} +41 -41
  41. package/dist/{cloud-tenants-3SWYRUXB.cjs → cloud-tenants-LRXMISV4.cjs} +19 -19
  42. package/dist/components/agent-mark.d.ts.map +1 -1
  43. package/dist/components/agent-mark.js +2 -2
  44. package/dist/components/case-studies/index.cjs +35 -35
  45. package/dist/components/chat/approval-batch-message.d.ts +3 -1
  46. package/dist/components/chat/approval-batch-message.d.ts.map +1 -1
  47. package/dist/components/chat/approval-batch-message.js +88 -0
  48. package/dist/components/chat/chat-composer.d.ts +3 -1
  49. package/dist/components/chat/chat-composer.d.ts.map +1 -1
  50. package/dist/components/chat/chat-composer.js +2 -0
  51. package/dist/components/chat/chat-context-memory-bar.d.ts +7 -1
  52. package/dist/components/chat/chat-context-memory-bar.d.ts.map +1 -1
  53. package/dist/components/chat/chat-context-memory-bar.js +11 -5
  54. package/dist/components/chat/chat-message-row.d.ts.map +1 -1
  55. package/dist/components/chat/chat-message-row.js +3 -2
  56. package/dist/components/chat/embeddable-chat.d.ts +3 -0
  57. package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
  58. package/dist/components/chat/embeddable-chat.js +1 -0
  59. package/dist/components/chat/entity-cards/admin-content-card.d.ts.map +1 -1
  60. package/dist/components/chat/entity-cards/admin-content-card.js +2 -1
  61. package/dist/components/chat/entity-cards/blog-card.d.ts.map +1 -1
  62. package/dist/components/chat/entity-cards/blog-card.js +6 -6
  63. package/dist/components/chat/entity-cards/blog-image-placeholder.d.ts.map +1 -1
  64. package/dist/components/chat/entity-cards/blog-image-placeholder.js +2 -1
  65. package/dist/components/chat/entity-cards/case-study-card.d.ts.map +1 -1
  66. package/dist/components/chat/entity-cards/case-study-card.js +10 -9
  67. package/dist/components/chat/entity-cards/customer-interview-card.d.ts.map +1 -1
  68. package/dist/components/chat/entity-cards/customer-interview-card.js +8 -7
  69. package/dist/components/chat/entity-cards/dispatch.d.ts.map +1 -1
  70. package/dist/components/chat/entity-cards/dispatch.js +12 -1
  71. package/dist/components/chat/entity-cards/employee-entry-card.d.ts.map +1 -1
  72. package/dist/components/chat/entity-cards/employee-entry-card.js +3 -2
  73. package/dist/components/chat/entity-cards/entity-portrait-card.d.ts.map +1 -1
  74. package/dist/components/chat/entity-cards/entity-portrait-card.js +7 -5
  75. package/dist/components/chat/entity-cards/investor-update-card.d.ts.map +1 -1
  76. package/dist/components/chat/entity-cards/investor-update-card.js +2 -1
  77. package/dist/components/chat/entity-cards/onboarding-guide-card.d.ts.map +1 -1
  78. package/dist/components/chat/entity-cards/onboarding-guide-card.js +13 -2
  79. package/dist/components/chat/entity-cards/program-card.d.ts.map +1 -1
  80. package/dist/components/chat/entity-cards/program-card.js +17 -5
  81. package/dist/components/chat/entity-cards/roadmap-card.d.ts.map +1 -1
  82. package/dist/components/chat/entity-cards/roadmap-card.js +5 -4
  83. package/dist/components/chat/index.cjs +15 -15
  84. package/dist/components/chat/mingo-info-card.d.ts.map +1 -1
  85. package/dist/components/chat/mingo-info-card.js +3 -2
  86. package/dist/components/contact/index.cjs +20 -20
  87. package/dist/components/docs/index.cjs +23 -23
  88. package/dist/components/embeds/index.cjs +20 -20
  89. package/dist/components/embeds/markdown-image.d.ts.map +1 -1
  90. package/dist/components/embeds/markdown-image.js +2 -1
  91. package/dist/components/embeds/og-link-preview.d.ts.map +1 -1
  92. package/dist/components/embeds/og-link-preview.js +17 -6
  93. package/dist/components/embeds/twitter-embed-client.d.ts.map +1 -1
  94. package/dist/components/embeds/twitter-embed-client.js +3 -2
  95. package/dist/components/faq/index.cjs +21 -21
  96. package/dist/components/features/board/ticket-card.js +5 -5
  97. package/dist/components/features/index.cjs +19 -19
  98. package/dist/components/features/media-gallery-manager.d.ts.map +1 -1
  99. package/dist/components/features/media-gallery-manager.js +2 -1
  100. package/dist/components/features/notifications/notification-tile.d.ts.map +1 -1
  101. package/dist/components/features/notifications/notification-tile.js +3 -2
  102. package/dist/components/features/parallax-image-showcase.d.ts.map +1 -1
  103. package/dist/components/features/parallax-image-showcase.js +9 -35
  104. package/dist/components/features/select-button.d.ts.map +1 -1
  105. package/dist/components/features/select-button.js +3 -2
  106. package/dist/components/features/video-hover-preview.d.ts +1 -1
  107. package/dist/components/features/video-hover-preview.d.ts.map +1 -1
  108. package/dist/components/features/video-hover-preview.js +2 -1
  109. package/dist/components/features/video.d.ts.map +1 -1
  110. package/dist/components/features/video.js +13 -1
  111. package/dist/components/features/walkthrough-video.d.ts.map +1 -1
  112. package/dist/components/features/walkthrough-video.js +3 -3
  113. package/dist/components/help-center-pages/index.cjs +121 -121
  114. package/dist/components/hero-image-uploader.d.ts.map +1 -1
  115. package/dist/components/hero-image-uploader.js +12 -1
  116. package/dist/components/icon-display.d.ts.map +1 -1
  117. package/dist/components/icon-display.js +2 -1
  118. package/dist/components/index.cjs +137 -91
  119. package/dist/components/layout/page-layout.d.ts +1 -1
  120. package/dist/components/layout/page-layout.d.ts.map +1 -1
  121. package/dist/components/layout/title-block.d.ts +4 -2
  122. package/dist/components/layout/title-block.d.ts.map +1 -1
  123. package/dist/components/layout/title-block.js +21 -2
  124. package/dist/components/media-carousel.d.ts.map +1 -1
  125. package/dist/components/media-carousel.js +2 -1
  126. package/dist/components/meeting-scheduler/index.cjs +85 -85
  127. package/dist/components/navigation/index.cjs +22 -22
  128. package/dist/components/onboarding-guides/index.cjs +22 -22
  129. package/dist/components/platform/ScriptInfoSection.d.ts.map +1 -1
  130. package/dist/components/platform/ScriptInfoSection.js +12 -1
  131. package/dist/components/product-demo/index.cjs +30 -30
  132. package/dist/components/related-content/index.cjs +11 -11
  133. package/dist/components/shared/media-gallery-strip.d.ts.map +1 -1
  134. package/dist/components/shared/media-gallery-strip.js +3 -2
  135. package/dist/components/shared/product-release/product-release-card.d.ts.map +1 -1
  136. package/dist/components/shared/product-release/product-release-card.js +13 -2
  137. package/dist/components/tickets/index.cjs +26 -26
  138. package/dist/components/ui/avatar-stack.d.ts.map +1 -1
  139. package/dist/components/ui/avatar-stack.js +4 -4
  140. package/dist/components/ui/data-table/data-table-body.d.ts +6 -1
  141. package/dist/components/ui/data-table/data-table-body.d.ts.map +1 -1
  142. package/dist/components/ui/data-table/data-table-body.js +3 -1
  143. package/dist/components/ui/device-card.d.ts +6 -1
  144. package/dist/components/ui/device-card.d.ts.map +1 -1
  145. package/dist/components/ui/device-card.js +2 -1
  146. package/dist/components/ui/entity-image.d.ts.map +1 -1
  147. package/dist/components/ui/entity-image.js +3 -2
  148. package/dist/components/ui/image-gallery-modal.d.ts.map +1 -1
  149. package/dist/components/ui/image-gallery-modal.js +2 -1
  150. package/dist/components/ui/image-uploader.d.ts.map +1 -1
  151. package/dist/components/ui/image-uploader.js +2 -1
  152. package/dist/components/ui/index.cjs +37 -19
  153. package/dist/components/ui/index.d.ts +1 -0
  154. package/dist/components/ui/index.d.ts.map +1 -1
  155. package/dist/components/ui/index.js +1 -0
  156. package/dist/components/ui/markdown/base-components.d.ts.map +1 -1
  157. package/dist/components/ui/markdown/base-components.js +2 -1
  158. package/dist/components/ui/page-actions.d.ts.map +1 -1
  159. package/dist/components/ui/page-actions.js +15 -12
  160. package/dist/components/ui/photo-wall.d.ts +7 -3
  161. package/dist/components/ui/photo-wall.d.ts.map +1 -1
  162. package/dist/components/ui/photo-wall.js +3 -4
  163. package/dist/components/ui/square-avatar.d.ts +4 -1
  164. package/dist/components/ui/square-avatar.d.ts.map +1 -1
  165. package/dist/components/ui/square-avatar.js +2 -1
  166. package/dist/components/user-summary-stub.d.ts +1 -1
  167. package/dist/components/user-summary-stub.d.ts.map +1 -1
  168. package/dist/components/user-summary-stub.js +16 -6
  169. package/dist/components/vendor-display-button.d.ts.map +1 -1
  170. package/dist/components/vendor-display-button.js +13 -3
  171. package/dist/components/vendor-icon.d.ts +7 -4
  172. package/dist/components/vendor-icon.d.ts.map +1 -1
  173. package/dist/components/vendor-icon.js +22 -71
  174. package/dist/{devices-MQILRW53.cjs → devices-CETR72XY.cjs} +20 -20
  175. package/dist/{embeddable-chat-XZDZOHFY.cjs → embeddable-chat-GHBCX2BY.cjs} +85 -84
  176. package/dist/hooks/index.cjs +6 -6
  177. package/dist/hooks/ui/use-image-edge-color.d.ts.map +1 -1
  178. package/dist/hooks/ui/use-image-edge-color.js +4 -3
  179. package/dist/image-sizes.cjs +68 -0
  180. package/dist/index.cjs +43 -25
  181. package/dist/{knowledge-WQ3ABXZC.cjs → knowledge-A2MWEF23.cjs} +20 -20
  182. package/dist/{logs-XRSJGB3I.cjs → logs-47JODA6C.cjs} +27 -27
  183. package/dist/{policies-Q67ZXAGY.cjs → policies-OPIDR6XF.cjs} +23 -23
  184. package/dist/{remote-session-4LYKEZSY.cjs → remote-session-IQTPEG63.cjs} +8 -8
  185. package/dist/{scripts-YX324R4S.cjs → scripts-4MQGJWFP.cjs} +26 -26
  186. package/dist/{software-update-PHMXJVAC.cjs → software-update-MQIGPBZ6.cjs} +23 -23
  187. package/dist/styles/image-sizes.d.ts +110 -0
  188. package/dist/styles/image-sizes.d.ts.map +1 -0
  189. package/dist/styles/image-sizes.js +66 -0
  190. package/dist/{tickets-board-3FBVYSXR.cjs → tickets-board-QF5JNSH2.cjs} +11 -11
  191. package/eslint-config/base.js +12 -0
  192. package/eslint-config/image-sizes.js +51 -0
  193. package/package.json +8 -1
  194. package/src/components/agent-mark.tsx +3 -4
  195. package/src/components/chat/approval-batch-message.tsx +109 -1
  196. package/src/components/chat/chat-composer.tsx +4 -0
  197. package/src/components/chat/chat-context-memory-bar.tsx +28 -5
  198. package/src/components/chat/chat-message-row.tsx +3 -2
  199. package/src/components/chat/embeddable-chat.tsx +4 -0
  200. package/src/components/chat/entity-cards/admin-content-card.tsx +2 -1
  201. package/src/components/chat/entity-cards/blog-card.tsx +6 -6
  202. package/src/components/chat/entity-cards/blog-image-placeholder.tsx +2 -1
  203. package/src/components/chat/entity-cards/case-study-card.tsx +10 -9
  204. package/src/components/chat/entity-cards/customer-interview-card.tsx +8 -7
  205. package/src/components/chat/entity-cards/dispatch.tsx +9 -1
  206. package/src/components/chat/entity-cards/employee-entry-card.tsx +3 -2
  207. package/src/components/chat/entity-cards/entity-portrait-card.tsx +7 -5
  208. package/src/components/chat/entity-cards/investor-update-card.tsx +2 -1
  209. package/src/components/chat/entity-cards/onboarding-guide-card.tsx +10 -2
  210. package/src/components/chat/entity-cards/program-card.tsx +14 -5
  211. package/src/components/chat/entity-cards/roadmap-card.tsx +5 -4
  212. package/src/components/chat/mingo-info-card.tsx +3 -2
  213. package/src/components/embeds/markdown-image.tsx +2 -1
  214. package/src/components/embeds/og-link-preview.tsx +14 -6
  215. package/src/components/embeds/twitter-embed-client.tsx +3 -2
  216. package/src/components/features/board/ticket-card.tsx +7 -6
  217. package/src/components/features/media-gallery-manager.tsx +2 -2
  218. package/src/components/features/notifications/notification-tile.tsx +3 -2
  219. package/src/components/features/parallax-image-showcase.tsx +9 -26
  220. package/src/components/features/select-button.tsx +3 -2
  221. package/src/components/features/video-hover-preview.tsx +3 -2
  222. package/src/components/features/video.tsx +10 -1
  223. package/src/components/features/walkthrough-video.tsx +7 -10
  224. package/src/components/hero-image-uploader.tsx +9 -1
  225. package/src/components/icon-display.tsx +2 -1
  226. package/src/components/layout/page-layout.tsx +1 -1
  227. package/src/components/layout/title-block.tsx +22 -3
  228. package/src/components/media-carousel.tsx +2 -1
  229. package/src/components/platform/ScriptInfoSection.tsx +9 -1
  230. package/src/components/shared/media-gallery-strip.tsx +4 -2
  231. package/src/components/shared/product-release/product-release-card.tsx +10 -2
  232. package/src/components/ui/avatar-stack.tsx +6 -6
  233. package/src/components/ui/data-table/data-table-body.tsx +9 -0
  234. package/src/components/ui/device-card.tsx +7 -1
  235. package/src/components/ui/entity-image.tsx +3 -2
  236. package/src/components/ui/image-gallery-modal.tsx +2 -1
  237. package/src/components/ui/image-uploader.tsx +2 -1
  238. package/src/components/ui/index.ts +1 -0
  239. package/src/components/ui/markdown/base-components.tsx +2 -1
  240. package/src/components/ui/page-actions.tsx +28 -14
  241. package/src/components/ui/photo-wall.tsx +10 -14
  242. package/src/components/ui/square-avatar.tsx +6 -3
  243. package/src/components/user-summary-stub.tsx +14 -7
  244. package/src/components/vendor-display-button.tsx +10 -3
  245. package/src/components/vendor-icon.tsx +31 -97
  246. package/src/hooks/ui/use-image-edge-color.ts +8 -4
  247. package/src/styles/image-sizes.ts +114 -0
@@ -0,0 +1,114 @@
1
+ /**
2
+ * THE sizes every picture is fetched at: the one table, read by every component that draws a picture, by the host's
3
+ * image settings (a Next host's `images.deviceSizes`, `images.imageSizes` and `images.qualities` are derived from it,
4
+ * never typed) and by the code that makes pictures on the server (link-preview cards, emails, video posters).
5
+ *
6
+ * Why one table: a resized picture is cached by its exact address, so every width, quality and fit a component picks
7
+ * on its own is another copy the image host makes and caches separately. With eight widths per picture, three
8
+ * qualities and ad-hoc pixel sizes, a blog post's cover almost never had a cached copy when a reader arrived, and
9
+ * waited for a fresh resize (measured 2026-10-26: 19 of 20 blog covers, ~0.6 s each; Google's field data showed the
10
+ * cover's download time going from 0.47 s to 1.18 s). A short ladder of widths and one quality keep the copies few, so
11
+ * the ones that exist are reused.
12
+ *
13
+ * What a component chooses is the SLOT (how wide the picture is drawn), never a width or a quality: a responsive
14
+ * picture states `sizes={IMAGE_SLOT.card}`, a fixed-size one states its box from `IMAGE_FIXED_PX` (or the avatar
15
+ * scale). The browser then picks a width from the ladder. Import-free, so a host's config can read it.
16
+ */
17
+
18
+ /**
19
+ * The widths a responsive picture is offered at (a `srcset`): every responsive picture, of every kind, picks from
20
+ * this ladder. Covers a phone (828, and 1200 at 3x), a desktop column (1200) and a retina desktop (1920).
21
+ */
22
+ export const IMAGE_WIDTHS = [640, 828, 1200, 1920] as const;
23
+
24
+ /**
25
+ * The widths a fixed-size picture (an avatar, a logo, a thumbnail) is fetched at: its 1x and 2x, rounded up to this
26
+ * ladder. Any box up to 192 px lands on one of these four files.
27
+ */
28
+ export const IMAGE_FIXED_WIDTHS = [32, 64, 128, 256, 384] as const;
29
+
30
+ /** The quality every resized picture is encoded at. One value: a second quality is a second copy of every picture. */
31
+ export const IMAGE_QUALITY = 75;
32
+
33
+ /** The widest a picture is ever stored or fetched: the top of {@link IMAGE_WIDTHS}. Uploads are capped to it. */
34
+ export const IMAGE_MAX_WIDTH = IMAGE_WIDTHS[IMAGE_WIDTHS.length - 1];
35
+
36
+ /**
37
+ * How wide a responsive picture is drawn, relative to the window: its `sizes`. One entry per kind of slot; a new
38
+ * layout picks the closest slot (a few pixels' difference picks the same file from the ladder anyway).
39
+ */
40
+ export const IMAGE_SLOT = {
41
+ /** The whole window (a background, a lightbox). */
42
+ full: '100vw',
43
+ /** An article's or a page's main picture, up to its 1200 px column. */
44
+ hero: '(max-width: 1200px) 100vw, 1200px',
45
+ /** Half the page from a laptop up, the whole width below (a split hero, a program cover). */
46
+ half: '(min-width: 1024px) 50vw, 100vw',
47
+ /** A card in a two- or three-column grid. */
48
+ card: '(max-width: 768px) 100vw, (max-width: 1519px) 50vw, 33vw',
49
+ /** A card in a three- or four-column grid. */
50
+ cardSmall: '(max-width: 768px) 50vw, (max-width: 1024px) 33vw, 25vw',
51
+ /** A column of a photo wall: a quarter of the page, half on a phone. */
52
+ wall: '(min-width: 1024px) 25vw, 50vw',
53
+ /** A fixed column up to 400 px (a side panel, a preview). */
54
+ panel: '(max-width: 768px) 100vw, 400px',
55
+ /** A picture in running text, up to 400 px (a markdown image), the whole width only on the narrowest phones. */
56
+ inline: '(max-width: 400px) 100vw, 400px',
57
+ /** A cover beside text, up to 256 px (a release card's cover), the whole width on a phone. */
58
+ aside: '(max-width: 768px) 100vw, 256px',
59
+ /** A wide column up to 768 px (a modal's media, a reading column). */
60
+ column: '(max-width: 768px) 100vw, 768px',
61
+ } as const;
62
+
63
+ export type ImageSlot = keyof typeof IMAGE_SLOT;
64
+
65
+ /**
66
+ * The boxes a fixed-size picture is drawn in, in CSS pixels: its `width`/`height` attributes. Avatars use the avatar
67
+ * scale (`AVATAR_SIZE_PX`); everything else fixed (a logo, a thumbnail, a tile's picture) uses one of these.
68
+ */
69
+ export const IMAGE_FIXED_PX = {
70
+ icon: 16,
71
+ glyph: 20,
72
+ logo: 32,
73
+ logoLg: 40,
74
+ tile: 56,
75
+ thumb: 64,
76
+ mark: 96,
77
+ feature: 128,
78
+ preview: 192,
79
+ cover: 240,
80
+ } as const;
81
+
82
+ export type ImageFixedSize = keyof typeof IMAGE_FIXED_PX;
83
+
84
+ /** The `sizes` of a `fill` picture drawn in a fixed box (`"56px"`), from {@link IMAGE_FIXED_PX}. */
85
+ export function fixedImageSlot(size: ImageFixedSize): `${number}px` {
86
+ return `${IMAGE_FIXED_PX[size]}px`;
87
+ }
88
+
89
+ /**
90
+ * Pictures made on the server, at one size each (they are files, not a `srcset`): the link-preview card, an email's
91
+ * pictures, a video's poster.
92
+ */
93
+ export const IMAGE_FRAME = {
94
+ /** The 1200×630 card every link preview (Open Graph, X, Slack, LinkedIn) is drawn at. */
95
+ social: { width: 1200, height: 630 },
96
+ /** An email's lead picture, at 2x its 560 px column. */
97
+ emailHero: { width: 1120, height: 630 },
98
+ /** An email's card picture, at 2x its 120 px box. */
99
+ emailCard: { width: 240, height: 160 },
100
+ /** A video's poster when the caller states no size. */
101
+ poster: { width: 560, height: 315 },
102
+ } as const;
103
+
104
+ export type ImageFrame = keyof typeof IMAGE_FRAME;
105
+
106
+ /**
107
+ * The ladder width to fetch for a picture drawn `drawnPx` wide (already multiplied for the screen's density): the
108
+ * smallest width of {@link IMAGE_WIDTHS} that covers it, else the widest. For code that measures a slot itself (a
109
+ * photo wall's column) and asks for one URL, so it lands on a file the `srcset` pictures share.
110
+ */
111
+ export function imageWidthFor(drawnPx: number): number {
112
+ for (const width of IMAGE_WIDTHS) if (width >= drawnPx) return width;
113
+ return IMAGE_MAX_WIDTH;
114
+ }