@@ -64,18 +64,17 @@ export class ChatComponent {
6464
6565This creates a smooth streaming experience! ✨` ,
6666
67- table : `Here's a comparison **table** of mobile frameworks :
67+ table : `Here's a comparison **table**:
6868
69- | Framework | Language | Performance | Learning Curve |
69+ | Staying In | Going Out | Outdoors | Habits |
7070|-----------|----------|-------------|----------------|
71- | NativeScript | TypeScript | ⚡ Native | Medium |
72- | React Native | JavaScript | 🔥 Good | Medium |
73- | Flutter | Dart | ⚡ Native | Higher |
74- | Ionic | TypeScript | 📱 WebView | Lower |
71+ | Energy level | Low | Medium | Medium |
72+ | Main feature | Comfort | Variety | Medium |
73+ | Snacks | Popcorn | Spontaneous | Higher |
7574
7675### Key Takeaways:
7776- **NativeScript** provides true native UI
78- - Direct access to iOS/Android APIs
77+ - Direct access to native platform APIs
7978- Use Angular, Vue, Solid, React, or Svelte!` ,
8079
8180 math : `Let me show you some **mathematical expressions**:
@@ -97,11 +96,11 @@ Pretty cool, right? 🧮`,
9796
9897 hello : `# Hello! 👋
9998
100- Nice to meet you! I'm running **natively on iOS ** through NativeScript.
99+ Nice to meet you! I'm running **natively** through NativeScript.
101100
102101## What makes this special?
103102
104- > Unlike web-based solutions, every element you see is a *real* native iOS view.
103+ > Every element you see is a *real* native platform view.
105104
106105### Benefits:
107106- ⚡ Native performance
@@ -115,9 +114,9 @@ Use the **⋯** menu to explore more demos!`,
115114@Component ( {
116115 selector : 'ChatDemo' ,
117116 template : `
118- <GridLayout rows="auto, *, auto" class="bg-slate-100">
117+ <GridLayout rows="auto, *, auto" class="bg-slate-100 dark:bg-slate-900 ">
119118 <!-- Native ActionBar -->
120- <ActionBar flat="true" class="bg-slate-50" title="AI Chat">
119+ <ActionBar flat="true" class="bg-slate-50 dark:bg-slate-900 " title="AI Chat">
121120 <NavigationButton text="" android.systemIcon="ic_menu_back" (tap)="goBack()"></NavigationButton>
122121 <ActionItem ios.position="right" (tap)="clearChat()">
123122 <Image src="sys://trash" class="w-5 h-5 text-red-500"></Image>
@@ -131,7 +130,7 @@ Use the **⋯** menu to explore more demos!`,
131130 <!-- User message -->
132131 @if (message.role === 'user') {
133132 <GridLayout columns="*, auto" class="mb-3">
134- <StackLayout col="1" class="bg-blue-600 rounded-2xl rounded-br-sm py-2 px-3 max-w-[280]">
133+ <StackLayout col="1" class="bg-blue-600 dark:bg-blue-700 rounded-2xl rounded-br-sm py-2 px-3 max-w-[280]">
135134 <Label [text]="message.content" class="text-white text-sm leading-[3]" textWrap="true"></Label>
136135 </StackLayout>
137136 </GridLayout>
@@ -141,12 +140,12 @@ Use the **⋯** menu to explore more demos!`,
141140 @if (message.role === 'assistant') {
142141 <GridLayout columns="32, *" class="mb-3">
143142 <!-- Avatar - using GridLayout for vertical centering -->
144- <GridLayout col="0" rows="32" columns="32" class="bg-purple-600 rounded-full mr-2 h-[32] w-[32]">
143+ <GridLayout col="0" rows="32" columns="32" class="bg-purple-600 dark:bg-purple-700 rounded-full mr-2 h-[32] w-[32]">
145144 <Label text="AI" class="text-white text-xs font-bold text-center"></Label>
146145 </GridLayout>
147146
148147 <!-- Message bubble -->
149- <StackLayout col="1" class="bg-white rounded-2xl rounded-tl-sm py-2 px-3 shadow-sm">
148+ <StackLayout col="1" class="bg-white dark:bg-slate-800 rounded-2xl rounded-tl-sm py-2 px-3 shadow-sm">
150149 <Streamdown [content]="message.content" [config]="getMessageConfig(message)"></Streamdown>
151150 </StackLayout>
152151 </GridLayout>
@@ -156,22 +155,22 @@ Use the **⋯** menu to explore more demos!`,
156155 <!-- Typing indicator -->
157156 @if (isTyping()) {
158157 <GridLayout columns="32, auto" class="mb-3">
159- <GridLayout col="0" rows="32" columns="32" class="bg-purple-600 rounded-full mr-2 h-[32] w-[32]">
158+ <GridLayout col="0" rows="32" columns="32" class="bg-purple-600 dark:bg-purple-700 rounded-full mr-2 h-[32] w-[32]">
160159 <Label text="AI" class="text-white text-xs font-bold text-center"></Label>
161160 </GridLayout>
162- <StackLayout col="1" class="bg-white rounded-2xl py-2 px-3 shadow-sm">
163- <Label text="•••" class="text-slate-400 text-base"></Label>
161+ <StackLayout col="1" class="bg-white dark:bg-slate-800 rounded-2xl py-2 px-3 shadow-sm">
162+ <Label text="•••" class="text-slate-400 dark:text-slate-500 text-base"></Label>
164163 </StackLayout>
165164 </GridLayout>
166165 }
167166 </StackLayout>
168167 </ScrollView>
169168
170169 <!-- Bottom menu bar -->
171- <GridLayout row="2" columns="*, auto" class="bg-white px-4 py-3 border-t border-slate-200">
172- <Label col="0" text="Tap menu to explore demos" class="text-xs text-slate-400"></Label>
173- <StackLayout col="1" #menuAnchor class="bg-slate-100 rounded-lg px-3 py-2" (tap)="showOptionsMenu($event)">
174- <Label text="⋯ Options" class="text-sm text-slate-600 font-medium"></Label>
170+ <GridLayout row="2" columns="*, auto" class="bg-white dark:bg-slate-800 px-4 py-3 border-t border-slate-200 dark:border-slate-700 ">
171+ <Label col="0" text="Tap menu to explore demos" class="text-xs text-slate-400 dark:text-slate-500 "></Label>
172+ <StackLayout col="1" #menuAnchor class="bg-slate-100 dark:bg-slate-700 rounded-lg px-3 py-2" (tap)="showOptionsMenu($event)">
173+ <Label text="⋯ Options" class="text-sm text-slate-600 dark:text-slate-300 font-medium"></Label>
175174 </StackLayout>
176175 </GridLayout>
177176 </GridLayout>
0 commit comments