@use-voltra/ios-client 2.1.1 → 2.3.0
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 +61 -8
- package/Voltra.podspec +1 -0
- package/build/commonjs/dynamic-widget/api.js +15 -0
- package/build/commonjs/dynamic-widget/api.js.map +1 -0
- package/build/commonjs/events.js +23 -0
- package/build/commonjs/events.js.map +1 -1
- package/build/commonjs/index.js +74 -7
- package/build/commonjs/index.js.map +1 -1
- package/build/commonjs/live-activity/api.js +3 -1
- package/build/commonjs/live-activity/api.js.map +1 -1
- package/build/commonjs/live-activity/dynamic-api.js +173 -0
- package/build/commonjs/live-activity/dynamic-api.js.map +1 -0
- package/build/commonjs/native/NativeVoltra.js.map +1 -1
- package/build/commonjs/utils/enableDynamicLiveActivityHotReload.js +47 -0
- package/build/commonjs/utils/enableDynamicLiveActivityHotReload.js.map +1 -0
- package/build/commonjs/utils/enableWidgetHotReload.js +8 -11
- package/build/commonjs/utils/enableWidgetHotReload.js.map +1 -1
- package/build/commonjs/utils/useUpdateOnHMR.js +3 -7
- package/build/commonjs/utils/useUpdateOnHMR.js.map +1 -1
- package/build/commonjs/widgets/server-credentials.js +9 -0
- package/build/commonjs/widgets/server-credentials.js.map +1 -1
- package/build/commonjs/widgets/server-update.js +78 -0
- package/build/commonjs/widgets/server-update.js.map +1 -0
- package/build/module/dynamic-widget/api.js +10 -0
- package/build/module/dynamic-widget/api.js.map +1 -0
- package/build/module/events.js +23 -0
- package/build/module/events.js.map +1 -1
- package/build/module/index.js +4 -0
- package/build/module/index.js.map +1 -1
- package/build/module/live-activity/api.js +2 -2
- package/build/module/live-activity/api.js.map +1 -1
- package/build/module/live-activity/dynamic-api.js +167 -0
- package/build/module/live-activity/dynamic-api.js.map +1 -0
- package/build/module/native/NativeVoltra.js.map +1 -1
- package/build/module/utils/enableDynamicLiveActivityHotReload.js +43 -0
- package/build/module/utils/enableDynamicLiveActivityHotReload.js.map +1 -0
- package/build/module/utils/enableWidgetHotReload.js +9 -11
- package/build/module/utils/enableWidgetHotReload.js.map +1 -1
- package/build/module/utils/useUpdateOnHMR.js +3 -7
- package/build/module/utils/useUpdateOnHMR.js.map +1 -1
- package/build/module/widgets/server-credentials.js +9 -0
- package/build/module/widgets/server-credentials.js.map +1 -1
- package/build/module/widgets/server-update.js +72 -0
- package/build/module/widgets/server-update.js.map +1 -0
- package/build/typescript/commonjs/dynamic-widget/api.d.ts +8 -0
- package/build/typescript/commonjs/dynamic-widget/api.d.ts.map +1 -0
- package/build/typescript/commonjs/events.d.ts +7 -0
- package/build/typescript/commonjs/events.d.ts.map +1 -1
- package/build/typescript/commonjs/index.d.ts +4 -0
- package/build/typescript/commonjs/index.d.ts.map +1 -1
- package/build/typescript/commonjs/live-activity/api.d.ts +7 -0
- package/build/typescript/commonjs/live-activity/api.d.ts.map +1 -1
- package/build/typescript/commonjs/live-activity/dynamic-api.d.ts +54 -0
- package/build/typescript/commonjs/live-activity/dynamic-api.d.ts.map +1 -0
- package/build/typescript/commonjs/native/NativeVoltra.d.ts +21 -0
- package/build/typescript/commonjs/native/NativeVoltra.d.ts.map +1 -1
- package/build/typescript/commonjs/types.d.ts +1 -1
- package/build/typescript/commonjs/types.d.ts.map +1 -1
- package/build/typescript/commonjs/utils/enableDynamicLiveActivityHotReload.d.ts +15 -0
- package/build/typescript/commonjs/utils/enableDynamicLiveActivityHotReload.d.ts.map +1 -0
- package/build/typescript/commonjs/utils/enableWidgetHotReload.d.ts +5 -7
- package/build/typescript/commonjs/utils/enableWidgetHotReload.d.ts.map +1 -1
- package/build/typescript/commonjs/utils/useUpdateOnHMR.d.ts +0 -3
- package/build/typescript/commonjs/utils/useUpdateOnHMR.d.ts.map +1 -1
- package/build/typescript/commonjs/widgets/server-credentials.d.ts +8 -0
- package/build/typescript/commonjs/widgets/server-credentials.d.ts.map +1 -1
- package/build/typescript/commonjs/widgets/server-update.d.ts +64 -0
- package/build/typescript/commonjs/widgets/server-update.d.ts.map +1 -0
- package/build/typescript/module/dynamic-widget/api.d.ts +8 -0
- package/build/typescript/module/dynamic-widget/api.d.ts.map +1 -0
- package/build/typescript/module/events.d.ts +7 -0
- package/build/typescript/module/events.d.ts.map +1 -1
- package/build/typescript/module/index.d.ts +4 -0
- package/build/typescript/module/index.d.ts.map +1 -1
- package/build/typescript/module/live-activity/api.d.ts +7 -0
- package/build/typescript/module/live-activity/api.d.ts.map +1 -1
- package/build/typescript/module/live-activity/dynamic-api.d.ts +54 -0
- package/build/typescript/module/live-activity/dynamic-api.d.ts.map +1 -0
- package/build/typescript/module/native/NativeVoltra.d.ts +21 -0
- package/build/typescript/module/native/NativeVoltra.d.ts.map +1 -1
- package/build/typescript/module/types.d.ts +1 -1
- package/build/typescript/module/types.d.ts.map +1 -1
- package/build/typescript/module/utils/enableDynamicLiveActivityHotReload.d.ts +15 -0
- package/build/typescript/module/utils/enableDynamicLiveActivityHotReload.d.ts.map +1 -0
- package/build/typescript/module/utils/enableWidgetHotReload.d.ts +5 -7
- package/build/typescript/module/utils/enableWidgetHotReload.d.ts.map +1 -1
- package/build/typescript/module/utils/useUpdateOnHMR.d.ts +0 -3
- package/build/typescript/module/utils/useUpdateOnHMR.d.ts.map +1 -1
- package/build/typescript/module/widgets/server-credentials.d.ts +8 -0
- package/build/typescript/module/widgets/server-credentials.d.ts.map +1 -1
- package/build/typescript/module/widgets/server-update.d.ts +64 -0
- package/build/typescript/module/widgets/server-update.d.ts.map +1 -0
- package/expo-plugin/build/cjs/constants.js +20 -1
- package/expo-plugin/build/cjs/constants.js.map +1 -1
- package/expo-plugin/build/cjs/index.js +9 -1
- package/expo-plugin/build/cjs/index.js.map +1 -1
- package/expo-plugin/build/cjs/ios/index.js +1 -0
- package/expo-plugin/build/cjs/ios/index.js.map +1 -1
- package/expo-plugin/build/cjs/ios/infoPlist.js +28 -5
- package/expo-plugin/build/cjs/ios/infoPlist.js.map +1 -1
- package/expo-plugin/build/cjs/ios/serverUpdate.js +25 -0
- package/expo-plugin/build/cjs/ios/serverUpdate.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/clientRendered.js +4 -4
- package/expo-plugin/build/cjs/ios-widget/clientRendered.js.map +1 -1
- package/expo-plugin/build/cjs/ios-widget/clientRenderedPrerender.js +5 -5
- package/expo-plugin/build/cjs/ios-widget/clientRenderedPrerender.js.map +1 -1
- package/expo-plugin/build/cjs/ios-widget/dynamic-live-activity/swift.js +130 -0
- package/expo-plugin/build/cjs/ios-widget/dynamic-live-activity/swift.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/files/index.js +9 -2
- package/expo-plugin/build/cjs/ios-widget/files/index.js.map +1 -1
- package/expo-plugin/build/cjs/ios-widget/files/infoPlist.js +6 -3
- package/expo-plugin/build/cjs/ios-widget/files/infoPlist.js.map +1 -1
- package/expo-plugin/build/cjs/ios-widget/files/manifest.js +24 -0
- package/expo-plugin/build/cjs/ios-widget/files/manifest.js.map +1 -1
- package/expo-plugin/build/cjs/ios-widget/files/swift-utils.js +7 -0
- package/expo-plugin/build/cjs/ios-widget/files/swift-utils.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/files/swift.js +56 -26
- package/expo-plugin/build/cjs/ios-widget/files/swift.js.map +1 -1
- package/expo-plugin/build/cjs/ios-widget/index.js +9 -3
- package/expo-plugin/build/cjs/ios-widget/index.js.map +1 -1
- package/expo-plugin/build/cjs/ios-widget/podfile.js +38 -12
- package/expo-plugin/build/cjs/ios-widget/podfile.js.map +1 -1
- package/expo-plugin/build/cjs/ios-widget/widgetPlist.js +34 -22
- package/expo-plugin/build/cjs/ios-widget/widgetPlist.js.map +1 -1
- package/expo-plugin/build/cjs/ios-widget/xcode/buildPhases.js +194 -118
- package/expo-plugin/build/cjs/ios-widget/xcode/buildPhases.js.map +1 -1
- package/expo-plugin/build/cjs/ios-widget/xcode/configurationList.js +30 -22
- package/expo-plugin/build/cjs/ios-widget/xcode/configurationList.js.map +1 -1
- package/expo-plugin/build/cjs/ios-widget/xcode/fileReferences.js +50 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/fileReferences.js.map +1 -0
- package/expo-plugin/build/cjs/ios-widget/xcode/groups.js +45 -43
- package/expo-plugin/build/cjs/ios-widget/xcode/groups.js.map +1 -1
- package/expo-plugin/build/cjs/ios-widget/xcode/index.js +93 -91
- package/expo-plugin/build/cjs/ios-widget/xcode/index.js.map +1 -1
- package/expo-plugin/build/cjs/ios-widget/xcode/mainAppSettings.js +41 -39
- package/expo-plugin/build/cjs/ios-widget/xcode/mainAppSettings.js.map +1 -1
- package/expo-plugin/build/cjs/ios-widget/xcode/productFile.js +2 -2
- package/expo-plugin/build/cjs/ios-widget/xcode/productFile.js.map +1 -1
- package/expo-plugin/build/cjs/ios-widget/xcode/target.js +29 -63
- package/expo-plugin/build/cjs/ios-widget/xcode/target.js.map +1 -1
- package/expo-plugin/build/cjs/utils/urlScheme.js +36 -14
- package/expo-plugin/build/cjs/utils/urlScheme.js.map +1 -1
- package/expo-plugin/build/cjs/validation.js +54 -0
- package/expo-plugin/build/cjs/validation.js.map +1 -1
- package/expo-plugin/build/esm/constants.js +17 -0
- package/expo-plugin/build/esm/constants.js.map +1 -1
- package/expo-plugin/build/esm/index.js +9 -1
- package/expo-plugin/build/esm/index.js.map +1 -1
- package/expo-plugin/build/esm/ios/index.js +1 -0
- package/expo-plugin/build/esm/ios/index.js.map +1 -1
- package/expo-plugin/build/esm/ios/infoPlist.js +28 -5
- package/expo-plugin/build/esm/ios/infoPlist.js.map +1 -1
- package/expo-plugin/build/esm/ios/serverUpdate.js +21 -0
- package/expo-plugin/build/esm/ios/serverUpdate.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/clientRendered.js +5 -5
- package/expo-plugin/build/esm/ios-widget/clientRendered.js.map +1 -1
- package/expo-plugin/build/esm/ios-widget/clientRenderedPrerender.js +6 -6
- package/expo-plugin/build/esm/ios-widget/clientRenderedPrerender.js.map +1 -1
- package/expo-plugin/build/esm/ios-widget/dynamic-live-activity/swift.js +122 -0
- package/expo-plugin/build/esm/ios-widget/dynamic-live-activity/swift.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/files/index.js +10 -3
- package/expo-plugin/build/esm/ios-widget/files/index.js.map +1 -1
- package/expo-plugin/build/esm/ios-widget/files/infoPlist.js +6 -3
- package/expo-plugin/build/esm/ios-widget/files/infoPlist.js.map +1 -1
- package/expo-plugin/build/esm/ios-widget/files/manifest.js +23 -1
- package/expo-plugin/build/esm/ios-widget/files/manifest.js.map +1 -1
- package/expo-plugin/build/esm/ios-widget/files/swift-utils.js +4 -0
- package/expo-plugin/build/esm/ios-widget/files/swift-utils.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/files/swift.js +50 -20
- package/expo-plugin/build/esm/ios-widget/files/swift.js.map +1 -1
- package/expo-plugin/build/esm/ios-widget/index.js +9 -3
- package/expo-plugin/build/esm/ios-widget/index.js.map +1 -1
- package/expo-plugin/build/esm/ios-widget/podfile.js +36 -11
- package/expo-plugin/build/esm/ios-widget/podfile.js.map +1 -1
- package/expo-plugin/build/esm/ios-widget/widgetPlist.js +34 -22
- package/expo-plugin/build/esm/ios-widget/widgetPlist.js.map +1 -1
- package/expo-plugin/build/esm/ios-widget/xcode/buildPhases.js +194 -117
- package/expo-plugin/build/esm/ios-widget/xcode/buildPhases.js.map +1 -1
- package/expo-plugin/build/esm/ios-widget/xcode/configurationList.js +31 -22
- package/expo-plugin/build/esm/ios-widget/xcode/configurationList.js.map +1 -1
- package/expo-plugin/build/esm/ios-widget/xcode/fileReferences.js +45 -0
- package/expo-plugin/build/esm/ios-widget/xcode/fileReferences.js.map +1 -0
- package/expo-plugin/build/esm/ios-widget/xcode/groups.js +45 -42
- package/expo-plugin/build/esm/ios-widget/xcode/groups.js.map +1 -1
- package/expo-plugin/build/esm/ios-widget/xcode/index.js +97 -96
- package/expo-plugin/build/esm/ios-widget/xcode/index.js.map +1 -1
- package/expo-plugin/build/esm/ios-widget/xcode/mainAppSettings.js +41 -39
- package/expo-plugin/build/esm/ios-widget/xcode/mainAppSettings.js.map +1 -1
- package/expo-plugin/build/esm/ios-widget/xcode/productFile.js +3 -2
- package/expo-plugin/build/esm/ios-widget/xcode/productFile.js.map +1 -1
- package/expo-plugin/build/esm/ios-widget/xcode/target.js +28 -62
- package/expo-plugin/build/esm/ios-widget/xcode/target.js.map +1 -1
- package/expo-plugin/build/esm/utils/urlScheme.js +34 -14
- package/expo-plugin/build/esm/utils/urlScheme.js.map +1 -1
- package/expo-plugin/build/esm/validation.js +54 -1
- package/expo-plugin/build/esm/validation.js.map +1 -1
- package/expo-plugin/build/types/constants.d.ts +10 -1
- package/expo-plugin/build/types/constants.d.ts.map +1 -1
- package/expo-plugin/build/types/index.d.ts +1 -1
- package/expo-plugin/build/types/index.d.ts.map +1 -1
- package/expo-plugin/build/types/ios/index.d.ts +2 -0
- package/expo-plugin/build/types/ios/index.d.ts.map +1 -1
- package/expo-plugin/build/types/ios/infoPlist.d.ts +2 -0
- package/expo-plugin/build/types/ios/infoPlist.d.ts.map +1 -1
- package/expo-plugin/build/types/ios/serverUpdate.d.ts +11 -0
- package/expo-plugin/build/types/ios/serverUpdate.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/clientRendered.d.ts.map +1 -1
- package/expo-plugin/build/types/ios-widget/clientRenderedPrerender.d.ts.map +1 -1
- package/expo-plugin/build/types/ios-widget/dynamic-live-activity/swift.d.ts +7 -0
- package/expo-plugin/build/types/ios-widget/dynamic-live-activity/swift.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/files/index.d.ts +3 -1
- package/expo-plugin/build/types/ios-widget/files/index.d.ts.map +1 -1
- package/expo-plugin/build/types/ios-widget/files/infoPlist.d.ts +2 -1
- package/expo-plugin/build/types/ios-widget/files/infoPlist.d.ts.map +1 -1
- package/expo-plugin/build/types/ios-widget/files/manifest.d.ts +9 -2
- package/expo-plugin/build/types/ios-widget/files/manifest.d.ts.map +1 -1
- package/expo-plugin/build/types/ios-widget/files/swift-utils.d.ts +2 -0
- package/expo-plugin/build/types/ios-widget/files/swift-utils.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/files/swift.d.ts +6 -2
- package/expo-plugin/build/types/ios-widget/files/swift.d.ts.map +1 -1
- package/expo-plugin/build/types/ios-widget/index.d.ts +3 -1
- package/expo-plugin/build/types/ios-widget/index.d.ts.map +1 -1
- package/expo-plugin/build/types/ios-widget/podfile.d.ts +19 -1
- package/expo-plugin/build/types/ios-widget/podfile.d.ts.map +1 -1
- package/expo-plugin/build/types/ios-widget/widgetPlist.d.ts.map +1 -1
- package/expo-plugin/build/types/ios-widget/xcode/buildPhases.d.ts +6 -8
- package/expo-plugin/build/types/ios-widget/xcode/buildPhases.d.ts.map +1 -1
- package/expo-plugin/build/types/ios-widget/xcode/configurationList.d.ts +15 -10
- package/expo-plugin/build/types/ios-widget/xcode/configurationList.d.ts.map +1 -1
- package/expo-plugin/build/types/ios-widget/xcode/fileReferences.d.ts +16 -0
- package/expo-plugin/build/types/ios-widget/xcode/fileReferences.d.ts.map +1 -0
- package/expo-plugin/build/types/ios-widget/xcode/groups.d.ts +0 -4
- package/expo-plugin/build/types/ios-widget/xcode/groups.d.ts.map +1 -1
- package/expo-plugin/build/types/ios-widget/xcode/index.d.ts +23 -3
- package/expo-plugin/build/types/ios-widget/xcode/index.d.ts.map +1 -1
- package/expo-plugin/build/types/ios-widget/xcode/mainAppSettings.d.ts +16 -4
- package/expo-plugin/build/types/ios-widget/xcode/mainAppSettings.d.ts.map +1 -1
- package/expo-plugin/build/types/ios-widget/xcode/productFile.d.ts +0 -4
- package/expo-plugin/build/types/ios-widget/xcode/productFile.d.ts.map +1 -1
- package/expo-plugin/build/types/ios-widget/xcode/target.d.ts +11 -26
- package/expo-plugin/build/types/ios-widget/xcode/target.d.ts.map +1 -1
- package/expo-plugin/build/types/types.d.ts +23 -4
- package/expo-plugin/build/types/types.d.ts.map +1 -1
- package/expo-plugin/build/types/utils/urlScheme.d.ts +16 -0
- package/expo-plugin/build/types/utils/urlScheme.d.ts.map +1 -1
- package/expo-plugin/build/types/validation.d.ts +2 -1
- package/expo-plugin/build/types/validation.d.ts.map +1 -1
- package/expo-plugin/src/constants.ts +24 -1
- package/expo-plugin/src/index.ts +14 -1
- package/expo-plugin/src/ios/index.ts +3 -0
- package/expo-plugin/src/ios/infoPlist.ts +33 -5
- package/expo-plugin/src/ios/serverUpdate.ts +29 -0
- package/expo-plugin/src/ios-widget/clientRendered.ts +9 -5
- package/expo-plugin/src/ios-widget/clientRenderedPrerender.ts +11 -6
- package/expo-plugin/src/ios-widget/dynamic-live-activity/swift.ts +138 -0
- package/expo-plugin/src/ios-widget/files/index.ts +15 -4
- package/expo-plugin/src/ios-widget/files/infoPlist.ts +17 -3
- package/expo-plugin/src/ios-widget/files/manifest.ts +42 -2
- package/expo-plugin/src/ios-widget/files/swift-utils.ts +3 -0
- package/expo-plugin/src/ios-widget/files/swift.ts +69 -22
- package/expo-plugin/src/ios-widget/index.ts +13 -3
- package/expo-plugin/src/ios-widget/podfile.ts +46 -13
- package/expo-plugin/src/ios-widget/widgetPlist.ts +37 -23
- package/expo-plugin/src/ios-widget/xcode/__fixtures__/fresh.pbxproj +197 -0
- package/expo-plugin/src/ios-widget/xcode/__fixtures__/with-existing-extension.pbxproj +321 -0
- package/expo-plugin/src/ios-widget/xcode/__fixtures__/with-per-config-signing.pbxproj +203 -0
- package/expo-plugin/src/ios-widget/xcode/__snapshots__/applyXcodeChanges.node.test.ts.snap +363 -0
- package/expo-plugin/src/ios-widget/xcode/__tests__/pbxConsistency.ts +130 -0
- package/expo-plugin/src/ios-widget/xcode/buildPhases.ts +210 -164
- package/expo-plugin/src/ios-widget/xcode/configurationList.ts +52 -35
- package/expo-plugin/src/ios-widget/xcode/fileReferences.ts +51 -0
- package/expo-plugin/src/ios-widget/xcode/groups.ts +52 -54
- package/expo-plugin/src/ios-widget/xcode/index.ts +124 -119
- package/expo-plugin/src/ios-widget/xcode/mainAppSettings.ts +59 -54
- package/expo-plugin/src/ios-widget/xcode/productFile.ts +3 -2
- package/expo-plugin/src/ios-widget/xcode/target.ts +31 -83
- package/expo-plugin/src/types.ts +28 -4
- package/expo-plugin/src/utils/urlScheme.ts +47 -17
- package/expo-plugin/src/validation.ts +76 -1
- package/ios/Package.swift +39 -4
- package/ios/VoltraWidget.podspec +1 -0
- package/ios/app/NativeVoltra.mm +126 -7
- package/ios/app/VoltraLiveActivityManager.swift +30 -0
- package/ios/app/VoltraLiveActivityService.swift +77 -5
- package/ios/app/VoltraModule.swift +117 -1
- package/ios/app/VoltraModuleImpl.swift +116 -2
- package/ios/app/VoltraViewComponentView.mm +3 -3
- package/ios/app/VoltraWidgetService.swift +147 -12
- package/ios/app/dynamic-live-activity/VoltraDynamicLiveActivityService.swift +97 -0
- package/ios/app/dynamic-live-activity/VoltraLiveActivityChronology.swift +68 -0
- package/ios/shared/DynamicWidgetPropsCodec.swift +51 -0
- package/ios/shared/DynamicWidgetPropsStorage.swift +53 -0
- package/ios/shared/DynamicWidgetPropsStore.swift +117 -0
- package/ios/shared/DynamicWidgetRenderCoordinator.swift +31 -0
- package/ios/shared/DynamicWidgetServerUpdate/DynamicWidgetServerFetchResolver.swift +34 -0
- package/ios/shared/DynamicWidgetServerUpdate/DynamicWidgetServerProps.swift +55 -0
- package/ios/shared/DynamicWidgetServerUpdate/DynamicWidgetServerPropsStore.swift +146 -0
- package/ios/shared/DynamicWidgetServerUpdate/DynamicWidgetServerUpdateRunner.swift +193 -0
- package/ios/shared/DynamicWidgetUpdater.swift +30 -0
- package/ios/shared/ServerWidgetContentResolver.swift +60 -0
- package/ios/shared/ServerWidgetResponseStore.swift +25 -0
- package/ios/shared/ShortNames.swift +6 -0
- package/ios/shared/VoltraConfig.swift +41 -0
- package/ios/shared/VoltraConstants.swift +19 -0
- package/ios/shared/VoltraElement.swift +127 -43
- package/ios/shared/VoltraEventBus.swift +52 -7
- package/ios/shared/VoltraJSRenderer.swift +93 -23
- package/ios/shared/VoltraNode.swift +7 -111
- package/ios/shared/VoltraRefreshIntent.swift +1 -1
- package/ios/shared/VoltraWidgetDefaults.swift +9 -1
- package/ios/shared/VoltraWidgetKind.swift +41 -0
- package/ios/shared/VoltraWidgetServerFetcher.swift +52 -107
- package/ios/shared/WidgetServer/VoltraWidgetAppearance.swift +17 -0
- package/ios/shared/WidgetServer/VoltraWidgetServer.swift +138 -0
- package/ios/shared/WidgetServer/WidgetCanonicalConfiguration.swift +77 -0
- package/ios/shared/WidgetServer/WidgetScope.swift +55 -0
- package/ios/shared/WidgetServer/WidgetServerEtagStore.swift +55 -0
- package/ios/shared/WidgetServer/WidgetServerFetcher.swift +179 -0
- package/ios/shared/WidgetServer/WidgetServerRequestBuilder.swift +114 -0
- package/ios/shared/WidgetServer/WidgetServerSettingsCodec.swift +47 -0
- package/ios/shared/WidgetServer/WidgetServerSettingsResolver.swift +129 -0
- package/ios/shared/WidgetServer/WidgetServerSettingsStore.swift +170 -0
- package/ios/shared/WidgetServer/WidgetServerSettingsValidator.swift +73 -0
- package/ios/shared/WidgetServer/WidgetServerUpdateSettings.swift +123 -0
- package/ios/shared/WidgetServer/WidgetServerUpdateSettingsJson.swift +115 -0
- package/ios/shared/dynamic-live-activity/DynamicLiveActivityPropsCodec.swift +13 -0
- package/ios/shared/dynamic-live-activity/VoltraDynamicLiveActivityBundleSource.swift +156 -0
- package/ios/shared/dynamic-live-activity/VoltraDynamicLiveActivityObserver.swift +97 -0
- package/ios/shared/dynamic-live-activity/VoltraDynamicLiveActivityOperations.swift +105 -0
- package/ios/shared/dynamic-live-activity/VoltraDynamicLiveActivityPayloadValidator.swift +55 -0
- package/ios/shared/dynamic-live-activity/VoltraDynamicLiveActivityRegistry.swift +143 -0
- package/ios/shared/dynamic-live-activity/VoltraDynamicLiveActivityRenderFailureQueue.swift +158 -0
- package/ios/shared/dynamic-live-activity/VoltraDynamicLiveActivityRenderFailureReporter.swift +120 -0
- package/ios/shared/dynamic-live-activity/VoltraDynamicLiveActivityRenderer.swift +370 -0
- package/ios/shared/dynamic-live-activity/VoltraDynamicLiveActivityTypes.swift +87 -0
- package/ios/shared/dynamic-live-activity/VoltraLiveActivityOrder.swift +19 -0
- package/ios/target/VoltraClientWidgetRuntime.swift +60 -10
- package/ios/target/VoltraDynamicWidgetServerUpdateProvider.swift +204 -0
- package/ios/target/VoltraHomeWidget.swift +91 -92
- package/ios/target/VoltraWidget.swift +3 -1
- package/ios/ui/Extensions/VoltraNode+View.swift +113 -0
- package/ios/ui/Generated/Parameters/ChartParameters.swift +3 -0
- package/ios/ui/Helpers/VoltraDeepLinkResolver.swift +5 -3
- package/ios/ui/Helpers/VoltraProgressDriver.swift +6 -2
- package/ios/ui/Layout/VoltraFlexStackLayout.swift +9 -3
- package/ios/ui/Style/JSColorParser.swift +24 -8
- package/ios/ui/Style/JSGradientParser.swift +36 -12
- package/ios/ui/Style/JSStyleParser.swift +36 -12
- package/ios/ui/Style/LayoutStyle.swift +12 -4
- package/ios/ui/Views/VoltraChart.swift +160 -16
- package/ios/ui/Views/VoltraLinearGradient.swift +6 -2
- package/package.json +5 -5
- package/src/dynamic-widget/api.ts +25 -0
- package/src/events.ts +34 -0
- package/src/index.ts +23 -0
- package/src/live-activity/api.ts +2 -2
- package/src/live-activity/dynamic-api.ts +240 -0
- package/src/native/NativeVoltra.ts +22 -0
- package/src/types.ts +4 -0
- package/src/utils/enableDynamicLiveActivityHotReload.ts +50 -0
- package/src/utils/enableWidgetHotReload.ts +9 -16
- package/src/utils/useUpdateOnHMR.ts +3 -12
- package/src/widgets/server-credentials.ts +8 -0
- package/src/widgets/server-update.ts +84 -0
- /package/ios/shared/{VoltraKeychainHelper.swift → WidgetServer/VoltraKeychainHelper.swift} +0 -0
|
@@ -3,18 +3,36 @@ import { IOS } from '../../constants';
|
|
|
3
3
|
// Main Function
|
|
4
4
|
// ============================================================================
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Creates the minimal widget-extension native target and registers it with the project.
|
|
7
7
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
8
|
+
* A target cannot be "ensured" into existence, so this is the one create-only step in
|
|
9
|
+
* {@link applyXcodeChanges}: it adds an empty `PBXNativeTarget` (no product reference, configuration
|
|
10
|
+
* list or build phases yet) to the `PBXNativeTarget` and `PBXProject` sections. The shared ensure
|
|
11
|
+
* pipeline then fills in the configuration list, product file, group, build phases, attributes and
|
|
12
|
+
* dependency — the same code that reconciles an already-existing target.
|
|
13
|
+
*
|
|
14
|
+
* @returns The freshly created native-target object (the value stored in the `PBXNativeTarget`
|
|
15
|
+
* section under `targetUuid`).
|
|
12
16
|
*/
|
|
13
|
-
export function
|
|
14
|
-
const
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
17
|
+
export function createTargetSkeleton(xcodeProject, options) {
|
|
18
|
+
const { targetName, targetUuid } = options;
|
|
19
|
+
const target = {
|
|
20
|
+
uuid: targetUuid,
|
|
21
|
+
pbxNativeTarget: {
|
|
22
|
+
isa: 'PBXNativeTarget',
|
|
23
|
+
name: targetName,
|
|
24
|
+
productName: targetName,
|
|
25
|
+
productType: `"com.apple.product-type.app-extension"`,
|
|
26
|
+
buildConfigurationList: '',
|
|
27
|
+
productReference: '',
|
|
28
|
+
buildPhases: [],
|
|
29
|
+
buildRules: [],
|
|
30
|
+
dependencies: [],
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
xcodeProject.addToPbxNativeTargetSection(target);
|
|
34
|
+
xcodeProject.addToPbxProjectSection(target);
|
|
35
|
+
return xcodeProject.pbxNativeTargetSection()[targetUuid];
|
|
18
36
|
}
|
|
19
37
|
/**
|
|
20
38
|
* Ensures target attributes (LastSwiftMigration) exist for the target.
|
|
@@ -53,56 +71,4 @@ export function ensureTargetDependency(xcodeProject, targetUuid) {
|
|
|
53
71
|
xcodeProject.addTargetDependency(mainTargetUuid, [targetUuid]);
|
|
54
72
|
}
|
|
55
73
|
}
|
|
56
|
-
// ============================================================================
|
|
57
|
-
// Helper Functions
|
|
58
|
-
// ============================================================================
|
|
59
|
-
/**
|
|
60
|
-
* Adds the widget extension target to the PBXNativeTarget section.
|
|
61
|
-
*/
|
|
62
|
-
function addToPbxNativeTargetSection(xcodeProject, options) {
|
|
63
|
-
const { targetName, targetUuid, productFile, xCConfigurationList } = options;
|
|
64
|
-
const target = {
|
|
65
|
-
uuid: targetUuid,
|
|
66
|
-
pbxNativeTarget: {
|
|
67
|
-
isa: 'PBXNativeTarget',
|
|
68
|
-
name: targetName,
|
|
69
|
-
productName: targetName,
|
|
70
|
-
productReference: productFile.fileRef,
|
|
71
|
-
productType: `"com.apple.product-type.app-extension"`,
|
|
72
|
-
buildConfigurationList: xCConfigurationList.uuid,
|
|
73
|
-
buildPhases: [],
|
|
74
|
-
buildRules: [],
|
|
75
|
-
dependencies: [],
|
|
76
|
-
},
|
|
77
|
-
};
|
|
78
|
-
xcodeProject.addToPbxNativeTargetSection(target);
|
|
79
|
-
return target;
|
|
80
|
-
}
|
|
81
|
-
/**
|
|
82
|
-
* Adds the target to the PBXProject section.
|
|
83
|
-
*/
|
|
84
|
-
function addToPbxProjectSection(xcodeProject, target) {
|
|
85
|
-
xcodeProject.addToPbxProjectSection(target);
|
|
86
|
-
// Add target attributes to project section
|
|
87
|
-
const projectSection = xcodeProject.pbxProjectSection();
|
|
88
|
-
const firstProject = xcodeProject.getFirstProject();
|
|
89
|
-
if (!projectSection[firstProject.uuid].attributes.TargetAttributes) {
|
|
90
|
-
projectSection[firstProject.uuid].attributes.TargetAttributes = {};
|
|
91
|
-
}
|
|
92
|
-
projectSection[firstProject.uuid].attributes.TargetAttributes[target.uuid] = {
|
|
93
|
-
LastSwiftMigration: IOS.LAST_SWIFT_MIGRATION,
|
|
94
|
-
};
|
|
95
|
-
}
|
|
96
|
-
/**
|
|
97
|
-
* Adds a target dependency so the main app depends on the widget extension.
|
|
98
|
-
*/
|
|
99
|
-
function addTargetDependency(xcodeProject, target) {
|
|
100
|
-
if (!xcodeProject.hash.project.objects['PBXTargetDependency']) {
|
|
101
|
-
xcodeProject.hash.project.objects['PBXTargetDependency'] = {};
|
|
102
|
-
}
|
|
103
|
-
if (!xcodeProject.hash.project.objects['PBXContainerItemProxy']) {
|
|
104
|
-
xcodeProject.hash.project.objects['PBXContainerItemProxy'] = {};
|
|
105
|
-
}
|
|
106
|
-
xcodeProject.addTargetDependency(xcodeProject.getFirstTarget().uuid, [target.uuid]);
|
|
107
|
-
}
|
|
108
74
|
//# sourceMappingURL=target.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"target.js","sourceRoot":"","sources":["../../../../src/ios-widget/xcode/target.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"target.js","sourceRoot":"","sources":["../../../../src/ios-widget/xcode/target.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,3 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The URL schemes the app is configured with: every `scheme` and `ios.scheme` value (string or
|
|
3
|
+
* array), or the bundle identifier when neither is set.
|
|
4
|
+
*/
|
|
5
|
+
export function getAppURLSchemes(config) {
|
|
6
|
+
const configured = [config.scheme, config.ios?.scheme]
|
|
7
|
+
.flat()
|
|
8
|
+
.filter((scheme) => typeof scheme === 'string' && scheme.length > 0);
|
|
9
|
+
if (configured.length > 0) {
|
|
10
|
+
return [...new Set(configured)];
|
|
11
|
+
}
|
|
12
|
+
return config.ios?.bundleIdentifier ? [config.ios.bundleIdentifier] : [];
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Appends a URL type for every scheme not already listed. Returns `types` itself when nothing is
|
|
16
|
+
* missing.
|
|
17
|
+
*/
|
|
18
|
+
export function appendMissingURLSchemes(types, schemes) {
|
|
19
|
+
const missingSchemes = schemes.filter((scheme) => !types.some((t) => Array.isArray(t?.CFBundleURLSchemes) && t.CFBundleURLSchemes.includes(scheme)));
|
|
20
|
+
if (missingSchemes.length === 0) {
|
|
21
|
+
return types;
|
|
22
|
+
}
|
|
23
|
+
return [...types, ...missingSchemes.map((scheme) => ({ CFBundleURLSchemes: [scheme] }))];
|
|
24
|
+
}
|
|
1
25
|
/**
|
|
2
26
|
* Ensures the main app has a URL scheme set so widgetURL can open it.
|
|
3
27
|
* This is an optional feature for deep linking from widgets.
|
|
@@ -6,30 +30,26 @@
|
|
|
6
30
|
* @returns The modified config with URL scheme ensured
|
|
7
31
|
*/
|
|
8
32
|
export function ensureURLScheme(config) {
|
|
9
|
-
const
|
|
10
|
-
|
|
33
|
+
const existingInfoPlist = config.ios?.infoPlist;
|
|
34
|
+
const existingTypes = existingInfoPlist?.CFBundleURLTypes;
|
|
35
|
+
// Expo's own withScheme fills CFBundleURLTypes from `scheme` / `ios.scheme` and always appends
|
|
36
|
+
// ios.bundleIdentifier, but it skips the app entirely once ios.infoPlist.CFBundleURLTypes is set
|
|
37
|
+
// (createInfoPlistPluginWithPropertyGuard). Writing the key here when the app hasn't set it
|
|
38
|
+
// therefore drops every configured scheme instead of adding one. Only top up a list the app owns.
|
|
39
|
+
if (!existingTypes) {
|
|
11
40
|
return config;
|
|
12
41
|
}
|
|
13
|
-
const
|
|
14
|
-
|
|
15
|
-
// Check if scheme already exists
|
|
16
|
-
const hasScheme = existingTypes.some((t) => Array.isArray(t?.CFBundleURLSchemes) && t.CFBundleURLSchemes.includes(scheme));
|
|
17
|
-
if (hasScheme) {
|
|
42
|
+
const types = appendMissingURLSchemes(existingTypes, getAppURLSchemes(config));
|
|
43
|
+
if (types === existingTypes) {
|
|
18
44
|
return config;
|
|
19
45
|
}
|
|
20
|
-
// Add the URL scheme
|
|
21
46
|
return {
|
|
22
47
|
...config,
|
|
23
48
|
ios: {
|
|
24
49
|
...config.ios,
|
|
25
50
|
infoPlist: {
|
|
26
51
|
...existingInfoPlist,
|
|
27
|
-
CFBundleURLTypes:
|
|
28
|
-
...existingTypes,
|
|
29
|
-
{
|
|
30
|
-
CFBundleURLSchemes: [scheme],
|
|
31
|
-
},
|
|
32
|
-
],
|
|
52
|
+
CFBundleURLTypes: types,
|
|
33
53
|
},
|
|
34
54
|
},
|
|
35
55
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"urlScheme.js","sourceRoot":"","sources":["../../../src/utils/urlScheme.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"urlScheme.js","sourceRoot":"","sources":["../../../src/utils/urlScheme.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAkB;IACjD,MAAM,UAAU,GAAG,CAAC,MAAM,CAAC,MAAM,EAAG,MAAM,CAAC,GAAkD,EAAE,MAAM,CAAC;SACnG,IAAI,EAAE;SACN,MAAM,CAAC,CAAC,MAAM,EAAoB,EAAE,CAAC,OAAO,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;IAExF,IAAI,UAAU,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC1B,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC,CAAA;IACjC,CAAC;IAED,OAAO,MAAM,CAAC,GAAG,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAA;AAC1E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,uBAAuB,CACrC,KAAU,EACV,OAAiB;IAEjB,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CACnC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC,kBAAkB,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAC9G,CAAA;IAED,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAChC,OAAO,KAAK,CAAA;IACd,CAAC;IAED,OAAO,CAAC,GAAG,KAAK,EAAE,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,kBAAkB,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;AAC1F,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,MAAkB;IAChD,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,EAAE,SAAS,CAAA;IAC/C,MAAM,aAAa,GAAG,iBAAiB,EAAE,gBAAyC,CAAA;IAElF,+FAA+F;IAC/F,iGAAiG;IACjG,4FAA4F;IAC5F,kGAAkG;IAClG,IAAI,CAAC,aAAa,EAAE,CAAC;QACnB,OAAO,MAAM,CAAA;IACf,CAAC;IAED,MAAM,KAAK,GAAG,uBAAuB,CAAC,aAAa,EAAE,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAA;IAE9E,IAAI,KAAK,KAAK,aAAa,EAAE,CAAC;QAC5B,OAAO,MAAM,CAAA;IACf,CAAC;IAED,OAAO;QACL,GAAG,MAAM;QACT,GAAG,EAAE;YACH,GAAG,MAAM,CAAC,GAAG;YACb,SAAS,EAAE;gBACT,GAAG,iBAAiB;gBACpB,gBAAgB,EAAE,KAAK;aACxB;SACF;KACF,CAAA;AACH,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import { validateHomeScreenWidgetId, validateInitialStatePath, validateWidgetEntry, validateWidgetLabel, } from '@use-voltra/expo-plugin';
|
|
1
|
+
import { validateHomeScreenWidgetId, validateInitialStatePath, validateWidgetEntry, validateWidgetLabel, validateWidgetServerUpdate, } from '@use-voltra/expo-plugin';
|
|
2
|
+
import { iosServerUpdateRules } from './ios/serverUpdate';
|
|
3
|
+
import { getDynamicLiveActivityAttributesType } from '@use-voltra/expo-plugin';
|
|
4
|
+
import { widgetKind } from './constants';
|
|
2
5
|
const VALID_FAMILIES = new Set([
|
|
3
6
|
'systemSmall',
|
|
4
7
|
'systemMedium',
|
|
@@ -8,14 +11,29 @@ const VALID_FAMILIES = new Set([
|
|
|
8
11
|
'accessoryRectangular',
|
|
9
12
|
'accessoryInline',
|
|
10
13
|
]);
|
|
14
|
+
const DYNAMIC_LIVE_ACTIVITY_ID_PATTERN = /^[a-zA-Z0-9_]+$/;
|
|
15
|
+
export function validateIOSDynamicLiveActivityConfig(liveActivity, projectRoot) {
|
|
16
|
+
if (!liveActivity.id || typeof liveActivity.id !== 'string') {
|
|
17
|
+
throw new Error('Dynamic Live Activity ID is required and must be a string');
|
|
18
|
+
}
|
|
19
|
+
if (!DYNAMIC_LIVE_ACTIVITY_ID_PATTERN.test(liveActivity.id)) {
|
|
20
|
+
throw new Error(`Dynamic Live Activity ID '${liveActivity.id}' is invalid. ` +
|
|
21
|
+
'It must be non-empty and contain only alphanumeric characters and underscores.');
|
|
22
|
+
}
|
|
23
|
+
validateWidgetEntry(liveActivity.entry, liveActivity.id, projectRoot);
|
|
24
|
+
}
|
|
11
25
|
export function validateIOSWidgetConfig(widget, projectRoot) {
|
|
12
26
|
validateHomeScreenWidgetId(widget.id);
|
|
27
|
+
if (widget.kind !== undefined && (typeof widget.kind !== 'string' || widget.kind.trim() === '')) {
|
|
28
|
+
throw new Error(`Widget '${widget.id}': kind must be a non-empty string`);
|
|
29
|
+
}
|
|
13
30
|
validateWidgetLabel(widget.displayName, widget.id, 'displayName');
|
|
14
31
|
validateWidgetLabel(widget.description, widget.id, 'description');
|
|
15
32
|
validateInitialStatePath(widget.initialStatePath, widget.id, projectRoot);
|
|
16
33
|
if (widget.entry !== undefined) {
|
|
17
34
|
validateWidgetEntry(widget.entry, widget.id, projectRoot);
|
|
18
35
|
}
|
|
36
|
+
validateWidgetServerUpdate(widget.serverUpdate, widget.id, iosServerUpdateRules(widget));
|
|
19
37
|
if (widget.supportedFamilies) {
|
|
20
38
|
if (!Array.isArray(widget.supportedFamilies)) {
|
|
21
39
|
throw new Error(`Widget '${widget.id}': supportedFamilies must be an array`);
|
|
@@ -42,12 +60,47 @@ export function validateIOSConfigPluginProps(props, projectRoot) {
|
|
|
42
60
|
throw new Error('widgets must be an array');
|
|
43
61
|
}
|
|
44
62
|
const seenIds = new Set();
|
|
63
|
+
const seenKinds = new Set();
|
|
45
64
|
for (const widget of props.widgets) {
|
|
46
65
|
validateIOSWidgetConfig(widget, projectRoot);
|
|
66
|
+
// A server-driven Dynamic Widget commits fetched props to the App Group so the widget
|
|
67
|
+
// extension can read them. Without one it would fetch and have nowhere to put the result.
|
|
68
|
+
if (widget.entry !== undefined && widget.serverUpdate !== undefined && !props.groupIdentifier) {
|
|
69
|
+
throw new Error(`Widget '${widget.id}' has both entry and serverUpdate, which requires groupIdentifier ` +
|
|
70
|
+
'so fetched props can be shared with the widget extension.');
|
|
71
|
+
}
|
|
47
72
|
if (seenIds.has(widget.id)) {
|
|
48
73
|
throw new Error(`Duplicate widget ID: '${widget.id}'`);
|
|
49
74
|
}
|
|
50
75
|
seenIds.add(widget.id);
|
|
76
|
+
const kind = widgetKind(widget);
|
|
77
|
+
if (seenKinds.has(kind)) {
|
|
78
|
+
throw new Error(`Duplicate widget kind: '${kind}'`);
|
|
79
|
+
}
|
|
80
|
+
seenKinds.add(kind);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
if (props.liveActivities !== undefined) {
|
|
84
|
+
if (!Array.isArray(props.liveActivities)) {
|
|
85
|
+
throw new Error('liveActivities must be an array');
|
|
86
|
+
}
|
|
87
|
+
if (props.liveActivities.length > 0 && !props.groupIdentifier) {
|
|
88
|
+
throw new Error('groupIdentifier is required when liveActivities is non-empty');
|
|
89
|
+
}
|
|
90
|
+
const seenIds = new Set();
|
|
91
|
+
const seenAttributesTypes = new Map();
|
|
92
|
+
for (const liveActivity of props.liveActivities) {
|
|
93
|
+
validateIOSDynamicLiveActivityConfig(liveActivity, projectRoot);
|
|
94
|
+
if (seenIds.has(liveActivity.id)) {
|
|
95
|
+
throw new Error(`Duplicate Dynamic Live Activity ID: '${liveActivity.id}'`);
|
|
96
|
+
}
|
|
97
|
+
seenIds.add(liveActivity.id);
|
|
98
|
+
const attributesType = getDynamicLiveActivityAttributesType(liveActivity.id);
|
|
99
|
+
const conflictingId = seenAttributesTypes.get(attributesType);
|
|
100
|
+
if (conflictingId) {
|
|
101
|
+
throw new Error(`Dynamic Live Activity IDs '${conflictingId}' and '${liveActivity.id}' generate the same ActivityKit attributes type '${attributesType}'`);
|
|
102
|
+
}
|
|
103
|
+
seenAttributesTypes.set(attributesType, liveActivity.id);
|
|
51
104
|
}
|
|
52
105
|
}
|
|
53
106
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/validation.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,EACxB,mBAAmB,EACnB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"validation.js","sourceRoot":"","sources":["../../src/validation.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IOSWidgetFamily } from './types';
|
|
1
|
+
import type { IOSWidgetConfig, IOSWidgetFamily } from './types';
|
|
2
2
|
export declare const IOS: {
|
|
3
3
|
readonly DEPLOYMENT_TARGET: "17.0";
|
|
4
4
|
readonly SWIFT_VERSION: "5.0";
|
|
@@ -10,4 +10,13 @@ export declare const DEFAULT_USER_IMAGES_PATH = "./assets/voltra";
|
|
|
10
10
|
export declare const SUPPORTED_IMAGE_EXTENSIONS: RegExp;
|
|
11
11
|
export declare const DEFAULT_WIDGET_FAMILIES: IOSWidgetFamily[];
|
|
12
12
|
export declare const WIDGET_FAMILY_MAP: Record<IOSWidgetFamily, string>;
|
|
13
|
+
/** Default prefix of a widget's WidgetKit `kind`: `Voltra_Widget_<id>`. Mirrors `VoltraStorageKeys.widgetKindPrefix`. */
|
|
14
|
+
export declare const WIDGET_KIND_PREFIX = "Voltra_Widget_";
|
|
15
|
+
/** WidgetKit `kind` of a widget: the `kind` option when set, else `Voltra_Widget_<id>`. */
|
|
16
|
+
export declare const widgetKind: (widget: Pick<IOSWidgetConfig, "id" | "kind">) => string;
|
|
17
|
+
/**
|
|
18
|
+
* `{ id: kind }` for the widgets that pin a custom `kind`, or undefined when none does.
|
|
19
|
+
* Written to both Info.plists (`Voltra_WidgetKinds`) so native code maps ids to kinds and back.
|
|
20
|
+
*/
|
|
21
|
+
export declare const widgetKindOverrides: (widgets?: Pick<IOSWidgetConfig, "id" | "kind">[]) => Record<string, string> | undefined;
|
|
13
22
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,SAAS,CAAA;AAE/D,eAAO,MAAM,GAAG;;;;;CAKN,CAAA;AAEV,mDAAmD;AACnD,eAAO,MAAM,wBAAwB,oBAAoB,CAAA;AAEzD,eAAO,MAAM,0BAA0B,QAAuB,CAAA;AAE9D,eAAO,MAAM,uBAAuB,EAAE,eAAe,EAAmD,CAAA;AAExG,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAQ7D,CAAA;AAED,yHAAyH;AACzH,eAAO,MAAM,kBAAkB,mBAAmB,CAAA;AAElD,2FAA2F;AAC3F,eAAO,MAAM,UAAU,GAAI,QAAQ,IAAI,CAAC,eAAe,EAAE,IAAI,GAAG,MAAM,CAAC,KAAG,MACtB,CAAA;AAEpD;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAC9B,UAAU,IAAI,CAAC,eAAe,EAAE,IAAI,GAAG,MAAM,CAAC,EAAE,KAC/C,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAQ3B,CAAA"}
|
|
@@ -6,5 +6,5 @@ import type { VoltraIosConfigPlugin } from './types';
|
|
|
6
6
|
*/
|
|
7
7
|
declare const withVoltraIos: VoltraIosConfigPlugin;
|
|
8
8
|
export default withVoltraIos;
|
|
9
|
-
export type { IOSConfigPluginProps, IOSMainAppPluginProps, IOSWidgetConfig, IOSWidgetExtensionFiles, IOSWidgetExtensionPluginProps, IOSWidgetFamily, IOSWidgetServerUpdateConfig, VoltraIosConfigPlugin, } from './types';
|
|
9
|
+
export type { IOSConfigPluginProps, IOSDynamicLiveActivityConfig, IOSMainAppPluginProps, IOSWidgetConfig, IOSWidgetExtensionFiles, IOSWidgetExtensionPluginProps, IOSWidgetFamily, IOSWidgetServerUpdateConfig, VoltraIosConfigPlugin, } from './types';
|
|
10
10
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAA;AAIpD;;;;GAIG;AACH,QAAA,MAAM,aAAa,EAAE,qBAuDpB,CAAA;AAED,eAAe,aAAa,CAAA;AAE5B,YAAY,EACV,oBAAoB,EACpB,4BAA4B,EAC5B,qBAAqB,EACrB,eAAe,EACf,uBAAuB,EACvB,6BAA6B,EAC7B,eAAe,EACf,2BAA2B,EAC3B,qBAAqB,GACtB,MAAM,SAAS,CAAA"}
|
|
@@ -3,7 +3,9 @@ export interface IOSConfigProps {
|
|
|
3
3
|
groupIdentifier?: string;
|
|
4
4
|
widgetIds?: string[];
|
|
5
5
|
widgets?: import('../types').IOSWidgetConfig[];
|
|
6
|
+
liveActivities?: import('../types').IOSDynamicLiveActivityConfig[];
|
|
6
7
|
keychainGroup?: string;
|
|
8
|
+
voltraVersion: string;
|
|
7
9
|
}
|
|
8
10
|
/**
|
|
9
11
|
* Main iOS app configuration.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ios/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAM7C,MAAM,WAAW,cAAc;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,UAAU,EAAE,eAAe,EAAE,CAAA;IAC9C,aAAa,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ios/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAM7C,MAAM,WAAW,cAAc;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;IACpB,OAAO,CAAC,EAAE,OAAO,UAAU,EAAE,eAAe,EAAE,CAAA;IAC9C,cAAc,CAAC,EAAE,OAAO,UAAU,EAAE,4BAA4B,EAAE,CAAA;IAClE,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,aAAa,EAAE,MAAM,CAAA;CACtB;AAED;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,cAAc,GAAG,UAAU,CAsB7E;AAGD,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA"}
|
|
@@ -5,6 +5,7 @@ export interface ConfigureInfoPlistProps {
|
|
|
5
5
|
widgetIds?: string[];
|
|
6
6
|
widgets?: IOSWidgetConfig[];
|
|
7
7
|
keychainGroup?: string;
|
|
8
|
+
voltraVersion: string;
|
|
8
9
|
}
|
|
9
10
|
/**
|
|
10
11
|
* Configures main app Info.plist for Live Activities and widgets.
|
|
@@ -13,6 +14,7 @@ export interface ConfigureInfoPlistProps {
|
|
|
13
14
|
* - NSSupportsLiveActivities: Enables Live Activities support
|
|
14
15
|
* - Voltra_AppGroupIdentifier: App group ID for widget communication (if provided)
|
|
15
16
|
* - Voltra_WidgetIds: Array of widget IDs for native module access (if provided)
|
|
17
|
+
* - Voltra_WidgetKinds: Map of widget IDs to custom WidgetKit kinds (if any widget sets `kind`)
|
|
16
18
|
* - Voltra_WidgetServerUrls: Map of widget IDs to server URLs (if any widgets have serverUpdate)
|
|
17
19
|
* - Voltra_WidgetServerIntervals: Map of widget IDs to update intervals (if any widgets have serverUpdate)
|
|
18
20
|
* - Voltra_KeychainGroup: Keychain access group for shared credentials (if provided)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"infoPlist.d.ts","sourceRoot":"","sources":["../../../src/ios/infoPlist.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAiB,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"infoPlist.d.ts","sourceRoot":"","sources":["../../../src/ios/infoPlist.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAiB,MAAM,sBAAsB,CAAA;AAGlE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAG/C,MAAM,WAAW,uBAAuB;IACtC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;IACpB,OAAO,CAAC,EAAE,eAAe,EAAE,CAAA;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,aAAa,EAAE,MAAM,CAAA;CACtB;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,kBAAkB,EAAE,YAAY,CAAC,uBAAuB,CAgEpE,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { ResolvedWidgetServerUpdateConfig, WidgetServerUpdateRules } from '@use-voltra/expo-plugin';
|
|
2
|
+
import type { IOSWidgetConfig } from '../types';
|
|
3
|
+
/**
|
|
4
|
+
* iOS payload widgets have always defaulted to 15 minutes and accepted anything down to 1, since
|
|
5
|
+
* WidgetKit stretches a timeline it cannot honour rather than refusing it. A widget with an
|
|
6
|
+
* `entry` follows ADR 0002 instead: default 15, floor 15 on both platforms.
|
|
7
|
+
*/
|
|
8
|
+
export declare function iosServerUpdateRules(widget: Pick<IOSWidgetConfig, 'entry'>): WidgetServerUpdateRules;
|
|
9
|
+
/** `serverUpdate` with defaults applied, as the plist and Swift generators consume it. */
|
|
10
|
+
export declare function resolveIOSWidgetServerUpdate(widget: Pick<IOSWidgetConfig, 'entry' | 'serverUpdate'>): ResolvedWidgetServerUpdateConfig | undefined;
|
|
11
|
+
//# sourceMappingURL=serverUpdate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"serverUpdate.d.ts","sourceRoot":"","sources":["../../../src/ios/serverUpdate.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,gCAAgC,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAA;AAExG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE/C;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,OAAO,CAAC,GAAG,uBAAuB,CAMpG;AAED,0FAA0F;AAC1F,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,IAAI,CAAC,eAAe,EAAE,OAAO,GAAG,cAAc,CAAC,GACtD,gCAAgC,GAAG,SAAS,CAM9C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientRendered.d.ts","sourceRoot":"","sources":["../../../src/ios-widget/clientRendered.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE/C;;;;;;GAMG;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GACzB,CAAC,eAAe,GAAG;IAAE,cAAc,EAAE,KAAK,CAAA;CAAE,CAAC,GAC7C,CAAC,eAAe,GAAG;IAAE,cAAc,EAAE,IAAI,CAAC;IAAC,gBAAgB,EAAE,MAAM,CAAA;CAAE,CAAC,CAAA;AAM1E,iFAAiF;AACjF,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,iBAAiB,EAAE,
|
|
1
|
+
{"version":3,"file":"clientRendered.d.ts","sourceRoot":"","sources":["../../../src/ios-widget/clientRendered.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE/C;;;;;;GAMG;AAEH;;;;;;GAMG;AACH,MAAM,MAAM,iBAAiB,GACzB,CAAC,eAAe,GAAG;IAAE,cAAc,EAAE,KAAK,CAAA;CAAE,CAAC,GAC7C,CAAC,eAAe,GAAG;IAAE,cAAc,EAAE,IAAI,CAAC;IAAC,gBAAgB,EAAE,MAAM,CAAA;CAAE,CAAC,CAAA;AAM1E,iFAAiF;AACjF,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,eAAe,EAAE,EAAE,WAAW,EAAE,MAAM,GAAG,iBAAiB,EAAE,CAiBhH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"clientRenderedPrerender.d.ts","sourceRoot":"","sources":["../../../src/ios-widget/clientRenderedPrerender.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"clientRenderedPrerender.d.ts","sourceRoot":"","sources":["../../../src/ios-widget/clientRenderedPrerender.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,uBAAuB,EAC7B,MAAM,yBAAyB,CAAA;AAEhC,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AAiDzD;;;;GAIG;AACH,wBAAsB,8BAA8B,CAClD,OAAO,EAAE,iBAAiB,EAAE,EAC5B,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,uBAAuB,CAAC,CA2ClC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IOSDynamicLiveActivityConfig } from '../../types';
|
|
2
|
+
export declare function generateDynamicLiveActivityWidgetInstances(liveActivities: IOSDynamicLiveActivityConfig[]): string;
|
|
3
|
+
/** Generates the Dynamic Live Activity types shared by the app and extension targets. */
|
|
4
|
+
export declare function generateDynamicLiveActivityTypesSwift(liveActivities: IOSDynamicLiveActivityConfig[]): string;
|
|
5
|
+
/** Generates extension-only ActivityConfiguration declarations for Dynamic Live Activities. */
|
|
6
|
+
export declare function generateDynamicLiveActivitiesSwift(liveActivities: IOSDynamicLiveActivityConfig[]): string;
|
|
7
|
+
//# sourceMappingURL=swift.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swift.d.ts","sourceRoot":"","sources":["../../../../src/ios-widget/dynamic-live-activity/swift.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,aAAa,CAAA;AAG/D,wBAAgB,0CAA0C,CAAC,cAAc,EAAE,4BAA4B,EAAE,GAAG,MAAM,CAIjH;AAED,yFAAyF;AACzF,wBAAgB,qCAAqC,CAAC,cAAc,EAAE,4BAA4B,EAAE,GAAG,MAAM,CAgC5G;AAED,+FAA+F;AAC/F,wBAAgB,kCAAkC,CAAC,cAAc,EAAE,4BAA4B,EAAE,GAAG,MAAM,CAsDzG"}
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { ConfigPlugin } from '@expo/config-plugins';
|
|
2
|
-
import type { IOSWidgetConfig } from '../../types';
|
|
2
|
+
import type { IOSDynamicLiveActivityConfig, IOSWidgetConfig } from '../../types';
|
|
3
3
|
export interface GenerateWidgetExtensionFilesProps {
|
|
4
4
|
targetName: string;
|
|
5
5
|
widgets?: IOSWidgetConfig[];
|
|
6
|
+
liveActivities?: IOSDynamicLiveActivityConfig[];
|
|
6
7
|
groupIdentifier?: string;
|
|
7
8
|
keychainGroup?: string;
|
|
8
9
|
version: string;
|
|
9
10
|
buildNumber: string;
|
|
11
|
+
voltraVersion: string;
|
|
10
12
|
}
|
|
11
13
|
/**
|
|
12
14
|
* Plugin step that generates all widget extension files.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ios-widget/files/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAoB,MAAM,sBAAsB,CAAA;AAIrE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/ios-widget/files/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAoB,MAAM,sBAAsB,CAAA;AAIrE,OAAO,KAAK,EAAE,4BAA4B,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAOhF,MAAM,WAAW,iCAAiC;IAChD,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,CAAC,EAAE,eAAe,EAAE,CAAA;IAC3B,cAAc,CAAC,EAAE,4BAA4B,EAAE,CAAA;IAC/C,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;CACtB;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,4BAA4B,EAAE,YAAY,CAAC,iCAAiC,CAyDxF,CAAA"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* @param targetName - The widget extension target name (used for CFBundleDisplayName)
|
|
6
6
|
* @param version - The app version (CFBundleShortVersionString)
|
|
7
7
|
* @param buildNumber - The build number (CFBundleVersion)
|
|
8
|
+
* @param voltraVersion - The installed @use-voltra/ios-client package version
|
|
8
9
|
*/
|
|
9
|
-
export declare function generateInfoPlist(targetPath: string, targetName: string, version: string, buildNumber: string): void;
|
|
10
|
+
export declare function generateInfoPlist(targetPath: string, targetName: string, version: string, buildNumber: string, voltraVersion: string): void;
|
|
10
11
|
//# sourceMappingURL=infoPlist.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"infoPlist.d.ts","sourceRoot":"","sources":["../../../../src/ios-widget/files/infoPlist.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"infoPlist.d.ts","sourceRoot":"","sources":["../../../../src/ios-widget/files/infoPlist.ts"],"names":[],"mappings":"AAmDA;;;;;;;;GAQG;AACH,wBAAgB,iBAAiB,CAC/B,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,MAAM,EACnB,aAAa,EAAE,MAAM,GACpB,IAAI,CAIN"}
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
import { type DynamicWidgetManifest } from '@use-voltra/expo-plugin';
|
|
2
|
-
import type { IOSWidgetConfig } from '../../types';
|
|
1
|
+
import { type DynamicLiveActivityManifest, type DynamicWidgetManifest } from '@use-voltra/expo-plugin';
|
|
2
|
+
import type { IOSDynamicLiveActivityConfig, IOSWidgetConfig } from '../../types';
|
|
3
3
|
export interface GenerateIOSDynamicWidgetsManifestOptions {
|
|
4
4
|
projectRoot: string;
|
|
5
5
|
widgets?: IOSWidgetConfig[];
|
|
6
6
|
}
|
|
7
|
+
export interface GenerateIOSDynamicLiveActivitiesManifestOptions {
|
|
8
|
+
projectRoot: string;
|
|
9
|
+
liveActivities?: IOSDynamicLiveActivityConfig[];
|
|
10
|
+
}
|
|
7
11
|
export declare function createIOSDynamicWidgetsManifest(projectRoot: string, widgets: IOSWidgetConfig[]): DynamicWidgetManifest;
|
|
12
|
+
export declare function createIOSDynamicLiveActivitiesManifest(projectRoot: string, liveActivities: IOSDynamicLiveActivityConfig[]): DynamicLiveActivityManifest;
|
|
8
13
|
export declare function generateIOSDynamicWidgetsManifest(options: GenerateIOSDynamicWidgetsManifestOptions): void;
|
|
14
|
+
/** Writes the dedicated Dynamic Live Activity manifest on every prebuild, including when empty. */
|
|
15
|
+
export declare function generateIOSDynamicLiveActivitiesManifest(options: GenerateIOSDynamicLiveActivitiesManifestOptions): void;
|
|
9
16
|
//# sourceMappingURL=manifest.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../../src/ios-widget/files/manifest.ts"],"names":[],"mappings":"AAGA,OAAO,
|
|
1
|
+
{"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../../src/ios-widget/files/manifest.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,qBAAqB,EAG3B,MAAM,yBAAyB,CAAA;AAEhC,OAAO,KAAK,EAAE,4BAA4B,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAKhF,MAAM,WAAW,wCAAwC;IACvD,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,eAAe,EAAE,CAAA;CAC5B;AAED,MAAM,WAAW,+CAA+C;IAC9D,WAAW,EAAE,MAAM,CAAA;IACnB,cAAc,CAAC,EAAE,4BAA4B,EAAE,CAAA;CAChD;AAED,wBAAgB,+BAA+B,CAC7C,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,eAAe,EAAE,GACzB,qBAAqB,CAmBvB;AAED,wBAAgB,sCAAsC,CACpD,WAAW,EAAE,MAAM,EACnB,cAAc,EAAE,4BAA4B,EAAE,GAC7C,2BAA2B,CAW7B;AAED,wBAAgB,iCAAiC,CAAC,OAAO,EAAE,wCAAwC,GAAG,IAAI,CAQzG;AAED,mGAAmG;AACnG,wBAAgB,wCAAwC,CACtD,OAAO,EAAE,+CAA+C,GACvD,IAAI,CAQN"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"swift-utils.d.ts","sourceRoot":"","sources":["../../../../src/ios-widget/files/swift-utils.ts"],"names":[],"mappings":"AAAA,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEjE"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { type PrerenderedWidgetStates } from '@use-voltra/expo-plugin';
|
|
2
|
-
import type { IOSWidgetConfig } from '../../types';
|
|
2
|
+
import type { IOSDynamicLiveActivityConfig, IOSWidgetConfig } from '../../types';
|
|
3
3
|
import { type DetectedIOSWidget } from '../clientRendered';
|
|
4
|
+
import { generateDynamicLiveActivitiesSwift, generateDynamicLiveActivityTypesSwift } from '../dynamic-live-activity/swift';
|
|
4
5
|
export interface GenerateSwiftFilesOptions {
|
|
5
6
|
targetPath: string;
|
|
6
7
|
projectRoot: string;
|
|
7
8
|
widgets?: IOSWidgetConfig[];
|
|
9
|
+
liveActivities?: IOSDynamicLiveActivityConfig[];
|
|
8
10
|
}
|
|
9
11
|
/**
|
|
10
12
|
* Generates all Swift files for the widget extension.
|
|
@@ -17,7 +19,7 @@ export declare function generateSwiftFiles(options: GenerateSwiftFilesOptions):
|
|
|
17
19
|
/**
|
|
18
20
|
* Generates the VoltraWidgetBundle.swift file content with configured widgets
|
|
19
21
|
*/
|
|
20
|
-
declare function generateWidgetBundleSwift(widgets: DetectedIOSWidget[]): string;
|
|
22
|
+
declare function generateWidgetBundleSwift(widgets: DetectedIOSWidget[], liveActivities?: IOSDynamicLiveActivityConfig[]): string;
|
|
21
23
|
/**
|
|
22
24
|
* Generates Swift code that bundles pre-rendered widget initial states (per locale when configured).
|
|
23
25
|
*/
|
|
@@ -25,6 +27,8 @@ declare function generateInitialStatesSwift(prerenderedStates: PrerenderedWidget
|
|
|
25
27
|
export declare const __test__: {
|
|
26
28
|
generateInitialStatesSwift: typeof generateInitialStatesSwift;
|
|
27
29
|
generateWidgetBundleSwift: typeof generateWidgetBundleSwift;
|
|
30
|
+
generateDynamicLiveActivityTypesSwift: typeof generateDynamicLiveActivityTypesSwift;
|
|
31
|
+
generateDynamicLiveActivitiesSwift: typeof generateDynamicLiveActivitiesSwift;
|
|
28
32
|
};
|
|
29
33
|
export {};
|
|
30
34
|
//# sourceMappingURL=swift.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"swift.d.ts","sourceRoot":"","sources":["../../../../src/ios-widget/files/swift.ts"],"names":[],"mappings":"AAIA,OAAO,EAKL,KAAK,uBAAuB,EAE7B,MAAM,yBAAyB,CAAA;AAGhC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"swift.d.ts","sourceRoot":"","sources":["../../../../src/ios-widget/files/swift.ts"],"names":[],"mappings":"AAIA,OAAO,EAKL,KAAK,uBAAuB,EAE7B,MAAM,yBAAyB,CAAA;AAGhC,OAAO,KAAK,EAAE,4BAA4B,EAAE,eAAe,EAAE,MAAM,aAAa,CAAA;AAEhF,OAAO,EAA+B,KAAK,iBAAiB,EAAE,MAAM,mBAAmB,CAAA;AAEvF,OAAO,EACL,kCAAkC,EAClC,qCAAqC,EAEtC,MAAM,gCAAgC,CAAA;AAIvC,MAAM,WAAW,yBAAyB;IACxC,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,eAAe,EAAE,CAAA;IAC3B,cAAc,CAAC,EAAE,4BAA4B,EAAE,CAAA;CAChD;AAQD;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CA0D1F;AAuXD;;GAEG;AACH,iBAAS,yBAAyB,CAChC,OAAO,EAAE,iBAAiB,EAAE,EAC5B,cAAc,GAAE,4BAA4B,EAAO,GAClD,MAAM,CAoDR;AAiCD;;GAEG;AACH,iBAAS,0BAA0B,CAAC,iBAAiB,EAAE,uBAAuB,GAAG,MAAM,CA8CtF;AAiDD,eAAO,MAAM,QAAQ;;;;;CAKpB,CAAA"}
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { ConfigPlugin } from '@expo/config-plugins';
|
|
2
|
-
import type { IOSWidgetConfig } from '../types';
|
|
2
|
+
import type { IOSDynamicLiveActivityConfig, IOSWidgetConfig } from '../types';
|
|
3
3
|
export interface WithIOSProps {
|
|
4
4
|
targetName: string;
|
|
5
5
|
bundleIdentifier: string;
|
|
6
6
|
deploymentTarget: string;
|
|
7
7
|
widgets?: IOSWidgetConfig[];
|
|
8
|
+
liveActivities?: IOSDynamicLiveActivityConfig[];
|
|
8
9
|
groupIdentifier?: string;
|
|
9
10
|
keychainGroup?: string;
|
|
10
11
|
fonts?: string[];
|
|
11
12
|
version: string;
|
|
12
13
|
buildNumber: string;
|
|
14
|
+
voltraVersion: string;
|
|
13
15
|
}
|
|
14
16
|
/**
|
|
15
17
|
* Main iOS configuration plugin.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ios-widget/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAe,MAAM,sBAAsB,CAAA;AAEhE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/ios-widget/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAe,MAAM,sBAAsB,CAAA;AAEhE,OAAO,KAAK,EAAE,4BAA4B,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAQ7E,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MAAM,CAAA;IAClB,gBAAgB,EAAE,MAAM,CAAA;IACxB,gBAAgB,EAAE,MAAM,CAAA;IACxB,OAAO,CAAC,EAAE,eAAe,EAAE,CAAA;IAC3B,cAAc,CAAC,EAAE,4BAA4B,EAAE,CAAA;IAC/C,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;CACtB;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,OAAO,EAAE,YAAY,CAAC,YAAY,CA0C9C,CAAA"}
|
|
@@ -1,9 +1,27 @@
|
|
|
1
1
|
import { ConfigPlugin } from '@expo/config-plugins';
|
|
2
|
+
/**
|
|
3
|
+
* Generates the Podfile target content for the widget extension (unwrapped, no markers).
|
|
4
|
+
*/
|
|
5
|
+
declare function getTargetContent(targetName: string): string;
|
|
6
|
+
/**
|
|
7
|
+
* Idempotently inserts/upgrades the Voltra widget target block in Podfile contents:
|
|
8
|
+
* - marked block already present → replaced in place (covers renamed targets too, since the
|
|
9
|
+
* markers are name-agnostic)
|
|
10
|
+
* - legacy (pre-marker) block present → replaced with the new marked block
|
|
11
|
+
* - neither present → appended
|
|
12
|
+
*/
|
|
13
|
+
export declare function upsertWidgetTarget(contents: string, targetName: string): string;
|
|
2
14
|
export interface ConfigurePodfileProps {
|
|
3
15
|
targetName: string;
|
|
4
16
|
}
|
|
5
17
|
/**
|
|
6
|
-
* Plugin step that adds the Podfile target for the widget extension.
|
|
18
|
+
* Plugin step that adds (or upgrades) the Podfile target for the widget extension.
|
|
7
19
|
*/
|
|
8
20
|
export declare const configurePodfile: ConfigPlugin<ConfigurePodfileProps>;
|
|
21
|
+
export declare const __test__: {
|
|
22
|
+
BEGIN_MARKER: string;
|
|
23
|
+
END_MARKER: string;
|
|
24
|
+
getTargetContent: typeof getTargetContent;
|
|
25
|
+
};
|
|
26
|
+
export {};
|
|
9
27
|
//# sourceMappingURL=podfile.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"podfile.d.ts","sourceRoot":"","sources":["../../../src/ios-widget/podfile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAkC,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"podfile.d.ts","sourceRoot":"","sources":["../../../src/ios-widget/podfile.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAkC,MAAM,sBAAsB,CAAA;AAenF;;GAEG;AACH,iBAAS,gBAAgB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAiBpD;AAMD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,CAY/E;AAED,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,eAAO,MAAM,gBAAgB,EAAE,YAAY,CAAC,qBAAqB,CAKhE,CAAA;AAED,eAAO,MAAM,QAAQ;;;;CAAiD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widgetPlist.d.ts","sourceRoot":"","sources":["../../../src/ios-widget/widgetPlist.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA+B,MAAM,sBAAsB,CAAA;
|
|
1
|
+
{"version":3,"file":"widgetPlist.d.ts","sourceRoot":"","sources":["../../../src/ios-widget/widgetPlist.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAA+B,MAAM,sBAAsB,CAAA;AAMhF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAM/C,MAAM,WAAW,0BAA0B;IACzC,UAAU,EAAE,MAAM,CAAA;IAClB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,OAAO,CAAC,EAAE,eAAe,EAAE,CAAA;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED;;;;;;;;;GASG;AACH,eAAO,MAAM,6BAA6B,EAAE,YAAY,CAAC,0BAA0B,CAyH/E,CAAA"}
|