Skip to content

0.9.9

Compare
Choose a tag to compare
@danielsaidi danielsaidi released this 18 Feb 21:56
· 86 commits to main since this release

This release adds a lot of new RichTextAction cases and adjusts the context and coordinator subscription.

This release also deprecates RichTextAttributeReader and RichTextAttributeWriter functionality that are not used by the library, in favor of RichTextViewComponent, to reduce the complexity of the library.

Until now, these functions mostly did the same thing, but sometimes the RichTextViewComponent have to use its text storage or layout manager, or update the typing attributes. This caused the code to diverge and mostly identical copies had co-exist, where the reader and writer versions were not even used by the library.

By deprecating these functions, we can simplify the library in 1.0, and focus more on unifying the different RichTextViewComponent implementations (UITextView in iOS and NSTextView in macOS), rather than providing a low level string handling interface.

✨ Features

  • FontRepresentable has new extensions.
  • RichTextAction has a new label property.
  • RichTextCommand.ActionButtonGroup has new inits.
  • RichTextCommand.FormatMenu is a lot more configurable.
  • RichTextFormatSheet is now available on all platforms.
  • RichTextFormatSheet has new configuration and style types.
  • RichTextFormatSidebar has new configuration and style types.
  • RichTextFormatToolbar is a new rich text formatting toolbar.
  • RichTextKeyboardToolbar has a new config to always be shown.
  • RichTextLine is a new namespace with support for linespacing.
  • RichTextStyle.Button now supports using custom button styles.
  • RichTextView has a new theme that lets you define its style.
  • RichTextViewComponent has a new hasRichTextStyle function.
  • RichTextViewComponent has a new toggleRichTextStyle function.
  • RichTextViewComponent now handles superscript changes properly.

🚨 Important

  • RichTextFormatToolbar is no longer navigation wrapped by default.
  • RichTextFormatToolbar has a new asSheet() function that does this.

💡 Adjustments

  • RichTextColor icon is no longer optional.
  • RichTextColor has a new titleKey property.
  • RichTextContext makes coordinator handle alignment.
  • RichTextCoordinator now syncs an extra time at ends editing.

🐛 Bug Fixes

  • The library once again builds on visionOS.
  • RichTextAlignment now behaves better.
  • RichTextAlignment.Picker now uses provided values.
  • RichTextCoordinator now handles indentation changes.

🗑️ Deprecations

  • RichTextAttributeReader has deprecated a lot of functions.
  • RichTextAttributeWriter has deprecated a lot of functions.
  • RichTextCommand.AlignmentOptionsGroup has been deprecated.
  • RichTextCommand.FontSizeOptionsGroup has been deprecated.
  • RichTextCommand.IndentOptionsGroup has been deprecated.
  • RichTextCommand.StyleOptionsGroup has been deprecated.
  • RichTextCommand.SuperscriptOptionsGroup has been deprecated.
  • RichTextContext replaces individual colors with a single colors.
  • RichTextContext replaces individual styles with a single styles.
  • RichTextContext userActionPublisher is renamed to actionPublisher.
  • RichTextCoordinator functions calling handle(_:) have been deprecated.
  • RichTextFormatSheet has been renamed to RichTextFormatToolbar.
  • RTKL10n.bundle has been deprecated since we can use the .module bundle.

💥 Breaking Changes

  • RichTextColor.undefined was no longer used and has been removed.