Commit Graph

427 Commits

Author SHA1 Message Date
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
Hayden Bleasel 0cc213c62e Update code-block.test.tsx 2026-01-09 14:13:54 -08:00
Hayden Bleasel b4a4bc5edc Update pre.json 2026-01-09 14:11:10 -08:00
Hayden Bleasel 5e39418bc4 Rename offline mode to self-hosting cdn 2026-01-09 14:07:03 -08:00
Hayden Bleasel c3e38f7db2 Publish new canary 2026-01-08 21:26:41 -08:00
Hayden Bleasel 23f2a40612 Attempt to fallback to raw to prevent cdn-loader blocking 2026-01-08 21:25:46 -08:00
Hayden Bleasel 91b425f6b5 Create slimy-symbols-cross.md 2026-01-08 19:43:37 -08:00
Aaron Edwards 70f6f13c2f Refactor click outside handler to use event.composedPath for compatibility with Shadow Roots. Resolves #337 (#338) 2026-01-08 19:43:29 -08:00
dependabot[bot] ec4a34a456 Bump the npm_and_yarn group across 1 directory with 2 updates (#335)
Bumps the npm_and_yarn group with 1 update in the / directory: [@modelcontextprotocol/sdk](https://github.com/modelcontextprotocol/typescript-sdk).


Updates `@modelcontextprotocol/sdk` from 1.24.3 to 1.25.2
- [Release notes](https://github.com/modelcontextprotocol/typescript-sdk/releases)
- [Commits](https://github.com/modelcontextprotocol/typescript-sdk/compare/1.24.3...v1.25.2)

Updates `qs` from 6.14.0 to 6.14.1
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/ljharb/qs/compare/v6.14.0...v6.14.1)

---
updated-dependencies:
- dependency-name: "@modelcontextprotocol/sdk"
  dependency-version: 1.25.2
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: qs
  dependency-version: 6.14.1
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-08 19:34:07 -08:00
Hayden Bleasel 5653400bb6 Bump canary 2026-01-06 17:12:00 -08:00
Hayden Bleasel 3880bab000 Recursively load language files 2026-01-06 17:11:04 -08:00
Hayden Bleasel b4d9e7c35c Fix lang rewrite 2026-01-06 17:10:48 -08:00
Hayden Bleasel 5d26a1eea2 Fix CDN 2026-01-06 16:52:52 -08:00
Hayden Bleasel eb0396b244 Fix icons default sizes 2026-01-06 16:52:48 -08:00