@swimedge/metrics 1.0.7 → 1.0.9

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/index.d.ts CHANGED
@@ -52,6 +52,7 @@ export interface SwimSession {
52
52
  equipment?: string[];
53
53
  avgDistancePerStroke?: number;
54
54
  routeCoordinates?: number[][];
55
+ routeMapImage?: string;
55
56
  deviceType?: string;
56
57
  osVersion?: string;
57
58
  healthKitWorkoutId?: string;
package/dist/index.js CHANGED
@@ -395,7 +395,7 @@ exports.METRICS_REGISTRY = {
395
395
  availableFrom: { watch: true, manual: true },
396
396
  swimTypes: [SwimType.INDOOR, SwimType.OPEN_WATER],
397
397
  hasChart: true,
398
- formatter: (s) => `${(0, exports.formatNumber)(s.avgStrokeRate, 1)} SPM`,
398
+ formatter: (s) => `${(0, exports.formatNumber)(s.avgStrokeRate, 0)} SPM`,
399
399
  condition: (s) => !!s.avgStrokeRate,
400
400
  },
401
401
  avgDistancePerStroke: {
@@ -546,6 +546,17 @@ exports.METRICS_REGISTRY = {
546
546
  formatter: (s) => s.routeCoordinates ? `${s.routeCoordinates.length} points` : '',
547
547
  condition: (s) => !!s.routeCoordinates?.length,
548
548
  },
549
+ routeMapImage: {
550
+ key: 'routeMapImage',
551
+ label: 'Route Map Image',
552
+ category: MetricCategory.PERFORMANCE,
553
+ description: 'Generated map image of the swimming route',
554
+ icon: 'image-outline',
555
+ isPerSession: true,
556
+ availableFrom: { watch: false, manual: false },
557
+ swimTypes: [SwimType.OPEN_WATER],
558
+ condition: (s) => !!s.routeMapImage,
559
+ },
549
560
  deviceType: {
550
561
  key: 'deviceType',
551
562
  label: 'Device',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swimedge/metrics",
3
- "version": "1.0.7",
3
+ "version": "1.0.9",
4
4
  "description": "Shared metrics registry for SwimEdge (frontend, backend, watch)",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",