@capacitor/motion 8.0.0-nightly-20251112T150654.0 → 8.0.0-nightly-20251114T150645.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/dist/esm/definitions.js.map +1 -1
- package/dist/esm/index.js +3 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/plugin.cjs.js +3 -3
- package/dist/plugin.cjs.js.map +1 -1
- package/dist/plugin.js +3 -3
- package/dist/plugin.js.map +1 -1
- package/package.json +6 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core';\n\nexport interface MotionPlugin {\n /**\n * Add a listener for accelerometer data\n *\n * @since 1.0.0\n */\n addListener(
|
|
1
|
+
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["import type { PluginListenerHandle } from '@capacitor/core';\n\nexport interface MotionPlugin {\n /**\n * Add a listener for accelerometer data\n *\n * @since 1.0.0\n */\n addListener(eventName: 'accel', listenerFunc: AccelListener): Promise<PluginListenerHandle>;\n\n /**\n * Add a listener for device orientation change (compass heading, etc.)\n *\n * @since 1.0.0\n */\n addListener(eventName: 'orientation', listenerFunc: OrientationListener): Promise<PluginListenerHandle>;\n\n /**\n * Remove all the listeners that are attached to this plugin.\n *\n * @since 1.0.0\n */\n removeAllListeners(): Promise<void>;\n}\n\nexport type AccelListener = (event: AccelListenerEvent) => void;\nexport type OrientationListener = (event: OrientationListenerEvent) => void;\nexport type OrientationListenerEvent = RotationRate;\n\nexport interface RotationRate {\n /**\n * The amount of rotation around the Z axis, in degrees per second.\n *\n * @since 1.0.0\n */\n alpha: number;\n\n /**\n * The amount of rotation around the X axis, in degrees per second.\n *\n * @since 1.0.0\n */\n beta: number;\n\n /**\n * The amount of rotation around the Y axis, in degrees per second.\n *\n * @since 1.0.0\n */\n gamma: number;\n}\n\nexport interface Acceleration {\n /**\n * The amount of acceleration along the X axis.\n *\n * @since 1.0.0\n */\n x: number;\n\n /**\n * The amount of acceleration along the Y axis.\n *\n * @since 1.0.0\n */\n y: number;\n\n /**\n * The amount of acceleration along the Z axis.\n *\n * @since 1.0.0\n */\n z: number;\n}\n\nexport interface AccelListenerEvent {\n /**\n * An object giving the acceleration of the device on the three axis X, Y and Z. Acceleration is expressed in m/s\n *\n * @since 1.0.0\n */\n acceleration: Acceleration;\n\n /**\n * An object giving the acceleration of the device on the three axis X, Y and Z with the effect of gravity. Acceleration is expressed in m/s\n *\n * @since 1.0.0\n */\n accelerationIncludingGravity: Acceleration;\n\n /**\n * An object giving the rate of change of the device's orientation on the three orientation axis alpha, beta and gamma. Rotation rate is expressed in degrees per seconds.\n *\n * @since 1.0.0\n */\n rotationRate: RotationRate;\n\n /**\n * A number representing the interval of time, in milliseconds, at which data is obtained from the device.\n *\n * @since 1.0.0\n */\n interval: number;\n}\n\n/**\n * @deprecated Use `AccelListener`.\n * @since 1.0.0\n */\nexport type MotionWatchAccelCallback = AccelListener;\n\n/**\n * @deprecated Use `AccelListenerEvent`.\n * @since 1.0.0\n */\nexport type MotionEventResult = AccelListenerEvent;\n\n/**\n * @deprecated Use `OrientationListener`.\n * @since 1.0.0\n */\nexport type MotionWatchOrientationCallback = OrientationListener;\n\n/**\n * @deprecated Use `OrientationListenerEvent`.\n * @since 1.0.0\n */\nexport type MotionOrientationEventResult = OrientationListenerEvent;\n"]}
|
package/dist/esm/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { registerPlugin } from '@capacitor/core';
|
|
2
2
|
const Motion = registerPlugin('Motion', {
|
|
3
|
-
android: () => import('./web').then(m => new m.MotionWeb()),
|
|
4
|
-
ios: () => import('./web').then(m => new m.MotionWeb()),
|
|
5
|
-
web: () => import('./web').then(m => new m.MotionWeb()),
|
|
3
|
+
android: () => import('./web').then((m) => new m.MotionWeb()),
|
|
4
|
+
ios: () => import('./web').then((m) => new m.MotionWeb()),
|
|
5
|
+
web: () => import('./web').then((m) => new m.MotionWeb()),
|
|
6
6
|
});
|
|
7
7
|
export * from './definitions';
|
|
8
8
|
export { Motion };
|
package/dist/esm/index.js.map
CHANGED
|
@@ -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,MAAM,GAAG,cAAc,CAAe,QAAQ,EAAE;IACpD,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,SAAS,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,MAAM,GAAG,cAAc,CAAe,QAAQ,EAAE;IACpD,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;IAC7D,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;IACzD,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;CAC1D,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,MAAM,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { MotionPlugin } from './definitions';\n\nconst Motion = registerPlugin<MotionPlugin>('Motion', {\n android: () => import('./web').then((m) => new m.MotionWeb()),\n ios: () => import('./web').then((m) => new m.MotionWeb()),\n web: () => import('./web').then((m) => new m.MotionWeb()),\n});\n\nexport * from './definitions';\nexport { Motion };\n"]}
|
package/dist/plugin.cjs.js
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
var core = require('@capacitor/core');
|
|
4
4
|
|
|
5
5
|
const Motion = core.registerPlugin('Motion', {
|
|
6
|
-
android: () => Promise.resolve().then(function () { return web; }).then(m => new m.MotionWeb()),
|
|
7
|
-
ios: () => Promise.resolve().then(function () { return web; }).then(m => new m.MotionWeb()),
|
|
8
|
-
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.MotionWeb()),
|
|
6
|
+
android: () => Promise.resolve().then(function () { return web; }).then((m) => new m.MotionWeb()),
|
|
7
|
+
ios: () => Promise.resolve().then(function () { return web; }).then((m) => new m.MotionWeb()),
|
|
8
|
+
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.MotionWeb()),
|
|
9
9
|
});
|
|
10
10
|
|
|
11
11
|
class MotionWeb extends core.WebPlugin {
|
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';\nconst Motion = registerPlugin('Motion', {\n android: () => import('./web').then(m => new m.MotionWeb()),\n ios: () => import('./web').then(m => new m.MotionWeb()),\n web: () => import('./web').then(m => new m.MotionWeb()),\n});\nexport * from './definitions';\nexport { Motion };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class MotionWeb extends WebPlugin {\n constructor() {\n super();\n this.registerWindowListener('devicemotion', 'accel');\n this.registerWindowListener('deviceorientation', 'orientation');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,MAAM,GAAGA,mBAAc,CAAC,QAAQ,EAAE;AACxC,IAAI,OAAO,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"plugin.cjs.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Motion = registerPlugin('Motion', {\n android: () => import('./web').then((m) => new m.MotionWeb()),\n ios: () => import('./web').then((m) => new m.MotionWeb()),\n web: () => import('./web').then((m) => new m.MotionWeb()),\n});\nexport * from './definitions';\nexport { Motion };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class MotionWeb extends WebPlugin {\n constructor() {\n super();\n this.registerWindowListener('devicemotion', 'accel');\n this.registerWindowListener('deviceorientation', 'orientation');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AACK,MAAC,MAAM,GAAGA,mBAAc,CAAC,QAAQ,EAAE;AACxC,IAAI,OAAO,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;AACjE,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;AAC7D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;AAC7D,CAAC;;ACJM,MAAM,SAAS,SAASC,cAAS,CAAC;AACzC,IAAI,WAAW,GAAG;AAClB,QAAQ,KAAK,EAAE;AACf,QAAQ,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,OAAO,CAAC;AAC5D,QAAQ,IAAI,CAAC,sBAAsB,CAAC,mBAAmB,EAAE,aAAa,CAAC;AACvE,IAAI;AACJ;;;;;;;;;"}
|
package/dist/plugin.js
CHANGED
|
@@ -2,9 +2,9 @@ var capacitorMotion = (function (exports, core) {
|
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
4
|
const Motion = core.registerPlugin('Motion', {
|
|
5
|
-
android: () => Promise.resolve().then(function () { return web; }).then(m => new m.MotionWeb()),
|
|
6
|
-
ios: () => Promise.resolve().then(function () { return web; }).then(m => new m.MotionWeb()),
|
|
7
|
-
web: () => Promise.resolve().then(function () { return web; }).then(m => new m.MotionWeb()),
|
|
5
|
+
android: () => Promise.resolve().then(function () { return web; }).then((m) => new m.MotionWeb()),
|
|
6
|
+
ios: () => Promise.resolve().then(function () { return web; }).then((m) => new m.MotionWeb()),
|
|
7
|
+
web: () => Promise.resolve().then(function () { return web; }).then((m) => new m.MotionWeb()),
|
|
8
8
|
});
|
|
9
9
|
|
|
10
10
|
class MotionWeb extends core.WebPlugin {
|
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';\nconst Motion = registerPlugin('Motion', {\n android: () => import('./web').then(m => new m.MotionWeb()),\n ios: () => import('./web').then(m => new m.MotionWeb()),\n web: () => import('./web').then(m => new m.MotionWeb()),\n});\nexport * from './definitions';\nexport { Motion };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class MotionWeb extends WebPlugin {\n constructor() {\n super();\n this.registerWindowListener('devicemotion', 'accel');\n this.registerWindowListener('deviceorientation', 'orientation');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,MAAM,GAAGA,mBAAc,CAAC,QAAQ,EAAE;IACxC,IAAI,OAAO,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"plugin.js","sources":["esm/index.js","esm/web.js"],"sourcesContent":["import { registerPlugin } from '@capacitor/core';\nconst Motion = registerPlugin('Motion', {\n android: () => import('./web').then((m) => new m.MotionWeb()),\n ios: () => import('./web').then((m) => new m.MotionWeb()),\n web: () => import('./web').then((m) => new m.MotionWeb()),\n});\nexport * from './definitions';\nexport { Motion };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nexport class MotionWeb extends WebPlugin {\n constructor() {\n super();\n this.registerWindowListener('devicemotion', 'accel');\n this.registerWindowListener('deviceorientation', 'orientation');\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;AACK,UAAC,MAAM,GAAGA,mBAAc,CAAC,QAAQ,EAAE;IACxC,IAAI,OAAO,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;IACjE,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;IAC7D,IAAI,GAAG,EAAE,MAAM,mDAAe,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;IAC7D,CAAC;;ICJM,MAAM,SAAS,SAASC,cAAS,CAAC;IACzC,IAAI,WAAW,GAAG;IAClB,QAAQ,KAAK,EAAE;IACf,QAAQ,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,OAAO,CAAC;IAC5D,QAAQ,IAAI,CAAC,sBAAsB,CAAC,mBAAmB,EAAE,aAAa,CAAC;IACvE,IAAI;IACJ;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capacitor/motion",
|
|
3
|
-
"version": "8.0.0-nightly-
|
|
3
|
+
"version": "8.0.0-nightly-20251114T150645.0",
|
|
4
4
|
"description": "The Motion API tracks accelerometer and device orientation (compass heading, etc.)",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"lint": "npm run eslint && npm run prettier -- --check",
|
|
32
32
|
"fmt": "npm run eslint -- --fix && npm run prettier -- --write",
|
|
33
33
|
"eslint": "eslint . --ext ts",
|
|
34
|
-
"prettier": "prettier \"**/*.{css,html,ts,js,java}\"",
|
|
34
|
+
"prettier": "prettier \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
|
|
35
35
|
"docgen": "docgen --api MotionPlugin --output-readme README.md --output-json dist/docs.json",
|
|
36
36
|
"build": "npm run clean && npm run docgen && tsc && rollup -c rollup.config.mjs",
|
|
37
37
|
"clean": "rimraf ./dist",
|
|
@@ -44,10 +44,10 @@
|
|
|
44
44
|
"@capacitor/docgen": "0.2.2",
|
|
45
45
|
"@capacitor/ios": "next",
|
|
46
46
|
"@ionic/eslint-config": "^0.4.0",
|
|
47
|
-
"@ionic/prettier-config": "
|
|
47
|
+
"@ionic/prettier-config": "^4.0.0",
|
|
48
48
|
"eslint": "^8.57.0",
|
|
49
|
-
"prettier": "
|
|
50
|
-
"prettier-plugin-java": "
|
|
49
|
+
"prettier": "^3.6.2",
|
|
50
|
+
"prettier-plugin-java": "^2.7.7",
|
|
51
51
|
"rimraf": "^6.0.1",
|
|
52
52
|
"rollup": "^4.26.0",
|
|
53
53
|
"typescript": "~4.1.5"
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "95681b7193831076037f3987a4ef00a82f5e8b9d"
|
|
67
67
|
}
|