@gachlab/capacitor-dnd-plugin 1.3.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.
- package/GachlabCapacitorDndPlugin.podspec +1 -1
- package/Package.swift +26 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +1 -1
- package/dist/plugin.js.map +1 -1
- package/dist/web-CK137vPX.js.map +1 -1
- package/dist/web-CTERRVO0.mjs.map +1 -1
- package/package.json +18 -20
|
@@ -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 = '
|
|
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/dist/esm/index.js.map
CHANGED
|
@@ -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":";
|
|
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/plugin.cjs.js.map
CHANGED
|
@@ -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,
|
|
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(()=>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);
|
|
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
|
package/dist/plugin.js.map
CHANGED
|
@@ -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 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":"
|
|
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"}
|
package/dist/web-CK137vPX.js.map
CHANGED
|
@@ -1 +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,
|
|
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"}
|
|
@@ -1 +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;
|
|
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;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gachlab/capacitor-dnd-plugin",
|
|
3
|
-
"version": "1.
|
|
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": "
|
|
36
|
-
"fmt": "
|
|
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": "
|
|
49
|
-
"@capacitor/core": "
|
|
50
|
-
"@capacitor/docgen": "^0.3.
|
|
51
|
-
"@capacitor/ios": "
|
|
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.
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
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": "
|
|
61
|
-
"vite": "^
|
|
61
|
+
"typescript": "^5.9.3",
|
|
62
|
+
"vite": "^7.3.1"
|
|
62
63
|
},
|
|
63
64
|
"peerDependencies": {
|
|
64
|
-
"@capacitor/core": "
|
|
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"
|