@nebula-rn/cli 0.0.1 → 0.1.0
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.md +65 -0
- package/dist/create.js +12 -3
- package/package.json +20 -7
- package/templates/host/.eslintrc.js +7 -0
- package/templates/host/App.tsx +118 -0
- package/templates/host/Gemfile +16 -0
- package/templates/host/__tests__/App.test.tsx +13 -0
- package/templates/host/android/app/build.gradle +55 -0
- package/templates/host/android/app/debug.keystore +0 -0
- package/templates/host/android/app/proguard-rules.pro +10 -0
- package/templates/host/android/app/src/main/AndroidManifest.xml +54 -0
- package/templates/host/android/app/src/main/java/com/SuperApp/MainActivity.kt +28 -0
- package/templates/host/android/app/src/main/java/com/SuperApp/MainApplication.kt +35 -0
- package/templates/host/android/app/src/main/res/drawable/rn_edit_text_material.xml +37 -0
- package/templates/host/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/templates/host/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/templates/host/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/templates/host/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/templates/host/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/templates/host/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/templates/host/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/templates/host/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/templates/host/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/templates/host/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/templates/host/android/app/src/main/res/values/strings.xml +3 -0
- package/templates/host/android/app/src/main/res/values/styles.xml +16 -0
- package/templates/host/android/build.gradle +21 -0
- package/templates/host/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/templates/host/android/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/templates/host/android/gradle.properties +44 -0
- package/templates/host/android/gradlew +251 -0
- package/templates/host/android/gradlew.bat +99 -0
- package/templates/host/android/settings.gradle +6 -0
- package/templates/host/app.json +4 -0
- package/templates/host/babel.config.js +4 -0
- package/templates/host/index.js +9 -0
- package/templates/host/ios/.xcode.env +11 -0
- package/templates/host/ios/Podfile +38 -0
- package/templates/host/ios/SuperApp/AppDelegate.swift +95 -0
- package/templates/host/ios/SuperApp/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
- package/templates/host/ios/SuperApp/Images.xcassets/Contents.json +6 -0
- package/templates/host/ios/SuperApp/Info.plist +76 -0
- package/templates/host/ios/SuperApp/LaunchScreen.storyboard +47 -0
- package/templates/host/ios/SuperApp/PrivacyInfo.xcprivacy +48 -0
- package/templates/host/ios/SuperApp/SceneDelegate.swift +47 -0
- package/templates/host/ios/SuperApp/SuperApp-Bridging-Header.h +18 -0
- package/templates/host/ios/SuperApp-Bridging-Header.h +21 -0
- package/templates/host/ios/SuperApp.xcodeproj/project.pbxproj +500 -0
- package/templates/host/ios/SuperApp.xcodeproj/xcshareddata/xcschemes/RNTest.xcscheme +88 -0
- package/templates/host/jest.config.js +3 -0
- package/templates/host/metro.config.js +49 -0
- package/templates/host/package.json +66 -0
- package/templates/host/tsconfig.json +8 -0
- package/templates/miniapp/.watchmanconfig +1 -0
- package/templates/miniapp/app.json +12 -0
- package/templates/miniapp/babel.config.js +3 -0
- package/templates/miniapp/package.json +34 -0
- package/templates/miniapp/src/pages/home/index.tsx +122 -0
- package/templates/miniapp/src/pages/home/page.config.ts +10 -0
- package/templates/miniapp/tsconfig.json +11 -0
- package/templates/runner/.eslintrc.js +7 -0
- package/templates/runner/App.tsx +515 -0
- package/templates/runner/Gemfile +16 -0
- package/templates/runner/__tests__/App.test.tsx +13 -0
- package/templates/runner/android/app/build.gradle +55 -0
- package/templates/runner/android/app/debug.keystore +0 -0
- package/templates/runner/android/app/proguard-rules.pro +10 -0
- package/templates/runner/android/app/src/main/AndroidManifest.xml +60 -0
- package/templates/runner/android/app/src/main/java/com/devrunner/MainActivity.kt +14 -0
- package/templates/runner/android/app/src/main/java/com/devrunner/MainApplication.kt +35 -0
- package/templates/runner/android/app/src/main/res/drawable/rn_edit_text_material.xml +37 -0
- package/templates/runner/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/templates/runner/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/templates/runner/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/templates/runner/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/templates/runner/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/templates/runner/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/templates/runner/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/templates/runner/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/templates/runner/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/templates/runner/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/templates/runner/android/app/src/main/res/values/strings.xml +3 -0
- package/templates/runner/android/app/src/main/res/values/styles.xml +16 -0
- package/templates/runner/android/build.gradle +21 -0
- package/templates/runner/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/templates/runner/android/gradle/wrapper/gradle-wrapper.properties +7 -0
- package/templates/runner/android/gradle.properties +44 -0
- package/templates/runner/android/gradlew +251 -0
- package/templates/runner/android/gradlew.bat +99 -0
- package/templates/runner/android/settings.gradle +6 -0
- package/templates/runner/app.json +4 -0
- package/templates/runner/babel.config.js +4 -0
- package/templates/runner/index.js +9 -0
- package/templates/runner/ios/.xcode.env +11 -0
- package/templates/runner/ios/DevRunner/AppDelegate.swift +53 -0
- package/templates/runner/ios/DevRunner/DevRunner-Bridging-Header.h +19 -0
- package/templates/runner/ios/DevRunner/Images.xcassets/AppIcon.appiconset/Contents.json +53 -0
- package/templates/runner/ios/DevRunner/Images.xcassets/Contents.json +6 -0
- package/templates/runner/ios/DevRunner/Info.plist +51 -0
- package/templates/runner/ios/DevRunner/LaunchScreen.storyboard +47 -0
- package/templates/runner/ios/DevRunner/PrivacyInfo.xcprivacy +48 -0
- package/templates/runner/ios/DevRunner/SceneDelegate.swift +21 -0
- package/templates/runner/ios/DevRunner-Bridging-Header.h +22 -0
- package/templates/runner/ios/DevRunner.xcodeproj/project.pbxproj +500 -0
- package/templates/runner/ios/DevRunner.xcodeproj/xcshareddata/xcschemes/DevRunner.xcscheme +88 -0
- package/templates/runner/ios/Podfile +38 -0
- package/templates/runner/jest.config.js +3 -0
- package/templates/runner/metro.config.js +3 -0
- package/templates/runner/package.json +38 -0
- package/templates/runner/src/RunnerHomeScreen.tsx +499 -0
- package/templates/runner/src/assets/icon_close.png +0 -0
- package/templates/runner/src/assets/icon_pic.png +0 -0
- package/templates/runner/src/runnerTypes.ts +31 -0
- package/templates/runner/tsconfig.json +8 -0
- package/templates/versions.json +6 -0
|
@@ -0,0 +1,499 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import {
|
|
3
|
+
ActivityIndicator,
|
|
4
|
+
Pressable,
|
|
5
|
+
ScrollView,
|
|
6
|
+
StyleSheet,
|
|
7
|
+
Text,
|
|
8
|
+
TextInput,
|
|
9
|
+
View,
|
|
10
|
+
} from 'react-native';
|
|
11
|
+
import type { RunnerHistoryItem, RuntimeManifest } from './runnerTypes';
|
|
12
|
+
|
|
13
|
+
type RunnerHomeScreenProps = {
|
|
14
|
+
baseUrl: string;
|
|
15
|
+
setBaseUrl: (value: string) => void;
|
|
16
|
+
manifest: RuntimeManifest | null;
|
|
17
|
+
status: string;
|
|
18
|
+
serviceOnline: boolean;
|
|
19
|
+
loading: boolean;
|
|
20
|
+
bundleUrl: string;
|
|
21
|
+
recentHistory: RunnerHistoryItem[];
|
|
22
|
+
clearRecentHistory: () => void;
|
|
23
|
+
urlExpanded: boolean;
|
|
24
|
+
setUrlExpanded: (value: boolean) => void;
|
|
25
|
+
onConnect: () => void;
|
|
26
|
+
onRefresh: () => void;
|
|
27
|
+
onOpenCurrent: () => void;
|
|
28
|
+
onSelectHistory: (item: RunnerHistoryItem) => void;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
function SectionHeader({
|
|
32
|
+
title,
|
|
33
|
+
actionLabel,
|
|
34
|
+
onActionPress,
|
|
35
|
+
}: {
|
|
36
|
+
title: string;
|
|
37
|
+
actionLabel?: string;
|
|
38
|
+
onActionPress?: () => void;
|
|
39
|
+
}) {
|
|
40
|
+
return (
|
|
41
|
+
<View style={styles.sectionHeader}>
|
|
42
|
+
<Text style={styles.sectionTitle}>{title}</Text>
|
|
43
|
+
{actionLabel && onActionPress ? (
|
|
44
|
+
<Pressable onPress={onActionPress}>
|
|
45
|
+
<Text style={styles.sectionAction}>{actionLabel}</Text>
|
|
46
|
+
</Pressable>
|
|
47
|
+
) : null}
|
|
48
|
+
</View>
|
|
49
|
+
);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function StatusDot({ online }: { online: boolean }) {
|
|
53
|
+
return (
|
|
54
|
+
<View
|
|
55
|
+
style={[
|
|
56
|
+
styles.statusDot,
|
|
57
|
+
online ? styles.statusDotOnline : styles.statusDotOffline,
|
|
58
|
+
]}
|
|
59
|
+
/>
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
function InfoRow({ label, value }: { label: string; value: string }) {
|
|
64
|
+
return (
|
|
65
|
+
<View style={styles.infoRow}>
|
|
66
|
+
<Text style={styles.infoLabel}>{label}</Text>
|
|
67
|
+
<Text numberOfLines={3} style={styles.infoValue}>
|
|
68
|
+
{value}
|
|
69
|
+
</Text>
|
|
70
|
+
</View>
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function RunnerHomeScreen({
|
|
75
|
+
baseUrl,
|
|
76
|
+
setBaseUrl,
|
|
77
|
+
manifest,
|
|
78
|
+
status,
|
|
79
|
+
serviceOnline,
|
|
80
|
+
loading,
|
|
81
|
+
bundleUrl,
|
|
82
|
+
recentHistory,
|
|
83
|
+
clearRecentHistory,
|
|
84
|
+
urlExpanded,
|
|
85
|
+
setUrlExpanded,
|
|
86
|
+
onConnect,
|
|
87
|
+
onRefresh,
|
|
88
|
+
onOpenCurrent,
|
|
89
|
+
onSelectHistory,
|
|
90
|
+
}: RunnerHomeScreenProps) {
|
|
91
|
+
const title =
|
|
92
|
+
manifest?.window?.navigationBarTitleText ||
|
|
93
|
+
manifest?.appId ||
|
|
94
|
+
'No miniapp connected';
|
|
95
|
+
const pageCount = manifest?.pages ? Object.keys(manifest.pages).length : 0;
|
|
96
|
+
|
|
97
|
+
return (
|
|
98
|
+
<View style={styles.screen}>
|
|
99
|
+
<ScrollView
|
|
100
|
+
contentContainerStyle={styles.content}
|
|
101
|
+
showsVerticalScrollIndicator={false}
|
|
102
|
+
>
|
|
103
|
+
<SectionHeader
|
|
104
|
+
title="Session"
|
|
105
|
+
actionLabel="Refresh"
|
|
106
|
+
onActionPress={onRefresh}
|
|
107
|
+
/>
|
|
108
|
+
|
|
109
|
+
<View style={styles.panel}>
|
|
110
|
+
<View style={styles.serverCard}>
|
|
111
|
+
<View style={styles.serverInfo}>
|
|
112
|
+
<View style={styles.serverTitleRow}>
|
|
113
|
+
<StatusDot online={serviceOnline} />
|
|
114
|
+
<Text style={styles.serverTitle}>{title}</Text>
|
|
115
|
+
</View>
|
|
116
|
+
<Text style={styles.serverMeta}>{status}</Text>
|
|
117
|
+
</View>
|
|
118
|
+
</View>
|
|
119
|
+
|
|
120
|
+
<View style={styles.panelDivider} />
|
|
121
|
+
|
|
122
|
+
<Pressable
|
|
123
|
+
onPress={() => setUrlExpanded(!urlExpanded)}
|
|
124
|
+
style={styles.expandRow}
|
|
125
|
+
>
|
|
126
|
+
<Text style={styles.expandCaret}>{urlExpanded ? '⌄' : '›'}</Text>
|
|
127
|
+
<Text style={styles.expandLabel}>Enter URL</Text>
|
|
128
|
+
</Pressable>
|
|
129
|
+
|
|
130
|
+
{urlExpanded ? (
|
|
131
|
+
<View style={styles.urlBlock}>
|
|
132
|
+
<TextInput
|
|
133
|
+
autoCapitalize="none"
|
|
134
|
+
autoCorrect={false}
|
|
135
|
+
onChangeText={setBaseUrl}
|
|
136
|
+
style={styles.input}
|
|
137
|
+
value={baseUrl}
|
|
138
|
+
/>
|
|
139
|
+
|
|
140
|
+
<Pressable
|
|
141
|
+
onPress={onConnect}
|
|
142
|
+
style={({ pressed }) => [
|
|
143
|
+
styles.connectButton,
|
|
144
|
+
pressed ? styles.connectButtonPressed : null,
|
|
145
|
+
]}
|
|
146
|
+
>
|
|
147
|
+
{loading ? (
|
|
148
|
+
<ActivityIndicator color="#ffffff" />
|
|
149
|
+
) : (
|
|
150
|
+
<Text style={styles.connectButtonText}>Connect</Text>
|
|
151
|
+
)}
|
|
152
|
+
</Pressable>
|
|
153
|
+
|
|
154
|
+
{manifest ? (
|
|
155
|
+
<Pressable
|
|
156
|
+
onPress={onOpenCurrent}
|
|
157
|
+
style={styles.secondaryAction}
|
|
158
|
+
>
|
|
159
|
+
<Text style={styles.secondaryActionText}>
|
|
160
|
+
Open current miniapp
|
|
161
|
+
</Text>
|
|
162
|
+
</Pressable>
|
|
163
|
+
) : null}
|
|
164
|
+
</View>
|
|
165
|
+
) : null}
|
|
166
|
+
|
|
167
|
+
<View style={styles.panelDivider} />
|
|
168
|
+
|
|
169
|
+
<View style={styles.sessionBlock}>
|
|
170
|
+
<InfoRow label="Bundle URL" value={bundleUrl} />
|
|
171
|
+
<InfoRow label="App ID" value={manifest?.appId || 'Not loaded'} />
|
|
172
|
+
<InfoRow
|
|
173
|
+
label="Version"
|
|
174
|
+
value={manifest?.version || 'Not loaded'}
|
|
175
|
+
/>
|
|
176
|
+
</View>
|
|
177
|
+
</View>
|
|
178
|
+
|
|
179
|
+
<SectionHeader title="Manifest" />
|
|
180
|
+
<View style={styles.infoCard}>
|
|
181
|
+
<InfoRow
|
|
182
|
+
label="Entry Page"
|
|
183
|
+
value={manifest?.entryPagePath || 'Not loaded'}
|
|
184
|
+
/>
|
|
185
|
+
<InfoRow
|
|
186
|
+
label="Bundle Path"
|
|
187
|
+
value={manifest?.bundlePath || 'Not loaded'}
|
|
188
|
+
/>
|
|
189
|
+
<InfoRow
|
|
190
|
+
label="Bundle Entry"
|
|
191
|
+
value={manifest?.bundleEntryFile || 'Not loaded'}
|
|
192
|
+
/>
|
|
193
|
+
<InfoRow
|
|
194
|
+
label="Update Strategy"
|
|
195
|
+
value={manifest?.updateStrategy || 'Not loaded'}
|
|
196
|
+
/>
|
|
197
|
+
<InfoRow
|
|
198
|
+
label="Pages"
|
|
199
|
+
value={manifest ? String(pageCount) : 'Not loaded'}
|
|
200
|
+
/>
|
|
201
|
+
<InfoRow
|
|
202
|
+
label="Window Title"
|
|
203
|
+
value={manifest?.window?.navigationBarTitleText || 'Not loaded'}
|
|
204
|
+
/>
|
|
205
|
+
<InfoRow
|
|
206
|
+
label="Nav Bg"
|
|
207
|
+
value={
|
|
208
|
+
manifest?.window?.navigationBarBackgroundColor || 'Not loaded'
|
|
209
|
+
}
|
|
210
|
+
/>
|
|
211
|
+
<InfoRow
|
|
212
|
+
label="Nav Text"
|
|
213
|
+
value={manifest?.window?.navigationBarTextColor || 'Not loaded'}
|
|
214
|
+
/>
|
|
215
|
+
<InfoRow
|
|
216
|
+
label="Window Bg"
|
|
217
|
+
value={manifest?.window?.backgroundColor || 'Not loaded'}
|
|
218
|
+
/>
|
|
219
|
+
</View>
|
|
220
|
+
|
|
221
|
+
<SectionHeader
|
|
222
|
+
title="Recent History"
|
|
223
|
+
actionLabel={recentHistory.length > 0 ? 'Clear' : undefined}
|
|
224
|
+
onActionPress={clearRecentHistory}
|
|
225
|
+
/>
|
|
226
|
+
|
|
227
|
+
{recentHistory.length > 0 ? (
|
|
228
|
+
<View style={styles.historyList}>
|
|
229
|
+
{recentHistory.map(item => (
|
|
230
|
+
<Pressable
|
|
231
|
+
key={`${item.appId}:${item.baseUrl}`}
|
|
232
|
+
onPress={() => onSelectHistory(item)}
|
|
233
|
+
style={({ pressed }) => [
|
|
234
|
+
styles.historyCard,
|
|
235
|
+
pressed ? styles.historyCardPressed : null,
|
|
236
|
+
]}
|
|
237
|
+
>
|
|
238
|
+
<View style={styles.historyIcon}>
|
|
239
|
+
<Text style={styles.historyIconText}>•</Text>
|
|
240
|
+
</View>
|
|
241
|
+
<View style={styles.historyInfo}>
|
|
242
|
+
<Text style={styles.historyTitle}>{item.title}</Text>
|
|
243
|
+
<Text style={styles.historyMeta}>
|
|
244
|
+
{item.appId} · {item.version}
|
|
245
|
+
</Text>
|
|
246
|
+
<Text style={styles.historyMeta}>{item.baseUrl}</Text>
|
|
247
|
+
</View>
|
|
248
|
+
</Pressable>
|
|
249
|
+
))}
|
|
250
|
+
</View>
|
|
251
|
+
) : (
|
|
252
|
+
<View style={styles.emptyCard}>
|
|
253
|
+
<Text style={styles.emptyText}>
|
|
254
|
+
Recent miniapp sessions will appear here after you connect.
|
|
255
|
+
</Text>
|
|
256
|
+
</View>
|
|
257
|
+
)}
|
|
258
|
+
</ScrollView>
|
|
259
|
+
</View>
|
|
260
|
+
);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
const styles = StyleSheet.create({
|
|
264
|
+
screen: {
|
|
265
|
+
flex: 1,
|
|
266
|
+
backgroundColor: '#f5f5f5',
|
|
267
|
+
},
|
|
268
|
+
content: {
|
|
269
|
+
paddingHorizontal: 18,
|
|
270
|
+
paddingTop: 18,
|
|
271
|
+
paddingBottom: 28,
|
|
272
|
+
gap: 18,
|
|
273
|
+
},
|
|
274
|
+
sectionHeader: {
|
|
275
|
+
flexDirection: 'row',
|
|
276
|
+
alignItems: 'center',
|
|
277
|
+
justifyContent: 'space-between',
|
|
278
|
+
paddingHorizontal: 4,
|
|
279
|
+
},
|
|
280
|
+
sectionTitle: {
|
|
281
|
+
fontSize: 16,
|
|
282
|
+
fontWeight: '700',
|
|
283
|
+
color: '#111111',
|
|
284
|
+
},
|
|
285
|
+
sectionAction: {
|
|
286
|
+
fontSize: 13,
|
|
287
|
+
fontWeight: '700',
|
|
288
|
+
color: '#111111',
|
|
289
|
+
letterSpacing: 0.2,
|
|
290
|
+
},
|
|
291
|
+
panel: {
|
|
292
|
+
borderRadius: 22,
|
|
293
|
+
borderWidth: 1,
|
|
294
|
+
borderColor: '#d7d7d7',
|
|
295
|
+
backgroundColor: '#ffffff',
|
|
296
|
+
overflow: 'hidden',
|
|
297
|
+
},
|
|
298
|
+
serverCard: {
|
|
299
|
+
padding: 18,
|
|
300
|
+
},
|
|
301
|
+
serverInfo: {
|
|
302
|
+
gap: 4,
|
|
303
|
+
},
|
|
304
|
+
serverTitleRow: {
|
|
305
|
+
flexDirection: 'row',
|
|
306
|
+
alignItems: 'center',
|
|
307
|
+
gap: 10,
|
|
308
|
+
},
|
|
309
|
+
serverTitle: {
|
|
310
|
+
fontSize: 16,
|
|
311
|
+
fontWeight: '700',
|
|
312
|
+
color: '#111111',
|
|
313
|
+
},
|
|
314
|
+
serverMeta: {
|
|
315
|
+
fontSize: 13,
|
|
316
|
+
color: '#3f3f3f',
|
|
317
|
+
lineHeight: 18,
|
|
318
|
+
},
|
|
319
|
+
serverBaseUrl: {
|
|
320
|
+
fontSize: 13,
|
|
321
|
+
color: '#6b6b6b',
|
|
322
|
+
lineHeight: 18,
|
|
323
|
+
},
|
|
324
|
+
panelDivider: {
|
|
325
|
+
height: 1,
|
|
326
|
+
backgroundColor: '#e6e6e6',
|
|
327
|
+
},
|
|
328
|
+
expandRow: {
|
|
329
|
+
flexDirection: 'row',
|
|
330
|
+
alignItems: 'center',
|
|
331
|
+
gap: 10,
|
|
332
|
+
paddingHorizontal: 18,
|
|
333
|
+
paddingVertical: 16,
|
|
334
|
+
},
|
|
335
|
+
expandCaret: {
|
|
336
|
+
fontSize: 16,
|
|
337
|
+
color: '#111111',
|
|
338
|
+
},
|
|
339
|
+
expandLabel: {
|
|
340
|
+
fontSize: 16,
|
|
341
|
+
color: '#111111',
|
|
342
|
+
fontWeight: '500',
|
|
343
|
+
},
|
|
344
|
+
urlBlock: {
|
|
345
|
+
paddingHorizontal: 18,
|
|
346
|
+
paddingBottom: 18,
|
|
347
|
+
gap: 14,
|
|
348
|
+
},
|
|
349
|
+
input: {
|
|
350
|
+
borderWidth: 1,
|
|
351
|
+
borderColor: '#111111',
|
|
352
|
+
borderRadius: 14,
|
|
353
|
+
backgroundColor: '#ffffff',
|
|
354
|
+
paddingHorizontal: 16,
|
|
355
|
+
paddingVertical: 16,
|
|
356
|
+
fontSize: 16,
|
|
357
|
+
color: '#111111',
|
|
358
|
+
},
|
|
359
|
+
connectButton: {
|
|
360
|
+
borderRadius: 999,
|
|
361
|
+
backgroundColor: '#111111',
|
|
362
|
+
alignItems: 'center',
|
|
363
|
+
justifyContent: 'center',
|
|
364
|
+
minHeight: 52,
|
|
365
|
+
},
|
|
366
|
+
connectButtonPressed: {
|
|
367
|
+
opacity: 0.88,
|
|
368
|
+
},
|
|
369
|
+
connectButtonText: {
|
|
370
|
+
color: '#ffffff',
|
|
371
|
+
fontSize: 16,
|
|
372
|
+
fontWeight: '700',
|
|
373
|
+
},
|
|
374
|
+
secondaryAction: {
|
|
375
|
+
alignItems: 'center',
|
|
376
|
+
paddingVertical: 4,
|
|
377
|
+
},
|
|
378
|
+
secondaryActionText: {
|
|
379
|
+
color: '#111111',
|
|
380
|
+
fontWeight: '600',
|
|
381
|
+
},
|
|
382
|
+
sessionBlock: {
|
|
383
|
+
paddingHorizontal: 18,
|
|
384
|
+
paddingVertical: 18,
|
|
385
|
+
gap: 14,
|
|
386
|
+
},
|
|
387
|
+
infoCard: {
|
|
388
|
+
borderRadius: 22,
|
|
389
|
+
borderWidth: 1,
|
|
390
|
+
borderColor: '#d7d7d7',
|
|
391
|
+
backgroundColor: '#ffffff',
|
|
392
|
+
padding: 18,
|
|
393
|
+
gap: 14,
|
|
394
|
+
},
|
|
395
|
+
sessionHeader: {
|
|
396
|
+
flexDirection: 'row',
|
|
397
|
+
alignItems: 'center',
|
|
398
|
+
gap: 10,
|
|
399
|
+
},
|
|
400
|
+
sessionTitle: {
|
|
401
|
+
flex: 1,
|
|
402
|
+
fontSize: 16,
|
|
403
|
+
fontWeight: '700',
|
|
404
|
+
color: '#111111',
|
|
405
|
+
},
|
|
406
|
+
infoRow: {
|
|
407
|
+
gap: 6,
|
|
408
|
+
},
|
|
409
|
+
infoLabel: {
|
|
410
|
+
color: '#6b6b6b',
|
|
411
|
+
fontSize: 12,
|
|
412
|
+
fontWeight: '700',
|
|
413
|
+
letterSpacing: 0.2,
|
|
414
|
+
textTransform: 'uppercase',
|
|
415
|
+
},
|
|
416
|
+
infoValue: {
|
|
417
|
+
color: '#111111',
|
|
418
|
+
fontSize: 14,
|
|
419
|
+
lineHeight: 20,
|
|
420
|
+
},
|
|
421
|
+
jsonCard: {
|
|
422
|
+
borderRadius: 22,
|
|
423
|
+
borderWidth: 1,
|
|
424
|
+
borderColor: '#d7d7d7',
|
|
425
|
+
backgroundColor: '#ffffff',
|
|
426
|
+
padding: 16,
|
|
427
|
+
},
|
|
428
|
+
jsonText: {
|
|
429
|
+
color: '#111111',
|
|
430
|
+
fontSize: 12,
|
|
431
|
+
lineHeight: 18,
|
|
432
|
+
fontFamily: 'Menlo',
|
|
433
|
+
},
|
|
434
|
+
historyList: {
|
|
435
|
+
gap: 12,
|
|
436
|
+
},
|
|
437
|
+
historyCard: {
|
|
438
|
+
flexDirection: 'row',
|
|
439
|
+
gap: 14,
|
|
440
|
+
borderRadius: 20,
|
|
441
|
+
borderWidth: 1,
|
|
442
|
+
borderColor: '#d7d7d7',
|
|
443
|
+
backgroundColor: '#ffffff',
|
|
444
|
+
padding: 16,
|
|
445
|
+
},
|
|
446
|
+
historyCardPressed: {
|
|
447
|
+
opacity: 0.92,
|
|
448
|
+
},
|
|
449
|
+
historyIcon: {
|
|
450
|
+
width: 42,
|
|
451
|
+
height: 42,
|
|
452
|
+
borderRadius: 12,
|
|
453
|
+
backgroundColor: '#111111',
|
|
454
|
+
alignItems: 'center',
|
|
455
|
+
justifyContent: 'center',
|
|
456
|
+
},
|
|
457
|
+
historyIconText: {
|
|
458
|
+
color: '#ffffff',
|
|
459
|
+
fontSize: 20,
|
|
460
|
+
fontWeight: '700',
|
|
461
|
+
lineHeight: 20,
|
|
462
|
+
},
|
|
463
|
+
historyInfo: {
|
|
464
|
+
flex: 1,
|
|
465
|
+
gap: 3,
|
|
466
|
+
},
|
|
467
|
+
historyTitle: {
|
|
468
|
+
fontSize: 16,
|
|
469
|
+
fontWeight: '700',
|
|
470
|
+
color: '#111111',
|
|
471
|
+
},
|
|
472
|
+
historyMeta: {
|
|
473
|
+
color: '#6b6b6b',
|
|
474
|
+
fontSize: 13,
|
|
475
|
+
lineHeight: 18,
|
|
476
|
+
},
|
|
477
|
+
emptyCard: {
|
|
478
|
+
borderRadius: 20,
|
|
479
|
+
borderWidth: 1,
|
|
480
|
+
borderColor: '#d7d7d7',
|
|
481
|
+
backgroundColor: '#ffffff',
|
|
482
|
+
padding: 18,
|
|
483
|
+
},
|
|
484
|
+
emptyText: {
|
|
485
|
+
color: '#6b6b6b',
|
|
486
|
+
lineHeight: 20,
|
|
487
|
+
},
|
|
488
|
+
statusDot: {
|
|
489
|
+
width: 10,
|
|
490
|
+
height: 10,
|
|
491
|
+
borderRadius: 999,
|
|
492
|
+
},
|
|
493
|
+
statusDotOnline: {
|
|
494
|
+
backgroundColor: '#22c55e',
|
|
495
|
+
},
|
|
496
|
+
statusDotOffline: {
|
|
497
|
+
backgroundColor: '#ef4444',
|
|
498
|
+
},
|
|
499
|
+
});
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export type RuntimeManifest = {
|
|
2
|
+
appId: string;
|
|
3
|
+
bundlePath: string;
|
|
4
|
+
bundleEntryFile?: string;
|
|
5
|
+
entryPagePath: string;
|
|
6
|
+
pageConfigs?: Record<string, unknown>;
|
|
7
|
+
pages?: Record<string, string>;
|
|
8
|
+
updateStrategy?: 'auto' | 'manual';
|
|
9
|
+
version: string;
|
|
10
|
+
window?: {
|
|
11
|
+
navigationBarTitleText?: string;
|
|
12
|
+
navigationBarBackgroundColor?: string;
|
|
13
|
+
navigationBarTextColor?: string;
|
|
14
|
+
backgroundColor?: string;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
export type RunnerLoadedState = {
|
|
19
|
+
manifest: RuntimeManifest;
|
|
20
|
+
serviceOnline: boolean;
|
|
21
|
+
status: string;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export type RunnerHistoryItem = {
|
|
25
|
+
appId: string;
|
|
26
|
+
baseUrl: string;
|
|
27
|
+
bundleUrl?: string | null;
|
|
28
|
+
manifestUrl?: string | null;
|
|
29
|
+
title: string;
|
|
30
|
+
version: string;
|
|
31
|
+
};
|