@gachlab/capacitor-dnd-plugin 1.2.0 → 1.4.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/Package.swift ADDED
@@ -0,0 +1,26 @@
1
+ // swift-tools-version: 5.9
2
+ import PackageDescription
3
+
4
+ let package = Package(
5
+ name: "GachlabCapacitorDndPlugin",
6
+ platforms: [.iOS(.v14)],
7
+ products: [
8
+ .library(
9
+ name: "GachlabCapacitorDndPlugin",
10
+ targets: ["DoNotDisturbPlugin"])
11
+ ],
12
+ dependencies: [
13
+ .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", branch: "main")
14
+ ],
15
+ targets: [
16
+ .target(
17
+ name: "DoNotDisturbPlugin",
18
+ dependencies: [
19
+ .product(name: "Capacitor", package: "capacitor-swift-pm"),
20
+ .product(name: "Cordova", package: "capacitor-swift-pm")
21
+ ],
22
+ path: "ios/Plugin",
23
+ sources: ["DoNotDisturb.swift", "DoNotDisturbPlugin.swift"],
24
+ publicHeadersPath: "Public")
25
+ ]
26
+ )
package/README.md CHANGED
@@ -14,6 +14,7 @@ npx cap sync
14
14
  <docgen-index>
15
15
 
16
16
  * [`monitor()`](#monitor)
17
+ * [`set(...)`](#set)
17
18
 
18
19
  </docgen-index>
19
20
 
@@ -30,4 +31,17 @@ monitor() => Promise<{ enabled: boolean; }>
30
31
 
31
32
  --------------------
32
33
 
34
+
35
+ ### set(...)
36
+
37
+ ```typescript
38
+ set(options: { enabled: boolean; }) => Promise<void>
39
+ ```
40
+
41
+ | Param | Type |
42
+ | ------------- | ---------------------------------- |
43
+ | **`options`** | <code>{ enabled: boolean; }</code> |
44
+
45
+ --------------------
46
+
33
47
  </docgen-api>
@@ -20,6 +20,14 @@ public class DoNotDisturb {
20
20
  return nm.getCurrentInterruptionFilter() != NotificationManager.INTERRUPTION_FILTER_ALL;
21
21
  }
22
22
 
23
+ public void setEnabled(boolean enabled) {
24
+ NotificationManager nm = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
25
+ if (!nm.isNotificationPolicyAccessGranted()) {
26
+ return;
27
+ }
28
+ nm.setInterruptionFilter(enabled ? NotificationManager.INTERRUPTION_FILTER_NONE : NotificationManager.INTERRUPTION_FILTER_ALL);
29
+ }
30
+
23
31
  public void startListening(Runnable callback) {
24
32
  this.callback = callback;
25
33
  receiver = new BroadcastReceiver() {
@@ -1,6 +1,10 @@
1
1
  package com.gachlab.capacitor.dnd;
2
2
 
3
3
  import android.Manifest;
4
+ import android.app.NotificationManager;
5
+ import android.content.Context;
6
+ import android.content.Intent;
7
+ import android.provider.Settings;
4
8
 
5
9
  import com.getcapacitor.JSObject;
6
10
  import com.getcapacitor.Plugin;
@@ -28,11 +32,33 @@ public class DoNotDisturbPlugin extends Plugin {
28
32
 
29
33
  @PluginMethod
30
34
  public void monitor(PluginCall call) {
35
+ NotificationManager nm = (NotificationManager) getContext().getSystemService(Context.NOTIFICATION_SERVICE);
36
+ if (!nm.isNotificationPolicyAccessGranted()) {
37
+ Intent intent = new Intent(Settings.ACTION_NOTIFICATION_POLICY_ACCESS_SETTINGS);
38
+ getActivity().startActivity(intent);
39
+ }
31
40
  JSObject ret = new JSObject();
32
41
  ret.put("enabled", implementation.isEnabled());
33
42
  call.resolve(ret);
34
43
  }
35
44
 
45
+ @PluginMethod
46
+ public void set(PluginCall call) {
47
+ boolean enabled = call.getBoolean("enabled", false);
48
+ NotificationManager nm = (NotificationManager) getContext().getSystemService(Context.NOTIFICATION_SERVICE);
49
+ if (!nm.isNotificationPolicyAccessGranted()) {
50
+ call.reject("Permission required: Go to Settings > Apps > [App Name] > Permissions > Do Not Disturb access");
51
+ return;
52
+ }
53
+ implementation.setEnabled(enabled);
54
+ JSObject ret = new JSObject();
55
+ ret.put("enabled", implementation.isEnabled());
56
+ notifyListeners("monitor", ret);
57
+ call.resolve();
58
+ }
59
+
60
+
61
+
36
62
  @Override
37
63
  protected void handleOnDestroy() {
38
64
  if (implementation != null) {
@@ -2,4 +2,7 @@ export interface DoNotDisturbPlugin {
2
2
  monitor(): Promise<{
3
3
  enabled: boolean;
4
4
  }>;
5
+ set(options: {
6
+ enabled: boolean;
7
+ }): Promise<void>;
5
8
  }
package/dist/esm/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { registerPlugin as o } from "@capacitor/core";
2
2
  const e = o("DoNotDisturb", {
3
- web: () => import("../web-DRkBjitQ.mjs").then((t) => new t.DoNotDisturbWeb())
3
+ web: () => import("../web-CTERRVO0.mjs").then((t) => new t.DoNotDisturbWeb())
4
4
  });
5
5
  export {
6
6
  e as DoNotDisturb
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { DoNotDisturbPlugin } from './definitions';\n\nconst DoNotDisturb = registerPlugin<DoNotDisturbPlugin>('DoNotDisturb', {\n web: () => import('./web').then(m => new m.DoNotDisturbWeb()),\n});\n\nexport * from './definitions';\nexport { DoNotDisturb };\n"],"names":["DoNotDisturb","registerPlugin","m"],"mappings":";AAIM,MAAAA,IAAeC,EAAmC,gBAAgB;AAAA,EACtE,KAAK,MAAM,OAAO,qBAAO,EAAE,KAAK,CAAKC,MAAA,IAAIA,EAAE,gBAAiB,CAAA;AAC9D,CAAC;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { DoNotDisturbPlugin } from './definitions';\n\nconst DoNotDisturb = registerPlugin<DoNotDisturbPlugin>('DoNotDisturb', {\n web: () => import('./web').then(m => new m.DoNotDisturbWeb()),\n});\n\nexport * from './definitions';\nexport { DoNotDisturb };\n"],"names":["DoNotDisturb","registerPlugin","m"],"mappings":";AAIA,MAAMA,IAAeC,EAAmC,gBAAgB;AAAA,EACtE,KAAK,MAAM,OAAO,qBAAO,EAAE,KAAK,CAAAC,MAAK,IAAIA,EAAE,gBAAA,CAAiB;AAC9D,CAAC;"}
package/dist/esm/web.d.ts CHANGED
@@ -4,4 +4,7 @@ export declare class DoNotDisturbWeb extends WebPlugin implements DoNotDisturbPl
4
4
  monitor(): Promise<{
5
5
  enabled: boolean;
6
6
  }>;
7
+ set(_options: {
8
+ enabled: boolean;
9
+ }): Promise<void>;
7
10
  }
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@capacitor/core"),o=t.registerPlugin("DoNotDisturb",{web:()=>Promise.resolve().then(()=>require("./web-BMdZ0HQI.js")).then(e=>new e.DoNotDisturbWeb)});exports.DoNotDisturb=o;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("@capacitor/core"),o=t.registerPlugin("DoNotDisturb",{web:()=>Promise.resolve().then(()=>require("./web-CK137vPX.js")).then(e=>new e.DoNotDisturbWeb)});exports.DoNotDisturb=o;
2
2
  //# sourceMappingURL=plugin.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["../src/index.ts"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { DoNotDisturbPlugin } from './definitions';\n\nconst DoNotDisturb = registerPlugin<DoNotDisturbPlugin>('DoNotDisturb', {\n web: () => import('./web').then(m => new m.DoNotDisturbWeb()),\n});\n\nexport * from './definitions';\nexport { DoNotDisturb };\n"],"names":["DoNotDisturb","registerPlugin","m"],"mappings":"mHAIMA,EAAeC,iBAAmC,eAAgB,CACtE,IAAK,IAAM,QAAO,QAAA,EAAA,KAAA,IAAA,QAAA,mBAAO,GAAE,KAAUC,GAAA,IAAIA,EAAE,eAAiB,CAC9D,CAAC"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["../src/index.ts"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { DoNotDisturbPlugin } from './definitions';\n\nconst DoNotDisturb = registerPlugin<DoNotDisturbPlugin>('DoNotDisturb', {\n web: () => import('./web').then(m => new m.DoNotDisturbWeb()),\n});\n\nexport * from './definitions';\nexport { DoNotDisturb };\n"],"names":["DoNotDisturb","registerPlugin","m"],"mappings":"mHAIMA,EAAeC,EAAAA,eAAmC,eAAgB,CACtE,IAAK,IAAM,QAAA,QAAA,EAAA,KAAA,IAAA,QAAO,mBAAO,GAAE,KAAKC,GAAK,IAAIA,EAAE,eAAiB,CAC9D,CAAC"}
package/dist/plugin.js CHANGED
@@ -1,2 +1,2 @@
1
- var capacitorDoNotDisturb=function(t,e){"use strict";const r=e.registerPlugin("DoNotDisturb",{web:()=>Promise.resolve().then(()=>i).then(o=>new o.DoNotDisturbWeb)});class n extends e.WebPlugin{async monitor(){return{enabled:!1}}}const i=Object.freeze(Object.defineProperty({__proto__:null,DoNotDisturbWeb:n},Symbol.toStringTag,{value:"Module"}));return t.DoNotDisturb=r,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t}({},capacitorExports);
1
+ var capacitorDoNotDisturb=(function(t,e){"use strict";const r=e.registerPlugin("DoNotDisturb",{web:()=>Promise.resolve().then(()=>s).then(o=>new o.DoNotDisturbWeb)});class n extends e.WebPlugin{async monitor(){return{enabled:!1}}async set(i){throw new Error("Setting DND state not supported on web")}}const s=Object.freeze(Object.defineProperty({__proto__:null,DoNotDisturbWeb:n},Symbol.toStringTag,{value:"Module"}));return t.DoNotDisturb=r,Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),t})({},capacitorExports);
2
2
  //# sourceMappingURL=plugin.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["../src/index.ts","../src/web.ts"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { DoNotDisturbPlugin } from './definitions';\n\nconst DoNotDisturb = registerPlugin<DoNotDisturbPlugin>('DoNotDisturb', {\n web: () => import('./web').then(m => new m.DoNotDisturbWeb()),\n});\n\nexport * from './definitions';\nexport { DoNotDisturb };\n","import { WebPlugin } from \"@capacitor/core\";\n\nimport type { DoNotDisturbPlugin } from \"./definitions\";\n\nexport class DoNotDisturbWeb extends WebPlugin implements DoNotDisturbPlugin {\n async monitor(): Promise<{ enabled: boolean }> {\n return { enabled: false };\n }\n}\n"],"names":["DoNotDisturb","registerPlugin","web","m","DoNotDisturbWeb","WebPlugin"],"mappings":"qDAIM,MAAAA,EAAeC,iBAAmC,eAAgB,CACtE,IAAK,IAAM,QAAA,QAAA,EAAA,KAAA,IAAAC,CAAA,EAAgB,KAAUC,GAAA,IAAIA,EAAE,eAAiB,CAC9D,CAAC,ECFM,MAAMC,UAAwBC,EAAAA,SAAwC,CAC3E,MAAM,SAAyC,CACtC,MAAA,CAAE,QAAS,EAAM,CAAA,CAE5B"}
1
+ {"version":3,"file":"plugin.js","sources":["../src/index.ts","../src/web.ts"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { DoNotDisturbPlugin } from './definitions';\n\nconst DoNotDisturb = registerPlugin<DoNotDisturbPlugin>('DoNotDisturb', {\n web: () => import('./web').then(m => new m.DoNotDisturbWeb()),\n});\n\nexport * from './definitions';\nexport { DoNotDisturb };\n","import { WebPlugin } from \"@capacitor/core\";\n\nimport type { DoNotDisturbPlugin } from \"./definitions\";\n\nexport class DoNotDisturbWeb extends WebPlugin implements DoNotDisturbPlugin {\n async monitor(): Promise<{ enabled: boolean }> {\n return { enabled: false };\n }\n\n async set(_options: { enabled: boolean }): Promise<void> {\n throw new Error('Setting DND state not supported on web');\n }\n\n\n}\n"],"names":["DoNotDisturb","registerPlugin","web","m","DoNotDisturbWeb","WebPlugin","_options"],"mappings":"sDAIA,MAAMA,EAAeC,EAAAA,eAAmC,eAAgB,CACtE,IAAK,IAAM,QAAA,QAAA,EAAA,KAAA,IAAAC,CAAA,EAAgB,KAAKC,GAAK,IAAIA,EAAE,eAAiB,CAC9D,CAAC,ECFM,MAAMC,UAAwBC,EAAAA,SAAwC,CAC3E,MAAM,SAAyC,CAC7C,MAAO,CAAE,QAAS,EAAA,CACpB,CAEA,MAAM,IAAIC,EAA+C,CACvD,MAAM,IAAI,MAAM,wCAAwC,CAC1D,CAGF"}
@@ -0,0 +1,2 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@capacitor/core");class t extends e.WebPlugin{async monitor(){return{enabled:!1}}async set(r){throw new Error("Setting DND state not supported on web")}}exports.DoNotDisturbWeb=t;
2
+ //# sourceMappingURL=web-CK137vPX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-CK137vPX.js","sources":["../src/web.ts"],"sourcesContent":["import { WebPlugin } from \"@capacitor/core\";\n\nimport type { DoNotDisturbPlugin } from \"./definitions\";\n\nexport class DoNotDisturbWeb extends WebPlugin implements DoNotDisturbPlugin {\n async monitor(): Promise<{ enabled: boolean }> {\n return { enabled: false };\n }\n\n async set(_options: { enabled: boolean }): Promise<void> {\n throw new Error('Setting DND state not supported on web');\n }\n\n\n}\n"],"names":["DoNotDisturbWeb","WebPlugin","_options"],"mappings":"mHAIO,MAAMA,UAAwBC,EAAAA,SAAwC,CAC3E,MAAM,SAAyC,CAC7C,MAAO,CAAE,QAAS,EAAA,CACpB,CAEA,MAAM,IAAIC,EAA+C,CACvD,MAAM,IAAI,MAAM,wCAAwC,CAC1D,CAGF"}
@@ -0,0 +1,13 @@
1
+ import { WebPlugin as t } from "@capacitor/core";
2
+ class r extends t {
3
+ async monitor() {
4
+ return { enabled: !1 };
5
+ }
6
+ async set(o) {
7
+ throw new Error("Setting DND state not supported on web");
8
+ }
9
+ }
10
+ export {
11
+ r as DoNotDisturbWeb
12
+ };
13
+ //# sourceMappingURL=web-CTERRVO0.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"web-CTERRVO0.mjs","sources":["../src/web.ts"],"sourcesContent":["import { WebPlugin } from \"@capacitor/core\";\n\nimport type { DoNotDisturbPlugin } from \"./definitions\";\n\nexport class DoNotDisturbWeb extends WebPlugin implements DoNotDisturbPlugin {\n async monitor(): Promise<{ enabled: boolean }> {\n return { enabled: false };\n }\n\n async set(_options: { enabled: boolean }): Promise<void> {\n throw new Error('Setting DND state not supported on web');\n }\n\n\n}\n"],"names":["DoNotDisturbWeb","WebPlugin","_options"],"mappings":";AAIO,MAAMA,UAAwBC,EAAwC;AAAA,EAC3E,MAAM,UAAyC;AAC7C,WAAO,EAAE,SAAS,GAAA;AAAA,EACpB;AAAA,EAEA,MAAM,IAAIC,GAA+C;AACvD,UAAM,IAAI,MAAM,wCAAwC;AAAA,EAC1D;AAGF;"}
@@ -1,4 +1,5 @@
1
1
  import Foundation
2
+ import UserNotifications
2
3
 
3
4
  @objc public class DoNotDisturb: NSObject {
4
5
  private var callback: (() -> Void)?
@@ -6,13 +7,18 @@ import Foundation
6
7
  private var lastState: Bool = false
7
8
 
8
9
  @objc public func isEnabled() -> Bool {
10
+ // iOS doesn't provide API to detect Focus/DND state
9
11
  return false
10
12
  }
11
13
 
14
+ @objc public func setEnabled(_ enabled: Bool) {
15
+ // iOS doesn't allow programmatic DND control
16
+ }
17
+
12
18
  @objc public func startListening(callback: @escaping () -> Void) {
13
19
  self.callback = callback
14
20
  lastState = isEnabled()
15
- timer = Timer.scheduledTimer(withTimeInterval: 1.0, repeats: true) { _ in
21
+ timer = Timer.scheduledTimer(withTimeInterval: 2.0, repeats: true) { _ in
16
22
  let currentState = self.isEnabled()
17
23
  if currentState != self.lastState {
18
24
  self.lastState = currentState
@@ -4,5 +4,6 @@
4
4
  // Define the plugin using the CAP_PLUGIN Macro, and
5
5
  // each method the plugin supports using the CAP_PLUGIN_METHOD macro.
6
6
  CAP_PLUGIN(DoNotDisturbPlugin, "DoNotDisturb",
7
- CAP_PLUGIN_METHOD(echo, CAPPluginReturnPromise);
7
+ CAP_PLUGIN_METHOD(monitor, CAPPluginReturnPromise);
8
+ CAP_PLUGIN_METHOD(set, CAPPluginReturnPromise);
8
9
  )
@@ -18,6 +18,12 @@ public class DoNotDisturbPlugin: CAPPlugin {
18
18
  "enabled": implementation.isEnabled()
19
19
  ])
20
20
  }
21
+
22
+ @objc func set(_ call: CAPPluginCall) {
23
+ call.reject("iOS doesn't allow programmatic DND control")
24
+ }
25
+
26
+
21
27
 
22
28
  deinit {
23
29
  implementation.stopListening()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gachlab/capacitor-dnd-plugin",
3
- "version": "1.2.0",
3
+ "version": "1.4.0",
4
4
  "description": "A plugin to set and monitor the Do Not Disturb state",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -11,7 +11,8 @@
11
11
  "android/build.gradle",
12
12
  "dist/",
13
13
  "ios/Plugin/",
14
- "GachlabCapacitorDndPlugin.podspec"
14
+ "GachlabCapacitorDndPlugin.podspec",
15
+ "Package.swift"
15
16
  ],
16
17
  "author": "Guillermo Carrillo",
17
18
  "license": "MIT",
@@ -32,9 +33,8 @@
32
33
  "verify:ios": "cd ios && pod install && xcodebuild -workspace Plugin.xcworkspace -scheme Plugin -destination generic/platform=iOS && cd ..",
33
34
  "verify:android": "cd android && ./gradlew clean build test && cd ..",
34
35
  "verify:web": "npm run build",
35
- "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
36
- "fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
37
- "eslint": "eslint . --ext ts",
36
+ "lint": "eslint . && npm run prettier -- --check && npm run swiftlint -- lint",
37
+ "fmt": "eslint . --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
38
38
  "prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
39
39
  "swiftlint": "node-swiftlint",
40
40
  "docgen": "docgen --api DoNotDisturbPlugin --output-readme README.md --output-json dist/docs.json",
@@ -45,29 +45,27 @@
45
45
  "prepublishOnly": "npm run build"
46
46
  },
47
47
  "devDependencies": {
48
- "@capacitor/android": "7.4.2",
49
- "@capacitor/core": "7.4.2",
50
- "@capacitor/docgen": "^0.3.0",
51
- "@capacitor/ios": "7.4.2",
52
- "@ionic/eslint-config": "^0.4.0",
48
+ "@capacitor/android": "^8.0.1",
49
+ "@capacitor/core": "^8.0.1",
50
+ "@capacitor/docgen": "^0.3.1",
51
+ "@capacitor/ios": "^8.0.1",
53
52
  "@ionic/prettier-config": "^4.0.0",
54
53
  "@ionic/swiftlint-config": "^2.0.0",
55
- "eslint": "^8.57.0",
56
- "prettier": "^3.4.2",
57
- "prettier-plugin-java": "^2.6.6",
58
- "rimraf": "^6.0.1",
54
+ "@typescript-eslint/eslint-plugin": "^8.53.0",
55
+ "@typescript-eslint/parser": "^8.53.0",
56
+ "eslint": "^9.39.2",
57
+ "prettier": "^3.8.0",
58
+ "prettier-plugin-java": "^2.8.1",
59
+ "rimraf": "^6.1.2",
59
60
  "swiftlint": "^2.0.0",
60
- "typescript": "~5.3.3",
61
- "vite": "^5.0.0"
61
+ "typescript": "^5.9.3",
62
+ "vite": "^7.3.1"
62
63
  },
63
64
  "peerDependencies": {
64
- "@capacitor/core": ">=7.4.2"
65
+ "@capacitor/core": "^8.0.1"
65
66
  },
66
67
  "prettier": "@ionic/prettier-config",
67
68
  "swiftlint": "@ionic/swiftlint-config",
68
- "eslintConfig": {
69
- "extends": "@ionic/eslint-config/recommended"
70
- },
71
69
  "capacitor": {
72
70
  "ios": {
73
71
  "src": "ios"
@@ -1,2 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@capacitor/core");class t extends e.WebPlugin{async monitor(){return{enabled:!1}}}exports.DoNotDisturbWeb=t;
2
- //# sourceMappingURL=web-BMdZ0HQI.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"web-BMdZ0HQI.js","sources":["../src/web.ts"],"sourcesContent":["import { WebPlugin } from \"@capacitor/core\";\n\nimport type { DoNotDisturbPlugin } from \"./definitions\";\n\nexport class DoNotDisturbWeb extends WebPlugin implements DoNotDisturbPlugin {\n async monitor(): Promise<{ enabled: boolean }> {\n return { enabled: false };\n }\n}\n"],"names":["DoNotDisturbWeb","WebPlugin"],"mappings":"mHAIO,MAAMA,UAAwBC,EAAAA,SAAwC,CAC3E,MAAM,SAAyC,CACtC,MAAA,CAAE,QAAS,EAAM,CAAA,CAE5B"}
@@ -1,10 +0,0 @@
1
- import { WebPlugin as e } from "@capacitor/core";
2
- class t extends e {
3
- async monitor() {
4
- return { enabled: !1 };
5
- }
6
- }
7
- export {
8
- t as DoNotDisturbWeb
9
- };
10
- //# sourceMappingURL=web-DRkBjitQ.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"web-DRkBjitQ.mjs","sources":["../src/web.ts"],"sourcesContent":["import { WebPlugin } from \"@capacitor/core\";\n\nimport type { DoNotDisturbPlugin } from \"./definitions\";\n\nexport class DoNotDisturbWeb extends WebPlugin implements DoNotDisturbPlugin {\n async monitor(): Promise<{ enabled: boolean }> {\n return { enabled: false };\n }\n}\n"],"names":["DoNotDisturbWeb","WebPlugin"],"mappings":";AAIO,MAAMA,UAAwBC,EAAwC;AAAA,EAC3E,MAAM,UAAyC;AACtC,WAAA,EAAE,SAAS,GAAM;AAAA,EAAA;AAE5B;"}