@flamingo-stack/openframe-frontend-core 0.0.642 → 0.0.644-2208.6318.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 (136) hide show
  1. package/dist/chat-protocol/index.cjs +10 -3
  2. package/dist/chat-protocol/index.cjs.map +1 -1
  3. package/dist/chat-protocol/index.js +10 -3
  4. package/dist/chat-protocol/index.js.map +1 -1
  5. package/dist/chat-protocol/source-metadata.d.ts +7 -1
  6. package/dist/chat-protocol/source-metadata.d.ts.map +1 -1
  7. package/dist/{chunk-FRCUUK5X.cjs → chunk-2G47VKPD.cjs} +3 -3
  8. package/dist/{chunk-FRCUUK5X.cjs.map → chunk-2G47VKPD.cjs.map} +1 -1
  9. package/dist/{chunk-ZGPJ3NVF.js → chunk-3AUBCCTI.js} +3 -3
  10. package/dist/{chunk-OOOOC5O5.cjs → chunk-3ENJITQA.cjs} +29 -29
  11. package/dist/{chunk-OOOOC5O5.cjs.map → chunk-3ENJITQA.cjs.map} +1 -1
  12. package/dist/{chunk-6NHLZORM.js → chunk-3ENOAHWR.js} +6 -6
  13. package/dist/{chunk-3IPL6G7S.js → chunk-3W563UVF.js} +40 -10
  14. package/dist/chunk-3W563UVF.js.map +1 -0
  15. package/dist/{chunk-UFBWNVZZ.js → chunk-4WIS7COJ.js} +7 -7
  16. package/dist/{chunk-HW7BLVQH.js → chunk-53RGBCL7.js} +4 -4
  17. package/dist/{chunk-S254VEDE.js → chunk-5GAWR7RX.js} +3 -3
  18. package/dist/{chunk-O4LL7RQV.cjs → chunk-5QRNCWHS.cjs} +199 -199
  19. package/dist/{chunk-O4LL7RQV.cjs.map → chunk-5QRNCWHS.cjs.map} +1 -1
  20. package/dist/{chunk-MJ424FEC.js → chunk-6O2XNGUE.js} +2 -2
  21. package/dist/{chunk-XFLJC2WR.cjs → chunk-7FI2YKEU.cjs} +59 -59
  22. package/dist/{chunk-XFLJC2WR.cjs.map → chunk-7FI2YKEU.cjs.map} +1 -1
  23. package/dist/{chunk-N5C5P2LM.cjs → chunk-CTGCWBU3.cjs} +22 -22
  24. package/dist/{chunk-N5C5P2LM.cjs.map → chunk-CTGCWBU3.cjs.map} +1 -1
  25. package/dist/{chunk-YM6L3WM5.js → chunk-DSKO3GPD.js} +3 -3
  26. package/dist/{chunk-2Z5FPHOL.cjs → chunk-DYJQPJBW.cjs} +20 -20
  27. package/dist/{chunk-2Z5FPHOL.cjs.map → chunk-DYJQPJBW.cjs.map} +1 -1
  28. package/dist/{chunk-POPL3W2S.js → chunk-GLGERQO7.js} +3 -3
  29. package/dist/{chunk-2NRLRRMR.cjs → chunk-GSC2NB5C.cjs} +108 -78
  30. package/dist/chunk-GSC2NB5C.cjs.map +1 -0
  31. package/dist/{chunk-SDGMLXIP.js → chunk-JWRMSVNZ.js} +3 -3
  32. package/dist/{chunk-VHB3I6F3.cjs → chunk-K6KKARAF.cjs} +173 -153
  33. package/dist/chunk-K6KKARAF.cjs.map +1 -0
  34. package/dist/{chunk-VKPTN5MT.cjs → chunk-KCO7MZ34.cjs} +6 -6
  35. package/dist/{chunk-VKPTN5MT.cjs.map → chunk-KCO7MZ34.cjs.map} +1 -1
  36. package/dist/{chunk-XWGHLSAL.js → chunk-KCS64Q7P.js} +4 -4
  37. package/dist/{chunk-WL3PNUNY.cjs → chunk-KSSBW5W7.cjs} +81 -81
  38. package/dist/{chunk-WL3PNUNY.cjs.map → chunk-KSSBW5W7.cjs.map} +1 -1
  39. package/dist/{chunk-M4PJVFBF.cjs → chunk-LJ5VSU2Q.cjs} +11 -11
  40. package/dist/{chunk-M4PJVFBF.cjs.map → chunk-LJ5VSU2Q.cjs.map} +1 -1
  41. package/dist/{chunk-EW3MSJOE.cjs → chunk-M7NQPYQB.cjs} +33 -33
  42. package/dist/{chunk-EW3MSJOE.cjs.map → chunk-M7NQPYQB.cjs.map} +1 -1
  43. package/dist/{chunk-YRSRP4U3.cjs → chunk-ODZ4JBFQ.cjs} +15 -15
  44. package/dist/{chunk-YRSRP4U3.cjs.map → chunk-ODZ4JBFQ.cjs.map} +1 -1
  45. package/dist/{chunk-3LXJEXPH.js → chunk-QH6KJ4OZ.js} +2 -2
  46. package/dist/{chunk-ORFJVMAL.js → chunk-QX3K5SXC.js} +3 -3
  47. package/dist/{chunk-ZAIYD3MZ.js → chunk-REAWHAOH.js} +3 -3
  48. package/dist/{chunk-GEIHTN6J.cjs → chunk-S7UGTAIP.cjs} +10 -10
  49. package/dist/{chunk-GEIHTN6J.cjs.map → chunk-S7UGTAIP.cjs.map} +1 -1
  50. package/dist/{chunk-3I6XHQUD.js → chunk-TN46CQSO.js} +30 -10
  51. package/dist/{chunk-3I6XHQUD.js.map → chunk-TN46CQSO.js.map} +1 -1
  52. package/dist/{chunk-YE3TFNW6.cjs → chunk-V37CP6CT.cjs} +5 -5
  53. package/dist/{chunk-YE3TFNW6.cjs.map → chunk-V37CP6CT.cjs.map} +1 -1
  54. package/dist/{chunk-SE6YRE3R.cjs → chunk-W7VZHI37.cjs} +32 -32
  55. package/dist/{chunk-SE6YRE3R.cjs.map → chunk-W7VZHI37.cjs.map} +1 -1
  56. package/dist/{chunk-6GY6DFIH.js → chunk-WTUX4SNF.js} +6 -6
  57. package/dist/{chunk-QY25ZP2V.cjs → chunk-YCO7DTCF.cjs} +28 -28
  58. package/dist/{chunk-QY25ZP2V.cjs.map → chunk-YCO7DTCF.cjs.map} +1 -1
  59. package/dist/{chunk-J4RZVLLQ.js → chunk-YRGIQZSU.js} +5 -5
  60. package/dist/{chunk-M7QROULE.js → chunk-YRWXGZLV.js} +5 -5
  61. package/dist/{chunk-OYI3K5R6.cjs → chunk-ZAQ6CKTU.cjs} +6 -6
  62. package/dist/{chunk-OYI3K5R6.cjs.map → chunk-ZAQ6CKTU.cjs.map} +1 -1
  63. package/dist/components/case-studies/index.cjs +16 -16
  64. package/dist/components/case-studies/index.js +4 -4
  65. package/dist/components/chat/entity-cards/program-card.d.ts.map +1 -1
  66. package/dist/components/chat/index.cjs +3 -3
  67. package/dist/components/chat/index.js +2 -2
  68. package/dist/components/contact/index.cjs +5 -5
  69. package/dist/components/contact/index.js +4 -4
  70. package/dist/components/docs/index.cjs +8 -8
  71. package/dist/components/docs/index.js +7 -7
  72. package/dist/components/embeds/index.cjs +5 -5
  73. package/dist/components/embeds/index.js +4 -4
  74. package/dist/components/faq/index.cjs +5 -5
  75. package/dist/components/faq/index.js +4 -4
  76. package/dist/components/features/index.cjs +4 -4
  77. package/dist/components/features/index.js +3 -3
  78. package/dist/components/help-center-pages/index.cjs +24 -24
  79. package/dist/components/help-center-pages/index.js +15 -15
  80. package/dist/components/index.cjs +53 -53
  81. package/dist/components/index.js +15 -15
  82. package/dist/components/meeting-scheduler/index.cjs +34 -34
  83. package/dist/components/meeting-scheduler/index.js +3 -3
  84. package/dist/components/navigation/index.cjs +7 -7
  85. package/dist/components/navigation/index.js +6 -6
  86. package/dist/components/onboarding-guides/index.cjs +7 -7
  87. package/dist/components/onboarding-guides/index.js +6 -6
  88. package/dist/components/related-content/index.cjs +3 -3
  89. package/dist/components/related-content/index.js +2 -2
  90. package/dist/components/tickets/index.cjs +8 -8
  91. package/dist/components/tickets/index.js +7 -7
  92. package/dist/components/ui/drawer.d.ts +19 -5
  93. package/dist/components/ui/drawer.d.ts.map +1 -1
  94. package/dist/components/ui/index.cjs +4 -4
  95. package/dist/components/ui/index.js +3 -3
  96. package/dist/index.cjs +10 -8
  97. package/dist/index.cjs.map +1 -1
  98. package/dist/index.js +9 -7
  99. package/dist/index.js.map +1 -1
  100. package/dist/utils/format.d.ts +39 -4
  101. package/dist/utils/format.d.ts.map +1 -1
  102. package/dist/utils/index.cjs +25 -2
  103. package/dist/utils/index.cjs.map +1 -1
  104. package/dist/utils/index.d.ts +1 -1
  105. package/dist/utils/index.d.ts.map +1 -1
  106. package/dist/utils/index.js +25 -3
  107. package/dist/utils/index.js.map +1 -1
  108. package/package.json +1 -1
  109. package/src/chat-protocol/__tests__/source-metadata.test.ts +49 -0
  110. package/src/chat-protocol/source-metadata.ts +46 -6
  111. package/src/components/chat/entity-cards/program-card.tsx +46 -8
  112. package/src/components/ui/.drawer.md +1 -0
  113. package/src/components/ui/__tests__/drawer-size.test.tsx +38 -0
  114. package/src/components/ui/drawer.tsx +44 -9
  115. package/src/utils/__tests__/format-program-dates.test.ts +91 -0
  116. package/src/utils/format.ts +79 -7
  117. package/src/utils/index.ts +2 -0
  118. package/dist/chunk-2NRLRRMR.cjs.map +0 -1
  119. package/dist/chunk-3IPL6G7S.js.map +0 -1
  120. package/dist/chunk-VHB3I6F3.cjs.map +0 -1
  121. /package/dist/{chunk-ZGPJ3NVF.js.map → chunk-3AUBCCTI.js.map} +0 -0
  122. /package/dist/{chunk-6NHLZORM.js.map → chunk-3ENOAHWR.js.map} +0 -0
  123. /package/dist/{chunk-UFBWNVZZ.js.map → chunk-4WIS7COJ.js.map} +0 -0
  124. /package/dist/{chunk-HW7BLVQH.js.map → chunk-53RGBCL7.js.map} +0 -0
  125. /package/dist/{chunk-S254VEDE.js.map → chunk-5GAWR7RX.js.map} +0 -0
  126. /package/dist/{chunk-MJ424FEC.js.map → chunk-6O2XNGUE.js.map} +0 -0
  127. /package/dist/{chunk-YM6L3WM5.js.map → chunk-DSKO3GPD.js.map} +0 -0
  128. /package/dist/{chunk-POPL3W2S.js.map → chunk-GLGERQO7.js.map} +0 -0
  129. /package/dist/{chunk-SDGMLXIP.js.map → chunk-JWRMSVNZ.js.map} +0 -0
  130. /package/dist/{chunk-XWGHLSAL.js.map → chunk-KCS64Q7P.js.map} +0 -0
  131. /package/dist/{chunk-3LXJEXPH.js.map → chunk-QH6KJ4OZ.js.map} +0 -0
  132. /package/dist/{chunk-ORFJVMAL.js.map → chunk-QX3K5SXC.js.map} +0 -0
  133. /package/dist/{chunk-ZAIYD3MZ.js.map → chunk-REAWHAOH.js.map} +0 -0
  134. /package/dist/{chunk-6GY6DFIH.js.map → chunk-WTUX4SNF.js.map} +0 -0
  135. /package/dist/{chunk-J4RZVLLQ.js.map → chunk-YRGIQZSU.js.map} +0 -0
  136. /package/dist/{chunk-M7QROULE.js.map → chunk-YRWXGZLV.js.map} +0 -0
@@ -171,7 +171,7 @@ import {
171
171
  safeHref,
172
172
  sortBitesByCreatedAtDesc,
173
173
  useCoverImageFallback
174
- } from "./chunk-3IPL6G7S.js";
174
+ } from "./chunk-3W563UVF.js";
175
175
  import {
176
176
  next_image_default
177
177
  } from "./chunk-MDKCTSDS.js";
@@ -18247,15 +18247,22 @@ function text(value) {
18247
18247
  function nullableText(value) {
18248
18248
  return value === null ? null : text(value);
18249
18249
  }
18250
+ var UNSAFE_URL_CHARS = /[\u0000-\u001f\u007f\u200b-\u200d\u2028\u2029\ufeff]/;
18250
18251
  function httpsUrl(value) {
18251
18252
  const candidate = text(value);
18252
- if (!candidate) return void 0;
18253
+ if (!candidate || UNSAFE_URL_CHARS.test(candidate)) return void 0;
18253
18254
  try {
18254
18255
  return new URL(candidate).protocol === "https:" ? candidate : void 0;
18255
18256
  } catch {
18256
18257
  return void 0;
18257
18258
  }
18258
18259
  }
18260
+ function linkUrl(value) {
18261
+ const candidate = text(value);
18262
+ if (!candidate || UNSAFE_URL_CHARS.test(candidate)) return void 0;
18263
+ if (candidate.startsWith("/")) return candidate.startsWith("//") ? void 0 : candidate;
18264
+ return httpsUrl(candidate);
18265
+ }
18259
18266
  function youtubeVideoId(value) {
18260
18267
  const candidate = text(value);
18261
18268
  if (!candidate) return void 0;
@@ -18277,7 +18284,7 @@ function sourceItems(value) {
18277
18284
  const documentType = text(item.documentType);
18278
18285
  const name = text(item.name);
18279
18286
  if (!id || !documentType || !name) return [];
18280
- const externalUrl = httpsUrl(item.externalUrl);
18287
+ const externalUrl = linkUrl(item.externalUrl);
18281
18288
  const targetPlatform = nullableText(item.targetPlatform);
18282
18289
  const path = nullableText(item.path);
18283
18290
  return [
@@ -18306,7 +18313,7 @@ function sources(value) {
18306
18313
  claimed.add(index);
18307
18314
  const path = text(candidate.path);
18308
18315
  const documentType = text(candidate.documentType);
18309
- const externalUrl = httpsUrl(candidate.externalUrl);
18316
+ const externalUrl = linkUrl(candidate.externalUrl);
18310
18317
  const targetPlatform = nullableText(candidate.targetPlatform);
18311
18318
  const id = text(candidate.id);
18312
18319
  const sourceRepo = text(candidate.sourceRepo);
@@ -23604,9 +23611,20 @@ var drawerPanelVariants = cva2(
23604
23611
  flush: {
23605
23612
  false: "gap-4 rounded-md border border-ods-border p-4",
23606
23613
  true: ""
23614
+ },
23615
+ /** Panel size along the axis the drawer slides on. `default` leaves it to
23616
+ * the content (or `resizable`); `wide` is the admin detail panel, 90% of
23617
+ * the viewport. Set the size here, never with a width class. */
23618
+ size: {
23619
+ default: "",
23620
+ wide: ""
23607
23621
  }
23608
23622
  },
23609
23623
  compoundVariants: [
23624
+ { side: "right", size: "wide", class: "w-[90vw]" },
23625
+ { side: "left", size: "wide", class: "w-[90vw]" },
23626
+ { side: "top", size: "wide", class: "h-[90vh]" },
23627
+ { side: "bottom", size: "wide", class: "h-[90vh]" },
23610
23628
  // flush=true → drops inner padding/gap so the consumer fully owns
23611
23629
  // internal layout, BUT preserves the card chrome (rounded + border)
23612
23630
  // on desktop so the panel still reads as an elevated card.
@@ -23618,7 +23636,8 @@ var drawerPanelVariants = cva2(
23618
23636
  ],
23619
23637
  defaultVariants: {
23620
23638
  side: "right",
23621
- flush: false
23639
+ flush: false,
23640
+ size: "default"
23622
23641
  }
23623
23642
  }
23624
23643
  );
@@ -23754,6 +23773,7 @@ var DrawerContent = forwardRef26(
23754
23773
  ({
23755
23774
  side = "right",
23756
23775
  flush = false,
23776
+ size: size2 = "default",
23757
23777
  resizable = false,
23758
23778
  minSize = 320,
23759
23779
  maxSize = 1280,
@@ -23783,7 +23803,7 @@ var DrawerContent = forwardRef26(
23783
23803
  mq.addEventListener("change", update);
23784
23804
  return () => mq.removeEventListener("change", update);
23785
23805
  }, [mobileBreakpoint]);
23786
- const { size: size2, setSize } = useResizableSize({
23806
+ const { size: resizedSize, setSize } = useResizableSize({
23787
23807
  enabled: resizable,
23788
23808
  isHorizontal,
23789
23809
  minSize,
@@ -23792,7 +23812,7 @@ var DrawerContent = forwardRef26(
23792
23812
  storageKey
23793
23813
  });
23794
23814
  const applyInlineSize = resizable && !isMobile;
23795
- const sizeStyle = applyInlineSize ? isHorizontal ? { width: size2 } : { height: size2 } : {};
23815
+ const sizeStyle = applyInlineSize ? isHorizontal ? { width: resizedSize } : { height: resizedSize } : {};
23796
23816
  return /* @__PURE__ */ jsxs74(DrawerPortal, { children: [
23797
23817
  /* @__PURE__ */ jsx96(DrawerOverlay, { className: overlayClassName }),
23798
23818
  /* @__PURE__ */ jsxs74(
@@ -23807,7 +23827,7 @@ var DrawerContent = forwardRef26(
23807
23827
  DrawerResizeHandle,
23808
23828
  {
23809
23829
  side: resolvedSide,
23810
- size: size2,
23830
+ size: resizedSize,
23811
23831
  minSize,
23812
23832
  maxSize,
23813
23833
  onSize: setSize,
@@ -23817,7 +23837,7 @@ var DrawerContent = forwardRef26(
23817
23837
  /* @__PURE__ */ jsx96(
23818
23838
  "div",
23819
23839
  {
23820
- className: cn(drawerPanelVariants({ side, flush }), className, panelClassName),
23840
+ className: cn(drawerPanelVariants({ side, flush, size: size2 }), className, panelClassName),
23821
23841
  style: { ...sizeStyle, ...panelStyle },
23822
23842
  children
23823
23843
  }
@@ -25954,4 +25974,4 @@ export {
25954
25974
  buildStreamFrames,
25955
25975
  EmbeddableChat
25956
25976
  };
25957
- //# sourceMappingURL=chunk-3I6XHQUD.js.map
25977
+ //# sourceMappingURL=chunk-TN46CQSO.js.map