one 2.6.17 → 2.6.19
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/One.podspec +2 -0
- package/android/src/main/java/com/margelo/nitro/one/HybridOneDevice.kt +124 -0
- package/android/src/main/java/com/margelo/nitro/one/HybridOneHaptics.kt +31 -0
- package/android/src/main/java/com/margelo/nitro/one/HybridOneImageManipulator.kt +25 -5
- package/android/src/main/java/com/margelo/nitro/one/HybridOneKeepAwake.kt +34 -9
- package/android/src/main/java/com/margelo/nitro/one/HybridOneSecureStore.kt +269 -78
- package/dist/cjs/index.cjs +3 -0
- package/dist/cjs/index.native.cjs +3 -0
- package/dist/cjs/index.native.js +3 -0
- package/dist/cjs/index.native.js.map +1 -1
- package/dist/cjs/one.cjs +1 -0
- package/dist/cjs/one.native.cjs +1 -0
- package/dist/cjs/one.native.js +1 -0
- package/dist/cjs/one.native.js.map +1 -1
- package/dist/cjs/platform/extras.cjs +4 -0
- package/dist/cjs/platform/extras.native.cjs +4 -0
- package/dist/cjs/platform/extras.native.js +4 -0
- package/dist/cjs/platform/extras.native.js.map +1 -1
- package/dist/cjs/platform/haptics/index.cjs +3 -0
- package/dist/cjs/platform/haptics/index.native.cjs +4 -0
- package/dist/cjs/platform/haptics/index.native.js +4 -0
- package/dist/cjs/platform/haptics/index.native.js.map +1 -1
- package/dist/cjs/platform/haptics/validation.cjs +28 -0
- package/dist/cjs/platform/haptics/validation.native.cjs +28 -0
- package/dist/cjs/platform/haptics/validation.native.js +28 -0
- package/dist/cjs/platform/haptics/validation.native.js.map +1 -1
- package/dist/cjs/platform/image-manipulator/index.cjs +10 -3
- package/dist/cjs/platform/image-manipulator/index.native.cjs +1 -0
- package/dist/cjs/platform/image-manipulator/index.native.js +1 -0
- package/dist/cjs/platform/image-manipulator/index.native.js.map +1 -1
- package/dist/cjs/platform/index.cjs +1 -0
- package/dist/cjs/platform/index.native.cjs +1 -0
- package/dist/cjs/platform/index.native.js +1 -0
- package/dist/cjs/platform/index.native.js.map +1 -1
- package/dist/cjs/platform/keep-awake/index.cjs +53 -14
- package/dist/cjs/platform/keep-awake/index.native.cjs +29 -2
- package/dist/cjs/platform/keep-awake/index.native.js +29 -2
- package/dist/cjs/platform/keep-awake/index.native.js.map +1 -1
- package/dist/cjs/platform/keep-awake/unavailable.cjs +11 -1
- package/dist/cjs/platform/keep-awake/unavailable.native.cjs +11 -1
- package/dist/cjs/platform/keep-awake/unavailable.native.js +11 -1
- package/dist/cjs/platform/keep-awake/unavailable.native.js.map +1 -1
- package/dist/cjs/platform/keep-awake/validate.cjs +15 -1
- package/dist/cjs/platform/keep-awake/validate.native.cjs +15 -1
- package/dist/cjs/platform/keep-awake/validate.native.js +15 -1
- package/dist/cjs/platform/keep-awake/validate.native.js.map +1 -1
- package/dist/cjs/platform/localization/index.cjs +100 -0
- package/dist/cjs/platform/localization/index.native.cjs +71 -0
- package/dist/cjs/platform/localization/index.native.js +73 -0
- package/dist/cjs/platform/localization/index.native.js.map +1 -0
- package/dist/cjs/platform/localization/map.cjs +86 -0
- package/dist/cjs/platform/localization/map.native.cjs +90 -0
- package/dist/cjs/platform/localization/map.native.js +92 -0
- package/dist/cjs/platform/localization/map.native.js.map +1 -0
- package/dist/cjs/platform/localization/types.cjs +16 -0
- package/dist/cjs/platform/localization/types.native.cjs +18 -0
- package/dist/cjs/platform/localization/types.native.js +20 -0
- package/dist/cjs/platform/localization/types.native.js.map +1 -0
- package/dist/cjs/platform/secure-store/index.cjs +12 -6
- package/dist/cjs/platform/secure-store/index.native.cjs +18 -12
- package/dist/cjs/platform/secure-store/index.native.js +18 -12
- package/dist/cjs/platform/secure-store/index.native.js.map +1 -1
- package/dist/cjs/platform/secure-store/types.cjs +16 -0
- package/dist/cjs/platform/secure-store/types.native.cjs +18 -0
- package/dist/cjs/platform/secure-store/types.native.js +20 -0
- package/dist/cjs/platform/secure-store/types.native.js.map +1 -0
- package/dist/cjs/platform/secure-store/validate.cjs +34 -0
- package/dist/cjs/platform/secure-store/validate.native.cjs +34 -0
- package/dist/cjs/platform/secure-store/validate.native.js +34 -0
- package/dist/cjs/platform/secure-store/validate.native.js.map +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.mjs +2 -2
- package/dist/esm/index.native.js +2 -2
- package/dist/esm/one.mjs +2 -1
- package/dist/esm/one.mjs.map +1 -1
- package/dist/esm/one.native.js +2 -1
- package/dist/esm/one.native.js.map +1 -1
- package/dist/esm/platform/extras.mjs +2 -1
- package/dist/esm/platform/extras.native.js +2 -1
- package/dist/esm/platform/haptics/index.mjs +4 -1
- package/dist/esm/platform/haptics/index.mjs.map +1 -1
- package/dist/esm/platform/haptics/index.native.js +5 -1
- package/dist/esm/platform/haptics/index.native.js.map +1 -1
- package/dist/esm/platform/haptics/validation.mjs +27 -1
- package/dist/esm/platform/haptics/validation.mjs.map +1 -1
- package/dist/esm/platform/haptics/validation.native.js +27 -1
- package/dist/esm/platform/haptics/validation.native.js.map +1 -1
- package/dist/esm/platform/image-manipulator/index.mjs +10 -3
- package/dist/esm/platform/image-manipulator/index.mjs.map +1 -1
- package/dist/esm/platform/image-manipulator/index.native.js +1 -0
- package/dist/esm/platform/image-manipulator/index.native.js.map +1 -1
- package/dist/esm/platform/index.mjs +2 -2
- package/dist/esm/platform/index.mjs.map +1 -1
- package/dist/esm/platform/index.native.js +2 -2
- package/dist/esm/platform/index.native.js.map +1 -1
- package/dist/esm/platform/keep-awake/index.mjs +51 -15
- package/dist/esm/platform/keep-awake/index.mjs.map +1 -1
- package/dist/esm/platform/keep-awake/index.native.js +27 -3
- package/dist/esm/platform/keep-awake/index.native.js.map +1 -1
- package/dist/esm/platform/keep-awake/unavailable.mjs +12 -2
- package/dist/esm/platform/keep-awake/unavailable.mjs.map +1 -1
- package/dist/esm/platform/keep-awake/unavailable.native.js +12 -2
- package/dist/esm/platform/keep-awake/unavailable.native.js.map +1 -1
- package/dist/esm/platform/keep-awake/validate.mjs +10 -1
- package/dist/esm/platform/keep-awake/validate.mjs.map +1 -1
- package/dist/esm/platform/keep-awake/validate.native.js +10 -1
- package/dist/esm/platform/keep-awake/validate.native.js.map +1 -1
- package/dist/esm/platform/localization/index.mjs +77 -0
- package/dist/esm/platform/localization/index.mjs.map +1 -0
- package/dist/esm/platform/localization/index.native.js +46 -0
- package/dist/esm/platform/localization/index.native.js.map +1 -0
- package/dist/esm/platform/localization/map.mjs +59 -0
- package/dist/esm/platform/localization/map.mjs.map +1 -0
- package/dist/esm/platform/localization/map.native.js +61 -0
- package/dist/esm/platform/localization/map.native.js.map +1 -0
- package/dist/esm/platform/localization/types.mjs +0 -0
- package/dist/esm/platform/localization/types.native.js +0 -0
- package/dist/esm/platform/secure-store/index.mjs +13 -7
- package/dist/esm/platform/secure-store/index.mjs.map +1 -1
- package/dist/esm/platform/secure-store/index.native.js +19 -13
- package/dist/esm/platform/secure-store/index.native.js.map +1 -1
- package/dist/esm/platform/secure-store/types.mjs +0 -0
- package/dist/esm/platform/secure-store/types.native.js +0 -0
- package/dist/esm/platform/secure-store/validate.mjs +33 -1
- package/dist/esm/platform/secure-store/validate.mjs.map +1 -1
- package/dist/esm/platform/secure-store/validate.native.js +33 -1
- package/dist/esm/platform/secure-store/validate.native.js.map +1 -1
- package/ios/Nitro/HybridOneDevice.swift +117 -0
- package/ios/Nitro/HybridOneHaptics.swift +4 -0
- package/ios/Nitro/HybridOneImageManipulator.swift +25 -8
- package/ios/Nitro/HybridOneKeepAwake.swift +34 -2
- package/ios/Nitro/HybridOneSecureStore.swift +112 -46
- package/ios/Tests/ImageManipulator/Package.swift +12 -0
- package/ios/Tests/ImageManipulator/README.md +21 -0
- package/ios/Tests/ImageManipulator/Sources/NitroModules/Promise.swift +33 -0
- package/ios/Tests/ImageManipulator/Sources/OneImageManipulatorCore/Types.swift +41 -0
- package/ios/Tests/ImageManipulator/Sources/SDWebImageWebPCoder/SDImageWebPCoder.swift +23 -0
- package/nitrogen/generated/android/c++/JAndroidHaptic.hpp +109 -0
- package/nitrogen/generated/android/c++/JCalendarInfo.hpp +70 -0
- package/nitrogen/generated/android/c++/JHapticImpact.hpp +3 -3
- package/nitrogen/generated/android/c++/JHybridOneDeviceSpec.cpp +52 -0
- package/nitrogen/generated/android/c++/JHybridOneDeviceSpec.hpp +3 -0
- package/nitrogen/generated/android/c++/JHybridOneHapticsSpec.cpp +8 -0
- package/nitrogen/generated/android/c++/JHybridOneHapticsSpec.hpp +1 -0
- package/nitrogen/generated/android/c++/JHybridOneImageManipulatorSpec.cpp +5 -1
- package/nitrogen/generated/android/c++/JHybridOneKeepAwakeSpec.cpp +31 -0
- package/nitrogen/generated/android/c++/JHybridOneKeepAwakeSpec.hpp +2 -0
- package/nitrogen/generated/android/c++/JHybridOneSecureStoreSpec.cpp +26 -19
- package/nitrogen/generated/android/c++/JHybridOneSecureStoreSpec.hpp +6 -6
- package/nitrogen/generated/android/c++/JImageTransformOptions.hpp +7 -1
- package/nitrogen/generated/android/c++/JLocaleInfo.hpp +110 -0
- package/nitrogen/generated/android/c++/JOneImageFlip.hpp +58 -0
- package/nitrogen/generated/android/c++/JOneImageFormat.hpp +3 -0
- package/nitrogen/generated/android/c++/JSecureStoreAccessibility.hpp +73 -0
- package/nitrogen/generated/android/c++/JSecureStoreOptions.hpp +76 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/AndroidHaptic.kt +40 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/CalendarInfo.kt +66 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/HapticImpact.kt +2 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/HybridOneDeviceSpec.kt +17 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/HybridOneHapticsSpec.kt +4 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/HybridOneKeepAwakeSpec.kt +8 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/HybridOneSecureStoreSpec.kt +6 -6
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/ImageTransformOptions.kt +7 -2
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/LocaleInfo.kt +116 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/OneImageFlip.kt +23 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/OneImageFormat.kt +2 -1
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/SecureStoreAccessibility.kt +28 -0
- package/nitrogen/generated/android/kotlin/com/margelo/nitro/one/SecureStoreOptions.kt +71 -0
- package/nitrogen/generated/ios/One-Swift-Cxx-Bridge.hpp +133 -51
- package/nitrogen/generated/ios/One-Swift-Cxx-Umbrella.hpp +19 -1
- package/nitrogen/generated/ios/c++/HybridOneDeviceSpecSwift.hpp +31 -0
- package/nitrogen/generated/ios/c++/HybridOneHapticsSpecSwift.hpp +9 -0
- package/nitrogen/generated/ios/c++/HybridOneImageManipulatorSpecSwift.hpp +4 -1
- package/nitrogen/generated/ios/c++/HybridOneKeepAwakeSpecSwift.hpp +18 -1
- package/nitrogen/generated/ios/c++/HybridOneSecureStoreSpecSwift.hpp +18 -13
- package/nitrogen/generated/ios/swift/AndroidHaptic.swift +108 -0
- package/nitrogen/generated/ios/swift/CalendarInfo.swift +96 -0
- package/nitrogen/generated/ios/swift/HapticImpact.swift +4 -4
- package/nitrogen/generated/ios/swift/HybridOneDeviceSpec.swift +3 -0
- package/nitrogen/generated/ios/swift/HybridOneDeviceSpec_cxx.swift +56 -0
- package/nitrogen/generated/ios/swift/HybridOneHapticsSpec.swift +1 -0
- package/nitrogen/generated/ios/swift/HybridOneHapticsSpec_cxx.swift +11 -0
- package/nitrogen/generated/ios/swift/HybridOneKeepAwakeSpec.swift +3 -1
- package/nitrogen/generated/ios/swift/HybridOneKeepAwakeSpec_cxx.swift +41 -3
- package/nitrogen/generated/ios/swift/HybridOneSecureStoreSpec.swift +6 -6
- package/nitrogen/generated/ios/swift/HybridOneSecureStoreSpec_cxx.swift +12 -12
- package/nitrogen/generated/ios/swift/ImageTransformOptions.swift +16 -5
- package/nitrogen/generated/ios/swift/LocaleInfo.swift +250 -0
- package/nitrogen/generated/ios/swift/OneImageFlip.swift +40 -0
- package/nitrogen/generated/ios/swift/OneImageFormat.swift +4 -0
- package/nitrogen/generated/ios/swift/SecureStoreAccessibility.swift +60 -0
- package/nitrogen/generated/ios/swift/SecureStoreOptions.swift +107 -0
- package/nitrogen/generated/shared/c++/AndroidHaptic.hpp +144 -0
- package/nitrogen/generated/shared/c++/CalendarInfo.hpp +96 -0
- package/nitrogen/generated/shared/c++/HapticImpact.hpp +5 -5
- package/nitrogen/generated/shared/c++/HybridOneDeviceSpec.cpp +3 -0
- package/nitrogen/generated/shared/c++/HybridOneDeviceSpec.hpp +11 -0
- package/nitrogen/generated/shared/c++/HybridOneHapticsSpec.cpp +1 -0
- package/nitrogen/generated/shared/c++/HybridOneHapticsSpec.hpp +4 -0
- package/nitrogen/generated/shared/c++/HybridOneKeepAwakeSpec.cpp +2 -0
- package/nitrogen/generated/shared/c++/HybridOneKeepAwakeSpec.hpp +4 -1
- package/nitrogen/generated/shared/c++/HybridOneSecureStoreSpec.hpp +9 -7
- package/nitrogen/generated/shared/c++/ImageTransformOptions.hpp +8 -1
- package/nitrogen/generated/shared/c++/LocaleInfo.hpp +136 -0
- package/nitrogen/generated/shared/c++/OneImageFlip.hpp +76 -0
- package/nitrogen/generated/shared/c++/OneImageFormat.hpp +4 -0
- package/nitrogen/generated/shared/c++/SecureStoreAccessibility.hpp +96 -0
- package/nitrogen/generated/shared/c++/SecureStoreOptions.hpp +102 -0
- package/package.json +15 -15
- package/src/index.ts +3 -0
- package/src/one.test.ts +2 -0
- package/src/one.ts +3 -0
- package/src/platform/extras.ts +3 -0
- package/src/platform/haptics/index.native.ts +13 -3
- package/src/platform/haptics/index.ts +12 -3
- package/src/platform/haptics/types.ts +25 -0
- package/src/platform/haptics/validation.ts +31 -1
- package/src/platform/image-manipulator/index.native.ts +3 -0
- package/src/platform/image-manipulator/index.ts +10 -3
- package/src/platform/index.native.ts +3 -2
- package/src/platform/index.ts +3 -2
- package/src/platform/keep-awake/index.native.ts +31 -2
- package/src/platform/keep-awake/index.ts +66 -17
- package/src/platform/keep-awake/unavailable.ts +12 -2
- package/src/platform/keep-awake/validate.ts +16 -0
- package/src/platform/localization/index.native.ts +47 -0
- package/src/platform/localization/index.ts +90 -0
- package/src/platform/localization/map.ts +77 -0
- package/src/platform/localization/types.ts +36 -0
- package/src/platform/secure-store/index.native.ts +26 -13
- package/src/platform/secure-store/index.ts +20 -7
- package/src/platform/secure-store/types.ts +33 -0
- package/src/platform/secure-store/validate.ts +48 -0
- package/src/platform/specs/OneDevice.nitro.ts +34 -0
- package/src/platform/specs/OneHaptics.nitro.ts +4 -1
- package/src/platform/specs/OneImageManipulator.nitro.ts +4 -1
- package/src/platform/specs/OneKeepAwake.nitro.ts +2 -0
- package/src/platform/specs/OneSecureStore.nitro.ts +12 -8
- package/types/index.d.ts +1 -1
- package/types/index.d.ts.map +1 -1
- package/types/one.d.ts +2 -1
- package/types/one.d.ts.map +1 -1
- package/types/platform/extras.d.ts +3 -0
- package/types/platform/extras.d.ts.map +1 -1
- package/types/platform/haptics/index.d.ts +2 -2
- package/types/platform/haptics/index.d.ts.map +1 -1
- package/types/platform/haptics/index.native.d.ts +2 -2
- package/types/platform/haptics/index.native.d.ts.map +1 -1
- package/types/platform/haptics/types.d.ts +3 -0
- package/types/platform/haptics/types.d.ts.map +1 -1
- package/types/platform/haptics/validation.d.ts +3 -1
- package/types/platform/haptics/validation.d.ts.map +1 -1
- package/types/platform/image-manipulator/index.d.ts +1 -1
- package/types/platform/image-manipulator/index.d.ts.map +1 -1
- package/types/platform/image-manipulator/index.native.d.ts +1 -1
- package/types/platform/image-manipulator/index.native.d.ts.map +1 -1
- package/types/platform/index.d.ts +3 -3
- package/types/platform/index.d.ts.map +1 -1
- package/types/platform/index.native.d.ts +3 -3
- package/types/platform/index.native.d.ts.map +1 -1
- package/types/platform/keep-awake/index.d.ts +3 -0
- package/types/platform/keep-awake/index.d.ts.map +1 -1
- package/types/platform/keep-awake/index.native.d.ts +5 -0
- package/types/platform/keep-awake/index.native.d.ts.map +1 -1
- package/types/platform/keep-awake/unavailable.d.ts +4 -0
- package/types/platform/keep-awake/unavailable.d.ts.map +1 -1
- package/types/platform/keep-awake/validate.d.ts +3 -0
- package/types/platform/keep-awake/validate.d.ts.map +1 -1
- package/types/platform/localization/index.d.ts +7 -0
- package/types/platform/localization/index.d.ts.map +1 -0
- package/types/platform/localization/index.native.d.ts +7 -0
- package/types/platform/localization/index.native.d.ts.map +1 -0
- package/types/platform/localization/map.d.ts +9 -0
- package/types/platform/localization/map.d.ts.map +1 -0
- package/types/platform/localization/types.d.ts +31 -0
- package/types/platform/localization/types.d.ts.map +1 -0
- package/types/platform/secure-store/index.d.ts +8 -7
- package/types/platform/secure-store/index.d.ts.map +1 -1
- package/types/platform/secure-store/index.native.d.ts +8 -7
- package/types/platform/secure-store/index.native.d.ts.map +1 -1
- package/types/platform/secure-store/types.d.ts +24 -0
- package/types/platform/secure-store/types.d.ts.map +1 -0
- package/types/platform/secure-store/validate.d.ts +3 -0
- package/types/platform/secure-store/validate.d.ts.map +1 -1
- package/types/platform/specs/OneDevice.nitro.d.ts +25 -0
- package/types/platform/specs/OneDevice.nitro.d.ts.map +1 -1
- package/types/platform/specs/OneHaptics.nitro.d.ts +2 -1
- package/types/platform/specs/OneHaptics.nitro.d.ts.map +1 -1
- package/types/platform/specs/OneImageManipulator.nitro.d.ts +3 -1
- package/types/platform/specs/OneImageManipulator.nitro.d.ts.map +1 -1
- package/types/platform/specs/OneKeepAwake.nitro.d.ts +2 -0
- package/types/platform/specs/OneKeepAwake.nitro.d.ts.map +1 -1
- package/types/platform/specs/OneSecureStore.nitro.d.ts +8 -6
- package/types/platform/specs/OneSecureStore.nitro.d.ts.map +1 -1
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
#pragma once
|
|
9
9
|
|
|
10
10
|
// Forward declarations of C++ defined types
|
|
11
|
+
// Forward declaration of `AndroidHaptic` to properly resolve imports.
|
|
12
|
+
namespace margelo::nitro::one { enum class AndroidHaptic; }
|
|
11
13
|
// Forward declaration of `AppIntentInvocation` to properly resolve imports.
|
|
12
14
|
namespace margelo::nitro::one { struct AppIntentInvocation; }
|
|
13
15
|
// Forward declaration of `AppTrackingPermissionStatus` to properly resolve imports.
|
|
@@ -96,6 +98,8 @@ namespace margelo::nitro::one { struct CalendarEventChanges; }
|
|
|
96
98
|
namespace margelo::nitro::one { struct CalendarEventInput; }
|
|
97
99
|
// Forward declaration of `CalendarEvent` to properly resolve imports.
|
|
98
100
|
namespace margelo::nitro::one { struct CalendarEvent; }
|
|
101
|
+
// Forward declaration of `CalendarInfo` to properly resolve imports.
|
|
102
|
+
namespace margelo::nitro::one { struct CalendarInfo; }
|
|
99
103
|
// Forward declaration of `CalendarPermissionStatus` to properly resolve imports.
|
|
100
104
|
namespace margelo::nitro::one { enum class CalendarPermissionStatus; }
|
|
101
105
|
// Forward declaration of `CalendarRecurrenceFrequency` to properly resolve imports.
|
|
@@ -336,6 +340,8 @@ namespace margelo::nitro::one { struct ListedEntry; }
|
|
|
336
340
|
namespace margelo::nitro::one { struct LocalAuthenticationStatus; }
|
|
337
341
|
// Forward declaration of `LocalBiometryType` to properly resolve imports.
|
|
338
342
|
namespace margelo::nitro::one { enum class LocalBiometryType; }
|
|
343
|
+
// Forward declaration of `LocaleInfo` to properly resolve imports.
|
|
344
|
+
namespace margelo::nitro::one { struct LocaleInfo; }
|
|
339
345
|
// Forward declaration of `LocalizationInfo` to properly resolve imports.
|
|
340
346
|
namespace margelo::nitro::one { struct LocalizationInfo; }
|
|
341
347
|
// Forward declaration of `LocationPermissionStatus` to properly resolve imports.
|
|
@@ -345,9 +351,9 @@ namespace margelo::nitro::one { struct LocationPlace; }
|
|
|
345
351
|
// Forward declaration of `LocationPosition` to properly resolve imports.
|
|
346
352
|
namespace margelo::nitro::one { struct LocationPosition; }
|
|
347
353
|
// Forward declaration of `LocationRegion` to properly resolve imports.
|
|
354
|
+
namespace margelo::nitro::one { struct LocationRegion; }
|
|
348
355
|
// Forward declaration of `MailComposeResult` to properly resolve imports.
|
|
349
356
|
namespace margelo::nitro::one { enum class MailComposeResult; }
|
|
350
|
-
namespace margelo::nitro::one { struct LocationRegion; }
|
|
351
357
|
// Forward declaration of `MapCoordinate` to properly resolve imports.
|
|
352
358
|
namespace margelo::nitro::one { struct MapCoordinate; }
|
|
353
359
|
// Forward declaration of `MapPlace` to properly resolve imports.
|
|
@@ -418,6 +424,8 @@ namespace margelo::nitro::one { struct NetworkState; }
|
|
|
418
424
|
namespace margelo::nitro::one { struct NotificationBehavior; }
|
|
419
425
|
// Forward declaration of `NotificationPermissionStatus` to properly resolve imports.
|
|
420
426
|
namespace margelo::nitro::one { enum class NotificationPermissionStatus; }
|
|
427
|
+
// Forward declaration of `OneImageFlip` to properly resolve imports.
|
|
428
|
+
namespace margelo::nitro::one { enum class OneImageFlip; }
|
|
421
429
|
// Forward declaration of `OneImageFormat` to properly resolve imports.
|
|
422
430
|
namespace margelo::nitro::one { enum class OneImageFormat; }
|
|
423
431
|
// Forward declaration of `OneUpdatesCheckResult` to properly resolve imports.
|
|
@@ -492,6 +500,10 @@ namespace margelo::nitro::one { enum class ScreenCaptureState; }
|
|
|
492
500
|
namespace margelo::nitro::one { enum class ScreenOrientationLock; }
|
|
493
501
|
// Forward declaration of `ScreenOrientationValue` to properly resolve imports.
|
|
494
502
|
namespace margelo::nitro::one { enum class ScreenOrientationValue; }
|
|
503
|
+
// Forward declaration of `SecureStoreAccessibility` to properly resolve imports.
|
|
504
|
+
namespace margelo::nitro::one { enum class SecureStoreAccessibility; }
|
|
505
|
+
// Forward declaration of `SecureStoreOptions` to properly resolve imports.
|
|
506
|
+
namespace margelo::nitro::one { struct SecureStoreOptions; }
|
|
495
507
|
// Forward declaration of `ShareItemType` to properly resolve imports.
|
|
496
508
|
namespace margelo::nitro::one { enum class ShareItemType; }
|
|
497
509
|
// Forward declaration of `ShareItem` to properly resolve imports.
|
|
@@ -526,6 +538,7 @@ namespace margelo::nitro::one { struct SpeechSynthesisVoice; }
|
|
|
526
538
|
namespace margelo::nitro::one { enum class UserInterfaceSizeClass; }
|
|
527
539
|
|
|
528
540
|
// Include C++ defined types
|
|
541
|
+
#include "AndroidHaptic.hpp"
|
|
529
542
|
#include "AppIntentInvocation.hpp"
|
|
530
543
|
#include "AppTrackingPermissionStatus.hpp"
|
|
531
544
|
#include "AppleAuthCredential.hpp"
|
|
@@ -570,6 +583,7 @@ namespace margelo::nitro::one { enum class UserInterfaceSizeClass; }
|
|
|
570
583
|
#include "CalendarEvent.hpp"
|
|
571
584
|
#include "CalendarEventChanges.hpp"
|
|
572
585
|
#include "CalendarEventInput.hpp"
|
|
586
|
+
#include "CalendarInfo.hpp"
|
|
573
587
|
#include "CalendarPermissionStatus.hpp"
|
|
574
588
|
#include "CalendarRecurrence.hpp"
|
|
575
589
|
#include "CalendarRecurrenceFrequency.hpp"
|
|
@@ -690,6 +704,7 @@ namespace margelo::nitro::one { enum class UserInterfaceSizeClass; }
|
|
|
690
704
|
#include "ListedEntry.hpp"
|
|
691
705
|
#include "LocalAuthenticationStatus.hpp"
|
|
692
706
|
#include "LocalBiometryType.hpp"
|
|
707
|
+
#include "LocaleInfo.hpp"
|
|
693
708
|
#include "LocalizationInfo.hpp"
|
|
694
709
|
#include "LocationPermissionStatus.hpp"
|
|
695
710
|
#include "LocationPlace.hpp"
|
|
@@ -731,6 +746,7 @@ namespace margelo::nitro::one { enum class UserInterfaceSizeClass; }
|
|
|
731
746
|
#include "NetworkStateType.hpp"
|
|
732
747
|
#include "NotificationBehavior.hpp"
|
|
733
748
|
#include "NotificationPermissionStatus.hpp"
|
|
749
|
+
#include "OneImageFlip.hpp"
|
|
734
750
|
#include "OneImageFormat.hpp"
|
|
735
751
|
#include "OneUpdatesCheckResult.hpp"
|
|
736
752
|
#include "OneUpdatesCheckType.hpp"
|
|
@@ -768,6 +784,8 @@ namespace margelo::nitro::one { enum class UserInterfaceSizeClass; }
|
|
|
768
784
|
#include "ScreenCaptureState.hpp"
|
|
769
785
|
#include "ScreenOrientationLock.hpp"
|
|
770
786
|
#include "ScreenOrientationValue.hpp"
|
|
787
|
+
#include "SecureStoreAccessibility.hpp"
|
|
788
|
+
#include "SecureStoreOptions.hpp"
|
|
771
789
|
#include "ShareItem.hpp"
|
|
772
790
|
#include "ShareItemType.hpp"
|
|
773
791
|
#include "ShareResult.hpp"
|
|
@@ -16,6 +16,10 @@ namespace One { class HybridOneDeviceSpec_cxx; }
|
|
|
16
16
|
namespace margelo::nitro::one { struct DeviceInfo; }
|
|
17
17
|
// Forward declaration of `LocalizationInfo` to properly resolve imports.
|
|
18
18
|
namespace margelo::nitro::one { struct LocalizationInfo; }
|
|
19
|
+
// Forward declaration of `LocaleInfo` to properly resolve imports.
|
|
20
|
+
namespace margelo::nitro::one { struct LocaleInfo; }
|
|
21
|
+
// Forward declaration of `CalendarInfo` to properly resolve imports.
|
|
22
|
+
namespace margelo::nitro::one { struct CalendarInfo; }
|
|
19
23
|
|
|
20
24
|
#include "DeviceInfo.hpp"
|
|
21
25
|
#include <NitroModules/Promise.hpp>
|
|
@@ -23,6 +27,9 @@ namespace margelo::nitro::one { struct LocalizationInfo; }
|
|
|
23
27
|
#include <optional>
|
|
24
28
|
#include "LocalizationInfo.hpp"
|
|
25
29
|
#include <vector>
|
|
30
|
+
#include "LocaleInfo.hpp"
|
|
31
|
+
#include "CalendarInfo.hpp"
|
|
32
|
+
#include <functional>
|
|
26
33
|
|
|
27
34
|
#include "One-Swift-Cxx-Umbrella.hpp"
|
|
28
35
|
|
|
@@ -90,6 +97,30 @@ namespace margelo::nitro::one {
|
|
|
90
97
|
auto __value = std::move(__result.value());
|
|
91
98
|
return __value;
|
|
92
99
|
}
|
|
100
|
+
inline std::vector<LocaleInfo> getLocales() override {
|
|
101
|
+
auto __result = _swiftPart.getLocales();
|
|
102
|
+
if (__result.hasError()) [[unlikely]] {
|
|
103
|
+
std::rethrow_exception(__result.error());
|
|
104
|
+
}
|
|
105
|
+
auto __value = std::move(__result.value());
|
|
106
|
+
return __value;
|
|
107
|
+
}
|
|
108
|
+
inline std::vector<CalendarInfo> getCalendars() override {
|
|
109
|
+
auto __result = _swiftPart.getCalendars();
|
|
110
|
+
if (__result.hasError()) [[unlikely]] {
|
|
111
|
+
std::rethrow_exception(__result.error());
|
|
112
|
+
}
|
|
113
|
+
auto __value = std::move(__result.value());
|
|
114
|
+
return __value;
|
|
115
|
+
}
|
|
116
|
+
inline std::function<void()> addLocalizationListener(const std::function<void()>& listener) override {
|
|
117
|
+
auto __result = _swiftPart.addLocalizationListener(listener);
|
|
118
|
+
if (__result.hasError()) [[unlikely]] {
|
|
119
|
+
std::rethrow_exception(__result.error());
|
|
120
|
+
}
|
|
121
|
+
auto __value = std::move(__result.value());
|
|
122
|
+
return __value;
|
|
123
|
+
}
|
|
93
124
|
|
|
94
125
|
private:
|
|
95
126
|
One::HybridOneDeviceSpec_cxx _swiftPart;
|
|
@@ -16,9 +16,12 @@ namespace One { class HybridOneHapticsSpec_cxx; }
|
|
|
16
16
|
namespace margelo::nitro::one { enum class HapticImpact; }
|
|
17
17
|
// Forward declaration of `HapticNotification` to properly resolve imports.
|
|
18
18
|
namespace margelo::nitro::one { enum class HapticNotification; }
|
|
19
|
+
// Forward declaration of `AndroidHaptic` to properly resolve imports.
|
|
20
|
+
namespace margelo::nitro::one { enum class AndroidHaptic; }
|
|
19
21
|
|
|
20
22
|
#include "HapticImpact.hpp"
|
|
21
23
|
#include "HapticNotification.hpp"
|
|
24
|
+
#include "AndroidHaptic.hpp"
|
|
22
25
|
|
|
23
26
|
#include "One-Swift-Cxx-Umbrella.hpp"
|
|
24
27
|
|
|
@@ -88,6 +91,12 @@ namespace margelo::nitro::one {
|
|
|
88
91
|
std::rethrow_exception(__result.error());
|
|
89
92
|
}
|
|
90
93
|
}
|
|
94
|
+
inline void performAndroidHaptics(AndroidHaptic type) override {
|
|
95
|
+
auto __result = _swiftPart.performAndroidHaptics(static_cast<int>(type));
|
|
96
|
+
if (__result.hasError()) [[unlikely]] {
|
|
97
|
+
std::rethrow_exception(__result.error());
|
|
98
|
+
}
|
|
99
|
+
}
|
|
91
100
|
|
|
92
101
|
private:
|
|
93
102
|
One::HybridOneHapticsSpec_cxx _swiftPart;
|
|
@@ -20,6 +20,8 @@ namespace margelo::nitro::one { struct ImageTransformOptions; }
|
|
|
20
20
|
namespace margelo::nitro::one { struct ImageCrop; }
|
|
21
21
|
// Forward declaration of `ImageResize` to properly resolve imports.
|
|
22
22
|
namespace margelo::nitro::one { struct ImageResize; }
|
|
23
|
+
// Forward declaration of `OneImageFlip` to properly resolve imports.
|
|
24
|
+
namespace margelo::nitro::one { enum class OneImageFlip; }
|
|
23
25
|
// Forward declaration of `OneImageFormat` to properly resolve imports.
|
|
24
26
|
namespace margelo::nitro::one { enum class OneImageFormat; }
|
|
25
27
|
|
|
@@ -30,6 +32,7 @@ namespace margelo::nitro::one { enum class OneImageFormat; }
|
|
|
30
32
|
#include "ImageCrop.hpp"
|
|
31
33
|
#include <optional>
|
|
32
34
|
#include "ImageResize.hpp"
|
|
35
|
+
#include "OneImageFlip.hpp"
|
|
33
36
|
#include "OneImageFormat.hpp"
|
|
34
37
|
|
|
35
38
|
#include "One-Swift-Cxx-Umbrella.hpp"
|
|
@@ -78,7 +81,7 @@ namespace margelo::nitro::one {
|
|
|
78
81
|
|
|
79
82
|
public:
|
|
80
83
|
// Properties
|
|
81
|
-
|
|
84
|
+
|
|
82
85
|
|
|
83
86
|
public:
|
|
84
87
|
// Methods
|
|
@@ -15,6 +15,7 @@ namespace One { class HybridOneKeepAwakeSpec_cxx; }
|
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
#include <NitroModules/Promise.hpp>
|
|
18
|
+
#include <string>
|
|
18
19
|
|
|
19
20
|
#include "One-Swift-Cxx-Umbrella.hpp"
|
|
20
21
|
|
|
@@ -62,7 +63,7 @@ namespace margelo::nitro::one {
|
|
|
62
63
|
|
|
63
64
|
public:
|
|
64
65
|
// Properties
|
|
65
|
-
|
|
66
|
+
|
|
66
67
|
|
|
67
68
|
public:
|
|
68
69
|
// Methods
|
|
@@ -82,6 +83,22 @@ namespace margelo::nitro::one {
|
|
|
82
83
|
auto __value = std::move(__result.value());
|
|
83
84
|
return __value;
|
|
84
85
|
}
|
|
86
|
+
inline std::shared_ptr<Promise<void>> activate(const std::string& tag) override {
|
|
87
|
+
auto __result = _swiftPart.activate(tag);
|
|
88
|
+
if (__result.hasError()) [[unlikely]] {
|
|
89
|
+
std::rethrow_exception(__result.error());
|
|
90
|
+
}
|
|
91
|
+
auto __value = std::move(__result.value());
|
|
92
|
+
return __value;
|
|
93
|
+
}
|
|
94
|
+
inline std::shared_ptr<Promise<void>> deactivate(const std::string& tag) override {
|
|
95
|
+
auto __result = _swiftPart.deactivate(tag);
|
|
96
|
+
if (__result.hasError()) [[unlikely]] {
|
|
97
|
+
std::rethrow_exception(__result.error());
|
|
98
|
+
}
|
|
99
|
+
auto __value = std::move(__result.value());
|
|
100
|
+
return __value;
|
|
101
|
+
}
|
|
85
102
|
|
|
86
103
|
private:
|
|
87
104
|
One::HybridOneKeepAwakeSpec_cxx _swiftPart;
|
|
@@ -12,11 +12,16 @@
|
|
|
12
12
|
// Forward declaration of `HybridOneSecureStoreSpec_cxx` to properly resolve imports.
|
|
13
13
|
namespace One { class HybridOneSecureStoreSpec_cxx; }
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
// Forward declaration of `SecureStoreOptions` to properly resolve imports.
|
|
16
|
+
namespace margelo::nitro::one { struct SecureStoreOptions; }
|
|
17
|
+
// Forward declaration of `SecureStoreAccessibility` to properly resolve imports.
|
|
18
|
+
namespace margelo::nitro::one { enum class SecureStoreAccessibility; }
|
|
16
19
|
|
|
17
20
|
#include <string>
|
|
18
21
|
#include <optional>
|
|
19
22
|
#include <NitroModules/Promise.hpp>
|
|
23
|
+
#include "SecureStoreOptions.hpp"
|
|
24
|
+
#include "SecureStoreAccessibility.hpp"
|
|
20
25
|
|
|
21
26
|
#include "One-Swift-Cxx-Umbrella.hpp"
|
|
22
27
|
|
|
@@ -68,46 +73,46 @@ namespace margelo::nitro::one {
|
|
|
68
73
|
|
|
69
74
|
public:
|
|
70
75
|
// Methods
|
|
71
|
-
inline std::shared_ptr<Promise<std::optional<std::string>>> getItem(const std::string& key) override {
|
|
72
|
-
auto __result = _swiftPart.getItem(key);
|
|
76
|
+
inline std::shared_ptr<Promise<std::optional<std::string>>> getItem(const std::string& key, const SecureStoreOptions& options) override {
|
|
77
|
+
auto __result = _swiftPart.getItem(key, std::forward<decltype(options)>(options));
|
|
73
78
|
if (__result.hasError()) [[unlikely]] {
|
|
74
79
|
std::rethrow_exception(__result.error());
|
|
75
80
|
}
|
|
76
81
|
auto __value = std::move(__result.value());
|
|
77
82
|
return __value;
|
|
78
83
|
}
|
|
79
|
-
inline std::shared_ptr<Promise<void>> setItem(const std::string& key, const std::string& value) override {
|
|
80
|
-
auto __result = _swiftPart.setItem(key, value);
|
|
84
|
+
inline std::shared_ptr<Promise<void>> setItem(const std::string& key, const std::string& value, const SecureStoreOptions& options) override {
|
|
85
|
+
auto __result = _swiftPart.setItem(key, value, std::forward<decltype(options)>(options));
|
|
81
86
|
if (__result.hasError()) [[unlikely]] {
|
|
82
87
|
std::rethrow_exception(__result.error());
|
|
83
88
|
}
|
|
84
89
|
auto __value = std::move(__result.value());
|
|
85
90
|
return __value;
|
|
86
91
|
}
|
|
87
|
-
inline std::shared_ptr<Promise<void>> deleteItem(const std::string& key) override {
|
|
88
|
-
auto __result = _swiftPart.deleteItem(key);
|
|
92
|
+
inline std::shared_ptr<Promise<void>> deleteItem(const std::string& key, const SecureStoreOptions& options) override {
|
|
93
|
+
auto __result = _swiftPart.deleteItem(key, std::forward<decltype(options)>(options));
|
|
89
94
|
if (__result.hasError()) [[unlikely]] {
|
|
90
95
|
std::rethrow_exception(__result.error());
|
|
91
96
|
}
|
|
92
97
|
auto __value = std::move(__result.value());
|
|
93
98
|
return __value;
|
|
94
99
|
}
|
|
95
|
-
inline std::optional<std::string> getItemSync(const std::string& key) override {
|
|
96
|
-
auto __result = _swiftPart.getItemSync(key);
|
|
100
|
+
inline std::optional<std::string> getItemSync(const std::string& key, const SecureStoreOptions& options) override {
|
|
101
|
+
auto __result = _swiftPart.getItemSync(key, std::forward<decltype(options)>(options));
|
|
97
102
|
if (__result.hasError()) [[unlikely]] {
|
|
98
103
|
std::rethrow_exception(__result.error());
|
|
99
104
|
}
|
|
100
105
|
auto __value = std::move(__result.value());
|
|
101
106
|
return __value;
|
|
102
107
|
}
|
|
103
|
-
inline void setItemSync(const std::string& key, const std::string& value) override {
|
|
104
|
-
auto __result = _swiftPart.setItemSync(key, value);
|
|
108
|
+
inline void setItemSync(const std::string& key, const std::string& value, const SecureStoreOptions& options) override {
|
|
109
|
+
auto __result = _swiftPart.setItemSync(key, value, std::forward<decltype(options)>(options));
|
|
105
110
|
if (__result.hasError()) [[unlikely]] {
|
|
106
111
|
std::rethrow_exception(__result.error());
|
|
107
112
|
}
|
|
108
113
|
}
|
|
109
|
-
inline void deleteItemSync(const std::string& key) override {
|
|
110
|
-
auto __result = _swiftPart.deleteItemSync(key);
|
|
114
|
+
inline void deleteItemSync(const std::string& key, const SecureStoreOptions& options) override {
|
|
115
|
+
auto __result = _swiftPart.deleteItemSync(key, std::forward<decltype(options)>(options));
|
|
111
116
|
if (__result.hasError()) [[unlikely]] {
|
|
112
117
|
std::rethrow_exception(__result.error());
|
|
113
118
|
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// AndroidHaptic.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Represents the JS union `AndroidHaptic`, backed by a C++ enum.
|
|
10
|
+
*/
|
|
11
|
+
public typealias AndroidHaptic = margelo.nitro.one.AndroidHaptic
|
|
12
|
+
|
|
13
|
+
public extension AndroidHaptic {
|
|
14
|
+
/**
|
|
15
|
+
* Get a AndroidHaptic for the given String value, or
|
|
16
|
+
* return `nil` if the given value was invalid/unknown.
|
|
17
|
+
*/
|
|
18
|
+
init?(fromString string: String) {
|
|
19
|
+
switch string {
|
|
20
|
+
case "clock-tick":
|
|
21
|
+
self = .clockTick
|
|
22
|
+
case "confirm":
|
|
23
|
+
self = .confirm
|
|
24
|
+
case "context-click":
|
|
25
|
+
self = .contextClick
|
|
26
|
+
case "drag-start":
|
|
27
|
+
self = .dragStart
|
|
28
|
+
case "gesture-end":
|
|
29
|
+
self = .gestureEnd
|
|
30
|
+
case "gesture-start":
|
|
31
|
+
self = .gestureStart
|
|
32
|
+
case "keyboard-press":
|
|
33
|
+
self = .keyboardPress
|
|
34
|
+
case "keyboard-release":
|
|
35
|
+
self = .keyboardRelease
|
|
36
|
+
case "keyboard-tap":
|
|
37
|
+
self = .keyboardTap
|
|
38
|
+
case "long-press":
|
|
39
|
+
self = .longPress
|
|
40
|
+
case "no-haptics":
|
|
41
|
+
self = .noHaptics
|
|
42
|
+
case "reject":
|
|
43
|
+
self = .reject
|
|
44
|
+
case "segment-frequent-tick":
|
|
45
|
+
self = .segmentFrequentTick
|
|
46
|
+
case "segment-tick":
|
|
47
|
+
self = .segmentTick
|
|
48
|
+
case "text-handle-move":
|
|
49
|
+
self = .textHandleMove
|
|
50
|
+
case "toggle-off":
|
|
51
|
+
self = .toggleOff
|
|
52
|
+
case "toggle-on":
|
|
53
|
+
self = .toggleOn
|
|
54
|
+
case "virtual-key":
|
|
55
|
+
self = .virtualKey
|
|
56
|
+
case "virtual-key-release":
|
|
57
|
+
self = .virtualKeyRelease
|
|
58
|
+
default:
|
|
59
|
+
return nil
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Get the String value this AndroidHaptic represents.
|
|
65
|
+
*/
|
|
66
|
+
var stringValue: String {
|
|
67
|
+
switch self {
|
|
68
|
+
case .clockTick:
|
|
69
|
+
return "clock-tick"
|
|
70
|
+
case .confirm:
|
|
71
|
+
return "confirm"
|
|
72
|
+
case .contextClick:
|
|
73
|
+
return "context-click"
|
|
74
|
+
case .dragStart:
|
|
75
|
+
return "drag-start"
|
|
76
|
+
case .gestureEnd:
|
|
77
|
+
return "gesture-end"
|
|
78
|
+
case .gestureStart:
|
|
79
|
+
return "gesture-start"
|
|
80
|
+
case .keyboardPress:
|
|
81
|
+
return "keyboard-press"
|
|
82
|
+
case .keyboardRelease:
|
|
83
|
+
return "keyboard-release"
|
|
84
|
+
case .keyboardTap:
|
|
85
|
+
return "keyboard-tap"
|
|
86
|
+
case .longPress:
|
|
87
|
+
return "long-press"
|
|
88
|
+
case .noHaptics:
|
|
89
|
+
return "no-haptics"
|
|
90
|
+
case .reject:
|
|
91
|
+
return "reject"
|
|
92
|
+
case .segmentFrequentTick:
|
|
93
|
+
return "segment-frequent-tick"
|
|
94
|
+
case .segmentTick:
|
|
95
|
+
return "segment-tick"
|
|
96
|
+
case .textHandleMove:
|
|
97
|
+
return "text-handle-move"
|
|
98
|
+
case .toggleOff:
|
|
99
|
+
return "toggle-off"
|
|
100
|
+
case .toggleOn:
|
|
101
|
+
return "toggle-on"
|
|
102
|
+
case .virtualKey:
|
|
103
|
+
return "virtual-key"
|
|
104
|
+
case .virtualKeyRelease:
|
|
105
|
+
return "virtual-key-release"
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
///
|
|
2
|
+
/// CalendarInfo.swift
|
|
3
|
+
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
|
|
4
|
+
/// https://github.com/mrousavy/nitro
|
|
5
|
+
/// Copyright © Marc Rousavy @ Margelo
|
|
6
|
+
///
|
|
7
|
+
|
|
8
|
+
import NitroModules
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Represents an instance of `CalendarInfo`, backed by a C++ struct.
|
|
12
|
+
*/
|
|
13
|
+
public typealias CalendarInfo = margelo.nitro.one.CalendarInfo
|
|
14
|
+
|
|
15
|
+
public extension CalendarInfo {
|
|
16
|
+
private typealias bridge = margelo.nitro.one.bridge.swift
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Create a new instance of `CalendarInfo`.
|
|
20
|
+
*/
|
|
21
|
+
init(calendar: String?, timeZone: String?, uses24hourClock: Bool?, firstWeekday: Double?) {
|
|
22
|
+
self.init({ () -> bridge.std__optional_std__string_ in
|
|
23
|
+
if let __unwrappedValue = calendar {
|
|
24
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
25
|
+
} else {
|
|
26
|
+
return .init()
|
|
27
|
+
}
|
|
28
|
+
}(), { () -> bridge.std__optional_std__string_ in
|
|
29
|
+
if let __unwrappedValue = timeZone {
|
|
30
|
+
return bridge.create_std__optional_std__string_(std.string(__unwrappedValue))
|
|
31
|
+
} else {
|
|
32
|
+
return .init()
|
|
33
|
+
}
|
|
34
|
+
}(), { () -> bridge.std__optional_bool_ in
|
|
35
|
+
if let __unwrappedValue = uses24hourClock {
|
|
36
|
+
return bridge.create_std__optional_bool_(__unwrappedValue)
|
|
37
|
+
} else {
|
|
38
|
+
return .init()
|
|
39
|
+
}
|
|
40
|
+
}(), { () -> bridge.std__optional_double_ in
|
|
41
|
+
if let __unwrappedValue = firstWeekday {
|
|
42
|
+
return bridge.create_std__optional_double_(__unwrappedValue)
|
|
43
|
+
} else {
|
|
44
|
+
return .init()
|
|
45
|
+
}
|
|
46
|
+
}())
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@inline(__always)
|
|
50
|
+
var calendar: String? {
|
|
51
|
+
return { () -> String? in
|
|
52
|
+
if bridge.has_value_std__optional_std__string_(self.__calendar) {
|
|
53
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__calendar)
|
|
54
|
+
return String(__unwrapped)
|
|
55
|
+
} else {
|
|
56
|
+
return nil
|
|
57
|
+
}
|
|
58
|
+
}()
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
@inline(__always)
|
|
62
|
+
var timeZone: String? {
|
|
63
|
+
return { () -> String? in
|
|
64
|
+
if bridge.has_value_std__optional_std__string_(self.__timeZone) {
|
|
65
|
+
let __unwrapped = bridge.get_std__optional_std__string_(self.__timeZone)
|
|
66
|
+
return String(__unwrapped)
|
|
67
|
+
} else {
|
|
68
|
+
return nil
|
|
69
|
+
}
|
|
70
|
+
}()
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
@inline(__always)
|
|
74
|
+
var uses24hourClock: Bool? {
|
|
75
|
+
return { () -> Bool? in
|
|
76
|
+
if bridge.has_value_std__optional_bool_(self.__uses24hourClock) {
|
|
77
|
+
let __unwrapped = bridge.get_std__optional_bool_(self.__uses24hourClock)
|
|
78
|
+
return __unwrapped
|
|
79
|
+
} else {
|
|
80
|
+
return nil
|
|
81
|
+
}
|
|
82
|
+
}()
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
@inline(__always)
|
|
86
|
+
var firstWeekday: Double? {
|
|
87
|
+
return { () -> Double? in
|
|
88
|
+
if bridge.has_value_std__optional_double_(self.__firstWeekday) {
|
|
89
|
+
let __unwrapped = bridge.get_std__optional_double_(self.__firstWeekday)
|
|
90
|
+
return __unwrapped
|
|
91
|
+
} else {
|
|
92
|
+
return nil
|
|
93
|
+
}
|
|
94
|
+
}()
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -17,10 +17,10 @@ public extension HapticImpact {
|
|
|
17
17
|
*/
|
|
18
18
|
init?(fromString string: String) {
|
|
19
19
|
switch string {
|
|
20
|
-
case "light":
|
|
21
|
-
self = .light
|
|
22
20
|
case "medium":
|
|
23
21
|
self = .medium
|
|
22
|
+
case "light":
|
|
23
|
+
self = .light
|
|
24
24
|
case "heavy":
|
|
25
25
|
self = .heavy
|
|
26
26
|
case "soft":
|
|
@@ -37,10 +37,10 @@ public extension HapticImpact {
|
|
|
37
37
|
*/
|
|
38
38
|
var stringValue: String {
|
|
39
39
|
switch self {
|
|
40
|
-
case .light:
|
|
41
|
-
return "light"
|
|
42
40
|
case .medium:
|
|
43
41
|
return "medium"
|
|
42
|
+
case .light:
|
|
43
|
+
return "light"
|
|
44
44
|
case .heavy:
|
|
45
45
|
return "heavy"
|
|
46
46
|
case .soft:
|
|
@@ -15,6 +15,9 @@ public protocol HybridOneDeviceSpec_protocol: HybridObject {
|
|
|
15
15
|
// Methods
|
|
16
16
|
func getInfo() throws -> Promise<DeviceInfo>
|
|
17
17
|
func getLocalizationInfo() throws -> Promise<LocalizationInfo>
|
|
18
|
+
func getLocales() throws -> [LocaleInfo]
|
|
19
|
+
func getCalendars() throws -> [CalendarInfo]
|
|
20
|
+
func addLocalizationListener(listener: @escaping () -> Void) throws -> () -> Void
|
|
18
21
|
}
|
|
19
22
|
|
|
20
23
|
public extension HybridOneDeviceSpec_protocol {
|
|
@@ -161,4 +161,60 @@ open class HybridOneDeviceSpec_cxx {
|
|
|
161
161
|
return bridge.create_Result_std__shared_ptr_Promise_LocalizationInfo___(__exceptionPtr)
|
|
162
162
|
}
|
|
163
163
|
}
|
|
164
|
+
|
|
165
|
+
@inline(__always)
|
|
166
|
+
public final func getLocales() -> bridge.Result_std__vector_LocaleInfo__ {
|
|
167
|
+
do {
|
|
168
|
+
let __result = try self.__implementation.getLocales()
|
|
169
|
+
let __resultCpp = { () -> bridge.std__vector_LocaleInfo_ in
|
|
170
|
+
var __vector = bridge.create_std__vector_LocaleInfo_(__result.count)
|
|
171
|
+
for __item in __result {
|
|
172
|
+
__vector.push_back(__item)
|
|
173
|
+
}
|
|
174
|
+
return __vector
|
|
175
|
+
}()
|
|
176
|
+
return bridge.create_Result_std__vector_LocaleInfo__(__resultCpp)
|
|
177
|
+
} catch (let __error) {
|
|
178
|
+
let __exceptionPtr = __error.toCpp()
|
|
179
|
+
return bridge.create_Result_std__vector_LocaleInfo__(__exceptionPtr)
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
@inline(__always)
|
|
184
|
+
public final func getCalendars() -> bridge.Result_std__vector_CalendarInfo__ {
|
|
185
|
+
do {
|
|
186
|
+
let __result = try self.__implementation.getCalendars()
|
|
187
|
+
let __resultCpp = { () -> bridge.std__vector_CalendarInfo_ in
|
|
188
|
+
var __vector = bridge.create_std__vector_CalendarInfo_(__result.count)
|
|
189
|
+
for __item in __result {
|
|
190
|
+
__vector.push_back(__item)
|
|
191
|
+
}
|
|
192
|
+
return __vector
|
|
193
|
+
}()
|
|
194
|
+
return bridge.create_Result_std__vector_CalendarInfo__(__resultCpp)
|
|
195
|
+
} catch (let __error) {
|
|
196
|
+
let __exceptionPtr = __error.toCpp()
|
|
197
|
+
return bridge.create_Result_std__vector_CalendarInfo__(__exceptionPtr)
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
@inline(__always)
|
|
202
|
+
public final func addLocalizationListener(listener: bridge.Func_void) -> bridge.Result_std__function_void____ {
|
|
203
|
+
do {
|
|
204
|
+
let __result = try self.__implementation.addLocalizationListener(listener: { () -> () -> Void in
|
|
205
|
+
let __wrappedFunction = bridge.wrap_Func_void(listener)
|
|
206
|
+
return { () -> Void in
|
|
207
|
+
__wrappedFunction.call()
|
|
208
|
+
}
|
|
209
|
+
}())
|
|
210
|
+
let __resultCpp = { () -> bridge.Func_void in
|
|
211
|
+
let __closureWrapper = Func_void(__result)
|
|
212
|
+
return bridge.create_Func_void(__closureWrapper.toUnsafe())
|
|
213
|
+
}()
|
|
214
|
+
return bridge.create_Result_std__function_void____(__resultCpp)
|
|
215
|
+
} catch (let __error) {
|
|
216
|
+
let __exceptionPtr = __error.toCpp()
|
|
217
|
+
return bridge.create_Result_std__function_void____(__exceptionPtr)
|
|
218
|
+
}
|
|
219
|
+
}
|
|
164
220
|
}
|
|
@@ -16,6 +16,7 @@ public protocol HybridOneHapticsSpec_protocol: HybridObject {
|
|
|
16
16
|
func selection() throws -> Void
|
|
17
17
|
func impact(style: HapticImpact) throws -> Void
|
|
18
18
|
func notification(type: HapticNotification) throws -> Void
|
|
19
|
+
func performAndroidHaptics(type: AndroidHaptic) throws -> Void
|
|
19
20
|
}
|
|
20
21
|
|
|
21
22
|
public extension HybridOneHapticsSpec_protocol {
|
|
@@ -156,4 +156,15 @@ open class HybridOneHapticsSpec_cxx {
|
|
|
156
156
|
return bridge.create_Result_void_(__exceptionPtr)
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
+
|
|
160
|
+
@inline(__always)
|
|
161
|
+
public final func performAndroidHaptics(type: Int32) -> bridge.Result_void_ {
|
|
162
|
+
do {
|
|
163
|
+
try self.__implementation.performAndroidHaptics(type: margelo.nitro.one.AndroidHaptic(rawValue: type)!)
|
|
164
|
+
return bridge.create_Result_void_()
|
|
165
|
+
} catch (let __error) {
|
|
166
|
+
let __exceptionPtr = __error.toCpp()
|
|
167
|
+
return bridge.create_Result_void_(__exceptionPtr)
|
|
168
|
+
}
|
|
169
|
+
}
|
|
159
170
|
}
|
|
@@ -10,11 +10,13 @@ import NitroModules
|
|
|
10
10
|
/// See ``HybridOneKeepAwakeSpec``
|
|
11
11
|
public protocol HybridOneKeepAwakeSpec_protocol: HybridObject {
|
|
12
12
|
// Properties
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
|
|
15
15
|
// Methods
|
|
16
16
|
func isEnabled() throws -> Promise<Bool>
|
|
17
17
|
func setEnabled(enabled: Bool) throws -> Promise<Void>
|
|
18
|
+
func activate(tag: String) throws -> Promise<Void>
|
|
19
|
+
func deactivate(tag: String) throws -> Promise<Void>
|
|
18
20
|
}
|
|
19
21
|
|
|
20
22
|
public extension HybridOneKeepAwakeSpec_protocol {
|