typeset 3.0.0-beta.4 copy "typeset: ^3.0.0-beta.4" to clipboard
typeset: ^3.0.0-beta.4 copied to clipboard

Flutter inline text formatter for chat-style markup with plug-and-play usage and granular configuration for rendering, links, and editing.

Changelog #

All notable changes to this project are documented in this file.

3.0.0-beta.4 #

Changed #

  • The parser reads formatting and AutoLink URLs in a single left-to-right pass (previously a second pass over the parsed text). A URL containing *, _, ~, ` or \ is now kept whole: https://x.com/a_b_c and https://en.wikipedia.org/wiki/Foo_(bar) are one link instead of a link plus formatting. A style marker right after a URL still closes an open style (*see www.flutter.dev*).
  • AutoLink matches schemes case-insensitively (Https://, HTTP://, WWW.), as phone keyboards capitalise the first word.
  • AutoLink trims a trailing ' and …, and ends a URL at full-width/CJK punctuation (https://x.dev,然后).

Fixed #

  • The text field (TypeSetEditingController) no longer stores every keystroke's text in the shared document cache, which filled it with half-typed messages and pushed out the ones that are shown again. It keeps only its own last result.
  • Tapping an autolink now fires its recognizer, and links are exposed to screen readers (the recognizer is set on each text leaf).
  • The editing controller paints exactly controller.text when it contains escapes (\*), so the caret no longer drifts.
  • A rejected AutoLink URL no longer repeats its trailing punctuation (www.flutter.dev. → ..).
  • Linear time on adversarial input: runs of literal markers or escapes, runs of **/__, a URL followed by many ), and editor rendering of many escapes were quadratic.

Notes #

  • Nested underline, strikethrough and links share one decoration thickness, colour and style (a Flutter TextStyle limit): a decorationThickness in underlineStyle also thickens a nested strikethrough. Documented on TypeSetStyle.underlineStyle; the example app no longer sets one.
  • An inline customValidator closure (or a TypeSetAutoLinkConfig built inside build() with one) is a new object on every build, so the document cache can't reuse the parse. Create the config once, outside build().

3.0.0-beta.3 #

Complete architecture rewrite with AST-based parser, config cascade, AutoLink, and LRU caching.

Upgrading from v2.x? Follow the Migration Guide.

2.3.0 #

Added #

  • TypeSetEditingController for editing with inline formatting preview.
  • Updated example app to include editing and context menu flows.

Changed #

  • Added default URL launcher behavior for links.

2.2.0 #

Added #

  • Link recognition callback support.

Breaking changes #

  • recognizer renamed to linkRecognizerBuilder.

2.1.2 #

Changed #

  • Dependency updates.

2.1.1 #

Fixed #

  • Moved mocktail to dev_dependencies.

2.1.0 #

Added #

  • getTypesetContextMenus() helper for text selection toolbars.

Changed #

  • Default monospace font set to Courier.

Breaking changes #

  • TypeSet(inputText: "Foo") changed to TypeSet("Foo").

2.0.0 #

Added #

  • Dynamic font sizing support.
  • Explicit literal escaping support.

Fixed #

  • Formatting behavior for strings with spaces.

Breaking changes #

  • Underline marker changed from // to #.
  • Link marker changed from [] style to §text|url§.
  • Reserved-character escaping behavior updated.

1.0.3 #

Changed #

  • Dependency updates.

1.0.2 #

Changed #

  • Dependency and CI updates.

1.0.1+1 #

Added #

  • linkStyle, monospaceStyle, and recognizer options.

1.0.0+4 #

Changed #

  • README updates.

1.0.0+1 #

Added #

  • First stable release.

0.1.0+23 #

Added #

  • Asterisk-based bold support.

0.1.0+22 #

Changed #

  • Screenshot update.

0.1.0+21 #

Changed #

  • License set to Apache-2.0.

0.1.0+20 #

Added #

  • textAlign support.

0.1.0+19 #

Added #

  • String extension API.

0.1.0+18 #

Added #

  • Initial WhatsApp-style formatting support.
108
likes
160
points
7.29k
downloads
screenshot

Documentation

API reference

Publisher

verified publisherrohanjsh.dev

Weekly Downloads

Flutter inline text formatter for chat-style markup with plug-and-play usage and granular configuration for rendering, links, and editing.

Homepage
Repository (GitHub)
View/report issues

Topics

#text #rich-text #markdown #formatter #chat

License

Apache-2.0 (license)

Dependencies

flutter

More

Packages that depend on typeset