@publish.os/nextjs 0.0.1-alpha.5 → 0.0.1-alpha.6
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/README.md +1 -1
- package/dist/config/createNextConfig.js +3 -3
- package/dist/index.js +7 -5
- package/dist/kernel/components/blocks/color-palette.js +35 -4
- package/dist/kernel/components/blocks/logo-block.js +1 -1
- package/dist/kernel/components/blocks/nav-breadcrumb.js +2 -12
- package/dist/kernel/components/mdx/components/image.js +1 -1
- package/dist/kernel/components/ui/breadcrumb-trail.d.ts +3 -1
- package/dist/kernel/components/ui/breadcrumb-trail.js +1 -0
- package/dist/kernel/components/ui/breadcrumb.d.ts +1 -5
- package/dist/kernel/components/ui/breadcrumb.js +1 -16
- package/dist/kernel/components/ui/menu.js +5 -5
- package/dist/kernel/components/ui/navigation-menu.js +2 -2
- package/dist/kernel/components/ui/popover.js +5 -11
- package/dist/kernel/components/ui/select.js +5 -5
- package/dist/kernel/components/ui/text.js +109 -106
- package/dist/kernel/components/ui/tooltip.js +2 -2
- package/dist/kernel/defaults.registry.d.ts +60 -69
- package/dist/kernel/defaults.registry.js +59 -67
- package/dist/kernel/routes/agent/markdown.js +2 -2
- package/dist/kernel/routes/metadata/feed.js +2 -2
- package/dist/kernel/routes/metadata/llms.js +4 -2
- package/dist/kernel/routes/metadata/og-image.d.ts +1 -1
- package/dist/kernel/routes/metadata/robots.js +2 -2
- package/dist/kernel/routes/metadata/sitemap.js +2 -2
- package/dist/utils/cn.d.ts +1 -1
- package/package.json +2 -6
- package/release/package.json +3 -2
- package/release/release.json +5 -5
- package/release/{pnpm-lock.yaml → runtime-pnpm-lock.yaml} +135 -34
- package/dist/cache/tags.cjs +0 -79
- package/dist/cache/tags.d.cts +0 -13
- package/dist/config/createNextConfig.cjs +0 -52
- package/dist/config/createNextConfig.d.cts +0 -8
- package/dist/config.cjs +0 -78
- package/dist/config.d.cts +0 -101
- package/dist/config.d.ts +0 -101
- package/dist/config.js +0 -48
- package/dist/index.cjs +0 -1266
- package/dist/index.d.cts +0 -18
- package/dist/kernel/components/blocks/AgentActions.cjs +0 -425
- package/dist/kernel/components/blocks/AgentActions.d.cts +0 -52
- package/dist/kernel/components/blocks/animated-icon-swap.cjs +0 -101
- package/dist/kernel/components/blocks/animated-icon-swap.d.cts +0 -16
- package/dist/kernel/components/blocks/color-palette.cjs +0 -413
- package/dist/kernel/components/blocks/color-palette.d.cts +0 -7
- package/dist/kernel/components/blocks/design-system-preview.cjs +0 -593
- package/dist/kernel/components/blocks/design-system-preview.d.cts +0 -29
- package/dist/kernel/components/blocks/link-playground.cjs +0 -816
- package/dist/kernel/components/blocks/link-playground.d.cts +0 -5
- package/dist/kernel/components/blocks/logo-block.cjs +0 -156
- package/dist/kernel/components/blocks/logo-block.d.cts +0 -21
- package/dist/kernel/components/blocks/nav-breadcrumb.cjs +0 -122
- package/dist/kernel/components/blocks/nav-breadcrumb.d.cts +0 -11
- package/dist/kernel/components/blocks/navbar.cjs +0 -154
- package/dist/kernel/components/blocks/navbar.d.cts +0 -16
- package/dist/kernel/components/blocks/navigation-progress-playground.cjs +0 -735
- package/dist/kernel/components/blocks/navigation-progress-playground.d.cts +0 -5
- package/dist/kernel/components/blocks/navigation-progress.cjs +0 -270
- package/dist/kernel/components/blocks/navigation-progress.d.cts +0 -16
- package/dist/kernel/components/blocks/next-prev.cjs +0 -142
- package/dist/kernel/components/blocks/next-prev.d.cts +0 -11
- package/dist/kernel/components/blocks/page-list.cjs +0 -59
- package/dist/kernel/components/blocks/page-list.d.cts +0 -11
- package/dist/kernel/components/blocks/search.cjs +0 -717
- package/dist/kernel/components/blocks/search.d.cts +0 -77
- package/dist/kernel/components/blocks/sidebar-node.cjs +0 -309
- package/dist/kernel/components/blocks/sidebar-node.d.cts +0 -8
- package/dist/kernel/components/blocks/sidebar.cjs +0 -317
- package/dist/kernel/components/blocks/sidebar.d.cts +0 -33
- package/dist/kernel/components/blocks/theme-toggle.cjs +0 -31
- package/dist/kernel/components/blocks/theme-toggle.d.cts +0 -6
- package/dist/kernel/components/blocks/toc.cjs +0 -356
- package/dist/kernel/components/blocks/toc.d.cts +0 -10
- package/dist/kernel/components/mdx/components/blockquote.cjs +0 -66
- package/dist/kernel/components/mdx/components/blockquote.d.cts +0 -6
- package/dist/kernel/components/mdx/components/callout.cjs +0 -137
- package/dist/kernel/components/mdx/components/callout.d.cts +0 -18
- package/dist/kernel/components/mdx/components/code-block.cjs +0 -39
- package/dist/kernel/components/mdx/components/code-block.d.cts +0 -9
- package/dist/kernel/components/mdx/components/figure-caption.cjs +0 -63
- package/dist/kernel/components/mdx/components/figure-caption.d.cts +0 -6
- package/dist/kernel/components/mdx/components/figure.cjs +0 -78
- package/dist/kernel/components/mdx/components/figure.d.cts +0 -10
- package/dist/kernel/components/mdx/components/footnotes.cjs +0 -66
- package/dist/kernel/components/mdx/components/footnotes.d.cts +0 -6
- package/dist/kernel/components/mdx/components/heading-copy-link.cjs +0 -108
- package/dist/kernel/components/mdx/components/heading-copy-link.d.cts +0 -23
- package/dist/kernel/components/mdx/components/heading.cjs +0 -166
- package/dist/kernel/components/mdx/components/heading.d.cts +0 -8
- package/dist/kernel/components/mdx/components/hr.cjs +0 -34
- package/dist/kernel/components/mdx/components/hr.d.cts +0 -9
- package/dist/kernel/components/mdx/components/image-zoom.cjs +0 -49
- package/dist/kernel/components/mdx/components/image-zoom.d.cts +0 -10
- package/dist/kernel/components/mdx/components/image.cjs +0 -192
- package/dist/kernel/components/mdx/components/image.d.cts +0 -21
- package/dist/kernel/components/mdx/components/inline-code.cjs +0 -66
- package/dist/kernel/components/mdx/components/inline-code.d.cts +0 -6
- package/dist/kernel/components/mdx/components/kbd.cjs +0 -34
- package/dist/kernel/components/mdx/components/kbd.d.cts +0 -10
- package/dist/kernel/components/mdx/components/link.cjs +0 -49
- package/dist/kernel/components/mdx/components/link.d.cts +0 -11
- package/dist/kernel/components/mdx/components/paragraph.cjs +0 -87
- package/dist/kernel/components/mdx/components/paragraph.d.cts +0 -5
- package/dist/kernel/components/mdx/components/pre.cjs +0 -66
- package/dist/kernel/components/mdx/components/pre.d.cts +0 -6
- package/dist/kernel/components/mdx/components/strikethrough.cjs +0 -63
- package/dist/kernel/components/mdx/components/strikethrough.d.cts +0 -6
- package/dist/kernel/components/mdx/components/table.cjs +0 -59
- package/dist/kernel/components/mdx/components/table.d.cts +0 -10
- package/dist/kernel/components/mdx/components/task-list.cjs +0 -88
- package/dist/kernel/components/mdx/components/task-list.d.cts +0 -8
- package/dist/kernel/components/mdx/components/video-player.cjs +0 -173
- package/dist/kernel/components/mdx/components/video-player.d.cts +0 -18
- package/dist/kernel/components/mdx/components/video.cjs +0 -185
- package/dist/kernel/components/mdx/components/video.d.cts +0 -15
- package/dist/kernel/components/mdx/error-boundary.cjs +0 -62
- package/dist/kernel/components/mdx/error-boundary.d.cts +0 -8
- package/dist/kernel/components/mdx/error-fallback.cjs +0 -58
- package/dist/kernel/components/mdx/error-fallback.d.cts +0 -9
- package/dist/kernel/components/mdx/mdx.cjs +0 -141
- package/dist/kernel/components/mdx/mdx.d.cts +0 -22
- package/dist/kernel/components/mdx/rehype-heading-ids.cjs +0 -113
- package/dist/kernel/components/mdx/rehype-heading-ids.d.cts +0 -10
- package/dist/kernel/components/mdx/types.cjs +0 -18
- package/dist/kernel/components/mdx/types.d.cts +0 -18
- package/dist/kernel/components/ui/accordion.cjs +0 -104
- package/dist/kernel/components/ui/accordion.d.cts +0 -16
- package/dist/kernel/components/ui/breadcrumb-trail.cjs +0 -238
- package/dist/kernel/components/ui/breadcrumb-trail.d.cts +0 -13
- package/dist/kernel/components/ui/breadcrumb.cjs +0 -399
- package/dist/kernel/components/ui/breadcrumb.d.cts +0 -52
- package/dist/kernel/components/ui/button-group.cjs +0 -143
- package/dist/kernel/components/ui/button-group.d.cts +0 -19
- package/dist/kernel/components/ui/button.cjs +0 -139
- package/dist/kernel/components/ui/button.d.cts +0 -22
- package/dist/kernel/components/ui/card.cjs +0 -133
- package/dist/kernel/components/ui/card.d.cts +0 -17
- package/dist/kernel/components/ui/dialog.cjs +0 -149
- package/dist/kernel/components/ui/dialog.d.cts +0 -22
- package/dist/kernel/components/ui/drawer.cjs +0 -163
- package/dist/kernel/components/ui/drawer.d.cts +0 -24
- package/dist/kernel/components/ui/input.cjs +0 -96
- package/dist/kernel/components/ui/input.d.cts +0 -18
- package/dist/kernel/components/ui/kbd.cjs +0 -105
- package/dist/kernel/components/ui/kbd.d.cts +0 -13
- package/dist/kernel/components/ui/link.cjs +0 -253
- package/dist/kernel/components/ui/link.d.cts +0 -31
- package/dist/kernel/components/ui/menu.cjs +0 -301
- package/dist/kernel/components/ui/menu.d.cts +0 -70
- package/dist/kernel/components/ui/meta-key.cjs +0 -34
- package/dist/kernel/components/ui/meta-key.d.cts +0 -12
- package/dist/kernel/components/ui/navigation-menu.cjs +0 -253
- package/dist/kernel/components/ui/navigation-menu.d.cts +0 -47
- package/dist/kernel/components/ui/popover.cjs +0 -168
- package/dist/kernel/components/ui/popover.d.cts +0 -24
- package/dist/kernel/components/ui/progress.cjs +0 -112
- package/dist/kernel/components/ui/progress.d.cts +0 -16
- package/dist/kernel/components/ui/scroll-area.cjs +0 -413
- package/dist/kernel/components/ui/scroll-area.d.cts +0 -58
- package/dist/kernel/components/ui/select.cjs +0 -244
- package/dist/kernel/components/ui/select.d.cts +0 -40
- package/dist/kernel/components/ui/separator.cjs +0 -73
- package/dist/kernel/components/ui/separator.d.cts +0 -8
- package/dist/kernel/components/ui/table.cjs +0 -131
- package/dist/kernel/components/ui/table.d.cts +0 -11
- package/dist/kernel/components/ui/tabs.cjs +0 -450
- package/dist/kernel/components/ui/tabs.d.cts +0 -82
- package/dist/kernel/components/ui/tag.cjs +0 -104
- package/dist/kernel/components/ui/tag.d.cts +0 -14
- package/dist/kernel/components/ui/text.cjs +0 -184
- package/dist/kernel/components/ui/text.d.cts +0 -17
- package/dist/kernel/components/ui/theme-toggle.cjs +0 -108
- package/dist/kernel/components/ui/theme-toggle.d.cts +0 -10
- package/dist/kernel/components/ui/toast.cjs +0 -154
- package/dist/kernel/components/ui/toast.d.cts +0 -26
- package/dist/kernel/components/ui/tooltip.cjs +0 -127
- package/dist/kernel/components/ui/tooltip.d.cts +0 -20
- package/dist/kernel/defaults.registry.cjs +0 -541
- package/dist/kernel/defaults.registry.d.cts +0 -469
- package/dist/kernel/routes/agent/markdown.cjs +0 -202
- package/dist/kernel/routes/agent/markdown.d.cts +0 -58
- package/dist/kernel/routes/layouts/group.cjs +0 -181
- package/dist/kernel/routes/layouts/group.d.cts +0 -20
- package/dist/kernel/routes/metadata/feed.cjs +0 -293
- package/dist/kernel/routes/metadata/feed.d.cts +0 -20
- package/dist/kernel/routes/metadata/llms.cjs +0 -239
- package/dist/kernel/routes/metadata/llms.d.cts +0 -26
- package/dist/kernel/routes/metadata/og-image.cjs +0 -630
- package/dist/kernel/routes/metadata/og-image.d.cts +0 -62
- package/dist/kernel/routes/metadata/robots.cjs +0 -148
- package/dist/kernel/routes/metadata/robots.d.cts +0 -6
- package/dist/kernel/routes/metadata/sitemap.cjs +0 -192
- package/dist/kernel/routes/metadata/sitemap.d.cts +0 -8
- package/dist/kernel/routes/pages/group.cjs +0 -263
- package/dist/kernel/routes/pages/group.d.cts +0 -17
- package/dist/kernel/routes/pages/leaf.cjs +0 -421
- package/dist/kernel/routes/pages/leaf.d.cts +0 -36
- package/dist/kernel/routes/pages/root.cjs +0 -229
- package/dist/kernel/routes/pages/root.d.cts +0 -16
- package/dist/keyboard-shortcuts.cjs +0 -345
- package/dist/keyboard-shortcuts.d.cts +0 -34
- package/dist/resolvers/manifest-resolver.cjs +0 -111
- package/dist/resolvers/manifest-resolver.d.cts +0 -13
- package/dist/search.cjs +0 -411
- package/dist/search.d.cts +0 -20
- package/dist/types.cjs +0 -30
- package/dist/types.d.cts +0 -269
- package/dist/utils/cn.cjs +0 -49
- package/dist/utils/cn.d.cts +0 -15
- package/dist/utils/heading-ids.cjs +0 -119
- package/dist/utils/heading-ids.d.cts +0 -15
- package/dist/utils/pretty-date.cjs +0 -55
- package/dist/utils/pretty-date.d.cts +0 -6
|
@@ -1,148 +0,0 @@
|
|
|
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/kernel/routes/metadata/robots.ts
|
|
21
|
-
var robots_exports = {};
|
|
22
|
-
__export(robots_exports, {
|
|
23
|
-
createRobotsTxtRoute: () => createRobotsTxtRoute
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(robots_exports);
|
|
26
|
-
var import_cache = require("next/cache");
|
|
27
|
-
|
|
28
|
-
// src/cache/tags.ts
|
|
29
|
-
var import_node_crypto = require("crypto");
|
|
30
|
-
var MAX_TAG_LEN = 256;
|
|
31
|
-
var MAX_SEGMENT_LEN = 80;
|
|
32
|
-
var TAG_PATTERN = /^[a-z0-9:_./-]+$/;
|
|
33
|
-
function sha256(value) {
|
|
34
|
-
return (0, import_node_crypto.createHash)("sha256").update(value).digest("hex").slice(0, 16);
|
|
35
|
-
}
|
|
36
|
-
function safeSegment(value) {
|
|
37
|
-
const raw = value.trim().toLowerCase() || "root";
|
|
38
|
-
const normalized = raw.replace(/\\/g, "/").replace(/\/+/g, "/").replace(/^\//, "").replace(/\/$/, "").replace(/[^a-z0-9:_./-]+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
39
|
-
const segment = normalized || "root";
|
|
40
|
-
if (segment.length <= MAX_SEGMENT_LEN) return segment;
|
|
41
|
-
return `${segment.slice(0, 48)}.${sha256(segment)}`;
|
|
42
|
-
}
|
|
43
|
-
function assertTag(tag) {
|
|
44
|
-
if (tag.length > MAX_TAG_LEN || !TAG_PATTERN.test(tag)) {
|
|
45
|
-
return `tag:${sha256(tag)}`;
|
|
46
|
-
}
|
|
47
|
-
return tag;
|
|
48
|
-
}
|
|
49
|
-
var tags = {
|
|
50
|
-
site() {
|
|
51
|
-
return "site";
|
|
52
|
-
},
|
|
53
|
-
pages() {
|
|
54
|
-
return "pages";
|
|
55
|
-
},
|
|
56
|
-
group(group) {
|
|
57
|
-
return assertTag(`group:${safeSegment(group)}`);
|
|
58
|
-
},
|
|
59
|
-
page(group, slug) {
|
|
60
|
-
const path = Array.isArray(slug) ? slug.join("/") : slug;
|
|
61
|
-
return assertTag(`page:${safeSegment(group)}:${safeSegment(path)}`);
|
|
62
|
-
},
|
|
63
|
-
manifest(contentHash) {
|
|
64
|
-
return assertTag(`manifest:${safeSegment(contentHash)}`);
|
|
65
|
-
},
|
|
66
|
-
sitemap() {
|
|
67
|
-
return "sitemap";
|
|
68
|
-
},
|
|
69
|
-
robots() {
|
|
70
|
-
return "robots";
|
|
71
|
-
},
|
|
72
|
-
llms(scope = "root") {
|
|
73
|
-
return assertTag(`llms:${safeSegment(scope)}`);
|
|
74
|
-
},
|
|
75
|
-
feed(format, scope = "site") {
|
|
76
|
-
return assertTag(`feed:${safeSegment(format)}:${safeSegment(scope)}`);
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
|
|
80
|
-
// src/kernel/routes/response.ts
|
|
81
|
-
var CACHE_CONTROL = "public, max-age=300, s-maxage=86400, stale-while-revalidate=3600, must-revalidate";
|
|
82
|
-
var CDN_CACHE_CONTROL = "public, max-age=2592000, stale-while-revalidate=31536000";
|
|
83
|
-
var SHORT_CACHE_CONTROL = "public, max-age=60, s-maxage=600, stale-while-revalidate=300, must-revalidate";
|
|
84
|
-
var SHORT_CDN_CACHE_CONTROL = "public, max-age=300, stale-while-revalidate=3600";
|
|
85
|
-
function cacheControl(policy) {
|
|
86
|
-
if (!policy || policy === "default") return CACHE_CONTROL;
|
|
87
|
-
if (policy === "short") return SHORT_CACHE_CONTROL;
|
|
88
|
-
return policy;
|
|
89
|
-
}
|
|
90
|
-
function cdnCacheControl(policy) {
|
|
91
|
-
if (!policy || policy === "default") return CDN_CACHE_CONTROL;
|
|
92
|
-
if (policy === "short") return SHORT_CDN_CACHE_CONTROL;
|
|
93
|
-
return policy;
|
|
94
|
-
}
|
|
95
|
-
function cachedTextHeaders(contentType, options = {}) {
|
|
96
|
-
const headers = new Headers(options.headers);
|
|
97
|
-
headers.set("cache-control", cacheControl(options.cachePolicy));
|
|
98
|
-
headers.set("cdn-cache-control", cdnCacheControl(options.cachePolicy));
|
|
99
|
-
headers.set("vercel-cdn-cache-control", cdnCacheControl(options.cachePolicy));
|
|
100
|
-
headers.set("content-type", contentType);
|
|
101
|
-
headers.set("x-content-type-options", "nosniff");
|
|
102
|
-
if (options.noindex) headers.set("x-robots-tag", "noindex");
|
|
103
|
-
return headers;
|
|
104
|
-
}
|
|
105
|
-
function createCachedTextResponse(options) {
|
|
106
|
-
const status = options.status ?? 200;
|
|
107
|
-
const method = options.method ?? "GET";
|
|
108
|
-
const headers = cachedTextHeaders(options.contentType, options);
|
|
109
|
-
return new Response(method === "HEAD" ? null : options.body, {
|
|
110
|
-
headers,
|
|
111
|
-
status
|
|
112
|
-
});
|
|
113
|
-
}
|
|
114
|
-
|
|
115
|
-
// src/kernel/routes/metadata/canonical-url.ts
|
|
116
|
-
function canonicalUrl(manifest, path) {
|
|
117
|
-
const origin = manifest.site.url?.replace(/\/+$/, "");
|
|
118
|
-
if (!origin) return path;
|
|
119
|
-
try {
|
|
120
|
-
return new URL(path, `${origin}/`).toString();
|
|
121
|
-
} catch {
|
|
122
|
-
return path;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
// src/kernel/routes/metadata/robots.ts
|
|
127
|
-
async function robotsTxt(manifest) {
|
|
128
|
-
"use cache";
|
|
129
|
-
(0, import_cache.cacheLife)("page");
|
|
130
|
-
(0, import_cache.cacheTag)(tags.site(), tags.robots(), tags.manifest(manifest.contentHash));
|
|
131
|
-
const sitemapUrl = canonicalUrl(manifest, "/sitemap.xml");
|
|
132
|
-
return `User-agent: *
|
|
133
|
-
Allow: /
|
|
134
|
-
Sitemap: ${sitemapUrl}
|
|
135
|
-
`;
|
|
136
|
-
}
|
|
137
|
-
function createRobotsTxtRoute(manifest) {
|
|
138
|
-
return async function GET() {
|
|
139
|
-
return createCachedTextResponse({
|
|
140
|
-
body: await robotsTxt(manifest),
|
|
141
|
-
contentType: "text/plain; charset=utf-8"
|
|
142
|
-
});
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
146
|
-
0 && (module.exports = {
|
|
147
|
-
createRobotsTxtRoute
|
|
148
|
-
});
|
|
@@ -1,192 +0,0 @@
|
|
|
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/kernel/routes/metadata/sitemap.ts
|
|
21
|
-
var sitemap_exports = {};
|
|
22
|
-
__export(sitemap_exports, {
|
|
23
|
-
createSitemapMarkdownRoute: () => createSitemapMarkdownRoute,
|
|
24
|
-
createSitemapXmlRoute: () => createSitemapXmlRoute
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(sitemap_exports);
|
|
27
|
-
var import_cache = require("next/cache");
|
|
28
|
-
|
|
29
|
-
// src/cache/tags.ts
|
|
30
|
-
var import_node_crypto = require("crypto");
|
|
31
|
-
var MAX_TAG_LEN = 256;
|
|
32
|
-
var MAX_SEGMENT_LEN = 80;
|
|
33
|
-
var TAG_PATTERN = /^[a-z0-9:_./-]+$/;
|
|
34
|
-
function sha256(value) {
|
|
35
|
-
return (0, import_node_crypto.createHash)("sha256").update(value).digest("hex").slice(0, 16);
|
|
36
|
-
}
|
|
37
|
-
function safeSegment(value) {
|
|
38
|
-
const raw = value.trim().toLowerCase() || "root";
|
|
39
|
-
const normalized = raw.replace(/\\/g, "/").replace(/\/+/g, "/").replace(/^\//, "").replace(/\/$/, "").replace(/[^a-z0-9:_./-]+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
40
|
-
const segment = normalized || "root";
|
|
41
|
-
if (segment.length <= MAX_SEGMENT_LEN) return segment;
|
|
42
|
-
return `${segment.slice(0, 48)}.${sha256(segment)}`;
|
|
43
|
-
}
|
|
44
|
-
function assertTag(tag) {
|
|
45
|
-
if (tag.length > MAX_TAG_LEN || !TAG_PATTERN.test(tag)) {
|
|
46
|
-
return `tag:${sha256(tag)}`;
|
|
47
|
-
}
|
|
48
|
-
return tag;
|
|
49
|
-
}
|
|
50
|
-
var tags = {
|
|
51
|
-
site() {
|
|
52
|
-
return "site";
|
|
53
|
-
},
|
|
54
|
-
pages() {
|
|
55
|
-
return "pages";
|
|
56
|
-
},
|
|
57
|
-
group(group) {
|
|
58
|
-
return assertTag(`group:${safeSegment(group)}`);
|
|
59
|
-
},
|
|
60
|
-
page(group, slug) {
|
|
61
|
-
const path = Array.isArray(slug) ? slug.join("/") : slug;
|
|
62
|
-
return assertTag(`page:${safeSegment(group)}:${safeSegment(path)}`);
|
|
63
|
-
},
|
|
64
|
-
manifest(contentHash) {
|
|
65
|
-
return assertTag(`manifest:${safeSegment(contentHash)}`);
|
|
66
|
-
},
|
|
67
|
-
sitemap() {
|
|
68
|
-
return "sitemap";
|
|
69
|
-
},
|
|
70
|
-
robots() {
|
|
71
|
-
return "robots";
|
|
72
|
-
},
|
|
73
|
-
llms(scope = "root") {
|
|
74
|
-
return assertTag(`llms:${safeSegment(scope)}`);
|
|
75
|
-
},
|
|
76
|
-
feed(format, scope = "site") {
|
|
77
|
-
return assertTag(`feed:${safeSegment(format)}:${safeSegment(scope)}`);
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
|
|
81
|
-
// src/kernel/routes/response.ts
|
|
82
|
-
var CACHE_CONTROL = "public, max-age=300, s-maxage=86400, stale-while-revalidate=3600, must-revalidate";
|
|
83
|
-
var CDN_CACHE_CONTROL = "public, max-age=2592000, stale-while-revalidate=31536000";
|
|
84
|
-
var SHORT_CACHE_CONTROL = "public, max-age=60, s-maxage=600, stale-while-revalidate=300, must-revalidate";
|
|
85
|
-
var SHORT_CDN_CACHE_CONTROL = "public, max-age=300, stale-while-revalidate=3600";
|
|
86
|
-
function cacheControl(policy) {
|
|
87
|
-
if (!policy || policy === "default") return CACHE_CONTROL;
|
|
88
|
-
if (policy === "short") return SHORT_CACHE_CONTROL;
|
|
89
|
-
return policy;
|
|
90
|
-
}
|
|
91
|
-
function cdnCacheControl(policy) {
|
|
92
|
-
if (!policy || policy === "default") return CDN_CACHE_CONTROL;
|
|
93
|
-
if (policy === "short") return SHORT_CDN_CACHE_CONTROL;
|
|
94
|
-
return policy;
|
|
95
|
-
}
|
|
96
|
-
function cachedTextHeaders(contentType, options = {}) {
|
|
97
|
-
const headers = new Headers(options.headers);
|
|
98
|
-
headers.set("cache-control", cacheControl(options.cachePolicy));
|
|
99
|
-
headers.set("cdn-cache-control", cdnCacheControl(options.cachePolicy));
|
|
100
|
-
headers.set("vercel-cdn-cache-control", cdnCacheControl(options.cachePolicy));
|
|
101
|
-
headers.set("content-type", contentType);
|
|
102
|
-
headers.set("x-content-type-options", "nosniff");
|
|
103
|
-
if (options.noindex) headers.set("x-robots-tag", "noindex");
|
|
104
|
-
return headers;
|
|
105
|
-
}
|
|
106
|
-
function createCachedTextResponse(options) {
|
|
107
|
-
const status = options.status ?? 200;
|
|
108
|
-
const method = options.method ?? "GET";
|
|
109
|
-
const headers = cachedTextHeaders(options.contentType, options);
|
|
110
|
-
return new Response(method === "HEAD" ? null : options.body, {
|
|
111
|
-
headers,
|
|
112
|
-
status
|
|
113
|
-
});
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// src/kernel/routes/metadata/canonical-url.ts
|
|
117
|
-
function canonicalUrl(manifest, path) {
|
|
118
|
-
const origin = manifest.site.url?.replace(/\/+$/, "");
|
|
119
|
-
if (!origin) return path;
|
|
120
|
-
try {
|
|
121
|
-
return new URL(path, `${origin}/`).toString();
|
|
122
|
-
} catch {
|
|
123
|
-
return path;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
// src/kernel/routes/metadata/sitemap.ts
|
|
128
|
-
function xmlEscape(value) {
|
|
129
|
-
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
130
|
-
}
|
|
131
|
-
async function sitemapXml(manifest) {
|
|
132
|
-
"use cache";
|
|
133
|
-
(0, import_cache.cacheLife)("page");
|
|
134
|
-
(0, import_cache.cacheTag)(tags.site(), tags.sitemap(), tags.manifest(manifest.contentHash));
|
|
135
|
-
const urls = [
|
|
136
|
-
"/",
|
|
137
|
-
...Object.values(manifest.groups).map((g) => g.path),
|
|
138
|
-
...manifest.pages.filter((page) => page.status === "published").map((page) => page.path)
|
|
139
|
-
];
|
|
140
|
-
const uniqueUrls = [...new Set(urls)];
|
|
141
|
-
const body = uniqueUrls.map(
|
|
142
|
-
(url) => ` <url><loc>${xmlEscape(canonicalUrl(manifest, url))}</loc></url>`
|
|
143
|
-
).join("\n");
|
|
144
|
-
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
145
|
-
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
|
146
|
-
${body}
|
|
147
|
-
</urlset>
|
|
148
|
-
`;
|
|
149
|
-
}
|
|
150
|
-
function createSitemapXmlRoute(manifest) {
|
|
151
|
-
return async function GET() {
|
|
152
|
-
return createCachedTextResponse({
|
|
153
|
-
body: await sitemapXml(manifest),
|
|
154
|
-
contentType: "application/xml; charset=utf-8"
|
|
155
|
-
});
|
|
156
|
-
};
|
|
157
|
-
}
|
|
158
|
-
async function sitemapMarkdown(manifest, artifactManifest) {
|
|
159
|
-
const groups = Object.values(manifest.groups).sort((a, b) => a.path.localeCompare(b.path)).map(
|
|
160
|
-
(group) => `- [${group.title}](${canonicalUrl(manifest, group.path)})`
|
|
161
|
-
);
|
|
162
|
-
const pages = manifest.pages.filter((page) => page.status === "published").sort((a, b) => a.path.localeCompare(b.path)).map((page) => {
|
|
163
|
-
const markdownPath = artifactManifest.byHtmlPath[page.path];
|
|
164
|
-
const markdown = markdownPath ? ` ([Markdown](${canonicalUrl(manifest, markdownPath)}))` : "";
|
|
165
|
-
return `- [${page.title}](${canonicalUrl(manifest, page.path)})${markdown}`;
|
|
166
|
-
});
|
|
167
|
-
return [
|
|
168
|
-
`# ${manifest.site.name} Sitemap`,
|
|
169
|
-
"## Agent indexes",
|
|
170
|
-
`- [LLMS index](${canonicalUrl(manifest, "/llms.txt")})`,
|
|
171
|
-
`- [Full LLMS index](${canonicalUrl(manifest, "/llms-full.txt")})`,
|
|
172
|
-
`- [XML sitemap](${canonicalUrl(manifest, "/sitemap.xml")})`,
|
|
173
|
-
"## Sections",
|
|
174
|
-
groups.length ? groups.join("\n") : `- [Home](${canonicalUrl(manifest, "/")})`,
|
|
175
|
-
"## Pages",
|
|
176
|
-
pages.length ? pages.join("\n") : `- [Home](${canonicalUrl(manifest, "/")})`,
|
|
177
|
-
""
|
|
178
|
-
].join("\n\n");
|
|
179
|
-
}
|
|
180
|
-
function createSitemapMarkdownRoute(manifest, artifactManifest) {
|
|
181
|
-
return async function GET() {
|
|
182
|
-
return createCachedTextResponse({
|
|
183
|
-
body: await sitemapMarkdown(manifest, artifactManifest),
|
|
184
|
-
contentType: "text/markdown; charset=utf-8"
|
|
185
|
-
});
|
|
186
|
-
};
|
|
187
|
-
}
|
|
188
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
189
|
-
0 && (module.exports = {
|
|
190
|
-
createSitemapMarkdownRoute,
|
|
191
|
-
createSitemapXmlRoute
|
|
192
|
-
});
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ManifestLike } from '../../../types.cjs';
|
|
2
|
-
import { MarkdownRouteArtifactManifest } from '../agent/markdown.cjs';
|
|
3
|
-
import 'react';
|
|
4
|
-
|
|
5
|
-
declare function createSitemapXmlRoute(manifest: ManifestLike): () => Promise<Response>;
|
|
6
|
-
declare function createSitemapMarkdownRoute(manifest: ManifestLike, artifactManifest: MarkdownRouteArtifactManifest): () => Promise<Response>;
|
|
7
|
-
|
|
8
|
-
export { createSitemapMarkdownRoute, createSitemapXmlRoute };
|
|
@@ -1,263 +0,0 @@
|
|
|
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/kernel/routes/pages/group.tsx
|
|
21
|
-
var group_exports = {};
|
|
22
|
-
__export(group_exports, {
|
|
23
|
-
createGroupMetadata: () => createGroupMetadata,
|
|
24
|
-
createGroupPage: () => createGroupPage
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(group_exports);
|
|
27
|
-
var import_cache = require("next/cache");
|
|
28
|
-
var import_navigation = require("next/navigation");
|
|
29
|
-
|
|
30
|
-
// src/cache/tags.ts
|
|
31
|
-
var import_node_crypto = require("crypto");
|
|
32
|
-
var MAX_TAG_LEN = 256;
|
|
33
|
-
var MAX_SEGMENT_LEN = 80;
|
|
34
|
-
var TAG_PATTERN = /^[a-z0-9:_./-]+$/;
|
|
35
|
-
function sha256(value) {
|
|
36
|
-
return (0, import_node_crypto.createHash)("sha256").update(value).digest("hex").slice(0, 16);
|
|
37
|
-
}
|
|
38
|
-
function safeSegment(value) {
|
|
39
|
-
const raw = value.trim().toLowerCase() || "root";
|
|
40
|
-
const normalized = raw.replace(/\\/g, "/").replace(/\/+/g, "/").replace(/^\//, "").replace(/\/$/, "").replace(/[^a-z0-9:_./-]+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
41
|
-
const segment = normalized || "root";
|
|
42
|
-
if (segment.length <= MAX_SEGMENT_LEN) return segment;
|
|
43
|
-
return `${segment.slice(0, 48)}.${sha256(segment)}`;
|
|
44
|
-
}
|
|
45
|
-
function assertTag(tag) {
|
|
46
|
-
if (tag.length > MAX_TAG_LEN || !TAG_PATTERN.test(tag)) {
|
|
47
|
-
return `tag:${sha256(tag)}`;
|
|
48
|
-
}
|
|
49
|
-
return tag;
|
|
50
|
-
}
|
|
51
|
-
var tags = {
|
|
52
|
-
site() {
|
|
53
|
-
return "site";
|
|
54
|
-
},
|
|
55
|
-
pages() {
|
|
56
|
-
return "pages";
|
|
57
|
-
},
|
|
58
|
-
group(group) {
|
|
59
|
-
return assertTag(`group:${safeSegment(group)}`);
|
|
60
|
-
},
|
|
61
|
-
page(group, slug) {
|
|
62
|
-
const path = Array.isArray(slug) ? slug.join("/") : slug;
|
|
63
|
-
return assertTag(`page:${safeSegment(group)}:${safeSegment(path)}`);
|
|
64
|
-
},
|
|
65
|
-
manifest(contentHash) {
|
|
66
|
-
return assertTag(`manifest:${safeSegment(contentHash)}`);
|
|
67
|
-
},
|
|
68
|
-
sitemap() {
|
|
69
|
-
return "sitemap";
|
|
70
|
-
},
|
|
71
|
-
robots() {
|
|
72
|
-
return "robots";
|
|
73
|
-
},
|
|
74
|
-
llms(scope = "root") {
|
|
75
|
-
return assertTag(`llms:${safeSegment(scope)}`);
|
|
76
|
-
},
|
|
77
|
-
feed(format, scope = "site") {
|
|
78
|
-
return assertTag(`feed:${safeSegment(format)}:${safeSegment(scope)}`);
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
// src/internal/utils/logger.ts
|
|
83
|
-
var isDev = process.env.NODE_ENV !== "production";
|
|
84
|
-
var isDebugEnabled = process.env.NEXT_PRIVATE_DEBUG_CACHE === "1";
|
|
85
|
-
var log = {
|
|
86
|
-
debug(...args) {
|
|
87
|
-
if (isDev && isDebugEnabled) console.debug("[publish.os:debug]", ...args);
|
|
88
|
-
},
|
|
89
|
-
info(...args) {
|
|
90
|
-
console.log("[publish.os]", ...args);
|
|
91
|
-
},
|
|
92
|
-
warn(...args) {
|
|
93
|
-
console.warn("[publish.os:warn]", ...args);
|
|
94
|
-
},
|
|
95
|
-
error(...args) {
|
|
96
|
-
console.error("[publish.os:error]", ...args);
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
// src/resolvers/manifest-resolver.ts
|
|
101
|
-
function groupNode(group) {
|
|
102
|
-
return {
|
|
103
|
-
type: "section",
|
|
104
|
-
id: group.key,
|
|
105
|
-
title: group.title,
|
|
106
|
-
path: group.path,
|
|
107
|
-
group: group.key,
|
|
108
|
-
children: group.tree
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
function resolveGroup(manifest, group) {
|
|
112
|
-
const groupData = manifest.groups[group];
|
|
113
|
-
if (!groupData) return null;
|
|
114
|
-
return {
|
|
115
|
-
site: manifest.site,
|
|
116
|
-
tree: groupData.tree,
|
|
117
|
-
node: groupNode(groupData),
|
|
118
|
-
currentPath: groupData.path,
|
|
119
|
-
group
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
// src/kernel/routes/pages/agent-metadata.ts
|
|
124
|
-
function normalizePath(path) {
|
|
125
|
-
const prefixed = path.startsWith("/") ? path : `/${path}`;
|
|
126
|
-
if (prefixed === "/") return prefixed;
|
|
127
|
-
return prefixed.replace(/\/+$/, "");
|
|
128
|
-
}
|
|
129
|
-
function agentReadableAlternates({
|
|
130
|
-
canonicalPath,
|
|
131
|
-
manifest,
|
|
132
|
-
markdownPath
|
|
133
|
-
}) {
|
|
134
|
-
return {
|
|
135
|
-
...manifest.site.url ? { canonical: normalizePath(canonicalPath) } : {},
|
|
136
|
-
types: {
|
|
137
|
-
...markdownPath ? { "text/markdown": normalizePath(markdownPath) } : {},
|
|
138
|
-
"text/plain": "/llms.txt"
|
|
139
|
-
}
|
|
140
|
-
};
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
// src/kernel/routes/pages/social-metadata.ts
|
|
144
|
-
function isDevelopment() {
|
|
145
|
-
return process.env.NODE_ENV === "development";
|
|
146
|
-
}
|
|
147
|
-
function absoluteUrl(path, siteUrl) {
|
|
148
|
-
if (/^https:\/\//.test(path)) return path;
|
|
149
|
-
if (isDevelopment()) return path;
|
|
150
|
-
if (!siteUrl) return path;
|
|
151
|
-
return new URL(path, siteUrl).toString();
|
|
152
|
-
}
|
|
153
|
-
function createSocialMetadata({
|
|
154
|
-
canonicalPath,
|
|
155
|
-
description,
|
|
156
|
-
manifest,
|
|
157
|
-
ogManifest,
|
|
158
|
-
title,
|
|
159
|
-
type = "website"
|
|
160
|
-
}) {
|
|
161
|
-
const key = ogManifest?.routes?.[canonicalPath];
|
|
162
|
-
const rootKey = ogManifest?.routes?.["/"];
|
|
163
|
-
const entry = (key ? ogManifest?.entries?.[key] : void 0) ?? (rootKey ? ogManifest?.entries?.[rootKey] : void 0);
|
|
164
|
-
if (!entry) {
|
|
165
|
-
return {
|
|
166
|
-
openGraph: {
|
|
167
|
-
description,
|
|
168
|
-
title,
|
|
169
|
-
type,
|
|
170
|
-
url: canonicalPath
|
|
171
|
-
},
|
|
172
|
-
twitter: {
|
|
173
|
-
card: "summary",
|
|
174
|
-
description,
|
|
175
|
-
title
|
|
176
|
-
}
|
|
177
|
-
};
|
|
178
|
-
}
|
|
179
|
-
const imageUrl = absoluteUrl(entry.url, manifest.site.url);
|
|
180
|
-
return {
|
|
181
|
-
openGraph: {
|
|
182
|
-
description,
|
|
183
|
-
images: [
|
|
184
|
-
{
|
|
185
|
-
alt: entry.alt,
|
|
186
|
-
height: entry.height,
|
|
187
|
-
url: imageUrl,
|
|
188
|
-
width: entry.width
|
|
189
|
-
}
|
|
190
|
-
],
|
|
191
|
-
siteName: manifest.site.name,
|
|
192
|
-
title,
|
|
193
|
-
type,
|
|
194
|
-
url: canonicalPath
|
|
195
|
-
},
|
|
196
|
-
twitter: {
|
|
197
|
-
card: "summary_large_image",
|
|
198
|
-
description,
|
|
199
|
-
images: [imageUrl],
|
|
200
|
-
title
|
|
201
|
-
}
|
|
202
|
-
};
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
// src/kernel/routes/pages/group.tsx
|
|
206
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
207
|
-
var manifests = /* @__PURE__ */ new Map();
|
|
208
|
-
var indexPages = /* @__PURE__ */ new Map();
|
|
209
|
-
async function CachedGroupPage({ group }) {
|
|
210
|
-
"use cache";
|
|
211
|
-
(0, import_cache.cacheLife)("page");
|
|
212
|
-
(0, import_cache.cacheTag)(tags.site(), tags.group(group));
|
|
213
|
-
const manifest = manifests.get(group);
|
|
214
|
-
const IndexPage = indexPages.get(group);
|
|
215
|
-
if (!manifest || !IndexPage) (0, import_navigation.notFound)();
|
|
216
|
-
(0, import_cache.cacheTag)(tags.manifest(manifest.contentHash));
|
|
217
|
-
log.debug("[cache]", group);
|
|
218
|
-
const resolved = resolveGroup(manifest, group);
|
|
219
|
-
if (!resolved) (0, import_navigation.notFound)();
|
|
220
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(IndexPage, { ...resolved });
|
|
221
|
-
}
|
|
222
|
-
function createGroupPage({
|
|
223
|
-
group,
|
|
224
|
-
manifest,
|
|
225
|
-
IndexPage
|
|
226
|
-
}) {
|
|
227
|
-
manifests.set(group, manifest);
|
|
228
|
-
indexPages.set(group, IndexPage);
|
|
229
|
-
return async function Page() {
|
|
230
|
-
log.debug("[render]", group);
|
|
231
|
-
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CachedGroupPage, { group });
|
|
232
|
-
};
|
|
233
|
-
}
|
|
234
|
-
function createGroupMetadata({
|
|
235
|
-
group,
|
|
236
|
-
manifest,
|
|
237
|
-
ogManifest
|
|
238
|
-
}) {
|
|
239
|
-
const groupData = manifest.groups[group];
|
|
240
|
-
const title = groupData?.title ?? group;
|
|
241
|
-
const description = manifest.site.description;
|
|
242
|
-
const canonicalPath = groupData?.path ?? `/${group}`;
|
|
243
|
-
return {
|
|
244
|
-
title,
|
|
245
|
-
description,
|
|
246
|
-
alternates: groupData ? agentReadableAlternates({
|
|
247
|
-
canonicalPath: groupData.path,
|
|
248
|
-
manifest
|
|
249
|
-
}) : void 0,
|
|
250
|
-
...createSocialMetadata({
|
|
251
|
-
canonicalPath,
|
|
252
|
-
description,
|
|
253
|
-
manifest,
|
|
254
|
-
ogManifest,
|
|
255
|
-
title
|
|
256
|
-
})
|
|
257
|
-
};
|
|
258
|
-
}
|
|
259
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
260
|
-
0 && (module.exports = {
|
|
261
|
-
createGroupMetadata,
|
|
262
|
-
createGroupPage
|
|
263
|
-
});
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { Metadata } from 'next';
|
|
3
|
-
import { ReactElement } from 'react';
|
|
4
|
-
import { ManifestLike, IndexPageProps } from '../../../types.cjs';
|
|
5
|
-
import { OgManifestLike } from '../metadata/og-image.cjs';
|
|
6
|
-
|
|
7
|
-
type IndexPageComponent = (props: IndexPageProps) => ReactElement | Promise<ReactElement>;
|
|
8
|
-
type GroupRouteConfig = {
|
|
9
|
-
group: string;
|
|
10
|
-
manifest: ManifestLike;
|
|
11
|
-
ogManifest?: OgManifestLike;
|
|
12
|
-
IndexPage: IndexPageComponent;
|
|
13
|
-
};
|
|
14
|
-
declare function createGroupPage({ group, manifest, IndexPage, }: GroupRouteConfig): () => Promise<react_jsx_runtime.JSX.Element>;
|
|
15
|
-
declare function createGroupMetadata({ group, manifest, ogManifest, }: GroupRouteConfig): Metadata;
|
|
16
|
-
|
|
17
|
-
export { type GroupRouteConfig, type IndexPageComponent, createGroupMetadata, createGroupPage };
|