@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
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import Compression
|
|
2
|
+
import Foundation
|
|
3
|
+
|
|
4
|
+
public enum BrotliCompressionError: Error {
|
|
5
|
+
case encodingFailed
|
|
6
|
+
case compressionFailed(Int)
|
|
7
|
+
case base64DecodingFailed
|
|
8
|
+
case decompressionFailed
|
|
9
|
+
case stringConversionFailed
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
public enum BrotliCompression {
|
|
13
|
+
/// Compresses a JSON string using brotli compression and returns a base64-encoded string
|
|
14
|
+
/// - Parameter jsonString: The JSON string to compress
|
|
15
|
+
/// - Returns: Base64-encoded compressed data
|
|
16
|
+
/// - Throws: BrotliCompressionError if compression fails
|
|
17
|
+
public static func compress(jsonString: String) throws -> String {
|
|
18
|
+
guard let jsonData = jsonString.data(using: .utf8) else {
|
|
19
|
+
throw BrotliCompressionError.encodingFailed
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
let buffer = UnsafeMutablePointer<UInt8>.allocate(capacity: jsonData.count * 2)
|
|
23
|
+
defer { buffer.deallocate() }
|
|
24
|
+
|
|
25
|
+
// Compress using brotli level 2 (iOS only supports level 2)
|
|
26
|
+
let compressedSize = compression_encode_buffer(
|
|
27
|
+
buffer,
|
|
28
|
+
jsonData.count * 2,
|
|
29
|
+
jsonData.withUnsafeBytes { $0.baseAddress!.assumingMemoryBound(to: UInt8.self) },
|
|
30
|
+
jsonData.count,
|
|
31
|
+
nil,
|
|
32
|
+
COMPRESSION_BROTLI
|
|
33
|
+
)
|
|
34
|
+
|
|
35
|
+
guard compressedSize > 0 else {
|
|
36
|
+
throw BrotliCompressionError.compressionFailed(jsonData.count)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Convert compressed data to base64 string
|
|
40
|
+
let compressedData = Data(bytes: buffer, count: compressedSize)
|
|
41
|
+
return compressedData.base64EncodedString()
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/// Decompresses a base64-encoded brotli-compressed string
|
|
45
|
+
/// - Parameter base64String: Base64-encoded compressed data
|
|
46
|
+
/// - Returns: Decompressed JSON string
|
|
47
|
+
/// - Throws: BrotliCompressionError if decompression fails
|
|
48
|
+
public static func decompress(base64String: String) throws -> String {
|
|
49
|
+
// Decode base64 to Data
|
|
50
|
+
guard let compressedData = Data(base64Encoded: base64String) else {
|
|
51
|
+
throw BrotliCompressionError.base64DecodingFailed
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Estimate decompressed size (brotli typically compresses to 20-30% of original)
|
|
55
|
+
// Using 8x to ensure we have enough buffer space
|
|
56
|
+
let estimatedSize = compressedData.count * 8
|
|
57
|
+
let buffer = UnsafeMutablePointer<UInt8>.allocate(capacity: estimatedSize)
|
|
58
|
+
defer { buffer.deallocate() }
|
|
59
|
+
|
|
60
|
+
// Decompress using brotli algorithm
|
|
61
|
+
let decompressedSize = compression_decode_buffer(
|
|
62
|
+
buffer,
|
|
63
|
+
estimatedSize,
|
|
64
|
+
compressedData.withUnsafeBytes { $0.baseAddress!.assumingMemoryBound(to: UInt8.self) },
|
|
65
|
+
compressedData.count,
|
|
66
|
+
nil,
|
|
67
|
+
COMPRESSION_BROTLI
|
|
68
|
+
)
|
|
69
|
+
|
|
70
|
+
guard decompressedSize > 0 else {
|
|
71
|
+
throw BrotliCompressionError.decompressionFailed
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
// Convert decompressed data to String
|
|
75
|
+
let decompressedData = Data(bytes: buffer, count: decompressedSize)
|
|
76
|
+
guard let jsonString = String(data: decompressedData, encoding: .utf8) else {
|
|
77
|
+
throw BrotliCompressionError.stringConversionFailed
|
|
78
|
+
}
|
|
79
|
+
return jsonString
|
|
80
|
+
}
|
|
81
|
+
}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ComponentTypeID.swift
|
|
3
|
+
//
|
|
4
|
+
// AUTO-GENERATED from data/components.json
|
|
5
|
+
// DO NOT EDIT MANUALLY - Changes will be overwritten
|
|
6
|
+
// Schema version: 1.0.0
|
|
7
|
+
|
|
8
|
+
import Foundation
|
|
9
|
+
|
|
10
|
+
/// Component type IDs mapped from data/components.json
|
|
11
|
+
/// IDs are assigned sequentially based on order in components.json (0-indexed)
|
|
12
|
+
public enum ComponentTypeID: Int, Codable {
|
|
13
|
+
case TEXT = 0
|
|
14
|
+
case BUTTON = 1
|
|
15
|
+
case LABEL = 2
|
|
16
|
+
case IMAGE = 3
|
|
17
|
+
case SYMBOL = 4
|
|
18
|
+
case TOGGLE = 5
|
|
19
|
+
case LINEAR_PROGRESS_VIEW = 6
|
|
20
|
+
case CIRCULAR_PROGRESS_VIEW = 7
|
|
21
|
+
case GAUGE = 8
|
|
22
|
+
case TIMER = 9
|
|
23
|
+
case LINEAR_GRADIENT = 10
|
|
24
|
+
case V_STACK = 11
|
|
25
|
+
case H_STACK = 12
|
|
26
|
+
case Z_STACK = 13
|
|
27
|
+
case GROUP_BOX = 14
|
|
28
|
+
case GLASS_CONTAINER = 15
|
|
29
|
+
case SPACER = 16
|
|
30
|
+
case DIVIDER = 17
|
|
31
|
+
case MASK = 18
|
|
32
|
+
case LINK = 19
|
|
33
|
+
case VIEW = 20
|
|
34
|
+
case CHART = 21
|
|
35
|
+
|
|
36
|
+
/// Get the component name string for this ID
|
|
37
|
+
public var componentName: String {
|
|
38
|
+
switch self {
|
|
39
|
+
case .TEXT:
|
|
40
|
+
return "Text"
|
|
41
|
+
case .BUTTON:
|
|
42
|
+
return "Button"
|
|
43
|
+
case .LABEL:
|
|
44
|
+
return "Label"
|
|
45
|
+
case .IMAGE:
|
|
46
|
+
return "Image"
|
|
47
|
+
case .SYMBOL:
|
|
48
|
+
return "Symbol"
|
|
49
|
+
case .TOGGLE:
|
|
50
|
+
return "Toggle"
|
|
51
|
+
case .LINEAR_PROGRESS_VIEW:
|
|
52
|
+
return "LinearProgressView"
|
|
53
|
+
case .CIRCULAR_PROGRESS_VIEW:
|
|
54
|
+
return "CircularProgressView"
|
|
55
|
+
case .GAUGE:
|
|
56
|
+
return "Gauge"
|
|
57
|
+
case .TIMER:
|
|
58
|
+
return "Timer"
|
|
59
|
+
case .LINEAR_GRADIENT:
|
|
60
|
+
return "LinearGradient"
|
|
61
|
+
case .V_STACK:
|
|
62
|
+
return "VStack"
|
|
63
|
+
case .H_STACK:
|
|
64
|
+
return "HStack"
|
|
65
|
+
case .Z_STACK:
|
|
66
|
+
return "ZStack"
|
|
67
|
+
case .GROUP_BOX:
|
|
68
|
+
return "GroupBox"
|
|
69
|
+
case .GLASS_CONTAINER:
|
|
70
|
+
return "GlassContainer"
|
|
71
|
+
case .SPACER:
|
|
72
|
+
return "Spacer"
|
|
73
|
+
case .DIVIDER:
|
|
74
|
+
return "Divider"
|
|
75
|
+
case .MASK:
|
|
76
|
+
return "Mask"
|
|
77
|
+
case .LINK:
|
|
78
|
+
return "Link"
|
|
79
|
+
case .VIEW:
|
|
80
|
+
return "View"
|
|
81
|
+
case .CHART:
|
|
82
|
+
return "Chart"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
/// Initialize from component name string
|
|
87
|
+
/// - Parameter name: Component name (e.g., "Text", "VStack")
|
|
88
|
+
/// - Returns: ComponentTypeID if found, nil otherwise
|
|
89
|
+
public init?(componentName: String) {
|
|
90
|
+
switch componentName {
|
|
91
|
+
case "Text": self = .TEXT
|
|
92
|
+
case "Button": self = .BUTTON
|
|
93
|
+
case "Label": self = .LABEL
|
|
94
|
+
case "Image": self = .IMAGE
|
|
95
|
+
case "Symbol": self = .SYMBOL
|
|
96
|
+
case "Toggle": self = .TOGGLE
|
|
97
|
+
case "LinearProgressView": self = .LINEAR_PROGRESS_VIEW
|
|
98
|
+
case "CircularProgressView": self = .CIRCULAR_PROGRESS_VIEW
|
|
99
|
+
case "Gauge": self = .GAUGE
|
|
100
|
+
case "Timer": self = .TIMER
|
|
101
|
+
case "LinearGradient": self = .LINEAR_GRADIENT
|
|
102
|
+
case "VStack": self = .V_STACK
|
|
103
|
+
case "HStack": self = .H_STACK
|
|
104
|
+
case "ZStack": self = .Z_STACK
|
|
105
|
+
case "GroupBox": self = .GROUP_BOX
|
|
106
|
+
case "GlassContainer": self = .GLASS_CONTAINER
|
|
107
|
+
case "Spacer": self = .SPACER
|
|
108
|
+
case "Divider": self = .DIVIDER
|
|
109
|
+
case "Mask": self = .MASK
|
|
110
|
+
case "Link": self = .LINK
|
|
111
|
+
case "View": self = .VIEW
|
|
112
|
+
case "Chart": self = .CHART
|
|
113
|
+
default:
|
|
114
|
+
return nil
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import SwiftUI
|
|
2
|
+
|
|
3
|
+
extension Date {
|
|
4
|
+
static func toTimerInterval(milliseconds: Double) -> ClosedRange<Self> {
|
|
5
|
+
now ... max(now, Date(timeIntervalSince1970: milliseconds / 1000))
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
static func toTimerInterval(startAtMs: Double?, endAtMs: Double) -> ClosedRange<Self> {
|
|
9
|
+
let end = Date(timeIntervalSince1970: endAtMs / 1000)
|
|
10
|
+
let start: Date
|
|
11
|
+
if let s = startAtMs {
|
|
12
|
+
start = Date(timeIntervalSince1970: s / 1000)
|
|
13
|
+
} else {
|
|
14
|
+
start = .now
|
|
15
|
+
}
|
|
16
|
+
// Handle countdown case: if start > end, swap them for countdown behavior
|
|
17
|
+
if start > end {
|
|
18
|
+
// For countdown, range should be end...start (swapped)
|
|
19
|
+
// Clamp to now if end is in the past
|
|
20
|
+
return end ... max(.now, start)
|
|
21
|
+
}
|
|
22
|
+
// If end is in the past, clamp to now to avoid negative intervals
|
|
23
|
+
return start ... max(.now, end)
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
|
|
3
|
+
/// A type-safe representation of JSON values that supports polymorphism
|
|
4
|
+
/// and direct decoding without unnecessary serialization roundtrips
|
|
5
|
+
public enum JSONValue: Codable, Hashable {
|
|
6
|
+
case null
|
|
7
|
+
case bool(Bool)
|
|
8
|
+
case int(Int)
|
|
9
|
+
case double(Double)
|
|
10
|
+
case string(String)
|
|
11
|
+
case array([JSONValue])
|
|
12
|
+
case object([String: JSONValue])
|
|
13
|
+
|
|
14
|
+
/// Parse JSON string into JSONValue
|
|
15
|
+
public static func parse(from jsonString: String) throws -> JSONValue {
|
|
16
|
+
guard let data = jsonString.data(using: .utf8) else {
|
|
17
|
+
throw NSError(domain: "JSONValue", code: -1, userInfo: [NSLocalizedDescriptionKey: "Invalid UTF-8 string"])
|
|
18
|
+
}
|
|
19
|
+
return try JSONDecoder().decode(JSONValue.self, from: data)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/// Convenience accessors
|
|
23
|
+
public var stringValue: String? {
|
|
24
|
+
guard case let .string(value) = self else { return nil }
|
|
25
|
+
return value
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
public var intValue: Int? {
|
|
29
|
+
guard case let .int(value) = self else { return nil }
|
|
30
|
+
return value
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
public var doubleValue: Double? {
|
|
34
|
+
guard case let .double(value) = self else { return nil }
|
|
35
|
+
return value
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
public var boolValue: Bool? {
|
|
39
|
+
guard case let .bool(value) = self else { return nil }
|
|
40
|
+
return value
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
public var arrayValue: [JSONValue]? {
|
|
44
|
+
guard case let .array(value) = self else { return nil }
|
|
45
|
+
return value
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
public var objectValue: [String: JSONValue]? {
|
|
49
|
+
guard case let .object(value) = self else { return nil }
|
|
50
|
+
return value
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/// Access object properties by key
|
|
54
|
+
public subscript(key: String) -> JSONValue? {
|
|
55
|
+
guard case let .object(dict) = self else { return nil }
|
|
56
|
+
return dict[key]
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
/// Convert to Any for legacy compatibility
|
|
60
|
+
public func toAny() -> Any {
|
|
61
|
+
switch self {
|
|
62
|
+
case .null:
|
|
63
|
+
return NSNull()
|
|
64
|
+
case let .bool(value):
|
|
65
|
+
return value
|
|
66
|
+
case let .int(value):
|
|
67
|
+
return value
|
|
68
|
+
case let .double(value):
|
|
69
|
+
return value
|
|
70
|
+
case let .string(value):
|
|
71
|
+
return value
|
|
72
|
+
case let .array(value):
|
|
73
|
+
return value.map { $0.toAny() }
|
|
74
|
+
case let .object(value):
|
|
75
|
+
return value.mapValues { $0.toAny() }
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// MARK: - Codable
|
|
81
|
+
|
|
82
|
+
public extension JSONValue {
|
|
83
|
+
init(from decoder: Decoder) throws {
|
|
84
|
+
let container = try decoder.singleValueContainer()
|
|
85
|
+
|
|
86
|
+
if container.decodeNil() {
|
|
87
|
+
self = .null
|
|
88
|
+
} else if let bool = try? container.decode(Bool.self) {
|
|
89
|
+
self = .bool(bool)
|
|
90
|
+
} else if let int = try? container.decode(Int.self) {
|
|
91
|
+
self = .int(int)
|
|
92
|
+
} else if let double = try? container.decode(Double.self) {
|
|
93
|
+
self = .double(double)
|
|
94
|
+
} else if let string = try? container.decode(String.self) {
|
|
95
|
+
self = .string(string)
|
|
96
|
+
} else if let array = try? container.decode([JSONValue].self) {
|
|
97
|
+
self = .array(array)
|
|
98
|
+
} else if let object = try? container.decode([String: JSONValue].self) {
|
|
99
|
+
self = .object(object)
|
|
100
|
+
} else {
|
|
101
|
+
throw DecodingError.dataCorruptedError(
|
|
102
|
+
in: container,
|
|
103
|
+
debugDescription: "JSONValue cannot decode this value"
|
|
104
|
+
)
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
func encode(to encoder: Encoder) throws {
|
|
109
|
+
var container = encoder.singleValueContainer()
|
|
110
|
+
|
|
111
|
+
switch self {
|
|
112
|
+
case .null:
|
|
113
|
+
try container.encodeNil()
|
|
114
|
+
case let .bool(value):
|
|
115
|
+
try container.encode(value)
|
|
116
|
+
case let .int(value):
|
|
117
|
+
try container.encode(value)
|
|
118
|
+
case let .double(value):
|
|
119
|
+
try container.encode(value)
|
|
120
|
+
case let .string(value):
|
|
121
|
+
try container.encode(value)
|
|
122
|
+
case let .array(value):
|
|
123
|
+
try container.encode(value)
|
|
124
|
+
case let .object(value):
|
|
125
|
+
try container.encode(value)
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
//
|
|
2
|
+
// ShortNames.swift
|
|
3
|
+
//
|
|
4
|
+
// AUTO-GENERATED from data/components.json
|
|
5
|
+
// DO NOT EDIT MANUALLY - Changes will be overwritten
|
|
6
|
+
// Schema version: 1.0.0
|
|
7
|
+
|
|
8
|
+
import Foundation
|
|
9
|
+
|
|
10
|
+
/// Unified short name mappings for props and style properties
|
|
11
|
+
/// Used to expand compressed payload keys back to their full names
|
|
12
|
+
public enum ShortNames {
|
|
13
|
+
/// Mapping from short names to full names
|
|
14
|
+
private static let shortToName: [String: String] = [
|
|
15
|
+
"ap": "absolutePosition",
|
|
16
|
+
"ai": "alignItems",
|
|
17
|
+
"al": "alignment",
|
|
18
|
+
"as": "alignSelf",
|
|
19
|
+
"ar": "aspectRatio",
|
|
20
|
+
"an": "assetName",
|
|
21
|
+
"bkg": "background",
|
|
22
|
+
"bg": "backgroundColor",
|
|
23
|
+
"bgs": "backgroundStyle",
|
|
24
|
+
"b64": "base64",
|
|
25
|
+
"bd": "border",
|
|
26
|
+
"bc": "borderColor",
|
|
27
|
+
"br": "borderRadius",
|
|
28
|
+
"bw": "borderWidth",
|
|
29
|
+
"b": "bottom",
|
|
30
|
+
"bs": "buttonStyle",
|
|
31
|
+
"csa": "chartScrollableAxes",
|
|
32
|
+
"chk": "checked",
|
|
33
|
+
"clip": "clipped",
|
|
34
|
+
"c": "color",
|
|
35
|
+
"cls": "colors",
|
|
36
|
+
"ca": "contentAlignment",
|
|
37
|
+
"cc": "contentColor",
|
|
38
|
+
"cdesc": "contentDescription",
|
|
39
|
+
"cr": "cornerRadius",
|
|
40
|
+
"cd": "countDown",
|
|
41
|
+
"cvl": "currentValueLabel",
|
|
42
|
+
"dlu": "deepLinkUrl",
|
|
43
|
+
"dv": "defaultValue",
|
|
44
|
+
"dest": "destination",
|
|
45
|
+
"dir": "direction",
|
|
46
|
+
"dth": "dither",
|
|
47
|
+
"dur": "durationMs",
|
|
48
|
+
"en": "enabled",
|
|
49
|
+
"end": "endAtMs",
|
|
50
|
+
"ep": "endPoint",
|
|
51
|
+
"flb": "fallback",
|
|
52
|
+
"fmh": "fillMaxHeight",
|
|
53
|
+
"fmw": "fillMaxWidth",
|
|
54
|
+
"fsh": "fixedSizeHorizontal",
|
|
55
|
+
"fsv": "fixedSizeVertical",
|
|
56
|
+
"fl": "flex",
|
|
57
|
+
"fb": "flexBasis",
|
|
58
|
+
"fdir": "flexDirection",
|
|
59
|
+
"fg": "flexGrow",
|
|
60
|
+
"fgw": "flexGrowWidth",
|
|
61
|
+
"fk": "flexShrink",
|
|
62
|
+
"fnt": "font",
|
|
63
|
+
"ff": "fontFamily",
|
|
64
|
+
"fs": "fontSize",
|
|
65
|
+
"fvar": "fontVariant",
|
|
66
|
+
"fw": "fontWeight",
|
|
67
|
+
"fgs": "foregroundStyle",
|
|
68
|
+
"fss": "foregroundStyleScale",
|
|
69
|
+
"f": "frame",
|
|
70
|
+
"g": "gap",
|
|
71
|
+
"gs": "gaugeStyle",
|
|
72
|
+
"ge": "glassEffect",
|
|
73
|
+
"h": "height",
|
|
74
|
+
"halig": "horizontalAlignment",
|
|
75
|
+
"hp": "horizontalPadding",
|
|
76
|
+
"ic": "icon",
|
|
77
|
+
"id": "id",
|
|
78
|
+
"it": "italic",
|
|
79
|
+
"jc": "justifyContent",
|
|
80
|
+
"kern": "kerning",
|
|
81
|
+
"lbl": "label",
|
|
82
|
+
"ly": "layout",
|
|
83
|
+
"lp": "layoutPriority",
|
|
84
|
+
"l": "left",
|
|
85
|
+
"lgv": "legendVisibility",
|
|
86
|
+
"ls": "letterSpacing",
|
|
87
|
+
"lh": "lineHeight",
|
|
88
|
+
"ll": "lineLimit",
|
|
89
|
+
"lsp": "lineSpacing",
|
|
90
|
+
"lw": "lineWidth",
|
|
91
|
+
"m": "margin",
|
|
92
|
+
"mb": "marginBottom",
|
|
93
|
+
"mh": "marginHorizontal",
|
|
94
|
+
"ml": "marginLeft",
|
|
95
|
+
"mr": "marginRight",
|
|
96
|
+
"mt": "marginTop",
|
|
97
|
+
"mv": "marginVertical",
|
|
98
|
+
"mrk": "marks",
|
|
99
|
+
"me": "maskElement",
|
|
100
|
+
"maxh": "maxHeight",
|
|
101
|
+
"max": "maximumValue",
|
|
102
|
+
"maxl": "maximumValueLabel",
|
|
103
|
+
"mxl": "maxLines",
|
|
104
|
+
"maxw": "maxWidth",
|
|
105
|
+
"minh": "minHeight",
|
|
106
|
+
"min": "minimumValue",
|
|
107
|
+
"minvl": "minimumValueLabel",
|
|
108
|
+
"minl": "minLength",
|
|
109
|
+
"minw": "minWidth",
|
|
110
|
+
"md": "monospacedDigit",
|
|
111
|
+
"mta": "multilineTextAlignment",
|
|
112
|
+
"n": "name",
|
|
113
|
+
"nol": "numberOfLines",
|
|
114
|
+
"off": "offset",
|
|
115
|
+
"ox": "offsetX",
|
|
116
|
+
"oy": "offsetY",
|
|
117
|
+
"op": "opacity",
|
|
118
|
+
"ov": "overflow",
|
|
119
|
+
"pad": "padding",
|
|
120
|
+
"pb": "paddingBottom",
|
|
121
|
+
"ph": "paddingHorizontal",
|
|
122
|
+
"pl": "paddingLeft",
|
|
123
|
+
"pr": "paddingRight",
|
|
124
|
+
"pt": "paddingTop",
|
|
125
|
+
"pv": "paddingVertical",
|
|
126
|
+
"pos": "position",
|
|
127
|
+
"pc": "progressColor",
|
|
128
|
+
"rm": "resizeMode",
|
|
129
|
+
"r": "right",
|
|
130
|
+
"re": "rotationEffect",
|
|
131
|
+
"sc": "scale",
|
|
132
|
+
"sce": "scaleEffect",
|
|
133
|
+
"sh": "shadow",
|
|
134
|
+
"shc": "shadowColor",
|
|
135
|
+
"sho": "shadowOffset",
|
|
136
|
+
"shop": "shadowOpacity",
|
|
137
|
+
"shr": "shadowRadius",
|
|
138
|
+
"shrs": "showHours",
|
|
139
|
+
"sz": "size",
|
|
140
|
+
"smc": "smallCaps",
|
|
141
|
+
"src": "source",
|
|
142
|
+
"sp": "spacing",
|
|
143
|
+
"start": "startAtMs",
|
|
144
|
+
"stp": "startPoint",
|
|
145
|
+
"sts": "stops",
|
|
146
|
+
"st": "strikethrough",
|
|
147
|
+
"s": "style",
|
|
148
|
+
"si": "systemImage",
|
|
149
|
+
"txt": "text",
|
|
150
|
+
"ta": "textAlign",
|
|
151
|
+
"tdl": "textDecorationLine",
|
|
152
|
+
"ts": "textStyle",
|
|
153
|
+
"tt": "textTemplates",
|
|
154
|
+
"th": "thumb",
|
|
155
|
+
"tnt": "tint",
|
|
156
|
+
"tc": "tintColor",
|
|
157
|
+
"ttl": "title",
|
|
158
|
+
"t": "top",
|
|
159
|
+
"trc": "trackColor",
|
|
160
|
+
"tf": "transform",
|
|
161
|
+
"typ": "type",
|
|
162
|
+
"ul": "underline",
|
|
163
|
+
"v": "value",
|
|
164
|
+
"valig": "verticalAlignment",
|
|
165
|
+
"wt": "weight",
|
|
166
|
+
"w": "width",
|
|
167
|
+
"xgs": "xAxisGridStyle",
|
|
168
|
+
"xav": "xAxisVisibility",
|
|
169
|
+
"ygs": "yAxisGridStyle",
|
|
170
|
+
"yav": "yAxisVisibility",
|
|
171
|
+
"zi": "zIndex",
|
|
172
|
+
]
|
|
173
|
+
|
|
174
|
+
/// Expand a short name to its full form
|
|
175
|
+
/// - Parameter short: The short name (e.g., "bg", "al", "sp")
|
|
176
|
+
/// - Returns: The full name (e.g., "backgroundColor", "alignment", "spacing"), or the input if no mapping exists
|
|
177
|
+
public static func expand(_ short: String) -> String {
|
|
178
|
+
shortToName[short] ?? short
|
|
179
|
+
}
|
|
180
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import ActivityKit
|
|
2
|
+
import Compression
|
|
3
|
+
import Foundation
|
|
4
|
+
|
|
5
|
+
public enum ContentStateParsingError: Error {
|
|
6
|
+
case invalidJsonString
|
|
7
|
+
case jsonDeserializationFailed(Error)
|
|
8
|
+
case invalidRootType
|
|
9
|
+
case componentsParsingFailed(Error)
|
|
10
|
+
case regionParsingFailed(VoltraRegion, Error)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
public struct VoltraAttributes: ActivityAttributes {
|
|
14
|
+
public struct ContentState: Codable, Hashable {
|
|
15
|
+
public let uiJsonData: String
|
|
16
|
+
|
|
17
|
+
/// Parsed payload (computed once, cached)
|
|
18
|
+
public let payload: VoltraLiveActivityPayload
|
|
19
|
+
|
|
20
|
+
private enum CodingKeys: String, CodingKey {
|
|
21
|
+
case uiJsonData
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/// Initialize with compressed JSON data
|
|
25
|
+
public init(uiJsonData: String) throws {
|
|
26
|
+
self.uiJsonData = uiJsonData
|
|
27
|
+
|
|
28
|
+
// Decompress and parse once
|
|
29
|
+
let decompressedJson = try BrotliCompression.decompress(base64String: uiJsonData)
|
|
30
|
+
payload = try VoltraLiveActivityPayload(jsonString: decompressedJson)
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// MARK: - Convenience Accessors
|
|
34
|
+
|
|
35
|
+
public var regions: [VoltraRegion: [VoltraNode]] {
|
|
36
|
+
payload.regions
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
public var keylineTint: String? {
|
|
40
|
+
payload.keylineTint
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
public var activityBackgroundTint: String? {
|
|
44
|
+
payload.activityBackgroundTint
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
// MARK: - Codable
|
|
48
|
+
|
|
49
|
+
public init(from decoder: Decoder) throws {
|
|
50
|
+
let container = try decoder.container(keyedBy: CodingKeys.self)
|
|
51
|
+
let compressedJson = try container.decode(String.self, forKey: .uiJsonData)
|
|
52
|
+
try self.init(uiJsonData: compressedJson)
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
var name: String
|
|
57
|
+
var deepLinkUrl: String?
|
|
58
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
|
|
3
|
+
/// Shared configuration utilities for Voltra
|
|
4
|
+
/// Centralizes access to App Group identifiers and other configuration
|
|
5
|
+
public enum VoltraConfig {
|
|
6
|
+
/// Get the App Group identifier from Info.plist
|
|
7
|
+
/// Checks both `Voltra_AppGroupIdentifier` and legacy `AppGroupIdentifier` keys
|
|
8
|
+
public static func groupIdentifier() -> String? {
|
|
9
|
+
Bundle.main.object(forInfoDictionaryKey: VoltraStorageKeys.appGroupIdentifier) as? String
|
|
10
|
+
?? Bundle.main.object(forInfoDictionaryKey: VoltraStorageKeys.legacyAppGroupIdentifier) as? String
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/// Get the Keychain Access Group from Info.plist
|
|
14
|
+
/// Used for sharing credentials between the main app and widget extension
|
|
15
|
+
public static func keychainGroup() -> String? {
|
|
16
|
+
Bundle.main.object(forInfoDictionaryKey: VoltraStorageKeys.keychainGroup) as? String
|
|
17
|
+
}
|
|
18
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import Foundation
|
|
2
|
+
|
|
3
|
+
/// Numeric thresholds and configuration values used across Voltra targets
|
|
4
|
+
public enum VoltraConstants {
|
|
5
|
+
public static let maxPayloadSizeBytes = 4096
|
|
6
|
+
public static let compressedPayloadSafeBudget = 3345
|
|
7
|
+
public static let widgetJsonWarningSizeBytes = 50000
|
|
8
|
+
public static let timelineWarningSizeBytes = 100_000
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
/// All UserDefaults keys and Info.plist key names used across Voltra targets
|
|
12
|
+
public enum VoltraStorageKeys {
|
|
13
|
+
// MARK: - UserDefaults keys (shared: app + widget targets)
|
|
14
|
+
|
|
15
|
+
public static func widgetJson(_ widgetId: String) -> String {
|
|
16
|
+
"Voltra_Widget_JSON_\(widgetId)"
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
public static func widgetDeepLinkUrl(_ widgetId: String) -> String {
|
|
20
|
+
"Voltra_Widget_DeepLinkURL_\(widgetId)"
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
public static func widgetTimeline(_ widgetId: String) -> String {
|
|
24
|
+
"Voltra_Widget_Timeline_\(widgetId)"
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
public static func widgetServerUrl(_ widgetId: String) -> String {
|
|
28
|
+
"Voltra_Widget_ServerUrl_\(widgetId)"
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
// MARK: - Prefixes / kind identifiers
|
|
32
|
+
|
|
33
|
+
public static let widgetKindPrefix = "Voltra_Widget_"
|
|
34
|
+
|
|
35
|
+
// MARK: - Info.plist keys
|
|
36
|
+
|
|
37
|
+
public static let widgetIds = "Voltra_WidgetIds"
|
|
38
|
+
public static let enablePushNotifications = "Voltra_EnablePushNotifications"
|
|
39
|
+
public static let widgetServerUrls = "Voltra_WidgetServerUrls"
|
|
40
|
+
public static let widgetServerIntervals = "Voltra_WidgetServerIntervals"
|
|
41
|
+
public static let widgetServerRefresh = "Voltra_WidgetServerRefresh"
|
|
42
|
+
public static let appGroupIdentifier = "Voltra_AppGroupIdentifier"
|
|
43
|
+
public static let legacyAppGroupIdentifier = "AppGroupIdentifier"
|
|
44
|
+
public static let keychainGroup = "Voltra_KeychainGroup"
|
|
45
|
+
}
|