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 are Selects on the native path (<Select native>) instead of NativeSelect, following the design system's "always Select" 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. Preview gives every heading the id GitHub gives its anchor (## Rows from data is #rows-from-data, a repeat #rows-from-data-1), so a README's #section links work where it is rendered.

Packaging

  • Depends on rehype-slug ^6.0.0, which names the headings.
  • The @soroush.tech/design-system peer 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 react and react-dom peer range is ^19.0.0; it had narrowed to ^19.2.8 through a dependency update, with nothing in the package needing more than 19.0.
  • homepage is the package's docs, https://docs.soroush.tech/markdown/ (was https://soroush.tech/markdown).
  • repository and bugs point at soroush-tech/design-system, where the package now lives, instead of soroush-tech/core. npm checks the provenance of a publish against repository.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 is Write your article in Markdown... and LiveEdit's is Click to start writing..., each ending in three periods rather than an ellipsis character. Both are props: pass your own placeholder to 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.js became an .oxlintrc.json, and its lint script now runs oxlint --deny-warnings; the enforced rule set is unchanged, including every react-hooks rule. Dev-dependency change only - eslint and its plugins out, oxlint in. No runtime or peer dependency changes, and the published tarball is unaffected.
  • typescript moves 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-vite and storybook ^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-system peer floor is unchanged.
  • jsdom stays on ^29.1.1, held repo-wide in renovate.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

  • mermaid dependency 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 a mermaid code fence renders.
  • react and react-dom peer 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-system peer floor moves to ^1.2.0 with 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. jsdom stays on ^29.1.1 - held repo-wide in renovate.json, see the design-system 1.2.0 notes.

v1.1.0

Features

  • LiveEdit - a preview you write on directly. The document renders exactly like Preview, split into top-level blocks, and every block is contentEditable: 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 into value, so onChange fires live and untouched blocks keep their exact source. Blur or Escape re-splits the document; fenced code keeps its language; ```mermaid blocks stay read-only (a diagram has no text to edit in place). Works standalone (value/onChange) or composed inside a Control, and registers the MarkdownLiveEdit slot (root / block) on theme.components for per-theme styling.

  • Editor - new maxRows prop (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-code code elements keep their language-* class on the DOM (previously dropped by the styled wrapper). This is what lets LiveEdit preserve 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, and remark-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), and Preview (a standalone renderer of markdown to design-system primitives, built on react-markdown, remark-gfm, and rehype-highlight).
  • CodeBlock - the syntax-highlighted code renderer with a hover-revealed copy control, usable standalone and as Preview's code element. Highlight tokens come from theme.syntax (syntaxDark / syntaxLight presets included).
  • Mermaid - fenced ```mermaid blocks render as diagrams in Preview (#282). mermaid is loaded lazily via dynamic import, so documents without diagrams never pay for it; per-theme styling goes through theme.mermaid (MermaidThemeVariables, merged over the defaults).
  • Per-component theming: the roots register the MarkdownEditor, MarkdownPreview, MarkdownToolbar, and CodeBlock slots on @soroush.tech/design-system/theme's ThemeComponents, so consumers customize defaults and styling through design-system's createTheme / theme.components; theme.syntax and theme.mermaid extend the same augmentation surface.

Packaging

  • Peers: @soroush.tech/design-system and react / react-dom ^19.
  • react-markdown, remark-gfm, rehype-highlight, and mermaid are regular dependencies - consumers install nothing beyond the peers.