@shopify/shop-minis-cli 0.0.35

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 (152) hide show
  1. package/README.md +8 -0
  2. package/build/commands/create-mini/index.d.ts +2 -0
  3. package/build/commands/create-mini/index.js +116 -0
  4. package/build/commands/create-mini/index.js.map +1 -0
  5. package/build/commands/create-mini/utils/template-app.d.ts +1 -0
  6. package/build/commands/create-mini/utils/template-app.js +44 -0
  7. package/build/commands/create-mini/utils/template-app.js.map +1 -0
  8. package/build/commands/dev/index.d.ts +6 -0
  9. package/build/commands/dev/index.js +31 -0
  10. package/build/commands/dev/index.js.map +1 -0
  11. package/build/commands/dev/utils/android.d.ts +16 -0
  12. package/build/commands/dev/utils/android.js +165 -0
  13. package/build/commands/dev/utils/android.js.map +1 -0
  14. package/build/commands/dev/utils/binaries.d.ts +83 -0
  15. package/build/commands/dev/utils/binaries.js +173 -0
  16. package/build/commands/dev/utils/binaries.js.map +1 -0
  17. package/build/commands/dev/utils/binaries.test.d.ts +1 -0
  18. package/build/commands/dev/utils/binaries.test.js +275 -0
  19. package/build/commands/dev/utils/binaries.test.js.map +1 -0
  20. package/build/commands/dev/utils/deeplink.d.ts +3 -0
  21. package/build/commands/dev/utils/deeplink.js +30 -0
  22. package/build/commands/dev/utils/deeplink.js.map +1 -0
  23. package/build/commands/dev/utils/interactive-terminal.d.ts +23 -0
  24. package/build/commands/dev/utils/interactive-terminal.js +252 -0
  25. package/build/commands/dev/utils/interactive-terminal.js.map +1 -0
  26. package/build/commands/dev/utils/metro/metro-config.d.ts +2 -0
  27. package/build/commands/dev/utils/metro/metro-config.js +31 -0
  28. package/build/commands/dev/utils/metro/metro-config.js.map +1 -0
  29. package/build/commands/dev/utils/metro/metro-reporter.d.ts +14 -0
  30. package/build/commands/dev/utils/metro/metro-reporter.js +34 -0
  31. package/build/commands/dev/utils/metro/metro-reporter.js.map +1 -0
  32. package/build/commands/dev/utils/metro/metro-server-middleware.d.ts +6 -0
  33. package/build/commands/dev/utils/metro/metro-server-middleware.js +45 -0
  34. package/build/commands/dev/utils/metro/metro-server-middleware.js.map +1 -0
  35. package/build/commands/dev/utils/metro/metro-server.d.ts +2 -0
  36. package/build/commands/dev/utils/metro/metro-server.js +24 -0
  37. package/build/commands/dev/utils/metro/metro-server.js.map +1 -0
  38. package/build/commands/dev/utils/minis-manifest.d.ts +1 -0
  39. package/build/commands/dev/utils/minis-manifest.js +24 -0
  40. package/build/commands/dev/utils/minis-manifest.js.map +1 -0
  41. package/build/commands/dev/utils/qr-code.d.ts +1 -0
  42. package/build/commands/dev/utils/qr-code.js +12 -0
  43. package/build/commands/dev/utils/qr-code.js.map +1 -0
  44. package/build/commands/dev/utils/simulator.d.ts +19 -0
  45. package/build/commands/dev/utils/simulator.js +89 -0
  46. package/build/commands/dev/utils/simulator.js.map +1 -0
  47. package/build/commands/dev/utils/with-retries.d.ts +4 -0
  48. package/build/commands/dev/utils/with-retries.js +28 -0
  49. package/build/commands/dev/utils/with-retries.js.map +1 -0
  50. package/build/commands/generate-graphql-types/index.d.ts +5 -0
  51. package/build/commands/generate-graphql-types/index.js +90 -0
  52. package/build/commands/generate-graphql-types/index.js.map +1 -0
  53. package/build/commands/utils/exec-async-child-process.d.ts +18 -0
  54. package/build/commands/utils/exec-async-child-process.js +48 -0
  55. package/build/commands/utils/exec-async-child-process.js.map +1 -0
  56. package/build/commands/utils/wrap-with-loading-indicator.d.ts +9 -0
  57. package/build/commands/utils/wrap-with-loading-indicator.js +23 -0
  58. package/build/commands/utils/wrap-with-loading-indicator.js.map +1 -0
  59. package/build/dev-panel/images/bottomsheet.png +0 -0
  60. package/build/dev-panel/images/checkmark.svg +3 -0
  61. package/build/dev-panel/images/chevron.svg +3 -0
  62. package/build/dev-panel/images/copy.svg +4 -0
  63. package/build/dev-panel/images/get-started.svg +3 -0
  64. package/build/dev-panel/images/how-to.svg +3 -0
  65. package/build/dev-panel/images/navigation.png +0 -0
  66. package/build/dev-panel/images/references.svg +3 -0
  67. package/build/dev-panel/images/shop-minis-logo-inverse.svg +5 -0
  68. package/build/dev-panel/images/shop-minis-logo.svg +5 -0
  69. package/build/dev-panel/images/stories.png +0 -0
  70. package/build/dev-panel/images/topics.svg +3 -0
  71. package/build/dev-panel/index.html +302 -0
  72. package/build/dev-panel/middleware.d.ts +4 -0
  73. package/build/dev-panel/middleware.js +11 -0
  74. package/build/dev-panel/middleware.js.map +1 -0
  75. package/build/dev-panel/middleware.ts +6 -0
  76. package/build/dev-panel/styles.css +507 -0
  77. package/build/index.d.ts +2 -0
  78. package/build/index.js +26 -0
  79. package/build/index.js.map +1 -0
  80. package/package.json +83 -0
  81. package/templates/__template_blank/src/custom.d.ts +4 -0
  82. package/templates/__template_blank/src/index.tsx +9 -0
  83. package/templates/__template_blank/src/screens/HomeScreen.tsx +12 -0
  84. package/templates/__template_blank/src/types.ts +5 -0
  85. package/templates/__template_common/.eslintignore +1 -0
  86. package/templates/__template_common/.eslintrc.json +132 -0
  87. package/templates/__template_common/.prettierrc.json +8 -0
  88. package/templates/__template_common/babel.config.js +19 -0
  89. package/templates/__template_common/gitignore +3 -0
  90. package/templates/__template_common/index.tsx +43 -0
  91. package/templates/__template_common/metro.config.js +31 -0
  92. package/templates/__template_common/package.json +68 -0
  93. package/templates/__template_common/patches/react-native+0.68.5.patch +173 -0
  94. package/templates/__template_common/src/manifest.json +29 -0
  95. package/templates/__template_common/tsconfig.json +36 -0
  96. package/templates/__template_hello_world/src/assets/Modal-component-thumbnail.png +0 -0
  97. package/templates/__template_hello_world/src/assets/ProductCard-component-thumbnail.png +0 -0
  98. package/templates/__template_hello_world/src/assets/ProductLink-component-thumbnail.png +0 -0
  99. package/templates/__template_hello_world/src/assets/assets.d.ts +4 -0
  100. package/templates/__template_hello_world/src/assets/figma-logo.svg +14 -0
  101. package/templates/__template_hello_world/src/assets/shop-minis-logo.svg +7 -0
  102. package/templates/__template_hello_world/src/components/ButtonCTA.tsx +31 -0
  103. package/templates/__template_hello_world/src/components/ComponentLink.ts +70 -0
  104. package/templates/__template_hello_world/src/components/ComponentListItem.tsx +38 -0
  105. package/templates/__template_hello_world/src/components/FeaturedComponents.tsx +108 -0
  106. package/templates/__template_hello_world/src/components/Header.tsx +40 -0
  107. package/templates/__template_hello_world/src/data/Test.graphql +33 -0
  108. package/templates/__template_hello_world/src/data/Test.graphql.d.ts +114 -0
  109. package/templates/__template_hello_world/src/data/TestProducts.graphql +34 -0
  110. package/templates/__template_hello_world/src/data/TestProducts.graphql.d.ts +119 -0
  111. package/templates/__template_hello_world/src/index.tsx +9 -0
  112. package/templates/__template_hello_world/src/routes.tsx +107 -0
  113. package/templates/__template_hello_world/src/screens/AvatarScreen.tsx +95 -0
  114. package/templates/__template_hello_world/src/screens/BottomSheetScreen.tsx +711 -0
  115. package/templates/__template_hello_world/src/screens/ButtonsScreen.tsx +90 -0
  116. package/templates/__template_hello_world/src/screens/GridScreen.tsx +74 -0
  117. package/templates/__template_hello_world/src/screens/HomeScreen.tsx +70 -0
  118. package/templates/__template_hello_world/src/screens/IconsScreen.tsx +181 -0
  119. package/templates/__template_hello_world/src/screens/MediaScreen.tsx +130 -0
  120. package/templates/__template_hello_world/src/screens/ModalScreen.tsx +379 -0
  121. package/templates/__template_hello_world/src/screens/ProductCardGridScreen.tsx +68 -0
  122. package/templates/__template_hello_world/src/screens/ProductCardScreen.tsx +62 -0
  123. package/templates/__template_hello_world/src/screens/ProductLinkScreen.tsx +215 -0
  124. package/templates/__template_hello_world/src/screens/ProgressIndicatorScreen.tsx +77 -0
  125. package/templates/__template_hello_world/src/screens/QuantityPickerScreen.tsx +76 -0
  126. package/templates/__template_hello_world/src/screens/SpinnerScreen.tsx +63 -0
  127. package/templates/__template_hello_world/src/screens/TypographyScreen.tsx +274 -0
  128. package/templates/__template_hello_world/src/screens/WebViewScreen.tsx +42 -0
  129. package/templates/__template_hello_world/src/types.ts +25 -0
  130. package/templates/__template_snowboardz/src/assets/assets.d.ts +4 -0
  131. package/templates/__template_snowboardz/src/assets/circle-blue.svg +9 -0
  132. package/templates/__template_snowboardz/src/assets/circle-green.svg +9 -0
  133. package/templates/__template_snowboardz/src/assets/circle-purple.svg +9 -0
  134. package/templates/__template_snowboardz/src/assets/circle-rainbow.svg +34 -0
  135. package/templates/__template_snowboardz/src/assets/circle-red.svg +9 -0
  136. package/templates/__template_snowboardz/src/assets/circle-yellow.svg +9 -0
  137. package/templates/__template_snowboardz/src/assets/skill-level-icon-advanced.svg +3 -0
  138. package/templates/__template_snowboardz/src/assets/skill-level-icon-beginner.svg +3 -0
  139. package/templates/__template_snowboardz/src/assets/skill-level-icon-intermediate.svg +3 -0
  140. package/templates/__template_snowboardz/src/components/ColorButton.tsx +79 -0
  141. package/templates/__template_snowboardz/src/components/ColorPicker.tsx +40 -0
  142. package/templates/__template_snowboardz/src/components/EmptyResult.tsx +52 -0
  143. package/templates/__template_snowboardz/src/components/SkillLevelIcon.tsx +44 -0
  144. package/templates/__template_snowboardz/src/components/SkillLevelPicker.tsx +86 -0
  145. package/templates/__template_snowboardz/src/data/TestProducts.graphql +34 -0
  146. package/templates/__template_snowboardz/src/data/TestProducts.graphql.d.ts +108 -0
  147. package/templates/__template_snowboardz/src/hooks/useSnowboardData.tsx +37 -0
  148. package/templates/__template_snowboardz/src/index.tsx +9 -0
  149. package/templates/__template_snowboardz/src/routes.tsx +17 -0
  150. package/templates/__template_snowboardz/src/screens/HomeScreen.tsx +126 -0
  151. package/templates/__template_snowboardz/src/types.ts +12 -0
  152. package/templates/__template_snowboardz/src/utils.ts +17 -0
@@ -0,0 +1,95 @@
1
+ import {Platform, SafeAreaView, ScrollView} from 'react-native'
2
+ import {Avatar, Box, Text, useTheme} from '@shopify/shop-minis-platform-sdk'
3
+
4
+ import {Header} from '../components/Header'
5
+
6
+ const monospaceFontFamily = Platform.OS === 'ios' ? 'Menlo' : 'monospace'
7
+
8
+ export const AvatarScreen = () => {
9
+ const theme = useTheme()
10
+ return (
11
+ <SafeAreaView
12
+ style={{flex: 1, backgroundColor: theme.colors['backgrounds-regular']}}
13
+ >
14
+ <ScrollView
15
+ style={{flex: 1, backgroundColor: theme.colors['backgrounds-regular']}}
16
+ >
17
+ <Header />
18
+ <Box px="gutter">
19
+ <Box marginBottom="m">
20
+ <Text variant="headerBold" mb="xs">
21
+ Avatar
22
+ </Text>
23
+ <Text variant="bodyLarge">
24
+ Avatars are used to show a thumbnail of a user or business.
25
+ </Text>
26
+ </Box>
27
+
28
+ <Box flexDirection="row" alignItems="center">
29
+ <Avatar
30
+ color="foregrounds-regular"
31
+ source={{uri: 'https://picsum.photos/id/1080/1000/1500'}}
32
+ size="small"
33
+ />
34
+ <Avatar
35
+ color="foregrounds-regular"
36
+ source={{uri: 'https://picsum.photos/id/1080/1000/1500'}}
37
+ size="medium"
38
+ />
39
+ <Avatar
40
+ color="foregrounds-regular"
41
+ source={{uri: 'https://picsum.photos/id/1080/1000/1500'}}
42
+ size="large"
43
+ />
44
+ </Box>
45
+
46
+ <Text mb="l" mt="s">
47
+ Size&nbsp;
48
+ <Text
49
+ fontFamily={monospaceFontFamily}
50
+ variant="bodyLargeBold"
51
+ color="backgrounds-success"
52
+ >
53
+ `small`
54
+ </Text>
55
+ &nbsp; | &nbsp;
56
+ <Text
57
+ fontFamily={monospaceFontFamily}
58
+ variant="bodyLargeBold"
59
+ color="backgrounds-success"
60
+ >
61
+ `medium`
62
+ </Text>
63
+ &nbsp; | &nbsp;
64
+ <Text
65
+ fontFamily={monospaceFontFamily}
66
+ variant="bodyLargeBold"
67
+ color="backgrounds-success"
68
+ >
69
+ `large`
70
+ </Text>
71
+ </Text>
72
+
73
+ <Box flexDirection="row" alignItems="center">
74
+ <Avatar
75
+ color="foregrounds-regular"
76
+ source={{uri: 'https://picsum.photos/id/1080/1000/1500'}}
77
+ title="Title"
78
+ />
79
+ </Box>
80
+
81
+ <Text mb="l" mt="s">
82
+ Title&nbsp;
83
+ <Text
84
+ fontFamily={monospaceFontFamily}
85
+ variant="bodyLargeBold"
86
+ color="backgrounds-dangerous"
87
+ >
88
+ string
89
+ </Text>
90
+ </Text>
91
+ </Box>
92
+ </ScrollView>
93
+ </SafeAreaView>
94
+ )
95
+ }