Releases
v1.2.3
Works with @soroush.tech/design-system 2: the peer range covers it, and the toolbar's dropdowns
are design-system Selects. (#9)
Changed
- The
Toolbar's heading, code-language and diagram dropdowns areSelects on the native path (<Select native>) instead ofNativeSelect, following the design system's "alwaysSelect" guidance. They render the same native<select>, keep their accessible names (Heading level,Code block language,Mermaid diagram type) and still reset to their placeholder after each pick.
Fixed
- A link to a heading's section lands on it.
Previewgives every heading the id GitHub gives its anchor (## Rows from datais#rows-from-data, a repeat#rows-from-data-1), so a README's#sectionlinks work where it is rendered.
Packaging
- Depends on
rehype-slug^6.0.0, which names the headings. - The
@soroush.tech/design-systempeer range is^1.3.3 || ^2.0.0(was^1.3.3), so design-system 2 consumers no longer get an unmet-peer warning. The range is now written out instead of derived from the workspace at publish time. - React 19.0 and up - the
reactandreact-dompeer range is^19.0.0; it had narrowed to^19.2.8through a dependency update, with nothing in the package needing more than 19.0. homepageis the package's docs, https://docs.soroush.tech/markdown/ (was https://soroush.tech/markdown).repositoryandbugspoint at soroush-tech/design-system, where the package now lives, instead of soroush-tech/core. npm checks the provenance of a publish againstrepository.url, so a publish from this repo was refused while it named core. The README's badge, demo image and source links moved with it.
v1.2.2
Maintenance release. Two default placeholders change; no API changes.
Changed
Markdown.Editor's default placeholder isWrite your article in Markdown...andLiveEdit's isClick to start writing..., each ending in three periods rather than an ellipsis character. Both are props: pass your ownplaceholderto keep any other text.
No rendered markdown output, theme slot, or mermaid behavior changed.
v1.2.1
Maintenance release - build tooling and a dependency refresh. No public API, behavior, or emitted-output changes. (#328)
Packaging
- The workspace replaced ESLint with oxlint. This package's
eslint.config.jsbecame an.oxlintrc.json, and itslintscript now runsoxlint --deny-warnings; the enforced rule set is unchanged, including everyreact-hooksrule. Dev-dependency change only -eslintand its plugins out,oxlintin. No runtime or peer dependency changes, and the published tarball is unaffected. typescriptmoves to~7.0.2. It is a dev dependency here, used to typecheck and emit; the emitted output is unchanged.- Dev-dependency bumps:
@storybook/react-viteandstorybook^10.5.6→^10.5.8,@testing-library/jest-dom^7.0.0→^7.0.1. No runtime or peer dependency changes, and the@soroush.tech/design-systempeer floor is unchanged. jsdomstays on^29.1.1, held repo-wide inrenovate.json- see the design-system notes for the reason.
v1.2.0
Maintenance release - dependency refresh only. No new components, no API or behavior changes. (#280)
Packaging
mermaiddependency floor raised^11.4.0→^11.16.1- same major, backward compatible. It stays lazily imported, so the diagram bundle is still only fetched when amermaidcode fence renders.reactandreact-dompeer floors raised^19.0.0→^19.2.8. Still React 19 only - the range narrows to the patch line this release is built and tested against.@soroush.tech/design-systempeer floor moves to^1.2.0with that package's own maintenance release, whose React peer floors move in step.- Dev-dependency bumps:
@storybook/react-vite^10.5.0→^10.5.6,@testing-library/jest-dom^6.9.1→^7.0.0,@types/node^26.1.1→^26.1.2,@types/react^19.2.17→^19.2.18,@types/react-dom^19.2.3→^19.2.4,eslint^10.7.0→^10.8.0,eslint-plugin-storybook^10.5.0→^10.5.6,globals^17.7.0→^17.9.0,react/react-dom^19.2.7→^19.2.8,storybook^10.5.0→^10.5.6,tsdown^0.22.7→^0.22.14.jsdomstays on^29.1.1- held repo-wide inrenovate.json, see the design-system 1.2.0 notes.
v1.1.0
Features
-
LiveEdit- a preview you write on directly. The document renders exactly likePreview, split into top-level blocks, and every block iscontentEditable: type straight into the styled output, no textarea. Each input serializes the edited block's DOM back to markdown (rehype-parse→rehype-remark→remark-stringify, GFM-aware) and splices it intovalue, soonChangefires live and untouched blocks keep their exact source. Blur or Escape re-splits the document; fenced code keeps its language;```mermaidblocks stay read-only (a diagram has no text to edit in place). Works standalone (value/onChange) or composed inside aControl, and registers theMarkdownLiveEditslot (root/block) ontheme.componentsfor per-theme styling. -
Editor- newmaxRowsprop (forwarded to the underlying auto-grow textarea): the source field stops growing at that height and scrolls internally, keeping its border box visible inside height-bound panes.
Fixes
Preview- fenced-codecodeelements keep theirlanguage-*class on the DOM (previously dropped by the styled wrapper). This is what letsLiveEditpreserve a fence's language when the block is edited in place, and it makes the rendered language targetable by consumer CSS.
Packaging
- New dependencies for the DOM→markdown pipeline:
unified,rehype-parse,rehype-remark, andremark-stringify(all from the unified ecosystem the package already builds on).
v1.0.0
First stable release - the headless markdown editor + renderer, extracted from
@soroush.tech/design-system into its own package. Ships alongside its
companion @soroush.tech/[email protected], which it builds on (peer) for
primitives, the styled engine, and theming. 0.1.0 was never published;
this is the package's first appearance on npm.
Features
- Headless, composable markdown parts importable from the barrel:
Control(state provider),Toolbar(formatting buttons, heading/code selects, table picker),Editor(source textarea with Tab-to-indent, selection, and caret restore), andPreview(a standalone renderer of markdown to design-system primitives, built onreact-markdown,remark-gfm, andrehype-highlight). CodeBlock- the syntax-highlighted code renderer with a hover-revealed copy control, usable standalone and asPreview's code element. Highlight tokens come fromtheme.syntax(syntaxDark/syntaxLightpresets included).Mermaid- fenced```mermaidblocks render as diagrams inPreview(#282). mermaid is loaded lazily via dynamic import, so documents without diagrams never pay for it; per-theme styling goes throughtheme.mermaid(MermaidThemeVariables, merged over the defaults).- Per-component theming: the roots register the
MarkdownEditor,MarkdownPreview,MarkdownToolbar, andCodeBlockslots on@soroush.tech/design-system/theme'sThemeComponents, so consumers customize defaults and styling through design-system'screateTheme/theme.components;theme.syntaxandtheme.mermaidextend the same augmentation surface.
Packaging
- Peers:
@soroush.tech/design-systemandreact/react-dom^19. react-markdown,remark-gfm,rehype-highlight, andmermaidare regular dependencies - consumers install nothing beyond the peers.