Commit Graph

27 Commits

Author SHA1 Message Date
Hayden Bleasel 858ff5de0c Update Biome and Ultracite (fix security issues) 2026-02-18 20:50:27 -08:00
Hayden Bleasel a1e2fad475 Resolves #368 2026-02-07 17:00:33 -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
Hayden Bleasel 158657ad87 Upgrade Turbo and linter 2026-01-06 16:31:57 -08:00
Hayden Bleasel a6e6bc5410 Bump deps 2025-12-11 11:06:24 -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 0a732fec47 Update Ultracite 2025-12-07 10:41:01 -08:00
Hayden Bleasel 73c3b61bdd Bump deps 2025-12-06 23:34:57 -08:00
Hayden Bleasel a07aeedfdf Update package.json 2025-12-04 09:48:03 -08:00
Hayden Bleasel 62888665f8 Performance improvements, part 2 (#241)
* Add functional benchmarking suite

* Optimize regex performance

* Fix rendering issue with code blocks

* Fix bench commands

* Table optimizations

* Math Block Detection Caching

* Parse blocks optimizations

* More regex-to-loop optimizations

* Update layout.tsx

* Remove dependency on vfile

* Optimize string operations

* Create markdown.test.tsx

* Optimized cache key generation

* Fix display issue

* Add core Markdown parsing benchmarks

* Update section.tsx

* CSV / TSV escaping optimization

* More optimizations

* Run Ultracite

* Fix remaining lint issues
2025-11-21 17:45:53 -08:00
Hayden Bleasel 6e94a180ed Remove benchmarks 2025-11-21 15:13:09 -08:00
Hayden Bleasel 98e867f84c Fix benchmarks 2025-11-20 01:06:23 -08:00
Hayden Bleasel 750e5e5b7b Fix benchmarks 2025-11-19 19:53:18 -08:00
Hayden Bleasel 819ce60e37 Create performance benchmarks 2025-11-19 17:29:45 -08:00
Hayden Bleasel b55cbdc954 Fix security issues, improve performance (#233)
* Resolves https://github.com/vercel/streamdown/security/code-scanning/9

* Resolves https://github.com/vercel/streamdown/security/code-scanning/7

* Resolves https://github.com/vercel/streamdown/security/code-scanning/6

* Resolves https://github.com/vercel/streamdown/security/code-scanning/3

* Resolves https://github.com/vercel/streamdown/security/code-scanning/1

* Bump deps, resolves https://github.com/vercel/streamdown/security/dependabot/10

* Run Ultracite

* Create major-spoons-do.md

* Update parse-incomplete-markdown.ts

* Update packages/streamdown/lib/parse-incomplete-markdown.ts

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>

* Update parse-incomplete-markdown.test.ts

---------

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
2025-11-19 13:57:04 -08:00
Hayden Bleasel 75e9d401b9 Linting / Formatting / Documentation fixes (#220)
* Bump deps

* Update biome.jsonc

* Remove duplicate Biome config

* Run Ultracite

* Resolves #217

* For #198

* Update biome.jsonc

* For #198

* For #198

* For #198

* For #198

* Update node-attribute-removed.test.tsx

* Resolves #198

* Update README.md

* Add changeset files

* Create tidy-lemons-win.md
2025-11-15 20:23:36 -08:00
Hayden Bleasel 04f6f3aaba fix: hydration error while rendering image (#172)
* Extract images from paragraph tags

* Create image-hydration.test.tsx

* Create tangy-taxis-hammer.md

* Fix linting and formatting commands
2025-10-09 17:22:40 -07:00
Hayden Bleasel 0ebf67db1d 1.3 changes (#145)
* Bump deps

* Run Ultracite

* Update code-block.tsx

* Update parse-blocks.tsx

* Create great-pants-trade.md
2025-09-15 20:35:31 -07:00
Hayden Bleasel 5a50f22008 Bump deps (#89)
* Bump deps

* Transpile shiki

* Create afraid-kiwis-bathe.md

* Update biome.jsonc

* Ignore shadcn files

* Run Ultracite

* Run unsafe fixes
2025-09-03 09:56:07 -07:00
Hayden Bleasel 01e5eb091d Community + Publishing Workflow (#35)
* Scaffold changesets

* Copy AI SDK config

* Update config

* Create tender-toes-study.md

* Create CONTRIBUTING.md

* Create SECURITY.md

* Create CODE_OF_CONDUCT.md

* Create issue and PR templates
2025-08-25 14:59:18 -07:00
Steven a048fcd351 Add homepage and repository fields to package.json (#20) 2025-08-22 08:21:17 -07:00
Hayden Bleasel b00a1e574d Wire up test-ui and test-coverage 2025-08-18 10:43:08 -07:00
Hayden Bleasel af90e02a2c Re-add copy button 2025-08-15 10:35:16 -07:00
Hayden Bleasel 8d893b3527 Add Ultracite 2025-08-14 17:49:48 -07:00
Hayden Bleasel 8f43d9eed0 Scaffold tests 2025-08-14 17:47:17 -07:00
Turbobot 317f07bc3e feat(create-turbo): apply official-starter transform 2025-08-14 17:16:47 -07:00
Hayden Bleasel ada6e2da5d Initial commit 2025-08-14 17:00:44 -07:00