@idealyst/cli 1.0.87 → 1.0.88
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/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { QueryClient, QueryClientProvider } from
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
1
|
+
import { NavigatorProvider } from "@idealyst/navigation";
|
|
2
|
+
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
|
|
3
|
+
import React from "react";
|
|
4
|
+
import AppRouter from "../navigation/AppRouter";
|
|
5
|
+
import { createTRPCClient, trpc } from "../trpc/client";
|
|
6
6
|
|
|
7
7
|
interface AppProps {
|
|
8
8
|
apiUrl?: string;
|
|
@@ -15,7 +15,6 @@ const defaultQueryClient = new QueryClient({
|
|
|
15
15
|
defaultOptions: {
|
|
16
16
|
queries: {
|
|
17
17
|
staleTime: 1000 * 60 * 5, // 5 minutes
|
|
18
|
-
cacheTime: 1000 * 60 * 10, // 10 minutes
|
|
19
18
|
},
|
|
20
19
|
},
|
|
21
20
|
});
|
|
@@ -24,10 +23,10 @@ const defaultQueryClient = new QueryClient({
|
|
|
24
23
|
* Unified App component that sets up tRPC, React Query providers, and Navigation
|
|
25
24
|
* This component can be used by both web and mobile platforms
|
|
26
25
|
*/
|
|
27
|
-
export const App: React.FC<AppProps> = ({
|
|
28
|
-
apiUrl =
|
|
26
|
+
export const App: React.FC<AppProps> = ({
|
|
27
|
+
apiUrl = "http://localhost:3000/trpc",
|
|
29
28
|
queryClient = defaultQueryClient,
|
|
30
|
-
headers
|
|
29
|
+
headers,
|
|
31
30
|
}) => {
|
|
32
31
|
// Create tRPC client with the provided configuration
|
|
33
32
|
const trpcClient = createTRPCClient({
|
|
@@ -79,7 +79,7 @@ export const HelloWorld = ({
|
|
|
79
79
|
{platformText}
|
|
80
80
|
</Text>
|
|
81
81
|
{/* Framework Branding Card */}
|
|
82
|
-
<Card
|
|
82
|
+
<Card type="elevated" padding="lg" intent="primary">
|
|
83
83
|
<View style={{ alignItems: "center" }}>
|
|
84
84
|
<Text style={{ fontSize: 32, marginBottom: 16 }}>🚀</Text>
|
|
85
85
|
<Text
|
|
@@ -89,10 +89,7 @@ export const HelloWorld = ({
|
|
|
89
89
|
>
|
|
90
90
|
Idealyst Framework
|
|
91
91
|
</Text>
|
|
92
|
-
<Text
|
|
93
|
-
size="md"
|
|
94
|
-
style={{ marginBottom: 16, textAlign: "center" }}
|
|
95
|
-
>
|
|
92
|
+
<Text size="md" style={{ marginBottom: 16, textAlign: "center" }}>
|
|
96
93
|
Hello, {name}! Welcome to your cross-platform workspace.
|
|
97
94
|
</Text>
|
|
98
95
|
|
|
@@ -106,7 +103,7 @@ export const HelloWorld = ({
|
|
|
106
103
|
}}
|
|
107
104
|
>
|
|
108
105
|
<Card
|
|
109
|
-
|
|
106
|
+
type="filled"
|
|
110
107
|
padding="sm"
|
|
111
108
|
style={{ backgroundColor: "rgba(255, 255, 255, 0.2)" }}
|
|
112
109
|
>
|
|
@@ -115,7 +112,7 @@ export const HelloWorld = ({
|
|
|
115
112
|
</Text>
|
|
116
113
|
</Card>
|
|
117
114
|
<Card
|
|
118
|
-
|
|
115
|
+
type="filled"
|
|
119
116
|
padding="sm"
|
|
120
117
|
style={{ backgroundColor: "rgba(255, 255, 255, 0.2)" }}
|
|
121
118
|
>
|
|
@@ -124,7 +121,7 @@ export const HelloWorld = ({
|
|
|
124
121
|
</Text>
|
|
125
122
|
</Card>
|
|
126
123
|
<Card
|
|
127
|
-
|
|
124
|
+
type="filled"
|
|
128
125
|
padding="sm"
|
|
129
126
|
style={{ backgroundColor: "rgba(255, 255, 255, 0.2)" }}
|
|
130
127
|
>
|
|
@@ -137,7 +134,7 @@ export const HelloWorld = ({
|
|
|
137
134
|
</Card>
|
|
138
135
|
|
|
139
136
|
{/* Quick Start Guide Card */}
|
|
140
|
-
<Card
|
|
137
|
+
<Card type="outlined" padding="lg" style={{ marginTop: 16 }}>
|
|
141
138
|
<Text size="lg" weight="bold" style={{ marginBottom: 16 }}>
|
|
142
139
|
🎯 Quick Start Guide
|
|
143
140
|
</Text>
|
|
@@ -182,7 +179,7 @@ export const HelloWorld = ({
|
|
|
182
179
|
</Text>
|
|
183
180
|
</View>
|
|
184
181
|
|
|
185
|
-
<Card
|
|
182
|
+
<Card type="filled" intent="success" padding="md">
|
|
186
183
|
<Text size="sm" weight="semibold" style={{ marginBottom: 4 }}>
|
|
187
184
|
✨ Framework Features:
|
|
188
185
|
</Text>
|
|
@@ -194,7 +191,7 @@ export const HelloWorld = ({
|
|
|
194
191
|
</Card>
|
|
195
192
|
|
|
196
193
|
{/* API Testing Section */}
|
|
197
|
-
<Card
|
|
194
|
+
<Card type="outlined" padding="lg" style={{ marginTop: 16 }}>
|
|
198
195
|
<Text size="lg" weight="bold" style={{ marginBottom: 16 }}>
|
|
199
196
|
🚀 API Demo - Database Integration
|
|
200
197
|
</Text>
|
|
@@ -205,7 +202,7 @@ export const HelloWorld = ({
|
|
|
205
202
|
|
|
206
203
|
{/* Create New Test Form */}
|
|
207
204
|
<Card
|
|
208
|
-
|
|
205
|
+
type="filled"
|
|
209
206
|
padding="md"
|
|
210
207
|
style={{ marginBottom: 16, backgroundColor: "#f8fafc" }}
|
|
211
208
|
>
|
|
@@ -229,11 +226,11 @@ export const HelloWorld = ({
|
|
|
229
226
|
disabled={
|
|
230
227
|
!newTestName ||
|
|
231
228
|
!newTestMessage ||
|
|
232
|
-
createTestMutation.
|
|
229
|
+
createTestMutation.isPending
|
|
233
230
|
}
|
|
234
231
|
style={{ alignSelf: "flex-start" }}
|
|
235
232
|
>
|
|
236
|
-
{createTestMutation.
|
|
233
|
+
{createTestMutation.isPending ? "Creating..." : "Create Test"}
|
|
237
234
|
</Button>
|
|
238
235
|
</View>
|
|
239
236
|
</Card>
|
|
@@ -244,14 +241,14 @@ export const HelloWorld = ({
|
|
|
244
241
|
Database Records ({tests.data?.length || 0})
|
|
245
242
|
</Text>
|
|
246
243
|
|
|
247
|
-
{tests.
|
|
248
|
-
<Card
|
|
244
|
+
{tests.isPending ? (
|
|
245
|
+
<Card type="outlined" padding="md">
|
|
249
246
|
<Text size="sm" style={{ color: "#64748b" }}>
|
|
250
247
|
Loading tests...
|
|
251
248
|
</Text>
|
|
252
249
|
</Card>
|
|
253
250
|
) : tests.data?.length === 0 ? (
|
|
254
|
-
<Card
|
|
251
|
+
<Card type="outlined" padding="md">
|
|
255
252
|
<Text size="sm" style={{ color: "#64748b" }}>
|
|
256
253
|
No tests found. Create one above!
|
|
257
254
|
</Text>
|
|
@@ -259,7 +256,7 @@ export const HelloWorld = ({
|
|
|
259
256
|
) : (
|
|
260
257
|
<View style={{ gap: 8 }}>
|
|
261
258
|
{tests.data?.map((test: any) => (
|
|
262
|
-
<Card key={test.id}
|
|
259
|
+
<Card key={test.id} type="outlined" padding="md">
|
|
263
260
|
<View
|
|
264
261
|
style={{
|
|
265
262
|
flexDirection: "row",
|
|
@@ -287,10 +284,10 @@ export const HelloWorld = ({
|
|
|
287
284
|
</Text>
|
|
288
285
|
</View>
|
|
289
286
|
<Button
|
|
290
|
-
|
|
287
|
+
intent="error"
|
|
291
288
|
size="sm"
|
|
292
289
|
onPress={() => handleDeleteTest(test.id)}
|
|
293
|
-
disabled={deleteTestMutation.
|
|
290
|
+
disabled={deleteTestMutation.isPending}
|
|
294
291
|
>
|
|
295
292
|
Delete
|
|
296
293
|
</Button>
|
|
@@ -1,98 +1,565 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import {
|
|
2
|
+
Accordion,
|
|
3
|
+
Alert,
|
|
4
|
+
Avatar,
|
|
5
|
+
Badge,
|
|
6
|
+
Button,
|
|
7
|
+
Card,
|
|
8
|
+
Chip,
|
|
9
|
+
Icon,
|
|
10
|
+
Progress,
|
|
11
|
+
Screen,
|
|
12
|
+
Slider,
|
|
13
|
+
Switch,
|
|
14
|
+
Text,
|
|
15
|
+
View,
|
|
16
|
+
} from "@idealyst/components";
|
|
17
|
+
import { NavigatorParam } from "@idealyst/navigation";
|
|
18
|
+
import { useState } from "react";
|
|
19
|
+
import { HelloWorld } from "../components/HelloWorld";
|
|
5
20
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
21
|
+
// Dashboard Screen - Overview with stats and quick info
|
|
22
|
+
const DashboardScreen = () => {
|
|
23
|
+
const [progress] = useState(68);
|
|
24
|
+
|
|
25
|
+
return (
|
|
26
|
+
<Screen>
|
|
27
|
+
<View spacing="lg">
|
|
28
|
+
<View spacing="sm">
|
|
29
|
+
<Text size="xl" weight="bold">
|
|
30
|
+
Dashboard
|
|
31
|
+
</Text>
|
|
32
|
+
<Text size="md" style={{ opacity: 0.7 }}>
|
|
33
|
+
Idealyst Framework Showcase
|
|
34
|
+
</Text>
|
|
35
|
+
</View>
|
|
36
|
+
|
|
37
|
+
{/* Stats Cards */}
|
|
38
|
+
<View
|
|
39
|
+
style={{
|
|
40
|
+
flexDirection: "row",
|
|
41
|
+
gap: 16,
|
|
42
|
+
flexWrap: "wrap",
|
|
43
|
+
marginTop: 16,
|
|
44
|
+
}}
|
|
45
|
+
>
|
|
46
|
+
<Card type="elevated" style={{ flex: 1, minWidth: 150, padding: 16 }}>
|
|
47
|
+
<View spacing="sm">
|
|
48
|
+
<Icon name="toy-brick" size="lg" />
|
|
49
|
+
<Text size="xl" weight="bold">
|
|
50
|
+
34
|
|
51
|
+
</Text>
|
|
52
|
+
<Text size="sm" style={{ opacity: 0.7 }}>
|
|
53
|
+
Components
|
|
54
|
+
</Text>
|
|
55
|
+
</View>
|
|
56
|
+
</Card>
|
|
57
|
+
|
|
58
|
+
<Card type="elevated" style={{ flex: 1, minWidth: 150, padding: 16 }}>
|
|
59
|
+
<View spacing="sm">
|
|
60
|
+
<Icon name="palette" size="lg" />
|
|
61
|
+
<Text size="xl" weight="bold">
|
|
62
|
+
5
|
|
63
|
+
</Text>
|
|
64
|
+
<Text size="sm" style={{ opacity: 0.7 }}>
|
|
65
|
+
Intent Colors
|
|
66
|
+
</Text>
|
|
67
|
+
</View>
|
|
68
|
+
</Card>
|
|
69
|
+
|
|
70
|
+
<Card type="elevated" style={{ flex: 1, minWidth: 150, padding: 16 }}>
|
|
71
|
+
<View spacing="sm">
|
|
72
|
+
<Icon name="devices" size="lg" />
|
|
73
|
+
<Text size="xl" weight="bold">
|
|
74
|
+
2
|
|
75
|
+
</Text>
|
|
76
|
+
<Text size="sm" style={{ opacity: 0.7 }}>
|
|
77
|
+
Platforms
|
|
78
|
+
</Text>
|
|
79
|
+
</View>
|
|
80
|
+
</Card>
|
|
81
|
+
</View>
|
|
82
|
+
|
|
83
|
+
{/* Progress Section */}
|
|
84
|
+
<Card type="outlined" style={{ marginTop: 16, padding: 16 }}>
|
|
85
|
+
<View spacing="md">
|
|
86
|
+
<View
|
|
87
|
+
style={{
|
|
88
|
+
flexDirection: "row",
|
|
89
|
+
justifyContent: "space-between",
|
|
90
|
+
alignItems: "center",
|
|
91
|
+
}}
|
|
92
|
+
>
|
|
93
|
+
<Text size="lg" weight="semibold">
|
|
94
|
+
Framework Adoption
|
|
95
|
+
</Text>
|
|
96
|
+
<Badge type="filled" color="green">
|
|
97
|
+
Active
|
|
98
|
+
</Badge>
|
|
99
|
+
</View>
|
|
100
|
+
<Progress value={progress} variant="linear" intent="primary" showLabel />
|
|
101
|
+
<Text size="sm" style={{ opacity: 0.7 }}>
|
|
102
|
+
You're making great progress exploring the framework!
|
|
103
|
+
</Text>
|
|
104
|
+
</View>
|
|
105
|
+
</Card>
|
|
106
|
+
|
|
107
|
+
{/* Quick Info Alert */}
|
|
108
|
+
<Alert
|
|
109
|
+
intent="info"
|
|
110
|
+
title="Welcome to Idealyst"
|
|
111
|
+
message="This showcase demonstrates drawer navigation and various components from the framework. Explore the different screens using the drawer menu."
|
|
112
|
+
type="soft"
|
|
113
|
+
/>
|
|
15
114
|
</View>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
115
|
+
</Screen>
|
|
116
|
+
);
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
// Component Gallery - Showcase UI components
|
|
120
|
+
const ComponentGalleryScreen = () => {
|
|
121
|
+
return (
|
|
122
|
+
<Screen>
|
|
123
|
+
<View spacing="lg">
|
|
124
|
+
<View spacing="sm">
|
|
125
|
+
<Text size="xl" weight="bold">
|
|
126
|
+
Component Gallery
|
|
127
|
+
</Text>
|
|
128
|
+
<Text size="md" style={{ opacity: 0.7 }}>
|
|
129
|
+
Explore various UI components
|
|
130
|
+
</Text>
|
|
131
|
+
</View>
|
|
132
|
+
|
|
133
|
+
{/* Avatars Section */}
|
|
134
|
+
<Card type="outlined" style={{ marginTop: 16, padding: 16 }}>
|
|
135
|
+
<View spacing="md">
|
|
136
|
+
<Text size="lg" weight="semibold">
|
|
137
|
+
Avatars
|
|
138
|
+
</Text>
|
|
139
|
+
<View style={{ flexDirection: "row", gap: 12, flexWrap: "wrap" }}>
|
|
140
|
+
<Avatar fallback="JD" size="sm" shape="circle" color="blue" />
|
|
141
|
+
<Avatar fallback="AS" size="md" shape="circle" color="purple" />
|
|
142
|
+
<Avatar fallback="MK" size="lg" shape="circle" color="green" />
|
|
143
|
+
<Avatar fallback="RC" size="xl" shape="circle" color="orange" />
|
|
144
|
+
</View>
|
|
145
|
+
</View>
|
|
146
|
+
</Card>
|
|
147
|
+
|
|
148
|
+
{/* Badges & Chips */}
|
|
149
|
+
<Card type="outlined" style={{ marginTop: 16, padding: 16 }}>
|
|
150
|
+
<View spacing="md">
|
|
151
|
+
<Text size="lg" weight="semibold">
|
|
152
|
+
Badges & Chips
|
|
153
|
+
</Text>
|
|
154
|
+
<View spacing="sm">
|
|
155
|
+
<View style={{ flexDirection: "row", gap: 8, flexWrap: "wrap" }}>
|
|
156
|
+
<Badge type="filled" color="red">
|
|
157
|
+
5
|
|
158
|
+
</Badge>
|
|
159
|
+
<Badge type="filled" color="blue">
|
|
160
|
+
New
|
|
161
|
+
</Badge>
|
|
162
|
+
<Badge type="outlined" color="green">
|
|
163
|
+
Active
|
|
164
|
+
</Badge>
|
|
165
|
+
<Badge type="dot" color="orange" />
|
|
166
|
+
</View>
|
|
167
|
+
<View style={{ flexDirection: "row", gap: 8, flexWrap: "wrap", marginTop: 8 }}>
|
|
168
|
+
<Chip label="React" />
|
|
169
|
+
<Chip label="React Native" />
|
|
170
|
+
<Chip label="TypeScript" />
|
|
171
|
+
<Chip label="Cross-platform" />
|
|
172
|
+
</View>
|
|
173
|
+
</View>
|
|
174
|
+
</View>
|
|
175
|
+
</Card>
|
|
176
|
+
|
|
177
|
+
{/* Buttons */}
|
|
178
|
+
<Card type="outlined" style={{ marginTop: 16, padding: 16 }}>
|
|
179
|
+
<View spacing="md">
|
|
180
|
+
<Text size="lg" weight="semibold">
|
|
181
|
+
Buttons
|
|
182
|
+
</Text>
|
|
183
|
+
<View style={{ gap: 12 }}>
|
|
184
|
+
<View style={{ flexDirection: "row", gap: 8, flexWrap: "wrap" }}>
|
|
185
|
+
<Button type="contained" intent="primary" leftIcon="check">
|
|
186
|
+
Primary
|
|
187
|
+
</Button>
|
|
188
|
+
<Button type="outlined" intent="neutral" leftIcon="heart">
|
|
189
|
+
Neutral
|
|
190
|
+
</Button>
|
|
191
|
+
<Button type="text" intent="error" leftIcon="delete">
|
|
192
|
+
Delete
|
|
193
|
+
</Button>
|
|
194
|
+
</View>
|
|
195
|
+
<View style={{ flexDirection: "row", gap: 8, flexWrap: "wrap" }}>
|
|
196
|
+
<Button type="contained" intent="success" size="sm">
|
|
197
|
+
Success
|
|
198
|
+
</Button>
|
|
199
|
+
<Button type="contained" intent="warning" size="md">
|
|
200
|
+
Warning
|
|
201
|
+
</Button>
|
|
202
|
+
<Button type="contained" intent="error" size="lg">
|
|
203
|
+
Error
|
|
204
|
+
</Button>
|
|
205
|
+
</View>
|
|
206
|
+
</View>
|
|
207
|
+
</View>
|
|
208
|
+
</Card>
|
|
209
|
+
|
|
210
|
+
{/* Accordion */}
|
|
211
|
+
<Accordion
|
|
212
|
+
type="bordered"
|
|
213
|
+
items={[
|
|
214
|
+
{
|
|
215
|
+
id: "1",
|
|
216
|
+
title: "What is Idealyst?",
|
|
217
|
+
content: (
|
|
218
|
+
<Text size="sm">
|
|
219
|
+
Idealyst is a cross-platform React framework with 34+ components,
|
|
220
|
+
built for both web and mobile applications.
|
|
221
|
+
</Text>
|
|
222
|
+
),
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
id: "2",
|
|
226
|
+
title: "Key Features",
|
|
227
|
+
content: (
|
|
228
|
+
<View spacing="sm">
|
|
229
|
+
<Text size="sm">• Cross-platform (React & React Native)</Text>
|
|
230
|
+
<Text size="sm">• 7,447+ Material Design Icons</Text>
|
|
231
|
+
<Text size="sm">• Consistent API patterns</Text>
|
|
232
|
+
<Text size="sm">• Built-in theming system</Text>
|
|
233
|
+
</View>
|
|
234
|
+
),
|
|
235
|
+
},
|
|
236
|
+
]}
|
|
237
|
+
defaultExpanded={["1"]}
|
|
238
|
+
/>
|
|
21
239
|
</View>
|
|
22
|
-
</
|
|
23
|
-
|
|
24
|
-
|
|
240
|
+
</Screen>
|
|
241
|
+
);
|
|
242
|
+
};
|
|
25
243
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
244
|
+
// Interactive Demo - Forms and interactive elements
|
|
245
|
+
const InteractiveDemoScreen = () => {
|
|
246
|
+
const [switchValue, setSwitchValue] = useState(true);
|
|
247
|
+
const [sliderValue, setSliderValue] = useState(50);
|
|
248
|
+
const [loading, setLoading] = useState(false);
|
|
249
|
+
|
|
250
|
+
const handleAction = () => {
|
|
251
|
+
setLoading(true);
|
|
252
|
+
setTimeout(() => setLoading(false), 2000);
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
return (
|
|
256
|
+
<Screen>
|
|
257
|
+
<View spacing="lg">
|
|
258
|
+
<View spacing="sm">
|
|
259
|
+
<Text size="xl" weight="bold">
|
|
260
|
+
Interactive Demo
|
|
261
|
+
</Text>
|
|
262
|
+
<Text size="md" style={{ opacity: 0.7 }}>
|
|
263
|
+
Try out interactive components
|
|
264
|
+
</Text>
|
|
265
|
+
</View>
|
|
266
|
+
|
|
267
|
+
{/* Switch Control */}
|
|
268
|
+
<Card type="outlined" style={{ marginTop: 16, padding: 16 }}>
|
|
269
|
+
<View spacing="md">
|
|
270
|
+
<View
|
|
271
|
+
style={{
|
|
272
|
+
flexDirection: "row",
|
|
273
|
+
justifyContent: "space-between",
|
|
274
|
+
alignItems: "center",
|
|
275
|
+
}}
|
|
276
|
+
>
|
|
277
|
+
<View spacing="xs" style={{ flex: 1 }}>
|
|
278
|
+
<Text size="md" weight="semibold">
|
|
279
|
+
Enable Notifications
|
|
280
|
+
</Text>
|
|
281
|
+
<Text size="sm" style={{ opacity: 0.7 }}>
|
|
282
|
+
Receive updates and alerts
|
|
283
|
+
</Text>
|
|
284
|
+
</View>
|
|
285
|
+
<Switch checked={switchValue} onCheckedChange={setSwitchValue} />
|
|
286
|
+
</View>
|
|
287
|
+
</View>
|
|
288
|
+
</Card>
|
|
289
|
+
|
|
290
|
+
{/* Slider Control */}
|
|
291
|
+
<Card type="outlined" style={{ marginTop: 16, padding: 16 }}>
|
|
292
|
+
<View spacing="md">
|
|
293
|
+
<View
|
|
294
|
+
style={{
|
|
295
|
+
flexDirection: "row",
|
|
296
|
+
justifyContent: "space-between",
|
|
297
|
+
alignItems: "center",
|
|
298
|
+
}}
|
|
299
|
+
>
|
|
300
|
+
<Text size="md" weight="semibold">
|
|
301
|
+
Volume
|
|
302
|
+
</Text>
|
|
303
|
+
<Badge type="filled" color="blue">
|
|
304
|
+
{sliderValue}%
|
|
305
|
+
</Badge>
|
|
306
|
+
</View>
|
|
307
|
+
<Slider
|
|
308
|
+
value={sliderValue}
|
|
309
|
+
onValueChange={setSliderValue}
|
|
310
|
+
min={0}
|
|
311
|
+
max={100}
|
|
312
|
+
/>
|
|
313
|
+
</View>
|
|
314
|
+
</Card>
|
|
315
|
+
|
|
316
|
+
{/* Action Buttons */}
|
|
317
|
+
<Card type="outlined" style={{ marginTop: 16, padding: 16 }}>
|
|
318
|
+
<View spacing="md">
|
|
319
|
+
<Text size="md" weight="semibold">
|
|
320
|
+
Actions
|
|
321
|
+
</Text>
|
|
322
|
+
<View style={{ flexDirection: "row", gap: 12, flexWrap: "wrap" }}>
|
|
323
|
+
<Button
|
|
324
|
+
type="contained"
|
|
325
|
+
intent="primary"
|
|
326
|
+
leftIcon="rocket"
|
|
327
|
+
onPress={handleAction}
|
|
328
|
+
>
|
|
329
|
+
Launch
|
|
330
|
+
</Button>
|
|
331
|
+
<Button type="outlined" intent="neutral" leftIcon="refresh">
|
|
332
|
+
Refresh
|
|
333
|
+
</Button>
|
|
334
|
+
<Button type="text" intent="error" leftIcon="close">
|
|
335
|
+
Cancel
|
|
336
|
+
</Button>
|
|
337
|
+
</View>
|
|
338
|
+
</View>
|
|
339
|
+
</Card>
|
|
340
|
+
|
|
341
|
+
{/* Status Alerts */}
|
|
342
|
+
<View spacing="sm" style={{ marginTop: 16 }}>
|
|
343
|
+
<Alert
|
|
344
|
+
intent="success"
|
|
345
|
+
title="Success"
|
|
346
|
+
message="Your changes have been saved successfully."
|
|
347
|
+
type="soft"
|
|
348
|
+
/>
|
|
349
|
+
<Alert
|
|
350
|
+
intent="warning"
|
|
351
|
+
title="Warning"
|
|
352
|
+
message="Please review your settings before continuing."
|
|
353
|
+
type="outlined"
|
|
354
|
+
/>
|
|
355
|
+
</View>
|
|
35
356
|
</View>
|
|
36
|
-
</
|
|
37
|
-
|
|
38
|
-
|
|
357
|
+
</Screen>
|
|
358
|
+
);
|
|
359
|
+
};
|
|
360
|
+
|
|
361
|
+
// Theme Showcase - Different variants and intents
|
|
362
|
+
const ThemeShowcaseScreen = () => {
|
|
363
|
+
return (
|
|
364
|
+
<Screen>
|
|
365
|
+
<View spacing="lg">
|
|
366
|
+
<View spacing="sm">
|
|
367
|
+
<Text size="xl" weight="bold">
|
|
368
|
+
Theme Showcase
|
|
369
|
+
</Text>
|
|
370
|
+
<Text size="md" style={{ opacity: 0.7 }}>
|
|
371
|
+
Explore variants and intent colors
|
|
372
|
+
</Text>
|
|
373
|
+
</View>
|
|
39
374
|
|
|
40
|
-
|
|
375
|
+
{/* Card Variants */}
|
|
376
|
+
<View spacing="sm" style={{ marginTop: 16 }}>
|
|
377
|
+
<Text size="lg" weight="semibold">
|
|
378
|
+
Card Variants
|
|
379
|
+
</Text>
|
|
380
|
+
<Card type="default" style={{ padding: 16 }}>
|
|
381
|
+
<Text weight="semibold">Default Card</Text>
|
|
382
|
+
<Text size="sm" style={{ opacity: 0.7 }}>
|
|
383
|
+
Standard card with minimal styling
|
|
384
|
+
</Text>
|
|
385
|
+
</Card>
|
|
386
|
+
<Card type="outlined" style={{ padding: 16 }}>
|
|
387
|
+
<Text weight="semibold">Outlined Card</Text>
|
|
388
|
+
<Text size="sm" style={{ opacity: 0.7 }}>
|
|
389
|
+
Card with visible border
|
|
390
|
+
</Text>
|
|
391
|
+
</Card>
|
|
392
|
+
<Card type="elevated" style={{ padding: 16 }}>
|
|
393
|
+
<Text weight="semibold">Elevated Card</Text>
|
|
394
|
+
<Text size="sm" style={{ opacity: 0.7 }}>
|
|
395
|
+
Card with shadow elevation
|
|
396
|
+
</Text>
|
|
397
|
+
</Card>
|
|
398
|
+
<Card type="filled" style={{ padding: 16 }}>
|
|
399
|
+
<Text weight="semibold">Filled Card</Text>
|
|
400
|
+
<Text size="sm" style={{ opacity: 0.7 }}>
|
|
401
|
+
Card with background fill
|
|
402
|
+
</Text>
|
|
403
|
+
</Card>
|
|
404
|
+
</View>
|
|
405
|
+
|
|
406
|
+
{/* Intent Colors */}
|
|
407
|
+
<View spacing="sm" style={{ marginTop: 16 }}>
|
|
408
|
+
<Text size="lg" weight="semibold">
|
|
409
|
+
Intent Colors
|
|
410
|
+
</Text>
|
|
411
|
+
<View style={{ gap: 12 }}>
|
|
412
|
+
<Button type="contained" intent="primary">
|
|
413
|
+
Primary Intent
|
|
414
|
+
</Button>
|
|
415
|
+
<Button type="contained" intent="neutral">
|
|
416
|
+
Neutral Intent
|
|
417
|
+
</Button>
|
|
418
|
+
<Button type="contained" intent="success">
|
|
419
|
+
Success Intent
|
|
420
|
+
</Button>
|
|
421
|
+
<Button type="contained" intent="warning">
|
|
422
|
+
Warning Intent
|
|
423
|
+
</Button>
|
|
424
|
+
<Button type="contained" intent="error">
|
|
425
|
+
Error Intent
|
|
426
|
+
</Button>
|
|
427
|
+
</View>
|
|
428
|
+
</View>
|
|
429
|
+
|
|
430
|
+
{/* Progress Indicators */}
|
|
431
|
+
<Card type="outlined" style={{ marginTop: 16, padding: 16 }}>
|
|
432
|
+
<View spacing="md">
|
|
433
|
+
<Text size="lg" weight="semibold">
|
|
434
|
+
Progress Indicators
|
|
435
|
+
</Text>
|
|
436
|
+
<View spacing="sm">
|
|
437
|
+
<Progress value={80} variant="linear" intent="primary" showLabel />
|
|
438
|
+
<Progress value={60} variant="linear" intent="success" showLabel />
|
|
439
|
+
<Progress value={40} variant="linear" intent="warning" showLabel />
|
|
440
|
+
<Progress value={20} variant="linear" intent="error" showLabel />
|
|
441
|
+
</View>
|
|
442
|
+
</View>
|
|
443
|
+
</Card>
|
|
444
|
+
</View>
|
|
445
|
+
</Screen>
|
|
446
|
+
);
|
|
447
|
+
};
|
|
448
|
+
|
|
449
|
+
// API Integration - HelloWorld component showcase
|
|
450
|
+
const APIIntegrationScreen = () => (
|
|
41
451
|
<Screen>
|
|
42
452
|
<View spacing="lg">
|
|
43
|
-
<
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
453
|
+
<View spacing="sm">
|
|
454
|
+
<Text size="xl" weight="bold">
|
|
455
|
+
API Integration
|
|
456
|
+
</Text>
|
|
457
|
+
<Text size="md" style={{ opacity: 0.7 }}>
|
|
458
|
+
RPC communication example
|
|
48
459
|
</Text>
|
|
49
460
|
</View>
|
|
461
|
+
|
|
462
|
+
<Card type="outlined" style={{ marginTop: 16, padding: 16 }}>
|
|
463
|
+
<View spacing="md">
|
|
464
|
+
<View style={{ flexDirection: "row", alignItems: "center", gap: 8 }}>
|
|
465
|
+
<Icon name="api" size="md" />
|
|
466
|
+
<Text size="lg" weight="semibold">
|
|
467
|
+
Server Communication
|
|
468
|
+
</Text>
|
|
469
|
+
</View>
|
|
470
|
+
<Text size="sm" style={{ opacity: 0.7 }}>
|
|
471
|
+
This component demonstrates RPC integration between the client and server.
|
|
472
|
+
</Text>
|
|
473
|
+
</View>
|
|
474
|
+
</Card>
|
|
475
|
+
|
|
476
|
+
<HelloWorld name="Idealyst Framework" />
|
|
477
|
+
|
|
478
|
+
<Alert
|
|
479
|
+
intent="info"
|
|
480
|
+
title="How it works"
|
|
481
|
+
message="The HelloWorld component uses RPC to communicate with the backend server, showcasing the framework's built-in API integration capabilities."
|
|
482
|
+
type="soft"
|
|
483
|
+
style={{ marginTop: 16 }}
|
|
484
|
+
/>
|
|
50
485
|
</View>
|
|
51
486
|
</Screen>
|
|
52
487
|
);
|
|
53
488
|
|
|
54
489
|
const AppRouter: NavigatorParam = {
|
|
55
|
-
type:
|
|
56
|
-
path:
|
|
57
|
-
layout:
|
|
490
|
+
type: "navigator",
|
|
491
|
+
path: "/",
|
|
492
|
+
layout: "drawer",
|
|
58
493
|
routes: [
|
|
59
494
|
{
|
|
60
|
-
type:
|
|
61
|
-
path:
|
|
62
|
-
component:
|
|
495
|
+
type: "screen",
|
|
496
|
+
path: "/",
|
|
497
|
+
component: DashboardScreen,
|
|
498
|
+
options: {
|
|
499
|
+
title: "Dashboard",
|
|
500
|
+
tabBarLabel: "Dashboard",
|
|
501
|
+
tabBarIcon: ({ focused }: { focused: boolean }) => (
|
|
502
|
+
<Icon
|
|
503
|
+
name="view-dashboard"
|
|
504
|
+
color={focused ? "blue" : "gray"}
|
|
505
|
+
size="md"
|
|
506
|
+
/>
|
|
507
|
+
),
|
|
508
|
+
},
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
type: "screen",
|
|
512
|
+
path: "/gallery",
|
|
513
|
+
component: ComponentGalleryScreen,
|
|
514
|
+
options: {
|
|
515
|
+
title: "Component Gallery",
|
|
516
|
+
tabBarLabel: "Gallery",
|
|
517
|
+
tabBarIcon: ({ focused }: { focused: boolean }) => (
|
|
518
|
+
<Icon name="toy-brick" color={focused ? "blue" : "gray"} size="md" />
|
|
519
|
+
),
|
|
520
|
+
},
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
type: "screen",
|
|
524
|
+
path: "/interactive",
|
|
525
|
+
component: InteractiveDemoScreen,
|
|
63
526
|
options: {
|
|
64
|
-
title:
|
|
65
|
-
tabBarLabel:
|
|
66
|
-
tabBarIcon: ({ focused
|
|
67
|
-
<Icon
|
|
527
|
+
title: "Interactive Demo",
|
|
528
|
+
tabBarLabel: "Interactive",
|
|
529
|
+
tabBarIcon: ({ focused }: { focused: boolean }) => (
|
|
530
|
+
<Icon
|
|
531
|
+
name="gesture-tap"
|
|
532
|
+
color={focused ? "blue" : "gray"}
|
|
533
|
+
size="md"
|
|
534
|
+
/>
|
|
68
535
|
),
|
|
69
536
|
},
|
|
70
537
|
},
|
|
71
538
|
{
|
|
72
|
-
type:
|
|
73
|
-
path:
|
|
74
|
-
component:
|
|
539
|
+
type: "screen",
|
|
540
|
+
path: "/theme",
|
|
541
|
+
component: ThemeShowcaseScreen,
|
|
75
542
|
options: {
|
|
76
|
-
title:
|
|
77
|
-
tabBarLabel:
|
|
78
|
-
tabBarIcon: ({ focused
|
|
79
|
-
<Icon name="
|
|
543
|
+
title: "Theme Showcase",
|
|
544
|
+
tabBarLabel: "Themes",
|
|
545
|
+
tabBarIcon: ({ focused }: { focused: boolean }) => (
|
|
546
|
+
<Icon name="palette" color={focused ? "blue" : "gray"} size="md" />
|
|
80
547
|
),
|
|
81
548
|
},
|
|
82
549
|
},
|
|
83
550
|
{
|
|
84
|
-
type:
|
|
85
|
-
path:
|
|
86
|
-
component:
|
|
551
|
+
type: "screen",
|
|
552
|
+
path: "/api",
|
|
553
|
+
component: APIIntegrationScreen,
|
|
87
554
|
options: {
|
|
88
|
-
title:
|
|
89
|
-
tabBarLabel:
|
|
90
|
-
tabBarIcon: ({ focused
|
|
91
|
-
<Icon name="
|
|
555
|
+
title: "API Integration",
|
|
556
|
+
tabBarLabel: "API",
|
|
557
|
+
tabBarIcon: ({ focused }: { focused: boolean }) => (
|
|
558
|
+
<Icon name="api" color={focused ? "blue" : "gray"} size="md" />
|
|
92
559
|
),
|
|
93
560
|
},
|
|
94
561
|
},
|
|
95
562
|
],
|
|
96
563
|
};
|
|
97
564
|
|
|
98
|
-
export default AppRouter;
|
|
565
|
+
export default AppRouter;
|
|
@@ -27,6 +27,9 @@
|
|
|
27
27
|
"@babel/preset-env": "^7.28.0",
|
|
28
28
|
"@babel/preset-react": "^7.27.1",
|
|
29
29
|
"@babel/preset-typescript": "^7.27.1",
|
|
30
|
+
"@idealyst/mcp-server": "^{{idealystVersion}}",
|
|
31
|
+
"@mobilenext/mobile-mcp": "^0.2.0",
|
|
32
|
+
"@playwright/mcp": "^0.2.1",
|
|
30
33
|
"@types/jest": "^29.5.12",
|
|
31
34
|
"jest": "^29.7.0",
|
|
32
35
|
"ts-jest": "^29.1.2",
|