create-disposabl-app 0.10.4 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (461) hide show
  1. package/README.md +3 -1
  2. package/dist/disposabl.js +218 -133
  3. package/dist/index.js +212 -47
  4. package/dist/templates/default/.github/scripts/apple.sh +60 -0
  5. package/dist/templates/default/.github/scripts/mobile.sh +10 -2
  6. package/dist/templates/default/.github/scripts/platforms.sh +32 -13
  7. package/dist/templates/default/.github/scripts/release.sh +2 -1
  8. package/dist/templates/default/.github/workflows/pipeline.yml +105 -44
  9. package/dist/templates/default/apps/desktop/README.md +5 -45
  10. package/dist/templates/default/apps/desktop/package.json +6 -6
  11. package/dist/templates/default/apps/docs/README.md +2 -4
  12. package/dist/templates/default/apps/docs/build.ts +10 -0
  13. package/dist/templates/default/apps/docs/content/backend.mdx +39 -0
  14. package/dist/templates/default/apps/docs/content/desktop.mdx +10 -0
  15. package/dist/templates/default/apps/docs/content/getting-started.mdx +26 -0
  16. package/dist/templates/default/apps/docs/content/index.mdx +27 -5
  17. package/dist/templates/default/apps/docs/content/mobile.mdx +18 -0
  18. package/dist/templates/default/apps/docs/content/web.mdx +14 -0
  19. package/dist/templates/default/apps/docs/dev.ts +40 -0
  20. package/dist/templates/default/apps/docs/package.json +15 -14
  21. package/dist/templates/default/apps/docs/press.config.ts +13 -1
  22. package/dist/templates/default/apps/docs/vite.config.ts +1 -0
  23. package/dist/templates/default/apps/mobile/.agents/skills/agent-device/SKILL.md +3 -1
  24. package/dist/templates/default/apps/mobile/.agents/skills/android-emulator/SKILL.md +2 -0
  25. package/dist/templates/default/apps/mobile/.agents/skills/dogfood/SKILL.md +1 -1
  26. package/dist/templates/default/apps/mobile/.agents/skills/eas-app-stores/SKILL.md +0 -1
  27. package/dist/templates/default/apps/mobile/.agents/skills/eas-hosting/SKILL.md +0 -1
  28. package/dist/templates/default/apps/mobile/.agents/skills/eas-observe/SKILL.md +7 -4
  29. package/dist/templates/default/apps/mobile/.agents/skills/eas-observe/references/library-integrations.md +116 -0
  30. package/dist/templates/default/apps/mobile/.agents/skills/eas-observe/references/queries.md +27 -0
  31. package/dist/templates/default/apps/mobile/.agents/skills/eas-observe/references/setup.md +3 -2
  32. package/dist/templates/default/apps/mobile/.agents/skills/eas-simulator/SKILL.md +0 -1
  33. package/dist/templates/default/apps/mobile/.agents/skills/eas-update/SKILL.md +0 -1
  34. package/dist/templates/default/apps/mobile/.agents/skills/eas-update-insights/SKILL.md +0 -1
  35. package/dist/templates/default/apps/mobile/.agents/skills/eas-workflows/SKILL.md +0 -1
  36. package/dist/templates/default/apps/mobile/.agents/skills/expo-animation/SKILL.md +0 -1
  37. package/dist/templates/default/apps/mobile/.agents/skills/expo-data-fetching/SKILL.md +0 -1
  38. package/dist/templates/default/apps/mobile/.agents/skills/expo-design-system/SKILL.md +0 -1
  39. package/dist/templates/default/apps/mobile/.agents/skills/expo-dev-client/SKILL.md +0 -1
  40. package/dist/templates/default/apps/mobile/.agents/skills/expo-dom/SKILL.md +0 -1
  41. package/dist/templates/default/apps/mobile/.agents/skills/expo-examples/SKILL.md +0 -1
  42. package/dist/templates/default/apps/mobile/.agents/skills/expo-migrate-module/SKILL.md +25 -21
  43. package/dist/templates/default/apps/mobile/.agents/skills/expo-migrate-module/references/compatibility.md +136 -60
  44. package/dist/templates/default/apps/mobile/.agents/skills/expo-migrate-module/references/example.md +17 -16
  45. package/dist/templates/default/apps/mobile/.agents/skills/expo-migrate-module/references/migration-map.md +132 -50
  46. package/dist/templates/default/apps/mobile/.agents/skills/expo-module/SKILL.md +0 -1
  47. package/dist/templates/default/apps/mobile/.agents/skills/expo-native-ui/SKILL.md +0 -1
  48. package/dist/templates/default/apps/mobile/.agents/skills/expo-overview/SKILL.md +0 -1
  49. package/dist/templates/default/apps/mobile/.agents/skills/expo-project-structure/SKILL.md +0 -1
  50. package/dist/templates/default/apps/mobile/.agents/skills/expo-router/SKILL.md +0 -1
  51. package/dist/templates/default/apps/mobile/.agents/skills/expo-skill-eval/SKILL.md +0 -1
  52. package/dist/templates/default/apps/mobile/.agents/skills/expo-ui/SKILL.md +0 -1
  53. package/dist/templates/default/apps/mobile/.agents/skills/expo-upgrade/SKILL.md +0 -1
  54. package/dist/templates/default/apps/mobile/.agents/skills/expo-web-to-native/SKILL.md +0 -1
  55. package/dist/templates/default/apps/mobile/.agents/skills/ios-simulator/SKILL.md +2 -0
  56. package/dist/templates/default/apps/mobile/.claude/skills/agent-device/SKILL.md +24 -0
  57. package/dist/templates/default/apps/mobile/.claude/skills/android-emulator/SKILL.md +34 -0
  58. package/dist/templates/default/apps/mobile/.claude/skills/dogfood/SKILL.md +27 -0
  59. package/dist/templates/default/apps/mobile/.claude/skills/eas-app-stores/SKILL.md +175 -0
  60. package/dist/templates/default/apps/mobile/.claude/skills/eas-app-stores/agents/openai.yaml +4 -0
  61. package/dist/templates/default/apps/mobile/.claude/skills/eas-app-stores/references/app-store-metadata.md +497 -0
  62. package/dist/templates/default/apps/mobile/.claude/skills/eas-app-stores/references/ios-app-store.md +376 -0
  63. package/dist/templates/default/apps/mobile/.claude/skills/eas-app-stores/references/native-ios.md +167 -0
  64. package/dist/templates/default/apps/mobile/.claude/skills/eas-app-stores/references/play-store.md +244 -0
  65. package/dist/templates/default/apps/mobile/.claude/skills/eas-app-stores/references/testflight.md +62 -0
  66. package/dist/templates/default/apps/mobile/.claude/skills/eas-app-stores/references/workflows.md +120 -0
  67. package/dist/templates/default/apps/mobile/.claude/skills/eas-hosting/SKILL.md +430 -0
  68. package/dist/templates/default/apps/mobile/.claude/skills/eas-hosting/agents/openai.yaml +4 -0
  69. package/dist/templates/default/apps/mobile/.claude/skills/eas-observe/SKILL.md +49 -0
  70. package/dist/templates/default/apps/mobile/.claude/skills/eas-observe/agents/openai.yaml +4 -0
  71. package/dist/templates/default/apps/mobile/.claude/skills/eas-observe/references/library-integrations.md +116 -0
  72. package/dist/templates/default/apps/mobile/.claude/skills/eas-observe/references/metrics.md +98 -0
  73. package/dist/templates/default/apps/mobile/.claude/skills/eas-observe/references/queries.md +471 -0
  74. package/dist/templates/default/apps/mobile/.claude/skills/eas-observe/references/setup.md +530 -0
  75. package/dist/templates/default/apps/mobile/.claude/skills/eas-observe/references/third-party.md +136 -0
  76. package/dist/templates/default/apps/mobile/.claude/skills/eas-simulator/SKILL.md +236 -0
  77. package/dist/templates/default/apps/mobile/.claude/skills/eas-simulator/agents/openai.yaml +4 -0
  78. package/dist/templates/default/apps/mobile/.claude/skills/eas-simulator/references/controllers.md +139 -0
  79. package/dist/templates/default/apps/mobile/.claude/skills/eas-simulator/references/logs-and-crashes.md +101 -0
  80. package/dist/templates/default/apps/mobile/.claude/skills/eas-simulator/references/run-your-app.md +256 -0
  81. package/dist/templates/default/apps/mobile/.claude/skills/eas-simulator/references/troubleshooting.md +56 -0
  82. package/dist/templates/default/apps/mobile/.claude/skills/eas-update/SKILL.md +145 -0
  83. package/dist/templates/default/apps/mobile/.claude/skills/eas-update/agents/openai.yaml +4 -0
  84. package/dist/templates/default/apps/mobile/.claude/skills/eas-update-insights/SKILL.md +237 -0
  85. package/dist/templates/default/apps/mobile/.claude/skills/eas-update-insights/agents/openai.yaml +4 -0
  86. package/dist/templates/default/apps/mobile/.claude/skills/eas-update-insights/references/channel-insights-schema.md +47 -0
  87. package/dist/templates/default/apps/mobile/.claude/skills/eas-update-insights/references/update-insights-schema.md +69 -0
  88. package/dist/templates/default/apps/mobile/.claude/skills/eas-workflows/SKILL.md +98 -0
  89. package/dist/templates/default/apps/mobile/.claude/skills/eas-workflows/agents/openai.yaml +4 -0
  90. package/dist/templates/default/apps/mobile/.claude/skills/eas-workflows/scripts/fetch.js +109 -0
  91. package/dist/templates/default/apps/mobile/.claude/skills/eas-workflows/scripts/package.json +6 -0
  92. package/dist/templates/default/apps/mobile/.claude/skills/expo-animation/LICENSE +21 -0
  93. package/dist/templates/default/apps/mobile/.claude/skills/expo-animation/RECIPES.md +385 -0
  94. package/dist/templates/default/apps/mobile/.claude/skills/expo-animation/SKILL.md +273 -0
  95. package/dist/templates/default/apps/mobile/.claude/skills/expo-animation/agents/openai.yaml +4 -0
  96. package/dist/templates/default/apps/mobile/.claude/skills/expo-app-clip/SKILL.md +290 -0
  97. package/dist/templates/default/apps/mobile/.claude/skills/expo-app-clip/agents/openai.yaml +4 -0
  98. package/dist/templates/default/apps/mobile/.claude/skills/expo-app-clip/references/native-module.md +96 -0
  99. package/dist/templates/default/apps/mobile/.claude/skills/expo-brownfield/SKILL.md +69 -0
  100. package/dist/templates/default/apps/mobile/.claude/skills/expo-brownfield/agents/openai.yaml +4 -0
  101. package/dist/templates/default/apps/mobile/.claude/skills/expo-brownfield/references/brownfield-integrated.md +551 -0
  102. package/dist/templates/default/apps/mobile/.claude/skills/expo-brownfield/references/brownfield-isolated.md +449 -0
  103. package/dist/templates/default/apps/mobile/.claude/skills/expo-brownfield/references/comparison.md +63 -0
  104. package/dist/templates/default/apps/mobile/.claude/skills/expo-brownfield/references/feature-integration.md +163 -0
  105. package/dist/templates/default/apps/mobile/.claude/skills/expo-brownfield/references/troubleshooting.md +88 -0
  106. package/dist/templates/default/apps/mobile/.claude/skills/expo-brownfield/references/version-compatibility.md +40 -0
  107. package/dist/templates/default/apps/mobile/.claude/skills/expo-data-fetching/SKILL.md +477 -0
  108. package/dist/templates/default/apps/mobile/.claude/skills/expo-data-fetching/agents/openai.yaml +4 -0
  109. package/dist/templates/default/apps/mobile/.claude/skills/expo-data-fetching/references/expo-router-loaders.md +341 -0
  110. package/dist/templates/default/apps/mobile/.claude/skills/expo-data-fetching/references/offline-and-cancellation.md +68 -0
  111. package/dist/templates/default/apps/mobile/.claude/skills/expo-design-system/SKILL.md +375 -0
  112. package/dist/templates/default/apps/mobile/.claude/skills/expo-design-system/agents/openai.yaml +4 -0
  113. package/dist/templates/default/apps/mobile/.claude/skills/expo-design-system/references/audit.md +190 -0
  114. package/dist/templates/default/apps/mobile/.claude/skills/expo-design-system/references/native-slop.md +74 -0
  115. package/dist/templates/default/apps/mobile/.claude/skills/expo-dev-client/SKILL.md +183 -0
  116. package/dist/templates/default/apps/mobile/.claude/skills/expo-dev-client/agents/openai.yaml +4 -0
  117. package/dist/templates/default/apps/mobile/.claude/skills/expo-dom/SKILL.md +424 -0
  118. package/dist/templates/default/apps/mobile/.claude/skills/expo-dom/agents/openai.yaml +4 -0
  119. package/dist/templates/default/apps/mobile/.claude/skills/expo-examples/SKILL.md +105 -0
  120. package/dist/templates/default/apps/mobile/.claude/skills/expo-examples/agents/openai.yaml +4 -0
  121. package/dist/templates/default/apps/mobile/.claude/skills/expo-examples/references/catalog.md +105 -0
  122. package/dist/templates/default/apps/mobile/.claude/skills/expo-migrate-module/SKILL.md +128 -0
  123. package/dist/templates/default/apps/mobile/.claude/skills/expo-migrate-module/agents/openai.yaml +4 -0
  124. package/dist/templates/default/apps/mobile/.claude/skills/expo-migrate-module/references/compatibility.md +206 -0
  125. package/dist/templates/default/apps/mobile/.claude/skills/expo-migrate-module/references/example.md +213 -0
  126. package/dist/templates/default/apps/mobile/.claude/skills/expo-migrate-module/references/migration-map.md +539 -0
  127. package/dist/templates/default/apps/mobile/.claude/skills/expo-module/SKILL.md +150 -0
  128. package/dist/templates/default/apps/mobile/.claude/skills/expo-module/agents/openai.yaml +4 -0
  129. package/dist/templates/default/apps/mobile/.claude/skills/expo-module/references/config-plugin.md +90 -0
  130. package/dist/templates/default/apps/mobile/.claude/skills/expo-module/references/create-expo-module.md +206 -0
  131. package/dist/templates/default/apps/mobile/.claude/skills/expo-module/references/lifecycle.md +127 -0
  132. package/dist/templates/default/apps/mobile/.claude/skills/expo-module/references/module-config.md +48 -0
  133. package/dist/templates/default/apps/mobile/.claude/skills/expo-module/references/native-module.md +286 -0
  134. package/dist/templates/default/apps/mobile/.claude/skills/expo-module/references/native-view.md +171 -0
  135. package/dist/templates/default/apps/mobile/.claude/skills/expo-native-ui/SKILL.md +200 -0
  136. package/dist/templates/default/apps/mobile/.claude/skills/expo-native-ui/agents/openai.yaml +4 -0
  137. package/dist/templates/default/apps/mobile/.claude/skills/expo-native-ui/references/controls.md +231 -0
  138. package/dist/templates/default/apps/mobile/.claude/skills/expo-native-ui/references/gradients.md +106 -0
  139. package/dist/templates/default/apps/mobile/.claude/skills/expo-native-ui/references/icons.md +232 -0
  140. package/dist/templates/default/apps/mobile/.claude/skills/expo-native-ui/references/media.md +193 -0
  141. package/dist/templates/default/apps/mobile/.claude/skills/expo-native-ui/references/storage.md +121 -0
  142. package/dist/templates/default/apps/mobile/.claude/skills/expo-native-ui/references/visual-effects.md +198 -0
  143. package/dist/templates/default/apps/mobile/.claude/skills/expo-native-ui/references/webgpu-three.md +605 -0
  144. package/dist/templates/default/apps/mobile/.claude/skills/expo-overview/SKILL.md +119 -0
  145. package/dist/templates/default/apps/mobile/.claude/skills/expo-overview/agents/openai.yaml +4 -0
  146. package/dist/templates/default/apps/mobile/.claude/skills/expo-overview/references/launch-without-dev-menu.md +24 -0
  147. package/dist/templates/default/apps/mobile/.claude/skills/expo-project-structure/SKILL.md +113 -0
  148. package/dist/templates/default/apps/mobile/.claude/skills/expo-project-structure/agents/openai.yaml +4 -0
  149. package/dist/templates/default/apps/mobile/.claude/skills/expo-router/SKILL.md +239 -0
  150. package/dist/templates/default/apps/mobile/.claude/skills/expo-router/agents/openai.yaml +4 -0
  151. package/dist/templates/default/apps/mobile/.claude/skills/expo-router/references/form-sheet.md +253 -0
  152. package/dist/templates/default/apps/mobile/.claude/skills/expo-router/references/route-structure.md +229 -0
  153. package/dist/templates/default/apps/mobile/.claude/skills/expo-router/references/search.md +248 -0
  154. package/dist/templates/default/apps/mobile/.claude/skills/expo-router/references/tabs.md +433 -0
  155. package/dist/templates/default/apps/mobile/.claude/skills/expo-router/references/toolbar-and-headers.md +284 -0
  156. package/dist/templates/default/apps/mobile/.claude/skills/expo-router/references/zoom-transitions.md +158 -0
  157. package/dist/templates/default/apps/mobile/.claude/skills/expo-skill-eval/SKILL.md +313 -0
  158. package/dist/templates/default/apps/mobile/.claude/skills/expo-skill-eval/agents/visual-grader.md +52 -0
  159. package/dist/templates/default/apps/mobile/.claude/skills/expo-skill-eval/references/design-rubric.md +45 -0
  160. package/dist/templates/default/apps/mobile/.claude/skills/expo-skill-eval/references/runtime-matrix.md +34 -0
  161. package/dist/templates/default/apps/mobile/.claude/skills/expo-skill-eval/scripts/check-static.sh +64 -0
  162. package/dist/templates/default/apps/mobile/.claude/skills/expo-skill-eval/scripts/clean-fixture.sh +56 -0
  163. package/dist/templates/default/apps/mobile/.claude/skills/expo-skill-eval/scripts/generate_viewer.py +450 -0
  164. package/dist/templates/default/apps/mobile/.claude/skills/expo-skill-eval/scripts/latest-sdk.sh +46 -0
  165. package/dist/templates/default/apps/mobile/.claude/skills/expo-skill-eval/scripts/make-fixture.sh +95 -0
  166. package/dist/templates/default/apps/mobile/.claude/skills/expo-skill-eval/scripts/make-workspace.sh +31 -0
  167. package/dist/templates/default/apps/mobile/.claude/skills/expo-skill-eval/scripts/snapshot-android.sh +284 -0
  168. package/dist/templates/default/apps/mobile/.claude/skills/expo-skill-eval/scripts/snapshot-ios.sh +132 -0
  169. package/dist/templates/default/apps/mobile/.claude/skills/expo-skill-eval/scripts/snapshot-web.sh +61 -0
  170. package/dist/templates/default/apps/mobile/.claude/skills/expo-ui/SKILL.md +100 -0
  171. package/dist/templates/default/apps/mobile/.claude/skills/expo-ui/agents/openai.yaml +4 -0
  172. package/dist/templates/default/apps/mobile/.claude/skills/expo-ui/references/drop-in-replacements.md +27 -0
  173. package/dist/templates/default/apps/mobile/.claude/skills/expo-ui/references/jetpack-compose.md +73 -0
  174. package/dist/templates/default/apps/mobile/.claude/skills/expo-ui/references/swift-ui.md +73 -0
  175. package/dist/templates/default/apps/mobile/.claude/skills/expo-ui/references/universal.md +104 -0
  176. package/dist/templates/default/apps/mobile/.claude/skills/expo-ui/scripts/list-components.js +193 -0
  177. package/dist/templates/default/apps/mobile/.claude/skills/expo-upgrade/SKILL.md +149 -0
  178. package/dist/templates/default/apps/mobile/.claude/skills/expo-upgrade/agents/openai.yaml +4 -0
  179. package/dist/templates/default/apps/mobile/.claude/skills/expo-upgrade/references/expo-av-to-audio.md +132 -0
  180. package/dist/templates/default/apps/mobile/.claude/skills/expo-upgrade/references/expo-av-to-video.md +160 -0
  181. package/dist/templates/default/apps/mobile/.claude/skills/expo-upgrade/references/native-tabs.md +124 -0
  182. package/dist/templates/default/apps/mobile/.claude/skills/expo-upgrade/references/new-architecture.md +79 -0
  183. package/dist/templates/default/apps/mobile/.claude/skills/expo-upgrade/references/react-19.md +79 -0
  184. package/dist/templates/default/apps/mobile/.claude/skills/expo-upgrade/references/react-compiler.md +59 -0
  185. package/dist/templates/default/apps/mobile/.claude/skills/expo-upgrade/references/react-navigation-to-expo-router.md +61 -0
  186. package/dist/templates/default/apps/mobile/.claude/skills/expo-web-to-native/SKILL.md +90 -0
  187. package/dist/templates/default/apps/mobile/.claude/skills/expo-web-to-native/agents/openai.yaml +4 -0
  188. package/dist/templates/default/apps/mobile/.claude/skills/expo-web-to-native/references/false-friends.md +119 -0
  189. package/dist/templates/default/apps/mobile/.claude/skills/expo-web-to-native/references/native-patterns.md +39 -0
  190. package/dist/templates/default/apps/mobile/.claude/skills/expo-web-to-native/references/run-as-goal.md +48 -0
  191. package/dist/templates/default/apps/mobile/.claude/skills/expo-web-to-native/references/verify-on-device.md +45 -0
  192. package/dist/templates/default/apps/mobile/.claude/skills/ios-simulator/SKILL.md +34 -0
  193. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/POWER.md +172 -0
  194. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/SKILL.md +238 -0
  195. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/agents/openai.yaml +4 -0
  196. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/bundle-analyze-app.md +208 -0
  197. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/bundle-analyze-js.md +264 -0
  198. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/bundle-barrel-exports.md +250 -0
  199. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/bundle-code-splitting.md +255 -0
  200. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/bundle-hermes-mmap.md +167 -0
  201. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/bundle-library-size.md +164 -0
  202. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/bundle-native-assets.md +208 -0
  203. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/bundle-r8-android.md +231 -0
  204. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/bundle-tree-shaking.md +215 -0
  205. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/images/bundle-treemap-source-map-explorer.png +0 -0
  206. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/images/controlled-textinput-pingpong.png +0 -0
  207. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/images/devtools-flamegraph.png +0 -0
  208. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/images/emerge-xray-ios.png +0 -0
  209. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/images/expo-atlas-treemap.png +0 -0
  210. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/images/flashlight-flatlist-vs-flashlist.png +0 -0
  211. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/images/fps-drop-graph.png +0 -0
  212. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/images/memory-heap-snapshot.png +0 -0
  213. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/images/tti-warm-start-diagram.png +0 -0
  214. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/images/view-hierarchy-flattening.png +0 -0
  215. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/images/xcode-instruments-templates.png +0 -0
  216. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/images/xcode-thread-view.png +0 -0
  217. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/js-animations-reanimated.md +273 -0
  218. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/js-atomic-state.md +190 -0
  219. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/js-bottomsheet.md +339 -0
  220. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/js-concurrent-react.md +238 -0
  221. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/js-lists-flatlist-flashlist.md +223 -0
  222. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/js-measure-fps.md +178 -0
  223. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/js-memory-leaks.md +168 -0
  224. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/js-profile-react.md +138 -0
  225. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/js-react-compiler.md +261 -0
  226. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/js-uncontrolled-components.md +219 -0
  227. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/native-android-16kb-alignment.md +114 -0
  228. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/native-measure-tti.md +221 -0
  229. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/native-memory-leaks.md +206 -0
  230. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/native-memory-patterns.md +240 -0
  231. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/native-platform-setup.md +112 -0
  232. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/native-profiling.md +140 -0
  233. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/native-sdks-over-polyfills.md +192 -0
  234. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/native-threading-model.md +230 -0
  235. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/native-turbo-modules.md +210 -0
  236. package/dist/templates/default/apps/mobile/.claude/skills/react-native-best-practices/references/native-view-flattening.md +180 -0
  237. package/dist/templates/default/apps/mobile/AGENTS.md +35 -8
  238. package/dist/templates/default/apps/mobile/README.md +31 -7
  239. package/dist/templates/default/apps/mobile/app.config.js +35 -6
  240. package/dist/templates/default/apps/mobile/metro.config.js +6 -0
  241. package/dist/templates/default/apps/mobile/nativewind-env.d.ts +2 -0
  242. package/dist/templates/default/apps/mobile/package.json +28 -16
  243. package/dist/templates/default/apps/mobile/postcss.config.mjs +1 -0
  244. package/dist/templates/default/apps/mobile/skills-lock.json +27 -27
  245. package/dist/templates/default/apps/mobile/src/app/(auth)/forgot-password.tsx +1 -0
  246. package/dist/templates/default/apps/mobile/src/app/(authenticated)/change-password.tsx +1 -0
  247. package/dist/templates/default/apps/mobile/src/app/_layout.tsx +1 -0
  248. package/dist/templates/default/apps/mobile/tsconfig.json +2 -1
  249. package/dist/templates/default/apps/web/.claude/skills/frontend-design/SKILL.md +71 -0
  250. package/dist/templates/default/apps/web/.claude/skills/web-design-guidelines/SKILL.md +39 -0
  251. package/dist/templates/default/apps/web/package.json +16 -16
  252. package/dist/templates/default/apps/web/site.json +10 -0
  253. package/dist/templates/default/apps/web/src/routeTree.gen.ts +282 -0
  254. package/dist/templates/default/apps/web/src/router/__root.tsx +44 -7
  255. package/dist/templates/default/apps/web/src/router/_authenticated/dashboard.tsx +2 -4
  256. package/dist/templates/default/apps/web/src/router/index.tsx +101 -20
  257. package/dist/templates/default/apps/web/src/router/mobile-login.tsx +84 -0
  258. package/dist/templates/default/apps/web/vite.config.ts +53 -8
  259. package/dist/templates/default/bun.lock +5286 -27943
  260. package/dist/templates/default/bunfig.toml +4 -0
  261. package/dist/templates/default/disposabl.json +1 -1
  262. package/dist/templates/default/package.json +10 -6
  263. package/dist/templates/default/packages/backend/.claude/skills/convex/SKILL.md +69 -0
  264. package/dist/templates/default/packages/backend/.claude/skills/convex-add/SKILL.md +26 -0
  265. package/dist/templates/default/packages/backend/.claude/skills/convex-advisor/SKILL.md +32 -0
  266. package/dist/templates/default/packages/backend/.claude/skills/convex-agent/SKILL.md +25 -0
  267. package/dist/templates/default/packages/backend/.claude/skills/convex-auth/SKILL.md +29 -0
  268. package/dist/templates/default/packages/backend/.claude/skills/convex-authz/SKILL.md +36 -0
  269. package/dist/templates/default/packages/backend/.claude/skills/convex-backup/SKILL.md +33 -0
  270. package/dist/templates/default/packages/backend/.claude/skills/convex-billing/SKILL.md +69 -0
  271. package/dist/templates/default/packages/backend/.claude/skills/convex-cost/SKILL.md +29 -0
  272. package/dist/templates/default/packages/backend/.claude/skills/convex-create-component/SKILL.md +325 -0
  273. package/dist/templates/default/packages/backend/.claude/skills/convex-create-component/agents/openai.yaml +14 -0
  274. package/dist/templates/default/packages/backend/.claude/skills/convex-create-component/assets/icon.svg +3 -0
  275. package/dist/templates/default/packages/backend/.claude/skills/convex-create-component/references/advanced-patterns.md +146 -0
  276. package/dist/templates/default/packages/backend/.claude/skills/convex-create-component/references/hybrid-components.md +38 -0
  277. package/dist/templates/default/packages/backend/.claude/skills/convex-create-component/references/local-components.md +39 -0
  278. package/dist/templates/default/packages/backend/.claude/skills/convex-create-component/references/packaged-components.md +54 -0
  279. package/dist/templates/default/packages/backend/.claude/skills/convex-crons/SKILL.md +23 -0
  280. package/dist/templates/default/packages/backend/.claude/skills/convex-deploy-guard/SKILL.md +29 -0
  281. package/dist/templates/default/packages/backend/.claude/skills/convex-design/SKILL.md +30 -0
  282. package/dist/templates/default/packages/backend/.claude/skills/convex-docs/SKILL.md +31 -0
  283. package/dist/templates/default/packages/backend/.claude/skills/convex-domains/SKILL.md +26 -0
  284. package/dist/templates/default/packages/backend/.claude/skills/convex-env/SKILL.md +24 -0
  285. package/dist/templates/default/packages/backend/.claude/skills/convex-expert/SKILL.md +38 -0
  286. package/dist/templates/default/packages/backend/.claude/skills/convex-explain-app/SKILL.md +29 -0
  287. package/dist/templates/default/packages/backend/.claude/skills/convex-improve-convex-plugin/SKILL.md +24 -0
  288. package/dist/templates/default/packages/backend/.claude/skills/convex-insights/SKILL.md +32 -0
  289. package/dist/templates/default/packages/backend/.claude/skills/convex-launch-readiness/SKILL.md +35 -0
  290. package/dist/templates/default/packages/backend/.claude/skills/convex-migrate/SKILL.md +23 -0
  291. package/dist/templates/default/packages/backend/.claude/skills/convex-migrate-rehearse/SKILL.md +31 -0
  292. package/dist/templates/default/packages/backend/.claude/skills/convex-monitor/SKILL.md +22 -0
  293. package/dist/templates/default/packages/backend/.claude/skills/convex-optimize/SKILL.md +26 -0
  294. package/dist/templates/default/packages/backend/.claude/skills/convex-quickstart/SKILL.md +29 -0
  295. package/dist/templates/default/packages/backend/.claude/skills/convex-quickstart/agents/openai.yaml +14 -0
  296. package/dist/templates/default/packages/backend/.claude/skills/convex-quickstart/assets/icon.svg +4 -0
  297. package/dist/templates/default/packages/backend/.claude/skills/convex-reviewer/SKILL.md +26 -0
  298. package/dist/templates/default/packages/backend/.claude/skills/convex-seed/SKILL.md +23 -0
  299. package/dist/templates/default/packages/backend/.claude/skills/convex-self-heal/SKILL.md +38 -0
  300. package/dist/templates/default/packages/backend/.claude/skills/convex-sentinel/SKILL.md +25 -0
  301. package/dist/templates/default/packages/backend/.claude/skills/convex-suggest/SKILL.md +27 -0
  302. package/dist/templates/default/packages/backend/.claude/skills/convex-test/SKILL.md +23 -0
  303. package/dist/templates/default/packages/backend/.claude/skills/convex-verify/SKILL.md +34 -0
  304. package/dist/templates/default/packages/backend/README.md +23 -2
  305. package/dist/templates/default/packages/backend/convex/_generated/api.d.ts +15 -6
  306. package/dist/templates/default/packages/backend/convex/_generated/server.d.ts +17 -0
  307. package/dist/templates/default/packages/backend/convex/auth.ts +90 -3
  308. package/dist/templates/default/packages/backend/convex/authEmail.ts +45 -0
  309. package/dist/templates/default/packages/backend/convex/authSetup.ts +12 -0
  310. package/dist/templates/default/packages/backend/convex/billing.ts +5 -0
  311. package/dist/templates/default/packages/backend/convex/convex.config.ts +38 -1
  312. package/dist/templates/default/packages/backend/convex/emails.ts +10 -0
  313. package/dist/templates/default/packages/backend/convex/files/index.ts +6 -0
  314. package/dist/templates/default/packages/backend/convex/files/internal.ts +5 -0
  315. package/dist/templates/default/packages/backend/convex/http.ts +9 -1
  316. package/dist/templates/default/packages/backend/convex/schema.ts +20 -19
  317. package/dist/templates/default/packages/backend/convex/telemetry.ts +84 -0
  318. package/dist/templates/default/packages/backend/convex/users/internal.ts +66 -10
  319. package/dist/templates/default/packages/backend/convex/users/validator.ts +14 -0
  320. package/dist/templates/default/packages/backend/generated/pages.json +36 -0
  321. package/dist/templates/default/packages/backend/package.json +8 -7
  322. package/dist/templates/default/packages/cli/README.md +3 -1
  323. package/dist/templates/default/packages/cli/auth.ts +6 -1
  324. package/dist/templates/default/packages/cli/client.ts +213 -0
  325. package/dist/templates/default/packages/cli/commands.ts +1 -293
  326. package/dist/templates/default/packages/cli/package.json +1 -1
  327. package/dist/templates/default/packages/disposabl-kit/GOOGLE_AUTH.md +37 -0
  328. package/dist/templates/default/packages/disposabl-kit/PAYMENTS.md +31 -0
  329. package/dist/templates/default/packages/disposabl-kit/client/components/google-sign-in.tsx +78 -0
  330. package/dist/templates/default/packages/disposabl-kit/client/components/legal-page.tsx +116 -0
  331. package/dist/templates/default/packages/disposabl-kit/client/components/password-auth-form.tsx +221 -0
  332. package/dist/templates/default/packages/disposabl-kit/client/components/password-page.tsx +37 -0
  333. package/dist/templates/default/packages/disposabl-kit/client/components/ui/log-out.tsx +28 -9
  334. package/dist/templates/default/packages/disposabl-kit/client/lib/prerender.ts +3 -1
  335. package/dist/templates/default/packages/disposabl-kit/client/lib/telemetry.ts +32 -0
  336. package/dist/templates/default/packages/disposabl-kit/client/routes/_auth-pages/forgot-password.tsx +92 -0
  337. package/dist/templates/default/packages/disposabl-kit/client/routes/_auth-pages/login.tsx +4 -149
  338. package/dist/templates/default/packages/disposabl-kit/client/routes/_auth-pages/reset-password.tsx +118 -0
  339. package/dist/templates/default/packages/disposabl-kit/client/routes/_auth-pages/signUp.tsx +4 -159
  340. package/dist/templates/default/packages/disposabl-kit/client/routes/_auth-pages/verify-email.tsx +49 -0
  341. package/dist/templates/default/packages/disposabl-kit/client/routes/_authenticated/change-password.tsx +123 -0
  342. package/dist/templates/default/packages/disposabl-kit/client/routes/legal/delete-account.tsx +7 -0
  343. package/dist/templates/default/packages/disposabl-kit/client/routes/legal/index.tsx +7 -0
  344. package/dist/templates/default/packages/disposabl-kit/client/routes/legal/privacy-request.tsx +7 -0
  345. package/dist/templates/default/packages/disposabl-kit/client/routes/legal/privacy.tsx +7 -0
  346. package/dist/templates/default/packages/disposabl-kit/client/routes/legal/terms.tsx +7 -0
  347. package/dist/templates/default/packages/disposabl-kit/client/routes/pricing.tsx +223 -0
  348. package/dist/templates/default/packages/disposabl-kit/client/routes/route.tsx +66 -14
  349. package/dist/templates/default/packages/disposabl-kit/client/vite.config.ts +27 -1
  350. package/dist/templates/default/packages/disposabl-kit/feature-options.ts +44 -0
  351. package/dist/templates/default/packages/disposabl-kit/features.ts +3 -0
  352. package/dist/templates/default/packages/disposabl-kit/legal/README.md +7 -0
  353. package/dist/templates/default/packages/disposabl-kit/legal/config.ts +55 -0
  354. package/dist/templates/default/packages/disposabl-kit/legal/documents/privacy.ts +69 -0
  355. package/dist/templates/default/packages/disposabl-kit/legal/documents/terms.ts +66 -0
  356. package/dist/templates/default/packages/disposabl-kit/legal/index.ts +40 -0
  357. package/dist/templates/default/packages/disposabl-kit/legal/types.ts +6 -0
  358. package/dist/templates/default/packages/disposabl-kit/lib/auth-errors.ts +47 -0
  359. package/dist/templates/default/packages/disposabl-kit/lib/auth-session.ts +15 -0
  360. package/dist/templates/default/packages/disposabl-kit/lib/google-logo.png +0 -0
  361. package/dist/templates/default/packages/disposabl-kit/lib/indexing.ts +27 -0
  362. package/dist/templates/default/packages/disposabl-kit/lib/mobile-auth.ts +44 -0
  363. package/dist/templates/default/packages/disposabl-kit/lib/starter.ts +57 -0
  364. package/dist/templates/default/packages/disposabl-kit/lib/telemetry.ts +30 -0
  365. package/dist/templates/default/packages/disposabl-kit/mobile/billing/account-billing.tsx +216 -0
  366. package/dist/templates/default/packages/disposabl-kit/mobile/billing/session.ts +73 -0
  367. package/dist/templates/default/packages/disposabl-kit/mobile/components/account-profile.tsx +128 -0
  368. package/dist/templates/default/packages/disposabl-kit/mobile/components/appearance-settings.tsx +128 -0
  369. package/dist/templates/default/packages/disposabl-kit/mobile/components/auth-form.tsx +168 -68
  370. package/dist/templates/default/packages/disposabl-kit/mobile/components/auth-ui.tsx +52 -8
  371. package/dist/templates/default/packages/disposabl-kit/mobile/components/email-verification.tsx +77 -0
  372. package/dist/templates/default/packages/disposabl-kit/mobile/components/google-button.tsx +66 -0
  373. package/dist/templates/default/packages/disposabl-kit/mobile/components/google-sign-in.tsx +121 -0
  374. package/dist/templates/default/packages/disposabl-kit/mobile/components/settings-links.tsx +53 -0
  375. package/dist/templates/default/packages/disposabl-kit/mobile/components/settings-page.tsx +58 -0
  376. package/dist/templates/default/packages/disposabl-kit/mobile/design/accent.ts +31 -0
  377. package/dist/templates/default/packages/disposabl-kit/mobile/design/avatar.tsx +38 -0
  378. package/dist/templates/default/packages/disposabl-kit/mobile/design/brand-mark.tsx +18 -0
  379. package/dist/templates/default/packages/disposabl-kit/mobile/design/native-button.tsx +20 -0
  380. package/dist/templates/default/packages/disposabl-kit/mobile/design/preferences.tsx +234 -0
  381. package/dist/templates/default/packages/disposabl-kit/mobile/design/primitives.tsx +229 -0
  382. package/dist/templates/default/packages/disposabl-kit/mobile/design/theme-provider.tsx +198 -0
  383. package/dist/templates/default/packages/disposabl-kit/mobile/design/theme.ts +13 -0
  384. package/dist/templates/default/packages/disposabl-kit/mobile/design/themed-text.tsx +61 -0
  385. package/dist/templates/default/packages/disposabl-kit/mobile/design/use-theme.ts +27 -0
  386. package/dist/templates/default/packages/disposabl-kit/mobile/expo-plugin.cjs +28 -5
  387. package/dist/templates/default/packages/disposabl-kit/mobile/global.css +165 -0
  388. package/dist/templates/default/packages/disposabl-kit/mobile/index.ts +3 -0
  389. package/dist/templates/default/packages/disposabl-kit/mobile/layout.tsx +156 -23
  390. package/dist/templates/default/packages/disposabl-kit/mobile/lib/auth-return.ts +10 -0
  391. package/dist/templates/default/packages/disposabl-kit/mobile/lib/logo-dark.png +0 -0
  392. package/dist/templates/default/packages/disposabl-kit/mobile/lib/logo-light.png +0 -0
  393. package/dist/templates/default/packages/disposabl-kit/mobile/screens/account.tsx +171 -39
  394. package/dist/templates/default/packages/disposabl-kit/mobile/screens/change-password.tsx +147 -0
  395. package/dist/templates/default/packages/disposabl-kit/mobile/screens/forgot-password.tsx +158 -0
  396. package/dist/templates/default/packages/disposabl-kit/mobile/screens/home.tsx +162 -54
  397. package/dist/templates/default/packages/disposabl-kit/mobile/updates/current-update.ts +19 -0
  398. package/dist/templates/default/packages/disposabl-kit/mobile/updates/foreground-check.ts +19 -0
  399. package/dist/templates/default/packages/disposabl-kit/mobile/updates/update-prompt.tsx +201 -0
  400. package/dist/templates/default/packages/disposabl-kit/package.json +62 -22
  401. package/dist/templates/default/packages/disposabl-kit/payments/autumn.config.example +13 -0
  402. package/dist/templates/default/packages/disposabl-kit/server/billing-functions.ts +93 -0
  403. package/dist/templates/default/packages/disposabl-kit/server/billing.ts +119 -0
  404. package/dist/templates/default/packages/disposabl-kit/server/files-functions.ts +196 -0
  405. package/dist/templates/default/packages/disposabl-kit/server/files.ts +133 -0
  406. package/dist/templates/default/packages/disposabl-kit/server/google.ts +95 -0
  407. package/dist/templates/default/packages/disposabl-kit/server/http.ts +68 -18
  408. package/dist/templates/default/packages/disposabl-kit/server/lib/platform-spec.ts +99 -16
  409. package/dist/templates/default/packages/disposabl-kit/server/lib/static.ts +43 -5
  410. package/dist/templates/default/packages/disposabl-kit/server/lib/telemetry.ts +139 -0
  411. package/dist/templates/default/packages/sdk/package.json +1 -1
  412. package/dist/templates/default/packages/sdk/src/config.ts +1 -0
  413. package/dist/templates/default/packages/skill/SKILL.md +10 -2
  414. package/dist/templates/default/packages/skill/references/agent.md +28 -0
  415. package/dist/templates/default/packages/skill/references/delivery.md +2 -0
  416. package/dist/templates/default/packages/skill/references/design.md +2 -0
  417. package/dist/templates/default/packages/skill/references/iphone-preview.md +114 -0
  418. package/dist/templates/default/packages/skill/scripts/sign-iphone.py +126 -0
  419. package/dist/templates/default/packages/tests/README.md +10 -0
  420. package/dist/templates/default/packages/tests/billing.test.ts +77 -0
  421. package/dist/templates/default/packages/tests/components/mobile-google.test.mjs +142 -0
  422. package/dist/templates/default/packages/tests/components/mobile-settings.test.mjs +118 -0
  423. package/dist/templates/default/packages/tests/components/mobile-theme.test.mjs +122 -0
  424. package/dist/templates/default/packages/tests/components/mobile-updates.test.mjs +139 -0
  425. package/dist/templates/default/packages/tests/e2e.config.ts +1 -0
  426. package/dist/templates/default/packages/tests/files.test.ts +234 -0
  427. package/dist/templates/default/packages/tests/flows/email-delivery.e2e.ts +93 -0
  428. package/dist/templates/default/packages/tests/flows/files.e2e.ts +97 -0
  429. package/dist/templates/default/packages/tests/flows/legal.e2e.ts +38 -0
  430. package/dist/templates/default/packages/tests/flows/mcp.e2e.ts +120 -0
  431. package/dist/templates/default/packages/tests/flows/mobile-auth-disabled.e2e.ts +33 -0
  432. package/dist/templates/default/packages/tests/flows/mobile.e2e.ts +6 -4
  433. package/dist/templates/default/packages/tests/flows/password-backend.e2e.ts +58 -0
  434. package/dist/templates/default/packages/tests/flows/passwords.e2e.ts +206 -0
  435. package/dist/templates/default/packages/tests/flows/seo.e2e.ts +34 -0
  436. package/dist/templates/default/packages/tests/flows/web.e2e.ts +42 -2
  437. package/dist/templates/default/packages/tests/helpers/mobile.ts +31 -0
  438. package/dist/templates/default/packages/tests/ios-ota.test.ts +267 -0
  439. package/dist/templates/default/packages/tests/mobile-google.test.ts +100 -0
  440. package/dist/templates/default/packages/tests/mobile-settings.test.ts +21 -0
  441. package/dist/templates/default/packages/tests/mobile-theme.test.ts +13 -0
  442. package/dist/templates/default/packages/tests/mobile-updates-component.test.ts +14 -0
  443. package/dist/templates/default/packages/tests/mobile-updates.test.ts +122 -0
  444. package/dist/templates/default/packages/tests/native-billing.test.ts +138 -0
  445. package/dist/templates/default/packages/tests/package.json +11 -6
  446. package/dist/templates/default/packages/tests/seo-config.test.ts +17 -0
  447. package/dist/templates/default/packages/tests/telemetry.test.ts +188 -0
  448. package/dist/templates/default/patches/react-native-css@3.1.0-rc.1.patch +42 -0
  449. package/dist/templates/default/vendor/README.md +30 -23
  450. package/dist/templates/default/vendor/convex-auth-437831bd-disposabl.3.tgz +0 -0
  451. package/package.json +8 -8
  452. package/dist/templates/default/packages/backend/convex/mcpEnterprise/README.md +0 -42
  453. package/dist/templates/default/packages/backend/convex/mcpEnterprise/internal.ts +0 -153
  454. package/dist/templates/default/packages/backend/convex/mcpEnterprise/provision.ts +0 -102
  455. package/dist/templates/default/packages/backend/convex/mcpEnterprise/validator.ts +0 -35
  456. package/dist/templates/default/packages/cli/delete.ts +0 -48
  457. package/dist/templates/default/packages/cli/preview.ts +0 -234
  458. package/dist/templates/default/packages/disposabl-kit/server/mcp/enterprise.ts +0 -267
  459. package/dist/templates/default/packages/disposabl-kit/server/mcp/identity.ts +0 -33
  460. package/dist/templates/default/vendor/convex-auth-6c0ebf3f.tgz +0 -0
  461. /package/dist/templates/default/apps/mobile/src/app/{(authenticated)/account.tsx → settings.tsx} +0 -0
@@ -0,0 +1,105 @@
1
+ ---
2
+ name: expo-examples
3
+ description: Expo's official example projects - the expo/examples repo of ~70 `with-*` integrations (Stripe, Clerk, Supabase, OpenAI, maps, Reanimated, SQLite, Skia, NativeWind, and more). Use when integrating a third-party library or service into an existing Expo app and you want the canonical, version-matched pattern to adapt, or when scaffolding a new project from one with `npx create-expo --example`.
4
+ allowed-tools: "Read,Bash(gh api:*),Bash(git clone:*),Bash(npx create-expo:*),Bash(npx degit:*),Bash(bun create:*)"
5
+ license: MIT
6
+ ---
7
+
8
+ # Expo Examples
9
+
10
+ [expo/examples](https://github.com/expo/examples) is Expo's official library of ~70 **integration examples** — directories named `with-<library>` (e.g. `with-stripe`, `with-maps`), each built around **one** library or service. These are not full apps: they're **managed** projects (no `ios/`/`android/` dirs — native setup is via config plugins), and the typical one is a **single screen of ~100–200 lines**. Mine them for the canonical integration *pattern* — the dependency set, `app.json` config plugins, and minimal wiring Expo maintains against the current SDK — and adapt that into the user's app. Don't expect to lift an application architecture from them.
11
+
12
+ Reach for an example before hand-rolling an integration. (Kinds — full-stack, showcases, starters — are noted in `./references/catalog.md`.)
13
+
14
+ ## Two modes
15
+
16
+ 1. **Inspiration / adapt** (most common) — the user already has a project. Find the matching example, read its key files, and apply the *pattern* to their code.
17
+ 2. **Scaffold** — greenfield. Start a fresh project directly from the example.
18
+
19
+ ## Workflow
20
+
21
+ ### 1. Find the right example
22
+
23
+ Map the user's need to an example name (e.g. payments → `with-stripe`, auth → `with-clerk`). `./references/catalog.md` is a categorized snapshot for fast triage — but it drifts, so confirm against the live list:
24
+
25
+ ```bash
26
+ # Live example names:
27
+ gh api repos/expo/examples/contents --jq '.[] | select(.type=="dir" and (.name|startswith(".")|not)) | .name'
28
+ # Aliases (renamed) + deprecated (dead/moved) examples — check before recommending:
29
+ gh api repos/expo/examples/contents/meta.json --jq '.content' | base64 -d
30
+ ```
31
+
32
+ `meta.json` is the source of truth for what's renamed or dead (deprecated examples are removed from the repo tree but still listed here, each with a `message`). If an example is in its `deprecated` map, don't recommend it — follow the `message` to the modern path. If it's in `aliases`, use the `destination`.
33
+
34
+ ### 2a. Inspiration mode — study without touching the user's project
35
+
36
+ The common case: the user already has an app and wants to see how Expo does something. Read the example as **reference** and apply the patterns by hand — never scaffold an example on top of their project.
37
+
38
+ **First, list the whole example in one call.** Integration code is often nested (e.g. Stripe's server routes live in `app/api/`), so a one-level listing misses the important files:
39
+
40
+ ```bash
41
+ gh api 'repos/expo/examples/git/trees/master?recursive=1' \
42
+ --jq '.tree[].path | select(startswith("with-stripe/"))'
43
+ ```
44
+
45
+ **Then read the high-signal files first:** `README.md` (setup) → `package.json` (deps) → `app.json` (config plugins / permissions) → the integration code the manifest revealed → `.env` (required secrets). Per file:
46
+
47
+ ```bash
48
+ gh api repos/expo/examples/contents/with-stripe/utils/stripe-server.ts --jq '.content' | base64 -d
49
+ # No gh? Raw URL (branch is master):
50
+ curl -s https://raw.githubusercontent.com/expo/examples/master/with-stripe/utils/stripe-server.ts
51
+ ```
52
+
53
+ **Reading more than a couple of files?** Many integrations are spread across server routes, a client provider, and config (Stripe is). Skip the per-file calls — pull the whole example into a **throwaway/gitignored dir (not the user's project)** and read it freely with Grep/Read, then apply by hand:
54
+
55
+ ```bash
56
+ npx degit expo/examples/with-stripe /tmp/expo-ref/with-stripe # clean copy, no git history
57
+ # fallback without degit (sparse-checkout, no full ~64 MB clone):
58
+ git clone --depth 1 --filter=blob:none --sparse https://github.com/expo/examples.git /tmp/expo-ref/examples \
59
+ && (cd /tmp/expo-ref/examples && git sparse-checkout set with-stripe)
60
+ ```
61
+
62
+ Read from there with Grep/Read; delete the scratch dir when done.
63
+
64
+ ### 2b. Scaffold mode — new project from an example
65
+
66
+ ```bash
67
+ npx create-expo --example with-stripe # short form: npx create-expo -e with-stripe
68
+ bun create expo --example with-stripe # with bun
69
+ ```
70
+
71
+ ### 3. Adapt into the user's app — non-destructively (critical)
72
+
73
+ When the user already has an app, **add only what the example introduces; never overwrite their setup.**
74
+
75
+ - **Version-align — don't copy pinned versions.** Examples track the **latest** SDK, so their `package.json` pins won't match an older project. Add only the *missing* deps with `npx expo install <pkg>` (it resolves SDK-correct versions) instead of copying exact versions.
76
+ - **Merge config, don't replace it.** Add only the `app.json`/`app.config.*` plugins and permissions the example introduces that the user lacks — keep their existing config block intact.
77
+ - **Port the integration code.**
78
+ - **Recreate env vars** from the example's `.env` shape — it holds placeholders, never working secrets.
79
+
80
+ **Done when** the integration code is ported and every dependency, config plugin, permission, and env var it needs is accounted for in the user's app — not when it merely *looks* wired up.
81
+
82
+ ## Gotchas
83
+
84
+ - **Default branch is `master`,** not `main` (matters for raw URLs and sparse checkout).
85
+ - **Single-click deploy.** Every example has a launch URL: `https://launch.expo.dev/?github=https://github.com/expo/examples/tree/master/<example>`.
86
+
87
+ ## Related skills
88
+
89
+ - Native UI components (@expo/ui package) → `expo-ui`
90
+ - Styling and native-feeling screens → `expo-native-ui`
91
+ - Navigation and routing → `expo-router`
92
+ - Authoring a native module → `expo-module`
93
+ - Upgrade the SDK before adopting a latest-SDK example → `expo-upgrade`
94
+
95
+ ## References
96
+
97
+ - `./references/catalog.md` — categorized snapshot of the example library for fast triage.
98
+
99
+ ## Submitting Feedback
100
+ If you encounter errors, misleading or outdated information in this skill, report it so Expo can improve:
101
+ ```bash
102
+ npx --yes @expo/agent-cli@latest feedback --category skills --subject "expo-examples" "<actionable feedback>"
103
+ ```
104
+ Only submit when you have something specific and actionable to report. Include as much relevant context as possible.
105
+ If an agent repeatedly fails at an Expo task or the user has to step in, submit a brief report of the task, expected result, and what went wrong using `--category evals` and the relevant Expo package or command as `--subject`.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Expo Examples"
3
+ short_description: "Adapt or scaffold from the expo/examples repo of with-* integrations (Stripe, Clerk, Supabase, maps, SQLite, and more)"
4
+ default_prompt: "Use $expo-examples when integrating a third-party library or service into an Expo app to find the canonical with-* example to adapt, or to scaffold a new project with npx create-expo --example."
@@ -0,0 +1,105 @@
1
+ # Example catalog (snapshot)
2
+
3
+ A categorized view of [expo/examples](https://github.com/expo/examples) for fast triage. Each entry is a **single-concern integration demo** (one library/service, managed project, usually one screen) — not a full app. This snapshot drifts — the **live repo is the source of truth**. Confirm the exact name against `gh api repos/expo/examples/contents` and check `meta.json` for aliases/deprecations (see SKILL.md step 1) before recommending or scaffolding.
4
+
5
+ Use any name with `npx create-expo --example <name>` (scaffold) or inspect it via `gh api repos/expo/examples/contents/<name>/<file>`.
6
+
7
+ Most are single-screen integrations; a few differ:
8
+
9
+ - **Full-stack** (include Expo Router `+api` routes — a backend too): `with-stripe`, `with-clerk`, `with-better-auth`, `with-openai`, `with-router-ai`, `with-graphql`, `with-s3`, `with-satori`.
10
+ - **Larger showcases:** `with-shadcn`, `with-router-tv`, `with-router-menus`, `with-react-navigation`, `with-webgpu`.
11
+ - **Starters (not integrations):** `blank`, `stickersmash`.
12
+
13
+ ## Auth & identity
14
+ - `with-clerk` — Clerk authentication
15
+ - `with-auth0` — Auth0 login
16
+ - `with-better-auth` — Better Auth
17
+ - `with-magic` — Magic passwordless auth
18
+ - `with-facebook-auth` — Facebook login
19
+ - `with-firebase-saml-login` — Firebase SAML SSO
20
+
21
+ ## Payments
22
+ - `with-stripe` — Stripe payments (native + web)
23
+
24
+ ## Backend, data & storage
25
+ - `with-convex` — Convex realtime backend
26
+ - `with-legend-state-supabase` — Supabase + Legend-State sync
27
+ - `with-firebase-storage-upload` — Firebase Storage uploads
28
+ - `with-aws-storage-upload`, `with-s3` — AWS / S3 file uploads
29
+ - `with-apollo`, `with-graphql` — GraphQL clients
30
+ - `with-formdata-image-upload` — multipart image upload
31
+
32
+ ## Local database & state
33
+ - `with-sqlite` — expo-sqlite
34
+ - `with-libsql` — libSQL / Turso
35
+ - `with-tinybase` — TinyBase local-first store
36
+ - `with-zustand` — Zustand state management
37
+
38
+ ## Navigation & routing
39
+ - `with-router` — Expo Router basics
40
+ - `with-react-navigation` — React Navigation (stacks + tabs)
41
+ - `with-drawer-navigation` — drawer navigator
42
+ - `with-router-menus` — native context menus with Router
43
+ - `with-router-uniwind` — Router + Uniwind styling
44
+ - `with-router-ai` — Router + AI chat UI
45
+ - `with-router-tv` — Router on TV
46
+ - `with-react-router` — React Router (web)
47
+
48
+ ## Styling & UI
49
+ - `with-tailwindcss` — Tailwind / NativeWind
50
+ - `with-styled-components` — styled-components
51
+ - `with-shadcn` — shadcn-style components
52
+ - `with-moti` — Moti animations
53
+ - `with-custom-font` — custom fonts
54
+ - `with-svg` — react-native-svg
55
+ - `with-icons` — icon sets
56
+ - `with-splash-screen` — custom splash screen
57
+ - `with-video-background` — full-screen video background
58
+
59
+ ## Animation & graphics
60
+ - `with-reanimated` — Reanimated
61
+ - `with-skia` — React Native Skia 2D graphics
62
+ - `with-three`, `with-react-three-fiber` — three.js / R3F 3D
63
+ - `with-webgpu` — WebGPU
64
+ - `with-processing` — Processing-style sketches
65
+ - `with-react-flow` — node/flow diagrams
66
+ - `with-victory-native` — charts
67
+
68
+ ## AI & ML
69
+ - `with-openai` — OpenAI API
70
+ - `with-router-ai` — AI chat app with Expo Router
71
+ - `with-google-vision` — Google Cloud Vision
72
+ - `with-tfjs-camera` — TensorFlow.js on the camera
73
+
74
+ ## Media & device
75
+ - `with-camera` — expo-camera
76
+ - `with-maps` — react-native-maps
77
+ - `with-webrtc` — WebRTC
78
+ - `with-pdf` — render / view PDFs
79
+
80
+ ## Web & rendering
81
+ - `with-nextjs` — Next.js + Expo
82
+ - `with-rsc` — React Server Components
83
+ - `with-react-strict-dom` — React Strict DOM
84
+ - `with-react-compiler` — React Compiler
85
+ - `with-html` — render raw HTML
86
+ - `with-satori` — OG image generation with Satori
87
+ - `with-workbox` — service worker / PWA
88
+ - `with-webbrowser-redirect` — expo-web-browser auth redirect
89
+
90
+ ## Platform: TV, widgets
91
+ - `with-tv` — Apple TV / Android TV
92
+ - `with-widgets` — iOS / Android home-screen widgets
93
+
94
+ ## Tooling, testing & monorepo
95
+ - `with-typescript` — TypeScript baseline
96
+ - `with-yarn-workspaces` — Yarn monorepo
97
+ - `with-storybook` — Storybook
98
+ - `with-maestro` — Maestro E2E tests
99
+ - `with-sentry` — Sentry error monitoring
100
+ - `with-socket-io` — Socket.IO realtime
101
+ - `with-github-remote-build-cache-provider` — remote build cache on GitHub
102
+
103
+ ## Starters
104
+ - `blank` — minimal app
105
+ - `stickersmash` — the tutorial app
@@ -0,0 +1,128 @@
1
+ ---
2
+ name: expo-migrate-module
3
+ description: Migrate an existing Apple/Swift Expo native module from the Expo Modules API 1.0 definition DSL to the 2.0 macro API (sometimes called v2) while preserving its JavaScript and TypeScript contract. Use when converting or incrementally adopting @ExpoModule, @JS, @Event, @SharedObject, or @Record in an existing module. Do not use for creating a new module, general Expo SDK upgrades, or Android/Kotlin migrations.
4
+ license: MIT
5
+ ---
6
+
7
+ # Migrate an Expo Module
8
+
9
+ Migrate the Swift side of an existing Expo module without changing its observable JS API. Treat the current JS/TypeScript surface and tests as the compatibility contract. Leave Kotlin on the 1.0 DSL unless the user explicitly expands the task.
10
+
11
+ ## Prerequisite
12
+
13
+ Use `expo` `58.0.21` or newer. Earlier `58.0.x` releases lack tuple conversion and the `swift:check` and `swift:expand` commands of `expo-modules-cli`. Older ones also lack `lazy` `@JS` properties, `SharedRef<T>` subclasses in `@SharedObject`, static shared-object members, and `.withAsync`, and the oldest lack closure arguments and free-form `Any` return values. SDK 57 also lacks `.concurrent`, `@Union`, and module auto-discovery. Do not target either. Before editing, check the installed version (`npm ls expo`, or the lockfile). If it is older, stop and tell the user to upgrade first.
14
+
15
+ Check the example app's own dependencies too, not only the module root. The example app is the integration surface you build and launch in step 4, so it needs the same floor.
16
+
17
+ This is a floor, not a guarantee: the macro and core surface changed in almost every `58.0.x` patch release, so step 2 must still verify the installed source.
18
+
19
+ The macros are still **experimental and undocumented**: SDK 58 has no page about them in the Expo docs, and the API can still change under you. Say this to the user before a large migration, and prefer incremental mixed mode over converting a module wholesale.
20
+
21
+ ## References
22
+
23
+ - Read `references/migration-map.md` before changing source. It contains the 1.0-to-2.0 mappings, semantic traps, and mixed-mode rules.
24
+ - Read `references/example.md` for a full before/after walkthrough of one module through mixed mode to a complete migration. Consult it when you need to see how the per-member rules compose.
25
+ - Read `references/compatibility.md` when the checked-out `expo-modules-core` version or branch is not known to support every requested macro. It explains how to verify the actual compile-time and runtime surface instead of guessing from a version number, gives the SDK 58 status of each capability, and shows how to run the module scanners and the `expo-modules-cli` checks.
26
+
27
+ ## Workflow
28
+
29
+ ### 1. Establish the contract
30
+
31
+ Inspect repository instructions and the worktree before editing. Locate the Swift module classes, records, shared objects, native views, JS/TS bindings, tests, example app, podspec, `expo-module.config.json`, and installed or checked-out `expo-modules-core`.
32
+
33
+ Inventory every exported item before rewriting it:
34
+
35
+ - module and shared-object JS names
36
+ - function names, arity, labels, defaults, nullability, sync/async behavior, errors, and queue/thread semantics (note which `AsyncFunction` bodies do blocking or long-running work, any `.runOnQueue(...)`, and sync/async pairs that share a body, such as `readSync` and `read`)
37
+ - property names, mutability, and constant caching behavior
38
+ - event wire names and payload shapes, including events sent with no body (1.0 `sendEvent("name")` sends `{}`)
39
+ - record field names, defaults, requiredness, and nullability
40
+ - shared-object constructors and instance/static placement (`Function` vs `StaticFunction`/`StaticAsyncFunction`)
41
+ - lifecycle hooks and views
42
+
43
+ Use the TypeScript declarations and JS call sites to resolve ambiguity. Do not silently "improve" requiredness, rename an event, or change sync behavior during a syntax migration.
44
+
45
+ ### 2. Verify the available 2.0 surface
46
+
47
+ Inspect the macro declarations and matching core hooks in the dependency actually used by the target. Do not assume that all items in the 2.0 design are present because one macro compiles.
48
+
49
+ Classify each 1.0 item as:
50
+
51
+ - **Migrate:** both its macro and required core runtime support exist.
52
+ - **Keep in DSL:** mixed mode preserves it safely, or 2.0 lacks an equivalent.
53
+ - **Blocked:** migration would alter the JS contract or requires unavailable runtime support.
54
+
55
+ A DSL member that takes or returns `JavaScriptValue` does not compile on SDK 58, so it cannot stay in the DSL. Migrate it to `@JS` with a `borrowing JavaScriptValue` parameter, as described in `references/migration-map.md`.
56
+
57
+ Prefer an incremental mixed-mode result over speculative generated code. Keep `definition()` for any remaining DSL elements; delete it only when it is empty and the resolved module name is preserved by `@ExpoModule`.
58
+
59
+ ### 3. Apply the migration
60
+
61
+ Migrate one semantic group at a time: module naming, functions, properties/constants, events, shared objects, then records. Keep the diff narrow.
62
+
63
+ Follow these invariants:
64
+
65
+ - Preserve every existing JS-visible name explicitly when Swift naming rules or macro defaults differ.
66
+ - Keep original optional/default behavior. An optional 1.0 record field must not become required merely because 2.0 can express required fields.
67
+ - Keep same-JS-name overloads on the DSL. The plugin does not dispatch overloads, and it reports two `@JS` members with one JS name on one object as a build error.
68
+ - Preserve async threading behavior. A 1.0 `AsyncFunction` body ran off the JS thread; a 2.0 `async` `@JS` member starts on it and leaves only at the first `await`. A body that never awaits therefore blocks the JS thread, with no change to the JS signature. Audit what runs before the first `await`, and never leave blocking I/O on the JS actor. Fix with `@JS(.concurrent)`, return a `Task.detached` from a synchronous function, or restructure onto Swift Concurrency or a continuation. A plain `Task { }` in a `@JS` function that is not `nonisolated` starts on the JS thread, so it does not help. Queue-pinned functions get the same treatment; `.runOnQueue(.main)` becomes a `@MainActor` `async` function. Merge a sync/async pair that shares a body into one function with `.withAsync("name")`. See the threading section in `references/migration-map.md`.
69
+ - Do not use `@ViewProps`, `@ExpoView`, or `@Event(sync: true)`. The plugin implements them, but SDK 58 core does not declare the two view macros and has no runtime support for synchronous events, so none of them builds. Keep 1.0 views on the DSL. Check the installed core for each of these instead of trusting a plugin version. `references/compatibility.md` has the per-capability checks.
70
+ - Keep the `OnAppContextDestroys`, `OnAppEntersForeground`, `OnAppEntersBackground`, and `OnAppBecomesActive` components in `definition()`. 2.0 has no hook for them.
71
+ - Keep the JS payload of every event. A `() -> Void` `@Event` sends `undefined`, but a 1.0 `sendEvent("name")` without a body sent `{}`. When JS code reads that payload, give the event an empty `@Record` payload type, which encodes to `{}`, or ask the user before you change it.
72
+ - Keep `expo-module.config.json` as it is. When it has an `apple.modules` list (even an empty one), autolinking links only those classes. The entries are bare Swift class names, so renaming a class during migration detaches the module silently: it builds, then is absent at runtime. Without the list, autolinking links the `public` or `open` `@ExpoModule` classes that it finds in the package sources. It does not find a class that is still on the 1.0 DSL alone. A migrated class must stay `public` or `open` in both cases. Remove the list only when the user asks and every module class qualifies.
73
+ - Do not change Kotlin, JS wrappers, or public `.d.ts` files unless the user requested an API change.
74
+ - Never write macro-generated symbols into the module's source. The macro emits them; hand-writing or overriding them is not part of a migration.
75
+
76
+ After each group, search for old DSL entries and call sites that should have moved. Avoid broad formatting or unrelated cleanup.
77
+
78
+ ### When a 2.0 equivalent is missing or a group fails
79
+
80
+ When step 2 classified an item as **Blocked**, or a migrated group fails to build or breaks the contract, do not force it. Stop on that group and:
81
+
82
+ 1. **Ask the user how to proceed** for that item, with two options:
83
+ - **Co-exist:** keep the item in the 1.0 `definition()` DSL alongside the migrated `@ExpoModule` (mixed mode) and continue with the other groups.
84
+ - **Revert:** back out the group's edits, leaving it untouched on 1.0, and move on.
85
+
86
+ Default to co-existence when mixed mode is verified safe, since it preserves the most progress. Revert when the half-applied change left the module in a non-building state and cannot be salvaged incrementally.
87
+
88
+ 2. **Open a tracking issue on `expo/expo`** noting the functionality that 2.0 does not yet cover, so the gap is recorded rather than silently worked around. Use `gh issue create --repo expo/expo` and confirm with the user before posting (per repo conventions, do not post outward-facing comments without approval). Include:
89
+ - the 1.0 member and its JS contract
90
+ - the specific macro or core hook that is missing (cite the evidence gap from `references/compatibility.md`)
91
+ - the installed `expo` version, or the `expo-modules-core` branch when the module builds against a checkout
92
+
93
+ Reference the issue in the handoff so the remaining DSL entry is traceable to a known limitation.
94
+
95
+ Keep going with the groups that do migrate cleanly; one blocked member does not block the rest.
96
+
97
+ ### 4. Verify behavior
98
+
99
+ Run the narrowest available checks first, then the real integration surface:
100
+
101
+ 1. Run `npx --no-install expo-modules swift:check ios` from the module package root. It reports macro errors and warnings in seconds, without a build. `references/compatibility.md` describes it.
102
+ 2. Build or type-check the Apple module against the target `expo-modules-core`.
103
+ 3. Run native unit tests and JS/TS tests.
104
+ 4. Build and launch the example app when the repository provides one.
105
+ 5. Confirm that autolinking still links every module class. With an `apple.modules` list, each entry must match a Swift class name as it now stands. Without the list, run the `scanModules` check in `references/compatibility.md` and confirm that it reports every class as `public` or `open`. A stale entry or a missed class builds clean and fails only at runtime, so the example app must actually resolve the module, not merely compile.
106
+ 6. Compare the final exported surface with the inventory from step 1. The `scanExports` check in `references/compatibility.md` lists the JS names, parameters, and sync/async shape of every migrated member. Members that stay in the DSL are not in its output.
107
+ 7. Search for stale `Name`, migrated `Function`/`AsyncFunction`/`StaticFunction`/`StaticAsyncFunction`/`Property`/`Constant`/`Events` entries, old `sendEvent` calls, `@Field`, and duplicate registrations. Search the source you wrote, not macro expansion output.
108
+
109
+ Expansion alone is insufficient: `swift:check` runs only the macros, so generated code with no diagnostics can still fail to link or run against a mismatched core. If dependencies changed or macro plugin flags are missing, reinstall JS dependencies as appropriate, run the repository's CocoaPods installation workflow, and restart Xcode before diagnosing plugin communication failures.
110
+
111
+ ## Handoff
112
+
113
+ Never print macro-generated or core-internal symbol names to the user. `references/compatibility.md` cites them so you can grep for them, and the `swift:expand` output is full of them, but they are implementation details that change between plugin revisions, and they are noise in a report. Name a capability by its macro (`@JS static`, `@Event(sync:)`) and by observable JS behavior. Say "the installed core does not support synchronous events yet", not the name of the missing method. The exception is a tracking issue on `expo/expo`, where the specific missing hook is the point.
114
+
115
+ Report:
116
+
117
+ - which members moved to 2.0
118
+ - which members intentionally remain in the 1.0 DSL and why
119
+ - any compatibility-sensitive choices, especially event names, record requiredness, constants, and queues
120
+ - the commands run and any verification not completed
121
+
122
+ ## Submitting Feedback
123
+ If you encounter errors, misleading or outdated information in this skill, report it so Expo can improve:
124
+ ```bash
125
+ npx --yes @expo/agent-cli@latest feedback --category skills --subject "expo-migrate-module" "<actionable feedback>"
126
+ ```
127
+ Only submit when you have something specific and actionable to report. Include as much relevant context as possible.
128
+ If an agent repeatedly fails at an Expo task or the user has to step in, submit a brief report of the task, expected result, and what went wrong using `--category evals` and the relevant Expo package or command as `--subject`.
@@ -0,0 +1,4 @@
1
+ interface:
2
+ display_name: "Migrate Expo Module"
3
+ short_description: "Migrate Swift Expo modules from 1.0 DSL to 2.0"
4
+ default_prompt: "Use $expo-migrate-module to migrate this Expo module's Swift implementation from the 1.0 definition DSL to the 2.0 macro API without changing its JavaScript contract."
@@ -0,0 +1,206 @@
1
+ # Expo Modules API 2.0 Compatibility Checks
2
+
3
+ The Expo Modules API 2.0 design and implementation evolve across three packages: the `expo-modules-macros` compiler plugin, `expo-modules-core`, and `expo-modules-jsi`. Verify the installed dependencies instead of relying on an SDK-number claim.
4
+
5
+ A fourth package, `expo-modules-cli`, provides the `expo-modules` command for module authors. `expo` depends on it and exposes the command as its own bin, so every project that depends on `expo` has it. Its `swift:check` and `swift:expand` commands run the macros of the installed `expo-modules-macros` version on Swift sources, without a build. See "Inspect the generated code".
6
+
7
+ ## Find the actual declarations
8
+
9
+ Locate `ExpoModulesMacros.swift` in the target repository or installed dependencies (use your search tool, or portable shell commands - do not assume `rg` is installed):
10
+
11
+ ```bash
12
+ find . -name 'ExpoModulesMacros.swift' -not -path '*/node_modules/.cache/*'
13
+ ```
14
+
15
+ Inspect the macros that the user's source can import, and the options that `@JS` accepts:
16
+
17
+ ```bash
18
+ grep -nE 'public macro (ExpoModule|JS|Event|SharedObject|Record|Union|ViewProps|ExpoView)' <path-to-ExpoModulesMacros.swift>
19
+ grep -nE '^ case ' <path-to-ExpoModulesMacros.swift>
20
+ ```
21
+
22
+ In SDK 58, core declares `@ExpoModule`, `@JS`, `@Event`, `@SharedObject`, `@Record`, and `@Union`, and the `@JS` options `.concurrent` and `.withAsync`. It does not declare `@ViewProps` or `@ExpoView`. The plugin implements both, but source cannot use them until core declares them.
23
+
24
+ A declaration proves only that Swift recognizes the attribute, not that the code the macro generates will compile and run against the installed core.
25
+
26
+ ## Check paired core support
27
+
28
+ The three packages can drift independently, so a successful macro expansion does not prove the generated code links or is called at runtime. The binding hooks live in `expo-modules-core`. The value conversions, including free-form `Any`, `Task`, and closure callbacks, live in `expo-modules-jsi`. Search both.
29
+
30
+ > The symbol names in this section are macro internals, for your own verification only. Never print them in the conversation, name them in your report, or write them into the migrated module's source. Report a capability by its macro (`@JS static`, `@Event(sync:)`) and by observable JS behavior. See the reporting rule in `SKILL.md`.
31
+
32
+ **Fast pre-check.** Search core and JSI for the hooks the generated code calls, to rule out an unsupported capability before you write any Swift:
33
+
34
+ ```bash
35
+ grep -rnE '_decorateModule|_decorateSharedObject|_constructSharedObject|_jsName|EventEmitter|emitSync|didCreate|decodeAnyDictionary|encodeAny|extension Task: JavaScriptEncodable|JavaScriptCallback|JSOptions|withAsync|UnionCaseMismatch' <expo-modules-core> <expo-modules-jsi>
36
+ ```
37
+
38
+ An absent hook is strong evidence the capability is unavailable. A present one is weaker: it proves the symbol exists, not that its signature matches what the plugin generates or that core ever calls it.
39
+
40
+ **Confirm by compiling.** Write the smallest `@JS` member that uses the capability. Run `swift:check` (see "Inspect the generated code") to see the macro's own errors without a build. Then build the module target against the installed core and read the diagnostics:
41
+
42
+ - The build succeeds: the capability is supported end to end.
43
+ - The macro reports an error or warning: the plugin itself rejects the construct. The diagnostic names the supported alternative.
44
+ - Expansion succeeds but the build fails on a missing symbol or an override with nothing to override: the plugin is ahead of core. Keep the member in the 1.0 DSL.
45
+
46
+ Then exercise the member from the example app or a test, because a binding can link and still never be invoked.
47
+
48
+ ## Capability gates
49
+
50
+ Treat these as independent capabilities. Confirm each by compiling a minimal member that uses it, then calling it from JS. The SDK 58 column records what SDK 58 provides at the floor in `SKILL.md`. Use it to decide where to look first, not in place of the checks.
51
+
52
+ | Capability | Macro surface | Hook to grep (internal) | SDK 58 | Confirm by |
53
+ | --- | --- | --- | --- | --- |
54
+ | Module functions/properties | `@ExpoModule`, `@JS` | `_decorateModule` and its call site | yes | calling the function and reading the property from JS |
55
+ | Module name | `@ExpoModule("Name")` | `_jsName` and the name lookup that reads it | yes, but a `Name(...)` entry wins over it | resolving the module under its expected JS name |
56
+ | Records | `@Record` | coding conformances and field decode/encode | yes, on a struct or a `final class` with no inheritance clause | round-tripping a record argument and a record return value |
57
+ | Async events | `@Event` | `EventEmitter` on modules and shared objects | yes | receiving an emitted event through the module's JS listener |
58
+ | Shared-object instances | `@SharedObject`, `@JS` | `_decorateSharedObject(prototype:)`, construction hook | yes | constructing one from JS and calling an instance member |
59
+ | Shared-object static members | `@JS static` | `_decorateSharedObject(constructor:)`, distinct from the `prototype:` overload | yes | calling the member on the JS class itself, not an instance |
60
+ | Shared-object subclasses | `@SharedObject` on a `SharedRef<T>` subclass or another indirect subclass | none, the compiler checks the superclass | yes | constructing one from JS and calling a member |
61
+ | Lazy properties | `@JS lazy var` | none, the macro binds a getter that stores the value | yes | reading the property twice from JS and seeing one native evaluation |
62
+ | Tuples | tuples in `@JS`, `@Record`, `@Union`, `@Event`, and closure arguments | `decodeTuple` and `encodeTuple` in JSI | yes | round-tripping an unlabeled tuple as an array and a labeled one as an object |
63
+ | Synchronous events | `@Event(sync:)` | `emitSync` overloads | **no**, core and JSI have no `emitSync` | observing the listener run before the emit call returns |
64
+ | Task-returning functions | `@JS` returning `Task` | `JavaScriptEncodable` for `Task` in JSI (encode-only) | yes | awaiting the returned promise in JS |
65
+ | Views | `@ViewProps`, `@ExpoView` | the macro declarations in `ExpoModulesMacros.swift` | **no**, core does not declare them | rendering the view and updating every prop from JS |
66
+ | Module lifecycle methods | lifecycle members on the module class | `AnyModule` requirements and holder call sites | yes | observing each hook fire |
67
+ | Free-form `Any` | `@JS` and `@Record` with `Any`, `[Any]`, `[String: Any]` | `decodeAny…` and `encodeAny…` in JSI | yes | passing a JS object through and back |
68
+ | Closure arguments | `@JS` with a function-typed parameter | `JavaScriptCallback` in JSI | yes | calling the closure from native code and reading the JS result |
69
+ | Off-JS-thread async start | `@JS(.concurrent)` | `JSOptions` and the options-taking `@JS` overload | yes | the `@JS` declaration accepting the option |
70
+ | Promise variant of a sync function | `@JS("nameSync", .withAsync("name"))` | `withAsync` in `JSOptions` | yes | calling both JS names |
71
+ | Typed N-case unions | `@Union` | `Union` macro declaration and `UnionCaseMismatch` | yes | round-tripping each case through the JS boundary |
72
+ | Autolinked `@ExpoModule` discovery | none, it is a build-time step | `scanModules` in `expo-modules-autolinking` | yes | the module loading without an `apple.modules` list |
73
+
74
+ If a capability cannot be confirmed, keep that item in the 1.0 DSL.
75
+
76
+ ## Known migration hazards
77
+
78
+ Use this only as a warning list; installed source wins.
79
+
80
+ - Async threading changed architecturally, not just syntactically: a 2.0 `async` member starts on the JS thread and leaves it at the first suspension point, where a 1.0 `AsyncFunction` never ran there. A verbatim migration can move blocking work onto the JS thread with no signature change. `@JS(.concurrent)` restores the 1.0 behavior. In Swift 6 language mode, `.concurrent`, `.withAsync`, and a detached `Task` need the module or shared object to be `@unchecked Sendable`, which newer macros add themselves. See the threading section in `references/migration-map.md`.
81
+ - Same-JS-name `@JS` overload grouping and dispatch were designed but never built. The plugin reports two `@JS` members with one JS name on one object as a build error. A shared object's static and instance members bind onto different JS objects, so they can share a name.
82
+ - `@Union` decoding is first-match in case-declaration order, so preserving a 1.0 `Either`'s type order is part of the contract. See the unions section in `references/migration-map.md`.
83
+ - Decode errors lacked the 1.0 argument-index wrapper. This affects diagnostics rather than call semantics, but tests asserting exact messages may fail.
84
+ - The plugin in SDK 58 implements `@ViewProps` and `@ExpoView`, but core does not declare either macro and has no typed view-props runtime. Views stay on the 1.0 DSL.
85
+ - `@Event(sync: true)` macro generation exists, but SDK 58 core and JSI have no `emitSync`.
86
+ - Shared-object `@JS static`/`class` members bind onto the JS class object through a `constructor:`-labeled decoration hook, separate from the `prototype:` one used for instance members. Instance support does not imply static support, so confirm a static member by calling it on the JS class.
87
+ - Async `@JS` bindings are two-phase: arguments decode synchronously before the asynchronous boundary, and return values encode on the JS thread. A 1.0 async function whose argument decoding had side effects ordered after the hop can therefore observe a different order.
88
+ - On SDK 58, `JavaScriptValue` is a non-copyable struct, and DSL `Function`, `AsyncFunction`, `Property`, and `Field` no longer accept it in their signatures. A DSL member that takes or returns a `JavaScriptValue` no longer compiles. Migrate it to `@JS` and take the value as `borrowing JavaScriptValue`. To keep the value after the call returns, store `value.ref()` and read it back with `take()` or `withUnwrappedValue(_:)`. Write `.undefined()` and `.null()`, which are functions now.
89
+ - Core reads the `@ExpoModule` name only when the module has no `Name(...)` entry. In mixed mode a leftover `Name(...)` wins, so a mismatch between the two names is silent.
90
+ - A no-payload `@Event` (`() -> Void`) sends `undefined`. A 1.0 `sendEvent("name")` without a body sent `{}`.
91
+ - `OnAppContextDestroys`, `OnAppEntersForeground`, `OnAppEntersBackground`, and `OnAppBecomesActive` have no 2.0 hook. They stay in `definition()`.
92
+
93
+ ## Macro changes in SDK 58 that affect a migration
94
+
95
+ All of them are present under the `expo` `58.0.21` floor in `SKILL.md`.
96
+
97
+ ### Free-form `Any`
98
+
99
+ `Any`, `[Any]`, and `[String: Any]` are accepted as `@JS` arguments, return values, and properties, and as `@Record` fields. One optional layer (`[String: Any]?`) also works, and so do nested types built from `Any`, arrays, `String`-keyed dictionaries, and optionals (`[String: [Any]]`). They convert through dedicated free-form methods in JSI, not through `JavaScriptDecodable`/`JavaScriptEncodable`.
100
+
101
+ A 1.0 DSL member with a loosely typed dictionary can therefore keep its Swift signature. Prefer a typed `@Record` only when the user asks for an API-shape change.
102
+
103
+ ### Closure arguments
104
+
105
+ A `@JS` function or initializer can take a closure parameter, such as `(Point) throws -> Size` or `(String) async throws -> Data`. JS passes a function for it. Native code can store the closure and call it from any thread.
106
+
107
+ - A closure that returns a value must be `throws`, so that an error from JS can reach the caller.
108
+ - A throwing or value-returning closure blocks the caller until JS returns. An `async` closure suspends instead and awaits the promise that the JS function returns.
109
+ - A non-throwing `Void` closure returns before JS reads its arguments, so do not change a class instance after passing it to one.
110
+ - An optional closure (`((Int) -> Void)?`) turns JS `null` and `undefined` into `nil`.
111
+ - A closure nested in another type, such as an array, is not a closure parameter.
112
+ - The closure type accepts only the `@escaping` and `@Sendable` attributes. Its parameters cannot be variadic, `inout`, closures, or free-form `Any`, and it cannot use typed throws.
113
+ - A `@JS` function cannot return a closure, and a `@JS` property cannot have a closure type.
114
+
115
+ ### Parameters and names
116
+
117
+ - `inout` and `isolated` parameters are build errors, because a `@JS` argument is a fresh value decoded from JS. `borrowing`, `consuming`, and `sending` parameters are accepted.
118
+ - A backticked Swift name binds under its bare name: ``@JS func `default`()`` is `default` in JS.
119
+
120
+ ### `.withAsync`
121
+
122
+ `@JS("readSync", .withAsync("read"))` binds a synchronous function under its own JS name, and binds it again under the given name as a function that returns a promise and runs the body on the concurrent thread pool. See the threading section in `references/migration-map.md`. The macro rejects it on an `async` function, a property, or an initializer, and on a function isolated to a global actor.
123
+
124
+ ### Records
125
+
126
+ `@Record` types convert without an app context. A `@Record` class must be `final` and have no inheritance clause, or the build fails; declare its protocol conformances in an extension. A 1.0 `class Options: Record` therefore becomes `@Record final class Options`, or a struct.
127
+
128
+ ### Static members on shared objects
129
+
130
+ `static` and `class` `@JS` members of a `@SharedObject` class bind onto the JS class itself, so JS calls them as `Cache.open(name)`. A 1.0 `StaticFunction` or `StaticAsyncFunction` migrates to one. See the static members section in `references/migration-map.md`.
131
+
132
+ ### `lazy` properties and shared-object subclasses
133
+
134
+ - A `@JS lazy var` is read-only from JS. Its first read stores the value as a data property on the JS object, so later reads do not call native code. On a frozen JS object the value is not stored, and each read calls the getter. This is the closest mapping for a 1.0 `Constant`.
135
+ - `@SharedObject` accepts a `SharedRef<T>` subclass and any other indirect `SharedObject` subclass. The compiler, not the macro, reports a class that is not a `SharedObject` subclass. Each `@SharedObject` class exposes only the `@JS` members that it declares. That matches 1.0, where a `Class(...)` block could not inherit from another.
136
+
137
+ ### Tuples
138
+
139
+ A tuple can cross the boundary as a `@JS` argument, result, or property, a `@Record` property, a `@Union` or `@Event` payload, or a parameter or result of a closure argument that is not `async`.
140
+
141
+ - An unlabeled tuple such as `(Int, String)` converts to an array with one value per element. A labeled tuple such as `(x: Double, y: Double)` converts to an object with one property per label.
142
+ - A tuple must have two or more elements, all labeled or none, and each element must be convertible. Tuples nest in other tuples, optionals, arrays, and `String`-keyed dictionaries.
143
+ - A type alias of a tuple, such as `typealias Span = (start: Int, end: Int)`, resolves only when the `@ExpoModule` or `@SharedObject` class body declares it.
144
+
145
+ ### Package and binary names
146
+
147
+ The package is `expo-modules-macros`, formerly `@expo/expo-modules-macros-plugin`, and the executable is `ExpoModulesMacros`, formerly `ExpoModulesMacros-tool`. `pod install` adds `-load-plugin-executable <plugin>/apple/ExpoModulesMacros#ExpoModulesMacros` to `OTHER_SWIFT_FLAGS`. Look for that flag when the compiler cannot find the macro implementation.
148
+
149
+ ## Autolinked module discovery
150
+
151
+ On SDK 58, autolinking scans the package sources for `@ExpoModule` classes when it generates the modules provider. The rules that matter for a migration:
152
+
153
+ - When `expo-module.config.json` has an `apple.modules` list, even an empty one, autolinking uses only that list and ignores the scan.
154
+ - Without the list, it links every scanned class that is `public` or `open` and compiles for the target platform. An `internal` class gets a warning, and a lower access level opts the class out silently.
155
+ - A class inside an `#if` condition that the scanner cannot evaluate statically, such as `#if DEBUG` or `canImport(...)`, is skipped with a warning. List such a class in `apple.modules`.
156
+ - The scan skips `Tests`, `UITests`, `__tests__`, `__mocks__`, `example`, `examples`, `e2e`, `Pods`, `node_modules`, `.build`, and `.git` directories. A module class kept under one of those names needs the list.
157
+ - The scan finds only classes with the `@ExpoModule` attribute. A package that still has a module on the 1.0 DSL alone needs the list.
158
+
159
+ Run the scanners yourself as migration checks. Run this from the module package root, and pass the scanner's name, `scanModules` or `scanExports`, as the argument:
160
+
161
+ ```bash
162
+ node -e "
163
+ const path = require('path');
164
+ let dir = process.cwd();
165
+ for (const name of ['expo', 'expo-modules-core', 'expo-modules-macros']) {
166
+ dir = path.dirname(require.resolve(name + '/package.json', { paths: [dir] }));
167
+ }
168
+ require(dir)[process.argv[1]](['ios']).then((r) => console.log(JSON.stringify(r, null, 2)));
169
+ " scanModules
170
+ ```
171
+
172
+ The script resolves `expo`, then `expo-modules-core` from it, then `expo-modules-macros` from that, which is how `expo-modules-cli` finds the macros. Only `expo` has to be a dependency of the module, so the script also works with pnpm and bun isolated installs, where `expo-modules-core` cannot be resolved from the module root.
173
+
174
+ `scanModules` reports each detected class with its Swift `name`, `jsName`, `accessLevel`, and `platforms`, plus `warnings`. It catches an `@ExpoModule` that landed in a conditional block or on a non-public class.
175
+
176
+ `scanExports` reports the macro-declared surface: `modules`, `sharedObjects`, `records`, `unions`, and `enums`. Each module lists its `functions` (with `jsName`, `parameters`, `async`, `throws`, and `static`), `properties` (with `readonly`), `events` (with `jsName`, `payload`, and `sync`), and `classes`. Compare it against the inventory from step 1. It does not report members that stay in the DSL.
177
+
178
+ ## Inspect the generated code
179
+
180
+ `expo-modules-cli` has two commands that run the macros on Swift sources without a build. Both find the `expo-modules-macros` version through the package's `expo` and `expo-modules-core`, which is the version the iOS build compiles with. Run them from the module package root:
181
+
182
+ ```bash
183
+ # Only the macro errors and warnings, and a summary. The exit code is 1 when there is an error.
184
+ npx --no-install expo-modules swift:check ios
185
+
186
+ # The code that the macros generate, for a file or for one type or member.
187
+ npx --no-install expo-modules swift:expand ios/MyModule.swift
188
+ npx --no-install expo-modules swift:expand --symbol MyModule.load ios/MyModule.swift
189
+ ```
190
+
191
+ `expo` declares the `expo-modules` bin itself and forwards it to `expo-modules-cli`, so every package manager links it into `node_modules/.bin`, also with pnpm and bun isolated installs. `pnpm exec expo-modules` and `bunx expo-modules` run the same command. It needs `expo` installed in the module package; when the command is missing, install the module's dependencies. `--no-install` keeps `npx` from downloading a package from npm in that case. A path is a `.swift` file or a directory. In a directory, only the files that use a macro are expanded, and test and example directories are skipped. The diagnostics use the compiler's `<file>:<line>:<column>: error: <message>` format. `--json` prints a report instead of text, and then the exit code is 0 even when there is an error.
192
+
193
+ Use `swift:check` to find a macro error fast, and `swift:expand` to see why a binding does not behave as expected. Do not copy the expansion into the module source, and do not quote it to the user: it consists of the internal symbols that the handoff rule in `SKILL.md` keeps out of reports. The macros see only syntax, so code with no diagnostics can still fail to type-check, build, or link against the installed core.
194
+
195
+ ## Integration verification
196
+
197
+ Use the target project's own commands. A robust sequence is:
198
+
199
+ 1. Run macro/unit tests if working inside the macros package.
200
+ 2. Run `npx --no-install expo-modules swift:check ios` on the module's iOS sources.
201
+ 3. Compile the migrated native module against the installed core.
202
+ 4. Re-run CocoaPods installation when plugin dependencies or injection changed.
203
+ 5. Restart Xcode after swapping a macro plugin binary; cleaning DerivedData alone may not reload it.
204
+ 6. Build the example app and execute existing JS/TS behavior tests.
205
+
206
+ Do not report a migration complete based only on `swift:check`, `swift:expand`, or textual expansion tests.