@shopify/shop-minis-cli 0.0.171 → 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.
- package/README_INTERNAL.md +153 -0
- package/build/commands/app/index.js +1 -2
- package/build/commands/app/index.js.map +1 -1
- package/build/commands/cancel-submission/cancel-submission.js +2 -2
- package/build/commands/cancel-submission/cancel-submission.js.map +1 -1
- package/build/commands/cancel-submission/index.js +1 -1
- package/build/commands/cancel-submission/index.js.map +1 -1
- package/build/commands/check-submission/index.js +13 -6
- package/build/commands/check-submission/index.js.map +1 -1
- package/build/commands/codemod/index.js +0 -9
- package/build/commands/codemod/index.js.map +1 -1
- package/build/commands/codemod/releases/index.js +2 -72
- package/build/commands/codemod/releases/index.js.map +1 -1
- package/build/commands/config.d.ts +2 -2
- package/build/commands/config.js +3 -2
- package/build/commands/config.js.map +1 -1
- package/build/commands/create/examples/default/.cursorrules +25 -0
- package/{templates/__template_common/gitignore → build/commands/create/examples/default/_gitignore} +0 -1
- package/build/commands/create/examples/default/index.html +15 -0
- package/build/commands/create/examples/default/package.json +18 -0
- package/build/commands/create/examples/default/src/App.tsx +25 -0
- package/build/commands/create/examples/default/src/icon.png +0 -0
- package/build/commands/create/examples/default/src/index.css +1 -0
- package/build/commands/create/examples/default/src/main.tsx +14 -0
- package/build/commands/create/examples/default/src/manifest.json +6 -0
- package/build/commands/{create-mini/standalone/examples/with-getting-started → create/examples/default}/tsconfig.json +6 -14
- package/build/commands/create/examples/default/vite.config.mjs +11 -0
- package/build/commands/{create-mini/standalone → create}/index.js +6 -26
- package/build/commands/create/index.js.map +1 -0
- package/build/commands/{create-mini → create}/utils/examples.d.ts +1 -1
- package/build/commands/{create-mini → create}/utils/examples.js +13 -9
- package/build/commands/create/utils/examples.js.map +1 -0
- package/build/commands/create/utils/index.js.map +1 -0
- package/build/commands/dev/index.d.ts +0 -11
- package/build/commands/dev/index.js +32 -58
- package/build/commands/dev/index.js.map +1 -1
- package/build/commands/dev/types.d.ts +46 -0
- package/build/commands/dev/{utils/types.js → types.js} +5 -0
- package/build/commands/dev/types.js.map +1 -0
- package/build/commands/dev/utils/binaries.d.ts +1 -1
- package/build/commands/dev/utils/build-type.d.ts +1 -1
- package/build/commands/dev/utils/build-type.js +1 -1
- package/build/commands/dev/utils/build-type.js.map +1 -1
- package/build/commands/dev/utils/deeplink.d.ts +3 -15
- package/build/commands/dev/utils/deeplink.js +12 -59
- package/build/commands/dev/utils/deeplink.js.map +1 -1
- package/build/commands/dev/utils/interactive-terminal.d.ts +6 -5
- package/build/commands/dev/utils/interactive-terminal.js +25 -65
- package/build/commands/dev/utils/interactive-terminal.js.map +1 -1
- package/build/commands/dev/utils/network.d.ts +1 -2
- package/build/commands/dev/utils/network.js.map +1 -1
- package/build/commands/dev/utils/platform.d.ts +1 -4
- package/build/commands/dev/utils/platform.js +1 -5
- package/build/commands/dev/utils/platform.js.map +1 -1
- package/build/commands/dev/utils/start-app/config.d.ts +1 -2
- package/build/commands/dev/utils/start-app/config.js +1 -1
- package/build/commands/dev/utils/start-app/config.js.map +1 -1
- package/build/commands/dev/utils/start-app/start-app-with-options.d.ts +1 -1
- package/build/commands/dev/utils/start-app/start-app-with-options.js +5 -3
- package/build/commands/dev/utils/start-app/start-app-with-options.js.map +1 -1
- package/build/commands/dev/utils/start-app/start-app.d.ts +1 -1
- package/build/commands/dev/utils/start-app/start-app.js.map +1 -1
- package/build/commands/dev/utils/version.d.ts +1 -2
- package/build/commands/dev/utils/version.js +3 -2
- package/build/commands/dev/utils/version.js.map +1 -1
- package/build/commands/dev/utils/web-server.d.ts +1 -0
- package/build/commands/dev/utils/web-server.js +16 -0
- package/build/commands/dev/utils/web-server.js.map +1 -0
- package/build/commands/doctor/index.js +10 -3
- package/build/commands/doctor/index.js.map +1 -1
- package/build/commands/features/index.js +2 -2
- package/build/commands/features/index.js.map +1 -1
- package/build/commands/info/index.js +3 -11
- package/build/commands/info/index.js.map +1 -1
- package/build/commands/install/index.d.ts +2 -0
- package/build/commands/install/index.js +65 -0
- package/build/commands/install/index.js.map +1 -0
- package/build/commands/setup/index.js +9 -1
- package/build/commands/setup/index.js.map +1 -1
- package/build/commands/submit/config.js +1 -1
- package/build/commands/submit/errors.js +24 -2
- package/build/commands/submit/errors.js.map +1 -1
- package/build/commands/submit/index.js +18 -2
- package/build/commands/submit/index.js.map +1 -1
- package/build/commands/submit/submit.d.ts +2 -2
- package/build/commands/submit/submit.js +63 -53
- package/build/commands/submit/submit.js.map +1 -1
- package/build/commands/submit/tasks.d.ts +2 -1
- package/build/commands/submit/tasks.js +5 -4
- package/build/commands/submit/tasks.js.map +1 -1
- package/build/commands/submit/types.d.ts +5 -0
- package/build/commands/submit/utils/assert-core-dependencies-version.d.ts +1 -3
- package/build/commands/submit/utils/assert-core-dependencies-version.js +6 -85
- package/build/commands/submit/utils/assert-core-dependencies-version.js.map +1 -1
- package/build/commands/sync-user-metafield-definitions/index.js +7 -5
- package/build/commands/sync-user-metafield-definitions/index.js.map +1 -1
- package/build/commands/upgrade/index.d.ts +0 -1
- package/build/commands/upgrade/index.js +20 -56
- package/build/commands/upgrade/index.js.map +1 -1
- package/build/constants/dev-panel.d.ts +3 -0
- package/build/constants/dev-panel.js +4 -0
- package/build/constants/dev-panel.js.map +1 -0
- package/build/data/create-submission.d.ts +2 -1
- package/build/data/create-submission.js +13 -4
- package/build/data/create-submission.js.map +1 -1
- package/build/data/get-submissions.d.ts +3 -2
- package/build/data/get-submissions.js +3 -1
- package/build/data/get-submissions.js.map +1 -1
- package/build/data/types/autogenerated/shop-minis-admin-api/gql.d.ts +3 -2
- package/build/data/types/autogenerated/shop-minis-admin-api/gql.js +1 -1
- package/build/data/types/autogenerated/shop-minis-admin-api/gql.js.map +1 -1
- package/build/data/types/autogenerated/shop-minis-admin-api/graphql.d.ts +11 -3
- package/build/data/types/autogenerated/shop-minis-admin-api/graphql.js +21 -1
- package/build/data/types/autogenerated/shop-minis-admin-api/graphql.js.map +1 -1
- package/build/index.d.ts +1 -1
- package/build/index.js +1 -0
- package/build/index.js.map +1 -1
- package/build/program.js +5 -7
- package/build/program.js.map +1 -1
- package/build/schemas/manifest.schema.json +9 -210
- package/build/utils/allowed-dependencies.d.ts +5 -0
- package/build/utils/allowed-dependencies.js +21 -0
- package/build/utils/allowed-dependencies.js.map +1 -0
- package/build/utils/dependencies.d.ts +7 -0
- package/build/utils/dependencies.js +275 -0
- package/build/utils/dependencies.js.map +1 -0
- package/build/utils/minis-manifest.js +0 -7
- package/build/utils/minis-manifest.js.map +1 -1
- package/build/utils/package-manager.d.ts +25 -13
- package/build/utils/package-manager.js +56 -36
- package/build/utils/package-manager.js.map +1 -1
- package/package.json +7 -15
- package/build/commands/codemod/releases/v0-0-100.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-100.js +0 -50
- package/build/commands/codemod/releases/v0-0-100.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-103.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-103.js +0 -43
- package/build/commands/codemod/releases/v0-0-103.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-105.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-105.js +0 -59
- package/build/commands/codemod/releases/v0-0-105.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-106.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-106.js +0 -32
- package/build/commands/codemod/releases/v0-0-106.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-114.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-114.js +0 -48
- package/build/commands/codemod/releases/v0-0-114.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-115.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-115.js +0 -50
- package/build/commands/codemod/releases/v0-0-115.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-121.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-121.js +0 -74
- package/build/commands/codemod/releases/v0-0-121.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-123.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-123.js +0 -33
- package/build/commands/codemod/releases/v0-0-123.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-125.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-125.js +0 -37
- package/build/commands/codemod/releases/v0-0-125.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-130.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-130.js +0 -26
- package/build/commands/codemod/releases/v0-0-130.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-139.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-139.js +0 -26
- package/build/commands/codemod/releases/v0-0-139.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-163.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-163.js +0 -26
- package/build/commands/codemod/releases/v0-0-163.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-42/index.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-42/index.js +0 -46
- package/build/commands/codemod/releases/v0-0-42/index.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-42/reset-files.d.ts +0 -7
- package/build/commands/codemod/releases/v0-0-42/reset-files.js +0 -83
- package/build/commands/codemod/releases/v0-0-42/reset-files.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-43.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-43.js +0 -32
- package/build/commands/codemod/releases/v0-0-43.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-44.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-44.js +0 -214
- package/build/commands/codemod/releases/v0-0-44.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-45.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-45.js +0 -23
- package/build/commands/codemod/releases/v0-0-45.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-50.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-50.js +0 -34
- package/build/commands/codemod/releases/v0-0-50.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-54.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-54.js +0 -70
- package/build/commands/codemod/releases/v0-0-54.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-56.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-56.js +0 -48
- package/build/commands/codemod/releases/v0-0-56.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-57.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-57.js +0 -41
- package/build/commands/codemod/releases/v0-0-57.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-58.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-58.js +0 -68
- package/build/commands/codemod/releases/v0-0-58.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-61.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-61.js +0 -30
- package/build/commands/codemod/releases/v0-0-61.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-63.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-63.js +0 -42
- package/build/commands/codemod/releases/v0-0-63.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-64.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-64.js +0 -47
- package/build/commands/codemod/releases/v0-0-64.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-75.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-75.js +0 -30
- package/build/commands/codemod/releases/v0-0-75.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-76.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-76.js +0 -32
- package/build/commands/codemod/releases/v0-0-76.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-77.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-77.js +0 -39
- package/build/commands/codemod/releases/v0-0-77.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-79.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-79.js +0 -35
- package/build/commands/codemod/releases/v0-0-79.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-84.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-84.js +0 -41
- package/build/commands/codemod/releases/v0-0-84.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-85.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-85.js +0 -60
- package/build/commands/codemod/releases/v0-0-85.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-89.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-89.js +0 -60
- package/build/commands/codemod/releases/v0-0-89.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-91/index.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-91/index.js +0 -38
- package/build/commands/codemod/releases/v0-0-91/index.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-91/replace-dev-wrapper.d.ts +0 -5
- package/build/commands/codemod/releases/v0-0-91/replace-dev-wrapper.js +0 -45
- package/build/commands/codemod/releases/v0-0-91/replace-dev-wrapper.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-91/replace-safe-area-imports.d.ts +0 -1
- package/build/commands/codemod/releases/v0-0-91/replace-safe-area-imports.js +0 -97
- package/build/commands/codemod/releases/v0-0-91/replace-safe-area-imports.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-92.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-92.js +0 -38
- package/build/commands/codemod/releases/v0-0-92.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-93/blank/App-after.d.ts +0 -1
- package/build/commands/codemod/releases/v0-0-93/blank/App-after.js +0 -15
- package/build/commands/codemod/releases/v0-0-93/blank/App-after.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-93/blank/App-before.d.ts +0 -1
- package/build/commands/codemod/releases/v0-0-93/blank/App-before.js +0 -13
- package/build/commands/codemod/releases/v0-0-93/blank/App-before.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-93/index.d.ts +0 -6
- package/build/commands/codemod/releases/v0-0-93/index.js +0 -7
- package/build/commands/codemod/releases/v0-0-93/index.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-93/shoppable-posts/App-after.d.ts +0 -1
- package/build/commands/codemod/releases/v0-0-93/shoppable-posts/App-after.js +0 -53
- package/build/commands/codemod/releases/v0-0-93/shoppable-posts/App-after.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-93/shoppable-posts/App-before.d.ts +0 -1
- package/build/commands/codemod/releases/v0-0-93/shoppable-posts/App-before.js +0 -43
- package/build/commands/codemod/releases/v0-0-93/shoppable-posts/App-before.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-93/shoppable-videos/App-after.d.ts +0 -1
- package/build/commands/codemod/releases/v0-0-93/shoppable-videos/App-after.js +0 -49
- package/build/commands/codemod/releases/v0-0-93/shoppable-videos/App-after.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-93/shoppable-videos/App-before.d.ts +0 -1
- package/build/commands/codemod/releases/v0-0-93/shoppable-videos/App-before.js +0 -42
- package/build/commands/codemod/releases/v0-0-93/shoppable-videos/App-before.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-93.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-93.js +0 -48
- package/build/commands/codemod/releases/v0-0-93.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-97/index.d.ts +0 -3
- package/build/commands/codemod/releases/v0-0-97/index.js +0 -20
- package/build/commands/codemod/releases/v0-0-97/index.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-97/migrate-to-new-theme.d.ts +0 -1
- package/build/commands/codemod/releases/v0-0-97/migrate-to-new-theme.js +0 -47
- package/build/commands/codemod/releases/v0-0-97/migrate-to-new-theme.js.map +0 -1
- package/build/commands/codemod/releases/v0-0-97/remove-theme-from-config.d.ts +0 -1
- package/build/commands/codemod/releases/v0-0-97/remove-theme-from-config.js +0 -105
- package/build/commands/codemod/releases/v0-0-97/remove-theme-from-config.js.map +0 -1
- package/build/commands/create-extension/constants.d.ts +0 -44
- package/build/commands/create-extension/constants.js +0 -111
- package/build/commands/create-extension/constants.js.map +0 -1
- package/build/commands/create-extension/index.js +0 -71
- package/build/commands/create-extension/index.js.map +0 -1
- package/build/commands/create-extension/types.d.ts +0 -13
- package/build/commands/create-extension/types.js +0 -8
- package/build/commands/create-extension/types.js.map +0 -1
- package/build/commands/create-extension/utils/add-target-to-config.d.ts +0 -2
- package/build/commands/create-extension/utils/add-target-to-config.js +0 -48
- package/build/commands/create-extension/utils/add-target-to-config.js.map +0 -1
- package/build/commands/create-extension/utils/create-extension-files.d.ts +0 -11
- package/build/commands/create-extension/utils/create-extension-files.js +0 -96
- package/build/commands/create-extension/utils/create-extension-files.js.map +0 -1
- package/build/commands/create-extension/utils/create-from-template.d.ts +0 -3
- package/build/commands/create-extension/utils/create-from-template.js +0 -47
- package/build/commands/create-extension/utils/create-from-template.js.map +0 -1
- package/build/commands/create-extension/utils/format-extension-files.d.ts +0 -1
- package/build/commands/create-extension/utils/format-extension-files.js +0 -22
- package/build/commands/create-extension/utils/format-extension-files.js.map +0 -1
- package/build/commands/create-mini/index.d.ts +0 -2
- package/build/commands/create-mini/index.js +0 -11
- package/build/commands/create-mini/index.js.map +0 -1
- package/build/commands/create-mini/legacy/index.d.ts +0 -2
- package/build/commands/create-mini/legacy/index.js +0 -176
- package/build/commands/create-mini/legacy/index.js.map +0 -1
- package/build/commands/create-mini/legacy/utils/template-app.d.ts +0 -2
- package/build/commands/create-mini/legacy/utils/template-app.js +0 -84
- package/build/commands/create-mini/legacy/utils/template-app.js.map +0 -1
- package/build/commands/create-mini/standalone/examples/with-camera-access/.eslintignore +0 -1
- package/build/commands/create-mini/standalone/examples/with-camera-access/.eslintrc.js +0 -3
- package/build/commands/create-mini/standalone/examples/with-camera-access/.graphqlrc.js +0 -1
- package/build/commands/create-mini/standalone/examples/with-camera-access/.prettierrc.json +0 -8
- package/build/commands/create-mini/standalone/examples/with-camera-access/README.md +0 -30
- package/build/commands/create-mini/standalone/examples/with-camera-access/assets.d.ts +0 -14
- package/build/commands/create-mini/standalone/examples/with-camera-access/babel.config.js +0 -5
- package/build/commands/create-mini/standalone/examples/with-camera-access/index.tsx +0 -5
- package/build/commands/create-mini/standalone/examples/with-camera-access/metro.config.js +0 -3
- package/build/commands/create-mini/standalone/examples/with-camera-access/package.json +0 -33
- package/build/commands/create-mini/standalone/examples/with-camera-access/src/App.tsx +0 -152
- package/build/commands/create-mini/standalone/examples/with-camera-access/src/index.tsx +0 -9
- package/build/commands/create-mini/standalone/examples/with-camera-access/src/manifest.json +0 -5
- package/build/commands/create-mini/standalone/examples/with-camera-access/tsconfig.json +0 -41
- package/build/commands/create-mini/standalone/examples/with-fal-ai/.eslintignore +0 -1
- package/build/commands/create-mini/standalone/examples/with-fal-ai/.eslintrc.js +0 -3
- package/build/commands/create-mini/standalone/examples/with-fal-ai/.graphqlrc.js +0 -1
- package/build/commands/create-mini/standalone/examples/with-fal-ai/.prettierrc.json +0 -8
- package/build/commands/create-mini/standalone/examples/with-fal-ai/README.md +0 -46
- package/build/commands/create-mini/standalone/examples/with-fal-ai/assets.d.ts +0 -14
- package/build/commands/create-mini/standalone/examples/with-fal-ai/babel.config.js +0 -5
- package/build/commands/create-mini/standalone/examples/with-fal-ai/index.tsx +0 -5
- package/build/commands/create-mini/standalone/examples/with-fal-ai/metro.config.js +0 -3
- package/build/commands/create-mini/standalone/examples/with-fal-ai/package.json +0 -33
- package/build/commands/create-mini/standalone/examples/with-fal-ai/src/App.tsx +0 -5
- package/build/commands/create-mini/standalone/examples/with-fal-ai/src/index.tsx +0 -9
- package/build/commands/create-mini/standalone/examples/with-fal-ai/src/manifest.json +0 -21
- package/build/commands/create-mini/standalone/examples/with-fal-ai/src/screens/HomeScreen.tsx +0 -142
- package/build/commands/create-mini/standalone/examples/with-fal-ai/tsconfig.json +0 -41
- package/build/commands/create-mini/standalone/examples/with-getting-started/.eslintignore +0 -1
- package/build/commands/create-mini/standalone/examples/with-getting-started/.eslintrc.js +0 -3
- package/build/commands/create-mini/standalone/examples/with-getting-started/.graphqlrc.js +0 -1
- package/build/commands/create-mini/standalone/examples/with-getting-started/.prettierrc.json +0 -8
- package/build/commands/create-mini/standalone/examples/with-getting-started/README.md +0 -18
- package/build/commands/create-mini/standalone/examples/with-getting-started/assets.d.ts +0 -14
- package/build/commands/create-mini/standalone/examples/with-getting-started/babel.config.js +0 -5
- package/build/commands/create-mini/standalone/examples/with-getting-started/index.tsx +0 -5
- package/build/commands/create-mini/standalone/examples/with-getting-started/metro.config.js +0 -3
- package/build/commands/create-mini/standalone/examples/with-getting-started/package.json +0 -33
- package/build/commands/create-mini/standalone/examples/with-getting-started/src/App.tsx +0 -23
- package/build/commands/create-mini/standalone/examples/with-getting-started/src/index.tsx +0 -9
- package/build/commands/create-mini/standalone/examples/with-getting-started/src/manifest.json +0 -5
- package/build/commands/create-mini/standalone/examples/with-getting-started/src/screens/HomeScreen.tsx +0 -133
- package/build/commands/create-mini/standalone/examples/with-getting-started/src/screens/NativeFeaturesScreen.tsx +0 -138
- package/build/commands/create-mini/standalone/examples/with-getting-started/src/types/screens.ts +0 -5
- package/build/commands/create-mini/standalone/examples/with-search/.eslintignore +0 -1
- package/build/commands/create-mini/standalone/examples/with-search/.eslintrc.js +0 -3
- package/build/commands/create-mini/standalone/examples/with-search/.graphqlrc.js +0 -1
- package/build/commands/create-mini/standalone/examples/with-search/.prettierrc.json +0 -8
- package/build/commands/create-mini/standalone/examples/with-search/README.md +0 -25
- package/build/commands/create-mini/standalone/examples/with-search/assets.d.ts +0 -14
- package/build/commands/create-mini/standalone/examples/with-search/babel.config.js +0 -5
- package/build/commands/create-mini/standalone/examples/with-search/index.tsx +0 -5
- package/build/commands/create-mini/standalone/examples/with-search/metro.config.js +0 -3
- package/build/commands/create-mini/standalone/examples/with-search/package.json +0 -33
- package/build/commands/create-mini/standalone/examples/with-search/src/App.tsx +0 -23
- package/build/commands/create-mini/standalone/examples/with-search/src/components/HeaderAction.tsx +0 -32
- package/build/commands/create-mini/standalone/examples/with-search/src/components/ShopCard.tsx +0 -92
- package/build/commands/create-mini/standalone/examples/with-search/src/index.tsx +0 -9
- package/build/commands/create-mini/standalone/examples/with-search/src/manifest.json +0 -7
- package/build/commands/create-mini/standalone/examples/with-search/src/screens/MerchantSearchScreen.tsx +0 -126
- package/build/commands/create-mini/standalone/examples/with-search/src/screens/ProductSearchScreen.tsx +0 -115
- package/build/commands/create-mini/standalone/examples/with-search/src/types/screens.ts +0 -6
- package/build/commands/create-mini/standalone/examples/with-search/tsconfig.json +0 -41
- package/build/commands/create-mini/standalone/examples/with-user-data/.eslintignore +0 -1
- package/build/commands/create-mini/standalone/examples/with-user-data/.eslintrc.js +0 -3
- package/build/commands/create-mini/standalone/examples/with-user-data/.graphqlrc.js +0 -1
- package/build/commands/create-mini/standalone/examples/with-user-data/.prettierrc.json +0 -8
- package/build/commands/create-mini/standalone/examples/with-user-data/README.md +0 -26
- package/build/commands/create-mini/standalone/examples/with-user-data/assets.d.ts +0 -14
- package/build/commands/create-mini/standalone/examples/with-user-data/babel.config.js +0 -5
- package/build/commands/create-mini/standalone/examples/with-user-data/index.tsx +0 -5
- package/build/commands/create-mini/standalone/examples/with-user-data/metro.config.js +0 -3
- package/build/commands/create-mini/standalone/examples/with-user-data/package.json +0 -33
- package/build/commands/create-mini/standalone/examples/with-user-data/src/App.tsx +0 -5
- package/build/commands/create-mini/standalone/examples/with-user-data/src/components/ProductSection.tsx +0 -39
- package/build/commands/create-mini/standalone/examples/with-user-data/src/components/SectionStyles.ts +0 -9
- package/build/commands/create-mini/standalone/examples/with-user-data/src/components/ShopCard.tsx +0 -42
- package/build/commands/create-mini/standalone/examples/with-user-data/src/components/ShopSection.tsx +0 -40
- package/build/commands/create-mini/standalone/examples/with-user-data/src/index.tsx +0 -9
- package/build/commands/create-mini/standalone/examples/with-user-data/src/manifest.json +0 -10
- package/build/commands/create-mini/standalone/examples/with-user-data/src/screens/HomeScreen.tsx +0 -67
- package/build/commands/create-mini/standalone/examples/with-user-data/tsconfig.json +0 -41
- package/build/commands/create-mini/standalone/index.d.ts +0 -2
- package/build/commands/create-mini/standalone/index.js.map +0 -1
- package/build/commands/create-mini/utils/examples.js.map +0 -1
- package/build/commands/create-mini/utils/index.js.map +0 -1
- package/build/commands/dev/utils/app-screens.d.ts +0 -9
- package/build/commands/dev/utils/app-screens.js +0 -170
- package/build/commands/dev/utils/app-screens.js.map +0 -1
- package/build/commands/dev/utils/metro/metro-config.d.ts +0 -2
- package/build/commands/dev/utils/metro/metro-config.js +0 -29
- package/build/commands/dev/utils/metro/metro-config.js.map +0 -1
- package/build/commands/dev/utils/metro/metro-minis-module-resolver.d.ts +0 -6
- package/build/commands/dev/utils/metro/metro-minis-module-resolver.js +0 -11
- package/build/commands/dev/utils/metro/metro-minis-module-resolver.js.map +0 -1
- package/build/commands/dev/utils/metro/metro-reporter.d.ts +0 -21
- package/build/commands/dev/utils/metro/metro-reporter.js +0 -46
- package/build/commands/dev/utils/metro/metro-reporter.js.map +0 -1
- package/build/commands/dev/utils/metro/metro-server-middleware.d.ts +0 -10
- package/build/commands/dev/utils/metro/metro-server-middleware.js +0 -74
- package/build/commands/dev/utils/metro/metro-server-middleware.js.map +0 -1
- package/build/commands/dev/utils/metro/metro-server.d.ts +0 -6
- package/build/commands/dev/utils/metro/metro-server.js +0 -26
- package/build/commands/dev/utils/metro/metro-server.js.map +0 -1
- package/build/commands/dev/utils/start-app/types.d.ts +0 -14
- package/build/commands/dev/utils/start-app/types.js +0 -2
- package/build/commands/dev/utils/start-app/types.js.map +0 -1
- package/build/commands/dev/utils/types.d.ts +0 -24
- package/build/commands/dev/utils/types.js.map +0 -1
- package/build/commands/doctor/utils/diagnose-dependencies.d.ts +0 -8
- package/build/commands/doctor/utils/diagnose-dependencies.js +0 -190
- package/build/commands/doctor/utils/diagnose-dependencies.js.map +0 -1
- package/build/commands/generate-graphql-types/index.d.ts +0 -6
- package/build/commands/generate-graphql-types/index.js +0 -36
- package/build/commands/generate-graphql-types/index.js.map +0 -1
- package/build/commands/generate-graphql-types/utils/generate-graphql-types.d.ts +0 -2
- package/build/commands/generate-graphql-types/utils/generate-graphql-types.js +0 -67
- package/build/commands/generate-graphql-types/utils/generate-graphql-types.js.map +0 -1
- package/build/commands/generate-graphql-types/utils/get-graphql-config.d.ts +0 -1
- package/build/commands/generate-graphql-types/utils/get-graphql-config.js +0 -39
- package/build/commands/generate-graphql-types/utils/get-graphql-config.js.map +0 -1
- package/build/commands/generate-graphql-types/utils/get-graphql-config.spec.d.ts +0 -1
- package/build/commands/generate-graphql-types/utils/get-graphql-config.spec.js +0 -62
- package/build/commands/generate-graphql-types/utils/get-graphql-config.spec.js.map +0 -1
- package/build/commands/generate-graphql-types/utils/require.d.ts +0 -2
- package/build/commands/generate-graphql-types/utils/require.js +0 -3
- package/build/commands/generate-graphql-types/utils/require.js.map +0 -1
- package/build/commands/submit/utils/request-entry-point-params.d.ts +0 -1
- package/build/commands/submit/utils/request-entry-point-params.js +0 -43
- package/build/commands/submit/utils/request-entry-point-params.js.map +0 -1
- package/build/commands/upgrade/utils/clear-metro-cache.d.ts +0 -1
- package/build/commands/upgrade/utils/clear-metro-cache.js +0 -12
- package/build/commands/upgrade/utils/clear-metro-cache.js.map +0 -1
- package/build/commands/upgrade/utils/cli.d.ts +0 -1
- package/build/commands/upgrade/utils/cli.js +0 -15
- package/build/commands/upgrade/utils/cli.js.map +0 -1
- package/build/constants/extensions.d.ts +0 -21
- package/build/constants/extensions.js +0 -25
- package/build/constants/extensions.js.map +0 -1
- package/build/constants/templates.d.ts +0 -7
- package/build/constants/templates.js +0 -8
- package/build/constants/templates.js.map +0 -1
- package/build/templates-index.d.ts +0 -6
- package/build/templates-index.js +0 -24
- package/build/templates-index.js.map +0 -1
- package/build/utils/development-params.d.ts +0 -13
- package/build/utils/development-params.js +0 -44
- package/build/utils/development-params.js.map +0 -1
- package/build/utils/extensions.d.ts +0 -13
- package/build/utils/extensions.js +0 -87
- package/build/utils/extensions.js.map +0 -1
- package/build/utils/patch-package.d.ts +0 -5
- package/build/utils/patch-package.js +0 -79
- package/build/utils/patch-package.js.map +0 -1
- package/build/utils/semver.d.ts +0 -1
- package/build/utils/semver.js +0 -19
- package/build/utils/semver.js.map +0 -1
- package/build/utils/standalone.d.ts +0 -2
- package/build/utils/standalone.js +0 -15
- package/build/utils/standalone.js.map +0 -1
- package/scripts/test-create-mini-legacy.ts +0 -63
- package/scripts/test-create-mini-standalone.ts +0 -80
- package/shipit.snapshot.yml +0 -9
- package/templates/__template_blank/src/App.tsx +0 -24
- package/templates/__template_blank/src/index.tsx +0 -9
- package/templates/__template_common/.eslintignore +0 -1
- package/templates/__template_common/.eslintrc.js +0 -3
- package/templates/__template_common/.graphqlrc.js +0 -1
- package/templates/__template_common/.prettierrc.json +0 -8
- package/templates/__template_common/assets.d.ts +0 -14
- package/templates/__template_common/babel.config.js +0 -5
- package/templates/__template_common/index.tsx +0 -5
- package/templates/__template_common/metro.config.js +0 -5
- package/templates/__template_common/package.json +0 -35
- package/templates/__template_common/src/manifest.json +0 -6
- package/templates/__template_common/tsconfig.json +0 -41
- package/templates/__template_getting_started/src/App.tsx +0 -23
- package/templates/__template_getting_started/src/index.tsx +0 -9
- package/templates/__template_getting_started/src/manifest.json +0 -7
- package/templates/__template_getting_started/src/screens/HomeScreen.tsx +0 -131
- package/templates/__template_getting_started/src/screens/NativeFeaturesScreen.tsx +0 -137
- package/templates/__template_getting_started/src/types/screens.ts +0 -5
- package/templates/__template_shoppable_posts/src/App.tsx +0 -42
- package/templates/__template_shoppable_posts/src/index.tsx +0 -9
- package/templates/__template_shoppable_videos/src/App.tsx +0 -39
- package/templates/__template_shoppable_videos/src/index.tsx +0 -9
- package/templates/extensions/components/__template_blank/render.tsx +0 -18
- package/templates/extensions/components/__template_bundle-collection/render.tsx +0 -31
- package/templates/extensions/components/__template_bundle-collection/seed.ts +0 -26
- package/templates/extensions/components/__template_bundle-selector/render.tsx +0 -51
- package/templates/extensions/components/__template_bundle-selector/seed.ts +0 -72
- package/templates/extensions/components/__template_default-card/render.tsx +0 -24
- package/templates/extensions/components/__template_default-card/seed.ts +0 -10
- package/templates/extensions/components/__template_image-collection/render.tsx +0 -17
- package/templates/extensions/components/__template_image-collection/seed.ts +0 -70
- package/templates/extensions/components/__template_link/render.tsx +0 -17
- package/templates/extensions/components/__template_link/seed.ts +0 -5
- package/templates/extensions/components/__template_product-offer-card/render.tsx +0 -17
- package/templates/extensions/components/__template_product-offer-card/seed.ts +0 -44
- package/templates/extensions/components/__template_survey-single-response/render.tsx +0 -26
- package/templates/extensions/components/__template_survey-single-response/seed.ts +0 -22
- package/templates/extensions/components/__template_video-collection/render.tsx +0 -17
- package/templates/extensions/components/__template_video-collection/seed.ts +0 -37
- package/templates/extensions/queries/__template_order-confirmation-page/input.graphql +0 -5
- package/templates/extensions/queries/__template_order-confirmation-page/input.graphql.d.ts +0 -24
- package/templates/extensions/queries/__template_order-management-page/input.graphql +0 -5
- package/templates/extensions/queries/__template_order-management-page/input.graphql.d.ts +0 -24
- package/templates/extensions/queries/__template_product-page/input.graphql +0 -9
- package/templates/extensions/queries/__template_product-page/input.graphql.d.ts +0 -36
- package/templates/extensions/queries/__template_store-page/input.graphql +0 -5
- package/templates/extensions/queries/__template_store-page/input.graphql.d.ts +0 -24
- /package/build/commands/{create-extension → create}/index.d.ts +0 -0
- /package/build/commands/{create-mini → create}/utils/index.d.ts +0 -0
- /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'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,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,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,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,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
|