@ewanc26/og 0.1.1

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.
@@ -0,0 +1,288 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/templates/index.ts
21
+ var templates_exports = {};
22
+ __export(templates_exports, {
23
+ blogTemplate: () => blogTemplate,
24
+ defaultTemplate: () => defaultTemplate,
25
+ getTemplate: () => getTemplate,
26
+ profileTemplate: () => profileTemplate,
27
+ templates: () => templates
28
+ });
29
+ module.exports = __toCommonJS(templates_exports);
30
+
31
+ // src/templates/blog.ts
32
+ function blogTemplate({
33
+ title,
34
+ description,
35
+ siteName,
36
+ colors,
37
+ width,
38
+ height
39
+ }) {
40
+ return {
41
+ type: "div",
42
+ props: {
43
+ style: {
44
+ display: "flex",
45
+ flexDirection: "column",
46
+ alignItems: "center",
47
+ justifyContent: "center",
48
+ width,
49
+ height,
50
+ backgroundColor: colors.background
51
+ },
52
+ children: [
53
+ {
54
+ type: "h1",
55
+ props: {
56
+ style: {
57
+ fontSize: 64,
58
+ fontWeight: 700,
59
+ color: colors.text,
60
+ letterSpacing: "-0.02em",
61
+ margin: 0,
62
+ textAlign: "center",
63
+ lineHeight: 1.1,
64
+ maxWidth: 1e3
65
+ },
66
+ children: title
67
+ }
68
+ },
69
+ description ? {
70
+ type: "p",
71
+ props: {
72
+ style: {
73
+ fontSize: 28,
74
+ fontWeight: 400,
75
+ color: colors.accent,
76
+ marginTop: 28,
77
+ marginBottom: 0,
78
+ textAlign: "center",
79
+ lineHeight: 1.4,
80
+ maxWidth: 900
81
+ },
82
+ children: description
83
+ }
84
+ } : null,
85
+ {
86
+ type: "p",
87
+ props: {
88
+ style: {
89
+ fontSize: 24,
90
+ fontWeight: 400,
91
+ color: colors.accent,
92
+ marginTop: 56,
93
+ marginBottom: 0,
94
+ textAlign: "center",
95
+ opacity: 0.7
96
+ },
97
+ children: siteName
98
+ }
99
+ }
100
+ ].filter(Boolean)
101
+ }
102
+ };
103
+ }
104
+
105
+ // src/templates/profile.ts
106
+ function profileTemplate({
107
+ title,
108
+ description,
109
+ siteName,
110
+ image,
111
+ colors,
112
+ width,
113
+ height
114
+ }) {
115
+ const children = [];
116
+ if (image) {
117
+ children.push({
118
+ type: "img",
119
+ props: {
120
+ src: image,
121
+ width: 120,
122
+ height: 120,
123
+ style: {
124
+ borderRadius: "50%",
125
+ marginBottom: 32,
126
+ objectFit: "cover"
127
+ }
128
+ }
129
+ });
130
+ }
131
+ children.push({
132
+ type: "h1",
133
+ props: {
134
+ style: {
135
+ fontSize: 56,
136
+ fontWeight: 700,
137
+ color: colors.text,
138
+ letterSpacing: "-0.02em",
139
+ margin: 0,
140
+ textAlign: "center",
141
+ lineHeight: 1.1,
142
+ maxWidth: 900
143
+ },
144
+ children: title
145
+ }
146
+ });
147
+ if (description) {
148
+ children.push({
149
+ type: "p",
150
+ props: {
151
+ style: {
152
+ fontSize: 26,
153
+ fontWeight: 400,
154
+ color: colors.accent,
155
+ marginTop: 20,
156
+ marginBottom: 0,
157
+ textAlign: "center",
158
+ lineHeight: 1.4,
159
+ maxWidth: 700
160
+ },
161
+ children: description
162
+ }
163
+ });
164
+ }
165
+ children.push({
166
+ type: "p",
167
+ props: {
168
+ style: {
169
+ fontSize: 24,
170
+ fontWeight: 400,
171
+ color: colors.accent,
172
+ marginTop: 48,
173
+ marginBottom: 0,
174
+ textAlign: "center",
175
+ opacity: 0.7
176
+ },
177
+ children: siteName
178
+ }
179
+ });
180
+ return {
181
+ type: "div",
182
+ props: {
183
+ style: {
184
+ display: "flex",
185
+ flexDirection: "column",
186
+ alignItems: "center",
187
+ justifyContent: "center",
188
+ width,
189
+ height,
190
+ backgroundColor: colors.background
191
+ },
192
+ children
193
+ }
194
+ };
195
+ }
196
+
197
+ // src/templates/default.ts
198
+ function defaultTemplate({
199
+ title,
200
+ description,
201
+ siteName,
202
+ colors,
203
+ width,
204
+ height
205
+ }) {
206
+ return {
207
+ type: "div",
208
+ props: {
209
+ style: {
210
+ display: "flex",
211
+ flexDirection: "column",
212
+ alignItems: "center",
213
+ justifyContent: "center",
214
+ width,
215
+ height,
216
+ backgroundColor: colors.background
217
+ },
218
+ children: [
219
+ {
220
+ type: "h1",
221
+ props: {
222
+ style: {
223
+ fontSize: 72,
224
+ fontWeight: 700,
225
+ color: colors.text,
226
+ letterSpacing: "-0.02em",
227
+ margin: 0,
228
+ textAlign: "center"
229
+ },
230
+ children: title
231
+ }
232
+ },
233
+ description ? {
234
+ type: "p",
235
+ props: {
236
+ style: {
237
+ fontSize: 32,
238
+ fontWeight: 400,
239
+ color: colors.accent,
240
+ marginTop: 24,
241
+ marginBottom: 0,
242
+ textAlign: "center",
243
+ maxWidth: 900
244
+ },
245
+ children: description
246
+ }
247
+ } : null,
248
+ {
249
+ type: "p",
250
+ props: {
251
+ style: {
252
+ fontSize: 28,
253
+ fontWeight: 400,
254
+ color: colors.accent,
255
+ marginTop: 64,
256
+ marginBottom: 0,
257
+ textAlign: "center",
258
+ opacity: 0.7
259
+ },
260
+ children: siteName
261
+ }
262
+ }
263
+ ].filter(Boolean)
264
+ }
265
+ };
266
+ }
267
+
268
+ // src/templates/index.ts
269
+ var templates = {
270
+ blog: blogTemplate,
271
+ profile: profileTemplate,
272
+ default: defaultTemplate
273
+ };
274
+ function getTemplate(name) {
275
+ if (typeof name === "function") {
276
+ return name;
277
+ }
278
+ return templates[name];
279
+ }
280
+ // Annotate the CommonJS export names for ESM import in node:
281
+ 0 && (module.exports = {
282
+ blogTemplate,
283
+ defaultTemplate,
284
+ getTemplate,
285
+ profileTemplate,
286
+ templates
287
+ });
288
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/templates/index.ts","../../src/templates/blog.ts","../../src/templates/profile.ts","../../src/templates/default.ts"],"sourcesContent":["/**\n * Built-in OG templates.\n */\n\nexport { blogTemplate } from './blog.js'\nexport { profileTemplate } from './profile.js'\nexport { defaultTemplate } from './default.js'\n\nimport { blogTemplate } from './blog.js'\nimport { profileTemplate } from './profile.js'\nimport { defaultTemplate } from './default.js'\nimport type { OgTemplate } from '../types.js'\n\nexport const templates = {\n\tblog: blogTemplate,\n\tprofile: profileTemplate,\n\tdefault: defaultTemplate,\n} as const\n\nexport type TemplateName = keyof typeof templates\n\nexport function getTemplate(name: TemplateName | OgTemplate): OgTemplate {\n\tif (typeof name === 'function') {\n\t\treturn name\n\t}\n\treturn templates[name]\n}\n","/**\n * Blog OG template.\n * Clean centered layout.\n */\n\nimport type { OgTemplateProps } from '../types.js'\n\nexport function blogTemplate({\n\ttitle,\n\tdescription,\n\tsiteName,\n\tcolors,\n\twidth,\n\theight,\n}: OgTemplateProps) {\n\treturn {\n\t\ttype: 'div',\n\t\tprops: {\n\t\t\tstyle: {\n\t\t\t\tdisplay: 'flex',\n\t\t\t\tflexDirection: 'column',\n\t\t\t\talignItems: 'center',\n\t\t\t\tjustifyContent: 'center',\n\t\t\t\twidth,\n\t\t\t\theight,\n\t\t\t\tbackgroundColor: colors.background,\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\ttype: 'h1',\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tfontSize: 64,\n\t\t\t\t\t\t\tfontWeight: 700,\n\t\t\t\t\t\t\tcolor: colors.text,\n\t\t\t\t\t\t\tletterSpacing: '-0.02em',\n\t\t\t\t\t\t\tmargin: 0,\n\t\t\t\t\t\t\ttextAlign: 'center',\n\t\t\t\t\t\t\tlineHeight: 1.1,\n\t\t\t\t\t\t\tmaxWidth: 1000,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tchildren: title,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdescription ? {\n\t\t\t\t\ttype: 'p',\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tfontSize: 28,\n\t\t\t\t\t\t\tfontWeight: 400,\n\t\t\t\t\t\t\tcolor: colors.accent,\n\t\t\t\t\t\t\tmarginTop: 28,\n\t\t\t\t\t\t\tmarginBottom: 0,\n\t\t\t\t\t\t\ttextAlign: 'center',\n\t\t\t\t\t\t\tlineHeight: 1.4,\n\t\t\t\t\t\t\tmaxWidth: 900,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tchildren: description,\n\t\t\t\t\t},\n\t\t\t\t} : null,\n\t\t\t\t{\n\t\t\t\t\ttype: 'p',\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tfontSize: 24,\n\t\t\t\t\t\t\tfontWeight: 400,\n\t\t\t\t\t\t\tcolor: colors.accent,\n\t\t\t\t\t\t\tmarginTop: 56,\n\t\t\t\t\t\t\tmarginBottom: 0,\n\t\t\t\t\t\t\ttextAlign: 'center',\n\t\t\t\t\t\t\topacity: 0.7,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tchildren: siteName,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t].filter(Boolean),\n\t\t},\n\t}\n}\n","/**\n * Profile OG template.\n * Centered layout.\n */\n\nimport type { OgTemplateProps } from '../types.js'\n\nexport function profileTemplate({\n\ttitle,\n\tdescription,\n\tsiteName,\n\timage,\n\tcolors,\n\twidth,\n\theight,\n}: OgTemplateProps) {\n\tconst children: unknown[] = []\n\n\tif (image) {\n\t\tchildren.push({\n\t\t\ttype: 'img',\n\t\t\tprops: {\n\t\t\t\tsrc: image,\n\t\t\t\twidth: 120,\n\t\t\t\theight: 120,\n\t\t\t\tstyle: {\n\t\t\t\t\tborderRadius: '50%',\n\t\t\t\t\tmarginBottom: 32,\n\t\t\t\t\tobjectFit: 'cover',\n\t\t\t\t},\n\t\t\t},\n\t\t})\n\t}\n\n\tchildren.push({\n\t\ttype: 'h1',\n\t\tprops: {\n\t\t\tstyle: {\n\t\t\t\tfontSize: 56,\n\t\t\t\tfontWeight: 700,\n\t\t\t\tcolor: colors.text,\n\t\t\t\tletterSpacing: '-0.02em',\n\t\t\t\tmargin: 0,\n\t\t\t\ttextAlign: 'center',\n\t\t\t\tlineHeight: 1.1,\n\t\t\t\tmaxWidth: 900,\n\t\t\t},\n\t\t\tchildren: title,\n\t\t},\n\t})\n\n\tif (description) {\n\t\tchildren.push({\n\t\t\ttype: 'p',\n\t\t\tprops: {\n\t\t\t\tstyle: {\n\t\t\t\t\tfontSize: 26,\n\t\t\t\t\tfontWeight: 400,\n\t\t\t\t\tcolor: colors.accent,\n\t\t\t\t\tmarginTop: 20,\n\t\t\t\t\tmarginBottom: 0,\n\t\t\t\t\ttextAlign: 'center',\n\t\t\t\t\tlineHeight: 1.4,\n\t\t\t\t\tmaxWidth: 700,\n\t\t\t\t},\n\t\t\t\tchildren: description,\n\t\t\t},\n\t\t})\n\t}\n\n\tchildren.push({\n\t\ttype: 'p',\n\t\tprops: {\n\t\t\tstyle: {\n\t\t\t\tfontSize: 24,\n\t\t\t\tfontWeight: 400,\n\t\t\t\tcolor: colors.accent,\n\t\t\t\tmarginTop: 48,\n\t\t\t\tmarginBottom: 0,\n\t\t\t\ttextAlign: 'center',\n\t\t\t\topacity: 0.7,\n\t\t\t},\n\t\t\tchildren: siteName,\n\t\t},\n\t})\n\n\treturn {\n\t\ttype: 'div',\n\t\tprops: {\n\t\t\tstyle: {\n\t\t\t\tdisplay: 'flex',\n\t\t\t\tflexDirection: 'column',\n\t\t\t\talignItems: 'center',\n\t\t\t\tjustifyContent: 'center',\n\t\t\t\twidth,\n\t\t\t\theight,\n\t\t\t\tbackgroundColor: colors.background,\n\t\t\t},\n\t\t\tchildren,\n\t\t},\n\t}\n}\n","/**\n * Default OG template.\n * Clean, centered layout.\n */\n\nimport type { OgTemplateProps } from '../types.js'\n\nexport function defaultTemplate({\n\ttitle,\n\tdescription,\n\tsiteName,\n\tcolors,\n\twidth,\n\theight,\n}: OgTemplateProps) {\n\treturn {\n\t\ttype: 'div',\n\t\tprops: {\n\t\t\tstyle: {\n\t\t\t\tdisplay: 'flex',\n\t\t\t\tflexDirection: 'column',\n\t\t\t\talignItems: 'center',\n\t\t\t\tjustifyContent: 'center',\n\t\t\t\twidth,\n\t\t\t\theight,\n\t\t\t\tbackgroundColor: colors.background,\n\t\t\t},\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\ttype: 'h1',\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tfontSize: 72,\n\t\t\t\t\t\t\tfontWeight: 700,\n\t\t\t\t\t\t\tcolor: colors.text,\n\t\t\t\t\t\t\tletterSpacing: '-0.02em',\n\t\t\t\t\t\t\tmargin: 0,\n\t\t\t\t\t\t\ttextAlign: 'center',\n\t\t\t\t\t\t},\n\t\t\t\t\t\tchildren: title,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\tdescription ? {\n\t\t\t\t\ttype: 'p',\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tfontSize: 32,\n\t\t\t\t\t\t\tfontWeight: 400,\n\t\t\t\t\t\t\tcolor: colors.accent,\n\t\t\t\t\t\t\tmarginTop: 24,\n\t\t\t\t\t\t\tmarginBottom: 0,\n\t\t\t\t\t\t\ttextAlign: 'center',\n\t\t\t\t\t\t\tmaxWidth: 900,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tchildren: description,\n\t\t\t\t\t},\n\t\t\t\t} : null,\n\t\t\t\t{\n\t\t\t\t\ttype: 'p',\n\t\t\t\t\tprops: {\n\t\t\t\t\t\tstyle: {\n\t\t\t\t\t\t\tfontSize: 28,\n\t\t\t\t\t\t\tfontWeight: 400,\n\t\t\t\t\t\t\tcolor: colors.accent,\n\t\t\t\t\t\t\tmarginTop: 64,\n\t\t\t\t\t\t\tmarginBottom: 0,\n\t\t\t\t\t\t\ttextAlign: 'center',\n\t\t\t\t\t\t\topacity: 0.7,\n\t\t\t\t\t\t},\n\t\t\t\t\t\tchildren: siteName,\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t].filter(Boolean),\n\t\t},\n\t}\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACOO,SAAS,aAAa;AAAA,EAC5B;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACD,GAAoB;AACnB,SAAO;AAAA,IACN,MAAM;AAAA,IACN,OAAO;AAAA,MACN,OAAO;AAAA,QACN,SAAS;AAAA,QACT,eAAe;AAAA,QACf,YAAY;AAAA,QACZ,gBAAgB;AAAA,QAChB;AAAA,QACA;AAAA,QACA,iBAAiB,OAAO;AAAA,MACzB;AAAA,MACA,UAAU;AAAA,QACT;AAAA,UACC,MAAM;AAAA,UACN,OAAO;AAAA,YACN,OAAO;AAAA,cACN,UAAU;AAAA,cACV,YAAY;AAAA,cACZ,OAAO,OAAO;AAAA,cACd,eAAe;AAAA,cACf,QAAQ;AAAA,cACR,WAAW;AAAA,cACX,YAAY;AAAA,cACZ,UAAU;AAAA,YACX;AAAA,YACA,UAAU;AAAA,UACX;AAAA,QACD;AAAA,QACA,cAAc;AAAA,UACb,MAAM;AAAA,UACN,OAAO;AAAA,YACN,OAAO;AAAA,cACN,U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MAAM;AAAA,UACN,OAAO;AAAA,YACN,OAAO;AAAA,cACN,UAAU;AAAA,cACV,YAAY;AAAA,cACZ,OAAO,OAAO;AAAA,cACd,WAAW;AAAA,cACX,cAAc;AAAA,cACd,WAAW;AAAA,cACX,UAAU;AAAA,YACX;AAAA,YACA,UAAU;AAAA,UACX;AAAA,QACD,IAAI;AAAA,QACJ;AAAA,UACC,MAAM;AAAA,UACN,OAAO;AAAA,YACN,OAAO;AAAA,cACN,UAAU;AAAA,cACV,YAAY;AAAA,cACZ,OAAO,OAAO;AAAA,cACd,WAAW;AAAA,cACX,cAAc;AAAA,cACd,WAAW;AAAA,cACX,SAAS;AAAA,YACV;AAAA,YACA,UAAU;AAAA,UACX;AAAA,QACD;AAAA,MACD,EAAE,OAAO,OAAO;AAAA,IACjB;AAAA,EACD;AACD;;;AH9DO,IAAM,YAAY;AAAA,EACxB,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AACV;AAIO,SAAS,YAAY,MAA6C;AACxE,MAAI,OAAO,SAAS,YAAY;AAC/B,WAAO;AAAA,EACR;AACA,SAAO,UAAU,IAAI;AACtB;","names":[]}
@@ -0,0 +1,183 @@
1
+ import { f as OgTemplateProps, e as OgTemplate } from '../types-Bn2R50Vr.cjs';
2
+
3
+ /**
4
+ * Blog OG template.
5
+ * Clean centered layout.
6
+ */
7
+
8
+ declare function blogTemplate({ title, description, siteName, colors, width, height, }: OgTemplateProps): {
9
+ type: string;
10
+ props: {
11
+ style: {
12
+ display: string;
13
+ flexDirection: string;
14
+ alignItems: string;
15
+ justifyContent: string;
16
+ width: number;
17
+ height: number;
18
+ backgroundColor: string;
19
+ };
20
+ children: ({
21
+ type: string;
22
+ props: {
23
+ style: {
24
+ fontSize: number;
25
+ fontWeight: number;
26
+ color: string;
27
+ letterSpacing: string;
28
+ margin: number;
29
+ textAlign: string;
30
+ lineHeight: number;
31
+ maxWidth: number;
32
+ marginTop?: undefined;
33
+ marginBottom?: undefined;
34
+ opacity?: undefined;
35
+ };
36
+ children: string;
37
+ };
38
+ } | {
39
+ type: string;
40
+ props: {
41
+ style: {
42
+ fontSize: number;
43
+ fontWeight: number;
44
+ color: string;
45
+ marginTop: number;
46
+ marginBottom: number;
47
+ textAlign: string;
48
+ lineHeight: number;
49
+ maxWidth: number;
50
+ letterSpacing?: undefined;
51
+ margin?: undefined;
52
+ opacity?: undefined;
53
+ };
54
+ children: string;
55
+ };
56
+ } | {
57
+ type: string;
58
+ props: {
59
+ style: {
60
+ fontSize: number;
61
+ fontWeight: number;
62
+ color: string;
63
+ marginTop: number;
64
+ marginBottom: number;
65
+ textAlign: string;
66
+ opacity: number;
67
+ letterSpacing?: undefined;
68
+ margin?: undefined;
69
+ lineHeight?: undefined;
70
+ maxWidth?: undefined;
71
+ };
72
+ children: string;
73
+ };
74
+ } | null)[];
75
+ };
76
+ };
77
+
78
+ /**
79
+ * Profile OG template.
80
+ * Centered layout.
81
+ */
82
+
83
+ declare function profileTemplate({ title, description, siteName, image, colors, width, height, }: OgTemplateProps): {
84
+ type: string;
85
+ props: {
86
+ style: {
87
+ display: string;
88
+ flexDirection: string;
89
+ alignItems: string;
90
+ justifyContent: string;
91
+ width: number;
92
+ height: number;
93
+ backgroundColor: string;
94
+ };
95
+ children: unknown[];
96
+ };
97
+ };
98
+
99
+ /**
100
+ * Default OG template.
101
+ * Clean, centered layout.
102
+ */
103
+
104
+ declare function defaultTemplate({ title, description, siteName, colors, width, height, }: OgTemplateProps): {
105
+ type: string;
106
+ props: {
107
+ style: {
108
+ display: string;
109
+ flexDirection: string;
110
+ alignItems: string;
111
+ justifyContent: string;
112
+ width: number;
113
+ height: number;
114
+ backgroundColor: string;
115
+ };
116
+ children: ({
117
+ type: string;
118
+ props: {
119
+ style: {
120
+ fontSize: number;
121
+ fontWeight: number;
122
+ color: string;
123
+ letterSpacing: string;
124
+ margin: number;
125
+ textAlign: string;
126
+ marginTop?: undefined;
127
+ marginBottom?: undefined;
128
+ maxWidth?: undefined;
129
+ opacity?: undefined;
130
+ };
131
+ children: string;
132
+ };
133
+ } | {
134
+ type: string;
135
+ props: {
136
+ style: {
137
+ fontSize: number;
138
+ fontWeight: number;
139
+ color: string;
140
+ marginTop: number;
141
+ marginBottom: number;
142
+ textAlign: string;
143
+ maxWidth: number;
144
+ letterSpacing?: undefined;
145
+ margin?: undefined;
146
+ opacity?: undefined;
147
+ };
148
+ children: string;
149
+ };
150
+ } | {
151
+ type: string;
152
+ props: {
153
+ style: {
154
+ fontSize: number;
155
+ fontWeight: number;
156
+ color: string;
157
+ marginTop: number;
158
+ marginBottom: number;
159
+ textAlign: string;
160
+ opacity: number;
161
+ letterSpacing?: undefined;
162
+ margin?: undefined;
163
+ maxWidth?: undefined;
164
+ };
165
+ children: string;
166
+ };
167
+ } | null)[];
168
+ };
169
+ };
170
+
171
+ /**
172
+ * Built-in OG templates.
173
+ */
174
+
175
+ declare const templates: {
176
+ readonly blog: typeof blogTemplate;
177
+ readonly profile: typeof profileTemplate;
178
+ readonly default: typeof defaultTemplate;
179
+ };
180
+ type TemplateName = keyof typeof templates;
181
+ declare function getTemplate(name: TemplateName | OgTemplate): OgTemplate;
182
+
183
+ export { type TemplateName, blogTemplate, defaultTemplate, getTemplate, profileTemplate, templates };
@@ -0,0 +1,183 @@
1
+ import { f as OgTemplateProps, e as OgTemplate } from '../types-Bn2R50Vr.js';
2
+
3
+ /**
4
+ * Blog OG template.
5
+ * Clean centered layout.
6
+ */
7
+
8
+ declare function blogTemplate({ title, description, siteName, colors, width, height, }: OgTemplateProps): {
9
+ type: string;
10
+ props: {
11
+ style: {
12
+ display: string;
13
+ flexDirection: string;
14
+ alignItems: string;
15
+ justifyContent: string;
16
+ width: number;
17
+ height: number;
18
+ backgroundColor: string;
19
+ };
20
+ children: ({
21
+ type: string;
22
+ props: {
23
+ style: {
24
+ fontSize: number;
25
+ fontWeight: number;
26
+ color: string;
27
+ letterSpacing: string;
28
+ margin: number;
29
+ textAlign: string;
30
+ lineHeight: number;
31
+ maxWidth: number;
32
+ marginTop?: undefined;
33
+ marginBottom?: undefined;
34
+ opacity?: undefined;
35
+ };
36
+ children: string;
37
+ };
38
+ } | {
39
+ type: string;
40
+ props: {
41
+ style: {
42
+ fontSize: number;
43
+ fontWeight: number;
44
+ color: string;
45
+ marginTop: number;
46
+ marginBottom: number;
47
+ textAlign: string;
48
+ lineHeight: number;
49
+ maxWidth: number;
50
+ letterSpacing?: undefined;
51
+ margin?: undefined;
52
+ opacity?: undefined;
53
+ };
54
+ children: string;
55
+ };
56
+ } | {
57
+ type: string;
58
+ props: {
59
+ style: {
60
+ fontSize: number;
61
+ fontWeight: number;
62
+ color: string;
63
+ marginTop: number;
64
+ marginBottom: number;
65
+ textAlign: string;
66
+ opacity: number;
67
+ letterSpacing?: undefined;
68
+ margin?: undefined;
69
+ lineHeight?: undefined;
70
+ maxWidth?: undefined;
71
+ };
72
+ children: string;
73
+ };
74
+ } | null)[];
75
+ };
76
+ };
77
+
78
+ /**
79
+ * Profile OG template.
80
+ * Centered layout.
81
+ */
82
+
83
+ declare function profileTemplate({ title, description, siteName, image, colors, width, height, }: OgTemplateProps): {
84
+ type: string;
85
+ props: {
86
+ style: {
87
+ display: string;
88
+ flexDirection: string;
89
+ alignItems: string;
90
+ justifyContent: string;
91
+ width: number;
92
+ height: number;
93
+ backgroundColor: string;
94
+ };
95
+ children: unknown[];
96
+ };
97
+ };
98
+
99
+ /**
100
+ * Default OG template.
101
+ * Clean, centered layout.
102
+ */
103
+
104
+ declare function defaultTemplate({ title, description, siteName, colors, width, height, }: OgTemplateProps): {
105
+ type: string;
106
+ props: {
107
+ style: {
108
+ display: string;
109
+ flexDirection: string;
110
+ alignItems: string;
111
+ justifyContent: string;
112
+ width: number;
113
+ height: number;
114
+ backgroundColor: string;
115
+ };
116
+ children: ({
117
+ type: string;
118
+ props: {
119
+ style: {
120
+ fontSize: number;
121
+ fontWeight: number;
122
+ color: string;
123
+ letterSpacing: string;
124
+ margin: number;
125
+ textAlign: string;
126
+ marginTop?: undefined;
127
+ marginBottom?: undefined;
128
+ maxWidth?: undefined;
129
+ opacity?: undefined;
130
+ };
131
+ children: string;
132
+ };
133
+ } | {
134
+ type: string;
135
+ props: {
136
+ style: {
137
+ fontSize: number;
138
+ fontWeight: number;
139
+ color: string;
140
+ marginTop: number;
141
+ marginBottom: number;
142
+ textAlign: string;
143
+ maxWidth: number;
144
+ letterSpacing?: undefined;
145
+ margin?: undefined;
146
+ opacity?: undefined;
147
+ };
148
+ children: string;
149
+ };
150
+ } | {
151
+ type: string;
152
+ props: {
153
+ style: {
154
+ fontSize: number;
155
+ fontWeight: number;
156
+ color: string;
157
+ marginTop: number;
158
+ marginBottom: number;
159
+ textAlign: string;
160
+ opacity: number;
161
+ letterSpacing?: undefined;
162
+ margin?: undefined;
163
+ maxWidth?: undefined;
164
+ };
165
+ children: string;
166
+ };
167
+ } | null)[];
168
+ };
169
+ };
170
+
171
+ /**
172
+ * Built-in OG templates.
173
+ */
174
+
175
+ declare const templates: {
176
+ readonly blog: typeof blogTemplate;
177
+ readonly profile: typeof profileTemplate;
178
+ readonly default: typeof defaultTemplate;
179
+ };
180
+ type TemplateName = keyof typeof templates;
181
+ declare function getTemplate(name: TemplateName | OgTemplate): OgTemplate;
182
+
183
+ export { type TemplateName, blogTemplate, defaultTemplate, getTemplate, profileTemplate, templates };
@@ -0,0 +1,15 @@
1
+ import {
2
+ blogTemplate,
3
+ defaultTemplate,
4
+ getTemplate,
5
+ profileTemplate,
6
+ templates
7
+ } from "../chunk-EPPJ2HBS.js";
8
+ export {
9
+ blogTemplate,
10
+ defaultTemplate,
11
+ getTemplate,
12
+ profileTemplate,
13
+ templates
14
+ };
15
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}