@shopify/shop-minis-cli 0.0.172 → 0.0.173

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 (517) hide show
  1. package/README_INTERNAL.md +153 -0
  2. package/build/commands/app/index.js +1 -2
  3. package/build/commands/app/index.js.map +1 -1
  4. package/build/commands/cancel-submission/cancel-submission.js +2 -2
  5. package/build/commands/cancel-submission/cancel-submission.js.map +1 -1
  6. package/build/commands/cancel-submission/index.js +1 -1
  7. package/build/commands/cancel-submission/index.js.map +1 -1
  8. package/build/commands/check-submission/index.js +13 -6
  9. package/build/commands/check-submission/index.js.map +1 -1
  10. package/build/commands/codemod/index.js +0 -9
  11. package/build/commands/codemod/index.js.map +1 -1
  12. package/build/commands/codemod/releases/index.js +2 -72
  13. package/build/commands/codemod/releases/index.js.map +1 -1
  14. package/build/commands/config.d.ts +2 -2
  15. package/build/commands/config.js +3 -2
  16. package/build/commands/config.js.map +1 -1
  17. package/build/commands/create/examples/default/.cursorrules +25 -0
  18. package/{templates/__template_common/gitignore → build/commands/create/examples/default/_gitignore} +0 -1
  19. package/build/commands/create/examples/default/index.html +15 -0
  20. package/build/commands/create/examples/default/package.json +18 -0
  21. package/build/commands/create/examples/default/src/App.tsx +25 -0
  22. package/build/commands/create/examples/default/src/icon.png +0 -0
  23. package/build/commands/create/examples/default/src/index.css +1 -0
  24. package/build/commands/create/examples/default/src/main.tsx +14 -0
  25. package/build/commands/create/examples/default/src/manifest.json +6 -0
  26. package/build/commands/{create-mini/standalone/examples/with-getting-started → create/examples/default}/tsconfig.json +6 -14
  27. package/build/commands/create/examples/default/vite.config.mjs +11 -0
  28. package/build/commands/{create-mini/standalone → create}/index.js +6 -26
  29. package/build/commands/create/index.js.map +1 -0
  30. package/build/commands/{create-mini → create}/utils/examples.d.ts +1 -1
  31. package/build/commands/{create-mini → create}/utils/examples.js +13 -9
  32. package/build/commands/create/utils/examples.js.map +1 -0
  33. package/build/commands/create/utils/index.js.map +1 -0
  34. package/build/commands/dev/index.d.ts +0 -11
  35. package/build/commands/dev/index.js +32 -58
  36. package/build/commands/dev/index.js.map +1 -1
  37. package/build/commands/dev/types.d.ts +46 -0
  38. package/build/commands/dev/{utils/types.js → types.js} +5 -0
  39. package/build/commands/dev/types.js.map +1 -0
  40. package/build/commands/dev/utils/binaries.d.ts +1 -1
  41. package/build/commands/dev/utils/build-type.d.ts +1 -1
  42. package/build/commands/dev/utils/build-type.js +1 -1
  43. package/build/commands/dev/utils/build-type.js.map +1 -1
  44. package/build/commands/dev/utils/deeplink.d.ts +3 -15
  45. package/build/commands/dev/utils/deeplink.js +12 -59
  46. package/build/commands/dev/utils/deeplink.js.map +1 -1
  47. package/build/commands/dev/utils/interactive-terminal.d.ts +6 -5
  48. package/build/commands/dev/utils/interactive-terminal.js +25 -65
  49. package/build/commands/dev/utils/interactive-terminal.js.map +1 -1
  50. package/build/commands/dev/utils/network.d.ts +1 -2
  51. package/build/commands/dev/utils/network.js.map +1 -1
  52. package/build/commands/dev/utils/platform.d.ts +1 -4
  53. package/build/commands/dev/utils/platform.js +1 -5
  54. package/build/commands/dev/utils/platform.js.map +1 -1
  55. package/build/commands/dev/utils/start-app/config.d.ts +1 -2
  56. package/build/commands/dev/utils/start-app/config.js +1 -1
  57. package/build/commands/dev/utils/start-app/config.js.map +1 -1
  58. package/build/commands/dev/utils/start-app/start-app-with-options.d.ts +1 -1
  59. package/build/commands/dev/utils/start-app/start-app-with-options.js +5 -3
  60. package/build/commands/dev/utils/start-app/start-app-with-options.js.map +1 -1
  61. package/build/commands/dev/utils/start-app/start-app.d.ts +1 -1
  62. package/build/commands/dev/utils/start-app/start-app.js.map +1 -1
  63. package/build/commands/dev/utils/version.d.ts +1 -2
  64. package/build/commands/dev/utils/version.js +3 -2
  65. package/build/commands/dev/utils/version.js.map +1 -1
  66. package/build/commands/dev/utils/web-server.d.ts +1 -0
  67. package/build/commands/dev/utils/web-server.js +16 -0
  68. package/build/commands/dev/utils/web-server.js.map +1 -0
  69. package/build/commands/doctor/index.js +10 -3
  70. package/build/commands/doctor/index.js.map +1 -1
  71. package/build/commands/features/index.js +2 -2
  72. package/build/commands/features/index.js.map +1 -1
  73. package/build/commands/info/index.js +3 -11
  74. package/build/commands/info/index.js.map +1 -1
  75. package/build/commands/install/index.d.ts +2 -0
  76. package/build/commands/install/index.js +65 -0
  77. package/build/commands/install/index.js.map +1 -0
  78. package/build/commands/setup/index.js +9 -1
  79. package/build/commands/setup/index.js.map +1 -1
  80. package/build/commands/submit/config.js +1 -1
  81. package/build/commands/submit/errors.js +24 -2
  82. package/build/commands/submit/errors.js.map +1 -1
  83. package/build/commands/submit/index.js +18 -2
  84. package/build/commands/submit/index.js.map +1 -1
  85. package/build/commands/submit/submit.d.ts +2 -2
  86. package/build/commands/submit/submit.js +63 -53
  87. package/build/commands/submit/submit.js.map +1 -1
  88. package/build/commands/submit/tasks.d.ts +2 -1
  89. package/build/commands/submit/tasks.js +5 -4
  90. package/build/commands/submit/tasks.js.map +1 -1
  91. package/build/commands/submit/types.d.ts +5 -0
  92. package/build/commands/submit/utils/assert-core-dependencies-version.d.ts +1 -3
  93. package/build/commands/submit/utils/assert-core-dependencies-version.js +6 -85
  94. package/build/commands/submit/utils/assert-core-dependencies-version.js.map +1 -1
  95. package/build/commands/sync-user-metafield-definitions/index.js +7 -5
  96. package/build/commands/sync-user-metafield-definitions/index.js.map +1 -1
  97. package/build/commands/upgrade/index.d.ts +0 -1
  98. package/build/commands/upgrade/index.js +20 -56
  99. package/build/commands/upgrade/index.js.map +1 -1
  100. package/build/constants/dev-panel.d.ts +3 -0
  101. package/build/constants/dev-panel.js +4 -0
  102. package/build/constants/dev-panel.js.map +1 -0
  103. package/build/data/create-submission.d.ts +2 -1
  104. package/build/data/create-submission.js +13 -4
  105. package/build/data/create-submission.js.map +1 -1
  106. package/build/data/get-submissions.d.ts +3 -2
  107. package/build/data/get-submissions.js +3 -1
  108. package/build/data/get-submissions.js.map +1 -1
  109. package/build/data/types/autogenerated/shop-minis-admin-api/gql.d.ts +3 -2
  110. package/build/data/types/autogenerated/shop-minis-admin-api/gql.js +1 -1
  111. package/build/data/types/autogenerated/shop-minis-admin-api/gql.js.map +1 -1
  112. package/build/data/types/autogenerated/shop-minis-admin-api/graphql.d.ts +11 -3
  113. package/build/data/types/autogenerated/shop-minis-admin-api/graphql.js +21 -1
  114. package/build/data/types/autogenerated/shop-minis-admin-api/graphql.js.map +1 -1
  115. package/build/index.d.ts +1 -1
  116. package/build/index.js +1 -0
  117. package/build/index.js.map +1 -1
  118. package/build/program.js +5 -7
  119. package/build/program.js.map +1 -1
  120. package/build/schemas/manifest.schema.json +0 -211
  121. package/build/utils/allowed-dependencies.d.ts +5 -0
  122. package/build/utils/allowed-dependencies.js +21 -0
  123. package/build/utils/allowed-dependencies.js.map +1 -0
  124. package/build/utils/dependencies.d.ts +7 -0
  125. package/build/utils/dependencies.js +275 -0
  126. package/build/utils/dependencies.js.map +1 -0
  127. package/build/utils/minis-manifest.js +0 -7
  128. package/build/utils/minis-manifest.js.map +1 -1
  129. package/build/utils/package-manager.d.ts +25 -13
  130. package/build/utils/package-manager.js +56 -36
  131. package/build/utils/package-manager.js.map +1 -1
  132. package/package.json +7 -15
  133. package/build/commands/codemod/releases/v0-0-100.d.ts +0 -3
  134. package/build/commands/codemod/releases/v0-0-100.js +0 -50
  135. package/build/commands/codemod/releases/v0-0-100.js.map +0 -1
  136. package/build/commands/codemod/releases/v0-0-103.d.ts +0 -3
  137. package/build/commands/codemod/releases/v0-0-103.js +0 -43
  138. package/build/commands/codemod/releases/v0-0-103.js.map +0 -1
  139. package/build/commands/codemod/releases/v0-0-105.d.ts +0 -3
  140. package/build/commands/codemod/releases/v0-0-105.js +0 -59
  141. package/build/commands/codemod/releases/v0-0-105.js.map +0 -1
  142. package/build/commands/codemod/releases/v0-0-106.d.ts +0 -3
  143. package/build/commands/codemod/releases/v0-0-106.js +0 -32
  144. package/build/commands/codemod/releases/v0-0-106.js.map +0 -1
  145. package/build/commands/codemod/releases/v0-0-114.d.ts +0 -3
  146. package/build/commands/codemod/releases/v0-0-114.js +0 -48
  147. package/build/commands/codemod/releases/v0-0-114.js.map +0 -1
  148. package/build/commands/codemod/releases/v0-0-115.d.ts +0 -3
  149. package/build/commands/codemod/releases/v0-0-115.js +0 -50
  150. package/build/commands/codemod/releases/v0-0-115.js.map +0 -1
  151. package/build/commands/codemod/releases/v0-0-121.d.ts +0 -3
  152. package/build/commands/codemod/releases/v0-0-121.js +0 -74
  153. package/build/commands/codemod/releases/v0-0-121.js.map +0 -1
  154. package/build/commands/codemod/releases/v0-0-123.d.ts +0 -3
  155. package/build/commands/codemod/releases/v0-0-123.js +0 -33
  156. package/build/commands/codemod/releases/v0-0-123.js.map +0 -1
  157. package/build/commands/codemod/releases/v0-0-125.d.ts +0 -3
  158. package/build/commands/codemod/releases/v0-0-125.js +0 -37
  159. package/build/commands/codemod/releases/v0-0-125.js.map +0 -1
  160. package/build/commands/codemod/releases/v0-0-130.d.ts +0 -3
  161. package/build/commands/codemod/releases/v0-0-130.js +0 -26
  162. package/build/commands/codemod/releases/v0-0-130.js.map +0 -1
  163. package/build/commands/codemod/releases/v0-0-139.d.ts +0 -3
  164. package/build/commands/codemod/releases/v0-0-139.js +0 -26
  165. package/build/commands/codemod/releases/v0-0-139.js.map +0 -1
  166. package/build/commands/codemod/releases/v0-0-163.d.ts +0 -3
  167. package/build/commands/codemod/releases/v0-0-163.js +0 -26
  168. package/build/commands/codemod/releases/v0-0-163.js.map +0 -1
  169. package/build/commands/codemod/releases/v0-0-42/index.d.ts +0 -3
  170. package/build/commands/codemod/releases/v0-0-42/index.js +0 -46
  171. package/build/commands/codemod/releases/v0-0-42/index.js.map +0 -1
  172. package/build/commands/codemod/releases/v0-0-42/reset-files.d.ts +0 -7
  173. package/build/commands/codemod/releases/v0-0-42/reset-files.js +0 -83
  174. package/build/commands/codemod/releases/v0-0-42/reset-files.js.map +0 -1
  175. package/build/commands/codemod/releases/v0-0-43.d.ts +0 -3
  176. package/build/commands/codemod/releases/v0-0-43.js +0 -32
  177. package/build/commands/codemod/releases/v0-0-43.js.map +0 -1
  178. package/build/commands/codemod/releases/v0-0-44.d.ts +0 -3
  179. package/build/commands/codemod/releases/v0-0-44.js +0 -214
  180. package/build/commands/codemod/releases/v0-0-44.js.map +0 -1
  181. package/build/commands/codemod/releases/v0-0-45.d.ts +0 -3
  182. package/build/commands/codemod/releases/v0-0-45.js +0 -23
  183. package/build/commands/codemod/releases/v0-0-45.js.map +0 -1
  184. package/build/commands/codemod/releases/v0-0-50.d.ts +0 -3
  185. package/build/commands/codemod/releases/v0-0-50.js +0 -34
  186. package/build/commands/codemod/releases/v0-0-50.js.map +0 -1
  187. package/build/commands/codemod/releases/v0-0-54.d.ts +0 -3
  188. package/build/commands/codemod/releases/v0-0-54.js +0 -70
  189. package/build/commands/codemod/releases/v0-0-54.js.map +0 -1
  190. package/build/commands/codemod/releases/v0-0-56.d.ts +0 -3
  191. package/build/commands/codemod/releases/v0-0-56.js +0 -48
  192. package/build/commands/codemod/releases/v0-0-56.js.map +0 -1
  193. package/build/commands/codemod/releases/v0-0-57.d.ts +0 -3
  194. package/build/commands/codemod/releases/v0-0-57.js +0 -41
  195. package/build/commands/codemod/releases/v0-0-57.js.map +0 -1
  196. package/build/commands/codemod/releases/v0-0-58.d.ts +0 -3
  197. package/build/commands/codemod/releases/v0-0-58.js +0 -68
  198. package/build/commands/codemod/releases/v0-0-58.js.map +0 -1
  199. package/build/commands/codemod/releases/v0-0-61.d.ts +0 -3
  200. package/build/commands/codemod/releases/v0-0-61.js +0 -30
  201. package/build/commands/codemod/releases/v0-0-61.js.map +0 -1
  202. package/build/commands/codemod/releases/v0-0-63.d.ts +0 -3
  203. package/build/commands/codemod/releases/v0-0-63.js +0 -42
  204. package/build/commands/codemod/releases/v0-0-63.js.map +0 -1
  205. package/build/commands/codemod/releases/v0-0-64.d.ts +0 -3
  206. package/build/commands/codemod/releases/v0-0-64.js +0 -47
  207. package/build/commands/codemod/releases/v0-0-64.js.map +0 -1
  208. package/build/commands/codemod/releases/v0-0-75.d.ts +0 -3
  209. package/build/commands/codemod/releases/v0-0-75.js +0 -30
  210. package/build/commands/codemod/releases/v0-0-75.js.map +0 -1
  211. package/build/commands/codemod/releases/v0-0-76.d.ts +0 -3
  212. package/build/commands/codemod/releases/v0-0-76.js +0 -32
  213. package/build/commands/codemod/releases/v0-0-76.js.map +0 -1
  214. package/build/commands/codemod/releases/v0-0-77.d.ts +0 -3
  215. package/build/commands/codemod/releases/v0-0-77.js +0 -39
  216. package/build/commands/codemod/releases/v0-0-77.js.map +0 -1
  217. package/build/commands/codemod/releases/v0-0-79.d.ts +0 -3
  218. package/build/commands/codemod/releases/v0-0-79.js +0 -35
  219. package/build/commands/codemod/releases/v0-0-79.js.map +0 -1
  220. package/build/commands/codemod/releases/v0-0-84.d.ts +0 -3
  221. package/build/commands/codemod/releases/v0-0-84.js +0 -41
  222. package/build/commands/codemod/releases/v0-0-84.js.map +0 -1
  223. package/build/commands/codemod/releases/v0-0-85.d.ts +0 -3
  224. package/build/commands/codemod/releases/v0-0-85.js +0 -60
  225. package/build/commands/codemod/releases/v0-0-85.js.map +0 -1
  226. package/build/commands/codemod/releases/v0-0-89.d.ts +0 -3
  227. package/build/commands/codemod/releases/v0-0-89.js +0 -60
  228. package/build/commands/codemod/releases/v0-0-89.js.map +0 -1
  229. package/build/commands/codemod/releases/v0-0-91/index.d.ts +0 -3
  230. package/build/commands/codemod/releases/v0-0-91/index.js +0 -38
  231. package/build/commands/codemod/releases/v0-0-91/index.js.map +0 -1
  232. package/build/commands/codemod/releases/v0-0-91/replace-dev-wrapper.d.ts +0 -5
  233. package/build/commands/codemod/releases/v0-0-91/replace-dev-wrapper.js +0 -45
  234. package/build/commands/codemod/releases/v0-0-91/replace-dev-wrapper.js.map +0 -1
  235. package/build/commands/codemod/releases/v0-0-91/replace-safe-area-imports.d.ts +0 -1
  236. package/build/commands/codemod/releases/v0-0-91/replace-safe-area-imports.js +0 -97
  237. package/build/commands/codemod/releases/v0-0-91/replace-safe-area-imports.js.map +0 -1
  238. package/build/commands/codemod/releases/v0-0-92.d.ts +0 -3
  239. package/build/commands/codemod/releases/v0-0-92.js +0 -38
  240. package/build/commands/codemod/releases/v0-0-92.js.map +0 -1
  241. package/build/commands/codemod/releases/v0-0-93/blank/App-after.d.ts +0 -1
  242. package/build/commands/codemod/releases/v0-0-93/blank/App-after.js +0 -15
  243. package/build/commands/codemod/releases/v0-0-93/blank/App-after.js.map +0 -1
  244. package/build/commands/codemod/releases/v0-0-93/blank/App-before.d.ts +0 -1
  245. package/build/commands/codemod/releases/v0-0-93/blank/App-before.js +0 -13
  246. package/build/commands/codemod/releases/v0-0-93/blank/App-before.js.map +0 -1
  247. package/build/commands/codemod/releases/v0-0-93/index.d.ts +0 -6
  248. package/build/commands/codemod/releases/v0-0-93/index.js +0 -7
  249. package/build/commands/codemod/releases/v0-0-93/index.js.map +0 -1
  250. package/build/commands/codemod/releases/v0-0-93/shoppable-posts/App-after.d.ts +0 -1
  251. package/build/commands/codemod/releases/v0-0-93/shoppable-posts/App-after.js +0 -53
  252. package/build/commands/codemod/releases/v0-0-93/shoppable-posts/App-after.js.map +0 -1
  253. package/build/commands/codemod/releases/v0-0-93/shoppable-posts/App-before.d.ts +0 -1
  254. package/build/commands/codemod/releases/v0-0-93/shoppable-posts/App-before.js +0 -43
  255. package/build/commands/codemod/releases/v0-0-93/shoppable-posts/App-before.js.map +0 -1
  256. package/build/commands/codemod/releases/v0-0-93/shoppable-videos/App-after.d.ts +0 -1
  257. package/build/commands/codemod/releases/v0-0-93/shoppable-videos/App-after.js +0 -49
  258. package/build/commands/codemod/releases/v0-0-93/shoppable-videos/App-after.js.map +0 -1
  259. package/build/commands/codemod/releases/v0-0-93/shoppable-videos/App-before.d.ts +0 -1
  260. package/build/commands/codemod/releases/v0-0-93/shoppable-videos/App-before.js +0 -42
  261. package/build/commands/codemod/releases/v0-0-93/shoppable-videos/App-before.js.map +0 -1
  262. package/build/commands/codemod/releases/v0-0-93.d.ts +0 -3
  263. package/build/commands/codemod/releases/v0-0-93.js +0 -48
  264. package/build/commands/codemod/releases/v0-0-93.js.map +0 -1
  265. package/build/commands/codemod/releases/v0-0-97/index.d.ts +0 -3
  266. package/build/commands/codemod/releases/v0-0-97/index.js +0 -20
  267. package/build/commands/codemod/releases/v0-0-97/index.js.map +0 -1
  268. package/build/commands/codemod/releases/v0-0-97/migrate-to-new-theme.d.ts +0 -1
  269. package/build/commands/codemod/releases/v0-0-97/migrate-to-new-theme.js +0 -47
  270. package/build/commands/codemod/releases/v0-0-97/migrate-to-new-theme.js.map +0 -1
  271. package/build/commands/codemod/releases/v0-0-97/remove-theme-from-config.d.ts +0 -1
  272. package/build/commands/codemod/releases/v0-0-97/remove-theme-from-config.js +0 -105
  273. package/build/commands/codemod/releases/v0-0-97/remove-theme-from-config.js.map +0 -1
  274. package/build/commands/create-extension/constants.d.ts +0 -44
  275. package/build/commands/create-extension/constants.js +0 -111
  276. package/build/commands/create-extension/constants.js.map +0 -1
  277. package/build/commands/create-extension/index.js +0 -71
  278. package/build/commands/create-extension/index.js.map +0 -1
  279. package/build/commands/create-extension/types.d.ts +0 -13
  280. package/build/commands/create-extension/types.js +0 -8
  281. package/build/commands/create-extension/types.js.map +0 -1
  282. package/build/commands/create-extension/utils/add-target-to-config.d.ts +0 -2
  283. package/build/commands/create-extension/utils/add-target-to-config.js +0 -48
  284. package/build/commands/create-extension/utils/add-target-to-config.js.map +0 -1
  285. package/build/commands/create-extension/utils/create-extension-files.d.ts +0 -11
  286. package/build/commands/create-extension/utils/create-extension-files.js +0 -96
  287. package/build/commands/create-extension/utils/create-extension-files.js.map +0 -1
  288. package/build/commands/create-extension/utils/create-from-template.d.ts +0 -3
  289. package/build/commands/create-extension/utils/create-from-template.js +0 -47
  290. package/build/commands/create-extension/utils/create-from-template.js.map +0 -1
  291. package/build/commands/create-extension/utils/format-extension-files.d.ts +0 -1
  292. package/build/commands/create-extension/utils/format-extension-files.js +0 -22
  293. package/build/commands/create-extension/utils/format-extension-files.js.map +0 -1
  294. package/build/commands/create-mini/index.d.ts +0 -2
  295. package/build/commands/create-mini/index.js +0 -11
  296. package/build/commands/create-mini/index.js.map +0 -1
  297. package/build/commands/create-mini/legacy/index.d.ts +0 -2
  298. package/build/commands/create-mini/legacy/index.js +0 -176
  299. package/build/commands/create-mini/legacy/index.js.map +0 -1
  300. package/build/commands/create-mini/legacy/utils/template-app.d.ts +0 -2
  301. package/build/commands/create-mini/legacy/utils/template-app.js +0 -84
  302. package/build/commands/create-mini/legacy/utils/template-app.js.map +0 -1
  303. package/build/commands/create-mini/standalone/examples/with-camera-access/.eslintignore +0 -1
  304. package/build/commands/create-mini/standalone/examples/with-camera-access/.eslintrc.js +0 -3
  305. package/build/commands/create-mini/standalone/examples/with-camera-access/.graphqlrc.js +0 -1
  306. package/build/commands/create-mini/standalone/examples/with-camera-access/.prettierrc.json +0 -8
  307. package/build/commands/create-mini/standalone/examples/with-camera-access/README.md +0 -30
  308. package/build/commands/create-mini/standalone/examples/with-camera-access/assets.d.ts +0 -14
  309. package/build/commands/create-mini/standalone/examples/with-camera-access/babel.config.js +0 -5
  310. package/build/commands/create-mini/standalone/examples/with-camera-access/index.tsx +0 -5
  311. package/build/commands/create-mini/standalone/examples/with-camera-access/metro.config.js +0 -3
  312. package/build/commands/create-mini/standalone/examples/with-camera-access/package.json +0 -33
  313. package/build/commands/create-mini/standalone/examples/with-camera-access/src/App.tsx +0 -152
  314. package/build/commands/create-mini/standalone/examples/with-camera-access/src/index.tsx +0 -9
  315. package/build/commands/create-mini/standalone/examples/with-camera-access/src/manifest.json +0 -5
  316. package/build/commands/create-mini/standalone/examples/with-camera-access/tsconfig.json +0 -41
  317. package/build/commands/create-mini/standalone/examples/with-fal-ai/.eslintignore +0 -1
  318. package/build/commands/create-mini/standalone/examples/with-fal-ai/.eslintrc.js +0 -3
  319. package/build/commands/create-mini/standalone/examples/with-fal-ai/.graphqlrc.js +0 -1
  320. package/build/commands/create-mini/standalone/examples/with-fal-ai/.prettierrc.json +0 -8
  321. package/build/commands/create-mini/standalone/examples/with-fal-ai/README.md +0 -46
  322. package/build/commands/create-mini/standalone/examples/with-fal-ai/assets.d.ts +0 -14
  323. package/build/commands/create-mini/standalone/examples/with-fal-ai/babel.config.js +0 -5
  324. package/build/commands/create-mini/standalone/examples/with-fal-ai/index.tsx +0 -5
  325. package/build/commands/create-mini/standalone/examples/with-fal-ai/metro.config.js +0 -3
  326. package/build/commands/create-mini/standalone/examples/with-fal-ai/package.json +0 -33
  327. package/build/commands/create-mini/standalone/examples/with-fal-ai/src/App.tsx +0 -5
  328. package/build/commands/create-mini/standalone/examples/with-fal-ai/src/index.tsx +0 -9
  329. package/build/commands/create-mini/standalone/examples/with-fal-ai/src/manifest.json +0 -21
  330. package/build/commands/create-mini/standalone/examples/with-fal-ai/src/screens/HomeScreen.tsx +0 -142
  331. package/build/commands/create-mini/standalone/examples/with-fal-ai/tsconfig.json +0 -41
  332. package/build/commands/create-mini/standalone/examples/with-getting-started/.eslintignore +0 -1
  333. package/build/commands/create-mini/standalone/examples/with-getting-started/.eslintrc.js +0 -3
  334. package/build/commands/create-mini/standalone/examples/with-getting-started/.graphqlrc.js +0 -1
  335. package/build/commands/create-mini/standalone/examples/with-getting-started/.prettierrc.json +0 -8
  336. package/build/commands/create-mini/standalone/examples/with-getting-started/README.md +0 -18
  337. package/build/commands/create-mini/standalone/examples/with-getting-started/assets.d.ts +0 -14
  338. package/build/commands/create-mini/standalone/examples/with-getting-started/babel.config.js +0 -5
  339. package/build/commands/create-mini/standalone/examples/with-getting-started/index.tsx +0 -5
  340. package/build/commands/create-mini/standalone/examples/with-getting-started/metro.config.js +0 -3
  341. package/build/commands/create-mini/standalone/examples/with-getting-started/package.json +0 -33
  342. package/build/commands/create-mini/standalone/examples/with-getting-started/src/App.tsx +0 -23
  343. package/build/commands/create-mini/standalone/examples/with-getting-started/src/index.tsx +0 -9
  344. package/build/commands/create-mini/standalone/examples/with-getting-started/src/manifest.json +0 -5
  345. package/build/commands/create-mini/standalone/examples/with-getting-started/src/screens/HomeScreen.tsx +0 -133
  346. package/build/commands/create-mini/standalone/examples/with-getting-started/src/screens/NativeFeaturesScreen.tsx +0 -138
  347. package/build/commands/create-mini/standalone/examples/with-getting-started/src/types/screens.ts +0 -5
  348. package/build/commands/create-mini/standalone/examples/with-search/.eslintignore +0 -1
  349. package/build/commands/create-mini/standalone/examples/with-search/.eslintrc.js +0 -3
  350. package/build/commands/create-mini/standalone/examples/with-search/.graphqlrc.js +0 -1
  351. package/build/commands/create-mini/standalone/examples/with-search/.prettierrc.json +0 -8
  352. package/build/commands/create-mini/standalone/examples/with-search/README.md +0 -25
  353. package/build/commands/create-mini/standalone/examples/with-search/assets.d.ts +0 -14
  354. package/build/commands/create-mini/standalone/examples/with-search/babel.config.js +0 -5
  355. package/build/commands/create-mini/standalone/examples/with-search/index.tsx +0 -5
  356. package/build/commands/create-mini/standalone/examples/with-search/metro.config.js +0 -3
  357. package/build/commands/create-mini/standalone/examples/with-search/package.json +0 -33
  358. package/build/commands/create-mini/standalone/examples/with-search/src/App.tsx +0 -23
  359. package/build/commands/create-mini/standalone/examples/with-search/src/components/HeaderAction.tsx +0 -32
  360. package/build/commands/create-mini/standalone/examples/with-search/src/components/ShopCard.tsx +0 -92
  361. package/build/commands/create-mini/standalone/examples/with-search/src/index.tsx +0 -9
  362. package/build/commands/create-mini/standalone/examples/with-search/src/manifest.json +0 -7
  363. package/build/commands/create-mini/standalone/examples/with-search/src/screens/MerchantSearchScreen.tsx +0 -126
  364. package/build/commands/create-mini/standalone/examples/with-search/src/screens/ProductSearchScreen.tsx +0 -115
  365. package/build/commands/create-mini/standalone/examples/with-search/src/types/screens.ts +0 -6
  366. package/build/commands/create-mini/standalone/examples/with-search/tsconfig.json +0 -41
  367. package/build/commands/create-mini/standalone/examples/with-user-data/.eslintignore +0 -1
  368. package/build/commands/create-mini/standalone/examples/with-user-data/.eslintrc.js +0 -3
  369. package/build/commands/create-mini/standalone/examples/with-user-data/.graphqlrc.js +0 -1
  370. package/build/commands/create-mini/standalone/examples/with-user-data/.prettierrc.json +0 -8
  371. package/build/commands/create-mini/standalone/examples/with-user-data/README.md +0 -26
  372. package/build/commands/create-mini/standalone/examples/with-user-data/assets.d.ts +0 -14
  373. package/build/commands/create-mini/standalone/examples/with-user-data/babel.config.js +0 -5
  374. package/build/commands/create-mini/standalone/examples/with-user-data/index.tsx +0 -5
  375. package/build/commands/create-mini/standalone/examples/with-user-data/metro.config.js +0 -3
  376. package/build/commands/create-mini/standalone/examples/with-user-data/package.json +0 -33
  377. package/build/commands/create-mini/standalone/examples/with-user-data/src/App.tsx +0 -5
  378. package/build/commands/create-mini/standalone/examples/with-user-data/src/components/ProductSection.tsx +0 -39
  379. package/build/commands/create-mini/standalone/examples/with-user-data/src/components/SectionStyles.ts +0 -9
  380. package/build/commands/create-mini/standalone/examples/with-user-data/src/components/ShopCard.tsx +0 -42
  381. package/build/commands/create-mini/standalone/examples/with-user-data/src/components/ShopSection.tsx +0 -40
  382. package/build/commands/create-mini/standalone/examples/with-user-data/src/index.tsx +0 -9
  383. package/build/commands/create-mini/standalone/examples/with-user-data/src/manifest.json +0 -10
  384. package/build/commands/create-mini/standalone/examples/with-user-data/src/screens/HomeScreen.tsx +0 -67
  385. package/build/commands/create-mini/standalone/examples/with-user-data/tsconfig.json +0 -41
  386. package/build/commands/create-mini/standalone/index.d.ts +0 -2
  387. package/build/commands/create-mini/standalone/index.js.map +0 -1
  388. package/build/commands/create-mini/utils/examples.js.map +0 -1
  389. package/build/commands/create-mini/utils/index.js.map +0 -1
  390. package/build/commands/dev/utils/app-screens.d.ts +0 -9
  391. package/build/commands/dev/utils/app-screens.js +0 -170
  392. package/build/commands/dev/utils/app-screens.js.map +0 -1
  393. package/build/commands/dev/utils/metro/metro-config.d.ts +0 -2
  394. package/build/commands/dev/utils/metro/metro-config.js +0 -29
  395. package/build/commands/dev/utils/metro/metro-config.js.map +0 -1
  396. package/build/commands/dev/utils/metro/metro-minis-module-resolver.d.ts +0 -6
  397. package/build/commands/dev/utils/metro/metro-minis-module-resolver.js +0 -11
  398. package/build/commands/dev/utils/metro/metro-minis-module-resolver.js.map +0 -1
  399. package/build/commands/dev/utils/metro/metro-reporter.d.ts +0 -21
  400. package/build/commands/dev/utils/metro/metro-reporter.js +0 -46
  401. package/build/commands/dev/utils/metro/metro-reporter.js.map +0 -1
  402. package/build/commands/dev/utils/metro/metro-server-middleware.d.ts +0 -10
  403. package/build/commands/dev/utils/metro/metro-server-middleware.js +0 -74
  404. package/build/commands/dev/utils/metro/metro-server-middleware.js.map +0 -1
  405. package/build/commands/dev/utils/metro/metro-server.d.ts +0 -6
  406. package/build/commands/dev/utils/metro/metro-server.js +0 -26
  407. package/build/commands/dev/utils/metro/metro-server.js.map +0 -1
  408. package/build/commands/dev/utils/start-app/types.d.ts +0 -14
  409. package/build/commands/dev/utils/start-app/types.js +0 -2
  410. package/build/commands/dev/utils/start-app/types.js.map +0 -1
  411. package/build/commands/dev/utils/types.d.ts +0 -24
  412. package/build/commands/dev/utils/types.js.map +0 -1
  413. package/build/commands/doctor/utils/diagnose-dependencies.d.ts +0 -8
  414. package/build/commands/doctor/utils/diagnose-dependencies.js +0 -190
  415. package/build/commands/doctor/utils/diagnose-dependencies.js.map +0 -1
  416. package/build/commands/generate-graphql-types/index.d.ts +0 -6
  417. package/build/commands/generate-graphql-types/index.js +0 -36
  418. package/build/commands/generate-graphql-types/index.js.map +0 -1
  419. package/build/commands/generate-graphql-types/utils/generate-graphql-types.d.ts +0 -2
  420. package/build/commands/generate-graphql-types/utils/generate-graphql-types.js +0 -67
  421. package/build/commands/generate-graphql-types/utils/generate-graphql-types.js.map +0 -1
  422. package/build/commands/generate-graphql-types/utils/get-graphql-config.d.ts +0 -1
  423. package/build/commands/generate-graphql-types/utils/get-graphql-config.js +0 -39
  424. package/build/commands/generate-graphql-types/utils/get-graphql-config.js.map +0 -1
  425. package/build/commands/generate-graphql-types/utils/get-graphql-config.spec.d.ts +0 -1
  426. package/build/commands/generate-graphql-types/utils/get-graphql-config.spec.js +0 -62
  427. package/build/commands/generate-graphql-types/utils/get-graphql-config.spec.js.map +0 -1
  428. package/build/commands/generate-graphql-types/utils/require.d.ts +0 -2
  429. package/build/commands/generate-graphql-types/utils/require.js +0 -3
  430. package/build/commands/generate-graphql-types/utils/require.js.map +0 -1
  431. package/build/commands/submit/utils/request-entry-point-params.d.ts +0 -1
  432. package/build/commands/submit/utils/request-entry-point-params.js +0 -43
  433. package/build/commands/submit/utils/request-entry-point-params.js.map +0 -1
  434. package/build/commands/upgrade/utils/clear-metro-cache.d.ts +0 -1
  435. package/build/commands/upgrade/utils/clear-metro-cache.js +0 -12
  436. package/build/commands/upgrade/utils/clear-metro-cache.js.map +0 -1
  437. package/build/commands/upgrade/utils/cli.d.ts +0 -1
  438. package/build/commands/upgrade/utils/cli.js +0 -15
  439. package/build/commands/upgrade/utils/cli.js.map +0 -1
  440. package/build/constants/extensions.d.ts +0 -21
  441. package/build/constants/extensions.js +0 -25
  442. package/build/constants/extensions.js.map +0 -1
  443. package/build/constants/templates.d.ts +0 -7
  444. package/build/constants/templates.js +0 -8
  445. package/build/constants/templates.js.map +0 -1
  446. package/build/templates-index.d.ts +0 -6
  447. package/build/templates-index.js +0 -24
  448. package/build/templates-index.js.map +0 -1
  449. package/build/utils/development-params.d.ts +0 -13
  450. package/build/utils/development-params.js +0 -44
  451. package/build/utils/development-params.js.map +0 -1
  452. package/build/utils/extensions.d.ts +0 -13
  453. package/build/utils/extensions.js +0 -87
  454. package/build/utils/extensions.js.map +0 -1
  455. package/build/utils/patch-package.d.ts +0 -5
  456. package/build/utils/patch-package.js +0 -79
  457. package/build/utils/patch-package.js.map +0 -1
  458. package/build/utils/semver.d.ts +0 -1
  459. package/build/utils/semver.js +0 -19
  460. package/build/utils/semver.js.map +0 -1
  461. package/build/utils/standalone.d.ts +0 -2
  462. package/build/utils/standalone.js +0 -15
  463. package/build/utils/standalone.js.map +0 -1
  464. package/scripts/test-create-mini-legacy.ts +0 -63
  465. package/scripts/test-create-mini-standalone.ts +0 -80
  466. package/shipit.snapshot.yml +0 -9
  467. package/templates/__template_blank/src/App.tsx +0 -24
  468. package/templates/__template_blank/src/index.tsx +0 -9
  469. package/templates/__template_common/.eslintignore +0 -1
  470. package/templates/__template_common/.eslintrc.js +0 -3
  471. package/templates/__template_common/.graphqlrc.js +0 -1
  472. package/templates/__template_common/.prettierrc.json +0 -8
  473. package/templates/__template_common/assets.d.ts +0 -14
  474. package/templates/__template_common/babel.config.js +0 -5
  475. package/templates/__template_common/index.tsx +0 -5
  476. package/templates/__template_common/metro.config.js +0 -5
  477. package/templates/__template_common/package.json +0 -35
  478. package/templates/__template_common/src/manifest.json +0 -6
  479. package/templates/__template_common/tsconfig.json +0 -41
  480. package/templates/__template_getting_started/src/App.tsx +0 -23
  481. package/templates/__template_getting_started/src/index.tsx +0 -9
  482. package/templates/__template_getting_started/src/manifest.json +0 -7
  483. package/templates/__template_getting_started/src/screens/HomeScreen.tsx +0 -131
  484. package/templates/__template_getting_started/src/screens/NativeFeaturesScreen.tsx +0 -137
  485. package/templates/__template_getting_started/src/types/screens.ts +0 -5
  486. package/templates/__template_shoppable_posts/src/App.tsx +0 -42
  487. package/templates/__template_shoppable_posts/src/index.tsx +0 -9
  488. package/templates/__template_shoppable_videos/src/App.tsx +0 -39
  489. package/templates/__template_shoppable_videos/src/index.tsx +0 -9
  490. package/templates/extensions/components/__template_blank/render.tsx +0 -18
  491. package/templates/extensions/components/__template_bundle-collection/render.tsx +0 -31
  492. package/templates/extensions/components/__template_bundle-collection/seed.ts +0 -26
  493. package/templates/extensions/components/__template_bundle-selector/render.tsx +0 -51
  494. package/templates/extensions/components/__template_bundle-selector/seed.ts +0 -72
  495. package/templates/extensions/components/__template_default-card/render.tsx +0 -24
  496. package/templates/extensions/components/__template_default-card/seed.ts +0 -10
  497. package/templates/extensions/components/__template_image-collection/render.tsx +0 -17
  498. package/templates/extensions/components/__template_image-collection/seed.ts +0 -70
  499. package/templates/extensions/components/__template_link/render.tsx +0 -17
  500. package/templates/extensions/components/__template_link/seed.ts +0 -5
  501. package/templates/extensions/components/__template_product-offer-card/render.tsx +0 -17
  502. package/templates/extensions/components/__template_product-offer-card/seed.ts +0 -44
  503. package/templates/extensions/components/__template_survey-single-response/render.tsx +0 -26
  504. package/templates/extensions/components/__template_survey-single-response/seed.ts +0 -22
  505. package/templates/extensions/components/__template_video-collection/render.tsx +0 -17
  506. package/templates/extensions/components/__template_video-collection/seed.ts +0 -37
  507. package/templates/extensions/queries/__template_order-confirmation-page/input.graphql +0 -5
  508. package/templates/extensions/queries/__template_order-confirmation-page/input.graphql.d.ts +0 -24
  509. package/templates/extensions/queries/__template_order-management-page/input.graphql +0 -5
  510. package/templates/extensions/queries/__template_order-management-page/input.graphql.d.ts +0 -24
  511. package/templates/extensions/queries/__template_product-page/input.graphql +0 -9
  512. package/templates/extensions/queries/__template_product-page/input.graphql.d.ts +0 -36
  513. package/templates/extensions/queries/__template_store-page/input.graphql +0 -5
  514. package/templates/extensions/queries/__template_store-page/input.graphql.d.ts +0 -24
  515. /package/build/commands/{create-extension → create}/index.d.ts +0 -0
  516. /package/build/commands/{create-mini → create}/utils/index.d.ts +0 -0
  517. /package/build/commands/{create-mini → create}/utils/index.js +0 -0
@@ -1,137 +0,0 @@
1
- import {useState} from 'react'
2
- import {ScrollView, TouchableOpacity} from 'react-native'
3
- import {useNavigation} from '@react-navigation/native'
4
- import {NativeStackNavigationProp} from '@react-navigation/native-stack'
5
- import ImagePicker from 'react-native-image-crop-picker'
6
- import Share from 'react-native-share'
7
- import {
8
- Box,
9
- SafeAreaView,
10
- Text,
11
- useTheme,
12
- Button,
13
- Icon,
14
- useMinisDimensions,
15
- Image,
16
- Divider,
17
- } from '@shopify/shop-minis-platform-sdk'
18
-
19
- import {RootStackParamList} from '../types/screens'
20
-
21
- export function NativeFeaturesScreen() {
22
- const theme = useTheme()
23
- const navigation =
24
- useNavigation<NativeStackNavigationProp<RootStackParamList>>()
25
- const {height, width} = useMinisDimensions()
26
-
27
- const [imageUrl, setImageUrl] = useState<string>()
28
-
29
- return (
30
- <SafeAreaView
31
- style={{flex: 1, backgroundColor: theme.colors['backgrounds-regular']}}
32
- >
33
- <ScrollView>
34
- <Box
35
- flex={1}
36
- paddingHorizontal="gutter"
37
- backgroundColor="backgrounds-regular"
38
- >
39
- <Box>
40
- <TouchableOpacity
41
- onPress={() => navigation.goBack()}
42
- accessibilityLabel="Navigate back"
43
- >
44
- <Box marginTop="xs">
45
- <Icon name="arrow-left" />
46
- </Box>
47
- </TouchableOpacity>
48
- </Box>
49
- <Text variant="heroBold" marginBottom="s" marginTop="xs">
50
- Unlock Native Capabilities
51
- </Text>
52
- <Text variant="subtitle" marginBottom="s">
53
- Let&apos;s explore the native capabilities your Shop Mini can
54
- access.
55
- </Text>
56
- <Box>
57
- <Button
58
- text="Camera access"
59
- onPress={async () => {
60
- await ImagePicker.openCamera({})
61
- .then(image => {
62
- setImageUrl(image.path)
63
- })
64
- .catch(error => {
65
- console.log(error)
66
- })
67
- }}
68
- />
69
- <Text variant="bodySmall" marginTop="xs">
70
- Run this Mini on a real device to access the camera.
71
- </Text>
72
- </Box>
73
- <Box marginVertical="s">
74
- <Button
75
- text="Gallery access"
76
- variant="secondary"
77
- onPress={async () => {
78
- await ImagePicker.openPicker({})
79
- .then(image => {
80
- setImageUrl(image.path)
81
- })
82
- .catch(error => {
83
- console.log(error)
84
- })
85
- }}
86
- />
87
- </Box>
88
- {imageUrl ? (
89
- <Box marginBottom="s">
90
- <Box
91
- style={{
92
- width: 100,
93
- height: 100,
94
- borderRadius: 10,
95
- overflow: 'hidden',
96
- }}
97
- >
98
- <Image
99
- source={{uri: imageUrl}}
100
- style={{width: 100, height: 100}}
101
- />
102
- </Box>
103
- </Box>
104
- ) : null}
105
- <Box>
106
- <Button
107
- text="Share sheet"
108
- variant="tertiary"
109
- onPress={async () => {
110
- await Share.open({
111
- url: 'https://shop.app/minis',
112
- title: 'title',
113
- }).catch(error => {
114
- console.log(error)
115
- })
116
- }}
117
- />
118
- </Box>
119
- <Divider marginVertical="s" />
120
- <Box>
121
- <Text variant="subtitle" marginBottom="s">
122
- Use some of our built-in APIs
123
- </Text>
124
- <Text>Screen height: {height}</Text>
125
- <Text>Screen width: {width}</Text>
126
- </Box>
127
- <Divider marginVertical="s" />
128
- <Text marginBottom="s">
129
- We look forward to seeing what you build! Check out the
130
- documentation at
131
- </Text>
132
- <Text>https://shop.app/minis</Text>
133
- </Box>
134
- </ScrollView>
135
- </SafeAreaView>
136
- )
137
- }
@@ -1,5 +0,0 @@
1
- import {ParamListBase} from '@react-navigation/native'
2
-
3
- export interface RootStackParamList extends ParamListBase {
4
- 'GettingStarted.Home': undefined
5
- }
@@ -1,42 +0,0 @@
1
- import {useMemo} from 'react'
2
- import {StatusBar} from 'react-native'
3
- import {
4
- ShoppablePosts,
5
- useMinisParams,
6
- SafeAreaView,
7
- Box,
8
- shoppablePostsFixture,
9
- } from '@shopify/shop-minis-platform-sdk'
10
-
11
- /**
12
- * A stub type to get you started. Remove this in favor of the type of your extension input query data moving forward.
13
- */
14
- interface MyExtensionDataType {
15
- shop?: {
16
- id: string
17
- }
18
- }
19
-
20
- export function App() {
21
- const {extensionData} = useMinisParams<MyExtensionDataType>()
22
- const shopId = extensionData?.shop?.id
23
-
24
- const shoppablePosts = useMemo(() => {
25
- // Format your data in to the shape expected by `<ShoppablePosts />`
26
- // return getShoppablePostsFromExtensionData(extensionData)
27
- return shoppablePostsFixture
28
- }, [])
29
-
30
- if (!shopId) {
31
- throw new Error('Shop not found')
32
- }
33
-
34
- return (
35
- <Box backgroundColor="foregrounds-contrasting-inverted" flex={1}>
36
- <StatusBar barStyle="light-content" />
37
- <SafeAreaView style={{flex: 1}}>
38
- <ShoppablePosts initialItems={shoppablePosts} shopId={shopId} />
39
- </SafeAreaView>
40
- </Box>
41
- )
42
- }
@@ -1,9 +0,0 @@
1
- import {MiniAppConfig} from '@shopify/shop-minis-platform-sdk'
2
-
3
- import {App} from './App'
4
-
5
- const config: MiniAppConfig = {
6
- ViewerRoot: App,
7
- }
8
-
9
- export default config
@@ -1,39 +0,0 @@
1
- import {useMemo} from 'react'
2
- import {StatusBar} from 'react-native'
3
- import {
4
- ShoppableVideos,
5
- useMinisParams,
6
- Box,
7
- shoppableVideosFixture,
8
- } from '@shopify/shop-minis-platform-sdk'
9
-
10
- /**
11
- * A stub type to get you started. Remove this in favor of the type of your extension input query data moving forward.
12
- */
13
- interface MyExtensionDataType {
14
- shop?: {
15
- id: string
16
- }
17
- }
18
-
19
- export function App() {
20
- const {extensionData} = useMinisParams<MyExtensionDataType>()
21
- const shopId = extensionData?.shop?.id
22
-
23
- const shoppableVideos = useMemo(() => {
24
- // Format your data in to the shape expected by `<ShoppableVideos />`
25
- // return getShoppableVideosFromExtensionData(extensionData)
26
- return shoppableVideosFixture
27
- }, [])
28
-
29
- if (!shopId) {
30
- throw new Error('Shop not found')
31
- }
32
-
33
- return (
34
- <Box backgroundColor="foregrounds-contrasting-inverted" flex={1}>
35
- <StatusBar barStyle="light-content" />
36
- <ShoppableVideos items={shoppableVideos} shopId={shopId} />
37
- </Box>
38
- )
39
- }
@@ -1,9 +0,0 @@
1
- import {MiniAppConfig} from '@shopify/shop-minis-platform-sdk'
2
-
3
- import {App} from './App'
4
-
5
- const config: MiniAppConfig = {
6
- ViewerRoot: App,
7
- }
8
-
9
- export default config
@@ -1,18 +0,0 @@
1
- import {Button} from '@shopify/shop-minis-ui-extensions'
2
-
3
- import type {__QUERY_NAME__QueryData} from './input.graphql'
4
-
5
- export function Render({
6
- extensionData,
7
- }: {
8
- extensionData: __QUERY_NAME__QueryData | null
9
- }) {
10
- return (
11
- <Button
12
- text="My extension"
13
- onPress={() => {
14
- __EXAMPLE_QUERY_DATA_USE__
15
- }}
16
- />
17
- )
18
- }
@@ -1,31 +0,0 @@
1
- import {BundleCollection} from '@shopify/shop-minis-ui-extensions'
2
- import {useExtensionShopActions} from '@shopify/shop-minis-platform-sdk/actions'
3
-
4
- import type {__QUERY_NAME__QueryData} from './input.graphql'
5
- import seedData from './seed'
6
-
7
- export function Render({
8
- extensionData,
9
- }: {
10
- extensionData: __QUERY_NAME__QueryData | null
11
- }) {
12
- const {openMiniViewer} = useExtensionShopActions()
13
-
14
- // Here we are using seed data to populate the initial state of the bundle collection.
15
- // You can replace this with the actual data from `extensionData`
16
- __EXAMPLE_QUERY_DATA_USE__
17
- const {bundles: initialBundles, title} = seedData
18
-
19
- const bundles = initialBundles.map(initialBundle => {
20
- return {
21
- ...initialBundle,
22
- onActionButtonPress: () => {
23
- openMiniViewer(initialBundle)
24
- },
25
- }
26
- })
27
-
28
- if (!bundles) return null
29
-
30
- return <BundleCollection title={title} bundles={bundles} />
31
- }
@@ -1,26 +0,0 @@
1
- const DEMO_IMAGE_URL =
2
- 'https://cdn.shopify.com/s/files/1/1232/1472/products/StudioRender_-_Lovelace_Black_620x.jpg?v=1511325136'
3
- const data = {
4
- bundles: [
5
- {
6
- title: 'Mix and match bundle',
7
- subtitle: 'Add a t-shirt and save 25%',
8
- badgeText: 'Save 25%',
9
- imageUrls: [
10
- DEMO_IMAGE_URL,
11
- DEMO_IMAGE_URL,
12
- DEMO_IMAGE_URL,
13
- DEMO_IMAGE_URL,
14
- ],
15
- actionButtonText: 'Add to bundle',
16
- },
17
- {
18
- title: 'Frequently bought together',
19
- imageUrls: [DEMO_IMAGE_URL, DEMO_IMAGE_URL],
20
- actionButtonText: 'Add to bundle',
21
- },
22
- ],
23
- title: 'Mix and Match',
24
- }
25
-
26
- export default data
@@ -1,51 +0,0 @@
1
- import {useEffect, useState} from 'react'
2
- import {
3
- BundleSelector,
4
- BundleSelectorItem,
5
- } from '@shopify/shop-minis-ui-extensions'
6
- import {useExtensionShopActions} from '@shopify/shop-minis-platform-sdk/actions'
7
-
8
- import type {__QUERY_NAME__QueryData} from './input.graphql'
9
- import seedData from './seed'
10
-
11
- export function Render({
12
- extensionData,
13
- }: {
14
- extensionData: __QUERY_NAME__QueryData | null
15
- }) {
16
- // Here we are using seed data to populate the initial state of the bundle selector.
17
- // You can replace this with the actual data from `extensionData`
18
- __EXAMPLE_QUERY_DATA_USE__
19
- const initialBundleSelectorItems: BundleSelectorItem[] = seedData
20
- const [bundleSelectorItems, setBundleSelectorItems] = useState(
21
- initialBundleSelectorItems
22
- )
23
-
24
- const {updateLineItemAttributes} = useExtensionShopActions()
25
-
26
- useEffect(() => {
27
- if (!bundleSelectorItems) return
28
-
29
- const lineItemAttributes = bundleSelectorItems.map(
30
- item => item.options.find(option => option.selected)?.value
31
- )
32
-
33
- updateLineItemAttributes({
34
- lineItemAttributes: [
35
- {
36
- key: '_component_reference',
37
- value: JSON.stringify(lineItemAttributes),
38
- },
39
- ],
40
- })
41
- }, [updateLineItemAttributes, bundleSelectorItems])
42
-
43
- if (!bundleSelectorItems) return null
44
-
45
- return (
46
- <BundleSelector
47
- items={bundleSelectorItems}
48
- onChange={setBundleSelectorItems}
49
- />
50
- )
51
- }
@@ -1,72 +0,0 @@
1
- import {BundleSelectorItem} from '@shopify/shop-minis-ui-extensions'
2
-
3
- const seedData: BundleSelectorItem[] = [
4
- {
5
- title: 'Main Snowboard',
6
- options: [
7
- {
8
- title: 'Mr. Huebert Hydroxy Snowboard',
9
- value: 'gid://shopify/ProductVariant/44887116906751',
10
- imageUrl:
11
- 'https://cdn.shopify.com/s/files/1/0621/0463/3599/products/Main_9129b69a-0c7b-4f66-b6cf-c4222f18028a.jpg?v=1671634025',
12
- availability: 'Available',
13
- selected: false,
14
- },
15
- {
16
- title: 'The H2 Snowboard',
17
- value: 'gid://shopify/ProductVariant/43698709922047',
18
- imageUrl:
19
- 'https://cdn.shopify.com/s/files/1/0621/0463/3599/products/Main_0a40b01b-5021-48c1-80d1-aa8ab4876d3d.jpg?v=1671634609',
20
- availability: 'Available',
21
- selected: false,
22
- },
23
- {
24
- title: 'The Hosted Snowboard',
25
- value: 'gid://shopify/ProductVariant/43698640978175',
26
- imageUrl:
27
- 'https://cdn.shopify.com/s/files/1/0621/0463/3599/products/Main_b9e0da7f-db89-4d41-83f0-7f417b02831d.jpg?v=1671632927',
28
- availability: 'Available',
29
- selected: true,
30
- },
31
- {
32
- title: 'The Hydrogen Snowboard',
33
- value: 'gid://shopify/ProductVariant/43698681938175',
34
- imageUrl:
35
- 'https://cdn.shopify.com/s/files/1/0621/0463/3599/products/Main.jpg?v=1671633869',
36
- availability: 'Available',
37
- selected: false,
38
- },
39
- ],
40
- },
41
- {
42
- title: 'Second snowboard',
43
- options: [
44
- {
45
- title: 'The Oxygen Snowboard',
46
- value: 'gid://shopify/ProductVariant/43698704318719',
47
- imageUrl:
48
- 'https://cdn.shopify.com/s/files/1/0621/0463/3599/products/Main_d624f226-0a89-4fe1-b333-0d1548b43c06.jpg?v=1671634432',
49
- availability: 'Available',
50
- selected: false,
51
- },
52
- {
53
- title: 'The S-Series Snowboard',
54
- value: 'gid://shopify/ProductVariant/43698713526527',
55
- imageUrl:
56
- 'https://cdn.shopify.com/s/files/1/0621/0463/3599/products/Main_589fc064-24a2-4236-9eaf-13b2bd35d21d.jpg?v=1671634723',
57
- availability: 'Available',
58
- selected: true,
59
- },
60
- {
61
- title: 'The Toggle Snowboard',
62
- value: 'gid://shopify/ProductVariant/43698707857663',
63
- imageUrl:
64
- 'https://cdn.shopify.com/s/files/1/0621/0463/3599/products/Main_f44a9605-cd62-464d-b095-d45cdaa0d0d7.jpg?v=1671634521',
65
- availability: 'Available',
66
- selected: false,
67
- },
68
- ],
69
- },
70
- ]
71
-
72
- export default seedData
@@ -1,24 +0,0 @@
1
- import {DefaultCard} from '@shopify/shop-minis-ui-extensions'
2
-
3
- import type {__QUERY_NAME__QueryData} from './input.graphql'
4
- import seedData from './seed'
5
-
6
- export function Render({
7
- extensionData,
8
- }: {
9
- extensionData: __QUERY_NAME__QueryData | null
10
- }) {
11
- // Here we are using seed data to populate the initial state of the default card.
12
- // You can replace this with the actual data from `extensionData`
13
- __EXAMPLE_QUERY_DATA_USE__
14
- const {actionText, image, text, title} = seedData
15
-
16
- return (
17
- <DefaultCard
18
- actionText={actionText}
19
- image={image}
20
- text={text}
21
- title={title}
22
- />
23
- )
24
- }
@@ -1,10 +0,0 @@
1
- const data = {
2
- title: 'Default Card Extension',
3
- text: 'This is a default card extension. It can be used for different purposes.',
4
- actionText: 'Action text',
5
- image: {
6
- url: 'https://cdn.shopify.com/s/files/1/0688/2233/5510/products/Main_9129b69a-0c7b-4f66-b6cf-c4222f18028a.jpg?v=1674664579',
7
- },
8
- }
9
-
10
- export default data
@@ -1,17 +0,0 @@
1
- import {ImageCollection} from '@shopify/shop-minis-ui-extensions'
2
-
3
- import type {__QUERY_NAME__QueryData} from './input.graphql'
4
- import seedData from './seed'
5
-
6
- export function Render({
7
- extensionData,
8
- }: {
9
- extensionData: __QUERY_NAME__QueryData | null
10
- }) {
11
- // Here we are using seed data to populate the initial state of the image collection.
12
- // You can replace this with the actual data from `extensionData`
13
- __EXAMPLE_QUERY_DATA_USE__
14
- const {title, items} = seedData
15
-
16
- return <ImageCollection title={title} items={items} layout="GRID" />
17
- }
@@ -1,70 +0,0 @@
1
- const seedData = {
2
- title: 'Image Collection Extension',
3
- items: [
4
- {
5
- image: {
6
- url: 'https://cdn.shopify.com/s/files/1/0621/0463/3599/files/preview_images/197d24d529fd4d5685d88b8e7a0e99b3.thumbnail.0000000000.jpg',
7
- },
8
- relatedProducts: [],
9
- externalId: '1',
10
- },
11
- {
12
- image: {
13
- url: 'https://cdn.shopify.com/s/files/1/0621/0463/3599/files/preview_images/60d478149138421e94b2a50ba2cac7f3.thumbnail.0000000000.jpg',
14
- },
15
- relatedProducts: [],
16
- externalId: '2',
17
- },
18
- {
19
- image: {
20
- url: 'https://cdn.shopify.com/s/files/1/0621/0463/3599/files/preview_images/5dfdf5b856cc4e52a92880ab43412db5.thumbnail.0000000000.jpg',
21
- },
22
- relatedProducts: [],
23
- externalId: '3',
24
- },
25
- {
26
- externalId: '4',
27
- image: {
28
- url: 'https://cdn.shopify.com/s/files/1/0621/0463/3599/files/preview_images/7a92d6b2112b497fae2bca267ba6dfb1.thumbnail.0000000000.jpg',
29
- },
30
- relatedProducts: [],
31
- },
32
- {
33
- externalId: '5',
34
- image: {
35
- url: 'https://cdn.shopify.com/s/files/1/0621/0463/3599/files/preview_images/197d24d529fd4d5685d88b8e7a0e99b3.thumbnail.0000000000.jpg',
36
- },
37
- relatedProducts: [],
38
- },
39
- {
40
- externalId: '6',
41
- image: {
42
- url: 'https://cdn.shopify.com/s/files/1/0621/0463/3599/files/preview_images/197d24d529fd4d5685d88b8e7a0e99b3.thumbnail.0000000000.jpg',
43
- },
44
- relatedProducts: [],
45
- },
46
- {
47
- externalId: '7',
48
- image: {
49
- url: 'https://cdn.shopify.com/s/files/1/0621/0463/3599/files/preview_images/197d24d529fd4d5685d88b8e7a0e99b3.thumbnail.0000000000.jpg',
50
- },
51
- relatedProducts: [],
52
- },
53
- {
54
- externalId: '8',
55
- image: {
56
- url: 'https://cdn.shopify.com/s/files/1/0621/0463/3599/files/preview_images/197d24d529fd4d5685d88b8e7a0e99b3.thumbnail.0000000000.jpg',
57
- },
58
- relatedProducts: [],
59
- },
60
- {
61
- externalId: '9',
62
- image: {
63
- url: 'https://cdn.shopify.com/s/files/1/0621/0463/3599/files/preview_images/197d24d529fd4d5685d88b8e7a0e99b3.thumbnail.0000000000.jpg',
64
- },
65
- relatedProducts: [],
66
- },
67
- ],
68
- }
69
-
70
- export default seedData
@@ -1,17 +0,0 @@
1
- import {Link} from '@shopify/shop-minis-ui-extensions'
2
-
3
- import type {__QUERY_NAME__QueryData} from './input.graphql'
4
- import seedData from './seed'
5
-
6
- export function Render({
7
- extensionData,
8
- }: {
9
- extensionData: __QUERY_NAME__QueryData | null
10
- }) {
11
- // Here we are using seed data to populate the initial state of the link.
12
- // You can replace this with the actual data from `extensionData`
13
- __EXAMPLE_QUERY_DATA_USE__
14
- const {actionText} = seedData
15
-
16
- return <Link actionText={actionText} />
17
- }
@@ -1,5 +0,0 @@
1
- const data = {
2
- actionText: 'Action text',
3
- }
4
-
5
- export default data
@@ -1,17 +0,0 @@
1
- import {ProductOfferCard} from '@shopify/shop-minis-ui-extensions'
2
-
3
- import type {__QUERY_NAME__QueryData} from './input.graphql'
4
- import seedData from './seed'
5
-
6
- export function Render({
7
- extensionData,
8
- }: {
9
- extensionData: __QUERY_NAME__QueryData | null
10
- }) {
11
- // Here we are using seed data to populate the initial state of the product offer card.
12
- // You can replace this with the actual data from `extensionData`
13
- __EXAMPLE_QUERY_DATA_USE__
14
- const {product, offer, order} = seedData
15
-
16
- return <ProductOfferCard product={product} offer={offer} order={order} />
17
- }
@@ -1,44 +0,0 @@
1
- const MINIS_TEST_STORE_DATA = {
2
- id: 'gid://shopify/Shop/62104633599',
3
- image: null,
4
- name: 'Shop Minis Test Store',
5
- }
6
-
7
- const data = {
8
- offer: {
9
- discountedPrice: {
10
- amount: '405.95',
11
- currencyCode: 'USD',
12
- },
13
- originalPrice: {
14
- amount: '605.95',
15
- currencyCode: 'USD',
16
- },
17
- title: 'Widget! Check this offer!',
18
- image: {
19
- url: 'https://cdn.shopify.com/s/files/1/0688/2233/5510/products/Main_9129b69a-0c7b-4f66-b6cf-c4222f18028a.jpg?v=1674664579',
20
- },
21
- variantId: 'gid://shopify/ProductVariant/43695240413206',
22
- expiresAt: new Date('2099-03-22T23:59:59.000Z'),
23
- },
24
- order: {
25
- id: 'gid://shopify/Order/123',
26
- },
27
- product: {
28
- id: 'gid://shopify/Product/7982542651414',
29
- shop: MINIS_TEST_STORE_DATA,
30
- title: 'Mr. Huebert Hydroxy Snowboard',
31
- image: {
32
- altText: null,
33
- url: 'https://cdn.shopify.com/s/files/1/0688/2233/5510/products/Main_9129b69a-0c7b-4f66-b6cf-c4222f18028a.jpg?v=1674664579',
34
- },
35
- price: {
36
- amount: '605.95',
37
- currencyCode: 'USD',
38
- },
39
- reviewsAverageRating: null,
40
- reviewsCount: 0,
41
- },
42
- }
43
-
44
- export default data