@shopify/shop-minis-cli 0.0.146 → 0.0.148
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/build/commands/dev/utils/app-screens.js +11 -13
- package/build/commands/dev/utils/app-screens.js.map +1 -1
- package/build/commands/dev/utils/deeplink.d.ts +1 -1
- package/build/commands/dev/utils/deeplink.js +5 -6
- package/build/commands/dev/utils/deeplink.js.map +1 -1
- package/build/commands/dev/utils/interactive-terminal.js +3 -6
- package/build/commands/dev/utils/interactive-terminal.js.map +1 -1
- package/build/commands/dev/utils/simulator.js +6 -1
- package/build/commands/dev/utils/simulator.js.map +1 -1
- package/build/commands/submit/tasks.js +1 -1
- package/build/commands/submit/tasks.js.map +1 -1
- package/build/dev-panel/asset-manifest.json +6 -6
- package/build/dev-panel/index.html +1 -1
- package/build/dev-panel/static/css/main.94b1dbb1.css +2 -0
- package/build/dev-panel/static/css/main.94b1dbb1.css.map +1 -0
- package/build/dev-panel/static/js/{main.6625699c.js → main.917a564c.js} +3 -3
- package/build/dev-panel/static/js/{main.6625699c.js.map → main.917a564c.js.map} +1 -1
- package/build/utils/common-tasks.js +4 -2
- package/build/utils/common-tasks.js.map +1 -1
- package/package.json +1 -1
- package/templates/__template_getting_started/src/App.tsx +0 -6
- package/templates/__template_getting_started/src/screens/HomeScreen.tsx +36 -18
- package/templates/__template_getting_started/src/screens/NativeFeaturesScreen.tsx +52 -18
- package/build/dev-panel/static/css/main.7f1ee407.css +0 -2
- package/build/dev-panel/static/css/main.7f1ee407.css.map +0 -1
- package/templates/__template_getting_started/src/screens/ExtensionsScreen.tsx +0 -60
- /package/build/dev-panel/static/js/{main.6625699c.js.LICENSE.txt → main.917a564c.js.LICENSE.txt} +0 -0
|
@@ -5,11 +5,13 @@ import { getSubmissions as graphqlGetSubmissions } from '../data/get-submissions
|
|
|
5
5
|
import { getRunBinCommand } from './package-manager.js';
|
|
6
6
|
export async function assertNetworkAndAuth() {
|
|
7
7
|
const apiKey = SHOP_MINIS_ADMIN_API_KEY;
|
|
8
|
+
const setupCmd = await getRunBinCommand('shop-minis setup');
|
|
8
9
|
if (!apiKey) {
|
|
9
10
|
throw new AbortError('Shop Minis API key is not set.', undefined, [
|
|
10
11
|
[
|
|
11
|
-
'
|
|
12
|
-
{ bold:
|
|
12
|
+
'Before continuing, run',
|
|
13
|
+
{ bold: setupCmd },
|
|
14
|
+
'to set up your Shop Minis API key.',
|
|
13
15
|
],
|
|
14
16
|
]);
|
|
15
17
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common-tasks.js","sourceRoot":"","sources":["../../src/utils/common-tasks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAC,UAAU,EAAC,MAAM,6BAA6B,CAAA;AAEtD,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,GACzB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAC,cAAc,IAAI,qBAAqB,EAAC,MAAM,4BAA4B,CAAA;AAElF,OAAO,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAA;AAErD,MAAM,CAAC,KAAK,UAAU,oBAAoB;IACxC,MAAM,MAAM,GAAG,wBAAwB,CAAA;
|
|
1
|
+
{"version":3,"file":"common-tasks.js","sourceRoot":"","sources":["../../src/utils/common-tasks.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAC,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAC,UAAU,EAAC,MAAM,6BAA6B,CAAA;AAEtD,OAAO,EACL,0BAA0B,EAC1B,wBAAwB,GACzB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAC,cAAc,IAAI,qBAAqB,EAAC,MAAM,4BAA4B,CAAA;AAElF,OAAO,EAAC,gBAAgB,EAAC,MAAM,sBAAsB,CAAA;AAErD,MAAM,CAAC,KAAK,UAAU,oBAAoB;IACxC,MAAM,MAAM,GAAG,wBAAwB,CAAA;IACvC,MAAM,QAAQ,GAAG,MAAM,gBAAgB,CAAC,kBAAkB,CAAC,CAAA;IAE3D,IAAI,CAAC,MAAM,EAAE;QACX,MAAM,IAAI,UAAU,CAAC,gCAAgC,EAAE,SAAS,EAAE;YAChE;gBACE,wBAAwB;gBACxB,EAAC,IAAI,EAAE,QAAQ,EAAC;gBAChB,oCAAoC;aACrC;SACF,CAAC,CAAA;KACH;IAED,IAAI;QACF,4EAA4E;QAC5E,MAAM,qBAAqB,EAAE,CAAA;KAC9B;IAAC,OAAO,KAAK,EAAE;QACd,IAAI,KAAK,YAAY,WAAW,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,KAAK,GAAG,EAAE;YACjE,MAAM,IAAI,UAAU,CAClB,qCAAqC,EACrC,6CAA6C;gBAC3C,4DAA4D,EAC9D;gBACE;oBACE,QAAQ;oBACR,EAAC,IAAI,EAAE,MAAM,EAAC;oBACd,gFAAgF;iBACjF;gBACD;oBACE,QAAQ;oBACR,EAAC,IAAI,EAAE,YAAY,EAAC;oBACpB,uCAAuC;oBACvC;wBACE,IAAI,EAAE;4BACJ,GAAG,EAAE,0BAA0B;4BAC/B,KAAK,EAAE,oBAAoB;yBAC5B;qBACF;iBACF;aACF,CACF,CAAA;SACF;QAED,IACE,KAAK,YAAY,MAAM;YACvB,MAAM,IAAI,KAAK;YACf,KAAK,EAAE,IAAI,KAAK,WAAW,EAC3B;YACA,MAAM,SAAS,GAAG,MAAM,gBAAgB,CAAC,mBAAmB,CAAC,CAAA;YAC7D,MAAM,IAAI,UAAU,CAClB,eAAe,EACf,mDAAmD,EACnD;gBACE,eAAe,SAAS,SAAS;gBACjC,sCAAsC;aACvC,CACF,CAAA;SACF;QAED,MAAM,KAAK,CAAA;KACZ;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -2,7 +2,6 @@ import {createNativeStackNavigator} from '@react-navigation/native-stack'
|
|
|
2
2
|
|
|
3
3
|
import {HomeScreen} from './screens/HomeScreen'
|
|
4
4
|
import {NativeFeaturesScreen} from './screens/NativeFeaturesScreen'
|
|
5
|
-
import {ExtensionsScreen} from './screens/ExtensionsScreen'
|
|
6
5
|
|
|
7
6
|
const Stack = createNativeStackNavigator()
|
|
8
7
|
|
|
@@ -19,11 +18,6 @@ export function App() {
|
|
|
19
18
|
component={NativeFeaturesScreen}
|
|
20
19
|
options={{headerShown: false}}
|
|
21
20
|
/>
|
|
22
|
-
<Stack.Screen
|
|
23
|
-
name="GettingStarted.Extensions"
|
|
24
|
-
component={ExtensionsScreen}
|
|
25
|
-
options={{headerShown: false}}
|
|
26
|
-
/>
|
|
27
21
|
</Stack.Navigator>
|
|
28
22
|
)
|
|
29
23
|
}
|
|
@@ -8,11 +8,12 @@ import {
|
|
|
8
8
|
Text,
|
|
9
9
|
TouchableProduct,
|
|
10
10
|
ProductCard,
|
|
11
|
-
|
|
11
|
+
useProductSearch,
|
|
12
12
|
useTheme,
|
|
13
13
|
Button,
|
|
14
14
|
TextField,
|
|
15
15
|
RadioButton,
|
|
16
|
+
Divider,
|
|
16
17
|
} from '@shopify/shop-minis-platform-sdk'
|
|
17
18
|
|
|
18
19
|
import {RootStackParamList} from '../types/screens'
|
|
@@ -22,19 +23,22 @@ export function HomeScreen() {
|
|
|
22
23
|
const navigation =
|
|
23
24
|
useNavigation<NativeStackNavigationProp<RootStackParamList>>()
|
|
24
25
|
|
|
25
|
-
const {products} =
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
26
|
+
const {products} = useProductSearch({
|
|
27
|
+
query: 'skateboard',
|
|
28
|
+
first: 4,
|
|
29
|
+
filters: {
|
|
30
|
+
minimumRating: 4,
|
|
31
|
+
price: {
|
|
32
|
+
min: 150,
|
|
33
|
+
max: 250,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
})
|
|
34
37
|
|
|
35
38
|
const radioButtonOptions = ['Option A', 'Option B', 'Option C']
|
|
36
39
|
|
|
37
40
|
const [selectedOption, setSelectedOption] = useState(radioButtonOptions[0])
|
|
41
|
+
const [textFieldValue, setTextFieldValue] = useState('')
|
|
38
42
|
|
|
39
43
|
return (
|
|
40
44
|
<SafeAreaView
|
|
@@ -44,6 +48,7 @@ export function HomeScreen() {
|
|
|
44
48
|
<Box
|
|
45
49
|
flex={1}
|
|
46
50
|
paddingHorizontal="gutter"
|
|
51
|
+
marginBottom="s"
|
|
47
52
|
backgroundColor="backgrounds-regular"
|
|
48
53
|
>
|
|
49
54
|
<Text variant="heroBold" marginBottom="s" marginTop="xs">
|
|
@@ -52,18 +57,17 @@ export function HomeScreen() {
|
|
|
52
57
|
<Text variant="subtitle" marginBottom="s">
|
|
53
58
|
You just created a Shop Mini! Nice.
|
|
54
59
|
</Text>
|
|
55
|
-
<Text variant="subtitle"
|
|
56
|
-
|
|
57
|
-
</Text>
|
|
60
|
+
<Text variant="subtitle">Let's explore what a Mini can do.</Text>
|
|
61
|
+
<Divider marginVertical="s" />
|
|
58
62
|
{products ? (
|
|
59
63
|
<>
|
|
60
64
|
<Text marginBottom="s">
|
|
61
65
|
First up: Product Cards (Since we're all about shopping,
|
|
62
66
|
right?)
|
|
63
67
|
</Text>
|
|
64
|
-
<Box flexDirection="row"
|
|
68
|
+
<Box flexDirection="row">
|
|
65
69
|
{products.slice(0, 2).map(product => (
|
|
66
|
-
<Box key={product.id} flex={1}
|
|
70
|
+
<Box key={product.id} flex={1}>
|
|
67
71
|
<TouchableProduct product={product}>
|
|
68
72
|
<ProductCard
|
|
69
73
|
shopId="gid://shopify/Shop/62104633599"
|
|
@@ -73,7 +77,7 @@ export function HomeScreen() {
|
|
|
73
77
|
</Box>
|
|
74
78
|
))}
|
|
75
79
|
</Box>
|
|
76
|
-
<Box flexDirection="row"
|
|
80
|
+
<Box flexDirection="row">
|
|
77
81
|
{products.slice(2, 4).map(product => (
|
|
78
82
|
<Box key={product.id} flex={1} padding="xs">
|
|
79
83
|
<TouchableProduct product={product}>
|
|
@@ -87,12 +91,23 @@ export function HomeScreen() {
|
|
|
87
91
|
</Box>
|
|
88
92
|
</>
|
|
89
93
|
) : null}
|
|
94
|
+
<Divider marginVertical="s" />
|
|
95
|
+
|
|
90
96
|
<Text marginBottom="s">
|
|
91
97
|
You can add interactions to your Mini with inputs.
|
|
92
98
|
</Text>
|
|
93
|
-
<Box
|
|
94
|
-
<TextField
|
|
99
|
+
<Box>
|
|
100
|
+
<TextField
|
|
101
|
+
placeholder="I love Minis because..."
|
|
102
|
+
value={textFieldValue}
|
|
103
|
+
onChangeText={setTextFieldValue}
|
|
104
|
+
/>
|
|
105
|
+
{textFieldValue ? (
|
|
106
|
+
<Text marginTop="xs">I love Minis because {textFieldValue}</Text>
|
|
107
|
+
) : null}
|
|
95
108
|
</Box>
|
|
109
|
+
<Divider marginVertical="s" />
|
|
110
|
+
|
|
96
111
|
<Text>Radio buttons</Text>
|
|
97
112
|
{radioButtonOptions.map(option => (
|
|
98
113
|
<Box key={option} marginVertical="xs">
|
|
@@ -104,12 +119,15 @@ export function HomeScreen() {
|
|
|
104
119
|
/>
|
|
105
120
|
</Box>
|
|
106
121
|
))}
|
|
122
|
+
<Divider marginVertical="s" />
|
|
123
|
+
|
|
107
124
|
<Text marginBottom="s">
|
|
108
125
|
Ready for more? Let's explore native capabilities in the
|
|
109
126
|
screen.
|
|
110
127
|
</Text>
|
|
111
128
|
<Button
|
|
112
129
|
text="Next"
|
|
130
|
+
size="l"
|
|
113
131
|
onPress={() => {
|
|
114
132
|
navigation.navigate('GettingStarted.NativeFeatures')
|
|
115
133
|
}}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import {useState} from 'react'
|
|
1
2
|
import {ScrollView, TouchableOpacity} from 'react-native'
|
|
2
3
|
import {useNavigation} from '@react-navigation/native'
|
|
3
4
|
import {NativeStackNavigationProp} from '@react-navigation/native-stack'
|
|
@@ -11,6 +12,8 @@ import {
|
|
|
11
12
|
Button,
|
|
12
13
|
Icon,
|
|
13
14
|
useMinisDimensions,
|
|
15
|
+
Image,
|
|
16
|
+
Divider,
|
|
14
17
|
} from '@shopify/shop-minis-platform-sdk'
|
|
15
18
|
|
|
16
19
|
import {RootStackParamList} from '../types/screens'
|
|
@@ -21,6 +24,8 @@ export function NativeFeaturesScreen() {
|
|
|
21
24
|
useNavigation<NativeStackNavigationProp<RootStackParamList>>()
|
|
22
25
|
const {height, width} = useMinisDimensions()
|
|
23
26
|
|
|
27
|
+
const [imageUrl, setImageUrl] = useState<string>()
|
|
28
|
+
|
|
24
29
|
return (
|
|
25
30
|
<SafeAreaView
|
|
26
31
|
style={{flex: 1, backgroundColor: theme.colors['backgrounds-regular']}}
|
|
@@ -48,54 +53,83 @@ export function NativeFeaturesScreen() {
|
|
|
48
53
|
Let's explore the native capabilities your Shop Mini can
|
|
49
54
|
access.
|
|
50
55
|
</Text>
|
|
51
|
-
<Box
|
|
56
|
+
<Box>
|
|
52
57
|
<Button
|
|
53
58
|
text="Camera access"
|
|
54
59
|
onPress={async () => {
|
|
55
|
-
await ImagePicker.openCamera({})
|
|
56
|
-
|
|
57
|
-
|
|
60
|
+
await ImagePicker.openCamera({})
|
|
61
|
+
.then(image => {
|
|
62
|
+
setImageUrl(image.path)
|
|
63
|
+
})
|
|
64
|
+
.catch(error => {
|
|
65
|
+
console.log(error)
|
|
66
|
+
})
|
|
58
67
|
}}
|
|
59
68
|
/>
|
|
60
69
|
<Text variant="bodySmall" marginTop="xs">
|
|
61
70
|
Run this Mini on a real device to access the camera.
|
|
62
71
|
</Text>
|
|
63
72
|
</Box>
|
|
64
|
-
<Box
|
|
73
|
+
<Box marginVertical="s">
|
|
65
74
|
<Button
|
|
66
75
|
text="Gallery access"
|
|
76
|
+
variant="secondary"
|
|
67
77
|
onPress={async () => {
|
|
68
|
-
await ImagePicker.openPicker({})
|
|
69
|
-
|
|
70
|
-
|
|
78
|
+
await ImagePicker.openPicker({})
|
|
79
|
+
.then(image => {
|
|
80
|
+
setImageUrl(image.path)
|
|
81
|
+
})
|
|
82
|
+
.catch(error => {
|
|
83
|
+
console.log(error)
|
|
84
|
+
})
|
|
71
85
|
}}
|
|
72
86
|
/>
|
|
73
87
|
</Box>
|
|
74
|
-
|
|
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>
|
|
75
106
|
<Button
|
|
76
107
|
text="Share sheet"
|
|
108
|
+
variant="tertiary"
|
|
77
109
|
onPress={async () => {
|
|
78
110
|
await Share.open({
|
|
79
111
|
url: 'https://shop.app/minis',
|
|
80
112
|
title: 'title',
|
|
113
|
+
}).catch(error => {
|
|
114
|
+
console.log(error)
|
|
81
115
|
})
|
|
82
116
|
}}
|
|
83
117
|
/>
|
|
84
118
|
</Box>
|
|
85
|
-
<
|
|
119
|
+
<Divider marginVertical="s" />
|
|
120
|
+
<Box>
|
|
121
|
+
<Text variant="subtitle" marginBottom="s">
|
|
122
|
+
Use some of our built-in APIs
|
|
123
|
+
</Text>
|
|
86
124
|
<Text>Screen height: {height}</Text>
|
|
87
125
|
<Text>Screen width: {width}</Text>
|
|
88
126
|
</Box>
|
|
127
|
+
<Divider marginVertical="s" />
|
|
89
128
|
<Text marginBottom="s">
|
|
90
|
-
|
|
91
|
-
|
|
129
|
+
We look forward to seeing what you build! Check out the
|
|
130
|
+
documentation at
|
|
92
131
|
</Text>
|
|
93
|
-
<
|
|
94
|
-
text="Next"
|
|
95
|
-
onPress={() => {
|
|
96
|
-
navigation.navigate('GettingStarted.Extensions')
|
|
97
|
-
}}
|
|
98
|
-
/>
|
|
132
|
+
<Text>https://shop.app/minis</Text>
|
|
99
133
|
</Box>
|
|
100
134
|
</ScrollView>
|
|
101
135
|
</SafeAreaView>
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
:root{--light-backgrounds-regular:#fff;--light-backgrounds-secondary:#f4f4ed;--light-backgrounds-inverse:#0f1721;--light-foregrounds-regular:#0f1721;--light-foregrounds-regular-inverse:#fff;--light-foregrounds-primary:#5433eb;--dark-background-regular:#0f1721;--dark-background-secondary:#3f454d;--dark-backgrounds-inverse:#fff;--dark-foregrounds-regular:#fff;--dark-foregrounds-regular-inverse:#0f1721;--dark-foregrounds-primary:#9c83f8}@font-face{font-display:swap;font-family:GoodSans;font-style:normal;font-weight:700;src:local("GoodSans"),url(https://cdn.shopify.com/static/fonts/GoodSans-Bold.woff2) format("woff2")}@font-face{font-display:swap;font-family:GoodSans;font-style:normal;font-weight:500;src:local("GoodSans"),url(https://cdn.shopify.com/static/fonts/GoodSans-Medium.woff2) format("woff2")}@font-face{font-display:swap;font-family:GoodSans;font-style:normal;font-weight:400;src:local("GoodSans"),url(https://cdn.shopify.com/static/fonts/GoodSansText-Regular.woff) format("woff2")}*,:after,:before{box-sizing:border-box}body,html{margin:0;padding:0}html{font-family:GoodSans;font-size:1em}body{background:#f4f4ed;background:var(--light-backgrounds-secondary);padding-bottom:100px}a,body{color:#0f1721;color:var(--light-foregrounds-regular)}a{text-decoration:none}body::-webkit-scrollbar{width:10px}body::-webkit-scrollbar-track{background:rgba(0,0,0,.1)}body::-webkit-scrollbar-track:hover{background:rgba(0,0,0,.3)}body::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:rgba(0,0,0,.3);border:2px solid transparent;border-radius:6px;margin:2px}body::-webkit-scrollbar-thumb:hover{background-color:rgba(0,0,0,.8)}h1{font-size:1em;font-weight:500}.page{display:flex;flex-direction:column;margin:auto;max-width:min(70em,100%);padding-left:1em;padding-right:1em}.logo{align-self:center;margin-bottom:1em;margin-top:2em}.link-label{margin-bottom:.4em}.link{color:var(--light-foregrounds-regular);display:block;font-size:13px;font-style:normal;line-height:118%;margin-top:0;overflow:hidden;padding:1rem 0 1rem 1rem;text-decoration:none;text-overflow:ellipsis;white-space:nowrap}.link a,.link a:active,.link a:visited{color:var(--light-foregrounds-primary)}.qr-and-params-container{word-wrap:break-word;align-items:stretch;display:flex;flex-direction:column;gap:2em;margin-bottom:2em;margin-top:1em}.qrcode-container{position:relative}.params-container,.qrcode-container{flex:1 1;width:100%}.param-row{display:flex;flex-direction:row}.param-appendix{font-size:13px}b.param-appendix{font-family:Courier New,Courier,monospace}.cursor-pointer{cursor:pointer}.button{background-color:var(--light-backgrounds-inverse);border:none;border-radius:100px;color:var(--light-foregrounds-regular-inverse);font-size:1rem;margin-top:20px;min-width:200px;padding:16px;text-decoration:none}.button:hover{cursor:pointer}.Main{display:flex;flex:3 1;flex-direction:column;gap:2rem}.rail{gap:1rem}.button-link,.rail{display:flex;flex-direction:row}.button-link{align-items:flex-start;background:var(--light-backgrounds-inverse);border-radius:40px;box-sizing:border-box;color:var(--light-foregrounds-regular-inverse);font-family:GoodSans,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;font-size:.8125rem;gap:10px;padding:8px 16px;text-decoration:none}.card{background:var(--light-backgrounds-regular);border-radius:1rem;display:flex;flex-direction:column;overflow:hidden}.card h3{margin:0}.p-2{padding:2rem}.icon-container{align-items:center;background-color:#eeeaff;border-radius:.5rem;display:flex;height:4rem;justify-content:center;margin-bottom:1rem;width:4rem}.deeplink-content{align-items:center;background:var(--light-backgrounds-regular);border:1px solid #cbcbca;border-radius:60px;display:flex;flex-direction:row;justify-content:space-between;margin-top:1rem;position:relative}.copy-deeplink{background:var(--light-backgrounds-inverse);border-radius:0 31px 31px 0;float:left;padding:1rem 1.5rem}.copy-deeplink:hover{cursor:pointer}.w-50{width:50%}@media only screen and (min-width:800px){.qr-and-params-container{align-items:center;flex-direction:row}.params-container{max-width:50%}.open-mini{display:none}}@media (prefers-color-scheme:dark){body{background:var(--dark-background-regular);color:var(--dark-foregrounds-regular)}body::-webkit-scrollbar{width:10px}body::-webkit-scrollbar-track{background:hsla(0,0%,100%,.1)}body::-webkit-scrollbar-track:hover{background:hsla(0,0%,100%,.3)}body::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:hsla(0,0%,100%,.3);border:2px solid transparent;border-radius:6px;margin:2px}body::-webkit-scrollbar-thumb:hover{background-color:hsla(0,0%,100%,.8)}a{text-decoration:none}.link,a{color:var(--dark-foregrounds-regular)}.link a,.link a:active,.link a:visited{color:var(--dark-foregrounds-primary)}.button,.button-link{background-color:var(--dark-backgrounds-inverse)!important;color:var(--dark-foregrounds-regular-inverse)!important}.card,.deeplink-content{background-color:var(--dark-background-secondary)}.deeplink-content{border-color:var(--dark-background-secondary);color:var(--dark-foregrounds-regular)}}.icon{color:var(--light-foregrounds-regular-inverse);display:flex;gap:.5rem}.icon-checkmark,.icon-copy span{font-size:13px}input[type=text]{border:1px solid #cbcbca;border-radius:6px;box-sizing:border-box;font-family:GoodSans;font-size:.875em;margin:4px 0 12px;outline:none;padding:12px 16px;width:100%}label{font-size:12px}@media (prefers-color-scheme:dark){input[type=text]{background-color:var(--dark-background-secondary);border:none;color:var(--dark-foregrounds-regular)}}@media only screen and (min-width:800px){input[type=text]{width:60%}}.qr-code-container{margin:auto}.qr-code{background-color:#fff;border-radius:1em;display:none;height:auto;margin:0 auto;max-width:1000px;padding:15px;width:100%}.qr-code.dark{background-color:#3f454d}@media only screen and (min-width:800px){.open-mini{display:none}.qr-code{display:flex}.container{flex:1 1}}
|
|
2
|
-
/*# sourceMappingURL=main.7f1ee407.css.map*/
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"static/css/main.7f1ee407.css","mappings":"AAAA,MAEE,gCAAiC,CACjC,qCAAsC,CACtC,mCAAoC,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AEE,0DAA4D,CAC5D,uDACF,CAMA,wBAHE,iDAOF,CAJA,kBAEE,6CAA8C,CAC9C,qCACF,CACF,CC5PA,MACI,8CAA+C,CAC/C,YAAa,CACb,SACJ,CAEA,gCACI,cACF,CCRF,iBAOE,wBAAyB,CADzB,iBAAkB,CADlB,qBAAsB,CAGtB,oBAAuB,CACvB,gBAAkB,CALlB,iBAAkB,CAMlB,YAAa,CAPb,iBAAkB,CADlB,UASF,CAEA,MACE,cACF,CAEA,mCACE,iBACI,iDAAkD,CAElD,WAAY,CADZ,qCAEJ,CACF,CAEA,yCACE,iBACE,SACF,CACF,CC7BA,mBACI,WACJ,CAEA,SAQI,qBAAyB,CADzB,iBAAkB,CANlB,YAAa,CACb,WAAY,CACZ,aAAc,CACd,gBAAiB,CAEjB,YAAa,CADb,UAIJ,CAEA,cACI,wBACJ,CAEA,yCACI,WACI,YACJ,CACA,SACI,YACJ,CACA,WACI,QACJ,CACJ","sources":["index.css","App.css","components/CopyUrl.css","components/DeeplinkParameterInputs.css","components/QRCode.css"],"sourcesContent":[":root {\n /* Light colors */\n --light-backgrounds-regular: #fff;\n --light-backgrounds-secondary: #f4f4ed;\n --light-backgrounds-inverse: #0F1721;\n --light-foregrounds-regular: #0F1721;\n --light-foregrounds-regular-inverse: #fff;\n --light-foregrounds-primary: #5433EB;\n /* Dark colors */\n --dark-background-regular: #0F1721;\n --dark-background-secondary: #3F454D;\n --dark-backgrounds-inverse: #fff;\n --dark-foregrounds-regular: #fff;\n --dark-foregrounds-regular-inverse: #0F1721;\n --dark-foregrounds-primary: #9C83F8;\n}\n@font-face {\n font-family: 'GoodSans';\n src: local('GoodSans'),\n url('https://cdn.shopify.com/static/fonts/GoodSans-Bold.woff2') format('woff2');\n font-style: normal;\n font-weight: 700;\n font-display: swap;\n}\n\n@font-face {\n font-family: 'GoodSans';\n src: local('GoodSans'),\n url('https://cdn.shopify.com/static/fonts/GoodSans-Medium.woff2') format('woff2');\n font-style: normal;\n font-weight: 500;\n font-display: swap;\n}\n\n@font-face {\n font-family: 'GoodSans';\n src: local('GoodSans'),\n url('https://cdn.shopify.com/static/fonts/GoodSansText-Regular.woff') format('woff2');\n font-style: normal;\n font-weight: 400;\n font-display: swap;\n}\n\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\nhtml,\nbody {\n margin: 0;\n padding: 0;\n}\n\nhtml {\n font-family: 'GoodSans';\n font-size: 1em;\n}\n\nbody {\n padding-bottom: 100px;\n background: var(--light-backgrounds-secondary);\n color: var(--light-foregrounds-regular);\n}\n\na {\n color: var(--light-foregrounds-regular);\n text-decoration: none;\n}\n\nbody::-webkit-scrollbar {\n width: 10px;\n}\n\nbody::-webkit-scrollbar-track {\n background: rgba(0, 0, 0, 0.1);\n}\n\nbody::-webkit-scrollbar-track:hover {\n background: rgba(0, 0, 0, 0.3);\n}\n\nbody::-webkit-scrollbar-thumb {\n background-color: rgba(0, 0, 0, 0.3);\n border-radius: 6px;\n border: 2px solid transparent;\n margin: 2px;\n background-clip: padding-box;\n}\n\nbody::-webkit-scrollbar-thumb:hover {\n background-color: rgba(0, 0, 0, 0.8);\n}\n\nh1 {\n font-size: 1em;\n font-weight: 500;\n}\n",".page {\n max-width: min(70em, 100%);\n display: flex;\n flex-direction: column;\n padding-left: 1em;\n padding-right: 1em;\n margin: auto;\n}\n\n.logo {\n margin-top: 2em;\n align-self: center;\n margin-bottom: 1em;\n}\n\n.link-label {\n margin-bottom: 0.4em;\n}\n\n.link {\n margin-top: 0;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n display: block;\n font-style: normal;\n font-size: 13px;\n line-height: 118%;\n color: var(--light-foregrounds-regular);\n text-decoration: none;\n padding: 1rem 0 1rem 1rem;\n}\n\n.link a,\n.link a:active,\n.link a:visited {\n color: var(--light-foregrounds-primary);\n}\n\n.qr-and-params-container {\n margin-top: 1em;\n margin-bottom: 2em;\n display: flex;\n flex-direction: column;\n gap: 2em;\n word-wrap: break-word;\n align-items: stretch;\n}\n\n.qrcode-container {\n flex: 1;\n width: 100%;\n position: relative;\n}\n\n.params-container {\n flex: 1;\n width: 100%;\n}\n\n.param-row {\n display: flex;\n flex-direction: row;\n}\n\n.param-appendix {\n font-size: 13px;\n}\n\nb.param-appendix {\n font-family: 'Courier New', Courier, monospace;\n}\n\n.cursor-pointer {\n cursor: pointer;\n}\n\n.button {\n background-color: var(--light-backgrounds-inverse);\n color: var(--light-foregrounds-regular-inverse);\n border-radius: 100px;\n padding: 16px;\n min-width: 200px;\n border: none;\n text-decoration: none;\n font-size: 1rem;\n margin-top: 20px;\n}\n\n.button:hover {\n cursor: pointer;\n}\n\n.Main {\n display: flex;\n flex-direction: column;\n gap: 2rem;\n flex: 3;\n}\n\n.rail {\n display: flex;\n flex-direction: row;\n gap: 1rem;\n}\n\n.button-link {\n display: flex;\n flex-direction: row;\n align-items: flex-start;\n background: var(--light-backgrounds-inverse);\n color: var(--light-foregrounds-regular-inverse);\n border-radius: 40px;\n padding: 8px 16px;\n gap: 10px;\n box-sizing: border-box;\n text-decoration: none;\n font-size: 0.8125rem;\n font-family: 'GoodSans', system-ui, -apple-system, BlinkMacSystemFont,\n 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue',\n sans-serif;\n}\n\n.card {\n display: flex;\n flex-direction: column;\n background: var(--light-backgrounds-regular);\n border-radius: 1rem;\n overflow: hidden;\n}\n\n.card h3 {\n margin: 0;\n}\n\n.p-2 {\n padding: 2rem;\n}\n\n.icon-container {\n width: 4rem;\n height: 4rem;\n background-color: #eeeaff;\n border-radius: 0.5rem;\n display: flex;\n justify-content: center;\n align-items: center;\n margin-bottom: 1rem;\n}\n\n.deeplink-content {\n background: var(--light-backgrounds-regular);\n border-radius: 60px;\n display: flex;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n margin-top: 1rem;\n position: relative;\n border: 1px solid #cbcbca;\n}\n\n.copy-deeplink {\n background: var(--light-backgrounds-inverse);\n border-radius: 0px 31px 31px 0px;\n padding: 1rem 1.5rem;\n float: left;\n}\n\n.copy-deeplink:hover {\n cursor: pointer;\n}\n\n.w-50 {\n width: 50%;\n}\n\n@media only screen and (min-width: 800px) {\n .qr-and-params-container {\n flex-direction: row;\n align-items: center;\n }\n\n .params-container {\n max-width: 50%;\n }\n\n .open-mini {\n display: none;\n }\n}\n\n@media (prefers-color-scheme: dark) {\n body {\n background: var(--dark-background-regular);\n color: var(--dark-foregrounds-regular);\n }\n\n body::-webkit-scrollbar {\n width: 10px;\n }\n\n body::-webkit-scrollbar-track {\n background: rgba(255, 255, 255, 0.1);\n }\n\n body::-webkit-scrollbar-track:hover {\n background: rgba(255, 255, 255, 0.3);\n }\n\n body::-webkit-scrollbar-thumb {\n background-color: rgba(255, 255, 255, 0.3);\n border-radius: 6px;\n border: 2px solid transparent;\n margin: 2px;\n background-clip: padding-box;\n }\n\n body::-webkit-scrollbar-thumb:hover {\n background-color: rgba(255, 255, 255, 0.8);\n }\n\n a {\n color: var(--dark-foregrounds-regular);\n text-decoration: none;\n }\n\n .link {\n color: var(--dark-foregrounds-regular);\n }\n\n .link a,\n .link a:active,\n .link a:visited {\n color: var(--dark-foregrounds-primary);\n }\n\n .button,\n .button-link {\n background-color: var(--dark-backgrounds-inverse) !important;\n color: var(--dark-foregrounds-regular-inverse) !important;\n }\n\n .card {\n background-color: var(--dark-background-secondary);\n }\n\n .deeplink-content {\n background-color: var(--dark-background-secondary);\n border-color: var(--dark-background-secondary);\n color: var(--dark-foregrounds-regular);\n }\n}\n",".icon {\n color: var(--light-foregrounds-regular-inverse);\n display: flex;\n gap: 0.5rem\n}\n\n.icon-checkmark, .icon-copy span {\n font-size: 13px;\n }\n","input[type='text'] {\n border: none;\n width: 100%;\n padding: 12px 16px;\n margin: 4px 0 12px;\n box-sizing: border-box;\n border-radius: 6px;\n border: 1px solid #cbcbca;\n font-family: 'GoodSans';\n font-size: 0.875em;\n outline: none;\n}\n\nlabel {\n font-size: 12px;\n}\n\n@media (prefers-color-scheme: dark) {\n input[type='text'] {\n background-color: var(--dark-background-secondary);\n color: var(--dark-foregrounds-regular);\n border: none;\n }\n}\n\n@media only screen and (min-width: 800px) {\n input[type='text'] {\n width: 60%;\n }\n}\n",".qr-code-container {\n margin: auto;\n}\n\n.qr-code {\n display: none;\n height: auto;\n margin: 0 auto;\n max-width: 1000px;\n width: 100%;\n padding: 15px;\n border-radius: 1em;\n background-color: #ffffff;\n}\n\n.qr-code.dark {\n background-color: #3F454D;\n}\n\n@media only screen and (min-width: 800px) {\n .open-mini {\n display: none;\n }\n .qr-code {\n display: flex;\n }\n .container {\n flex: 1;\n }\n}\n"],"names":[],"sourceRoot":""}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import {ScrollView, TouchableOpacity, Platform} from 'react-native'
|
|
2
|
-
import {useNavigation} from '@react-navigation/native'
|
|
3
|
-
import {
|
|
4
|
-
Box,
|
|
5
|
-
SafeAreaView,
|
|
6
|
-
Text,
|
|
7
|
-
useTheme,
|
|
8
|
-
Icon,
|
|
9
|
-
} from '@shopify/shop-minis-platform-sdk'
|
|
10
|
-
|
|
11
|
-
const monospaceFontFamily = Platform.OS === 'ios' ? 'Menlo' : 'monospace'
|
|
12
|
-
|
|
13
|
-
export function ExtensionsScreen() {
|
|
14
|
-
const theme = useTheme()
|
|
15
|
-
const navigation = useNavigation()
|
|
16
|
-
|
|
17
|
-
return (
|
|
18
|
-
<SafeAreaView
|
|
19
|
-
style={{flex: 1, backgroundColor: theme.colors['backgrounds-regular']}}
|
|
20
|
-
>
|
|
21
|
-
<ScrollView>
|
|
22
|
-
<Box
|
|
23
|
-
flex={1}
|
|
24
|
-
paddingHorizontal="gutter"
|
|
25
|
-
backgroundColor="backgrounds-regular"
|
|
26
|
-
>
|
|
27
|
-
<Box>
|
|
28
|
-
<TouchableOpacity
|
|
29
|
-
onPress={() => navigation.goBack()}
|
|
30
|
-
accessibilityLabel="Navigate back"
|
|
31
|
-
>
|
|
32
|
-
<Box marginTop="xs">
|
|
33
|
-
<Icon name="arrow-left" />
|
|
34
|
-
</Box>
|
|
35
|
-
</TouchableOpacity>
|
|
36
|
-
</Box>
|
|
37
|
-
<Text variant="heroBold" marginBottom="s" marginTop="xs">
|
|
38
|
-
Surfacing your Mini
|
|
39
|
-
</Text>
|
|
40
|
-
<Text variant="subtitle" marginBottom="s">
|
|
41
|
-
Let users discover your Mini with Shop Minis Extensions.
|
|
42
|
-
</Text>
|
|
43
|
-
<Text marginBottom="s">
|
|
44
|
-
In your terminal, run{' '}
|
|
45
|
-
<Text fontFamily={monospaceFontFamily}>
|
|
46
|
-
npx shop-minis create-extension
|
|
47
|
-
</Text>{' '}
|
|
48
|
-
to learn more about rendering a component in a Shop app screen to
|
|
49
|
-
open your Mini.
|
|
50
|
-
</Text>
|
|
51
|
-
<Text marginBottom="s">
|
|
52
|
-
We look forward to seeing what you build! Check out the
|
|
53
|
-
documentation at
|
|
54
|
-
</Text>
|
|
55
|
-
<Text>https://shop.app/minis</Text>
|
|
56
|
-
</Box>
|
|
57
|
-
</ScrollView>
|
|
58
|
-
</SafeAreaView>
|
|
59
|
-
)
|
|
60
|
-
}
|
/package/build/dev-panel/static/js/{main.6625699c.js.LICENSE.txt → main.917a564c.js.LICENSE.txt}
RENAMED
|
File without changes
|