@publish.os/nextjs 0.0.1-alpha.4 → 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/design-system-preview.js +18 -17
- package/dist/kernel/components/blocks/link-playground.js +3 -3
- package/dist/kernel/components/blocks/logo-block.js +1 -1
- package/dist/kernel/components/blocks/nav-breadcrumb.js +2 -12
- package/dist/kernel/components/blocks/navbar.js +1 -1
- package/dist/kernel/components/blocks/navigation-progress-playground.js +2 -2
- 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/button-group.d.ts +2 -2
- package/dist/kernel/components/ui/button-group.js +2 -3
- package/dist/kernel/components/ui/button.d.ts +3 -4
- package/dist/kernel/components/ui/button.js +4 -12
- package/dist/kernel/components/ui/card.d.ts +1 -1
- 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/tag.d.ts +14 -0
- package/dist/kernel/components/ui/tag.js +76 -0
- package/dist/kernel/components/ui/text.d.ts +1 -1
- package/dist/kernel/components/ui/text.js +109 -106
- package/dist/kernel/components/ui/theme-toggle.js +1 -1
- package/dist/kernel/components/ui/tooltip.js +2 -2
- package/dist/kernel/defaults.registry.d.ts +63 -72
- package/dist/kernel/defaults.registry.js +62 -70
- 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 +4 -9
- package/release/package.json +4 -3
- package/release/release.json +5 -5
- package/release/{pnpm-lock.yaml → runtime-pnpm-lock.yaml} +348 -224
- 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 -592
- 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/badge.cjs +0 -75
- package/dist/kernel/components/ui/badge.d.cts +0 -12
- package/dist/kernel/components/ui/badge.d.ts +0 -12
- package/dist/kernel/components/ui/badge.js +0 -47
- 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 -144
- package/dist/kernel/components/ui/button-group.d.cts +0 -19
- package/dist/kernel/components/ui/button.cjs +0 -147
- package/dist/kernel/components/ui/button.d.cts +0 -23
- 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/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,58 +0,0 @@
|
|
|
1
|
-
type MarkdownRouteArtifact = {
|
|
2
|
-
body: string;
|
|
3
|
-
bodyHash?: string;
|
|
4
|
-
byteSize?: number;
|
|
5
|
-
htmlPath: string;
|
|
6
|
-
image?: string;
|
|
7
|
-
markdownPath: string;
|
|
8
|
-
sourceHash?: string;
|
|
9
|
-
title: string;
|
|
10
|
-
};
|
|
11
|
-
type MarkdownRouteArtifacts = Record<string, MarkdownRouteArtifact>;
|
|
12
|
-
type MarkdownRouteArtifactIndexEntry = Omit<MarkdownRouteArtifact, "body"> & {
|
|
13
|
-
shardId: string;
|
|
14
|
-
};
|
|
15
|
-
type MarkdownRouteArtifactIndex = Record<string, MarkdownRouteArtifactIndexEntry>;
|
|
16
|
-
type MarkdownRouteArtifactShardMetadata = {
|
|
17
|
-
byteSize: number;
|
|
18
|
-
contentHash: string;
|
|
19
|
-
id: string;
|
|
20
|
-
modulePath: string;
|
|
21
|
-
pageCount: number;
|
|
22
|
-
};
|
|
23
|
-
type MarkdownRouteArtifactManifest = {
|
|
24
|
-
byHtmlPath: Record<string, string>;
|
|
25
|
-
byMarkdownPath: MarkdownRouteArtifactIndex;
|
|
26
|
-
shards: MarkdownRouteArtifactShardMetadata[];
|
|
27
|
-
};
|
|
28
|
-
type MarkdownRouteArtifactShard = MarkdownRouteArtifacts;
|
|
29
|
-
type MarkdownRouteArtifactLoader = (artifactPath: string) => Promise<MarkdownRouteArtifact | undefined>;
|
|
30
|
-
type MarkdownRouteHandlerArtifacts = {
|
|
31
|
-
index: MarkdownRouteArtifactIndex;
|
|
32
|
-
loadArtifact: MarkdownRouteArtifactLoader;
|
|
33
|
-
};
|
|
34
|
-
type MarkdownRouteDiscoveryLinks = {
|
|
35
|
-
home?: string;
|
|
36
|
-
llms?: string;
|
|
37
|
-
sitemap?: string;
|
|
38
|
-
};
|
|
39
|
-
type MarkdownRouteHandlerOptions = {
|
|
40
|
-
discoveryLinks?: MarkdownRouteDiscoveryLinks;
|
|
41
|
-
};
|
|
42
|
-
type RouteContext = {
|
|
43
|
-
params?: Promise<{
|
|
44
|
-
path?: string[];
|
|
45
|
-
}> | {
|
|
46
|
-
path?: string[];
|
|
47
|
-
};
|
|
48
|
-
};
|
|
49
|
-
declare function findArtifact(artifacts: MarkdownRouteArtifacts, artifactPath: string): MarkdownRouteArtifact | undefined;
|
|
50
|
-
declare function createMarkdownRouteHandlers(artifacts: MarkdownRouteHandlerArtifacts, options?: MarkdownRouteHandlerOptions): {
|
|
51
|
-
GET: (_request: Request, context: RouteContext) => Promise<Response>;
|
|
52
|
-
HEAD: (_request: Request, context: RouteContext) => Promise<Response>;
|
|
53
|
-
generateStaticParams: () => {
|
|
54
|
-
path: string[];
|
|
55
|
-
}[];
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
export { type MarkdownRouteArtifact, type MarkdownRouteArtifactIndex, type MarkdownRouteArtifactIndexEntry, type MarkdownRouteArtifactLoader, type MarkdownRouteArtifactManifest, type MarkdownRouteArtifactShard, type MarkdownRouteArtifactShardMetadata, type MarkdownRouteArtifacts, type MarkdownRouteDiscoveryLinks, type MarkdownRouteHandlerArtifacts, type MarkdownRouteHandlerOptions, createMarkdownRouteHandlers, findArtifact };
|
|
@@ -1,181 +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/layouts/group.tsx
|
|
21
|
-
var group_exports = {};
|
|
22
|
-
__export(group_exports, {
|
|
23
|
-
createGroupLayout: () => createGroupLayout
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(group_exports);
|
|
26
|
-
var import_cache = require("next/cache");
|
|
27
|
-
var import_navigation = require("next/navigation");
|
|
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/internal/utils/logger.ts
|
|
82
|
-
var isDev = process.env.NODE_ENV !== "production";
|
|
83
|
-
var isDebugEnabled = process.env.NEXT_PRIVATE_DEBUG_CACHE === "1";
|
|
84
|
-
var log = {
|
|
85
|
-
debug(...args) {
|
|
86
|
-
if (isDev && isDebugEnabled) console.debug("[publish.os:debug]", ...args);
|
|
87
|
-
},
|
|
88
|
-
info(...args) {
|
|
89
|
-
console.log("[publish.os]", ...args);
|
|
90
|
-
},
|
|
91
|
-
warn(...args) {
|
|
92
|
-
console.warn("[publish.os:warn]", ...args);
|
|
93
|
-
},
|
|
94
|
-
error(...args) {
|
|
95
|
-
console.error("[publish.os:error]", ...args);
|
|
96
|
-
}
|
|
97
|
-
};
|
|
98
|
-
|
|
99
|
-
// src/resolvers/manifest-resolver.ts
|
|
100
|
-
function groupNode(group) {
|
|
101
|
-
return {
|
|
102
|
-
type: "section",
|
|
103
|
-
id: group.key,
|
|
104
|
-
title: group.title,
|
|
105
|
-
path: group.path,
|
|
106
|
-
group: group.key,
|
|
107
|
-
children: group.tree
|
|
108
|
-
};
|
|
109
|
-
}
|
|
110
|
-
function resolveGroup(manifest, group) {
|
|
111
|
-
const groupData = manifest.groups[group];
|
|
112
|
-
if (!groupData) return null;
|
|
113
|
-
return {
|
|
114
|
-
site: manifest.site,
|
|
115
|
-
tree: groupData.tree,
|
|
116
|
-
node: groupNode(groupData),
|
|
117
|
-
currentPath: groupData.path,
|
|
118
|
-
group
|
|
119
|
-
};
|
|
120
|
-
}
|
|
121
|
-
function resolveGroupLayout(manifest, group, children) {
|
|
122
|
-
const resolved = resolveGroup(manifest, group);
|
|
123
|
-
if (!resolved) return null;
|
|
124
|
-
return { ...resolved, children };
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
// src/kernel/routes/layouts/group.tsx
|
|
128
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
129
|
-
var manifests = /* @__PURE__ */ new Map();
|
|
130
|
-
var layoutChains = /* @__PURE__ */ new Map();
|
|
131
|
-
async function CachedGroupLayoutData({
|
|
132
|
-
routeGroup,
|
|
133
|
-
layoutGroup
|
|
134
|
-
}) {
|
|
135
|
-
"use cache";
|
|
136
|
-
(0, import_cache.cacheLife)("page");
|
|
137
|
-
(0, import_cache.cacheTag)(tags.site(), tags.group(layoutGroup));
|
|
138
|
-
const manifest = manifests.get(routeGroup);
|
|
139
|
-
if (!manifest) (0, import_navigation.notFound)();
|
|
140
|
-
(0, import_cache.cacheTag)(tags.manifest(manifest.contentHash));
|
|
141
|
-
log.debug("[cache]", `${routeGroup}/layout:${layoutGroup}`);
|
|
142
|
-
const resolved = resolveGroupLayout(manifest, layoutGroup, null);
|
|
143
|
-
if (!resolved) (0, import_navigation.notFound)();
|
|
144
|
-
return resolved;
|
|
145
|
-
}
|
|
146
|
-
function createGroupLayout({
|
|
147
|
-
group,
|
|
148
|
-
manifest,
|
|
149
|
-
layouts
|
|
150
|
-
}) {
|
|
151
|
-
manifests.set(group, manifest);
|
|
152
|
-
layoutChains.set(group, layouts);
|
|
153
|
-
return async function GroupLayout({ children }) {
|
|
154
|
-
log.debug("[render]", `${group}/layout`);
|
|
155
|
-
const chain = layoutChains.get(group);
|
|
156
|
-
if (!chain?.length) (0, import_navigation.notFound)();
|
|
157
|
-
const resolvedLayouts = await Promise.all(
|
|
158
|
-
chain.map(async (item) => ({
|
|
159
|
-
item,
|
|
160
|
-
props: await CachedGroupLayoutData({
|
|
161
|
-
layoutGroup: item.group,
|
|
162
|
-
routeGroup: group
|
|
163
|
-
})
|
|
164
|
-
}))
|
|
165
|
-
);
|
|
166
|
-
let output = children;
|
|
167
|
-
for (let index = resolvedLayouts.length - 1; index >= 0; index -= 1) {
|
|
168
|
-
const resolvedLayout = resolvedLayouts[index];
|
|
169
|
-
if (resolvedLayout) {
|
|
170
|
-
const Layout = resolvedLayout.item.Layout;
|
|
171
|
-
const fontClassName = resolvedLayout.item.fontClassName;
|
|
172
|
-
output = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Layout, { ...resolvedLayout.props, children: fontClassName ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: fontClassName, children: output }) : output });
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
return output;
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
179
|
-
0 && (module.exports = {
|
|
180
|
-
createGroupLayout
|
|
181
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as react from 'react';
|
|
2
|
-
import { ReactElement, ReactNode } from 'react';
|
|
3
|
-
import { ManifestLike, LayoutProps } from '../../../types.cjs';
|
|
4
|
-
|
|
5
|
-
type LayoutComponent = (props: LayoutProps) => ReactElement | Promise<ReactElement>;
|
|
6
|
-
type GroupLayoutConfig = {
|
|
7
|
-
group: string;
|
|
8
|
-
manifest: ManifestLike;
|
|
9
|
-
layouts: readonly LayoutChainItem[];
|
|
10
|
-
};
|
|
11
|
-
type LayoutChainItem = {
|
|
12
|
-
group: string;
|
|
13
|
-
fontClassName?: string;
|
|
14
|
-
Layout: LayoutComponent;
|
|
15
|
-
};
|
|
16
|
-
declare function createGroupLayout({ group, manifest, layouts, }: GroupLayoutConfig): ({ children }: {
|
|
17
|
-
children: ReactNode;
|
|
18
|
-
}) => Promise<ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | (string | number | bigint | boolean | react.ReactPortal | ReactElement<unknown, string | react.JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined)>;
|
|
19
|
-
|
|
20
|
-
export { type GroupLayoutConfig, type LayoutChainItem, type LayoutComponent, createGroupLayout };
|
|
@@ -1,293 +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/feed.ts
|
|
21
|
-
var feed_exports = {};
|
|
22
|
-
__export(feed_exports, {
|
|
23
|
-
createAtomFeedRoute: () => createAtomFeedRoute,
|
|
24
|
-
createJsonFeedRoute: () => createJsonFeedRoute,
|
|
25
|
-
createPrecomputedFeedRoute: () => createPrecomputedFeedRoute,
|
|
26
|
-
createRssFeedRoute: () => createRssFeedRoute
|
|
27
|
-
});
|
|
28
|
-
module.exports = __toCommonJS(feed_exports);
|
|
29
|
-
var import_cache = require("next/cache");
|
|
30
|
-
|
|
31
|
-
// src/cache/tags.ts
|
|
32
|
-
var import_node_crypto = require("crypto");
|
|
33
|
-
var MAX_TAG_LEN = 256;
|
|
34
|
-
var MAX_SEGMENT_LEN = 80;
|
|
35
|
-
var TAG_PATTERN = /^[a-z0-9:_./-]+$/;
|
|
36
|
-
function sha256(value) {
|
|
37
|
-
return (0, import_node_crypto.createHash)("sha256").update(value).digest("hex").slice(0, 16);
|
|
38
|
-
}
|
|
39
|
-
function safeSegment(value) {
|
|
40
|
-
const raw = value.trim().toLowerCase() || "root";
|
|
41
|
-
const normalized = raw.replace(/\\/g, "/").replace(/\/+/g, "/").replace(/^\//, "").replace(/\/$/, "").replace(/[^a-z0-9:_./-]+/g, "-").replace(/-+/g, "-").replace(/^-|-$/g, "");
|
|
42
|
-
const segment = normalized || "root";
|
|
43
|
-
if (segment.length <= MAX_SEGMENT_LEN) return segment;
|
|
44
|
-
return `${segment.slice(0, 48)}.${sha256(segment)}`;
|
|
45
|
-
}
|
|
46
|
-
function assertTag(tag) {
|
|
47
|
-
if (tag.length > MAX_TAG_LEN || !TAG_PATTERN.test(tag)) {
|
|
48
|
-
return `tag:${sha256(tag)}`;
|
|
49
|
-
}
|
|
50
|
-
return tag;
|
|
51
|
-
}
|
|
52
|
-
var tags = {
|
|
53
|
-
site() {
|
|
54
|
-
return "site";
|
|
55
|
-
},
|
|
56
|
-
pages() {
|
|
57
|
-
return "pages";
|
|
58
|
-
},
|
|
59
|
-
group(group) {
|
|
60
|
-
return assertTag(`group:${safeSegment(group)}`);
|
|
61
|
-
},
|
|
62
|
-
page(group, slug) {
|
|
63
|
-
const path = Array.isArray(slug) ? slug.join("/") : slug;
|
|
64
|
-
return assertTag(`page:${safeSegment(group)}:${safeSegment(path)}`);
|
|
65
|
-
},
|
|
66
|
-
manifest(contentHash) {
|
|
67
|
-
return assertTag(`manifest:${safeSegment(contentHash)}`);
|
|
68
|
-
},
|
|
69
|
-
sitemap() {
|
|
70
|
-
return "sitemap";
|
|
71
|
-
},
|
|
72
|
-
robots() {
|
|
73
|
-
return "robots";
|
|
74
|
-
},
|
|
75
|
-
llms(scope = "root") {
|
|
76
|
-
return assertTag(`llms:${safeSegment(scope)}`);
|
|
77
|
-
},
|
|
78
|
-
feed(format, scope = "site") {
|
|
79
|
-
return assertTag(`feed:${safeSegment(format)}:${safeSegment(scope)}`);
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
|
|
83
|
-
// src/kernel/routes/response.ts
|
|
84
|
-
var CACHE_CONTROL = "public, max-age=300, s-maxage=86400, stale-while-revalidate=3600, must-revalidate";
|
|
85
|
-
var CDN_CACHE_CONTROL = "public, max-age=2592000, stale-while-revalidate=31536000";
|
|
86
|
-
var SHORT_CACHE_CONTROL = "public, max-age=60, s-maxage=600, stale-while-revalidate=300, must-revalidate";
|
|
87
|
-
var SHORT_CDN_CACHE_CONTROL = "public, max-age=300, stale-while-revalidate=3600";
|
|
88
|
-
function cacheControl(policy) {
|
|
89
|
-
if (!policy || policy === "default") return CACHE_CONTROL;
|
|
90
|
-
if (policy === "short") return SHORT_CACHE_CONTROL;
|
|
91
|
-
return policy;
|
|
92
|
-
}
|
|
93
|
-
function cdnCacheControl(policy) {
|
|
94
|
-
if (!policy || policy === "default") return CDN_CACHE_CONTROL;
|
|
95
|
-
if (policy === "short") return SHORT_CDN_CACHE_CONTROL;
|
|
96
|
-
return policy;
|
|
97
|
-
}
|
|
98
|
-
function cachedTextHeaders(contentType, options = {}) {
|
|
99
|
-
const headers = new Headers(options.headers);
|
|
100
|
-
headers.set("cache-control", cacheControl(options.cachePolicy));
|
|
101
|
-
headers.set("cdn-cache-control", cdnCacheControl(options.cachePolicy));
|
|
102
|
-
headers.set("vercel-cdn-cache-control", cdnCacheControl(options.cachePolicy));
|
|
103
|
-
headers.set("content-type", contentType);
|
|
104
|
-
headers.set("x-content-type-options", "nosniff");
|
|
105
|
-
if (options.noindex) headers.set("x-robots-tag", "noindex");
|
|
106
|
-
return headers;
|
|
107
|
-
}
|
|
108
|
-
function createCachedTextResponse(options) {
|
|
109
|
-
const status = options.status ?? 200;
|
|
110
|
-
const method = options.method ?? "GET";
|
|
111
|
-
const headers = cachedTextHeaders(options.contentType, options);
|
|
112
|
-
return new Response(method === "HEAD" ? null : options.body, {
|
|
113
|
-
headers,
|
|
114
|
-
status
|
|
115
|
-
});
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
// src/kernel/routes/metadata/canonical-url.ts
|
|
119
|
-
function canonicalUrl(manifest, path) {
|
|
120
|
-
const origin = manifest.site.url?.replace(/\/+$/, "");
|
|
121
|
-
if (!origin) return path;
|
|
122
|
-
try {
|
|
123
|
-
return new URL(path, `${origin}/`).toString();
|
|
124
|
-
} catch {
|
|
125
|
-
return path;
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
// src/kernel/routes/metadata/feed.ts
|
|
130
|
-
function xmlEscape(value) {
|
|
131
|
-
return value.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """).replace(/'/g, "'");
|
|
132
|
-
}
|
|
133
|
-
function pageTimestamp(page) {
|
|
134
|
-
const value = page.publishedAt ?? page.updatedAt;
|
|
135
|
-
if (!value) return -Infinity;
|
|
136
|
-
const timestamp = Date.parse(value);
|
|
137
|
-
return Number.isNaN(timestamp) ? -Infinity : timestamp;
|
|
138
|
-
}
|
|
139
|
-
function pageInScope(page, options) {
|
|
140
|
-
if (options.scope === "site" || !options.group) return true;
|
|
141
|
-
if (options.scope === "self") return page.group === options.group;
|
|
142
|
-
return page.group === options.group || page.group.startsWith(`${options.group}/`);
|
|
143
|
-
}
|
|
144
|
-
function feedPages(manifest, options) {
|
|
145
|
-
const statuses = options.status ?? ["published"];
|
|
146
|
-
const pages = manifest.pages.filter((page) => statuses.includes(page.status)).filter((page) => pageInScope(page, options)).sort((a, b) => pageTimestamp(b) - pageTimestamp(a));
|
|
147
|
-
return options.limit ? pages.slice(0, options.limit) : pages;
|
|
148
|
-
}
|
|
149
|
-
async function rssXml(manifest, options = {}) {
|
|
150
|
-
"use cache";
|
|
151
|
-
(0, import_cache.cacheLife)("page");
|
|
152
|
-
(0, import_cache.cacheTag)(
|
|
153
|
-
tags.site(),
|
|
154
|
-
tags.feed("rss", options.group ?? options.scope ?? "site"),
|
|
155
|
-
tags.manifest(manifest.contentHash)
|
|
156
|
-
);
|
|
157
|
-
const title = manifest.site.name;
|
|
158
|
-
const description = manifest.site.description ?? title;
|
|
159
|
-
const pages = feedPages(manifest, options);
|
|
160
|
-
const homeUrl = canonicalUrl(manifest, "/");
|
|
161
|
-
const items = pages.map((page) => {
|
|
162
|
-
const pageUrl = canonicalUrl(manifest, page.path);
|
|
163
|
-
const pubDate = page.publishedAt ? `
|
|
164
|
-
<pubDate>${xmlEscape(new Date(page.publishedAt).toUTCString())}</pubDate>` : "";
|
|
165
|
-
const description2 = page.description ? `
|
|
166
|
-
<description>${xmlEscape(page.description)}</description>` : "";
|
|
167
|
-
return ` <item>
|
|
168
|
-
<title>${xmlEscape(page.title)}</title>
|
|
169
|
-
<link>${xmlEscape(pageUrl)}</link>
|
|
170
|
-
<guid>${xmlEscape(pageUrl)}</guid>${pubDate}${description2}
|
|
171
|
-
</item>`;
|
|
172
|
-
}).join("\n");
|
|
173
|
-
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
174
|
-
<rss version="2.0">
|
|
175
|
-
<channel>
|
|
176
|
-
<title>${xmlEscape(title)}</title>
|
|
177
|
-
<link>${xmlEscape(homeUrl)}</link>
|
|
178
|
-
<description>${xmlEscape(description)}</description>
|
|
179
|
-
${items}
|
|
180
|
-
</channel>
|
|
181
|
-
</rss>
|
|
182
|
-
`;
|
|
183
|
-
}
|
|
184
|
-
function pageDate(page) {
|
|
185
|
-
return page.publishedAt ?? page.updatedAt;
|
|
186
|
-
}
|
|
187
|
-
function latestFeedDate(pages) {
|
|
188
|
-
const timestamp = Math.max(0, ...pages.map((page) => pageTimestamp(page)));
|
|
189
|
-
return new Date(timestamp).toISOString();
|
|
190
|
-
}
|
|
191
|
-
async function atomXml(manifest, options = {}) {
|
|
192
|
-
"use cache";
|
|
193
|
-
(0, import_cache.cacheLife)("page");
|
|
194
|
-
(0, import_cache.cacheTag)(
|
|
195
|
-
tags.site(),
|
|
196
|
-
tags.feed("atom", options.group ?? options.scope ?? "site"),
|
|
197
|
-
tags.manifest(manifest.contentHash)
|
|
198
|
-
);
|
|
199
|
-
const title = manifest.site.name;
|
|
200
|
-
const pages = feedPages(manifest, options);
|
|
201
|
-
const homeUrl = canonicalUrl(manifest, "/");
|
|
202
|
-
const entries = pages.map((page) => {
|
|
203
|
-
const date = pageDate(page);
|
|
204
|
-
const updated = date ? new Date(date).toISOString() : latestFeedDate([]);
|
|
205
|
-
const pageUrl = canonicalUrl(manifest, page.path);
|
|
206
|
-
const summary = page.description ? `
|
|
207
|
-
<summary>${xmlEscape(page.description)}</summary>` : "";
|
|
208
|
-
return ` <entry>
|
|
209
|
-
<title>${xmlEscape(page.title)}</title>
|
|
210
|
-
<id>${xmlEscape(pageUrl)}</id>
|
|
211
|
-
<link href="${xmlEscape(pageUrl)}" />
|
|
212
|
-
<updated>${xmlEscape(updated)}</updated>${summary}
|
|
213
|
-
</entry>`;
|
|
214
|
-
}).join("\n");
|
|
215
|
-
return `<?xml version="1.0" encoding="UTF-8"?>
|
|
216
|
-
<feed xmlns="http://www.w3.org/2005/Atom">
|
|
217
|
-
<title>${xmlEscape(title)}</title>
|
|
218
|
-
<id>${xmlEscape(homeUrl)}</id>
|
|
219
|
-
<updated>${xmlEscape(latestFeedDate(pages))}</updated>
|
|
220
|
-
${entries}
|
|
221
|
-
</feed>
|
|
222
|
-
`;
|
|
223
|
-
}
|
|
224
|
-
async function jsonFeed(manifest, options = {}) {
|
|
225
|
-
"use cache";
|
|
226
|
-
(0, import_cache.cacheLife)("page");
|
|
227
|
-
(0, import_cache.cacheTag)(
|
|
228
|
-
tags.site(),
|
|
229
|
-
tags.feed("json", options.group ?? options.scope ?? "site"),
|
|
230
|
-
tags.manifest(manifest.contentHash)
|
|
231
|
-
);
|
|
232
|
-
const pages = feedPages(manifest, options);
|
|
233
|
-
return `${JSON.stringify(
|
|
234
|
-
{
|
|
235
|
-
version: "https://jsonfeed.org/version/1.1",
|
|
236
|
-
title: manifest.site.name,
|
|
237
|
-
description: manifest.site.description,
|
|
238
|
-
home_page_url: canonicalUrl(manifest, "/"),
|
|
239
|
-
items: pages.map((page) => ({
|
|
240
|
-
id: canonicalUrl(manifest, page.path),
|
|
241
|
-
url: canonicalUrl(manifest, page.path),
|
|
242
|
-
title: page.title,
|
|
243
|
-
summary: page.description,
|
|
244
|
-
content_text: page.body,
|
|
245
|
-
date_published: page.publishedAt,
|
|
246
|
-
date_modified: page.updatedAt,
|
|
247
|
-
tags: page.tags
|
|
248
|
-
}))
|
|
249
|
-
},
|
|
250
|
-
null,
|
|
251
|
-
2
|
|
252
|
-
)}
|
|
253
|
-
`;
|
|
254
|
-
}
|
|
255
|
-
function createRssFeedRoute(manifest, options = {}) {
|
|
256
|
-
return async function GET() {
|
|
257
|
-
return createCachedTextResponse({
|
|
258
|
-
body: await rssXml(manifest, options),
|
|
259
|
-
contentType: "application/rss+xml; charset=utf-8"
|
|
260
|
-
});
|
|
261
|
-
};
|
|
262
|
-
}
|
|
263
|
-
function createAtomFeedRoute(manifest, options = {}) {
|
|
264
|
-
return async function GET() {
|
|
265
|
-
return createCachedTextResponse({
|
|
266
|
-
body: await atomXml(manifest, options),
|
|
267
|
-
contentType: "application/atom+xml; charset=utf-8"
|
|
268
|
-
});
|
|
269
|
-
};
|
|
270
|
-
}
|
|
271
|
-
function createJsonFeedRoute(manifest, options = {}) {
|
|
272
|
-
return async function GET() {
|
|
273
|
-
return createCachedTextResponse({
|
|
274
|
-
body: await jsonFeed(manifest, options),
|
|
275
|
-
contentType: "application/feed+json; charset=utf-8"
|
|
276
|
-
});
|
|
277
|
-
};
|
|
278
|
-
}
|
|
279
|
-
function createPrecomputedFeedRoute(output) {
|
|
280
|
-
return function GET() {
|
|
281
|
-
return createCachedTextResponse({
|
|
282
|
-
body: output.body,
|
|
283
|
-
contentType: output.contentType
|
|
284
|
-
});
|
|
285
|
-
};
|
|
286
|
-
}
|
|
287
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
288
|
-
0 && (module.exports = {
|
|
289
|
-
createAtomFeedRoute,
|
|
290
|
-
createJsonFeedRoute,
|
|
291
|
-
createPrecomputedFeedRoute,
|
|
292
|
-
createRssFeedRoute
|
|
293
|
-
});
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { ManifestLike, PageStatus } from '../../../types.cjs';
|
|
2
|
-
import 'react';
|
|
3
|
-
|
|
4
|
-
type FeedScope = "site" | "group" | "self";
|
|
5
|
-
type FeedRouteOptions = {
|
|
6
|
-
scope?: FeedScope;
|
|
7
|
-
group?: string;
|
|
8
|
-
limit?: number;
|
|
9
|
-
status?: PageStatus[];
|
|
10
|
-
};
|
|
11
|
-
type PrecomputedFeedOutput = {
|
|
12
|
-
body: string;
|
|
13
|
-
contentType: string;
|
|
14
|
-
};
|
|
15
|
-
declare function createRssFeedRoute(manifest: ManifestLike, options?: FeedRouteOptions): () => Promise<Response>;
|
|
16
|
-
declare function createAtomFeedRoute(manifest: ManifestLike, options?: FeedRouteOptions): () => Promise<Response>;
|
|
17
|
-
declare function createJsonFeedRoute(manifest: ManifestLike, options?: FeedRouteOptions): () => Promise<Response>;
|
|
18
|
-
declare function createPrecomputedFeedRoute(output: PrecomputedFeedOutput): () => Response;
|
|
19
|
-
|
|
20
|
-
export { type FeedRouteOptions, type FeedScope, type PrecomputedFeedOutput, createAtomFeedRoute, createJsonFeedRoute, createPrecomputedFeedRoute, createRssFeedRoute };
|