Commit Graph

440 Commits

Author SHA1 Message Date
v0 31bab6d1e1 fix: switch to published versions of Streamdown packages
Update package.json to use npm versions instead of workspace references.

Co-authored-by: Matt Collier <2234289+mattc0llier@users.noreply.github.com>
2026-02-02 10:41:49 +00:00
Hayden Bleasel 77f624ba5d Update docs 2026-02-01 22:44:13 -08:00
Hayden Bleasel f036ea4da2 Update geistdocs.tsx 2026-01-30 18:13:04 -08:00
asd123freedom d5fe6d6c83 fix: properly handle HTML void elements in parse-blocks (#364)
* fix: properly handle HTML void elements in parse-blocks

* Create common-symbols-rush.md

---------

Co-authored-by: Hayden Bleasel <hello@haydenbleasel.com>
2026-01-23 09:39:46 -08:00
0xDon 9f7222455d fix: footnote detection incorrectly matching regex character classes (#365)
The footnote reference and definition patterns used [^\]\s] which matches
any character except ] and whitespace. This incorrectly detected regex
negated character classes like [^\s...] in code blocks as footnotes,
causing parseMarkdownIntoBlocks to return the entire document as one block.

Updated patterns to use [\w-] to only match valid footnote identifiers
(alphanumeric, underscore, hyphen).

Added regression tests to prevent this issue from recurring.
2026-01-23 09:36:38 -08:00
0xDon aabb9abbef fix: don't treat $$ inside code blocks as math delimiters (#366)
* fix: don't treat $$ inside code blocks as math delimiters

Code blocks can contain $$ as shell syntax (e.g., pstree -p $$ for current PID).
The math block merging logic was incorrectly counting $$ inside code blocks,
causing subsequent content to be merged as if it were part of a math block.

Added tracking of previous token type to skip math merging when the previous
block was a code block.

* chore: add changeset for dollar sign fix
2026-01-23 09:35:14 -08:00
Hayden Bleasel fd5533c609 Resolves #355 2026-01-20 14:54:04 -08:00
Hayden Bleasel ca6feda934 Fix tests and lint 2026-01-20 14:44:23 -08:00
Hayden Bleasel e633ff73f2 Resolves #360 2026-01-20 14:40:32 -08:00
Hayden Bleasel cc066dc818 Resolves #362 2026-01-20 14:34:56 -08:00
Alex Supkay 6bb03caf80 fix: escape HTML when rehype-raw is omitted (#330) (#331)
* fix: escape HTML when rehype-raw is omitted (#330)

* chore: add changeset
2026-01-20 14:29:05 -08:00
Kelden c995fb7f5f Add bundled language aliases for JS/TS code fences (#356)
* fix: add code language aliases for shiki

* fix: derive language aliases from shiki metadata

* fix: normalize language ids to lowercase
2026-01-20 14:19:30 -08:00
Obada Khalili a12de57496 Custom tags in components (#359)
* allow custom tags in components

* comment

* tests

* docs

* lint

* changeset
2026-01-20 14:18:48 -08:00
streamdown-github-app[bot] c2337f06d7 Version Packages (#353)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@streamdown/cjk@1.0.1 @streamdown/code@1.0.1 @streamdown/math@1.0.1 @streamdown/mermaid@1.0.1 streamdown@2.1.0
2026-01-18 21:07:35 -08:00
Hayden Bleasel 8f3e5c62b5 Small fix 2026-01-18 21:05:19 -08:00
Hayden Bleasel 3f4a8acb37 Update pnpm-lock.yaml 2026-01-18 17:13:17 -08:00
Hayden Bleasel aee4b3c19a Update CI commands 2026-01-18 17:10:38 -08:00
Hayden Bleasel 4d8b84b9a4 Update test.yml 2026-01-18 17:05:13 -08:00
Hayden Bleasel b62824d83e Update CI workflows 2026-01-18 17:03:51 -08:00
Hayden Bleasel 169d5b6e9a Docs fixes 2026-01-18 12:40:44 -08:00
Hayden Bleasel 900d726ce4 Resolves #354 2026-01-18 11:48:17 -08:00
Hayden Bleasel 482c586f75 Update core example 2026-01-17 19:01:05 -08:00
Hayden Bleasel 583dafc656 Fix tests, lint repo 2026-01-17 18:11:40 -08:00
Hayden Bleasel 5a06a01385 Resolves #305 2026-01-17 18:02:04 -08:00
Hayden Bleasel 1569c47e0b Remove defaultRehypePlugins.katex 2026-01-17 17:51:49 -08:00
Hayden Bleasel f768a70f80 Improve test coverage 2026-01-17 17:24:36 -08:00
Hayden Bleasel bde9ea5eb0 Add test:coverage commands 2026-01-17 17:19:50 -08:00
Hayden Bleasel 8e24a9e42f Resolves #283 2026-01-17 17:13:50 -08:00
Hayden Bleasel 61437ba02a Update index.ts 2026-01-17 17:01:49 -08:00
Hayden Bleasel add8edaeab Resolves #301 2026-01-17 16:59:58 -08:00
Hayden Bleasel 19dae64c01 Resolves #313 2026-01-17 15:47:48 -08:00
Hayden Bleasel e45f2a22dc Resolves #314 2026-01-17 15:47:22 -08:00
Hayden Bleasel a16d4749e2 Fix formatting 2026-01-17 15:32:54 -08:00
Hayden Bleasel b99a93aeb5 Fix tests and CJK package 2026-01-17 15:29:19 -08:00
Hayden Bleasel 337625516c Resolves #332 2026-01-17 15:06:24 -08:00
Hayden Bleasel f0641f4942 Resolves #320 2026-01-17 15:02:06 -08:00
Hayden Bleasel 32bcb5d535 Resolves #325 2026-01-17 14:53:18 -08:00
Hayden Bleasel 1d4a3c745e Resolves #345 2026-01-17 14:50:00 -08:00
Hayden Bleasel 8cfb2628ec Update refs 2026-01-17 14:49:21 -08:00
Hayden Bleasel cbf4febef5 Rename plugin exports, update docs 2026-01-17 14:45:55 -08:00
Hayden Bleasel e7e5390ca4 Resolves #347 2026-01-17 14:43:34 -08:00
Hayden Bleasel 0b80aed583 Switch to plugin architecture (#352)
* Plugin trial

* Update docs and tests

* Update homepage add new section

* Update usage.tsx

* Split out CJK plugin

* Extract plugins into new packages

* Misc fixes

* Fix lint / formatting

* Fix: The Streamdown component's memo comparison doesn't compare the plugins prop, preventing re-renders when plugins change while other props stay the same

Co-authored-by: haydenbleasel <hello@haydenbleasel.com>

* Fix: TypeScript type mismatch at line 89 in `index.ts`: the visitor function's `index` parameter is typed as `number | undefined`, but the `visit` function expects `number | null`. The `undefined` type is not assignable to `number | null`.

This commit fixes the issue reported at /vercel/path0/packages/streamdown-cjk/index.ts:89

## TypeScript type incompatibility in visitor callback

**What fails:** TypeScript compiler fails during DTS (type definitions) build in `packages/streamdown-cjk/index.ts` at line 89

**How to reproduce:**
```bash
cd packages/streamdown-cjk
pnpm build
```

**Result:**
```
index.ts(89,3): error TS2769: No overload matches this call.
  Overload 1 of 2, '(tree: Root, check: "link", visitor: BuildVisitor<Root, "link">, reverse?: boolean | null | undefined): undefined', gave the following error.
    Argument of type '(node: Link, index: number | null, parent?: Parent) => number | undefined' is not assignable to parameter of type 'BuildVisitor<Root, "link">'.
      Types of parameters 'index' and 'index' are incompatible.
        Type 'number | undefined' is not assignable to type 'number | null'.
          Type 'undefined' is not assignable to type 'number | null'.
```

**Root cause:** The visitor callback function passed to the `visit()` function from `unist-util-visit` was declaring the `index` parameter as `number | null`, but the visitor can also receive `undefined` as the index value. The `BuildVisitor` type signature expects the callback to accept `number | null | undefined` to properly match the library's API.

**Fix:** Updated the `index` parameter type annotation on line 89 from `number | null` to `number | null | undefined` to match the actual possible values that the visitor receives and the expected `BuildVisitor` type signature.

Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
Co-authored-by: haydenbleasel <hello@haydenbleasel.com>

* Fix tests

* Remove CDN paths

* Fix tests

* More cleanup

* Remove shiki from main bundle

* Update index.ts

* Cleanup test repo

* Cleanup website

* Delete next-env files

* Update .gitignore

* Fix lockfile

* Upgrade Next and React

* Simplify themes

* Update test site

* Misc fixes

* Type fixes

* Create perky-cobras-punch.md

---------

Co-authored-by: Vercel <vercel[bot]@users.noreply.github.com>
2026-01-17 14:38:20 -08:00
streamdown-github-app[bot] 3c3af93b59 Version Packages (#340)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
streamdown@2.0.1
2026-01-11 21:10:45 -08:00
Hayden Bleasel e2aea03c8b Fix tests 2026-01-11 21:09:14 -08:00
Hayden Bleasel 61b368512d Fix Streamdown URL 2026-01-11 21:06:59 -08:00
streamdown-github-app[bot] 5948920433 Version Packages (#285)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
remend@1.0.2 streamdown@2.0.0
2026-01-11 20:42:39 -08:00
Hayden Bleasel 4b93626c5a Add caret demo 2026-01-09 14:47:24 -08:00
Hayden Bleasel 010c1b3132 Full fixes 2026-01-09 14:26:43 -08:00
Hayden Bleasel 2509917b77 Run Ultracite 2026-01-09 14:24:07 -08:00
Hayden Bleasel 2c32b2e926 Fix shouldParseIncompleteMarkdown leaking to DOM 2026-01-09 14:23:46 -08:00