Commit Graph

293 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>
2026-01-18 21:07:35 -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 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>
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>
2026-01-11 20:42:39 -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 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
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
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 eb0396b244 Fix icons default sizes 2026-01-06 16:52:48 -08:00
Hayden Bleasel 2b26070ebc Fix CDN implementation 2026-01-06 16:29:58 -08:00
Hayden Bleasel 4f9a3b5838 Bump canary version 2026-01-06 15:26:43 -08:00
Hayden Bleasel d5d9e527e6 Dynamic import fixes 2026-01-06 15:22:37 -08:00
Hayden Bleasel 3564f8e6c0 Replace lucide-react 2026-01-06 15:19:07 -08:00
Hayden Bleasel d21ac293e0 Load Mermaid from CDN when required 2026-01-06 15:03:13 -08:00
Hayden Bleasel 20c7755bb5 Fix bundled themes, load alternate ones dynamically 2026-01-06 14:51:40 -08:00
Hayden Bleasel 8dcb49a9fd Fix bundle size by importing from shiki/core 2026-01-06 14:43:27 -08:00
Hayden Bleasel 32622ea1ad Add bundle size command 2026-01-06 14:43:03 -08:00
Hayden Bleasel fa4958e419 Cut canary release 2026-01-06 13:41:53 -08:00
Hayden Bleasel 1f544b7793 Update index.tsx 2026-01-06 13:33:41 -08:00
Hayden Bleasel 9cf5c09a34 Hotfix sanitize (#334)
* Add rehype-sanitize

* Version bump
2026-01-06 13:08:52 -08:00
xxchan 48c9c51f07 fix: split autolinks at CJK punctuation (#327)
* fix: split autolinks at CJK punctuation

* chore: clarify CJK autolink boundary
2026-01-05 09:42:06 -08:00
Jie Wang 82b64745a2 fix(deps): remove deprecated hast dep (#322) 2026-01-04 11:36:36 -08:00