Skip to content

Releases: jpudysz/react-native-unistyles

Release 2.5.0

15 Mar 09:06
Compare
Choose a tag to compare

Features

const stylesheet = createStyleSheet((theme, runtime) => ({
  // Use runtime from arguments instead of importing from react-native-unistyles
}));

Fixes

  • Fixed an issue causing errors about duplicate plugins to be thrown while hot-reloading in development mode. [chore: stop throwing errors for duplicated plugins in dev mode PR

Release 2.5.0-rc.0

09 Mar 21:11
Compare
Choose a tag to compare
Release 2.5.0-rc.0 Pre-release
Pre-release

2.5.0-rc.0 (2024-03-09)

Bug Fixes

  • docs: fix code highlight for layout (ca4752c)

Features

  • add library mocks (cc1784b)
  • expose a secondary layout argument in createStyleSheet (cec4b45)
  • make mocks dynamic (f9840f3)
  • replace layout arg with runtime (b11fd74)

Release 2.4.0

27 Feb 19:51
Compare
Choose a tag to compare

2.4.0 (2024-02-27)

Introducing the new version of Unistyles, and this one is significant!
Thank you for your patience, as it took me some time to complete it.

Built-in Safe Area Insets

This feature enables you to use insets values without the need for the react-native-safe-area-context package and passing any value to your stylesheet. Unistyles will automatically update your stylesheets with fresh values straight from C++!

You can access the new API with UnistylesRuntime:

const stylesheet = createStyleSheet(theme => ({
    header: {
         // will always be up-to-date
         paddingTop: UnistylesRuntime.insets.top
    }
}));

Insets expose 4 values: top, bottom, left, and right.

Status Bar and Navigation Bar

You can now also access some metadata about the status bar and navigation bar. Unistyles exposes their dimensions. They will always be up to date, and you can use them directly in the stylesheet with UnistylesRuntime:

UnistylesRuntime.statusBar.height // or width
UnistylesRuntime.navigationBar.width // or height

Content Size Category Improvements

The content size category is a user preference used to adjust the text size in your app. This feature is especially useful for users with visual impairments or limited vision. I've introduced new accessibility values for iOS: accessibilityMedium, accessibilityLarge, accessibilityExtraLarge, accessibilityExtraExtraLarge, accessibilityExtraExtraExtraLarge

Android has also received new values for very large fonts: extraHuge, extraExtraHuge.

You can access the Content Size Category with UnistylesRuntime:

UnistylesRuntime.contentSizeCategory

Redesigned Android Architecture

You can expect fewer re-renders and better performance. Unistyles is now smarter and can distinguish what has changed and emit only necessary events. This was not supported from the beginning, as Android has no dedicated events for orientation, dark mode, and content size category changes.

x64 Builds for Windows

Version 2.3.0 brought you support for react-native-windows. I was creating a bridge on my macOS computer with Parallels. I missed some configurations, and Unistyles wouldn’t compile on Windows computers. It’s now fixed, and you can develop cross-platform apps on your personal PC.

Fix for Rare Android Crash on Some Devices

That was tough to spot, as it happened rarely, but due to a race condition, Android reported some events faster than Unistyles was able to initialize. You can now enjoy a new bug-free version!

Docs Improvements

You can explore a new section about Dimensions and read some new guides. I marked the new content with a NEW badge.

Docs

Release 2.4.0-rc.2

27 Feb 14:33
Compare
Choose a tag to compare
Release 2.4.0-rc.2 Pre-release
Pre-release

2.4.0-rc.2 (2024-02-27)

Bug Fixes

  • issue with not reporting fresh insets on cpp layer (1b4e04c)

Features

  • finish android implementation (092047b)
  • get visible react android (6cf96a7)
  • reduce number of re-renders for android (0eb3909)
  • refactor dimensions (ece20c5)
  • update content size category and navigation bar api (8247eb1)

Release 2.4.0-rc.1

15 Feb 13:51
Compare
Choose a tag to compare
Release 2.4.0-rc.1 Pre-release
Pre-release

2.4.0-rc.1 (2024-02-15)

Features

  • widnows add support for x64 builds (1042417)

Release 2.4.0-rc.0

14 Feb 10:05
Compare
Choose a tag to compare
Release 2.4.0-rc.0 Pre-release
Pre-release

2.4.0-rc.0 (2024-02-14)

Features

  • add insets to windows (8831626)
  • add support for insets and status bar metadata (dcee0fe)
  • improve android implementation (80fe82e)

Release 2.3.0

08 Feb 09:45
Compare
Choose a tag to compare

2.3.0 (2024-02-08)

In this release I've brought you support for react-native-windows!
You can now build truly cross-platform desktop apps with Unistyles.

Also, there is one more improvement regarding boolean variants. Previously, if you defined only a true or false variant, they were converted respectively into a true or false string. This could be problematic if your props are of the boolean type. The error would indicate that the variant is expecting either true as a boolean or string. In this version, if you use a single true or false boolean variant, TypeScript will convert it to a generic boolean. Types won't be narrowed down to single values anymore.

Features

  • add windows support
  • add autolonking for windows
  • narrow down boolean variants (543e696)

Release 2.3.0-beta.2

07 Feb 11:27
Compare
Choose a tag to compare
Release 2.3.0-beta.2 Pre-release
Pre-release

2.3.0-beta.2 (2024-02-07)

  • add missing windows files to lib output

Release 2.3.0-beta.1

07 Feb 11:04
Compare
Choose a tag to compare
Release 2.3.0-beta.1 Pre-release
Pre-release

2.3.0-beta.1 (2024-02-07)

Features

  • enable windows autolinking (13786dd)

Release 2.3.0-beta.0

05 Feb 18:35
Compare
Choose a tag to compare
Release 2.3.0-beta.0 Pre-release
Pre-release

2.3.0-beta.0 (2024-02-05)

Features

  • add boilerplate for windows (b418a08)
  • add event handlers for windows (3a5a7a9)
  • add windows bridge (2e9a04b)