---
title: "@chenglou/pretext 1.0.0 Breaking Changes on npm | Since.dev"
description: "What each @chenglou/pretext release removed, renamed or changed: 33 breaking changes in 2 versions on npm, each with its source."
canonical_url: https://since.dev/packages/npm/@chenglou/pretext
last_updated: 2026-12-04
---

# @chenglou/pretext breaking changes

@chenglou/pretext 1.0.0 (October 14, 2026) is its newest release with breaking changes, 31 of them. The first: Removed PreparedTextWithSegments.breakableFitAdvances. Every breaking API change we have recorded in @chenglou/pretext on npm: 33 breaking changes in 2 versions. Below, its 2 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `1.0.0`, released October 14, 2026. [Source repository](https://github.com/chenglou/pretext)

Packages on npm run on Node.js. [Node.js end of life dates](https://since.dev/calendar/nodejs.md).

- From [0.0.6](#v-0-0-6) to [1.0.0](#v-1-0-0): 31 breaking changes in 1 version.

## @chenglou/pretext 1.0.0 breaking changes

@chenglou/pretext 1.0.0, released October 14, 2026: 31 breaking changes.

- **Removed** `PreparedTextWithSegments.breakableFitAdvances`  

PreparedTextWithSegments.breakableFitAdvances was removed in @chenglou/pretext 1.0.0 [npmjs.com](https://www.npmjs.com/package/@chenglou/pretext/v/1.0.0)
- **Removed** `PreparedTextWithSegments.breakablePreferredBreaks`  

PreparedTextWithSegments.breakablePreferredBreaks was removed in @chenglou/pretext 1.0.0 [npmjs.com](https://www.npmjs.com/package/@chenglou/pretext/v/1.0.0)
- **Removed** `PreparedTextWithSegments.chunks`  

PreparedTextWithSegments.chunks was removed in @chenglou/pretext 1.0.0 [npmjs.com](https://www.npmjs.com/package/@chenglou/pretext/v/1.0.0)
- **Removed** `PreparedTextWithSegments.discretionaryHyphenWidth`  

PreparedTextWithSegments.discretionaryHyphenWidth was removed in @chenglou/pretext 1.0.0 [npmjs.com](https://www.npmjs.com/package/@chenglou/pretext/v/1.0.0)
- **Removed** `PreparedTextWithSegments.letterSpacing`  

PreparedTextWithSegments.letterSpacing was removed in @chenglou/pretext 1.0.0 [npmjs.com](https://www.npmjs.com/package/@chenglou/pretext/v/1.0.0)
- **Removed** `PreparedTextWithSegments.lineEndFitAdvances`  

PreparedTextWithSegments.lineEndFitAdvances was removed in @chenglou/pretext 1.0.0 [npmjs.com](https://www.npmjs.com/package/@chenglou/pretext/v/1.0.0)
- **Removed** `PreparedTextWithSegments.lineEndPaintAdvances`  

PreparedTextWithSegments.lineEndPaintAdvances was removed in @chenglou/pretext 1.0.0 [npmjs.com](https://www.npmjs.com/package/@chenglou/pretext/v/1.0.0)
- **Removed** `PreparedTextWithSegments.segLevels`  

Code that reads segLevels must stop using it. [npmjs.com](https://www.npmjs.com/package/@chenglou/pretext/v/1.0.0)
- **Removed** `PreparedTextWithSegments.simpleLineWalkFastPath`  

PreparedTextWithSegments.simpleLineWalkFastPath was removed in @chenglou/pretext 1.0.0 [npmjs.com](https://www.npmjs.com/package/@chenglou/pretext/v/1.0.0)
- **Removed** `PreparedTextWithSegments.spacingGraphemeCounts`  

PreparedTextWithSegments.spacingGraphemeCounts was removed in @chenglou/pretext 1.0.0 [npmjs.com](https://www.npmjs.com/package/@chenglou/pretext/v/1.0.0)
- **Removed** `PreparedTextWithSegments.tabStopAdvance`  

PreparedTextWithSegments.tabStopAdvance was removed in @chenglou/pretext 1.0.0 [npmjs.com](https://www.npmjs.com/package/@chenglou/pretext/v/1.0.0)
- **Removed** `prepareWithSegments`  

Only the segments, kinds and widths fields of the prepareWithSegments handle remain available. [github.com](https://github.com/chenglou/pretext/releases/tag/v1.0.0)
- **Removed** `rich-inline:RichInlineFragment.end`  

RichInlineFragment.end was removed in @chenglou/pretext 1.0.0 [npmjs.com](https://www.npmjs.com/package/@chenglou/pretext/v/1.0.0)
- **Removed** `rich-inline:RichInlineFragment.start`  

RichInlineFragment.start was removed in @chenglou/pretext 1.0.0 [npmjs.com](https://www.npmjs.com/package/@chenglou/pretext/v/1.0.0)
- **Behavior changed**  

Handles created by version 0.0.9 are no longer valid, so the text must be prepared again. [github.com](https://github.com/chenglou/pretext/releases/tag/v1.0.0)
- **Behavior changed**  

In Chrome, Safari and Firefox, lines now break where the browser breaks them, and rich inline lays out as one paragraph, so line breaks can differ from 0.0.9. [github.com](https://github.com/chenglou/pretext/releases/tag/v1.0.0)
- **Behavior changed**  

Code that reads rich-inline cursors as places in an item's text must read the fragment's sourceStart and sourceEnd instead. [github.com](https://github.com/chenglou/pretext/releases/tag/v1.0.0)
- **Behavior changed**  

A font string that Canvas ignores, such as an empty one, now throws a RangeError, so code passing such values must pass a valid font. [github.com](https://github.com/chenglou/pretext/releases/tag/v1.0.0)
- **Signature changed** `layoutNextLine`  

The second and third arguments are swapped, so callers must pass the width before the cursor. [npmjs.com](https://www.npmjs.com/package/@chenglou/pretext/v/1.0.0)
- **Signature changed** `layoutNextLineRange`  

The second and third arguments are swapped, so callers must pass the width before the cursor. [npmjs.com](https://www.npmjs.com/package/@chenglou/pretext/v/1.0.0)
- **Signature changed** `measureLineStats`  

Was function measureLineStats(prepared: PreparedTextWithSegments, maxWidth: number): LineStats; now function measureLineStats(prepared: PreparedText, maxWidth: number): LineStats. [npmjs.com](https://www.npmjs.com/package/@chenglou/pretext/v/1.0.0)
- **Signature changed** `measureNaturalWidth`  

Was function measureNaturalWidth(prepared: PreparedTextWithSegments): number; now function measureNaturalWidth(prepared: PreparedText): number. [npmjs.com](https://www.npmjs.com/package/@chenglou/pretext/v/1.0.0)
- **Signature changed** `PreparedTextWithSegments`  

Was type PreparedTextWithSegments = InternalPreparedText & {segments: string\[\];}; now type PreparedTextWithSegments = PreparedText & {readonly segments: readonly string\[\]; readonly kinds: readonly SegmentBreakKind\[\]; readonly widths... [npmjs.com](https://www.npmjs.com/package/@chenglou/pretext/v/1.0.0)
- **Signature changed** `PreparedTextWithSegments.kinds`  

Was kinds: SegmentBreakKind\[\]; now readonly kinds: readonly SegmentBreakKind\[\]. [npmjs.com](https://www.npmjs.com/package/@chenglou/pretext/v/1.0.0)
- **Signature changed** `PreparedTextWithSegments.segments`  

Was segments: string\[\]; now readonly segments: readonly string\[\]. [npmjs.com](https://www.npmjs.com/package/@chenglou/pretext/v/1.0.0)
- **Signature changed** `PreparedTextWithSegments.widths`  

Was widths: number\[\]; now readonly widths: ArrayLike\<number>. [npmjs.com](https://www.npmjs.com/package/@chenglou/pretext/v/1.0.0)
- **Signature changed** `rich-inline:prepareRichInline`  

Was function prepareRichInline(items: RichInlineItem\[\]): PreparedRichInline; now function prepareRichInline(items: Array\<RichInlineItem | RichInlineBox>, options?: RichInlineOptions): PreparedRichInline. [npmjs.com](https://www.npmjs.com/package/@chenglou/pretext/v/1.0.0)
- **Signature changed** `rich-inline:RichInlineFragment`  

Was type RichInlineFragment = {itemIndex: number; text: string; gapBefore: number; occupiedWidth: number; start: LayoutCursor; end: LayoutCursor;}; now type RichInlineFragment = {itemIndex: number; text: string; gapBefore: number... [npmjs.com](https://www.npmjs.com/package/@chenglou/pretext/v/1.0.0)
- **Signature changed** `rich-inline:RichInlineFragmentRange`  

Was type RichInlineFragmentRange = {itemIndex: number; gapBefore: number; occupiedWidth: number; start: LayoutCursor; end: LayoutCursor;}; now type RichInlineFragmentRange = {itemIndex: number; gapBefore: number; gapItemIndex: number... [npmjs.com](https://www.npmjs.com/package/@chenglou/pretext/v/1.0.0)
- **Signature changed** `rich-inline:RichInlineItem`  

Was type RichInlineItem = {text: string; font: string; letterSpacing?: number; break?: 'normal' | 'never'; extraWidth?: number;}; now type RichInlineItem = {text: string; font: string; letterSpacing?: number; break?: 'normal' | 'never'... [npmjs.com](https://www.npmjs.com/package/@chenglou/pretext/v/1.0.0)
- **Signature changed** `walkLineRanges`  

Was function walkLineRanges(prepared: PreparedTextWithSegments, maxWidth: number, onLine: (line: LayoutLineRange) => void): number; now function walkLineRanges(prepared: PreparedText, maxWidth: number, onLine: (line: LayoutLineRange) =>... [npmjs.com](https://www.npmjs.com/package/@chenglou/pretext/v/1.0.0)

## @chenglou/pretext 0.0.6 breaking changes

@chenglou/pretext 0.0.6, released April 22, 2026: 2 breaking changes.

- **Signature changed** `PrepareOptions`  

Was type PrepareOptions = {whiteSpace?: WhiteSpaceMode; wordBreak?: WordBreakMode;}; now type PrepareOptions = {whiteSpace?: WhiteSpaceMode; wordBreak?: WordBreakMode; letterSpacing?: number;}. [npmjs.com](https://www.npmjs.com/package/@chenglou/pretext/v/0.0.6)
- **Signature changed** `rich-inline:RichInlineItem`  

Was type RichInlineItem = {text: string; font: string; break?: 'normal' | 'never'; extraWidth?: number;}; now type RichInlineItem = {text: string; font: string; letterSpacing?: number; break?: 'normal' | 'never'; extraWidth?: number;}. [npmjs.com](https://www.npmjs.com/package/@chenglou/pretext/v/0.0.6)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
