@pylonsync/react 0.3.290 → 0.3.292
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/package.json +3 -3
- package/src/ssr.ts +42 -0
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"publishConfig": {
|
|
4
4
|
"access": "public"
|
|
5
5
|
},
|
|
6
|
-
"version": "0.3.
|
|
6
|
+
"version": "0.3.292",
|
|
7
7
|
"type": "module",
|
|
8
8
|
"main": "src/index.ts",
|
|
9
9
|
"types": "src/index.ts",
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
"check": "tsc -p tsconfig.json --noEmit"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@pylonsync/sdk": "0.3.
|
|
16
|
-
"@pylonsync/sync": "0.3.
|
|
15
|
+
"@pylonsync/sdk": "0.3.292",
|
|
16
|
+
"@pylonsync/sync": "0.3.292"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
19
19
|
"react": ">=19.0.0"
|
package/src/ssr.ts
CHANGED
|
@@ -164,12 +164,26 @@ export interface PageProps<
|
|
|
164
164
|
* titles) from a `page.tsx` / `layout.tsx`. React 19 hoists the resulting
|
|
165
165
|
* `<title>` / `<meta>` / `<link>` into `<head>`.
|
|
166
166
|
*/
|
|
167
|
+
/** A single OpenGraph image (for `openGraph.images` — multiple images). */
|
|
168
|
+
export interface OgImage {
|
|
169
|
+
url: string;
|
|
170
|
+
secureUrl?: string;
|
|
171
|
+
type?: string;
|
|
172
|
+
width?: number;
|
|
173
|
+
height?: number;
|
|
174
|
+
alt?: string;
|
|
175
|
+
}
|
|
176
|
+
|
|
167
177
|
export interface Metadata {
|
|
168
178
|
title?: string;
|
|
169
179
|
description?: string;
|
|
170
180
|
keywords?: string | string[];
|
|
171
181
|
canonical?: string;
|
|
172
182
|
robots?: string;
|
|
183
|
+
/** `<meta name="author">` — one tag per author. */
|
|
184
|
+
authors?: string | string[];
|
|
185
|
+
/** `<meta name="theme-color">` — browser UI tint for the page. */
|
|
186
|
+
themeColor?: string;
|
|
173
187
|
openGraph?: {
|
|
174
188
|
title?: string;
|
|
175
189
|
description?: string;
|
|
@@ -179,22 +193,50 @@ export interface Metadata {
|
|
|
179
193
|
imageWidth?: number;
|
|
180
194
|
imageHeight?: number;
|
|
181
195
|
imageAlt?: string;
|
|
196
|
+
/** Additional images beyond the primary `image` (each emits its own
|
|
197
|
+
* `og:image` + dimensions). Provide absolute URLs. */
|
|
198
|
+
images?: OgImage[];
|
|
182
199
|
url?: string;
|
|
183
200
|
type?: string;
|
|
201
|
+
/** `og:locale` (e.g. "en_US"). */
|
|
202
|
+
locale?: string;
|
|
184
203
|
/** `og:site_name` — the brand the page belongs to (e.g. "Pylon").
|
|
185
204
|
* Discord and other unfurlers show this above the title. */
|
|
186
205
|
siteName?: string;
|
|
206
|
+
/** `article:*` tags for `og:type=article` pages. */
|
|
207
|
+
article?: {
|
|
208
|
+
author?: string | string[];
|
|
209
|
+
publishedTime?: string;
|
|
210
|
+
modifiedTime?: string;
|
|
211
|
+
section?: string;
|
|
212
|
+
tags?: string | string[];
|
|
213
|
+
};
|
|
187
214
|
};
|
|
188
215
|
twitter?: {
|
|
189
216
|
card?: string;
|
|
190
217
|
title?: string;
|
|
191
218
|
description?: string;
|
|
192
219
|
image?: string;
|
|
220
|
+
/** `twitter:site` / `twitter:creator` — @handles. */
|
|
221
|
+
site?: string;
|
|
222
|
+
creator?: string;
|
|
223
|
+
/** `twitter:image:alt` — alt text for the card image. */
|
|
224
|
+
imageAlt?: string;
|
|
193
225
|
};
|
|
194
226
|
icons?: {
|
|
195
227
|
icon?: { url: string; type?: string; sizes?: string };
|
|
196
228
|
apple?: { url: string; type?: string; sizes?: string };
|
|
197
229
|
};
|
|
230
|
+
/** Alternate URLs. `languages` emits `<link rel="alternate" hreflang>`
|
|
231
|
+
* per locale; `canonical` is an alias for the top-level `canonical`. */
|
|
232
|
+
alternates?: {
|
|
233
|
+
canonical?: string;
|
|
234
|
+
languages?: Record<string, string>;
|
|
235
|
+
};
|
|
236
|
+
/** Structured data (schema.org), emitted as `<script type="application/ld+json">`.
|
|
237
|
+
* Pass one object or an array (each item gets its own script). The payload is
|
|
238
|
+
* serialized with `<`/`>`/`&` escaped so it can't break out of the script. */
|
|
239
|
+
jsonLd?: Record<string, unknown> | Record<string, unknown>[];
|
|
198
240
|
}
|
|
199
241
|
|
|
200
242
|
/**
|