@flamingo-stack/openframe-frontend-core 0.0.558 → 0.0.559

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 (108) hide show
  1. package/dist/{chunk-5WQPOH27.cjs → chunk-33RSZGYQ.cjs} +5 -5
  2. package/dist/{chunk-5WQPOH27.cjs.map → chunk-33RSZGYQ.cjs.map} +1 -1
  3. package/dist/{chunk-ZSZ24UY6.js → chunk-3H4NJO43.js} +2 -2
  4. package/dist/{chunk-E26KVZJM.js → chunk-3KFGRSM7.js} +2 -2
  5. package/dist/{chunk-S3NZZKNU.js → chunk-5OU7FNZD.js} +2 -2
  6. package/dist/{chunk-R3OCP4A7.cjs → chunk-7YUCTU47.cjs} +62 -62
  7. package/dist/{chunk-R3OCP4A7.cjs.map → chunk-7YUCTU47.cjs.map} +1 -1
  8. package/dist/{chunk-FVHFBEXH.js → chunk-ANI7I7SC.js} +2 -2
  9. package/dist/{chunk-LM6NDYGD.js → chunk-B4AGHKHF.js} +2 -2
  10. package/dist/{chunk-DNPQ2U7P.js → chunk-BOFSW6J7.js} +2 -2
  11. package/dist/{chunk-DV4CSNZD.js → chunk-C7LWJWOO.js} +2 -2
  12. package/dist/{chunk-XDMRN3SG.cjs → chunk-CS34XXIX.cjs} +86 -86
  13. package/dist/{chunk-XDMRN3SG.cjs.map → chunk-CS34XXIX.cjs.map} +1 -1
  14. package/dist/{chunk-Z5FN5VTC.js → chunk-D2EOIZ7V.js} +2 -2
  15. package/dist/{chunk-FCCSHC3H.cjs → chunk-DEJC6ZID.cjs} +26 -26
  16. package/dist/{chunk-FCCSHC3H.cjs.map → chunk-DEJC6ZID.cjs.map} +1 -1
  17. package/dist/{chunk-UVGFICZT.js → chunk-KDTQMUUY.js} +6 -6
  18. package/dist/{chunk-VNWGXQJD.cjs → chunk-KYJSFHHH.cjs} +20 -20
  19. package/dist/{chunk-VNWGXQJD.cjs.map → chunk-KYJSFHHH.cjs.map} +1 -1
  20. package/dist/{chunk-53GNFRVQ.cjs → chunk-MO5EKODW.cjs} +7 -7
  21. package/dist/{chunk-53GNFRVQ.cjs.map → chunk-MO5EKODW.cjs.map} +1 -1
  22. package/dist/{chunk-CWQSUYVV.cjs → chunk-NBWJDAPF.cjs} +3 -3
  23. package/dist/{chunk-CWQSUYVV.cjs.map → chunk-NBWJDAPF.cjs.map} +1 -1
  24. package/dist/{chunk-3TKG7SW6.cjs → chunk-O3T4MB5D.cjs} +39 -39
  25. package/dist/{chunk-3TKG7SW6.cjs.map → chunk-O3T4MB5D.cjs.map} +1 -1
  26. package/dist/{chunk-IHXUZBBV.js → chunk-P7RPGV3I.js} +11 -3
  27. package/dist/{chunk-IHXUZBBV.js.map → chunk-P7RPGV3I.js.map} +1 -1
  28. package/dist/{chunk-R3TXAMMB.cjs → chunk-PCIN3YYW.cjs} +12 -4
  29. package/dist/chunk-PCIN3YYW.cjs.map +1 -0
  30. package/dist/{chunk-4VLGJEKQ.js → chunk-PG6NTQ72.js} +2 -2
  31. package/dist/{chunk-YUVCH2LX.js → chunk-QAFVP2NG.js} +5 -5
  32. package/dist/{chunk-5JHJX7OX.js → chunk-S4GVJZ7X.js} +4 -4
  33. package/dist/{chunk-N3OGB543.cjs → chunk-SPUVLKXS.cjs} +9 -9
  34. package/dist/{chunk-N3OGB543.cjs.map → chunk-SPUVLKXS.cjs.map} +1 -1
  35. package/dist/{chunk-C5HQCF4R.js → chunk-V3TJN4XI.js} +4 -4
  36. package/dist/{chunk-DHSIAIFG.cjs → chunk-VWTUHH6T.cjs} +11 -11
  37. package/dist/{chunk-DHSIAIFG.cjs.map → chunk-VWTUHH6T.cjs.map} +1 -1
  38. package/dist/{chunk-GYQHUJWR.cjs → chunk-XLZGBSNT.cjs} +14 -14
  39. package/dist/{chunk-GYQHUJWR.cjs.map → chunk-XLZGBSNT.cjs.map} +1 -1
  40. package/dist/{chunk-XL2G2HHJ.cjs → chunk-YMXR3AFK.cjs} +4 -4
  41. package/dist/{chunk-XL2G2HHJ.cjs.map → chunk-YMXR3AFK.cjs.map} +1 -1
  42. package/dist/{chunk-SI64DC72.cjs → chunk-ZF3TRQD2.cjs} +31 -31
  43. package/dist/{chunk-SI64DC72.cjs.map → chunk-ZF3TRQD2.cjs.map} +1 -1
  44. package/dist/components/case-studies/index.cjs +8 -8
  45. package/dist/components/case-studies/index.js +2 -2
  46. package/dist/components/chat/index.cjs +2 -2
  47. package/dist/components/chat/index.js +1 -1
  48. package/dist/components/contact/index.cjs +3 -3
  49. package/dist/components/contact/index.js +2 -2
  50. package/dist/components/docs/index.cjs +5 -5
  51. package/dist/components/docs/index.js +4 -4
  52. package/dist/components/embeds/index.cjs +3 -3
  53. package/dist/components/embeds/index.js +2 -2
  54. package/dist/components/faq/index.cjs +3 -3
  55. package/dist/components/faq/index.js +2 -2
  56. package/dist/components/features/index.cjs +4 -2
  57. package/dist/components/features/index.cjs.map +1 -1
  58. package/dist/components/features/index.js +3 -1
  59. package/dist/components/features/video-bites-shared.cjs +7 -0
  60. package/dist/components/features/video-bites-shared.cjs.map +1 -1
  61. package/dist/components/features/video-bites-shared.d.ts +10 -0
  62. package/dist/components/features/video-bites-shared.d.ts.map +1 -1
  63. package/dist/components/features/video-bites-shared.js +7 -1
  64. package/dist/components/features/video-bites-shared.js.map +1 -1
  65. package/dist/components/features/video-bites-strip.d.ts +5 -1
  66. package/dist/components/features/video-bites-strip.d.ts.map +1 -1
  67. package/dist/components/help-center-pages/index.cjs +22 -22
  68. package/dist/components/help-center-pages/index.js +13 -13
  69. package/dist/components/index.cjs +133 -131
  70. package/dist/components/index.cjs.map +1 -1
  71. package/dist/components/index.js +13 -11
  72. package/dist/components/index.js.map +1 -1
  73. package/dist/components/meeting-scheduler/index.cjs +28 -28
  74. package/dist/components/meeting-scheduler/index.js +3 -3
  75. package/dist/components/navigation/index.cjs +2 -2
  76. package/dist/components/navigation/index.js +1 -1
  77. package/dist/components/onboarding-guides/index.cjs +5 -5
  78. package/dist/components/onboarding-guides/index.js +4 -4
  79. package/dist/components/related-content/index.cjs +3 -3
  80. package/dist/components/related-content/index.js +2 -2
  81. package/dist/components/tickets/index.cjs +6 -6
  82. package/dist/components/tickets/index.js +5 -5
  83. package/dist/components/ui/index.cjs +2 -2
  84. package/dist/components/ui/index.js +1 -1
  85. package/dist/index.cjs +4 -2
  86. package/dist/index.cjs.map +1 -1
  87. package/dist/index.js +3 -1
  88. package/dist/types/video-processing.d.ts +1 -0
  89. package/dist/types/video-processing.d.ts.map +1 -1
  90. package/package.json +1 -1
  91. package/src/components/features/__tests__/video-bites-shared.test.ts +64 -0
  92. package/src/components/features/video-bites-shared.ts +16 -0
  93. package/src/components/features/video-bites-strip.tsx +7 -2
  94. package/src/types/video-processing.ts +1 -0
  95. package/dist/chunk-R3TXAMMB.cjs.map +0 -1
  96. /package/dist/{chunk-ZSZ24UY6.js.map → chunk-3H4NJO43.js.map} +0 -0
  97. /package/dist/{chunk-E26KVZJM.js.map → chunk-3KFGRSM7.js.map} +0 -0
  98. /package/dist/{chunk-S3NZZKNU.js.map → chunk-5OU7FNZD.js.map} +0 -0
  99. /package/dist/{chunk-FVHFBEXH.js.map → chunk-ANI7I7SC.js.map} +0 -0
  100. /package/dist/{chunk-LM6NDYGD.js.map → chunk-B4AGHKHF.js.map} +0 -0
  101. /package/dist/{chunk-DNPQ2U7P.js.map → chunk-BOFSW6J7.js.map} +0 -0
  102. /package/dist/{chunk-DV4CSNZD.js.map → chunk-C7LWJWOO.js.map} +0 -0
  103. /package/dist/{chunk-Z5FN5VTC.js.map → chunk-D2EOIZ7V.js.map} +0 -0
  104. /package/dist/{chunk-UVGFICZT.js.map → chunk-KDTQMUUY.js.map} +0 -0
  105. /package/dist/{chunk-4VLGJEKQ.js.map → chunk-PG6NTQ72.js.map} +0 -0
  106. /package/dist/{chunk-YUVCH2LX.js.map → chunk-QAFVP2NG.js.map} +0 -0
  107. /package/dist/{chunk-5JHJX7OX.js.map → chunk-S4GVJZ7X.js.map} +0 -0
  108. /package/dist/{chunk-C5HQCF4R.js.map → chunk-V3TJN4XI.js.map} +0 -0
@@ -0,0 +1,64 @@
1
+ import { describe, expect, it } from 'vitest'
2
+ import {
3
+ sortBitesByCreatedAtDesc,
4
+ sortBitesByFeaturedAtDesc,
5
+ } from '../video-bites-shared'
6
+ import type { VideoTeaser } from '../../../types/video-processing'
7
+
8
+ const bite = (overrides: Partial<VideoTeaser>): VideoTeaser => ({
9
+ url: `https://cdn.example/${Math.abs(JSON.stringify(overrides).length)}.mp4`,
10
+ ...overrides,
11
+ })
12
+
13
+ describe('sortBitesByCreatedAtDesc', () => {
14
+ it('orders newest created_at first', () => {
15
+ const a = bite({ created_at: '2026-01-01T00:00:00Z' })
16
+ const b = bite({ created_at: '2026-02-01T00:00:00Z' })
17
+ expect([a, b].sort(sortBitesByCreatedAtDesc)).toEqual([b, a])
18
+ })
19
+
20
+ it('sorts bites without created_at last', () => {
21
+ const dated = bite({ created_at: '2026-01-01T00:00:00Z' })
22
+ const undated = bite({})
23
+ expect([undated, dated].sort(sortBitesByCreatedAtDesc)).toEqual([dated, undated])
24
+ })
25
+ })
26
+
27
+ describe('sortBitesByFeaturedAtDesc', () => {
28
+ it('ranks a recently-featured OLD bite above a newer un-restamped one', () => {
29
+ // The 2026-08-18 homepage regression: an old clip starred today must
30
+ // outrank clips created later but featured earlier.
31
+ const oldClipFeaturedToday = bite({
32
+ created_at: '2026-07-14T00:00:00Z',
33
+ featured_at: '2026-08-18T00:00:00Z',
34
+ })
35
+ const newerClipNoStamp = bite({ created_at: '2026-07-17T00:00:00Z' })
36
+ expect([newerClipNoStamp, oldClipFeaturedToday].sort(sortBitesByFeaturedAtDesc)).toEqual([
37
+ oldClipFeaturedToday,
38
+ newerClipNoStamp,
39
+ ])
40
+ })
41
+
42
+ it('ranks by featured_at only — created_at never influences featured order', () => {
43
+ // No date-fallback ranking: all featured bites carry the stamp (write
44
+ // path + 2026-08-19 backfill).
45
+ const staleStampNewClip = bite({
46
+ created_at: '2026-08-01T00:00:00Z',
47
+ featured_at: '2026-01-01T00:00:00Z',
48
+ })
49
+ const freshStampOldClip = bite({
50
+ created_at: '2026-01-01T00:00:00Z',
51
+ featured_at: '2026-08-01T00:00:00Z',
52
+ })
53
+ expect([staleStampNewClip, freshStampOldClip].sort(sortBitesByFeaturedAtDesc)).toEqual([
54
+ freshStampOldClip,
55
+ staleStampNewClip,
56
+ ])
57
+ })
58
+
59
+ it('sorts unstamped bites last (mid-deploy transient only)', () => {
60
+ const stamped = bite({ featured_at: '2026-01-01T00:00:00Z' })
61
+ const bare = bite({ created_at: '2026-08-01T00:00:00Z' })
62
+ expect([bare, stamped].sort(sortBitesByFeaturedAtDesc)).toEqual([stamped, bare])
63
+ })
64
+ })
@@ -60,3 +60,19 @@ export function sortBitesByCreatedAtDesc(a: VideoTeaser, b: VideoTeaser): number
60
60
  if (!b.created_at) return -1
61
61
  return new Date(b.created_at).getTime() - new Date(a.created_at).getTime()
62
62
  }
63
+
64
+ /**
65
+ * FEATURED-recency comparator: `featured_at` DESC — the stamp every featured
66
+ * bite carries (written by the admin star toggle; pre-existing featured bites
67
+ * were backfilled 2026-08-19, so there is no date-fallback ranking). The
68
+ * comparator FEATURED surfaces (the cross-entity aggregation + its strips)
69
+ * must use — ranking those surfaces by `created_at` made featuring any older
70
+ * bite a silent no-op once the surface cap filled with newer bites. A missing
71
+ * stamp (only possible from a stale mid-deploy writer) sorts last.
72
+ */
73
+ export function sortBitesByFeaturedAtDesc(a: VideoTeaser, b: VideoTeaser): number {
74
+ if (!a.featured_at && !b.featured_at) return 0
75
+ if (!a.featured_at) return 1
76
+ if (!b.featured_at) return -1
77
+ return new Date(b.featured_at).getTime() - new Date(a.featured_at).getTime()
78
+ }
@@ -88,6 +88,10 @@ export interface VideoBitesStripProps {
88
88
  showChevrons?: boolean;
89
89
  /** Section-level navigation fallback (per-bite `href`/`onNavigate` win). */
90
90
  onBiteNavigate?: (bite: VideoBiteStripItem, index: number) => void;
91
+ /** Ordering comparator. Default `sortBitesByCreatedAtDesc`; FEATURED
92
+ * surfaces pass `sortBitesByFeaturedAtDesc` so display order matches the
93
+ * featured-recency ranking their server aggregation is capped by. */
94
+ sortComparator?: (a: VideoBiteStripItem, b: VideoBiteStripItem) => number;
91
95
  className?: string;
92
96
  }
93
97
 
@@ -110,12 +114,13 @@ export function VideoBitesStrip({
110
114
  cardHeightMobile = 300,
111
115
  showChevrons = true,
112
116
  onBiteNavigate,
117
+ sortComparator = sortBitesByCreatedAtDesc,
113
118
  className,
114
119
  }: VideoBitesStripProps): React.ReactElement | null {
115
120
  const items = useMemo(() => {
116
121
  const filtered = filterPublished ? bites.filter(b => b.published) : [...bites];
117
- return filtered.sort(sortBitesByCreatedAtDesc);
118
- }, [bites, filterPublished]);
122
+ return filtered.sort(sortComparator);
123
+ }, [bites, filterPublished, sortComparator]);
119
124
 
120
125
  // Preconnect Mux/Supabase origins once so first hover starts fast.
121
126
  const warmup = useVideoWarmup<HTMLDivElement>({ videoUrl: items[0]?.url || null });
@@ -19,6 +19,7 @@ export interface VideoTeaser {
19
19
  thumbnail_url?: string // Optional thumbnail image URL for video preview. If not provided, video player will show first frame automatically.
20
20
  published?: boolean // Controls visibility on public preview page (default: false, admin must select)
21
21
  featured?: boolean // Opts the bite into cross-entity featured pulls (homepage/configured surfaces). Independent of `published`.
22
+ featured_at?: string // ISO timestamp stamped when an admin features the bite (cleared on unfeature; all featured bites backfilled 2026-08-19). Featured surfaces rank by THIS — ranking by created_at made featuring an old bite invisible under the surface cap.
22
23
  source?: 'manual' | 'ai_generated' // Track origin of teaser
23
24
  created_at?: string // ISO timestamp for sorting (newer items first)
24
25
  start_time_ms?: number // Vizard extraction: clip start offset in the source video