@blife/rn-step-counter 1.0.0 → 1.0.1
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/LICENSE +1 -1
- package/README.kr.md +3 -3
- package/README.md +5 -3
- package/ios/StepCounter.mm +1 -1
- package/lib/module/index.js +4 -8
- package/lib/module/index.js.map +1 -1
- package/lib/module/packageMeta.js +5 -0
- package/lib/module/packageMeta.js.map +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/packageMeta.d.ts +3 -0
- package/lib/typescript/src/packageMeta.d.ts.map +1 -0
- package/package.json +2 -3
- package/src/index.tsx +4 -9
- package/src/packageMeta.ts +2 -0
package/LICENSE
CHANGED
package/README.kr.md
CHANGED
|
@@ -7,11 +7,11 @@ English-speaking developers, please return to the repository main page or click
|
|
|
7
7
|
## 설치 방법
|
|
8
8
|
|
|
9
9
|
```shell
|
|
10
|
-
npm install @
|
|
10
|
+
npm install @blife/rn-step-counter
|
|
11
11
|
```
|
|
12
12
|
|
|
13
13
|
```shell
|
|
14
|
-
yarn add @
|
|
14
|
+
yarn add @blife/rn-step-counter
|
|
15
15
|
```
|
|
16
16
|
|
|
17
17
|
리액트네이티브 0.60 버전 이후 설치된 네이티브 모듈은 오토 링크됩니다. 네이티브 모듈을 수동으로 연결할 필요가 없습니다.
|
|
@@ -100,7 +100,7 @@ import {
|
|
|
100
100
|
parseStepData,
|
|
101
101
|
startStepCounterUpdate,
|
|
102
102
|
stopStepCounterUpdate,
|
|
103
|
-
} from "@
|
|
103
|
+
} from "@blife/rn-step-counter";
|
|
104
104
|
```
|
|
105
105
|
|
|
106
106
|
`isStepCountingSupported` 메소드를 사용하여 장치에 스텝 카운터 또는 가속도계 센서가 있는지 확인합니다.
|
package/README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
# React-Native Step Counter Library
|
|
2
2
|
|
|
3
|
+
[](https://www.npmjs.com/package/@blife/rn-step-counter)
|
|
4
|
+
|
|
3
5
|
한국어 사용자는 [Korean version.](README.kr.md)를 참조하십시오.
|
|
4
6
|
|
|
5
7
|
This library provides an interface for tracking the number of steps taken by the user in a React Native app. It uses the Android `StepCounter` sensor, an accelerometer fallback on Android devices without a step counter sensor, and Apple's `Core Motion` framework on iOS.
|
|
@@ -7,11 +9,11 @@ This library provides an interface for tracking the number of steps taken by the
|
|
|
7
9
|
## Installation
|
|
8
10
|
|
|
9
11
|
```shell
|
|
10
|
-
npm install @
|
|
12
|
+
npm install @blife/rn-step-counter
|
|
11
13
|
```
|
|
12
14
|
|
|
13
15
|
```shell
|
|
14
|
-
bun add @
|
|
16
|
+
bun add @blife/rn-step-counter
|
|
15
17
|
```
|
|
16
18
|
|
|
17
19
|
Native modules will automatically connect after React Native 0.60 version. So you don't need to link the native modules manually.
|
|
@@ -99,7 +101,7 @@ import {
|
|
|
99
101
|
parseStepData,
|
|
100
102
|
startStepCounterUpdate,
|
|
101
103
|
stopStepCounterUpdate,
|
|
102
|
-
} from "@
|
|
104
|
+
} from "@blife/rn-step-counter";
|
|
103
105
|
```
|
|
104
106
|
|
|
105
107
|
Use the `isStepCountingSupported` method to check if the device has a step counter or accelerometer sensor.
|
package/ios/StepCounter.mm
CHANGED
|
@@ -246,7 +246,7 @@ RCT_EXPORT_METHOD(startStepsDetection) {
|
|
|
246
246
|
if (!self) return nil;
|
|
247
247
|
|
|
248
248
|
_pedometer = [[CMPedometer alloc] init];
|
|
249
|
-
_stateQueue = dispatch_queue_create("com.
|
|
249
|
+
_stateQueue = dispatch_queue_create("com.blife.rnstepcounter.state", DISPATCH_QUEUE_SERIAL);
|
|
250
250
|
_baselineSteps = 0;
|
|
251
251
|
_lastEmittedSteps = 0;
|
|
252
252
|
_baselineReady = NO;
|
package/lib/module/index.js
CHANGED
|
@@ -2,18 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
import StepCounterModule, { eventName, NAME, VERSION } from "./NativeStepCounter.js";
|
|
4
4
|
import { NativeEventEmitter, Platform } from "react-native";
|
|
5
|
-
import
|
|
6
|
-
function repositoryWebUrl() {
|
|
7
|
-
const url = pkg.repository.url;
|
|
8
|
-
return url.replace(/^git\+/, "").replace(/\.git$/, "");
|
|
9
|
-
}
|
|
5
|
+
import { PACKAGE_NAME, REPOSITORY_WEB_URL } from "./packageMeta.js";
|
|
10
6
|
|
|
11
7
|
/* A way to check if the module is linked. */
|
|
12
|
-
const LINKING_ERROR = `The package '${
|
|
8
|
+
const LINKING_ERROR = `The package '${PACKAGE_NAME}' doesn't seem to be linked. Make sure: \n\n` + Platform.select({
|
|
13
9
|
ios: "- You have run `pod install` in the `ios` directory and then clean, rebuild and re-run the app. You may also need to re-open Xcode to get the new pods.\n",
|
|
14
10
|
android: "- You have the Android development environment set up: `https://reactnative.dev/docs/environment-setup.`",
|
|
15
11
|
default: ""
|
|
16
|
-
}) + '- Use the "npx react-native clean" command to clean up the module\'s cache and select the ' + '"watchman", "metro", "android", "npm" (and your package manager) options with comma-separated. ' + "Re-install packages and re-build the app again.\n" + "- You rebuilt the app after installing the package\n" + "- You are not using Expo Go\n" + `If none of these fix the issue, please open an issue on the package repository: ${
|
|
12
|
+
}) + '- Use the "npx react-native clean" command to clean up the module\'s cache and select the ' + '"watchman", "metro", "android", "npm" (and your package manager) options with comma-separated. ' + "Re-install packages and re-build the app again.\n" + "- You rebuilt the app after installing the package\n" + "- You are not using Expo Go\n" + `If none of these fix the issue, please open an issue on the package repository: ${REPOSITORY_WEB_URL}`;
|
|
17
13
|
/**
|
|
18
14
|
* A module that allows you to get the step count data.
|
|
19
15
|
* `CMStepCounter` is deprecated in iOS 8.0. Used `CMPedometer` instead.
|
|
@@ -22,7 +18,7 @@ const LINKING_ERROR = `The package '${pkg.name}' doesn't seem to be linked. Make
|
|
|
22
18
|
* counterType - The type of counter used to count the steps.
|
|
23
19
|
* @throws {Error} LINKING_ERROR - Throws Error If global variable turboModuleProxy is undefined.
|
|
24
20
|
* @example
|
|
25
|
-
* import { StepCounter } from '@
|
|
21
|
+
* import { StepCounter } from '@blife/rn-step-counter';
|
|
26
22
|
*/
|
|
27
23
|
const StepCounter = StepCounterModule ? StepCounterModule : new Proxy({}, {
|
|
28
24
|
get() {
|
package/lib/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["StepCounterModule","eventName","NAME","VERSION","NativeEventEmitter","Platform","
|
|
1
|
+
{"version":3,"names":["StepCounterModule","eventName","NAME","VERSION","NativeEventEmitter","Platform","PACKAGE_NAME","REPOSITORY_WEB_URL","LINKING_ERROR","select","ios","android","default","StepCounter","Proxy","get","Error","StepEventEmitter","DEFAULT_MINIMUM_STEP_INTERVAL_MS","_activeSubscription","parseStepData","data","steps","startDate","endDate","distance","dailyGoal","stepsString","kCal","toFixed","endDateTime","Date","toLocaleTimeString","startDateTime","roundedDistance","stepGoalStatus","calories","createStepCountFilter","options","minimumStepIntervalMs","previousRawData","ignoredSteps","ignoredDistance","Number","isFinite","referenceTime","stepDelta","distanceDelta","elapsedMs","POSITIVE_INFINITY","isSuspiciousBurst","Math","max","UnavailabilityError","constructor","moduleName","propertyName","OS","code","isStepCountingSupported","startStepCounterUpdate","start","callBack","remove","from","getTime","addListener","stopStepCounterUpdate"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;AACA,OAAOA,iBAAiB,IACtBC,SAAS,EACTC,IAAI,EACJC,OAAO,QAIF,wBAAqB;AAC5B,SAASC,kBAAkB,EAAEC,QAAQ,QAAQ,cAAc;AAC3D,SAASC,YAAY,EAAEC,kBAAkB,QAAQ,kBAAe;;AAEhE;AACA,MAAMC,aAAa,GACjB,gBAAgBF,YAAY,8CAA8C,GAC1ED,QAAQ,CAACI,MAAM,CAAC;EACdC,GAAG,EAAE,2JAA2J;EAChKC,OAAO,EACL,0GAA0G;EAC5GC,OAAO,EAAE;AACX,CAAC,CAAC,GACF,4FAA4F,GAC5F,iGAAiG,GACjG,mDAAmD,GACnD,sDAAsD,GACtD,+BAA+B,GA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,CAAC+C,sBAAsB,EAAE;IACvC,MAAM,IAAIP,mBAAmB,CAACnD,IAAI,EAAED,SAAS,CAAC;EAChD;EACA;EACAkB,mBAAmB,EAAE4C,MAAM,CAAC,CAAC;EAC7B5C,mBAAmB,GAAG,IAAI;EAC1B,MAAM6C,IAAI,GAAGH,KAAK,CAACI,OAAO,CAAC,CAAC;EAC5B9C,mBAAmB,GAAGF,gBAAgB,CAACiD,WAAW,CAACjE,SAAS,EAAGoB,IAAI,IACjEyC,QAAQ,CAACzC,IAAqB,CAChC,CAAC;EACDR,WAAW,CAAC+C,sBAAsB,CAACI,IAAI,CAAC;EACxC,OAAO7C,mBAAmB;AAC5B;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASgD,qBAAqBA,CAAA,EAAS;EAC5C;EACA;EACAhD,mBAAmB,EAAE4C,MAAM,CAAC,CAAC;EAC7B5C,mBAAmB,GAAG,IAAI;EAC1BN,WAAW,CAACsD,qBAAqB,CAAC,CAAC;AACrC;AAEA,SAASjE,IAAI,EAAEC,OAAO","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["PACKAGE_NAME","REPOSITORY_WEB_URL"],"sourceRoot":"../../src","sources":["packageMeta.ts"],"mappings":";;AAAA,OAAO,MAAMA,YAAY,GAAG,wBAAwB;AACpD,OAAO,MAAMC,kBAAkB,GAAG,2CAA2C","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AACtD,OAA0B,EAExB,IAAI,EACJ,OAAO,EACP,KAAK,WAAW,EAEhB,KAAK,aAAa,EACnB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KA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|
|
1
|
+
{"version":3,"file":"packageMeta.d.ts","sourceRoot":"","sources":["../../../src/packageMeta.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,2BAA2B,CAAC;AACrD,eAAO,MAAM,kBAAkB,8CAA8C,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blife/rn-step-counter",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "This library provides an interface for tracking the number of steps taken by the user in a React Native app.",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
@@ -40,7 +40,6 @@
|
|
|
40
40
|
"test": "jest --runInBand --no-watchman",
|
|
41
41
|
"prepare": "bob build",
|
|
42
42
|
"typecheck": "tsc",
|
|
43
|
-
"sync-brand": "node scripts/sync-brand.mjs",
|
|
44
43
|
"watchman-reset": "watchman watch-del $PWD && watchman watch-project $PWD"
|
|
45
44
|
},
|
|
46
45
|
"keywords": [
|
|
@@ -52,7 +51,7 @@
|
|
|
52
51
|
"type": "git",
|
|
53
52
|
"url": "git+https://github.com/bonnmh/rn-step-counter.git"
|
|
54
53
|
},
|
|
55
|
-
"author": "
|
|
54
|
+
"author": "blife <blife.mobile@gmail.com> (https://github.com/bonnmh)",
|
|
56
55
|
"license": "MIT",
|
|
57
56
|
"bugs": {
|
|
58
57
|
"url": "https://github.com/bonnmh/rn-step-counter/issues"
|
package/src/index.tsx
CHANGED
|
@@ -8,16 +8,11 @@ import StepCounterModule, {
|
|
|
8
8
|
type StepCountData,
|
|
9
9
|
} from "./NativeStepCounter";
|
|
10
10
|
import { NativeEventEmitter, Platform } from "react-native";
|
|
11
|
-
import
|
|
12
|
-
|
|
13
|
-
function repositoryWebUrl(): string {
|
|
14
|
-
const url = pkg.repository.url;
|
|
15
|
-
return url.replace(/^git\+/, "").replace(/\.git$/, "");
|
|
16
|
-
}
|
|
11
|
+
import { PACKAGE_NAME, REPOSITORY_WEB_URL } from "./packageMeta";
|
|
17
12
|
|
|
18
13
|
/* A way to check if the module is linked. */
|
|
19
14
|
const LINKING_ERROR =
|
|
20
|
-
`The package '${
|
|
15
|
+
`The package '${PACKAGE_NAME}' doesn't seem to be linked. Make sure: \n\n` +
|
|
21
16
|
Platform.select({
|
|
22
17
|
ios: "- You have run `pod install` in the `ios` directory and then clean, rebuild and re-run the app. You may also need to re-open Xcode to get the new pods.\n",
|
|
23
18
|
android:
|
|
@@ -29,7 +24,7 @@ const LINKING_ERROR =
|
|
|
29
24
|
"Re-install packages and re-build the app again.\n" +
|
|
30
25
|
"- You rebuilt the app after installing the package\n" +
|
|
31
26
|
"- You are not using Expo Go\n" +
|
|
32
|
-
`If none of these fix the issue, please open an issue on the package repository: ${
|
|
27
|
+
`If none of these fix the issue, please open an issue on the package repository: ${REPOSITORY_WEB_URL}`;
|
|
33
28
|
|
|
34
29
|
export interface ParsedStepCountData {
|
|
35
30
|
dailyGoal: string;
|
|
@@ -49,7 +44,7 @@ export interface ParsedStepCountData {
|
|
|
49
44
|
* counterType - The type of counter used to count the steps.
|
|
50
45
|
* @throws {Error} LINKING_ERROR - Throws Error If global variable turboModuleProxy is undefined.
|
|
51
46
|
* @example
|
|
52
|
-
* import { StepCounter } from '@
|
|
47
|
+
* import { StepCounter } from '@blife/rn-step-counter';
|
|
53
48
|
*/
|
|
54
49
|
const StepCounter = (
|
|
55
50
|
StepCounterModule
|