@capacitor/motion 1.0.4 → 4.0.0-beta.2
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/CHANGELOG.md +40 -0
- package/dist/esm/definitions.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/web.js.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,46 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [4.0.0-beta.2](https://github.com/ionic-team/capacitor-plugins/compare/4.0.0-beta.0...4.0.0-beta.2) (2022-07-08)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @capacitor/motion
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# 4.0.0-beta.0 (2022-06-27)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* add es2017 lib to tsconfig ([#180](https://github.com/ionic-team/capacitor-plugins/issues/180)) ([2c3776c](https://github.com/ionic-team/capacitor-plugins/commit/2c3776c38ca025c5ee965dec10ccf1cdb6c02e2f))
|
|
20
|
+
* better ignore rules for npm distribution ([#32](https://github.com/ionic-team/capacitor-plugins/issues/32)) ([b8d55b9](https://github.com/ionic-team/capacitor-plugins/commit/b8d55b9233e4ad7b8a1cd41110b4e580fc2a059f))
|
|
21
|
+
* correct addListeners links ([#655](https://github.com/ionic-team/capacitor-plugins/issues/655)) ([f9871e7](https://github.com/ionic-team/capacitor-plugins/commit/f9871e7bd53478addb21155e148829f550c0e457))
|
|
22
|
+
* inline source code in esm map files ([#760](https://github.com/ionic-team/capacitor-plugins/issues/760)) ([a960489](https://github.com/ionic-team/capacitor-plugins/commit/a960489a19db0182b90d187a50deff9dfbe51038))
|
|
23
|
+
* support deprecated types from Capacitor 2 ([#139](https://github.com/ionic-team/capacitor-plugins/issues/139)) ([2d7127a](https://github.com/ionic-team/capacitor-plugins/commit/2d7127a488e26f0287951921a6db47c49d817336))
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Features
|
|
27
|
+
|
|
28
|
+
* add commonjs output format ([#179](https://github.com/ionic-team/capacitor-plugins/issues/179)) ([8e9e098](https://github.com/ionic-team/capacitor-plugins/commit/8e9e09862064b3f6771d7facbc4008e995d9b463))
|
|
29
|
+
* Motion plugin ([#17](https://github.com/ionic-team/capacitor-plugins/issues/17)) ([21ace16](https://github.com/ionic-team/capacitor-plugins/commit/21ace1670b803eec3a8d41d06c32933a170bf4be))
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
## [1.0.5](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/motion@1.0.4...@capacitor/motion@1.0.5) (2022-01-19)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
### Bug Fixes
|
|
39
|
+
|
|
40
|
+
* inline source code in esm map files ([#760](https://github.com/ionic-team/capacitor-plugins/issues/760)) ([a960489](https://github.com/ionic-team/capacitor-plugins/commit/a960489a19db0182b90d187a50deff9dfbe51038))
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
|
|
6
46
|
## [1.0.4](https://github.com/ionic-team/capacitor-plugins/compare/@capacitor/motion@1.0.3...@capacitor/motion@1.0.4) (2021-11-17)
|
|
7
47
|
|
|
8
48
|
**Note:** Version bump only for package @capacitor/motion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":""}
|
|
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(\n eventName: 'accel',\n listenerFunc: AccelListener,\n ): Promise<PluginListenerHandle> & PluginListenerHandle;\n\n /**\n * Add a listener for device orientation change (compass heading, etc.)\n *\n * @since 1.0.0\n */\n addListener(\n eventName: 'orientation',\n listenerFunc: OrientationListener,\n ): Promise<PluginListenerHandle> & 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.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;IAC3D,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;IACvD,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;CACxD,CAAC,CAAC;AAEH,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,MAAM,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,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;IAC3D,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;IACvD,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,SAAS,EAAE,CAAC;CACxD,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/esm/web.js.map
CHANGED
|
@@ -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,SAAU,SAAQ,SAAS;IACtC;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;QACrD,IAAI,CAAC,sBAAsB,CAAC,mBAAmB,EAAE,aAAa,CAAC,CAAC;IAClE,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,SAAU,SAAQ,SAAS;IACtC;QACE,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,sBAAsB,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC;QACrD,IAAI,CAAC,sBAAsB,CAAC,mBAAmB,EAAE,aAAa,CAAC,CAAC;IAClE,CAAC;CACF","sourcesContent":["import { WebPlugin } from '@capacitor/core';\n\nimport type { MotionPlugin } from './definitions';\n\nexport class MotionWeb extends WebPlugin implements MotionPlugin {\n constructor() {\n super();\n this.registerWindowListener('devicemotion', 'accel');\n this.registerWindowListener('deviceorientation', 'orientation');\n }\n}\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capacitor/motion",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "4.0.0-beta.2",
|
|
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",
|
|
@@ -39,10 +39,10 @@
|
|
|
39
39
|
"prepublishOnly": "npm run build"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@capacitor/android": "
|
|
43
|
-
"@capacitor/core": "
|
|
42
|
+
"@capacitor/android": "next",
|
|
43
|
+
"@capacitor/core": "next",
|
|
44
44
|
"@capacitor/docgen": "0.0.18",
|
|
45
|
-
"@capacitor/ios": "
|
|
45
|
+
"@capacitor/ios": "next",
|
|
46
46
|
"@ionic/eslint-config": "^0.3.0",
|
|
47
47
|
"@ionic/prettier-config": "~1.0.1",
|
|
48
48
|
"eslint": "^7.11.0",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"typescript": "~4.1.5"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@capacitor/core": "
|
|
56
|
+
"@capacitor/core": "next"
|
|
57
57
|
},
|
|
58
58
|
"prettier": "@ionic/prettier-config",
|
|
59
59
|
"eslintConfig": {
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public"
|
|
65
65
|
},
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "32240b675c12a774920c07a86b4483ecec7a9c8d"
|
|
67
67
|
}
|