@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.
- package/dist/{chunk-4EU6WL5O.cjs → chunk-2R5NM3FC.cjs} +40 -40
- package/dist/{chunk-4EU6WL5O.cjs.map → chunk-2R5NM3FC.cjs.map} +1 -1
- package/dist/{chunk-B52SBOUY.js → chunk-3NNCBZEM.js} +6 -6
- package/dist/{chunk-KP37QDNS.cjs → chunk-464NJS2W.cjs} +73 -73
- package/dist/{chunk-KP37QDNS.cjs.map → chunk-464NJS2W.cjs.map} +1 -1
- package/dist/{chunk-CDBQQA7V.cjs → chunk-5TQQ3CPE.cjs} +29 -29
- package/dist/{chunk-CDBQQA7V.cjs.map → chunk-5TQQ3CPE.cjs.map} +1 -1
- package/dist/{chunk-B472QGDO.cjs → chunk-6KD6KVAI.cjs} +5 -5
- package/dist/{chunk-B472QGDO.cjs.map → chunk-6KD6KVAI.cjs.map} +1 -1
- package/dist/{chunk-CH7MDKPI.cjs → chunk-7VBGYCXG.cjs} +7 -7
- package/dist/{chunk-CH7MDKPI.cjs.map → chunk-7VBGYCXG.cjs.map} +1 -1
- package/dist/{chunk-FPOHUGEK.js → chunk-AGX565ZT.js} +2 -2
- package/dist/{chunk-ZQRGJHNH.cjs → chunk-BOPLMNSN.cjs} +117 -151
- package/dist/chunk-BOPLMNSN.cjs.map +1 -0
- package/dist/{chunk-SWNZZVYG.js → chunk-FBUIZTAI.js} +2 -2
- package/dist/{chunk-HQL5GJ35.cjs → chunk-FM5KWLKU.cjs} +3 -3
- package/dist/{chunk-HQL5GJ35.cjs.map → chunk-FM5KWLKU.cjs.map} +1 -1
- package/dist/{chunk-J5S5U76A.cjs → chunk-GELW7JOQ.cjs} +32 -32
- package/dist/{chunk-J5S5U76A.cjs.map → chunk-GELW7JOQ.cjs.map} +1 -1
- package/dist/{chunk-QESV36I2.js → chunk-IIOHHNMI.js} +36 -70
- package/dist/chunk-IIOHHNMI.js.map +1 -0
- package/dist/{chunk-4Y6LX6XR.js → chunk-K52S6LZ5.js} +3 -3
- package/dist/{chunk-6VEEQBVJ.cjs → chunk-KPVKZ5ML.cjs} +15 -15
- package/dist/{chunk-6VEEQBVJ.cjs.map → chunk-KPVKZ5ML.cjs.map} +1 -1
- package/dist/{chunk-4WHDDAVP.cjs → chunk-KXKTXAGN.cjs} +40 -40
- package/dist/{chunk-4WHDDAVP.cjs.map → chunk-KXKTXAGN.cjs.map} +1 -1
- package/dist/{chunk-5LTLYPIP.cjs → chunk-LFXUFFDZ.cjs} +73 -73
- package/dist/{chunk-5LTLYPIP.cjs.map → chunk-LFXUFFDZ.cjs.map} +1 -1
- package/dist/{chunk-4YH4WKLC.js → chunk-OKRUL7YV.js} +4 -4
- package/dist/{chunk-KXBXPOYM.cjs → chunk-PFD2VRZI.cjs} +18 -18
- package/dist/{chunk-KXBXPOYM.cjs.map → chunk-PFD2VRZI.cjs.map} +1 -1
- package/dist/{chunk-I5L3KUTE.js → chunk-PTFSF3UP.js} +6 -6
- package/dist/{chunk-H6FKYKEQ.js → chunk-R4OGP4OV.js} +3 -3
- package/dist/{chunk-2SPAHQYE.js → chunk-RIPWRVA3.js} +5 -5
- package/dist/{chunk-DBYUQOLS.js → chunk-S6IB3BZK.js} +2 -2
- package/dist/{chunk-6WPUUGW5.js → chunk-SAH4FR36.js} +5 -5
- package/dist/{chunk-TONMD7QX.cjs → chunk-VCOL4C2W.cjs} +86 -20
- package/dist/chunk-VCOL4C2W.cjs.map +1 -0
- package/dist/{chunk-LWIVRGDN.js → chunk-VNDAMVMI.js} +2 -2
- package/dist/{chunk-6OGOPPTI.cjs → chunk-YJWISFIK.cjs} +12 -12
- package/dist/{chunk-6OGOPPTI.cjs.map → chunk-YJWISFIK.cjs.map} +1 -1
- package/dist/{chunk-UCY6VITT.js → chunk-Z4LAZ4ZZ.js} +3 -3
- package/dist/{chunk-OTV4A6NA.js → chunk-ZPUZPJDV.js} +80 -14
- package/dist/chunk-ZPUZPJDV.js.map +1 -0
- package/dist/components/case-studies/index.cjs +9 -9
- package/dist/components/case-studies/index.js +3 -3
- package/dist/components/chat/index.cjs +3 -3
- package/dist/components/chat/index.js +2 -2
- package/dist/components/contact/index.cjs +4 -4
- package/dist/components/contact/index.js +3 -3
- package/dist/components/docs/index.cjs +6 -6
- package/dist/components/docs/index.js +5 -5
- package/dist/components/embeds/index.cjs +4 -4
- package/dist/components/embeds/index.js +3 -3
- package/dist/components/faq/index.cjs +5 -5
- package/dist/components/faq/index.js +4 -4
- package/dist/components/features/index.cjs +3 -3
- package/dist/components/features/index.js +2 -2
- package/dist/components/help-center-pages/index.cjs +22 -22
- package/dist/components/help-center-pages/index.js +13 -13
- package/dist/components/index.cjs +136 -136
- package/dist/components/index.js +11 -11
- package/dist/components/navigation/index.cjs +3 -3
- package/dist/components/navigation/index.js +2 -2
- package/dist/components/navigation/mobile-burger-menu.d.ts.map +1 -1
- package/dist/components/onboarding-guides/index.cjs +7 -7
- package/dist/components/onboarding-guides/index.js +6 -6
- package/dist/components/related-content/index.cjs +5 -5
- package/dist/components/related-content/index.js +4 -4
- package/dist/components/tickets/index.cjs +6 -6
- package/dist/components/tickets/index.js +5 -5
- package/dist/components/ui/entity-image.d.ts.map +1 -1
- package/dist/components/ui/image-uploader.d.ts.map +1 -1
- package/dist/components/ui/index.cjs +3 -3
- package/dist/components/ui/index.js +2 -2
- package/dist/components/ui/simple-markdown-renderer.d.ts.map +1 -1
- package/dist/components/ui/square-avatar.d.ts.map +1 -1
- package/dist/hooks/index.cjs +6 -2
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +5 -1
- package/dist/hooks/use-authed-image-src.d.ts +10 -0
- package/dist/hooks/use-authed-image-src.d.ts.map +1 -0
- package/dist/index.cjs +7 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -2
- package/dist/utils/embed-authed-fetch.d.ts +15 -0
- package/dist/utils/embed-authed-fetch.d.ts.map +1 -1
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/navigation/mobile-burger-menu.tsx +1 -0
- package/src/components/ui/entity-image.tsx +5 -3
- package/src/components/ui/image-uploader.tsx +21 -12
- package/src/components/ui/simple-markdown-renderer.tsx +57 -58
- package/src/components/ui/square-avatar.tsx +5 -3
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use-authed-image-src.ts +93 -0
- package/src/utils/embed-authed-fetch.ts +30 -0
- package/dist/chunk-OTV4A6NA.js.map +0 -1
- package/dist/chunk-QESV36I2.js.map +0 -1
- package/dist/chunk-TONMD7QX.cjs.map +0 -1
- package/dist/chunk-ZQRGJHNH.cjs.map +0 -1
- /package/dist/{chunk-B52SBOUY.js.map → chunk-3NNCBZEM.js.map} +0 -0
- /package/dist/{chunk-FPOHUGEK.js.map → chunk-AGX565ZT.js.map} +0 -0
- /package/dist/{chunk-SWNZZVYG.js.map → chunk-FBUIZTAI.js.map} +0 -0
- /package/dist/{chunk-4Y6LX6XR.js.map → chunk-K52S6LZ5.js.map} +0 -0
- /package/dist/{chunk-4YH4WKLC.js.map → chunk-OKRUL7YV.js.map} +0 -0
- /package/dist/{chunk-I5L3KUTE.js.map → chunk-PTFSF3UP.js.map} +0 -0
- /package/dist/{chunk-H6FKYKEQ.js.map → chunk-R4OGP4OV.js.map} +0 -0
- /package/dist/{chunk-2SPAHQYE.js.map → chunk-RIPWRVA3.js.map} +0 -0
- /package/dist/{chunk-DBYUQOLS.js.map → chunk-S6IB3BZK.js.map} +0 -0
- /package/dist/{chunk-6WPUUGW5.js.map → chunk-SAH4FR36.js.map} +0 -0
- /package/dist/{chunk-LWIVRGDN.js.map → chunk-VNDAMVMI.js.map} +0 -0
- /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-
|
|
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
|
-
//
|
|
1692
|
-
//
|
|
1693
|
-
//
|
|
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
|
-
|
|
2290
|
+
resolvedSrc && "hidden"
|
|
2328
2291
|
), children: getFirstLastInitials(fallback || alt) || "?" }),
|
|
2329
|
-
|
|
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
|
-
}, [
|
|
23380
|
-
const showFallback = imageFailed || !
|
|
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:
|
|
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:
|
|
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-
|
|
55415
|
+
//# sourceMappingURL=chunk-IIOHHNMI.js.map
|