Skip to content

feat(editor)!: consolidate cameraOptions, textOptions, and deepLinks into options prop#7888

Merged
steveruizok merged 6 commits intomainfrom
options-stack-clean
Feb 11, 2026
Merged

feat(editor)!: consolidate cameraOptions, textOptions, and deepLinks into options prop#7888
steveruizok merged 6 commits intomainfrom
options-stack-clean

Conversation

@steveruizok
Copy link
Copy Markdown
Collaborator

@steveruizok steveruizok commented Feb 11, 2026

In order to simplify the editor's prop surface and provide a single configuration entry point, this PR consolidates three standalone props (cameraOptions, textOptions, deepLinks) into the existing options prop on TldrawEditor, Tldraw, and TldrawImage.

pr-7888-walkthrough.mp4

The standalone props are preserved with @deprecated annotations for backward compatibility. When both the deprecated prop and the equivalent options field are provided, the options value takes precedence.

Clean reimplementation of the options-stack branch.

Change type

  • api

Test plan

  1. Use options={{ deepLinks: true }} instead of deepLinks — verify deep links still work
  2. Use options={{ camera: { isLocked: true } }} instead of cameraOptions — verify camera locks
  3. Use options={{ text: { tipTapConfig: { extensions: [...] } } }} instead of textOptions — verify rich text works
  4. Verify deprecated props still work for backward compatibility
  • Unit tests

API changes

  • Added TldrawOptions.camera for initial camera options
  • Added TldrawOptions.text for text rendering options
  • Added TldrawOptions.deepLinks for URL sync options
  • Added TldrawImageProps.options prop
  • Deprecated TldrawEditorBaseProps.cameraOptions (use options.camera)
  • Deprecated TldrawEditorBaseProps.textOptions (use options.text)
  • Deprecated TldrawEditorBaseProps.deepLinks (use options.deepLinks)
  • Deprecated TLEditorOptions.cameraOptions (use options.camera)
  • Deprecated TLEditorOptions.textOptions (use options.text)
  • Deprecated TldrawBaseProps.textOptions (use options.text)
  • Deprecated TldrawImageProps.textOptions (use options.text)

Release notes

  • Add camera, text, and deepLinks fields to the options prop on Tldraw, TldrawEditor, and TldrawImage
  • Deprecate standalone cameraOptions, textOptions, and deepLinks props in favor of the unified options prop

Note

Medium Risk
API-surface and wiring changes affect editor initialization (camera/text/deeplinks) across many entry points; while deprecated props are supported, precedence/merging bugs could alter behavior for existing integrations.

Overview
Unifies editor configuration under options. Adds options.camera, options.text, and options.deepLinks (with new defaults) and updates TldrawEditor, Editor, Tldraw, and TldrawImage to consume them.

Keeps backward compatibility via deprecations. Marks cameraOptions, textOptions, and deepLinks as @deprecated, merges them into options at runtime, and ensures options values win when both are provided; call sites (dotcom, templates, examples, tests) are migrated to the new options={{...}} style.

Also tightens a Vitest Path2D.roundRect polyfill check and updates API reports to reflect the new/renamed props and option fields.

Written by Cursor Bugbot for commit c5b1ffb. This will update automatically on new commits. Configure here.

Extend the TldrawOptions interface with three new fields:
- `camera`: initial camera options (replaces the standalone `cameraOptions` prop)
- `text`: text rendering options (replaces the standalone `textOptions` prop)
- `deepLinks`: URL sync options (replaces the standalone `deepLinks` prop)

The Editor constructor now reads these from `options` and merges them with
the deprecated standalone props for backward compatibility. The standalone
props on TLEditorOptions are marked @deprecated.
Update TldrawEditor to merge the deprecated textOptions, deepLinks, and
cameraOptions props into the unified options object. The options values
take precedence over the deprecated standalone props. The deepLinks
listener and camera options effect now read from options.deepLinks and
options.camera respectively.
Update Tldraw to merge the deprecated textOptions prop into
options.text, with options.text taking precedence. The merged
options are passed to TldrawEditor via the unified options prop.

Update TldrawImage to accept an options prop and merge it with
default text options. The deprecated textOptions prop is still
supported but options.text takes precedence.
Update all examples, dotcom editors, templates, and tests to use
the unified options prop instead of the deprecated standalone props:
- deepLinks → options.deepLinks
- textOptions → options.text
- cameraOptions → options.camera
Regenerate API reports to reflect the new camera, text, and deepLinks
fields on TldrawOptions and the deprecated standalone props.
@vercel
Copy link
Copy Markdown

vercel bot commented Feb 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
examples Ready Ready Preview Feb 11, 2026 7:33pm
5 Skipped Deployments
Project Deployment Actions Updated (UTC)
analytics Ignored Ignored Preview Feb 11, 2026 7:33pm
tldraw-docs Ignored Ignored Preview Feb 11, 2026 7:33pm
chat-template Skipped Skipped Feb 11, 2026 7:33pm
tldraw-shader Skipped Skipped Feb 11, 2026 7:33pm
workflow-template Skipped Skipped Feb 11, 2026 7:33pm

Request Review

@huppy-bot huppy-bot bot added the api API change label Feb 11, 2026
@cloudflare-workers-and-pages
Copy link
Copy Markdown

cloudflare-workers-and-pages bot commented Feb 11, 2026

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
image-pipeline-template c5b1ffb Commit Preview URL

Branch Preview URL
Feb 11 2026, 07:35 PM

Use typeof check instead of falsy check to correctly detect when
roundRect is not a callable function on the Path2D prototype.
@vercel vercel bot temporarily deployed to Preview – workflow-template February 11, 2026 19:30 Inactive
@vercel vercel bot temporarily deployed to Preview – chat-template February 11, 2026 19:30 Inactive
@vercel vercel bot temporarily deployed to Preview – tldraw-shader February 11, 2026 19:30 Inactive
@steveruizok steveruizok added this pull request to the merge queue Feb 11, 2026
Merged via the queue into main with commit c344aff Feb 11, 2026
17 checks passed
@steveruizok steveruizok deleted the options-stack-clean branch February 11, 2026 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

api API change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant