@mintlify/og 0.0.16 → 0.0.17
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 +4 -2
- package/dist/constants.js +3 -1
- package/dist/hash.js +11 -4
- package/dist/index.d.ts +3 -1
- package/dist/index.js +2 -0
- package/dist/inputs/default-font-urls.d.ts +2 -0
- package/dist/inputs/default-font-urls.js +2 -0
- package/dist/inputs/font-file.d.ts +1 -0
- package/dist/inputs/font-file.js +36 -0
- package/dist/inputs/fonts.d.ts +1 -0
- package/dist/inputs/fonts.js +18 -5
- package/dist/inputs/image.d.ts +12 -0
- package/dist/inputs/image.js +76 -6
- package/dist/inputs/oklch.d.ts +7 -0
- package/dist/inputs/oklch.js +45 -0
- package/dist/inputs/palette.d.ts +19 -0
- package/dist/inputs/palette.js +108 -0
- package/dist/inputs/resvg.d.ts +1 -0
- package/dist/inputs/resvg.js +12 -0
- package/dist/inputs/text-fit.d.ts +10 -0
- package/dist/inputs/text-fit.js +84 -0
- package/dist/inputs/theme.d.ts +4 -0
- package/dist/inputs/theme.js +2 -2
- package/dist/layouts/font-stack.d.ts +1 -0
- package/dist/layouts/font-stack.js +7 -0
- package/dist/layouts/index.d.ts +8 -3
- package/dist/layouts/index.js +8 -3
- package/dist/layouts/legacy.d.ts +2 -0
- package/dist/layouts/{classic.js → legacy.js} +3 -8
- package/dist/layouts/preset.d.ts +2 -0
- package/dist/layouts/preset.js +240 -0
- package/dist/layouts/types.d.ts +15 -1
- package/dist/render.js +40 -24
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types.d.ts +10 -4
- package/fonts/Inter-Medium.ttf +0 -0
- package/fonts/PaperMono-Regular.ttf +0 -0
- package/package.json +5 -3
- package/dist/layouts/classic.d.ts +0 -2
package/dist/types.d.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
export type
|
|
1
|
+
import type { ThumbnailAppearance, ThumbnailsConfig } from '@mintlify/validation';
|
|
2
|
+
export type OgAppearance = `${ThumbnailAppearance}`;
|
|
3
|
+
export type OgPreset = 'legacy' | NonNullable<ThumbnailsConfig['preset']>;
|
|
4
|
+
export type OgSurface = NonNullable<ThumbnailsConfig['surface']>;
|
|
5
|
+
export type OgEyebrowStyle = NonNullable<NonNullable<ThumbnailsConfig['eyebrow']>['style']>;
|
|
3
6
|
export type OgImageAsset = {
|
|
4
7
|
bytes: Uint8Array;
|
|
5
8
|
contentType: string;
|
|
6
9
|
};
|
|
7
10
|
export type OgFontFace = {
|
|
8
11
|
data: ArrayBuffer | Buffer;
|
|
9
|
-
weight: 400 | 600 | 700;
|
|
12
|
+
weight: 400 | 500 | 600 | 700;
|
|
10
13
|
};
|
|
11
14
|
export type OgFont = {
|
|
12
15
|
family: string;
|
|
@@ -18,9 +21,12 @@ export type OgThemeInput = {
|
|
|
18
21
|
lightColor?: string;
|
|
19
22
|
backgroundLight?: string;
|
|
20
23
|
backgroundDark?: string;
|
|
24
|
+
surface?: OgSurface;
|
|
25
|
+
eyebrowColor?: string;
|
|
21
26
|
};
|
|
22
27
|
export type OgCardInput = {
|
|
23
|
-
|
|
28
|
+
preset?: OgPreset;
|
|
29
|
+
eyebrowStyle?: OgEyebrowStyle;
|
|
24
30
|
eyebrow?: string | null;
|
|
25
31
|
title?: string | null;
|
|
26
32
|
description?: string | null;
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mintlify/og",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.17",
|
|
4
4
|
"description": "Renders Mintlify social preview (Open Graph) cards",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=18.0.0"
|
|
@@ -70,8 +70,10 @@
|
|
|
70
70
|
"format:check": "oxfmt --check"
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@mintlify/common": "1.0.
|
|
73
|
+
"@mintlify/common": "1.0.1223",
|
|
74
|
+
"@mintlify/validation": "0.1.900",
|
|
74
75
|
"@resvg/resvg-wasm": "2.6.2",
|
|
76
|
+
"@shuding/opentype.js": "1.4.0-beta.0",
|
|
75
77
|
"image-size": "2.0.2",
|
|
76
78
|
"react": "19.2.3",
|
|
77
79
|
"satori": "0.12.0"
|
|
@@ -88,5 +90,5 @@
|
|
|
88
90
|
"typescript": "5.5.3",
|
|
89
91
|
"vitest": "2.1.9"
|
|
90
92
|
},
|
|
91
|
-
"gitHead": "
|
|
93
|
+
"gitHead": "9be6fd0880fae8f0edb3660995f73b948795376f"
|
|
92
94
|
}
|