@mintlify/og 0.0.90 → 0.0.92
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/constants.d.ts
CHANGED
|
@@ -7,4 +7,4 @@ export declare const DEFAULT_FONT_FAMILY = "Inter";
|
|
|
7
7
|
export declare const MONO_FONT_FAMILY = "Paper Mono";
|
|
8
8
|
export declare const LOGO_HEIGHT = 56;
|
|
9
9
|
export declare const MAX_BRAND_GLOW_ALPHA: Record<OgAppearance, number>;
|
|
10
|
-
export declare const OG_RENDERER_REVISION =
|
|
10
|
+
export declare const OG_RENDERER_REVISION = 7;
|
package/dist/constants.js
CHANGED
|
@@ -7,4 +7,4 @@ export const MONO_FONT_FAMILY = 'Paper Mono';
|
|
|
7
7
|
export const LOGO_HEIGHT = 56;
|
|
8
8
|
export const MAX_BRAND_GLOW_ALPHA = { light: 0.32, dark: 0.52 };
|
|
9
9
|
// Bump whenever rendered output changes for the same input, so cards get new hashes.
|
|
10
|
-
export const OG_RENDERER_REVISION =
|
|
10
|
+
export const OG_RENDERER_REVISION = 7;
|
|
@@ -6,23 +6,7 @@ const FRAME = { left: 62.938, width: 1074.12, dividers: Object.values(CLASSIC_CO
|
|
|
6
6
|
export const ClassicFrame = ({ palette, glow, backgroundImageUrl, }) => {
|
|
7
7
|
var _a;
|
|
8
8
|
if (backgroundImageUrl) {
|
|
9
|
-
return
|
|
10
|
-
position: 'absolute',
|
|
11
|
-
top: 0,
|
|
12
|
-
left: `${FRAME.left}px`,
|
|
13
|
-
width: `${FRAME.width}px`,
|
|
14
|
-
height: `${OG_HEIGHT}px`,
|
|
15
|
-
display: 'flex',
|
|
16
|
-
borderLeft: `1px solid ${palette.line}`,
|
|
17
|
-
borderRight: `1px solid ${palette.line}`,
|
|
18
|
-
}, children: FRAME.dividers.map((top) => (_jsx("div", { style: {
|
|
19
|
-
position: 'absolute',
|
|
20
|
-
left: 0,
|
|
21
|
-
top: `${top}px`,
|
|
22
|
-
width: '100%',
|
|
23
|
-
height: '1px',
|
|
24
|
-
backgroundColor: palette.line,
|
|
25
|
-
} }, top))) }));
|
|
9
|
+
return null;
|
|
26
10
|
}
|
|
27
11
|
const direction = palette.title === '#FFFFFF' ? 'lighter' : 'darker';
|
|
28
12
|
const colors = getFrameColors(palette.background, glow, direction);
|
package/dist/layouts/preset.js
CHANGED
|
@@ -157,13 +157,14 @@ export const PresetLayout = ({ preset, content, palette, backgroundImageUrl, eye
|
|
|
157
157
|
: Math.max(settings.contentTop, (settings.contentBounds.top + settings.contentBounds.bottom - contentHeight) / 2);
|
|
158
158
|
const glow = getBrandGlow(preset, palette);
|
|
159
159
|
const glowGradient = getBrandGlowCss(glow);
|
|
160
|
+
const resolvedEyebrowStyle = preset === 'classic' && backgroundImageUrl && eyebrowStyle === 'bar' ? 'plain' : eyebrowStyle;
|
|
160
161
|
return (_jsxs("div", { style: Object.assign(Object.assign({ position: 'relative', display: 'flex', width: `${OG_WIDTH}px`, height: `${OG_HEIGHT}px`, backgroundColor: palette.background }, (backgroundImageUrl
|
|
161
162
|
? { backgroundImage: `url(${backgroundImageUrl})`, backgroundSize: '100% 100%' }
|
|
162
163
|
: glowGradient && { backgroundImage: glowGradient })), { fontFamily: getFontStack(fontFamily) }), children: [settings.frame && (_jsx(ClassicFrame, { palette: palette, glow: glow, backgroundImageUrl: backgroundImageUrl })), settings.panel && (_jsx("div", { style: Object.assign({ position: 'absolute', left: `${PANEL.left}px`, top: `${PANEL.top}px`, width: `${PANEL.width}px`, height: `${OG_HEIGHT - PANEL.top}px`, backgroundColor: palette.panel, borderTopLeftRadius: `${PANEL.radius}px`, borderTopRightRadius: `${PANEL.radius}px` }, (palette.panelBorder && {
|
|
163
164
|
borderTop: `1px solid ${palette.panelBorder}`,
|
|
164
165
|
borderLeft: `1px solid ${palette.panelBorder}`,
|
|
165
166
|
borderRight: `1px solid ${palette.panelBorder}`,
|
|
166
|
-
})) })), logo && (_jsx("div", { style: getLogoBoxStyle(settings.logo), children: _jsx(Logo, { logo: logo }) })), _jsxs("div", { style: Object.assign(Object.assign({ position: 'absolute', top: `${contentTop}px`, left: `${settings.contentLeft}px` }, (isCentered && { width: `${OG_WIDTH}px` })), { display: 'flex', flexDirection: 'column', alignItems: isCentered ? 'center' : 'flex-start' }), children: [eyebrow && (_jsx(Eyebrow, { text: eyebrow, style:
|
|
167
|
+
})) })), logo && (_jsx("div", { style: getLogoBoxStyle(settings.logo), children: _jsx(Logo, { logo: logo }) })), _jsxs("div", { style: Object.assign(Object.assign({ position: 'absolute', top: `${contentTop}px`, left: `${settings.contentLeft}px` }, (isCentered && { width: `${OG_WIDTH}px` })), { display: 'flex', flexDirection: 'column', alignItems: isCentered ? 'center' : 'flex-start' }), children: [eyebrow && (_jsx(Eyebrow, { text: eyebrow, style: resolvedEyebrowStyle, palette: palette, settings: settings })), _jsxs("div", { style: {
|
|
167
168
|
display: 'flex',
|
|
168
169
|
flexDirection: 'column',
|
|
169
170
|
alignItems: isCentered ? 'center' : 'flex-start',
|