@use-voltra/expo-plugin 1.4.0 → 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 (236) hide show
  1. package/README.md +9 -29
  2. package/build/cjs/constants.js +3 -43
  3. package/build/cjs/constants.js.map +1 -1
  4. package/build/cjs/index.js +23 -69
  5. package/build/cjs/index.js.map +1 -1
  6. package/build/cjs/types.js +4 -0
  7. package/build/cjs/types.js.map +1 -1
  8. package/build/cjs/utils/localePick.js +48 -0
  9. package/build/cjs/utils/localePick.js.map +1 -0
  10. package/build/cjs/utils/prerender.js +15 -9
  11. package/build/cjs/utils/prerender.js.map +1 -1
  12. package/build/cjs/utils/widgetLabel.js +19 -0
  13. package/build/cjs/utils/widgetLabel.js.map +1 -0
  14. package/build/cjs/validation.js +75 -166
  15. package/build/cjs/validation.js.map +1 -1
  16. package/build/esm/constants.js +2 -42
  17. package/build/esm/constants.js.map +1 -1
  18. package/build/esm/index.js +8 -69
  19. package/build/esm/index.js.map +1 -1
  20. package/build/esm/types.js +4 -0
  21. package/build/esm/types.js.map +1 -1
  22. package/build/esm/utils/localePick.js +44 -0
  23. package/build/esm/utils/localePick.js.map +1 -0
  24. package/build/esm/utils/prerender.js +15 -9
  25. package/build/esm/utils/prerender.js.map +1 -1
  26. package/build/esm/utils/widgetLabel.js +15 -0
  27. package/build/esm/utils/widgetLabel.js.map +1 -0
  28. package/build/esm/validation.js +71 -163
  29. package/build/esm/validation.js.map +1 -1
  30. package/build/types/constants.d.ts +2 -26
  31. package/build/types/constants.d.ts.map +1 -1
  32. package/build/types/index.d.ts +10 -12
  33. package/build/types/index.d.ts.map +1 -1
  34. package/build/types/types.d.ts +9 -260
  35. package/build/types/types.d.ts.map +1 -1
  36. package/build/types/utils/localePick.d.ts +7 -0
  37. package/build/types/utils/localePick.d.ts.map +1 -0
  38. package/build/types/utils/prerender.d.ts +6 -3
  39. package/build/types/utils/prerender.d.ts.map +1 -1
  40. package/build/types/utils/widgetLabel.d.ts +8 -0
  41. package/build/types/utils/widgetLabel.d.ts.map +1 -0
  42. package/build/types/validation.d.ts +6 -14
  43. package/build/types/validation.d.ts.map +1 -1
  44. package/package.json +11 -11
  45. package/build/cjs/android/files/assets.js +0 -259
  46. package/build/cjs/android/files/assets.js.map +0 -1
  47. package/build/cjs/android/files/fonts.js +0 -69
  48. package/build/cjs/android/files/fonts.js.map +0 -1
  49. package/build/cjs/android/files/index.js +0 -81
  50. package/build/cjs/android/files/index.js.map +0 -1
  51. package/build/cjs/android/files/initialStates.js +0 -83
  52. package/build/cjs/android/files/initialStates.js.map +0 -1
  53. package/build/cjs/android/files/kotlin.js +0 -142
  54. package/build/cjs/android/files/kotlin.js.map +0 -1
  55. package/build/cjs/android/files/xml.js +0 -247
  56. package/build/cjs/android/files/xml.js.map +0 -1
  57. package/build/cjs/android/index.js +0 -33
  58. package/build/cjs/android/index.js.map +0 -1
  59. package/build/cjs/android/manifest.js +0 -92
  60. package/build/cjs/android/manifest.js.map +0 -1
  61. package/build/cjs/ios/eas.js +0 -28
  62. package/build/cjs/ios/eas.js.map +0 -1
  63. package/build/cjs/ios/entitlements.js +0 -46
  64. package/build/cjs/ios/entitlements.js.map +0 -1
  65. package/build/cjs/ios/index.js +0 -39
  66. package/build/cjs/ios/index.js.map +0 -1
  67. package/build/cjs/ios/infoPlist.js +0 -51
  68. package/build/cjs/ios/infoPlist.js.map +0 -1
  69. package/build/cjs/ios/pushNotifications.js +0 -22
  70. package/build/cjs/ios/pushNotifications.js.map +0 -1
  71. package/build/cjs/ios-widget/eas.js +0 -66
  72. package/build/cjs/ios-widget/eas.js.map +0 -1
  73. package/build/cjs/ios-widget/files/assets.js +0 -199
  74. package/build/cjs/ios-widget/files/assets.js.map +0 -1
  75. package/build/cjs/ios-widget/files/entitlements.js +0 -77
  76. package/build/cjs/ios-widget/files/entitlements.js.map +0 -1
  77. package/build/cjs/ios-widget/files/index.js +0 -92
  78. package/build/cjs/ios-widget/files/index.js.map +0 -1
  79. package/build/cjs/ios-widget/files/infoPlist.js +0 -91
  80. package/build/cjs/ios-widget/files/infoPlist.js.map +0 -1
  81. package/build/cjs/ios-widget/files/swift.js +0 -256
  82. package/build/cjs/ios-widget/files/swift.js.map +0 -1
  83. package/build/cjs/ios-widget/fonts.js +0 -151
  84. package/build/cjs/ios-widget/fonts.js.map +0 -1
  85. package/build/cjs/ios-widget/index.js +0 -46
  86. package/build/cjs/ios-widget/index.js.map +0 -1
  87. package/build/cjs/ios-widget/podfile.js +0 -43
  88. package/build/cjs/ios-widget/podfile.js.map +0 -1
  89. package/build/cjs/ios-widget/widgetPlist.js +0 -99
  90. package/build/cjs/ios-widget/widgetPlist.js.map +0 -1
  91. package/build/cjs/ios-widget/xcode/buildPhases.js +0 -245
  92. package/build/cjs/ios-widget/xcode/buildPhases.js.map +0 -1
  93. package/build/cjs/ios-widget/xcode/configurationList.js +0 -91
  94. package/build/cjs/ios-widget/xcode/configurationList.js.map +0 -1
  95. package/build/cjs/ios-widget/xcode/groups.js +0 -65
  96. package/build/cjs/ios-widget/xcode/groups.js.map +0 -1
  97. package/build/cjs/ios-widget/xcode/index.js +0 -155
  98. package/build/cjs/ios-widget/xcode/index.js.map +0 -1
  99. package/build/cjs/ios-widget/xcode/mainAppSettings.js +0 -71
  100. package/build/cjs/ios-widget/xcode/mainAppSettings.js.map +0 -1
  101. package/build/cjs/ios-widget/xcode/productFile.js +0 -74
  102. package/build/cjs/ios-widget/xcode/productFile.js.map +0 -1
  103. package/build/cjs/ios-widget/xcode/target.js +0 -113
  104. package/build/cjs/ios-widget/xcode/target.js.map +0 -1
  105. package/build/cjs/utils/fileDiscovery.js +0 -107
  106. package/build/cjs/utils/fileDiscovery.js.map +0 -1
  107. package/build/cjs/utils/urlScheme.js +0 -40
  108. package/build/cjs/utils/urlScheme.js.map +0 -1
  109. package/build/esm/android/files/assets.js +0 -223
  110. package/build/esm/android/files/assets.js.map +0 -1
  111. package/build/esm/android/files/fonts.js +0 -33
  112. package/build/esm/android/files/fonts.js.map +0 -1
  113. package/build/esm/android/files/index.js +0 -77
  114. package/build/esm/android/files/index.js.map +0 -1
  115. package/build/esm/android/files/initialStates.js +0 -44
  116. package/build/esm/android/files/initialStates.js.map +0 -1
  117. package/build/esm/android/files/kotlin.js +0 -103
  118. package/build/esm/android/files/kotlin.js.map +0 -1
  119. package/build/esm/android/files/xml.js +0 -206
  120. package/build/esm/android/files/xml.js.map +0 -1
  121. package/build/esm/android/index.js +0 -29
  122. package/build/esm/android/index.js.map +0 -1
  123. package/build/esm/android/manifest.js +0 -88
  124. package/build/esm/android/manifest.js.map +0 -1
  125. package/build/esm/ios/eas.js +0 -24
  126. package/build/esm/ios/eas.js.map +0 -1
  127. package/build/esm/ios/entitlements.js +0 -42
  128. package/build/esm/ios/entitlements.js.map +0 -1
  129. package/build/esm/ios/index.js +0 -34
  130. package/build/esm/ios/index.js.map +0 -1
  131. package/build/esm/ios/infoPlist.js +0 -47
  132. package/build/esm/ios/infoPlist.js.map +0 -1
  133. package/build/esm/ios/pushNotifications.js +0 -18
  134. package/build/esm/ios/pushNotifications.js.map +0 -1
  135. package/build/esm/ios-widget/eas.js +0 -62
  136. package/build/esm/ios-widget/eas.js.map +0 -1
  137. package/build/esm/ios-widget/files/assets.js +0 -163
  138. package/build/esm/ios-widget/files/assets.js.map +0 -1
  139. package/build/esm/ios-widget/files/entitlements.js +0 -37
  140. package/build/esm/ios-widget/files/entitlements.js.map +0 -1
  141. package/build/esm/ios-widget/files/index.js +0 -55
  142. package/build/esm/ios-widget/files/index.js.map +0 -1
  143. package/build/esm/ios-widget/files/infoPlist.js +0 -55
  144. package/build/esm/ios-widget/files/infoPlist.js.map +0 -1
  145. package/build/esm/ios-widget/files/swift.js +0 -217
  146. package/build/esm/ios-widget/files/swift.js.map +0 -1
  147. package/build/esm/ios-widget/fonts.js +0 -111
  148. package/build/esm/ios-widget/fonts.js.map +0 -1
  149. package/build/esm/ios-widget/index.js +0 -42
  150. package/build/esm/ios-widget/index.js.map +0 -1
  151. package/build/esm/ios-widget/podfile.js +0 -39
  152. package/build/esm/ios-widget/podfile.js.map +0 -1
  153. package/build/esm/ios-widget/widgetPlist.js +0 -92
  154. package/build/esm/ios-widget/widgetPlist.js.map +0 -1
  155. package/build/esm/ios-widget/xcode/buildPhases.js +0 -208
  156. package/build/esm/ios-widget/xcode/buildPhases.js.map +0 -1
  157. package/build/esm/ios-widget/xcode/configurationList.js +0 -87
  158. package/build/esm/ios-widget/xcode/configurationList.js.map +0 -1
  159. package/build/esm/ios-widget/xcode/groups.js +0 -61
  160. package/build/esm/ios-widget/xcode/groups.js.map +0 -1
  161. package/build/esm/ios-widget/xcode/index.js +0 -118
  162. package/build/esm/ios-widget/xcode/index.js.map +0 -1
  163. package/build/esm/ios-widget/xcode/mainAppSettings.js +0 -68
  164. package/build/esm/ios-widget/xcode/mainAppSettings.js.map +0 -1
  165. package/build/esm/ios-widget/xcode/productFile.js +0 -70
  166. package/build/esm/ios-widget/xcode/productFile.js.map +0 -1
  167. package/build/esm/ios-widget/xcode/target.js +0 -108
  168. package/build/esm/ios-widget/xcode/target.js.map +0 -1
  169. package/build/esm/utils/fileDiscovery.js +0 -71
  170. package/build/esm/utils/fileDiscovery.js.map +0 -1
  171. package/build/esm/utils/urlScheme.js +0 -37
  172. package/build/esm/utils/urlScheme.js.map +0 -1
  173. package/build/types/android/files/assets.d.ts +0 -26
  174. package/build/types/android/files/assets.d.ts.map +0 -1
  175. package/build/types/android/files/fonts.d.ts +0 -19
  176. package/build/types/android/files/fonts.d.ts.map +0 -1
  177. package/build/types/android/files/index.d.ts +0 -21
  178. package/build/types/android/files/index.d.ts.map +0 -1
  179. package/build/types/android/files/initialStates.d.ts +0 -14
  180. package/build/types/android/files/initialStates.d.ts.map +0 -1
  181. package/build/types/android/files/kotlin.d.ts +0 -11
  182. package/build/types/android/files/kotlin.d.ts.map +0 -1
  183. package/build/types/android/files/xml.d.ts +0 -25
  184. package/build/types/android/files/xml.d.ts.map +0 -1
  185. package/build/types/android/index.d.ts +0 -12
  186. package/build/types/android/index.d.ts.map +0 -1
  187. package/build/types/android/manifest.d.ts +0 -16
  188. package/build/types/android/manifest.d.ts.map +0 -1
  189. package/build/types/ios/eas.d.ts +0 -12
  190. package/build/types/ios/eas.d.ts.map +0 -1
  191. package/build/types/ios/entitlements.d.ts +0 -14
  192. package/build/types/ios/entitlements.d.ts.map +0 -1
  193. package/build/types/ios/index.d.ts +0 -19
  194. package/build/types/ios/index.d.ts.map +0 -1
  195. package/build/types/ios/infoPlist.d.ts +0 -21
  196. package/build/types/ios/infoPlist.d.ts.map +0 -1
  197. package/build/types/ios/pushNotifications.d.ts +0 -10
  198. package/build/types/ios/pushNotifications.d.ts.map +0 -1
  199. package/build/types/ios-widget/eas.d.ts +0 -15
  200. package/build/types/ios-widget/eas.d.ts.map +0 -1
  201. package/build/types/ios-widget/files/assets.d.ts +0 -13
  202. package/build/types/ios-widget/files/assets.d.ts.map +0 -1
  203. package/build/types/ios-widget/files/entitlements.d.ts +0 -17
  204. package/build/types/ios-widget/files/entitlements.d.ts.map +0 -1
  205. package/build/types/ios-widget/files/index.d.ts +0 -24
  206. package/build/types/ios-widget/files/index.d.ts.map +0 -1
  207. package/build/types/ios-widget/files/infoPlist.d.ts +0 -10
  208. package/build/types/ios-widget/files/infoPlist.d.ts.map +0 -1
  209. package/build/types/ios-widget/files/swift.d.ts +0 -15
  210. package/build/types/ios-widget/files/swift.d.ts.map +0 -1
  211. package/build/types/ios-widget/fonts.d.ts +0 -22
  212. package/build/types/ios-widget/fonts.d.ts.map +0 -1
  213. package/build/types/ios-widget/index.d.ts +0 -31
  214. package/build/types/ios-widget/index.d.ts.map +0 -1
  215. package/build/types/ios-widget/podfile.d.ts +0 -9
  216. package/build/types/ios-widget/podfile.d.ts.map +0 -1
  217. package/build/types/ios-widget/widgetPlist.d.ts +0 -20
  218. package/build/types/ios-widget/widgetPlist.d.ts.map +0 -1
  219. package/build/types/ios-widget/xcode/buildPhases.d.ts +0 -25
  220. package/build/types/ios-widget/xcode/buildPhases.d.ts.map +0 -1
  221. package/build/types/ios-widget/xcode/configurationList.d.ts +0 -20
  222. package/build/types/ios-widget/xcode/configurationList.d.ts.map +0 -1
  223. package/build/types/ios-widget/xcode/groups.d.ts +0 -15
  224. package/build/types/ios-widget/xcode/groups.d.ts.map +0 -1
  225. package/build/types/ios-widget/xcode/index.d.ts +0 -20
  226. package/build/types/ios-widget/xcode/index.d.ts.map +0 -1
  227. package/build/types/ios-widget/xcode/mainAppSettings.d.ts +0 -15
  228. package/build/types/ios-widget/xcode/mainAppSettings.d.ts.map +0 -1
  229. package/build/types/ios-widget/xcode/productFile.d.ts +0 -14
  230. package/build/types/ios-widget/xcode/productFile.d.ts.map +0 -1
  231. package/build/types/ios-widget/xcode/target.d.ts +0 -42
  232. package/build/types/ios-widget/xcode/target.d.ts.map +0 -1
  233. package/build/types/utils/fileDiscovery.d.ts +0 -13
  234. package/build/types/utils/fileDiscovery.d.ts.map +0 -1
  235. package/build/types/utils/urlScheme.d.ts +0 -10
  236. package/build/types/utils/urlScheme.d.ts.map +0 -1
@@ -1,70 +0,0 @@
1
- function findProductFileReference(xcodeProject, targetName) {
2
- const fileReferenceSection = xcodeProject.pbxFileReferenceSection();
3
- const targetProductName = `${targetName}.appex`;
4
- for (const key of Object.keys(fileReferenceSection)) {
5
- if (/_comment$/.test(key)) {
6
- continue;
7
- }
8
- const entry = fileReferenceSection[key];
9
- const path = typeof entry?.path === 'string' ? entry.path.replace(/^"|"$/g, '') : '';
10
- const name = typeof entry?.name === 'string' ? entry.name.replace(/^"|"$/g, '') : '';
11
- if (path === targetProductName || name === targetProductName) {
12
- return { fileRef: key };
13
- }
14
- }
15
- return null;
16
- }
17
- function findBuildFileForFileRef(xcodeProject, fileRef) {
18
- const buildFileSection = xcodeProject.pbxBuildFileSection();
19
- for (const key of Object.keys(buildFileSection)) {
20
- if (/_comment$/.test(key)) {
21
- continue;
22
- }
23
- const entry = buildFileSection[key];
24
- if (entry?.fileRef === fileRef) {
25
- return { uuid: key };
26
- }
27
- }
28
- return null;
29
- }
30
- /**
31
- * Adds the product file (.appex) for the widget extension.
32
- */
33
- export function addProductFile(xcodeProject, options) {
34
- const { targetName, groupName } = options;
35
- const productFileOptions = {
36
- basename: `${targetName}.appex`,
37
- group: groupName,
38
- explicitFileType: 'wrapper.app-extension',
39
- settings: {
40
- ATTRIBUTES: ['RemoveHeadersOnCopy'],
41
- },
42
- includeInIndex: 0,
43
- path: `${targetName}.appex`,
44
- sourceTree: 'BUILT_PRODUCTS_DIR',
45
- };
46
- const productFile = xcodeProject.addProductFile(targetName, productFileOptions);
47
- return productFile;
48
- }
49
- /**
50
- * Ensures the product file (.appex) exists and returns it.
51
- */
52
- export function ensureProductFile(xcodeProject, options) {
53
- const { targetName, groupName } = options;
54
- const existingFile = findProductFileReference(xcodeProject, targetName);
55
- if (!existingFile) {
56
- return addProductFile(xcodeProject, options);
57
- }
58
- const buildFile = findBuildFileForFileRef(xcodeProject, existingFile.fileRef);
59
- const productFile = {
60
- uuid: buildFile?.uuid ?? xcodeProject.generateUuid(),
61
- fileRef: existingFile.fileRef,
62
- basename: `${targetName}.appex`,
63
- group: groupName,
64
- };
65
- if (!buildFile) {
66
- xcodeProject.addToPbxBuildFileSection(productFile);
67
- }
68
- return productFile;
69
- }
70
- //# sourceMappingURL=productFile.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"productFile.js","sourceRoot":"","sources":["../../../../src/ios-widget/xcode/productFile.ts"],"names":[],"mappings":"AAOA,SAAS,wBAAwB,CAAC,YAA0B,EAAE,UAAkB;IAC9E,MAAM,oBAAoB,GAAG,YAAY,CAAC,uBAAuB,EAAE,CAAA;IACnE,MAAM,iBAAiB,GAAG,GAAG,UAAU,QAAQ,CAAA;IAE/C,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC,EAAE,CAAC;QACpD,IAAI,WAAW,CAAC,IAAI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O,CAAA;IAEzC,MAAM,kBAAkB,GAAG;QACzB,QAAQ,EAAE,GAAG,UAAU,QAAQ;QAC/B,KAAK,EAAE,SAAS;QAChB,gBAAgB,EAAE,uBAAuB;QACzC,QAAQ,EAAE;YACR,UAAU,EAAE,CAAC,qBAAqB,CAAC;SACpC;QACD,cAAc,EAAE,CAAC;QACjB,IAAI,EAAE,GAAG,UAAU,QAAQ;QAC3B,UAAU,EAAE,oBAAoB;KACjC,CAAA;IAED,MAAM,WAAW,GAAG,YAAY,CAAC,cAAc,CAAC,UAAU,EAAE,kBAAkB,CAAC,CAAA;IAE/E,OAAO,WAAW,CAAA;AACpB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,YAA0B,EAAE,OAA8B;IAC1F,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,OAAO,CAAA;IACzC,MAAM,YAAY,GAAG,wBAAwB,CAAC,YAAY,EAAE,UAAU,CAAC,CAAA;IAEvE,IAAI,CAAC,YAAY,EAAE,CAAC;QAClB,OAAO,cAAc,CAAC,YAAY,EAAE,OAAO,CAAC,CAAA;IAC9C,CAAC;IAED,MAAM,SAAS,GAAG,uBAAuB,CAAC,YAAY,EAAE,YAAY,CAAC,OAAO,CAAC,CAAA;IAC7E,MAAM,WAAW,GAAG;QAClB,IAAI,EAAE,SAAS,EAAE,IAAI,IAAI,YAAY,CAAC,YAAY,EAAE;QACpD,OAAO,EAAE,YAAY,CAAC,OAAO;QAC7B,QAAQ,EAAE,GAAG,UAAU,QAAQ;QAC/B,KAAK,EAAE,SAAS;KACjB,CAAA;IAED,IAAI,CAAC,SAAS,EAAE,CAAC;QACf,YAAY,CAAC,wBAAwB,CAAC,WAAkB,CAAC,CAAA;IAC3D,CAAC;IAED,OAAO,WAAW,CAAA;AACpB,CAAC"}
@@ -1,108 +0,0 @@
1
- import { IOS } from '../../constants';
2
- // ============================================================================
3
- // Main Function
4
- // ============================================================================
5
- /**
6
- * Configures the widget extension target in the Xcode project.
7
- *
8
- * This:
9
- * - Adds the target to PBXNativeTarget section
10
- * - Adds the target to PBXProject section
11
- * - Adds a dependency from the main app to the widget extension
12
- */
13
- export function configureTarget(xcodeProject, options) {
14
- const target = addToPbxNativeTargetSection(xcodeProject, options);
15
- addToPbxProjectSection(xcodeProject, target);
16
- addTargetDependency(xcodeProject, target);
17
- return target;
18
- }
19
- /**
20
- * Ensures target attributes (LastSwiftMigration) exist for the target.
21
- */
22
- export function ensureTargetAttributes(xcodeProject, targetUuid) {
23
- const projectSection = xcodeProject.pbxProjectSection();
24
- const firstProject = xcodeProject.getFirstProject();
25
- if (!projectSection[firstProject.uuid].attributes.TargetAttributes) {
26
- projectSection[firstProject.uuid].attributes.TargetAttributes = {};
27
- }
28
- if (!projectSection[firstProject.uuid].attributes.TargetAttributes[targetUuid]) {
29
- projectSection[firstProject.uuid].attributes.TargetAttributes[targetUuid] = {
30
- LastSwiftMigration: IOS.LAST_SWIFT_MIGRATION,
31
- };
32
- }
33
- }
34
- /**
35
- * Ensures a target dependency exists so the main app depends on the widget extension.
36
- */
37
- export function ensureTargetDependency(xcodeProject, targetUuid) {
38
- if (!xcodeProject.hash.project.objects['PBXTargetDependency']) {
39
- xcodeProject.hash.project.objects['PBXTargetDependency'] = {};
40
- }
41
- if (!xcodeProject.hash.project.objects['PBXContainerItemProxy']) {
42
- xcodeProject.hash.project.objects['PBXContainerItemProxy'] = {};
43
- }
44
- const mainTargetUuid = xcodeProject.getFirstTarget().uuid;
45
- const mainTarget = xcodeProject.pbxNativeTargetSection()[mainTargetUuid];
46
- const existingDeps = mainTarget?.dependencies ?? [];
47
- const targetDependencySection = xcodeProject.hash.project.objects['PBXTargetDependency'] || {};
48
- const alreadyExists = existingDeps.some((dep) => {
49
- const dependency = targetDependencySection[dep.value];
50
- return dependency?.target === targetUuid;
51
- });
52
- if (!alreadyExists) {
53
- xcodeProject.addTargetDependency(mainTargetUuid, [targetUuid]);
54
- }
55
- }
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
- //# sourceMappingURL=target.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"target.js","sourceRoot":"","sources":["../../../../src/ios-widget/xcode/target.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAA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,uBAAuB,CAAC,GAAG,EAAE,CAAA;IACjE,CAAC;IAED,YAAY,CAAC,mBAAmB,CAAC,YAAY,CAAC,cAAc,EAAE,CAAC,IAAI,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAA;AACrF,CAAC"}
@@ -1,71 +0,0 @@
1
- import * as fs from 'fs';
2
- import * as path from 'path';
3
- import { logger } from './logger';
4
- /**
5
- * Scans the widget extension target directory and returns categorized file lists.
6
- *
7
- * This function only reads the directory structure - it does NOT copy or create files.
8
- * File generation should be done before this is called.
9
- *
10
- * @param targetPath - Path to the widget extension target directory
11
- * @param targetName - Name of the target (for entitlements file)
12
- * @returns Categorized lists of files for Xcode project configuration
13
- */
14
- export function getWidgetFiles(targetPath, targetName) {
15
- const widgetFiles = {
16
- swiftFiles: [],
17
- entitlementFiles: [],
18
- plistFiles: [],
19
- assetDirectories: [],
20
- intentFiles: [],
21
- };
22
- if (!fs.existsSync(targetPath)) {
23
- logger.warn(`Widget target directory does not exist: ${targetPath}`);
24
- // Still include required generated files even if directory doesn't exist yet
25
- const initialStatesFile = 'VoltraWidgetInitialStates.swift';
26
- widgetFiles.swiftFiles.push(initialStatesFile);
27
- const targetEntitlements = `${targetName}.entitlements`;
28
- widgetFiles.entitlementFiles.push(targetEntitlements);
29
- return widgetFiles;
30
- }
31
- const files = fs.readdirSync(targetPath);
32
- for (const file of files) {
33
- const itemPath = path.join(targetPath, file);
34
- const isDirectory = fs.lstatSync(itemPath).isDirectory();
35
- // Handle directories (Assets.xcassets)
36
- if (isDirectory) {
37
- if (file === 'Assets.xcassets') {
38
- widgetFiles.assetDirectories.push(file);
39
- }
40
- continue;
41
- }
42
- // Categorize files by extension
43
- const ext = path.extname(file).toLowerCase();
44
- switch (ext) {
45
- case '.swift':
46
- widgetFiles.swiftFiles.push(file);
47
- break;
48
- case '.entitlements':
49
- widgetFiles.entitlementFiles.push(file);
50
- break;
51
- case '.plist':
52
- widgetFiles.plistFiles.push(file);
53
- break;
54
- case '.intentdefinition':
55
- widgetFiles.intentFiles.push(file);
56
- break;
57
- }
58
- }
59
- // Always include the target entitlements file
60
- const targetEntitlements = `${targetName}.entitlements`;
61
- if (!widgetFiles.entitlementFiles.includes(targetEntitlements)) {
62
- widgetFiles.entitlementFiles.push(targetEntitlements);
63
- }
64
- // Always include VoltraWidgetInitialStates.swift (generated by config plugin)
65
- const initialStatesFile = 'VoltraWidgetInitialStates.swift';
66
- if (!widgetFiles.swiftFiles.includes(initialStatesFile)) {
67
- widgetFiles.swiftFiles.push(initialStatesFile);
68
- }
69
- return widgetFiles;
70
- }
71
- //# sourceMappingURL=fileDiscovery.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fileDiscovery.js","sourceRoot":"","sources":["../../../src/utils/fileDiscovery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,IAAI,CAAA;AACxB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAA;AAG5B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC;;;;;;;;;GASG;AACH,MAAM,UAAU,cAAc,CAAC,UAAkB,EAAE,UAAkB;IACnE,MAAM,WAAW,GAAgB;QAC/B,UAAU,EAAE,EAAE;QACd,gBAAgB,EAAE,EAAE;QACpB,UAAU,EAAE,EAAE;QACd,gBAAgB,EAAE,EAAE;QACpB,WAAW,EAAE,EAAE;KAChB,CAAA;IAED,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EAAE,CAAC;QAC/B,MAAM,CAAC,IAAI,CAAC,2CAA2C,UAAU,EAAE,CAAC,CAAA;QACpE,6EAA6E;QAC7E,MAAM,iBAAiB,GAAG,iCAAiC,CAAA;QAC3D,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAA;QAC9C,MAAM,kBAAkB,GAAG,GAAG,UAAU,eAAe,CAAA;QACvD,WAAW,CAAC,gBAAgB,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAA;QAC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C,CAAA;IACvD,CAAC;IAED,8EAA8E;IAC9E,MAAM,iBAAiB,GAAG,iCAAiC,CAAA;IAC3D,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,CAAC;QACxD,WAAW,CAAC,UAAU,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAA;IAChD,CAAC;IAED,OAAO,WAAW,CAAA;AACpB,CAAC"}
@@ -1,37 +0,0 @@
1
- /**
2
- * Ensures the main app has a URL scheme set so widgetURL can open it.
3
- * This is an optional feature for deep linking from widgets.
4
- *
5
- * @param config - The Expo config object
6
- * @returns The modified config with URL scheme ensured
7
- */
8
- export function ensureURLScheme(config) {
9
- const scheme = typeof config.scheme === 'string' ? config.scheme : config.ios?.bundleIdentifier;
10
- if (!scheme) {
11
- return config;
12
- }
13
- const existingInfoPlist = config.ios?.infoPlist || {};
14
- const existingTypes = existingInfoPlist.CFBundleURLTypes || [];
15
- // Check if scheme already exists
16
- const hasScheme = existingTypes.some((t) => Array.isArray(t?.CFBundleURLSchemes) && t.CFBundleURLSchemes.includes(scheme));
17
- if (hasScheme) {
18
- return config;
19
- }
20
- // Add the URL scheme
21
- return {
22
- ...config,
23
- ios: {
24
- ...config.ios,
25
- infoPlist: {
26
- ...existingInfoPlist,
27
- CFBundleURLTypes: [
28
- ...existingTypes,
29
- {
30
- CFBundleURLSchemes: [scheme],
31
- },
32
- ],
33
- },
34
- },
35
- };
36
- }
37
- //# sourceMappingURL=urlScheme.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"urlScheme.js","sourceRoot":"","sources":["../../../src/utils/urlScheme.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,UAAU,eAAe,CAAC,MAAkB;IAChD,MAAM,MAAM,GAAG,OAAQ,MAAc,CAAC,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAE,MAAc,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,EAAE,gBAAgB,CAAA;IAEjH,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,MAAM,CAAA;IACf,CAAC;IAED,MAAM,iBAAiB,GAAG,MAAM,CAAC,GAAG,EAAE,SAAS,IAAI,EAAE,CAAA;IACrD,MAAM,aAAa,GAAI,iBAAiB,CAAC,gBAA0B,IAAI,EAAE,CAAA;IAEzE,iCAAiC;IACjC,MAAM,SAAS,GAAG,aAAa,CAAC,IAAI,CAClC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,EAAE,kBAAkB,CAAC,IAAI,CAAC,CAAC,kBAAkB,CAAC,QAAQ,CAAC,MAAM,CAAC,CACrF,CAAA;IAED,IAAI,SAAS,EAAE,CAAC;QACd,OAAO,MAAM,CAAA;IACf,CAAC;IAED,qBAAqB;IACrB,OAAO;QACL,GAAG,MAAM;QACT,GAAG,EAAE;YACH,GAAG,MAAM,CAAC,GAAG;YACb,SAAS,EAAE;gBACT,GAAG,iBAAiB;gBACpB,gBAAgB,EAAE;oBAChB,GAAG,aAAa;oBAChB;wBACE,kBAAkB,EAAE,CAAC,MAAM,CAAC;qBAC7B;iBACF;aACF;SACF;KACF,CAAA;AACH,CAAC"}
@@ -1,26 +0,0 @@
1
- import type { AndroidWidgetConfig } from '../../types';
2
- export interface GenerateAndroidAssetsOptions {
3
- platformProjectRoot: string;
4
- projectRoot: string;
5
- userImagesPath?: string;
6
- widgets: AndroidWidgetConfig[];
7
- }
8
- /**
9
- * Generates all asset files for Android widgets.
10
- *
11
- * This creates:
12
- * - res/drawable/ directory structure
13
- * - Copies user images to drawable resources as Android-compatible resources
14
- * - Copies widget preview images to drawable resources
15
- * - Validates image sizes for widget compatibility
16
- *
17
- * @returns Map of widgetId to preview image drawable resource name
18
- */
19
- export declare function generateAndroidAssets(options: GenerateAndroidAssetsOptions): Promise<Map<string, string>>;
20
- /**
21
- * Copies preview images to Android drawable resources.
22
- * Returns a map of widgetId to drawable resource name.
23
- */
24
- declare function copyPreviewImagesToAndroid(widgets: AndroidWidgetConfig[], projectRoot: string, drawablePath: string): Promise<Map<string, string>>;
25
- export { copyPreviewImagesToAndroid };
26
- //# sourceMappingURL=assets.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"assets.d.ts","sourceRoot":"","sources":["../../../../src/android/files/assets.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAGtD,MAAM,WAAW,4BAA4B;IAC3C,mBAAmB,EAAE,MAAM,CAAA;IAC3B,WAAW,EAAE,MAAM,CAAA;IACnB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,OAAO,EAAE,mBAAmB,EAAE,CAAA;CAC/B;AAMD;;;;;;;;;;GAUG;AACH,wBAAsB,qBAAqB,CAAC,OAAO,EAAE,4BAA4B,GAAG,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAiD/G;AAgKD;;;GAGG;AACH,iBAAe,0BAA0B,CACvC,OAAO,EAAE,mBAAmB,EAAE,EAC9B,WAAW,EAAE,MAAM,EACnB,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAqC9B;AAED,OAAO,EAAE,0BAA0B,EAAE,CAAA"}
@@ -1,19 +0,0 @@
1
- /**
2
- * Font configuration for Android widgets.
3
- *
4
- * Copies custom font files to the Android assets/fonts/ directory
5
- * so they can be loaded by TextBitmapRenderer via Typeface.createFromAsset().
6
- */
7
- export interface CopyAndroidFontsOptions {
8
- platformProjectRoot: string;
9
- projectRoot: string;
10
- fonts: string[];
11
- }
12
- /**
13
- * Copies custom font files to android/app/src/main/assets/fonts/.
14
- *
15
- * Resolves each path relative to the project root.
16
- * If a path points to a directory, all .ttf/.otf files inside it are copied.
17
- */
18
- export declare function copyAndroidFonts(options: CopyAndroidFontsOptions): Promise<void>;
19
- //# sourceMappingURL=fonts.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fonts.d.ts","sourceRoot":"","sources":["../../../../src/android/files/fonts.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH,MAAM,WAAW,uBAAuB;IACtC,mBAAmB,EAAE,MAAM,CAAA;IAC3B,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,EAAE,CAAA;CAChB;AAED;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAqBtF"}
@@ -1,21 +0,0 @@
1
- import { ConfigPlugin } from '@expo/config-plugins';
2
- import type { AndroidWidgetConfig } from '../../types';
3
- export interface GenerateAndroidWidgetFilesProps {
4
- widgets: AndroidWidgetConfig[];
5
- userImagesPath?: string;
6
- fonts?: string[];
7
- }
8
- /**
9
- * Plugin step that generates all Android widget files.
10
- *
11
- * This creates:
12
- * - Kotlin receiver classes for each widget
13
- * - res/xml/{widget_id}_info.xml (widget provider info)
14
- * - res/layout/voltra_widget_placeholder.xml (placeholder layout)
15
- * - res/values/voltra_widgets.xml (widget descriptions)
16
- * - res/drawable/ images (user images as drawable resources)
17
- *
18
- * This should run before configureAndroidManifest so the files exist when the manifest is configured.
19
- */
20
- export declare const generateAndroidWidgetFiles: ConfigPlugin<GenerateAndroidWidgetFilesProps>;
21
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/android/files/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAoB,MAAM,sBAAsB,CAAA;AAErE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAOtD,MAAM,WAAW,+BAA+B;IAC9C,OAAO,EAAE,mBAAmB,EAAE,CAAA;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAA;CACjB;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,0BAA0B,EAAE,YAAY,CAAC,+BAA+B,CAsEpF,CAAA"}
@@ -1,14 +0,0 @@
1
- import type { AndroidWidgetConfig } from '../../types';
2
- export interface GenerateInitialStatesOptions {
3
- widgets: AndroidWidgetConfig[];
4
- projectRoot: string;
5
- platformProjectRoot: string;
6
- }
7
- /**
8
- * Generates the initial states JSON file for Android widgets.
9
- *
10
- * This file (voltra_initial_states.json) is placed in the Android assets directory
11
- * and contains the pre-rendered payloads for all widgets that have an initialStatePath.
12
- */
13
- export declare function generateAndroidInitialStates(options: GenerateInitialStatesOptions): Promise<void>;
14
- //# sourceMappingURL=initialStates.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"initialStates.d.ts","sourceRoot":"","sources":["../../../../src/android/files/initialStates.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAItD,MAAM,WAAW,4BAA4B;IAC3C,OAAO,EAAE,mBAAmB,EAAE,CAAA;IAC9B,WAAW,EAAE,MAAM,CAAA;IACnB,mBAAmB,EAAE,MAAM,CAAA;CAC5B;AAID;;;;;GAKG;AACH,wBAAsB,4BAA4B,CAAC,OAAO,EAAE,4BAA4B,GAAG,OAAO,CAAC,IAAI,CAAC,CAwCvG"}
@@ -1,11 +0,0 @@
1
- import type { AndroidWidgetConfig } from '../../types';
2
- export interface GenerateKotlinFilesProps {
3
- platformProjectRoot: string;
4
- packageName: string;
5
- widgets: AndroidWidgetConfig[];
6
- }
7
- /**
8
- * Generates Kotlin receiver classes for all configured widgets
9
- */
10
- export declare function generateWidgetReceivers(props: GenerateKotlinFilesProps): Promise<void>;
11
- //# sourceMappingURL=kotlin.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"kotlin.d.ts","sourceRoot":"","sources":["../../../../src/android/files/kotlin.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAEtD,MAAM,WAAW,wBAAwB;IACvC,mBAAmB,EAAE,MAAM,CAAA;IAC3B,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,mBAAmB,EAAE,CAAA;CAC/B;AAMD;;GAEG;AACH,wBAAsB,uBAAuB,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC,IAAI,CAAC,CAoB5F"}
@@ -1,25 +0,0 @@
1
- import type { AndroidWidgetConfig } from '../../types';
2
- export interface GenerateXmlFilesProps {
3
- platformProjectRoot: string;
4
- projectRoot: string;
5
- widgets: AndroidWidgetConfig[];
6
- previewImageMap: Map<string, string>;
7
- }
8
- /**
9
- * Generates widget info XML files for all widgets
10
- */
11
- export declare function generateWidgetInfoFiles(props: {
12
- platformProjectRoot: string;
13
- widgets: AndroidWidgetConfig[];
14
- }): Promise<void>;
15
- /**
16
- * Generates placeholder layout XML
17
- */
18
- export declare function generateWidgetPlaceholderLayouts(props: {
19
- platformProjectRoot: string;
20
- }): Promise<void>;
21
- /**
22
- * Generates preview layouts for widgets
23
- */
24
- export declare function generateWidgetPreviewLayouts(props: GenerateXmlFilesProps): Promise<void>;
25
- //# sourceMappingURL=xml.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"xml.d.ts","sourceRoot":"","sources":["../../../../src/android/files/xml.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAA;AAGtD,MAAM,WAAW,qBAAqB;IACpC,mBAAmB,EAAE,MAAM,CAAA;IAC3B,WAAW,EAAE,MAAM,CAAA;IACnB,OAAO,EAAE,mBAAmB,EAAE,CAAA;IAC9B,eAAe,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACrC;AAMD;;GAEG;AACH,wBAAsB,uBAAuB,CAAC,KAAK,EAAE;IACnD,mBAAmB,EAAE,MAAM,CAAA;IAC3B,OAAO,EAAE,mBAAmB,EAAE,CAAA;CAC/B,GAAG,OAAO,CAAC,IAAI,CAAC,CAiBhB;AAED;;GAEG;AACH,wBAAsB,gCAAgC,CAAC,KAAK,EAAE;IAAE,mBAAmB,EAAE,MAAM,CAAA;CAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAU5G;AAED;;GAEG;AACH,wBAAsB,4BAA4B,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,IAAI,CAAC,CAoB9F"}
@@ -1,12 +0,0 @@
1
- import { ConfigPlugin } from '@expo/config-plugins';
2
- import type { AndroidPluginProps } from '../types';
3
- /**
4
- * Main Android configuration plugin.
5
- *
6
- * This orchestrates all Android-related configuration in the correct order:
7
- * 1. Validate widget configurations with file existence checks
8
- * 2. Generate widget files (Kotlin receivers, XML metadata, resources)
9
- * 3. Configure AndroidManifest (receiver entries)
10
- */
11
- export declare const withAndroid: ConfigPlugin<AndroidPluginProps>;
12
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/android/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAe,MAAM,sBAAsB,CAAA;AAEhE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAA;AAKlD;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,EAAE,YAAY,CAAC,kBAAkB,CAsBxD,CAAA"}
@@ -1,16 +0,0 @@
1
- import { ConfigPlugin } from '@expo/config-plugins';
2
- import type { AndroidWidgetConfig } from '../types';
3
- export interface ConfigureAndroidManifestProps {
4
- enableNotifications?: boolean;
5
- widgets: AndroidWidgetConfig[];
6
- }
7
- /**
8
- * Plugin step that adds widget receiver entries to AndroidManifest.xml
9
- *
10
- * This adds a <receiver> entry for each widget with:
11
- * - The generated receiver class name
12
- * - APPWIDGET_UPDATE intent filter
13
- * - Widget provider metadata reference
14
- */
15
- export declare const configureAndroidManifest: ConfigPlugin<ConfigureAndroidManifestProps>;
16
- //# sourceMappingURL=manifest.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../../src/android/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAuB,MAAM,sBAAsB,CAAA;AAGxE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAEnD,MAAM,WAAW,6BAA6B;IAC5C,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,OAAO,EAAE,mBAAmB,EAAE,CAAA;CAC/B;AAED;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,EAAE,YAAY,CAAC,6BAA6B,CA4FhF,CAAA"}
@@ -1,12 +0,0 @@
1
- import { ConfigPlugin } from '@expo/config-plugins';
2
- export interface ConfigureEasProps {
3
- groupIdentifier?: string;
4
- }
5
- /**
6
- * Configures main app for EAS builds.
7
- *
8
- * This adds the app group entitlement to the main app's entitlements
9
- * so that EAS can properly configure provisioning profiles.
10
- */
11
- export declare const configureEas: ConfigPlugin<ConfigureEasProps>;
12
- //# sourceMappingURL=eas.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"eas.d.ts","sourceRoot":"","sources":["../../../src/ios/eas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAInD,MAAM,WAAW,iBAAiB;IAChC,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,iBAAiB,CAkBxD,CAAA"}
@@ -1,14 +0,0 @@
1
- import { ConfigPlugin } from '@expo/config-plugins';
2
- export interface ConfigureEntitlementsProps {
3
- groupIdentifier?: string;
4
- keychainGroup?: string;
5
- }
6
- /**
7
- * Configures main app entitlements for app groups and keychain sharing.
8
- *
9
- * This adds:
10
- * - com.apple.security.application-groups entitlement for data sharing
11
- * - keychain-access-groups entitlement for shared credential access (if keychainGroup provided)
12
- */
13
- export declare const configureEntitlements: ConfigPlugin<ConfigureEntitlementsProps>;
14
- //# sourceMappingURL=entitlements.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"entitlements.d.ts","sourceRoot":"","sources":["../../../src/ios/entitlements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAInD,MAAM,WAAW,0BAA0B;IACzC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,EAAE,YAAY,CAAC,0BAA0B,CAsB1E,CAAA"}
@@ -1,19 +0,0 @@
1
- import type { ExpoConfig } from 'expo/config';
2
- export interface IOSConfigProps {
3
- groupIdentifier?: string;
4
- widgetIds?: string[];
5
- widgets?: import('../types').WidgetConfig[];
6
- keychainGroup?: string;
7
- }
8
- /**
9
- * Main iOS app configuration.
10
- *
11
- * This configures the main app (not the widget extension) for:
12
- * - Live Activities support (Info.plist)
13
- * - App groups for widget communication (entitlements)
14
- * - Keychain sharing for widget server credentials (entitlements)
15
- * - EAS build configuration
16
- */
17
- export declare function withIOS(config: ExpoConfig, props: IOSConfigProps): ExpoConfig;
18
- export { withPushNotifications } from './pushNotifications';
19
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
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,YAAY,EAAE,CAAA;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,UAAU,EAAE,KAAK,EAAE,cAAc,GAAG,UAAU,CAqB7E;AAGD,OAAO,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA"}
@@ -1,21 +0,0 @@
1
- import { ConfigPlugin } from '@expo/config-plugins';
2
- import type { WidgetConfig } from '../types';
3
- export interface ConfigureInfoPlistProps {
4
- groupIdentifier?: string;
5
- widgetIds?: string[];
6
- widgets?: WidgetConfig[];
7
- keychainGroup?: string;
8
- }
9
- /**
10
- * Configures main app Info.plist for Live Activities and widgets.
11
- *
12
- * This adds:
13
- * - NSSupportsLiveActivities: Enables Live Activities support
14
- * - Voltra_AppGroupIdentifier: App group ID for widget communication (if provided)
15
- * - Voltra_WidgetIds: Array of widget IDs for native module access (if provided)
16
- * - Voltra_WidgetServerUrls: Map of widget IDs to server URLs (if any widgets have serverUpdate)
17
- * - Voltra_WidgetServerIntervals: Map of widget IDs to update intervals (if any widgets have serverUpdate)
18
- * - Voltra_KeychainGroup: Keychain access group for shared credentials (if provided)
19
- */
20
- export declare const configureInfoPlist: ConfigPlugin<ConfigureInfoPlistProps>;
21
- //# sourceMappingURL=infoPlist.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"infoPlist.d.ts","sourceRoot":"","sources":["../../../src/ios/infoPlist.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAiB,MAAM,sBAAsB,CAAA;AAElE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAA;AAE5C,MAAM,WAAW,uBAAuB;IACtC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAA;IACpB,OAAO,CAAC,EAAE,YAAY,EAAE,CAAA;IACxB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,kBAAkB,EAAE,YAAY,CAAC,uBAAuB,CAwCpE,CAAA"}
@@ -1,10 +0,0 @@
1
- import { ConfigPlugin } from '@expo/config-plugins';
2
- /**
3
- * Plugin that enables push notification support for Live Activities.
4
- *
5
- * This:
6
- * - Adds the aps-environment entitlement for push notifications
7
- * - Adds Voltra_EnablePushNotifications flag to Info.plist
8
- */
9
- export declare const withPushNotifications: ConfigPlugin;
10
- //# sourceMappingURL=pushNotifications.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pushNotifications.d.ts","sourceRoot":"","sources":["../../../src/ios/pushNotifications.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAwC,MAAM,sBAAsB,CAAA;AAEzF;;;;;;GAMG;AACH,eAAO,MAAM,qBAAqB,EAAE,YAYjC,CAAA"}
@@ -1,15 +0,0 @@
1
- import { ConfigPlugin } from '@expo/config-plugins';
2
- export interface ConfigureEasBuildProps {
3
- bundleIdentifier: string;
4
- targetName: string;
5
- groupIdentifier?: string;
6
- }
7
- /**
8
- * Plugin step that configures EAS build settings for the widget extension.
9
- *
10
- * This:
11
- * - Adds the widget extension to the EAS build experimental iOS appExtensions
12
- * - Configures entitlements for both the extension and main app
13
- */
14
- export declare const configureEasBuild: ConfigPlugin<ConfigureEasBuildProps>;
15
- //# sourceMappingURL=eas.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"eas.d.ts","sourceRoot":"","sources":["../../../src/ios-widget/eas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAA;AAKnD,MAAM,WAAW,sBAAsB;IACrC,gBAAgB,EAAE,MAAM,CAAA;IACxB,UAAU,EAAE,MAAM,CAAA;IAClB,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,iBAAiB,EAAE,YAAY,CAAC,sBAAsB,CA4DlE,CAAA"}
@@ -1,13 +0,0 @@
1
- export interface GenerateAssetsOptions {
2
- targetPath: string;
3
- userImagesPath?: string;
4
- }
5
- /**
6
- * Generates all asset files for the widget extension.
7
- *
8
- * This creates:
9
- * - Assets.xcassets/ directory structure
10
- * - Copies user images to the asset catalog
11
- */
12
- export declare function generateAssets(options: GenerateAssetsOptions): void;
13
- //# sourceMappingURL=assets.d.ts.map