Commit Graph

176 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 5a06a01385 Resolves #305 2026-01-17 18:02:04 -08:00
Hayden Bleasel 8e24a9e42f Resolves #283 2026-01-17 17:13:50 -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 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 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 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 2c32b2e926 Fix shouldParseIncompleteMarkdown leaking to DOM 2026-01-09 14:23:46 -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
Hayden Bleasel 5653400bb6 Bump canary 2026-01-06 17:12:00 -08:00
Hayden Bleasel 4f9a3b5838 Bump canary version 2026-01-06 15:26:43 -08:00
Hayden Bleasel 1b898b0c16 Create modern-icons-marry.md 2026-01-06 15:26:10 -08:00
Hayden Bleasel fa4958e419 Cut canary release 2026-01-06 13:41:53 -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
Hayden Bleasel 104798e8ac Resolves #303 2025-12-11 10:38:37 -08:00
Hayden Bleasel b8c8c79639 302 various completion issues (#307)
* Fix issue 1

* Fix issue 3

* Fix issue 4

* Fix issue 2

* Create hungry-jars-search.md

* Update package.json

* Fix lint / format issues

* Update hungry-jars-search.md
2025-12-11 10:31:47 -08:00
Hayden Bleasel 217b128373 Resolves #300 2025-12-11 09:43:44 -08:00
Hua d708864899 fix: skip asterisks inside math blocks in remend (#306)
* fix: skip asterisks inside math blocks in remend

* chore: add changeset for remend asterisk fix
2025-12-10 22:06:52 -08:00
Hayden Bleasel ee12ec8179 Resolves #297 2025-12-08 14:54:08 -08:00
Hayden Bleasel 6bd211de4e Resolves #299 2025-12-08 13:54:31 -08:00
Hayden Bleasel 75faa2ed26 Reduce bundle size by 98%, create Streamdown CDN (#295)
* Bundle minimal languages, load excess from CDN

* Update cdn-loader.ts

* Proxy rewrite CDN urls

* Create bold-worms-enjoy.md

* Update code-blocks.mdx

* Delete unused pages

* Add new CDN unit tests

* Run Ultracite

* Manual fixes

* Update sidebar.tsx
2025-12-07 22:16:45 -08:00
Hayden Bleasel e0ee74e4b6 Create floppy-days-start.md 2025-12-07 22:11:27 -08:00
Hayden Bleasel d1635f016f Resolves #294 2025-12-07 20:49:58 -08:00
Hayden Bleasel 8157e8037f Fix fullscreen mermaid 2025-12-07 09:58:29 -08:00
Hayden Bleasel 6769e7a629 Fix trailing space issues 2025-12-07 09:55:21 -08:00
Hayden Bleasel 16df4a4b78 Fix KaTeX parsing 2025-12-06 23:07:35 -08:00
Hayden Bleasel 133c6c8281 Load KaTeX CSS from CDN, for #74 2025-12-06 23:00:10 -08:00
Hayden Bleasel 68109f2ab7 Fix setext heading issues 2025-12-06 22:34:40 -08:00
Hayden Bleasel 45f0f4dbcb Improve support for horizontal rules 2025-12-06 22:04:29 -08:00
Hayden Bleasel 13b91d8032 Add support for carets (#291)
* Add support for carets

* Create caret.test.tsx

* Update sixty-owls-film.md
2025-12-06 20:12:35 -08:00
Hayden Bleasel 271265c523 Resolves #288 2025-12-06 19:13:44 -08:00
Hayden Bleasel e7eca5118f Resolves #265 2025-12-04 18:05:24 -08:00
Hayden Bleasel 68f29c0eff Create ripe-gifts-build.md 2025-12-04 16:53:33 -08:00
Hayden Bleasel 36956165f4 Merge branch 'main' of https://github.com/vercel/streamdown 2025-12-04 09:48:31 -08:00
Hayden Bleasel 8d8d67f50d Add rehype-sanitize 2025-12-04 09:47:16 -08:00
chaxus 6a7dc7cb93 perf: optimize Mermaid rendering with viewport-based lazy loading (#281) 2025-12-04 09:41:41 -08:00
chaxus 0c830f5ec5 fix: improve mermaid controls layout and remove redundant styles (#278) 2025-12-04 09:40:47 -08:00