@flamingo-stack/openframe-frontend-core 0.0.536-1778.4676.1 → 0.0.536-1778.4685.1

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 (92) hide show
  1. package/dist/{chunk-CD4XGNH2.js → chunk-2RJUEOY7.js} +6 -6
  2. package/dist/{chunk-NM6NAFQT.js → chunk-35M7NYWB.js} +83 -35
  3. package/dist/{chunk-NM6NAFQT.js.map → chunk-35M7NYWB.js.map} +1 -1
  4. package/dist/{chunk-V5CLVPC5.cjs → chunk-3NDIR7SZ.cjs} +3 -3
  5. package/dist/{chunk-V5CLVPC5.cjs.map → chunk-3NDIR7SZ.cjs.map} +1 -1
  6. package/dist/{chunk-35HJWDSE.js → chunk-4BD6J5FH.js} +2 -2
  7. package/dist/{chunk-DI3AOMOK.js → chunk-5QUZQYVT.js} +4 -4
  8. package/dist/{chunk-LAOBSYPP.cjs → chunk-6CLC3HYE.cjs} +9 -9
  9. package/dist/{chunk-LAOBSYPP.cjs.map → chunk-6CLC3HYE.cjs.map} +1 -1
  10. package/dist/{chunk-IBRVCSUS.js → chunk-BRCYUQGE.js} +2 -2
  11. package/dist/{chunk-UHMEQV3R.cjs → chunk-CHSSBFA7.cjs} +361 -313
  12. package/dist/chunk-CHSSBFA7.cjs.map +1 -0
  13. package/dist/{chunk-JORXLWUG.cjs → chunk-IO2GC36F.cjs} +4 -4
  14. package/dist/{chunk-JORXLWUG.cjs.map → chunk-IO2GC36F.cjs.map} +1 -1
  15. package/dist/{chunk-DTQBDTHC.js → chunk-JE5MYJYV.js} +2 -2
  16. package/dist/{chunk-M6THKZRN.cjs → chunk-JHSGV3EX.cjs} +7 -7
  17. package/dist/{chunk-M6THKZRN.cjs.map → chunk-JHSGV3EX.cjs.map} +1 -1
  18. package/dist/{chunk-5TRVVJFZ.cjs → chunk-K6DEWXLW.cjs} +26 -26
  19. package/dist/{chunk-5TRVVJFZ.cjs.map → chunk-K6DEWXLW.cjs.map} +1 -1
  20. package/dist/{chunk-WHMH4MGE.cjs → chunk-KQIST7UC.cjs} +26 -26
  21. package/dist/{chunk-WHMH4MGE.cjs.map → chunk-KQIST7UC.cjs.map} +1 -1
  22. package/dist/{chunk-LTJETQPK.cjs → chunk-MVAK6OXY.cjs} +5 -5
  23. package/dist/{chunk-LTJETQPK.cjs.map → chunk-MVAK6OXY.cjs.map} +1 -1
  24. package/dist/{chunk-TEDZWAUV.js → chunk-OJGIQARL.js} +2 -2
  25. package/dist/{chunk-PK4ZIDZ6.js → chunk-OQ6MZRAX.js} +5 -5
  26. package/dist/{chunk-T7TA2BPO.cjs → chunk-PATOX7TN.cjs} +61 -61
  27. package/dist/{chunk-T7TA2BPO.cjs.map → chunk-PATOX7TN.cjs.map} +1 -1
  28. package/dist/{chunk-YEOX4DHT.js → chunk-PXW3VFBF.js} +2 -2
  29. package/dist/{chunk-GRBJN3OW.cjs → chunk-RBX6IGLO.cjs} +11 -11
  30. package/dist/{chunk-GRBJN3OW.cjs.map → chunk-RBX6IGLO.cjs.map} +1 -1
  31. package/dist/{chunk-IDJTNJYM.js → chunk-RR5GNSLP.js} +2 -2
  32. package/dist/{chunk-Z6FWOOHV.cjs → chunk-RTEDTX3C.cjs} +31 -31
  33. package/dist/{chunk-Z6FWOOHV.cjs.map → chunk-RTEDTX3C.cjs.map} +1 -1
  34. package/dist/{chunk-GTJRJQAM.js → chunk-TASLBSU7.js} +4 -4
  35. package/dist/{chunk-GTFLIIG4.js → chunk-TIQBN6BS.js} +2 -2
  36. package/dist/{chunk-CUIXTNT3.cjs → chunk-UGJECGZ3.cjs} +87 -87
  37. package/dist/{chunk-CUIXTNT3.cjs.map → chunk-UGJECGZ3.cjs.map} +1 -1
  38. package/dist/{chunk-IDPP2IQ6.cjs → chunk-VHK6MYSU.cjs} +37 -37
  39. package/dist/{chunk-IDPP2IQ6.cjs.map → chunk-VHK6MYSU.cjs.map} +1 -1
  40. package/dist/{chunk-DHFVFGXD.cjs → chunk-X4N7BL6J.cjs} +14 -14
  41. package/dist/{chunk-DHFVFGXD.cjs.map → chunk-X4N7BL6J.cjs.map} +1 -1
  42. package/dist/{chunk-5YQ6EB6V.js → chunk-XGV7YP5Z.js} +2 -2
  43. package/dist/{chunk-IQILKU2E.js → chunk-YJGBU6CR.js} +2 -2
  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/entity-cards/dispatch.d.ts.map +1 -1
  47. package/dist/components/chat/index.cjs +2 -2
  48. package/dist/components/chat/index.js +1 -1
  49. package/dist/components/contact/index.cjs +3 -3
  50. package/dist/components/contact/index.js +2 -2
  51. package/dist/components/docs/index.cjs +5 -5
  52. package/dist/components/docs/index.js +4 -4
  53. package/dist/components/embeds/index.cjs +3 -3
  54. package/dist/components/embeds/index.js +2 -2
  55. package/dist/components/faq/index.cjs +3 -3
  56. package/dist/components/faq/index.js +2 -2
  57. package/dist/components/features/index.cjs +2 -2
  58. package/dist/components/features/index.js +1 -1
  59. package/dist/components/help-center-pages/index.cjs +22 -22
  60. package/dist/components/help-center-pages/index.js +13 -13
  61. package/dist/components/index.cjs +132 -132
  62. package/dist/components/index.js +11 -11
  63. package/dist/components/meeting-scheduler/index.cjs +34 -34
  64. package/dist/components/meeting-scheduler/index.js +3 -3
  65. package/dist/components/navigation/index.cjs +2 -2
  66. package/dist/components/navigation/index.js +1 -1
  67. package/dist/components/onboarding-guides/index.cjs +5 -5
  68. package/dist/components/onboarding-guides/index.js +4 -4
  69. package/dist/components/related-content/index.cjs +3 -3
  70. package/dist/components/related-content/index.js +2 -2
  71. package/dist/components/tickets/index.cjs +6 -6
  72. package/dist/components/tickets/index.js +5 -5
  73. package/dist/components/ui/index.cjs +2 -2
  74. package/dist/components/ui/index.js +1 -1
  75. package/dist/index.cjs +2 -2
  76. package/dist/index.js +1 -1
  77. package/package.json +1 -1
  78. package/src/components/chat/entity-cards/dispatch.tsx +156 -85
  79. package/dist/chunk-UHMEQV3R.cjs.map +0 -1
  80. /package/dist/{chunk-CD4XGNH2.js.map → chunk-2RJUEOY7.js.map} +0 -0
  81. /package/dist/{chunk-35HJWDSE.js.map → chunk-4BD6J5FH.js.map} +0 -0
  82. /package/dist/{chunk-DI3AOMOK.js.map → chunk-5QUZQYVT.js.map} +0 -0
  83. /package/dist/{chunk-IBRVCSUS.js.map → chunk-BRCYUQGE.js.map} +0 -0
  84. /package/dist/{chunk-DTQBDTHC.js.map → chunk-JE5MYJYV.js.map} +0 -0
  85. /package/dist/{chunk-TEDZWAUV.js.map → chunk-OJGIQARL.js.map} +0 -0
  86. /package/dist/{chunk-PK4ZIDZ6.js.map → chunk-OQ6MZRAX.js.map} +0 -0
  87. /package/dist/{chunk-YEOX4DHT.js.map → chunk-PXW3VFBF.js.map} +0 -0
  88. /package/dist/{chunk-IDJTNJYM.js.map → chunk-RR5GNSLP.js.map} +0 -0
  89. /package/dist/{chunk-GTJRJQAM.js.map → chunk-TASLBSU7.js.map} +0 -0
  90. /package/dist/{chunk-GTFLIIG4.js.map → chunk-TIQBN6BS.js.map} +0 -0
  91. /package/dist/{chunk-5YQ6EB6V.js.map → chunk-XGV7YP5Z.js.map} +0 -0
  92. /package/dist/{chunk-IQILKU2E.js.map → chunk-YJGBU6CR.js.map} +0 -0
@@ -1,16 +1,16 @@
1
1
  "use client";
2
2
  import {
3
3
  PersistentPaginationWrapper
4
- } from "./chunk-GTFLIIG4.js";
4
+ } from "./chunk-TIQBN6BS.js";
5
5
  import {
6
6
  DeliveryRow
7
- } from "./chunk-IQILKU2E.js";
7
+ } from "./chunk-YJGBU6CR.js";
8
8
  import {
9
9
  EmptyState
10
- } from "./chunk-DTQBDTHC.js";
10
+ } from "./chunk-JE5MYJYV.js";
11
11
  import {
12
12
  DetailPageSkeleton
13
- } from "./chunk-TEDZWAUV.js";
13
+ } from "./chunk-OJGIQARL.js";
14
14
  import {
15
15
  useSelfFetch
16
16
  } from "./chunk-LQPHB2YF.js";
@@ -45,7 +45,7 @@ import {
45
45
  resolveContentHref,
46
46
  toStripProfile,
47
47
  useEntityCardLink
48
- } from "./chunk-NM6NAFQT.js";
48
+ } from "./chunk-35M7NYWB.js";
49
49
  import {
50
50
  STICKY_HEADER_OFFSET_PX,
51
51
  contentFetch,
@@ -1303,4 +1303,4 @@ export {
1303
1303
  useLegalDocs,
1304
1304
  LegalDocumentPage
1305
1305
  };
1306
- //# sourceMappingURL=chunk-CD4XGNH2.js.map
1306
+ //# sourceMappingURL=chunk-2RJUEOY7.js.map
@@ -51838,32 +51838,67 @@ function hubspotStatusToVariant(status) {
51838
51838
  if (s === "OPEN") return "warning";
51839
51839
  return "grey";
51840
51840
  }
51841
- function mergeFetchedFaqRef(item, chatRef) {
51842
- if (!item || typeof item !== "object") return chatRef;
51841
+ function decodeVideoMarkerId(id) {
51842
+ const mux = id.match(/^mux-([A-Za-z0-9_-]+)$/);
51843
+ if (mux) {
51844
+ if (/^[0-9a-f]{10}$/.test(mux[1])) return null;
51845
+ return { videoUrl: `https://stream.mux.com/${mux[1]}.m3u8` };
51846
+ }
51847
+ const mp4 = id.match(/^mp4-([A-Za-z0-9_-]+)$/);
51848
+ if (mp4) {
51849
+ if (/^[0-9a-f]{10}$/.test(mp4[1])) return null;
51850
+ try {
51851
+ const b64 = mp4[1].replace(/-/g, "+").replace(/_/g, "/");
51852
+ const url = atob(b64);
51853
+ if (!/^https:\/\//.test(url)) return null;
51854
+ return { videoUrl: url };
51855
+ } catch {
51856
+ return null;
51857
+ }
51858
+ }
51859
+ if (/^[A-Za-z0-9_-]{11}$/.test(id)) return { youtubeUrl: id };
51860
+ return null;
51861
+ }
51862
+ function itemVideoMetadata(item) {
51863
+ const pick = (...vals) => {
51864
+ for (const v of vals) if (typeof v === "string" && v.length > 0) return v;
51865
+ return void 0;
51866
+ };
51867
+ const m = item?.metadata ?? {};
51868
+ const out = {};
51869
+ const videoUrl = pick(m.videoUrl, item?.custom_video_url, item?.main_video_url);
51870
+ const youtubeUrl = pick(m.youtubeUrl, item?.youtube_url);
51871
+ const highlightVideoUrl = pick(m.highlightVideoUrl, item?.highlight_video_url);
51872
+ const videoPoster = pick(
51873
+ m.videoPoster,
51874
+ item?.main_video_thumbnail,
51875
+ item?.highlight_video_thumbnail
51876
+ );
51877
+ if (videoUrl) out.videoUrl = videoUrl;
51878
+ if (youtubeUrl) out.youtubeUrl = youtubeUrl;
51879
+ if (highlightVideoUrl) out.highlightVideoUrl = highlightVideoUrl;
51880
+ if (videoPoster) out.videoPoster = videoPoster;
51881
+ return out.videoUrl || out.youtubeUrl || out.highlightVideoUrl ? out : null;
51882
+ }
51883
+ function fetchedItemDisplayRef(item, chatRef) {
51843
51884
  const it = item;
51844
- const answer = typeof it.answer === "string" && it.answer.trim().length > 0 ? it.answer.trim() : null;
51845
51885
  return {
51846
- ...chatRef,
51847
- title: typeof it.question === "string" && it.question ? it.question : chatRef.title,
51848
- preview: answer ? answer.length > 400 ? `${answer.slice(0, 397)}\u2026` : answer : chatRef.preview,
51849
- metadata: {
51850
- ...chatRef.metadata ?? {},
51851
- ...typeof it.section === "string" && it.section ? { section: it.section } : {}
51852
- }
51886
+ ...it,
51887
+ url: chatRef.url ?? it.url ?? null,
51888
+ targetPlatform: chatRef.targetPlatform ?? it.targetPlatform ?? null
51853
51889
  };
51854
51890
  }
51855
- function mergeFetchedRefOverlay(item, chatRef) {
51856
- if (!item || typeof item !== "object") return chatRef;
51891
+ function fetchedFaqDisplayRef(item, chatRef) {
51857
51892
  const it = item;
51893
+ const answer = typeof it?.answer === "string" && it.answer.trim().length > 0 ? it.answer.trim() : null;
51858
51894
  return {
51859
- ...chatRef,
51860
- title: typeof it.title === "string" && it.title ? it.title : chatRef.title,
51861
- preview: typeof it.preview === "string" && it.preview ? it.preview : chatRef.preview,
51862
- date: typeof it.date === "string" && it.date ? it.date : chatRef.date,
51863
- metadata: {
51864
- ...chatRef.metadata ?? {},
51865
- ...it.metadata && typeof it.metadata === "object" ? it.metadata : {}
51866
- }
51895
+ type: "faq",
51896
+ id: chatRef.id,
51897
+ sourceRepo: chatRef.sourceRepo,
51898
+ title: typeof it?.question === "string" && it.question ? it.question : chatRef.id,
51899
+ url: chatRef.url ?? null,
51900
+ ...answer ? { preview: answer.length > 400 ? `${answer.slice(0, 397)}\u2026` : answer } : {},
51901
+ metadata: typeof it?.section === "string" && it.section ? { section: it.section } : {}
51867
51902
  };
51868
51903
  }
51869
51904
  function HubspotTicketChatCard({
@@ -52299,9 +52334,8 @@ function refHydratedEntry(docType, label, renderRef) {
52299
52334
  contentRefType: docType,
52300
52335
  noComposedHref: true,
52301
52336
  fallbackHref: (item) => item?.url ?? null,
52302
- refFallback: true,
52303
52337
  skeleton: () => /* @__PURE__ */ jsx385(MingoInfoCardSkeleton, {}),
52304
- render: (item, chatRef, opts) => renderRef(mergeFetchedRefOverlay(item, chatRef), opts)
52338
+ render: (item, chatRef, opts) => renderRef(fetchedItemDisplayRef(item, chatRef), opts)
52305
52339
  };
52306
52340
  }
52307
52341
  var FINANCIAL_CARD_CONFIGS = {
@@ -52433,21 +52467,20 @@ var CHAT_CARD_REGISTRY = {
52433
52467
  },
52434
52468
  slack_message: refHydratedEntry("slack_message", "Slack message", (displayRef, opts) => /* @__PURE__ */ jsx385(SlackChatCard, { chatRef: displayRef, isNewTab: opts.isNewTab, discuss: opts.discuss })),
52435
52469
  // FAQ hydrates from its EXISTING public list API (`/api/faqs?ids=` —
52436
- // also feeding related-content rails, so its base path must not move
52437
- // to the generic endpoint). Rows are faq-shaped, not ChatRef-shaped,
52438
- // hence the bespoke overlay instead of `refHydratedEntry`.
52470
+ // also feeding related-content rails, so its base path must not move).
52471
+ // Rows are faq-shaped, not ChatRef-shaped, hence the bespoke row→display
52472
+ // mapping instead of `refHydratedEntry`.
52439
52473
  faq: {
52440
52474
  label: "FAQ",
52441
52475
  bareInline: true,
52442
52476
  contentRefType: "faq",
52443
52477
  noComposedHref: true,
52444
52478
  fallbackHref: (item) => item?.id != null ? `/faqs#${faqItemAnchor(item.id)}` : null,
52445
- refFallback: true,
52446
52479
  skeleton: () => /* @__PURE__ */ jsx385(MingoInfoCardSkeleton, {}),
52447
52480
  render: (item, chatRef, opts) => /* @__PURE__ */ jsx385(
52448
52481
  FaqChatCard,
52449
52482
  {
52450
- chatRef: mergeFetchedFaqRef(item, chatRef),
52483
+ chatRef: fetchedFaqDisplayRef(item, chatRef),
52451
52484
  isNewTab: opts.isNewTab,
52452
52485
  discuss: opts.discuss
52453
52486
  }
@@ -52761,10 +52794,9 @@ function ChatCardLoader({
52761
52794
  if (!finalChatRef.sourceRepo) return null;
52762
52795
  return finish(entry.render(void 0, finalChatRef, renderOpts));
52763
52796
  }
52764
- const refFallbackNode = fetchEntry.refFallback && finalChatRef.sourceRepo ? () => finish(fetchEntry.render(void 0, finalChatRef, renderOpts)) : null;
52765
- if (isLoading) return refFallbackNode ? refFallbackNode() : /* @__PURE__ */ jsx385(Fragment88, { children: fetchEntry.skeleton?.() ?? null });
52797
+ if (isLoading) return /* @__PURE__ */ jsx385(Fragment88, { children: fetchEntry.skeleton?.() ?? null });
52766
52798
  if (!item) {
52767
- if (isError) return refFallbackNode ? refFallbackNode() : null;
52799
+ if (isError) return null;
52768
52800
  if (!isFetched) return null;
52769
52801
  if (finalChatRef.sourceRepo) {
52770
52802
  return /* @__PURE__ */ jsx385(
@@ -52778,12 +52810,18 @@ function ChatCardLoader({
52778
52810
  }
52779
52811
  return null;
52780
52812
  }
52813
+ const videoMeta = itemVideoMetadata(item);
52814
+ if (videoMeta) {
52815
+ const videoRef = {
52816
+ ...finalChatRef,
52817
+ metadata: { ...finalChatRef.metadata ?? {}, ...videoMeta }
52818
+ };
52819
+ return /* @__PURE__ */ jsx385(BlockCard, { inline: finish(entry.render(item, finalChatRef, renderOpts)), children: /* @__PURE__ */ jsx385(ChatVideoEntityCard, { chatRef: videoRef }) });
52820
+ }
52781
52821
  return finish(entry.render(item, finalChatRef, renderOpts));
52782
52822
  }
52783
52823
  function renderChatInlineEntityCard(chatRef, options = {}) {
52784
52824
  const { onDiscuss, onDisplay, baseRoute, chipBasePlatform, extras } = options;
52785
- const m = chatRef.metadata ?? {};
52786
- const hasVideo = typeof m.videoUrl === "string" && m.videoUrl.length > 0 || typeof m.youtubeUrl === "string" && m.youtubeUrl.length > 0 || typeof m.highlightVideoUrl === "string" && m.highlightVideoUrl.length > 0;
52787
52825
  const loader = /* @__PURE__ */ jsx385(
52788
52826
  ChatCardLoader,
52789
52827
  {
@@ -52795,8 +52833,18 @@ function renderChatInlineEntityCard(chatRef, options = {}) {
52795
52833
  extras
52796
52834
  }
52797
52835
  );
52798
- if (hasVideo) {
52799
- return /* @__PURE__ */ jsx385(BlockCard, { inline: loader, children: /* @__PURE__ */ jsx385(ChatVideoEntityCard, { chatRef }) });
52836
+ if (chatRef.type === "video") {
52837
+ const decoded = decodeVideoMarkerId(chatRef.id);
52838
+ if (decoded) {
52839
+ const displayRef = {
52840
+ ...chatRef,
52841
+ title: chatRef.title && chatRef.title !== chatRef.id ? chatRef.title : "Video",
52842
+ url: chatRef.url ?? (decoded.videoUrl ?? (decoded.youtubeUrl ? `https://www.youtube.com/watch?v=${decoded.youtubeUrl}` : null)),
52843
+ metadata: { ...chatRef.metadata ?? {}, ...decoded }
52844
+ };
52845
+ return /* @__PURE__ */ jsx385(BlockCard, { inline: /* @__PURE__ */ jsx385(ChatInlineVideoPill, { chatRef: displayRef }), children: /* @__PURE__ */ jsx385(ChatVideoEntityCard, { chatRef: displayRef }) });
52846
+ }
52847
+ return loader;
52800
52848
  }
52801
52849
  return loader;
52802
52850
  }
@@ -62170,4 +62218,4 @@ export {
62170
62218
  LogsList,
62171
62219
  assets
62172
62220
  };
62173
- //# sourceMappingURL=chunk-NM6NAFQT.js.map
62221
+ //# sourceMappingURL=chunk-35M7NYWB.js.map