@stratal/inertia 0.0.21 → 0.0.23
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/dist/build-seo-tags-DBsHKxX9.mjs +123 -0
- package/dist/build-seo-tags-DBsHKxX9.mjs.map +1 -0
- package/dist/decorate-B7nr7eBl.mjs +9 -0
- package/dist/generator/type-generator.worker.mjs +1 -1
- package/dist/generator/type-generator.worker.mjs.map +1 -1
- package/dist/index.d.mts +177 -105
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +215 -389
- package/dist/index.mjs.map +1 -1
- package/dist/quarry.d.mts +45 -0
- package/dist/quarry.d.mts.map +1 -0
- package/dist/quarry.mjs +392 -0
- package/dist/quarry.mjs.map +1 -0
- package/dist/react.d.mts +12 -31
- package/dist/react.d.mts.map +1 -1
- package/dist/react.mjs +29 -48
- package/dist/react.mjs.map +1 -1
- package/dist/seo-runtime.d.mts +1 -0
- package/dist/seo-runtime.mjs +56 -0
- package/dist/seo-runtime.mjs.map +1 -0
- package/dist/testing.d.mts +1 -1
- package/dist/testing.mjs.map +1 -1
- package/dist/{type-generator-o_PxETTs.mjs → type-generator-DFpha_Fp.mjs} +237 -35
- package/dist/type-generator-DFpha_Fp.mjs.map +1 -0
- package/dist/types--_iJ04lT.d.mts +148 -0
- package/dist/types--_iJ04lT.d.mts.map +1 -0
- package/dist/vite.d.mts +19 -0
- package/dist/vite.d.mts.map +1 -1
- package/dist/vite.mjs +67 -8
- package/dist/vite.mjs.map +1 -1
- package/package.json +28 -25
- package/dist/type-generator-o_PxETTs.mjs.map +0 -1
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
//#region src/seo/build-seo-tags.ts
|
|
2
|
+
/**
|
|
3
|
+
* Marker attribute stamped on every SEO-managed head element. The server emits
|
|
4
|
+
* it on injected tags and the client head-sync runtime uses it to find and
|
|
5
|
+
* reconcile the same tags across SPA navigations.
|
|
6
|
+
*/
|
|
7
|
+
const DATA_SEO_ATTR = "data-seo";
|
|
8
|
+
/**
|
|
9
|
+
* Maps resolved {@link SeoData} into a flat list of {@link SeoTagDescriptor}s.
|
|
10
|
+
*
|
|
11
|
+
* Pure and framework-free: used server-side to render HTML strings and
|
|
12
|
+
* client-side to build DOM nodes, so the two never drift. Every descriptor
|
|
13
|
+
* carries the {@link DATA_SEO_ATTR} marker.
|
|
14
|
+
*/
|
|
15
|
+
function buildSeoTags(data) {
|
|
16
|
+
const tags = [];
|
|
17
|
+
if (data.title != null) tags.push({
|
|
18
|
+
tag: "title",
|
|
19
|
+
attrs: {},
|
|
20
|
+
content: data.title
|
|
21
|
+
});
|
|
22
|
+
meta(tags, { name: "description" }, data.description);
|
|
23
|
+
meta(tags, { name: "keywords" }, Array.isArray(data.keywords) ? data.keywords.join(", ") : data.keywords);
|
|
24
|
+
meta(tags, { name: "author" }, data.author);
|
|
25
|
+
meta(tags, { name: "robots" }, data.robots);
|
|
26
|
+
if (data.canonical != null) tags.push({
|
|
27
|
+
tag: "link",
|
|
28
|
+
attrs: {
|
|
29
|
+
rel: "canonical",
|
|
30
|
+
href: data.canonical
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
const og = data.openGraph;
|
|
34
|
+
if (og) {
|
|
35
|
+
metaProp(tags, "og:title", og.title);
|
|
36
|
+
metaProp(tags, "og:description", og.description);
|
|
37
|
+
metaProp(tags, "og:image", og.image);
|
|
38
|
+
metaProp(tags, "og:type", og.type);
|
|
39
|
+
metaProp(tags, "og:url", og.url);
|
|
40
|
+
metaProp(tags, "og:site_name", og.siteName);
|
|
41
|
+
}
|
|
42
|
+
const tw = data.twitter;
|
|
43
|
+
if (tw) {
|
|
44
|
+
meta(tags, { name: "twitter:card" }, tw.card);
|
|
45
|
+
meta(tags, { name: "twitter:title" }, tw.title);
|
|
46
|
+
meta(tags, { name: "twitter:description" }, tw.description);
|
|
47
|
+
meta(tags, { name: "twitter:image" }, tw.image);
|
|
48
|
+
meta(tags, { name: "twitter:site" }, tw.site);
|
|
49
|
+
meta(tags, { name: "twitter:creator" }, tw.creator);
|
|
50
|
+
}
|
|
51
|
+
if (data.meta) for (const entry of data.meta) {
|
|
52
|
+
const attrs = {};
|
|
53
|
+
if (entry.name != null) attrs.name = entry.name;
|
|
54
|
+
if (entry.property != null) attrs.property = entry.property;
|
|
55
|
+
attrs.content = entry.content;
|
|
56
|
+
tags.push({
|
|
57
|
+
tag: "meta",
|
|
58
|
+
attrs
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
if (data.link) for (const entry of data.link) {
|
|
62
|
+
const attrs = {};
|
|
63
|
+
for (const [key, value] of Object.entries(entry)) if (isSafeAttrName(key)) attrs[key] = value;
|
|
64
|
+
tags.push({
|
|
65
|
+
tag: "link",
|
|
66
|
+
attrs
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
for (const t of tags) t.attrs[DATA_SEO_ATTR] = "";
|
|
70
|
+
return tags;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Valid HTML attribute name. Used to drop any attribute whose name (e.g. a key
|
|
74
|
+
* spread from a user-supplied custom `meta`/`link` entry) could otherwise break
|
|
75
|
+
* out of the tag and inject markup — attribute values are escaped, but names are
|
|
76
|
+
* emitted verbatim, so an unsafe name like `x onload=…` must be rejected.
|
|
77
|
+
*/
|
|
78
|
+
const VALID_ATTR_NAME = /^[A-Za-z_:][\w.:-]*$/;
|
|
79
|
+
/**
|
|
80
|
+
* A valid attribute name that is also not an inline event handler. Even with a
|
|
81
|
+
* well-formed name and an escaped value, `on*` attributes execute JS, so a
|
|
82
|
+
* user-supplied `onload`/`onerror`/… key must never be emitted.
|
|
83
|
+
*/
|
|
84
|
+
function isSafeAttrName(name) {
|
|
85
|
+
return VALID_ATTR_NAME.test(name) && !/^on/i.test(name);
|
|
86
|
+
}
|
|
87
|
+
/** Renders a descriptor to an HTML string with attribute/text escaping (server-side). */
|
|
88
|
+
function descriptorToHtml(d) {
|
|
89
|
+
const attrs = Object.entries(d.attrs).filter(([key]) => isSafeAttrName(key)).map(([key, value]) => value === "" ? key : `${key}="${escapeAttr(value)}"`).join(" ");
|
|
90
|
+
const open = attrs ? `${d.tag} ${attrs}` : d.tag;
|
|
91
|
+
if (d.tag === "title") return `<title ${attrs}>${escapeText(d.content ?? "")}</title>`;
|
|
92
|
+
return `<${open} />`;
|
|
93
|
+
}
|
|
94
|
+
function meta(tags, attrs, content) {
|
|
95
|
+
if (content == null) return;
|
|
96
|
+
tags.push({
|
|
97
|
+
tag: "meta",
|
|
98
|
+
attrs: {
|
|
99
|
+
...attrs,
|
|
100
|
+
content
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
function metaProp(tags, property, content) {
|
|
105
|
+
if (content == null) return;
|
|
106
|
+
tags.push({
|
|
107
|
+
tag: "meta",
|
|
108
|
+
attrs: {
|
|
109
|
+
property,
|
|
110
|
+
content
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
function escapeAttr(value) {
|
|
115
|
+
return value.replace(/&/g, "&").replace(/"/g, """).replace(/</g, "<").replace(/>/g, ">");
|
|
116
|
+
}
|
|
117
|
+
function escapeText(value) {
|
|
118
|
+
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">");
|
|
119
|
+
}
|
|
120
|
+
//#endregion
|
|
121
|
+
export { buildSeoTags as n, descriptorToHtml as r, DATA_SEO_ATTR as t };
|
|
122
|
+
|
|
123
|
+
//# sourceMappingURL=build-seo-tags-DBsHKxX9.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-seo-tags-DBsHKxX9.mjs","names":[],"sources":["../src/seo/build-seo-tags.ts"],"sourcesContent":["import type { SeoData, SeoTagDescriptor } from './types'\n\n/**\n * Marker attribute stamped on every SEO-managed head element. The server emits\n * it on injected tags and the client head-sync runtime uses it to find and\n * reconcile the same tags across SPA navigations.\n */\nexport const DATA_SEO_ATTR = 'data-seo'\n\n/**\n * Maps resolved {@link SeoData} into a flat list of {@link SeoTagDescriptor}s.\n *\n * Pure and framework-free: used server-side to render HTML strings and\n * client-side to build DOM nodes, so the two never drift. Every descriptor\n * carries the {@link DATA_SEO_ATTR} marker.\n */\nexport function buildSeoTags(data: SeoData): SeoTagDescriptor[] {\n const tags: SeoTagDescriptor[] = []\n\n if (data.title != null) {\n tags.push({ tag: 'title', attrs: {}, content: data.title })\n }\n\n meta(tags, { name: 'description' }, data.description)\n meta(tags, { name: 'keywords' }, Array.isArray(data.keywords) ? data.keywords.join(', ') : data.keywords)\n meta(tags, { name: 'author' }, data.author)\n meta(tags, { name: 'robots' }, data.robots)\n\n if (data.canonical != null) {\n tags.push({ tag: 'link', attrs: { rel: 'canonical', href: data.canonical } })\n }\n\n const og = data.openGraph\n if (og) {\n metaProp(tags, 'og:title', og.title)\n metaProp(tags, 'og:description', og.description)\n metaProp(tags, 'og:image', og.image)\n metaProp(tags, 'og:type', og.type)\n metaProp(tags, 'og:url', og.url)\n metaProp(tags, 'og:site_name', og.siteName)\n }\n\n const tw = data.twitter\n if (tw) {\n meta(tags, { name: 'twitter:card' }, tw.card)\n meta(tags, { name: 'twitter:title' }, tw.title)\n meta(tags, { name: 'twitter:description' }, tw.description)\n meta(tags, { name: 'twitter:image' }, tw.image)\n meta(tags, { name: 'twitter:site' }, tw.site)\n meta(tags, { name: 'twitter:creator' }, tw.creator)\n }\n\n if (data.meta) {\n for (const entry of data.meta) {\n const attrs: Record<string, string> = {}\n if (entry.name != null) attrs.name = entry.name\n if (entry.property != null) attrs.property = entry.property\n attrs.content = entry.content\n tags.push({ tag: 'meta', attrs })\n }\n }\n\n if (data.link) {\n for (const entry of data.link) {\n const attrs: Record<string, string> = {}\n // Custom link entries carry arbitrary keys; drop any whose name isn't a\n // safe attribute so a crafted key can't break out of the tag (server),\n // throw from `setAttribute` (client head-sync), or smuggle in an inline\n // event handler (`<link rel=… onload=…>` fires for some rel values).\n for (const [key, value] of Object.entries(entry)) {\n if (isSafeAttrName(key)) attrs[key] = value\n }\n tags.push({ tag: 'link', attrs })\n }\n }\n\n // Stamp the marker on every descriptor.\n for (const t of tags) {\n t.attrs[DATA_SEO_ATTR] = ''\n }\n\n return tags\n}\n\n/**\n * Valid HTML attribute name. Used to drop any attribute whose name (e.g. a key\n * spread from a user-supplied custom `meta`/`link` entry) could otherwise break\n * out of the tag and inject markup — attribute values are escaped, but names are\n * emitted verbatim, so an unsafe name like `x onload=…` must be rejected.\n */\nconst VALID_ATTR_NAME = /^[A-Za-z_:][\\w.:-]*$/\n\n/**\n * A valid attribute name that is also not an inline event handler. Even with a\n * well-formed name and an escaped value, `on*` attributes execute JS, so a\n * user-supplied `onload`/`onerror`/… key must never be emitted.\n */\nfunction isSafeAttrName(name: string): boolean {\n return VALID_ATTR_NAME.test(name) && !/^on/i.test(name)\n}\n\n/** Renders a descriptor to an HTML string with attribute/text escaping (server-side). */\nexport function descriptorToHtml(d: SeoTagDescriptor): string {\n const attrs = Object.entries(d.attrs)\n .filter(([key]) => isSafeAttrName(key))\n .map(([key, value]) => (value === '' ? key : `${key}=\"${escapeAttr(value)}\"`))\n .join(' ')\n const open = attrs ? `${d.tag} ${attrs}` : d.tag\n\n if (d.tag === 'title') {\n return `<title ${attrs}>${escapeText(d.content ?? '')}</title>`\n }\n return `<${open} />`\n}\n\nfunction meta(tags: SeoTagDescriptor[], attrs: Record<string, string>, content: string | undefined): void {\n if (content == null) return\n tags.push({ tag: 'meta', attrs: { ...attrs, content } })\n}\n\nfunction metaProp(tags: SeoTagDescriptor[], property: string, content: string | undefined): void {\n if (content == null) return\n tags.push({ tag: 'meta', attrs: { property, content } })\n}\n\nfunction escapeAttr(value: string): string {\n return value.replace(/&/g, '&').replace(/\"/g, '"').replace(/</g, '<').replace(/>/g, '>')\n}\n\nfunction escapeText(value: string): string {\n return value.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>')\n}\n"],"mappings":";;;;;;AAOA,MAAa,gBAAgB;;;;;;;;AAS7B,SAAg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AAS,MAA0B,UAAkB,SAAmC;CAC/F,IAAI,WAAW,MAAM;CACrB,KAAK,KAAK;EAAE,KAAK;EAAQ,OAAO;GAAE;GAAU;EAAQ;CAAE,CAAC;AACzD;AAEA,SAAS,WAAW,OAAuB;CACzC,OAAO,MAAM,QAAQ,MAAM,OAAO,EAAE,QAAQ,MAAM,QAAQ,EAAE,QAAQ,MAAM,MAAM,EAAE,QAAQ,MAAM,MAAM;AACxG;AAEA,SAAS,WAAW,OAAuB;CACzC,OAAO,MAAM,QAAQ,MAAM,OAAO,EAAE,QAAQ,MAAM,MAAM,EAAE,QAAQ,MAAM,MAAM;AAChF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
//#region \0@oxc-project+runtime@0.133.0/helpers/esm/decorate.js
|
|
2
|
+
function __decorate(decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { __decorate as t };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as runTypeGeneration } from "../type-generator-
|
|
1
|
+
import { n as runTypeGeneration } from "../type-generator-DFpha_Fp.mjs";
|
|
2
2
|
import { parentPort, workerData } from "node:worker_threads";
|
|
3
3
|
//#region src/generator/type-generator.worker.ts
|
|
4
4
|
async function main() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type-generator.worker.mjs","names":[],"sources":["../../src/generator/type-generator.worker.ts"],"sourcesContent":["import { parentPort, workerData } from 'node:worker_threads'\nimport { runTypeGeneration } from './type-generator'\n\ninterface WorkerInput {\n cwd: string\n}\n\nasync function main() {\n if (!parentPort) {\n throw new Error('[stratal:inertia-types] worker spawned without a parent port')\n }\n\n const { cwd } = workerData as WorkerInput\n\n try {\n const { outputPath, pageCount } = await runTypeGeneration(cwd)\n parentPort.postMessage({ ok: true, outputPath, pageCount })\n } catch (error) {\n parentPort.postMessage({\n ok: false,\n error: error instanceof Error ? error.message : String(error),\n })\n }\n}\n\nvoid main()\n"],"mappings":";;;AAOA,eAAe,OAAO;CACpB,IAAI,CAAC,YACH,MAAM,IAAI,MAAM
|
|
1
|
+
{"version":3,"file":"type-generator.worker.mjs","names":[],"sources":["../../src/generator/type-generator.worker.ts"],"sourcesContent":["import { parentPort, workerData } from 'node:worker_threads'\nimport { runTypeGeneration } from './type-generator'\n\ninterface WorkerInput {\n cwd: string\n}\n\nasync function main() {\n if (!parentPort) {\n throw new Error('[stratal:inertia-types] worker spawned without a parent port')\n }\n\n const { cwd } = workerData as WorkerInput\n\n try {\n const { outputPath, pageCount } = await runTypeGeneration(cwd)\n parentPort.postMessage({ ok: true, outputPath, pageCount })\n } catch (error) {\n parentPort.postMessage({\n ok: false,\n error: error instanceof Error ? error.message : String(error),\n })\n }\n}\n\nvoid main()\n"],"mappings":";;;AAOA,eAAe,OAAO;CACpB,IAAI,CAAC,YACH,MAAM,IAAI,MAAM,8DAA8D;CAGhF,MAAM,EAAE,QAAQ;CAEhB,IAAI;EACF,MAAM,EAAE,YAAY,cAAc,MAAM,kBAAkB,GAAG;EAC7D,WAAW,YAAY;GAAE,IAAI;GAAM;GAAY;EAAU,CAAC;CAC5D,SAAS,OAAO;EACd,WAAW,YAAY;GACrB,IAAI;GACJ,OAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;EAC9D,CAAC;CACH;AACF;AAEK,KAAK"}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
/// <reference path="../global.d.ts" />
|
|
2
|
+
import { C as SeoMetaTag, E as SeoTwitter, S as SeoLinkTag, T as SeoTagDescriptor, _ as ResolvedInertiaPageProps, a as InertiaMergeProp, b as ViteManifestEntry, c as InertiaOptionalProp, d as InertiaPageRegistry, f as InertiaRenderOptions, g as InertiaTranslationKeys, h as InertiaSsrResult, i as InertiaI18nConfig, l as InertiaPage, m as InertiaSsrBundle, n as InertiaDeferredProp, o as InertiaMergeStrategy, p as InertiaSharedProps, r as InertiaFullPageProps, s as InertiaOnceProp, t as InertiaAlwaysProp, u as InertiaPageComponent, v as SharedDataResolver, w as SeoOpenGraph, x as SeoData, y as ViteManifest } from "./types--_iJ04lT.mjs";
|
|
2
3
|
import { ExceptionHandler } from "stratal/errors";
|
|
3
|
-
import { MessageKeyPrefix } from "stratal/i18n";
|
|
4
4
|
import { AsyncModuleOptions, DynamicModule, OnException, OnInitialize } from "stratal/module";
|
|
5
5
|
import { Middleware, Next, RouteConfig, RouteConfigurable, Router, RouterContext } from "stratal/router";
|
|
6
|
-
import {
|
|
6
|
+
import { Container } from "stratal/di";
|
|
7
|
+
import { MessageKeyPrefix } from "stratal/i18n";
|
|
7
8
|
import { LoggerService } from "stratal/logger";
|
|
8
9
|
import { z } from "stratal/validation";
|
|
9
|
-
import { InertiaAppSSRResponse, Page
|
|
10
|
+
import { InertiaAppSSRResponse, Page } from "@inertiajs/core";
|
|
10
11
|
import { CookieOptions } from "hono/utils/cookie";
|
|
12
|
+
|
|
11
13
|
//#region src/flash/flash-store.d.ts
|
|
12
14
|
interface FlashStore {
|
|
13
15
|
read(ctx: RouterContext): Promise<Record<string, unknown>>;
|
|
@@ -15,64 +17,6 @@ interface FlashStore {
|
|
|
15
17
|
clear(ctx: RouterContext): Promise<void>;
|
|
16
18
|
}
|
|
17
19
|
//#endregion
|
|
18
|
-
//#region src/types.d.ts
|
|
19
|
-
interface InertiaPageRegistry {}
|
|
20
|
-
type InertiaSharedProps = SharedPageProps;
|
|
21
|
-
type InertiaPageComponent = keyof InertiaPageRegistry extends never ? string : Extract<keyof InertiaPageRegistry, string>;
|
|
22
|
-
type AllowInertiaWrappers<T> = { [K in keyof T]: T[K] | InertiaDeferredProp | InertiaMergeProp | InertiaOptionalProp | InertiaOnceProp | InertiaAlwaysProp };
|
|
23
|
-
type ResolvedInertiaPageProps<C extends InertiaPageComponent> = C extends keyof InertiaPageRegistry ? AllowInertiaWrappers<InertiaPageRegistry[C]> : Record<string, unknown>;
|
|
24
|
-
type InertiaFullPageProps<C extends InertiaPageComponent> = (C extends keyof InertiaPageRegistry ? InertiaPageRegistry[C] : Record<string, unknown>) & InertiaSharedProps;
|
|
25
|
-
interface InertiaRenderOptions {
|
|
26
|
-
encryptHistory?: boolean;
|
|
27
|
-
clearHistory?: boolean;
|
|
28
|
-
preserveFragment?: boolean;
|
|
29
|
-
}
|
|
30
|
-
type InertiaSsrResult = InertiaAppSSRResponse;
|
|
31
|
-
interface InertiaSsrBundle {
|
|
32
|
-
render(page: Page): Promise<InertiaSsrResult>;
|
|
33
|
-
}
|
|
34
|
-
type SharedDataResolver = (ctx: RouterContext) => any;
|
|
35
|
-
interface ViteManifestEntry {
|
|
36
|
-
file: string;
|
|
37
|
-
css?: string[];
|
|
38
|
-
isEntry?: boolean;
|
|
39
|
-
imports?: string[];
|
|
40
|
-
dynamicImports?: string[];
|
|
41
|
-
src?: string;
|
|
42
|
-
}
|
|
43
|
-
type ViteManifest = Record<string, ViteManifestEntry>;
|
|
44
|
-
declare const INERTIA_PROP_OPTIONAL: unique symbol;
|
|
45
|
-
declare const INERTIA_PROP_DEFERRED: unique symbol;
|
|
46
|
-
declare const INERTIA_PROP_MERGE: unique symbol;
|
|
47
|
-
declare const INERTIA_PROP_ONCE: unique symbol;
|
|
48
|
-
declare const INERTIA_PROP_ALWAYS: unique symbol;
|
|
49
|
-
interface InertiaOptionalProp<T = unknown> {
|
|
50
|
-
[INERTIA_PROP_OPTIONAL]: true;
|
|
51
|
-
callback: () => T;
|
|
52
|
-
}
|
|
53
|
-
interface InertiaDeferredProp<T = unknown> {
|
|
54
|
-
[INERTIA_PROP_DEFERRED]: true;
|
|
55
|
-
callback: () => T;
|
|
56
|
-
group: string;
|
|
57
|
-
}
|
|
58
|
-
type InertiaMergeStrategy = 'append' | 'prepend' | 'deep';
|
|
59
|
-
interface InertiaMergeProp<T = unknown> {
|
|
60
|
-
[INERTIA_PROP_MERGE]: true;
|
|
61
|
-
callback: () => T;
|
|
62
|
-
strategy: InertiaMergeStrategy;
|
|
63
|
-
matchOn?: string;
|
|
64
|
-
}
|
|
65
|
-
interface InertiaOnceProp<T = unknown> {
|
|
66
|
-
[INERTIA_PROP_ONCE]: true;
|
|
67
|
-
callback: () => T;
|
|
68
|
-
expiresAt?: number | null;
|
|
69
|
-
key?: string;
|
|
70
|
-
}
|
|
71
|
-
interface InertiaAlwaysProp<T = unknown> {
|
|
72
|
-
[INERTIA_PROP_ALWAYS]: true;
|
|
73
|
-
callback: () => T;
|
|
74
|
-
}
|
|
75
|
-
//#endregion
|
|
76
20
|
//#region src/inertia.options.d.ts
|
|
77
21
|
interface SsrBundleModule {
|
|
78
22
|
render(page: Page): Promise<InertiaAppSSRResponse>;
|
|
@@ -124,6 +68,56 @@ interface InertiaI18nOptions {
|
|
|
124
68
|
interface InertiaFlashOptions {
|
|
125
69
|
store: FlashStore;
|
|
126
70
|
}
|
|
71
|
+
/**
|
|
72
|
+
* Configuration for backend-driven SEO metadata.
|
|
73
|
+
*
|
|
74
|
+
* Set on {@link InertiaModuleOptions.seo}. Controllers contribute per-page
|
|
75
|
+
* metadata via `ctx.seo()`; the module merges it over these defaults, applies
|
|
76
|
+
* the title template, injects the resulting tags into `<head>`, and shares the
|
|
77
|
+
* resolved data as the `seo` prop. The client head stays in sync automatically
|
|
78
|
+
* via the runtime the `stratalInertia()` Vite plugin injects; read the data in a
|
|
79
|
+
* component with `useSeo()` from `@stratal/inertia/react`.
|
|
80
|
+
*
|
|
81
|
+
* Both `defaults` and `titleTemplate` accept a static value or a `ctx`-aware
|
|
82
|
+
* resolver function (optionally async), so they can pull from the database or
|
|
83
|
+
* elsewhere for personalization — mirroring {@link InertiaModuleOptions.sharedData}.
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```typescript
|
|
87
|
+
* InertiaModule.forRoot({
|
|
88
|
+
* rootView,
|
|
89
|
+
* seo: {
|
|
90
|
+
* defaults: { openGraph: { siteName: 'Acme' }, twitter: { card: 'summary_large_image' } },
|
|
91
|
+
* titleTemplate: '%s — Acme',
|
|
92
|
+
* },
|
|
93
|
+
* })
|
|
94
|
+
*
|
|
95
|
+
* // Dynamic / personalized:
|
|
96
|
+
* InertiaModule.forRoot({
|
|
97
|
+
* rootView,
|
|
98
|
+
* seo: {
|
|
99
|
+
* titleTemplate: async (title, ctx) => `${title} — ${(await ctx.user()).name}'s Workspace`,
|
|
100
|
+
* },
|
|
101
|
+
* })
|
|
102
|
+
* ```
|
|
103
|
+
*/
|
|
104
|
+
interface InertiaSeoOptions {
|
|
105
|
+
/**
|
|
106
|
+
* App-wide default SEO metadata, merged under each page's `ctx.seo()` values.
|
|
107
|
+
* Provide a static object or a (possibly async) resolver receiving the request `ctx`.
|
|
108
|
+
*/
|
|
109
|
+
defaults?: SeoData | ((ctx: RouterContext) => SeoData | Promise<SeoData>);
|
|
110
|
+
/**
|
|
111
|
+
* Template applied to a page-provided title. The string form replaces `%s`
|
|
112
|
+
* with the page title (e.g. `'%s — Acme'`); a bare default title is used as-is.
|
|
113
|
+
* The function form receives the resolved title (possibly `undefined` when no
|
|
114
|
+
* page or default title is set) and the request `ctx`, and returns the final
|
|
115
|
+
* title (full control, may be async). Return `undefined` to leave the title
|
|
116
|
+
* unset — useful for conditionally skipping the template (e.g. for a subset of
|
|
117
|
+
* routes that build their own title).
|
|
118
|
+
*/
|
|
119
|
+
titleTemplate?: string | ((title: string | undefined, ctx: RouterContext) => string | undefined | Promise<string | undefined>);
|
|
120
|
+
}
|
|
127
121
|
interface InertiaModuleOptions {
|
|
128
122
|
rootView: string;
|
|
129
123
|
version?: string;
|
|
@@ -162,10 +156,11 @@ interface InertiaModuleOptions {
|
|
|
162
156
|
*/
|
|
163
157
|
routes?: boolean;
|
|
164
158
|
/**
|
|
165
|
-
*
|
|
166
|
-
*
|
|
159
|
+
* SEO configuration: app-wide defaults and a title template for backend-driven
|
|
160
|
+
* page metadata. Pages set their metadata via `ctx.seo()`; the frontend reads
|
|
161
|
+
* it with `<Seo/>` / `useSeo()` from `@stratal/inertia/react`.
|
|
167
162
|
*/
|
|
168
|
-
|
|
163
|
+
seo?: InertiaSeoOptions;
|
|
169
164
|
/**
|
|
170
165
|
* Client entry path relative to project root (default: `src/inertia/app.tsx`).
|
|
171
166
|
* Used in dev mode to inject the entry script tag.
|
|
@@ -181,6 +176,20 @@ declare class InertiaModule implements RouteConfigurable, OnInitialize, OnExcept
|
|
|
181
176
|
onException(handler: ExceptionHandler): void;
|
|
182
177
|
onInitialize(): void;
|
|
183
178
|
private isInertiaRequest;
|
|
179
|
+
/**
|
|
180
|
+
* GET/HEAD requests are idempotent navigations — including Inertia deferred
|
|
181
|
+
* partial reloads, which fetch deferred props over a follow-up XHR that still
|
|
182
|
+
* carries `X-Inertia: true`.
|
|
183
|
+
*
|
|
184
|
+
* Such requests must NOT use the flash-errors + redirect-back convention: the
|
|
185
|
+
* redirect points back at the very URL that just threw, so an error raised
|
|
186
|
+
* while resolving a deferred prop would redirect → re-request → throw again
|
|
187
|
+
* in an infinite loop (`ERR_TOO_MANY_REDIRECTS`). For these we fall through to
|
|
188
|
+
* the errorPage pipeline, which renders `Errors/${status}` in place as an
|
|
189
|
+
* Inertia response. Redirect-back stays for mutations (POST/PUT/PATCH/DELETE),
|
|
190
|
+
* where it drives the post-submit form-error flow.
|
|
191
|
+
*/
|
|
192
|
+
private isReadRequest;
|
|
184
193
|
private isPrecognitionRequest;
|
|
185
194
|
private handlePrecognitionValidationError;
|
|
186
195
|
private createPrecognitionErrorResponse;
|
|
@@ -194,8 +203,28 @@ declare const INERTIA_TOKENS: {
|
|
|
194
203
|
readonly TemplateService: symbol;
|
|
195
204
|
readonly ManifestService: symbol;
|
|
196
205
|
readonly SsrRenderer: symbol;
|
|
206
|
+
readonly HreflangService: symbol;
|
|
207
|
+
readonly SeoService: symbol;
|
|
197
208
|
};
|
|
198
209
|
//#endregion
|
|
210
|
+
//#region src/seo/build-seo-tags.d.ts
|
|
211
|
+
/**
|
|
212
|
+
* Marker attribute stamped on every SEO-managed head element. The server emits
|
|
213
|
+
* it on injected tags and the client head-sync runtime uses it to find and
|
|
214
|
+
* reconcile the same tags across SPA navigations.
|
|
215
|
+
*/
|
|
216
|
+
declare const DATA_SEO_ATTR = "data-seo";
|
|
217
|
+
/**
|
|
218
|
+
* Maps resolved {@link SeoData} into a flat list of {@link SeoTagDescriptor}s.
|
|
219
|
+
*
|
|
220
|
+
* Pure and framework-free: used server-side to render HTML strings and
|
|
221
|
+
* client-side to build DOM nodes, so the two never drift. Every descriptor
|
|
222
|
+
* carries the {@link DATA_SEO_ATTR} marker.
|
|
223
|
+
*/
|
|
224
|
+
declare function buildSeoTags(data: SeoData): SeoTagDescriptor[];
|
|
225
|
+
/** Renders a descriptor to an HTML string with attribute/text escaping (server-side). */
|
|
226
|
+
declare function descriptorToHtml(d: SeoTagDescriptor): string;
|
|
227
|
+
//#endregion
|
|
199
228
|
//#region src/flash/cookie-flash-store.d.ts
|
|
200
229
|
interface CookieFlashStoreOptions {
|
|
201
230
|
secret: string | BufferSource;
|
|
@@ -237,11 +266,90 @@ declare module 'stratal/router' {
|
|
|
237
266
|
always<T>(callback: () => T): InertiaAlwaysProp<T>;
|
|
238
267
|
/** Sets a flash data entry that will be available on the next page visit. */
|
|
239
268
|
flash(key: string, value: unknown): void;
|
|
269
|
+
/**
|
|
270
|
+
* Adds a shared prop to the current request, available on every Inertia page
|
|
271
|
+
* rendered during this request. Useful for middleware and packages that want
|
|
272
|
+
* to contribute data to the frontend without a controller passing it through.
|
|
273
|
+
*/
|
|
274
|
+
share(key: string, value: unknown): void;
|
|
275
|
+
/**
|
|
276
|
+
* Sets SEO metadata (title, description, Open Graph, Twitter, etc.) for the
|
|
277
|
+
* page rendered in this request. Merges with module-level defaults and any
|
|
278
|
+
* earlier `seo()` calls. The resolved tags are injected into `<head>` and
|
|
279
|
+
* shared as the `seo` prop; the client head is kept in sync automatically
|
|
280
|
+
* by the runtime the `stratalInertia()` Vite plugin injects.
|
|
281
|
+
*/
|
|
282
|
+
seo(data: SeoData): void;
|
|
240
283
|
/** Disables server-side rendering for the current request. */
|
|
241
284
|
withoutSsr(): void;
|
|
242
285
|
}
|
|
243
286
|
}
|
|
244
287
|
//#endregion
|
|
288
|
+
//#region src/services/hreflang.service.d.ts
|
|
289
|
+
/**
|
|
290
|
+
* Produces `rel="alternate" hreflang="…"` link descriptors for the SEO pipeline.
|
|
291
|
+
*
|
|
292
|
+
* Activated when i18n detection produces URL-distinct locale variants:
|
|
293
|
+
* - `path` strategy with ≥2 locales → locale-prefixed pathname variants
|
|
294
|
+
* - `querystring` strategy with ≥2 locales → `?locale=xx` variants
|
|
295
|
+
*
|
|
296
|
+
* Returns `[]` for cookie/header strategies (no URL distinction) and for
|
|
297
|
+
* single-locale apps. Emits an additional `x-default` link pointing at the
|
|
298
|
+
* default-locale URL.
|
|
299
|
+
*
|
|
300
|
+
* The descriptors are merged into the resolved {@link SeoData} by
|
|
301
|
+
* {@link import('./seo.service').SeoService}, so hreflang rides the same
|
|
302
|
+
* `<head>` injection (initial render) and client reconciliation (SPA
|
|
303
|
+
* navigation) as the rest of the SEO tags — no separate head path.
|
|
304
|
+
*
|
|
305
|
+
* Every generated `href` runs through {@link applyTrailingSlash} with the
|
|
306
|
+
* app-wide mode so hreflang URLs match the canonical form the rest of the
|
|
307
|
+
* router emits.
|
|
308
|
+
*/
|
|
309
|
+
declare class HreflangService {
|
|
310
|
+
private readonly container;
|
|
311
|
+
constructor(container: Container);
|
|
312
|
+
buildLinks(currentUrl: URL): SeoLinkTag[];
|
|
313
|
+
private buildPathLinks;
|
|
314
|
+
private buildQuerystringLinks;
|
|
315
|
+
private compose;
|
|
316
|
+
private composeQuery;
|
|
317
|
+
private linkTag;
|
|
318
|
+
}
|
|
319
|
+
//#endregion
|
|
320
|
+
//#region src/services/seo.service.d.ts
|
|
321
|
+
/**
|
|
322
|
+
* Request-scoped accumulator for page SEO metadata.
|
|
323
|
+
*
|
|
324
|
+
* Controllers (and middleware) call `ctx.seo()` to contribute metadata; at
|
|
325
|
+
* render time {@link InertiaService} resolves it against the module-level
|
|
326
|
+
* defaults and title template, shares the result as the `seo` prop, and injects
|
|
327
|
+
* the rendered tags into `<head>`.
|
|
328
|
+
*/
|
|
329
|
+
declare class SeoService {
|
|
330
|
+
private readonly options;
|
|
331
|
+
private readonly hreflang;
|
|
332
|
+
private accumulated;
|
|
333
|
+
constructor(options: InertiaModuleOptions, hreflang: HreflangService);
|
|
334
|
+
/** Merges the given metadata into the request's accumulated SEO data. */
|
|
335
|
+
set(data: SeoData): void;
|
|
336
|
+
/**
|
|
337
|
+
* Resolves the final SEO data: module defaults (base) merged with the
|
|
338
|
+
* request's accumulated data, then the title template applied. Resolver
|
|
339
|
+
* functions for `defaults`/`titleTemplate` are awaited with the request `ctx`.
|
|
340
|
+
* Locale-aware `hreflang` alternates are appended last so they ride the same
|
|
341
|
+
* head injection and SPA reconciliation as the rest of the SEO tags.
|
|
342
|
+
*
|
|
343
|
+
* The resolved `title` is ALWAYS a string (falling back to `''`). This makes
|
|
344
|
+
* the `<title>` descriptor deterministic: every navigation — including to a
|
|
345
|
+
* page with no SEO — produces a title, so the client head-sync sets
|
|
346
|
+
* `document.title` rather than leaving the previous page's title stale.
|
|
347
|
+
*/
|
|
348
|
+
resolve(ctx: RouterContext): Promise<SeoData>;
|
|
349
|
+
/** Renders resolved SEO data into a list of head-tag HTML strings. */
|
|
350
|
+
tagsFor(resolved: SeoData): string[];
|
|
351
|
+
}
|
|
352
|
+
//#endregion
|
|
245
353
|
//#region src/services/ssr-renderer.service.d.ts
|
|
246
354
|
declare class SsrRendererService {
|
|
247
355
|
private readonly options;
|
|
@@ -258,8 +366,8 @@ declare class SsrRendererService {
|
|
|
258
366
|
declare class ManifestService {
|
|
259
367
|
private readonly manifest;
|
|
260
368
|
private readonly entryClientPath;
|
|
369
|
+
private readonly isDev;
|
|
261
370
|
constructor(options: InertiaModuleOptions);
|
|
262
|
-
private get isDev();
|
|
263
371
|
getHeadTags(): string;
|
|
264
372
|
getScriptTags(): string;
|
|
265
373
|
}
|
|
@@ -278,9 +386,11 @@ declare class InertiaService {
|
|
|
278
386
|
private readonly options;
|
|
279
387
|
private readonly template;
|
|
280
388
|
private readonly ssr;
|
|
389
|
+
private readonly seoService;
|
|
281
390
|
private sharedData;
|
|
282
|
-
constructor(options: InertiaModuleOptions, template: TemplateService, ssr: SsrRendererService);
|
|
391
|
+
constructor(options: InertiaModuleOptions, template: TemplateService, ssr: SsrRendererService, seoService: SeoService);
|
|
283
392
|
share(key: string, value: unknown): void;
|
|
393
|
+
seo(data: SeoData): void;
|
|
284
394
|
location(url: string): Response;
|
|
285
395
|
optional<T>(callback: () => T): InertiaOptionalProp<T>;
|
|
286
396
|
defer<T>(callback: () => T, group?: string): InertiaDeferredProp<T>;
|
|
@@ -418,44 +528,6 @@ declare class InertiaMiddleware implements Middleware {
|
|
|
418
528
|
handle(ctx: RouterContext, next: Next): Promise<void>;
|
|
419
529
|
}
|
|
420
530
|
//#endregion
|
|
421
|
-
//#region src/commands/inertia-build.command.d.ts
|
|
422
|
-
declare class InertiaBuildCommand extends Command {
|
|
423
|
-
static command: string;
|
|
424
|
-
static description: string;
|
|
425
|
-
handle(): Promise<number | undefined>;
|
|
426
|
-
private spawnVite;
|
|
427
|
-
}
|
|
428
|
-
//#endregion
|
|
429
|
-
//#region src/commands/inertia-dev.command.d.ts
|
|
430
|
-
declare class InertiaDevCommand extends Command {
|
|
431
|
-
static command: string;
|
|
432
|
-
static description: string;
|
|
433
|
-
handle(): Promise<number | undefined>;
|
|
434
|
-
}
|
|
435
|
-
//#endregion
|
|
436
|
-
//#region src/commands/inertia-install.command.d.ts
|
|
437
|
-
declare class InertiaInstallCommand extends Command {
|
|
438
|
-
static command: string;
|
|
439
|
-
static description: string;
|
|
440
|
-
handle(): Promise<number | undefined>;
|
|
441
|
-
private updateAppModule;
|
|
442
|
-
}
|
|
443
|
-
//#endregion
|
|
444
|
-
//#region src/commands/inertia-types.command.d.ts
|
|
445
|
-
declare class InertiaTypesCommand extends Command {
|
|
446
|
-
static command: string;
|
|
447
|
-
static description: string;
|
|
448
|
-
handle(): Promise<number | undefined>;
|
|
449
|
-
private generate;
|
|
450
|
-
private watchForChanges;
|
|
451
|
-
}
|
|
452
|
-
//#endregion
|
|
453
|
-
//#region src/generator/type-generator.d.ts
|
|
454
|
-
declare function runTypeGeneration(cwd: string): Promise<{
|
|
455
|
-
outputPath: string;
|
|
456
|
-
pageCount: number;
|
|
457
|
-
}>;
|
|
458
|
-
//#endregion
|
|
459
531
|
//#region src/augment/router-variables.d.ts
|
|
460
532
|
declare module 'stratal/router' {
|
|
461
533
|
interface RouterVariables {
|
|
@@ -468,5 +540,5 @@ declare module 'stratal/router' {
|
|
|
468
540
|
}
|
|
469
541
|
}
|
|
470
542
|
//#endregion
|
|
471
|
-
export { CookieFlashStore, type FlashStore, HandlePrecognitiveRequests, INERTIA_TOKENS, type InertiaAlwaysProp,
|
|
543
|
+
export { CookieFlashStore, DATA_SEO_ATTR, type FlashStore, HandlePrecognitiveRequests, INERTIA_TOKENS, type InertiaAlwaysProp, type InertiaDeferredProp, InertiaDelete, type InertiaFlashOptions, type InertiaFullPageProps, InertiaGet, type InertiaI18nConfig, type InertiaI18nOptions, type InertiaMergeProp, type InertiaMergeStrategy, InertiaMiddleware, InertiaModule, type InertiaModuleOptions, type InertiaOnceProp, type InertiaOptionalProp, type InertiaPage, type InertiaPageComponent, type InertiaPageRegistry, InertiaPatch, InertiaPost, InertiaPut, type InertiaRenderOptions, InertiaRoute, type InertiaRouteConfig, type InertiaSeoOptions, InertiaService, type InertiaSharedProps, type InertiaSsrBundle, type InertiaSsrOptions, type InertiaSsrResult, type InertiaTranslationKeys, ManifestService, type ResolvedInertiaPageProps, type SeoData, type SeoLinkTag, type SeoMetaTag, type SeoOpenGraph, SeoService, type SeoTagDescriptor, type SeoTwitter, type SharedDataResolver, SsrRendererService, TemplateService, type ViteManifest, type ViteManifestEntry, buildSeoTags, descriptorToHtml };
|
|
472
544
|
//# sourceMappingURL=index.d.mts.map
|
package/dist/index.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/flash/flash-store.ts","../src/
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../src/flash/flash-store.ts","../src/inertia.options.ts","../src/inertia.module.ts","../src/inertia.tokens.ts","../src/seo/build-seo-tags.ts","../src/flash/cookie-flash-store.ts","../src/augment/router-context.ts","../src/services/hreflang.service.ts","../src/services/seo.service.ts","../src/services/ssr-renderer.service.ts","../src/services/manifest.service.ts","../src/services/template.service.ts","../src/services/inertia.service.ts","../src/decorators/inertia.decorators.ts","../src/middleware/handle-precognitive-requests.middleware.ts","../src/middleware/inertia.middleware.ts","../src/augment/router-variables.ts"],"mappings":";;;;;;;;;;;;UAEiB,UAAA;EACf,IAAA,CAAK,GAAA,EAAK,aAAA,GAAgB,OAAA,CAAQ,MAAA;EAClC,KAAA,CAAM,GAAA,EAAK,aAAA,EAAe,IAAA,EAAM,MAAA,oBAA0B,OAAA;EAC1D,KAAA,CAAM,GAAA,EAAK,aAAA,GAAgB,OAAA;AAAA;;;UCCnB,eAAA;EACR,MAAA,CAAO,IAAA,EAAM,IAAA,GAAO,OAAA,CAAQ,qBAAA;AAAA;AAAA,UAGb,iBAAA;EACf,MAAA,QAAc,OAAA,CAAQ,eAAA;IAAoB,OAAA,EAAS,eAAA;EAAA;EDTpC;;;;ECcf,QAAA;AAAA;;;;;;;;;;;;;;;;;UAmBe,kBAAA;ED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