@use-voltra/ios-client 1.4.1 → 2.0.0-rc.2
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/README.md +113 -0
- package/Voltra.podspec +28 -0
- package/build/commonjs/VoltraModule.js +13 -0
- package/build/commonjs/VoltraModule.js.map +1 -0
- package/build/commonjs/components/VoltraLiveActivityPreview.js +30 -0
- package/build/commonjs/components/VoltraLiveActivityPreview.js.map +1 -0
- package/build/commonjs/components/VoltraView.js +50 -0
- package/build/commonjs/components/VoltraView.js.map +1 -0
- package/build/commonjs/components/VoltraWidgetPreview.js +58 -0
- package/build/commonjs/components/VoltraWidgetPreview.js.map +1 -0
- package/build/commonjs/events.js +32 -0
- package/build/commonjs/events.js.map +1 -0
- package/build/commonjs/helpers.js +26 -0
- package/build/commonjs/helpers.js.map +1 -0
- package/build/commonjs/index.js +226 -0
- package/build/commonjs/index.js.map +1 -0
- package/build/commonjs/live-activity/api.js +168 -0
- package/build/commonjs/live-activity/api.js.map +1 -0
- package/build/commonjs/logger.js +39 -0
- package/build/commonjs/logger.js.map +1 -0
- package/build/commonjs/native/NativeVoltra.js +15 -0
- package/build/commonjs/native/NativeVoltra.js.map +1 -0
- package/build/commonjs/native/VoltraRNNativeComponent.ts +9 -0
- package/build/commonjs/package.json +1 -0
- package/build/commonjs/preload.js +54 -0
- package/build/commonjs/preload.js.map +1 -0
- package/build/commonjs/types.js +2 -0
- package/build/commonjs/types.js.map +1 -0
- package/build/commonjs/utils/assertRunningOnApple.js +16 -0
- package/build/commonjs/utils/assertRunningOnApple.js.map +1 -0
- package/build/commonjs/utils/helpers.js +19 -0
- package/build/commonjs/utils/helpers.js.map +1 -0
- package/build/commonjs/utils/index.js +28 -0
- package/build/commonjs/utils/index.js.map +1 -0
- package/build/commonjs/utils/useUpdateOnHMR.js +25 -0
- package/build/commonjs/utils/useUpdateOnHMR.js.map +1 -0
- package/build/commonjs/widgets/server-credentials.js +18 -0
- package/build/commonjs/widgets/server-credentials.js.map +1 -0
- package/build/commonjs/widgets/widget-api.js +55 -0
- package/build/commonjs/widgets/widget-api.js.map +1 -0
- package/build/module/VoltraModule.js +4 -0
- package/build/module/VoltraModule.js.map +1 -0
- package/build/module/components/VoltraLiveActivityPreview.js +25 -0
- package/build/module/components/VoltraLiveActivityPreview.js.map +1 -0
- package/build/module/components/VoltraView.js +44 -0
- package/build/module/components/VoltraView.js.map +1 -0
- package/build/module/components/VoltraWidgetPreview.js +53 -0
- package/build/module/components/VoltraWidgetPreview.js.map +1 -0
- package/build/module/events.js +28 -0
- package/build/module/events.js.map +1 -0
- package/build/module/helpers.js +21 -0
- package/build/module/helpers.js.map +1 -0
- package/build/module/index.js +17 -0
- package/build/module/index.js.map +1 -0
- package/build/module/live-activity/api.js +158 -0
- package/build/module/live-activity/api.js.map +1 -0
- package/build/module/logger.js +35 -0
- package/build/module/logger.js.map +1 -0
- package/build/module/native/NativeVoltra.js +11 -0
- package/build/module/native/NativeVoltra.js.map +1 -0
- package/build/module/native/VoltraRNNativeComponent.ts +9 -0
- package/build/module/package.json +1 -0
- package/build/module/preload.js +48 -0
- package/build/module/preload.js.map +1 -0
- package/build/module/types.js +2 -0
- package/build/module/types.js.map +1 -0
- package/build/module/utils/assertRunningOnApple.js +11 -0
- package/build/module/utils/assertRunningOnApple.js.map +1 -0
- package/build/module/utils/helpers.js +4 -0
- package/build/module/utils/helpers.js.map +1 -0
- package/build/module/utils/index.js +5 -0
- package/build/module/utils/index.js.map +1 -0
- package/build/module/utils/useUpdateOnHMR.js +20 -0
- package/build/module/utils/useUpdateOnHMR.js.map +1 -0
- package/build/module/widgets/server-credentials.js +13 -0
- package/build/module/widgets/server-credentials.js.map +1 -0
- package/build/module/widgets/widget-api.js +45 -0
- package/build/module/widgets/widget-api.js.map +1 -0
- package/build/typescript/commonjs/VoltraModule.d.ts +3 -0
- package/build/typescript/commonjs/VoltraModule.d.ts.map +1 -0
- package/build/typescript/commonjs/components/VoltraLiveActivityPreview.d.ts.map +1 -0
- package/build/typescript/commonjs/components/VoltraView.d.ts.map +1 -0
- package/build/typescript/commonjs/components/VoltraWidgetPreview.d.ts.map +1 -0
- package/build/typescript/commonjs/events.d.ts.map +1 -0
- package/build/typescript/commonjs/helpers.d.ts.map +1 -0
- package/build/{types → typescript/commonjs}/index.d.ts +5 -0
- package/build/typescript/commonjs/index.d.ts.map +1 -0
- package/build/typescript/commonjs/live-activity/api.d.ts.map +1 -0
- package/build/typescript/commonjs/logger.d.ts.map +1 -0
- package/build/typescript/commonjs/native/NativeVoltra.d.ts +100 -0
- package/build/typescript/commonjs/native/NativeVoltra.d.ts.map +1 -0
- package/build/typescript/commonjs/native/VoltraRNNativeComponent.d.ts +8 -0
- package/build/typescript/commonjs/native/VoltraRNNativeComponent.d.ts.map +1 -0
- package/build/typescript/commonjs/package.json +1 -0
- package/build/typescript/commonjs/preload.d.ts.map +1 -0
- package/build/typescript/commonjs/types.d.ts.map +1 -0
- package/build/typescript/commonjs/utils/assertRunningOnApple.d.ts.map +1 -0
- package/build/typescript/commonjs/utils/helpers.d.ts.map +1 -0
- package/build/typescript/commonjs/utils/index.d.ts.map +1 -0
- package/build/typescript/commonjs/utils/useUpdateOnHMR.d.ts.map +1 -0
- package/build/typescript/commonjs/widgets/server-credentials.d.ts.map +1 -0
- package/build/typescript/commonjs/widgets/widget-api.d.ts.map +1 -0
- package/build/typescript/module/VoltraModule.d.ts +3 -0
- package/build/typescript/module/VoltraModule.d.ts.map +1 -0
- package/build/typescript/module/components/VoltraLiveActivityPreview.d.ts +7 -0
- package/build/typescript/module/components/VoltraLiveActivityPreview.d.ts.map +1 -0
- package/build/typescript/module/components/VoltraView.d.ts +12 -0
- package/build/typescript/module/components/VoltraView.d.ts.map +1 -0
- package/build/typescript/module/components/VoltraWidgetPreview.d.ts +9 -0
- package/build/typescript/module/components/VoltraWidgetPreview.d.ts.map +1 -0
- package/build/typescript/module/events.d.ts +33 -0
- package/build/typescript/module/events.d.ts.map +1 -0
- package/build/typescript/module/helpers.d.ts +3 -0
- package/build/typescript/module/helpers.d.ts.map +1 -0
- package/build/typescript/module/index.d.ts +18 -0
- package/build/typescript/module/index.d.ts.map +1 -0
- package/build/typescript/module/live-activity/api.d.ts +35 -0
- package/build/typescript/module/live-activity/api.d.ts.map +1 -0
- package/build/typescript/module/logger.d.ts +16 -0
- package/build/typescript/module/logger.d.ts.map +1 -0
- package/build/typescript/module/native/NativeVoltra.d.ts +100 -0
- package/build/typescript/module/native/NativeVoltra.d.ts.map +1 -0
- package/build/typescript/module/native/VoltraRNNativeComponent.d.ts +8 -0
- package/build/typescript/module/native/VoltraRNNativeComponent.d.ts.map +1 -0
- package/build/typescript/module/package.json +1 -0
- package/build/typescript/module/preload.d.ts +6 -0
- package/build/typescript/module/preload.d.ts.map +1 -0
- package/build/typescript/module/types.d.ts +2 -0
- package/build/typescript/module/types.d.ts.map +1 -0
- package/build/typescript/module/utils/assertRunningOnApple.d.ts +2 -0
- package/build/typescript/module/utils/assertRunningOnApple.d.ts.map +1 -0
- package/build/{esm/utils/helpers.js → typescript/module/utils/helpers.d.ts} +1 -1
- package/build/typescript/module/utils/helpers.d.ts.map +1 -0
- package/build/{esm/utils/index.js → typescript/module/utils/index.d.ts} +1 -1
- package/build/typescript/module/utils/index.d.ts.map +1 -0
- package/build/typescript/module/utils/useUpdateOnHMR.d.ts +5 -0
- package/build/typescript/module/utils/useUpdateOnHMR.d.ts.map +1 -0
- package/build/typescript/module/widgets/server-credentials.d.ts +5 -0
- package/build/typescript/module/widgets/server-credentials.d.ts.map +1 -0
- package/build/typescript/module/widgets/widget-api.d.ts +11 -0
- package/build/typescript/module/widgets/widget-api.d.ts.map +1 -0
- package/expo-plugin/app.plugin.js +3 -0
- package/expo-plugin/build/cjs/constants.js +23 -0
- package/expo-plugin/build/cjs/constants.js.map +1 -0
- package/expo-plugin/build/cjs/index.js +51 -0
- package/expo-plugin/build/cjs/index.js.map +1 -0
- package/expo-plugin/build/cjs/ios/eas.js +28 -0
- package/expo-plugin/build/cjs/ios/eas.js.map +1 -0
- package/expo-plugin/build/cjs/ios/entitlements.js +46 -0
- package/expo-plugin/build/cjs/ios/entitlements.js.map +1 -0
- package/expo-plugin/build/cjs/ios/index.js +39 -0
- package/expo-plugin/build/cjs/ios/index.js.map +1 -0
- package/expo-plugin/build/cjs/ios/infoPlist.js +51 -0
- package/expo-plugin/build/cjs/ios/infoPlist.js.map +1 -0
- package/expo-plugin/build/cjs/ios/pushNotifications.js +22 -0
- package/expo-plugin/build/cjs/ios/pushNotifications.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/eas.js +66 -0
- package/expo-plugin/build/cjs/ios-widget/eas.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/files/assets.js +199 -0
- package/expo-plugin/build/cjs/ios-widget/files/assets.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/files/entitlements.js +77 -0
- package/expo-plugin/build/cjs/ios-widget/files/entitlements.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/files/index.js +92 -0
- package/expo-plugin/build/cjs/ios-widget/files/index.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/files/infoPlist.js +91 -0
- package/expo-plugin/build/cjs/ios-widget/files/infoPlist.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/files/swift.js +443 -0
- package/expo-plugin/build/cjs/ios-widget/files/swift.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/fonts.js +151 -0
- package/expo-plugin/build/cjs/ios-widget/fonts.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/index.js +46 -0
- package/expo-plugin/build/cjs/ios-widget/index.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/podfile.js +41 -0
- package/expo-plugin/build/cjs/ios-widget/podfile.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/widgetPlist.js +99 -0
- package/expo-plugin/build/cjs/ios-widget/widgetPlist.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/buildPhases.js +247 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/buildPhases.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/configurationList.js +91 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/configurationList.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/groups.js +79 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/groups.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/index.js +155 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/index.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/mainAppSettings.js +71 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/mainAppSettings.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/productFile.js +74 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/productFile.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/target.js +113 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/target.js.map +1 -0
- package/expo-plugin/build/cjs/utils/fileDiscovery.js +120 -0
- package/expo-plugin/build/cjs/utils/fileDiscovery.js.map +1 -0
- package/expo-plugin/build/cjs/utils/urlScheme.js +40 -0
- package/expo-plugin/build/cjs/utils/urlScheme.js.map +1 -0
- package/expo-plugin/build/cjs/validation.js +55 -0
- package/expo-plugin/build/cjs/validation.js.map +1 -0
- package/expo-plugin/build/esm/constants.js +20 -0
- package/expo-plugin/build/esm/constants.js.map +1 -0
- package/expo-plugin/build/esm/index.js +49 -0
- package/expo-plugin/build/esm/index.js.map +1 -0
- package/expo-plugin/build/esm/ios/eas.js +24 -0
- package/expo-plugin/build/esm/ios/eas.js.map +1 -0
- package/expo-plugin/build/esm/ios/entitlements.js +42 -0
- package/expo-plugin/build/esm/ios/entitlements.js.map +1 -0
- package/expo-plugin/build/esm/ios/index.js +34 -0
- package/expo-plugin/build/esm/ios/index.js.map +1 -0
- package/expo-plugin/build/esm/ios/infoPlist.js +47 -0
- package/expo-plugin/build/esm/ios/infoPlist.js.map +1 -0
- package/expo-plugin/build/esm/ios/pushNotifications.js +18 -0
- package/expo-plugin/build/esm/ios/pushNotifications.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/eas.js +62 -0
- package/expo-plugin/build/esm/ios-widget/eas.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/files/assets.js +163 -0
- package/expo-plugin/build/esm/ios-widget/files/assets.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/files/entitlements.js +37 -0
- package/expo-plugin/build/esm/ios-widget/files/entitlements.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/files/index.js +55 -0
- package/expo-plugin/build/esm/ios-widget/files/index.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/files/infoPlist.js +55 -0
- package/expo-plugin/build/esm/ios-widget/files/infoPlist.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/files/swift.js +403 -0
- package/expo-plugin/build/esm/ios-widget/files/swift.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/fonts.js +111 -0
- package/expo-plugin/build/esm/ios-widget/fonts.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/index.js +42 -0
- package/expo-plugin/build/esm/ios-widget/index.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/podfile.js +37 -0
- package/expo-plugin/build/esm/ios-widget/podfile.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/widgetPlist.js +92 -0
- package/expo-plugin/build/esm/ios-widget/widgetPlist.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/xcode/buildPhases.js +210 -0
- package/expo-plugin/build/esm/ios-widget/xcode/buildPhases.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/xcode/configurationList.js +87 -0
- package/expo-plugin/build/esm/ios-widget/xcode/configurationList.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/xcode/groups.js +75 -0
- package/expo-plugin/build/esm/ios-widget/xcode/groups.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/xcode/index.js +118 -0
- package/expo-plugin/build/esm/ios-widget/xcode/index.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/xcode/mainAppSettings.js +68 -0
- package/expo-plugin/build/esm/ios-widget/xcode/mainAppSettings.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/xcode/productFile.js +70 -0
- package/expo-plugin/build/esm/ios-widget/xcode/productFile.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/xcode/target.js +108 -0
- package/expo-plugin/build/esm/ios-widget/xcode/target.js.map +1 -0
- package/expo-plugin/build/esm/utils/fileDiscovery.js +83 -0
- package/expo-plugin/build/esm/utils/fileDiscovery.js.map +1 -0
- package/expo-plugin/build/esm/utils/urlScheme.js +37 -0
- package/expo-plugin/build/esm/utils/urlScheme.js.map +1 -0
- package/expo-plugin/build/esm/validation.js +51 -0
- package/expo-plugin/build/esm/validation.js.map +1 -0
- package/expo-plugin/build/types/constants.d.ts +13 -0
- package/expo-plugin/build/types/constants.d.ts.map +1 -0
- package/expo-plugin/build/types/index.d.ts +10 -0
- package/expo-plugin/build/types/index.d.ts.map +1 -0
- package/expo-plugin/build/types/ios/eas.d.ts +12 -0
- package/expo-plugin/build/types/ios/eas.d.ts.map +1 -0
- package/expo-plugin/build/types/ios/entitlements.d.ts +14 -0
- package/expo-plugin/build/types/ios/entitlements.d.ts.map +1 -0
- package/expo-plugin/build/types/ios/index.d.ts +19 -0
- package/expo-plugin/build/types/ios/index.d.ts.map +1 -0
- package/expo-plugin/build/types/ios/infoPlist.d.ts +21 -0
- package/expo-plugin/build/types/ios/infoPlist.d.ts.map +1 -0
- package/expo-plugin/build/types/ios/pushNotifications.d.ts +10 -0
- package/expo-plugin/build/types/ios/pushNotifications.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/eas.d.ts +15 -0
- package/expo-plugin/build/types/ios-widget/eas.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/files/assets.d.ts +13 -0
- package/expo-plugin/build/types/ios-widget/files/assets.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/files/entitlements.d.ts +17 -0
- package/expo-plugin/build/types/ios-widget/files/entitlements.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/files/index.d.ts +24 -0
- package/expo-plugin/build/types/ios-widget/files/index.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/files/infoPlist.d.ts +10 -0
- package/expo-plugin/build/types/ios-widget/files/infoPlist.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/files/swift.d.ts +24 -0
- package/expo-plugin/build/types/ios-widget/files/swift.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/fonts.d.ts +22 -0
- package/expo-plugin/build/types/ios-widget/fonts.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/index.d.ts +31 -0
- package/expo-plugin/build/types/ios-widget/index.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/podfile.d.ts +9 -0
- package/expo-plugin/build/types/ios-widget/podfile.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/widgetPlist.d.ts +20 -0
- package/expo-plugin/build/types/ios-widget/widgetPlist.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/xcode/buildPhases.d.ts +25 -0
- package/expo-plugin/build/types/ios-widget/xcode/buildPhases.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/xcode/configurationList.d.ts +20 -0
- package/expo-plugin/build/types/ios-widget/xcode/configurationList.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/xcode/groups.d.ts +15 -0
- package/expo-plugin/build/types/ios-widget/xcode/groups.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/xcode/index.d.ts +20 -0
- package/expo-plugin/build/types/ios-widget/xcode/index.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/xcode/mainAppSettings.d.ts +15 -0
- package/expo-plugin/build/types/ios-widget/xcode/mainAppSettings.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/xcode/productFile.d.ts +14 -0
- package/expo-plugin/build/types/ios-widget/xcode/productFile.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/xcode/target.d.ts +42 -0
- package/expo-plugin/build/types/ios-widget/xcode/target.d.ts.map +1 -0
- package/expo-plugin/build/types/types.d.ts +74 -0
- package/expo-plugin/build/types/types.d.ts.map +1 -0
- package/expo-plugin/build/types/utils/fileDiscovery.d.ts +15 -0
- package/expo-plugin/build/types/utils/fileDiscovery.d.ts.map +1 -0
- package/expo-plugin/build/types/utils/urlScheme.d.ts +10 -0
- package/expo-plugin/build/types/utils/urlScheme.d.ts.map +1 -0
- package/expo-plugin/build/types/validation.d.ts +4 -0
- package/expo-plugin/build/types/validation.d.ts.map +1 -0
- package/expo-plugin/jest.config.js +18 -0
- package/expo-plugin/src/constants.ts +25 -0
- package/expo-plugin/src/index.ts +72 -0
- package/expo-plugin/src/ios/eas.ts +33 -0
- package/expo-plugin/src/ios/entitlements.ts +59 -0
- package/expo-plugin/src/ios/index.ts +47 -0
- package/expo-plugin/src/ios/infoPlist.ts +63 -0
- package/expo-plugin/src/ios/pushNotifications.ts +22 -0
- package/expo-plugin/src/ios-widget/eas.ts +79 -0
- package/expo-plugin/src/ios-widget/files/assets.ts +201 -0
- package/expo-plugin/src/ios-widget/files/entitlements.ts +48 -0
- package/expo-plugin/src/ios-widget/files/index.ts +74 -0
- package/expo-plugin/src/ios-widget/files/infoPlist.ts +57 -0
- package/expo-plugin/src/ios-widget/files/swift.node.test.ts +22 -0
- package/expo-plugin/src/ios-widget/files/swift.ts +476 -0
- package/expo-plugin/src/ios-widget/fonts.ts +132 -0
- package/expo-plugin/src/ios-widget/index.ts +73 -0
- package/expo-plugin/src/ios-widget/podfile.ts +44 -0
- package/expo-plugin/src/ios-widget/widgetPlist.ts +115 -0
- package/expo-plugin/src/ios-widget/xcode/buildPhases.ts +301 -0
- package/expo-plugin/src/ios-widget/xcode/configurationList.ts +127 -0
- package/expo-plugin/src/ios-widget/xcode/groups.ts +101 -0
- package/expo-plugin/src/ios-widget/xcode/index.ts +149 -0
- package/expo-plugin/src/ios-widget/xcode/mainAppSettings.ts +95 -0
- package/expo-plugin/src/ios-widget/xcode/productFile.ts +91 -0
- package/expo-plugin/src/ios-widget/xcode/target.ts +148 -0
- package/expo-plugin/src/types.ts +89 -0
- package/expo-plugin/src/utils/fileDiscovery.ts +96 -0
- package/expo-plugin/src/utils/urlScheme.ts +45 -0
- package/expo-plugin/src/validation.node.test.ts +19 -0
- package/expo-plugin/src/validation.ts +63 -0
- package/expo-plugin/tsconfig.base.json +17 -0
- package/expo-plugin/tsconfig.cjs.json +9 -0
- package/expo-plugin/tsconfig.esm.json +9 -0
- package/expo-plugin/tsconfig.jest.json +8 -0
- package/expo-plugin/tsconfig.typecheck.json +12 -0
- package/expo-plugin/tsconfig.types.json +10 -0
- package/ios/Package.swift +68 -0
- package/ios/Tests/JSGradientParserTests.swift +201 -0
- package/ios/Tests/VoltraSharedTests/SmokeTests.swift +8 -0
- package/ios/VoltraWidget.podspec +30 -0
- package/ios/app/NativeVoltra.h +5 -0
- package/ios/app/NativeVoltra.mm +211 -0
- package/ios/app/VoltraActivity.swift +5 -0
- package/ios/app/VoltraImagePreload.swift +154 -0
- package/ios/app/VoltraLiveActivityManager.swift +228 -0
- package/ios/app/VoltraLiveActivityService.swift +306 -0
- package/ios/app/VoltraModule.swift +215 -0
- package/ios/app/VoltraModuleImpl.swift +331 -0
- package/ios/app/VoltraOptions.swift +27 -0
- package/ios/app/VoltraViewComponentView.h +10 -0
- package/ios/app/VoltraViewComponentView.mm +67 -0
- package/ios/app/VoltraViewRoot.swift +63 -0
- package/ios/app/VoltraWidgetService.swift +154 -0
- package/ios/shared/BrotliCompression.swift +81 -0
- package/ios/shared/ComponentTypeID.swift +117 -0
- package/ios/shared/Data+hexString.swift +8 -0
- package/ios/shared/Date+toTimerInterval.swift +25 -0
- package/ios/shared/JSONValue.swift +128 -0
- package/ios/shared/ShortNames.swift +180 -0
- package/ios/shared/VoltraAttributes.swift +58 -0
- package/ios/shared/VoltraConfig.swift +18 -0
- package/ios/shared/VoltraConstants.swift +45 -0
- package/ios/shared/VoltraElement.swift +153 -0
- package/ios/shared/VoltraEvent.swift +72 -0
- package/ios/shared/VoltraEventBus.swift +80 -0
- package/ios/shared/VoltraImageStore.swift +119 -0
- package/ios/shared/VoltraInitialStateLocale.swift +54 -0
- package/ios/shared/VoltraInteractionIntent.swift +39 -0
- package/ios/shared/VoltraKeychainHelper.swift +178 -0
- package/ios/shared/VoltraLiveActivityPayload.swift +113 -0
- package/ios/shared/VoltraLogger.swift +30 -0
- package/ios/shared/VoltraNode.swift +194 -0
- package/ios/shared/VoltraPayloadMigrator.swift +63 -0
- package/ios/shared/VoltraPersistentEventQueue.swift +67 -0
- package/ios/shared/VoltraRefreshIntent.swift +29 -0
- package/ios/shared/VoltraRegion.swift +37 -0
- package/ios/shared/VoltraWidgetDefaults.swift +114 -0
- package/ios/shared/VoltraWidgetServerFetcher.swift +166 -0
- package/ios/target/VoltraHomeWidget.swift +508 -0
- package/ios/target/VoltraWidget.swift +158 -0
- package/ios/ui/Extensions/View.modifiers.swift +28 -0
- package/ios/ui/Extensions/VoltraNode+Parameters.swift +18 -0
- package/ios/ui/Generated/Parameters/ButtonParameters.swift +15 -0
- package/ios/ui/Generated/Parameters/ChartParameters.swift +33 -0
- package/ios/ui/Generated/Parameters/CircularProgressViewParameters.swift +59 -0
- package/ios/ui/Generated/Parameters/ComponentParameters.swift +12 -0
- package/ios/ui/Generated/Parameters/DividerParameters.swift +12 -0
- package/ios/ui/Generated/Parameters/GaugeParameters.swift +54 -0
- package/ios/ui/Generated/Parameters/GlassContainerParameters.swift +15 -0
- package/ios/ui/Generated/Parameters/GroupBoxParameters.swift +12 -0
- package/ios/ui/Generated/Parameters/HStackParameters.swift +34 -0
- package/ios/ui/Generated/Parameters/ImageParameters.swift +29 -0
- package/ios/ui/Generated/Parameters/LabelParameters.swift +18 -0
- package/ios/ui/Generated/Parameters/LinearGradientParameters.swift +27 -0
- package/ios/ui/Generated/Parameters/LinearProgressViewParameters.swift +64 -0
- package/ios/ui/Generated/Parameters/LinkParameters.swift +15 -0
- package/ios/ui/Generated/Parameters/MaskParameters.swift +12 -0
- package/ios/ui/Generated/Parameters/SpacerParameters.swift +15 -0
- package/ios/ui/Generated/Parameters/SymbolParameters.swift +59 -0
- package/ios/ui/Generated/Parameters/TextParameters.swift +18 -0
- package/ios/ui/Generated/Parameters/TimerParameters.swift +54 -0
- package/ios/ui/Generated/Parameters/ToggleParameters.swift +24 -0
- package/ios/ui/Generated/Parameters/VStackParameters.swift +34 -0
- package/ios/ui/Generated/Parameters/ViewParameters.swift +12 -0
- package/ios/ui/Generated/Parameters/ZStackParameters.swift +15 -0
- package/ios/ui/Helpers/VoltraDeepLinkResolver.swift +43 -0
- package/ios/ui/Helpers/VoltraProgressDriver.swift +52 -0
- package/ios/ui/Layout/FlexContainerHelper.swift +114 -0
- package/ios/ui/Layout/VoltraFlexStackLayout.swift +417 -0
- package/ios/ui/Protocols/VoltraView.swift +29 -0
- package/ios/ui/Style/BackgroundValue.swift +27 -0
- package/ios/ui/Style/CompositeStyle.swift +81 -0
- package/ios/ui/Style/DecorationStyle.swift +207 -0
- package/ios/ui/Style/FlexEnvironment.swift +35 -0
- package/ios/ui/Style/FontVariant.swift +4 -0
- package/ios/ui/Style/GlassEffect.swift +6 -0
- package/ios/ui/Style/JSColorParser.swift +517 -0
- package/ios/ui/Style/JSGradientParser.swift +674 -0
- package/ios/ui/Style/JSStyleParser.swift +223 -0
- package/ios/ui/Style/LayoutStyle.swift +184 -0
- package/ios/ui/Style/Overflow.swift +4 -0
- package/ios/ui/Style/RenderingStyle.swift +33 -0
- package/ios/ui/Style/StyleConverter.swift +202 -0
- package/ios/ui/Style/TextDecoration.swift +6 -0
- package/ios/ui/Style/TextStyle.swift +50 -0
- package/ios/ui/Style/View+applyStyle.swift +38 -0
- package/ios/ui/Views/VoltraButton.swift +57 -0
- package/ios/ui/Views/VoltraChart.swift +840 -0
- package/ios/ui/Views/VoltraCircularProgressView.swift +103 -0
- package/ios/ui/Views/VoltraDivider.swift +16 -0
- package/ios/ui/Views/VoltraFlexView.swift +33 -0
- package/ios/ui/Views/VoltraGauge.swift +65 -0
- package/ios/ui/Views/VoltraGlassContainer.swift +29 -0
- package/ios/ui/Views/VoltraGroupBox.swift +26 -0
- package/ios/ui/Views/VoltraHStack.swift +70 -0
- package/ios/ui/Views/VoltraImage.swift +109 -0
- package/ios/ui/Views/VoltraLabel.swift +24 -0
- package/ios/ui/Views/VoltraLinearGradient.swift +115 -0
- package/ios/ui/Views/VoltraLinearProgressView.swift +118 -0
- package/ios/ui/Views/VoltraLink.swift +25 -0
- package/ios/ui/Views/VoltraMask.swift +23 -0
- package/ios/ui/Views/VoltraSpacer.swift +16 -0
- package/ios/ui/Views/VoltraSymbol.swift +160 -0
- package/ios/ui/Views/VoltraText.swift +87 -0
- package/ios/ui/Views/VoltraTimer.swift +131 -0
- package/ios/ui/Views/VoltraToggle.swift +39 -0
- package/ios/ui/Views/VoltraVStack.swift +68 -0
- package/ios/ui/Views/VoltraZStack.swift +33 -0
- package/ios/ui/Voltra.swift +86 -0
- package/package.json +105 -19
- package/src/VoltraModule.ts +2 -0
- package/src/components/VoltraLiveActivityPreview.tsx +29 -0
- package/src/components/VoltraView.tsx +49 -0
- package/src/components/VoltraWidgetPreview.tsx +38 -0
- package/src/events.ts +70 -0
- package/src/helpers.ts +21 -0
- package/src/index.ts +52 -0
- package/src/live-activity/api.ts +224 -0
- package/src/logger.ts +35 -0
- package/src/native/NativeVoltra.ts +118 -0
- package/src/native/VoltraRNNativeComponent.ts +9 -0
- package/src/preload.ts +50 -0
- package/src/types.ts +12 -0
- package/src/utils/assertRunningOnApple.ts +10 -0
- package/src/utils/helpers.ts +1 -0
- package/src/utils/index.ts +2 -0
- package/src/utils/useUpdateOnHMR.ts +25 -0
- package/src/widgets/server-credentials.ts +16 -0
- package/src/widgets/widget-api.ts +65 -0
- package/build/cjs/VoltraModule.js +0 -6
- package/build/cjs/VoltraModule.js.map +0 -1
- package/build/cjs/components/VoltraLiveActivityPreview.js +0 -20
- package/build/cjs/components/VoltraLiveActivityPreview.js.map +0 -1
- package/build/cjs/components/VoltraView.js +0 -37
- package/build/cjs/components/VoltraView.js.map +0 -1
- package/build/cjs/components/VoltraWidgetPreview.js +0 -26
- package/build/cjs/components/VoltraWidgetPreview.js.map +0 -1
- package/build/cjs/events.js +0 -19
- package/build/cjs/events.js.map +0 -1
- package/build/cjs/helpers.js +0 -30
- package/build/cjs/helpers.js.map +0 -1
- package/build/cjs/index.js +0 -49
- package/build/cjs/index.js.map +0 -1
- package/build/cjs/live-activity/api.js +0 -158
- package/build/cjs/live-activity/api.js.map +0 -1
- package/build/cjs/logger.js +0 -36
- package/build/cjs/logger.js.map +0 -1
- package/build/cjs/preload.js +0 -54
- package/build/cjs/preload.js.map +0 -1
- package/build/cjs/utils/assertRunningOnApple.js +0 -13
- package/build/cjs/utils/assertRunningOnApple.js.map +0 -1
- package/build/cjs/utils/helpers.js +0 -7
- package/build/cjs/utils/helpers.js.map +0 -1
- package/build/cjs/utils/index.js +0 -19
- package/build/cjs/utils/index.js.map +0 -1
- package/build/cjs/utils/useUpdateOnHMR.js +0 -22
- package/build/cjs/utils/useUpdateOnHMR.js.map +0 -1
- package/build/cjs/widgets/server-credentials.js +0 -18
- package/build/cjs/widgets/server-credentials.js.map +0 -1
- package/build/cjs/widgets/widget-api.js +0 -59
- package/build/cjs/widgets/widget-api.js.map +0 -1
- package/build/esm/VoltraModule.js +0 -4
- package/build/esm/VoltraModule.js.map +0 -1
- package/build/esm/components/VoltraLiveActivityPreview.js +0 -17
- package/build/esm/components/VoltraLiveActivityPreview.js.map +0 -1
- package/build/esm/components/VoltraView.js +0 -34
- package/build/esm/components/VoltraView.js.map +0 -1
- package/build/esm/components/VoltraWidgetPreview.js +0 -23
- package/build/esm/components/VoltraWidgetPreview.js.map +0 -1
- package/build/esm/events.js +0 -13
- package/build/esm/events.js.map +0 -1
- package/build/esm/helpers.js +0 -23
- package/build/esm/helpers.js.map +0 -1
- package/build/esm/index.js +0 -10
- package/build/esm/index.js.map +0 -1
- package/build/esm/live-activity/api.js +0 -146
- package/build/esm/live-activity/api.js.map +0 -1
- package/build/esm/logger.js +0 -33
- package/build/esm/logger.js.map +0 -1
- package/build/esm/preload.js +0 -46
- package/build/esm/preload.js.map +0 -1
- package/build/esm/utils/assertRunningOnApple.js +0 -9
- package/build/esm/utils/assertRunningOnApple.js.map +0 -1
- package/build/esm/utils/helpers.js.map +0 -1
- package/build/esm/utils/index.js.map +0 -1
- package/build/esm/utils/useUpdateOnHMR.js +0 -18
- package/build/esm/utils/useUpdateOnHMR.js.map +0 -1
- package/build/esm/widgets/server-credentials.js +0 -11
- package/build/esm/widgets/server-credentials.js.map +0 -1
- package/build/esm/widgets/widget-api.js +0 -47
- package/build/esm/widgets/widget-api.js.map +0 -1
- package/build/types/VoltraModule.d.ts +0 -44
- package/build/types/VoltraModule.d.ts.map +0 -1
- package/build/types/components/VoltraLiveActivityPreview.d.ts.map +0 -1
- package/build/types/components/VoltraView.d.ts.map +0 -1
- package/build/types/components/VoltraWidgetPreview.d.ts.map +0 -1
- package/build/types/events.d.ts.map +0 -1
- package/build/types/helpers.d.ts.map +0 -1
- package/build/types/index.d.ts.map +0 -1
- package/build/types/live-activity/api.d.ts.map +0 -1
- package/build/types/logger.d.ts.map +0 -1
- package/build/types/preload.d.ts.map +0 -1
- package/build/types/types.d.ts.map +0 -1
- package/build/types/utils/assertRunningOnApple.d.ts.map +0 -1
- package/build/types/utils/helpers.d.ts.map +0 -1
- package/build/types/utils/index.d.ts.map +0 -1
- package/build/types/utils/useUpdateOnHMR.d.ts.map +0 -1
- package/build/types/widgets/server-credentials.d.ts.map +0 -1
- package/build/types/widgets/widget-api.d.ts.map +0 -1
- /package/build/{types → typescript/commonjs}/components/VoltraLiveActivityPreview.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/components/VoltraView.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/components/VoltraWidgetPreview.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/events.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/helpers.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/live-activity/api.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/logger.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/preload.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/types.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/utils/assertRunningOnApple.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/utils/helpers.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/utils/index.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/utils/useUpdateOnHMR.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/widgets/server-credentials.d.ts +0 -0
- /package/build/{types → typescript/commonjs}/widgets/widget-api.d.ts +0 -0
- /package/{build → expo-plugin/build}/cjs/package.json +0 -0
- /package/{build → expo-plugin/build}/cjs/types.js +0 -0
- /package/{build → expo-plugin/build}/cjs/types.js.map +0 -0
- /package/{build → expo-plugin/build}/esm/package.json +0 -0
- /package/{build → expo-plugin/build}/esm/types.js +0 -0
- /package/{build → expo-plugin/build}/esm/types.js.map +0 -0
package/README.md
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+

|
|
2
|
+
|
|
3
|
+
### Voltra for iOS — React Native client
|
|
4
|
+
|
|
5
|
+
[![mit licence][license-badge]][license] [![npm downloads][npm-downloads-badge]][npm-downloads] [![PRs Welcome][prs-welcome-badge]][prs-welcome]
|
|
6
|
+
|
|
7
|
+
`@use-voltra/ios-client` is the iOS React Native package for Voltra. It re-exports the `Voltra` JSX namespace from `@use-voltra/ios` (installed automatically as a dependency) and provides runtime APIs for Live Activities and Home Screen widgets, development previews, event listeners, and the Expo config plugin.
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- **Live Activities**: Start, update, and end activities with `useLiveActivity`, `startLiveActivity`, and related APIs.
|
|
12
|
+
|
|
13
|
+
- **iOS Widgets**: Update, schedule, reload, and query widgets with `updateWidget`, `scheduleWidget`, `getActiveWidgets`, and more.
|
|
14
|
+
|
|
15
|
+
- **Fast Refresh**: Hooks and previews integrate with your React Native dev workflow.
|
|
16
|
+
|
|
17
|
+
- **Push & events**: Capture ActivityKit push tokens and component interactions via `addVoltraListener`.
|
|
18
|
+
|
|
19
|
+
- **Image preloading**: Download remote images for use in activities and widgets with `preloadImages` and `reloadLiveActivities`.
|
|
20
|
+
|
|
21
|
+
- **Expo config plugin**: Add `"@use-voltra/ios-client"` to `app.json` to generate the Live Activity extension, widget targets, and entitlements.
|
|
22
|
+
|
|
23
|
+
## Documentation
|
|
24
|
+
|
|
25
|
+
The documentation is available at [use-voltra.dev](https://use-voltra.dev). Relevant topics for this package:
|
|
26
|
+
|
|
27
|
+
- [Installation](https://use-voltra.dev/getting-started/installation)
|
|
28
|
+
- [iOS Setup](https://use-voltra.dev/ios/setup)
|
|
29
|
+
- [Developing Live Activities](https://use-voltra.dev/ios/development/developing-live-activities)
|
|
30
|
+
- [Developing Widgets](https://use-voltra.dev/ios/development/developing-widgets)
|
|
31
|
+
- [Plugin Configuration](https://use-voltra.dev/ios/api/plugin-configuration)
|
|
32
|
+
- [API Reference](https://use-voltra.dev/ios/api/configuration)
|
|
33
|
+
|
|
34
|
+
## Getting started
|
|
35
|
+
|
|
36
|
+
> [!NOTE]
|
|
37
|
+
> Voltra isn't supported in Expo Go. Use [Expo Dev Client](https://docs.expo.dev/versions/latest/sdk/dev-client/) or a native build.
|
|
38
|
+
|
|
39
|
+
Install the iOS client package:
|
|
40
|
+
|
|
41
|
+
```sh
|
|
42
|
+
npm install @use-voltra/ios-client
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Add the Expo plugin to your `app.json`:
|
|
46
|
+
|
|
47
|
+
```json
|
|
48
|
+
{
|
|
49
|
+
"expo": {
|
|
50
|
+
"plugins": [
|
|
51
|
+
[
|
|
52
|
+
"@use-voltra/ios-client",
|
|
53
|
+
{
|
|
54
|
+
"groupIdentifier": "group.your.bundle.identifier",
|
|
55
|
+
"enablePushNotifications": true
|
|
56
|
+
}
|
|
57
|
+
]
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Then run `npx expo prebuild --platform ios` to generate the native extension targets.
|
|
64
|
+
|
|
65
|
+
See the [iOS setup guide](https://use-voltra.dev/ios/setup) for detailed instructions.
|
|
66
|
+
|
|
67
|
+
## Quick example
|
|
68
|
+
|
|
69
|
+
```tsx
|
|
70
|
+
import { useLiveActivity, Voltra } from '@use-voltra/ios-client'
|
|
71
|
+
|
|
72
|
+
export function OrderTracker({ orderId }: { orderId: string }) {
|
|
73
|
+
const ui = (
|
|
74
|
+
<Voltra.VStack style={{ padding: 16, borderRadius: 14, backgroundColor: '#111827' }}>
|
|
75
|
+
<Voltra.Text style={{ color: 'white', fontSize: 18, fontWeight: '700' }}>Order #{orderId}</Voltra.Text>
|
|
76
|
+
<Voltra.Text style={{ color: '#9CA3AF', marginTop: 6 }}>Driver en route · ETA 12 min</Voltra.Text>
|
|
77
|
+
</Voltra.VStack>
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
const { start, update, end } = useLiveActivity(
|
|
81
|
+
{ lockScreen: ui },
|
|
82
|
+
{
|
|
83
|
+
activityName: `order-${orderId}`,
|
|
84
|
+
autoStart: true,
|
|
85
|
+
deepLinkUrl: `/orders/${orderId}`,
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
|
|
89
|
+
return null
|
|
90
|
+
}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Platform compatibility
|
|
94
|
+
|
|
95
|
+
This package targets **iOS 16.2+** (Live Activities) and supports Home Screen widgets on supported iOS versions. Import UI and runtime APIs from `@use-voltra/ios-client`. For server-side rendering, use `@use-voltra/ios-server` in your backend only.
|
|
96
|
+
|
|
97
|
+
## Authors
|
|
98
|
+
|
|
99
|
+
Voltra is an open source collaboration between [Saúl Sharma](https://github.com/saulsharma) and [Szymon Chmal](https://github.com/szymonchmal) at [Callstack][callstack-readme-with-love].
|
|
100
|
+
|
|
101
|
+
If you think it's cool, please star it 🌟. This project will always remain free to use.
|
|
102
|
+
|
|
103
|
+
[Callstack][callstack-readme-with-love] is a group of React and React Native geeks, contact us at [hello@callstack.com](mailto:hello@callstack.com) if you need any help with these or just want to say hi!
|
|
104
|
+
|
|
105
|
+
Like the project? ⚛️ [Join the Callstack team](https://callstack.com/careers/?utm_campaign=Senior_RN&utm_source=github&utm_medium=readme) who does amazing stuff for clients and drives React Native Open Source! 🔥
|
|
106
|
+
|
|
107
|
+
[callstack-readme-with-love]: https://callstack.com/?utm_source=github.com&utm_medium=referral&utm_campaign=voltra&utm_term=readme-with-love
|
|
108
|
+
[license-badge]: https://img.shields.io/npm/l/@use-voltra/ios-client?style=for-the-badge
|
|
109
|
+
[license]: https://github.com/callstackincubator/voltra/blob/main/LICENSE.txt
|
|
110
|
+
[npm-downloads-badge]: https://img.shields.io/npm/dm/@use-voltra/ios-client?style=for-the-badge
|
|
111
|
+
[npm-downloads]: https://www.npmjs.com/package/@use-voltra/ios-client
|
|
112
|
+
[prs-welcome-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge
|
|
113
|
+
[prs-welcome]: ../../CONTRIBUTING.md
|
package/Voltra.podspec
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
require 'json'
|
|
2
|
+
|
|
3
|
+
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
4
|
+
|
|
5
|
+
Pod::Spec.new do |s|
|
|
6
|
+
s.name = 'Voltra'
|
|
7
|
+
s.version = package['version']
|
|
8
|
+
s.summary = package['description']
|
|
9
|
+
s.description = 'Build dynamic iOS Live Activities and interact with the Dynamic Island directly from React Native. No Swift, no Xcode, no hassle.'
|
|
10
|
+
s.license = package['license']
|
|
11
|
+
s.author = package['author']
|
|
12
|
+
s.homepage = package['homepage']
|
|
13
|
+
s.platforms = {
|
|
14
|
+
:ios => '16.2',
|
|
15
|
+
}
|
|
16
|
+
s.swift_version = '5.9'
|
|
17
|
+
s.source = { git: 'https://github.com/callstackincubator/voltra' }
|
|
18
|
+
s.static_framework = true
|
|
19
|
+
install_modules_dependencies(s)
|
|
20
|
+
|
|
21
|
+
s.source_files = [
|
|
22
|
+
"ios/app/**/*.swift",
|
|
23
|
+
"ios/app/**/*.m",
|
|
24
|
+
"ios/app/**/*.mm",
|
|
25
|
+
"ios/ui/**/*.swift",
|
|
26
|
+
"ios/shared/**/*.swift",
|
|
27
|
+
]
|
|
28
|
+
end
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "getNativeVoltra", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _NativeVoltra.getNativeVoltra;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _NativeVoltra = require("./native/NativeVoltra.js");
|
|
13
|
+
//# sourceMappingURL=VoltraModule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_NativeVoltra","require"],"sourceRoot":"../../src","sources":["VoltraModule.ts"],"mappings":";;;;;;;;;;;AACA,IAAAA,aAAA,GAAAC,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.VoltraLiveActivityPreview = VoltraLiveActivityPreview;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _VoltraView = require("./VoltraView.js");
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
const LOCK_SCREEN_DIMENSIONS = {
|
|
12
|
+
width: 364,
|
|
13
|
+
height: 160
|
|
14
|
+
};
|
|
15
|
+
function VoltraLiveActivityPreview({
|
|
16
|
+
style,
|
|
17
|
+
children,
|
|
18
|
+
...voltraViewProps
|
|
19
|
+
}) {
|
|
20
|
+
const previewStyle = [{
|
|
21
|
+
width: LOCK_SCREEN_DIMENSIONS.width,
|
|
22
|
+
height: LOCK_SCREEN_DIMENSIONS.height
|
|
23
|
+
}, style];
|
|
24
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_VoltraView.VoltraView, {
|
|
25
|
+
...voltraViewProps,
|
|
26
|
+
style: previewStyle,
|
|
27
|
+
children: children
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=VoltraLiveActivityPreview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_VoltraView","_jsxRuntime","e","__esModule","default","LOCK_SCREEN_DIMENSIONS","width","height","VoltraLiveActivityPreview","style","children","voltraViewProps","previewStyle","jsx","VoltraView"],"sourceRoot":"../../../src","sources":["components/VoltraLiveActivityPreview.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAGA,IAAAC,WAAA,GAAAD,OAAA;AAAkE,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAElE,MAAMG,sBAAsB,GAAG;EAC7BC,KAAK,EAAE,GAAG;EACVC,MAAM,EAAE;AACV,CAAC;AAMM,SAASC,yBAAyBA,CAAC;EAAEC,KAAK;EAAEC,QAAQ;EAAE,GAAGC;AAAgD,CAAC,EAAE;EACjH,MAAMC,YAAkC,GAAG,CACzC;IACEN,KAAK,EAAED,sBAAsB,CAACC,KAAK;IACnCC,MAAM,EAAEF,sBAAsB,CAACE;EACjC,CAAC,EACDE,KAAK,CACN;EAED,oBACE,IAAAR,WAAA,CAAAY,GAAA,EAACb,WAAA,CAAAc,UAAU;IAAA,GAAKH,eAAe;IAAEF,KAAK,EAAEG,YAAa;IAAAF,QAAA,EAClDA;EAAQ,CACC,CAAC;AAEjB","ignoreList":[]}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.VoltraView = VoltraView;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _ios = require("@use-voltra/ios");
|
|
9
|
+
var _VoltraRNNativeComponent = _interopRequireDefault(require("../native/VoltraRNNativeComponent"));
|
|
10
|
+
var _events = require("../events.js");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
14
|
+
const generateViewId = () => `voltra-view-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
|
|
15
|
+
const voltraViewStyle = {
|
|
16
|
+
flex: 1
|
|
17
|
+
};
|
|
18
|
+
function VoltraView({
|
|
19
|
+
id,
|
|
20
|
+
children,
|
|
21
|
+
style,
|
|
22
|
+
onInteraction,
|
|
23
|
+
testID
|
|
24
|
+
}) {
|
|
25
|
+
const viewId = (0, _react.useMemo)(() => id || generateViewId(), [id]);
|
|
26
|
+
const json = (0, _ios.renderVoltraVariantToJson)(children);
|
|
27
|
+
const payload = JSON.stringify(json);
|
|
28
|
+
(0, _react.useEffect)(() => {
|
|
29
|
+
if (!onInteraction) return;
|
|
30
|
+
const subscription = (0, _events.addVoltraListener)('interaction', event => {
|
|
31
|
+
if (event.source === viewId) {
|
|
32
|
+
onInteraction({
|
|
33
|
+
type: 'interaction',
|
|
34
|
+
source: event.source,
|
|
35
|
+
timestamp: event.timestamp,
|
|
36
|
+
identifier: event.identifier,
|
|
37
|
+
payload: event.payload
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
return () => subscription.remove();
|
|
42
|
+
}, [viewId, onInteraction]);
|
|
43
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_VoltraRNNativeComponent.default, {
|
|
44
|
+
payload: payload,
|
|
45
|
+
style: [voltraViewStyle, style],
|
|
46
|
+
testID: testID,
|
|
47
|
+
viewId: viewId
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=VoltraView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_ios","_VoltraRNNativeComponent","_interopRequireDefault","_events","_jsxRuntime","e","__esModule","default","t","WeakMap","r","n","o","i","f","__proto__","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","generateViewId","Date","now","Math","random","toString","substring","voltraViewStyle","flex","VoltraView","id","children","style","onInteraction","testID","viewId","useMemo","json","renderVoltraVariantToJson","payload","JSON","stringify","useEffect","subscription","addVoltraListener","event","source","type","timestamp","identifier","remove","jsx"],"sourceRoot":"../../../src","sources":["components/VoltraView.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAGA,IAAAC,IAAA,GAAAD,OAAA;AAEA,IAAAE,wBAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,OAAA,GAAAJ,OAAA;AAA6E,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAG,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAP,wBAAAO,CAAA,EAAAG,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAX,uBAAA,YAAAA,CAAAO,CAAA,EAAAG,CAAA,SAAAA,CAAA,IAAAH,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAO,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAR,OAAA,EAAAF,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAS,CAAA,MAAAF,CAAA,GAAAJ,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAE,CAAA,CAAAI,GAAA,CAAAX,CAAA,UAAAO,CAAA,CAAAK,GAAA,CAAAZ,CAAA,GAAAO,CAAA,CAAAM,GAAA,CAAAb,CAAA,EAAAS,CAAA,gBAAAN,CAAA,IAAAH,CAAA,gBAAAG,CAAA,OAAAW,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAG,CAAA,OAAAK,CAAA,IAAAD,CAAA,GAAAS,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAG,CAAA,OAAAK,CAAA,CAAAI,GAAA,IAAAJ,CAAA,CAAAK,GAAA,IAAAN,CAAA,CAAAE,CAAA,EAAAN,CAAA,EAAAK,CAAA,IAAAC,CAAA,CAAAN,CAAA,IAAAH,CAAA,CAAAG,CAAA,WAAAM,CAAA,KAAAT,CAAA,EAAAG,CAAA;AAE7E,MAAMgB,cAAc,GAAGA,CAAA,KAAM,eAAeC,IAAI,CAACC,GAAG,CAAC,CAAC,IAAIC,IAAI,CAACC,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,EAAE,CAAC,CAACC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE;AAEtG,MAAMC,eAA0B,GAAG;EACjCC,IAAI,EAAE;AACR,CAAC;AAUM,SAASC,UAAUA,CAAC;EAAEC,EAAE;EAAEC,QAAQ;EAAEC,KAAK;EAAEC,aAAa;EAAEC;AAAwB,CAAC,EAAE;EAC1F,MAAMC,MAAM,GAAG,IAAAC,cAAO,EAAC,MAAMN,EAAE,IAAIV,cAAc,CAAC,CAAC,EAAE,CAACU,EAAE,CAAC,CAAC;EAE1D,MAAMO,IAAI,GAAG,IAAAC,8BAAyB,EAACP,QAAQ,CAAC;EAChD,MAAMQ,OAAO,GAAGC,IAAI,CAACC,SAAS,CAACJ,IAAI,CAAC;EAEpC,IAAAK,gBAAS,EAAC,MAAM;IACd,IAAI,CAACT,aAAa,EAAE;IAEpB,MAAMU,YAAY,GAAG,IAAAC,yBAAiB,EAAC,aAAa,EAAGC,KAAK,IAAK;MAC/D,IAAIA,KAAK,CAACC,MAAM,KAAKX,MAAM,EAAE;QAC3BF,aAAa,CAAC;UACZc,IAAI,EAAE,aAAa;UACnBD,MAAM,EAAED,KAAK,CAACC,MAAM;UACpBE,SAAS,EAAEH,KAAK,CAACG,SAAS;UAC1BC,UAAU,EAAEJ,KAAK,CAACI,UAAU;UAC5BV,OAAO,EAAEM,KAAK,CAACN;QACjB,CAAC,CAAC;MACJ;IACF,CAAC,CAAC;IAEF,OAAO,MAAMI,YAAY,CAACO,MAAM,CAAC,CAAC;EACpC,CAAC,EAAE,CAACf,MAAM,EAAEF,aAAa,CAAC,CAAC;EAE3B,oBAAO,IAAAjC,WAAA,CAAAmD,GAAA,EAACtD,wBAAA,CAAAM,OAAgB;IAACoC,OAAO,EAAEA,OAAQ;IAACP,KAAK,EAAE,CAACL,eAAe,EAAEK,KAAK,CAAE;IAACE,MAAM,EAAEA,MAAO;IAACC,MAAM,EAAEA;EAAO,CAAE,CAAC;AAChH","ignoreList":[]}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.VoltraWidgetPreview = VoltraWidgetPreview;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _VoltraView = require("./VoltraView.js");
|
|
9
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
const WIDGET_DIMENSIONS = {
|
|
12
|
+
systemSmall: {
|
|
13
|
+
width: 170,
|
|
14
|
+
height: 170
|
|
15
|
+
},
|
|
16
|
+
systemMedium: {
|
|
17
|
+
width: 364,
|
|
18
|
+
height: 170
|
|
19
|
+
},
|
|
20
|
+
systemLarge: {
|
|
21
|
+
width: 364,
|
|
22
|
+
height: 382
|
|
23
|
+
},
|
|
24
|
+
systemExtraLarge: {
|
|
25
|
+
width: 364,
|
|
26
|
+
height: 768
|
|
27
|
+
},
|
|
28
|
+
accessoryCircular: {
|
|
29
|
+
width: 76,
|
|
30
|
+
height: 76
|
|
31
|
+
},
|
|
32
|
+
accessoryRectangular: {
|
|
33
|
+
width: 172,
|
|
34
|
+
height: 76
|
|
35
|
+
},
|
|
36
|
+
accessoryInline: {
|
|
37
|
+
width: 172,
|
|
38
|
+
height: 40
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
function VoltraWidgetPreview({
|
|
42
|
+
family,
|
|
43
|
+
style,
|
|
44
|
+
children,
|
|
45
|
+
...voltraViewProps
|
|
46
|
+
}) {
|
|
47
|
+
const dimensions = WIDGET_DIMENSIONS[family];
|
|
48
|
+
const previewStyle = [{
|
|
49
|
+
width: dimensions.width,
|
|
50
|
+
height: dimensions.height
|
|
51
|
+
}, style];
|
|
52
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_VoltraView.VoltraView, {
|
|
53
|
+
...voltraViewProps,
|
|
54
|
+
style: previewStyle,
|
|
55
|
+
children: children
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=VoltraWidgetPreview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_VoltraView","_jsxRuntime","e","__esModule","default","WIDGET_DIMENSIONS","systemSmall","width","height","systemMedium","systemLarge","systemExtraLarge","accessoryCircular","accessoryRectangular","accessoryInline","VoltraWidgetPreview","family","style","children","voltraViewProps","dimensions","previewStyle","jsx","VoltraView"],"sourceRoot":"../../../src","sources":["components/VoltraWidgetPreview.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,WAAA,GAAAD,OAAA;AAAkE,IAAAE,WAAA,GAAAF,OAAA;AAAA,SAAAD,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAElE,MAAMG,iBAA0E,GAAG;EACjFC,WAAW,EAAE;IAAEC,KAAK,EAAE,GAAG;IAAEC,MAAM,EAAE;EAAI,CAAC;EACxCC,YAAY,EAAE;IAAEF,KAAK,EAAE,GAAG;IAAEC,MAAM,EAAE;EAAI,CAAC;EACzCE,WAAW,EAAE;IAAEH,KAAK,EAAE,GAAG;IAAEC,MAAM,EAAE;EAAI,CAAC;EACxCG,gBAAgB,EAAE;IAAEJ,KAAK,EAAE,GAAG;IAAEC,MAAM,EAAE;EAAI,CAAC;EAC7CI,iBAAiB,EAAE;IAAEL,KAAK,EAAE,EAAE;IAAEC,MAAM,EAAE;EAAG,CAAC;EAC5CK,oBAAoB,EAAE;IAAEN,KAAK,EAAE,GAAG;IAAEC,MAAM,EAAE;EAAG,CAAC;EAChDM,eAAe,EAAE;IAAEP,KAAK,EAAE,GAAG;IAAEC,MAAM,EAAE;EAAG;AAC5C,CAAC;AAOM,SAASO,mBAAmBA,CAAC;EAAEC,MAAM;EAAEC,KAAK;EAAEC,QAAQ;EAAE,GAAGC;AAA0C,CAAC,EAAE;EAC7G,MAAMC,UAAU,GAAGf,iBAAiB,CAACW,MAAM,CAAC;EAC5C,MAAMK,YAAkC,GAAG,CACzC;IACEd,KAAK,EAAEa,UAAU,CAACb,KAAK;IACvBC,MAAM,EAAEY,UAAU,CAACZ;EACrB,CAAC,EACDS,KAAK,CACN;EAED,oBACE,IAAAhB,WAAA,CAAAqB,GAAA,EAACtB,WAAA,CAAAuB,UAAU;IAAA,GAAKJ,eAAe;IAAEF,KAAK,EAAEI,YAAa;IAAAH,QAAA,EAClDA;EAAQ,CACC,CAAC;AAEjB","ignoreList":[]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.addVoltraListener = addVoltraListener;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _VoltraModule = require("./VoltraModule.js");
|
|
9
|
+
const noopSubscription = {
|
|
10
|
+
remove: () => {}
|
|
11
|
+
};
|
|
12
|
+
function addVoltraListener(event, listener) {
|
|
13
|
+
if (_reactNative.Platform.OS !== 'ios') {
|
|
14
|
+
console.warn(`[Voltra] Event '${event}' is only supported on iOS. Returning no-op subscription.`);
|
|
15
|
+
return noopSubscription;
|
|
16
|
+
}
|
|
17
|
+
const voltraModule = (0, _VoltraModule.getNativeVoltra)();
|
|
18
|
+
switch (event) {
|
|
19
|
+
case 'activityTokenReceived':
|
|
20
|
+
return voltraModule.onActivityTokenReceived(listener);
|
|
21
|
+
case 'activityPushToStartTokenReceived':
|
|
22
|
+
return voltraModule.onActivityPushToStartTokenReceived(listener);
|
|
23
|
+
case 'stateChange':
|
|
24
|
+
return voltraModule.onStateChanged(listener);
|
|
25
|
+
case 'interaction':
|
|
26
|
+
return voltraModule.onInteraction(listener);
|
|
27
|
+
default:
|
|
28
|
+
console.warn(`[Voltra] Event '${event}' is not supported. Returning no-op subscription.`);
|
|
29
|
+
return noopSubscription;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_VoltraModule","noopSubscription","remove","addVoltraListener","event","listener","Platform","OS","console","warn","voltraModule","getNativeVoltra","onActivityTokenReceived","onActivityPushToStartTokenReceived","onStateChanged","onInteraction"],"sourceRoot":"../../src","sources":["events.ts"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAGA,IAAAC,aAAA,GAAAD,OAAA;AA6BA,MAAME,gBAAmC,GAAG;EAC1CC,MAAM,EAAEA,CAAA,KAAM,CAAC;AACjB,CAAC;AASM,SAASC,iBAAiBA,CAC/BC,KAAQ,EACRC,QAA4C,EACzB;EACnB,IAAIC,qBAAQ,CAACC,EAAE,KAAK,KAAK,EAAE;IACzBC,OAAO,CAACC,IAAI,CAAC,mBAAmBL,KAAK,2DAA2D,CAAC;IACjG,OAAOH,gBAAgB;EACzB;EAEA,MAAMS,YAAY,GAAG,IAAAC,6BAAe,EAAC,CAAC;EAEtC,QAAQP,KAAK;IACX,KAAK,uBAAuB;MAC1B,OAAOM,YAAY,CAACE,uBAAuB,CAACP,QAA2D,CAAC;IAC1G,KAAK,kCAAkC;MACrC,OAAOK,YAAY,CAACG,kCAAkC,CACpDR,QACF,CAAC;IACH,KAAK,aAAa;MAChB,OAAOK,YAAY,CAACI,cAAc,CAACT,QAAoD,CAAC;IAC1F,KAAK,aAAa;MAChB,OAAOK,YAAY,CAACK,aAAa,CAACV,QAAiD,CAAC;IACtF;MACEG,OAAO,CAACC,IAAI,CAAC,mBAAmBL,KAAK,mDAAmD,CAAC;MACzF,OAAOH,gBAAgB;EAC3B;AACF","ignoreList":[]}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.isGlassSupported = isGlassSupported;
|
|
7
|
+
exports.isHeadless = isHeadless;
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _VoltraModule = require("./VoltraModule.js");
|
|
10
|
+
function isGlassSupported() {
|
|
11
|
+
if (_reactNative.Platform.OS !== 'ios') return false;
|
|
12
|
+
const v = _reactNative.Platform.Version;
|
|
13
|
+
let major = 0;
|
|
14
|
+
if (typeof v === 'string') {
|
|
15
|
+
const m = parseInt(v.split('.')[0] || '0', 10);
|
|
16
|
+
if (!Number.isNaN(m)) major = m;
|
|
17
|
+
} else if (typeof v === 'number') {
|
|
18
|
+
major = Math.floor(v);
|
|
19
|
+
}
|
|
20
|
+
return major >= 26;
|
|
21
|
+
}
|
|
22
|
+
function isHeadless() {
|
|
23
|
+
if (_reactNative.Platform.OS !== 'ios') return false;
|
|
24
|
+
return (0, _VoltraModule.getNativeVoltra)().isHeadless?.() ?? false;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=helpers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_VoltraModule","isGlassSupported","Platform","OS","v","Version","major","m","parseInt","split","Number","isNaN","Math","floor","isHeadless","getNativeVoltra"],"sourceRoot":"../../src","sources":["helpers.ts"],"mappings":";;;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAEA,IAAAC,aAAA,GAAAD,OAAA;AAEO,SAASE,gBAAgBA,CAAA,EAAY;EAC1C,IAAIC,qBAAQ,CAACC,EAAE,KAAK,KAAK,EAAE,OAAO,KAAK;EACvC,MAAMC,CAAM,GAAGF,qBAAQ,CAACG,OAAO;EAC/B,IAAIC,KAAK,GAAG,CAAC;EACb,IAAI,OAAOF,CAAC,KAAK,QAAQ,EAAE;IACzB,MAAMG,CAAC,GAAGC,QAAQ,CAACJ,CAAC,CAACK,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,EAAE,EAAE,CAAC;IAC9C,IAAI,CAACC,MAAM,CAACC,KAAK,CAACJ,CAAC,CAAC,EAAED,KAAK,GAAGC,CAAC;EACjC,CAAC,MAAM,IAAI,OAAOH,CAAC,KAAK,QAAQ,EAAE;IAChCE,KAAK,GAAGM,IAAI,CAACC,KAAK,CAACT,CAAC,CAAC;EACvB;EACA,OAAOE,KAAK,IAAI,EAAE;AACpB;AAEO,SAASQ,UAAUA,CAAA,EAAY;EACpC,IAAIZ,qBAAQ,CAACC,EAAE,KAAK,KAAK,EAAE,OAAO,KAAK;EACvC,OAAO,IAAAY,6BAAe,EAAC,CAAC,CAACD,UAAU,GAAG,CAAC,IAAI,KAAK;AAClD","ignoreList":[]}
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _exportNames = {
|
|
7
|
+
Voltra: true,
|
|
8
|
+
VoltraLiveActivityPreview: true,
|
|
9
|
+
VoltraView: true,
|
|
10
|
+
VoltraWidgetPreview: true,
|
|
11
|
+
isGlassSupported: true,
|
|
12
|
+
isHeadless: true,
|
|
13
|
+
logger: true,
|
|
14
|
+
endAllLiveActivities: true,
|
|
15
|
+
isLiveActivityActive: true,
|
|
16
|
+
startLiveActivity: true,
|
|
17
|
+
stopLiveActivity: true,
|
|
18
|
+
updateLiveActivity: true,
|
|
19
|
+
useLiveActivity: true,
|
|
20
|
+
clearPreloadedImages: true,
|
|
21
|
+
preloadImages: true,
|
|
22
|
+
reloadLiveActivities: true,
|
|
23
|
+
assertRunningOnApple: true,
|
|
24
|
+
useUpdateOnHMR: true,
|
|
25
|
+
clearWidgetServerCredentials: true,
|
|
26
|
+
setWidgetServerCredentials: true,
|
|
27
|
+
clearAllWidgets: true,
|
|
28
|
+
clearWidget: true,
|
|
29
|
+
getActiveWidgets: true,
|
|
30
|
+
reloadWidgets: true,
|
|
31
|
+
scheduleWidget: true,
|
|
32
|
+
updateWidget: true
|
|
33
|
+
};
|
|
34
|
+
Object.defineProperty(exports, "Voltra", {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
get: function () {
|
|
37
|
+
return _ios.Voltra;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
Object.defineProperty(exports, "VoltraLiveActivityPreview", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
get: function () {
|
|
43
|
+
return _VoltraLiveActivityPreview.VoltraLiveActivityPreview;
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
Object.defineProperty(exports, "VoltraView", {
|
|
47
|
+
enumerable: true,
|
|
48
|
+
get: function () {
|
|
49
|
+
return _VoltraView.VoltraView;
|
|
50
|
+
}
|
|
51
|
+
});
|
|
52
|
+
Object.defineProperty(exports, "VoltraWidgetPreview", {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
get: function () {
|
|
55
|
+
return _VoltraWidgetPreview.VoltraWidgetPreview;
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
Object.defineProperty(exports, "assertRunningOnApple", {
|
|
59
|
+
enumerable: true,
|
|
60
|
+
get: function () {
|
|
61
|
+
return _assertRunningOnApple.assertRunningOnApple;
|
|
62
|
+
}
|
|
63
|
+
});
|
|
64
|
+
Object.defineProperty(exports, "clearAllWidgets", {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
get: function () {
|
|
67
|
+
return _widgetApi.clearAllWidgets;
|
|
68
|
+
}
|
|
69
|
+
});
|
|
70
|
+
Object.defineProperty(exports, "clearPreloadedImages", {
|
|
71
|
+
enumerable: true,
|
|
72
|
+
get: function () {
|
|
73
|
+
return _preload.clearPreloadedImages;
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
Object.defineProperty(exports, "clearWidget", {
|
|
77
|
+
enumerable: true,
|
|
78
|
+
get: function () {
|
|
79
|
+
return _widgetApi.clearWidget;
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
Object.defineProperty(exports, "clearWidgetServerCredentials", {
|
|
83
|
+
enumerable: true,
|
|
84
|
+
get: function () {
|
|
85
|
+
return _serverCredentials.clearWidgetServerCredentials;
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
Object.defineProperty(exports, "endAllLiveActivities", {
|
|
89
|
+
enumerable: true,
|
|
90
|
+
get: function () {
|
|
91
|
+
return _api.endAllLiveActivities;
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
Object.defineProperty(exports, "getActiveWidgets", {
|
|
95
|
+
enumerable: true,
|
|
96
|
+
get: function () {
|
|
97
|
+
return _widgetApi.getActiveWidgets;
|
|
98
|
+
}
|
|
99
|
+
});
|
|
100
|
+
Object.defineProperty(exports, "isGlassSupported", {
|
|
101
|
+
enumerable: true,
|
|
102
|
+
get: function () {
|
|
103
|
+
return _helpers.isGlassSupported;
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
Object.defineProperty(exports, "isHeadless", {
|
|
107
|
+
enumerable: true,
|
|
108
|
+
get: function () {
|
|
109
|
+
return _helpers.isHeadless;
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
Object.defineProperty(exports, "isLiveActivityActive", {
|
|
113
|
+
enumerable: true,
|
|
114
|
+
get: function () {
|
|
115
|
+
return _api.isLiveActivityActive;
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
Object.defineProperty(exports, "logger", {
|
|
119
|
+
enumerable: true,
|
|
120
|
+
get: function () {
|
|
121
|
+
return _logger.logger;
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
Object.defineProperty(exports, "preloadImages", {
|
|
125
|
+
enumerable: true,
|
|
126
|
+
get: function () {
|
|
127
|
+
return _preload.preloadImages;
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
Object.defineProperty(exports, "reloadLiveActivities", {
|
|
131
|
+
enumerable: true,
|
|
132
|
+
get: function () {
|
|
133
|
+
return _preload.reloadLiveActivities;
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
Object.defineProperty(exports, "reloadWidgets", {
|
|
137
|
+
enumerable: true,
|
|
138
|
+
get: function () {
|
|
139
|
+
return _widgetApi.reloadWidgets;
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
Object.defineProperty(exports, "scheduleWidget", {
|
|
143
|
+
enumerable: true,
|
|
144
|
+
get: function () {
|
|
145
|
+
return _widgetApi.scheduleWidget;
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
Object.defineProperty(exports, "setWidgetServerCredentials", {
|
|
149
|
+
enumerable: true,
|
|
150
|
+
get: function () {
|
|
151
|
+
return _serverCredentials.setWidgetServerCredentials;
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
Object.defineProperty(exports, "startLiveActivity", {
|
|
155
|
+
enumerable: true,
|
|
156
|
+
get: function () {
|
|
157
|
+
return _api.startLiveActivity;
|
|
158
|
+
}
|
|
159
|
+
});
|
|
160
|
+
Object.defineProperty(exports, "stopLiveActivity", {
|
|
161
|
+
enumerable: true,
|
|
162
|
+
get: function () {
|
|
163
|
+
return _api.stopLiveActivity;
|
|
164
|
+
}
|
|
165
|
+
});
|
|
166
|
+
Object.defineProperty(exports, "updateLiveActivity", {
|
|
167
|
+
enumerable: true,
|
|
168
|
+
get: function () {
|
|
169
|
+
return _api.updateLiveActivity;
|
|
170
|
+
}
|
|
171
|
+
});
|
|
172
|
+
Object.defineProperty(exports, "updateWidget", {
|
|
173
|
+
enumerable: true,
|
|
174
|
+
get: function () {
|
|
175
|
+
return _widgetApi.updateWidget;
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
Object.defineProperty(exports, "useLiveActivity", {
|
|
179
|
+
enumerable: true,
|
|
180
|
+
get: function () {
|
|
181
|
+
return _api.useLiveActivity;
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
Object.defineProperty(exports, "useUpdateOnHMR", {
|
|
185
|
+
enumerable: true,
|
|
186
|
+
get: function () {
|
|
187
|
+
return _useUpdateOnHMR.useUpdateOnHMR;
|
|
188
|
+
}
|
|
189
|
+
});
|
|
190
|
+
var _ios = require("@use-voltra/ios");
|
|
191
|
+
var _VoltraLiveActivityPreview = require("./components/VoltraLiveActivityPreview.js");
|
|
192
|
+
var _VoltraView = require("./components/VoltraView.js");
|
|
193
|
+
var _VoltraWidgetPreview = require("./components/VoltraWidgetPreview.js");
|
|
194
|
+
var _events = require("./events.js");
|
|
195
|
+
Object.keys(_events).forEach(function (key) {
|
|
196
|
+
if (key === "default" || key === "__esModule") return;
|
|
197
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
198
|
+
if (key in exports && exports[key] === _events[key]) return;
|
|
199
|
+
Object.defineProperty(exports, key, {
|
|
200
|
+
enumerable: true,
|
|
201
|
+
get: function () {
|
|
202
|
+
return _events[key];
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
});
|
|
206
|
+
var _helpers = require("./helpers.js");
|
|
207
|
+
var _logger = require("./logger.js");
|
|
208
|
+
var _api = require("./live-activity/api.js");
|
|
209
|
+
var _preload = require("./preload.js");
|
|
210
|
+
var _assertRunningOnApple = require("./utils/assertRunningOnApple.js");
|
|
211
|
+
var _useUpdateOnHMR = require("./utils/useUpdateOnHMR.js");
|
|
212
|
+
var _helpers2 = require("./utils/helpers.js");
|
|
213
|
+
Object.keys(_helpers2).forEach(function (key) {
|
|
214
|
+
if (key === "default" || key === "__esModule") return;
|
|
215
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
216
|
+
if (key in exports && exports[key] === _helpers2[key]) return;
|
|
217
|
+
Object.defineProperty(exports, key, {
|
|
218
|
+
enumerable: true,
|
|
219
|
+
get: function () {
|
|
220
|
+
return _helpers2[key];
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
});
|
|
224
|
+
var _serverCredentials = require("./widgets/server-credentials.js");
|
|
225
|
+
var _widgetApi = require("./widgets/widget-api.js");
|
|
226
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_ios","require","_VoltraLiveActivityPreview","_VoltraView","_VoltraWidgetPreview","_events","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_helpers","_logger","_api","_preload","_assertRunningOnApple","_useUpdateOnHMR","_helpers2","_serverCredentials","_widgetApi"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AACA,IAAAC,0BAAA,GAAAD,OAAA;AAIA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,oBAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AAAAK,MAAA,CAAAC,IAAA,CAAAF,OAAA,EAAAG,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAJ,OAAA,CAAAI,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAZ,OAAA,CAAAI,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,QAAA,GAAAjB,OAAA;AACA,IAAAkB,OAAA,GAAAlB,OAAA;AACA,IAAAmB,IAAA,GAAAnB,OAAA;AAeA,IAAAoB,QAAA,GAAApB,OAAA;AAOA,IAAAqB,qBAAA,GAAArB,OAAA;AACA,IAAAsB,eAAA,GAAAtB,OAAA;AACA,IAAAuB,SAAA,GAAAvB,OAAA;AAAAK,MAAA,CAAAC,IAAA,CAAAiB,SAAA,EAAAhB,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAe,SAAA,CAAAf,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAO,SAAA,CAAAf,GAAA;IAAA;EAAA;AAAA;AAEA,IAAAgB,kBAAA,GAAAxB,OAAA;AAMA,IAAAyB,UAAA,GAAAzB,OAAA","ignoreList":[]}
|