@capawesome/capacitor-android-edge-to-edge-support 7.0.0-dev.1765885034
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +222 -0
- package/android/build.gradle +58 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/androidedgetoedgesupport/EdgeToEdge.java +116 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/androidedgetoedgesupport/EdgeToEdgeConfig.java +16 -0
- package/android/src/main/java/io/capawesome/capacitorjs/plugins/androidedgetoedgesupport/EdgeToEdgePlugin.java +98 -0
- package/android/src/main/res/.gitkeep +0 -0
- package/dist/docs.json +206 -0
- package/dist/esm/definitions.d.ts +97 -0
- package/dist/esm/definitions.js +3 -0
- package/dist/esm/definitions.js.map +1 -0
- package/dist/esm/index.d.ts +4 -0
- package/dist/esm/index.js +5 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/plugin.cjs.js +8 -0
- package/dist/plugin.cjs.js.map +1 -0
- package/dist/plugin.js +11 -0
- package/dist/plugin.js.map +1 -0
- package/package.json +74 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Robin Genz
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
# @capawesome/capacitor-android-edge-to-edge-support
|
|
2
|
+
|
|
3
|
+
Capacitor plugin to support [edge-to-edge](https://developer.android.com/develop/ui/views/layout/edge-to-edge) display on Android with advanced features like setting the background color of the status bar and navigation bar.
|
|
4
|
+
|
|
5
|
+
<div class="capawesome-z29o10a">
|
|
6
|
+
<a href="https://cloud.capawesome.io/" target="_blank">
|
|
7
|
+
<img alt="Deliver Live Updates to your Capacitor app with Capawesome Cloud" src="https://cloud.capawesome.io/assets/banners/cloud-build-and-deploy-capacitor-apps.png?t=1" />
|
|
8
|
+
</a>
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
| Before | After | Before | After |
|
|
12
|
+
| ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
|
|
13
|
+
| <image src="https://github.com/user-attachments/assets/1c42aa63-1191-4b9b-860f-ffc47881d815" width="200" /> | <image src="https://github.com/user-attachments/assets/a4df4e58-0c21-45b5-aadd-ca197308016a" width="200" /> | <image src="https://github.com/user-attachments/assets/22c94f95-a0c4-4ace-8a3b-3a0feabf9191" width="200" /> | <image src="https://github.com/user-attachments/assets/21ece022-fb74-4067-889b-6922ecd0e2a5" width="200" /> |
|
|
14
|
+
|
|
15
|
+
## Compatibility
|
|
16
|
+
|
|
17
|
+
| Plugin Version | Capacitor Version | Status |
|
|
18
|
+
| -------------- | ----------------- | -------------- |
|
|
19
|
+
| 8.x.x | >=8.x.x | Active support |
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
npm install @capawesome/capacitor-android-edge-to-edge-support
|
|
25
|
+
npx cap sync
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Android
|
|
29
|
+
|
|
30
|
+
If you are using the [Capacitor Keyboard](https://capacitorjs.com/docs/apis/keyboard) plugin, make sure to set the `resizeOnFullScreen` property to `false` (default) in your Capacitor Configuration file:
|
|
31
|
+
|
|
32
|
+
```json
|
|
33
|
+
{
|
|
34
|
+
"plugins": {
|
|
35
|
+
"Keyboard": {
|
|
36
|
+
"resizeOnFullScreen": false
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Otherwise, the web view will be resized to fit the screen, which may cause issues with this plugin, see [this comment](https://github.com/capawesome-team/capacitor-plugins/issues/490#issuecomment-2826435796).
|
|
43
|
+
|
|
44
|
+
## Configuration
|
|
45
|
+
|
|
46
|
+
<docgen-config>
|
|
47
|
+
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
|
|
48
|
+
|
|
49
|
+
| Prop | Type | Description | Since |
|
|
50
|
+
| --------------------- | ------------------- | ------------------------------------------------------------------------------------------ | ----- |
|
|
51
|
+
| **`backgroundColor`** | <code>string</code> | The hexadecimal color to set as the background color of the status bar and navigation bar. | 7.1.0 |
|
|
52
|
+
|
|
53
|
+
### Examples
|
|
54
|
+
|
|
55
|
+
In `capacitor.config.json`:
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{
|
|
59
|
+
"plugins": {
|
|
60
|
+
"EdgeToEdge": {
|
|
61
|
+
"backgroundColor": "#ffffff"
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
In `capacitor.config.ts`:
|
|
68
|
+
|
|
69
|
+
```ts
|
|
70
|
+
/// <reference types="@capawesome/capacitor-android-edge-to-edge-support" />
|
|
71
|
+
|
|
72
|
+
import { CapacitorConfig } from '@capacitor/cli';
|
|
73
|
+
|
|
74
|
+
const config: CapacitorConfig = {
|
|
75
|
+
plugins: {
|
|
76
|
+
EdgeToEdge: {
|
|
77
|
+
backgroundColor: "#ffffff",
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
export default config;
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
</docgen-config>
|
|
86
|
+
|
|
87
|
+
## Usage
|
|
88
|
+
|
|
89
|
+
The plugin **only needs to be installed**. It applies insets to the web view to support edge-to-edge display on Android. The plugin also provides a method to set the background color of the status bar and navigation bar. It's recommended to use this method in combination with the [Status Bar](https://capacitorjs.com/docs/apis/status-bar) plugin.
|
|
90
|
+
|
|
91
|
+
```typescript
|
|
92
|
+
import { EdgeToEdge } from '@capawesome/capacitor-android-edge-to-edge-support';
|
|
93
|
+
import { StatusBar, Style } from '@capacitor/status-bar';
|
|
94
|
+
|
|
95
|
+
const enable = async () => {
|
|
96
|
+
await EdgeToEdge.enable();
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
const disable = async () => {
|
|
100
|
+
await EdgeToEdge.disable();
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
const getInsets = async () => {
|
|
104
|
+
const result = await EdgeToEdge.getInsets();
|
|
105
|
+
console.log('Insets:', result);
|
|
106
|
+
};
|
|
107
|
+
|
|
108
|
+
const setBackgroundColor = async () => {
|
|
109
|
+
await EdgeToEdge.setBackgroundColor({ color: '#ffffff' });
|
|
110
|
+
await StatusBar.setStyle({ style: Style.Light });
|
|
111
|
+
};
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## API
|
|
115
|
+
|
|
116
|
+
<docgen-index>
|
|
117
|
+
|
|
118
|
+
* [`enable()`](#enable)
|
|
119
|
+
* [`disable()`](#disable)
|
|
120
|
+
* [`getInsets()`](#getinsets)
|
|
121
|
+
* [`setBackgroundColor(...)`](#setbackgroundcolor)
|
|
122
|
+
* [Interfaces](#interfaces)
|
|
123
|
+
|
|
124
|
+
</docgen-index>
|
|
125
|
+
|
|
126
|
+
<docgen-api>
|
|
127
|
+
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->
|
|
128
|
+
|
|
129
|
+
### enable()
|
|
130
|
+
|
|
131
|
+
```typescript
|
|
132
|
+
enable() => Promise<void>
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
Enable the edge-to-edge mode.
|
|
136
|
+
|
|
137
|
+
Only available on Android.
|
|
138
|
+
|
|
139
|
+
**Since:** 7.2.0
|
|
140
|
+
|
|
141
|
+
--------------------
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
### disable()
|
|
145
|
+
|
|
146
|
+
```typescript
|
|
147
|
+
disable() => Promise<void>
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Disable the edge-to-edge mode.
|
|
151
|
+
|
|
152
|
+
Only available on Android.
|
|
153
|
+
|
|
154
|
+
**Since:** 7.2.0
|
|
155
|
+
|
|
156
|
+
--------------------
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
### getInsets()
|
|
160
|
+
|
|
161
|
+
```typescript
|
|
162
|
+
getInsets() => Promise<GetInsetsResult>
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Return the insets that are currently applied to the webview.
|
|
166
|
+
|
|
167
|
+
Only available on Android.
|
|
168
|
+
|
|
169
|
+
**Returns:** <code>Promise<<a href="#getinsetsresult">GetInsetsResult</a>></code>
|
|
170
|
+
|
|
171
|
+
**Since:** 7.2.0
|
|
172
|
+
|
|
173
|
+
--------------------
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
### setBackgroundColor(...)
|
|
177
|
+
|
|
178
|
+
```typescript
|
|
179
|
+
setBackgroundColor(options: SetBackgroundColorOptions) => Promise<void>
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
Set the background color of the status bar and navigation bar.
|
|
183
|
+
|
|
184
|
+
Only available on Android.
|
|
185
|
+
|
|
186
|
+
| Param | Type |
|
|
187
|
+
| ------------- | ------------------------------------------------------------------------------- |
|
|
188
|
+
| **`options`** | <code><a href="#setbackgroundcoloroptions">SetBackgroundColorOptions</a></code> |
|
|
189
|
+
|
|
190
|
+
**Since:** 7.0.0
|
|
191
|
+
|
|
192
|
+
--------------------
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
### Interfaces
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
#### GetInsetsResult
|
|
199
|
+
|
|
200
|
+
| Prop | Type | Description | Since |
|
|
201
|
+
| ------------ | ------------------- | ---------------------------------------------------------------------------- | ----- |
|
|
202
|
+
| **`bottom`** | <code>number</code> | The bottom inset that was applied to the webview. Only available on Android. | 7.2.0 |
|
|
203
|
+
| **`left`** | <code>number</code> | The left inset that was applied to the webview. Only available on Android. | 7.2.0 |
|
|
204
|
+
| **`right`** | <code>number</code> | The right inset that was applied to the webview. Only available on Android. | 7.2.0 |
|
|
205
|
+
| **`top`** | <code>number</code> | The top inset that was applied to the webview. Only available on Android. | 7.2.0 |
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
#### SetBackgroundColorOptions
|
|
209
|
+
|
|
210
|
+
| Prop | Type | Description | Since |
|
|
211
|
+
| ----------- | ------------------- | ------------------------------------------------------------------------------------------ | ----- |
|
|
212
|
+
| **`color`** | <code>string</code> | The hexadecimal color to set as the background color of the status bar and navigation bar. | 7.0.0 |
|
|
213
|
+
|
|
214
|
+
</docgen-api>
|
|
215
|
+
|
|
216
|
+
## Changelog
|
|
217
|
+
|
|
218
|
+
See [CHANGELOG.md](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/android-edge-to-edge-support/CHANGELOG.md).
|
|
219
|
+
|
|
220
|
+
## License
|
|
221
|
+
|
|
222
|
+
See [LICENSE](https://github.com/capawesome-team/capacitor-plugins/blob/main/packages/android-edge-to-edge-support/LICENSE).
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
ext {
|
|
2
|
+
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
|
|
3
|
+
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.1'
|
|
4
|
+
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.3.0'
|
|
5
|
+
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.7.0'
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
buildscript {
|
|
9
|
+
repositories {
|
|
10
|
+
google()
|
|
11
|
+
mavenCentral()
|
|
12
|
+
}
|
|
13
|
+
dependencies {
|
|
14
|
+
classpath 'com.android.tools.build:gradle:8.13.0'
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
apply plugin: 'com.android.library'
|
|
19
|
+
|
|
20
|
+
android {
|
|
21
|
+
namespace = "io.capawesome.capacitorjs.plugins.androidedgetoedge"
|
|
22
|
+
compileSdk = project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 36
|
|
23
|
+
defaultConfig {
|
|
24
|
+
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 24
|
|
25
|
+
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 36
|
|
26
|
+
versionCode 1
|
|
27
|
+
versionName "1.0"
|
|
28
|
+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
29
|
+
}
|
|
30
|
+
buildTypes {
|
|
31
|
+
release {
|
|
32
|
+
minifyEnabled false
|
|
33
|
+
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
lintOptions {
|
|
37
|
+
abortOnError = false
|
|
38
|
+
}
|
|
39
|
+
compileOptions {
|
|
40
|
+
sourceCompatibility JavaVersion.VERSION_21
|
|
41
|
+
targetCompatibility JavaVersion.VERSION_21
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
repositories {
|
|
46
|
+
google()
|
|
47
|
+
mavenCentral()
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
dependencies {
|
|
52
|
+
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
53
|
+
implementation project(':capacitor-android')
|
|
54
|
+
implementation "androidx.appcompat:appcompat:$androidxAppCompatVersion"
|
|
55
|
+
testImplementation "junit:junit:$junitVersion"
|
|
56
|
+
androidTestImplementation "androidx.test.ext:junit:$androidxJunitVersion"
|
|
57
|
+
androidTestImplementation "androidx.test.espresso:espresso-core:$androidxEspressoCoreVersion"
|
|
58
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
package io.capawesome.capacitorjs.plugins.androidedgetoedgesupport;
|
|
2
|
+
|
|
3
|
+
import android.graphics.Color;
|
|
4
|
+
import android.os.Build;
|
|
5
|
+
import android.view.View;
|
|
6
|
+
import android.view.ViewGroup;
|
|
7
|
+
import androidx.annotation.NonNull;
|
|
8
|
+
import androidx.core.graphics.Insets;
|
|
9
|
+
import androidx.core.view.ViewCompat;
|
|
10
|
+
import androidx.core.view.WindowInsetsCompat;
|
|
11
|
+
import com.getcapacitor.Logger;
|
|
12
|
+
|
|
13
|
+
public class EdgeToEdge {
|
|
14
|
+
|
|
15
|
+
@NonNull
|
|
16
|
+
private final EdgeToEdgeConfig config;
|
|
17
|
+
|
|
18
|
+
@NonNull
|
|
19
|
+
private final EdgeToEdgePlugin plugin;
|
|
20
|
+
|
|
21
|
+
public EdgeToEdge(@NonNull EdgeToEdgePlugin plugin, @NonNull EdgeToEdgeConfig config) {
|
|
22
|
+
this.config = config;
|
|
23
|
+
this.plugin = plugin;
|
|
24
|
+
// Apply insets to disable the edge-to-edge feature
|
|
25
|
+
setBackgroundColor(config.getBackgroundColor());
|
|
26
|
+
applyInsets();
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
public void enable() {
|
|
30
|
+
applyInsets();
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
public void disable() {
|
|
34
|
+
removeInsets();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public ViewGroup.MarginLayoutParams getInsets() {
|
|
38
|
+
View view = plugin.getBridge().getWebView();
|
|
39
|
+
return (ViewGroup.MarginLayoutParams) view.getLayoutParams();
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
public void setBackgroundColor(String color) {
|
|
43
|
+
setBackgroundColor(Color.parseColor(color));
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
private void applyInsets() {
|
|
47
|
+
View view = plugin.getBridge().getWebView();
|
|
48
|
+
// Get parent view
|
|
49
|
+
ViewGroup parent = (ViewGroup) view.getParent();
|
|
50
|
+
// Set insets
|
|
51
|
+
WindowInsetsCompat currentInsets = ViewCompat.getRootWindowInsets(view);
|
|
52
|
+
if (currentInsets != null) {
|
|
53
|
+
Insets systemBarsInsets = currentInsets.getInsets(
|
|
54
|
+
WindowInsetsCompat.Type.systemBars() | WindowInsetsCompat.Type.displayCutout()
|
|
55
|
+
);
|
|
56
|
+
Insets imeInsets = currentInsets.getInsets(WindowInsetsCompat.Type.ime());
|
|
57
|
+
boolean keyboardVisible = currentInsets.isVisible(WindowInsetsCompat.Type.ime());
|
|
58
|
+
|
|
59
|
+
ViewGroup.MarginLayoutParams mlp = (ViewGroup.MarginLayoutParams) view.getLayoutParams();
|
|
60
|
+
|
|
61
|
+
mlp.bottomMargin = keyboardVisible ? imeInsets.bottom : systemBarsInsets.bottom;
|
|
62
|
+
mlp.topMargin = systemBarsInsets.top;
|
|
63
|
+
mlp.leftMargin = systemBarsInsets.left;
|
|
64
|
+
mlp.rightMargin = systemBarsInsets.right;
|
|
65
|
+
|
|
66
|
+
view.setLayoutParams(mlp);
|
|
67
|
+
}
|
|
68
|
+
// Set listener
|
|
69
|
+
ViewCompat.setOnApplyWindowInsetsListener(view, (v, windowInsets) -> {
|
|
70
|
+
// Retrieve system bars insets (for status/navigation bars)
|
|
71
|
+
Insets systemBarsInsets = windowInsets.getInsets(
|
|
72
|
+
WindowInsetsCompat.Type.systemBars() | WindowInsetsCompat.Type.displayCutout()
|
|
73
|
+
);
|
|
74
|
+
// Retrieve keyboard (IME) insets
|
|
75
|
+
Insets imeInsets = windowInsets.getInsets(WindowInsetsCompat.Type.ime());
|
|
76
|
+
boolean keyboardVisible = windowInsets.isVisible(WindowInsetsCompat.Type.ime());
|
|
77
|
+
|
|
78
|
+
ViewGroup.MarginLayoutParams mlp = (ViewGroup.MarginLayoutParams) v.getLayoutParams();
|
|
79
|
+
|
|
80
|
+
// Apply the appropriate bottom inset: use keyboard inset if visible, else system bars inset
|
|
81
|
+
mlp.bottomMargin = keyboardVisible ? imeInsets.bottom : systemBarsInsets.bottom;
|
|
82
|
+
|
|
83
|
+
// Set the other margins using system bars insets
|
|
84
|
+
mlp.topMargin = systemBarsInsets.top;
|
|
85
|
+
mlp.leftMargin = systemBarsInsets.left;
|
|
86
|
+
mlp.rightMargin = systemBarsInsets.right;
|
|
87
|
+
|
|
88
|
+
v.setLayoutParams(mlp);
|
|
89
|
+
|
|
90
|
+
return WindowInsetsCompat.CONSUMED;
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
private void removeInsets() {
|
|
95
|
+
View view = plugin.getBridge().getWebView();
|
|
96
|
+
// Get parent view
|
|
97
|
+
ViewGroup parent = (ViewGroup) view.getParent();
|
|
98
|
+
// Reset insets
|
|
99
|
+
ViewGroup.MarginLayoutParams mlp = (ViewGroup.MarginLayoutParams) view.getLayoutParams();
|
|
100
|
+
mlp.topMargin = 0;
|
|
101
|
+
mlp.leftMargin = 0;
|
|
102
|
+
mlp.rightMargin = 0;
|
|
103
|
+
mlp.bottomMargin = 0;
|
|
104
|
+
view.setLayoutParams(mlp);
|
|
105
|
+
// Reset listener
|
|
106
|
+
ViewCompat.setOnApplyWindowInsetsListener(view, null);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
private void setBackgroundColor(int color) {
|
|
110
|
+
View view = plugin.getBridge().getWebView();
|
|
111
|
+
// Get parent view
|
|
112
|
+
ViewGroup parent = (ViewGroup) view.getParent();
|
|
113
|
+
// Set background color
|
|
114
|
+
parent.setBackgroundColor(color);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
package io.capawesome.capacitorjs.plugins.androidedgetoedgesupport;
|
|
2
|
+
|
|
3
|
+
import android.graphics.Color;
|
|
4
|
+
|
|
5
|
+
public class EdgeToEdgeConfig {
|
|
6
|
+
|
|
7
|
+
private int backgroundColor = Color.WHITE;
|
|
8
|
+
|
|
9
|
+
public int getBackgroundColor() {
|
|
10
|
+
return this.backgroundColor;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
public void setBackgroundColor(int backgroundColor) {
|
|
14
|
+
this.backgroundColor = backgroundColor;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
package io.capawesome.capacitorjs.plugins.androidedgetoedgesupport;
|
|
2
|
+
|
|
3
|
+
import android.graphics.Color;
|
|
4
|
+
import android.view.ViewGroup;
|
|
5
|
+
import com.getcapacitor.JSObject;
|
|
6
|
+
import com.getcapacitor.Logger;
|
|
7
|
+
import com.getcapacitor.Plugin;
|
|
8
|
+
import com.getcapacitor.PluginCall;
|
|
9
|
+
import com.getcapacitor.PluginMethod;
|
|
10
|
+
import com.getcapacitor.annotation.CapacitorPlugin;
|
|
11
|
+
|
|
12
|
+
@CapacitorPlugin(name = "EdgeToEdge")
|
|
13
|
+
public class EdgeToEdgePlugin extends Plugin {
|
|
14
|
+
|
|
15
|
+
private static final String ERROR_COLOR_MISSING = "color must be provided.";
|
|
16
|
+
private static final String TAG = "EdgeToEdge";
|
|
17
|
+
|
|
18
|
+
private EdgeToEdge implementation;
|
|
19
|
+
|
|
20
|
+
@Override
|
|
21
|
+
public void load() {
|
|
22
|
+
EdgeToEdgeConfig config = getEdgeToEdgeConfig();
|
|
23
|
+
implementation = new EdgeToEdge(this, config);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
@PluginMethod
|
|
27
|
+
public void enable(PluginCall call) {
|
|
28
|
+
getActivity()
|
|
29
|
+
.runOnUiThread(() -> {
|
|
30
|
+
try {
|
|
31
|
+
implementation.enable();
|
|
32
|
+
call.resolve();
|
|
33
|
+
} catch (Exception exception) {
|
|
34
|
+
call.reject(exception.getMessage());
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
@PluginMethod
|
|
40
|
+
public void disable(PluginCall call) {
|
|
41
|
+
getActivity()
|
|
42
|
+
.runOnUiThread(() -> {
|
|
43
|
+
try {
|
|
44
|
+
implementation.disable();
|
|
45
|
+
call.resolve();
|
|
46
|
+
} catch (Exception exception) {
|
|
47
|
+
call.reject(exception.getMessage());
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
@PluginMethod
|
|
53
|
+
public void getInsets(PluginCall call) {
|
|
54
|
+
try {
|
|
55
|
+
ViewGroup.MarginLayoutParams insets = implementation.getInsets();
|
|
56
|
+
JSObject result = new JSObject();
|
|
57
|
+
result.put("bottom", insets.bottomMargin);
|
|
58
|
+
result.put("left", insets.leftMargin);
|
|
59
|
+
result.put("right", insets.rightMargin);
|
|
60
|
+
result.put("top", insets.topMargin);
|
|
61
|
+
call.resolve(result);
|
|
62
|
+
} catch (Exception exception) {
|
|
63
|
+
call.reject(exception.getMessage());
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
@PluginMethod
|
|
68
|
+
public void setBackgroundColor(PluginCall call) {
|
|
69
|
+
String color = call.getString("color");
|
|
70
|
+
if (color == null) {
|
|
71
|
+
call.reject(ERROR_COLOR_MISSING);
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
getActivity()
|
|
75
|
+
.runOnUiThread(() -> {
|
|
76
|
+
try {
|
|
77
|
+
implementation.setBackgroundColor(color);
|
|
78
|
+
call.resolve();
|
|
79
|
+
} catch (Exception exception) {
|
|
80
|
+
call.reject(exception.getMessage());
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
private EdgeToEdgeConfig getEdgeToEdgeConfig() {
|
|
86
|
+
EdgeToEdgeConfig config = new EdgeToEdgeConfig();
|
|
87
|
+
|
|
88
|
+
try {
|
|
89
|
+
String backgroundColor = getConfig().getString("backgroundColor");
|
|
90
|
+
if (backgroundColor != null) {
|
|
91
|
+
config.setBackgroundColor(Color.parseColor(backgroundColor));
|
|
92
|
+
}
|
|
93
|
+
} catch (Exception exception) {
|
|
94
|
+
Logger.error(TAG, "Set config failed.", exception);
|
|
95
|
+
}
|
|
96
|
+
return config;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
File without changes
|
package/dist/docs.json
ADDED
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
{
|
|
2
|
+
"api": {
|
|
3
|
+
"name": "EdgeToEdgePlugin",
|
|
4
|
+
"slug": "edgetoedgeplugin",
|
|
5
|
+
"docs": "",
|
|
6
|
+
"tags": [],
|
|
7
|
+
"methods": [
|
|
8
|
+
{
|
|
9
|
+
"name": "enable",
|
|
10
|
+
"signature": "() => Promise<void>",
|
|
11
|
+
"parameters": [],
|
|
12
|
+
"returns": "Promise<void>",
|
|
13
|
+
"tags": [
|
|
14
|
+
{
|
|
15
|
+
"name": "since",
|
|
16
|
+
"text": "7.2.0"
|
|
17
|
+
}
|
|
18
|
+
],
|
|
19
|
+
"docs": "Enable the edge-to-edge mode.\n\nOnly available on Android.",
|
|
20
|
+
"complexTypes": [],
|
|
21
|
+
"slug": "enable"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"name": "disable",
|
|
25
|
+
"signature": "() => Promise<void>",
|
|
26
|
+
"parameters": [],
|
|
27
|
+
"returns": "Promise<void>",
|
|
28
|
+
"tags": [
|
|
29
|
+
{
|
|
30
|
+
"name": "since",
|
|
31
|
+
"text": "7.2.0"
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"docs": "Disable the edge-to-edge mode.\n\nOnly available on Android.",
|
|
35
|
+
"complexTypes": [],
|
|
36
|
+
"slug": "disable"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"name": "getInsets",
|
|
40
|
+
"signature": "() => Promise<GetInsetsResult>",
|
|
41
|
+
"parameters": [],
|
|
42
|
+
"returns": "Promise<GetInsetsResult>",
|
|
43
|
+
"tags": [
|
|
44
|
+
{
|
|
45
|
+
"name": "since",
|
|
46
|
+
"text": "7.2.0"
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
"docs": "Return the insets that are currently applied to the webview.\n\nOnly available on Android.",
|
|
50
|
+
"complexTypes": [
|
|
51
|
+
"GetInsetsResult"
|
|
52
|
+
],
|
|
53
|
+
"slug": "getinsets"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"name": "setBackgroundColor",
|
|
57
|
+
"signature": "(options: SetBackgroundColorOptions) => Promise<void>",
|
|
58
|
+
"parameters": [
|
|
59
|
+
{
|
|
60
|
+
"name": "options",
|
|
61
|
+
"docs": "",
|
|
62
|
+
"type": "SetBackgroundColorOptions"
|
|
63
|
+
}
|
|
64
|
+
],
|
|
65
|
+
"returns": "Promise<void>",
|
|
66
|
+
"tags": [
|
|
67
|
+
{
|
|
68
|
+
"name": "since",
|
|
69
|
+
"text": "7.0.0"
|
|
70
|
+
}
|
|
71
|
+
],
|
|
72
|
+
"docs": "Set the background color of the status bar and navigation bar.\n\nOnly available on Android.",
|
|
73
|
+
"complexTypes": [
|
|
74
|
+
"SetBackgroundColorOptions"
|
|
75
|
+
],
|
|
76
|
+
"slug": "setbackgroundcolor"
|
|
77
|
+
}
|
|
78
|
+
],
|
|
79
|
+
"properties": []
|
|
80
|
+
},
|
|
81
|
+
"interfaces": [
|
|
82
|
+
{
|
|
83
|
+
"name": "GetInsetsResult",
|
|
84
|
+
"slug": "getinsetsresult",
|
|
85
|
+
"docs": "",
|
|
86
|
+
"tags": [
|
|
87
|
+
{
|
|
88
|
+
"text": "7.2.0",
|
|
89
|
+
"name": "since"
|
|
90
|
+
}
|
|
91
|
+
],
|
|
92
|
+
"methods": [],
|
|
93
|
+
"properties": [
|
|
94
|
+
{
|
|
95
|
+
"name": "bottom",
|
|
96
|
+
"tags": [
|
|
97
|
+
{
|
|
98
|
+
"text": "7.2.0",
|
|
99
|
+
"name": "since"
|
|
100
|
+
}
|
|
101
|
+
],
|
|
102
|
+
"docs": "The bottom inset that was applied to the webview.\n\nOnly available on Android.",
|
|
103
|
+
"complexTypes": [],
|
|
104
|
+
"type": "number"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "left",
|
|
108
|
+
"tags": [
|
|
109
|
+
{
|
|
110
|
+
"text": "7.2.0",
|
|
111
|
+
"name": "since"
|
|
112
|
+
}
|
|
113
|
+
],
|
|
114
|
+
"docs": "The left inset that was applied to the webview.\n\nOnly available on Android.",
|
|
115
|
+
"complexTypes": [],
|
|
116
|
+
"type": "number"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"name": "right",
|
|
120
|
+
"tags": [
|
|
121
|
+
{
|
|
122
|
+
"text": "7.2.0",
|
|
123
|
+
"name": "since"
|
|
124
|
+
}
|
|
125
|
+
],
|
|
126
|
+
"docs": "The right inset that was applied to the webview.\n\nOnly available on Android.",
|
|
127
|
+
"complexTypes": [],
|
|
128
|
+
"type": "number"
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
"name": "top",
|
|
132
|
+
"tags": [
|
|
133
|
+
{
|
|
134
|
+
"text": "7.2.0",
|
|
135
|
+
"name": "since"
|
|
136
|
+
}
|
|
137
|
+
],
|
|
138
|
+
"docs": "The top inset that was applied to the webview.\n\nOnly available on Android.",
|
|
139
|
+
"complexTypes": [],
|
|
140
|
+
"type": "number"
|
|
141
|
+
}
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
"name": "SetBackgroundColorOptions",
|
|
146
|
+
"slug": "setbackgroundcoloroptions",
|
|
147
|
+
"docs": "",
|
|
148
|
+
"tags": [
|
|
149
|
+
{
|
|
150
|
+
"text": "7.0.0",
|
|
151
|
+
"name": "since"
|
|
152
|
+
}
|
|
153
|
+
],
|
|
154
|
+
"methods": [],
|
|
155
|
+
"properties": [
|
|
156
|
+
{
|
|
157
|
+
"name": "color",
|
|
158
|
+
"tags": [
|
|
159
|
+
{
|
|
160
|
+
"text": "7.0.0",
|
|
161
|
+
"name": "since"
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
"text": "\"#ffffff\"",
|
|
165
|
+
"name": "example"
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
"text": "\"#000000\"",
|
|
169
|
+
"name": "example"
|
|
170
|
+
}
|
|
171
|
+
],
|
|
172
|
+
"docs": "The hexadecimal color to set as the background color of the status bar and navigation bar.",
|
|
173
|
+
"complexTypes": [],
|
|
174
|
+
"type": "string"
|
|
175
|
+
}
|
|
176
|
+
]
|
|
177
|
+
}
|
|
178
|
+
],
|
|
179
|
+
"enums": [],
|
|
180
|
+
"typeAliases": [],
|
|
181
|
+
"pluginConfigs": [
|
|
182
|
+
{
|
|
183
|
+
"name": "EdgeToEdge",
|
|
184
|
+
"slug": "edgetoedge",
|
|
185
|
+
"properties": [
|
|
186
|
+
{
|
|
187
|
+
"name": "backgroundColor",
|
|
188
|
+
"tags": [
|
|
189
|
+
{
|
|
190
|
+
"text": "7.1.0",
|
|
191
|
+
"name": "since"
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"text": "\"#ffffff\"",
|
|
195
|
+
"name": "example"
|
|
196
|
+
}
|
|
197
|
+
],
|
|
198
|
+
"docs": "The hexadecimal color to set as the background color of the status bar and navigation bar.",
|
|
199
|
+
"complexTypes": [],
|
|
200
|
+
"type": "string | undefined"
|
|
201
|
+
}
|
|
202
|
+
],
|
|
203
|
+
"docs": ""
|
|
204
|
+
}
|
|
205
|
+
]
|
|
206
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
declare module '@capacitor/cli' {
|
|
2
|
+
interface PluginsConfig {
|
|
3
|
+
EdgeToEdge?: {
|
|
4
|
+
/**
|
|
5
|
+
* The hexadecimal color to set as the background color of the status bar and navigation bar.
|
|
6
|
+
*
|
|
7
|
+
* @since 7.1.0
|
|
8
|
+
* @example "#ffffff"
|
|
9
|
+
*/
|
|
10
|
+
backgroundColor?: string;
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
export interface EdgeToEdgePlugin {
|
|
15
|
+
/**
|
|
16
|
+
* Enable the edge-to-edge mode.
|
|
17
|
+
*
|
|
18
|
+
* Only available on Android.
|
|
19
|
+
*
|
|
20
|
+
* @since 7.2.0
|
|
21
|
+
*/
|
|
22
|
+
enable(): Promise<void>;
|
|
23
|
+
/**
|
|
24
|
+
* Disable the edge-to-edge mode.
|
|
25
|
+
*
|
|
26
|
+
* Only available on Android.
|
|
27
|
+
*
|
|
28
|
+
* @since 7.2.0
|
|
29
|
+
*/
|
|
30
|
+
disable(): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Return the insets that are currently applied to the webview.
|
|
33
|
+
*
|
|
34
|
+
* Only available on Android.
|
|
35
|
+
*
|
|
36
|
+
* @since 7.2.0
|
|
37
|
+
*/
|
|
38
|
+
getInsets(): Promise<GetInsetsResult>;
|
|
39
|
+
/**
|
|
40
|
+
* Set the background color of the status bar and navigation bar.
|
|
41
|
+
*
|
|
42
|
+
* Only available on Android.
|
|
43
|
+
*
|
|
44
|
+
* @since 7.0.0
|
|
45
|
+
*/
|
|
46
|
+
setBackgroundColor(options: SetBackgroundColorOptions): Promise<void>;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* @since 7.2.0
|
|
50
|
+
*/
|
|
51
|
+
export interface GetInsetsResult {
|
|
52
|
+
/**
|
|
53
|
+
* The bottom inset that was applied to the webview.
|
|
54
|
+
*
|
|
55
|
+
* Only available on Android.
|
|
56
|
+
*
|
|
57
|
+
* @since 7.2.0
|
|
58
|
+
*/
|
|
59
|
+
bottom: number;
|
|
60
|
+
/**
|
|
61
|
+
* The left inset that was applied to the webview.
|
|
62
|
+
*
|
|
63
|
+
* Only available on Android.
|
|
64
|
+
*
|
|
65
|
+
* @since 7.2.0
|
|
66
|
+
*/
|
|
67
|
+
left: number;
|
|
68
|
+
/**
|
|
69
|
+
* The right inset that was applied to the webview.
|
|
70
|
+
*
|
|
71
|
+
* Only available on Android.
|
|
72
|
+
*
|
|
73
|
+
* @since 7.2.0
|
|
74
|
+
*/
|
|
75
|
+
right: number;
|
|
76
|
+
/**
|
|
77
|
+
* The top inset that was applied to the webview.
|
|
78
|
+
*
|
|
79
|
+
* Only available on Android.
|
|
80
|
+
*
|
|
81
|
+
* @since 7.2.0
|
|
82
|
+
*/
|
|
83
|
+
top: number;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* @since 7.0.0
|
|
87
|
+
*/
|
|
88
|
+
export interface SetBackgroundColorOptions {
|
|
89
|
+
/**
|
|
90
|
+
* The hexadecimal color to set as the background color of the status bar and navigation bar.
|
|
91
|
+
*
|
|
92
|
+
* @since 7.0.0
|
|
93
|
+
* @example "#ffffff"
|
|
94
|
+
* @example "#000000"
|
|
95
|
+
*/
|
|
96
|
+
color: string;
|
|
97
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAAA,wCAAwC","sourcesContent":["/// <reference types=\"@capacitor/cli\" />\n\ndeclare module '@capacitor/cli' {\n export interface PluginsConfig {\n EdgeToEdge?: {\n /**\n * The hexadecimal color to set as the background color of the status bar and navigation bar.\n *\n * @since 7.1.0\n * @example \"#ffffff\"\n */\n backgroundColor?: string;\n };\n }\n}\n\nexport interface EdgeToEdgePlugin {\n /**\n * Enable the edge-to-edge mode.\n *\n * Only available on Android.\n *\n * @since 7.2.0\n */\n enable(): Promise<void>;\n /**\n * Disable the edge-to-edge mode.\n *\n * Only available on Android.\n *\n * @since 7.2.0\n */\n disable(): Promise<void>;\n /**\n * Return the insets that are currently applied to the webview.\n *\n * Only available on Android.\n *\n * @since 7.2.0\n */\n getInsets(): Promise<GetInsetsResult>;\n /**\n * Set the background color of the status bar and navigation bar.\n *\n * Only available on Android.\n *\n * @since 7.0.0\n */\n setBackgroundColor(options: SetBackgroundColorOptions): Promise<void>;\n}\n\n/**\n * @since 7.2.0\n */\nexport interface GetInsetsResult {\n /**\n * The bottom inset that was applied to the webview.\n *\n * Only available on Android.\n *\n * @since 7.2.0\n */\n bottom: number;\n /**\n * The left inset that was applied to the webview.\n *\n * Only available on Android.\n *\n * @since 7.2.0\n */\n left: number;\n /**\n * The right inset that was applied to the webview.\n *\n * Only available on Android.\n *\n * @since 7.2.0\n */\n right: number;\n /**\n * The top inset that was applied to the webview.\n *\n * Only available on Android.\n *\n * @since 7.2.0\n */\n top: number;\n}\n\n/**\n * @since 7.0.0\n */\nexport interface SetBackgroundColorOptions {\n /**\n * The hexadecimal color to set as the background color of the status bar and navigation bar.\n *\n * @since 7.0.0\n * @example \"#ffffff\"\n * @example \"#000000\"\n */\n color: string;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,UAAU,GAAG,cAAc,CAAmB,YAAY,EAAE,EAAE,CAAC,CAAC;AAEtE,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,UAAU,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { EdgeToEdgePlugin } from './definitions';\n\nconst EdgeToEdge = registerPlugin<EdgeToEdgePlugin>('EdgeToEdge', {});\n\nexport * from './definitions';\nexport { EdgeToEdge };\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst EdgeToEdge = registerPlugin('EdgeToEdge', {});\nexport * from './definitions';\nexport { EdgeToEdge };\n//# sourceMappingURL=index.js.map"],"names":["registerPlugin"],"mappings":";;;;AACK,MAAC,UAAU,GAAGA,mBAAc,CAAC,YAAY,EAAE,EAAE;;;;"}
|
package/dist/plugin.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst EdgeToEdge = registerPlugin('EdgeToEdge', {});\nexport * from './definitions';\nexport { EdgeToEdge };\n//# sourceMappingURL=index.js.map"],"names":["registerPlugin"],"mappings":";;;AACK,OAAC,UAAU,GAAGA,mBAAc,CAAC,YAAY,EAAE,EAAE;;;;;;;;;;"}
|
package/package.json
ADDED
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@capawesome/capacitor-android-edge-to-edge-support",
|
|
3
|
+
"version": "7.0.0-dev.1765885034",
|
|
4
|
+
"description": "Capacitor plugin to support edge-to-edge display on Android.",
|
|
5
|
+
"main": "dist/plugin.cjs.js",
|
|
6
|
+
"module": "dist/esm/index.js",
|
|
7
|
+
"types": "dist/esm/index.d.ts",
|
|
8
|
+
"unpkg": "dist/plugin.js",
|
|
9
|
+
"files": [
|
|
10
|
+
"android/src/main/",
|
|
11
|
+
"android/build.gradle",
|
|
12
|
+
"dist/"
|
|
13
|
+
],
|
|
14
|
+
"author": "Robin Genz <mail@robingenz.dev>",
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"repository": {
|
|
17
|
+
"type": "git",
|
|
18
|
+
"url": "git+https://github.com/capawesome-team/capacitor-plugins.git"
|
|
19
|
+
},
|
|
20
|
+
"bugs": {
|
|
21
|
+
"url": "https://github.com/capawesome-team/capacitor-plugins/issues"
|
|
22
|
+
},
|
|
23
|
+
"funding": [
|
|
24
|
+
{
|
|
25
|
+
"type": "github",
|
|
26
|
+
"url": "https://github.com/sponsors/capawesome-team/"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"type": "opencollective",
|
|
30
|
+
"url": "https://opencollective.com/capawesome"
|
|
31
|
+
}
|
|
32
|
+
],
|
|
33
|
+
"homepage": "https://capawesome.io/plugins/android-edge-to-edge-support/",
|
|
34
|
+
"keywords": [
|
|
35
|
+
"capacitor",
|
|
36
|
+
"plugin",
|
|
37
|
+
"native"
|
|
38
|
+
],
|
|
39
|
+
"scripts": {
|
|
40
|
+
"verify": "npm run verify:android && npm run verify:web",
|
|
41
|
+
"verify:android": "cd android && ./gradlew clean build test && cd ..",
|
|
42
|
+
"verify:web": "npm run build",
|
|
43
|
+
"lint": "npm run prettier -- --check",
|
|
44
|
+
"fmt": "npm run prettier -- --write",
|
|
45
|
+
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
|
|
46
|
+
"docgen": "docgen --api EdgeToEdgePlugin --output-readme README.md --output-json dist/docs.json",
|
|
47
|
+
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
|
|
48
|
+
"clean": "rimraf ./dist",
|
|
49
|
+
"watch": "tsc --watch",
|
|
50
|
+
"prepublishOnly": "npm run build"
|
|
51
|
+
},
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"@capacitor/android": "8.0.0",
|
|
54
|
+
"@capacitor/cli": "8.0.0",
|
|
55
|
+
"@capacitor/core": "8.0.0",
|
|
56
|
+
"@capacitor/docgen": "0.3.1",
|
|
57
|
+
"prettier": "3.4.2",
|
|
58
|
+
"prettier-plugin-java": "2.6.7",
|
|
59
|
+
"rimraf": "6.1.2",
|
|
60
|
+
"rollup": "4.53.3",
|
|
61
|
+
"typescript": "5.9.3"
|
|
62
|
+
},
|
|
63
|
+
"peerDependencies": {
|
|
64
|
+
"@capacitor/core": ">=8.0.0"
|
|
65
|
+
},
|
|
66
|
+
"capacitor": {
|
|
67
|
+
"android": {
|
|
68
|
+
"src": "android"
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
"publishConfig": {
|
|
72
|
+
"access": "public"
|
|
73
|
+
}
|
|
74
|
+
}
|