Skip to content

Commit

Permalink
chore: publish v2.1.1
Browse files Browse the repository at this point in the history
=> updated example app to compily with new changes
  • Loading branch information
Aashu-Dubey committed Jun 17, 2023
1 parent cfb162a commit c5d316e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
# Changelog

## [v2.1.1](https://github.com/Aashu-Dubey/capacitor-statusbar-safe-area/compare/v2.1.0...v2.1.1) - (18 Jun 2023)

## Breaking Change

- Make `safe-area` custom element opt-in to register only if needed and to also to prevent breaking evaluating `SafeAreaController` in SSR environments. by @jjang16 in [#9](https://github.com/Aashu-Dubey/capacitor-statusbar-safe-area/pull/9)

If earlier you were using the `safe-area` tag by simple (Empty) import, you now have to import and call function `registerSafeAreaElement`

```js
// root.component.ts or your-component.ts

import { registerSafeAreaElement } '@aashu-dubey/capacitor-statusbar-safe-area';

registerSafeAreaElement();
```

- `SafeAreaType` type has been renamed to `SafeAreaInset` ([changelog](https://github.com/Aashu-Dubey/capacitor-statusbar-safe-area/compare/08404be...e181a2e))

## [v2.1.0](https://github.com/Aashu-Dubey/capacitor-statusbar-safe-area/compare/v2.0.0...v2.1.0) - (14 May 2023)

✨ Improvements
Expand Down
3 changes: 3 additions & 0 deletions example/src/js/capacitor-welcome.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import {
SafeArea,
SafeAreaController,
registerSafeAreaElement,
} from '@aashu-dubey/capacitor-statusbar-safe-area';
import { SplashScreen } from '@capacitor/splash-screen';

Expand Down Expand Up @@ -104,6 +105,8 @@ window.customElements.define(

// Injecting CSS variable so we can use then in styles
SafeAreaController.injectCSSVariables();
// Registering the safe-area custom element to use as an html tag
registerSafeAreaElement();

// Using plugin's following methods to get status bar height and safe area insets info
const { height } = await SafeArea.getStatusBarHeight();
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@aashu-dubey/capacitor-statusbar-safe-area",
"version": "2.1.0",
"version": "2.1.1",
"description": "Get Status bar height and Safe area insets on Android & iOS.",
"main": "dist/plugin.cjs.js",
"module": "dist/esm/index.js",
Expand Down

0 comments on commit c5d316e

Please sign in to comment.