@mintlify/og 0.0.15 → 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.
Files changed (39) hide show
  1. package/dist/constants.d.ts +4 -2
  2. package/dist/constants.js +3 -1
  3. package/dist/hash.js +11 -4
  4. package/dist/index.d.ts +3 -1
  5. package/dist/index.js +2 -0
  6. package/dist/inputs/default-font-urls.d.ts +2 -0
  7. package/dist/inputs/default-font-urls.js +2 -0
  8. package/dist/inputs/font-file.d.ts +1 -0
  9. package/dist/inputs/font-file.js +36 -0
  10. package/dist/inputs/fonts.d.ts +1 -0
  11. package/dist/inputs/fonts.js +18 -5
  12. package/dist/inputs/image.d.ts +12 -0
  13. package/dist/inputs/image.js +76 -6
  14. package/dist/inputs/oklch.d.ts +7 -0
  15. package/dist/inputs/oklch.js +45 -0
  16. package/dist/inputs/palette.d.ts +19 -0
  17. package/dist/inputs/palette.js +108 -0
  18. package/dist/inputs/resvg.d.ts +1 -0
  19. package/dist/inputs/resvg.js +12 -0
  20. package/dist/inputs/text-fit.d.ts +10 -0
  21. package/dist/inputs/text-fit.js +84 -0
  22. package/dist/inputs/theme.d.ts +4 -0
  23. package/dist/inputs/theme.js +2 -2
  24. package/dist/layouts/font-stack.d.ts +1 -0
  25. package/dist/layouts/font-stack.js +7 -0
  26. package/dist/layouts/index.d.ts +8 -3
  27. package/dist/layouts/index.js +8 -3
  28. package/dist/layouts/legacy.d.ts +2 -0
  29. package/dist/layouts/{classic.js → legacy.js} +3 -8
  30. package/dist/layouts/preset.d.ts +2 -0
  31. package/dist/layouts/preset.js +240 -0
  32. package/dist/layouts/types.d.ts +15 -1
  33. package/dist/render.js +40 -24
  34. package/dist/tsconfig.build.tsbuildinfo +1 -1
  35. package/dist/types.d.ts +10 -4
  36. package/fonts/Inter-Medium.ttf +0 -0
  37. package/fonts/PaperMono-Regular.ttf +0 -0
  38. package/package.json +5 -3
  39. package/dist/layouts/classic.d.ts +0 -2
package/dist/types.d.ts CHANGED
@@ -1,12 +1,15 @@
1
- export type OgAppearance = 'light' | 'dark';
2
- export type OgLayout = 'classic';
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
- layout?: OgLayout;
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.15",
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.1221",
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": "911b500bf0e880176dc9ecc8136ef3e1e5e9d9e8"
93
+ "gitHead": "9be6fd0880fae8f0edb3660995f73b948795376f"
92
94
  }
@@ -1,2 +0,0 @@
1
- import type { OgLayoutProps } from './types.js';
2
- export declare const ClassicLayout: ({ content, theme, logo, fontFamily }: OgLayoutProps) => import("react/jsx-runtime").JSX.Element;