@ateam-ai-mobile/ui 0.1.4 → 0.1.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.
- package/dist/index.js +376 -309
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +342 -275
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/chat/MessageBubble.tsx +11 -1
- package/src/chat/QuestionChips.tsx +76 -0
- package/src/chat/UIActionsRow.tsx +7 -1
package/dist/index.js
CHANGED
|
@@ -60,14 +60,14 @@ module.exports = __toCommonJS(index_exports);
|
|
|
60
60
|
|
|
61
61
|
// src/AdasChatScreen.tsx
|
|
62
62
|
var import_react9 = require("react");
|
|
63
|
-
var
|
|
64
|
-
var
|
|
63
|
+
var import_react_native12 = require("react-native");
|
|
64
|
+
var import_core13 = require("@ateam-ai-mobile/core");
|
|
65
65
|
|
|
66
66
|
// src/chat/MessageBubble.tsx
|
|
67
67
|
var import_react7 = require("react");
|
|
68
|
-
var
|
|
68
|
+
var import_react_native8 = require("react-native");
|
|
69
69
|
var import_react_native_markdown_display = __toESM(require("react-native-markdown-display"));
|
|
70
|
-
var
|
|
70
|
+
var import_core10 = require("@ateam-ai-mobile/core");
|
|
71
71
|
var import_plugin_runtime6 = require("@ateam-ai-mobile/plugin-runtime");
|
|
72
72
|
|
|
73
73
|
// src/chat/JobProgressBar.tsx
|
|
@@ -959,7 +959,8 @@ function UIActionsRow({ actions }) {
|
|
|
959
959
|
const focus = a.payload?.id || a.payload?.entity_id || a.payload?.focusId;
|
|
960
960
|
const surface = import_plugin_runtime5.useSurfaceStore.getState().manifests[id];
|
|
961
961
|
if (surface) {
|
|
962
|
-
|
|
962
|
+
const props = { ...focus ? { focus } : {}, ...a.payload?.data || {} };
|
|
963
|
+
import_plugin_runtime5.useSurfaceStore.getState().show(id, Object.keys(props).length ? props : void 0);
|
|
963
964
|
return;
|
|
964
965
|
}
|
|
965
966
|
const params = {};
|
|
@@ -1034,47 +1035,107 @@ var styles4 = import_react_native5.StyleSheet.create({
|
|
|
1034
1035
|
}
|
|
1035
1036
|
});
|
|
1036
1037
|
|
|
1037
|
-
// src/chat/
|
|
1038
|
+
// src/chat/QuestionChips.tsx
|
|
1038
1039
|
var import_react_native6 = require("react-native");
|
|
1039
1040
|
var import_core8 = require("@ateam-ai-mobile/core");
|
|
1040
1041
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1041
1042
|
var fontFam2 = import_react_native6.Platform.OS === "ios" ? "SF Pro Rounded" : void 0;
|
|
1043
|
+
function resolveOptions(inputType, options) {
|
|
1044
|
+
if (Array.isArray(options) && options.length) return options.filter((o) => typeof o === "string" && o.trim());
|
|
1045
|
+
if (inputType === "confirm") return ["Yes", "No"];
|
|
1046
|
+
return [];
|
|
1047
|
+
}
|
|
1048
|
+
function QuestionChips({
|
|
1049
|
+
inputType,
|
|
1050
|
+
options
|
|
1051
|
+
}) {
|
|
1052
|
+
const opts = resolveOptions(inputType, options);
|
|
1053
|
+
if (!opts.length) return null;
|
|
1054
|
+
const answer = (label) => {
|
|
1055
|
+
try {
|
|
1056
|
+
import_core8.useChatStore.getState().sendMessage(label);
|
|
1057
|
+
} catch {
|
|
1058
|
+
}
|
|
1059
|
+
};
|
|
1060
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_native6.View, { style: styles5.row, children: opts.map((label, i) => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1061
|
+
import_react_native6.Pressable,
|
|
1062
|
+
{
|
|
1063
|
+
accessibilityRole: "button",
|
|
1064
|
+
accessibilityLabel: label,
|
|
1065
|
+
onPress: () => answer(label),
|
|
1066
|
+
style: ({ pressed }) => [styles5.chip, pressed && styles5.chipPressed],
|
|
1067
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_native6.Text, { style: styles5.label, numberOfLines: 2, children: label })
|
|
1068
|
+
},
|
|
1069
|
+
`${label}-${i}`
|
|
1070
|
+
)) });
|
|
1071
|
+
}
|
|
1072
|
+
var styles5 = import_react_native6.StyleSheet.create({
|
|
1073
|
+
row: {
|
|
1074
|
+
flexDirection: "row",
|
|
1075
|
+
flexWrap: "wrap",
|
|
1076
|
+
gap: 6,
|
|
1077
|
+
marginTop: 10
|
|
1078
|
+
},
|
|
1079
|
+
chip: {
|
|
1080
|
+
paddingHorizontal: 12,
|
|
1081
|
+
paddingVertical: 8,
|
|
1082
|
+
backgroundColor: import_core8.ada.orangeSoft,
|
|
1083
|
+
borderColor: import_core8.ada.orange,
|
|
1084
|
+
borderWidth: 1,
|
|
1085
|
+
borderRadius: 14
|
|
1086
|
+
},
|
|
1087
|
+
chipPressed: {
|
|
1088
|
+
backgroundColor: import_core8.ada.orange
|
|
1089
|
+
},
|
|
1090
|
+
label: {
|
|
1091
|
+
color: import_core8.ada.orangeDeep,
|
|
1092
|
+
fontSize: import_core8.fontSize.xs,
|
|
1093
|
+
fontWeight: "600",
|
|
1094
|
+
fontFamily: fontFam2
|
|
1095
|
+
}
|
|
1096
|
+
});
|
|
1097
|
+
|
|
1098
|
+
// src/chat/TableCardBlock.tsx
|
|
1099
|
+
var import_react_native7 = require("react-native");
|
|
1100
|
+
var import_core9 = require("@ateam-ai-mobile/core");
|
|
1101
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1102
|
+
var fontFam3 = import_react_native7.Platform.OS === "ios" ? "SF Pro Rounded" : void 0;
|
|
1042
1103
|
function TableCardBlock({ columns, rows }) {
|
|
1043
1104
|
if (!columns?.length || !rows?.length) return null;
|
|
1044
1105
|
const [titleCol, ...detailCols] = columns;
|
|
1045
|
-
return /* @__PURE__ */ (0,
|
|
1106
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.View, { style: styles6.wrap, children: rows.map((row, i) => {
|
|
1046
1107
|
const cells = Array.isArray(row) ? row : [row];
|
|
1047
1108
|
const title = cells[0];
|
|
1048
|
-
return /* @__PURE__ */ (0,
|
|
1049
|
-
/* @__PURE__ */ (0,
|
|
1050
|
-
detailCols.length > 0 && /* @__PURE__ */ (0,
|
|
1109
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_native7.View, { style: styles6.card, children: [
|
|
1110
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.Text, { style: styles6.title, children: String(title ?? "") }),
|
|
1111
|
+
detailCols.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.View, { style: styles6.details, children: detailCols.map((col, ci) => {
|
|
1051
1112
|
const value = cells[ci + 1];
|
|
1052
1113
|
if (value == null || value === "") return null;
|
|
1053
|
-
return /* @__PURE__ */ (0,
|
|
1054
|
-
/* @__PURE__ */ (0,
|
|
1055
|
-
/* @__PURE__ */ (0,
|
|
1114
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_native7.View, { style: styles6.row, children: [
|
|
1115
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.Text, { style: styles6.label, children: String(col) }),
|
|
1116
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.Text, { style: styles6.value, children: String(value) })
|
|
1056
1117
|
] }, ci);
|
|
1057
1118
|
}) })
|
|
1058
1119
|
] }, i);
|
|
1059
1120
|
}) });
|
|
1060
1121
|
}
|
|
1061
|
-
var
|
|
1122
|
+
var styles6 = import_react_native7.StyleSheet.create({
|
|
1062
1123
|
wrap: {
|
|
1063
1124
|
marginVertical: 6,
|
|
1064
1125
|
gap: 8
|
|
1065
1126
|
},
|
|
1066
1127
|
card: {
|
|
1067
|
-
backgroundColor:
|
|
1068
|
-
borderRadius:
|
|
1128
|
+
backgroundColor: import_core9.ada.paper,
|
|
1129
|
+
borderRadius: import_core9.borderRadius.md,
|
|
1069
1130
|
borderWidth: 1,
|
|
1070
|
-
borderColor:
|
|
1071
|
-
padding:
|
|
1131
|
+
borderColor: import_core9.ada.border,
|
|
1132
|
+
padding: import_core9.spacing.md
|
|
1072
1133
|
},
|
|
1073
1134
|
title: {
|
|
1074
|
-
color:
|
|
1075
|
-
fontSize:
|
|
1135
|
+
color: import_core9.ada.ink,
|
|
1136
|
+
fontSize: import_core9.fontSize.md,
|
|
1076
1137
|
fontWeight: "600",
|
|
1077
|
-
fontFamily:
|
|
1138
|
+
fontFamily: fontFam3,
|
|
1078
1139
|
letterSpacing: -0.2,
|
|
1079
1140
|
marginBottom: 6
|
|
1080
1141
|
},
|
|
@@ -1087,9 +1148,9 @@ var styles5 = import_react_native6.StyleSheet.create({
|
|
|
1087
1148
|
gap: 8
|
|
1088
1149
|
},
|
|
1089
1150
|
label: {
|
|
1090
|
-
color:
|
|
1091
|
-
fontSize:
|
|
1092
|
-
fontFamily:
|
|
1151
|
+
color: import_core9.ada.inkMuted,
|
|
1152
|
+
fontSize: import_core9.fontSize.xs,
|
|
1153
|
+
fontFamily: fontFam3,
|
|
1093
1154
|
fontWeight: "500",
|
|
1094
1155
|
width: 84,
|
|
1095
1156
|
textTransform: "uppercase",
|
|
@@ -1098,9 +1159,9 @@ var styles5 = import_react_native6.StyleSheet.create({
|
|
|
1098
1159
|
},
|
|
1099
1160
|
value: {
|
|
1100
1161
|
flex: 1,
|
|
1101
|
-
color:
|
|
1102
|
-
fontSize:
|
|
1103
|
-
fontFamily:
|
|
1162
|
+
color: import_core9.ada.inkSoft,
|
|
1163
|
+
fontSize: import_core9.fontSize.sm,
|
|
1164
|
+
fontFamily: fontFam3,
|
|
1104
1165
|
lineHeight: 18
|
|
1105
1166
|
}
|
|
1106
1167
|
});
|
|
@@ -1114,8 +1175,8 @@ var useLightboxStore = (0, import_zustand2.create)((set) => ({
|
|
|
1114
1175
|
}));
|
|
1115
1176
|
|
|
1116
1177
|
// src/chat/MessageBubble.tsx
|
|
1117
|
-
var
|
|
1118
|
-
var
|
|
1178
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
1179
|
+
var fontFam4 = import_react_native8.Platform.OS === "ios" ? "SF Pro Rounded" : void 0;
|
|
1119
1180
|
function formatTime(date) {
|
|
1120
1181
|
const h = date.getHours();
|
|
1121
1182
|
const m = date.getMinutes().toString().padStart(2, "0");
|
|
@@ -1133,18 +1194,18 @@ function DaySeparator({ date }) {
|
|
|
1133
1194
|
} else {
|
|
1134
1195
|
label = date.toLocaleDateString(void 0, { weekday: "long", month: "short", day: "numeric" });
|
|
1135
1196
|
}
|
|
1136
|
-
return /* @__PURE__ */ (0,
|
|
1197
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.View, { style: separatorStyles.container, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.View, { style: separatorStyles.pill, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.Text, { style: separatorStyles.text, children: label }) }) });
|
|
1137
1198
|
}
|
|
1138
1199
|
function isSameDay(a, b) {
|
|
1139
1200
|
return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
|
1140
1201
|
}
|
|
1141
|
-
var separatorStyles =
|
|
1202
|
+
var separatorStyles = import_react_native8.StyleSheet.create({
|
|
1142
1203
|
container: {
|
|
1143
1204
|
alignItems: "center",
|
|
1144
1205
|
marginVertical: 14
|
|
1145
1206
|
},
|
|
1146
1207
|
pill: {
|
|
1147
|
-
backgroundColor:
|
|
1208
|
+
backgroundColor: import_core10.ada.paperSoft,
|
|
1148
1209
|
paddingHorizontal: 14,
|
|
1149
1210
|
paddingVertical: 5,
|
|
1150
1211
|
borderRadius: 999
|
|
@@ -1152,9 +1213,9 @@ var separatorStyles = import_react_native7.StyleSheet.create({
|
|
|
1152
1213
|
text: {
|
|
1153
1214
|
fontSize: 12,
|
|
1154
1215
|
fontWeight: "600",
|
|
1155
|
-
color:
|
|
1216
|
+
color: import_core10.ada.inkMuted,
|
|
1156
1217
|
letterSpacing: 0.4,
|
|
1157
|
-
fontFamily:
|
|
1218
|
+
fontFamily: fontFam4
|
|
1158
1219
|
}
|
|
1159
1220
|
});
|
|
1160
1221
|
function MessageBubble({ message }) {
|
|
@@ -1162,6 +1223,7 @@ function MessageBubble({ message }) {
|
|
|
1162
1223
|
const isSystem = message.role === "system";
|
|
1163
1224
|
const isNotification = !isUser && message.kind === "notification";
|
|
1164
1225
|
const st = message.jobProgress?.status;
|
|
1226
|
+
const pq = !isUser ? message.jobProgress?.pendingQuestion : void 0;
|
|
1165
1227
|
const isProgressOnly = !isUser && (st === "running" || st === "paused") && (!message.content?.trim() || message.content === "Working on it...");
|
|
1166
1228
|
const [copied, setCopied] = (0, import_react7.useState)("");
|
|
1167
1229
|
const showCopied = (0, import_react7.useCallback)((label) => {
|
|
@@ -1178,84 +1240,89 @@ function MessageBubble({ message }) {
|
|
|
1178
1240
|
const handleLongPress = (0, import_react7.useCallback)(() => {
|
|
1179
1241
|
copyText(message.content);
|
|
1180
1242
|
}, [message.content, copyText]);
|
|
1181
|
-
return /* @__PURE__ */ (0,
|
|
1182
|
-
!isUser && !isNotification && /* @__PURE__ */ (0,
|
|
1243
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native8.View, { style: [styles7.row, isUser && styles7.rowUser], children: [
|
|
1244
|
+
!isUser && !isNotification && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.View, { style: styles7.avatarOrb, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1183
1245
|
import_plugin_runtime6.AdaOrb,
|
|
1184
1246
|
{
|
|
1185
1247
|
size: 28,
|
|
1186
1248
|
state: message.jobProgress?.status === "running" ? "thinking" : "idle"
|
|
1187
1249
|
}
|
|
1188
1250
|
) }),
|
|
1189
|
-
isNotification && /* @__PURE__ */ (0,
|
|
1190
|
-
/* @__PURE__ */ (0,
|
|
1191
|
-
|
|
1251
|
+
isNotification && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.View, { style: styles7.notificationLeftStripe }),
|
|
1252
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
1253
|
+
import_react_native8.Pressable,
|
|
1192
1254
|
{
|
|
1193
1255
|
accessibilityRole: "text",
|
|
1194
1256
|
accessibilityLabel: `${isUser ? "You" : isNotification ? "Notification" : "Ada"}: ${message.content}`,
|
|
1195
1257
|
accessibilityHint: "Long-press to copy",
|
|
1196
1258
|
onLongPress: handleLongPress,
|
|
1197
1259
|
style: [
|
|
1198
|
-
|
|
1199
|
-
isUser &&
|
|
1200
|
-
isSystem &&
|
|
1201
|
-
isNotification &&
|
|
1202
|
-
isProgressOnly &&
|
|
1260
|
+
styles7.bubble,
|
|
1261
|
+
isUser && styles7.bubbleUser,
|
|
1262
|
+
isSystem && styles7.bubbleSystem,
|
|
1263
|
+
isNotification && styles7.bubbleNotification,
|
|
1264
|
+
isProgressOnly && styles7.bubbleProgress
|
|
1203
1265
|
],
|
|
1204
1266
|
children: [
|
|
1205
|
-
isNotification && /* @__PURE__ */ (0,
|
|
1206
|
-
/* @__PURE__ */ (0,
|
|
1207
|
-
/* @__PURE__ */ (0,
|
|
1267
|
+
isNotification && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native8.View, { style: styles7.notificationHeader, children: [
|
|
1268
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.Text, { style: styles7.notificationHeaderIcon, children: "\u{1F514}" }),
|
|
1269
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.Text, { style: styles7.notificationHeaderText, children: "Notification" })
|
|
1208
1270
|
] }),
|
|
1209
|
-
message.attachments && message.attachments.length > 0 && /* @__PURE__ */ (0,
|
|
1210
|
-
|
|
1271
|
+
message.attachments && message.attachments.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.View, { style: styles7.attachments, children: message.attachments.map((att, i) => att.previewUri ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1272
|
+
import_react_native8.Pressable,
|
|
1211
1273
|
{
|
|
1212
1274
|
accessibilityRole: "imagebutton",
|
|
1213
1275
|
accessibilityLabel: `Photo${att.name ? `: ${att.name}` : ""}. Tap to enlarge.`,
|
|
1214
1276
|
onPress: () => useLightboxStore.getState().show(att.previewUri),
|
|
1215
|
-
children: /* @__PURE__ */ (0,
|
|
1216
|
-
|
|
1277
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1278
|
+
import_react_native8.Image,
|
|
1217
1279
|
{
|
|
1218
1280
|
source: {
|
|
1219
1281
|
uri: att.previewUri,
|
|
1220
1282
|
...att.previewUri.startsWith("http") ? {
|
|
1221
|
-
headers: { Authorization: `Bearer ${(0,
|
|
1283
|
+
headers: { Authorization: `Bearer ${(0, import_core10.getConfig)().tokenProvider.getToken()}` }
|
|
1222
1284
|
} : {}
|
|
1223
1285
|
},
|
|
1224
|
-
style:
|
|
1286
|
+
style: styles7.attachmentImage,
|
|
1225
1287
|
resizeMode: "cover",
|
|
1226
1288
|
onError: (e) => console.warn("[Image] Failed to load:", att.previewUri?.slice(0, 100), e.nativeEvent.error)
|
|
1227
1289
|
}
|
|
1228
1290
|
)
|
|
1229
1291
|
},
|
|
1230
1292
|
i
|
|
1231
|
-
) : /* @__PURE__ */ (0,
|
|
1293
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.View, { style: styles7.attachmentFile, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.Text, { style: styles7.attachmentFileName, numberOfLines: 1, children: att.name }) }, i)) }),
|
|
1232
1294
|
isUser ? (
|
|
1233
1295
|
// Hide the "See attachment" placeholder when the bubble already shows the photo.
|
|
1234
|
-
message.content && !(message.content === "See attachment" && message.attachments?.length) ? /* @__PURE__ */ (0,
|
|
1296
|
+
message.content && !(message.content === "See attachment" && message.attachments?.length) ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.Text, { selectable: true, style: styles7.userText, children: message.content }) : null
|
|
1235
1297
|
) : isProgressOnly ? (
|
|
1236
1298
|
// No "Working on it…" text — the indicator below is the whole message.
|
|
1237
1299
|
null
|
|
1238
|
-
) :
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1300
|
+
) : (
|
|
1301
|
+
// When the turn asked a question, show its clean question string —
|
|
1302
|
+
// never message.content, which may carry the raw JSON payload.
|
|
1303
|
+
renderAssistantContent(pq?.question || message.content, copyText)
|
|
1304
|
+
),
|
|
1305
|
+
!!copied && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.View, { style: styles7.copiedBadge, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.Text, { style: styles7.copiedText, children: copied }) }),
|
|
1306
|
+
message.toolCalls && message.toolCalls.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(ToolCallsBadge, { calls: message.toolCalls }),
|
|
1307
|
+
message.jobProgress && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(JobProgressBar, { progress: message.jobProgress, standalone: isProgressOnly }),
|
|
1308
|
+
!isUser && message.actions && message.actions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(UIActionsRow, { actions: message.actions }),
|
|
1309
|
+
pq && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(QuestionChips, { inputType: pq.inputType, options: pq.options }),
|
|
1310
|
+
!isProgressOnly && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.Text, { style: [styles7.timeText, isUser && styles7.timeTextUser], children: formatTime(message.timestamp) })
|
|
1244
1311
|
]
|
|
1245
1312
|
}
|
|
1246
1313
|
),
|
|
1247
|
-
isUser && /* @__PURE__ */ (0,
|
|
1314
|
+
isUser && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.View, { style: styles7.avatarSpacer })
|
|
1248
1315
|
] });
|
|
1249
1316
|
}
|
|
1250
1317
|
function renderAssistantContent(content, copyText) {
|
|
1251
1318
|
if (!content) return null;
|
|
1252
|
-
if (!content.includes(
|
|
1253
|
-
return /* @__PURE__ */ (0,
|
|
1319
|
+
if (!content.includes(import_core10.TABLE_BLOCK_OPEN)) {
|
|
1320
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(MarkdownBubble, { content, copyText });
|
|
1254
1321
|
}
|
|
1255
1322
|
const segments = [];
|
|
1256
1323
|
let cursor = 0;
|
|
1257
1324
|
while (cursor < content.length) {
|
|
1258
|
-
const open = content.indexOf(
|
|
1325
|
+
const open = content.indexOf(import_core10.TABLE_BLOCK_OPEN, cursor);
|
|
1259
1326
|
if (open === -1) {
|
|
1260
1327
|
segments.push({ kind: "md", content: content.slice(cursor) });
|
|
1261
1328
|
break;
|
|
@@ -1263,37 +1330,37 @@ function renderAssistantContent(content, copyText) {
|
|
|
1263
1330
|
if (open > cursor) {
|
|
1264
1331
|
segments.push({ kind: "md", content: content.slice(cursor, open) });
|
|
1265
1332
|
}
|
|
1266
|
-
const close = content.indexOf(
|
|
1333
|
+
const close = content.indexOf(import_core10.TABLE_BLOCK_CLOSE, open + import_core10.TABLE_BLOCK_OPEN.length);
|
|
1267
1334
|
if (close === -1) {
|
|
1268
1335
|
segments.push({ kind: "md", content: content.slice(open) });
|
|
1269
1336
|
break;
|
|
1270
1337
|
}
|
|
1271
|
-
const payload = content.slice(open +
|
|
1338
|
+
const payload = content.slice(open + import_core10.TABLE_BLOCK_OPEN.length, close);
|
|
1272
1339
|
segments.push({ kind: "table", content: payload });
|
|
1273
|
-
cursor = close +
|
|
1340
|
+
cursor = close + import_core10.TABLE_BLOCK_CLOSE.length;
|
|
1274
1341
|
}
|
|
1275
|
-
return /* @__PURE__ */ (0,
|
|
1342
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_jsx_runtime9.Fragment, { children: segments.map((seg, i) => {
|
|
1276
1343
|
if (seg.kind === "md") {
|
|
1277
1344
|
const trimmed = seg.content.trim();
|
|
1278
1345
|
if (!trimmed) return null;
|
|
1279
|
-
return /* @__PURE__ */ (0,
|
|
1346
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(MarkdownBubble, { content: seg.content, copyText }, i);
|
|
1280
1347
|
}
|
|
1281
1348
|
try {
|
|
1282
1349
|
const data = JSON.parse(decodeURIComponent(seg.content));
|
|
1283
|
-
return /* @__PURE__ */ (0,
|
|
1350
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(TableCardBlock, { columns: data.columns, rows: data.rows }, i);
|
|
1284
1351
|
} catch {
|
|
1285
1352
|
return null;
|
|
1286
1353
|
}
|
|
1287
1354
|
}) });
|
|
1288
1355
|
}
|
|
1289
1356
|
function MarkdownBubble({ content, copyText }) {
|
|
1290
|
-
return /* @__PURE__ */ (0,
|
|
1357
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1291
1358
|
import_react_native_markdown_display.default,
|
|
1292
1359
|
{
|
|
1293
1360
|
style: markdownStyles,
|
|
1294
1361
|
rules: {
|
|
1295
|
-
code_inline: (node) => /* @__PURE__ */ (0,
|
|
1296
|
-
|
|
1362
|
+
code_inline: (node) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1363
|
+
import_react_native8.Text,
|
|
1297
1364
|
{
|
|
1298
1365
|
style: markdownStyles.code_inline,
|
|
1299
1366
|
onPress: () => copyText(node.content),
|
|
@@ -1301,12 +1368,12 @@ function MarkdownBubble({ content, copyText }) {
|
|
|
1301
1368
|
},
|
|
1302
1369
|
node.key
|
|
1303
1370
|
),
|
|
1304
|
-
fence: (node) => /* @__PURE__ */ (0,
|
|
1305
|
-
|
|
1371
|
+
fence: (node) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
1372
|
+
import_react_native8.Pressable,
|
|
1306
1373
|
{
|
|
1307
1374
|
onPress: () => copyText(node.content),
|
|
1308
1375
|
style: markdownStyles.fence,
|
|
1309
|
-
children: /* @__PURE__ */ (0,
|
|
1376
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.Text, { style: markdownStyles.fenceText, children: node.content })
|
|
1310
1377
|
},
|
|
1311
1378
|
node.key
|
|
1312
1379
|
)
|
|
@@ -1318,18 +1385,18 @@ function MarkdownBubble({ content, copyText }) {
|
|
|
1318
1385
|
function ToolCallsBadge({ calls }) {
|
|
1319
1386
|
const [expanded, setExpanded] = (0, import_react7.useState)(false);
|
|
1320
1387
|
const label = calls.filter((c) => c.name === "send_message_to_skill").map((c) => c.args.skill_name || c.skill).filter(Boolean).join(", ") || "Tool call";
|
|
1321
|
-
return /* @__PURE__ */ (0,
|
|
1322
|
-
/* @__PURE__ */ (0,
|
|
1323
|
-
/* @__PURE__ */ (0,
|
|
1324
|
-
/* @__PURE__ */ (0,
|
|
1388
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native8.View, { style: styles7.toolCalls, children: [
|
|
1389
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native8.Pressable, { style: styles7.toolToggle, onPress: () => setExpanded(!expanded), children: [
|
|
1390
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.Text, { style: styles7.toolLabel, children: label }),
|
|
1391
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.Text, { style: styles7.toolChevron, children: expanded ? "\u25B2" : "\u25BC" })
|
|
1325
1392
|
] }),
|
|
1326
|
-
expanded && calls.map((tc, i) => /* @__PURE__ */ (0,
|
|
1327
|
-
/* @__PURE__ */ (0,
|
|
1328
|
-
tc.skill && /* @__PURE__ */ (0,
|
|
1393
|
+
expanded && calls.map((tc, i) => /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native8.View, { style: styles7.toolItem, children: [
|
|
1394
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.Text, { style: styles7.toolName, children: tc.name }),
|
|
1395
|
+
tc.skill && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.Text, { style: styles7.toolSkill, children: tc.skill })
|
|
1329
1396
|
] }, i))
|
|
1330
1397
|
] });
|
|
1331
1398
|
}
|
|
1332
|
-
var
|
|
1399
|
+
var styles7 = import_react_native8.StyleSheet.create({
|
|
1333
1400
|
row: {
|
|
1334
1401
|
flexDirection: "row",
|
|
1335
1402
|
alignItems: "flex-end",
|
|
@@ -1352,15 +1419,15 @@ var styles6 = import_react_native7.StyleSheet.create({
|
|
|
1352
1419
|
},
|
|
1353
1420
|
bubble: {
|
|
1354
1421
|
maxWidth: "78%",
|
|
1355
|
-
backgroundColor:
|
|
1422
|
+
backgroundColor: import_core10.ada.botBubble,
|
|
1356
1423
|
borderWidth: 1,
|
|
1357
|
-
borderColor:
|
|
1358
|
-
borderRadius:
|
|
1424
|
+
borderColor: import_core10.ada.botBubbleBorder,
|
|
1425
|
+
borderRadius: import_core10.borderRadius.xl,
|
|
1359
1426
|
paddingHorizontal: 16,
|
|
1360
1427
|
paddingVertical: 12
|
|
1361
1428
|
},
|
|
1362
1429
|
bubbleUser: {
|
|
1363
|
-
backgroundColor:
|
|
1430
|
+
backgroundColor: import_core10.ada.userBubble,
|
|
1364
1431
|
borderColor: "transparent"
|
|
1365
1432
|
},
|
|
1366
1433
|
// Live-chain placeholder: no fill, no border, tighter padding — the
|
|
@@ -1372,20 +1439,20 @@ var styles6 = import_react_native7.StyleSheet.create({
|
|
|
1372
1439
|
paddingVertical: 2
|
|
1373
1440
|
},
|
|
1374
1441
|
bubbleSystem: {
|
|
1375
|
-
backgroundColor:
|
|
1376
|
-
borderColor:
|
|
1442
|
+
backgroundColor: import_core10.ada.orangeSoft,
|
|
1443
|
+
borderColor: import_core10.ada.orange,
|
|
1377
1444
|
maxWidth: "90%"
|
|
1378
1445
|
},
|
|
1379
1446
|
bubbleNotification: {
|
|
1380
|
-
backgroundColor:
|
|
1447
|
+
backgroundColor: import_core10.ada.orangeSoft,
|
|
1381
1448
|
borderColor: "rgba(255, 122, 40, 0.35)",
|
|
1382
|
-
borderRadius:
|
|
1449
|
+
borderRadius: import_core10.borderRadius.lg,
|
|
1383
1450
|
maxWidth: "90%"
|
|
1384
1451
|
},
|
|
1385
1452
|
notificationLeftStripe: {
|
|
1386
1453
|
width: 3,
|
|
1387
1454
|
alignSelf: "stretch",
|
|
1388
|
-
backgroundColor:
|
|
1455
|
+
backgroundColor: import_core10.ada.orange,
|
|
1389
1456
|
borderRadius: 2,
|
|
1390
1457
|
marginRight: 4
|
|
1391
1458
|
},
|
|
@@ -1399,25 +1466,25 @@ var styles6 = import_react_native7.StyleSheet.create({
|
|
|
1399
1466
|
fontSize: 12
|
|
1400
1467
|
},
|
|
1401
1468
|
notificationHeaderText: {
|
|
1402
|
-
color:
|
|
1469
|
+
color: import_core10.ada.orangeDeep,
|
|
1403
1470
|
fontSize: 11,
|
|
1404
1471
|
fontWeight: "700",
|
|
1405
1472
|
letterSpacing: 0.6,
|
|
1406
1473
|
textTransform: "uppercase",
|
|
1407
|
-
fontFamily:
|
|
1474
|
+
fontFamily: fontFam4
|
|
1408
1475
|
},
|
|
1409
1476
|
userText: {
|
|
1410
|
-
color:
|
|
1411
|
-
fontSize:
|
|
1477
|
+
color: import_core10.ada.userBubbleText,
|
|
1478
|
+
fontSize: import_core10.fontSize.md,
|
|
1412
1479
|
lineHeight: 22,
|
|
1413
|
-
fontFamily:
|
|
1480
|
+
fontFamily: fontFam4
|
|
1414
1481
|
},
|
|
1415
1482
|
timeText: {
|
|
1416
1483
|
fontSize: 11,
|
|
1417
|
-
color:
|
|
1484
|
+
color: import_core10.ada.inkMuted,
|
|
1418
1485
|
alignSelf: "flex-end",
|
|
1419
1486
|
marginTop: 4,
|
|
1420
|
-
fontFamily:
|
|
1487
|
+
fontFamily: fontFam4
|
|
1421
1488
|
},
|
|
1422
1489
|
timeTextUser: {
|
|
1423
1490
|
color: "rgba(250,246,238,0.55)"
|
|
@@ -1451,17 +1518,17 @@ var styles6 = import_react_native7.StyleSheet.create({
|
|
|
1451
1518
|
backgroundColor: "#5A8A5C",
|
|
1452
1519
|
paddingHorizontal: 8,
|
|
1453
1520
|
paddingVertical: 2,
|
|
1454
|
-
borderRadius:
|
|
1521
|
+
borderRadius: import_core10.borderRadius.sm
|
|
1455
1522
|
},
|
|
1456
1523
|
copiedText: {
|
|
1457
1524
|
color: "#fff",
|
|
1458
|
-
fontSize:
|
|
1525
|
+
fontSize: import_core10.fontSize.xs,
|
|
1459
1526
|
fontWeight: "600"
|
|
1460
1527
|
},
|
|
1461
1528
|
toolCalls: {
|
|
1462
1529
|
marginTop: 8,
|
|
1463
1530
|
borderTopWidth: 1,
|
|
1464
|
-
borderTopColor:
|
|
1531
|
+
borderTopColor: import_core10.ada.border,
|
|
1465
1532
|
paddingTop: 6
|
|
1466
1533
|
},
|
|
1467
1534
|
toolToggle: {
|
|
@@ -1470,12 +1537,12 @@ var styles6 = import_react_native7.StyleSheet.create({
|
|
|
1470
1537
|
gap: 6
|
|
1471
1538
|
},
|
|
1472
1539
|
toolLabel: {
|
|
1473
|
-
color:
|
|
1474
|
-
fontSize:
|
|
1540
|
+
color: import_core10.ada.inkSoft,
|
|
1541
|
+
fontSize: import_core10.fontSize.xs,
|
|
1475
1542
|
fontWeight: "500"
|
|
1476
1543
|
},
|
|
1477
1544
|
toolChevron: {
|
|
1478
|
-
color:
|
|
1545
|
+
color: import_core10.ada.inkMuted,
|
|
1479
1546
|
fontSize: 8
|
|
1480
1547
|
},
|
|
1481
1548
|
toolItem: {
|
|
@@ -1483,21 +1550,21 @@ var styles6 = import_react_native7.StyleSheet.create({
|
|
|
1483
1550
|
paddingLeft: 8
|
|
1484
1551
|
},
|
|
1485
1552
|
toolName: {
|
|
1486
|
-
color:
|
|
1487
|
-
fontSize:
|
|
1553
|
+
color: import_core10.ada.inkSoft,
|
|
1554
|
+
fontSize: import_core10.fontSize.xs,
|
|
1488
1555
|
fontFamily: "monospace"
|
|
1489
1556
|
},
|
|
1490
1557
|
toolSkill: {
|
|
1491
|
-
color:
|
|
1492
|
-
fontSize:
|
|
1558
|
+
color: import_core10.ada.orangeDeep,
|
|
1559
|
+
fontSize: import_core10.fontSize.xs
|
|
1493
1560
|
}
|
|
1494
1561
|
});
|
|
1495
|
-
var markdownStyles =
|
|
1562
|
+
var markdownStyles = import_react_native8.StyleSheet.create({
|
|
1496
1563
|
body: {
|
|
1497
|
-
color:
|
|
1498
|
-
fontSize:
|
|
1564
|
+
color: import_core10.ada.botBubbleText,
|
|
1565
|
+
fontSize: import_core10.fontSize.md,
|
|
1499
1566
|
lineHeight: 22,
|
|
1500
|
-
fontFamily:
|
|
1567
|
+
fontFamily: fontFam4
|
|
1501
1568
|
},
|
|
1502
1569
|
paragraph: {
|
|
1503
1570
|
marginTop: 0,
|
|
@@ -1505,35 +1572,35 @@ var markdownStyles = import_react_native7.StyleSheet.create({
|
|
|
1505
1572
|
},
|
|
1506
1573
|
strong: {
|
|
1507
1574
|
fontWeight: "700",
|
|
1508
|
-
color:
|
|
1575
|
+
color: import_core10.ada.botBubbleText
|
|
1509
1576
|
},
|
|
1510
1577
|
em: {
|
|
1511
1578
|
fontStyle: "italic"
|
|
1512
1579
|
},
|
|
1513
1580
|
code_inline: {
|
|
1514
|
-
backgroundColor:
|
|
1515
|
-
color:
|
|
1581
|
+
backgroundColor: import_core10.ada.paperDeep,
|
|
1582
|
+
color: import_core10.ada.orangeDeep,
|
|
1516
1583
|
paddingHorizontal: 5,
|
|
1517
1584
|
paddingVertical: 1,
|
|
1518
1585
|
borderRadius: 4,
|
|
1519
1586
|
fontFamily: "monospace",
|
|
1520
|
-
fontSize:
|
|
1587
|
+
fontSize: import_core10.fontSize.sm
|
|
1521
1588
|
},
|
|
1522
1589
|
fence: {
|
|
1523
|
-
backgroundColor:
|
|
1590
|
+
backgroundColor: import_core10.ada.paperDeep,
|
|
1524
1591
|
padding: 10,
|
|
1525
1592
|
borderRadius: 10
|
|
1526
1593
|
},
|
|
1527
1594
|
fenceText: {
|
|
1528
1595
|
fontFamily: "monospace",
|
|
1529
|
-
fontSize:
|
|
1530
|
-
color:
|
|
1596
|
+
fontSize: import_core10.fontSize.sm,
|
|
1597
|
+
color: import_core10.ada.ink
|
|
1531
1598
|
},
|
|
1532
1599
|
link: {
|
|
1533
|
-
color:
|
|
1600
|
+
color: import_core10.ada.orangeDeep
|
|
1534
1601
|
},
|
|
1535
1602
|
list_item: {
|
|
1536
|
-
color:
|
|
1603
|
+
color: import_core10.ada.botBubbleText
|
|
1537
1604
|
},
|
|
1538
1605
|
bullet_list: {
|
|
1539
1606
|
marginVertical: 4
|
|
@@ -1541,13 +1608,13 @@ var markdownStyles = import_react_native7.StyleSheet.create({
|
|
|
1541
1608
|
});
|
|
1542
1609
|
|
|
1543
1610
|
// src/chat/TypingIndicator.tsx
|
|
1544
|
-
var
|
|
1611
|
+
var import_react_native9 = require("react-native");
|
|
1545
1612
|
var import_plugin_runtime7 = require("@ateam-ai-mobile/plugin-runtime");
|
|
1546
|
-
var
|
|
1613
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1547
1614
|
function TypingIndicator() {
|
|
1548
|
-
return /* @__PURE__ */ (0,
|
|
1615
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native9.View, { style: styles8.row, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_plugin_runtime7.AdaOrb, { size: 32, state: "thinking" }) });
|
|
1549
1616
|
}
|
|
1550
|
-
var
|
|
1617
|
+
var styles8 = import_react_native9.StyleSheet.create({
|
|
1551
1618
|
row: {
|
|
1552
1619
|
flexDirection: "row",
|
|
1553
1620
|
alignItems: "center",
|
|
@@ -1559,11 +1626,11 @@ var styles7 = import_react_native8.StyleSheet.create({
|
|
|
1559
1626
|
|
|
1560
1627
|
// src/chat/ChatInput.tsx
|
|
1561
1628
|
var import_react8 = require("react");
|
|
1562
|
-
var
|
|
1629
|
+
var import_react_native10 = require("react-native");
|
|
1563
1630
|
var import_react_native_svg = __toESM(require("react-native-svg"));
|
|
1564
|
-
var
|
|
1631
|
+
var import_core11 = require("@ateam-ai-mobile/core");
|
|
1565
1632
|
var import_plugin_runtime8 = require("@ateam-ai-mobile/plugin-runtime");
|
|
1566
|
-
var
|
|
1633
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
1567
1634
|
function ChatInput({ onSend, onCallStart, loading, prefill, placeholder }) {
|
|
1568
1635
|
const [text, setText] = (0, import_react8.useState)("");
|
|
1569
1636
|
const [height, setHeight] = (0, import_react8.useState)(40);
|
|
@@ -1583,55 +1650,55 @@ function ChatInput({ onSend, onCallStart, loading, prefill, placeholder }) {
|
|
|
1583
1650
|
setHeight(40);
|
|
1584
1651
|
}, [text, loading, onSend]);
|
|
1585
1652
|
const canSend = text.trim().length > 0;
|
|
1586
|
-
return /* @__PURE__ */ (0,
|
|
1587
|
-
onCallStart && /* @__PURE__ */ (0,
|
|
1588
|
-
/* @__PURE__ */ (0,
|
|
1589
|
-
|
|
1653
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native10.View, { style: styles9.dock, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native10.View, { style: styles9.inputRow, children: [
|
|
1654
|
+
onCallStart && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native10.Pressable, { style: styles9.callBtn, onPress: onCallStart, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native_svg.default, { width: 20, height: 20, viewBox: "0 0 24 24", fill: "none", stroke: import_core11.colors.light.accent, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native_svg.Path, { d: "M22 16.92v3a2 2 0 01-2.18 2 19.79 19.79 0 01-8.63-3.07 19.5 19.5 0 01-6-6 19.79 19.79 0 01-3.07-8.63A2 2 0 014.11 2h3a2 2 0 012 1.72 12.84 12.84 0 00.7 2.81 2 2 0 01-.45 2.11L8.09 9.91a16 16 0 006 6l1.27-1.27a2 2 0 012.11-.45 12.84 12.84 0 002.81.7A2 2 0 0122 16.92z" }) }) }),
|
|
1655
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1656
|
+
import_react_native10.TextInput,
|
|
1590
1657
|
{
|
|
1591
1658
|
ref: inputRef,
|
|
1592
|
-
style: [
|
|
1659
|
+
style: [styles9.input, { height: Math.min(Math.max(40, height), 120) }],
|
|
1593
1660
|
value: text,
|
|
1594
1661
|
onChangeText: setText,
|
|
1595
1662
|
onContentSizeChange: (e) => setHeight(e.nativeEvent.contentSize.height),
|
|
1596
1663
|
placeholder: placeholder || "Message A-Team...",
|
|
1597
|
-
placeholderTextColor:
|
|
1664
|
+
placeholderTextColor: import_core11.colors.light.textMuted,
|
|
1598
1665
|
multiline: true,
|
|
1599
1666
|
returnKeyType: "default",
|
|
1600
1667
|
blurOnSubmit: false,
|
|
1601
1668
|
onSubmitEditing: () => {
|
|
1602
|
-
if (
|
|
1669
|
+
if (import_react_native10.Platform.OS === "web") handleSend();
|
|
1603
1670
|
}
|
|
1604
1671
|
}
|
|
1605
1672
|
),
|
|
1606
|
-
/* @__PURE__ */ (0,
|
|
1607
|
-
|
|
1673
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
1674
|
+
import_react_native10.Pressable,
|
|
1608
1675
|
{
|
|
1609
|
-
style: [
|
|
1676
|
+
style: [styles9.sendBtn, canSend && styles9.sendBtnActive],
|
|
1610
1677
|
onPress: handleSend,
|
|
1611
1678
|
disabled: !canSend,
|
|
1612
|
-
children: /* @__PURE__ */ (0,
|
|
1613
|
-
/* @__PURE__ */ (0,
|
|
1614
|
-
/* @__PURE__ */ (0,
|
|
1679
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native_svg.default, { width: 18, height: 18, viewBox: "0 0 24 24", fill: "none", stroke: canSend ? "#fff" : import_core11.colors.light.textMuted, strokeWidth: 2, children: [
|
|
1680
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native_svg.Line, { x1: "22", y1: "2", x2: "11", y2: "13" }),
|
|
1681
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native_svg.Polygon, { points: "22 2 15 22 11 13 2 9 22 2" })
|
|
1615
1682
|
] })
|
|
1616
1683
|
}
|
|
1617
1684
|
)
|
|
1618
1685
|
] }) });
|
|
1619
1686
|
}
|
|
1620
|
-
var
|
|
1687
|
+
var styles9 = import_react_native10.StyleSheet.create({
|
|
1621
1688
|
dock: {
|
|
1622
1689
|
paddingHorizontal: 12,
|
|
1623
1690
|
paddingVertical: 8,
|
|
1624
|
-
backgroundColor:
|
|
1691
|
+
backgroundColor: import_core11.colors.light.bgPrimary,
|
|
1625
1692
|
borderTopWidth: 0.5,
|
|
1626
|
-
borderTopColor:
|
|
1693
|
+
borderTopColor: import_core11.colors.light.border
|
|
1627
1694
|
},
|
|
1628
1695
|
inputRow: {
|
|
1629
1696
|
flexDirection: "row",
|
|
1630
1697
|
alignItems: "flex-end",
|
|
1631
|
-
backgroundColor:
|
|
1632
|
-
borderRadius:
|
|
1698
|
+
backgroundColor: import_core11.colors.light.bgInput,
|
|
1699
|
+
borderRadius: import_core11.borderRadius.xl,
|
|
1633
1700
|
borderWidth: 1,
|
|
1634
|
-
borderColor:
|
|
1701
|
+
borderColor: import_core11.colors.light.border,
|
|
1635
1702
|
paddingHorizontal: 4,
|
|
1636
1703
|
paddingVertical: 4,
|
|
1637
1704
|
gap: 4
|
|
@@ -1646,7 +1713,7 @@ var styles8 = import_react_native9.StyleSheet.create({
|
|
|
1646
1713
|
input: {
|
|
1647
1714
|
flex: 1,
|
|
1648
1715
|
fontSize: 16,
|
|
1649
|
-
color:
|
|
1716
|
+
color: import_core11.colors.light.textPrimary,
|
|
1650
1717
|
paddingHorizontal: 8,
|
|
1651
1718
|
paddingVertical: 8,
|
|
1652
1719
|
maxHeight: 120
|
|
@@ -1657,39 +1724,39 @@ var styles8 = import_react_native9.StyleSheet.create({
|
|
|
1657
1724
|
borderRadius: 18,
|
|
1658
1725
|
justifyContent: "center",
|
|
1659
1726
|
alignItems: "center",
|
|
1660
|
-
backgroundColor:
|
|
1727
|
+
backgroundColor: import_core11.colors.light.bgTertiary
|
|
1661
1728
|
},
|
|
1662
1729
|
sendBtnActive: {
|
|
1663
|
-
backgroundColor:
|
|
1730
|
+
backgroundColor: import_core11.colors.light.accent
|
|
1664
1731
|
}
|
|
1665
1732
|
});
|
|
1666
1733
|
|
|
1667
1734
|
// src/Lightbox.tsx
|
|
1668
|
-
var
|
|
1669
|
-
var
|
|
1670
|
-
var
|
|
1735
|
+
var import_react_native11 = require("react-native");
|
|
1736
|
+
var import_core12 = require("@ateam-ai-mobile/core");
|
|
1737
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
1671
1738
|
function Lightbox() {
|
|
1672
1739
|
const uri = useLightboxStore((s) => s.uri);
|
|
1673
1740
|
const hide = useLightboxStore((s) => s.hide);
|
|
1674
1741
|
if (!uri) return null;
|
|
1675
|
-
return /* @__PURE__ */ (0,
|
|
1676
|
-
/* @__PURE__ */ (0,
|
|
1677
|
-
|
|
1742
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native11.Modal, { visible: true, transparent: true, animationType: "fade", onRequestClose: hide, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native11.Pressable, { style: styles10.backdrop, onPress: hide, children: [
|
|
1743
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
1744
|
+
import_react_native11.Image,
|
|
1678
1745
|
{
|
|
1679
1746
|
source: {
|
|
1680
1747
|
uri,
|
|
1681
1748
|
...uri.startsWith("http") ? {
|
|
1682
|
-
headers: { Authorization: `Bearer ${(0,
|
|
1749
|
+
headers: { Authorization: `Bearer ${(0, import_core12.getConfig)().tokenProvider.getToken()}` }
|
|
1683
1750
|
} : {}
|
|
1684
1751
|
},
|
|
1685
|
-
style:
|
|
1752
|
+
style: styles10.image,
|
|
1686
1753
|
resizeMode: "contain"
|
|
1687
1754
|
}
|
|
1688
1755
|
),
|
|
1689
|
-
/* @__PURE__ */ (0,
|
|
1756
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native11.View, { style: styles10.closeHint, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native11.Text, { style: styles10.closeHintText, children: "Tap to close" }) })
|
|
1690
1757
|
] }) });
|
|
1691
1758
|
}
|
|
1692
|
-
var
|
|
1759
|
+
var styles10 = import_react_native11.StyleSheet.create({
|
|
1693
1760
|
backdrop: {
|
|
1694
1761
|
flex: 1,
|
|
1695
1762
|
backgroundColor: "rgba(0,0,0,0.92)",
|
|
@@ -1711,7 +1778,7 @@ var styles9 = import_react_native10.StyleSheet.create({
|
|
|
1711
1778
|
});
|
|
1712
1779
|
|
|
1713
1780
|
// src/AdasChatScreen.tsx
|
|
1714
|
-
var
|
|
1781
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
1715
1782
|
function isSameDay2(a, b) {
|
|
1716
1783
|
return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
|
1717
1784
|
}
|
|
@@ -1721,11 +1788,11 @@ function AdasChatScreen({
|
|
|
1721
1788
|
footerAccessory,
|
|
1722
1789
|
withLightbox = true
|
|
1723
1790
|
}) {
|
|
1724
|
-
const messages = (0,
|
|
1725
|
-
const loading = (0,
|
|
1726
|
-
const conversationLoaded = (0,
|
|
1727
|
-
const loadConversation = (0,
|
|
1728
|
-
const sendMessage = (0,
|
|
1791
|
+
const messages = (0, import_core13.useChatStore)((s) => s.messages);
|
|
1792
|
+
const loading = (0, import_core13.useChatStore)((s) => s.loading);
|
|
1793
|
+
const conversationLoaded = (0, import_core13.useChatStore)((s) => s.conversationLoaded);
|
|
1794
|
+
const loadConversation = (0, import_core13.useChatStore)((s) => s.loadConversation);
|
|
1795
|
+
const sendMessage = (0, import_core13.useChatStore)((s) => s.sendMessage);
|
|
1729
1796
|
const listRef = (0, import_react9.useRef)(null);
|
|
1730
1797
|
const [refreshing, setRefreshing] = (0, import_react9.useState)(false);
|
|
1731
1798
|
const [prefill, setPrefill] = (0, import_react9.useState)("");
|
|
@@ -1733,12 +1800,12 @@ function AdasChatScreen({
|
|
|
1733
1800
|
if (!conversationLoaded) loadConversation();
|
|
1734
1801
|
}, [conversationLoaded, loadConversation]);
|
|
1735
1802
|
(0, import_react9.useEffect)(() => {
|
|
1736
|
-
const unsub =
|
|
1803
|
+
const unsub = import_core13.pluginCommandEmitter.on("prepare-chat-message", ({ text }) => {
|
|
1737
1804
|
if (text) setPrefill(text);
|
|
1738
1805
|
});
|
|
1739
1806
|
return unsub;
|
|
1740
1807
|
}, []);
|
|
1741
|
-
const useInverted =
|
|
1808
|
+
const useInverted = import_react_native12.Platform.OS !== "web";
|
|
1742
1809
|
const listData = (0, import_react9.useMemo)(
|
|
1743
1810
|
() => useInverted ? [...messages].reverse() : messages,
|
|
1744
1811
|
[messages, useInverted]
|
|
@@ -1763,23 +1830,23 @@ function AdasChatScreen({
|
|
|
1763
1830
|
const renderItem = (0, import_react9.useCallback)(({ item, index }) => {
|
|
1764
1831
|
const older = useInverted ? listData[index + 1] : listData[index - 1];
|
|
1765
1832
|
const showDaySep = !older || !isSameDay2(older.timestamp, item.timestamp);
|
|
1766
|
-
return /* @__PURE__ */ (0,
|
|
1767
|
-
showDaySep && /* @__PURE__ */ (0,
|
|
1768
|
-
/* @__PURE__ */ (0,
|
|
1833
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.View, { children: [
|
|
1834
|
+
showDaySep && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(DaySeparator, { date: item.timestamp }),
|
|
1835
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(MessageBubble, { message: item })
|
|
1769
1836
|
] });
|
|
1770
1837
|
}, [listData, useInverted]);
|
|
1771
|
-
const typingIndicator = loading && !(useInverted ? listData[0] : listData[listData.length - 1])?.jobProgress ? /* @__PURE__ */ (0,
|
|
1772
|
-
return /* @__PURE__ */ (0,
|
|
1773
|
-
|
|
1838
|
+
const typingIndicator = loading && !(useInverted ? listData[0] : listData[listData.length - 1])?.jobProgress ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(TypingIndicator, {}) : null;
|
|
1839
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
1840
|
+
import_react_native12.KeyboardAvoidingView,
|
|
1774
1841
|
{
|
|
1775
|
-
style:
|
|
1776
|
-
behavior:
|
|
1842
|
+
style: styles11.root,
|
|
1843
|
+
behavior: import_react_native12.Platform.OS === "ios" ? "padding" : void 0,
|
|
1777
1844
|
children: [
|
|
1778
|
-
/* @__PURE__ */ (0,
|
|
1779
|
-
|
|
1845
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1846
|
+
import_react_native12.FlatList,
|
|
1780
1847
|
{
|
|
1781
1848
|
ref: listRef,
|
|
1782
|
-
style:
|
|
1849
|
+
style: styles11.list,
|
|
1783
1850
|
data: listData,
|
|
1784
1851
|
inverted: useInverted,
|
|
1785
1852
|
keyExtractor: (m) => m.id,
|
|
@@ -1787,13 +1854,13 @@ function AdasChatScreen({
|
|
|
1787
1854
|
ListHeaderComponent: useInverted ? typingIndicator : null,
|
|
1788
1855
|
ListFooterComponent: useInverted ? null : typingIndicator,
|
|
1789
1856
|
onContentSizeChange: useInverted ? void 0 : () => scrollToLatest(false),
|
|
1790
|
-
refreshControl: /* @__PURE__ */ (0,
|
|
1857
|
+
refreshControl: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.RefreshControl, { refreshing, onRefresh: handleRefresh, tintColor: import_core13.ada.orange }),
|
|
1791
1858
|
keyboardShouldPersistTaps: "handled",
|
|
1792
|
-
contentContainerStyle:
|
|
1859
|
+
contentContainerStyle: styles11.listContent
|
|
1793
1860
|
}
|
|
1794
1861
|
),
|
|
1795
1862
|
footerAccessory,
|
|
1796
|
-
/* @__PURE__ */ (0,
|
|
1863
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
1797
1864
|
ChatInput,
|
|
1798
1865
|
{
|
|
1799
1866
|
onSend: handleSend,
|
|
@@ -1803,16 +1870,16 @@ function AdasChatScreen({
|
|
|
1803
1870
|
placeholder
|
|
1804
1871
|
}
|
|
1805
1872
|
),
|
|
1806
|
-
withLightbox && /* @__PURE__ */ (0,
|
|
1807
|
-
/* @__PURE__ */ (0,
|
|
1873
|
+
withLightbox && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Lightbox, {}),
|
|
1874
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(WidgetHost, {})
|
|
1808
1875
|
]
|
|
1809
1876
|
}
|
|
1810
1877
|
);
|
|
1811
1878
|
}
|
|
1812
|
-
var
|
|
1879
|
+
var styles11 = import_react_native12.StyleSheet.create({
|
|
1813
1880
|
root: {
|
|
1814
1881
|
flex: 1,
|
|
1815
|
-
backgroundColor:
|
|
1882
|
+
backgroundColor: import_core13.ada.paper
|
|
1816
1883
|
},
|
|
1817
1884
|
list: {
|
|
1818
1885
|
flex: 1
|
|
@@ -1824,42 +1891,42 @@ var styles10 = import_react_native11.StyleSheet.create({
|
|
|
1824
1891
|
|
|
1825
1892
|
// src/widgets/WidgetWebView.tsx
|
|
1826
1893
|
var import_react10 = require("react");
|
|
1827
|
-
var
|
|
1894
|
+
var import_react_native13 = require("react-native");
|
|
1828
1895
|
var import_react_native_webview2 = require("react-native-webview");
|
|
1829
|
-
var import_core13 = require("@ateam-ai-mobile/core");
|
|
1830
1896
|
var import_core14 = require("@ateam-ai-mobile/core");
|
|
1831
|
-
var
|
|
1832
|
-
var
|
|
1897
|
+
var import_core15 = require("@ateam-ai-mobile/core");
|
|
1898
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
1899
|
+
var fontFam5 = import_react_native13.Platform.OS === "ios" ? "SF Pro Rounded" : void 0;
|
|
1833
1900
|
function WidgetWebView({ visible, title, bundleUrl, onClose }) {
|
|
1834
1901
|
const [loading, setLoading] = (0, import_react10.useState)(true);
|
|
1835
1902
|
const [error, setError] = (0, import_react10.useState)(null);
|
|
1836
1903
|
const uri = (0, import_react10.useMemo)(() => {
|
|
1837
1904
|
if (!bundleUrl) return null;
|
|
1838
1905
|
if (/^https?:\/\//i.test(bundleUrl)) return bundleUrl;
|
|
1839
|
-
return `${(0,
|
|
1906
|
+
return `${(0, import_core15.getCoreApiUrl)()}${bundleUrl}`;
|
|
1840
1907
|
}, [bundleUrl]);
|
|
1841
|
-
return /* @__PURE__ */ (0,
|
|
1842
|
-
|
|
1908
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1909
|
+
import_react_native13.Modal,
|
|
1843
1910
|
{
|
|
1844
1911
|
visible,
|
|
1845
1912
|
animationType: "slide",
|
|
1846
1913
|
presentationStyle: "pageSheet",
|
|
1847
1914
|
onRequestClose: onClose,
|
|
1848
|
-
children: /* @__PURE__ */ (0,
|
|
1849
|
-
/* @__PURE__ */ (0,
|
|
1850
|
-
/* @__PURE__ */ (0,
|
|
1851
|
-
/* @__PURE__ */ (0,
|
|
1852
|
-
/* @__PURE__ */ (0,
|
|
1915
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native13.View, { style: styles12.root, children: [
|
|
1916
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native13.View, { style: styles12.bar, children: [
|
|
1917
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native13.Pressable, { onPress: onClose, hitSlop: 12, style: styles12.closeBtn, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native13.Text, { style: styles12.closeIcon, children: "\u2715" }) }),
|
|
1918
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native13.Text, { style: styles12.title, numberOfLines: 1, children: title || "Widget" }),
|
|
1919
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native13.View, { style: styles12.closeBtn })
|
|
1853
1920
|
] }),
|
|
1854
|
-
!uri ? /* @__PURE__ */ (0,
|
|
1855
|
-
/* @__PURE__ */ (0,
|
|
1856
|
-
/* @__PURE__ */ (0,
|
|
1857
|
-
] }) : /* @__PURE__ */ (0,
|
|
1858
|
-
/* @__PURE__ */ (0,
|
|
1921
|
+
!uri ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native13.View, { style: styles12.errorWrap, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native13.Text, { style: styles12.errorText, children: "No bundle available for this widget." }) }) : error ? /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native13.View, { style: styles12.errorWrap, children: [
|
|
1922
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native13.Text, { style: styles12.errorText, children: "Couldn't load widget" }),
|
|
1923
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native13.Text, { style: styles12.errorSub, children: error })
|
|
1924
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_jsx_runtime14.Fragment, { children: [
|
|
1925
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
1859
1926
|
import_react_native_webview2.WebView,
|
|
1860
1927
|
{
|
|
1861
1928
|
source: { uri },
|
|
1862
|
-
style:
|
|
1929
|
+
style: styles12.web,
|
|
1863
1930
|
onLoadStart: () => {
|
|
1864
1931
|
setLoading(true);
|
|
1865
1932
|
setError(null);
|
|
@@ -1877,16 +1944,16 @@ function WidgetWebView({ visible, title, bundleUrl, onClose }) {
|
|
|
1877
1944
|
setSupportMultipleWindows: false
|
|
1878
1945
|
}
|
|
1879
1946
|
),
|
|
1880
|
-
loading && /* @__PURE__ */ (0,
|
|
1947
|
+
loading && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native13.View, { pointerEvents: "none", style: styles12.spinner, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native13.ActivityIndicator, { color: import_core14.ada.orange }) })
|
|
1881
1948
|
] })
|
|
1882
1949
|
] })
|
|
1883
1950
|
}
|
|
1884
1951
|
);
|
|
1885
1952
|
}
|
|
1886
|
-
var
|
|
1953
|
+
var styles12 = import_react_native13.StyleSheet.create({
|
|
1887
1954
|
root: {
|
|
1888
1955
|
flex: 1,
|
|
1889
|
-
backgroundColor:
|
|
1956
|
+
backgroundColor: import_core14.ada.paper
|
|
1890
1957
|
},
|
|
1891
1958
|
bar: {
|
|
1892
1959
|
flexDirection: "row",
|
|
@@ -1894,8 +1961,8 @@ var styles11 = import_react_native12.StyleSheet.create({
|
|
|
1894
1961
|
paddingHorizontal: 14,
|
|
1895
1962
|
paddingVertical: 12,
|
|
1896
1963
|
borderBottomWidth: 1,
|
|
1897
|
-
borderBottomColor:
|
|
1898
|
-
backgroundColor:
|
|
1964
|
+
borderBottomColor: import_core14.ada.border,
|
|
1965
|
+
backgroundColor: import_core14.ada.paperSoft
|
|
1899
1966
|
},
|
|
1900
1967
|
closeBtn: {
|
|
1901
1968
|
width: 32,
|
|
@@ -1905,7 +1972,7 @@ var styles11 = import_react_native12.StyleSheet.create({
|
|
|
1905
1972
|
},
|
|
1906
1973
|
closeIcon: {
|
|
1907
1974
|
fontSize: 18,
|
|
1908
|
-
color:
|
|
1975
|
+
color: import_core14.ada.ink,
|
|
1909
1976
|
fontWeight: "500"
|
|
1910
1977
|
},
|
|
1911
1978
|
title: {
|
|
@@ -1913,13 +1980,13 @@ var styles11 = import_react_native12.StyleSheet.create({
|
|
|
1913
1980
|
textAlign: "center",
|
|
1914
1981
|
fontSize: 16,
|
|
1915
1982
|
fontWeight: "600",
|
|
1916
|
-
color:
|
|
1917
|
-
fontFamily:
|
|
1983
|
+
color: import_core14.ada.ink,
|
|
1984
|
+
fontFamily: fontFam5,
|
|
1918
1985
|
letterSpacing: -0.2
|
|
1919
1986
|
},
|
|
1920
1987
|
web: {
|
|
1921
1988
|
flex: 1,
|
|
1922
|
-
backgroundColor:
|
|
1989
|
+
backgroundColor: import_core14.ada.paper
|
|
1923
1990
|
},
|
|
1924
1991
|
spinner: {
|
|
1925
1992
|
position: "absolute",
|
|
@@ -1936,31 +2003,31 @@ var styles11 = import_react_native12.StyleSheet.create({
|
|
|
1936
2003
|
},
|
|
1937
2004
|
errorText: {
|
|
1938
2005
|
fontSize: 15,
|
|
1939
|
-
color:
|
|
2006
|
+
color: import_core14.ada.ink,
|
|
1940
2007
|
fontWeight: "600",
|
|
1941
2008
|
marginBottom: 6
|
|
1942
2009
|
},
|
|
1943
2010
|
errorSub: {
|
|
1944
2011
|
fontSize: 13,
|
|
1945
|
-
color:
|
|
2012
|
+
color: import_core14.ada.inkMuted,
|
|
1946
2013
|
textAlign: "center"
|
|
1947
2014
|
}
|
|
1948
2015
|
});
|
|
1949
2016
|
|
|
1950
2017
|
// src/TenantPicker.tsx
|
|
1951
2018
|
var import_react11 = require("react");
|
|
1952
|
-
var
|
|
1953
|
-
var
|
|
1954
|
-
var
|
|
1955
|
-
var
|
|
2019
|
+
var import_react_native14 = require("react-native");
|
|
2020
|
+
var import_core16 = require("@ateam-ai-mobile/core");
|
|
2021
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
2022
|
+
var fontFam6 = import_react_native14.Platform.OS === "ios" ? "SF Pro Rounded" : void 0;
|
|
1956
2023
|
function TenantPicker({ onSwitched, onSelect, currentTenantId }) {
|
|
1957
2024
|
const [tenants, setTenants] = (0, import_react11.useState)(null);
|
|
1958
2025
|
const [error, setError] = (0, import_react11.useState)(null);
|
|
1959
2026
|
const [switching, setSwitching] = (0, import_react11.useState)(null);
|
|
1960
|
-
const active = currentTenantId ?? (0,
|
|
2027
|
+
const active = currentTenantId ?? (0, import_core16.getTenant)();
|
|
1961
2028
|
(0, import_react11.useEffect)(() => {
|
|
1962
2029
|
let cancelled = false;
|
|
1963
|
-
(0,
|
|
2030
|
+
(0, import_core16.listMyTenants)().then((list) => {
|
|
1964
2031
|
if (!cancelled) setTenants(list);
|
|
1965
2032
|
}).catch((e) => {
|
|
1966
2033
|
if (!cancelled) setError(e?.message || "Failed to load teams");
|
|
@@ -1978,7 +2045,7 @@ function TenantPicker({ onSwitched, onSelect, currentTenantId }) {
|
|
|
1978
2045
|
setError(null);
|
|
1979
2046
|
setSwitching(t.id);
|
|
1980
2047
|
try {
|
|
1981
|
-
const session = await (0,
|
|
2048
|
+
const session = await (0, import_core16.switchTenant)(t.id);
|
|
1982
2049
|
onSwitched?.(session);
|
|
1983
2050
|
} catch (e) {
|
|
1984
2051
|
setError(e?.message || "Could not switch team");
|
|
@@ -1986,36 +2053,36 @@ function TenantPicker({ onSwitched, onSelect, currentTenantId }) {
|
|
|
1986
2053
|
setSwitching(null);
|
|
1987
2054
|
}
|
|
1988
2055
|
};
|
|
1989
|
-
if (error) return /* @__PURE__ */ (0,
|
|
2056
|
+
if (error) return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native14.Text, { style: styles13.error, children: error });
|
|
1990
2057
|
if (!tenants) {
|
|
1991
|
-
return /* @__PURE__ */ (0,
|
|
2058
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native14.View, { style: styles13.loading, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native14.ActivityIndicator, { color: import_core16.ada.orange }) });
|
|
1992
2059
|
}
|
|
1993
|
-
if (tenants.length === 0) return /* @__PURE__ */ (0,
|
|
1994
|
-
return /* @__PURE__ */ (0,
|
|
2060
|
+
if (tenants.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native14.Text, { style: styles13.empty, children: "No teams found for this account." });
|
|
2061
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native14.View, { style: styles13.list, children: tenants.map((t) => {
|
|
1995
2062
|
const isActive = t.id === active;
|
|
1996
2063
|
const isSwitching = switching === t.id;
|
|
1997
|
-
return /* @__PURE__ */ (0,
|
|
1998
|
-
|
|
2064
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
2065
|
+
import_react_native14.Pressable,
|
|
1999
2066
|
{
|
|
2000
2067
|
accessibilityRole: "button",
|
|
2001
2068
|
accessibilityLabel: `Team ${t.name}${isActive ? ", current" : ""}`,
|
|
2002
2069
|
disabled: !!switching,
|
|
2003
2070
|
onPress: () => handlePress(t),
|
|
2004
|
-
style: [
|
|
2071
|
+
style: [styles13.row, isActive && styles13.rowActive],
|
|
2005
2072
|
children: [
|
|
2006
|
-
/* @__PURE__ */ (0,
|
|
2007
|
-
/* @__PURE__ */ (0,
|
|
2008
|
-
/* @__PURE__ */ (0,
|
|
2009
|
-
/* @__PURE__ */ (0,
|
|
2073
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native14.View, { style: styles13.dot }),
|
|
2074
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native14.View, { style: styles13.rowText, children: [
|
|
2075
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native14.Text, { style: styles13.name, children: t.name }),
|
|
2076
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native14.Text, { style: styles13.slug, children: t.id })
|
|
2010
2077
|
] }),
|
|
2011
|
-
isSwitching ? /* @__PURE__ */ (0,
|
|
2078
|
+
isSwitching ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native14.ActivityIndicator, { color: import_core16.ada.orange }) : isActive ? /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native14.Text, { style: styles13.check, children: "\u2713" }) : null
|
|
2012
2079
|
]
|
|
2013
2080
|
},
|
|
2014
2081
|
t.id
|
|
2015
2082
|
);
|
|
2016
2083
|
}) });
|
|
2017
2084
|
}
|
|
2018
|
-
var
|
|
2085
|
+
var styles13 = import_react_native14.StyleSheet.create({
|
|
2019
2086
|
list: {
|
|
2020
2087
|
gap: 10
|
|
2021
2088
|
},
|
|
@@ -2023,40 +2090,40 @@ var styles12 = import_react_native13.StyleSheet.create({
|
|
|
2023
2090
|
flexDirection: "row",
|
|
2024
2091
|
alignItems: "center",
|
|
2025
2092
|
gap: 12,
|
|
2026
|
-
backgroundColor:
|
|
2027
|
-
borderRadius:
|
|
2093
|
+
backgroundColor: import_core16.ada.paperSoft,
|
|
2094
|
+
borderRadius: import_core16.borderRadius.lg,
|
|
2028
2095
|
borderWidth: 1,
|
|
2029
2096
|
borderColor: "transparent",
|
|
2030
2097
|
paddingHorizontal: 16,
|
|
2031
2098
|
paddingVertical: 14
|
|
2032
2099
|
},
|
|
2033
2100
|
rowActive: {
|
|
2034
|
-
backgroundColor:
|
|
2035
|
-
borderColor:
|
|
2101
|
+
backgroundColor: import_core16.ada.orangeSoft,
|
|
2102
|
+
borderColor: import_core16.ada.orange
|
|
2036
2103
|
},
|
|
2037
2104
|
dot: {
|
|
2038
2105
|
width: 10,
|
|
2039
2106
|
height: 10,
|
|
2040
2107
|
borderRadius: 5,
|
|
2041
|
-
backgroundColor:
|
|
2108
|
+
backgroundColor: import_core16.ada.orange
|
|
2042
2109
|
},
|
|
2043
2110
|
rowText: {
|
|
2044
2111
|
flex: 1
|
|
2045
2112
|
},
|
|
2046
2113
|
name: {
|
|
2047
|
-
color:
|
|
2048
|
-
fontSize:
|
|
2114
|
+
color: import_core16.ada.ink,
|
|
2115
|
+
fontSize: import_core16.fontSize.lg,
|
|
2049
2116
|
fontWeight: "600",
|
|
2050
|
-
fontFamily:
|
|
2117
|
+
fontFamily: fontFam6
|
|
2051
2118
|
},
|
|
2052
2119
|
slug: {
|
|
2053
|
-
color:
|
|
2054
|
-
fontSize:
|
|
2120
|
+
color: import_core16.ada.inkMuted,
|
|
2121
|
+
fontSize: import_core16.fontSize.sm,
|
|
2055
2122
|
fontFamily: "monospace"
|
|
2056
2123
|
},
|
|
2057
2124
|
check: {
|
|
2058
|
-
color:
|
|
2059
|
-
fontSize:
|
|
2125
|
+
color: import_core16.ada.orangeDeep,
|
|
2126
|
+
fontSize: import_core16.fontSize.lg,
|
|
2060
2127
|
fontWeight: "700"
|
|
2061
2128
|
},
|
|
2062
2129
|
loading: {
|
|
@@ -2064,14 +2131,14 @@ var styles12 = import_react_native13.StyleSheet.create({
|
|
|
2064
2131
|
alignItems: "center"
|
|
2065
2132
|
},
|
|
2066
2133
|
empty: {
|
|
2067
|
-
color:
|
|
2068
|
-
fontSize:
|
|
2134
|
+
color: import_core16.ada.inkMuted,
|
|
2135
|
+
fontSize: import_core16.fontSize.md,
|
|
2069
2136
|
textAlign: "center",
|
|
2070
2137
|
paddingVertical: 16
|
|
2071
2138
|
},
|
|
2072
2139
|
error: {
|
|
2073
2140
|
color: "#C15545",
|
|
2074
|
-
fontSize:
|
|
2141
|
+
fontSize: import_core16.fontSize.md,
|
|
2075
2142
|
textAlign: "center",
|
|
2076
2143
|
paddingVertical: 16
|
|
2077
2144
|
}
|
|
@@ -2079,15 +2146,15 @@ var styles12 = import_react_native13.StyleSheet.create({
|
|
|
2079
2146
|
|
|
2080
2147
|
// src/voice/VoiceCallSheet.tsx
|
|
2081
2148
|
var import_react13 = require("react");
|
|
2082
|
-
var
|
|
2149
|
+
var import_react_native15 = require("react-native");
|
|
2083
2150
|
var import_react_native_svg2 = __toESM(require("react-native-svg"));
|
|
2084
2151
|
var import_react_native_webview3 = require("react-native-webview");
|
|
2085
|
-
var
|
|
2152
|
+
var import_core18 = require("@ateam-ai-mobile/core");
|
|
2086
2153
|
var import_plugin_runtime9 = require("@ateam-ai-mobile/plugin-runtime");
|
|
2087
2154
|
|
|
2088
2155
|
// src/voice/useVoiceCall.ts
|
|
2089
2156
|
var import_react12 = require("react");
|
|
2090
|
-
var
|
|
2157
|
+
var import_core17 = require("@ateam-ai-mobile/core");
|
|
2091
2158
|
var TOKEN_REFRESH_SKEW_MS = 9e4;
|
|
2092
2159
|
function tokenNeedsRefresh(token) {
|
|
2093
2160
|
if (!token) return true;
|
|
@@ -2239,8 +2306,8 @@ function useVoiceCall({ skillSlug } = {}) {
|
|
|
2239
2306
|
setAiPartial("");
|
|
2240
2307
|
setUserPartial("");
|
|
2241
2308
|
try {
|
|
2242
|
-
if (tokenNeedsRefresh((0,
|
|
2243
|
-
await (0,
|
|
2309
|
+
if (tokenNeedsRefresh((0, import_core17.getToken)())) {
|
|
2310
|
+
await (0, import_core17.refreshToken)();
|
|
2244
2311
|
}
|
|
2245
2312
|
} catch {
|
|
2246
2313
|
}
|
|
@@ -2261,12 +2328,12 @@ function useVoiceCall({ skillSlug } = {}) {
|
|
|
2261
2328
|
});
|
|
2262
2329
|
}, []);
|
|
2263
2330
|
const getWebViewSource = (0, import_react12.useCallback)(() => {
|
|
2264
|
-
const token = (0,
|
|
2265
|
-
const tenant = (0,
|
|
2266
|
-
const actorId = (0,
|
|
2331
|
+
const token = (0, import_core17.getToken)();
|
|
2332
|
+
const tenant = (0, import_core17.getTenant)();
|
|
2333
|
+
const actorId = (0, import_core17.getUser)()?.actorId || "";
|
|
2267
2334
|
const skillParam = skillSlug ? `&skillSlug=${encodeURIComponent(skillSlug)}` : "";
|
|
2268
2335
|
return {
|
|
2269
|
-
uri: `${(0,
|
|
2336
|
+
uri: `${(0, import_core17.getVoiceApiUrl)()}/app?mode=mini&embedded=rn&authToken=${encodeURIComponent(token || "")}&tenant=${encodeURIComponent(tenant)}&actorId=${encodeURIComponent(actorId)}${skillParam}`
|
|
2270
2337
|
};
|
|
2271
2338
|
}, [skillSlug]);
|
|
2272
2339
|
return {
|
|
@@ -2288,8 +2355,8 @@ function useVoiceCall({ skillSlug } = {}) {
|
|
|
2288
2355
|
}
|
|
2289
2356
|
|
|
2290
2357
|
// src/voice/VoiceCallSheet.tsx
|
|
2291
|
-
var
|
|
2292
|
-
var
|
|
2358
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
2359
|
+
var fontFam7 = import_react_native15.Platform.OS === "ios" ? "SF Pro Rounded" : void 0;
|
|
2293
2360
|
var HIGHLIGHT_PATTERNS = [
|
|
2294
2361
|
/[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}/g,
|
|
2295
2362
|
/(?:\+?\d[\s\-().]?){7,}\d/g,
|
|
@@ -2333,7 +2400,7 @@ function HighlightedText({
|
|
|
2333
2400
|
importantStyle
|
|
2334
2401
|
}) {
|
|
2335
2402
|
const segments = (0, import_react13.useMemo)(() => highlightSegments(text), [text]);
|
|
2336
|
-
return /* @__PURE__ */ (0,
|
|
2403
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native15.Text, { style: baseStyle, children: segments.map((seg, i) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native15.Text, { style: seg.important ? importantStyle : void 0, children: seg.text }, i)) });
|
|
2337
2404
|
}
|
|
2338
2405
|
function VoiceCallSheet({ visible, onClose, skillSlug }) {
|
|
2339
2406
|
const {
|
|
@@ -2379,72 +2446,72 @@ function VoiceCallSheet({ visible, onClose, skillSlug }) {
|
|
|
2379
2446
|
}, [callState, aiPartial, userPartial, error]);
|
|
2380
2447
|
if (!visible) return null;
|
|
2381
2448
|
const visibleEntries = transcript.filter((e) => e.role === "user" || e.role === "ai");
|
|
2382
|
-
return /* @__PURE__ */ (0,
|
|
2449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
2383
2450
|
import_plugin_runtime9.SurfaceFullscreen,
|
|
2384
2451
|
{
|
|
2385
2452
|
visible,
|
|
2386
2453
|
onClose: handleHangUp,
|
|
2387
2454
|
status: statusLabel,
|
|
2388
|
-
hero: /* @__PURE__ */ (0,
|
|
2455
|
+
hero: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_plugin_runtime9.AdaOrb, { size: 180, state: orbState }),
|
|
2389
2456
|
closeIcon: "hangup",
|
|
2390
2457
|
closeLabel: "End",
|
|
2391
2458
|
children: [
|
|
2392
|
-
/* @__PURE__ */ (0,
|
|
2393
|
-
|
|
2459
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
2460
|
+
import_react_native15.ScrollView,
|
|
2394
2461
|
{
|
|
2395
2462
|
ref: scrollRef,
|
|
2396
|
-
style:
|
|
2397
|
-
contentContainerStyle:
|
|
2463
|
+
style: styles14.transcript,
|
|
2464
|
+
contentContainerStyle: styles14.transcriptContent,
|
|
2398
2465
|
showsVerticalScrollIndicator: false,
|
|
2399
2466
|
children: [
|
|
2400
|
-
callState === "error" && error ? /* @__PURE__ */ (0,
|
|
2401
|
-
visibleEntries.map((entry, i) => /* @__PURE__ */ (0,
|
|
2402
|
-
/* @__PURE__ */ (0,
|
|
2403
|
-
/* @__PURE__ */ (0,
|
|
2467
|
+
callState === "error" && error ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native15.View, { style: styles14.errorBox, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native15.Text, { style: styles14.errorText, children: error }) }) : null,
|
|
2468
|
+
visibleEntries.map((entry, i) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native15.View, { style: styles14.entry, children: [
|
|
2469
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native15.Text, { style: styles14.role, children: entry.role === "user" ? "YOU" : "ADA" }),
|
|
2470
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2404
2471
|
HighlightedText,
|
|
2405
2472
|
{
|
|
2406
2473
|
text: entry.text,
|
|
2407
|
-
baseStyle:
|
|
2408
|
-
importantStyle:
|
|
2474
|
+
baseStyle: styles14.entryText,
|
|
2475
|
+
importantStyle: styles14.important
|
|
2409
2476
|
}
|
|
2410
2477
|
)
|
|
2411
2478
|
] }, `${entry.ts}-${i}`)),
|
|
2412
|
-
userPartial || aiPartial ? /* @__PURE__ */ (0,
|
|
2413
|
-
/* @__PURE__ */ (0,
|
|
2414
|
-
/* @__PURE__ */ (0,
|
|
2479
|
+
userPartial || aiPartial ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native15.View, { style: styles14.entry, children: [
|
|
2480
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native15.Text, { style: styles14.role, children: userPartial ? "YOU" : "ADA" }),
|
|
2481
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2415
2482
|
HighlightedText,
|
|
2416
2483
|
{
|
|
2417
2484
|
text: userPartial || aiPartial,
|
|
2418
|
-
baseStyle:
|
|
2419
|
-
importantStyle:
|
|
2485
|
+
baseStyle: styles14.entryTextLive,
|
|
2486
|
+
importantStyle: styles14.important
|
|
2420
2487
|
}
|
|
2421
2488
|
)
|
|
2422
2489
|
] }) : null
|
|
2423
2490
|
]
|
|
2424
2491
|
}
|
|
2425
2492
|
),
|
|
2426
|
-
callState === "connected" || callState === "connecting" ? /* @__PURE__ */ (0,
|
|
2427
|
-
/* @__PURE__ */ (0,
|
|
2428
|
-
|
|
2493
|
+
callState === "connected" || callState === "connecting" ? /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native15.View, { style: styles14.muteWrap, pointerEvents: "box-none", children: [
|
|
2494
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2495
|
+
import_react_native15.Pressable,
|
|
2429
2496
|
{
|
|
2430
2497
|
onPress: toggleMute,
|
|
2431
2498
|
accessibilityRole: "button",
|
|
2432
2499
|
accessibilityLabel: muted ? "Unmute microphone" : "Mute microphone",
|
|
2433
2500
|
accessibilityState: { selected: muted },
|
|
2434
|
-
style: [
|
|
2501
|
+
style: [styles14.muteBtn, muted && styles14.muteBtnActive],
|
|
2435
2502
|
hitSlop: 12,
|
|
2436
|
-
children: /* @__PURE__ */ (0,
|
|
2437
|
-
/* @__PURE__ */ (0,
|
|
2438
|
-
/* @__PURE__ */ (0,
|
|
2439
|
-
/* @__PURE__ */ (0,
|
|
2440
|
-
/* @__PURE__ */ (0,
|
|
2441
|
-
muted ? /* @__PURE__ */ (0,
|
|
2503
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native_svg2.default, { width: 22, height: 22, viewBox: "0 0 24 24", fill: "none", stroke: muted ? import_core18.ada.paper : import_core18.ada.ink, strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", children: [
|
|
2504
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native_svg2.Path, { d: "M12 1a3 3 0 0 0-3 3v8a3 3 0 0 0 6 0V4a3 3 0 0 0-3-3z" }),
|
|
2505
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native_svg2.Path, { d: "M19 10v2a7 7 0 0 1-14 0v-2" }),
|
|
2506
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native_svg2.Line, { x1: "12", y1: "19", x2: "12", y2: "23" }),
|
|
2507
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native_svg2.Line, { x1: "8", y1: "23", x2: "16", y2: "23" }),
|
|
2508
|
+
muted ? /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native_svg2.Line, { x1: "3", y1: "3", x2: "21", y2: "21", stroke: import_core18.ada.paper, strokeWidth: 2.4 }) : null
|
|
2442
2509
|
] })
|
|
2443
2510
|
}
|
|
2444
2511
|
),
|
|
2445
|
-
/* @__PURE__ */ (0,
|
|
2512
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native15.Text, { style: styles14.muteLabel, children: muted ? "Muted" : "Mute" })
|
|
2446
2513
|
] }) : null,
|
|
2447
|
-
callState !== "idle" && /* @__PURE__ */ (0,
|
|
2514
|
+
callState !== "idle" && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native15.View, { style: styles14.hiddenWebView, pointerEvents: "none", children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
2448
2515
|
import_react_native_webview3.WebView,
|
|
2449
2516
|
{
|
|
2450
2517
|
ref: webViewRef,
|
|
@@ -2464,7 +2531,7 @@ function VoiceCallSheet({ visible, onClose, skillSlug }) {
|
|
|
2464
2531
|
}
|
|
2465
2532
|
);
|
|
2466
2533
|
}
|
|
2467
|
-
var
|
|
2534
|
+
var styles14 = import_react_native15.StyleSheet.create({
|
|
2468
2535
|
transcript: {
|
|
2469
2536
|
flex: 1,
|
|
2470
2537
|
paddingHorizontal: 28
|
|
@@ -2481,9 +2548,9 @@ var styles13 = import_react_native14.StyleSheet.create({
|
|
|
2481
2548
|
},
|
|
2482
2549
|
role: {
|
|
2483
2550
|
fontSize: 10,
|
|
2484
|
-
fontFamily:
|
|
2551
|
+
fontFamily: fontFam7,
|
|
2485
2552
|
fontWeight: "700",
|
|
2486
|
-
color:
|
|
2553
|
+
color: import_core18.ada.inkMuted,
|
|
2487
2554
|
letterSpacing: 1.4,
|
|
2488
2555
|
minWidth: 32,
|
|
2489
2556
|
paddingTop: 3,
|
|
@@ -2492,9 +2559,9 @@ var styles13 = import_react_native14.StyleSheet.create({
|
|
|
2492
2559
|
entryText: {
|
|
2493
2560
|
flex: 1,
|
|
2494
2561
|
fontSize: 14,
|
|
2495
|
-
fontFamily:
|
|
2562
|
+
fontFamily: fontFam7,
|
|
2496
2563
|
fontWeight: "400",
|
|
2497
|
-
color:
|
|
2564
|
+
color: import_core18.ada.inkSoft,
|
|
2498
2565
|
lineHeight: 20,
|
|
2499
2566
|
letterSpacing: -0.1,
|
|
2500
2567
|
opacity: 0.42
|
|
@@ -2502,18 +2569,18 @@ var styles13 = import_react_native14.StyleSheet.create({
|
|
|
2502
2569
|
entryTextLive: {
|
|
2503
2570
|
flex: 1,
|
|
2504
2571
|
fontSize: 14,
|
|
2505
|
-
fontFamily:
|
|
2572
|
+
fontFamily: fontFam7,
|
|
2506
2573
|
fontWeight: "400",
|
|
2507
|
-
color:
|
|
2574
|
+
color: import_core18.ada.inkSoft,
|
|
2508
2575
|
lineHeight: 20,
|
|
2509
2576
|
letterSpacing: -0.1,
|
|
2510
2577
|
opacity: 0.7
|
|
2511
2578
|
},
|
|
2512
2579
|
important: {
|
|
2513
2580
|
fontSize: 17,
|
|
2514
|
-
fontFamily:
|
|
2581
|
+
fontFamily: fontFam7,
|
|
2515
2582
|
fontWeight: "700",
|
|
2516
|
-
color:
|
|
2583
|
+
color: import_core18.ada.ink,
|
|
2517
2584
|
letterSpacing: -0.1,
|
|
2518
2585
|
opacity: 1
|
|
2519
2586
|
},
|
|
@@ -2528,14 +2595,14 @@ var styles13 = import_react_native14.StyleSheet.create({
|
|
|
2528
2595
|
},
|
|
2529
2596
|
errorText: {
|
|
2530
2597
|
fontSize: 13,
|
|
2531
|
-
fontFamily:
|
|
2598
|
+
fontFamily: fontFam7,
|
|
2532
2599
|
fontWeight: "500",
|
|
2533
2600
|
color: "#fca5a5",
|
|
2534
2601
|
lineHeight: 18
|
|
2535
2602
|
},
|
|
2536
2603
|
muteWrap: {
|
|
2537
2604
|
position: "absolute",
|
|
2538
|
-
bottom:
|
|
2605
|
+
bottom: import_react_native15.Platform.OS === "ios" ? 56 : 40,
|
|
2539
2606
|
left: 28,
|
|
2540
2607
|
alignItems: "center",
|
|
2541
2608
|
gap: 6
|
|
@@ -2544,9 +2611,9 @@ var styles13 = import_react_native14.StyleSheet.create({
|
|
|
2544
2611
|
width: 56,
|
|
2545
2612
|
height: 56,
|
|
2546
2613
|
borderRadius: 28,
|
|
2547
|
-
backgroundColor:
|
|
2614
|
+
backgroundColor: import_core18.ada.paperSoft,
|
|
2548
2615
|
borderWidth: 1,
|
|
2549
|
-
borderColor:
|
|
2616
|
+
borderColor: import_core18.ada.border,
|
|
2550
2617
|
justifyContent: "center",
|
|
2551
2618
|
alignItems: "center"
|
|
2552
2619
|
},
|
|
@@ -2556,9 +2623,9 @@ var styles13 = import_react_native14.StyleSheet.create({
|
|
|
2556
2623
|
},
|
|
2557
2624
|
muteLabel: {
|
|
2558
2625
|
fontSize: 12,
|
|
2559
|
-
fontFamily:
|
|
2626
|
+
fontFamily: fontFam7,
|
|
2560
2627
|
fontWeight: "500",
|
|
2561
|
-
color:
|
|
2628
|
+
color: import_core18.ada.inkMuted,
|
|
2562
2629
|
letterSpacing: 0.3
|
|
2563
2630
|
},
|
|
2564
2631
|
hiddenWebView: {
|