@flamingo-stack/openframe-frontend-core 0.0.803 → 0.0.805
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/build/export-map.json +1 -1
- package/dist/{case-study-card-K6HYMHL6.cjs → case-study-card-MEWJNF4N.cjs} +5 -5
- package/dist/{chunk-MII4RDO4.cjs → chunk-2NVIGBJC.cjs} +80 -80
- package/dist/{chunk-6JVNUGN3.cjs → chunk-3EPG56RK.cjs} +8 -8
- package/dist/{chunk-UYGXJ5SQ.cjs → chunk-3WNCFZGN.cjs} +2 -2
- package/dist/{chunk-2JCY5KQL.cjs → chunk-4W77VLQV.cjs} +4 -4
- package/dist/{chunk-HVWMPUXK.cjs → chunk-55TGW6BF.cjs} +6 -6
- package/dist/{chunk-IYWX4GOG.cjs → chunk-66ZQ7LDR.cjs} +38 -35
- package/dist/{chunk-H4T3YHYH.cjs → chunk-6JRQ57DU.cjs} +585 -599
- package/dist/{chunk-XOFGPSNP.cjs → chunk-6UGNFMZB.cjs} +36 -36
- package/dist/{chunk-Y5XHMEBB.cjs → chunk-76NE67PK.cjs} +5 -5
- package/dist/{chunk-VKSO3UYU.cjs → chunk-AC5EBHAX.cjs} +28 -28
- package/dist/{chunk-OG4XH6C5.cjs → chunk-AZJYMTBS.cjs} +33 -33
- package/dist/{chunk-HEMZOHNB.cjs → chunk-BVSZTKI3.cjs} +34 -21
- package/dist/{chunk-TVAU56UU.cjs → chunk-F2VN3UUB.cjs} +473 -508
- package/dist/{chunk-TELXF5WD.cjs → chunk-FLW2VL5W.cjs} +16 -16
- package/dist/{chunk-FS4TVAE7.cjs → chunk-FQ4LYYBI.cjs} +52 -52
- package/dist/{chunk-VVLL37EM.cjs → chunk-GAHXURKJ.cjs} +6 -6
- package/dist/{chunk-2X3N6MSR.cjs → chunk-JLKGLPDC.cjs} +21 -21
- package/dist/{chunk-3NGJ7NPT.cjs → chunk-KVJKKVB3.cjs} +7 -7
- package/dist/{chunk-YKQGYAG5.cjs → chunk-LZIQXGAW.cjs} +91 -88
- package/dist/{chunk-T7B3FJY6.cjs → chunk-MEDSJCEX.cjs} +4 -4
- package/dist/{chunk-FFRFKWTZ.cjs → chunk-MHH7CHNI.cjs} +17 -14
- package/dist/{chunk-IE3CPPHJ.cjs → chunk-NBLQFJ4I.cjs} +100 -99
- package/dist/{chunk-KVL3QRFX.cjs → chunk-NXJ3O4WO.cjs} +15 -15
- package/dist/{chunk-YBTORXFY.cjs → chunk-PRCGRDHV.cjs} +40 -25
- package/dist/{chunk-JTDOBGKE.cjs → chunk-QPBP7FKI.cjs} +52 -52
- package/dist/{chunk-ZPVFFPQM.cjs → chunk-RIRIA3FO.cjs} +4 -4
- package/dist/{chunk-XR323UBY.cjs → chunk-STLJCAIZ.cjs} +6 -3
- package/dist/{chunk-6UKH22NQ.cjs → chunk-TGOJHOQR.cjs} +2 -1
- package/dist/{chunk-FAUVDMH4.cjs → chunk-THY2XVGY.cjs} +198 -164
- package/dist/{chunk-6GCXQIUU.cjs → chunk-TT64NRFU.cjs} +4 -4
- package/dist/{chunk-CACULEQS.cjs → chunk-TTERV57X.cjs} +4 -4
- package/dist/{chunk-NNQXP2ZM.cjs → chunk-UCBR27JM.cjs} +13 -13
- package/dist/{chunk-KVGWOJCX.cjs → chunk-V3T5MDJV.cjs} +2 -2
- package/dist/{chunk-5RGGUQ4Y.cjs → chunk-VXXOUM2K.cjs} +67 -1
- package/dist/{chunk-I4BODSPV.cjs → chunk-WSKMV2QS.cjs} +3 -3
- package/dist/{chunk-MBZIARIL.cjs → chunk-XXARXK62.cjs} +26 -26
- package/dist/{chunk-HATRCNXJ.cjs → chunk-XYZBN6D7.cjs} +2 -2
- package/dist/{chunk-QFBRQ22U.cjs → chunk-Z6Y5X5SF.cjs} +41 -41
- package/dist/{cloud-tenants-GKCZSLEV.cjs → cloud-tenants-LRXMISV4.cjs} +19 -19
- package/dist/components/agent-mark.d.ts.map +1 -1
- package/dist/components/agent-mark.js +2 -2
- package/dist/components/case-studies/index.cjs +35 -35
- package/dist/components/chat/chat-message-row.d.ts.map +1 -1
- package/dist/components/chat/chat-message-row.js +3 -2
- package/dist/components/chat/entity-cards/admin-content-card.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/admin-content-card.js +2 -1
- package/dist/components/chat/entity-cards/blog-card.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/blog-card.js +6 -6
- package/dist/components/chat/entity-cards/blog-image-placeholder.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/blog-image-placeholder.js +2 -1
- package/dist/components/chat/entity-cards/case-study-card.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/case-study-card.js +10 -9
- package/dist/components/chat/entity-cards/customer-interview-card.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/customer-interview-card.js +8 -7
- package/dist/components/chat/entity-cards/dispatch.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/dispatch.js +12 -1
- package/dist/components/chat/entity-cards/employee-entry-card.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/employee-entry-card.js +3 -2
- package/dist/components/chat/entity-cards/entity-portrait-card.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/entity-portrait-card.js +7 -5
- package/dist/components/chat/entity-cards/investor-update-card.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/investor-update-card.js +2 -1
- package/dist/components/chat/entity-cards/onboarding-guide-card.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/onboarding-guide-card.js +13 -2
- package/dist/components/chat/entity-cards/program-card.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/program-card.js +17 -5
- package/dist/components/chat/entity-cards/roadmap-card.d.ts.map +1 -1
- package/dist/components/chat/entity-cards/roadmap-card.js +5 -4
- package/dist/components/chat/index.cjs +15 -15
- package/dist/components/chat/mingo-info-card.d.ts.map +1 -1
- package/dist/components/chat/mingo-info-card.js +3 -2
- package/dist/components/contact/index.cjs +20 -20
- package/dist/components/docs/index.cjs +23 -23
- package/dist/components/embeds/index.cjs +20 -20
- package/dist/components/embeds/markdown-image.d.ts.map +1 -1
- package/dist/components/embeds/markdown-image.js +2 -1
- package/dist/components/embeds/og-link-preview.d.ts.map +1 -1
- package/dist/components/embeds/og-link-preview.js +17 -6
- package/dist/components/embeds/twitter-embed-client.d.ts.map +1 -1
- package/dist/components/embeds/twitter-embed-client.js +3 -2
- package/dist/components/faq/index.cjs +21 -21
- package/dist/components/features/index.cjs +19 -19
- package/dist/components/features/media-gallery-manager.d.ts.map +1 -1
- package/dist/components/features/media-gallery-manager.js +2 -1
- package/dist/components/features/notifications/notification-tile.d.ts.map +1 -1
- package/dist/components/features/notifications/notification-tile.js +3 -2
- package/dist/components/features/parallax-image-showcase.d.ts.map +1 -1
- package/dist/components/features/parallax-image-showcase.js +9 -35
- package/dist/components/features/select-button.d.ts.map +1 -1
- package/dist/components/features/select-button.js +3 -2
- package/dist/components/features/video-hover-preview.d.ts +1 -1
- package/dist/components/features/video-hover-preview.d.ts.map +1 -1
- package/dist/components/features/video-hover-preview.js +2 -1
- package/dist/components/features/video.d.ts.map +1 -1
- package/dist/components/features/video.js +13 -1
- package/dist/components/features/walkthrough-video.d.ts.map +1 -1
- package/dist/components/features/walkthrough-video.js +3 -3
- package/dist/components/help-center-pages/index.cjs +121 -121
- package/dist/components/hero-image-uploader.d.ts.map +1 -1
- package/dist/components/hero-image-uploader.js +12 -1
- package/dist/components/icon-display.d.ts.map +1 -1
- package/dist/components/icon-display.js +2 -1
- package/dist/components/index.cjs +137 -91
- package/dist/components/media-carousel.d.ts.map +1 -1
- package/dist/components/media-carousel.js +2 -1
- package/dist/components/meeting-scheduler/index.cjs +85 -85
- package/dist/components/navigation/index.cjs +22 -22
- package/dist/components/onboarding-guides/index.cjs +22 -22
- package/dist/components/platform/ScriptInfoSection.d.ts.map +1 -1
- package/dist/components/platform/ScriptInfoSection.js +12 -1
- package/dist/components/product-demo/index.cjs +30 -30
- package/dist/components/related-content/index.cjs +11 -11
- package/dist/components/shared/media-gallery-strip.d.ts.map +1 -1
- package/dist/components/shared/media-gallery-strip.js +3 -2
- package/dist/components/shared/product-release/product-release-card.d.ts.map +1 -1
- package/dist/components/shared/product-release/product-release-card.js +13 -2
- package/dist/components/tickets/index.cjs +26 -26
- package/dist/components/ui/avatar-stack.d.ts.map +1 -1
- package/dist/components/ui/avatar-stack.js +4 -4
- package/dist/components/ui/entity-image.d.ts.map +1 -1
- package/dist/components/ui/entity-image.js +3 -2
- package/dist/components/ui/image-gallery-modal.d.ts.map +1 -1
- package/dist/components/ui/image-gallery-modal.js +2 -1
- package/dist/components/ui/image-uploader.d.ts.map +1 -1
- package/dist/components/ui/image-uploader.js +2 -1
- package/dist/components/ui/index.cjs +37 -19
- package/dist/components/ui/index.d.ts +1 -0
- package/dist/components/ui/index.d.ts.map +1 -1
- package/dist/components/ui/index.js +1 -0
- package/dist/components/ui/markdown/base-components.d.ts.map +1 -1
- package/dist/components/ui/markdown/base-components.js +2 -1
- package/dist/components/ui/photo-wall.d.ts +7 -3
- package/dist/components/ui/photo-wall.d.ts.map +1 -1
- package/dist/components/ui/photo-wall.js +3 -4
- package/dist/components/ui/square-avatar.d.ts +4 -1
- package/dist/components/ui/square-avatar.d.ts.map +1 -1
- package/dist/components/ui/square-avatar.js +2 -1
- package/dist/components/user-summary-stub.d.ts +1 -1
- package/dist/components/user-summary-stub.d.ts.map +1 -1
- package/dist/components/user-summary-stub.js +16 -6
- package/dist/components/vendor-display-button.d.ts.map +1 -1
- package/dist/components/vendor-display-button.js +13 -3
- package/dist/components/vendor-icon.d.ts +7 -4
- package/dist/components/vendor-icon.d.ts.map +1 -1
- package/dist/components/vendor-icon.js +22 -71
- package/dist/{devices-XIXLFYRJ.cjs → devices-CETR72XY.cjs} +20 -20
- package/dist/{embeddable-chat-SVDMLAER.cjs → embeddable-chat-GHBCX2BY.cjs} +84 -84
- package/dist/hooks/index.cjs +6 -6
- package/dist/hooks/ui/use-image-edge-color.d.ts.map +1 -1
- package/dist/hooks/ui/use-image-edge-color.js +4 -3
- package/dist/index.cjs +43 -25
- package/dist/{knowledge-3DKG5QG2.cjs → knowledge-A2MWEF23.cjs} +20 -20
- package/dist/{logs-RIU2TTRZ.cjs → logs-47JODA6C.cjs} +27 -27
- package/dist/{policies-F2ZB2J4L.cjs → policies-OPIDR6XF.cjs} +23 -23
- package/dist/{remote-session-GBMM5UPQ.cjs → remote-session-IQTPEG63.cjs} +8 -8
- package/dist/{scripts-XX5LMCRA.cjs → scripts-4MQGJWFP.cjs} +26 -26
- package/dist/{software-update-VYBM7SC6.cjs → software-update-MQIGPBZ6.cjs} +23 -23
- package/dist/styles/image-sizes.cjs +68 -0
- package/dist/styles/image-sizes.d.ts +110 -0
- package/dist/styles/image-sizes.d.ts.map +1 -0
- package/dist/styles/image-sizes.js +66 -0
- package/dist/{tickets-board-5QIIA24E.cjs → tickets-board-QF5JNSH2.cjs} +11 -11
- package/eslint-config/base.js +12 -0
- package/eslint-config/image-sizes.js +51 -0
- package/package.json +8 -2
- package/src/components/agent-mark.tsx +3 -4
- package/src/components/chat/chat-message-row.tsx +3 -2
- package/src/components/chat/entity-cards/admin-content-card.tsx +2 -1
- package/src/components/chat/entity-cards/blog-card.tsx +6 -6
- package/src/components/chat/entity-cards/blog-image-placeholder.tsx +2 -1
- package/src/components/chat/entity-cards/case-study-card.tsx +10 -9
- package/src/components/chat/entity-cards/customer-interview-card.tsx +8 -7
- package/src/components/chat/entity-cards/dispatch.tsx +9 -1
- package/src/components/chat/entity-cards/employee-entry-card.tsx +3 -2
- package/src/components/chat/entity-cards/entity-portrait-card.tsx +7 -5
- package/src/components/chat/entity-cards/investor-update-card.tsx +2 -1
- package/src/components/chat/entity-cards/onboarding-guide-card.tsx +10 -2
- package/src/components/chat/entity-cards/program-card.tsx +14 -5
- package/src/components/chat/entity-cards/roadmap-card.tsx +5 -4
- package/src/components/chat/mingo-info-card.tsx +3 -2
- package/src/components/embeds/markdown-image.tsx +2 -1
- package/src/components/embeds/og-link-preview.tsx +14 -6
- package/src/components/embeds/twitter-embed-client.tsx +3 -2
- package/src/components/features/media-gallery-manager.tsx +2 -2
- package/src/components/features/notifications/notification-tile.tsx +3 -2
- package/src/components/features/parallax-image-showcase.tsx +9 -26
- package/src/components/features/select-button.tsx +3 -2
- package/src/components/features/video-hover-preview.tsx +3 -2
- package/src/components/features/video.tsx +10 -1
- package/src/components/features/walkthrough-video.tsx +7 -10
- package/src/components/hero-image-uploader.tsx +9 -1
- package/src/components/icon-display.tsx +2 -1
- package/src/components/media-carousel.tsx +2 -1
- package/src/components/platform/ScriptInfoSection.tsx +9 -1
- package/src/components/shared/media-gallery-strip.tsx +4 -2
- package/src/components/shared/product-release/product-release-card.tsx +10 -2
- package/src/components/ui/avatar-stack.tsx +6 -6
- package/src/components/ui/entity-image.tsx +3 -2
- package/src/components/ui/image-gallery-modal.tsx +2 -1
- package/src/components/ui/image-uploader.tsx +2 -1
- package/src/components/ui/index.ts +1 -0
- package/src/components/ui/markdown/base-components.tsx +2 -1
- package/src/components/ui/photo-wall.tsx +10 -14
- package/src/components/ui/square-avatar.tsx +6 -3
- package/src/components/user-summary-stub.tsx +14 -7
- package/src/components/vendor-display-button.tsx +10 -3
- package/src/components/vendor-icon.tsx +31 -97
- package/src/hooks/ui/use-image-edge-color.ts +8 -4
- package/src/styles/image-sizes.ts +114 -0
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import Image from '../../embed-shims/next-image';
|
|
5
|
+
import { IMAGE_FIXED_PX } from '../../styles/image-sizes';
|
|
5
6
|
import { cn } from '../../utils/cn';
|
|
6
7
|
import { CheckCircleIcon } from '../icons-v2-generated/signs-and-symbols/check-circle-icon';
|
|
7
8
|
import { Button } from '../ui/button';
|
|
@@ -69,8 +70,8 @@ export const SelectButton = React.forwardRef<HTMLButtonElement, SelectButtonProp
|
|
|
69
70
|
src={image.src}
|
|
70
71
|
alt={image.alt}
|
|
71
72
|
className="size-full object-cover"
|
|
72
|
-
width={
|
|
73
|
-
height={
|
|
73
|
+
width={IMAGE_FIXED_PX.logoLg}
|
|
74
|
+
height={IMAGE_FIXED_PX.logoLg}
|
|
74
75
|
unoptimized
|
|
75
76
|
/>
|
|
76
77
|
</span>
|
|
@@ -24,6 +24,7 @@ import type React from 'react';
|
|
|
24
24
|
import { useEffect, useRef, useState } from 'react';
|
|
25
25
|
import Image from '../../embed-shims/next-image';
|
|
26
26
|
import { NEAR_VIEWPORT_ROOT_MARGIN } from '../../hooks/use-near-viewport';
|
|
27
|
+
import { fixedImageSlot } from '../../styles/image-sizes';
|
|
27
28
|
import { cn } from '../../utils/cn';
|
|
28
29
|
import { useCoverImageFallback } from '../chat/entity-cards/use-cover-image-fallback';
|
|
29
30
|
import { toMuxPreviewUrl } from './mux-origins';
|
|
@@ -48,7 +49,7 @@ export interface VideoHoverPreviewSurfaceProps {
|
|
|
48
49
|
badge?: 'play' | 'none';
|
|
49
50
|
/** Object-fit for the hover player. */
|
|
50
51
|
fit?: 'contain' | 'cover';
|
|
51
|
-
/**
|
|
52
|
+
/** The poster's `sizes`, a value of the image-size table. Default: a strip cell's fixed box (`fixedImageSlot('cover')`). */
|
|
52
53
|
posterSizes?: string;
|
|
53
54
|
/** The poster is in view from the first paint (a card pinned to the screen),
|
|
54
55
|
* so it loads at once rather than lazily. Default false (a strip cell). */
|
|
@@ -88,7 +89,7 @@ export function VideoHoverPreviewSurface({
|
|
|
88
89
|
isClone = false,
|
|
89
90
|
badge = 'play',
|
|
90
91
|
fit,
|
|
91
|
-
posterSizes = '
|
|
92
|
+
posterSizes = fixedImageSlot('cover'),
|
|
92
93
|
posterInView = false,
|
|
93
94
|
preload,
|
|
94
95
|
hideMutedBadge,
|
|
@@ -43,6 +43,7 @@ import {
|
|
|
43
43
|
} from 'react';
|
|
44
44
|
import Image from '../../embed-shims/next-image';
|
|
45
45
|
import { useNearViewport } from '../../hooks/use-near-viewport';
|
|
46
|
+
import { IMAGE_SLOT } from '../../styles/image-sizes';
|
|
46
47
|
import { cn } from '../../utils/cn';
|
|
47
48
|
import { fetchPriorityProp } from '../../utils/fetch-priority';
|
|
48
49
|
import { UnifiedSkeleton } from '../loading/unified-skeleton';
|
|
@@ -117,7 +118,15 @@ const PosterBox = forwardRef<
|
|
|
117
118
|
style={fill ? { width: '100%', height: '100%' } : undefined}
|
|
118
119
|
>
|
|
119
120
|
{poster ? (
|
|
120
|
-
<Image
|
|
121
|
+
<Image
|
|
122
|
+
src={poster}
|
|
123
|
+
alt=""
|
|
124
|
+
fill
|
|
125
|
+
sizes={IMAGE_SLOT.full}
|
|
126
|
+
priority={priority}
|
|
127
|
+
unoptimized
|
|
128
|
+
className="object-cover"
|
|
129
|
+
/>
|
|
121
130
|
) : null}
|
|
122
131
|
</div>
|
|
123
132
|
);
|
|
@@ -69,6 +69,7 @@ import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } fr
|
|
|
69
69
|
import { resizedImageUrl } from '../../embed-shims/next-image';
|
|
70
70
|
import { useIsHydrated } from '../../hooks/ui/use-is-hydrated';
|
|
71
71
|
import { MEDIA_ASPECT } from '../../styles/component-sizes';
|
|
72
|
+
import { fixedImageSlot, IMAGE_WIDTHS } from '../../styles/image-sizes';
|
|
72
73
|
import { cn } from '../../utils/cn';
|
|
73
74
|
import {
|
|
74
75
|
WALKTHROUGH_VIDEO_DISMISS_KEY,
|
|
@@ -92,9 +93,6 @@ import { VideoPlayBadge, VideoUnmuteGlyph } from './video-center-badge';
|
|
|
92
93
|
import { VideoHoverPreviewSurface } from './video-hover-preview';
|
|
93
94
|
import type { VideoPlayerHandle, VideoMutedFallbackState } from './video-shared';
|
|
94
95
|
|
|
95
|
-
/** The poster width the collapsed card asks for: its widest box (320px) at 2x for retina screens. */
|
|
96
|
-
const CARD_POSTER_WIDTH_PX = 640;
|
|
97
|
-
|
|
98
96
|
/** The inline card's box: 16:9 across the host's width, rounded and bordered. ONE string, read by the card and
|
|
99
97
|
* its skeleton, so the page keeps the same height before and after the player mounts. */
|
|
100
98
|
const INLINE_CARD_BOX_CLASS = `${MEDIA_ASPECT.video} w-full rounded-md border border-ods-border`;
|
|
@@ -1067,17 +1065,16 @@ function WalkthroughVideo({
|
|
|
1067
1065
|
// File player only. The theater resolves YouTube-wins; the card must
|
|
1068
1066
|
// not mount MuxPlayer on a youtube.com URL (it renders the poster).
|
|
1069
1067
|
url={video.mainVideoUrl || ''}
|
|
1070
|
-
// The card is at most 320px wide: ask the host for a poster twice that (retina),
|
|
1071
|
-
// original the theater shows (a 1920x1080 file drawn at
|
|
1072
|
-
// where the host registered no resizer.
|
|
1073
|
-
posterUrl={video.posterUrl ? resizedImageUrl(video.posterUrl,
|
|
1068
|
+
// The card is at most 320px wide: ask the host for a poster twice that (retina), the smallest width of the
|
|
1069
|
+
// image-size table's ladder, not the full-size original the theater shows (a 1920x1080 file drawn at
|
|
1070
|
+
// 333x187, CU-17tkuw5xp4q). The original is kept where the host registered no resizer.
|
|
1071
|
+
posterUrl={video.posterUrl ? resizedImageUrl(video.posterUrl, IMAGE_WIDTHS[0]) : video.posterUrl}
|
|
1074
1072
|
active={cardActive}
|
|
1075
1073
|
isClone={false}
|
|
1076
1074
|
badge="play"
|
|
1077
1075
|
fit="cover"
|
|
1078
|
-
//
|
|
1079
|
-
|
|
1080
|
-
posterSizes="(max-width: 639px) 192px, 320px"
|
|
1076
|
+
// The card's box (192 to 320px) as the image-size table's closest fixed slot.
|
|
1077
|
+
posterSizes={fixedImageSlot('cover')}
|
|
1081
1078
|
// Pinned to the screen (or laid out in the host's first view), so it
|
|
1082
1079
|
// is often the largest thing painted: never lazy.
|
|
1083
1080
|
posterInView
|
|
@@ -5,6 +5,7 @@ import { useRef, useState } from 'react';
|
|
|
5
5
|
import type { ChangeEvent } from 'react';
|
|
6
6
|
import Image from '../embed-shims/next-image';
|
|
7
7
|
import { useToast } from '../hooks/use-toast';
|
|
8
|
+
import { IMAGE_SLOT } from '../styles/image-sizes';
|
|
8
9
|
import { errorMessage } from '../utils/common';
|
|
9
10
|
import { IMAGE_FILE_ACCEPT } from '../utils/media-type';
|
|
10
11
|
import { Button } from './ui/button';
|
|
@@ -172,7 +173,14 @@ export function HeroImageUploader({
|
|
|
172
173
|
className="group relative flex aspect-square h-auto w-full items-center justify-center overflow-hidden md:aspect-auto md:h-full"
|
|
173
174
|
style={{ height: heightStyle }}
|
|
174
175
|
>
|
|
175
|
-
<Image
|
|
176
|
+
<Image
|
|
177
|
+
src={imageUrl}
|
|
178
|
+
className={`object-${objectFit}`}
|
|
179
|
+
alt="Cover"
|
|
180
|
+
fill
|
|
181
|
+
sizes={IMAGE_SLOT.full}
|
|
182
|
+
unoptimized
|
|
183
|
+
/>
|
|
176
184
|
<div className="absolute inset-0 flex items-center justify-center gap-4 rounded-lg bg-black/40 opacity-0 transition-opacity group-hover:opacity-100">
|
|
177
185
|
{showReplaceButton && (
|
|
178
186
|
<Button
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import type { ReactElement } from 'react';
|
|
4
4
|
import Image from '../embed-shims/next-image';
|
|
5
|
+
import { IMAGE_FIXED_PX } from '../styles/image-sizes';
|
|
5
6
|
import { cn } from '../utils/cn';
|
|
6
7
|
import { AGENT_GLYPH_COLOR, AGENT_PICTURE_CLASS, useAgentIdentityIcon } from './agent-identity';
|
|
7
8
|
import { resolveIcon } from './chat/utils/icon-library';
|
|
@@ -32,7 +33,7 @@ export interface EntityIconValue {
|
|
|
32
33
|
*/
|
|
33
34
|
export function EntityIcon({
|
|
34
35
|
icon,
|
|
35
|
-
size =
|
|
36
|
+
size = IMAGE_FIXED_PX.glyph,
|
|
36
37
|
className,
|
|
37
38
|
}: {
|
|
38
39
|
icon?: EntityIconValue | null;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { useState, useRef, memo, useCallback, type KeyboardEvent, type TouchEvent } from 'react';
|
|
4
4
|
import { Image, Link } from '../embed-shims';
|
|
5
|
+
import { IMAGE_SLOT } from '../styles/image-sizes';
|
|
5
6
|
import { cn } from '../utils/cn';
|
|
6
7
|
import type { MediaItem } from '../utils/media-carousel-utils-stub';
|
|
7
8
|
import { Video } from './features/video';
|
|
@@ -226,7 +227,7 @@ export const MediaCarousel = memo(function MediaCarouselImpl({
|
|
|
226
227
|
)}
|
|
227
228
|
priority={mainImagePriority}
|
|
228
229
|
loading={mainImagePriority ? 'eager' : 'lazy'}
|
|
229
|
-
sizes=
|
|
230
|
+
sizes={IMAGE_SLOT.full}
|
|
230
231
|
width={1428}
|
|
231
232
|
height={802}
|
|
232
233
|
unoptimized
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
import type React from 'react';
|
|
10
10
|
import Image from '../../embed-shims/next-image';
|
|
11
|
+
import { fixedImageSlot } from '../../styles/image-sizes';
|
|
11
12
|
import { cn } from '../../utils/cn';
|
|
12
13
|
import { nameInitials } from '../../utils/format';
|
|
13
14
|
import { getOSLabel } from '../../utils/os-utils';
|
|
@@ -74,7 +75,14 @@ function InfoCell({ label, value, avatar, className }: InfoCellProps) {
|
|
|
74
75
|
{avatar && (
|
|
75
76
|
<div className="relative size-8 shrink-0 overflow-hidden rounded-full border border-ods-border bg-ods-bg">
|
|
76
77
|
{avatar.photoUrl ? (
|
|
77
|
-
<Image
|
|
78
|
+
<Image
|
|
79
|
+
src={avatar.photoUrl}
|
|
80
|
+
alt={avatar.name}
|
|
81
|
+
className="object-cover"
|
|
82
|
+
fill
|
|
83
|
+
sizes={fixedImageSlot('logo')}
|
|
84
|
+
unoptimized
|
|
85
|
+
/>
|
|
78
86
|
) : (
|
|
79
87
|
<div className="flex size-full items-center justify-center text-ods-text-secondary text-h6">
|
|
80
88
|
{avatar.initials || nameInitials(avatar.name)}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { useState } from 'react';
|
|
4
4
|
import Image from '../../embed-shims/next-image';
|
|
5
|
+
import { IMAGE_FIXED_PX } from '../../styles/image-sizes';
|
|
5
6
|
import { cn } from '../../utils/cn';
|
|
6
7
|
import { Video } from '../features/video';
|
|
7
8
|
import { UnifiedSkeleton } from '../loading/unified-skeleton';
|
|
@@ -90,8 +91,9 @@ export function MediaGalleryStrip({ items, className }: MediaGalleryStripProps)
|
|
|
90
91
|
src={mediaItem.media_url}
|
|
91
92
|
alt={mediaItem.title || `Media ${index + 1}`}
|
|
92
93
|
className="h-full w-full object-cover"
|
|
93
|
-
width
|
|
94
|
-
|
|
94
|
+
// The tile's 240x200 box: the image-size table's `cover` width at the tile's ratio.
|
|
95
|
+
width={IMAGE_FIXED_PX.cover}
|
|
96
|
+
height={(IMAGE_FIXED_PX.cover * 5) / 6}
|
|
95
97
|
unoptimized
|
|
96
98
|
/>
|
|
97
99
|
</span>
|
|
@@ -4,6 +4,7 @@ import { AlertTriangle, Eye, Package, Sparkles, TrendingUp, Wrench } from 'lucid
|
|
|
4
4
|
import type React from 'react';
|
|
5
5
|
import Image from '../../../embed-shims/next-image';
|
|
6
6
|
import Link from '../../../embed-shims/next-link';
|
|
7
|
+
import { IMAGE_SLOT, fixedImageSlot } from '../../../styles/image-sizes';
|
|
7
8
|
import { cn } from '../../../utils/cn';
|
|
8
9
|
import {
|
|
9
10
|
CONTENT_CARD_FRAME_CLASS,
|
|
@@ -271,7 +272,7 @@ function LoadedProductReleaseCard({
|
|
|
271
272
|
src={coverImage}
|
|
272
273
|
alt={title}
|
|
273
274
|
fill
|
|
274
|
-
sizes=
|
|
275
|
+
sizes={IMAGE_SLOT.aside}
|
|
275
276
|
className="object-cover"
|
|
276
277
|
unoptimized
|
|
277
278
|
/>
|
|
@@ -479,7 +480,14 @@ function LoadedProductReleaseCard({
|
|
|
479
480
|
actually supplied (matches the catalog variant's overlay rule). */}
|
|
480
481
|
<span className="relative flex aspect-square h-14 w-14 shrink-0 items-center justify-center self-start overflow-hidden rounded-md bg-ods-bg text-ods-accent">
|
|
481
482
|
{coverImage ? (
|
|
482
|
-
<Image
|
|
483
|
+
<Image
|
|
484
|
+
src={coverImage}
|
|
485
|
+
alt={title}
|
|
486
|
+
fill
|
|
487
|
+
sizes={fixedImageSlot('tile')}
|
|
488
|
+
className="object-contain"
|
|
489
|
+
unoptimized
|
|
490
|
+
/>
|
|
483
491
|
) : (
|
|
484
492
|
<Package className="h-5 w-5" />
|
|
485
493
|
)}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
+
import { AVATAR_SIZE_PX } from '../../styles/component-sizes';
|
|
3
4
|
import { cn } from '../../utils/cn';
|
|
4
5
|
import { UnifiedSkeleton } from '../loading/unified-skeleton';
|
|
5
6
|
import { LoadingItems, useLoadingScope } from './loading-scope';
|
|
@@ -56,9 +57,8 @@ export interface AvatarStackProps {
|
|
|
56
57
|
loading?: boolean;
|
|
57
58
|
}
|
|
58
59
|
|
|
59
|
-
/**
|
|
60
|
-
*
|
|
61
|
-
const SIZE_PX: Record<AvatarStackSize, number> = { xs: 24, sm: 32, md: 40, lg: 48 };
|
|
60
|
+
/** How far each later face tucks under the previous one: the `-ml-*` classes below, in px, for `slots`. A face's
|
|
61
|
+
* diameter is the avatar scale's (`AVATAR_SIZE_PX`). */
|
|
62
62
|
const OVERLAP_PX: Record<AvatarStackSize, number> = { xs: 8, sm: 12, md: 12, lg: 12 };
|
|
63
63
|
|
|
64
64
|
const OVERFLOW_CIRCLE_SIZE: Record<AvatarStackSize, string> = {
|
|
@@ -73,7 +73,7 @@ const STACK_ROW_CLASS = 'flex items-center';
|
|
|
73
73
|
const overlapClass = (size: AvatarStackSize) => (size === 'xs' ? '-ml-2' : '-ml-3');
|
|
74
74
|
/** A fixed-width stack's width (`slots`). */
|
|
75
75
|
const slotsWidthStyle = (size: AvatarStackSize, slots?: number) =>
|
|
76
|
-
slots ? { width:
|
|
76
|
+
slots ? { width: AVATAR_SIZE_PX[size] + (slots - 1) * (AVATAR_SIZE_PX[size] - OVERLAP_PX[size]) } : undefined;
|
|
77
77
|
|
|
78
78
|
/** Faces a stack shows when the host states no `max`, and so the faces it draws while its people are read. */
|
|
79
79
|
const AVATAR_STACK_MAX_FACES = 3;
|
|
@@ -102,8 +102,8 @@ function AvatarStackSkeleton({
|
|
|
102
102
|
data-loading-item
|
|
103
103
|
variant="circular"
|
|
104
104
|
className={cn('relative shrink-0 ring-2 ring-ods-card', i > 0 && overlapClass(size))}
|
|
105
|
-
width={
|
|
106
|
-
height={
|
|
105
|
+
width={AVATAR_SIZE_PX[size]}
|
|
106
|
+
height={AVATAR_SIZE_PX[size]}
|
|
107
107
|
/>
|
|
108
108
|
)}
|
|
109
109
|
</LoadingItems>
|
|
@@ -4,6 +4,7 @@ import React from 'react';
|
|
|
4
4
|
import Image from '../../embed-shims/next-image';
|
|
5
5
|
import { useAuthedImageSrc } from '../../hooks/use-authed-image-src';
|
|
6
6
|
import { TILE_SIZE } from '../../styles/component-sizes';
|
|
7
|
+
import { IMAGE_FIXED_PX } from '../../styles/image-sizes';
|
|
7
8
|
import { cn } from '../../utils/cn';
|
|
8
9
|
import { personInitials } from '../../utils/format';
|
|
9
10
|
import { UnifiedSkeleton } from '../loading/unified-skeleton';
|
|
@@ -79,8 +80,8 @@ export function EntityImage({ src, alt, fallbackText, sizeClassName, className }
|
|
|
79
80
|
// Intrinsic hint only — the responsive `size-*` classes above own the
|
|
80
81
|
// rendered box. `unoptimized` because `useAuthedImageSrc` hands back a
|
|
81
82
|
// `blob:` URL under bearer-token hosts, which no image optimizer can fetch.
|
|
82
|
-
width={
|
|
83
|
-
height={
|
|
83
|
+
width={IMAGE_FIXED_PX.thumb}
|
|
84
|
+
height={IMAGE_FIXED_PX.thumb}
|
|
84
85
|
unoptimized
|
|
85
86
|
/>
|
|
86
87
|
);
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import { ChevronLeft, ChevronRight } from 'lucide-react';
|
|
4
4
|
import { useCallback, useEffect, useRef, useState } from 'react';
|
|
5
5
|
import Image from '../../embed-shims/next-image';
|
|
6
|
+
import { IMAGE_SLOT } from '../../styles/image-sizes';
|
|
6
7
|
import { Button } from './button';
|
|
7
8
|
import { Modal } from './modal';
|
|
8
9
|
|
|
@@ -122,7 +123,7 @@ export function ImageGalleryModal({ images, isOpen, onClose, initialIndex = 0 }:
|
|
|
122
123
|
alt={`Screenshot ${selectedImageIndex + 1}`}
|
|
123
124
|
fill
|
|
124
125
|
className="object-contain"
|
|
125
|
-
sizes=
|
|
126
|
+
sizes={IMAGE_SLOT.full}
|
|
126
127
|
priority={true}
|
|
127
128
|
unoptimized
|
|
128
129
|
onError={e => {
|
|
@@ -4,6 +4,7 @@ import { Loader2 } from 'lucide-react';
|
|
|
4
4
|
import { type ChangeEvent, type DragEvent, type KeyboardEvent, type ReactNode, useRef, useState } from 'react';
|
|
5
5
|
import Image from '../../embed-shims/next-image';
|
|
6
6
|
import { useAuthedImageSrc } from '../../hooks/use-authed-image-src';
|
|
7
|
+
import { IMAGE_SLOT } from '../../styles/image-sizes';
|
|
7
8
|
import { cn } from '../../utils/cn';
|
|
8
9
|
import { fileMediaType, IMAGE_FILE_ACCEPT } from '../../utils/media-type';
|
|
9
10
|
import { ImagePlusIcon } from '../icons-v2-generated/audio-and-visual/image-plus-icon';
|
|
@@ -216,7 +217,7 @@ export function ImageUploader({
|
|
|
216
217
|
src={resolvedValue}
|
|
217
218
|
alt={alt}
|
|
218
219
|
fill
|
|
219
|
-
sizes=
|
|
220
|
+
sizes={IMAGE_SLOT.full}
|
|
220
221
|
// `useAuthedImageSrc` yields a `blob:` URL under bearer-token
|
|
221
222
|
// hosts, which no image optimizer can fetch.
|
|
222
223
|
unoptimized
|
|
@@ -147,6 +147,7 @@ export * from './deleted-user-avatar';
|
|
|
147
147
|
export * from './square-avatar';
|
|
148
148
|
// THE sizes of the library's components (avatars, icons, tiles, media, text rows).
|
|
149
149
|
export * from '../../styles/component-sizes';
|
|
150
|
+
export * from '../../styles/image-sizes';
|
|
150
151
|
export * from './tab-selector';
|
|
151
152
|
export * from './tag';
|
|
152
153
|
export * from './title-content-block';
|
|
@@ -11,6 +11,7 @@ import Image from '../../../embed-shims/next-image';
|
|
|
11
11
|
*/
|
|
12
12
|
import Link from '../../../embed-shims/next-link';
|
|
13
13
|
import { useAuthedImageSrc } from '../../../hooks/use-authed-image-src';
|
|
14
|
+
import { IMAGE_SLOT } from '../../../styles/image-sizes';
|
|
14
15
|
import type { ResolveLinkResult } from '../../../types/doc-source';
|
|
15
16
|
import { cn } from '../../../utils/cn';
|
|
16
17
|
import { slugifyHeadingText } from '../../../utils/markdown-heading-id';
|
|
@@ -87,7 +88,7 @@ const MarkdownContentImage: React.FC<{ src: string; alt?: string }> = ({ src, al
|
|
|
87
88
|
alt={alt ?? 'No image available'}
|
|
88
89
|
width={400}
|
|
89
90
|
height={400}
|
|
90
|
-
sizes=
|
|
91
|
+
sizes={IMAGE_SLOT.inline}
|
|
91
92
|
className="h-auto max-h-[400px] w-auto max-w-full rounded-lg object-contain"
|
|
92
93
|
style={{ width: 'auto', height: 'auto' }}
|
|
93
94
|
/>
|
|
@@ -18,6 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
20
20
|
import Image, { resizedImageUrl } from '../../embed-shims/next-image';
|
|
21
|
+
import { imageWidthFor } from '../../styles/image-sizes';
|
|
21
22
|
import { cn } from '../../utils/cn';
|
|
22
23
|
import { UnifiedSkeleton } from '../loading/unified-skeleton';
|
|
23
24
|
import { useLoadingScope } from './loading-scope';
|
|
@@ -55,20 +56,15 @@ const EAGER_PHOTOS_PER_COLUMN = 2;
|
|
|
55
56
|
// A column is repeated until it is this much taller than the wall.
|
|
56
57
|
const FILL_FACTOR = 1.25;
|
|
57
58
|
const MAX_REPEATS = 8;
|
|
58
|
-
/**
|
|
59
|
-
* The widths a wall photo is asked for. A column is a fraction of the wall, so a
|
|
60
|
-
* photo is requested at the first step that covers its column on this screen
|
|
61
|
-
* (at most twice the column, for dense screens), never at the caller's one size
|
|
62
|
-
* for every viewport. Steps, not the exact width, so a resize by a few pixels
|
|
63
|
-
* asks for nothing new.
|
|
64
|
-
*/
|
|
65
|
-
const PHOTO_WIDTH_STEPS_PX = [240, 360, 480, 640, 960] as const;
|
|
66
59
|
const MAX_PIXEL_DENSITY = 2;
|
|
67
60
|
|
|
68
|
-
/**
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
61
|
+
/**
|
|
62
|
+
* The width to ask a photo at for a column `columnWidth` wide: the first width of the image-size table's ladder that
|
|
63
|
+
* covers the column on this screen (at most twice the column, for dense screens), so a wall photo is the same cached
|
|
64
|
+
* file every `srcset` picture of that width asks for, and a resize by a few pixels asks for nothing new.
|
|
65
|
+
*/
|
|
66
|
+
export function photoWallRequestWidth(columnWidth: number, pixelDensity: number): number {
|
|
67
|
+
return imageWidthFor(columnWidth * Math.min(Math.max(1, pixelDensity), MAX_PIXEL_DENSITY));
|
|
72
68
|
}
|
|
73
69
|
|
|
74
70
|
export function photoOrientation(naturalWidth: number, naturalHeight: number): PhotoOrientation {
|
|
@@ -182,7 +178,7 @@ export interface PhotoWallProps {
|
|
|
182
178
|
/** The pictures are still being fetched: show the wall's own placeholder frames. */
|
|
183
179
|
loading?: boolean;
|
|
184
180
|
/**
|
|
185
|
-
* The width a column is drawn at, as an image `sizes` value
|
|
181
|
+
* The width a column is drawn at, as an image `sizes` value from the image-size table (`IMAGE_SLOT.wall`). With it, and a
|
|
186
182
|
* size on every picture, the wall is laid out at once, on the server too, and each picture is drawn with the host's
|
|
187
183
|
* `srcset`: the first frames are in the HTML and fetched before any script runs, instead of after the wall has been
|
|
188
184
|
* measured in the browser (CU-17tkuw5xp4q: the careers hero's largest paint waited for that). Two walls given the
|
|
@@ -245,7 +241,7 @@ export function PhotoWall({
|
|
|
245
241
|
// Each picture is measured at the url it is drawn from (the boxed `Image`'s
|
|
246
242
|
// `optimizedWidth`: the host's resizer at the column's width), so it is downloaded once.
|
|
247
243
|
// Laid out up front, a picture is drawn from its own url with the host's `srcset` (`sizes`), on the server too.
|
|
248
|
-
const drawnWidth = sizedUpFront ? undefined :
|
|
244
|
+
const drawnWidth = sizedUpFront ? undefined : requestWidth;
|
|
249
245
|
const drawnUrl = useCallback((url: string) => (drawnWidth ? resizedImageUrl(url, drawnWidth) : url), [drawnWidth]);
|
|
250
246
|
// A picture whose size the host stated has its orientation now; only the others are measured.
|
|
251
247
|
const known = useMemo(() => {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { type HTMLAttributes, memo, forwardRef } from 'react';
|
|
4
4
|
import Image from '../../embed-shims/next-image';
|
|
5
5
|
import { useAuthedImageSrc } from '../../hooks/use-authed-image-src';
|
|
6
|
-
import { AVATAR_SIZE, AVATAR_SIZE_PX } from '../../styles/component-sizes';
|
|
6
|
+
import { AVATAR_SIZE, AVATAR_SIZE_PX, type AvatarSize } from '../../styles/component-sizes';
|
|
7
7
|
import { cn } from '../../utils/cn';
|
|
8
8
|
import { personInitials } from '../../utils/format';
|
|
9
9
|
import { UnifiedSkeleton } from '../loading/unified-skeleton';
|
|
@@ -13,7 +13,7 @@ interface SquareAvatarProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
13
13
|
src?: string;
|
|
14
14
|
alt?: string;
|
|
15
15
|
/** A step of the shared avatar scale (`AVATAR_SIZE`). */
|
|
16
|
-
size?:
|
|
16
|
+
size?: AvatarSize;
|
|
17
17
|
/** Exact pixel size (width & height). Overrides the `size` bucket dimensions —
|
|
18
18
|
* for callers with a numeric-px API (e.g. UserDisplay/MSPDisplay). */
|
|
19
19
|
sizePx?: number;
|
|
@@ -23,6 +23,8 @@ interface SquareAvatarProps extends HTMLAttributes<HTMLDivElement> {
|
|
|
23
23
|
* crest, whose round border cover slices off.
|
|
24
24
|
*/
|
|
25
25
|
fit?: 'cover' | 'contain';
|
|
26
|
+
/** A `contain` picture kept off the frame's edges (a logo on its tile). */
|
|
27
|
+
padded?: boolean;
|
|
26
28
|
fallback?: string;
|
|
27
29
|
variant?: 'square' | 'round';
|
|
28
30
|
/** Override the initials-fallback styling (font size/color). Merged over the
|
|
@@ -50,6 +52,7 @@ const SquareAvatar = memo(
|
|
|
50
52
|
size = 'md',
|
|
51
53
|
sizePx,
|
|
52
54
|
fit = 'cover',
|
|
55
|
+
padded = false,
|
|
53
56
|
fallback,
|
|
54
57
|
variant = 'square',
|
|
55
58
|
initialsClassName,
|
|
@@ -118,7 +121,7 @@ const SquareAvatar = memo(
|
|
|
118
121
|
'absolute max-w-none',
|
|
119
122
|
fit === 'contain'
|
|
120
123
|
? // A LOGO or crest must fit whole; cover would slice its edges.
|
|
121
|
-
'inset-0 h-full w-full object-contain'
|
|
124
|
+
cn('inset-0 h-full w-full object-contain', padded && 'p-1')
|
|
122
125
|
: // A portrait fills the frame; the 1px overscan hides edge seams.
|
|
123
126
|
'-inset-px h-[calc(100%+2px)] w-[calc(100%+2px)] object-cover',
|
|
124
127
|
)}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import Image from '../embed-shims/next-image';
|
|
4
|
+
import { AVATAR_SIZE_PX } from '../styles/component-sizes';
|
|
4
5
|
import { useProxiedImageUrl } from './chat/hooks/use-proxied-image-url';
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -38,7 +39,7 @@ interface Props {
|
|
|
38
39
|
} | null;
|
|
39
40
|
/** Compact mode (avatar + name row, used in comment headers) */
|
|
40
41
|
compact?: boolean;
|
|
41
|
-
/** Avatar size in px for compact mode (defaults
|
|
42
|
+
/** Avatar size in px for compact mode (defaults to the avatar scale's `md`) */
|
|
42
43
|
avatarSize?: number;
|
|
43
44
|
|
|
44
45
|
/** NOT IMPLEMENTED in the stub. Would swap the avatar for ProfilePhotoUpload. */
|
|
@@ -88,7 +89,7 @@ export function UserSummary({
|
|
|
88
89
|
showEditButton = false,
|
|
89
90
|
mspPreview,
|
|
90
91
|
compact = false,
|
|
91
|
-
avatarSize =
|
|
92
|
+
avatarSize = AVATAR_SIZE_PX.md,
|
|
92
93
|
}: Props) {
|
|
93
94
|
const avatarSrc = useProxiedImageUrl(avatarUrl, { directHttps: false });
|
|
94
95
|
const mspLogoSrc = useProxiedImageUrl(mspPreview?.logoUrl, { directHttps: false });
|
|
@@ -121,8 +122,8 @@ export function UserSummary({
|
|
|
121
122
|
<Image
|
|
122
123
|
src={mspLogoSrc}
|
|
123
124
|
alt={mspPreview.name || 'MSP'}
|
|
124
|
-
width={
|
|
125
|
-
height={
|
|
125
|
+
width={AVATAR_SIZE_PX.xs}
|
|
126
|
+
height={AVATAR_SIZE_PX.xs}
|
|
126
127
|
className="absolute -bottom-1 -right-1 z-10 size-6 select-none rounded-full object-cover"
|
|
127
128
|
/>
|
|
128
129
|
)}
|
|
@@ -155,7 +156,13 @@ export function UserSummary({
|
|
|
155
156
|
{/* Avatar with badge wrapper */}
|
|
156
157
|
<div className="relative h-24 w-24 shrink-0 overflow-visible">
|
|
157
158
|
{avatarUrl ? (
|
|
158
|
-
<Image
|
|
159
|
+
<Image
|
|
160
|
+
src={avatarSrc}
|
|
161
|
+
alt={name}
|
|
162
|
+
width={AVATAR_SIZE_PX.profile}
|
|
163
|
+
height={AVATAR_SIZE_PX.profile}
|
|
164
|
+
className="rounded-full object-cover"
|
|
165
|
+
/>
|
|
159
166
|
) : (
|
|
160
167
|
<div className="flex h-full w-full items-center justify-center rounded-full border border-ods-border bg-ods-card font-heading text-3xl text-ods-text-secondary">
|
|
161
168
|
{name.charAt(0).toUpperCase()}
|
|
@@ -169,8 +176,8 @@ export function UserSummary({
|
|
|
169
176
|
<Image
|
|
170
177
|
src={mspLogoSrc}
|
|
171
178
|
alt={mspPreview.name || 'MSP Logo'}
|
|
172
|
-
width={
|
|
173
|
-
height={
|
|
179
|
+
width={AVATAR_SIZE_PX.md}
|
|
180
|
+
height={AVATAR_SIZE_PX.md}
|
|
174
181
|
className="object-cover"
|
|
175
182
|
/>
|
|
176
183
|
) : (
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import Image from '../embed-shims/next-image';
|
|
4
|
+
import { IMAGE_FIXED_PX } from '../styles/image-sizes';
|
|
4
5
|
import { cn } from '../utils/cn';
|
|
5
6
|
import { getVendorLogo, type VendorWithMedia } from '../utils/vendor-media-stub';
|
|
6
7
|
import { useProxiedImageUrl } from './chat/hooks/use-proxied-image-url';
|
|
@@ -47,8 +48,8 @@ export function VendorDisplayButton({ vendor, onClick, variant = 'default', exte
|
|
|
47
48
|
<Image
|
|
48
49
|
src={logoSrc}
|
|
49
50
|
alt={`${vendor.title} logo`}
|
|
50
|
-
width={
|
|
51
|
-
height={
|
|
51
|
+
width={IMAGE_FIXED_PX.glyph}
|
|
52
|
+
height={IMAGE_FIXED_PX.glyph}
|
|
52
53
|
className="h-full w-full object-cover"
|
|
53
54
|
/>
|
|
54
55
|
</div>
|
|
@@ -69,7 +70,13 @@ export function VendorDisplayButton({ vendor, onClick, variant = 'default', exte
|
|
|
69
70
|
<Button variant="chip" data-tone="accent" onClick={handleClick} className={VENDOR_DISPLAY_BUTTON_LAYOUT_CLASS}>
|
|
70
71
|
{logoUrl ? (
|
|
71
72
|
<div className={cn(VENDOR_DISPLAY_BUTTON_LOGO_CLASS, 'border border-ods-border bg-ods-card')}>
|
|
72
|
-
<Image
|
|
73
|
+
<Image
|
|
74
|
+
src={logoSrc}
|
|
75
|
+
alt={`${vendor.title} logo`}
|
|
76
|
+
width={IMAGE_FIXED_PX.glyph}
|
|
77
|
+
height={IMAGE_FIXED_PX.glyph}
|
|
78
|
+
className="rounded object-cover"
|
|
79
|
+
/>
|
|
73
80
|
</div>
|
|
74
81
|
) : (
|
|
75
82
|
<div className={cn(VENDOR_DISPLAY_BUTTON_LOGO_CLASS, 'border border-ods-border bg-ods-border')}>
|