@cedros/data-react 0.1.7 → 0.1.8

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.
Files changed (33) hide show
  1. package/dist/docsContract.d.ts +56 -0
  2. package/dist/docsContract.js +136 -0
  3. package/dist/react/docs.d.ts +14 -0
  4. package/dist/react/docs.js +207 -0
  5. package/dist/react/index.d.ts +2 -1
  6. package/dist/react/index.js +1 -0
  7. package/dist/react/server.d.ts +2 -1
  8. package/dist/react/server.js +1 -0
  9. package/dist/react/types.d.ts +17 -0
  10. package/dist/site-templates/BlogTemplates.js +16 -12
  11. package/dist/site-templates/DocsSidebar.d.ts +1 -1
  12. package/dist/site-templates/DocsSidebar.js +2 -2
  13. package/dist/site-templates/DocsTemplates.js +13 -14
  14. package/dist/site-templates/SiteFooter.js +1 -1
  15. package/dist/site-templates/SiteLayout.js +1 -1
  16. package/dist/site-templates/TopNav.js +1 -1
  17. package/dist/site-templates/blog-styles.css +259 -0
  18. package/dist/site-templates/blogControls.js +2 -2
  19. package/dist/site-templates/blogTemplateUi.d.ts +10 -0
  20. package/dist/site-templates/blogTemplateUi.js +4 -0
  21. package/dist/site-templates/content-styles.css +127 -309
  22. package/dist/site-templates/contentIndex.d.ts +4 -11
  23. package/dist/site-templates/contentIndex.js +10 -0
  24. package/dist/site-templates/contentUi.js +4 -3
  25. package/dist/site-templates/dashboard-styles.css +109 -0
  26. package/dist/site-templates/docs-layout.css +372 -0
  27. package/dist/site-templates/docs-styles.css +288 -96
  28. package/dist/site-templates/docsNavigation.d.ts +23 -3
  29. package/dist/site-templates/docsNavigation.js +178 -75
  30. package/dist/site-templates/index.d.ts +2 -1
  31. package/dist/site-templates/index.js +2 -1
  32. package/dist/site-templates/styles.css +283 -201
  33. package/package.json +1 -1
@@ -1,7 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { normalizeDocsHref } from "../docsContract.js";
2
3
  import { buildContentListHref, collectFilterValues, prepareDocsIndex } from "./contentIndex.js";
3
4
  import { Breadcrumbs, ContentPagination } from "./contentUi.js";
4
- import { buildHierarchicalDocsSidebarSections, buildDocsSidebarSections, withActiveDocsSidebar } from "./docsNavigation.js";
5
+ import { buildDocsNavigation, buildDocsSidebarSections, withActiveDocsSidebar } from "./docsNavigation.js";
5
6
  import { DocsSidebar } from "./DocsSidebar.js";
6
7
  import { renderDocsTemplateShell } from "./docsTemplateShell.js";
7
8
  import { MarkdownContent } from "./MarkdownContent.js";
@@ -11,7 +12,9 @@ export function DocsIndexTemplate({ siteTitle, navigation, docs, title = "Docume
11
12
  const resolvedCategories = categories ?? normalizedFilters.categories;
12
13
  const resolvedTags = tags ?? normalizedFilters.tags;
13
14
  const activePath = currentPath ?? basePath;
14
- const resolvedSidebarSections = withActiveDocsSidebar(sidebarSections ?? buildDefaultDocsSidebarSections(docs, basePath), activePath);
15
+ const resolvedSidebarSections = withActiveDocsSidebar(sidebarSections ?? buildDefaultDocsSidebarSections(docs, basePath, activePath), activePath);
16
+ const categoryCount = resolvedCategories.length;
17
+ const tagCount = resolvedTags.length;
15
18
  const result = prepareDocsIndex(docs, {
16
19
  query,
17
20
  category,
@@ -20,14 +23,12 @@ export function DocsIndexTemplate({ siteTitle, navigation, docs, title = "Docume
20
23
  page,
21
24
  pageSize
22
25
  });
23
- return renderDocsTemplateShell((_jsxs("section", { className: "cedros-site__docs-page", children: [_jsx(DocsSidebar, { title: sidebarTitle, basePath: basePath, searchQuery: query, sections: resolvedSidebarSections }), _jsxs("div", { className: "cedros-site__docs-main", children: [_jsxs("section", { className: "cedros-site__card", children: [_jsx("span", { className: "cedros-site__pill", children: "docs" }), _jsx("h1", { className: "cedros-site__title", style: { marginTop: "0.6rem" }, children: title }), description && _jsx("p", { className: "cedros-site__subtitle", children: description }), _jsxs("p", { className: "cedros-site__entry-meta", style: { marginTop: "0.6rem" }, children: [result.totalItems, " results"] })] }), _jsx(DocsIndexControls, { basePath: basePath, query: query, category: category, tag: tag, sort: sort, categories: resolvedCategories, tags: resolvedTags }), result.totalItems === 0 && (_jsxs("section", { className: "cedros-site__card cedros-site__empty-state", children: [_jsx("h2", { className: "cedros-site__title", style: { fontSize: "1.25rem" }, children: "No documentation pages found" }), _jsx("p", { className: "cedros-site__subtitle", style: { marginTop: "0.6rem" }, children: "Try a broader query or clear filters." })] })), result.totalItems > 0 && (_jsxs(_Fragment, { children: [_jsx("section", { className: "cedros-site__content-grid cedros-site__content-grid--docs", children: result.items.map((doc) => (_jsxs("article", { className: "cedros-site__card cedros-site__entry-card", children: [_jsx("h2", { className: "cedros-site__entry-title", children: _jsx("a", { href: `${basePath}/${doc.slug}`, children: doc.title }) }), doc.description && _jsx("p", { className: "cedros-site__subtitle", children: doc.description }), (doc.lastUpdated || doc.category) && (_jsx("p", { className: "cedros-site__entry-meta", children: [doc.category, doc.lastUpdated ? `Updated ${doc.lastUpdated}` : ""]
24
- .filter(Boolean)
25
- .join(" • ") })), doc.tags && doc.tags.length > 0 && (_jsx("div", { className: "cedros-site__tag-list", children: doc.tags.map((entryTag) => (_jsx("a", { href: buildContentListHref(basePath, {
26
+ return renderDocsTemplateShell((_jsxs("section", { className: "cedros-site__docs-page", children: [_jsx(DocsSidebar, { title: sidebarTitle, basePath: basePath, searchQuery: query, sections: resolvedSidebarSections }), _jsxs("div", { className: "cedros-site__docs-main", children: [_jsxs("section", { className: "cedros-site__card cedros-site__docs-hero", children: [_jsxs("div", { className: "cedros-site__docs-hero-copy", children: [_jsx("span", { className: "cedros-site__pill cedros-site__pill--strong", children: "Documentation" }), _jsx("h1", { className: "cedros-site__title cedros-site__docs-hero-title", children: title }), description && _jsx("p", { className: "cedros-site__subtitle", children: description })] }), _jsxs("dl", { className: "cedros-site__hero-stats", children: [_jsxs("div", { className: "cedros-site__hero-stat", children: [_jsx("dt", { children: "Articles" }), _jsx("dd", { children: result.totalItems })] }), _jsxs("div", { className: "cedros-site__hero-stat", children: [_jsx("dt", { children: "Categories" }), _jsx("dd", { children: categoryCount })] }), _jsxs("div", { className: "cedros-site__hero-stat", children: [_jsx("dt", { children: "Topics" }), _jsx("dd", { children: tagCount })] })] })] }), _jsx(DocsIndexControls, { basePath: basePath, query: query, category: category, tag: tag, sort: sort, categories: resolvedCategories, tags: resolvedTags }), result.totalItems === 0 && (_jsxs("section", { className: "cedros-site__card cedros-site__empty-state", children: [_jsx("p", { className: "cedros-site__eyebrow", children: "No matches" }), _jsx("h2", { className: "cedros-site__section-title", children: "No documentation pages found" }), _jsx("p", { className: "cedros-site__subtitle", children: "Try a broader query or clear filters." })] })), result.totalItems > 0 && (_jsxs(_Fragment, { children: [_jsxs("div", { className: "cedros-site__section-heading", children: [_jsxs("div", { children: [_jsx("p", { className: "cedros-site__eyebrow", children: "Browse" }), _jsx("h2", { className: "cedros-site__section-title", children: "Available guides and references" })] }), _jsxs("p", { className: "cedros-site__entry-meta", children: [result.totalItems, " matching pages"] })] }), _jsx("section", { className: "cedros-site__content-grid cedros-site__content-grid--docs", children: result.items.map((doc) => (_jsxs("article", { className: "cedros-site__card cedros-site__entry-card cedros-site__docs-entry-card", children: [_jsxs("div", { className: "cedros-site__docs-entry-head", children: [doc.category && _jsx("span", { className: "cedros-site__pill", children: doc.category }), doc.lastUpdated && (_jsxs("p", { className: "cedros-site__entry-meta", children: ["Updated ", doc.lastUpdated] }))] }), _jsx("h2", { className: "cedros-site__entry-title cedros-site__entry-title--docs", children: _jsx("a", { href: normalizeDocsHref(doc.slug, { basePath }), children: doc.title }) }), doc.description && _jsx("p", { className: "cedros-site__subtitle", children: doc.description }), doc.tags && doc.tags.length > 0 && (_jsx("div", { className: "cedros-site__tag-list", children: doc.tags.map((entryTag) => (_jsx("a", { href: buildContentListHref(basePath, {
26
27
  q: query,
27
28
  category,
28
29
  tag: entryTag,
29
30
  sort
30
- }), className: "cedros-site__pill", children: entryTag }, entryTag))) }))] }, doc.slug))) }), _jsx(ContentPagination, { basePath: basePath, page: result.page, totalPages: result.totalPages, query: { q: query, category, tag, sort } })] }))] })] })), {
31
+ }), className: "cedros-site__pill", children: entryTag }, entryTag))) })), _jsx("div", { className: "cedros-site__docs-entry-footer", children: _jsx("a", { href: normalizeDocsHref(doc.slug, { basePath }), className: "cedros-site__button cedros-site__button--ghost", children: "Read article" }) })] }, doc.slug))) }), _jsx(ContentPagination, { basePath: basePath, page: result.page, totalPages: result.totalPages, query: { q: query, category, tag, sort } })] }))] })] })), {
31
32
  siteTitle,
32
33
  navigation,
33
34
  headless,
@@ -36,10 +37,8 @@ export function DocsIndexTemplate({ siteTitle, navigation, docs, title = "Docume
36
37
  }
37
38
  export function DocArticleTemplate({ siteTitle, navigation, title, bodyMarkdown, bodyHtml, allowUnsafeHtmlFallback = false, lastUpdated, readingMinutes, basePath = "/docs", currentPath, searchQuery = "", docs = [], sidebarSections, sidebarTitle = "Docs", breadcrumbs = [], toc = [], previousDoc, nextDoc, editHref, headless = false, renderLayout }) {
38
39
  const activePath = currentPath ?? breadcrumbs[breadcrumbs.length - 1]?.href;
39
- const resolvedSidebarSections = withActiveDocsSidebar(sidebarSections ?? buildDefaultDocsSidebarSections(docs, basePath), activePath);
40
- return renderDocsTemplateShell((_jsxs("section", { className: "cedros-site__docs-page cedros-site__docs-page--article", children: [_jsx(DocsSidebar, { title: sidebarTitle, basePath: basePath, searchQuery: searchQuery, sections: resolvedSidebarSections }), _jsxs("article", { className: "cedros-site__card cedros-site__article cedros-site__docs-article", children: [_jsx(Breadcrumbs, { trail: breadcrumbs }), _jsxs("div", { className: "cedros-site__article-header", children: [_jsx("span", { className: "cedros-site__pill", children: "docs" }), _jsx("h1", { className: "cedros-site__title", children: title }), (lastUpdated || readingMinutes) && (_jsx("p", { className: "cedros-site__entry-meta", children: [lastUpdated ? `Last updated ${lastUpdated}` : "", readingTime(readingMinutes)]
41
- .filter(Boolean)
42
- .join(" • ") }))] }), _jsx(MarkdownContent, { bodyMarkdown: bodyMarkdown, bodyHtml: bodyHtml, allowUnsafeHtmlFallback: allowUnsafeHtmlFallback }), (previousDoc || nextDoc || editHref) && (_jsxs("footer", { className: "cedros-site__doc-footer", children: [previousDoc && (_jsxs("a", { href: previousDoc.href, className: "cedros-site__nav-link", children: ["\u2190 ", previousDoc.title] })), nextDoc && (_jsxs("a", { href: nextDoc.href, className: "cedros-site__nav-link", children: [nextDoc.title, " \u2192"] })), editHref && (_jsx("a", { href: editHref, className: "cedros-site__nav-link", children: "Suggest edit" }))] }))] }), toc.length > 0 && (_jsxs("aside", { className: "cedros-site__card cedros-site__toc", children: [_jsx("h2", { className: "cedros-site__toc-title", children: "On this page" }), _jsx(TocScrollSpy, { entries: toc })] }))] })), {
40
+ const resolvedSidebarSections = withActiveDocsSidebar(sidebarSections ?? buildDefaultDocsSidebarSections(docs, basePath, activePath), activePath);
41
+ return renderDocsTemplateShell((_jsxs("section", { className: "cedros-site__docs-page cedros-site__docs-page--article", children: [_jsx(DocsSidebar, { title: sidebarTitle, basePath: basePath, searchQuery: searchQuery, sections: resolvedSidebarSections }), _jsxs("article", { className: "cedros-site__card cedros-site__article cedros-site__docs-article", children: [_jsxs("div", { className: "cedros-site__article-top", children: [_jsx(Breadcrumbs, { trail: breadcrumbs }), editHref && (_jsx("a", { href: editHref, className: "cedros-site__button cedros-site__button--ghost", children: "Suggest edit" }))] }), _jsxs("div", { className: "cedros-site__article-header", children: [_jsx("span", { className: "cedros-site__pill cedros-site__pill--strong", children: "Documentation" }), _jsx("h1", { className: "cedros-site__title", children: title }), (lastUpdated || readingMinutes) && (_jsxs("div", { className: "cedros-site__article-meta-list", children: [lastUpdated && (_jsxs("span", { className: "cedros-site__meta-chip", children: ["Updated ", lastUpdated] })), readingMinutes && (_jsx("span", { className: "cedros-site__meta-chip", children: readingTime(readingMinutes) }))] }))] }), _jsx("div", { className: "cedros-site__article-body", children: _jsx(MarkdownContent, { bodyMarkdown: bodyMarkdown, bodyHtml: bodyHtml, allowUnsafeHtmlFallback: allowUnsafeHtmlFallback }) }), (previousDoc || nextDoc) && (_jsxs("footer", { className: "cedros-site__doc-footer", children: [previousDoc && (_jsxs("a", { href: previousDoc.href, className: "cedros-site__pager-card", children: [_jsx("span", { className: "cedros-site__pager-label", children: "Previous" }), _jsx("span", { className: "cedros-site__pager-title", children: previousDoc.title })] })), nextDoc && (_jsxs("a", { href: nextDoc.href, className: "cedros-site__pager-card cedros-site__pager-card--next", children: [_jsx("span", { className: "cedros-site__pager-label", children: "Next" }), _jsx("span", { className: "cedros-site__pager-title", children: nextDoc.title })] }))] }))] }), toc.length > 0 && (_jsxs("aside", { className: "cedros-site__card cedros-site__toc", children: [_jsxs("div", { className: "cedros-site__toc-header", children: [_jsx("p", { className: "cedros-site__eyebrow", children: "On this page" }), _jsx("h2", { className: "cedros-site__toc-title", children: "Contents" })] }), _jsx(TocScrollSpy, { entries: toc })] }))] })), {
43
42
  siteTitle,
44
43
  navigation,
45
44
  headless,
@@ -47,7 +46,7 @@ export function DocArticleTemplate({ siteTitle, navigation, title, bodyMarkdown,
47
46
  });
48
47
  }
49
48
  function DocsIndexControls({ basePath, query, category, tag, sort, categories, tags }) {
50
- return (_jsxs("form", { method: "get", action: basePath, className: "cedros-site__controls cedros-site__card", children: [_jsxs("label", { className: "cedros-site__control", children: [_jsx("span", { children: "Search" }), _jsx("input", { type: "search", name: "q", defaultValue: query, placeholder: "Search docs" })] }), _jsxs("label", { className: "cedros-site__control", children: [_jsx("span", { children: "Category" }), _jsxs("select", { name: "category", defaultValue: category, children: [_jsx("option", { value: "", children: "All" }), categories.map((entry) => (_jsx("option", { value: entry, children: entry }, entry)))] })] }), _jsxs("label", { className: "cedros-site__control", children: [_jsx("span", { children: "Tag" }), _jsxs("select", { name: "tag", defaultValue: tag, children: [_jsx("option", { value: "", children: "All" }), tags.map((entry) => (_jsx("option", { value: entry, children: entry }, entry)))] })] }), _jsxs("label", { className: "cedros-site__control", children: [_jsx("span", { children: "Sort" }), _jsxs("select", { name: "sort", defaultValue: sort, children: [_jsx("option", { value: "title-asc", children: "Title A-Z" }), _jsx("option", { value: "title-desc", children: "Title Z-A" }), _jsx("option", { value: "updated-desc", children: "Recently updated" }), _jsx("option", { value: "updated-asc", children: "Least recently updated" })] })] }), _jsxs("div", { className: "cedros-site__control-actions", children: [_jsx("button", { className: "cedros-site__nav-link", type: "submit", children: "Apply" }), _jsx("a", { className: "cedros-site__nav-link", href: basePath, children: "Clear" })] })] }));
49
+ return (_jsxs("form", { method: "get", action: basePath, className: "cedros-site__controls cedros-site__card cedros-site__controls--docs", children: [_jsxs("div", { className: "cedros-site__controls-header", children: [_jsxs("div", { children: [_jsx("p", { className: "cedros-site__eyebrow", children: "Refine" }), _jsx("h2", { className: "cedros-site__section-title", children: "Search and filter the knowledge base" })] }), _jsx("p", { className: "cedros-site__entry-meta", children: "Use text search, categories, and tags to narrow the result set." })] }), _jsxs("div", { className: "cedros-site__controls-grid", children: [_jsxs("label", { className: "cedros-site__control", children: [_jsx("span", { children: "Search" }), _jsx("input", { type: "search", name: "q", defaultValue: query, placeholder: "Search docs" })] }), _jsxs("label", { className: "cedros-site__control", children: [_jsx("span", { children: "Category" }), _jsxs("select", { name: "category", defaultValue: category, children: [_jsx("option", { value: "", children: "All categories" }), categories.map((entry) => (_jsx("option", { value: entry, children: entry }, entry)))] })] }), _jsxs("label", { className: "cedros-site__control", children: [_jsx("span", { children: "Tag" }), _jsxs("select", { name: "tag", defaultValue: tag, children: [_jsx("option", { value: "", children: "All topics" }), tags.map((entry) => (_jsx("option", { value: entry, children: entry }, entry)))] })] }), _jsxs("label", { className: "cedros-site__control", children: [_jsx("span", { children: "Sort" }), _jsxs("select", { name: "sort", defaultValue: sort, children: [_jsx("option", { value: "title-asc", children: "Title A-Z" }), _jsx("option", { value: "title-desc", children: "Title Z-A" }), _jsx("option", { value: "updated-desc", children: "Recently updated" }), _jsx("option", { value: "updated-asc", children: "Least recently updated" })] })] }), _jsxs("div", { className: "cedros-site__control-actions", children: [_jsx("button", { className: "cedros-site__button", type: "submit", children: "Apply filters" }), _jsx("a", { className: "cedros-site__button cedros-site__button--ghost", href: basePath, children: "Clear" })] })] })] }));
51
50
  }
52
51
  function readingTime(minutes) {
53
52
  if (!minutes) {
@@ -55,8 +54,8 @@ function readingTime(minutes) {
55
54
  }
56
55
  return `${minutes} min read`;
57
56
  }
58
- function buildDefaultDocsSidebarSections(docs, basePath) {
59
- return docs.some((doc) => doc.slug.includes("/"))
60
- ? buildHierarchicalDocsSidebarSections(docs, basePath)
57
+ function buildDefaultDocsSidebarSections(docs, basePath, currentPath) {
58
+ return docs.some((doc) => doc.slug.includes("/") || doc.productSlug || doc.sectionKey)
59
+ ? buildDocsNavigation(docs, { basePath, currentPath, collapsible: true })
61
60
  : buildDocsSidebarSections(docs, basePath);
62
61
  }
@@ -3,5 +3,5 @@ export function SiteFooter({ siteTitle, note, links = [], rightSlot, layout }) {
3
3
  const footerClasses = layout?.width === "full"
4
4
  ? "cedros-site__footer cedros-site__footer--full"
5
5
  : "cedros-site__footer";
6
- return (_jsx("footer", { className: footerClasses, children: _jsxs("div", { className: "cedros-site__container cedros-site__footer-inner", children: [_jsxs("div", { className: "cedros-site__footer-brand", children: [_jsx("span", { children: siteTitle }), note && _jsx("span", { children: note })] }), links.length > 0 && (_jsx("nav", { className: "cedros-site__footer-links", "aria-label": "Footer", children: links.map((link) => (_jsx("a", { href: link.route, className: "cedros-site__footer-link", children: link.label }, link.key))) })), rightSlot && _jsx("div", { className: "cedros-site__footer-right", children: rightSlot })] }) }));
6
+ return (_jsx("footer", { className: footerClasses, children: _jsxs("div", { className: "cedros-site__container cedros-site__footer-inner", children: [_jsxs("div", { className: "cedros-site__footer-brand", children: [_jsxs("div", { className: "cedros-site__footer-brand-row", children: [_jsx("span", { className: "cedros-site__brand-mark cedros-site__brand-mark--footer", "aria-hidden": "true" }), _jsx("span", { className: "cedros-site__footer-title", children: siteTitle })] }), note && _jsx("p", { className: "cedros-site__footer-note", children: note })] }), links.length > 0 && (_jsx("nav", { className: "cedros-site__footer-links", "aria-label": "Footer", children: links.map((link) => (_jsx("a", { href: link.route, className: "cedros-site__footer-link", children: link.label }, link.key))) })), rightSlot && _jsx("div", { className: "cedros-site__footer-right", children: rightSlot })] }) }));
7
7
  }
@@ -1,6 +1,6 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { SiteFooter } from "./SiteFooter.js";
3
3
  import { TopNav } from "./TopNav.js";
4
- export function SiteLayout({ siteTitle, navigation, children, brandHref = "/", footerNote = "Powered by cedros-data", layout }) {
4
+ export function SiteLayout({ siteTitle, navigation, children, brandHref = "/", footerNote, layout }) {
5
5
  return (_jsxs("div", { className: "cedros-site", children: [_jsx(TopNav, { siteTitle: siteTitle, navigation: navigation, brandHref: brandHref, layout: layout?.nav }), _jsx("main", { className: "cedros-site__main", children: _jsx("div", { className: "cedros-site__container", children: children }) }), _jsx(SiteFooter, { siteTitle: siteTitle, note: footerNote, layout: layout?.footer })] }));
6
6
  }
@@ -6,7 +6,7 @@ export function TopNav({ siteTitle, navigation, brandHref = "/", rightSlot, curr
6
6
  : navigation.map((item) => ({ ...item, isActive: false }));
7
7
  const headerClasses = buildHeaderClasses(layout);
8
8
  const linkStyleClass = layout?.linkStyle === "text" ? " cedros-site__nav-link--text" : "";
9
- return (_jsx("header", { className: headerClasses, children: _jsxs("div", { className: "cedros-site__container cedros-site__header-inner", children: [_jsx("a", { href: brandHref, className: "cedros-site__brand", children: siteTitle }), _jsx("nav", { className: "cedros-site__nav", "aria-label": "Primary", children: activeNavigation.map((item) => (_jsx("a", { href: item.route, className: `cedros-site__nav-link${linkStyleClass}${item.isActive ? " cedros-site__nav-link--active" : ""}`, "aria-current": item.isActive ? "page" : undefined, children: item.label }, item.key))) }), rightSlot && _jsx("div", { className: "cedros-site__header-right", children: rightSlot })] }) }));
9
+ return (_jsx("header", { className: headerClasses, children: _jsxs("div", { className: "cedros-site__container cedros-site__header-inner", children: [_jsxs("a", { href: brandHref, className: "cedros-site__brand", "aria-label": siteTitle, children: [_jsx("span", { className: "cedros-site__brand-mark", "aria-hidden": "true" }), _jsx("span", { className: "cedros-site__brand-name", children: siteTitle })] }), activeNavigation.length > 0 && (_jsx("div", { className: "cedros-site__nav-shell", children: _jsx("nav", { className: "cedros-site__nav", "aria-label": "Primary", children: activeNavigation.map((item) => (_jsx("a", { href: item.route, className: `cedros-site__nav-link${linkStyleClass}${item.isActive ? " cedros-site__nav-link--active" : ""}`, "aria-current": item.isActive ? "page" : undefined, children: item.label }, item.key))) }) })), rightSlot && _jsx("div", { className: "cedros-site__header-right", children: rightSlot })] }) }));
10
10
  }
11
11
  function buildHeaderClasses(layout) {
12
12
  let classes = "cedros-site__header";
@@ -0,0 +1,259 @@
1
+ .cedros-site__blog-page {
2
+ display: grid;
3
+ gap: 1rem;
4
+ }
5
+
6
+ .cedros-site__blog-page--article {
7
+ gap: 1.1rem;
8
+ }
9
+
10
+ .cedros-site__blog-hero {
11
+ display: grid;
12
+ grid-template-columns: minmax(0, 1.35fr) minmax(220px, 0.8fr);
13
+ gap: 1rem;
14
+ padding: 1.45rem;
15
+ background:
16
+ linear-gradient(135deg, color-mix(in srgb, #f59e0b 9%, var(--cds-panel) 91%), color-mix(in srgb, var(--cds-link) 8%, var(--cds-panel) 92%)),
17
+ var(--cds-panel);
18
+ }
19
+
20
+ .cedros-site__blog-hero-copy {
21
+ display: grid;
22
+ gap: 0.9rem;
23
+ }
24
+
25
+ .cedros-site__blog-hero-title {
26
+ max-width: 7ch;
27
+ }
28
+
29
+ .cedros-site__blog-hero-subtitle {
30
+ max-width: 42ch;
31
+ }
32
+
33
+ .cedros-site__blog-controls-panel,
34
+ .cedros-site__controls--blog {
35
+ padding: 1.15rem 1.2rem 1.25rem;
36
+ }
37
+
38
+ .cedros-site__content-grid--blog {
39
+ grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
40
+ }
41
+
42
+ .cedros-site__entry-title--blog {
43
+ font-size: 1.22rem;
44
+ }
45
+
46
+ .cedros-site__blog-card {
47
+ height: 100%;
48
+ align-content: start;
49
+ background:
50
+ linear-gradient(180deg, color-mix(in srgb, var(--cds-panel) 92%, transparent), color-mix(in srgb, var(--cds-panel) 78%, var(--cds-bg) 22%)),
51
+ var(--cds-panel);
52
+ transition:
53
+ transform 160ms ease,
54
+ border-color 160ms ease,
55
+ box-shadow 160ms ease;
56
+ }
57
+
58
+ .cedros-site__blog-card:hover,
59
+ .cedros-site__blog-related-card:hover {
60
+ transform: translateY(-2px);
61
+ border-color: color-mix(in srgb, var(--cds-link) 28%, var(--cds-border) 72%);
62
+ box-shadow: var(--cds-shadow-lg);
63
+ }
64
+
65
+ .cedros-site__blog-card-top,
66
+ .cedros-site__blog-card-footer,
67
+ .cedros-site__blog-article-actions {
68
+ display: flex;
69
+ align-items: center;
70
+ justify-content: space-between;
71
+ gap: 0.75rem;
72
+ flex-wrap: wrap;
73
+ }
74
+
75
+ .cedros-site__blog-card-taxonomy,
76
+ .cedros-site__blog-taxonomy {
77
+ display: inline-flex;
78
+ flex-wrap: wrap;
79
+ gap: 0.45rem;
80
+ }
81
+
82
+ .cedros-site__blog-card-footer {
83
+ margin-top: auto;
84
+ align-items: flex-end;
85
+ }
86
+
87
+ .cedros-site__blog-card-footer .cedros-site__entry-meta {
88
+ flex: 1 1 220px;
89
+ }
90
+
91
+ .cedros-site__blog-article {
92
+ gap: 1.2rem;
93
+ }
94
+
95
+ .cedros-site__blog-related,
96
+ .cedros-site__blog-support-card {
97
+ display: grid;
98
+ gap: 0.95rem;
99
+ }
100
+
101
+ .cedros-site__blog-related-header,
102
+ .cedros-site__blog-support-header {
103
+ display: grid;
104
+ gap: 0.3rem;
105
+ }
106
+
107
+ .cedros-site__blog-related-grid {
108
+ display: grid;
109
+ grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
110
+ gap: 1rem;
111
+ }
112
+
113
+ .cedros-site__blog-related-card {
114
+ display: grid;
115
+ gap: 0.75rem;
116
+ height: 100%;
117
+ transition:
118
+ transform 160ms ease,
119
+ border-color 160ms ease,
120
+ box-shadow 160ms ease;
121
+ }
122
+
123
+ .cedros-site__search-field {
124
+ display: inline-flex;
125
+ align-items: center;
126
+ width: 100%;
127
+ gap: 0.75rem;
128
+ min-height: 3rem;
129
+ border: 1px solid color-mix(in srgb, var(--cds-border) 88%, transparent);
130
+ border-radius: calc(var(--cds-radius) - 0.05rem);
131
+ background: color-mix(in srgb, var(--cds-panel) 86%, transparent);
132
+ padding: 0 0.9rem;
133
+ box-shadow: inset 0 1px 0 rgb(255 255 255 / 38%);
134
+ transition:
135
+ border-color 140ms ease,
136
+ box-shadow 140ms ease,
137
+ background 140ms ease;
138
+ }
139
+
140
+ .cedros-site__search-field:focus-within {
141
+ border-color: color-mix(in srgb, var(--cds-link) 48%, var(--cds-border) 52%);
142
+ box-shadow: 0 0 0 0.24rem color-mix(in srgb, var(--cds-link) 12%, transparent);
143
+ background: var(--cds-panel);
144
+ }
145
+
146
+ .cedros-site__search-icon {
147
+ width: 1rem;
148
+ height: 1rem;
149
+ color: var(--cds-muted);
150
+ flex-shrink: 0;
151
+ }
152
+
153
+ .cedros-site__search-icon svg {
154
+ width: 100%;
155
+ height: 100%;
156
+ display: block;
157
+ }
158
+
159
+ .cedros-site__search-input {
160
+ width: 100%;
161
+ min-width: 0;
162
+ border: 0;
163
+ outline: 0;
164
+ background: transparent;
165
+ color: var(--cds-fg);
166
+ padding: 0;
167
+ }
168
+
169
+ .cedros-site__search-input::placeholder {
170
+ color: color-mix(in srgb, var(--cds-muted) 74%, transparent);
171
+ }
172
+
173
+ .cedros-site__search-shortcut {
174
+ display: inline-flex;
175
+ align-items: center;
176
+ min-height: 1.75rem;
177
+ padding: 0 0.55rem;
178
+ border-radius: 999px;
179
+ border: 1px solid color-mix(in srgb, var(--cds-border) 82%, transparent);
180
+ background: color-mix(in srgb, var(--cds-panel-muted) 86%, transparent);
181
+ color: var(--cds-muted);
182
+ font-size: 0.72rem;
183
+ font-weight: 700;
184
+ white-space: nowrap;
185
+ }
186
+
187
+ .cedros-site__filter-dimensions {
188
+ display: grid;
189
+ gap: 0.8rem;
190
+ }
191
+
192
+ .cedros-site__filter-group {
193
+ display: grid;
194
+ gap: 0.4rem;
195
+ }
196
+
197
+ .cedros-site__filter-group + .cedros-site__filter-group {
198
+ padding-top: 0.8rem;
199
+ border-top: 1px solid color-mix(in srgb, var(--cds-border) 76%, transparent);
200
+ }
201
+
202
+ .cedros-site__filter-group-label {
203
+ font-size: 0.72rem;
204
+ color: var(--cds-muted);
205
+ text-transform: uppercase;
206
+ letter-spacing: 0.08em;
207
+ font-weight: 700;
208
+ }
209
+
210
+ .cedros-site__filter-group-chips {
211
+ display: flex;
212
+ flex-wrap: wrap;
213
+ gap: 0.45rem;
214
+ }
215
+
216
+ .cedros-site__bookmark {
217
+ background: color-mix(in srgb, var(--cds-panel) 88%, transparent);
218
+ border: 1px solid color-mix(in srgb, var(--cds-border) 84%, transparent);
219
+ border-radius: 999px;
220
+ padding: 0.38rem 0.56rem;
221
+ cursor: pointer;
222
+ color: var(--cds-muted);
223
+ display: inline-flex;
224
+ align-items: center;
225
+ justify-content: center;
226
+ min-width: 2.2rem;
227
+ min-height: 2.2rem;
228
+ }
229
+
230
+ .cedros-site__bookmark:hover,
231
+ .cedros-site__bookmark[aria-pressed="true"] {
232
+ color: var(--cds-link-strong);
233
+ border-color: color-mix(in srgb, var(--cds-link) 42%, var(--cds-border) 58%);
234
+ background: var(--cds-link-soft);
235
+ }
236
+
237
+ @media (max-width: 960px) {
238
+ .cedros-site__blog-hero {
239
+ grid-template-columns: 1fr;
240
+ }
241
+ }
242
+
243
+ @media (max-width: 700px) {
244
+ .cedros-site__blog-hero,
245
+ .cedros-site__blog-controls-panel,
246
+ .cedros-site__controls--blog {
247
+ padding: 1rem;
248
+ }
249
+
250
+ .cedros-site__blog-card-footer .cedros-site__button,
251
+ .cedros-site__blog-related-card .cedros-site__button,
252
+ .cedros-site__blog-article-actions .cedros-site__button {
253
+ width: 100%;
254
+ }
255
+
256
+ .cedros-site__search-shortcut {
257
+ display: none;
258
+ }
259
+ }
@@ -24,10 +24,10 @@ export function BlogSearchInput({ defaultValue = "", onSearch, placeholder = "Se
24
24
  clearTimeout(timerRef.current);
25
25
  };
26
26
  }, []);
27
- return (_jsx("input", { ref: inputRef, type: "search", defaultValue: defaultValue, onChange: handleChange, placeholder: placeholder, className: "cedros-site__search-input" }));
27
+ return (_jsxs("label", { className: "cedros-site__search-field", children: [_jsx("span", { className: "cedros-site__search-icon", "aria-hidden": "true", children: _jsxs("svg", { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "1.8", children: [_jsx("circle", { cx: "11", cy: "11", r: "7" }), _jsx("path", { d: "m20 20-3.5-3.5" })] }) }), _jsx("input", { ref: inputRef, type: "search", defaultValue: defaultValue, onChange: handleChange, placeholder: placeholder, className: "cedros-site__search-input" }), _jsx("span", { className: "cedros-site__search-shortcut", "aria-hidden": "true", children: "Ctrl/\u2318K" })] }));
28
28
  }
29
29
  export function FilterDimensionChips({ dimensions, active, onChange }) {
30
- return (_jsx("div", { className: "cedros-site__filter-dimensions", children: dimensions.map((dim) => (_jsxs("div", { className: "cedros-site__filter-group", children: [_jsx("span", { className: "cedros-site__filter-group-label", children: dim.label }), _jsx("div", { className: "cedros-site__tag-list", children: dim.values.map((value) => {
30
+ return (_jsx("div", { className: "cedros-site__filter-dimensions", children: dimensions.map((dim) => (_jsxs("div", { className: "cedros-site__filter-group", children: [_jsx("span", { className: "cedros-site__filter-group-label", children: dim.label }), _jsx("div", { className: "cedros-site__filter-group-chips", children: dim.values.map((value) => {
31
31
  const isActive = active[dim.key] === value;
32
32
  return (_jsx("button", { type: "button", className: `cedros-site__pill${isActive ? " cedros-site__pill--active" : ""}`, onClick: () => onChange(dim.key, isActive ? "" : value), children: value }, value));
33
33
  }) })] }, dim.key))) }));
@@ -0,0 +1,10 @@
1
+ export interface BlogIndexControlsProps {
2
+ basePath: string;
3
+ query: string;
4
+ category: string;
5
+ tag: string;
6
+ sort: "newest" | "oldest" | "title-asc" | "title-desc";
7
+ categories: string[];
8
+ tags: string[];
9
+ }
10
+ export declare function BlogIndexControls({ basePath, query, category, tag, sort, categories, tags }: BlogIndexControlsProps): React.JSX.Element;
@@ -0,0 +1,4 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ export function BlogIndexControls({ basePath, query, category, tag, sort, categories, tags }) {
3
+ return (_jsxs("form", { method: "get", action: basePath, className: "cedros-site__controls cedros-site__card cedros-site__controls--blog", children: [_jsxs("div", { className: "cedros-site__controls-header", children: [_jsxs("div", { children: [_jsx("p", { className: "cedros-site__eyebrow", children: "Refine" }), _jsx("h2", { className: "cedros-site__section-title", children: "Search the editorial archive" })] }), _jsx("p", { className: "cedros-site__entry-meta", children: "Filter by category, topic, or sort order to find the right post faster." })] }), _jsxs("div", { className: "cedros-site__controls-grid", children: [_jsxs("label", { className: "cedros-site__control", children: [_jsx("span", { children: "Search" }), _jsx("input", { type: "search", name: "q", defaultValue: query, placeholder: "Search blog posts" })] }), _jsxs("label", { className: "cedros-site__control", children: [_jsx("span", { children: "Category" }), _jsxs("select", { name: "category", defaultValue: category, children: [_jsx("option", { value: "", children: "All categories" }), categories.map((entry) => (_jsx("option", { value: entry, children: entry }, entry)))] })] }), _jsxs("label", { className: "cedros-site__control", children: [_jsx("span", { children: "Tag" }), _jsxs("select", { name: "tag", defaultValue: tag, children: [_jsx("option", { value: "", children: "All topics" }), tags.map((entry) => (_jsx("option", { value: entry, children: entry }, entry)))] })] }), _jsxs("label", { className: "cedros-site__control", children: [_jsx("span", { children: "Sort" }), _jsxs("select", { name: "sort", defaultValue: sort, children: [_jsx("option", { value: "newest", children: "Newest" }), _jsx("option", { value: "oldest", children: "Oldest" }), _jsx("option", { value: "title-asc", children: "Title A-Z" }), _jsx("option", { value: "title-desc", children: "Title Z-A" })] })] }), _jsxs("div", { className: "cedros-site__control-actions", children: [_jsx("button", { className: "cedros-site__button", type: "submit", children: "Apply filters" }), _jsx("a", { className: "cedros-site__button cedros-site__button--ghost", href: basePath, children: "Clear" })] })] })] }));
4
+ }