@situm/react-native 3.15.19-beta.0 → 3.15.20

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.
Files changed (53) hide show
  1. package/README.md +187 -0
  2. package/android/src/main/java/com/situm/plugin/PluginHelper.java +0 -42
  3. package/android/src/main/java/com/situm/plugin/SitumMapper.java +0 -5
  4. package/android/src/main/java/com/situm/plugin/SitumPlugin.java +0 -2
  5. package/android/src/main/java/com/situm/plugin/SitumPluginImpl.java +7 -33
  6. package/ios/RNSitumReactNativePlugin.xcodeproj/project.pbxproj +0 -6
  7. package/ios/SitumPlugin.m +0 -47
  8. package/lib/commonjs/sdk/index.js +0 -13
  9. package/lib/commonjs/sdk/index.js.map +1 -1
  10. package/lib/commonjs/sdk/nativeInterface.js.map +1 -1
  11. package/lib/commonjs/sdk/types/index.js +0 -6
  12. package/lib/commonjs/sdk/types/index.js.map +1 -1
  13. package/lib/commonjs/wayfinding/components/MapView.js +2 -12
  14. package/lib/commonjs/wayfinding/components/MapView.js.map +1 -1
  15. package/lib/commonjs/wayfinding/utils/index.js.map +1 -1
  16. package/lib/commonjs/wayfinding/utils/mapper.js +0 -3
  17. package/lib/commonjs/wayfinding/utils/mapper.js.map +1 -1
  18. package/lib/module/sdk/index.js +0 -13
  19. package/lib/module/sdk/index.js.map +1 -1
  20. package/lib/module/sdk/nativeInterface.js.map +1 -1
  21. package/lib/module/sdk/types/index.js +0 -6
  22. package/lib/module/sdk/types/index.js.map +1 -1
  23. package/lib/module/wayfinding/components/MapView.js +2 -12
  24. package/lib/module/wayfinding/components/MapView.js.map +1 -1
  25. package/lib/module/wayfinding/utils/index.js.map +1 -1
  26. package/lib/module/wayfinding/utils/mapper.js +0 -3
  27. package/lib/module/wayfinding/utils/mapper.js.map +1 -1
  28. package/lib/typescript/sdk/index.d.ts +1 -9
  29. package/lib/typescript/sdk/index.d.ts.map +1 -1
  30. package/lib/typescript/sdk/nativeInterface.d.ts +2 -5
  31. package/lib/typescript/sdk/nativeInterface.d.ts.map +1 -1
  32. package/lib/typescript/sdk/types/index.d.ts +2 -25
  33. package/lib/typescript/sdk/types/index.d.ts.map +1 -1
  34. package/lib/typescript/wayfinding/components/MapView.d.ts.map +1 -1
  35. package/lib/typescript/wayfinding/types/index.d.ts +1 -11
  36. package/lib/typescript/wayfinding/types/index.d.ts.map +1 -1
  37. package/lib/typescript/wayfinding/utils/index.d.ts.map +1 -1
  38. package/lib/typescript/wayfinding/utils/mapper.d.ts +1 -2
  39. package/lib/typescript/wayfinding/utils/mapper.d.ts.map +1 -1
  40. package/package.json +2 -2
  41. package/src/sdk/index.ts +0 -14
  42. package/src/sdk/nativeInterface.ts +1 -7
  43. package/src/sdk/types/index.ts +2 -26
  44. package/src/wayfinding/components/MapView.tsx +2 -17
  45. package/src/wayfinding/types/index.ts +3 -14
  46. package/src/wayfinding/utils/index.ts +1 -4
  47. package/src/wayfinding/utils/mapper.ts +3 -7
  48. package/android/src/main/java/com/situm/plugin/tts/TextToSpeechManager.java +0 -87
  49. package/ios/RNSitumReactNativePlugin.xcodeproj/project.xcworkspace/contents.xcworkspacedata +0 -7
  50. package/ios/RNSitumReactNativePlugin.xcodeproj/project.xcworkspace/xcuserdata/situm.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
  51. package/ios/RNSitumReactNativePlugin.xcodeproj/xcuserdata/situm.xcuserdatad/xcschemes/xcschememanagement.plist +0 -14
  52. package/ios/SitumTextToSpeechSpeaker.h +0 -27
  53. package/ios/SitumTextToSpeechSpeaker.m +0 -82
@@ -1,82 +0,0 @@
1
- //
2
- // SITTextToSpeechManager.m
3
- // SitumSDK
4
- //
5
- // Created by Cristian on 26/8/25.
6
- // Copyright © 2025 Situm. All rights reserved.
7
- //
8
-
9
- #import <AVFoundation/AVFoundation.h>
10
-
11
- #import "SitumTextToSpeechSpeaker.h"
12
-
13
- @interface SitumTextToSpeechSpeaker () <AVSpeechSynthesizerDelegate>
14
- @property (nonatomic, strong) AVSpeechSynthesizer *synthesizer;
15
- @property (nonatomic) bool canSpeak;
16
- @end
17
-
18
- @implementation SitumTextToSpeechSpeaker
19
-
20
- - (instancetype)init {
21
- self = [super init];
22
- if (self) {
23
- self.synthesizer = [AVSpeechSynthesizer new];
24
- self.synthesizer.delegate = self;
25
- }
26
- return self;
27
- }
28
-
29
- - (void)speakWithPayload:(NSDictionary<id,id> *)payload {
30
-
31
- if (![payload isKindOfClass:[NSDictionary class]]) return;
32
-
33
- NSString *text = payload[@"text"];
34
- NSString *lang = payload[@"lang"];
35
- NSNumber *pitchNum = payload[@"pitch"];
36
- NSNumber *rateNum = payload[@"rate"];
37
-
38
- if (![text isKindOfClass:[NSString class]] ||
39
- ![lang isKindOfClass:[NSString class]] ||
40
- ![pitchNum isKindOfClass:[NSNumber class]] ||
41
- ![rateNum isKindOfClass:[NSNumber class]]) {
42
- return;
43
- }
44
-
45
- float pitch = pitchNum.floatValue;
46
- float rate = rateNum.floatValue;
47
-
48
- [self speakText:text language:lang rate:rate pitch:pitch];
49
- }
50
-
51
- - (void)speakText:(NSString *)text language:(NSString *)language rate:(float)rate pitch:(float)pitch {
52
- if (text.length == 0) return;
53
-
54
- AVSpeechUtterance *utt = [[AVSpeechUtterance alloc] initWithString:text];
55
- utt.rate = rate;
56
- utt.pitchMultiplier = pitch;
57
-
58
- AVSpeechSynthesisVoice *voice = [AVSpeechSynthesisVoice voiceWithLanguage:language];
59
- if (voice) {
60
- utt.voice = voice;
61
- }
62
-
63
- dispatch_async(dispatch_get_main_queue(), ^{
64
- if ([self.synthesizer isSpeaking]) {
65
- [self.synthesizer stopSpeakingAtBoundary:AVSpeechBoundaryImmediate];
66
- }
67
- if (self.canSpeak) {
68
- [self.synthesizer speakUtterance:utt];
69
- }
70
- });
71
- }
72
-
73
- - (void)setCanSpeak:(bool) value {
74
- _canSpeak = value;
75
- if (!_canSpeak) {
76
- dispatch_async(dispatch_get_main_queue(), ^{
77
- [self.synthesizer stopSpeakingAtBoundary:AVSpeechBoundaryImmediate];
78
- });
79
- }
80
- }
81
-
82
- @end