@founderhq/next-blog 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,281 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useCallback, useEffect, useMemo, useRef, useState, } from "react";
4
+ import { articlePath, normalizeRoutePrefix } from "./utils.js";
5
+ function cx(...values) {
6
+ return values.filter(Boolean).join(" ");
7
+ }
8
+ function joinPath(base, segment) {
9
+ return `${base.replace(/\/+$/, "")}/${segment.replace(/^\/+/, "")}`;
10
+ }
11
+ const TOC_RAIL = 8;
12
+ function getLineOffset(level) {
13
+ if (level <= 2)
14
+ return TOC_RAIL;
15
+ if (level === 3)
16
+ return TOC_RAIL + 8;
17
+ return TOC_RAIL + 16;
18
+ }
19
+ function getItemOffset(level) {
20
+ if (level <= 2)
21
+ return TOC_RAIL + 12;
22
+ if (level === 3)
23
+ return TOC_RAIL + 24;
24
+ return TOC_RAIL + 36;
25
+ }
26
+ function getScrollParent(element) {
27
+ var _a;
28
+ let node = (_a = element === null || element === void 0 ? void 0 : element.parentElement) !== null && _a !== void 0 ? _a : null;
29
+ while (node) {
30
+ const overflowY = getComputedStyle(node).overflowY;
31
+ if (overflowY === "auto" || overflowY === "scroll")
32
+ return node;
33
+ node = node.parentElement;
34
+ }
35
+ return null;
36
+ }
37
+ function escapeSelectorValue(value) {
38
+ if (typeof CSS !== "undefined" && typeof CSS.escape === "function") {
39
+ return CSS.escape(value);
40
+ }
41
+ return value.replace(/["\\]/g, "\\$&");
42
+ }
43
+ function resolveHeadingElement(id) {
44
+ var _a;
45
+ return ((_a = document.getElementById(id)) !== null && _a !== void 0 ? _a : document.querySelector(`[data-toc-id="${escapeSelectorValue(id)}"]`));
46
+ }
47
+ function defaultTocSelect(item) {
48
+ var _a;
49
+ (_a = resolveHeadingElement(item.id)) === null || _a === void 0 ? void 0 : _a.scrollIntoView({
50
+ block: "start",
51
+ behavior: "smooth",
52
+ });
53
+ }
54
+ export function BlogToc({ items, onSelect = defaultTocSelect, className, }) {
55
+ const containerRef = useRef(null);
56
+ const [rail, setRail] = useState(null);
57
+ const [activeIds, setActiveIds] = useState(() => new Set());
58
+ const measure = useCallback(() => {
59
+ const container = containerRef.current;
60
+ if (!container || container.clientHeight === 0)
61
+ return;
62
+ if (items.length === 0) {
63
+ setRail(null);
64
+ return;
65
+ }
66
+ const rows = container.querySelectorAll("[data-toc-item]");
67
+ let width = 0;
68
+ let height = 0;
69
+ let d = "";
70
+ const positions = [];
71
+ items.forEach((item, index) => {
72
+ const row = rows[index];
73
+ if (!row)
74
+ return;
75
+ const styles = getComputedStyle(row);
76
+ const x = getLineOffset(item.level) + 0.5;
77
+ const top = row.offsetTop + parseFloat(styles.paddingTop);
78
+ const bottom = row.offsetTop + row.clientHeight - parseFloat(styles.paddingBottom);
79
+ width = Math.max(width, x + 8);
80
+ height = Math.max(height, bottom);
81
+ if (positions.length === 0) {
82
+ d += `M${x} ${top} L${x} ${bottom}`;
83
+ }
84
+ else {
85
+ const [, previousBottom, previousX] = positions[positions.length - 1];
86
+ d += ` C ${previousX} ${top - 4} ${x} ${previousBottom + 4} ${x} ${top} L${x} ${bottom}`;
87
+ }
88
+ positions.push([top, bottom, x]);
89
+ });
90
+ setRail({ width, height, d, positions });
91
+ }, [items]);
92
+ const measureRef = useRef(measure);
93
+ useEffect(() => {
94
+ measureRef.current = measure;
95
+ }, [measure]);
96
+ const layoutSignature = useMemo(() => items.map((item) => `${item.id}:${item.level}`).join("/"), [items]);
97
+ useEffect(() => {
98
+ const container = containerRef.current;
99
+ if (!container)
100
+ return;
101
+ const run = () => measureRef.current();
102
+ if (typeof ResizeObserver === "undefined") {
103
+ run();
104
+ return;
105
+ }
106
+ const observer = new ResizeObserver(run);
107
+ observer.observe(container);
108
+ run();
109
+ return () => observer.disconnect();
110
+ }, []);
111
+ useEffect(() => {
112
+ measureRef.current();
113
+ }, [layoutSignature]);
114
+ useEffect(() => {
115
+ const headings = items
116
+ .map((item) => ({ id: item.id, el: resolveHeadingElement(item.id) }))
117
+ .filter((entry) => entry.el !== null);
118
+ const scroller = headings.length > 0 ? getScrollParent(headings[0].el) : null;
119
+ const idByElement = new Map(headings.map((entry) => [entry.el, entry.id]));
120
+ const visible = new Set();
121
+ const recompute = () => {
122
+ if (visible.size > 0) {
123
+ setActiveIds(new Set(visible));
124
+ return;
125
+ }
126
+ const top = scroller ? scroller.getBoundingClientRect().top : 0;
127
+ let nearestId = null;
128
+ let nearestGap = Number.POSITIVE_INFINITY;
129
+ for (const heading of headings) {
130
+ const gap = top - heading.el.getBoundingClientRect().top;
131
+ if (gap >= 0 && gap < nearestGap) {
132
+ nearestGap = gap;
133
+ nearestId = heading.id;
134
+ }
135
+ }
136
+ setActiveIds(nearestId ? new Set([nearestId]) : new Set());
137
+ };
138
+ if (headings.length === 0) {
139
+ recompute();
140
+ return;
141
+ }
142
+ const observer = new IntersectionObserver((entries) => {
143
+ for (const entry of entries) {
144
+ const id = idByElement.get(entry.target);
145
+ if (!id)
146
+ continue;
147
+ if (entry.isIntersecting)
148
+ visible.add(id);
149
+ else
150
+ visible.delete(id);
151
+ }
152
+ recompute();
153
+ }, { root: scroller, threshold: 0 });
154
+ for (const heading of headings)
155
+ observer.observe(heading.el);
156
+ recompute();
157
+ return () => observer.disconnect();
158
+ }, [items]);
159
+ const active = useMemo(() => {
160
+ const useFallback = activeIds.size === 0;
161
+ let start = -1;
162
+ let end = -1;
163
+ items.forEach((item, index) => {
164
+ const on = useFallback ? Boolean(item.isActive) : activeIds.has(item.id);
165
+ if (!on)
166
+ return;
167
+ if (start === -1)
168
+ start = index;
169
+ end = index;
170
+ });
171
+ return { start, end };
172
+ }, [items, activeIds]);
173
+ const activeStart = active.start;
174
+ const activeEnd = active.end;
175
+ useEffect(() => {
176
+ var _a;
177
+ const container = containerRef.current;
178
+ if (!container || activeStart === -1)
179
+ return;
180
+ const scroller = getScrollParent(container);
181
+ if (!scroller || scroller.scrollHeight <= scroller.clientHeight)
182
+ return;
183
+ const rows = container.querySelectorAll("[data-toc-item]");
184
+ const startRow = rows[activeStart];
185
+ const endRow = (_a = rows[activeEnd]) !== null && _a !== void 0 ? _a : startRow;
186
+ if (!startRow)
187
+ return;
188
+ const margin = 36;
189
+ const view = scroller.getBoundingClientRect();
190
+ const top = startRow.getBoundingClientRect().top;
191
+ const bottom = endRow.getBoundingClientRect().bottom;
192
+ if (top < view.top + margin) {
193
+ scroller.scrollTop -= view.top + margin - top;
194
+ }
195
+ else if (bottom > view.bottom - margin) {
196
+ scroller.scrollTop += bottom - (view.bottom - margin);
197
+ }
198
+ }, [activeStart, activeEnd]);
199
+ const hasThumb = rail !== null && active.start !== -1 && rail.positions[active.start] != null;
200
+ const trackTop = hasThumb ? rail.positions[active.start][0] : 0;
201
+ const trackBottom = hasThumb ? rail.positions[active.end][1] : 0;
202
+ if (items.length === 0)
203
+ return null;
204
+ return (_jsxs("div", { ref: containerRef, role: "navigation", className: cx("fhq-blog-toc", className), "aria-label": "Article outline", children: [rail ? (_jsxs("div", { "aria-hidden": true, className: "fhq-blog-toc__rail", style: { width: rail.width, height: rail.height }, children: [_jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: `0 0 ${rail.width} ${rail.height}`, className: "fhq-blog-toc__rail-svg", style: { width: rail.width, height: rail.height }, children: _jsx("path", { d: rail.d, fill: "none", strokeWidth: "1" }) }), _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: `0 0 ${rail.width} ${rail.height}`, className: "fhq-blog-toc__rail-svg fhq-blog-toc__rail-svg--active", style: {
205
+ width: rail.width,
206
+ height: rail.height,
207
+ opacity: hasThumb ? 1 : 0,
208
+ clipPath: `polygon(0 ${trackTop}px, 100% ${trackTop}px, 100% ${trackBottom}px, 0 ${trackBottom}px)`,
209
+ }, children: _jsx("path", { d: rail.d, fill: "none", strokeWidth: "1" }) })] })) : null, items.map((item, index) => {
210
+ var _a;
211
+ return (_jsx("button", { type: "button", "data-toc-item": true, "data-active": index >= active.start && index <= active.end ? "true" : undefined, onClick: () => onSelect(item), style: { paddingInlineStart: getItemOffset(item.level) }, className: "fhq-blog-toc__item", children: _jsx("span", { children: item.text }) }, `${item.id}-${(_a = item.pos) !== null && _a !== void 0 ? _a : index}`));
212
+ })] }));
213
+ }
214
+ export function BlogImage({ image, priority = false, className, }) {
215
+ var _a, _b;
216
+ const style = image.aspectRatio
217
+ ? { aspectRatio: image.aspectRatio }
218
+ : undefined;
219
+ return (_jsxs("figure", { className: cx("fhq-blog-image", className), style: style, children: [_jsx("img", { src: image.url, alt: image.alt, width: (_a = image.width) !== null && _a !== void 0 ? _a : undefined, height: (_b = image.height) !== null && _b !== void 0 ? _b : undefined, loading: priority ? "eager" : "lazy" }), image.caption ? _jsx("figcaption", { children: image.caption }) : null] }));
220
+ }
221
+ export function AuthorByline({ article }) {
222
+ if (!article.author)
223
+ return null;
224
+ return (_jsxs("div", { className: "fhq-blog-byline", children: [article.author.avatar ? (_jsx("img", { src: article.author.avatar.url, alt: "", width: "40", height: "40" })) : null, _jsxs("div", { children: [_jsx("div", { className: "fhq-blog-byline__name", children: article.author.name }), article.author.title ? (_jsx("div", { className: "fhq-blog-byline__title", children: article.author.title })) : null] })] }));
225
+ }
226
+ export function BlogCtaBlock({ cta }) {
227
+ return (_jsxs("aside", { className: cx("fhq-blog-cta", cta.style && `is-${cta.style}`), children: [cta.eyebrow ? _jsx("p", { className: "fhq-blog-eyebrow", children: cta.eyebrow }) : null, _jsx("h2", { children: cta.heading }), cta.body ? _jsx("p", { children: cta.body }) : null, _jsx("a", { href: cta.buttonUrl, children: cta.buttonLabel })] }));
228
+ }
229
+ export function BlogNewsletterForm({ newsletter, onSubmit, }) {
230
+ var _a;
231
+ const [email, setEmail] = useState("");
232
+ const [status, setStatus] = useState("idle");
233
+ async function submit(event) {
234
+ var _a;
235
+ event.preventDefault();
236
+ if (!email.trim())
237
+ return;
238
+ setStatus("submitting");
239
+ try {
240
+ await (onSubmit === null || onSubmit === void 0 ? void 0 : onSubmit(email.trim(), (_a = newsletter.sourceTag) !== null && _a !== void 0 ? _a : null));
241
+ setStatus("done");
242
+ setEmail("");
243
+ }
244
+ catch (_b) {
245
+ setStatus("error");
246
+ }
247
+ }
248
+ return (_jsxs("form", { className: "fhq-blog-newsletter", onSubmit: submit, children: [_jsx("h2", { children: newsletter.heading }), newsletter.body ? _jsx("p", { children: newsletter.body }) : null, _jsxs("div", { className: "fhq-blog-newsletter__row", children: [_jsx("input", { type: "email", value: email, onChange: (event) => setEmail(event.target.value), placeholder: "you@example.com", required: true }), _jsx("button", { type: "submit", disabled: status === "submitting", children: (_a = newsletter.buttonLabel) !== null && _a !== void 0 ? _a : "Subscribe" })] }), status === "done" ? _jsx("p", { children: "You're subscribed." }) : null, status === "error" ? _jsx("p", { children: "Something went wrong." }) : null] }));
249
+ }
250
+ export function BlogArticleLayout({ article, site, children, sidebar, }) {
251
+ var _a, _b;
252
+ const toc = (_a = article.toc) !== null && _a !== void 0 ? _a : [];
253
+ return (_jsx("main", { className: "fhq-blog-article", children: _jsxs("article", { children: [_jsx("a", { className: "fhq-blog-back", href: normalizeRoutePrefix(site.routePrefix), children: "Blog" }), _jsx("h1", { children: article.title }), _jsx(AuthorByline, { article: article }), article.featuredImage ? (_jsx(BlogImage, { image: article.featuredImage, priority: true })) : null, _jsxs("div", { className: "fhq-blog-layout", children: [_jsx("div", { className: "fhq-blog-prose", children: children !== null && children !== void 0 ? children : (_jsx("div", { dangerouslySetInnerHTML: { __html: (_b = article.contentHtml) !== null && _b !== void 0 ? _b : "" } })) }), _jsx("aside", { className: "fhq-blog-sidebar", children: sidebar !== null && sidebar !== void 0 ? sidebar : _jsx(BlogToc, { items: toc }) })] })] }) }));
254
+ }
255
+ export function BlogIndex({ articles, site, className, searchAction, searchInitialQuery, title, description, pagination, }) {
256
+ return (_jsxs("main", { className: cx("fhq-blog-index", className), children: [_jsxs("header", { children: [_jsx("h1", { children: title !== null && title !== void 0 ? title : `${site.siteName} Blog` }), description ? _jsx("p", { children: description }) : null, _jsx(BlogSearchBox, { initialQuery: searchInitialQuery, action: searchAction !== null && searchAction !== void 0 ? searchAction : joinPath(normalizeRoutePrefix(site.routePrefix), "search") })] }), _jsx("div", { className: "fhq-blog-grid", children: articles.map((article) => (_jsxs("article", { className: "fhq-blog-card", children: [article.featuredImage ? _jsx(BlogImage, { image: article.featuredImage }) : null, _jsx("h2", { children: _jsx("a", { href: articlePath(article, site), children: article.title }) }), article.excerpt ? _jsx("p", { children: article.excerpt }) : null] }, article.slug))) }), _jsx(BlogPaginationLinks, { pagination: pagination })] }));
257
+ }
258
+ export function BlogPaginationLinks({ pagination, }) {
259
+ if (!pagination || pagination.totalPages <= 1)
260
+ return null;
261
+ return (_jsxs("nav", { className: "fhq-blog-pagination", "aria-label": "Blog pagination", children: [pagination.prevHref ? _jsx("a", { href: pagination.prevHref, children: "Previous" }) : _jsx("span", {}), _jsxs("span", { children: ["Page ", pagination.page, " of ", pagination.totalPages] }), pagination.nextHref ? _jsx("a", { href: pagination.nextHref, children: "Next" }) : _jsx("span", {})] }));
262
+ }
263
+ export function BlogDirectory({ title, description, items, }) {
264
+ return (_jsxs("main", { className: "fhq-blog-index", children: [_jsxs("header", { children: [_jsx("h1", { children: title }), description ? _jsx("p", { children: description }) : null] }), _jsx("div", { className: "fhq-blog-grid", children: items.map((item) => (_jsxs("article", { className: "fhq-blog-card", children: [item.image ? _jsx(BlogImage, { image: item.image }) : null, _jsx("h2", { children: _jsx("a", { href: item.href, children: item.title }) }), item.description ? _jsx("p", { children: item.description }) : null] }, item.href))) })] }));
265
+ }
266
+ export function BlogSearchBox({ initialQuery = "", action = "/blog/search", onSearch, }) {
267
+ const inputRef = useRef(null);
268
+ const [query, setQuery] = useState(initialQuery);
269
+ const canSubmit = useMemo(() => query.trim().length > 0, [query]);
270
+ return (_jsxs("form", { className: "fhq-blog-search", action: action, method: "get", onSubmit: (event) => {
271
+ if (!canSubmit) {
272
+ event.preventDefault();
273
+ return;
274
+ }
275
+ if (onSearch) {
276
+ event.preventDefault();
277
+ onSearch(query.trim());
278
+ }
279
+ }, children: [_jsx("input", { ref: inputRef, name: "q", type: "search", value: query, onChange: (event) => setQuery(event.target.value), placeholder: "Search articles" }), _jsx("button", { type: "submit", disabled: !canSubmit, children: "Search" })] }));
280
+ }
281
+ //# sourceMappingURL=components.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"components.js","sourceRoot":"","sources":["../src/components.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAIL,WAAW,EACX,SAAS,EACT,OAAO,EACP,MAAM,EACN,QAAQ,GACT,MAAM,OAAO,CAAC;AAUf,OAAO,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAE/D,SAAS,EAAE,CAAC,GAAG,MAAgD;IAC7D,OAAO,MAAM,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC1C,CAAC;AAED,SAAS,QAAQ,CAAC,IAAY,EAAE,OAAe;IAC7C,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,OAAO,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;AACtE,CAAC;AAED,MAAM,QAAQ,GAAG,CAAC,CAAC;AAEnB,SAAS,aAAa,CAAC,KAAa;IAClC,IAAI,KAAK,IAAI,CAAC;QAAE,OAAO,QAAQ,CAAC;IAChC,IAAI,KAAK,KAAK,CAAC;QAAE,OAAO,QAAQ,GAAG,CAAC,CAAC;IACrC,OAAO,QAAQ,GAAG,EAAE,CAAC;AACvB,CAAC;AAED,SAAS,aAAa,CAAC,KAAa;IAClC,IAAI,KAAK,IAAI,CAAC;QAAE,OAAO,QAAQ,GAAG,EAAE,CAAC;IACrC,IAAI,KAAK,KAAK,CAAC;QAAE,OAAO,QAAQ,GAAG,EAAE,C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EjC,IACJ,CACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,3 @@
1
+ export type { BlogArticle, BlogAuthor, BlogCta, BlogImage, BlogListResult, BlogNewsletter, BlogPagination, BlogSite, BlogTaxonomy, BlogTocItem, } from "./types.js";
2
+ export { absoluteUrl, articlePath, articleUrl, authorPath, blogIndexPath, categoryPath, escapeHtml, imageUrl, normalizeRoutePrefix, stripHtml, tagPath, trimSlashes, } from "./utils.js";
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,WAAW,EACX,UAAU,EACV,OAAO,EACP,SAAS,EACT,cAAc,EACd,cAAc,EACd,cAAc,EACd,QAAQ,EACR,YAAY,EACZ,WAAW,GACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,WAAW,EACX,WAAW,EACX,UAAU,EACV,UAAU,EACV,aAAa,EACb,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,oBAAoB,EACpB,SAAS,EACT,OAAO,EACP,WAAW,GACZ,MAAM,YAAY,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export { absoluteUrl, articlePath, articleUrl, authorPath, blogIndexPath, categoryPath, escapeHtml, imageUrl, normalizeRoutePrefix, stripHtml, tagPath, trimSlashes, } from "./utils.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,WAAW,EACX,WAAW,EACX,UAAU,EACV,UAAU,EACV,aAAa,EACb,YAAY,EACZ,UAAU,EACV,QAAQ,EACR,oBAAoB,EACpB,SAAS,EACT,OAAO,EACP,WAAW,GACZ,MAAM,YAAY,CAAC"}
@@ -0,0 +1,6 @@
1
+ export type EditableBlogTemplate = {
2
+ name: "components" | "styles";
3
+ content: string;
4
+ };
5
+ export declare function createEditableBlogTemplates(): EditableBlogTemplate[];
6
+ //# sourceMappingURL=registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,oBAAoB,GAAG;IACjC,IAAI,EAAE,YAAY,GAAG,QAAQ,CAAC;IAC9B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAkBF,wBAAgB,2BAA2B,IAAI,oBAAoB,EAAE,CAWpE"}
@@ -0,0 +1,29 @@
1
+ import { existsSync, readFileSync } from "node:fs";
2
+ import { dirname, join } from "node:path";
3
+ import { fileURLToPath } from "node:url";
4
+ const TEMPLATE_DIR = "templates";
5
+ function readTemplate(filename) {
6
+ const currentDir = dirname(fileURLToPath(import.meta.url));
7
+ const candidates = [
8
+ join(currentDir, TEMPLATE_DIR, filename),
9
+ join(currentDir, "..", "src", TEMPLATE_DIR, filename),
10
+ ];
11
+ for (const candidate of candidates) {
12
+ if (existsSync(candidate))
13
+ return readFileSync(candidate, "utf8");
14
+ }
15
+ throw new Error(`FounderHQ blog template was not found: ${filename}`);
16
+ }
17
+ export function createEditableBlogTemplates() {
18
+ return [
19
+ {
20
+ name: "components",
21
+ content: readTemplate("blog-components.tsx.txt"),
22
+ },
23
+ {
24
+ name: "styles",
25
+ content: readTemplate("blog.css.txt"),
26
+ },
27
+ ];
28
+ }
29
+ //# sourceMappingURL=registry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"registry.js","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAOzC,MAAM,YAAY,GAAG,WAAW,CAAC;AAEjC,SAAS,YAAY,CAAC,QAAgB;IACpC,MAAM,UAAU,GAAG,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAC3D,MAAM,UAAU,GAAG;QACjB,IAAI,CAAC,UAAU,EAAE,YAAY,EAAE,QAAQ,CAAC;QACxC,IAAI,CAAC,UAAU,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,CAAC;KACtD,CAAC;IAEF,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;QACnC,IAAI,UAAU,CAAC,SAAS,CAAC;YAAE,OAAO,YAAY,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IACpE,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,0CAA0C,QAAQ,EAAE,CAAC,CAAC;AACxE,CAAC;AAED,MAAM,UAAU,2BAA2B;IACzC,OAAO;QACL;YACE,IAAI,EAAE,YAAY;YAClB,OAAO,EAAE,YAAY,CAAC,yBAAyB,CAAC;SACjD;QACD;YACE,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,YAAY,CAAC,cAAc,CAAC;SACtC;KACF,CAAC;AACJ,CAAC"}
@@ -0,0 +1,159 @@
1
+ import type { BlogArticle, BlogAuthor, BlogListResult, BlogPagination, BlogSite, BlogTaxonomy } from "./types.js";
2
+ import { absoluteUrl, articlePath, articleUrl, authorPath, blogIndexPath, categoryPath, normalizeRoutePrefix, tagPath } from "./utils.js";
3
+ type JsonRecord = Record<string, unknown>;
4
+ export declare function isIndexableBlogArticle(article: BlogArticle, site: BlogSite): boolean;
5
+ export declare function addHeadingIdsAndExtractToc(html: string): {
6
+ html: string;
7
+ toc: import("./types.js").BlogTocItem[];
8
+ };
9
+ export declare function normalizePayloadBlogAuthor(doc: JsonRecord): BlogAuthor;
10
+ export declare function normalizePayloadBlogTaxonomy(doc: JsonRecord): BlogTaxonomy;
11
+ export declare function normalizePayloadBlogArticle(doc: JsonRecord): BlogArticle;
12
+ export declare function normalizePayloadBlogListResult(result: BlogListResult<JsonRecord>): BlogListResult;
13
+ export declare function paginateBlogArticles(articles: BlogArticle[], page?: number, limit?: number): BlogListResult;
14
+ export declare function buildBlogPagination(params: {
15
+ site: BlogSite;
16
+ page: number;
17
+ totalPages: number;
18
+ totalDocs?: number;
19
+ basePath?: string;
20
+ }): BlogPagination;
21
+ export type BlogMetadata = {
22
+ title: string;
23
+ description: string;
24
+ canonical: string;
25
+ robots: {
26
+ index: boolean;
27
+ follow: boolean;
28
+ googleBot: {
29
+ index: boolean;
30
+ follow: boolean;
31
+ "max-image-preview": "large";
32
+ "max-snippet": -1;
33
+ "max-video-preview": -1;
34
+ };
35
+ };
36
+ openGraph: {
37
+ type: "article";
38
+ url: string;
39
+ siteName: string;
40
+ title: string;
41
+ description: string;
42
+ publishedTime?: string;
43
+ modifiedTime?: string;
44
+ authors?: string[];
45
+ images?: Array<{
46
+ url: string;
47
+ width?: number;
48
+ height?: number;
49
+ alt: string;
50
+ }>;
51
+ };
52
+ twitter: {
53
+ card: "summary_large_image";
54
+ title: string;
55
+ description: string;
56
+ images?: string[];
57
+ };
58
+ };
59
+ export declare function buildArticleMetadata(article: BlogArticle, site: BlogSite): BlogMetadata;
60
+ export declare function buildArticleJsonLd(article: BlogArticle, site: BlogSite): {
61
+ "@context": string;
62
+ "@graph": Record<string, unknown>[];
63
+ };
64
+ export declare function buildRssXml(params: {
65
+ site: BlogSite;
66
+ articles: BlogArticle[];
67
+ title?: string;
68
+ description?: string;
69
+ }): string;
70
+ export type BlogSitemapEntry = {
71
+ url: string;
72
+ lastModified?: string;
73
+ };
74
+ export declare function buildBlogSitemapEntries(site: BlogSite, articles: BlogArticle[]): BlogSitemapEntry[];
75
+ export declare function buildBlogPaginatedSitemapEntries(site: BlogSite, basePath: string, totalDocs?: number, pageSize?: number): BlogSitemapEntry[];
76
+ export declare function buildBlogIndexSitemapEntries(site: BlogSite, totalPages?: number): BlogSitemapEntry[];
77
+ export declare function buildBlogDirectorySitemapEntries(site: BlogSite): BlogSitemapEntry[];
78
+ export declare function buildBlogAuthorSitemapEntries(site: BlogSite, authors: BlogAuthor[]): BlogSitemapEntry[];
79
+ export declare function buildBlogCategorySitemapEntries(site: BlogSite, categories: BlogTaxonomy[]): BlogSitemapEntry[];
80
+ export declare function buildBlogTagSitemapEntries(site: BlogSite, tags: BlogTaxonomy[]): BlogSitemapEntry[];
81
+ export declare function buildSitemapUrlsetXml(entries: BlogSitemapEntry[]): string;
82
+ export declare function buildSitemapIndexXml(entries: BlogSitemapEntry[]): string;
83
+ export declare function buildBlogRobots(site: BlogSite): {
84
+ rules: {
85
+ userAgent: string;
86
+ allow: string;
87
+ };
88
+ sitemap: string;
89
+ };
90
+ export declare function searchBlogArticles(articles: BlogArticle[], query: string, limit?: number): BlogArticle[];
91
+ export type PayloadRestClientOptions = {
92
+ baseUrl: string;
93
+ postsCollection?: string;
94
+ authorsCollection?: string;
95
+ categoriesCollection?: string;
96
+ tagsCollection?: string;
97
+ redirectsCollection?: string;
98
+ fetchImpl?: typeof fetch;
99
+ headers?: HeadersInit;
100
+ };
101
+ export declare function fetchPayloadBlogPosts(options: PayloadRestClientOptions & {
102
+ limit?: number;
103
+ page?: number;
104
+ }): Promise<BlogListResult>;
105
+ export declare function fetchAllPayloadBlogPosts(options: PayloadRestClientOptions & {
106
+ limit?: number;
107
+ }): Promise<{
108
+ docs: BlogArticle[];
109
+ page: number;
110
+ totalDocs: number;
111
+ totalPages: number;
112
+ }>;
113
+ export declare function fetchPayloadBlogAuthors(options: PayloadRestClientOptions & {
114
+ limit?: number;
115
+ }): Promise<{
116
+ docs: BlogAuthor[];
117
+ page: number;
118
+ totalDocs: number;
119
+ totalPages: number;
120
+ }>;
121
+ export declare function fetchPayloadBlogAuthorBySlug(options: PayloadRestClientOptions & {
122
+ slug: string;
123
+ }): Promise<BlogAuthor | null>;
124
+ export declare function fetchPayloadBlogCategories(options: PayloadRestClientOptions & {
125
+ limit?: number;
126
+ }): Promise<{
127
+ docs: BlogTaxonomy[];
128
+ page: number;
129
+ totalDocs: number;
130
+ totalPages: number;
131
+ }>;
132
+ export declare function fetchPayloadBlogCategoryBySlug(options: PayloadRestClientOptions & {
133
+ slug: string;
134
+ }): Promise<BlogTaxonomy | null>;
135
+ export declare function fetchPayloadBlogTags(options: PayloadRestClientOptions & {
136
+ limit?: number;
137
+ }): Promise<{
138
+ docs: BlogTaxonomy[];
139
+ page: number;
140
+ totalDocs: number;
141
+ totalPages: number;
142
+ }>;
143
+ export declare function fetchPayloadBlogTagBySlug(options: PayloadRestClientOptions & {
144
+ slug: string;
145
+ }): Promise<BlogTaxonomy | null>;
146
+ export declare function filterBlogArticlesByAuthor(articles: BlogArticle[], author: Pick<BlogAuthor, "id" | "slug">): BlogArticle[];
147
+ export declare function filterBlogArticlesByCategory(articles: BlogArticle[], category: Pick<BlogTaxonomy, "id" | "slug">): BlogArticle[];
148
+ export declare function filterBlogArticlesByTag(articles: BlogArticle[], tag: Pick<BlogTaxonomy, "id" | "slug">): BlogArticle[];
149
+ export declare function fetchPayloadBlogPostBySlug(options: PayloadRestClientOptions & {
150
+ slug: string;
151
+ }): Promise<BlogArticle | null>;
152
+ export declare function fetchPayloadBlogPostByPreviousSlug(options: PayloadRestClientOptions & {
153
+ slug: string;
154
+ }): Promise<BlogArticle | null>;
155
+ export declare function fetchPayloadBlogRedirect(options: PayloadRestClientOptions & {
156
+ path: string;
157
+ }): Promise<JsonRecord>;
158
+ export { absoluteUrl, articlePath, articleUrl, authorPath, blogIndexPath, categoryPath, normalizeRoutePrefix, tagPath, };
159
+ //# sourceMappingURL=server.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,UAAU,EACV,cAAc,EACd,cAAc,EACd,QAAQ,EACR,YAAY,EACb,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,WAAW,EACX,WAAW,EACX,UAAU,EACV,UAAU,EACV,aAAa,EACb,YAAY,EAIZ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