Skip to content

Releases: jpudysz/react-native-unistyles

Release 3.0.0-beta.4

16 Dec 12:46
Compare
Choose a tag to compare

3.0.0-beta.4 (2024-12-16)

This fixes the Codegen package.json resolution issue that affected beta.3!
If you've encountered the following error, simply upgrade to beta.4:

❌  (node_modules/react-native-unistyles/ios/UnistylesModuleOnLoad.h:8:9)

   6 | 
   7 | #import <React/RCTEventEmitter.h>
>  8 | #import "TurboUnistyles/TurboUnistyles.h"
     |         ^ 'TurboUnistyles/TurboUnistyles.h' file not found
   9 | #import <React/RCTSurfacePresenter.h>
  10 | #import <React/RCTScheduler.h>
  11 | #import <React/RCTRuntimeExecutorModule.h>

Bug Fixes

Release 3.0.0-beta.3

16 Dec 09:48
Compare
Choose a tag to compare

3.0.0-beta.3 (2024-12-16)

Bug Fixes

  • add check for secrets (42c4cc7)
  • components exports (bae7a62)
  • components exports (2d903be)
  • issue with useVariants and conditional children (37bc297)
  • mergin exotic styles with unistyles (1f09e4a)
  • module exports (3c6b3c7)
  • nested variants (5b5f1cd)
  • override web types with native (d888339)
  • pressable path for native (23cc9e0)

Features

  • convert ternary to jsx if else (cad94e7)
  • include components (8b8f270)
  • pressable nested variants (9876ad6)
  • regression (214a44f)
  • text nested variants (898a5e3)
  • withUnistyles - accept variants before any native evnet (65011af)

Release 3.0.0-beta.2

12 Dec 14:09
Compare
Choose a tag to compare

What a ride! πŸ¦„

Based on the initial beta release and your feedback, we had plenty of work to do! Thank you for all the reports, private messages, and Discord discussions. You are truly helping us catch all the edge cases!

The most important features and improvements:

  • Thinner Babel plugin: We removed almost 50% of it!
  • Build with Android: Now fully supported
  • Use iOS with USE_FRAMEWORKS: No more errors
  • withUnistyles:

We’ve deprecated createUnistylesComponent in favor of withUnistyles. This allows you to access external props and functions!
Read more: https://www.unistyl.es/v3/references/with-unistyles

  • ScopedTheme:

The most requested feature since Unistyles 2.0 is here! You can now enforce a specific theme for certain screens or components.
Read more: https://www.unistyl.es/v3/references/scoped-theme

  • First-class support for the ImageBackground component

If you used beta.1, we recommend clearing your Metro and Android cache.

// expo
yarn expo prebuild --clean
yarn start -c
// bare RN
cd android && rm -rf .cxx build
yarn start --reset-cache

Commits

Bug Fixes

Features

  • add missing components (1dedd25)
  • add og tags for main page, fix seo component (247791d)
  • add required dependencies (8d375e6)
  • add stylesheet dependencies to native withUnistyles (98862fe)
  • add support for dynamic unistyles imports (af888e2)
  • add support for image background (c31cbad)
  • add support for nesting scoped themes (b16c248)
  • add support for scoped themes (9401105)
  • add support for shadow updates (a276840)
  • add support from refs passed via forwardRef (612a54c)
  • adjust scoped themes in cxx (a30b6a6)
  • attempt to build with use frameworks (92ee8b4)
  • cleanup web (5467198)
  • correctly detect dependencies in arrays (c28dd24)
  • create useDependencies hook with shared logic (cac0c53)
  • downgrade required node to 18 as EAS still relies on it (029264e)
  • dynamic function with rt withunsityles (234aa4d)
  • finish new variants (aac752b)
  • finish poc (8696659)
  • get rid of dynamic function arguments while linking (9cb672a)
  • get rid of variants while linking node (8df0cbb)
  • handle correctly styles in pressable (d0d0f30)
  • improve pressables (265e510)
  • improve variants (057bd9c)
  • improve withUnistyles on mobile (fa51f0f)
  • make android compile (7077434)
  • new ci (04824e7)
  • pass miini runtime to withUnityles (25acded)
  • poc of components (399bc36)
  • prevent traspiling components in node modules (652285b)
  • remove altering ref (bb3712b)
  • remove babel pressable style modifiction (cd124aa)
  • remove hacks from pressable wrapper (b8e36c0)
  • remove inline styles (3c2c8f2)
  • remove inline styles (1052498)
  • simplify pressable (97f666d)
  • simplify pressable (752e87d)
  • stop processing unistyle in host object (ec23a42)
  • support detecting dependencies in multiple ifelse statements (5b6522b)
  • swap pressable implementation even for multiple imports from react-native (1217f2d)
  • test call cases, remove unsuported components (dc72388)
  • upgrade nitro to 0.18.2 (0a09d02)
  • web scoped themes (ac47fa0)
  • withUnistyles πŸ¦„ (a7d67aa)

Full Changelog: v3.0.0-beta.1...v3.0.0-beta.2

Release 3.0.0-beta.1

29 Nov 11:19
Compare
Choose a tag to compare

Release 2.20.0

22 Nov 16:02
Compare
Choose a tag to compare

2.20.0 (2024-11-22)

Features

Docs:

https://www.unistyl.es/reference/unistyles-provider/

Release 2.12.0

12 Nov 11:38
Compare
Choose a tag to compare

2.12.0 (2024-11-12)

Features

  • [Android] exclude React Native so (1266451)

Release 2.11.0

26 Oct 13:06
Compare
Choose a tag to compare

2.11.0 (2024-10-26)

Features

  • [Core] add support for new React Native 0.76 css props boxShadow and filter (bf65e94)
  • [TypeScript] Flatten variants in case of never (c567e77)
  • [Core] upgrade example to React Native to 0.76, set min Node version to 18 (3cd461f)

Release 2.10.0

02 Oct 07:48
Compare
Choose a tag to compare

2.10.0 (2024-10-02)

Features

  • [Core] add support for React Native 0.76 (764ae9d)
  • [Core] get theme by name (e5026b8)
UnistylesRuntime.getTheme() // <-- get current theme
UnistylesRuntime.getTheme('dark') // <-- get theme by name

Theme returned from UnsityelsRuntime will reflect all changes you made with UnistylesRuntime.updateTheme, so it's better than importing theme from file.

  • [Web] Migrate from webpack to metro, upgrade expo example to 0.75.3 (e99d65a)
  • [Android] Prevent keyboard controller to report new ime insets when listener is disabled (7f0ccc4)

This works well with following setting:

UnistylesRegistry
    .addConfig({
        disableAnimatedInsets: true
    })
  • [Android] Upgrade cmake (422293a)

Bug Fixes

  • [iOS] Set root view background color on ui thread (a3b7b0f)

Release 2.9.2

30 Aug 12:11
Compare
Choose a tag to compare

2.9.2 (2024-08-30)

This is a small release that addresses some issues.

  • Thanks to @LeeMoonki, Unistyles 2.9.2 again supports React Native 0.72!
  • Unistyles will now reject transform with undefined values
<View
  style={{
    transform: [
       { scale: undefined }
    ]
  }}
/>

This used to work in the past but was changed in the React Native core. Developers can easily reproduce this issue when using, for example, media queries or breakpoints.

  • Disabling bottom inset animations

Some users reported poor performance and unnecessary re-renders when Unistyles attempted to animate the values of insets.bottom on Android (eg. when toggling keyboard).

This default behavior can now be disabled using UnistylesRegistry:

UnistylesRegistry
  .addConfig({
    disableAnimatedInsets: true // android only
 })

Features

  • [Android] - add support back for React Native 0.72 - fix JSI issue (21301cf) by @LeeMoonki
  • [Android] add option to disable animated insets (908fdd2)
  • [Core] remove undefined transforms (6d6245b)

Docs

  • Improve warning about issues with TS when registering different theme shapes (d0a76f2) by @404mat

Release 2.9.1

31 Jul 13:03
Compare
Choose a tag to compare

2.9.1 (2024-07-31)

This is a small update with a few improvements from the community!

  • Detecting RTL on the web is now dynamic and doesn't require a page reload
  • Fixed a race condition for iOS core, where reading values from UnistylesRuntime could return default values

Features