astro-opengraph-images 1.6.0 → 1.6.2

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/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.6.2](https://github.com/shepherdjerred/astro-opengraph-images/compare/v1.6.1...v1.6.2) (2024-07-01)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * remove type ([0400a2e](https://github.com/shepherdjerred/astro-opengraph-images/commit/0400a2e71d33dcd3fbc5e595e9f984f14097118b))
9
+
10
+ ## [1.6.1](https://github.com/shepherdjerred/astro-opengraph-images/compare/v1.6.0...v1.6.1) (2024-07-01)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * correct preset return types ([21e668a](https://github.com/shepherdjerred/astro-opengraph-images/commit/21e668acc0c426a07435af73e4ccbae351d83d40))
16
+
3
17
  ## [1.6.0](https://github.com/shepherdjerred/astro-opengraph-images/compare/v1.5.0...v1.6.0) (2024-07-01)
4
18
 
5
19
 
package/README.md CHANGED
@@ -24,10 +24,11 @@ You've probably seen this in action when posting a link on Facebook, Twitter, Sl
24
24
  > [!WARNING]
25
25
  > This integration has only been tested with statically rendered sites. It is untested with server-side rendering.
26
26
 
27
+ - Written in TypeScript
27
28
  - Generate Open Graph images for every page on your site.
28
29
  - Use a preset renderer to get started quickly.
29
- - Images are fully customizable.
30
- - Use React + Tailwind syntax or vanilla JavaScript to define your own custom images.
30
+ - Images are fully customizable using [Satori](https://github.com/vercel/satori).
31
+ - Use React/JSX + Tailwind syntax or vanilla JavaScript to define your own custom images.
31
32
  - Supports both static pages and Astro content collections.
32
33
  - Pages can be written in Markdown, MDX, HTML, or any other format.
33
34
 
@@ -63,9 +64,7 @@ You've probably seen this in action when posting a link on Facebook, Twitter, Sl
63
64
  npm i @fontsource/roboto
64
65
  ```
65
66
 
66
- You can find more fonts on [Fontsource](https://fontsource.org/), or you can use any font file.
67
-
68
- See [Satori's font documentation](https://github.com/vercel/satori?tab=readme-ov-file#fonts) for more information.
67
+ You can find more fonts on [Fontsource](https://fontsource.org/), or you can use any font file that you have. See [Satori's font documentation](https://github.com/vercel/satori?tab=readme-ov-file#fonts) for more information.
69
68
 
70
69
  1. Configure the integration in your `astro.config.js` file:
71
70
 
@@ -170,6 +169,16 @@ You've probably seen this in action when posting a link on Facebook, Twitter, Sl
170
169
  - Sending a link to your site in an application that supports Open Graph like iMessage, Slack, Discord, etc.
171
170
  - Visit [opengraph.xyz](http://opengraph.xyz/) and test your site.
172
171
 
172
+ ## Examples
173
+
174
+ There is an example site using this integration under [`example/`](https://github.com/shepherdjerred/astro-opengraph-images/tree/main/example).
175
+
176
+ ### Sites Using This
177
+
178
+ If you're using this project, [open a PR](https://github.com/shepherdjerred/astro-opengraph-images/compare) to add your site to this list.
179
+
180
+ - [sjer.red](https://sjer.red) ([source](https://github.com/shepherdjerred/sjer.red))
181
+
173
182
  ## Custom Renderers
174
183
 
175
184
  You can create your own custom images with a render function. Take a look at how [a preset](https://github.com/shepherdjerred/astro-opengraph-images/blob/main/src/presets/blackAndWhite.tsx) works.
package/README.md.tmpl CHANGED
@@ -24,10 +24,11 @@ You've probably seen this in action when posting a link on Facebook, Twitter, Sl
24
24
  > [!WARNING]
25
25
  > This integration has only been tested with statically rendered sites. It is untested with server-side rendering.
26
26
 
27
+ - Written in TypeScript
27
28
  - Generate Open Graph images for every page on your site.
28
29
  - Use a preset renderer to get started quickly.
29
- - Images are fully customizable.
30
- - Use React + Tailwind syntax or vanilla JavaScript to define your own custom images.
30
+ - Images are fully customizable using [Satori](https://github.com/vercel/satori).
31
+ - Use React/JSX + Tailwind syntax or vanilla JavaScript to define your own custom images.
31
32
  - Supports both static pages and Astro content collections.
32
33
  - Pages can be written in Markdown, MDX, HTML, or any other format.
33
34
 
@@ -63,9 +64,7 @@ You've probably seen this in action when posting a link on Facebook, Twitter, Sl
63
64
  npm i @fontsource/roboto
64
65
  ```
65
66
 
66
- You can find more fonts on [Fontsource](https://fontsource.org/), or you can use any font file.
67
-
68
- See [Satori's font documentation](https://github.com/vercel/satori?tab=readme-ov-file#fonts) for more information.
67
+ You can find more fonts on [Fontsource](https://fontsource.org/), or you can use any font file that you have. See [Satori's font documentation](https://github.com/vercel/satori?tab=readme-ov-file#fonts) for more information.
69
68
 
70
69
  1. Configure the integration in your `astro.config.js` file:
71
70
 
@@ -170,6 +169,16 @@ You've probably seen this in action when posting a link on Facebook, Twitter, Sl
170
169
  * Sending a link to your site in an application that supports Open Graph like iMessage, Slack, Discord, etc.
171
170
  * Visit [opengraph.xyz](http://opengraph.xyz/) and test your site.
172
171
 
172
+ ## Examples
173
+
174
+ There is an example site using this integration under [`example/`](https://github.com/shepherdjerred/astro-opengraph-images/tree/main/example).
175
+
176
+ ### Sites Using This
177
+
178
+ If you're using this project, [open a PR](https://github.com/shepherdjerred/astro-opengraph-images/compare) to add your site to this list.
179
+
180
+ * [sjer.red](https://sjer.red) ([source](https://github.com/shepherdjerred/sjer.red))
181
+
173
182
  ## Custom Renderers
174
183
 
175
184
  You can create your own custom images with a render function. Take a look at how [a preset](https://github.com/shepherdjerred/astro-opengraph-images/blob/main/src/presets/blackAndWhite.tsx) works.
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import type { RenderFunctionInput } from "../types.js";
3
- export declare function blackAndWhite({ title, description }: RenderFunctionInput): React.ReactNode;
3
+ export declare function blackAndWhite({ title, description }: RenderFunctionInput): Promise<React.ReactNode>;
4
4
  //# sourceMappingURL=blackAndWhite.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"blackAndWhite.d.ts","sourceRoot":"","sources":["../../src/presets/blackAndWhite.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,mBAAmB,GAAG,KAAK,CAAC,SAAS,CA+B1F"}
1
+ {"version":3,"file":"blackAndWhite.d.ts","sourceRoot":"","sources":["../../src/presets/blackAndWhite.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,mBAAmB,GAAG,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CA+BnG"}
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  export function blackAndWhite({ title, description }) {
3
- return (React.createElement("div", { style: {
3
+ return Promise.resolve(React.createElement("div", { style: {
4
4
  height: "100%",
5
5
  width: "100%",
6
6
  display: "flex",
@@ -1 +1 @@
1
- {"version":3,"file":"blackAndWhite.js","sourceRoot":"","sources":["../../src/presets/blackAndWhite.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,UAAU,aAAa,CAAC,EAAE,KAAK,EAAE,WAAW,EAAuB;IACvE,OAAO,CACL,6BACE,KAAK,EAAE;YACL,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,MAAM;YACb,OAAO,EAAE,MAAM;YACf,aAAa,EAAE,QAAQ;YACvB,eAAe,EAAE,MAAM;YACvB,OAAO,EAAE,WAAW;YACpB,KAAK,EAAE,MAAM;YACb,UAAU,EAAE,aAAa;YACzB,QAAQ,EAAE,EAAE;SACb;QAED,6BACE,KAAK,EAAE;gBACL,SAAS,EAAE,EAAE;aACd,IAEA,KAAK,CACF;QACN,6BACE,KAAK,EAAE;gBACL,QAAQ,EAAE,EAAE;aACb,IAEA,WAAW,IAAI,EAAE,CACd,CACF,CACP,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"blackAndWhite.js","sourceRoot":"","sources":["../../src/presets/blackAndWhite.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,UAAU,aAAa,CAAC,EAAE,KAAK,EAAE,WAAW,EAAuB;IACvE,OAAO,OAAO,CAAC,OAAO,CACpB,6BACE,KAAK,EAAE;YACL,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,MAAM;YACb,OAAO,EAAE,MAAM;YACf,aAAa,EAAE,QAAQ;YACvB,eAAe,EAAE,MAAM;YACvB,OAAO,EAAE,WAAW;YACpB,KAAK,EAAE,MAAM;YACb,UAAU,EAAE,aAAa;YACzB,QAAQ,EAAE,EAAE;SACb;QAED,6BACE,KAAK,EAAE;gBACL,SAAS,EAAE,EAAE;aACd,IAEA,KAAK,CACF;QACN,6BACE,KAAK,EAAE;gBACL,QAAQ,EAAE,EAAE;aACb,IAEA,WAAW,IAAI,EAAE,CACd,CACF,CACP,CAAC;AACJ,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import type { RenderFunctionInput } from "../types.js";
3
- export declare function gradients({ title, description }: RenderFunctionInput): React.ReactNode;
3
+ export declare function gradients({ title, description }: RenderFunctionInput): Promise<React.ReactNode>;
4
4
  //# sourceMappingURL=gradients.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"gradients.d.ts","sourceRoot":"","sources":["../../src/presets/gradients.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,mBAAmB,GAAG,KAAK,CAAC,SAAS,CAqCtF"}
1
+ {"version":3,"file":"gradients.d.ts","sourceRoot":"","sources":["../../src/presets/gradients.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,wBAAgB,SAAS,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,mBAAmB,GAAG,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CAqC/F"}
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  export function gradients({ title, description }) {
3
- return (React.createElement("div", { style: {
3
+ return Promise.resolve(React.createElement("div", { style: {
4
4
  display: "flex",
5
5
  height: "100%",
6
6
  width: "100%",
@@ -1 +1 @@
1
- {"version":3,"file":"gradients.js","sourceRoot":"","sources":["../../src/presets/gradients.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,UAAU,SAAS,CAAC,EAAE,KAAK,EAAE,WAAW,EAAuB;IACnE,OAAO,CACL,6BACE,KAAK,EAAE;YACL,OAAO,EAAE,MAAM;YACf,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,MAAM;YACb,UAAU,EAAE,QAAQ;YACpB,cAAc,EAAE,QAAQ;YACxB,aAAa,EAAE,QAAQ;YACvB,eAAe,EAAE,8CAA8C;YAC/D,QAAQ,EAAE,EAAE;YACZ,aAAa,EAAE,CAAC,CAAC;YACjB,UAAU,EAAE,GAAG;YACf,SAAS,EAAE,QAAQ;SACpB;QAED,6BACE,KAAK,EAAE;gBACL,eAAe,EAAE,4DAA4D;gBAC7E,cAAc,EAAE,MAAM;gBACtB,KAAK,EAAE,aAAa;aACrB,IAEA,KAAK,CACF;QACN,6BACE,KAAK,EAAE;gBACL,eAAe,EAAE,6DAA6D;gBAC9E,cAAc,EAAE,MAAM;gBACtB,KAAK,EAAE,aAAa;aACrB,IAEA,WAAW,IAAI,EAAE,CACd,CACF,CACP,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"gradients.js","sourceRoot":"","sources":["../../src/presets/gradients.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,UAAU,SAAS,CAAC,EAAE,KAAK,EAAE,WAAW,EAAuB;IACnE,OAAO,OAAO,CAAC,OAAO,CACpB,6BACE,KAAK,EAAE;YACL,OAAO,EAAE,MAAM;YACf,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,MAAM;YACb,UAAU,EAAE,QAAQ;YACpB,cAAc,EAAE,QAAQ;YACxB,aAAa,EAAE,QAAQ;YACvB,eAAe,EAAE,8CAA8C;YAC/D,QAAQ,EAAE,EAAE;YACZ,aAAa,EAAE,CAAC,CAAC;YACjB,UAAU,EAAE,GAAG;YACf,SAAS,EAAE,QAAQ;SACpB;QAED,6BACE,KAAK,EAAE;gBACL,eAAe,EAAE,4DAA4D;gBAC7E,cAAc,EAAE,MAAM;gBACtB,KAAK,EAAE,aAAa;aACrB,IAEA,KAAK,CACF;QACN,6BACE,KAAK,EAAE;gBACL,eAAe,EAAE,6DAA6D;gBAC9E,cAAc,EAAE,MAAM;gBACtB,KAAK,EAAE,aAAa;aACrB,IAEA,WAAW,IAAI,EAAE,CACd,CACF,CACP,CAAC;AACJ,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import type { RenderFunctionInput } from "../types.js";
3
- export declare function rauchg({ title }: RenderFunctionInput): React.ReactNode;
3
+ export declare function rauchg({ title }: RenderFunctionInput): Promise<React.ReactNode>;
4
4
  //# sourceMappingURL=rauchg.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rauchg.d.ts","sourceRoot":"","sources":["../../src/presets/rauchg.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,wBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE,mBAAmB,GAAG,KAAK,CAAC,SAAS,CA2DtE"}
1
+ {"version":3,"file":"rauchg.d.ts","sourceRoot":"","sources":["../../src/presets/rauchg.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,wBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE,mBAAmB,GAAG,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CA2D/E"}
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  export function rauchg({ title }) {
3
- return (React.createElement("div", { style: {
3
+ return Promise.resolve(React.createElement("div", { style: {
4
4
  display: "flex",
5
5
  height: "100%",
6
6
  width: "100%",
@@ -1 +1 @@
1
- {"version":3,"file":"rauchg.js","sourceRoot":"","sources":["../../src/presets/rauchg.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,UAAU,MAAM,CAAC,EAAE,KAAK,EAAuB;IACnD,OAAO,CACL,6BACE,KAAK,EAAE;YACL,OAAO,EAAE,MAAM;YACf,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,MAAM;YACb,UAAU,EAAE,QAAQ;YACpB,cAAc,EAAE,QAAQ;YACxB,aAAa,EAAE,QAAQ;YACvB,UAAU,EAAE,GAAG;YACf,UAAU,EAAE,OAAO;SACpB;QAED,6BACE,KAAK,EAAE;gBACL,IAAI,EAAE,EAAE;gBACR,GAAG,EAAE,EAAE;gBACP,QAAQ,EAAE,UAAU;gBACpB,OAAO,EAAE,MAAM;gBACf,UAAU,EAAE,QAAQ;aACrB;YAED,8BACE,KAAK,EAAE;oBACL,KAAK,EAAE,EAAE;oBACT,MAAM,EAAE,EAAE;oBACV,UAAU,EAAE,OAAO;iBACpB,GACD;YACF,8BACE,KAAK,EAAE;oBACL,UAAU,EAAE,CAAC;oBACb,QAAQ,EAAE,EAAE;iBACb,oBAGI,CACH;QACN,6BACE,KAAK,EAAE;gBACL,OAAO,EAAE,MAAM;gBACf,QAAQ,EAAE,MAAM;gBAChB,cAAc,EAAE,QAAQ;gBACxB,OAAO,EAAE,WAAW;gBACpB,MAAM,EAAE,QAAQ;gBAChB,QAAQ,EAAE,EAAE;gBACZ,KAAK,EAAE,MAAM;gBACb,QAAQ,EAAE,GAAG;gB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,GAAG;aAChB,IAEA,KAAK,CACF,CACF,CACP,CAAC;AACJ,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import React from "react";
2
2
  import type { RenderFunctionInput } from "../types.js";
3
- export declare function vercel({ title }: RenderFunctionInput): React.ReactNode;
3
+ export declare function vercel({ title }: RenderFunctionInput): Promise<React.ReactNode>;
4
4
  //# sourceMappingURL=vercel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"vercel.d.ts","sourceRoot":"","sources":["../../src/presets/vercel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,wBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE,mBAAmB,GAAG,KAAK,CAAC,SAAS,CA4CtE"}
1
+ {"version":3,"file":"vercel.d.ts","sourceRoot":"","sources":["../../src/presets/vercel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAEvD,wBAAgB,MAAM,CAAC,EAAE,KAAK,EAAE,EAAE,mBAAmB,GAAG,OAAO,CAAC,KAAK,CAAC,SAAS,CAAC,CA4C/E"}
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
2
  export function vercel({ title }) {
3
- return (React.createElement("div", { style: {
3
+ return Promise.resolve(React.createElement("div", { style: {
4
4
  height: "100%",
5
5
  width: "100%",
6
6
  display: "flex",
@@ -1 +1 @@
1
- {"version":3,"file":"vercel.js","sourceRoot":"","sources":["../../src/presets/vercel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,UAAU,MAAM,CAAC,EAAE,KAAK,EAAuB;IACnD,OAAO,CACL,6BACE,KAAK,EAAE;YACL,MAAM,EAAE,MAAM;YACd,KAAK,EAAE,MAAM;YACb,OAAO,EAAE,MAAM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E,aAAa;SAC9B;QAED,6BACE,KAAK,EAAE;gBACL,OAAO,EAAE,MAAM;gBACf,UAAU,EAAE,QAAQ;gBACpB,cAAc,EAAE,QAAQ;aACzB;YAED,6BAAK,MAAM,EAAE,EAAE,EAAE,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,OAAO,EAAC,KAAK,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE;gBAC3E,8BAAM,CAAC,EAAC,kCAAkC,GAAQ,CAC9C,CACF;QACN,6BACE,KAAK,EAAE;gBACL,OAAO,EAAE,MAAM;gBACf,QAAQ,EAAE,EAAE;gBACZ,SAAS,EAAE,QAAQ;gBACnB,KAAK,EAAE,OAAO;gBACd,SAAS,EAAE,EAAE;gBACb,UAAU,EAAE,GAAG;gBACf,UAAU,EAAE,UAAU;aACvB;YAED,+BAAI,KAAK,CAAK,CACV,CACF,CACP,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "astro-opengraph-images",
3
3
  "type": "module",
4
- "version": "1.6.0",
4
+ "version": "1.6.2",
5
5
  "scripts": {
6
6
  "prepare": "husky",
7
7
  "lint": "eslint src",
@@ -1,8 +1,8 @@
1
1
  import React from "react";
2
2
  import type { RenderFunctionInput } from "../types.js";
3
3
 
4
- export function blackAndWhite({ title, description }: RenderFunctionInput): React.ReactNode {
5
- return (
4
+ export function blackAndWhite({ title, description }: RenderFunctionInput): Promise<React.ReactNode> {
5
+ return Promise.resolve(
6
6
  <div
7
7
  style={{
8
8
  height: "100%",
@@ -30,6 +30,6 @@ export function blackAndWhite({ title, description }: RenderFunctionInput): Reac
30
30
  >
31
31
  {description ?? ""}
32
32
  </div>
33
- </div>
33
+ </div>,
34
34
  );
35
35
  }
@@ -1,8 +1,8 @@
1
1
  import React from "react";
2
2
  import type { RenderFunctionInput } from "../types.js";
3
3
 
4
- export function gradients({ title, description }: RenderFunctionInput): React.ReactNode {
5
- return (
4
+ export function gradients({ title, description }: RenderFunctionInput): Promise<React.ReactNode> {
5
+ return Promise.resolve(
6
6
  <div
7
7
  style={{
8
8
  display: "flex",
@@ -36,6 +36,6 @@ export function gradients({ title, description }: RenderFunctionInput): React.Re
36
36
  >
37
37
  {description ?? ""}
38
38
  </div>
39
- </div>
39
+ </div>,
40
40
  );
41
41
  }
@@ -1,8 +1,8 @@
1
1
  import React from "react";
2
2
  import type { RenderFunctionInput } from "../types.js";
3
3
 
4
- export function rauchg({ title }: RenderFunctionInput): React.ReactNode {
5
- return (
4
+ export function rauchg({ title }: RenderFunctionInput): Promise<React.ReactNode> {
5
+ return Promise.resolve(
6
6
  <div
7
7
  style={{
8
8
  display: "flex",
@@ -58,6 +58,6 @@ export function rauchg({ title }: RenderFunctionInput): React.ReactNode {
58
58
  >
59
59
  {title}
60
60
  </div>
61
- </div>
61
+ </div>,
62
62
  );
63
63
  }
@@ -1,8 +1,8 @@
1
1
  import React from "react";
2
2
  import type { RenderFunctionInput } from "../types.js";
3
3
 
4
- export function vercel({ title }: RenderFunctionInput): React.ReactNode {
5
- return (
4
+ export function vercel({ title }: RenderFunctionInput): Promise<React.ReactNode> {
5
+ return Promise.resolve(
6
6
  <div
7
7
  style={{
8
8
  height: "100%",
@@ -43,6 +43,6 @@ export function vercel({ title }: RenderFunctionInput): React.ReactNode {
43
43
  >
44
44
  <b>{title}</b>
45
45
  </div>
46
- </div>
46
+ </div>,
47
47
  );
48
48
  }