Skip to content

perf(textkit): hyphenate with @react-pdf/hyphenate - #3495

Merged
diegomura merged 1 commit into
masterfrom
dm/textkit-hyphenate
Aug 16, 2026
Merged

perf(textkit): hyphenate with @react-pdf/hyphenate#3495
diegomura merged 1 commit into
masterfrom
dm/textkit-hyphenate

Conversation

@diegomura

Copy link
Copy Markdown
Owner

Swaps textkit's `hyphen` dependency for the trie-based `@react-pdf/hyphenate` package added in #3494, cutting text layout time on text-heavy documents.

  • `wordHyphenation` now calls `syllables()` from `@react-pdf/hyphenate/en-us` instead of the `hyphen` matcher
  • Soft hyphens already present in a word remain the author's call: they replace the pattern set rather than adding to it
  • `hyphen` removed from textkit's dependencies

Verification

  • 795 textkit tests pass
  • `tsc --noEmit` and eslint clean

馃 Generated with Claude Code

Swap the hyphen dependency for the trie-based @react-pdf/hyphenate package,
cutting text layout time on text-heavy documents. Soft hyphens already in a
word stay the author's call and replace the pattern set.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Aug 16, 2026

Copy link
Copy Markdown

馃 Changeset detected

Latest commit: 899ad65

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 9 packages
Name Type
@react-pdf/textkit Patch
@react-pdf/layout Patch
@react-pdf/render Patch
@react-pdf/renderer Patch
@react-pdf/math Patch
@react-pdf/mermaid Patch
next-14 Patch
next-15 Patch
@react-pdf/vite-example Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@diegomura
diegomura merged commit cb445c0 into master Aug 16, 2026
14 checks passed
@diegomura
diegomura deleted the dm/textkit-hyphenate branch August 16, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant