@capacitor/geolocation 8.0.0-next.7 → 8.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/Package.swift +1 -1
- package/dist/plugin.cjs.js +4 -7
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +4 -7
- package/dist/plugin.js.map +1 -1
- package/package.json +16 -16
package/Package.swift
CHANGED
|
@@ -10,7 +10,7 @@ let package = Package(
|
|
|
10
10
|
targets: ["GeolocationPlugin"])
|
|
11
11
|
],
|
|
12
12
|
dependencies: [
|
|
13
|
-
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "8.0.0
|
|
13
|
+
.package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "8.0.0"),
|
|
14
14
|
.package(url: "https://github.com/ionic-team/ion-ios-geolocation.git", from: "2.0.0")
|
|
15
15
|
],
|
|
16
16
|
targets: [
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var core = require('@capacitor/core');
|
|
6
4
|
var synapse = require('@capacitor/synapse');
|
|
7
5
|
|
|
8
|
-
const Geolocation
|
|
6
|
+
const Geolocation = core.registerPlugin('Geolocation', {
|
|
9
7
|
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.GeolocationWeb()),
|
|
10
8
|
});
|
|
11
9
|
synapse.exposeSynapse();
|
|
@@ -44,13 +42,12 @@ class GeolocationWeb extends core.WebPlugin {
|
|
|
44
42
|
throw this.unimplemented('Not implemented on web.');
|
|
45
43
|
}
|
|
46
44
|
}
|
|
47
|
-
|
|
45
|
+
new GeolocationWeb();
|
|
48
46
|
|
|
49
47
|
var web = /*#__PURE__*/Object.freeze({
|
|
50
48
|
__proto__: null,
|
|
51
|
-
GeolocationWeb: GeolocationWeb
|
|
52
|
-
Geolocation: Geolocation
|
|
49
|
+
GeolocationWeb: GeolocationWeb
|
|
53
50
|
});
|
|
54
51
|
|
|
55
|
-
exports.Geolocation = Geolocation
|
|
52
|
+
exports.Geolocation = Geolocation;
|
|
56
53
|
//# sourceMappingURL=plugin.cjs.js.map
|
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 '@capacitor/core';\nimport { exposeSynapse } from '@capacitor/synapse';\nconst Geolocation = registerPlugin('Geolocation', {\n web: () => import('./web').then((m) => new m.GeolocationWeb()),\n});\nexposeSynapse();\nexport * from './definitions';\nexport { Geolocation };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class GeolocationWeb extends WebPlugin {\n async getCurrentPosition(options) {\n return new Promise((resolve, reject) => {\n navigator.geolocation.getCurrentPosition((pos) => {\n resolve(pos);\n }, (err) => {\n reject(err);\n }, Object.assign({ enableHighAccuracy: false, timeout: 10000, maximumAge: 0 }, options));\n });\n }\n async watchPosition(options, callback) {\n const id = navigator.geolocation.watchPosition((pos) => {\n callback(pos);\n }, (err) => {\n callback(null, err);\n }, Object.assign({ enableHighAccuracy: false, timeout: 10000, maximumAge: 0, minimumUpdateInterval: 5000 }, options));\n return `${id}`;\n }\n async clearWatch(options) {\n navigator.geolocation.clearWatch(parseInt(options.id, 10));\n }\n async checkPermissions() {\n if (typeof navigator === 'undefined' || !navigator.permissions) {\n throw this.unavailable('Permissions API not available in this browser');\n }\n const permission = await navigator.permissions.query({\n name: 'geolocation',\n });\n return { location: permission.state, coarseLocation: permission.state };\n }\n async requestPermissions() {\n throw this.unimplemented('Not implemented on web.');\n }\n}\nconst Geolocation = new GeolocationWeb();\nexport { Geolocation };\n//# sourceMappingURL=web.js.map"],"names":["
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nimport { exposeSynapse } from '@capacitor/synapse';\nconst Geolocation = registerPlugin('Geolocation', {\n web: () => import('./web').then((m) => new m.GeolocationWeb()),\n});\nexposeSynapse();\nexport * from './definitions';\nexport { Geolocation };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class GeolocationWeb extends WebPlugin {\n async getCurrentPosition(options) {\n return new Promise((resolve, reject) => {\n navigator.geolocation.getCurrentPosition((pos) => {\n resolve(pos);\n }, (err) => {\n reject(err);\n }, Object.assign({ enableHighAccuracy: false, timeout: 10000, maximumAge: 0 }, options));\n });\n }\n async watchPosition(options, callback) {\n const id = navigator.geolocation.watchPosition((pos) => {\n callback(pos);\n }, (err) => {\n callback(null, err);\n }, Object.assign({ enableHighAccuracy: false, timeout: 10000, maximumAge: 0, minimumUpdateInterval: 5000 }, options));\n return `${id}`;\n }\n async clearWatch(options) {\n navigator.geolocation.clearWatch(parseInt(options.id, 10));\n }\n async checkPermissions() {\n if (typeof navigator === 'undefined' || !navigator.permissions) {\n throw this.unavailable('Permissions API not available in this browser');\n }\n const permission = await navigator.permissions.query({\n name: 'geolocation',\n });\n return { location: permission.state, coarseLocation: permission.state };\n }\n async requestPermissions() {\n throw this.unimplemented('Not implemented on web.');\n }\n}\nconst Geolocation = new GeolocationWeb();\nexport { Geolocation };\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","exposeSynapse","WebPlugin"],"mappings":";;;;;AAEK,MAAC,WAAW,GAAGA,mBAAc,CAAC,aAAa,EAAE;AAClD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,cAAc,EAAE,CAAC;AAClE,CAAC;AACDC,qBAAa,EAAE;;ACJR,MAAM,cAAc,SAASC,cAAS,CAAC;AAC9C,IAAI,MAAM,kBAAkB,CAAC,OAAO,EAAE;AACtC,QAAQ,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAA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C;AACnF,QAAQ;AACR,QAAQ,MAAM,UAAU,GAAG,MAAM,SAAS,CAAC,WAAW,CAAC,KAAK,CAAC;AAC7D,YAAY,IAAI,EAAE,aAAa;AAC/B,SAAS,CAAC;AACV,QAAQ,OAAO,EAAE,QAAQ,EAAE,UAAU,CAAC,KAAK,EAAE,cAAc,EAAE,UAAU,CAAC,KAAK,EAAE;AAC/E,IAAI;AACJ,IAAI,MAAM,kBAAkB,GAAG;AAC/B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;AAC3D,IAAI;AACJ;AACoB,IAAI,cAAc;;;;;;;;;"}
|
package/dist/plugin.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var capacitorGeolocationPluginCapacitor = (function (exports, core, synapse) {
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
const Geolocation
|
|
4
|
+
const Geolocation = core.registerPlugin('Geolocation', {
|
|
5
5
|
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.GeolocationWeb()),
|
|
6
6
|
});
|
|
7
7
|
synapse.exposeSynapse();
|
|
@@ -40,17 +40,14 @@ var capacitorGeolocationPluginCapacitor = (function (exports, core, synapse) {
|
|
|
40
40
|
throw this.unimplemented('Not implemented on web.');
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
|
|
43
|
+
new GeolocationWeb();
|
|
44
44
|
|
|
45
45
|
var web = /*#__PURE__*/Object.freeze({
|
|
46
46
|
__proto__: null,
|
|
47
|
-
GeolocationWeb: GeolocationWeb
|
|
48
|
-
Geolocation: Geolocation
|
|
47
|
+
GeolocationWeb: GeolocationWeb
|
|
49
48
|
});
|
|
50
49
|
|
|
51
|
-
exports.Geolocation = Geolocation
|
|
52
|
-
|
|
53
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
50
|
+
exports.Geolocation = Geolocation;
|
|
54
51
|
|
|
55
52
|
return exports;
|
|
56
53
|
|
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 '@capacitor/core';\nimport { exposeSynapse } from '@capacitor/synapse';\nconst Geolocation = registerPlugin('Geolocation', {\n web: () => import('./web').then((m) => new m.GeolocationWeb()),\n});\nexposeSynapse();\nexport * from './definitions';\nexport { Geolocation };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class GeolocationWeb extends WebPlugin {\n async getCurrentPosition(options) {\n return new Promise((resolve, reject) => {\n navigator.geolocation.getCurrentPosition((pos) => {\n resolve(pos);\n }, (err) => {\n reject(err);\n }, Object.assign({ enableHighAccuracy: false, timeout: 10000, maximumAge: 0 }, options));\n });\n }\n async watchPosition(options, callback) {\n const id = navigator.geolocation.watchPosition((pos) => {\n callback(pos);\n }, (err) => {\n callback(null, err);\n }, Object.assign({ enableHighAccuracy: false, timeout: 10000, maximumAge: 0, minimumUpdateInterval: 5000 }, options));\n return `${id}`;\n }\n async clearWatch(options) {\n navigator.geolocation.clearWatch(parseInt(options.id, 10));\n }\n async checkPermissions() {\n if (typeof navigator === 'undefined' || !navigator.permissions) {\n throw this.unavailable('Permissions API not available in this browser');\n }\n const permission = await navigator.permissions.query({\n name: 'geolocation',\n });\n return { location: permission.state, coarseLocation: permission.state };\n }\n async requestPermissions() {\n throw this.unimplemented('Not implemented on web.');\n }\n}\nconst Geolocation = new GeolocationWeb();\nexport { Geolocation };\n//# sourceMappingURL=web.js.map"],"names":["
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nimport { exposeSynapse } from '@capacitor/synapse';\nconst Geolocation = registerPlugin('Geolocation', {\n web: () => import('./web').then((m) => new m.GeolocationWeb()),\n});\nexposeSynapse();\nexport * from './definitions';\nexport { Geolocation };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class GeolocationWeb extends WebPlugin {\n async getCurrentPosition(options) {\n return new Promise((resolve, reject) => {\n navigator.geolocation.getCurrentPosition((pos) => {\n resolve(pos);\n }, (err) => {\n reject(err);\n }, Object.assign({ enableHighAccuracy: false, timeout: 10000, maximumAge: 0 }, options));\n });\n }\n async watchPosition(options, callback) {\n const id = navigator.geolocation.watchPosition((pos) => {\n callback(pos);\n }, (err) => {\n callback(null, err);\n }, Object.assign({ enableHighAccuracy: false, timeout: 10000, maximumAge: 0, minimumUpdateInterval: 5000 }, options));\n return `${id}`;\n }\n async clearWatch(options) {\n navigator.geolocation.clearWatch(parseInt(options.id, 10));\n }\n async checkPermissions() {\n if (typeof navigator === 'undefined' || !navigator.permissions) {\n throw this.unavailable('Permissions API not available in this browser');\n }\n const permission = await navigator.permissions.query({\n name: 'geolocation',\n });\n return { location: permission.state, coarseLocation: permission.state };\n }\n async requestPermissions() {\n throw this.unimplemented('Not implemented on web.');\n }\n}\nconst Geolocation = new GeolocationWeb();\nexport { Geolocation };\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","exposeSynapse","WebPlugin"],"mappings":";;;AAEK,UAAC,WAAW,GAAGA,mBAAc,CAAC,aAAa,EAAE;IAClD,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,cAAc,EAAE,CAAC;IAClE,CAAC;AACDC,yBAAa,EAAE;;ICJR,MAAM,cAAc,SAASC,cAAS,CAAC;IAC9C,IAAI,MAAM,kBAAkB,CAAC,OAAO,EAAE;IACtC,QAAQ,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,KAAK;IAChD,YAAY,SAAS,CAAC,WAAW,CAAC,kBAAkB,CAAC,CAAC,GAAG,KAAK;IAC9D,gBAAgB,OAAO,CAAC,GAAG,CAAC;IAC5B,YAAY,CAAC,EAAE,CAAC,GAAG,KAAK;IACxB,gBAAgB,MAAM,CAAC,GAAG,CAAC;IAC3B,YAAY,CAA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U,CAAC,KAAK,EAAE;IAC/E,IAAI;IACJ,IAAI,MAAM,kBAAkB,GAAG;IAC/B,QAAQ,MAAM,IAAI,CAAC,aAAa,CAAC,yBAAyB,CAAC;IAC3D,IAAI;IACJ;IACoB,IAAI,cAAc;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capacitor/geolocation",
|
|
3
|
-
"version": "8.0.0
|
|
3
|
+
"version": "8.0.0",
|
|
4
4
|
"description": "The Geolocation API provides simple methods for getting and tracking the current position of the device using GPS, along with altitude, heading, and speed information if available.",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -49,30 +49,30 @@
|
|
|
49
49
|
"@capacitor/synapse": "^1.0.4"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
|
-
"@capacitor/android": "
|
|
53
|
-
"@capacitor/core": "
|
|
54
|
-
"@capacitor/docgen": "^0.
|
|
55
|
-
"@capacitor/ios": "
|
|
52
|
+
"@capacitor/android": "^8.0.0",
|
|
53
|
+
"@capacitor/core": "^8.0.0",
|
|
54
|
+
"@capacitor/docgen": "^0.3.0",
|
|
55
|
+
"@capacitor/ios": "^8.0.0",
|
|
56
56
|
"@ionic/eslint-config": "^0.4.0",
|
|
57
57
|
"@ionic/prettier-config": "^4.0.0",
|
|
58
58
|
"@ionic/swiftlint-config": "^2.0.0",
|
|
59
59
|
"@semantic-release/changelog": "^6.0.3",
|
|
60
60
|
"@semantic-release/exec": "^7.1.0",
|
|
61
61
|
"@semantic-release/git": "^10.0.1",
|
|
62
|
-
"@semantic-release/github": "^12.0.
|
|
63
|
-
"@semantic-release/npm": "^13.1.
|
|
64
|
-
"@types/node": "^
|
|
65
|
-
"eslint": "^8.57.
|
|
66
|
-
"prettier": "^3.
|
|
67
|
-
"prettier-plugin-java": "^2.
|
|
68
|
-
"rimraf": "^6.
|
|
69
|
-
"rollup": "^
|
|
70
|
-
"semantic-release": "^25.0.
|
|
62
|
+
"@semantic-release/github": "^12.0.2",
|
|
63
|
+
"@semantic-release/npm": "^13.1.2",
|
|
64
|
+
"@types/node": "^24.10.1",
|
|
65
|
+
"eslint": "^8.57.1",
|
|
66
|
+
"prettier": "^3.6.2",
|
|
67
|
+
"prettier-plugin-java": "^2.7.7",
|
|
68
|
+
"rimraf": "^6.1.2",
|
|
69
|
+
"rollup": "^4.53.3",
|
|
70
|
+
"semantic-release": "^25.0.2",
|
|
71
71
|
"swiftlint": "^2.0.0",
|
|
72
|
-
"typescript": "
|
|
72
|
+
"typescript": "^5.9.3"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@capacitor/core": "
|
|
75
|
+
"@capacitor/core": ">=8.0.0"
|
|
76
76
|
},
|
|
77
77
|
"prettier": "@ionic/prettier-config",
|
|
78
78
|
"swiftlint": "@ionic/swiftlint-config",
|