@opengeni/react-native 1.4.5-canary.37615713321001
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/LICENSE +190 -0
- package/README.md +74 -0
- package/dist/adapters.d.ts +53 -0
- package/dist/adapters.js +3 -0
- package/dist/adapters.js.map +1 -0
- package/dist/attachments.d.ts +75 -0
- package/dist/chunk-3VSZAQ7G.js +391 -0
- package/dist/chunk-3VSZAQ7G.js.map +1 -0
- package/dist/chunk-5ZVK7WKA.js +88 -0
- package/dist/chunk-5ZVK7WKA.js.map +1 -0
- package/dist/chunk-EEDIMY3L.js +240 -0
- package/dist/chunk-EEDIMY3L.js.map +1 -0
- package/dist/chunk-M23SDI4R.js +83 -0
- package/dist/chunk-M23SDI4R.js.map +1 -0
- package/dist/chunk-PHJBSAR3.js +2006 -0
- package/dist/chunk-PHJBSAR3.js.map +1 -0
- package/dist/environment.d.ts +19 -0
- package/dist/expo.d.ts +25 -0
- package/dist/expo.js +267 -0
- package/dist/expo.js.map +1 -0
- package/dist/index.d.ts +13 -0
- package/dist/index.js +3345 -0
- package/dist/index.js.map +1 -0
- package/dist/presentation.d.ts +262 -0
- package/dist/read-acknowledgement.d.ts +39 -0
- package/dist/realtime/call-events.d.ts +11 -0
- package/dist/realtime/call-view.d.ts +26 -0
- package/dist/realtime/expo-call.d.ts +11 -0
- package/dist/realtime/native-call.d.ts +104 -0
- package/dist/realtime/native-realtime.d.ts +35 -0
- package/dist/realtime/use-native-session-realtime.d.ts +25 -0
- package/dist/session-view.d.ts +87 -0
- package/dist/timeline/activity.d.ts +34 -0
- package/dist/timeline/composer.d.ts +86 -0
- package/dist/timeline/controls.d.ts +27 -0
- package/dist/timeline/decisions.d.ts +29 -0
- package/dist/timeline/feedback.d.ts +26 -0
- package/dist/timeline/icon-nodes.generated.d.ts +738 -0
- package/dist/timeline/icon.d.ts +11 -0
- package/dist/timeline/index.d.ts +32 -0
- package/dist/timeline/index.js +5419 -0
- package/dist/timeline/index.js.map +1 -0
- package/dist/timeline/markdown.d.ts +11 -0
- package/dist/timeline/markdown.js +415 -0
- package/dist/timeline/markdown.js.map +1 -0
- package/dist/timeline/message-attachments.d.ts +13 -0
- package/dist/timeline/message-timeline.d.ts +36 -0
- package/dist/timeline/model-picker.d.ts +17 -0
- package/dist/timeline/primitives.d.ts +85 -0
- package/dist/timeline/queue-dock.d.ts +19 -0
- package/dist/timeline/session-actions.d.ts +34 -0
- package/dist/timeline/session-list.d.ts +50 -0
- package/dist/timeline/session-screen.d.ts +35 -0
- package/dist/timeline/session-signals.d.ts +37 -0
- package/dist/timeline/sheet.d.ts +14 -0
- package/dist/timeline/theme.d.ts +58 -0
- package/dist/timeline/thinking-orb.d.ts +13 -0
- package/dist/timeline/turn.d.ts +80 -0
- package/dist/ui/attention.d.ts +14 -0
- package/dist/ui/cards.d.ts +21 -0
- package/dist/ui/composer.d.ts +21 -0
- package/dist/ui/format.d.ts +13 -0
- package/dist/ui/icons.d.ts +9 -0
- package/dist/ui/index.d.ts +12 -0
- package/dist/ui/index.js +1757 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/steps-sheet.d.ts +10 -0
- package/dist/ui/theme.d.ts +63 -0
- package/dist/ui/timeline.d.ts +48 -0
- package/dist/ui/web-tokens.gen.d.ts +90 -0
- package/dist/use-native-session.d.ts +40 -0
- package/dist/view-model.d.ts +52 -0
- package/dist/voice-input.d.ts +102 -0
- package/dist/webrtc.d.ts +9 -0
- package/dist/webrtc.js +19 -0
- package/dist/webrtc.js.map +1 -0
- package/expo-module.config.json +7 -0
- package/ios/OpenGeniCall.podspec +22 -0
- package/ios/OpenGeniCallAppDelegateSubscriber.swift +29 -0
- package/ios/OpenGeniCallCenter.swift +189 -0
- package/ios/OpenGeniCallModule.swift +64 -0
- package/package.json +93 -0
- package/src/adapters.ts +150 -0
- package/src/attachments.ts +396 -0
- package/src/environment.tsx +214 -0
- package/src/expo.ts +295 -0
- package/src/index.ts +98 -0
- package/src/presentation.ts +285 -0
- package/src/read-acknowledgement.ts +72 -0
- package/src/realtime/call-events.ts +41 -0
- package/src/realtime/call-view.tsx +220 -0
- package/src/realtime/expo-call.ts +49 -0
- package/src/realtime/native-call.ts +266 -0
- package/src/realtime/native-realtime.ts +115 -0
- package/src/realtime/use-native-session-realtime.ts +29 -0
- package/src/session-view.tsx +2251 -0
- package/src/timeline/activity.tsx +736 -0
- package/src/timeline/composer.tsx +686 -0
- package/src/timeline/controls.tsx +151 -0
- package/src/timeline/decisions.tsx +651 -0
- package/src/timeline/feedback.tsx +251 -0
- package/src/timeline/icon-nodes.generated.ts +1830 -0
- package/src/timeline/icon.tsx +44 -0
- package/src/timeline/index.ts +67 -0
- package/src/timeline/markdown.tsx +510 -0
- package/src/timeline/message-attachments.tsx +155 -0
- package/src/timeline/message-timeline.tsx +1042 -0
- package/src/timeline/model-picker.tsx +450 -0
- package/src/timeline/primitives.tsx +561 -0
- package/src/timeline/queue-dock.tsx +331 -0
- package/src/timeline/session-actions.tsx +379 -0
- package/src/timeline/session-list.tsx +338 -0
- package/src/timeline/session-screen.tsx +488 -0
- package/src/timeline/session-signals.tsx +312 -0
- package/src/timeline/sheet.tsx +153 -0
- package/src/timeline/theme.tsx +128 -0
- package/src/timeline/thinking-orb.tsx +93 -0
- package/src/timeline/turn.tsx +569 -0
- package/src/ui/attention.tsx +220 -0
- package/src/ui/cards.tsx +267 -0
- package/src/ui/composer.tsx +296 -0
- package/src/ui/format.ts +86 -0
- package/src/ui/icons.tsx +131 -0
- package/src/ui/index.ts +18 -0
- package/src/ui/steps-sheet.tsx +71 -0
- package/src/ui/theme.ts +261 -0
- package/src/ui/timeline.tsx +837 -0
- package/src/ui/web-tokens.gen.ts +94 -0
- package/src/use-native-session.ts +219 -0
- package/src/view-model.ts +485 -0
- package/src/voice-input.ts +382 -0
- package/src/webrtc.ts +30 -0
package/src/ui/theme.ts
ADDED
|
@@ -0,0 +1,261 @@
|
|
|
1
|
+
// Design tokens for the native agent surfaces. A host picks a direction and a color scheme,
|
|
2
|
+
// and may override any token (brand accent, typography) without forking components.
|
|
3
|
+
|
|
4
|
+
export type ActivityStyle = "fold" | "rail" | "cards";
|
|
5
|
+
export type ComposerStyle = "pill" | "bar" | "voice";
|
|
6
|
+
export type UserMessageStyle = "bubble" | "plain";
|
|
7
|
+
|
|
8
|
+
export interface AgentTheme {
|
|
9
|
+
id: string;
|
|
10
|
+
scheme: "light" | "dark";
|
|
11
|
+
colors: {
|
|
12
|
+
background: string;
|
|
13
|
+
surface: string;
|
|
14
|
+
surfaceRaised: string;
|
|
15
|
+
border: string;
|
|
16
|
+
text: string;
|
|
17
|
+
textMuted: string;
|
|
18
|
+
textFaint: string;
|
|
19
|
+
accent: string;
|
|
20
|
+
onAccent: string;
|
|
21
|
+
userBubble: string;
|
|
22
|
+
onUserBubble: string;
|
|
23
|
+
attention: string;
|
|
24
|
+
attentionSurface: string;
|
|
25
|
+
success: string;
|
|
26
|
+
danger: string;
|
|
27
|
+
dangerSurface: string;
|
|
28
|
+
codeBackground: string;
|
|
29
|
+
rail: string;
|
|
30
|
+
};
|
|
31
|
+
type: {
|
|
32
|
+
body: number;
|
|
33
|
+
bodyLine: number;
|
|
34
|
+
small: number;
|
|
35
|
+
smallLine: number;
|
|
36
|
+
title: number;
|
|
37
|
+
mono: string;
|
|
38
|
+
weightStrong: "600" | "700";
|
|
39
|
+
};
|
|
40
|
+
radius: { bubble: number; card: number; composer: number; control: number };
|
|
41
|
+
space: { gutter: number; row: number; turn: number };
|
|
42
|
+
layout: {
|
|
43
|
+
activity: ActivityStyle;
|
|
44
|
+
composer: ComposerStyle;
|
|
45
|
+
userMessage: UserMessageStyle;
|
|
46
|
+
/** Minimum interactive size in points. */
|
|
47
|
+
target: number;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export type AgentDirectionId = "calm" | "workbench" | "field";
|
|
52
|
+
|
|
53
|
+
export interface AgentDirection {
|
|
54
|
+
id: AgentDirectionId;
|
|
55
|
+
name: string;
|
|
56
|
+
summary: string;
|
|
57
|
+
theme(scheme: "light" | "dark"): AgentTheme;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
const mono = "Menlo";
|
|
61
|
+
|
|
62
|
+
/** Quiet conversation: prose answers, soft user bubbles, work folded to one line. */
|
|
63
|
+
const calm: AgentDirection = {
|
|
64
|
+
id: "calm",
|
|
65
|
+
name: "Calm",
|
|
66
|
+
summary: "Prose-first conversation; agent work folds into one quiet line.",
|
|
67
|
+
theme: (scheme) => ({
|
|
68
|
+
id: "calm",
|
|
69
|
+
scheme,
|
|
70
|
+
colors:
|
|
71
|
+
scheme === "light"
|
|
72
|
+
? {
|
|
73
|
+
background: "#FFFFFF",
|
|
74
|
+
surface: "#F6F6F4",
|
|
75
|
+
surfaceRaised: "#FFFFFF",
|
|
76
|
+
border: "#E7E6E2",
|
|
77
|
+
text: "#1A1A19",
|
|
78
|
+
textMuted: "#6B6A66",
|
|
79
|
+
textFaint: "#A3A19C",
|
|
80
|
+
accent: "#1A1A19",
|
|
81
|
+
onAccent: "#FFFFFF",
|
|
82
|
+
userBubble: "#F0EFEC",
|
|
83
|
+
onUserBubble: "#1A1A19",
|
|
84
|
+
attention: "#C2410C",
|
|
85
|
+
attentionSurface: "#FFF4ED",
|
|
86
|
+
success: "#15803D",
|
|
87
|
+
danger: "#B42318",
|
|
88
|
+
dangerSurface: "#FEF3F2",
|
|
89
|
+
codeBackground: "#F6F6F4",
|
|
90
|
+
rail: "#E7E6E2",
|
|
91
|
+
}
|
|
92
|
+
: {
|
|
93
|
+
background: "#161615",
|
|
94
|
+
surface: "#21211F",
|
|
95
|
+
surfaceRaised: "#2A2A28",
|
|
96
|
+
border: "#33332F",
|
|
97
|
+
text: "#F2F1EE",
|
|
98
|
+
textMuted: "#A3A19C",
|
|
99
|
+
textFaint: "#6B6A66",
|
|
100
|
+
accent: "#F2F1EE",
|
|
101
|
+
onAccent: "#161615",
|
|
102
|
+
userBubble: "#2A2A28",
|
|
103
|
+
onUserBubble: "#F2F1EE",
|
|
104
|
+
attention: "#FB923C",
|
|
105
|
+
attentionSurface: "#2B1D14",
|
|
106
|
+
success: "#4ADE80",
|
|
107
|
+
danger: "#F97066",
|
|
108
|
+
dangerSurface: "#2D1715",
|
|
109
|
+
codeBackground: "#21211F",
|
|
110
|
+
rail: "#33332F",
|
|
111
|
+
},
|
|
112
|
+
type: {
|
|
113
|
+
body: 16,
|
|
114
|
+
bodyLine: 24,
|
|
115
|
+
small: 13,
|
|
116
|
+
smallLine: 18,
|
|
117
|
+
title: 20,
|
|
118
|
+
mono,
|
|
119
|
+
weightStrong: "600",
|
|
120
|
+
},
|
|
121
|
+
radius: { bubble: 20, card: 16, composer: 26, control: 18 },
|
|
122
|
+
space: { gutter: 20, row: 10, turn: 28 },
|
|
123
|
+
layout: { activity: "fold", composer: "pill", userMessage: "bubble", target: 44 },
|
|
124
|
+
}),
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
/** Technical: visible step rail, monospace detail, dense and inspectable. */
|
|
128
|
+
const workbench: AgentDirection = {
|
|
129
|
+
id: "workbench",
|
|
130
|
+
name: "Workbench",
|
|
131
|
+
summary: "Every step on a visible rail; dense, inspectable, built for long agent runs.",
|
|
132
|
+
theme: (scheme) => ({
|
|
133
|
+
id: "workbench",
|
|
134
|
+
scheme,
|
|
135
|
+
colors:
|
|
136
|
+
scheme === "light"
|
|
137
|
+
? {
|
|
138
|
+
background: "#FBFBFC",
|
|
139
|
+
surface: "#F1F2F5",
|
|
140
|
+
surfaceRaised: "#FFFFFF",
|
|
141
|
+
border: "#E2E4EA",
|
|
142
|
+
text: "#0F1115",
|
|
143
|
+
textMuted: "#5B6170",
|
|
144
|
+
textFaint: "#9AA0AD",
|
|
145
|
+
accent: "#3B5BDB",
|
|
146
|
+
onAccent: "#FFFFFF",
|
|
147
|
+
userBubble: "#3B5BDB",
|
|
148
|
+
onUserBubble: "#FFFFFF",
|
|
149
|
+
attention: "#D97706",
|
|
150
|
+
attentionSurface: "#FFF8EB",
|
|
151
|
+
success: "#12B76A",
|
|
152
|
+
danger: "#E5484D",
|
|
153
|
+
dangerSurface: "#FFF0F0",
|
|
154
|
+
codeBackground: "#F1F2F5",
|
|
155
|
+
rail: "#D5D8E0",
|
|
156
|
+
}
|
|
157
|
+
: {
|
|
158
|
+
background: "#0D0F13",
|
|
159
|
+
surface: "#161920",
|
|
160
|
+
surfaceRaised: "#1C2029",
|
|
161
|
+
border: "#262A35",
|
|
162
|
+
text: "#E8EAF0",
|
|
163
|
+
textMuted: "#9AA0AD",
|
|
164
|
+
textFaint: "#5B6170",
|
|
165
|
+
accent: "#7C93FF",
|
|
166
|
+
onAccent: "#0D0F13",
|
|
167
|
+
userBubble: "#2A3566",
|
|
168
|
+
onUserBubble: "#E8EAF0",
|
|
169
|
+
attention: "#FBBF24",
|
|
170
|
+
attentionSurface: "#2A2110",
|
|
171
|
+
success: "#3DD68C",
|
|
172
|
+
danger: "#FF6369",
|
|
173
|
+
dangerSurface: "#2A1416",
|
|
174
|
+
codeBackground: "#161920",
|
|
175
|
+
rail: "#2E3340",
|
|
176
|
+
},
|
|
177
|
+
type: {
|
|
178
|
+
body: 15,
|
|
179
|
+
bodyLine: 22,
|
|
180
|
+
small: 12,
|
|
181
|
+
smallLine: 16,
|
|
182
|
+
title: 18,
|
|
183
|
+
mono,
|
|
184
|
+
weightStrong: "600",
|
|
185
|
+
},
|
|
186
|
+
radius: { bubble: 14, card: 12, composer: 14, control: 10 },
|
|
187
|
+
space: { gutter: 16, row: 8, turn: 22 },
|
|
188
|
+
layout: { activity: "rail", composer: "bar", userMessage: "bubble", target: 44 },
|
|
189
|
+
}),
|
|
190
|
+
};
|
|
191
|
+
|
|
192
|
+
/** Field: big type and targets, decisions as bold cards, voice-first composer. */
|
|
193
|
+
const field: AgentDirection = {
|
|
194
|
+
id: "field",
|
|
195
|
+
name: "Field",
|
|
196
|
+
summary: "Large type and targets, decisions as bold cards, voice-first. Usable with gloves.",
|
|
197
|
+
theme: (scheme) => ({
|
|
198
|
+
id: "field",
|
|
199
|
+
scheme,
|
|
200
|
+
colors:
|
|
201
|
+
scheme === "light"
|
|
202
|
+
? {
|
|
203
|
+
background: "#F4F3EF",
|
|
204
|
+
surface: "#FFFFFF",
|
|
205
|
+
surfaceRaised: "#FFFFFF",
|
|
206
|
+
border: "#E3E1DA",
|
|
207
|
+
text: "#121212",
|
|
208
|
+
textMuted: "#5C5A55",
|
|
209
|
+
textFaint: "#97948C",
|
|
210
|
+
accent: "#1F5FD6",
|
|
211
|
+
onAccent: "#FFFFFF",
|
|
212
|
+
userBubble: "#121212",
|
|
213
|
+
onUserBubble: "#FFFFFF",
|
|
214
|
+
attention: "#E8590C",
|
|
215
|
+
attentionSurface: "#FFF1E6",
|
|
216
|
+
success: "#2F9E44",
|
|
217
|
+
danger: "#C92A2A",
|
|
218
|
+
dangerSurface: "#FFF0F0",
|
|
219
|
+
codeBackground: "#EFEDE7",
|
|
220
|
+
rail: "#E3E1DA",
|
|
221
|
+
}
|
|
222
|
+
: {
|
|
223
|
+
background: "#111110",
|
|
224
|
+
surface: "#1D1C1A",
|
|
225
|
+
surfaceRaised: "#252421",
|
|
226
|
+
border: "#302E2A",
|
|
227
|
+
text: "#F5F4F0",
|
|
228
|
+
textMuted: "#B1AEA6",
|
|
229
|
+
textFaint: "#77746D",
|
|
230
|
+
accent: "#5C8DF6",
|
|
231
|
+
onAccent: "#0B0B0A",
|
|
232
|
+
userBubble: "#F5F4F0",
|
|
233
|
+
onUserBubble: "#111110",
|
|
234
|
+
attention: "#FF8A3D",
|
|
235
|
+
attentionSurface: "#2E1F13",
|
|
236
|
+
success: "#51CF66",
|
|
237
|
+
danger: "#FF6B6B",
|
|
238
|
+
dangerSurface: "#2E1616",
|
|
239
|
+
codeBackground: "#1D1C1A",
|
|
240
|
+
rail: "#302E2A",
|
|
241
|
+
},
|
|
242
|
+
type: {
|
|
243
|
+
body: 18,
|
|
244
|
+
bodyLine: 27,
|
|
245
|
+
small: 15,
|
|
246
|
+
smallLine: 20,
|
|
247
|
+
title: 23,
|
|
248
|
+
mono,
|
|
249
|
+
weightStrong: "700",
|
|
250
|
+
},
|
|
251
|
+
radius: { bubble: 22, card: 20, composer: 30, control: 22 },
|
|
252
|
+
space: { gutter: 18, row: 12, turn: 30 },
|
|
253
|
+
layout: { activity: "cards", composer: "voice", userMessage: "bubble", target: 56 },
|
|
254
|
+
}),
|
|
255
|
+
};
|
|
256
|
+
|
|
257
|
+
export const agentDirections: readonly AgentDirection[] = [calm, workbench, field];
|
|
258
|
+
|
|
259
|
+
export function agentTheme(direction: AgentDirectionId, scheme: "light" | "dark"): AgentTheme {
|
|
260
|
+
return (agentDirections.find((entry) => entry.id === direction) ?? calm).theme(scheme);
|
|
261
|
+
}
|