nuxt-og-image 5.1.10 → 5.1.11

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 (195) hide show
  1. package/dist/client/200.html +1 -0
  2. package/dist/client/404.html +1 -0
  3. package/dist/client/_nuxt/B8PEiB0p.js +1 -0
  4. package/dist/client/_nuxt/CVO1_9PV.js +1 -0
  5. package/dist/client/_nuxt/Cp-IABpG.js +1 -0
  6. package/dist/client/_nuxt/CvR-yWOW.js +4062 -0
  7. package/dist/client/_nuxt/D0r3Knsf.js +1 -0
  8. package/dist/client/_nuxt/DEnNbrAc.js +1 -0
  9. package/dist/client/_nuxt/DeGaHs8e.js +1 -0
  10. package/dist/client/_nuxt/builds/latest.json +1 -0
  11. package/dist/client/_nuxt/builds/meta/fc37de2c-ce5a-4687-b9b5-2020cf8f035c.json +1 -0
  12. package/dist/client/_nuxt/entry.DykVEqUW.css +1 -0
  13. package/dist/client/_nuxt/error-404.C93MUFlo.css +1 -0
  14. package/dist/client/_nuxt/error-500.D-IxLaDc.css +1 -0
  15. package/dist/client/_nuxt/l5rcX3cq.js +8 -0
  16. package/dist/client/index.html +1 -0
  17. package/dist/content.cjs +22 -0
  18. package/dist/content.d.cts +46 -0
  19. package/dist/content.d.mts +46 -0
  20. package/dist/content.d.ts +46 -0
  21. package/dist/content.mjs +18 -0
  22. package/dist/module.cjs +1018 -0
  23. package/dist/module.d.cts +109 -0
  24. package/dist/module.d.mts +109 -0
  25. package/dist/module.d.ts +109 -0
  26. package/dist/module.json +12 -0
  27. package/dist/module.mjs +998 -0
  28. package/dist/runtime/app/components/OgImage/OgImage.d.ts +3 -0
  29. package/dist/runtime/app/components/OgImage/OgImage.js +10 -0
  30. package/dist/runtime/app/components/OgImage/OgImageScreenshot.d.ts +3 -0
  31. package/dist/runtime/app/components/OgImage/OgImageScreenshot.js +10 -0
  32. package/dist/runtime/app/components/Templates/Community/BrandedLogo.d.vue.ts +12 -0
  33. package/dist/runtime/app/components/Templates/Community/BrandedLogo.vue +22 -0
  34. package/dist/runtime/app/components/Templates/Community/BrandedLogo.vue.d.ts +12 -0
  35. package/dist/runtime/app/components/Templates/Community/Frame.d.vue.ts +20 -0
  36. package/dist/runtime/app/components/Templates/Community/Frame.vue +58 -0
  37. package/dist/runtime/app/components/Templates/Community/Frame.vue.d.ts +20 -0
  38. package/dist/runtime/app/components/Templates/Community/Nuxt.d.vue.ts +11 -0
  39. package/dist/runtime/app/components/Templates/Community/Nuxt.vue +179 -0
  40. package/dist/runtime/app/components/Templates/Community/Nuxt.vue.d.ts +11 -0
  41. package/dist/runtime/app/components/Templates/Community/NuxtSeo.d.vue.ts +14 -0
  42. package/dist/runtime/app/components/Templates/Community/NuxtSeo.vue +103 -0
  43. package/dist/runtime/app/components/Templates/Community/NuxtSeo.vue.d.ts +14 -0
  44. package/dist/runtime/app/components/Templates/Community/Pergel.d.vue.ts +11 -0
  45. package/dist/runtime/app/components/Templates/Community/Pergel.vue +98 -0
  46. package/dist/runtime/app/components/Templates/Community/Pergel.vue.d.ts +11 -0
  47. package/dist/runtime/app/components/Templates/Community/SimpleBlog.d.vue.ts +8 -0
  48. package/dist/runtime/app/components/Templates/Community/SimpleBlog.vue +27 -0
  49. package/dist/runtime/app/components/Templates/Community/SimpleBlog.vue.d.ts +8 -0
  50. package/dist/runtime/app/components/Templates/Community/UnJs.d.vue.ts +20 -0
  51. package/dist/runtime/app/components/Templates/Community/UnJs.vue +99 -0
  52. package/dist/runtime/app/components/Templates/Community/UnJs.vue.d.ts +20 -0
  53. package/dist/runtime/app/components/Templates/Community/Wave.d.vue.ts +10 -0
  54. package/dist/runtime/app/components/Templates/Community/Wave.vue +28 -0
  55. package/dist/runtime/app/components/Templates/Community/Wave.vue.d.ts +10 -0
  56. package/dist/runtime/app/components/Templates/Community/WithEmoji.d.vue.ts +12 -0
  57. package/dist/runtime/app/components/Templates/Community/WithEmoji.vue +21 -0
  58. package/dist/runtime/app/components/Templates/Community/WithEmoji.vue.d.ts +12 -0
  59. package/dist/runtime/app/composables/defineOgImage.d.ts +2 -0
  60. package/dist/runtime/app/composables/defineOgImage.js +43 -0
  61. package/dist/runtime/app/composables/defineOgImageComponent.d.ts +3 -0
  62. package/dist/runtime/app/composables/defineOgImageComponent.js +8 -0
  63. package/dist/runtime/app/composables/defineOgImageScreenshot.d.ts +2 -0
  64. package/dist/runtime/app/composables/defineOgImageScreenshot.js +14 -0
  65. package/dist/runtime/app/composables/mock.d.ts +5 -0
  66. package/dist/runtime/app/composables/mock.js +20 -0
  67. package/dist/runtime/app/plugins/__zero-runtime/og-image-canonical-urls.server.d.ts +2 -0
  68. package/dist/runtime/app/plugins/__zero-runtime/og-image-canonical-urls.server.js +9 -0
  69. package/dist/runtime/app/plugins/__zero-runtime/route-rule-og-image.server.d.ts +2 -0
  70. package/dist/runtime/app/plugins/__zero-runtime/route-rule-og-image.server.js +9 -0
  71. package/dist/runtime/app/plugins/og-image-canonical-urls.server.d.ts +2 -0
  72. package/dist/runtime/app/plugins/og-image-canonical-urls.server.js +7 -0
  73. package/dist/runtime/app/plugins/route-rule-og-image.server.d.ts +2 -0
  74. package/dist/runtime/app/plugins/route-rule-og-image.server.js +7 -0
  75. package/dist/runtime/app/utils/plugins.d.ts +3 -0
  76. package/dist/runtime/app/utils/plugins.js +92 -0
  77. package/dist/runtime/app/utils.d.ts +7 -0
  78. package/dist/runtime/app/utils.js +94 -0
  79. package/dist/runtime/assets/Inter-normal-400.ttf.base64 +1 -0
  80. package/dist/runtime/assets/Inter-normal-700.ttf.base64 +1 -0
  81. package/dist/runtime/logger.d.ts +2 -0
  82. package/dist/runtime/logger.js +8 -0
  83. package/dist/runtime/mock/empty.d.ts +2 -0
  84. package/dist/runtime/mock/empty.js +2 -0
  85. package/dist/runtime/mock/proxy-cjs.d.ts +2 -0
  86. package/dist/runtime/mock/proxy-cjs.js +2 -0
  87. package/dist/runtime/server/og-image/bindings/chromium/chrome-launcher.d.ts +2 -0
  88. package/dist/runtime/server/og-image/bindings/chromium/chrome-launcher.js +9 -0
  89. package/dist/runtime/server/og-image/bindings/chromium/on-demand.d.ts +2 -0
  90. package/dist/runtime/server/og-image/bindings/chromium/on-demand.js +40 -0
  91. package/dist/runtime/server/og-image/bindings/chromium/playwright.d.ts +2 -0
  92. package/dist/runtime/server/og-image/bindings/chromium/playwright.js +6 -0
  93. package/dist/runtime/server/og-image/bindings/css-inline/node.d.ts +8 -0
  94. package/dist/runtime/server/og-image/bindings/css-inline/node.js +7 -0
  95. package/dist/runtime/server/og-image/bindings/css-inline/wasm-fs.d.ts +7 -0
  96. package/dist/runtime/server/og-image/bindings/css-inline/wasm-fs.js +8 -0
  97. package/dist/runtime/server/og-image/bindings/css-inline/wasm.d.ts +7 -0
  98. package/dist/runtime/server/og-image/bindings/css-inline/wasm.js +7 -0
  99. package/dist/runtime/server/og-image/bindings/resvg/node.d.ts +6 -0
  100. package/dist/runtime/server/og-image/bindings/resvg/node.js +5 -0
  101. package/dist/runtime/server/og-image/bindings/resvg/wasm-fs.d.ts +40 -0
  102. package/dist/runtime/server/og-image/bindings/resvg/wasm-fs.js +6 -0
  103. package/dist/runtime/server/og-image/bindings/resvg/wasm.d.ts +40 -0
  104. package/dist/runtime/server/og-image/bindings/resvg/wasm.js +5 -0
  105. package/dist/runtime/server/og-image/bindings/satori/node.d.ts +6 -0
  106. package/dist/runtime/server/og-image/bindings/satori/node.js +5 -0
  107. package/dist/runtime/server/og-image/bindings/satori/wasm-fs.d.ts +6 -0
  108. package/dist/runtime/server/og-image/bindings/satori/wasm-fs.js +13 -0
  109. package/dist/runtime/server/og-image/bindings/satori/wasm.d.ts +6 -0
  110. package/dist/runtime/server/og-image/bindings/satori/wasm.js +13 -0
  111. package/dist/runtime/server/og-image/bindings/sharp/node.d.ts +2 -0
  112. package/dist/runtime/server/og-image/bindings/sharp/node.js +2 -0
  113. package/dist/runtime/server/og-image/cache/lru.d.ts +9 -0
  114. package/dist/runtime/server/og-image/cache/lru.js +15 -0
  115. package/dist/runtime/server/og-image/cache/mock.d.ts +9 -0
  116. package/dist/runtime/server/og-image/cache/mock.js +9 -0
  117. package/dist/runtime/server/og-image/chromium/renderer.d.ts +3 -0
  118. package/dist/runtime/server/og-image/chromium/renderer.js +24 -0
  119. package/dist/runtime/server/og-image/chromium/screenshot.d.ts +4 -0
  120. package/dist/runtime/server/og-image/chromium/screenshot.js +54 -0
  121. package/dist/runtime/server/og-image/context.d.ts +5 -0
  122. package/dist/runtime/server/og-image/context.js +283 -0
  123. package/dist/runtime/server/og-image/instances.d.ts +2 -0
  124. package/dist/runtime/server/og-image/instances.js +10 -0
  125. package/dist/runtime/server/og-image/satori/font.d.ts +3 -0
  126. package/dist/runtime/server/og-image/satori/font.js +40 -0
  127. package/dist/runtime/server/og-image/satori/instances.d.ts +41 -0
  128. package/dist/runtime/server/og-image/satori/instances.js +23 -0
  129. package/dist/runtime/server/og-image/satori/plugins/classes.d.ts +2 -0
  130. package/dist/runtime/server/og-image/satori/plugins/classes.js +17 -0
  131. package/dist/runtime/server/og-image/satori/plugins/emojis.d.ts +2 -0
  132. package/dist/runtime/server/og-image/satori/plugins/emojis.js +28 -0
  133. package/dist/runtime/server/og-image/satori/plugins/encoding.d.ts +2 -0
  134. package/dist/runtime/server/og-image/satori/plugins/encoding.js +17 -0
  135. package/dist/runtime/server/og-image/satori/plugins/flex.d.ts +2 -0
  136. package/dist/runtime/server/og-image/satori/plugins/flex.js +60 -0
  137. package/dist/runtime/server/og-image/satori/plugins/imageSrc.d.ts +2 -0
  138. package/dist/runtime/server/og-image/satori/plugins/imageSrc.js +107 -0
  139. package/dist/runtime/server/og-image/satori/plugins/nuxt-icon.d.ts +2 -0
  140. package/dist/runtime/server/og-image/satori/plugins/nuxt-icon.js +20 -0
  141. package/dist/runtime/server/og-image/satori/plugins/unocss.d.ts +2 -0
  142. package/dist/runtime/server/og-image/satori/plugins/unocss.js +55 -0
  143. package/dist/runtime/server/og-image/satori/renderer.d.ts +4 -0
  144. package/dist/runtime/server/og-image/satori/renderer.js +123 -0
  145. package/dist/runtime/server/og-image/satori/transforms/emojis.d.ts +3 -0
  146. package/dist/runtime/server/og-image/satori/transforms/emojis.js +3595 -0
  147. package/dist/runtime/server/og-image/satori/transforms/inlineCss.d.ts +3 -0
  148. package/dist/runtime/server/og-image/satori/transforms/inlineCss.js +51 -0
  149. package/dist/runtime/server/og-image/satori/utils.d.ts +3 -0
  150. package/dist/runtime/server/og-image/satori/utils.js +24 -0
  151. package/dist/runtime/server/og-image/satori/vnodes.d.ts +2 -0
  152. package/dist/runtime/server/og-image/satori/vnodes.js +40 -0
  153. package/dist/runtime/server/og-image/templates/html.d.ts +2 -0
  154. package/dist/runtime/server/og-image/templates/html.js +112 -0
  155. package/dist/runtime/server/plugins/__zero-runtime/nuxt-content-v2.d.ts +2 -0
  156. package/dist/runtime/server/plugins/__zero-runtime/nuxt-content-v2.js +9 -0
  157. package/dist/runtime/server/plugins/nuxt-content-v2.d.ts +2 -0
  158. package/dist/runtime/server/plugins/nuxt-content-v2.js +5 -0
  159. package/dist/runtime/server/plugins/prerender.d.ts +2 -0
  160. package/dist/runtime/server/plugins/prerender.js +38 -0
  161. package/dist/runtime/server/routes/__zero-runtime/font.d.ts +2 -0
  162. package/dist/runtime/server/routes/__zero-runtime/font.js +8 -0
  163. package/dist/runtime/server/routes/__zero-runtime/image.d.ts +2 -0
  164. package/dist/runtime/server/routes/__zero-runtime/image.js +8 -0
  165. package/dist/runtime/server/routes/debug.json.d.ts +7 -0
  166. package/dist/runtime/server/routes/debug.json.js +15 -0
  167. package/dist/runtime/server/routes/font.d.ts +2 -0
  168. package/dist/runtime/server/routes/font.js +3 -0
  169. package/dist/runtime/server/routes/image.d.ts +2 -0
  170. package/dist/runtime/server/routes/image.js +3 -0
  171. package/dist/runtime/server/tsconfig.json +3 -0
  172. package/dist/runtime/server/util/cache.d.ts +10 -0
  173. package/dist/runtime/server/util/cache.js +74 -0
  174. package/dist/runtime/server/util/encoding.d.ts +3 -0
  175. package/dist/runtime/server/util/encoding.js +15 -0
  176. package/dist/runtime/server/util/eventHandlers.d.ts +3 -0
  177. package/dist/runtime/server/util/eventHandlers.js +156 -0
  178. package/dist/runtime/server/util/kit.d.ts +6 -0
  179. package/dist/runtime/server/util/kit.js +32 -0
  180. package/dist/runtime/server/util/logger.d.ts +1 -0
  181. package/dist/runtime/server/util/logger.js +6 -0
  182. package/dist/runtime/server/util/options.d.ts +2 -0
  183. package/dist/runtime/server/util/options.js +18 -0
  184. package/dist/runtime/server/util/plugins.d.ts +2 -0
  185. package/dist/runtime/server/util/plugins.js +56 -0
  186. package/dist/runtime/server/util/wasm.d.ts +2 -0
  187. package/dist/runtime/server/util/wasm.js +16 -0
  188. package/dist/runtime/server/utils.d.ts +4 -0
  189. package/dist/runtime/server/utils.js +20 -0
  190. package/dist/runtime/shared.d.ts +15 -0
  191. package/dist/runtime/shared.js +132 -0
  192. package/dist/runtime/types.d.ts +187 -0
  193. package/dist/runtime/types.js +0 -0
  194. package/dist/types.d.mts +9 -0
  195. package/package.json +1 -1
@@ -0,0 +1,109 @@
1
+ import * as _nuxt_schema from '@nuxt/schema';
2
+ import { AddComponentOptions } from '@nuxt/kit';
3
+ import { ResvgRenderOptions } from '@resvg/resvg-js';
4
+ import { SatoriOptions } from 'satori';
5
+ import { SharpOptions } from 'sharp';
6
+ import { OgImageOptions, InputFontConfig, CompatibilityFlagEnvOverrides, OgImageComponent } from '../dist/runtime/types.js';
7
+
8
+ interface ModuleOptions {
9
+ /**
10
+ * Whether the og:image images should be generated.
11
+ *
12
+ * @default true
13
+ */
14
+ enabled: boolean;
15
+ /**
16
+ * Default data used within the payload to generate the OG Image.
17
+ *
18
+ * You can use this to change the default template, image sizing and more.
19
+ *
20
+ * @default { component: 'NuxtSeo', width: 1200, height: 630, cache: true, cacheTtl: 24 * 60 * 60 * 1000 }
21
+ */
22
+ defaults: OgImageOptions;
23
+ /**
24
+ * Fonts to use when rendering the og:image.
25
+ *
26
+ * @example ['Roboto:400', 'Roboto:700', { path: 'path/to/font.ttf', weight: 400, name: 'MyFont' }]
27
+ */
28
+ fonts: InputFontConfig[];
29
+ /**
30
+ * Options to pass to satori.
31
+ *
32
+ * @see https://github.com/vercel/satori/blob/main/src/satori.ts#L18
33
+ */
34
+ satoriOptions?: Partial<SatoriOptions>;
35
+ /**
36
+ * Options to pass to resvg.
37
+ *
38
+ * @see https://github.com/yisibl/resvg-js/blob/main/wasm/index.d.ts#L39
39
+ */
40
+ resvgOptions?: Partial<ResvgRenderOptions>;
41
+ /**
42
+ * Options to pass to sharp.
43
+ *
44
+ * @see https://sharp.pixelplumbing.com/api-constructor
45
+ */
46
+ sharpOptions?: true | Partial<SharpOptions>;
47
+ /**
48
+ * Enables debug logs and a debug endpoint.
49
+ *
50
+ * @false false
51
+ */
52
+ debug: boolean;
53
+ /**
54
+ * Options to pass to the <OgImage> and <OgImageScreenshot> component.
55
+ */
56
+ componentOptions?: Pick<AddComponentOptions, 'global'>;
57
+ /**
58
+ * Modify the cache behavior.
59
+ *
60
+ * Passing a boolean will enable or disable the runtime cache with the default options.
61
+ *
62
+ * Providing a record will allow you to configure the runtime cache fully.
63
+ *
64
+ * @default true
65
+ * @see https://nitro.unjs.io/guide/storage#mountpoints
66
+ * @example { driver: 'redis', host: 'localhost', port: 6379, password: 'password' }
67
+ */
68
+ runtimeCacheStorage: boolean | (Record<string, any> & {
69
+ driver: string;
70
+ });
71
+ /**
72
+ * Extra component directories that should be used to resolve components.
73
+ *
74
+ * @default ['OgImage', 'og-image', 'OgImageTemplate']
75
+ */
76
+ componentDirs: string[];
77
+ /**
78
+ * Manually modify the compatibility.
79
+ */
80
+ compatibility?: CompatibilityFlagEnvOverrides;
81
+ /**
82
+ * Use an alternative host for downloading Google Fonts. This is used to support China where Google Fonts is blocked.
83
+ *
84
+ * When `true` is set will use `fonts.font.im`, otherwise will use a string as the host.
85
+ */
86
+ googleFontMirror?: true | string;
87
+ /**
88
+ * Only allow the prerendering and dev runtimes to generate images.
89
+ */
90
+ zeroRuntime?: boolean;
91
+ /**
92
+ * Enable when your nuxt/content files match your pages.
93
+ *
94
+ * This will automatically map the `ogImage` frontmatter key to the correct path.
95
+ *
96
+ * This is similar behavior to using `nuxt/content` with `documentDriven: true`.
97
+ */
98
+ strictNuxtContentPaths?: boolean;
99
+ }
100
+ interface ModuleHooks {
101
+ 'nuxt-og-image:components': (ctx: {
102
+ components: OgImageComponent[];
103
+ }) => Promise<void> | void;
104
+ 'nuxt-og-image:runtime-config': (config: ModuleOptions) => Promise<void> | void;
105
+ }
106
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
107
+
108
+ export = _default;
109
+ export type { ModuleHooks, ModuleOptions };
@@ -0,0 +1,109 @@
1
+ import * as _nuxt_schema from '@nuxt/schema';
2
+ import { AddComponentOptions } from '@nuxt/kit';
3
+ import { ResvgRenderOptions } from '@resvg/resvg-js';
4
+ import { SatoriOptions } from 'satori';
5
+ import { SharpOptions } from 'sharp';
6
+ import { OgImageOptions, InputFontConfig, CompatibilityFlagEnvOverrides, OgImageComponent } from '../dist/runtime/types.js';
7
+
8
+ interface ModuleOptions {
9
+ /**
10
+ * Whether the og:image images should be generated.
11
+ *
12
+ * @default true
13
+ */
14
+ enabled: boolean;
15
+ /**
16
+ * Default data used within the payload to generate the OG Image.
17
+ *
18
+ * You can use this to change the default template, image sizing and more.
19
+ *
20
+ * @default { component: 'NuxtSeo', width: 1200, height: 630, cache: true, cacheTtl: 24 * 60 * 60 * 1000 }
21
+ */
22
+ defaults: OgImageOptions;
23
+ /**
24
+ * Fonts to use when rendering the og:image.
25
+ *
26
+ * @example ['Roboto:400', 'Roboto:700', { path: 'path/to/font.ttf', weight: 400, name: 'MyFont' }]
27
+ */
28
+ fonts: InputFontConfig[];
29
+ /**
30
+ * Options to pass to satori.
31
+ *
32
+ * @see https://github.com/vercel/satori/blob/main/src/satori.ts#L18
33
+ */
34
+ satoriOptions?: Partial<SatoriOptions>;
35
+ /**
36
+ * Options to pass to resvg.
37
+ *
38
+ * @see https://github.com/yisibl/resvg-js/blob/main/wasm/index.d.ts#L39
39
+ */
40
+ resvgOptions?: Partial<ResvgRenderOptions>;
41
+ /**
42
+ * Options to pass to sharp.
43
+ *
44
+ * @see https://sharp.pixelplumbing.com/api-constructor
45
+ */
46
+ sharpOptions?: true | Partial<SharpOptions>;
47
+ /**
48
+ * Enables debug logs and a debug endpoint.
49
+ *
50
+ * @false false
51
+ */
52
+ debug: boolean;
53
+ /**
54
+ * Options to pass to the <OgImage> and <OgImageScreenshot> component.
55
+ */
56
+ componentOptions?: Pick<AddComponentOptions, 'global'>;
57
+ /**
58
+ * Modify the cache behavior.
59
+ *
60
+ * Passing a boolean will enable or disable the runtime cache with the default options.
61
+ *
62
+ * Providing a record will allow you to configure the runtime cache fully.
63
+ *
64
+ * @default true
65
+ * @see https://nitro.unjs.io/guide/storage#mountpoints
66
+ * @example { driver: 'redis', host: 'localhost', port: 6379, password: 'password' }
67
+ */
68
+ runtimeCacheStorage: boolean | (Record<string, any> & {
69
+ driver: string;
70
+ });
71
+ /**
72
+ * Extra component directories that should be used to resolve components.
73
+ *
74
+ * @default ['OgImage', 'og-image', 'OgImageTemplate']
75
+ */
76
+ componentDirs: string[];
77
+ /**
78
+ * Manually modify the compatibility.
79
+ */
80
+ compatibility?: CompatibilityFlagEnvOverrides;
81
+ /**
82
+ * Use an alternative host for downloading Google Fonts. This is used to support China where Google Fonts is blocked.
83
+ *
84
+ * When `true` is set will use `fonts.font.im`, otherwise will use a string as the host.
85
+ */
86
+ googleFontMirror?: true | string;
87
+ /**
88
+ * Only allow the prerendering and dev runtimes to generate images.
89
+ */
90
+ zeroRuntime?: boolean;
91
+ /**
92
+ * Enable when your nuxt/content files match your pages.
93
+ *
94
+ * This will automatically map the `ogImage` frontmatter key to the correct path.
95
+ *
96
+ * This is similar behavior to using `nuxt/content` with `documentDriven: true`.
97
+ */
98
+ strictNuxtContentPaths?: boolean;
99
+ }
100
+ interface ModuleHooks {
101
+ 'nuxt-og-image:components': (ctx: {
102
+ components: OgImageComponent[];
103
+ }) => Promise<void> | void;
104
+ 'nuxt-og-image:runtime-config': (config: ModuleOptions) => Promise<void> | void;
105
+ }
106
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
107
+
108
+ export { _default as default };
109
+ export type { ModuleHooks, ModuleOptions };
@@ -0,0 +1,109 @@
1
+ import * as _nuxt_schema from '@nuxt/schema';
2
+ import { AddComponentOptions } from '@nuxt/kit';
3
+ import { ResvgRenderOptions } from '@resvg/resvg-js';
4
+ import { SatoriOptions } from 'satori';
5
+ import { SharpOptions } from 'sharp';
6
+ import { OgImageOptions, InputFontConfig, CompatibilityFlagEnvOverrides, OgImageComponent } from '../dist/runtime/types.js';
7
+
8
+ interface ModuleOptions {
9
+ /**
10
+ * Whether the og:image images should be generated.
11
+ *
12
+ * @default true
13
+ */
14
+ enabled: boolean;
15
+ /**
16
+ * Default data used within the payload to generate the OG Image.
17
+ *
18
+ * You can use this to change the default template, image sizing and more.
19
+ *
20
+ * @default { component: 'NuxtSeo', width: 1200, height: 630, cache: true, cacheTtl: 24 * 60 * 60 * 1000 }
21
+ */
22
+ defaults: OgImageOptions;
23
+ /**
24
+ * Fonts to use when rendering the og:image.
25
+ *
26
+ * @example ['Roboto:400', 'Roboto:700', { path: 'path/to/font.ttf', weight: 400, name: 'MyFont' }]
27
+ */
28
+ fonts: InputFontConfig[];
29
+ /**
30
+ * Options to pass to satori.
31
+ *
32
+ * @see https://github.com/vercel/satori/blob/main/src/satori.ts#L18
33
+ */
34
+ satoriOptions?: Partial<SatoriOptions>;
35
+ /**
36
+ * Options to pass to resvg.
37
+ *
38
+ * @see https://github.com/yisibl/resvg-js/blob/main/wasm/index.d.ts#L39
39
+ */
40
+ resvgOptions?: Partial<ResvgRenderOptions>;
41
+ /**
42
+ * Options to pass to sharp.
43
+ *
44
+ * @see https://sharp.pixelplumbing.com/api-constructor
45
+ */
46
+ sharpOptions?: true | Partial<SharpOptions>;
47
+ /**
48
+ * Enables debug logs and a debug endpoint.
49
+ *
50
+ * @false false
51
+ */
52
+ debug: boolean;
53
+ /**
54
+ * Options to pass to the <OgImage> and <OgImageScreenshot> component.
55
+ */
56
+ componentOptions?: Pick<AddComponentOptions, 'global'>;
57
+ /**
58
+ * Modify the cache behavior.
59
+ *
60
+ * Passing a boolean will enable or disable the runtime cache with the default options.
61
+ *
62
+ * Providing a record will allow you to configure the runtime cache fully.
63
+ *
64
+ * @default true
65
+ * @see https://nitro.unjs.io/guide/storage#mountpoints
66
+ * @example { driver: 'redis', host: 'localhost', port: 6379, password: 'password' }
67
+ */
68
+ runtimeCacheStorage: boolean | (Record<string, any> & {
69
+ driver: string;
70
+ });
71
+ /**
72
+ * Extra component directories that should be used to resolve components.
73
+ *
74
+ * @default ['OgImage', 'og-image', 'OgImageTemplate']
75
+ */
76
+ componentDirs: string[];
77
+ /**
78
+ * Manually modify the compatibility.
79
+ */
80
+ compatibility?: CompatibilityFlagEnvOverrides;
81
+ /**
82
+ * Use an alternative host for downloading Google Fonts. This is used to support China where Google Fonts is blocked.
83
+ *
84
+ * When `true` is set will use `fonts.font.im`, otherwise will use a string as the host.
85
+ */
86
+ googleFontMirror?: true | string;
87
+ /**
88
+ * Only allow the prerendering and dev runtimes to generate images.
89
+ */
90
+ zeroRuntime?: boolean;
91
+ /**
92
+ * Enable when your nuxt/content files match your pages.
93
+ *
94
+ * This will automatically map the `ogImage` frontmatter key to the correct path.
95
+ *
96
+ * This is similar behavior to using `nuxt/content` with `documentDriven: true`.
97
+ */
98
+ strictNuxtContentPaths?: boolean;
99
+ }
100
+ interface ModuleHooks {
101
+ 'nuxt-og-image:components': (ctx: {
102
+ components: OgImageComponent[];
103
+ }) => Promise<void> | void;
104
+ 'nuxt-og-image:runtime-config': (config: ModuleOptions) => Promise<void> | void;
105
+ }
106
+ declare const _default: _nuxt_schema.NuxtModule<ModuleOptions, ModuleOptions, false>;
107
+
108
+ export = _default;
109
+ export type { ModuleHooks, ModuleOptions };
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "nuxt-og-image",
3
+ "compatibility": {
4
+ "nuxt": ">=3.16.0"
5
+ },
6
+ "configKey": "ogImage",
7
+ "version": "5.1.11",
8
+ "builder": {
9
+ "@nuxt/module-builder": "1.0.2",
10
+ "unbuild": "3.6.1"
11
+ }
12
+ }