@momo-kits/mcp-expo 2.0.0-beta.4 → 2.0.0-beta.5

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.
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="Ask2AgentMigrationStateService">
4
+ <option name="migrationStatus" value="COMPLETED" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="JAVA_MODULE" version="4">
3
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
4
+ <exclude-output />
5
+ <content url="file://$MODULE_DIR$" />
6
+ <orderEntry type="inheritedJdk" />
7
+ <orderEntry type="sourceFolder" forTests="false" />
8
+ </component>
9
+ </module>
package/.idea/misc.xml ADDED
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectRootManager" version="2">
4
+ <output url="file://$PROJECT_DIR$/out" />
5
+ </component>
6
+ </project>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/mcp-expo.iml" filepath="$PROJECT_DIR$/.idea/mcp-expo.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
package/.idea/vcs.xml ADDED
@@ -0,0 +1,7 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="" vcs="Git" />
5
+ <mapping directory="$PROJECT_DIR$" vcs="Git" />
6
+ </component>
7
+ </project>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo-kits/mcp-expo",
3
- "version": "2.0.0-beta.4",
3
+ "version": "2.0.0-beta.5",
4
4
  "description": "MCP server: push AI-generated code to Expo and get LAN URL for Expo Go demo",
5
5
  "type": "module",
6
6
  "main": "server.mjs",
package/template/App.tsx CHANGED
@@ -1,61 +1,193 @@
1
+ import React, { useMemo, useState } from 'react';
2
+ import {
3
+ SafeAreaView,
4
+ ScrollView,
5
+ StatusBar,
6
+ StyleSheet,
7
+ Text,
8
+ TouchableOpacity,
9
+ View,
10
+ } from 'react-native';
1
11
 
2
- import React from 'react';
3
- import { View, Text, StyleSheet, ScrollView, StatusBar } from 'react-native';
12
+ const TYPOGRAPHY = [
13
+ 'headline_default_bold',
14
+ 'header_m_bold',
15
+ 'header_default_bold',
16
+ 'header_s_semibold',
17
+ 'header_xs_semibold',
18
+ 'body_default_regular',
19
+ 'body_default_regularstrikethrought',
20
+ 'description_default_regular',
21
+ 'description_default_regularstrikethrought',
22
+ 'description_xs_regular',
23
+ 'description_xs_regularstrikethrought',
24
+ 'label_default_medium',
25
+ 'label_s_medium',
26
+ 'label_xs_medium',
27
+ 'action_default_bold',
28
+ 'action_s_bold',
29
+ 'action_xs_bold',
30
+ 'action_xxs_bold',
31
+ ];
32
+
33
+ const TYPO_STYLE: Record<string, { fontSize: number; fontWeight: '400' | '500' | '600' | '700' }> = {
34
+ headline_default_bold: { fontSize: 32, fontWeight: '700' },
35
+ header_m_bold: { fontSize: 28, fontWeight: '700' },
36
+ header_default_bold: { fontSize: 24, fontWeight: '700' },
37
+ header_s_semibold: { fontSize: 20, fontWeight: '600' },
38
+ header_xs_semibold: { fontSize: 18, fontWeight: '600' },
39
+ body_default_regular: { fontSize: 16, fontWeight: '400' },
40
+ body_default_regularstrikethrought: { fontSize: 16, fontWeight: '400' },
41
+ description_default_regular: { fontSize: 14, fontWeight: '400' },
42
+ description_default_regularstrikethrought: { fontSize: 14, fontWeight: '400' },
43
+ description_xs_regular: { fontSize: 12, fontWeight: '400' },
44
+ description_xs_regularstrikethrought: { fontSize: 12, fontWeight: '400' },
45
+ label_default_medium: { fontSize: 16, fontWeight: '500' },
46
+ label_s_medium: { fontSize: 14, fontWeight: '500' },
47
+ label_xs_medium: { fontSize: 12, fontWeight: '500' },
48
+ action_default_bold: { fontSize: 16, fontWeight: '700' },
49
+ action_s_bold: { fontSize: 14, fontWeight: '700' },
50
+ action_xs_bold: { fontSize: 12, fontWeight: '700' },
51
+ action_xxs_bold: { fontSize: 11, fontWeight: '700' },
52
+ };
53
+
54
+ const COLOR_PRESETS = [
55
+ { key: 'default', value: '#1A1A1A' },
56
+ { key: 'secondary', value: '#6B7280' },
57
+ { key: 'disable', value: '#9CA3AF' },
58
+ { key: 'momoPink', value: '#D82D8B' },
59
+ { key: 'success', value: '#16A34A' },
60
+ { key: 'error', value: '#DC2626' },
61
+ ];
4
62
 
5
63
  export default function App() {
64
+ const [activeColor, setActiveColor] = useState(COLOR_PRESETS[0].value);
65
+
66
+ const rows = useMemo(() => TYPOGRAPHY, []);
67
+
6
68
  return (
7
- <View style={styles.container}>
69
+ <SafeAreaView style={styles.safeArea}>
8
70
  <StatusBar barStyle="dark-content" />
71
+ <View style={styles.header}>
72
+ <Text style={styles.title}>Text Screen (Expo Preview)</Text>
73
+ <Text style={styles.subtitle}>Based on app/screens/Text/index.tsx</Text>
74
+ </View>
75
+
9
76
  <ScrollView contentContainerStyle={styles.content}>
10
- <Text style={styles.title}>Text Component</Text>
11
- <Text style={styles.subtitle}>@momo-kits/foundation</Text>
12
-
13
- <Text style={styles.sectionHeader}>Typography Scale</Text>
14
-
15
- <Text style={{ fontSize: 28, fontWeight: '700', lineHeight: 36, color: '#1A1A1A', marginBottom: 12 }}>headline_default_bold</Text>
16
- <Text style={{ fontSize: 24, fontWeight: '700', lineHeight: 32, color: '#1A1A1A', marginBottom: 12 }}>header_m_bold</Text>
17
- <Text style={{ fontSize: 20, fontWeight: '700', lineHeight: 28, color: '#1A1A1A', marginBottom: 12 }}>header_default_bold</Text>
18
- <Text style={{ fontSize: 18, fontWeight: '600', lineHeight: 24, color: '#1A1A1A', marginBottom: 12 }}>header_s_semibold</Text>
19
- <Text style={{ fontSize: 16, fontWeight: '600', lineHeight: 22, color: '#1A1A1A', marginBottom: 12 }}>header_xs_semibold</Text>
20
- <Text style={{ fontSize: 16, fontWeight: '400', lineHeight: 24, color: '#1A1A1A', marginBottom: 12 }}>body_default_regular</Text>
21
- <Text style={{ fontSize: 16, fontWeight: '400', lineHeight: 24, color: '#1A1A1A', marginBottom: 12, textDecorationLine: 'line-through' }}>body_default_strikethrough</Text>
22
- <Text style={{ fontSize: 14, fontWeight: '400', lineHeight: 20, color: '#1A1A1A', marginBottom: 12 }}>description_default_regular</Text>
23
- <Text style={{ fontSize: 12, fontWeight: '400', lineHeight: 16, color: '#1A1A1A', marginBottom: 12 }}>description_xs_regular</Text>
24
- <Text style={{ fontSize: 16, fontWeight: '500', lineHeight: 22, color: '#1A1A1A', marginBottom: 12 }}>label_default_medium</Text>
25
- <Text style={{ fontSize: 14, fontWeight: '500', lineHeight: 20, color: '#1A1A1A', marginBottom: 12 }}>label_s_medium</Text>
26
- <Text style={{ fontSize: 12, fontWeight: '500', lineHeight: 16, color: '#1A1A1A', marginBottom: 12 }}>label_xs_medium</Text>
27
- <Text style={{ fontSize: 16, fontWeight: '700', lineHeight: 22, color: '#1A1A1A', marginBottom: 12 }}>action_default_bold</Text>
28
- <Text style={{ fontSize: 14, fontWeight: '700', lineHeight: 20, color: '#1A1A1A', marginBottom: 12 }}>action_s_bold</Text>
29
- <Text style={{ fontSize: 12, fontWeight: '700', lineHeight: 16, color: '#1A1A1A', marginBottom: 12 }}>action_xs_bold</Text>
30
- <Text style={{ fontSize: 10, fontWeight: '700', lineHeight: 14, color: '#1A1A1A', marginBottom: 12 }}>action_xxs_bold</Text>
31
-
32
- <Text style={styles.sectionHeader}>Colors</Text>
33
-
34
- <Text style={{ fontSize: 16, fontWeight: '600', color: '#1A1A1A', marginBottom: 8 }}>default</Text>
35
- <Text style={{ fontSize: 16, fontWeight: '600', color: '#7A7A7A', marginBottom: 8 }}>secondary</Text>
36
- <Text style={{ fontSize: 16, fontWeight: '600', color: '#B8B8B8', marginBottom: 8 }}>disable</Text>
37
- <Text style={{ fontSize: 16, fontWeight: '600', color: '#D82D8B', marginBottom: 8 }}>primary</Text>
38
- <Text style={{ fontSize: 16, fontWeight: '600', color: '#00C853', marginBottom: 8 }}>success</Text>
39
- <Text style={{ fontSize: 16, fontWeight: '600', color: '#FF9100', marginBottom: 8 }}>warning</Text>
40
- <Text style={{ fontSize: 16, fontWeight: '600', color: '#FF1744', marginBottom: 8 }}>error</Text>
41
- <Text style={{ fontSize: 16, fontWeight: '600', color: '#2979FF', marginBottom: 8 }}>info</Text>
77
+ <Text style={styles.sectionTitle}>Color</Text>
78
+ <View style={styles.colorRow}>
79
+ {COLOR_PRESETS.map(color => {
80
+ const selected = activeColor === color.value;
81
+ return (
82
+ <TouchableOpacity
83
+ key={color.key}
84
+ style={[styles.colorChip, selected && styles.colorChipSelected]}
85
+ onPress={() => setActiveColor(color.value)}
86
+ activeOpacity={0.8}
87
+ >
88
+ <View style={[styles.swatch, { backgroundColor: color.value }]} />
89
+ <Text style={styles.colorLabel}>{color.key}</Text>
90
+ </TouchableOpacity>
91
+ );
92
+ })}
93
+ </View>
94
+
95
+ <Text style={styles.sectionTitle}>Typography</Text>
96
+ {rows.map(name => {
97
+ const typo = TYPO_STYLE[name];
98
+ const isStrike = name.includes('strikethrought');
99
+ return (
100
+ <View key={name} style={styles.row}>
101
+ <Text
102
+ style={[
103
+ styles.demoText,
104
+ {
105
+ color: activeColor,
106
+ fontSize: typo?.fontSize ?? 14,
107
+ fontWeight: typo?.fontWeight ?? '400',
108
+ textDecorationLine: isStrike ? 'line-through' : 'none',
109
+ },
110
+ ]}
111
+ >
112
+ {name}
113
+ </Text>
114
+ </View>
115
+ );
116
+ })}
42
117
  </ScrollView>
43
- </View>
118
+ </SafeAreaView>
44
119
  );
45
120
  }
46
121
 
47
122
  const styles = StyleSheet.create({
48
- container: { flex: 1, backgroundColor: '#FAFAFA' },
49
- content: { padding: 20, paddingTop: 60, paddingBottom: 40 },
50
- title: { fontSize: 28, fontWeight: '700', color: '#1A1A1A' },
51
- subtitle: { fontSize: 13, color: '#999', marginTop: 4, marginBottom: 24 },
52
- sectionHeader: {
123
+ safeArea: {
124
+ flex: 1,
125
+ backgroundColor: '#FFFFFF',
126
+ },
127
+ header: {
128
+ paddingHorizontal: 16,
129
+ paddingTop: 8,
130
+ paddingBottom: 12,
131
+ borderBottomWidth: StyleSheet.hairlineWidth,
132
+ borderBottomColor: '#E5E7EB',
133
+ },
134
+ title: {
135
+ fontSize: 20,
136
+ fontWeight: '700',
137
+ color: '#111827',
138
+ },
139
+ subtitle: {
140
+ marginTop: 4,
53
141
  fontSize: 13,
142
+ color: '#6B7280',
143
+ },
144
+ content: {
145
+ padding: 16,
146
+ paddingBottom: 40,
147
+ },
148
+ sectionTitle: {
149
+ fontSize: 15,
54
150
  fontWeight: '700',
55
- color: '#D82D8B',
56
- textTransform: 'uppercase',
57
- letterSpacing: 1,
58
- marginTop: 20,
59
- marginBottom: 16,
151
+ color: '#111827',
152
+ marginBottom: 10,
153
+ marginTop: 8,
154
+ },
155
+ colorRow: {
156
+ flexDirection: 'row',
157
+ flexWrap: 'wrap',
158
+ marginBottom: 18,
159
+ gap: 8,
160
+ },
161
+ colorChip: {
162
+ borderWidth: 1,
163
+ borderColor: '#E5E7EB',
164
+ borderRadius: 10,
165
+ paddingVertical: 8,
166
+ paddingHorizontal: 10,
167
+ flexDirection: 'row',
168
+ alignItems: 'center',
169
+ backgroundColor: '#FFF',
170
+ },
171
+ colorChipSelected: {
172
+ borderColor: '#111827',
173
+ },
174
+ swatch: {
175
+ width: 12,
176
+ height: 12,
177
+ borderRadius: 999,
178
+ marginRight: 6,
179
+ },
180
+ colorLabel: {
181
+ fontSize: 12,
182
+ color: '#111827',
183
+ fontWeight: '600',
184
+ },
185
+ row: {
186
+ borderBottomWidth: StyleSheet.hairlineWidth,
187
+ borderBottomColor: '#E5E7EB',
188
+ paddingVertical: 10,
189
+ },
190
+ demoText: {
191
+ includeFontPadding: false,
60
192
  },
61
193
  });