@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 @@
1
+ {"version":3,"file":"middleware.js","sourceRoot":"","sources":["../../src/dev-panel/middleware.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAgC;AAEhC,MAAM,eAAe,GAAG,SAAS,CAAA;AAEpB,QAAA,kBAAkB,GAAG,IAAA,sBAAK,EAAC,eAAe,CAAC,CAAA;AAC3C,QAAA,kBAAkB,GAAG,iCAAiC,CAAA"}
@@ -0,0 +1,6 @@
1
+ import serve from 'serve-static'
2
+
3
+ const INDEX_FILE_PATH = __dirname
4
+
5
+ export const devPanelMiddleware = serve(INDEX_FILE_PATH)
6
+ export const DEV_PANEL_BASE_URL = `http://localhost:8082/dev_panel`
@@ -0,0 +1,507 @@
1
+ :root {
2
+ /* Light colors */
3
+ --light-backgrounds-regular: #fff;
4
+ --light-backgrounds-secondary: #f4f4ed;
5
+ --light-backgrounds-inverse: #0F1721;
6
+ --light-foregrounds-regular: #0F1721;
7
+ --light-foregrounds-regular-inverse: #fff;
8
+ --light-foregrounds-primary: #5433EB;
9
+ /* Dark colors */
10
+ --dark-background-regular: #0F1721;
11
+ --dark-background-secondary: #3F454D;
12
+ --dark-backgrounds-inverse: #fff;
13
+ --dark-foregrounds-regular: #fff;
14
+ --dark-foregrounds-regular-inverse: #0F1721;
15
+ --dark-foregrounds-primary: #9C83F8;
16
+ }
17
+ @font-face {
18
+ font-family: 'GoodSans';
19
+ src: local('GoodSans'),
20
+ url('https://cdn.shopify.com/static/fonts/GoodSans-Bold.woff2') format('woff2');
21
+ font-style: normal;
22
+ font-weight: 700;
23
+ font-display: swap;
24
+ }
25
+
26
+ @font-face {
27
+ font-family: 'GoodSans';
28
+ src: local('GoodSans'),
29
+ url('https://cdn.shopify.com/static/fonts/GoodSans-Medium.woff2') format('woff2');
30
+ font-style: normal;
31
+ font-weight: 500;
32
+ font-display: swap;
33
+ }
34
+
35
+ @font-face {
36
+ font-family: 'GoodSans';
37
+ src: local('GoodSans'),
38
+ url('https://cdn.shopify.com/static/fonts/GoodSansText-Regular.woff') format('woff2');
39
+ font-style: normal;
40
+ font-weight: 400;
41
+ font-display: swap;
42
+ }
43
+
44
+ *,
45
+ *::before,
46
+ *::after {
47
+ box-sizing: border-box;
48
+ }
49
+
50
+ html,
51
+ body {
52
+ margin: 0;
53
+ padding: 0;
54
+ }
55
+
56
+ html {
57
+ font-family: 'GoodSans';
58
+ font-size: 1em;
59
+ }
60
+
61
+ body {
62
+ display: flex;
63
+ flex-direction: column;
64
+ align-items: center;
65
+ /* height: 100vh; */
66
+ padding-bottom: 100px;
67
+ background: var(--light-backgrounds-secondary);
68
+ color: var(--light-foregrounds-regular);
69
+ }
70
+
71
+ a {
72
+ color: var(--light-foregrounds-regular);
73
+ text-decoration: none;
74
+ }
75
+
76
+ body::-webkit-scrollbar {
77
+ width: 10px;
78
+ }
79
+
80
+ body::-webkit-scrollbar-track {
81
+ background: rgba(0, 0, 0, 0.1);
82
+ }
83
+
84
+ body::-webkit-scrollbar-track:hover {
85
+ background: rgba(0, 0, 0, 0.3);
86
+ }
87
+
88
+ body::-webkit-scrollbar-thumb {
89
+ background-color: rgba(0, 0, 0, 0.3);
90
+ border-radius: 6px;
91
+ border: 2px solid transparent;
92
+ margin: 2px;
93
+ background-clip: padding-box;
94
+ }
95
+
96
+ body::-webkit-scrollbar-thumb:hover {
97
+ background-color: rgba(0, 0, 0, 0.8);
98
+ }
99
+
100
+ h1 {
101
+ font-size: 1em;
102
+ font-weight: 500;
103
+ }
104
+
105
+ .page {
106
+ max-width: min(70em, 100%);
107
+ display: flex;
108
+ flex-direction: column;
109
+ padding-left: 1em;
110
+ padding-right: 1em;
111
+ }
112
+
113
+ .logo {
114
+ margin-top: 2em;
115
+ align-self: center;
116
+ margin-bottom: 1em;
117
+ }
118
+
119
+ .link-label {
120
+ margin-bottom: 0.4em;
121
+ }
122
+
123
+ .link {
124
+ margin-top: 0;
125
+ white-space: nowrap;
126
+ overflow: hidden;
127
+ text-overflow: ellipsis;
128
+ display: block;
129
+ font-style: normal;
130
+ font-size: 13px;
131
+ line-height: 118%;
132
+ color: var(--light-foregrounds-regular);
133
+ text-decoration: none;
134
+ padding: 1rem 0 1rem 1rem;
135
+ }
136
+
137
+ .link a,
138
+ .link a:active,
139
+ .link a:visited {
140
+ color: var(--light-foregrounds-primary);
141
+ }
142
+
143
+ .qrcode {
144
+ flex: 0;
145
+ width: 100%;
146
+ position: relative;
147
+ }
148
+
149
+ .qr-canvas {
150
+ display: none;
151
+ }
152
+
153
+ .content {
154
+ flex: 1;
155
+ width: 100%;
156
+ }
157
+
158
+ .container {
159
+ margin-top: 1em;
160
+ margin-bottom: 2em;
161
+ display: flex;
162
+ flex-direction: column;
163
+ gap: 2em;
164
+ word-wrap: break-word;
165
+ }
166
+
167
+ .param-row {
168
+ display: flex;
169
+ flex-direction: row;
170
+ }
171
+
172
+ input[type='text'] {
173
+ width: 100%;
174
+ padding: 12px 16px;
175
+ margin: 4px 0 12px;
176
+ box-sizing: border-box;
177
+ border-radius: 6px;
178
+ border: 1px solid #cbcbca;
179
+ font-family: 'GoodSans';
180
+ font-size: 0.875em;
181
+ outline: none;
182
+ }
183
+
184
+ label {
185
+ font-size: 12px;
186
+ }
187
+
188
+ .param-appendix {
189
+ font-size: 13px;
190
+ }
191
+ b.param-appendix {
192
+ font-family: 'Courier New', Courier, monospace;
193
+ }
194
+
195
+ .icon-checkmark {
196
+ color: var(--light-foregrounds-regular-inverse);
197
+ display: none;
198
+ gap: 0.5rem;
199
+ }
200
+ .icon-copy {
201
+ color: var(--light-foregrounds-regular-inverse);
202
+ display: flex;
203
+ gap: 0.5rem;
204
+ }
205
+
206
+ .icon-checkmark, .icon-copy span {
207
+ font-size: 13px;
208
+ }
209
+
210
+ .cursor-pointer {
211
+ cursor: pointer;
212
+ }
213
+
214
+ .button {
215
+ background-color: var(--light-backgrounds-inverse);
216
+ color: var(--light-foregrounds-regular-inverse);
217
+ border-radius: 100px;
218
+ padding: 16px;
219
+ min-width: 200px;
220
+ border: none;
221
+ text-decoration: none;
222
+ font-size: 1rem;
223
+ margin-top: 20px;
224
+ }
225
+
226
+ .button:hover {
227
+ cursor: pointer;
228
+ }
229
+
230
+ .Main {
231
+ display: flex;
232
+ flex-direction: column;
233
+ gap: 2rem;
234
+ flex: 3;
235
+ }
236
+
237
+ .rail {
238
+ display: flex;
239
+ flex-direction: row;
240
+ gap: 1rem;
241
+ }
242
+
243
+ .button-link {
244
+ display: flex;
245
+ flex-direction: row;
246
+ align-items: flex-start;
247
+ background: var(--light-backgrounds-inverse);
248
+ color: var(--light-foregrounds-regular-inverse);
249
+ border-radius: 40px;
250
+ padding: 8px 16px;
251
+ gap: 10px;
252
+ box-sizing: border-box;
253
+ text-decoration: none;
254
+ font-size: 0.8125rem;
255
+ font-family: 'GoodSans', system-ui, -apple-system, BlinkMacSystemFont,
256
+ 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue',
257
+ sans-serif;
258
+ }
259
+
260
+ .card {
261
+ display: flex;
262
+ flex-direction: column;
263
+ background: var(--light-backgrounds-regular);
264
+ border-radius: 1rem;
265
+ overflow: hidden;
266
+ }
267
+ .card h3 {
268
+ margin: 0;
269
+ }
270
+
271
+ .p-2 {
272
+ padding: 2rem;
273
+ }
274
+
275
+ .icon-container {
276
+ width: 4rem;
277
+ height: 4rem;
278
+ background-color: #EEEAFF;
279
+ border-radius: 0.5rem;
280
+ display: flex;
281
+ justify-content: center;
282
+ align-items: center;
283
+ margin-bottom: 1rem;
284
+ }
285
+
286
+ .deeplink-content {
287
+ background: var(--light-backgrounds-regular);
288
+ border-radius: 60px;
289
+ display: flex;
290
+ flex-direction: row;
291
+ justify-content: center;
292
+ align-items: center;
293
+ margin-top: 1rem;
294
+ position: relative;
295
+ border: 1px solid #cbcbca;
296
+ }
297
+
298
+ .copy-deeplink {
299
+ background: var(--light-backgrounds-inverse);
300
+ border-radius: 0px 31px 31px 0px;
301
+ padding: 1rem 1.5rem;
302
+ }
303
+
304
+ .copy-deeplink:hover {
305
+ cursor: pointer;
306
+ }
307
+
308
+ .changelog-grid {
309
+ position: relative;
310
+ max-width: 1200px;
311
+ margin: 0 auto;
312
+ display: flex;
313
+ flex-direction: column;
314
+ gap: 20px;
315
+ }
316
+
317
+ .changelog-grid::after {
318
+ content: '';
319
+ position: none;
320
+ }
321
+
322
+ .changelog-entry {
323
+ display: flex;
324
+ flex-direction: column;
325
+ gap: 16px;
326
+ margin-top: 20px;
327
+ }
328
+
329
+ .date {
330
+ font-size: 0.8rem;
331
+ }
332
+
333
+ .items {
334
+ display: flex;
335
+ flex-direction: column;
336
+ position: relative;
337
+ }
338
+ .items p {
339
+ margin-top: 0
340
+ }
341
+ .items ul {
342
+ padding: 0 1rem;
343
+ margin: 0;
344
+ }
345
+ .items ul li {
346
+ padding: 0;
347
+ margin: 0;
348
+ }
349
+
350
+ .pill {
351
+ display: inline-flex;
352
+ flex-direction: row;
353
+ align-items: center;
354
+ justify-content: center;
355
+ color: white;
356
+ padding: 4px 6px;
357
+ border-radius: 30px;
358
+ font-size: 0.6875rem;
359
+ }
360
+
361
+ .api {
362
+ background-color: #00855B;
363
+ }
364
+ .sdk {
365
+ background-color: #5433EB;
366
+ }
367
+
368
+ .w-50 {
369
+ width: 50%;
370
+ }
371
+
372
+ @media only screen and (min-width: 800px) {
373
+ .container {
374
+ flex-direction: row;
375
+ align-items: center;
376
+ }
377
+
378
+ .qr-canvas {
379
+ display: block;
380
+ border-radius: 1em;
381
+ width: 100% !important;
382
+ height: 100% !important;
383
+ aspect-ratio: 1;
384
+ }
385
+
386
+ .qrcode {
387
+ flex: 1;
388
+ max-width: 50%;
389
+ }
390
+
391
+ .content {
392
+ max-width: 50%;
393
+ }
394
+
395
+ input[type='text'] {
396
+ width: 60%;
397
+ }
398
+
399
+ .open-mini {
400
+ display: none;
401
+ }
402
+ .date {
403
+ width: 6rem;
404
+ }
405
+ .changelog-entry {
406
+ flex-direction: row;
407
+ }
408
+ .changelog-grid::after {
409
+ content: '';
410
+ position: absolute;
411
+ width: 4px;
412
+ background-color: white;
413
+ top: 0;
414
+ bottom: 0;
415
+ left: 117px;
416
+ border-radius: 12px;
417
+ }
418
+ .items {
419
+ margin-left: 30px;
420
+ }
421
+ .items::before {
422
+ content: '';
423
+ position: absolute;
424
+ width: 8px;
425
+ height: 8px;
426
+ left: -29px;
427
+ top: 0px;
428
+ background-color: black;
429
+ border: 2px solid white;
430
+ border-radius: 50%;
431
+ z-index: 1;
432
+ box-sizing: content-box;
433
+ }
434
+ }
435
+
436
+ @media (prefers-color-scheme: dark) {
437
+ body {
438
+ background: var(--dark-background-regular);
439
+ color: var(--dark-foregrounds-regular);
440
+ }
441
+
442
+ body::-webkit-scrollbar {
443
+ width: 10px;
444
+ }
445
+
446
+ body::-webkit-scrollbar-track {
447
+ background: rgba(255, 255, 255, 0.1);
448
+ }
449
+
450
+ body::-webkit-scrollbar-track:hover {
451
+ background: rgba(255, 255, 255, 0.3);
452
+ }
453
+
454
+ body::-webkit-scrollbar-thumb {
455
+ background-color: rgba(255, 255, 255, 0.3);
456
+ border-radius: 6px;
457
+ border: 2px solid transparent;
458
+ margin: 2px;
459
+ background-clip: padding-box;
460
+ }
461
+
462
+ body::-webkit-scrollbar-thumb:hover {
463
+ background-color: rgba(255, 255, 255, 0.8);
464
+ }
465
+ input[type='text'] {
466
+ background-color: var(--dark-background-secondary);
467
+ color: var(--dark-foregrounds-regular);
468
+ border: none;
469
+ }
470
+
471
+ a {
472
+ color: var(--dark-foregrounds-regular);
473
+ text-decoration: none;
474
+ }
475
+
476
+ .link {
477
+ color: var(--dark-foregrounds-regular);
478
+ }
479
+ .link a,
480
+ .link a:active,
481
+ .link a:visited {
482
+ color: var(--dark-foregrounds-primary);
483
+ }
484
+
485
+ .button, .button-link {
486
+ background-color: var(--dark-backgrounds-inverse) !important;
487
+ color: var(--dark-foregrounds-regular-inverse) !important;
488
+ }
489
+ .card {
490
+ background-color: var(--dark-background-secondary);
491
+ }
492
+ .deeplink-content {
493
+ background-color: var(--dark-background-secondary);
494
+ border-color: var(--dark-background-secondary);
495
+ color: var(--dark-foregrounds-regular);
496
+ }
497
+ .changelog-grid::after {
498
+ content: '';
499
+ position: absolute;
500
+ width: 4px;
501
+ background-color: rgba(255, 255, 255, 0.3);
502
+ top: 0;
503
+ bottom: 0;
504
+ left: 117px;
505
+ border-radius: 12px;
506
+ }
507
+ }
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env node
2
+ export {};
package/build/index.js ADDED
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env node
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const commander_1 = require("commander");
5
+ const create_mini_1 = require("./commands/create-mini");
6
+ const dev_1 = require("./commands/dev");
7
+ const generate_graphql_types_1 = require("./commands/generate-graphql-types");
8
+ const program = new commander_1.Command();
9
+ async function loadCommands() {
10
+ (0, create_mini_1.loadCommand)(program);
11
+ await (0, dev_1.loadCommand)(program);
12
+ (0, generate_graphql_types_1.loadCommand)(program);
13
+ }
14
+ program
15
+ .name('shop-minis')
16
+ .description('CLI for creating a new Shop Mini')
17
+ .version('2.0.0');
18
+ loadCommands()
19
+ .then(() => {
20
+ program.parse();
21
+ })
22
+ .catch(err => {
23
+ console.log(err);
24
+ process.exit(1);
25
+ });
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,yCAAiC;AAEjC,wDAA2E;AAC3E,wCAA4D;AAC5D,8EAAgG;AAEhG,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAA;AAE7B,KAAK,UAAU,YAAY;IACzB,IAAA,yBAAqB,EAAC,OAAO,CAAC,CAAA;IAC9B,MAAM,IAAA,iBAAc,EAAC,OAAO,CAAC,CAAA;IAC7B,IAAA,oCAA+B,EAAC,OAAO,CAAC,CAAA;AAC1C,CAAC;AAED,OAAO;KACJ,IAAI,CAAC,YAAY,CAAC;KAClB,WAAW,CAAC,kCAAkC,CAAC;KAC/C,OAAO,CAAC,OAAO,CAAC,CAAA;AAEnB,YAAY,EAAE;KACX,IAAI,CAAC,GAAG,EAAE;IACT,OAAO,CAAC,KAAK,EAAE,CAAA;AACjB,CAAC,CAAC;KACD,KAAK,CAAC,GAAG,CAAC,EAAE;IACX,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IAChB,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;AACjB,CAAC,CAAC,CAAA"}
package/package.json ADDED
@@ -0,0 +1,83 @@
1
+ {
2
+ "name": "@shopify/shop-minis-cli",
3
+ "publishConfig": {
4
+ "access": "public",
5
+ "@shopify:registry": "https://registry.npmjs.org/"
6
+ },
7
+ "version": "0.0.35",
8
+ "description": "Shop Minis CLI",
9
+ "main": "build/index.js",
10
+ "bin": {
11
+ "shop-minis": "build/index.js"
12
+ },
13
+ "author": "shopify",
14
+ "license": "UNLICENSED",
15
+ "scripts": {
16
+ "build": "yarn clean && yarn build:tsc && yarn build:binaries && yarn build:assets",
17
+ "clean": "rm -rf build",
18
+ "build:tsc": "tsc -i false && chmod 755 build/index.js",
19
+ "build:binaries": "mkdir -p build/commands/dev/bin/",
20
+ "build:assets": "mkdir -p build/dev-panel/ && cp -r src/dev-panel/* build/dev-panel",
21
+ "lint": "eslint . --ext .js,.mjs,.ts,.tsx --format codeframe --cache",
22
+ "shop-minis-dev": "ts-node -T src/index.ts",
23
+ "shop-minis": "./build/index.js",
24
+ "test": "jest"
25
+ },
26
+ "devDependencies": {
27
+ "@babel/core": "^7.20.12",
28
+ "@babel/preset-env": "^7.20.2",
29
+ "@babel/preset-typescript": "^7.18.6",
30
+ "@react-native-community/eslint-config": "^3.1.0",
31
+ "@shopify/eslint-plugin": "^42.0.1",
32
+ "@types/connect": "^3.4.35",
33
+ "@types/fs-extra": "^9.0.13",
34
+ "@types/inquirer": "^9.0.3",
35
+ "@types/jest": "^29.2.6",
36
+ "@types/lodash": "^4.14.191",
37
+ "@types/metro": "^0.66.1",
38
+ "@types/node": "^18.11.17",
39
+ "@types/prompts": "^2.4.2",
40
+ "@types/qrcode": "^1.5.0",
41
+ "@types/serve-static": "^1.15.0",
42
+ "@typescript-eslint/eslint-plugin": "^5.17.0",
43
+ "@typescript-eslint/parser": "^5.17.0",
44
+ "babel-jest": "^29.3.1",
45
+ "eslint": "^8.24.0",
46
+ "eslint-formatter-codeframe": "^7.32.1",
47
+ "eslint-plugin-jest": "^26.2.2",
48
+ "eslint-plugin-reanimated": "^2.0.0",
49
+ "jest": "^29.3.1",
50
+ "prettier": "^2.7.1",
51
+ "ts-node": "^10.9.1",
52
+ "typescript": "^4.9.4"
53
+ },
54
+ "dependencies": {
55
+ "@google-cloud/storage": "^6.9.0",
56
+ "@react-native-community/cli": "^10.0.0",
57
+ "@react-native-community/cli-plugin-metro": "^10.0.0",
58
+ "@types/qrcode-terminal": "^0.12.0",
59
+ "chalk": "^4.1.2",
60
+ "commander": "^9.4.1",
61
+ "connect": "^3.7.0",
62
+ "fs-extra": "^11.1.0",
63
+ "graphql": "^15.0.0",
64
+ "graphql-config": "^4.3.5",
65
+ "graphql-typescript-definitions": "^3.2.2",
66
+ "inquirer": "^8.2.3",
67
+ "internal-ip": "^6.2.0",
68
+ "lodash": "^4.17.21",
69
+ "metro": "^0.73.6",
70
+ "metro-config": "^0.73.6",
71
+ "metro-core": "^0.73.6",
72
+ "open": "^8.4.0",
73
+ "ora": "^5.4.1",
74
+ "prompts": "^2.4.2",
75
+ "qrcode-terminal": "^0.12.0",
76
+ "replace-in-file": "^6.3.5",
77
+ "semver": "^7.3.8",
78
+ "serve-static": "^1.15.0"
79
+ },
80
+ "resolutions": {
81
+ "@apollo/federation": "0.38.1"
82
+ }
83
+ }
@@ -0,0 +1,4 @@
1
+ declare module '*.svg' {
2
+ const content: any
3
+ export default content
4
+ }
@@ -0,0 +1,9 @@
1
+ import {theme as defaultTheme, Theme} from '@shopify/shop-minis-platform-sdk'
2
+
3
+ import {HomeScreen} from './screens/HomeScreen'
4
+
5
+ export const theme: Theme = {
6
+ ...defaultTheme,
7
+ }
8
+
9
+ export default HomeScreen
@@ -0,0 +1,12 @@
1
+ import {Box, Text} from '@shopify/shop-minis-platform-sdk'
2
+ import {SafeAreaView} from 'react-native'
3
+
4
+ export const HomeScreen = () => {
5
+ return (
6
+ <SafeAreaView style={{flex: 1}}>
7
+ <Box flex={1} padding="m" backgroundColor="backgrounds-regular">
8
+ <Text textAlign="center">Fill in the blank</Text>
9
+ </Box>
10
+ </SafeAreaView>
11
+ )
12
+ }
@@ -0,0 +1,5 @@
1
+ // @react-navigation/native-stack requires a `type` instead of an `interface`
2
+ // eslint-disable-next-line @typescript-eslint/consistent-type-definitions
3
+ export type StackParamList = {
4
+ '__MINI_APP_HANDLE_PASCAL_CASE__.Home': undefined
5
+ }
@@ -0,0 +1 @@
1
+ *.graphql.d.ts