@capgo/capacitor-navigation-bar 6.1.75 → 7.1.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.
@@ -11,7 +11,7 @@ Pod::Spec.new do |s|
11
11
  s.author = package['author']
12
12
  s.source = { :git => package['repository']['url'], :tag => s.version.to_s }
13
13
  s.source_files = 'ios/Plugin/**/*.{swift,h,m,c,cc,mm,cpp}'
14
- s.ios.deployment_target = '13.0'
14
+ s.ios.deployment_target = '14.0'
15
15
  s.dependency 'Capacitor'
16
16
  s.swift_version = '5.1'
17
17
  end
package/README.md CHANGED
@@ -30,25 +30,23 @@ npx cap sync
30
30
  ### setNavigationBarColor(...)
31
31
 
32
32
  ```typescript
33
- setNavigationBarColor(options: { color: string; }) => any
33
+ setNavigationBarColor(options: { color: string; }) => Promise<void>
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
-
42
40
  --------------------
43
41
 
44
42
 
45
43
  ### getNavigationBarColor()
46
44
 
47
45
  ```typescript
48
- getNavigationBarColor() => any
46
+ getNavigationBarColor() => Promise<{ color: string; }>
49
47
  ```
50
48
 
51
- **Returns:** <code>any</code>
49
+ **Returns:** <code>Promise&lt;{ color: string; }&gt;</code>
52
50
 
53
51
  --------------------
54
52
 
@@ -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.6.1'
4
- androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.1.5'
5
- androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.5.1'
3
+ androidxAppCompatVersion = project.hasProperty('androidxAppCompatVersion') ? rootProject.ext.androidxAppCompatVersion : '1.7.0'
4
+ androidxJunitVersion = project.hasProperty('androidxJunitVersion') ? rootProject.ext.androidxJunitVersion : '1.2.1'
5
+ androidxEspressoCoreVersion = project.hasProperty('androidxEspressoCoreVersion') ? rootProject.ext.androidxEspressoCoreVersion : '3.6.1'
6
6
  }
7
7
 
8
8
  buildscript {
@@ -19,10 +19,10 @@ apply plugin: 'com.android.library'
19
19
 
20
20
  android {
21
21
  namespace "ee.forgr.capacitor_navigation_bar"
22
- compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 34
22
+ compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 35
23
23
  defaultConfig {
24
- minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
25
- targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 34
24
+ minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 23
25
+ targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 35
26
26
  versionCode 1
27
27
  versionName "1.0"
28
28
  testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -37,8 +37,8 @@ android {
37
37
  abortOnError false
38
38
  }
39
39
  compileOptions {
40
- sourceCompatibility JavaVersion.VERSION_17
41
- targetCompatibility JavaVersion.VERSION_17
40
+ sourceCompatibility JavaVersion.VERSION_21
41
+ targetCompatibility JavaVersion.VERSION_21
42
42
  }
43
43
  }
44
44
 
package/dist/docs.json CHANGED
@@ -7,7 +7,7 @@
7
7
  "methods": [
8
8
  {
9
9
  "name": "setNavigationBarColor",
10
- "signature": "(options: { color: string; }) => any",
10
+ "signature": "(options: { color: string; }) => Promise<void>",
11
11
  "parameters": [
12
12
  {
13
13
  "name": "options",
@@ -15,7 +15,7 @@
15
15
  "type": "{ color: string; }"
16
16
  }
17
17
  ],
18
- "returns": "any",
18
+ "returns": "Promise<void>",
19
19
  "tags": [],
20
20
  "docs": "",
21
21
  "complexTypes": [],
@@ -23,9 +23,9 @@
23
23
  },
24
24
  {
25
25
  "name": "getNavigationBarColor",
26
- "signature": "() => any",
26
+ "signature": "() => Promise<{ color: string; }>",
27
27
  "parameters": [],
28
- "returns": "any",
28
+ "returns": "Promise<{ color: string; }>",
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":"","sourcesContent":["export interface NavigationBarPlugin {\n setNavigationBarColor(options: { color: string }): Promise<void>;\n getNavigationBarColor(): Promise<{ color: string }>;\n}\n"]}
@@ -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,EAAE,CAAC,IAAI,CAAC,CAAC,gBAAgB,EAAE,CAAC;CACjE,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,aAAa,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","sourcesContent":["import { registerPlugin } from \"@capacitor/core\";\n\nimport type { NavigationBarPlugin } from \"./definitions\";\n\nconst NavigationBar = registerPlugin<NavigationBarPlugin>(\"NavigationBar\", {\n web: () => import(\"./web\").then((m) => new m.NavigationBarWeb()),\n});\n\nexport * from \"./definitions\";\nexport { NavigationBar };\n"]}
@@ -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;IACD,KAAK,CAAC,qBAAqB;QACzB,OAAO,CAAC,GAAG,CAAC,qCAAqC,CAAC,CAAC;QACnD,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;IAC9B,CAAC;CACF"}
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","sourcesContent":["import { WebPlugin } from \"@capacitor/core\";\n\nimport type { NavigationBarPlugin } from \"./definitions\";\n\nexport class NavigationBarWeb extends WebPlugin implements NavigationBarPlugin {\n async setNavigationBarColor(options: { color: string }): Promise<void> {\n console.log(\"Cannot setNavigationBarColor on web\", options);\n return;\n }\n async getNavigationBarColor(): Promise<{ color: string }> {\n console.log(\"Cannot getNavigationBarColor on web\");\n return { color: \"#000000\" };\n }\n}\n"]}
package/dist/plugin.js CHANGED
@@ -1,4 +1,4 @@
1
- var capacitorCapacitorUpdater = (function (exports, core) {
1
+ var NavigationBarPlugin = (function (exports, core) {
2
2
  'use strict';
3
3
 
4
4
  const NavigationBar = core.registerPlugin("NavigationBar", {
@@ -7,18 +7,19 @@ import Capacitor
7
7
  */
8
8
  @objc(NavigationBarPlugin)
9
9
  public class NavigationBarPlugin: CAPPlugin {
10
-
10
+ public let identifier = "NavigationBarPlugin"
11
+ public let jsName = "NavigationBar"
12
+ public let pluginMethods: [CAPPluginMethod] = [
13
+ CAPPluginMethod(name: "setNavigationBarColor", returnType: CAPPluginReturnPromise),
14
+ CAPPluginMethod(name: "getNavigationBarColor", returnType: CAPPluginReturnPromise),
15
+ ]
11
16
  @objc func setNavigationBarColor(_ call: CAPPluginCall) {
12
17
  let color = call.getString("color") ?? ""
13
18
  print("Cannot set navigation bar color in ios \(color)")
14
- call.resolve([
15
- "value": false
16
- ])
19
+ call.reject("Cannot set navigation bar color in ios")
17
20
  }
18
21
  @objc func getNavigationBarColor(_ call: CAPPluginCall) {
19
22
  print("Cannot get navigation bar color in ios")
20
- call.resolve([
21
- "color": "#000000"
22
- ])
23
+ call.reject("Cannot get navigation bar color in ios")
23
24
  }
24
25
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-navigation-bar",
3
- "version": "6.1.75",
3
+ "version": "7.1.0",
4
4
  "description": "Set navigation bar color for android lolipop and higher",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -13,7 +13,7 @@
13
13
  "ios/Plugin/",
14
14
  "CapgoCapacitorNavigationBar.podspec"
15
15
  ],
16
- "author": "Martin Donadieu <martindonadieu@gmail.com>",
16
+ "author": "Cap-go <contact@capgo.app>",
17
17
  "license": "MIT",
18
18
  "repository": {
19
19
  "type": "git",
@@ -31,11 +31,11 @@
31
31
  ],
32
32
  "scripts": {
33
33
  "verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
34
- "verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..",
34
+ "verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -sdk iphoneos -scheme Plugin && cd ..",
35
35
  "verify:android": "cd android && ./gradlew clean build test && cd ..",
36
36
  "verify:web": "npm run build",
37
37
  "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
38
- "fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
38
+ "fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --autocorrect --format",
39
39
  "eslint": "eslint .",
40
40
  "prettier": "prettier --config .prettierrc.js \"**/*.{css,html,ts,js,java}\"",
41
41
  "swiftlint": "node-swiftlint",
@@ -46,28 +46,30 @@
46
46
  "prepublishOnly": "npm run build"
47
47
  },
48
48
  "devDependencies": {
49
- "@capacitor/android": "^6.0.0",
50
- "@capacitor/cli": "^6.0.0",
51
- "@capacitor/core": "^6.0.0",
52
- "@capacitor/docgen": "^0.2.2",
53
- "@capacitor/ios": "^6.0.0",
54
- "@ionic/eslint-config": "^0.3.0",
49
+ "@capacitor/android": "^7.0.0",
50
+ "@capacitor/cli": "^7.0.0",
51
+ "@capacitor/core": "^7.0.0",
52
+ "@capacitor/docgen": "^0.3.0",
53
+ "@capacitor/ios": "^7.0.0",
54
+ "@ionic/eslint-config": "^0.4.0",
55
55
  "@ionic/prettier-config": "^4.0.0",
56
- "@ionic/swiftlint-config": "^1.1.2",
57
- "@typescript-eslint/eslint-plugin": "^7.8.0",
58
- "@typescript-eslint/parser": "^7.8.0",
59
- "eslint": "^9.1.1",
60
- "eslint-plugin-import": "^2.29.1",
61
- "husky": "^9.0.11",
62
- "prettier": "^3.2.5",
63
- "prettier-plugin-java": "^2.6.0",
64
- "rimraf": "^5.0.5",
65
- "rollup": "^4.17.1",
66
- "swiftlint": "^1.0.2",
67
- "typescript": "^5.4.5"
56
+ "@ionic/swiftlint-config": "^2.0.0",
57
+ "@types/node": "^22.13.1",
58
+ "eslint": "^8.57.0",
59
+ "eslint-plugin-import": "^2.31.0",
60
+ "husky": "^9.1.7",
61
+ "prettier": "^3.4.2",
62
+ "prettier-plugin-java": "^2.6.7",
63
+ "rimraf": "^6.0.1",
64
+ "rollup": "^4.34.6",
65
+ "swiftlint": "^2.0.0",
66
+ "typescript": "^5.7.3"
68
67
  },
69
68
  "peerDependencies": {
70
- "@capacitor/core": "^6.0.0"
69
+ "@capacitor/core": ">=7.0.0"
70
+ },
71
+ "eslintConfig": {
72
+ "extends": "@ionic/eslint-config/recommended"
71
73
  },
72
74
  "prettier": "@ionic/prettier-config",
73
75
  "swiftlint": "@ionic/swiftlint-config",