hevy-shared 1.0.601 → 1.0.603

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/built/index.d.ts CHANGED
@@ -579,9 +579,6 @@ export declare const isExerciseType: (x: any) => x is ExerciseType;
579
579
  export type CustomExerciseType = Exclude<ExerciseType, 'floors_duration' | 'steps_duration'>;
580
580
  export declare const customExericseTypes: CustomExerciseType[];
581
581
  export declare const isCustomExerciseType: (x: any) => x is CustomExerciseType;
582
- export type TrainingGoal = 'strength' | 'build_muscle' | 'fat_loss';
583
- export type TrainingLevel = 'beginner' | 'intermediate' | 'advanced';
584
- export type ExerciseCategory = 'isolation' | 'compound' | 'compound-assistance';
585
582
  /**
586
583
  * Base properties that all exercise templates must have
587
584
  */
@@ -628,9 +625,6 @@ export interface LibraryExercise extends BaseExerciseTemplate {
628
625
  localised_instructions?: {
629
626
  [language in InstructionsLanguage]?: string;
630
627
  };
631
- goal: TrainingGoal[] | undefined;
632
- level: TrainingLevel[] | undefined;
633
- category: ExerciseCategory | undefined;
634
628
  }
635
629
  /**
636
630
  * Custom exercises are user-created templates with minimal properties
@@ -392,6 +392,18 @@ describe('utils', () => {
392
392
  { format: 'link', text: 'https://example.com' },
393
393
  ],
394
394
  ],
395
+ [
396
+ 'hey Test - https://www.tiktok.com/@tylerpath/video/7471271437467405614 @test',
397
+ [
398
+ { format: 'none', text: 'hey Test - ' },
399
+ {
400
+ format: 'link',
401
+ text: 'https://www.tiktok.com/@tylerpath/video/7471271437467405614',
402
+ },
403
+ { format: 'none', text: ' ' },
404
+ { format: '@', text: '@test' },
405
+ ],
406
+ ],
395
407
  ];
396
408
  inputOutputs.forEach((i) => {
397
409
  expect((0, utils_1.splitAtUsernamesAndLinks)(i[0])).toEqual(i[1]);
package/built/utils.js CHANGED
@@ -586,12 +586,12 @@ const splitAtUsernamesAndLinks = (text) => {
586
586
  if (index > lastIndex) {
587
587
  format.push({ format: 'none', text: text.substring(lastIndex, index) });
588
588
  }
589
- if (match.match(mentionsRegex)) {
590
- format.push({ format: '@', text: match });
591
- }
592
- else if (match.match(linksRegex)) {
589
+ if (match.match(linksRegex)) {
593
590
  format.push({ format: 'link', text: match });
594
591
  }
592
+ else if (match.match(mentionsRegex)) {
593
+ format.push({ format: '@', text: match });
594
+ }
595
595
  lastIndex = index + match.length;
596
596
  });
597
597
  if (lastIndex < text.length) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hevy-shared",
3
- "version": "1.0.601",
3
+ "version": "1.0.603",
4
4
  "description": "",
5
5
  "main": "built/index.js",
6
6
  "types": "built/index.d.ts",