@flamingo-stack/openframe-frontend-core 0.0.774 → 0.0.776

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 (70) hide show
  1. package/dist/{chunk-L5CKY5WA.cjs → chunk-24OYQQZC.cjs} +13 -13
  2. package/dist/{chunk-LEVA5WO3.cjs → chunk-2AZAJ7RK.cjs} +39 -39
  3. package/dist/{chunk-U332FL4C.cjs → chunk-2MF547RG.cjs} +22 -22
  4. package/dist/{chunk-HTSRAQVG.cjs → chunk-2YB4X5WT.cjs} +4 -4
  5. package/dist/{chunk-SWEPHSIP.cjs → chunk-3V27UHSH.cjs} +4 -4
  6. package/dist/{chunk-EQBJHJS7.cjs → chunk-6HY2NH7D.cjs} +2 -2
  7. package/dist/{chunk-5Z3XL2VU.cjs → chunk-AMVI5VXM.cjs} +68 -68
  8. package/dist/{chunk-E5E7IE7X.cjs → chunk-BDYI6HBT.cjs} +12 -12
  9. package/dist/{chunk-VISK6LKE.cjs → chunk-DDXQGTWB.cjs} +2 -2
  10. package/dist/{chunk-IQQ3SLUK.cjs → chunk-F65RSJVV.cjs} +17 -17
  11. package/dist/{chunk-NX7P2T2U.cjs → chunk-IXZNBDXT.cjs} +11 -11
  12. package/dist/{chunk-KWZ62LPZ.cjs → chunk-KM2TVQCH.cjs} +98 -98
  13. package/dist/{chunk-Q7EXOVMT.cjs → chunk-L55XLH5A.cjs} +29 -29
  14. package/dist/{chunk-TOPGBOCN.cjs → chunk-LNCBN4BL.cjs} +2 -2
  15. package/dist/{chunk-VWUQVJ2D.cjs → chunk-MWH5ZTMB.cjs} +77 -77
  16. package/dist/{chunk-Y3EBUFX4.cjs → chunk-MYHS4W2H.cjs} +1 -1
  17. package/dist/{chunk-BTVO676B.cjs → chunk-NWZSYG4S.cjs} +74 -74
  18. package/dist/{chunk-TUXPFF4P.cjs → chunk-OJLZ7PGO.cjs} +28 -28
  19. package/dist/{chunk-TTQHSSHF.cjs → chunk-OTZQP53Y.cjs} +3 -3
  20. package/dist/{chunk-ZHGOXDA3.cjs → chunk-UM6HFGTI.cjs} +64 -57
  21. package/dist/{chunk-USMR73ND.cjs → chunk-WAQPW4CB.cjs} +4 -4
  22. package/dist/{chunk-4JZC624S.cjs → chunk-XN6LXMH5.cjs} +174 -173
  23. package/dist/{chunk-Q6B2DC65.cjs → chunk-XT5WEHFM.cjs} +3 -3
  24. package/dist/{chunk-UAKXZ2KD.cjs → chunk-YFTQ2ALU.cjs} +37 -37
  25. package/dist/{chunk-5AOKXXHV.cjs → chunk-Z5KX56TK.cjs} +4 -4
  26. package/dist/{cloud-tenants-7RNZ6GHM.cjs → cloud-tenants-QFE6QMR5.cjs} +7 -7
  27. package/dist/components/authors/author-detail-view.d.ts.map +1 -1
  28. package/dist/components/authors/author-detail-view.js +12 -2
  29. package/dist/components/case-studies/index.cjs +23 -23
  30. package/dist/components/chat/index.cjs +5 -5
  31. package/dist/components/contact/index.cjs +8 -8
  32. package/dist/components/docs/index.cjs +11 -11
  33. package/dist/components/embeds/index.cjs +8 -8
  34. package/dist/components/faq/index.cjs +9 -9
  35. package/dist/components/features/index.cjs +7 -7
  36. package/dist/components/features/use-file-playback.d.ts +6 -4
  37. package/dist/components/features/use-file-playback.d.ts.map +1 -1
  38. package/dist/components/features/use-file-playback.js +16 -7
  39. package/dist/components/help-center-pages/index.cjs +83 -83
  40. package/dist/components/index.cjs +66 -56
  41. package/dist/components/meeting-scheduler/index.cjs +37 -37
  42. package/dist/components/navigation/index.cjs +10 -10
  43. package/dist/components/onboarding-guides/index.cjs +10 -10
  44. package/dist/components/product-demo/index.cjs +16 -16
  45. package/dist/components/related-content/card-registry.d.ts +5 -0
  46. package/dist/components/related-content/card-registry.d.ts.map +1 -1
  47. package/dist/components/related-content/card-registry.js +2 -0
  48. package/dist/components/related-content/index.cjs +5 -5
  49. package/dist/components/related-content/related-content-section.d.ts.map +1 -1
  50. package/dist/components/related-content/related-content-section.js +11 -6
  51. package/dist/components/tickets/index.cjs +13 -13
  52. package/dist/components/ui/index.cjs +7 -7
  53. package/dist/components/ui/photo-wall.d.ts +9 -1
  54. package/dist/components/ui/photo-wall.d.ts.map +1 -1
  55. package/dist/components/ui/photo-wall.js +8 -7
  56. package/dist/{devices-NNDBC6IH.cjs → devices-SFJDLXSW.cjs} +8 -8
  57. package/dist/{embeddable-chat-DI7ZZTBP.cjs → embeddable-chat-XZUWAK4W.cjs} +73 -73
  58. package/dist/index.cjs +11 -11
  59. package/dist/{knowledge-DPUMWQED.cjs → knowledge-SAK3ZGCO.cjs} +8 -8
  60. package/dist/{logs-EE25MWYM.cjs → logs-CYBGMFA5.cjs} +15 -15
  61. package/dist/{policies-H5LPZWEM.cjs → policies-XXDOICWF.cjs} +11 -11
  62. package/dist/{scripts-YGO4LOES.cjs → scripts-C5T2AQPA.cjs} +12 -12
  63. package/dist/{software-update-5BEB62ZH.cjs → software-update-XU5AI4TP.cjs} +10 -10
  64. package/dist/{video-file-player-4TXA7BZF.cjs → video-file-player-6ZFOZFER.cjs} +16 -7
  65. package/package.json +1 -1
  66. package/src/components/authors/author-detail-view.tsx +10 -2
  67. package/src/components/features/use-file-playback.ts +33 -14
  68. package/src/components/related-content/card-registry.tsx +7 -0
  69. package/src/components/related-content/related-content-section.tsx +12 -2
  70. package/src/components/ui/photo-wall.tsx +19 -8
@@ -181,6 +181,14 @@ export interface PhotoWallProps {
181
181
  className?: string;
182
182
  /** The pictures are still being fetched: show the wall's own placeholder frames. */
183
183
  loading?: boolean;
184
+ /**
185
+ * The width a column is drawn at, as an image `sizes` value (e.g. `(min-width: 1024px) 25vw, 50vw`). With it, and a
186
+ * size on every picture, the wall is laid out at once, on the server too, and each picture is drawn with the host's
187
+ * `srcset`: the first frames are in the HTML and fetched before any script runs, instead of after the wall has been
188
+ * measured in the browser (CU-17tkuw5xp4q: the careers hero's largest paint waited for that). Two walls given the
189
+ * same pictures and `sizes` (one per breakpoint) ask for the same files.
190
+ */
191
+ sizes?: string;
184
192
  }
185
193
 
186
194
  export function PhotoWall({
@@ -190,6 +198,7 @@ export function PhotoWall({
190
198
  fadeColor,
191
199
  className,
192
200
  loading: loadingProp = false,
201
+ sizes,
193
202
  }: PhotoWallProps) {
194
203
  // In a page's loading state the pictures are read: the wall draws its placeholder frames and measures nothing.
195
204
  const inScope = useLoadingScope();
@@ -225,15 +234,18 @@ export function PhotoWall({
225
234
  : undefined;
226
235
  // One frame per picture: a url listed twice is its first entry. Nothing is
227
236
  // asked for before the wall knows its width.
237
+ // Laid out without measuring: every picture's size is stated and the caller states the column's width.
238
+ const sizedUpFront = !!sizes && images.length > 0 && images.every(image => image.width && image.height);
228
239
  const unique = useMemo(() => {
229
- if (requestWidth === undefined || inScope) return [];
240
+ if (inScope || (!sizedUpFront && requestWidth === undefined)) return [];
230
241
  const byUrl = new Map<string, PhotoWallImage>();
231
242
  for (const image of images) if (!byUrl.has(image.url)) byUrl.set(image.url, image);
232
243
  return Array.from(byUrl.values());
233
- }, [images, requestWidth, inScope]);
244
+ }, [images, requestWidth, inScope, sizedUpFront]);
234
245
  // Each picture is measured at the url it is drawn from (the boxed `Image`'s
235
246
  // `optimizedWidth`: the host's resizer at the column's width), so it is downloaded once.
236
- const drawnWidth = requestWidth ?? undefined;
247
+ // Laid out up front, a picture is drawn from its own url with the host's `srcset` (`sizes`), on the server too.
248
+ const drawnWidth = sizedUpFront ? undefined : (requestWidth ?? undefined);
237
249
  const drawnUrl = useCallback((url: string) => (drawnWidth ? resizedImageUrl(url, drawnWidth) : url), [drawnWidth]);
238
250
  // A picture whose size the host stated has its orientation now; only the others are measured.
239
251
  const known = useMemo(() => {
@@ -276,7 +288,7 @@ export function PhotoWall({
276
288
 
277
289
  if (images.length === 0 && !loading) return null;
278
290
  // Until the pictures arrive AND their sizes are known, the same placeholder frames.
279
- const columnsToDraw = loading || requestWidth === undefined ? null : layout;
291
+ const columnsToDraw = loading || (!sizedUpFront && requestWidth === undefined) ? null : layout;
280
292
 
281
293
  const gridStyle = {
282
294
  gridTemplateColumns: `repeat(${columnsToDraw?.length || columns}, minmax(0, 1fr))`,
@@ -312,10 +324,9 @@ export function PhotoWall({
312
324
  alt={photo.alt ?? ''}
313
325
  fill
314
326
  className="object-cover"
315
- // Asked for at the column's width. With no step that covers the column the
316
- // caller's url is drawn as it is (already sized by its own image service).
317
- optimizedWidth={drawnWidth}
318
- unoptimized
327
+ // Asked for at the column's width: through the host's `srcset` when the wall was laid
328
+ // out up front, else at the measured width (the caller's url when no step covers it).
329
+ {...(sizedUpFront ? { sizes } : { optimizedWidth: drawnWidth, unoptimized: true })}
319
330
  // A column's first frames are on screen when the wall appears (one of them is
320
331
  // usually the page's largest paint), so they are not left to lazy loading.
321
332
  loading={i < EAGER_PHOTOS_PER_COLUMN ? 'eager' : 'lazy'}