Repository navigation
v0.1.9
Release Notes - v0.1.9
round-core v0.1.9
Routing and DX improvements focused on 404 handling, scroll behavior, and better integration with the markdown companion package.
New Features
- Per-route scroll restoration: The router now stores scroll positions per pathname.
- When you navigate away from a page, its scroll offset is saved.
- When you come back (via links or browser back/forward), the scroll is restored to where you left it.
- Different routes no longer "share" or drag scroll position between each other.
- Faster 404 detection:
getIsNotFound()anduseIsNotFound()now react immediately to the latest match flag.- Eliminates the visible flicker where a large 404 component lagged one frame behind navigation.
- Custom
NotFoundUIs feel snappier in large apps.
Vite note: After upgrading to
round-core@0.1.9(and the markdown companion), clear Vite's prebundle cache by deletingnode_modules/.vitein your app before restarting the dev server. This avoids stale code from previous versions.
Ecosystem: @round-core/markdown v0.1.1
This release syncs the core with the new markdown companion package and documents how it fits into the RoundJS stack.
- New package:
@round-core/markdown- A small, focused markdown renderer built on top of
round-core. - Uses
marked@17for parsing andshikifor syntax highlighting. - Ships rich code blocks with language header, copy button and theming support.
- A small, focused markdown renderer built on top of
- Correct inline markdown rendering:
- Relies on the default
markedrenderers for headings, paragraphs, lists, blockquotes and links. - Avoids
[object Object]issues caused by feeding raw token objects into custom renderers.
- Relies on the default
- Code block UI:
- Custom renderer only for fenced code blocks to add a header, language label and an optional copy-to-clipboard button.
- Highlighting is applied asynchronously so the first paint is fast and the UI stays responsive.
- Shiki language support:
- Loads an explicit set of common languages by default:
javascript,typescript,jsx,tsx,json,css,html,bash,markdown,yaml,toml,python,rust,go,java,c,cpp,csharp,php,ruby,swift,kotlin,dart,lua,sql, and more.
- Loads an explicit set of common languages by default:
- Theming and styling:
- The
<Markdown />component exposes anoptions.themeobject to control background, text, and accent colors. - Colors are applied via CSS variables on the root
.round-mdcontainer so they can be overridden per-page or globally. - Exported
defaultMarkdownStylesgives you stable class names for headings, paragraphs, lists, links, inline code and code blocks.
- The
Installation & Usage
Install the markdown package alongside round-core:
npm install round-core @round-core/markdownor with Bun:
bun add round-core @round-core/markdownBasic usage in a Round app:
import { Markdown, defaultMarkdownStyles } from '@round-core/markdown';
export default function DocsPage() {
const content = `# Hello RoundJS\n\nHere is some **markdown** with \\`code\\` and a list:`;
return (
<div className={defaultMarkdownStyles.rootClass}>
<Markdown content={content} />
</div>
);
}You can also enable faster first highlight by preloading Shiki:
<Markdown
src="./docs/getting-started.md"
options={{
preloadHighlighter: true,
theme: {
markdownBackground: '#050816',
markdownText: '#E5E7EB',
primaryColor: '#38BDF8',
secondaryColor: '#A855F7'
}
}}
/>;