@capgo/capacitor-navigation-bar 0.0.4 → 5.0.0
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 +5 -3
- package/android/build.gradle +9 -8
- package/android/src/main/AndroidManifest.xml +1 -1
- package/android/src/main/java/ee/forgr/capacitor_navigation_bar/NavigationBarPlugin.java +52 -47
- package/dist/docs.json +4 -4
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/index.d.ts +2 -2
- package/dist/esm/index.js +4 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/web.d.ts +2 -2
- package/dist/esm/web.js +4 -5
- package/dist/esm/web.js.map +1 -1
- package/dist/plugin.cjs.js +5 -8
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +6 -9
- package/dist/plugin.js.map +1 -1
- package/package.json +21 -17
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) COPYRIGHT_YEAR COPYRIGHT_HOLDER
|
|
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
CHANGED
|
@@ -30,23 +30,25 @@ npx cap sync
|
|
|
30
30
|
### setNavigationBarColor(...)
|
|
31
31
|
|
|
32
32
|
```typescript
|
|
33
|
-
setNavigationBarColor(options: { color: string; }) =>
|
|
33
|
+
setNavigationBarColor(options: { color: string; }) => any
|
|
34
34
|
```
|
|
35
35
|
|
|
36
36
|
| Param | Type |
|
|
37
37
|
| ------------- | ------------------------------- |
|
|
38
38
|
| **`options`** | <code>{ color: string; }</code> |
|
|
39
39
|
|
|
40
|
+
**Returns:** <code>any</code>
|
|
41
|
+
|
|
40
42
|
--------------------
|
|
41
43
|
|
|
42
44
|
|
|
43
45
|
### getNavigationBarColor()
|
|
44
46
|
|
|
45
47
|
```typescript
|
|
46
|
-
getNavigationBarColor() =>
|
|
48
|
+
getNavigationBarColor() => any
|
|
47
49
|
```
|
|
48
50
|
|
|
49
|
-
**Returns:** <code>
|
|
51
|
+
**Returns:** <code>any</code>
|
|
50
52
|
|
|
51
53
|
--------------------
|
|
52
54
|
|
package/android/build.gradle
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
ext {
|
|
2
2
|
junitVersion = project.hasProperty('junitVersion') ? rootProject.ext.junitVersion : '4.13.2'
|
|
3
|
-
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.
|
|
4
|
-
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.
|
|
5
|
-
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.
|
|
3
|
+
androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.6.1'
|
|
4
|
+
androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.5'
|
|
5
|
+
androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.5.1'
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
buildscript {
|
|
@@ -11,17 +11,18 @@ buildscript {
|
|
|
11
11
|
mavenCentral()
|
|
12
12
|
}
|
|
13
13
|
dependencies {
|
|
14
|
-
classpath 'com.android.tools.build:gradle:
|
|
14
|
+
classpath 'com.android.tools.build:gradle:8.0.0'
|
|
15
15
|
}
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
apply plugin: 'com.android.library'
|
|
19
19
|
|
|
20
20
|
android {
|
|
21
|
-
|
|
21
|
+
namespace "ee.forgr.capacitor_navigation_bar"
|
|
22
|
+
compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 33
|
|
22
23
|
defaultConfig {
|
|
23
24
|
minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
|
|
24
|
-
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion :
|
|
25
|
+
targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 33
|
|
25
26
|
versionCode 1
|
|
26
27
|
versionName "1.0"
|
|
27
28
|
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
@@ -36,8 +37,8 @@ android {
|
|
|
36
37
|
abortOnError false
|
|
37
38
|
}
|
|
38
39
|
compileOptions {
|
|
39
|
-
sourceCompatibility JavaVersion.
|
|
40
|
-
targetCompatibility JavaVersion.
|
|
40
|
+
sourceCompatibility JavaVersion.VERSION_17
|
|
41
|
+
targetCompatibility JavaVersion.VERSION_17
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
|
|
@@ -1,63 +1,68 @@
|
|
|
1
1
|
package ee.forgr.capacitor_navigation_bar;
|
|
2
2
|
|
|
3
3
|
import android.os.Build;
|
|
4
|
-
|
|
5
4
|
import com.getcapacitor.JSObject;
|
|
6
5
|
import com.getcapacitor.Plugin;
|
|
7
6
|
import com.getcapacitor.PluginCall;
|
|
8
7
|
import com.getcapacitor.PluginMethod;
|
|
9
|
-
import com.getcapacitor.util.WebColor;
|
|
10
8
|
import com.getcapacitor.annotation.CapacitorPlugin;
|
|
9
|
+
import com.getcapacitor.util.WebColor;
|
|
11
10
|
import java.util.Locale;
|
|
12
11
|
|
|
13
12
|
@CapacitorPlugin(name = "NavigationBar")
|
|
14
13
|
public class NavigationBarPlugin extends Plugin {
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
getBridge()
|
|
25
|
-
.executeOnMainThread(
|
|
26
|
-
() -> {
|
|
27
|
-
try {
|
|
28
|
-
final int parsedColor = WebColor.parseColor(color.toUpperCase(Locale.ROOT));
|
|
29
|
-
if (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
|
|
30
|
-
getActivity().getWindow().setNavigationBarColor(parsedColor);
|
|
31
|
-
}
|
|
32
|
-
call.resolve();
|
|
33
|
-
} catch (IllegalArgumentException ex) {
|
|
34
|
-
call.reject("Invalid color provided. Must be a hex string (ex: #ff0000");
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
);
|
|
15
|
+
@PluginMethod
|
|
16
|
+
public void setNavigationBarColor(PluginCall call) {
|
|
17
|
+
final String color = call.getString("color");
|
|
18
|
+
if (color == null) {
|
|
19
|
+
call.reject("Color must be provided");
|
|
20
|
+
return;
|
|
38
21
|
}
|
|
39
22
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
23
|
+
getBridge()
|
|
24
|
+
.executeOnMainThread(() -> {
|
|
25
|
+
try {
|
|
26
|
+
final int parsedColor = WebColor.parseColor(
|
|
27
|
+
color.toUpperCase(Locale.ROOT)
|
|
28
|
+
);
|
|
29
|
+
if (
|
|
30
|
+
android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP
|
|
31
|
+
) {
|
|
32
|
+
getActivity().getWindow().setNavigationBarColor(parsedColor);
|
|
33
|
+
}
|
|
34
|
+
call.resolve();
|
|
35
|
+
} catch (IllegalArgumentException ex) {
|
|
36
|
+
call.reject(
|
|
37
|
+
"Invalid color provided. Must be a hex string (ex: #ff0000"
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
@PluginMethod
|
|
44
|
+
public void getNavigationBarColor(PluginCall call) {
|
|
45
|
+
getBridge()
|
|
46
|
+
.executeOnMainThread(() -> {
|
|
47
|
+
try {
|
|
48
|
+
if (
|
|
49
|
+
android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP
|
|
50
|
+
) {
|
|
51
|
+
JSObject ret = new JSObject();
|
|
52
|
+
int intColor = getActivity().getWindow().getNavigationBarColor();
|
|
53
|
+
String hexColor = String.format("#%06X", (0xFFFFFF & intColor));
|
|
54
|
+
ret.put("color", hexColor);
|
|
55
|
+
call.resolve(ret);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
JSObject ret = new JSObject();
|
|
59
|
+
ret.put("color", "#000000");
|
|
60
|
+
call.resolve(ret);
|
|
61
|
+
} catch (IllegalArgumentException ex) {
|
|
62
|
+
call.reject(
|
|
63
|
+
"Invalid color provided. Must be a hex string (ex: #ff0000"
|
|
64
|
+
);
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
}
|
|
63
68
|
}
|
package/dist/docs.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"methods": [
|
|
8
8
|
{
|
|
9
9
|
"name": "setNavigationBarColor",
|
|
10
|
-
"signature": "(options: { color: string; }) =>
|
|
10
|
+
"signature": "(options: { color: string; }) => any",
|
|
11
11
|
"parameters": [
|
|
12
12
|
{
|
|
13
13
|
"name": "options",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"type": "{ color: string; }"
|
|
16
16
|
}
|
|
17
17
|
],
|
|
18
|
-
"returns": "
|
|
18
|
+
"returns": "any",
|
|
19
19
|
"tags": [],
|
|
20
20
|
"docs": "",
|
|
21
21
|
"complexTypes": [],
|
|
@@ -23,9 +23,9 @@
|
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"name": "getNavigationBarColor",
|
|
26
|
-
"signature": "() =>
|
|
26
|
+
"signature": "() => any",
|
|
27
27
|
"parameters": [],
|
|
28
|
-
"returns": "
|
|
28
|
+
"returns": "any",
|
|
29
29
|
"tags": [],
|
|
30
30
|
"docs": "",
|
|
31
31
|
"complexTypes": [],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":""
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":""}
|
package/dist/esm/index.d.ts
CHANGED
package/dist/esm/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { registerPlugin } from
|
|
2
|
-
const NavigationBar = registerPlugin(
|
|
3
|
-
web: () => import(
|
|
1
|
+
import { registerPlugin } from "@capacitor/core";
|
|
2
|
+
const NavigationBar = registerPlugin("NavigationBar", {
|
|
3
|
+
web: () => import("./web").then((m) => new m.NavigationBarWeb()),
|
|
4
4
|
});
|
|
5
|
-
export * from
|
|
5
|
+
export * from "./definitions";
|
|
6
6
|
export { NavigationBar };
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,aAAa,GAAG,cAAc,CAAsB,eAAe,EAAE;IACzE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,gBAAgB,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,MAAM,aAAa,GAAG,cAAc,CAAsB,eAAe,EAAE;IACzE,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,gBAAgB,EAAE,CAAC;CACjE,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,CAAC"}
|
package/dist/esm/web.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { WebPlugin } from
|
|
2
|
-
import type { NavigationBarPlugin } from
|
|
1
|
+
import { WebPlugin } from "@capacitor/core";
|
|
2
|
+
import type { NavigationBarPlugin } from "./definitions";
|
|
3
3
|
export declare class NavigationBarWeb extends WebPlugin implements NavigationBarPlugin {
|
|
4
4
|
setNavigationBarColor(options: {
|
|
5
5
|
color: string;
|
package/dist/esm/web.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
import { WebPlugin } from
|
|
1
|
+
import { WebPlugin } from "@capacitor/core";
|
|
2
2
|
export class NavigationBarWeb extends WebPlugin {
|
|
3
3
|
async setNavigationBarColor(options) {
|
|
4
|
-
console.log(
|
|
4
|
+
console.log("Cannot setNavigationBarColor on web", options);
|
|
5
5
|
return;
|
|
6
6
|
}
|
|
7
|
-
;
|
|
8
7
|
async getNavigationBarColor() {
|
|
9
|
-
console.log(
|
|
10
|
-
return { color:
|
|
8
|
+
console.log("Cannot getNavigationBarColor on web");
|
|
9
|
+
return { color: "#000000" };
|
|
11
10
|
}
|
|
12
11
|
}
|
|
13
12
|
//# sourceMappingURL=web.js.map
|
package/dist/esm/web.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,gBAAiB,SAAQ,SAAS;IAC7C,KAAK,CAAC,qBAAqB,CAAC,OAA0B;QACpD,OAAO,CAAC,GAAG,CAAC,qCAAqC,EAAE,OAAO,CAAC,CAAC;QAC5D,OAAO;IACT,CAAC;
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../../src/web.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,OAAO,gBAAiB,SAAQ,SAAS;IAC7C,KAAK,CAAC,qBAAqB,CAAC,OAA0B;QACpD,OAAO,CAAC,GAAG,CAAC,qCAAqC,EAAE,OAAO,CAAC,CAAC;QAC5D,OAAO;IACT,CAAC;IACD,KAAK,CAAC,qBAAqB;QACzB,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;QACnD,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;IAC9B,CAAC;CACF"}
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var core = require('@capacitor/core');
|
|
6
4
|
|
|
7
|
-
const NavigationBar = core.registerPlugin(
|
|
8
|
-
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.NavigationBarWeb()),
|
|
5
|
+
const NavigationBar = core.registerPlugin("NavigationBar", {
|
|
6
|
+
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.NavigationBarWeb()),
|
|
9
7
|
});
|
|
10
8
|
|
|
11
9
|
class NavigationBarWeb extends core.WebPlugin {
|
|
12
10
|
async setNavigationBarColor(options) {
|
|
13
|
-
console.log(
|
|
11
|
+
console.log("Cannot setNavigationBarColor on web", options);
|
|
14
12
|
return;
|
|
15
13
|
}
|
|
16
|
-
;
|
|
17
14
|
async getNavigationBarColor() {
|
|
18
|
-
console.log(
|
|
19
|
-
return { color:
|
|
15
|
+
console.log("Cannot getNavigationBarColor on web");
|
|
16
|
+
return { color: "#000000" };
|
|
20
17
|
}
|
|
21
18
|
}
|
|
22
19
|
|
package/dist/plugin.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from \"@capacitor/core\";\nconst NavigationBar = registerPlugin(\"NavigationBar\", {\n web: () => import(\"./web\").then((m) => new m.NavigationBarWeb()),\n});\nexport * from \"./definitions\";\nexport { NavigationBar };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from \"@capacitor/core\";\nexport class NavigationBarWeb extends WebPlugin {\n async setNavigationBarColor(options) {\n console.log(\"Cannot setNavigationBarColor on web\", options);\n return;\n }\n async getNavigationBarColor() {\n console.log(\"Cannot getNavigationBarColor on web\");\n return { color: \"#000000\" };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,aAAa,GAAGA,mBAAc,CAAC,eAAe,EAAE;AACtD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,gBAAgB,EAAE,CAAC;AACpE,CAAC;;ACFM,MAAM,gBAAgB,SAASC,cAAS,CAAC;AAChD,IAAI,MAAM,qBAAqB,CAAC,OAAO,EAAE;AACzC,QAAQ,OAAO,CAAC,GAAG,CAAC,qCAAqC,EAAE,OAAO,CAAC,CAAC;AACpE,QAAQ,OAAO;AACf,KAAK;AACL,IAAI,MAAM,qBAAqB,GAAG;AAClC,QAAQ,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;AAC3D,QAAQ,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;AACpC,KAAK;AACL;;;;;;;;;"}
|
package/dist/plugin.js
CHANGED
|
@@ -1,19 +1,18 @@
|
|
|
1
|
-
var
|
|
1
|
+
var capacitorCapacitorUpdater = (function (exports, core) {
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
const NavigationBar = core.registerPlugin(
|
|
5
|
-
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.NavigationBarWeb()),
|
|
4
|
+
const NavigationBar = core.registerPlugin("NavigationBar", {
|
|
5
|
+
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.NavigationBarWeb()),
|
|
6
6
|
});
|
|
7
7
|
|
|
8
8
|
class NavigationBarWeb extends core.WebPlugin {
|
|
9
9
|
async setNavigationBarColor(options) {
|
|
10
|
-
console.log(
|
|
10
|
+
console.log("Cannot setNavigationBarColor on web", options);
|
|
11
11
|
return;
|
|
12
12
|
}
|
|
13
|
-
;
|
|
14
13
|
async getNavigationBarColor() {
|
|
15
|
-
console.log(
|
|
16
|
-
return { color:
|
|
14
|
+
console.log("Cannot getNavigationBarColor on web");
|
|
15
|
+
return { color: "#000000" };
|
|
17
16
|
}
|
|
18
17
|
}
|
|
19
18
|
|
|
@@ -24,8 +23,6 @@ var capacitorNavigationBar = (function (exports, core) {
|
|
|
24
23
|
|
|
25
24
|
exports.NavigationBar = NavigationBar;
|
|
26
25
|
|
|
27
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
28
|
-
|
|
29
26
|
return exports;
|
|
30
27
|
|
|
31
28
|
})({}, capacitorExports);
|
package/dist/plugin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from \"@capacitor/core\";\nconst NavigationBar = registerPlugin(\"NavigationBar\", {\n web: () => import(\"./web\").then((m) => new m.NavigationBarWeb()),\n});\nexport * from \"./definitions\";\nexport { NavigationBar };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from \"@capacitor/core\";\nexport class NavigationBarWeb extends WebPlugin {\n async setNavigationBarColor(options) {\n console.log(\"Cannot setNavigationBarColor on web\", options);\n return;\n }\n async getNavigationBarColor() {\n console.log(\"Cannot getNavigationBarColor on web\");\n return { color: \"#000000\" };\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,aAAa,GAAGA,mBAAc,CAAC,eAAe,EAAE;IACtD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,gBAAgB,EAAE,CAAC;IACpE,CAAC;;ICFM,MAAM,gBAAgB,SAASC,cAAS,CAAC;IAChD,IAAI,MAAM,qBAAqB,CAAC,OAAO,EAAE;IACzC,QAAQ,OAAO,CAAC,GAAG,CAAC,qCAAqC,EAAE,OAAO,CAAC,CAAC;IACpE,QAAQ,OAAO;IACf,KAAK;IACL,IAAI,MAAM,qBAAqB,GAAG;IAClC,QAAQ,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;IAC3D,QAAQ,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;IACpC,KAAK;IACL;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/capacitor-navigation-bar",
|
|
3
|
-
"
|
|
4
|
-
"version": "0.0.4",
|
|
3
|
+
"version": "5.0.0",
|
|
5
4
|
"description": "Set navigation bar color for android lolipop and higher",
|
|
6
5
|
"main": "dist/plugin.cjs.js",
|
|
7
6
|
"module": "dist/esm/index.js",
|
|
@@ -38,32 +37,37 @@
|
|
|
38
37
|
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
|
|
39
38
|
"fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
|
|
40
39
|
"eslint": "eslint . --ext ts",
|
|
41
|
-
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
|
|
40
|
+
"prettier": "prettier --config .prettierrc.js \"**/*.{css,html,ts,js,java}\"",
|
|
42
41
|
"swiftlint": "node-swiftlint",
|
|
43
42
|
"docgen": "docgen --api NavigationBarPlugin --output-readme README.md --output-json dist/docs.json",
|
|
44
|
-
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.
|
|
43
|
+
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
|
|
45
44
|
"clean": "rimraf ./dist",
|
|
46
45
|
"watch": "tsc --watch",
|
|
47
46
|
"prepublishOnly": "npm run build"
|
|
48
47
|
},
|
|
49
48
|
"devDependencies": {
|
|
50
|
-
"@capacitor/android": "^
|
|
51
|
-
"@capacitor/
|
|
52
|
-
"@capacitor/
|
|
53
|
-
"@capacitor/
|
|
49
|
+
"@capacitor/android": "^5.0.3",
|
|
50
|
+
"@capacitor/cli": "^5.0.3",
|
|
51
|
+
"@capacitor/core": "^5.0.3",
|
|
52
|
+
"@capacitor/docgen": "^0.2.1",
|
|
53
|
+
"@capacitor/ios": "^5.0.3",
|
|
54
54
|
"@ionic/eslint-config": "^0.3.0",
|
|
55
|
-
"@ionic/prettier-config": "^
|
|
55
|
+
"@ionic/prettier-config": "^3.0.0",
|
|
56
56
|
"@ionic/swiftlint-config": "^1.1.2",
|
|
57
|
-
"eslint": "^
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"
|
|
61
|
-
"
|
|
62
|
-
"
|
|
63
|
-
"
|
|
57
|
+
"@typescript-eslint/eslint-plugin": "^5.59.7",
|
|
58
|
+
"@typescript-eslint/parser": "^5.59.7",
|
|
59
|
+
"eslint": "^8.41.0",
|
|
60
|
+
"eslint-plugin-import": "^2.27.5",
|
|
61
|
+
"husky": "^8.0.3",
|
|
62
|
+
"prettier": "^2.8.8",
|
|
63
|
+
"prettier-plugin-java": "^2.1.0",
|
|
64
|
+
"rimraf": "^5.0.1",
|
|
65
|
+
"rollup": "^3.23.0",
|
|
66
|
+
"swiftlint": "^1.0.2",
|
|
67
|
+
"typescript": "^5.0.4"
|
|
64
68
|
},
|
|
65
69
|
"peerDependencies": {
|
|
66
|
-
"@capacitor/core": "^
|
|
70
|
+
"@capacitor/core": "^5.0.0"
|
|
67
71
|
},
|
|
68
72
|
"prettier": "@ionic/prettier-config",
|
|
69
73
|
"swiftlint": "@ionic/swiftlint-config",
|