@capgo/capacitor-flash 7.0.12 → 7.0.18

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.
@@ -16,129 +16,118 @@ import com.getcapacitor.annotation.CapacitorPlugin;
16
16
  import com.getcapacitor.annotation.Permission;
17
17
  import com.getcapacitor.annotation.PermissionCallback;
18
18
 
19
- @CapacitorPlugin(
20
- name = "CapacitorFlash",
21
- permissions = {
22
- @Permission(alias = "camera", strings = { Manifest.permission.CAMERA }),
23
- }
24
- )
19
+ @CapacitorPlugin(name = "CapacitorFlash", permissions = { @Permission(alias = "camera", strings = { Manifest.permission.CAMERA }) })
25
20
  public class CapacitorFlashPlugin extends Plugin {
26
21
 
27
- private String cameraId;
28
- boolean isFlashStateOn = false;
22
+ private String cameraId;
23
+ boolean isFlashStateOn = false;
29
24
 
30
- private CameraManager cameraManager;
25
+ private CameraManager cameraManager;
31
26
 
32
- @Override
33
- public void load() {
34
- cameraManager = (CameraManager) this.bridge.getContext()
35
- .getSystemService(Context.CAMERA_SERVICE);
36
- try {
37
- if (cameraManager != null) {
38
- cameraId = cameraManager.getCameraIdList()[0];
39
- }
40
- } catch (CameraAccessException e) {
41
- e.printStackTrace();
27
+ @Override
28
+ public void load() {
29
+ cameraManager = (CameraManager) this.bridge.getContext().getSystemService(Context.CAMERA_SERVICE);
30
+ try {
31
+ if (cameraManager != null) {
32
+ cameraId = cameraManager.getCameraIdList()[0];
33
+ }
34
+ } catch (CameraAccessException e) {
35
+ e.printStackTrace();
36
+ }
42
37
  }
43
- }
44
38
 
45
- @PluginMethod
46
- public void isAvailable(PluginCall call) {
47
- if (
48
- Build.VERSION.SDK_INT <= Build.VERSION_CODES.M &&
49
- getPermissionState("camera") != PermissionState.GRANTED
50
- ) {
51
- requestPermissionForAlias("camera", call, "cameraPermsCallback");
52
- } else {
53
- getAvailibility(call);
39
+ @PluginMethod
40
+ public void isAvailable(PluginCall call) {
41
+ if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.M && getPermissionState("camera") != PermissionState.GRANTED) {
42
+ requestPermissionForAlias("camera", call, "cameraPermsCallback");
43
+ } else {
44
+ getAvailibility(call);
45
+ }
54
46
  }
55
- }
56
47
 
57
- @PermissionCallback
58
- private void getAvailibility(PluginCall call) {
59
- JSObject ret = new JSObject();
60
- if (cameraManager == null) {
61
- ret.put("value", false);
62
- call.resolve(ret);
63
- return;
48
+ @PermissionCallback
49
+ private void getAvailibility(PluginCall call) {
50
+ JSObject ret = new JSObject();
51
+ if (cameraManager == null) {
52
+ ret.put("value", false);
53
+ call.resolve(ret);
54
+ return;
55
+ }
56
+ try {
57
+ boolean flashAvailable = cameraManager.getCameraCharacteristics(cameraId).get(CameraCharacteristics.FLASH_INFO_AVAILABLE);
58
+ ret.put("value", flashAvailable);
59
+ } catch (CameraAccessException e) {
60
+ e.printStackTrace();
61
+ ret.put("value", false);
62
+ }
63
+ call.resolve(ret);
64
64
  }
65
- try {
66
- boolean flashAvailable = cameraManager
67
- .getCameraCharacteristics(cameraId)
68
- .get(CameraCharacteristics.FLASH_INFO_AVAILABLE);
69
- ret.put("value", flashAvailable);
70
- } catch (CameraAccessException e) {
71
- e.printStackTrace();
72
- ret.put("value", false);
73
- }
74
- call.resolve(ret);
75
- }
76
65
 
77
- @RequiresApi(api = Build.VERSION_CODES.M)
78
- @PluginMethod
79
- public void switchOn(PluginCall call) {
80
- String value = call.getString("instensity"); // cannot be use in android
81
- JSObject ret = new JSObject();
82
- if (cameraManager == null) {
83
- ret.put("value", false);
84
- call.resolve(ret);
85
- return;
86
- }
87
- try {
88
- cameraManager.setTorchMode(cameraId, true);
89
- isFlashStateOn = true;
90
- ret.put("value", true);
91
- } catch (Exception e) {
92
- e.printStackTrace();
93
- ret.put("value", false);
66
+ @RequiresApi(api = Build.VERSION_CODES.M)
67
+ @PluginMethod
68
+ public void switchOn(PluginCall call) {
69
+ String value = call.getString("instensity"); // cannot be use in android
70
+ JSObject ret = new JSObject();
71
+ if (cameraManager == null) {
72
+ ret.put("value", false);
73
+ call.resolve(ret);
74
+ return;
75
+ }
76
+ try {
77
+ cameraManager.setTorchMode(cameraId, true);
78
+ isFlashStateOn = true;
79
+ ret.put("value", true);
80
+ } catch (Exception e) {
81
+ e.printStackTrace();
82
+ ret.put("value", false);
83
+ }
84
+ call.resolve(ret);
94
85
  }
95
- call.resolve(ret);
96
- }
97
86
 
98
- @RequiresApi(api = Build.VERSION_CODES.M)
99
- @PluginMethod
100
- public void switchOff(PluginCall call) {
101
- JSObject ret = new JSObject();
102
- if (cameraManager == null) {
103
- ret.put("value", false);
104
- call.resolve(ret);
105
- return;
106
- }
107
- try {
108
- cameraManager.setTorchMode(cameraId, false);
109
- isFlashStateOn = false;
110
- ret.put("value", true);
111
- } catch (Exception e) {
112
- e.printStackTrace();
113
- ret.put("value", false);
87
+ @RequiresApi(api = Build.VERSION_CODES.M)
88
+ @PluginMethod
89
+ public void switchOff(PluginCall call) {
90
+ JSObject ret = new JSObject();
91
+ if (cameraManager == null) {
92
+ ret.put("value", false);
93
+ call.resolve(ret);
94
+ return;
95
+ }
96
+ try {
97
+ cameraManager.setTorchMode(cameraId, false);
98
+ isFlashStateOn = false;
99
+ ret.put("value", true);
100
+ } catch (Exception e) {
101
+ e.printStackTrace();
102
+ ret.put("value", false);
103
+ }
104
+ call.resolve(ret);
114
105
  }
115
- call.resolve(ret);
116
- }
117
106
 
118
- @PluginMethod
119
- public void isSwitchedOn(PluginCall call) {
120
- JSObject ret = new JSObject();
121
- ret.put("value", isFlashStateOn);
122
- call.resolve(ret);
123
- }
124
-
125
- @RequiresApi(api = Build.VERSION_CODES.M)
126
- @PluginMethod
127
- public void toggle(PluginCall call) {
128
- JSObject ret = new JSObject();
129
- if (cameraManager == null) {
130
- ret.put("value", false);
131
- call.resolve(ret);
132
- return;
107
+ @PluginMethod
108
+ public void isSwitchedOn(PluginCall call) {
109
+ JSObject ret = new JSObject();
110
+ ret.put("value", isFlashStateOn);
111
+ call.resolve(ret);
133
112
  }
134
- try {
135
- isFlashStateOn = !isFlashStateOn;
136
- cameraManager.setTorchMode(cameraId, isFlashStateOn);
137
- ret.put("value", isFlashStateOn);
138
- } catch (Exception e) {
139
- e.printStackTrace();
140
- ret.put("value", false);
113
+
114
+ @RequiresApi(api = Build.VERSION_CODES.M)
115
+ @PluginMethod
116
+ public void toggle(PluginCall call) {
117
+ JSObject ret = new JSObject();
118
+ if (cameraManager == null) {
119
+ ret.put("value", false);
120
+ call.resolve(ret);
121
+ return;
122
+ }
123
+ try {
124
+ isFlashStateOn = !isFlashStateOn;
125
+ cameraManager.setTorchMode(cameraId, isFlashStateOn);
126
+ ret.put("value", isFlashStateOn);
127
+ } catch (Exception e) {
128
+ e.printStackTrace();
129
+ ret.put("value", false);
130
+ }
131
+ call.resolve(ret);
141
132
  }
142
- call.resolve(ret);
143
- }
144
133
  }
@@ -1,4 +1,4 @@
1
- import type { CapacitorFlashPlugin } from "./definitions";
1
+ import type { CapacitorFlashPlugin } from './definitions';
2
2
  declare const CapacitorFlash: CapacitorFlashPlugin;
3
- export * from "./definitions";
3
+ export * from './definitions';
4
4
  export { CapacitorFlash };
package/dist/esm/index.js CHANGED
@@ -1,7 +1,7 @@
1
- import { registerPlugin } from "@capacitor/core";
2
- const CapacitorFlash = registerPlugin("CapacitorFlash", {
3
- web: () => import("./web").then((m) => new m.CapacitorFlashWeb()),
1
+ import { registerPlugin } from '@capacitor/core';
2
+ const CapacitorFlash = registerPlugin('CapacitorFlash', {
3
+ web: () => import('./web').then((m) => new m.CapacitorFlashWeb()),
4
4
  });
5
- export * from "./definitions";
5
+ export * from './definitions';
6
6
  export { CapacitorFlash };
7
7
  //# sourceMappingURL=index.js.map
package/dist/esm/web.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { WebPlugin } from "@capacitor/core";
2
- import type { CapacitorFlashPlugin } from "./definitions";
1
+ import { WebPlugin } from '@capacitor/core';
2
+ import type { CapacitorFlashPlugin } from './definitions';
3
3
  export declare class CapacitorFlashWeb extends WebPlugin implements CapacitorFlashPlugin {
4
4
  isAvailable(): Promise<{
5
5
  value: boolean;
package/dist/esm/web.js CHANGED
@@ -1,20 +1,20 @@
1
- import { WebPlugin } from "@capacitor/core";
1
+ import { WebPlugin } from '@capacitor/core';
2
2
  export class CapacitorFlashWeb extends WebPlugin {
3
3
  isAvailable() {
4
4
  return Promise.resolve({ value: false });
5
5
  }
6
6
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
7
7
  switchOn(_options) {
8
- throw new Error("Method not implemented.");
8
+ throw new Error('Method not implemented.');
9
9
  }
10
10
  switchOff() {
11
- throw new Error("Method not implemented.");
11
+ throw new Error('Method not implemented.');
12
12
  }
13
13
  isSwitchedOn() {
14
- throw new Error("Method not implemented.");
14
+ throw new Error('Method not implemented.');
15
15
  }
16
16
  toggle() {
17
- throw new Error("Method not implemented.");
17
+ throw new Error('Method not implemented.');
18
18
  }
19
19
  }
20
20
  //# sourceMappingURL=web.js.map
@@ -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,iBACX,SAAQ,SAAS;IAGjB,WAAW;QACT,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IAC3C,CAAC;IAED,6DAA6D;IAC7D,QAAQ,CAAC,QAAgC;QACvC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IAED,SAAS;QACP,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IAED,YAAY;QACV,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM;QACJ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,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,iBAAkB,SAAQ,SAAS;IAC9C,WAAW;QACT,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,CAAC;IAC3C,CAAC;IAED,6DAA6D;IAC7D,QAAQ,CAAC,QAAgC;QACvC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IAED,SAAS;QACP,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IAED,YAAY;QACV,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;IAED,MAAM;QACJ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC7C,CAAC;CACF"}
@@ -2,7 +2,7 @@
2
2
 
3
3
  var core = require('@capacitor/core');
4
4
 
5
- const CapacitorFlash = core.registerPlugin("CapacitorFlash", {
5
+ const CapacitorFlash = core.registerPlugin('CapacitorFlash', {
6
6
  web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.CapacitorFlashWeb()),
7
7
  });
8
8
 
@@ -12,16 +12,16 @@ class CapacitorFlashWeb extends core.WebPlugin {
12
12
  }
13
13
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
14
14
  switchOn(_options) {
15
- throw new Error("Method not implemented.");
15
+ throw new Error('Method not implemented.');
16
16
  }
17
17
  switchOff() {
18
- throw new Error("Method not implemented.");
18
+ throw new Error('Method not implemented.');
19
19
  }
20
20
  isSwitchedOn() {
21
- throw new Error("Method not implemented.");
21
+ throw new Error('Method not implemented.');
22
22
  }
23
23
  toggle() {
24
- throw new Error("Method not implemented.");
24
+ throw new Error('Method not implemented.');
25
25
  }
26
26
  }
27
27
 
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from \"@capacitor/core\";\nconst CapacitorFlash = registerPlugin(\"CapacitorFlash\", {\n web: () => import(\"./web\").then((m) => new m.CapacitorFlashWeb()),\n});\nexport * from \"./definitions\";\nexport { CapacitorFlash };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from \"@capacitor/core\";\nexport class CapacitorFlashWeb extends WebPlugin {\n isAvailable() {\n return Promise.resolve({ value: false });\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n switchOn(_options) {\n throw new Error(\"Method not implemented.\");\n }\n switchOff() {\n throw new Error(\"Method not implemented.\");\n }\n isSwitchedOn() {\n throw new Error(\"Method not implemented.\");\n }\n toggle() {\n throw new Error(\"Method not implemented.\");\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,cAAc,GAAGA,mBAAc,CAAC,gBAAgB,EAAE;AACxD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,iBAAiB,EAAE,CAAC;AACrE,CAAC;;ACFM,MAAM,iBAAiB,SAASC,cAAS,CAAC;AACjD,IAAI,WAAW,GAAG;AAClB,QAAQ,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;AAChD;AACA;AACA,IAAI,QAAQ,CAAC,QAAQ,EAAE;AACvB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;AAClD;AACA,IAAI,SAAS,GAAG;AAChB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;AAClD;AACA,IAAI,YAAY,GAAG;AACnB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;AAClD;AACA,IAAI,MAAM,GAAG;AACb,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;AAClD;AACA;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapacitorFlash = registerPlugin('CapacitorFlash', {\n web: () => import('./web').then((m) => new m.CapacitorFlashWeb()),\n});\nexport * from './definitions';\nexport { CapacitorFlash };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorFlashWeb extends WebPlugin {\n isAvailable() {\n return Promise.resolve({ value: false });\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n switchOn(_options) {\n throw new Error('Method not implemented.');\n }\n switchOff() {\n throw new Error('Method not implemented.');\n }\n isSwitchedOn() {\n throw new Error('Method not implemented.');\n }\n toggle() {\n throw new Error('Method not implemented.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,cAAc,GAAGA,mBAAc,CAAC,gBAAgB,EAAE;AACxD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,iBAAiB,EAAE,CAAC;AACrE,CAAC;;ACFM,MAAM,iBAAiB,SAASC,cAAS,CAAC;AACjD,IAAI,WAAW,GAAG;AAClB,QAAQ,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;AAChD,IAAI;AACJ;AACA,IAAI,QAAQ,CAAC,QAAQ,EAAE;AACvB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;AAClD,IAAI;AACJ,IAAI,SAAS,GAAG;AAChB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;AAClD,IAAI;AACJ,IAAI,YAAY,GAAG;AACnB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;AAClD,IAAI;AACJ,IAAI,MAAM,GAAG;AACb,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;AAClD,IAAI;AACJ;;;;;;;;;"}
package/dist/plugin.js CHANGED
@@ -1,7 +1,7 @@
1
1
  var capacitorCapacitorFlash = (function (exports, core) {
2
2
  'use strict';
3
3
 
4
- const CapacitorFlash = core.registerPlugin("CapacitorFlash", {
4
+ const CapacitorFlash = core.registerPlugin('CapacitorFlash', {
5
5
  web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.CapacitorFlashWeb()),
6
6
  });
7
7
 
@@ -11,16 +11,16 @@ var capacitorCapacitorFlash = (function (exports, core) {
11
11
  }
12
12
  // eslint-disable-next-line @typescript-eslint/no-unused-vars
13
13
  switchOn(_options) {
14
- throw new Error("Method not implemented.");
14
+ throw new Error('Method not implemented.');
15
15
  }
16
16
  switchOff() {
17
- throw new Error("Method not implemented.");
17
+ throw new Error('Method not implemented.');
18
18
  }
19
19
  isSwitchedOn() {
20
- throw new Error("Method not implemented.");
20
+ throw new Error('Method not implemented.');
21
21
  }
22
22
  toggle() {
23
- throw new Error("Method not implemented.");
23
+ throw new Error('Method not implemented.');
24
24
  }
25
25
  }
26
26
 
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from \"@capacitor/core\";\nconst CapacitorFlash = registerPlugin(\"CapacitorFlash\", {\n web: () => import(\"./web\").then((m) => new m.CapacitorFlashWeb()),\n});\nexport * from \"./definitions\";\nexport { CapacitorFlash };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from \"@capacitor/core\";\nexport class CapacitorFlashWeb extends WebPlugin {\n isAvailable() {\n return Promise.resolve({ value: false });\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n switchOn(_options) {\n throw new Error(\"Method not implemented.\");\n }\n switchOff() {\n throw new Error(\"Method not implemented.\");\n }\n isSwitchedOn() {\n throw new Error(\"Method not implemented.\");\n }\n toggle() {\n throw new Error(\"Method not implemented.\");\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,cAAc,GAAGA,mBAAc,CAAC,gBAAgB,EAAE;IACxD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,iBAAiB,EAAE,CAAC;IACrE,CAAC;;ICFM,MAAM,iBAAiB,SAASC,cAAS,CAAC;IACjD,IAAI,WAAW,GAAG;IAClB,QAAQ,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;IAChD;IACA;IACA,IAAI,QAAQ,CAAC,QAAQ,EAAE;IACvB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;IAClD;IACA,IAAI,SAAS,GAAG;IAChB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;IAClD;IACA,IAAI,YAAY,GAAG;IACnB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;IAClD;IACA,IAAI,MAAM,GAAG;IACb,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;IAClD;IACA;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst CapacitorFlash = registerPlugin('CapacitorFlash', {\n web: () => import('./web').then((m) => new m.CapacitorFlashWeb()),\n});\nexport * from './definitions';\nexport { CapacitorFlash };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class CapacitorFlashWeb extends WebPlugin {\n isAvailable() {\n return Promise.resolve({ value: false });\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n switchOn(_options) {\n throw new Error('Method not implemented.');\n }\n switchOff() {\n throw new Error('Method not implemented.');\n }\n isSwitchedOn() {\n throw new Error('Method not implemented.');\n }\n toggle() {\n throw new Error('Method not implemented.');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,cAAc,GAAGA,mBAAc,CAAC,gBAAgB,EAAE;IACxD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,iBAAiB,EAAE,CAAC;IACrE,CAAC;;ICFM,MAAM,iBAAiB,SAASC,cAAS,CAAC;IACjD,IAAI,WAAW,GAAG;IAClB,QAAQ,OAAO,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;IAChD,IAAI;IACJ;IACA,IAAI,QAAQ,CAAC,QAAQ,EAAE;IACvB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;IAClD,IAAI;IACJ,IAAI,SAAS,GAAG;IAChB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;IAClD,IAAI;IACJ,IAAI,YAAY,GAAG;IACnB,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;IAClD,IAAI;IACJ,IAAI,MAAM,GAAG;IACb,QAAQ,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC;IAClD,IAAI;IACJ;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-flash",
3
- "version": "7.0.12",
3
+ "version": "7.0.18",
4
4
  "description": "Switch the Flashlight / Torch of your device.",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -40,7 +40,7 @@
40
40
  "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
41
41
  "fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --autocorrect --format",
42
42
  "eslint": "eslint .",
43
- "prettier": "prettier --config .prettierrc.js \"**/*.{css,html,ts,js,java}\"",
43
+ "prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
44
44
  "swiftlint": "node-swiftlint",
45
45
  "docgen": "docgen --api CapacitorFlashPlugin --output-readme README.md --output-json dist/docs.json",
46
46
  "build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",