@use-voltra/ios-client 1.4.1 → 2.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (559) hide show
  1. package/README.md +113 -0
  2. package/Voltra.podspec +28 -0
  3. package/build/commonjs/VoltraModule.js +13 -0
  4. package/build/commonjs/VoltraModule.js.map +1 -0
  5. package/build/commonjs/components/VoltraLiveActivityPreview.js +30 -0
  6. package/build/commonjs/components/VoltraLiveActivityPreview.js.map +1 -0
  7. package/build/commonjs/components/VoltraView.js +50 -0
  8. package/build/commonjs/components/VoltraView.js.map +1 -0
  9. package/build/commonjs/components/VoltraWidgetPreview.js +58 -0
  10. package/build/commonjs/components/VoltraWidgetPreview.js.map +1 -0
  11. package/build/commonjs/events.js +32 -0
  12. package/build/commonjs/events.js.map +1 -0
  13. package/build/commonjs/helpers.js +26 -0
  14. package/build/commonjs/helpers.js.map +1 -0
  15. package/build/commonjs/index.js +226 -0
  16. package/build/commonjs/index.js.map +1 -0
  17. package/build/commonjs/live-activity/api.js +168 -0
  18. package/build/commonjs/live-activity/api.js.map +1 -0
  19. package/build/commonjs/logger.js +39 -0
  20. package/build/commonjs/logger.js.map +1 -0
  21. package/build/commonjs/native/NativeVoltra.js +15 -0
  22. package/build/commonjs/native/NativeVoltra.js.map +1 -0
  23. package/build/commonjs/native/VoltraRNNativeComponent.ts +9 -0
  24. package/build/commonjs/package.json +1 -0
  25. package/build/commonjs/preload.js +54 -0
  26. package/build/commonjs/preload.js.map +1 -0
  27. package/build/commonjs/types.js +2 -0
  28. package/build/commonjs/types.js.map +1 -0
  29. package/build/commonjs/utils/assertRunningOnApple.js +16 -0
  30. package/build/commonjs/utils/assertRunningOnApple.js.map +1 -0
  31. package/build/commonjs/utils/helpers.js +19 -0
  32. package/build/commonjs/utils/helpers.js.map +1 -0
  33. package/build/commonjs/utils/index.js +28 -0
  34. package/build/commonjs/utils/index.js.map +1 -0
  35. package/build/commonjs/utils/useUpdateOnHMR.js +25 -0
  36. package/build/commonjs/utils/useUpdateOnHMR.js.map +1 -0
  37. package/build/commonjs/widgets/server-credentials.js +18 -0
  38. package/build/commonjs/widgets/server-credentials.js.map +1 -0
  39. package/build/commonjs/widgets/widget-api.js +55 -0
  40. package/build/commonjs/widgets/widget-api.js.map +1 -0
  41. package/build/module/VoltraModule.js +4 -0
  42. package/build/module/VoltraModule.js.map +1 -0
  43. package/build/module/components/VoltraLiveActivityPreview.js +25 -0
  44. package/build/module/components/VoltraLiveActivityPreview.js.map +1 -0
  45. package/build/module/components/VoltraView.js +44 -0
  46. package/build/module/components/VoltraView.js.map +1 -0
  47. package/build/module/components/VoltraWidgetPreview.js +53 -0
  48. package/build/module/components/VoltraWidgetPreview.js.map +1 -0
  49. package/build/module/events.js +28 -0
  50. package/build/module/events.js.map +1 -0
  51. package/build/module/helpers.js +21 -0
  52. package/build/module/helpers.js.map +1 -0
  53. package/build/module/index.js +17 -0
  54. package/build/module/index.js.map +1 -0
  55. package/build/module/live-activity/api.js +158 -0
  56. package/build/module/live-activity/api.js.map +1 -0
  57. package/build/module/logger.js +35 -0
  58. package/build/module/logger.js.map +1 -0
  59. package/build/module/native/NativeVoltra.js +11 -0
  60. package/build/module/native/NativeVoltra.js.map +1 -0
  61. package/build/module/native/VoltraRNNativeComponent.ts +9 -0
  62. package/build/module/package.json +1 -0
  63. package/build/module/preload.js +48 -0
  64. package/build/module/preload.js.map +1 -0
  65. package/build/module/types.js +2 -0
  66. package/build/module/types.js.map +1 -0
  67. package/build/module/utils/assertRunningOnApple.js +11 -0
  68. package/build/module/utils/assertRunningOnApple.js.map +1 -0
  69. package/build/module/utils/helpers.js +4 -0
  70. package/build/module/utils/helpers.js.map +1 -0
  71. package/build/module/utils/index.js +5 -0
  72. package/build/module/utils/index.js.map +1 -0
  73. package/build/module/utils/useUpdateOnHMR.js +20 -0
  74. package/build/module/utils/useUpdateOnHMR.js.map +1 -0
  75. package/build/module/widgets/server-credentials.js +13 -0
  76. package/build/module/widgets/server-credentials.js.map +1 -0
  77. package/build/module/widgets/widget-api.js +45 -0
  78. package/build/module/widgets/widget-api.js.map +1 -0
  79. package/build/typescript/commonjs/VoltraModule.d.ts +3 -0
  80. package/build/typescript/commonjs/VoltraModule.d.ts.map +1 -0
  81. package/build/typescript/commonjs/components/VoltraLiveActivityPreview.d.ts.map +1 -0
  82. package/build/typescript/commonjs/components/VoltraView.d.ts.map +1 -0
  83. package/build/typescript/commonjs/components/VoltraWidgetPreview.d.ts.map +1 -0
  84. package/build/typescript/commonjs/events.d.ts.map +1 -0
  85. package/build/typescript/commonjs/helpers.d.ts.map +1 -0
  86. package/build/{types → typescript/commonjs}/index.d.ts +5 -0
  87. package/build/typescript/commonjs/index.d.ts.map +1 -0
  88. package/build/typescript/commonjs/live-activity/api.d.ts.map +1 -0
  89. package/build/typescript/commonjs/logger.d.ts.map +1 -0
  90. package/build/typescript/commonjs/native/NativeVoltra.d.ts +100 -0
  91. package/build/typescript/commonjs/native/NativeVoltra.d.ts.map +1 -0
  92. package/build/typescript/commonjs/native/VoltraRNNativeComponent.d.ts +8 -0
  93. package/build/typescript/commonjs/native/VoltraRNNativeComponent.d.ts.map +1 -0
  94. package/build/typescript/commonjs/package.json +1 -0
  95. package/build/typescript/commonjs/preload.d.ts.map +1 -0
  96. package/build/typescript/commonjs/types.d.ts.map +1 -0
  97. package/build/typescript/commonjs/utils/assertRunningOnApple.d.ts.map +1 -0
  98. package/build/typescript/commonjs/utils/helpers.d.ts.map +1 -0
  99. package/build/typescript/commonjs/utils/index.d.ts.map +1 -0
  100. package/build/typescript/commonjs/utils/useUpdateOnHMR.d.ts.map +1 -0
  101. package/build/typescript/commonjs/widgets/server-credentials.d.ts.map +1 -0
  102. package/build/typescript/commonjs/widgets/widget-api.d.ts.map +1 -0
  103. package/build/typescript/module/VoltraModule.d.ts +3 -0
  104. package/build/typescript/module/VoltraModule.d.ts.map +1 -0
  105. package/build/typescript/module/components/VoltraLiveActivityPreview.d.ts +7 -0
  106. package/build/typescript/module/components/VoltraLiveActivityPreview.d.ts.map +1 -0
  107. package/build/typescript/module/components/VoltraView.d.ts +12 -0
  108. package/build/typescript/module/components/VoltraView.d.ts.map +1 -0
  109. package/build/typescript/module/components/VoltraWidgetPreview.d.ts +9 -0
  110. package/build/typescript/module/components/VoltraWidgetPreview.d.ts.map +1 -0
  111. package/build/typescript/module/events.d.ts +33 -0
  112. package/build/typescript/module/events.d.ts.map +1 -0
  113. package/build/typescript/module/helpers.d.ts +3 -0
  114. package/build/typescript/module/helpers.d.ts.map +1 -0
  115. package/build/typescript/module/index.d.ts +18 -0
  116. package/build/typescript/module/index.d.ts.map +1 -0
  117. package/build/typescript/module/live-activity/api.d.ts +35 -0
  118. package/build/typescript/module/live-activity/api.d.ts.map +1 -0
  119. package/build/typescript/module/logger.d.ts +16 -0
  120. package/build/typescript/module/logger.d.ts.map +1 -0
  121. package/build/typescript/module/native/NativeVoltra.d.ts +100 -0
  122. package/build/typescript/module/native/NativeVoltra.d.ts.map +1 -0
  123. package/build/typescript/module/native/VoltraRNNativeComponent.d.ts +8 -0
  124. package/build/typescript/module/native/VoltraRNNativeComponent.d.ts.map +1 -0
  125. package/build/typescript/module/package.json +1 -0
  126. package/build/typescript/module/preload.d.ts +6 -0
  127. package/build/typescript/module/preload.d.ts.map +1 -0
  128. package/build/typescript/module/types.d.ts +2 -0
  129. package/build/typescript/module/types.d.ts.map +1 -0
  130. package/build/typescript/module/utils/assertRunningOnApple.d.ts +2 -0
  131. package/build/typescript/module/utils/assertRunningOnApple.d.ts.map +1 -0
  132. package/build/{esm/utils/helpers.js → typescript/module/utils/helpers.d.ts} +1 -1
  133. package/build/typescript/module/utils/helpers.d.ts.map +1 -0
  134. package/build/{esm/utils/index.js → typescript/module/utils/index.d.ts} +1 -1
  135. package/build/typescript/module/utils/index.d.ts.map +1 -0
  136. package/build/typescript/module/utils/useUpdateOnHMR.d.ts +5 -0
  137. package/build/typescript/module/utils/useUpdateOnHMR.d.ts.map +1 -0
  138. package/build/typescript/module/widgets/server-credentials.d.ts +5 -0
  139. package/build/typescript/module/widgets/server-credentials.d.ts.map +1 -0
  140. package/build/typescript/module/widgets/widget-api.d.ts +11 -0
  141. package/build/typescript/module/widgets/widget-api.d.ts.map +1 -0
  142. package/expo-plugin/app.plugin.js +3 -0
  143. package/expo-plugin/build/cjs/constants.js +23 -0
  144. package/expo-plugin/build/cjs/constants.js.map +1 -0
  145. package/expo-plugin/build/cjs/index.js +51 -0
  146. package/expo-plugin/build/cjs/index.js.map +1 -0
  147. package/expo-plugin/build/cjs/ios/eas.js +28 -0
  148. package/expo-plugin/build/cjs/ios/eas.js.map +1 -0
  149. package/expo-plugin/build/cjs/ios/entitlements.js +46 -0
  150. package/expo-plugin/build/cjs/ios/entitlements.js.map +1 -0
  151. package/expo-plugin/build/cjs/ios/index.js +39 -0
  152. package/expo-plugin/build/cjs/ios/index.js.map +1 -0
  153. package/expo-plugin/build/cjs/ios/infoPlist.js +51 -0
  154. package/expo-plugin/build/cjs/ios/infoPlist.js.map +1 -0
  155. package/expo-plugin/build/cjs/ios/pushNotifications.js +22 -0
  156. package/expo-plugin/build/cjs/ios/pushNotifications.js.map +1 -0
  157. package/expo-plugin/build/cjs/ios-widget/eas.js +66 -0
  158. package/expo-plugin/build/cjs/ios-widget/eas.js.map +1 -0
  159. package/expo-plugin/build/cjs/ios-widget/files/assets.js +199 -0
  160. package/expo-plugin/build/cjs/ios-widget/files/assets.js.map +1 -0
  161. package/expo-plugin/build/cjs/ios-widget/files/entitlements.js +77 -0
  162. package/expo-plugin/build/cjs/ios-widget/files/entitlements.js.map +1 -0
  163. package/expo-plugin/build/cjs/ios-widget/files/index.js +92 -0
  164. package/expo-plugin/build/cjs/ios-widget/files/index.js.map +1 -0
  165. package/expo-plugin/build/cjs/ios-widget/files/infoPlist.js +91 -0
  166. package/expo-plugin/build/cjs/ios-widget/files/infoPlist.js.map +1 -0
  167. package/expo-plugin/build/cjs/ios-widget/files/swift.js +443 -0
  168. package/expo-plugin/build/cjs/ios-widget/files/swift.js.map +1 -0
  169. package/expo-plugin/build/cjs/ios-widget/fonts.js +151 -0
  170. package/expo-plugin/build/cjs/ios-widget/fonts.js.map +1 -0
  171. package/expo-plugin/build/cjs/ios-widget/index.js +46 -0
  172. package/expo-plugin/build/cjs/ios-widget/index.js.map +1 -0
  173. package/expo-plugin/build/cjs/ios-widget/podfile.js +41 -0
  174. package/expo-plugin/build/cjs/ios-widget/podfile.js.map +1 -0
  175. package/expo-plugin/build/cjs/ios-widget/widgetPlist.js +99 -0
  176. package/expo-plugin/build/cjs/ios-widget/widgetPlist.js.map +1 -0
  177. package/expo-plugin/build/cjs/ios-widget/xcode/buildPhases.js +247 -0
  178. package/expo-plugin/build/cjs/ios-widget/xcode/buildPhases.js.map +1 -0
  179. package/expo-plugin/build/cjs/ios-widget/xcode/configurationList.js +91 -0
  180. package/expo-plugin/build/cjs/ios-widget/xcode/configurationList.js.map +1 -0
  181. package/expo-plugin/build/cjs/ios-widget/xcode/groups.js +79 -0
  182. package/expo-plugin/build/cjs/ios-widget/xcode/groups.js.map +1 -0
  183. package/expo-plugin/build/cjs/ios-widget/xcode/index.js +155 -0
  184. package/expo-plugin/build/cjs/ios-widget/xcode/index.js.map +1 -0
  185. package/expo-plugin/build/cjs/ios-widget/xcode/mainAppSettings.js +71 -0
  186. package/expo-plugin/build/cjs/ios-widget/xcode/mainAppSettings.js.map +1 -0
  187. package/expo-plugin/build/cjs/ios-widget/xcode/productFile.js +74 -0
  188. package/expo-plugin/build/cjs/ios-widget/xcode/productFile.js.map +1 -0
  189. package/expo-plugin/build/cjs/ios-widget/xcode/target.js +113 -0
  190. package/expo-plugin/build/cjs/ios-widget/xcode/target.js.map +1 -0
  191. package/expo-plugin/build/cjs/utils/fileDiscovery.js +120 -0
  192. package/expo-plugin/build/cjs/utils/fileDiscovery.js.map +1 -0
  193. package/expo-plugin/build/cjs/utils/urlScheme.js +40 -0
  194. package/expo-plugin/build/cjs/utils/urlScheme.js.map +1 -0
  195. package/expo-plugin/build/cjs/validation.js +55 -0
  196. package/expo-plugin/build/cjs/validation.js.map +1 -0
  197. package/expo-plugin/build/esm/constants.js +20 -0
  198. package/expo-plugin/build/esm/constants.js.map +1 -0
  199. package/expo-plugin/build/esm/index.js +49 -0
  200. package/expo-plugin/build/esm/index.js.map +1 -0
  201. package/expo-plugin/build/esm/ios/eas.js +24 -0
  202. package/expo-plugin/build/esm/ios/eas.js.map +1 -0
  203. package/expo-plugin/build/esm/ios/entitlements.js +42 -0
  204. package/expo-plugin/build/esm/ios/entitlements.js.map +1 -0
  205. package/expo-plugin/build/esm/ios/index.js +34 -0
  206. package/expo-plugin/build/esm/ios/index.js.map +1 -0
  207. package/expo-plugin/build/esm/ios/infoPlist.js +47 -0
  208. package/expo-plugin/build/esm/ios/infoPlist.js.map +1 -0
  209. package/expo-plugin/build/esm/ios/pushNotifications.js +18 -0
  210. package/expo-plugin/build/esm/ios/pushNotifications.js.map +1 -0
  211. package/expo-plugin/build/esm/ios-widget/eas.js +62 -0
  212. package/expo-plugin/build/esm/ios-widget/eas.js.map +1 -0
  213. package/expo-plugin/build/esm/ios-widget/files/assets.js +163 -0
  214. package/expo-plugin/build/esm/ios-widget/files/assets.js.map +1 -0
  215. package/expo-plugin/build/esm/ios-widget/files/entitlements.js +37 -0
  216. package/expo-plugin/build/esm/ios-widget/files/entitlements.js.map +1 -0
  217. package/expo-plugin/build/esm/ios-widget/files/index.js +55 -0
  218. package/expo-plugin/build/esm/ios-widget/files/index.js.map +1 -0
  219. package/expo-plugin/build/esm/ios-widget/files/infoPlist.js +55 -0
  220. package/expo-plugin/build/esm/ios-widget/files/infoPlist.js.map +1 -0
  221. package/expo-plugin/build/esm/ios-widget/files/swift.js +403 -0
  222. package/expo-plugin/build/esm/ios-widget/files/swift.js.map +1 -0
  223. package/expo-plugin/build/esm/ios-widget/fonts.js +111 -0
  224. package/expo-plugin/build/esm/ios-widget/fonts.js.map +1 -0
  225. package/expo-plugin/build/esm/ios-widget/index.js +42 -0
  226. package/expo-plugin/build/esm/ios-widget/index.js.map +1 -0
  227. package/expo-plugin/build/esm/ios-widget/podfile.js +37 -0
  228. package/expo-plugin/build/esm/ios-widget/podfile.js.map +1 -0
  229. package/expo-plugin/build/esm/ios-widget/widgetPlist.js +92 -0
  230. package/expo-plugin/build/esm/ios-widget/widgetPlist.js.map +1 -0
  231. package/expo-plugin/build/esm/ios-widget/xcode/buildPhases.js +210 -0
  232. package/expo-plugin/build/esm/ios-widget/xcode/buildPhases.js.map +1 -0
  233. package/expo-plugin/build/esm/ios-widget/xcode/configurationList.js +87 -0
  234. package/expo-plugin/build/esm/ios-widget/xcode/configurationList.js.map +1 -0
  235. package/expo-plugin/build/esm/ios-widget/xcode/groups.js +75 -0
  236. package/expo-plugin/build/esm/ios-widget/xcode/groups.js.map +1 -0
  237. package/expo-plugin/build/esm/ios-widget/xcode/index.js +118 -0
  238. package/expo-plugin/build/esm/ios-widget/xcode/index.js.map +1 -0
  239. package/expo-plugin/build/esm/ios-widget/xcode/mainAppSettings.js +68 -0
  240. package/expo-plugin/build/esm/ios-widget/xcode/mainAppSettings.js.map +1 -0
  241. package/expo-plugin/build/esm/ios-widget/xcode/productFile.js +70 -0
  242. package/expo-plugin/build/esm/ios-widget/xcode/productFile.js.map +1 -0
  243. package/expo-plugin/build/esm/ios-widget/xcode/target.js +108 -0
  244. package/expo-plugin/build/esm/ios-widget/xcode/target.js.map +1 -0
  245. package/expo-plugin/build/esm/utils/fileDiscovery.js +83 -0
  246. package/expo-plugin/build/esm/utils/fileDiscovery.js.map +1 -0
  247. package/expo-plugin/build/esm/utils/urlScheme.js +37 -0
  248. package/expo-plugin/build/esm/utils/urlScheme.js.map +1 -0
  249. package/expo-plugin/build/esm/validation.js +51 -0
  250. package/expo-plugin/build/esm/validation.js.map +1 -0
  251. package/expo-plugin/build/types/constants.d.ts +13 -0
  252. package/expo-plugin/build/types/constants.d.ts.map +1 -0
  253. package/expo-plugin/build/types/index.d.ts +10 -0
  254. package/expo-plugin/build/types/index.d.ts.map +1 -0
  255. package/expo-plugin/build/types/ios/eas.d.ts +12 -0
  256. package/expo-plugin/build/types/ios/eas.d.ts.map +1 -0
  257. package/expo-plugin/build/types/ios/entitlements.d.ts +14 -0
  258. package/expo-plugin/build/types/ios/entitlements.d.ts.map +1 -0
  259. package/expo-plugin/build/types/ios/index.d.ts +19 -0
  260. package/expo-plugin/build/types/ios/index.d.ts.map +1 -0
  261. package/expo-plugin/build/types/ios/infoPlist.d.ts +21 -0
  262. package/expo-plugin/build/types/ios/infoPlist.d.ts.map +1 -0
  263. package/expo-plugin/build/types/ios/pushNotifications.d.ts +10 -0
  264. package/expo-plugin/build/types/ios/pushNotifications.d.ts.map +1 -0
  265. package/expo-plugin/build/types/ios-widget/eas.d.ts +15 -0
  266. package/expo-plugin/build/types/ios-widget/eas.d.ts.map +1 -0
  267. package/expo-plugin/build/types/ios-widget/files/assets.d.ts +13 -0
  268. package/expo-plugin/build/types/ios-widget/files/assets.d.ts.map +1 -0
  269. package/expo-plugin/build/types/ios-widget/files/entitlements.d.ts +17 -0
  270. package/expo-plugin/build/types/ios-widget/files/entitlements.d.ts.map +1 -0
  271. package/expo-plugin/build/types/ios-widget/files/index.d.ts +24 -0
  272. package/expo-plugin/build/types/ios-widget/files/index.d.ts.map +1 -0
  273. package/expo-plugin/build/types/ios-widget/files/infoPlist.d.ts +10 -0
  274. package/expo-plugin/build/types/ios-widget/files/infoPlist.d.ts.map +1 -0
  275. package/expo-plugin/build/types/ios-widget/files/swift.d.ts +24 -0
  276. package/expo-plugin/build/types/ios-widget/files/swift.d.ts.map +1 -0
  277. package/expo-plugin/build/types/ios-widget/fonts.d.ts +22 -0
  278. package/expo-plugin/build/types/ios-widget/fonts.d.ts.map +1 -0
  279. package/expo-plugin/build/types/ios-widget/index.d.ts +31 -0
  280. package/expo-plugin/build/types/ios-widget/index.d.ts.map +1 -0
  281. package/expo-plugin/build/types/ios-widget/podfile.d.ts +9 -0
  282. package/expo-plugin/build/types/ios-widget/podfile.d.ts.map +1 -0
  283. package/expo-plugin/build/types/ios-widget/widgetPlist.d.ts +20 -0
  284. package/expo-plugin/build/types/ios-widget/widgetPlist.d.ts.map +1 -0
  285. package/expo-plugin/build/types/ios-widget/xcode/buildPhases.d.ts +25 -0
  286. package/expo-plugin/build/types/ios-widget/xcode/buildPhases.d.ts.map +1 -0
  287. package/expo-plugin/build/types/ios-widget/xcode/configurationList.d.ts +20 -0
  288. package/expo-plugin/build/types/ios-widget/xcode/configurationList.d.ts.map +1 -0
  289. package/expo-plugin/build/types/ios-widget/xcode/groups.d.ts +15 -0
  290. package/expo-plugin/build/types/ios-widget/xcode/groups.d.ts.map +1 -0
  291. package/expo-plugin/build/types/ios-widget/xcode/index.d.ts +20 -0
  292. package/expo-plugin/build/types/ios-widget/xcode/index.d.ts.map +1 -0
  293. package/expo-plugin/build/types/ios-widget/xcode/mainAppSettings.d.ts +15 -0
  294. package/expo-plugin/build/types/ios-widget/xcode/mainAppSettings.d.ts.map +1 -0
  295. package/expo-plugin/build/types/ios-widget/xcode/productFile.d.ts +14 -0
  296. package/expo-plugin/build/types/ios-widget/xcode/productFile.d.ts.map +1 -0
  297. package/expo-plugin/build/types/ios-widget/xcode/target.d.ts +42 -0
  298. package/expo-plugin/build/types/ios-widget/xcode/target.d.ts.map +1 -0
  299. package/expo-plugin/build/types/types.d.ts +74 -0
  300. package/expo-plugin/build/types/types.d.ts.map +1 -0
  301. package/expo-plugin/build/types/utils/fileDiscovery.d.ts +15 -0
  302. package/expo-plugin/build/types/utils/fileDiscovery.d.ts.map +1 -0
  303. package/expo-plugin/build/types/utils/urlScheme.d.ts +10 -0
  304. package/expo-plugin/build/types/utils/urlScheme.d.ts.map +1 -0
  305. package/expo-plugin/build/types/validation.d.ts +4 -0
  306. package/expo-plugin/build/types/validation.d.ts.map +1 -0
  307. package/expo-plugin/jest.config.js +18 -0
  308. package/expo-plugin/src/constants.ts +25 -0
  309. package/expo-plugin/src/index.ts +72 -0
  310. package/expo-plugin/src/ios/eas.ts +33 -0
  311. package/expo-plugin/src/ios/entitlements.ts +59 -0
  312. package/expo-plugin/src/ios/index.ts +47 -0
  313. package/expo-plugin/src/ios/infoPlist.ts +63 -0
  314. package/expo-plugin/src/ios/pushNotifications.ts +22 -0
  315. package/expo-plugin/src/ios-widget/eas.ts +79 -0
  316. package/expo-plugin/src/ios-widget/files/assets.ts +201 -0
  317. package/expo-plugin/src/ios-widget/files/entitlements.ts +48 -0
  318. package/expo-plugin/src/ios-widget/files/index.ts +74 -0
  319. package/expo-plugin/src/ios-widget/files/infoPlist.ts +57 -0
  320. package/expo-plugin/src/ios-widget/files/swift.node.test.ts +22 -0
  321. package/expo-plugin/src/ios-widget/files/swift.ts +476 -0
  322. package/expo-plugin/src/ios-widget/fonts.ts +132 -0
  323. package/expo-plugin/src/ios-widget/index.ts +73 -0
  324. package/expo-plugin/src/ios-widget/podfile.ts +44 -0
  325. package/expo-plugin/src/ios-widget/widgetPlist.ts +115 -0
  326. package/expo-plugin/src/ios-widget/xcode/buildPhases.ts +301 -0
  327. package/expo-plugin/src/ios-widget/xcode/configurationList.ts +127 -0
  328. package/expo-plugin/src/ios-widget/xcode/groups.ts +101 -0
  329. package/expo-plugin/src/ios-widget/xcode/index.ts +149 -0
  330. package/expo-plugin/src/ios-widget/xcode/mainAppSettings.ts +95 -0
  331. package/expo-plugin/src/ios-widget/xcode/productFile.ts +91 -0
  332. package/expo-plugin/src/ios-widget/xcode/target.ts +148 -0
  333. package/expo-plugin/src/types.ts +89 -0
  334. package/expo-plugin/src/utils/fileDiscovery.ts +96 -0
  335. package/expo-plugin/src/utils/urlScheme.ts +45 -0
  336. package/expo-plugin/src/validation.node.test.ts +19 -0
  337. package/expo-plugin/src/validation.ts +63 -0
  338. package/expo-plugin/tsconfig.base.json +17 -0
  339. package/expo-plugin/tsconfig.cjs.json +9 -0
  340. package/expo-plugin/tsconfig.esm.json +9 -0
  341. package/expo-plugin/tsconfig.jest.json +8 -0
  342. package/expo-plugin/tsconfig.typecheck.json +12 -0
  343. package/expo-plugin/tsconfig.types.json +10 -0
  344. package/ios/Package.swift +68 -0
  345. package/ios/Tests/JSGradientParserTests.swift +201 -0
  346. package/ios/Tests/VoltraSharedTests/SmokeTests.swift +8 -0
  347. package/ios/VoltraWidget.podspec +30 -0
  348. package/ios/app/NativeVoltra.h +5 -0
  349. package/ios/app/NativeVoltra.mm +211 -0
  350. package/ios/app/VoltraActivity.swift +5 -0
  351. package/ios/app/VoltraImagePreload.swift +154 -0
  352. package/ios/app/VoltraLiveActivityManager.swift +228 -0
  353. package/ios/app/VoltraLiveActivityService.swift +306 -0
  354. package/ios/app/VoltraModule.swift +215 -0
  355. package/ios/app/VoltraModuleImpl.swift +331 -0
  356. package/ios/app/VoltraOptions.swift +27 -0
  357. package/ios/app/VoltraViewComponentView.h +10 -0
  358. package/ios/app/VoltraViewComponentView.mm +67 -0
  359. package/ios/app/VoltraViewRoot.swift +63 -0
  360. package/ios/app/VoltraWidgetService.swift +154 -0
  361. package/ios/shared/BrotliCompression.swift +81 -0
  362. package/ios/shared/ComponentTypeID.swift +117 -0
  363. package/ios/shared/Data+hexString.swift +8 -0
  364. package/ios/shared/Date+toTimerInterval.swift +25 -0
  365. package/ios/shared/JSONValue.swift +128 -0
  366. package/ios/shared/ShortNames.swift +180 -0
  367. package/ios/shared/VoltraAttributes.swift +58 -0
  368. package/ios/shared/VoltraConfig.swift +18 -0
  369. package/ios/shared/VoltraConstants.swift +45 -0
  370. package/ios/shared/VoltraElement.swift +153 -0
  371. package/ios/shared/VoltraEvent.swift +72 -0
  372. package/ios/shared/VoltraEventBus.swift +80 -0
  373. package/ios/shared/VoltraImageStore.swift +119 -0
  374. package/ios/shared/VoltraInitialStateLocale.swift +54 -0
  375. package/ios/shared/VoltraInteractionIntent.swift +39 -0
  376. package/ios/shared/VoltraKeychainHelper.swift +178 -0
  377. package/ios/shared/VoltraLiveActivityPayload.swift +113 -0
  378. package/ios/shared/VoltraLogger.swift +30 -0
  379. package/ios/shared/VoltraNode.swift +194 -0
  380. package/ios/shared/VoltraPayloadMigrator.swift +63 -0
  381. package/ios/shared/VoltraPersistentEventQueue.swift +67 -0
  382. package/ios/shared/VoltraRefreshIntent.swift +29 -0
  383. package/ios/shared/VoltraRegion.swift +37 -0
  384. package/ios/shared/VoltraWidgetDefaults.swift +114 -0
  385. package/ios/shared/VoltraWidgetServerFetcher.swift +166 -0
  386. package/ios/target/VoltraHomeWidget.swift +508 -0
  387. package/ios/target/VoltraWidget.swift +158 -0
  388. package/ios/ui/Extensions/View.modifiers.swift +28 -0
  389. package/ios/ui/Extensions/VoltraNode+Parameters.swift +18 -0
  390. package/ios/ui/Generated/Parameters/.generated +8 -0
  391. package/ios/ui/Generated/Parameters/ButtonParameters.swift +15 -0
  392. package/ios/ui/Generated/Parameters/ChartParameters.swift +33 -0
  393. package/ios/ui/Generated/Parameters/CircularProgressViewParameters.swift +59 -0
  394. package/ios/ui/Generated/Parameters/ComponentParameters.swift +12 -0
  395. package/ios/ui/Generated/Parameters/DividerParameters.swift +12 -0
  396. package/ios/ui/Generated/Parameters/GaugeParameters.swift +54 -0
  397. package/ios/ui/Generated/Parameters/GlassContainerParameters.swift +15 -0
  398. package/ios/ui/Generated/Parameters/GroupBoxParameters.swift +12 -0
  399. package/ios/ui/Generated/Parameters/HStackParameters.swift +34 -0
  400. package/ios/ui/Generated/Parameters/ImageParameters.swift +29 -0
  401. package/ios/ui/Generated/Parameters/LabelParameters.swift +18 -0
  402. package/ios/ui/Generated/Parameters/LinearGradientParameters.swift +27 -0
  403. package/ios/ui/Generated/Parameters/LinearProgressViewParameters.swift +64 -0
  404. package/ios/ui/Generated/Parameters/LinkParameters.swift +15 -0
  405. package/ios/ui/Generated/Parameters/MaskParameters.swift +12 -0
  406. package/ios/ui/Generated/Parameters/SpacerParameters.swift +15 -0
  407. package/ios/ui/Generated/Parameters/SymbolParameters.swift +59 -0
  408. package/ios/ui/Generated/Parameters/TextParameters.swift +18 -0
  409. package/ios/ui/Generated/Parameters/TimerParameters.swift +54 -0
  410. package/ios/ui/Generated/Parameters/ToggleParameters.swift +24 -0
  411. package/ios/ui/Generated/Parameters/VStackParameters.swift +34 -0
  412. package/ios/ui/Generated/Parameters/ViewParameters.swift +12 -0
  413. package/ios/ui/Generated/Parameters/ZStackParameters.swift +15 -0
  414. package/ios/ui/Helpers/VoltraDeepLinkResolver.swift +43 -0
  415. package/ios/ui/Helpers/VoltraProgressDriver.swift +52 -0
  416. package/ios/ui/Layout/FlexContainerHelper.swift +114 -0
  417. package/ios/ui/Layout/VoltraFlexStackLayout.swift +417 -0
  418. package/ios/ui/Protocols/VoltraView.swift +29 -0
  419. package/ios/ui/Style/BackgroundValue.swift +27 -0
  420. package/ios/ui/Style/CompositeStyle.swift +81 -0
  421. package/ios/ui/Style/DecorationStyle.swift +207 -0
  422. package/ios/ui/Style/FlexEnvironment.swift +35 -0
  423. package/ios/ui/Style/FontVariant.swift +4 -0
  424. package/ios/ui/Style/GlassEffect.swift +6 -0
  425. package/ios/ui/Style/JSColorParser.swift +517 -0
  426. package/ios/ui/Style/JSGradientParser.swift +674 -0
  427. package/ios/ui/Style/JSStyleParser.swift +223 -0
  428. package/ios/ui/Style/LayoutStyle.swift +184 -0
  429. package/ios/ui/Style/Overflow.swift +4 -0
  430. package/ios/ui/Style/RenderingStyle.swift +33 -0
  431. package/ios/ui/Style/StyleConverter.swift +202 -0
  432. package/ios/ui/Style/TextDecoration.swift +6 -0
  433. package/ios/ui/Style/TextStyle.swift +50 -0
  434. package/ios/ui/Style/View+applyStyle.swift +38 -0
  435. package/ios/ui/Views/VoltraButton.swift +57 -0
  436. package/ios/ui/Views/VoltraChart.swift +840 -0
  437. package/ios/ui/Views/VoltraCircularProgressView.swift +103 -0
  438. package/ios/ui/Views/VoltraDivider.swift +16 -0
  439. package/ios/ui/Views/VoltraFlexView.swift +33 -0
  440. package/ios/ui/Views/VoltraGauge.swift +65 -0
  441. package/ios/ui/Views/VoltraGlassContainer.swift +29 -0
  442. package/ios/ui/Views/VoltraGroupBox.swift +26 -0
  443. package/ios/ui/Views/VoltraHStack.swift +70 -0
  444. package/ios/ui/Views/VoltraImage.swift +109 -0
  445. package/ios/ui/Views/VoltraLabel.swift +24 -0
  446. package/ios/ui/Views/VoltraLinearGradient.swift +115 -0
  447. package/ios/ui/Views/VoltraLinearProgressView.swift +118 -0
  448. package/ios/ui/Views/VoltraLink.swift +25 -0
  449. package/ios/ui/Views/VoltraMask.swift +23 -0
  450. package/ios/ui/Views/VoltraSpacer.swift +16 -0
  451. package/ios/ui/Views/VoltraSymbol.swift +160 -0
  452. package/ios/ui/Views/VoltraText.swift +87 -0
  453. package/ios/ui/Views/VoltraTimer.swift +131 -0
  454. package/ios/ui/Views/VoltraToggle.swift +39 -0
  455. package/ios/ui/Views/VoltraVStack.swift +68 -0
  456. package/ios/ui/Views/VoltraZStack.swift +33 -0
  457. package/ios/ui/Voltra.swift +86 -0
  458. package/package.json +91 -18
  459. package/build/cjs/VoltraModule.js +0 -6
  460. package/build/cjs/VoltraModule.js.map +0 -1
  461. package/build/cjs/components/VoltraLiveActivityPreview.js +0 -20
  462. package/build/cjs/components/VoltraLiveActivityPreview.js.map +0 -1
  463. package/build/cjs/components/VoltraView.js +0 -37
  464. package/build/cjs/components/VoltraView.js.map +0 -1
  465. package/build/cjs/components/VoltraWidgetPreview.js +0 -26
  466. package/build/cjs/components/VoltraWidgetPreview.js.map +0 -1
  467. package/build/cjs/events.js +0 -19
  468. package/build/cjs/events.js.map +0 -1
  469. package/build/cjs/helpers.js +0 -30
  470. package/build/cjs/helpers.js.map +0 -1
  471. package/build/cjs/index.js +0 -49
  472. package/build/cjs/index.js.map +0 -1
  473. package/build/cjs/live-activity/api.js +0 -158
  474. package/build/cjs/live-activity/api.js.map +0 -1
  475. package/build/cjs/logger.js +0 -36
  476. package/build/cjs/logger.js.map +0 -1
  477. package/build/cjs/preload.js +0 -54
  478. package/build/cjs/preload.js.map +0 -1
  479. package/build/cjs/utils/assertRunningOnApple.js +0 -13
  480. package/build/cjs/utils/assertRunningOnApple.js.map +0 -1
  481. package/build/cjs/utils/helpers.js +0 -7
  482. package/build/cjs/utils/helpers.js.map +0 -1
  483. package/build/cjs/utils/index.js +0 -19
  484. package/build/cjs/utils/index.js.map +0 -1
  485. package/build/cjs/utils/useUpdateOnHMR.js +0 -22
  486. package/build/cjs/utils/useUpdateOnHMR.js.map +0 -1
  487. package/build/cjs/widgets/server-credentials.js +0 -18
  488. package/build/cjs/widgets/server-credentials.js.map +0 -1
  489. package/build/cjs/widgets/widget-api.js +0 -59
  490. package/build/cjs/widgets/widget-api.js.map +0 -1
  491. package/build/esm/VoltraModule.js +0 -4
  492. package/build/esm/VoltraModule.js.map +0 -1
  493. package/build/esm/components/VoltraLiveActivityPreview.js +0 -17
  494. package/build/esm/components/VoltraLiveActivityPreview.js.map +0 -1
  495. package/build/esm/components/VoltraView.js +0 -34
  496. package/build/esm/components/VoltraView.js.map +0 -1
  497. package/build/esm/components/VoltraWidgetPreview.js +0 -23
  498. package/build/esm/components/VoltraWidgetPreview.js.map +0 -1
  499. package/build/esm/events.js +0 -13
  500. package/build/esm/events.js.map +0 -1
  501. package/build/esm/helpers.js +0 -23
  502. package/build/esm/helpers.js.map +0 -1
  503. package/build/esm/index.js +0 -10
  504. package/build/esm/index.js.map +0 -1
  505. package/build/esm/live-activity/api.js +0 -146
  506. package/build/esm/live-activity/api.js.map +0 -1
  507. package/build/esm/logger.js +0 -33
  508. package/build/esm/logger.js.map +0 -1
  509. package/build/esm/preload.js +0 -46
  510. package/build/esm/preload.js.map +0 -1
  511. package/build/esm/utils/assertRunningOnApple.js +0 -9
  512. package/build/esm/utils/assertRunningOnApple.js.map +0 -1
  513. package/build/esm/utils/helpers.js.map +0 -1
  514. package/build/esm/utils/index.js.map +0 -1
  515. package/build/esm/utils/useUpdateOnHMR.js +0 -18
  516. package/build/esm/utils/useUpdateOnHMR.js.map +0 -1
  517. package/build/esm/widgets/server-credentials.js +0 -11
  518. package/build/esm/widgets/server-credentials.js.map +0 -1
  519. package/build/esm/widgets/widget-api.js +0 -47
  520. package/build/esm/widgets/widget-api.js.map +0 -1
  521. package/build/types/VoltraModule.d.ts +0 -44
  522. package/build/types/VoltraModule.d.ts.map +0 -1
  523. package/build/types/components/VoltraLiveActivityPreview.d.ts.map +0 -1
  524. package/build/types/components/VoltraView.d.ts.map +0 -1
  525. package/build/types/components/VoltraWidgetPreview.d.ts.map +0 -1
  526. package/build/types/events.d.ts.map +0 -1
  527. package/build/types/helpers.d.ts.map +0 -1
  528. package/build/types/index.d.ts.map +0 -1
  529. package/build/types/live-activity/api.d.ts.map +0 -1
  530. package/build/types/logger.d.ts.map +0 -1
  531. package/build/types/preload.d.ts.map +0 -1
  532. package/build/types/types.d.ts.map +0 -1
  533. package/build/types/utils/assertRunningOnApple.d.ts.map +0 -1
  534. package/build/types/utils/helpers.d.ts.map +0 -1
  535. package/build/types/utils/index.d.ts.map +0 -1
  536. package/build/types/utils/useUpdateOnHMR.d.ts.map +0 -1
  537. package/build/types/widgets/server-credentials.d.ts.map +0 -1
  538. package/build/types/widgets/widget-api.d.ts.map +0 -1
  539. /package/build/{types → typescript/commonjs}/components/VoltraLiveActivityPreview.d.ts +0 -0
  540. /package/build/{types → typescript/commonjs}/components/VoltraView.d.ts +0 -0
  541. /package/build/{types → typescript/commonjs}/components/VoltraWidgetPreview.d.ts +0 -0
  542. /package/build/{types → typescript/commonjs}/events.d.ts +0 -0
  543. /package/build/{types → typescript/commonjs}/helpers.d.ts +0 -0
  544. /package/build/{types → typescript/commonjs}/live-activity/api.d.ts +0 -0
  545. /package/build/{types → typescript/commonjs}/logger.d.ts +0 -0
  546. /package/build/{types → typescript/commonjs}/preload.d.ts +0 -0
  547. /package/build/{types → typescript/commonjs}/types.d.ts +0 -0
  548. /package/build/{types → typescript/commonjs}/utils/assertRunningOnApple.d.ts +0 -0
  549. /package/build/{types → typescript/commonjs}/utils/helpers.d.ts +0 -0
  550. /package/build/{types → typescript/commonjs}/utils/index.d.ts +0 -0
  551. /package/build/{types → typescript/commonjs}/utils/useUpdateOnHMR.d.ts +0 -0
  552. /package/build/{types → typescript/commonjs}/widgets/server-credentials.d.ts +0 -0
  553. /package/build/{types → typescript/commonjs}/widgets/widget-api.d.ts +0 -0
  554. /package/{build → expo-plugin/build}/cjs/package.json +0 -0
  555. /package/{build → expo-plugin/build}/cjs/types.js +0 -0
  556. /package/{build → expo-plugin/build}/cjs/types.js.map +0 -0
  557. /package/{build → expo-plugin/build}/esm/package.json +0 -0
  558. /package/{build → expo-plugin/build}/esm/types.js +0 -0
  559. /package/{build → expo-plugin/build}/esm/types.js.map +0 -0
@@ -1 +0,0 @@
1
- {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/logger.ts"],"names":[],"mappings":";;;AAAA,MAAM,MAAM,GAAG;IACb,KAAK,EAAE,CAAC;IACR,IAAI,EAAE,CAAC;IACP,IAAI,EAAE,CAAC;IACP,KAAK,EAAE,CAAC;CACA,CAAA;AAGV,IAAI,YAAY,GAAmB,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAA;AAEhD,QAAA,MAAM,GAAG;IACpB,KAAK,EAAE,CAAC,OAAe,EAAE,EAAE;QACzB,IAAI,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC;YACzC,OAAO,CAAC,GAAG,CAAC,YAAY,OAAO,EAAE,CAAC,CAAA;QACpC,CAAC;IACH,CAAC;IACD,IAAI,EAAE,CAAC,OAAe,EAAE,EAAE;QACxB,IAAI,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC;YACxC,OAAO,CAAC,IAAI,CAAC,YAAY,OAAO,EAAE,CAAC,CAAA;QACrC,CAAC;IACH,CAAC;IACD,IAAI,EAAE,CAAC,OAAe,EAAE,EAAE;QACxB,IAAI,MAAM,CAAC,IAAI,IAAI,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC;YACxC,OAAO,CAAC,IAAI,CAAC,YAAY,OAAO,EAAE,CAAC,CAAA;QACrC,CAAC;IACH,CAAC;IACD,KAAK,EAAE,CAAC,OAAe,EAAE,EAAE;QACzB,IAAI,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC,YAAY,CAAC,EAAE,CAAC;YACzC,OAAO,CAAC,KAAK,CAAC,YAAY,OAAO,EAAE,CAAC,CAAA;QACtC,CAAC;IACH,CAAC;IACD,QAAQ,EAAE,CAAC,KAAqB,EAAE,EAAE;QAClC,YAAY,GAAG,KAAK,CAAA;IACtB,CAAC;CACF,CAAA"}
@@ -1,54 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.preloadImages = preloadImages;
7
- exports.reloadLiveActivities = reloadLiveActivities;
8
- exports.clearPreloadedImages = clearPreloadedImages;
9
- const react_native_1 = require("react-native");
10
- const VoltraModule_js_1 = __importDefault(require("./VoltraModule.js"));
11
- function assertIOS(name) {
12
- const isIOS = react_native_1.Platform.OS === 'ios';
13
- if (!isIOS)
14
- console.error(`${name} is only available on iOS`);
15
- return isIOS;
16
- }
17
- async function preloadImages(images) {
18
- if (!assertIOS('preloadImages')) {
19
- return { succeeded: [], failed: images.map((img) => ({ key: img.key, error: 'Not available on this platform' })) };
20
- }
21
- try {
22
- return await VoltraModule_js_1.default.preloadImages(images);
23
- }
24
- catch (error) {
25
- return {
26
- succeeded: [],
27
- failed: images.map((img) => ({
28
- key: img.key,
29
- error: error instanceof Error ? error.message : 'Unknown error',
30
- })),
31
- };
32
- }
33
- }
34
- async function reloadLiveActivities(activityNames) {
35
- if (!assertIOS('reloadLiveActivities'))
36
- return;
37
- try {
38
- await VoltraModule_js_1.default.reloadLiveActivities(activityNames ?? null);
39
- }
40
- catch (error) {
41
- console.error('Failed to reload Live Activities:', error);
42
- }
43
- }
44
- async function clearPreloadedImages(keys) {
45
- if (!assertIOS('clearPreloadedImages'))
46
- return;
47
- try {
48
- await VoltraModule_js_1.default.clearPreloadedImages(keys ?? null);
49
- }
50
- catch (error) {
51
- console.error('Failed to clear preloaded images:', error);
52
- }
53
- }
54
- //# sourceMappingURL=preload.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"preload.js","sourceRoot":"","sources":["../../src/preload.ts"],"names":[],"mappings":";;;;;AAaA,sCAgBC;AAED,oDAQC;AAED,oDAQC;AAjDD,+CAAuC;AAGvC,wEAA4C;AAI5C,SAAS,SAAS,CAAC,IAAY;IAC7B,MAAM,KAAK,GAAG,uBAAQ,CAAC,EAAE,KAAK,KAAK,CAAA;IACnC,IAAI,CAAC,KAAK;QAAE,OAAO,CAAC,KAAK,CAAC,GAAG,IAAI,2BAA2B,CAAC,CAAA;IAC7D,OAAO,KAAK,CAAA;AACd,CAAC;AAEM,KAAK,UAAU,aAAa,CAAC,MAA6B;IAC/D,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC,EAAE,CAAC;QAChC,OAAO,EAAE,SAAS,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,GAAG,CAAC,GAAG,EAAE,KAAK,EAAE,gCAAgC,EAAE,CAAC,CAAC,EAAE,CAAA;IACpH,CAAC;IAED,IAAI,CAAC;QACH,OAAO,MAAM,yBAAY,CAAC,aAAa,CAAC,MAAM,CAAC,CAAA;IACjD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,SAAS,EAAE,EAAE;YACb,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;gBAC3B,GAAG,EAAE,GAAG,CAAC,GAAG;gBACZ,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe;aAChE,CAAC,CAAC;SACJ,CAAA;IACH,CAAC;AACH,CAAC;AAEM,KAAK,UAAU,oBAAoB,CAAC,aAAwB;IACjE,IAAI,CAAC,SAAS,CAAC,sBAAsB,CAAC;QAAE,OAAM;IAE9C,IAAI,CAAC;QACH,MAAM,yBAAY,CAAC,oBAAoB,CAAC,aAAa,IAAI,IAAI,CAAC,CAAA;IAChE,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,mCAAmC,EAAE,KAAK,CAAC,CAAA;IAC3D,CAAC;AACH,CAAC;AAEM,KAAK,UAAU,oBAAoB,CAAC,IAAe;IACxD,IAAI,CAAC,SAAS,CAAC,sBAAsB,CAAC;QAAE,OAAM;IAE9C,IAAI,CAAC;QACH,MAAM,yBAAY,CAAC,oBAAoB,CAAC,IAAI,IAAI,IAAI,CAAC,CAAA;IACvD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,mCAAmC,EAAE,KAAK,CAAC,CAAA;IAC3D,CAAC;AACH,CAAC"}
@@ -1,13 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.assertRunningOnApple = void 0;
4
- const react_native_1 = require("react-native");
5
- const assertRunningOnApple = () => {
6
- if (react_native_1.Platform.OS !== 'ios') {
7
- console.error(`Voltra is available only on iOS!`);
8
- return false;
9
- }
10
- return true;
11
- };
12
- exports.assertRunningOnApple = assertRunningOnApple;
13
- //# sourceMappingURL=assertRunningOnApple.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"assertRunningOnApple.js","sourceRoot":"","sources":["../../../src/utils/assertRunningOnApple.ts"],"names":[],"mappings":";;;AAAA,+CAAuC;AAEhC,MAAM,oBAAoB,GAAG,GAAY,EAAE;IAChD,IAAI,uBAAQ,CAAC,EAAE,KAAK,KAAK,EAAE,CAAC;QAC1B,OAAO,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAA;QACjD,OAAO,KAAK,CAAA;IACd,CAAC;IAED,OAAO,IAAI,CAAA;AACb,CAAC,CAAA;AAPY,QAAA,oBAAoB,wBAOhC"}
@@ -1,7 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isHeadless = exports.isGlassSupported = void 0;
4
- var helpers_js_1 = require("../helpers.js");
5
- Object.defineProperty(exports, "isGlassSupported", { enumerable: true, get: function () { return helpers_js_1.isGlassSupported; } });
6
- Object.defineProperty(exports, "isHeadless", { enumerable: true, get: function () { return helpers_js_1.isHeadless; } });
7
- //# sourceMappingURL=helpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/utils/helpers.ts"],"names":[],"mappings":";;;AAAA,4CAA4D;AAAnD,8GAAA,gBAAgB,OAAA;AAAE,wGAAA,UAAU,OAAA"}
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./assertRunningOnApple.js"), exports);
18
- __exportStar(require("./useUpdateOnHMR.js"), exports);
19
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/utils/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,4DAAyC;AACzC,sDAAmC"}
@@ -1,22 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useUpdateOnHMR = void 0;
4
- const react_1 = require("react");
5
- const useUpdateOnHMR = () => {
6
- const [, forceUpdate] = (0, react_1.useState)(0);
7
- (0, react_1.useEffect)(() => {
8
- if (!__DEV__) {
9
- return;
10
- }
11
- const oldAccept = global['__accept'];
12
- global['__accept'] = (...args) => {
13
- forceUpdate((prev) => prev + 1);
14
- oldAccept?.(...args);
15
- };
16
- return () => {
17
- global['__accept'] = oldAccept;
18
- };
19
- }, []);
20
- };
21
- exports.useUpdateOnHMR = useUpdateOnHMR;
22
- //# sourceMappingURL=useUpdateOnHMR.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useUpdateOnHMR.js","sourceRoot":"","sources":["../../../src/utils/useUpdateOnHMR.ts"],"names":[],"mappings":";;;AAAA,iCAA2C;AAMpC,MAAM,cAAc,GAAG,GAAG,EAAE;IACjC,MAAM,CAAC,EAAE,WAAW,CAAC,GAAG,IAAA,gBAAQ,EAAC,CAAC,CAAC,CAAA;IAEnC,IAAA,iBAAS,EAAC,GAAG,EAAE;QACb,IAAI,CAAC,OAAO,EAAE,CAAC;YACb,OAAM;QACR,CAAC;QAED,MAAM,SAAS,GAAG,MAAM,CAAC,UAAU,CAAC,CAAA;QACpC,MAAM,CAAC,UAAU,CAAC,GAAG,CAAC,GAAG,IAAI,EAAE,EAAE;YAC/B,WAAW,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC,CAAA;YAC/B,SAAS,EAAE,CAAC,GAAG,IAAI,CAAC,CAAA;QACtB,CAAC,CAAA;QAED,OAAO,GAAG,EAAE;YACV,MAAM,CAAC,UAAU,CAAC,GAAG,SAAS,CAAA;QAChC,CAAC,CAAA;IACH,CAAC,EAAE,EAAE,CAAC,CAAA;AACR,CAAC,CAAA;AAlBY,QAAA,cAAc,kBAkB1B"}
@@ -1,18 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.setWidgetServerCredentials = setWidgetServerCredentials;
7
- exports.clearWidgetServerCredentials = clearWidgetServerCredentials;
8
- const VoltraModule_js_1 = __importDefault(require("../VoltraModule.js"));
9
- async function setWidgetServerCredentials(credentials) {
10
- if (!credentials.token) {
11
- throw new Error('[Voltra][iOS] setWidgetServerCredentials: token is required');
12
- }
13
- return VoltraModule_js_1.default.setWidgetServerCredentials(credentials);
14
- }
15
- async function clearWidgetServerCredentials() {
16
- return VoltraModule_js_1.default.clearWidgetServerCredentials();
17
- }
18
- //# sourceMappingURL=server-credentials.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"server-credentials.js","sourceRoot":"","sources":["../../../src/widgets/server-credentials.ts"],"names":[],"mappings":";;;;;AAKA,gEAMC;AAED,oEAEC;AAdD,yEAA6C;AAItC,KAAK,UAAU,0BAA0B,CAAC,WAAoC;IACnF,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,CAAC;QACvB,MAAM,IAAI,KAAK,CAAC,6DAA6D,CAAC,CAAA;IAChF,CAAC;IAED,OAAO,yBAAY,CAAC,0BAA0B,CAAC,WAAW,CAAC,CAAA;AAC7D,CAAC;AAEM,KAAK,UAAU,4BAA4B;IAChD,OAAO,yBAAY,CAAC,4BAA4B,EAAE,CAAA;AACpD,CAAC"}
@@ -1,59 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getActiveWidgets = exports.scheduleWidget = exports.clearAllWidgets = exports.clearWidget = exports.reloadWidgets = exports.updateWidget = void 0;
7
- const ios_1 = require("@use-voltra/ios");
8
- const assertRunningOnApple_js_1 = require("../utils/assertRunningOnApple.js");
9
- const VoltraModule_js_1 = __importDefault(require("../VoltraModule.js"));
10
- const updateWidget = async (widgetId, variants, options) => {
11
- if (!(0, assertRunningOnApple_js_1.assertRunningOnApple)())
12
- return Promise.resolve();
13
- const payload = (0, ios_1.renderWidgetToString)(variants);
14
- return VoltraModule_js_1.default.updateWidget(widgetId, payload, {
15
- deepLinkUrl: options?.deepLinkUrl,
16
- });
17
- };
18
- exports.updateWidget = updateWidget;
19
- const reloadWidgets = async (widgetIds) => {
20
- if (!(0, assertRunningOnApple_js_1.assertRunningOnApple)())
21
- return Promise.resolve();
22
- return VoltraModule_js_1.default.reloadWidgets(widgetIds ?? null);
23
- };
24
- exports.reloadWidgets = reloadWidgets;
25
- const clearWidget = async (widgetId) => {
26
- if (!(0, assertRunningOnApple_js_1.assertRunningOnApple)())
27
- return Promise.resolve();
28
- return VoltraModule_js_1.default.clearWidget(widgetId);
29
- };
30
- exports.clearWidget = clearWidget;
31
- const clearAllWidgets = async () => {
32
- if (!(0, assertRunningOnApple_js_1.assertRunningOnApple)())
33
- return Promise.resolve();
34
- return VoltraModule_js_1.default.clearAllWidgets();
35
- };
36
- exports.clearAllWidgets = clearAllWidgets;
37
- const scheduleWidget = async (widgetId, entries) => {
38
- if (!(0, assertRunningOnApple_js_1.assertRunningOnApple)())
39
- return Promise.resolve();
40
- const renderedEntries = entries.map((entry) => ({
41
- date: entry.date.getTime(),
42
- json: (0, ios_1.renderWidgetToString)(entry.variants),
43
- deepLinkUrl: entry.deepLinkUrl,
44
- }));
45
- const timelineData = {
46
- entries: renderedEntries,
47
- policy: { type: 'never' },
48
- };
49
- const timelineJson = JSON.stringify(timelineData);
50
- return VoltraModule_js_1.default.scheduleWidget(widgetId, timelineJson);
51
- };
52
- exports.scheduleWidget = scheduleWidget;
53
- const getActiveWidgets = async () => {
54
- if (!(0, assertRunningOnApple_js_1.assertRunningOnApple)())
55
- return [];
56
- return VoltraModule_js_1.default.getActiveWidgets();
57
- };
58
- exports.getActiveWidgets = getActiveWidgets;
59
- //# sourceMappingURL=widget-api.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"widget-api.js","sourceRoot":"","sources":["../../../src/widgets/widget-api.ts"],"names":[],"mappings":";;;;;;AAAA,yCAAuH;AAGvH,8EAAuE;AACvE,yEAA6C;AAKtC,MAAM,YAAY,GAAG,KAAK,EAC/B,QAAgB,EAChB,QAAwB,EACxB,OAA6B,EACd,EAAE;IACjB,IAAI,CAAC,IAAA,8CAAoB,GAAE;QAAE,OAAO,OAAO,CAAC,OAAO,EAAE,CAAA;IAErD,MAAM,OAAO,GAAG,IAAA,0BAAoB,EAAC,QAAQ,CAAC,CAAA;IAE9C,OAAO,yBAAY,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,EAAE;QAClD,WAAW,EAAE,OAAO,EAAE,WAAW;KAClC,CAAC,CAAA;AACJ,CAAC,CAAA;AAZY,QAAA,YAAY,gBAYxB;AAEM,MAAM,aAAa,GAAG,KAAK,EAAE,SAAoB,EAAiB,EAAE;IACzE,IAAI,CAAC,IAAA,8CAAoB,GAAE;QAAE,OAAO,OAAO,CAAC,OAAO,EAAE,CAAA;IAErD,OAAO,yBAAY,CAAC,aAAa,CAAC,SAAS,IAAI,IAAI,CAAC,CAAA;AACtD,CAAC,CAAA;AAJY,QAAA,aAAa,iBAIzB;AAEM,MAAM,WAAW,GAAG,KAAK,EAAE,QAAgB,EAAiB,EAAE;IACnE,IAAI,CAAC,IAAA,8CAAoB,GAAE;QAAE,OAAO,OAAO,CAAC,OAAO,EAAE,CAAA;IAErD,OAAO,yBAAY,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAA;AAC3C,CAAC,CAAA;AAJY,QAAA,WAAW,eAIvB;AAEM,MAAM,eAAe,GAAG,KAAK,IAAmB,EAAE;IACvD,IAAI,CAAC,IAAA,8CAAoB,GAAE;QAAE,OAAO,OAAO,CAAC,OAAO,EAAE,CAAA;IAErD,OAAO,yBAAY,CAAC,eAAe,EAAE,CAAA;AACvC,CAAC,CAAA;AAJY,QAAA,eAAe,mBAI3B;AAEM,MAAM,cAAc,GAAG,KAAK,EAAE,QAAgB,EAAE,OAA+B,EAAiB,EAAE;IACvG,IAAI,CAAC,IAAA,8CAAoB,GAAE;QAAE,OAAO,OAAO,CAAC,OAAO,EAAE,CAAA;IAErD,MAAM,eAAe,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAC9C,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE;QAC1B,IAAI,EAAE,IAAA,0BAAoB,EAAC,KAAK,CAAC,QAAQ,CAAC;QAC1C,WAAW,EAAE,KAAK,CAAC,WAAW;KAC/B,CAAC,CAAC,CAAA;IAEH,MAAM,YAAY,GAAG;QACnB,OAAO,EAAE,eAAe;QACxB,MAAM,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;KAC1B,CAAA;IAED,MAAM,YAAY,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,CAAA;IAEjD,OAAO,yBAAY,CAAC,cAAc,CAAC,QAAQ,EAAE,YAAY,CAAC,CAAA;AAC5D,CAAC,CAAA;AAjBY,QAAA,cAAc,kBAiB1B;AAEM,MAAM,gBAAgB,GAAG,KAAK,IAA2B,EAAE;IAChE,IAAI,CAAC,IAAA,8CAAoB,GAAE;QAAE,OAAO,EAAE,CAAA;IAEtC,OAAO,yBAAY,CAAC,gBAAgB,EAAE,CAAA;AACxC,CAAC,CAAA;AAJY,QAAA,gBAAgB,oBAI5B"}
@@ -1,4 +0,0 @@
1
- import { requireNativeModule } from 'expo';
2
- const VoltraModule = requireNativeModule('VoltraModule');
3
- export default VoltraModule;
4
- //# sourceMappingURL=VoltraModule.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"VoltraModule.js","sourceRoot":"","sources":["../../src/VoltraModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,MAAM,CAAA;AAsD1C,MAAM,YAAY,GAAG,mBAAmB,CAAsB,cAAc,CAAC,CAAA;AAE7E,eAAe,YAAY,CAAA"}
@@ -1,17 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { VoltraView } from './VoltraView.js';
3
- const LOCK_SCREEN_DIMENSIONS = {
4
- width: 364,
5
- height: 160,
6
- };
7
- export function VoltraLiveActivityPreview({ style, children, ...voltraViewProps }) {
8
- const previewStyle = [
9
- {
10
- width: LOCK_SCREEN_DIMENSIONS.width,
11
- height: LOCK_SCREEN_DIMENSIONS.height,
12
- },
13
- style,
14
- ];
15
- return (_jsx(VoltraView, { ...voltraViewProps, style: previewStyle, children: children }));
16
- }
17
- //# sourceMappingURL=VoltraLiveActivityPreview.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"VoltraLiveActivityPreview.js","sourceRoot":"","sources":["../../../src/components/VoltraLiveActivityPreview.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,UAAU,EAAwB,MAAM,iBAAiB,CAAA;AAElE,MAAM,sBAAsB,GAAG;IAC7B,KAAK,EAAE,GAAG;IACV,MAAM,EAAE,GAAG;CACZ,CAAA;AAMD,MAAM,UAAU,yBAAyB,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,eAAe,EAAkC;IAC/G,MAAM,YAAY,GAAyB;QACzC;YACE,KAAK,EAAE,sBAAsB,CAAC,KAAK;YACnC,MAAM,EAAE,sBAAsB,CAAC,MAAM;SACtC;QACD,KAAK;KACN,CAAA;IAED,OAAO,CACL,KAAC,UAAU,OAAK,eAAe,EAAE,KAAK,EAAE,YAAY,YACjD,QAAQ,GACE,CACd,CAAA;AACH,CAAC"}
@@ -1,34 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import { requireNativeView } from 'expo';
3
- import { useEffect, useMemo } from 'react';
4
- import { View } from 'react-native';
5
- import { renderVoltraVariantToJson } from '@use-voltra/ios';
6
- import { addVoltraListener } from '../events.js';
7
- const NativeVoltraView = requireNativeView('VoltraModule');
8
- const generateViewId = () => `voltra-view-${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
9
- const voltraViewStyle = {
10
- flex: 1,
11
- };
12
- export function VoltraView({ id, children, style, onInteraction, testID }) {
13
- const viewId = useMemo(() => id || generateViewId(), [id]);
14
- const json = renderVoltraVariantToJson(children);
15
- const payload = JSON.stringify(json);
16
- useEffect(() => {
17
- if (!onInteraction)
18
- return;
19
- const subscription = addVoltraListener('interaction', (event) => {
20
- if (event.source === viewId) {
21
- onInteraction({
22
- type: 'interaction',
23
- source: event.source,
24
- timestamp: event.timestamp,
25
- identifier: event.identifier,
26
- payload: event.payload,
27
- });
28
- }
29
- });
30
- return () => subscription.remove();
31
- }, [viewId, onInteraction]);
32
- return (_jsx(View, { testID: testID, style: style, children: _jsx(NativeVoltraView, { payload: payload, viewId: viewId, style: voltraViewStyle }) }));
33
- }
34
- //# sourceMappingURL=VoltraView.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"VoltraView.js","sourceRoot":"","sources":["../../../src/components/VoltraView.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,MAAM,CAAA;AACxC,OAAc,EAAkB,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAA;AACjE,OAAO,EAAkB,IAAI,EAAkB,MAAM,cAAc,CAAA;AAEnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAA;AAE3D,OAAO,EAAE,iBAAiB,EAA+B,MAAM,cAAc,CAAA;AAE7E,MAAM,gBAAgB,GAAG,iBAAiB,CAAC,cAAc,CAAC,CAAA;AAE1D,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,eAAe,IAAI,CAAC,GAAG,EAAE,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAA;AAEtG,MAAM,eAA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js';
3
- const WIDGET_DIMENSIONS = {
4
- systemSmall: { width: 170, height: 170 },
5
- systemMedium: { width: 364, height: 170 },
6
- systemLarge: { width: 364, height: 382 },
7
- systemExtraLarge: { width: 364, height: 768 },
8
- accessoryCircular: { width: 76, height: 76 },
9
- accessoryRectangular: { width: 172, height: 76 },
10
- accessoryInline: { width: 172, height: 40 },
11
- };
12
- export function VoltraWidgetPreview({ family, style, children, ...voltraViewProps }) {
13
- const dimensions = WIDGET_DIMENSIONS[family];
14
- const previewStyle = [
15
- {
16
- width: dimensions.width,
17
- height: dimensions.height,
18
- },
19
- style,
20
- ];
21
- return (_jsx(VoltraView, { ...voltraViewProps, style: previewStyle, children: children }));
22
- }
23
- //# sourceMappingURL=VoltraWidgetPreview.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"VoltraWidgetPreview.js","sourceRoot":"","sources":["../../../src/components/VoltraWidgetPreview.tsx"],"names":[],"mappings":";AAKA,OAAO,EAAE,UAAU,EAAwB,MAAM,iBAAiB,CAAA;AAElE,MAAM,iBAAiB,GAA4D;IACjF,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;IACxC,YAAY,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;IACzC,WAAW,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;IACxC,gBAAgB,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE;IAC7C,iBAAiB,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;IAC5C,oBAAoB,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE;IAChD,eAAe,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE;CAC5C,CAAA;AAOD,MAAM,UAAU,mBAAmB,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,eAAe,EAA4B;IAC3G,MAAM,UAAU,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAA;IAC5C,MAAM,YAAY,GAAyB;QACzC;YACE,KAAK,EAAE,UAAU,CAAC,KAAK;YACvB,MAAM,EAAE,UAAU,CAAC,MAAM;SAC1B;QACD,KAAK;KACN,CAAA;IAED,OAAO,CACL,KAAC,UAAU,OAAK,eAAe,EAAE,KAAK,EAAE,YAAY,YACjD,QAAQ,GACE,CACd,CAAA;AACH,CAAC"}
@@ -1,13 +0,0 @@
1
- import { Platform } from 'react-native';
2
- import VoltraModule from './VoltraModule.js';
3
- const noopSubscription = {
4
- remove: () => { },
5
- };
6
- export function addVoltraListener(event, listener) {
7
- if (Platform.OS !== 'ios') {
8
- console.warn(`[Voltra] Event '${event}' is only supported on iOS. Returning no-op subscription.`);
9
- return noopSubscription;
10
- }
11
- return VoltraModule.addListener(event, listener);
12
- }
13
- //# sourceMappingURL=events.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAGvC,OAAO,YAAY,MAAM,mBAAmB,CAAA;AA6B5C,MAAM,gBAAgB,GAAsB;IAC1C,MAAM,EAAE,GAAG,EAAE,GAAE,CAAC;CACjB,CAAA;AASD,MAAM,UAAU,iBAAiB,CAC/B,KAAQ,EACR,QAA4C;IAE5C,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,EAAE,CAAC;QAC1B,OAAO,CAAC,IAAI,CAAC,mBAAmB,KAAK,2DAA2D,CAAC,CAAA;QACjG,OAAO,gBAAgB,CAAA;IACzB,CAAC;IAED,OAAO,YAAY,CAAC,WAAW,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;AAClD,CAAC"}
@@ -1,23 +0,0 @@
1
- import { Platform } from 'react-native';
2
- import VoltraModule from './VoltraModule.js';
3
- export function isGlassSupported() {
4
- if (Platform.OS !== 'ios')
5
- return false;
6
- const v = Platform.Version;
7
- let major = 0;
8
- if (typeof v === 'string') {
9
- const m = parseInt(v.split('.')[0] || '0', 10);
10
- if (!Number.isNaN(m))
11
- major = m;
12
- }
13
- else if (typeof v === 'number') {
14
- major = Math.floor(v);
15
- }
16
- return major >= 26;
17
- }
18
- export function isHeadless() {
19
- if (Platform.OS !== 'ios')
20
- return false;
21
- return VoltraModule.isHeadless?.() ?? false;
22
- }
23
- //# sourceMappingURL=helpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAA;AAEvC,OAAO,YAAY,MAAM,mBAAmB,CAAA;AAE5C,MAAM,UAAU,gBAAgB;IAC9B,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK;QAAE,OAAO,KAAK,CAAA;IACvC,MAAM,CAAC,GAAQ,QAAQ,CAAC,OAAO,CAAA;IAC/B,IAAI,KAAK,GAAG,CAAC,CAAA;IACb,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE,CAAC;QAC1B,MAAM,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,GAAG,EAAE,EAAE,CAAC,CAAA;QAC9C,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YAAE,KAAK,GAAG,CAAC,CAAA;IACjC,CAAC;SAAM,IAAI,OAAO,CAAC,KAAK,QAAQ,EAAE,CAAC;QACjC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;IACvB,CAAC;IACD,OAAO,KAAK,IAAI,EAAE,CAAA;AACpB,CAAC;AAED,MAAM,UAAU,UAAU;IACxB,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK;QAAE,OAAO,KAAK,CAAA;IACvC,OAAO,YAAY,CAAC,UAAU,EAAE,EAAE,IAAI,KAAK,CAAA;AAC7C,CAAC"}
@@ -1,10 +0,0 @@
1
- export { VoltraLiveActivityPreview, } from './components/VoltraLiveActivityPreview.js';
2
- export { VoltraView } from './components/VoltraView.js';
3
- export { VoltraWidgetPreview } from './components/VoltraWidgetPreview.js';
4
- export * from './events.js';
5
- export { isGlassSupported, isHeadless } from './helpers.js';
6
- export { endAllLiveActivities, isLiveActivityActive, startLiveActivity, stopLiveActivity, updateLiveActivity, useLiveActivity, } from './live-activity/api.js';
7
- export { clearPreloadedImages, preloadImages, reloadLiveActivities, } from './preload.js';
8
- export { clearWidgetServerCredentials, setWidgetServerCredentials, } from './widgets/server-credentials.js';
9
- export { clearAllWidgets, clearWidget, getActiveWidgets, reloadWidgets, scheduleWidget, updateWidget, } from './widgets/widget-api.js';
10
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,GAE1B,MAAM,2CAA2C,CAAA;AAClD,OAAO,EAAE,UAAU,EAAwB,MAAM,4BAA4B,CAAA;AAC7E,OAAO,EAAE,mBAAmB,EAAiC,MAAM,qCAAqC,CAAA;AACxG,cAAc,aAAa,CAAA;AAC3B,OAAO,EAAE,gBAAgB,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAC3D,OAAO,EACL,oBAAoB,EAEpB,oBAAoB,EAEpB,iBAAiB,EAEjB,gBAAgB,EAChB,kBAAkB,EAElB,eAAe,GAGhB,MAAM,wBAAwB,CAAA;AAE/B,OAAO,EACL,oBAAoB,EAEpB,aAAa,EAEb,oBAAoB,GACrB,MAAM,cAAc,CAAA;AAErB,OAAO,EACL,4BAA4B,EAC5B,0BAA0B,GAE3B,MAAM,iCAAiC,CAAA;AAExC,OAAO,EACL,eAAe,EACf,WAAW,EACX,gBAAgB,EAChB,aAAa,EAEb,cAAc,EACd,YAAY,GAEb,MAAM,yBAAyB,CAAA"}
@@ -1,146 +0,0 @@
1
- import { useCallback, useEffect, useRef, useState } from 'react';
2
- import { renderLiveActivityToString } from '@use-voltra/ios';
3
- import { addVoltraListener } from '../events.js';
4
- import { logger } from '../logger.js';
5
- import { assertRunningOnApple, useUpdateOnHMR } from '../utils/index.js';
6
- import VoltraModule from '../VoltraModule.js';
7
- const normalizeSharedLiveActivityOptions = (options) => {
8
- if (!options)
9
- return undefined;
10
- const normalizedOptions = {};
11
- if (options.staleDate !== undefined) {
12
- if (options.staleDate < Date.now()) {
13
- logger.warn('Ignoring staleDate because it is in the past, the Live Activity would be dismissed immediately.');
14
- }
15
- else {
16
- normalizedOptions.staleDate = options.staleDate;
17
- }
18
- }
19
- const relevanceScore = options.relevanceScore ?? 0.0;
20
- if (relevanceScore < 0 || relevanceScore > 1) {
21
- logger.warn('Ignoring relevanceScore because it is out of range [0.0, 1.0], using default 0.0');
22
- normalizedOptions.relevanceScore = 0.0;
23
- }
24
- else {
25
- normalizedOptions.relevanceScore = relevanceScore;
26
- }
27
- return Object.keys(normalizedOptions).length > 0 ? normalizedOptions : undefined;
28
- };
29
- const normalizeEndLiveActivityOptions = (options) => {
30
- if (!options?.dismissalPolicy)
31
- return undefined;
32
- if (typeof options.dismissalPolicy === 'string') {
33
- if (options.dismissalPolicy === 'immediate') {
34
- return { dismissalPolicy: { type: 'immediate' } };
35
- }
36
- }
37
- else if (typeof options.dismissalPolicy === 'object' && 'after' in options.dismissalPolicy) {
38
- return { dismissalPolicy: { type: 'after', date: options.dismissalPolicy.after } };
39
- }
40
- return { dismissalPolicy: { type: 'immediate' } };
41
- };
42
- export const useLiveActivity = (variants, options) => {
43
- const [targetId, setTargetId] = useState(() => {
44
- if (options?.activityName) {
45
- return isLiveActivityActive(options.activityName) ? options.activityName : null;
46
- }
47
- return null;
48
- });
49
- const isActive = targetId !== null;
50
- const optionsRef = useRef(options);
51
- const variantsRef = useRef(variants);
52
- const lastUpdateOptionsRef = useRef(undefined);
53
- useEffect(() => {
54
- optionsRef.current = options;
55
- }, [options]);
56
- useEffect(() => {
57
- variantsRef.current = variants;
58
- }, [variants]);
59
- useUpdateOnHMR();
60
- const start = useCallback(async (options) => {
61
- const id = await startLiveActivity(variantsRef.current, { ...optionsRef.current, ...options });
62
- setTargetId(id);
63
- }, []);
64
- const update = useCallback(async (options) => {
65
- if (!targetId) {
66
- return;
67
- }
68
- const updateOptions = { ...optionsRef.current, ...options };
69
- lastUpdateOptionsRef.current = updateOptions;
70
- await updateLiveActivity(targetId, variantsRef.current, updateOptions);
71
- }, [targetId]);
72
- const end = useCallback(async (options) => {
73
- if (!targetId) {
74
- return;
75
- }
76
- await stopLiveActivity(targetId, options);
77
- setTargetId(null);
78
- }, [targetId]);
79
- useEffect(() => {
80
- if (!options?.autoStart) {
81
- return;
82
- }
83
- start();
84
- }, [options?.autoStart, start]);
85
- useEffect(() => {
86
- if (!options?.autoUpdate)
87
- return;
88
- update(lastUpdateOptionsRef.current);
89
- }, [options?.autoUpdate, update, variants]);
90
- useEffect(() => {
91
- if (!targetId)
92
- return;
93
- const subscription = addVoltraListener('stateChange', (event) => {
94
- if (event.activityName !== targetId)
95
- return;
96
- if (event.activityState === 'dismissed' || event.activityState === 'ended') {
97
- setTargetId(null);
98
- }
99
- });
100
- return () => subscription.remove();
101
- }, [targetId]);
102
- return {
103
- start,
104
- update,
105
- end,
106
- isActive,
107
- };
108
- };
109
- export const startLiveActivity = async (variants, options) => {
110
- if (!assertRunningOnApple())
111
- return Promise.resolve('');
112
- const payload = renderLiveActivityToString(variants);
113
- const normalizedSharedOptions = normalizeSharedLiveActivityOptions(options);
114
- const targetId = await VoltraModule.startLiveActivity(payload, {
115
- target: 'liveActivity',
116
- deepLinkUrl: options?.deepLinkUrl,
117
- activityName: options?.activityName,
118
- channelId: options?.channelId,
119
- ...normalizedSharedOptions,
120
- });
121
- return targetId;
122
- };
123
- export const updateLiveActivity = async (targetId, variants, options) => {
124
- if (!assertRunningOnApple())
125
- return Promise.resolve();
126
- const payload = renderLiveActivityToString(variants);
127
- const normalizedSharedOptions = normalizeSharedLiveActivityOptions(options);
128
- return VoltraModule.updateLiveActivity(targetId, payload, normalizedSharedOptions);
129
- };
130
- export const stopLiveActivity = async (targetId, options) => {
131
- if (!assertRunningOnApple())
132
- return Promise.resolve();
133
- const normalizedOptions = normalizeEndLiveActivityOptions(options);
134
- return VoltraModule.endLiveActivity(targetId, normalizedOptions);
135
- };
136
- export const isLiveActivityActive = (activityName) => {
137
- if (!assertRunningOnApple())
138
- return false;
139
- return VoltraModule.isLiveActivityActive(activityName);
140
- };
141
- export async function endAllLiveActivities() {
142
- if (!assertRunningOnApple())
143
- return Promise.resolve();
144
- return VoltraModule.endAllLiveActivities();
145
- }
146
- //# sourceMappingURL=api.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api.js","sourceRoot":"","sources":["../../../src/live-activity/api.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AAEhE,OAAO,EAAE,0BAA0B,EAAmD,MAAM,iBAAiB,CAAA;AAE7G,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAA;AACrC,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AACxE,OAAO,YAAY,MAAM,oBAAoB,CAAA;AAmC7C,MAAM,kCAAkC,GAAG,CACzC,OAAmC,EACI,EAAE;IACzC,IAAI,CAAC,OAAO;QAAE,OAAO,SAAS,CAAA;IAE9B,MAAM,iBAAiB,GAA8B,EAAE,CAAA;IAEvD,IAAI,OAAO,CAAC,SAAS,KAAK,SAAS,EAAE,CAAC;QACpC,IAAI,OAAO,CAAC,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC;YACnC,MAAM,CAAC,IAAI,CAA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AA;AAED,MAAM,CAAC,MAAM,gBAAgB,GAAG,KAAK,EAAE,QAAgB,EAAE,OAAgC,EAAiB,EAAE;IAC1G,IAAI,CAAC,oBAAoB,EAAE;QAAE,OAAO,OAAO,CAAC,OAAO,EAAE,CAAA;IAErD,MAAM,iBAAiB,GAAG,+BAA+B,CAAC,OAAO,CAAC,CAAA;IAClE,OAAO,YAAY,CAAC,eAAe,CAAC,QAAQ,EAAE,iBAAiB,CAAC,CAAA;AAClE,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,YAAoB,EAAW,EAAE;IACpE,IAAI,CAAC,oBAAoB,EAAE;QAAE,OAAO,KAAK,CAAA;IAEzC,OAAO,YAAY,CAAC,oBAAoB,CAAC,YAAY,CAAC,CAAA;AACxD,CAAC,CAAA;AAED,MAAM,CAAC,KAAK,UAAU,oBAAoB;IACxC,IAAI,CAAC,oBAAoB,EAAE;QAAE,OAAO,OAAO,CAAC,OAAO,EAAE,CAAA;IACrD,OAAO,YAAY,CAAC,oBAAoB,EAAE,CAAA;AAC5C,CAAC"}
@@ -1,33 +0,0 @@
1
- const LEVELS = {
2
- debug: 0,
3
- info: 1,
4
- warn: 2,
5
- error: 3,
6
- };
7
- let currentLevel = __DEV__ ? 'debug' : 'info';
8
- export const logger = {
9
- debug: (message) => {
10
- if (LEVELS.debug >= LEVELS[currentLevel]) {
11
- console.log(`[Voltra] ${message}`);
12
- }
13
- },
14
- info: (message) => {
15
- if (LEVELS.info >= LEVELS[currentLevel]) {
16
- console.info(`[Voltra] ${message}`);
17
- }
18
- },
19
- warn: (message) => {
20
- if (LEVELS.warn >= LEVELS[currentLevel]) {
21
- console.warn(`[Voltra] ${message}`);
22
- }
23
- },
24
- error: (message) => {
25
- if (LEVELS.error >= LEVELS[currentLevel]) {
26
- console.error(`[Voltra] ${message}`);
27
- }
28
- },
29
- setLevel: (level) => {
30
- currentLevel = level;
31
- },
32
- };
33
- //# sourceMappingURL=logger.js.map
@@ -1 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