Commit e0336dc
feat: default theme layout with tab bar + page nav types (#37)
* feat: add prev/next nav fields to Page type
Prepare Page type for backend-provided prev/next links used by the
docs sub-navbar. Adds PageNavLink/PageNav types, extends Page via
extends PageNav, unifies PageData with Page in page context, and
threads null placeholders through SSR + hydration until backend
computes real values.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix: add std-env as root dep to unblock nitro beta
nitro@3.0.260311-beta lists std-env in devDependencies but its
runtime imports it. Node ESM resolution from nitro's isolated
cache path fails without std-env at top-level node_modules.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat: restructure default theme layout with tab bar
Drop the top Navbar; move navigation into a per-section tab bar
alongside the sidebar. Resize sidebar to 262px, swap button-based
nav links for pill-style tabs using mini typography tokens.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* chore: switch docs theme to default
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat: compute page prev/next on the server
Add getPageNav helper that flattens the page tree and returns the
adjacent PageNavLinks for a slug. Both the /api/page handler and SSR
pageData now populate prev/next so the client can render navigation
without re-flattening the tree.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat: wrap content in card with prev/next sub-navbar
Default theme now renders the main content inside a rounded, bordered
card with a sub-navbar at the top containing prev/next IconButtons
driven by the server-provided page nav, followed by breadcrumbs.
Breadcrumbs move out of Page.tsx since the Layout owns the chrome.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat: sidebar top navbar and layout polish
- Add sidebar top navbar with placeholder logo, icon-only search, and
IconButton-based theme switcher using resolvedTheme so system mode
lands on the correct icon.
- Simplify Search component to IconButton only, drop cmdk kbd trigger.
- Wrap content in a bordered card, remove TOC from Page, align heading
+ paragraph typography with Aurora tokens.
- Secondary bg on sidebar + card wrapper, primary bg on content area.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat: floating TOC with hover panel
TOC renders as short horizontal markers floating right-center, each
width scaled from the heading text length (base + per char, clamped).
Hovering the aside fades the markers out and reveals a panel with the
full heading list, active state highlighted. Shadows switch to the
Apsara --rs-shadow-soft token.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix: address PR review feedback
- page-context: coerce prev/next from API response to null so the
state always matches the Page type instead of carrying undefined.
- source.getPageNav: guard PageNavLink.title to string-only page names
so ReactNode names don't stringify to "[object Object]".
- Layout tabs: compute per-entry active state from api.basePath instead
of the shared isApiRoute boolean, so only the matching API tab
highlights when multiple APIs are configured.
- Layout: skip breadcrumbs on API routes since the docs tree doesn't
include API paths.
- Search: add title="Search (⌘K)" so the keyboard shortcut stays
discoverable after the kbd hint was removed.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat: show sidebar on landing, fix sidebar header height
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix: address copilot review feedback (phase 1)
- search shortcut tooltip: platform-neutral "Ctrl/⌘K"
- TOC: mirror :hover with :focus-within for keyboard users
- getPageNav: derive PageNavLink.title from URL when page name is non-string
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* refactor: address copilot review feedback (phase 2)
- getPageNav: accept pre-loaded tree to avoid redundant tree rebuild
- entry-server: skip getPageNav when page is null; share tree with nav
- entry-client: nullable frontmatter/relativePath/originalPath in EmbeddedData; narrow at usage
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(default theme): nested collapsible sidebar groups
- SidebarNode recurses to depth 1 with data-depth attr on section
- Depth 0: non-collapsible section header
- Depth 1: collapsible sub-group with right-aligned chevron
- Grandchildren folders (depth > 1) ignored
- Hide sidebar scrollbar
- Style navGroup header/trigger/label/chevron via apsara classNames slots
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs: rename Tabs.Trigger to Tabs.Tab in components doc
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* refactor(default theme): align sidebar + card to Figma
- Drop tabBar (ContentDirButtons + API tabs) and subNav card-chrome
- Sidebar header: logo + search + theme only (version switcher moved out)
- Sidebar footer: holds VersionSwitcher, hidden when no versions
- Sidebar bg uses --rs-color-background-base-secondary
- Card: border-left only, no border-radius
- cardWrapper: drop horizontal padding
- TOC: drop extra right offset
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(default theme): content-dir + API cells at top of sidebar
- Render content-dir entries and API entries as Sidebar.Item cells
at the top of Sidebar.Main, above the page tree
- Hidden when total (content + API) count is ≤ 1
- Drop Apsara's default header margin-bottom
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* refactor(default theme): align sidebar text + spacing to Figma
- Top content links: tertiary text by default, primary when active, transparent bg
- Nav group label uses secondary for section headers, primary for sub-groups
- Nav group: zero out default margin-top, apply space-7 only to top-level (data-depth=0)
- Zero out gap on Sidebar.Main and nav-group-items
- Breadcrumbs: use render={<RouterLink>} so SPA navigation works (not-current items)
- Wrap top content/API links in .topLinks div with bottom margin
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(default theme): config-driven sidebar logo
- New SidebarLogo component reads config.logo.light/dark
- Falls back to BookOpenIcon when no logo is configured
- Picks src based on resolvedTheme from Apsara useTheme()
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(config): optional icon per content dir and API
- Schema accepts icon string on content entries and api entries
- Icon can be a URL or an inline SVG string (uses currentColor)
- renderConfigIcon helper picks <img> for URL or inlines SVG
- Fallback to DocumentTextIcon / CodeBracketSquareIcon when absent
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat: always enable raw .md and llms.txt endpoints
- Drop llms config section; routes serve unconditionally
- Remove llms.enabled gating from .md slug route and llms.txt routes
- Clean up llms: enabled: true from docs and versioned example yamls
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat: drop Footer component and footer config
- Remove footerSchema + FooterConfig from config schema
- Delete Footer component and CSS
- Remove Footer usage from paper theme Layout
- Clean footer: sections from docs and basic example yamls
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat: add <link rel="alternate"> markdown version on docs pages
Head accepts optional markdownHref; DocsPage passes `/${slug}.md` so
crawlers and AI assistants can discover the raw markdown source.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(default theme): Open in AI dropdown
Adds OpenInAI menu in the subNav with four actions:
- Copy as MD (fetches the page's .md and writes to clipboard)
- View MD (opens the raw .md in a new tab)
- Open in ChatGPT (chatgpt.com/?q=Read <mdUrl>)
- Open in Claude (claude.ai/new?q=Read <mdUrl>)
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(search): migrate to apsara 1.0.0-rc.4 Command API
- Bump @raystack/apsara to 1.0.0-rc.4
- Drop manual Dialog wrapper; use Command.Dialog + Command.DialogContent
- Command.List -> Command.Content
- Command.Group heading -> <Command.Label>
- Item onSelect -> onClick; Input leadingIcon replaces external icon
- Style dialogContent (width/radius/top) to position at 20% from top
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* refactor(default theme): extract --navbar-height CSS variable
Replace four 48px usages (sidebar header, sidebar footer, subNav, etc)
with var(--navbar-height) defined on .layout.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(OpenInAI): add ChatGPT and Claude brand icons to menu items
Inline SVG icons using currentColor so they inherit the text color.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix: address coderabbit review feedback
- Layout: tighten isApiRoute match (exact /apis or /apis/ prefix) so
breadcrumb suppression doesn't catch unrelated paths
- Sidebar: flex: 0 0 262px + flex-column so it doesn't shrink; Main
gets overflow-y: auto + min-height: 0 for long trees
- Card: overflow visible so floating TOC + focus rings aren't clipped
- Toc markers: aria-hidden + tabIndex=-1 so the panel nav is the
single accessible entry
- Toc: hide below 900px viewport via media query
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent b6ef4db commit e0336dc
37 files changed
Lines changed: 847 additions & 433 deletions
File tree
- docs
- content/docs
- examples
- basic
- versioned
- packages/chronicle
- src
- components/ui
- lib
- pages
- server
- api
- routes
- [version]
- themes
- default
- paper
- types
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | 21 | | |
25 | 22 | | |
26 | 23 | | |
27 | 24 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | | - | |
| 81 | + | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
41 | | - | |
42 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
20 | 23 | | |
21 | 24 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
24 | | - | |
25 | | - | |
| 26 | + | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
Lines changed: 21 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | | - | |
| 11 | + | |
11 | 12 | | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
17 | | - | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
18 | 35 | | |
0 commit comments