@flamingo-stack/openframe-frontend-core 0.0.473 → 0.0.474

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 (116) hide show
  1. package/dist/{chunk-4EU6WL5O.cjs → chunk-2R5NM3FC.cjs} +40 -40
  2. package/dist/{chunk-4EU6WL5O.cjs.map → chunk-2R5NM3FC.cjs.map} +1 -1
  3. package/dist/{chunk-B52SBOUY.js → chunk-3NNCBZEM.js} +6 -6
  4. package/dist/{chunk-KP37QDNS.cjs → chunk-464NJS2W.cjs} +73 -73
  5. package/dist/{chunk-KP37QDNS.cjs.map → chunk-464NJS2W.cjs.map} +1 -1
  6. package/dist/{chunk-CDBQQA7V.cjs → chunk-5TQQ3CPE.cjs} +29 -29
  7. package/dist/{chunk-CDBQQA7V.cjs.map → chunk-5TQQ3CPE.cjs.map} +1 -1
  8. package/dist/{chunk-B472QGDO.cjs → chunk-6KD6KVAI.cjs} +5 -5
  9. package/dist/{chunk-B472QGDO.cjs.map → chunk-6KD6KVAI.cjs.map} +1 -1
  10. package/dist/{chunk-CH7MDKPI.cjs → chunk-7VBGYCXG.cjs} +7 -7
  11. package/dist/{chunk-CH7MDKPI.cjs.map → chunk-7VBGYCXG.cjs.map} +1 -1
  12. package/dist/{chunk-FPOHUGEK.js → chunk-AGX565ZT.js} +2 -2
  13. package/dist/{chunk-ZQRGJHNH.cjs → chunk-BOPLMNSN.cjs} +117 -151
  14. package/dist/chunk-BOPLMNSN.cjs.map +1 -0
  15. package/dist/{chunk-SWNZZVYG.js → chunk-FBUIZTAI.js} +2 -2
  16. package/dist/{chunk-HQL5GJ35.cjs → chunk-FM5KWLKU.cjs} +3 -3
  17. package/dist/{chunk-HQL5GJ35.cjs.map → chunk-FM5KWLKU.cjs.map} +1 -1
  18. package/dist/{chunk-J5S5U76A.cjs → chunk-GELW7JOQ.cjs} +32 -32
  19. package/dist/{chunk-J5S5U76A.cjs.map → chunk-GELW7JOQ.cjs.map} +1 -1
  20. package/dist/{chunk-QESV36I2.js → chunk-IIOHHNMI.js} +36 -70
  21. package/dist/chunk-IIOHHNMI.js.map +1 -0
  22. package/dist/{chunk-4Y6LX6XR.js → chunk-K52S6LZ5.js} +3 -3
  23. package/dist/{chunk-6VEEQBVJ.cjs → chunk-KPVKZ5ML.cjs} +15 -15
  24. package/dist/{chunk-6VEEQBVJ.cjs.map → chunk-KPVKZ5ML.cjs.map} +1 -1
  25. package/dist/{chunk-4WHDDAVP.cjs → chunk-KXKTXAGN.cjs} +40 -40
  26. package/dist/{chunk-4WHDDAVP.cjs.map → chunk-KXKTXAGN.cjs.map} +1 -1
  27. package/dist/{chunk-5LTLYPIP.cjs → chunk-LFXUFFDZ.cjs} +73 -73
  28. package/dist/{chunk-5LTLYPIP.cjs.map → chunk-LFXUFFDZ.cjs.map} +1 -1
  29. package/dist/{chunk-4YH4WKLC.js → chunk-OKRUL7YV.js} +4 -4
  30. package/dist/{chunk-KXBXPOYM.cjs → chunk-PFD2VRZI.cjs} +18 -18
  31. package/dist/{chunk-KXBXPOYM.cjs.map → chunk-PFD2VRZI.cjs.map} +1 -1
  32. package/dist/{chunk-I5L3KUTE.js → chunk-PTFSF3UP.js} +6 -6
  33. package/dist/{chunk-H6FKYKEQ.js → chunk-R4OGP4OV.js} +3 -3
  34. package/dist/{chunk-2SPAHQYE.js → chunk-RIPWRVA3.js} +5 -5
  35. package/dist/{chunk-DBYUQOLS.js → chunk-S6IB3BZK.js} +2 -2
  36. package/dist/{chunk-6WPUUGW5.js → chunk-SAH4FR36.js} +5 -5
  37. package/dist/{chunk-TONMD7QX.cjs → chunk-VCOL4C2W.cjs} +86 -20
  38. package/dist/chunk-VCOL4C2W.cjs.map +1 -0
  39. package/dist/{chunk-LWIVRGDN.js → chunk-VNDAMVMI.js} +2 -2
  40. package/dist/{chunk-6OGOPPTI.cjs → chunk-YJWISFIK.cjs} +12 -12
  41. package/dist/{chunk-6OGOPPTI.cjs.map → chunk-YJWISFIK.cjs.map} +1 -1
  42. package/dist/{chunk-UCY6VITT.js → chunk-Z4LAZ4ZZ.js} +3 -3
  43. package/dist/{chunk-OTV4A6NA.js → chunk-ZPUZPJDV.js} +80 -14
  44. package/dist/chunk-ZPUZPJDV.js.map +1 -0
  45. package/dist/components/case-studies/index.cjs +9 -9
  46. package/dist/components/case-studies/index.js +3 -3
  47. package/dist/components/chat/index.cjs +3 -3
  48. package/dist/components/chat/index.js +2 -2
  49. package/dist/components/contact/index.cjs +4 -4
  50. package/dist/components/contact/index.js +3 -3
  51. package/dist/components/docs/index.cjs +6 -6
  52. package/dist/components/docs/index.js +5 -5
  53. package/dist/components/embeds/index.cjs +4 -4
  54. package/dist/components/embeds/index.js +3 -3
  55. package/dist/components/faq/index.cjs +5 -5
  56. package/dist/components/faq/index.js +4 -4
  57. package/dist/components/features/index.cjs +3 -3
  58. package/dist/components/features/index.js +2 -2
  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 +136 -136
  62. package/dist/components/index.js +11 -11
  63. package/dist/components/navigation/index.cjs +3 -3
  64. package/dist/components/navigation/index.js +2 -2
  65. package/dist/components/navigation/mobile-burger-menu.d.ts.map +1 -1
  66. package/dist/components/onboarding-guides/index.cjs +7 -7
  67. package/dist/components/onboarding-guides/index.js +6 -6
  68. package/dist/components/related-content/index.cjs +5 -5
  69. package/dist/components/related-content/index.js +4 -4
  70. package/dist/components/tickets/index.cjs +6 -6
  71. package/dist/components/tickets/index.js +5 -5
  72. package/dist/components/ui/entity-image.d.ts.map +1 -1
  73. package/dist/components/ui/image-uploader.d.ts.map +1 -1
  74. package/dist/components/ui/index.cjs +3 -3
  75. package/dist/components/ui/index.js +2 -2
  76. package/dist/components/ui/simple-markdown-renderer.d.ts.map +1 -1
  77. package/dist/components/ui/square-avatar.d.ts.map +1 -1
  78. package/dist/hooks/index.cjs +6 -2
  79. package/dist/hooks/index.cjs.map +1 -1
  80. package/dist/hooks/index.d.ts +1 -0
  81. package/dist/hooks/index.d.ts.map +1 -1
  82. package/dist/hooks/index.js +5 -1
  83. package/dist/hooks/use-authed-image-src.d.ts +10 -0
  84. package/dist/hooks/use-authed-image-src.d.ts.map +1 -0
  85. package/dist/index.cjs +7 -3
  86. package/dist/index.cjs.map +1 -1
  87. package/dist/index.js +6 -2
  88. package/dist/utils/embed-authed-fetch.d.ts +15 -0
  89. package/dist/utils/embed-authed-fetch.d.ts.map +1 -1
  90. package/dist/utils/index.cjs.map +1 -1
  91. package/dist/utils/index.js.map +1 -1
  92. package/package.json +1 -1
  93. package/src/components/navigation/mobile-burger-menu.tsx +1 -0
  94. package/src/components/ui/entity-image.tsx +5 -3
  95. package/src/components/ui/image-uploader.tsx +21 -12
  96. package/src/components/ui/simple-markdown-renderer.tsx +57 -58
  97. package/src/components/ui/square-avatar.tsx +5 -3
  98. package/src/hooks/index.ts +1 -0
  99. package/src/hooks/use-authed-image-src.ts +93 -0
  100. package/src/utils/embed-authed-fetch.ts +30 -0
  101. package/dist/chunk-OTV4A6NA.js.map +0 -1
  102. package/dist/chunk-QESV36I2.js.map +0 -1
  103. package/dist/chunk-TONMD7QX.cjs.map +0 -1
  104. package/dist/chunk-ZQRGJHNH.cjs.map +0 -1
  105. /package/dist/{chunk-B52SBOUY.js.map → chunk-3NNCBZEM.js.map} +0 -0
  106. /package/dist/{chunk-FPOHUGEK.js.map → chunk-AGX565ZT.js.map} +0 -0
  107. /package/dist/{chunk-SWNZZVYG.js.map → chunk-FBUIZTAI.js.map} +0 -0
  108. /package/dist/{chunk-4Y6LX6XR.js.map → chunk-K52S6LZ5.js.map} +0 -0
  109. /package/dist/{chunk-4YH4WKLC.js.map → chunk-OKRUL7YV.js.map} +0 -0
  110. /package/dist/{chunk-I5L3KUTE.js.map → chunk-PTFSF3UP.js.map} +0 -0
  111. /package/dist/{chunk-H6FKYKEQ.js.map → chunk-R4OGP4OV.js.map} +0 -0
  112. /package/dist/{chunk-2SPAHQYE.js.map → chunk-RIPWRVA3.js.map} +0 -0
  113. /package/dist/{chunk-DBYUQOLS.js.map → chunk-S6IB3BZK.js.map} +0 -0
  114. /package/dist/{chunk-6WPUUGW5.js.map → chunk-SAH4FR36.js.map} +0 -0
  115. /package/dist/{chunk-LWIVRGDN.js.map → chunk-VNDAMVMI.js.map} +0 -0
  116. /package/dist/{chunk-UCY6VITT.js.map → chunk-Z4LAZ4ZZ.js.map} +0 -0
@@ -11,6 +11,7 @@ import {
11
11
  progressColorByVariant,
12
12
  scrollElementIntoView,
13
13
  toolLabels,
14
+ useAuthedImageSrc,
14
15
  useAutoLimitTags,
15
16
  useCopyToClipboard,
16
17
  useDebounce,
@@ -32,7 +33,7 @@ import {
32
33
  useResetOnPageHidden,
33
34
  useSuppressCloneFocus,
34
35
  useToast
35
- } from "./chunk-OTV4A6NA.js";
36
+ } from "./chunk-ZPUZPJDV.js";
36
37
  import {
37
38
  AlertCircleIcon,
38
39
  AnthropicLogoGreyIcon,
@@ -1467,6 +1468,22 @@ var MermaidDiagram = ({ chart }) => {
1467
1468
  }
1468
1469
  ) }) });
1469
1470
  };
1471
+ var MarkdownContentImage = ({ src, alt }) => {
1472
+ const resolvedSrc = useAuthedImageSrc(src);
1473
+ if (!resolvedSrc) return null;
1474
+ return /* @__PURE__ */ jsx7(
1475
+ next_image_default,
1476
+ {
1477
+ src: resolvedSrc,
1478
+ alt: alt ?? "No image available",
1479
+ width: 400,
1480
+ height: 400,
1481
+ sizes: "(max-width: 400px) 100vw, 400px",
1482
+ className: "max-w-full max-h-[400px] w-auto h-auto rounded-lg object-contain",
1483
+ style: { width: "auto", height: "auto" }
1484
+ }
1485
+ );
1486
+ };
1470
1487
  function extractText(node) {
1471
1488
  if (typeof node === "string") return node;
1472
1489
  if (Array.isArray(node)) return node.map(extractText).join("");
@@ -1688,67 +1705,12 @@ var SimpleMarkdownRendererImpl = ({
1688
1705
  );
1689
1706
  },
1690
1707
  // --- images ---
1691
- // Inline content image renderer. Used by blog posts, docs, AND chat
1692
- // messages (where users may attach screenshots / photos via the +
1693
- // attachment button).
1694
- //
1695
- // Sizing rules (2025-2026 best practice — Claude.ai, ChatGPT,
1696
- // iMessage, Slack, Discord inline image patterns):
1697
- //
1698
- // - CAP max-width at 400px so inline images don't blow out the
1699
- // message column on wide panels. Click-to-expand opens a
1700
- // full-resolution modal for users who need detail.
1701
- // - CAP max-height at 400px so portrait-orientation images
1702
- // don't dominate vertical space (a 1000x3000 phone screenshot
1703
- // would otherwise push the next message off-screen).
1704
- // - Small images render at NATURAL pixel size — a 64x64
1705
- // thumbnail stays 64x64, not stretched to fill the column.
1706
- // - `object-contain` preserves aspect ratio when both dimensions
1707
- // are constrained (long landscape, tall portrait).
1708
- //
1709
- // Implementation: Next.js `<Image>` — the project's canonical
1710
- // image primitive. Gives us:
1711
- // - WebP/AVIF format conversion for modern browsers (smaller
1712
- // bytes for the same visual quality).
1713
- // - Responsive `srcset` via the `sizes` prop (browser picks the
1714
- // right variant for the viewport).
1715
- // - Automatic lazy-loading (`loading="lazy"` by default, mid-
1716
- // page images skipped until they near the viewport).
1717
- // - Automatic `decoding="async"` so image decode doesn't block
1718
- // paint.
1719
- //
1720
- // `width={400} height={400}` props are REQUIRED by Next.js
1721
- // `<Image>` (non-`fill` mode throws without them) but they're
1722
- // effectively a CEILING here, not the display size — the CSS
1723
- // overrides (`w-auto h-auto max-w-full max-h-[400px]`) drive
1724
- // the actual rendered size. The inline `style={{ width: 'auto',
1725
- // height: 'auto' }}` is belt-and-suspenders: Next.js Image sets
1726
- // matching HTML `width`/`height` attributes on the rendered
1727
- // `<img>` and inline style wins over both HTML attributes AND
1728
- // utility classes regardless of CSS-specificity surprises.
1729
- //
1730
- // Layout reservation trade-off: until image bytes arrive, the
1731
- // browser may reserve a placeholder box up to 400x400 (the props'
1732
- // intrinsic-ratio hint). Once loaded, the box collapses to the
1733
- // natural size if smaller. This is the standard Next.js Image
1734
- // behavior across the codebase — accepted for the optimizer +
1735
- // responsive-srcset benefits. Chat attachments hosted in side
1736
- // panels see this only on first render of a fresh attachment
1737
- // (cached re-renders pop in without a perceptible shift).
1708
+ // Delegates to MarkdownContentImage (module scope, above) sizing
1709
+ // rules, Next.js <Image> rationale, and the bearer-mode authed-src
1710
+ // handling are documented there.
1738
1711
  img: ({ src, alt }) => {
1739
1712
  if (!src || typeof src !== "string" || src.trim() === "") return null;
1740
- return /* @__PURE__ */ jsx7(
1741
- next_image_default,
1742
- {
1743
- src,
1744
- alt: alt ?? "No image available",
1745
- width: 400,
1746
- height: 400,
1747
- sizes: "(max-width: 400px) 100vw, 400px",
1748
- className: "max-w-full max-h-[400px] w-auto h-auto rounded-lg object-contain",
1749
- style: { width: "auto", height: "auto" }
1750
- }
1751
- );
1713
+ return /* @__PURE__ */ jsx7(MarkdownContentImage, { src, alt });
1752
1714
  },
1753
1715
  // --- lists ---
1754
1716
  ul: ({ children }) => /* @__PURE__ */ jsx7("ul", { className: "list-disc list-outside my-4 ml-8 space-y-2 text-ods-text-primary", children }),
@@ -2282,6 +2244,7 @@ function formatBioText(aboutHtml, fallback = "") {
2282
2244
  import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
2283
2245
  var SquareAvatar = React2.memo(React2.forwardRef(
2284
2246
  ({ className, src, alt, size: size2 = "md", sizePx, fallback, variant = "square", initialsClassName, style, ...props }, ref) => {
2247
+ const resolvedSrc = useAuthedImageSrc(src);
2285
2248
  const sizeClasses2 = {
2286
2249
  sm: "h-8 w-8",
2287
2250
  md: "h-10 w-10",
@@ -2324,13 +2287,13 @@ var SquareAvatar = React2.memo(React2.forwardRef(
2324
2287
  // keeps the later class).
2325
2288
  "flex items-center justify-center text-xs font-medium text-[color:var(--ods-avatar-initials,var(--color-text-primary))]",
2326
2289
  initialsClassName,
2327
- src && "hidden"
2290
+ resolvedSrc && "hidden"
2328
2291
  ), children: getFirstLastInitials(fallback || alt) || "?" }),
2329
- src && /* @__PURE__ */ jsx10(
2292
+ resolvedSrc && /* @__PURE__ */ jsx10(
2330
2293
  next_image_default,
2331
2294
  {
2332
2295
  className: "absolute -inset-px h-[calc(100%+2px)] w-[calc(100%+2px)] max-w-none object-cover",
2333
- src,
2296
+ src: resolvedSrc,
2334
2297
  alt: alt || "",
2335
2298
  width: sizePx ?? sizePxBySize[size2],
2336
2299
  height: sizePx ?? sizePxBySize[size2],
@@ -23369,15 +23332,16 @@ init_cn();
23369
23332
  init_cn();
23370
23333
 
23371
23334
  // src/components/ui/entity-image.tsx
23372
- init_cn();
23373
23335
  import React81 from "react";
23336
+ init_cn();
23374
23337
  import { jsx as jsx164 } from "react/jsx-runtime";
23375
23338
  function EntityImage({ src, alt, fallbackText, className }) {
23339
+ const resolvedSrc = useAuthedImageSrc(src);
23376
23340
  const [imageFailed, setImageFailed] = React81.useState(false);
23377
23341
  React81.useEffect(() => {
23378
23342
  setImageFailed(false);
23379
- }, [src]);
23380
- const showFallback = imageFailed || !src;
23343
+ }, [resolvedSrc]);
23344
+ const showFallback = imageFailed || !resolvedSrc;
23381
23345
  const initials = getFirstLastInitials(fallbackText ?? alt);
23382
23346
  if (showFallback) {
23383
23347
  return /* @__PURE__ */ jsx164(
@@ -23395,7 +23359,7 @@ function EntityImage({ src, alt, fallbackText, className }) {
23395
23359
  return /* @__PURE__ */ jsx164(
23396
23360
  "img",
23397
23361
  {
23398
- src: src ?? void 0,
23362
+ src: resolvedSrc,
23399
23363
  alt: alt ?? "",
23400
23364
  onError: () => setImageFailed(true),
23401
23365
  className: cn(
@@ -37715,6 +37679,7 @@ var MobileBurgerMenu = React115.memo(function MobileBurgerMenu2({
37715
37679
  disabled,
37716
37680
  className: cn(
37717
37681
  "flex items-center gap-1 p-3 relative",
37682
+ "focus:outline-none focus-visible:outline-none",
37718
37683
  "transition-colors duration-200",
37719
37684
  "bg-ods-card border border-ods-border rounded-md",
37720
37685
  !disabled && "hover:bg-ods-bg-hover",
@@ -42595,6 +42560,7 @@ function ImageUploader({
42595
42560
  const [pressed, setPressed] = React128.useState(false);
42596
42561
  const [validationError, setValidationError] = React128.useState(null);
42597
42562
  const interactive = !disabled && !loading;
42563
+ const resolvedValue = useAuthedImageSrc(value);
42598
42564
  const hasImage = Boolean(value);
42599
42565
  const displayError = error || validationError || void 0;
42600
42566
  const resolvedHint = hint === void 0 ? `Max. size: ${formatSize(maxSize)}` : hint;
@@ -42680,10 +42646,10 @@ function ImageUploader({
42680
42646
  dropzoneClassName
42681
42647
  ),
42682
42648
  children: hasImage ? /* @__PURE__ */ jsxs270(Fragment66, { children: [
42683
- /* @__PURE__ */ jsx339("div", { className: "relative min-h-0 w-full flex-1 overflow-hidden rounded-md", children: /* @__PURE__ */ jsx339(
42649
+ /* @__PURE__ */ jsx339("div", { className: "relative min-h-0 w-full flex-1 overflow-hidden rounded-md", children: resolvedValue && /* @__PURE__ */ jsx339(
42684
42650
  "img",
42685
42651
  {
42686
- src: value,
42652
+ src: resolvedValue,
42687
42653
  alt,
42688
42654
  className: cn(
42689
42655
  "pointer-events-none absolute inset-0 size-full",
@@ -55446,4 +55412,4 @@ export {
55446
55412
  LogsList,
55447
55413
  assets
55448
55414
  };
55449
- //# sourceMappingURL=chunk-QESV36I2.js.map
55415
+ //# sourceMappingURL=chunk-IIOHHNMI.js.map