@base44/superagent-native 0.0.2 → 0.0.3
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/lib/commonjs/AgentSettingsPanel.js +123 -47
- package/lib/commonjs/AgentSettingsPanel.js.map +1 -1
- package/lib/commonjs/AgentSphereIcon.js +14 -118
- package/lib/commonjs/AgentSphereIcon.js.map +1 -1
- package/lib/commonjs/AttachmentPickerStatusModal.js +3 -2
- package/lib/commonjs/AttachmentPickerStatusModal.js.map +1 -1
- package/lib/commonjs/ChannelsPanel.js +66 -44
- package/lib/commonjs/ChannelsPanel.js.map +1 -1
- package/lib/commonjs/ConversationChat.js +11 -2
- package/lib/commonjs/ConversationChat.js.map +1 -1
- package/lib/commonjs/ConversationComposer.js +8 -7
- package/lib/commonjs/ConversationComposer.js.map +1 -1
- package/lib/commonjs/ConversationScreen.js +2 -0
- package/lib/commonjs/ConversationScreen.js.map +1 -1
- package/lib/commonjs/EditorDrawer.js +54 -24
- package/lib/commonjs/EditorDrawer.js.map +1 -1
- package/lib/commonjs/FilesPanel.js +56 -20
- package/lib/commonjs/FilesPanel.js.map +1 -1
- package/lib/commonjs/RenameAgentModal.js +2 -1
- package/lib/commonjs/RenameAgentModal.js.map +1 -1
- package/lib/commonjs/ShareAgentModal.js +11 -10
- package/lib/commonjs/ShareAgentModal.js.map +1 -1
- package/lib/commonjs/ShareAgentModal.styles.js +2 -2
- package/lib/commonjs/ShareAgentModal.styles.js.map +1 -1
- package/lib/commonjs/SuperagentHomeScreen.js +27 -9
- package/lib/commonjs/SuperagentHomeScreen.js.map +1 -1
- package/lib/commonjs/ToolApprovalCard.js +72 -14
- package/lib/commonjs/ToolApprovalCard.js.map +1 -1
- package/lib/commonjs/ToolCallSummary.js +14 -9
- package/lib/commonjs/ToolCallSummary.js.map +1 -1
- package/lib/commonjs/agentSphereAssets.js +327 -0
- package/lib/commonjs/agentSphereAssets.js.map +1 -0
- package/lib/commonjs/agentSphereStyles.js +3 -3
- package/lib/commonjs/agentSphereStyles.js.map +1 -1
- package/lib/commonjs/apiClient.js +7 -0
- package/lib/commonjs/apiClient.js.map +1 -1
- package/lib/commonjs/composerStyles.js +2 -2
- package/lib/commonjs/composerStyles.js.map +1 -1
- package/lib/commonjs/connectorBrandIcons.generated.js +625 -0
- package/lib/commonjs/connectorBrandIcons.generated.js.map +1 -0
- package/lib/commonjs/connectorBrandIcons.js +3 -55
- package/lib/commonjs/connectorBrandIcons.js.map +1 -1
- package/lib/commonjs/connectorCatalog.js +19 -1
- package/lib/commonjs/connectorCatalog.js.map +1 -1
- package/lib/commonjs/conversationParts.js +5 -4
- package/lib/commonjs/conversationParts.js.map +1 -1
- package/lib/commonjs/conversationRuntime.js +120 -12
- package/lib/commonjs/conversationRuntime.js.map +1 -1
- package/lib/commonjs/conversationStyles.js +2 -1
- package/lib/commonjs/conversationStyles.js.map +1 -1
- package/lib/commonjs/editorShellStyles.js +6 -2
- package/lib/commonjs/editorShellStyles.js.map +1 -1
- package/lib/commonjs/index.js +7 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/markdownStyles.js +2 -2
- package/lib/commonjs/markdownStyles.js.map +1 -1
- package/lib/commonjs/messageActionStyles.js +2 -2
- package/lib/commonjs/messageActionStyles.js.map +1 -1
- package/lib/commonjs/realtimeClient.js +4 -1
- package/lib/commonjs/realtimeClient.js.map +1 -1
- package/lib/commonjs/renameAgentModalStyles.js +2 -2
- package/lib/commonjs/renameAgentModalStyles.js.map +1 -1
- package/lib/commonjs/screenParts.js +24 -41
- package/lib/commonjs/screenParts.js.map +1 -1
- package/lib/commonjs/styles.js +71 -60
- package/lib/commonjs/styles.js.map +1 -1
- package/lib/commonjs/superagentApiClient.js +63 -18
- package/lib/commonjs/superagentApiClient.js.map +1 -1
- package/lib/commonjs/theme.js +249 -0
- package/lib/commonjs/theme.js.map +1 -0
- package/lib/commonjs/useSuperagentConversation.js +133 -20
- package/lib/commonjs/useSuperagentConversation.js.map +1 -1
- package/lib/commonjs/useSuperagentRuntime.js +167 -82
- package/lib/commonjs/useSuperagentRuntime.js.map +1 -1
- package/lib/module/AgentSettingsPanel.js +125 -49
- package/lib/module/AgentSettingsPanel.js.map +1 -1
- package/lib/module/AgentSphereIcon.js +15 -118
- package/lib/module/AgentSphereIcon.js.map +1 -1
- package/lib/module/AttachmentPickerStatusModal.js +4 -3
- package/lib/module/AttachmentPickerStatusModal.js.map +1 -1
- package/lib/module/ChannelsPanel.js +67 -45
- package/lib/module/ChannelsPanel.js.map +1 -1
- package/lib/module/ConversationChat.js +11 -2
- package/lib/module/ConversationChat.js.map +1 -1
- package/lib/module/ConversationComposer.js +8 -7
- package/lib/module/ConversationComposer.js.map +1 -1
- package/lib/module/ConversationScreen.js +2 -0
- package/lib/module/ConversationScreen.js.map +1 -1
- package/lib/module/EditorDrawer.js +55 -25
- package/lib/module/EditorDrawer.js.map +1 -1
- package/lib/module/FilesPanel.js +56 -20
- package/lib/module/FilesPanel.js.map +1 -1
- package/lib/module/RenameAgentModal.js +2 -1
- package/lib/module/RenameAgentModal.js.map +1 -1
- package/lib/module/ShareAgentModal.js +11 -10
- package/lib/module/ShareAgentModal.js.map +1 -1
- package/lib/module/ShareAgentModal.styles.js +2 -2
- package/lib/module/ShareAgentModal.styles.js.map +1 -1
- package/lib/module/SuperagentHomeScreen.js +27 -9
- package/lib/module/SuperagentHomeScreen.js.map +1 -1
- package/lib/module/ToolApprovalCard.js +72 -14
- package/lib/module/ToolApprovalCard.js.map +1 -1
- package/lib/module/ToolCallSummary.js +14 -9
- package/lib/module/ToolCallSummary.js.map +1 -1
- package/lib/module/agentSphereAssets.js +323 -0
- package/lib/module/agentSphereAssets.js.map +1 -0
- package/lib/module/agentSphereStyles.js +3 -3
- package/lib/module/agentSphereStyles.js.map +1 -1
- package/lib/module/apiClient.js +7 -0
- package/lib/module/apiClient.js.map +1 -1
- package/lib/module/composerStyles.js +2 -2
- package/lib/module/composerStyles.js.map +1 -1
- package/lib/module/connectorBrandIcons.generated.js +621 -0
- package/lib/module/connectorBrandIcons.generated.js.map +1 -0
- package/lib/module/connectorBrandIcons.js +1 -53
- package/lib/module/connectorBrandIcons.js.map +1 -1
- package/lib/module/connectorCatalog.js +17 -0
- package/lib/module/connectorCatalog.js.map +1 -1
- package/lib/module/conversationParts.js +5 -4
- package/lib/module/conversationParts.js.map +1 -1
- package/lib/module/conversationRuntime.js +118 -12
- package/lib/module/conversationRuntime.js.map +1 -1
- package/lib/module/conversationStyles.js +3 -2
- package/lib/module/conversationStyles.js.map +1 -1
- package/lib/module/editorShellStyles.js +6 -2
- package/lib/module/editorShellStyles.js.map +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/markdownStyles.js +2 -2
- package/lib/module/markdownStyles.js.map +1 -1
- package/lib/module/messageActionStyles.js +2 -2
- package/lib/module/messageActionStyles.js.map +1 -1
- package/lib/module/realtimeClient.js +4 -1
- package/lib/module/realtimeClient.js.map +1 -1
- package/lib/module/renameAgentModalStyles.js +2 -2
- package/lib/module/renameAgentModalStyles.js.map +1 -1
- package/lib/module/screenParts.js +25 -42
- package/lib/module/screenParts.js.map +1 -1
- package/lib/module/styles.js +71 -60
- package/lib/module/styles.js.map +1 -1
- package/lib/module/superagentApiClient.js +63 -18
- package/lib/module/superagentApiClient.js.map +1 -1
- package/lib/module/theme.js +239 -0
- package/lib/module/theme.js.map +1 -0
- package/lib/module/useSuperagentConversation.js +135 -22
- package/lib/module/useSuperagentConversation.js.map +1 -1
- package/lib/module/useSuperagentRuntime.js +167 -82
- package/lib/module/useSuperagentRuntime.js.map +1 -1
- package/lib/typescript/commonjs/AgentSettingsPanel.d.ts.map +1 -1
- package/lib/typescript/commonjs/AgentSphereIcon.d.ts.map +1 -1
- package/lib/typescript/commonjs/AttachmentPickerStatusModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ChannelsPanel.d.ts.map +1 -1
- package/lib/typescript/commonjs/ConversationChat.d.ts +1 -1
- package/lib/typescript/commonjs/ConversationChat.d.ts.map +1 -1
- package/lib/typescript/commonjs/ConversationComposer.d.ts.map +1 -1
- package/lib/typescript/commonjs/ConversationMessageList.d.ts +1 -1
- package/lib/typescript/commonjs/ConversationMessageList.d.ts.map +1 -1
- package/lib/typescript/commonjs/ConversationScreen.d.ts +2 -1
- package/lib/typescript/commonjs/ConversationScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/EditorDrawer.d.ts +1 -1
- package/lib/typescript/commonjs/EditorDrawer.d.ts.map +1 -1
- package/lib/typescript/commonjs/FilesPanel.d.ts.map +1 -1
- package/lib/typescript/commonjs/RenameAgentModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ShareAgentModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ShareAgentModal.styles.d.ts.map +1 -1
- package/lib/typescript/commonjs/SuperagentHomeScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ToolApprovalCard.d.ts +3 -3
- package/lib/typescript/commonjs/ToolApprovalCard.d.ts.map +1 -1
- package/lib/typescript/commonjs/ToolCallSummary.d.ts +1 -1
- package/lib/typescript/commonjs/ToolCallSummary.d.ts.map +1 -1
- package/lib/typescript/commonjs/agentSphereAssets.d.ts +2 -0
- package/lib/typescript/commonjs/agentSphereAssets.d.ts.map +1 -0
- package/lib/typescript/commonjs/agentSphereStyles.d.ts.map +1 -1
- package/lib/typescript/commonjs/apiClient.d.ts.map +1 -1
- package/lib/typescript/commonjs/composerStyles.d.ts.map +1 -1
- package/lib/typescript/commonjs/connectorBrandIcons.d.ts.map +1 -1
- package/lib/typescript/commonjs/connectorBrandIcons.generated.d.ts +2 -0
- package/lib/typescript/commonjs/connectorBrandIcons.generated.d.ts.map +1 -0
- package/lib/typescript/commonjs/connectorCatalog.d.ts +2 -0
- package/lib/typescript/commonjs/connectorCatalog.d.ts.map +1 -1
- package/lib/typescript/commonjs/conversationParts.d.ts +1 -1
- package/lib/typescript/commonjs/conversationParts.d.ts.map +1 -1
- package/lib/typescript/commonjs/conversationRuntime.d.ts +6 -1
- package/lib/typescript/commonjs/conversationRuntime.d.ts.map +1 -1
- package/lib/typescript/commonjs/conversationStyles.d.ts.map +1 -1
- package/lib/typescript/commonjs/editorShellStyles.d.ts +4 -0
- package/lib/typescript/commonjs/editorShellStyles.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +2 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/markdownStyles.d.ts.map +1 -1
- package/lib/typescript/commonjs/messageActionStyles.d.ts.map +1 -1
- package/lib/typescript/commonjs/realtimeClient.d.ts.map +1 -1
- package/lib/typescript/commonjs/renameAgentModalStyles.d.ts.map +1 -1
- package/lib/typescript/commonjs/screenParts.d.ts +1 -1
- package/lib/typescript/commonjs/screenParts.d.ts.map +1 -1
- package/lib/typescript/commonjs/styles.d.ts +20 -11
- package/lib/typescript/commonjs/styles.d.ts.map +1 -1
- package/lib/typescript/commonjs/superagentApiClient.d.ts +2 -1
- package/lib/typescript/commonjs/superagentApiClient.d.ts.map +1 -1
- package/lib/typescript/commonjs/theme.d.ts +36 -0
- package/lib/typescript/commonjs/theme.d.ts.map +1 -0
- package/lib/typescript/commonjs/types.d.ts +16 -2
- package/lib/typescript/commonjs/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/useSuperagentConversation.d.ts +3 -2
- package/lib/typescript/commonjs/useSuperagentConversation.d.ts.map +1 -1
- package/lib/typescript/commonjs/useSuperagentRuntime.d.ts +2 -1
- package/lib/typescript/commonjs/useSuperagentRuntime.d.ts.map +1 -1
- package/lib/typescript/module/AgentSettingsPanel.d.ts.map +1 -1
- package/lib/typescript/module/AgentSphereIcon.d.ts.map +1 -1
- package/lib/typescript/module/AttachmentPickerStatusModal.d.ts.map +1 -1
- package/lib/typescript/module/ChannelsPanel.d.ts.map +1 -1
- package/lib/typescript/module/ConversationChat.d.ts +1 -1
- package/lib/typescript/module/ConversationChat.d.ts.map +1 -1
- package/lib/typescript/module/ConversationComposer.d.ts.map +1 -1
- package/lib/typescript/module/ConversationMessageList.d.ts +1 -1
- package/lib/typescript/module/ConversationMessageList.d.ts.map +1 -1
- package/lib/typescript/module/ConversationScreen.d.ts +2 -1
- package/lib/typescript/module/ConversationScreen.d.ts.map +1 -1
- package/lib/typescript/module/EditorDrawer.d.ts +1 -1
- package/lib/typescript/module/EditorDrawer.d.ts.map +1 -1
- package/lib/typescript/module/FilesPanel.d.ts.map +1 -1
- package/lib/typescript/module/RenameAgentModal.d.ts.map +1 -1
- package/lib/typescript/module/ShareAgentModal.d.ts.map +1 -1
- package/lib/typescript/module/ShareAgentModal.styles.d.ts.map +1 -1
- package/lib/typescript/module/SuperagentHomeScreen.d.ts.map +1 -1
- package/lib/typescript/module/ToolApprovalCard.d.ts +3 -3
- package/lib/typescript/module/ToolApprovalCard.d.ts.map +1 -1
- package/lib/typescript/module/ToolCallSummary.d.ts +1 -1
- package/lib/typescript/module/ToolCallSummary.d.ts.map +1 -1
- package/lib/typescript/module/agentSphereAssets.d.ts +2 -0
- package/lib/typescript/module/agentSphereAssets.d.ts.map +1 -0
- package/lib/typescript/module/agentSphereStyles.d.ts.map +1 -1
- package/lib/typescript/module/apiClient.d.ts.map +1 -1
- package/lib/typescript/module/composerStyles.d.ts.map +1 -1
- package/lib/typescript/module/connectorBrandIcons.d.ts.map +1 -1
- package/lib/typescript/module/connectorBrandIcons.generated.d.ts +2 -0
- package/lib/typescript/module/connectorBrandIcons.generated.d.ts.map +1 -0
- package/lib/typescript/module/connectorCatalog.d.ts +2 -0
- package/lib/typescript/module/connectorCatalog.d.ts.map +1 -1
- package/lib/typescript/module/conversationParts.d.ts +1 -1
- package/lib/typescript/module/conversationParts.d.ts.map +1 -1
- package/lib/typescript/module/conversationRuntime.d.ts +6 -1
- package/lib/typescript/module/conversationRuntime.d.ts.map +1 -1
- package/lib/typescript/module/conversationStyles.d.ts.map +1 -1
- package/lib/typescript/module/editorShellStyles.d.ts +4 -0
- package/lib/typescript/module/editorShellStyles.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +2 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/markdownStyles.d.ts.map +1 -1
- package/lib/typescript/module/messageActionStyles.d.ts.map +1 -1
- package/lib/typescript/module/realtimeClient.d.ts.map +1 -1
- package/lib/typescript/module/renameAgentModalStyles.d.ts.map +1 -1
- package/lib/typescript/module/screenParts.d.ts +1 -1
- package/lib/typescript/module/screenParts.d.ts.map +1 -1
- package/lib/typescript/module/styles.d.ts +20 -11
- package/lib/typescript/module/styles.d.ts.map +1 -1
- package/lib/typescript/module/superagentApiClient.d.ts +2 -1
- package/lib/typescript/module/superagentApiClient.d.ts.map +1 -1
- package/lib/typescript/module/theme.d.ts +36 -0
- package/lib/typescript/module/theme.d.ts.map +1 -0
- package/lib/typescript/module/types.d.ts +16 -2
- package/lib/typescript/module/types.d.ts.map +1 -1
- package/lib/typescript/module/useSuperagentConversation.d.ts +3 -2
- package/lib/typescript/module/useSuperagentConversation.d.ts.map +1 -1
- package/lib/typescript/module/useSuperagentRuntime.d.ts +2 -1
- package/lib/typescript/module/useSuperagentRuntime.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/AgentSettingsPanel.tsx +118 -49
- package/src/AgentSphereIcon.tsx +11 -62
- package/src/AttachmentPickerStatusModal.tsx +4 -3
- package/src/ChannelsPanel.tsx +59 -39
- package/src/ConversationChat.tsx +12 -3
- package/src/ConversationComposer.tsx +7 -6
- package/src/ConversationMessageList.tsx +1 -1
- package/src/ConversationScreen.tsx +3 -0
- package/src/EditorDrawer.tsx +66 -41
- package/src/FilesPanel.tsx +48 -20
- package/src/RenameAgentModal.tsx +2 -1
- package/src/ShareAgentModal.styles.ts +2 -1
- package/src/ShareAgentModal.tsx +9 -8
- package/src/SuperagentHomeScreen.tsx +27 -7
- package/src/ToolApprovalCard.tsx +82 -14
- package/src/ToolCallSummary.tsx +18 -12
- package/src/agentSphereAssets.ts +325 -0
- package/src/agentSphereStyles.ts +3 -2
- package/src/apiClient.ts +7 -0
- package/src/composerStyles.ts +2 -1
- package/src/connectorBrandIcons.generated.ts +618 -0
- package/src/connectorBrandIcons.tsx +1 -53
- package/src/connectorCatalog.ts +24 -0
- package/src/conversationParts.tsx +6 -5
- package/src/conversationRuntime.ts +123 -12
- package/src/conversationStyles.ts +2 -1
- package/src/editorShellStyles.ts +6 -1
- package/src/index.ts +2 -0
- package/src/markdownStyles.ts +2 -1
- package/src/messageActionStyles.ts +2 -1
- package/src/realtimeClient.ts +7 -1
- package/src/renameAgentModalStyles.ts +2 -1
- package/src/screenParts.tsx +17 -29
- package/src/styles.ts +63 -54
- package/src/superagentApiClient.ts +68 -18
- package/src/theme.ts +254 -0
- package/src/types.ts +21 -2
- package/src/useSuperagentConversation.ts +141 -24
- package/src/useSuperagentRuntime.ts +165 -84
|
@@ -5,19 +5,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.AgentSphereIcon = AgentSphereIcon;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _theme = require("./theme.js");
|
|
8
9
|
var _reactNative = require("react-native");
|
|
9
10
|
var _lucideReactNative = require("lucide-react-native");
|
|
10
|
-
var _reactNativeSvg =
|
|
11
|
+
var _reactNativeSvg = require("react-native-svg");
|
|
12
|
+
var _agentSphereAssets = require("./agentSphereAssets.js");
|
|
11
13
|
var _agentSphereStyles = require("./agentSphereStyles.js");
|
|
12
14
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
14
15
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
15
16
|
const SIZES = {
|
|
16
17
|
header: 34,
|
|
17
18
|
md: 30,
|
|
18
19
|
sm: 24
|
|
19
20
|
};
|
|
20
|
-
const SPHERE_PALETTES = [['#FF4F00', '#FF9867', '#F5D3A2', '#A9B0ED', '#FFF3E2'], ['#23AEE0', '#3874FF', '#93C5F7', '#33EBFF', '#D1F3FF'], ['#119C72', '#5FE6A3', '#C8FACC', '#2F7D6D', '#F0FFF4'], ['#9BE266', '#D9F99D', '#5AC27C', '#F4FFE7', '#7EA650'], ['#0A0A0F', '#2A2A36', '#73717F', '#F4F4F5', '#15151C']];
|
|
21
21
|
function AgentSphereIcon({
|
|
22
22
|
agent,
|
|
23
23
|
isUser = false,
|
|
@@ -57,7 +57,7 @@ function AgentSphereIcon({
|
|
|
57
57
|
width: dimension
|
|
58
58
|
}],
|
|
59
59
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.User, {
|
|
60
|
-
color:
|
|
60
|
+
color: (0, _theme.themedColor)('#D4D4D8'),
|
|
61
61
|
size: dimension * 0.48,
|
|
62
62
|
strokeWidth: 2.4
|
|
63
63
|
})
|
|
@@ -111,116 +111,16 @@ function SphereAvatar({
|
|
|
111
111
|
avatarIndex,
|
|
112
112
|
size
|
|
113
113
|
}) {
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
const
|
|
119
|
-
const
|
|
120
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeSvg.Defs, {
|
|
125
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.ClipPath, {
|
|
126
|
-
id: clipId,
|
|
127
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Circle, {
|
|
128
|
-
cx: "24",
|
|
129
|
-
cy: "24",
|
|
130
|
-
r: "19"
|
|
131
|
-
})
|
|
132
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeSvg.RadialGradient, {
|
|
133
|
-
id: glowId,
|
|
134
|
-
cx: "38%",
|
|
135
|
-
cy: "30%",
|
|
136
|
-
r: "72%",
|
|
137
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Stop, {
|
|
138
|
-
offset: "0%",
|
|
139
|
-
stopColor: palette[4],
|
|
140
|
-
stopOpacity: "0.95"
|
|
141
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Stop, {
|
|
142
|
-
offset: "36%",
|
|
143
|
-
stopColor: palette[2],
|
|
144
|
-
stopOpacity: "0.92"
|
|
145
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Stop, {
|
|
146
|
-
offset: "72%",
|
|
147
|
-
stopColor: palette[1],
|
|
148
|
-
stopOpacity: "0.92"
|
|
149
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Stop, {
|
|
150
|
-
offset: "100%",
|
|
151
|
-
stopColor: palette[0],
|
|
152
|
-
stopOpacity: "1"
|
|
153
|
-
})]
|
|
154
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeSvg.LinearGradient, {
|
|
155
|
-
id: sheenId,
|
|
156
|
-
x1: "7",
|
|
157
|
-
y1: "3",
|
|
158
|
-
x2: "44",
|
|
159
|
-
y2: "47",
|
|
160
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Stop, {
|
|
161
|
-
offset: "0%",
|
|
162
|
-
stopColor: "#FFFFFF",
|
|
163
|
-
stopOpacity: "0"
|
|
164
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Stop, {
|
|
165
|
-
offset: "42%",
|
|
166
|
-
stopColor: "#FFFFFF",
|
|
167
|
-
stopOpacity: "0.08"
|
|
168
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Stop, {
|
|
169
|
-
offset: "100%",
|
|
170
|
-
stopColor: "#FFFFFF",
|
|
171
|
-
stopOpacity: "0.24"
|
|
172
|
-
})]
|
|
173
|
-
})]
|
|
174
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeSvg.G, {
|
|
175
|
-
clipPath: `url(#${clipId})`,
|
|
176
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Rect, {
|
|
177
|
-
width: "48",
|
|
178
|
-
height: "48",
|
|
179
|
-
fill: `url(#${glowId})`
|
|
180
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Ellipse, {
|
|
181
|
-
cx: "12",
|
|
182
|
-
cy: "18",
|
|
183
|
-
rx: "17",
|
|
184
|
-
ry: "8",
|
|
185
|
-
fill: palette[1],
|
|
186
|
-
opacity: "0.95",
|
|
187
|
-
transform: "rotate(-26 12 18)"
|
|
188
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Ellipse, {
|
|
189
|
-
cx: "31",
|
|
190
|
-
cy: "13",
|
|
191
|
-
rx: "18",
|
|
192
|
-
ry: "7",
|
|
193
|
-
fill: palette[2],
|
|
194
|
-
opacity: "0.94",
|
|
195
|
-
transform: "rotate(25 31 13)"
|
|
196
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Ellipse, {
|
|
197
|
-
cx: "34",
|
|
198
|
-
cy: "31",
|
|
199
|
-
rx: "18",
|
|
200
|
-
ry: "10",
|
|
201
|
-
fill: palette[3],
|
|
202
|
-
opacity: "0.68",
|
|
203
|
-
transform: "rotate(-18 34 31)"
|
|
204
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Ellipse, {
|
|
205
|
-
cx: "16",
|
|
206
|
-
cy: "37",
|
|
207
|
-
rx: "18",
|
|
208
|
-
ry: "5",
|
|
209
|
-
fill: palette[4],
|
|
210
|
-
opacity: "0.72",
|
|
211
|
-
transform: "rotate(-5 16 37)"
|
|
212
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Path, {
|
|
213
|
-
d: "M6 30 C15 16 27 18 41 27 C36 40 14 44 6 30Z",
|
|
214
|
-
fill: "#FFFFFF",
|
|
215
|
-
opacity: "0.16"
|
|
216
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.Rect, {
|
|
217
|
-
x: "-5",
|
|
218
|
-
y: "-2",
|
|
219
|
-
width: "58",
|
|
220
|
-
height: "54",
|
|
221
|
-
fill: `url(#${sheenId})`
|
|
222
|
-
})]
|
|
223
|
-
})]
|
|
114
|
+
// Renders the same built-in sphere SVGs the web builder uses, selected by
|
|
115
|
+
// avatarIndex (see AgentAvatarImage in the builder app). The artwork's
|
|
116
|
+
// visible sphere is a r=19 circle in a 48-unit viewBox, so scale up to make
|
|
117
|
+
// the sphere itself span `size`; the frame clips the transparent margins.
|
|
118
|
+
const index = ((avatarIndex ?? 0) % _agentSphereAssets.AGENT_SPHERE_SVGS.length + _agentSphereAssets.AGENT_SPHERE_SVGS.length) % _agentSphereAssets.AGENT_SPHERE_SVGS.length;
|
|
119
|
+
const renderedSize = size * (48 / 38);
|
|
120
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeSvg.SvgXml, {
|
|
121
|
+
xml: _agentSphereAssets.AGENT_SPHERE_SVGS[index],
|
|
122
|
+
width: renderedSize,
|
|
123
|
+
height: renderedSize
|
|
224
124
|
});
|
|
225
125
|
}
|
|
226
126
|
function getAgentLogo(agent) {
|
|
@@ -236,8 +136,4 @@ function getAgentLogo(agent) {
|
|
|
236
136
|
url: logoUrl || null
|
|
237
137
|
};
|
|
238
138
|
}
|
|
239
|
-
function getSpherePalette(avatarIndex) {
|
|
240
|
-
const index = ((avatarIndex ?? 0) % SPHERE_PALETTES.length + SPHERE_PALETTES.length) % SPHERE_PALETTES.length;
|
|
241
|
-
return SPHERE_PALETTES[index];
|
|
242
|
-
}
|
|
243
139
|
//# sourceMappingURL=AgentSphereIcon.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_lucideReactNative","_reactNativeSvg","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_theme","_reactNative","_lucideReactNative","_reactNativeSvg","_agentSphereAssets","_agentSphereStyles","_jsxRuntime","e","__esModule","default","SIZES","header","md","sm","AgentSphereIcon","agent","isUser","size","userAvatarUrl","dimension","borderRadius","logo","getAgentLogo","userImageFailed","setUserImageFailed","React","useState","normalizedUserAvatarUrl","trim","useEffect","jsx","View","style","agentSphereStyles","frame","userFrame","height","width","children","Image","onError","resizeMode","source","uri","image","User","color","themedColor","strokeWidth","emoji","emojiFrame","Text","fontSize","lineHeight","url","builtInFrame","SphereAvatar","avatarIndex","index","AGENT_SPHERE_SVGS","length","renderedSize","SvgXml","xml","logoUrl","startsWith","replace"],"sourceRoot":"../../src","sources":["AgentSphereIcon.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AACA,IAAAI,eAAA,GAAAJ,OAAA;AAEA,IAAAK,kBAAA,GAAAL,OAAA;AACA,IAAAM,kBAAA,GAAAN,OAAA;AAAwD,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAD,uBAAAS,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAGxD,MAAMG,KAAK,GAAG;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C,IAAIoC,OAAO,EAAEC,UAAU,CAAC,QAAQ,CAAC,EAAE;IACjC,OAAO;MAAEhB,KAAK,EAAEe,OAAO,CAACE,OAAO,CAAC,QAAQ,EAAE,EAAE,CAAC;MAAEZ,GAAG,EAAE;IAAK,CAAC;EAC5D;EAEA,OAAO;IACLL,KAAK,EAAElC,KAAK,EAAEkC,KAAK,EAAErB,IAAI,CAAC,CAAC,IAAI,IAAI;IACnC0B,GAAG,EAAEU,OAAO,IAAI;EAClB,CAAC;AACH","ignoreList":[]}
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.AttachmentPickerStatusModal = AttachmentPickerStatusModal;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _theme = require("./theme.js");
|
|
8
9
|
var _reactNative = require("react-native");
|
|
9
10
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -24,7 +25,7 @@ function AttachmentPickerStatusModal({
|
|
|
24
25
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
25
26
|
style: styles.sheet,
|
|
26
27
|
children: [isError ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
27
|
-
color:
|
|
28
|
+
color: (0, _theme.themedColor)('#F4F4F5'),
|
|
28
29
|
style: styles.loader
|
|
29
30
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
30
31
|
style: styles.title,
|
|
@@ -45,7 +46,7 @@ function AttachmentPickerStatusModal({
|
|
|
45
46
|
})
|
|
46
47
|
});
|
|
47
48
|
}
|
|
48
|
-
const styles =
|
|
49
|
+
const styles = (0, _theme.createThemedStyles)({
|
|
49
50
|
backdrop: {
|
|
50
51
|
alignItems: 'center',
|
|
51
52
|
backgroundColor: 'rgba(0, 0, 0, 0.62)',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_jsxRuntime","e","__esModule","default","AttachmentPickerStatusModal","isError","message","onClose","title","jsx","Modal","animationType","transparent","visible","onRequestClose","children","View","style","styles","backdrop","jsxs","sheet","ActivityIndicator","color","loader","Text","error","undefined","Pressable","accessibilityRole","onPress","closeButton","closeText","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_theme","_reactNative","_jsxRuntime","e","__esModule","default","AttachmentPickerStatusModal","isError","message","onClose","title","jsx","Modal","animationType","transparent","visible","onRequestClose","children","View","style","styles","backdrop","jsxs","sheet","ActivityIndicator","color","themedColor","loader","Text","error","undefined","Pressable","accessibilityRole","onPress","closeButton","closeText","createThemedStyles","alignItems","backgroundColor","flex","justifyContent","padding","borderRadius","height","marginTop","fontSize","fontWeight","marginBottom","lineHeight","textAlign","borderColor","borderWidth","width"],"sourceRoot":"../../src","sources":["AttachmentPickerStatusModal.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAA6E,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAEtE,SAASG,2BAA2BA,CAAC;EAC1CC,OAAO;EACPC,OAAO;EACPC,OAAO;EACPC;AAMF,CAAC,EAAE;EACD,oBACE,IAAAR,WAAA,CAAAS,GAAA,EAACV,YAAA,CAAAW,KAAK;IAACC,aAAa,EAAC,MAAM;IAACC,WAAW;IAACC,OAAO;IAACC,cAAc,EAAEP,OAAQ;IAAAQ,QAAA,eACtE,IAAAf,WAAA,CAAAS,GAAA,EAACV,YAAA,CAAAiB,IAAI;MAACC,KAAK,EAAEC,MAAM,CAACC,QAAS;MAAAJ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OAAO,EAAE;EACX,CAAC;EACDP,WAAW,EAAE;IACXG,UAAU,EAAE,QAAQ;IACpBK,YAAY,EAAE,EAAE;IAChBC,MAAM,EAAE,EAAE;IACVH,cAAc,EAAE,QAAQ;IACxBI,SAAS,EAAE;EACb,CAAC;EACDT,SAAS,EAAE;IACTV,KAAK,EAAE,SAAS;IAChBoB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE;EACd,CAAC;EACDjB,KAAK,EAAE;IACLJ,KAAK,EAAE;EACT,CAAC;EACDE,MAAM,EAAE;IACNoB,YAAY,EAAE;EAChB,CAAC;EACDvC,OAAO,EAAE;IACPiB,KAAK,EAAE,SAAS;IAChBoB,QAAQ,EAAE,EAAE;IACZG,UAAU,EAAE,EAAE;IACdJ,SAAS,EAAE,CAAC;IACZK,SAAS,EAAE;EACb,CAAC;EACD1B,KAAK,EAAE;IACLe,eAAe,EAAE,SAAS;IAC1BY,WAAW,EAAE,SAAS;IACtBR,YAAY,EAAE,EAAE;IAChBS,WAAW,EAAE,CAAC;IACdV,OAAO,EAAE,EAAE;IACXW,KAAK,EAAE;EACT,CAAC;EACD1C,KAAK,EAAE;IACLe,KAAK,EAAE,SAAS;IAChBoB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBG,SAAS,EAAE;EACb;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.ChannelsPanel = ChannelsPanel;
|
|
7
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _theme = require("./theme.js");
|
|
8
9
|
var _reactNative = require("react-native");
|
|
9
10
|
var _lucideReactNative = require("lucide-react-native");
|
|
10
11
|
var _editorShellStyles = require("./editorShellStyles.js");
|
|
@@ -33,9 +34,10 @@ function ChannelsPanel({
|
|
|
33
34
|
}) {
|
|
34
35
|
const imessage = channelStatus?.imessage;
|
|
35
36
|
const telegram = channelStatus?.telegram;
|
|
36
|
-
const line = channelStatus?.line;
|
|
37
37
|
const whatsapp = channelStatus?.whatsapp;
|
|
38
|
-
|
|
38
|
+
// LINE is hidden for now — its connection status isn't wired on native yet
|
|
39
|
+
// (no runtime status route), so it would always show as disconnected.
|
|
40
|
+
const supportedCount = 3;
|
|
39
41
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
40
42
|
style: _editorShellStyles.editorShellStyles.settingsStack,
|
|
41
43
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
@@ -53,7 +55,7 @@ function ChannelsPanel({
|
|
|
53
55
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
54
56
|
style: channelStyles.headerActions,
|
|
55
57
|
children: [isLoading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
56
|
-
color:
|
|
58
|
+
color: (0, _theme.themedColor)('#FF5A1F'),
|
|
57
59
|
size: "small"
|
|
58
60
|
}) : null, onRefreshChannels ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
|
|
59
61
|
accessibilityLabel: "Refresh channels",
|
|
@@ -64,7 +66,7 @@ function ChannelsPanel({
|
|
|
64
66
|
pressed
|
|
65
67
|
}) => [channelStyles.iconButton, isLoading && channelStyles.disabled, pressed && _styles.styles.pressed],
|
|
66
68
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.RefreshCw, {
|
|
67
|
-
color:
|
|
69
|
+
color: (0, _theme.themedColor)('#F4F4F5'),
|
|
68
70
|
size: 17,
|
|
69
71
|
strokeWidth: 2.4
|
|
70
72
|
})
|
|
@@ -77,9 +79,11 @@ function ChannelsPanel({
|
|
|
77
79
|
style: channelStyles.stack,
|
|
78
80
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(WhatsAppChannel, {
|
|
79
81
|
agentId: agent.id,
|
|
82
|
+
connected: !!whatsapp?.connected,
|
|
80
83
|
isBusy: connectingChannelId === 'whatsapp',
|
|
81
84
|
isReady: !!whatsapp?.connectUrl,
|
|
82
|
-
onOpenWhatsApp: onOpenWhatsApp
|
|
85
|
+
onOpenWhatsApp: onOpenWhatsApp,
|
|
86
|
+
userHandle: whatsapp?.userHandle ?? null
|
|
83
87
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(IMessageChannel, {
|
|
84
88
|
agentId: agent.id,
|
|
85
89
|
imessage: imessage,
|
|
@@ -95,13 +99,6 @@ function ChannelsPanel({
|
|
|
95
99
|
onOpenTelegram: onOpenTelegram,
|
|
96
100
|
onSetupTelegram: onSetupTelegram,
|
|
97
101
|
telegram: telegram
|
|
98
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(LineChannel, {
|
|
99
|
-
agentId: agent.id,
|
|
100
|
-
isBusy: connectingChannelId === 'line',
|
|
101
|
-
line: line,
|
|
102
|
-
onGenerateLineCode: onGenerateLineCode,
|
|
103
|
-
onOpenLine: onOpenLine,
|
|
104
|
-
onShareLineCode: onShareLineCode
|
|
105
102
|
})]
|
|
106
103
|
})]
|
|
107
104
|
})
|
|
@@ -109,35 +106,60 @@ function ChannelsPanel({
|
|
|
109
106
|
}
|
|
110
107
|
function WhatsAppChannel({
|
|
111
108
|
agentId,
|
|
109
|
+
connected,
|
|
112
110
|
isBusy,
|
|
113
111
|
isReady,
|
|
114
|
-
onOpenWhatsApp
|
|
112
|
+
onOpenWhatsApp,
|
|
113
|
+
userHandle
|
|
115
114
|
}) {
|
|
115
|
+
// The handler builds the connect URL on press, so don't gate on a preloaded
|
|
116
|
+
// connectUrl — it's missing before status loads / after a failed refresh even
|
|
117
|
+
// though pressing the button would work.
|
|
118
|
+
const openButton = /*#__PURE__*/(0, _jsxRuntime.jsx)(ChannelButton, {
|
|
119
|
+
disabled: !onOpenWhatsApp || isBusy,
|
|
120
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.ExternalLink, {
|
|
121
|
+
color: (0, _theme.themedColor)('#111111'),
|
|
122
|
+
size: 15,
|
|
123
|
+
strokeWidth: 2.4
|
|
124
|
+
}),
|
|
125
|
+
isBusy: isBusy,
|
|
126
|
+
label: "Open WhatsApp",
|
|
127
|
+
onPress: () => onOpenWhatsApp?.({
|
|
128
|
+
agentId
|
|
129
|
+
})
|
|
130
|
+
});
|
|
116
131
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(ChannelCard, {
|
|
117
132
|
accent: "#25D366",
|
|
118
|
-
body:
|
|
133
|
+
body: connected ? 'Connected and active via WhatsApp.' : 'Open WhatsApp with the generated activation message for this Superagent.',
|
|
119
134
|
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.MessageCircle, {
|
|
120
|
-
color:
|
|
135
|
+
color: (0, _theme.themedColor)('#111111'),
|
|
121
136
|
size: 20,
|
|
122
137
|
strokeWidth: 2.45
|
|
123
138
|
}),
|
|
124
|
-
status: isReady ? 'Setup link ready' : '
|
|
139
|
+
status: connected ? 'Active' : isReady ? 'Setup link ready' : 'Tap to open setup',
|
|
125
140
|
title: "WhatsApp",
|
|
126
|
-
children: /*#__PURE__*/(0, _jsxRuntime.
|
|
127
|
-
style: channelStyles.
|
|
128
|
-
children: /*#__PURE__*/(0, _jsxRuntime.
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
color:
|
|
132
|
-
size:
|
|
141
|
+
children: connected ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
142
|
+
style: channelStyles.connectedBox,
|
|
143
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
144
|
+
style: channelStyles.connectedTitleRow,
|
|
145
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.CheckCircle2, {
|
|
146
|
+
color: (0, _theme.themedColor)('#34D399'),
|
|
147
|
+
size: 17,
|
|
133
148
|
strokeWidth: 2.4
|
|
134
|
-
}),
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
149
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
150
|
+
style: channelStyles.connectedTitle,
|
|
151
|
+
children: "WhatsApp connection"
|
|
152
|
+
})]
|
|
153
|
+
}), userHandle ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Text, {
|
|
154
|
+
style: channelStyles.connectedBody,
|
|
155
|
+
children: ["From: ", userHandle]
|
|
156
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
157
|
+
style: channelStyles.actionRow,
|
|
158
|
+
children: openButton
|
|
159
|
+
})]
|
|
160
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
161
|
+
style: channelStyles.actionRow,
|
|
162
|
+
children: openButton
|
|
141
163
|
})
|
|
142
164
|
});
|
|
143
165
|
}
|
|
@@ -187,7 +209,7 @@ function IMessageChannel({
|
|
|
187
209
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
188
210
|
style: channelStyles.connectedTitleRow,
|
|
189
211
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.CheckCircle2, {
|
|
190
|
-
color:
|
|
212
|
+
color: (0, _theme.themedColor)('#34D399'),
|
|
191
213
|
size: 17,
|
|
192
214
|
strokeWidth: 2.4
|
|
193
215
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
@@ -203,7 +225,7 @@ function IMessageChannel({
|
|
|
203
225
|
danger: true,
|
|
204
226
|
disabled: !onDisconnectIMessage || isBusy,
|
|
205
227
|
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.Unplug, {
|
|
206
|
-
color:
|
|
228
|
+
color: (0, _theme.themedColor)('#FCA5A5'),
|
|
207
229
|
size: 15,
|
|
208
230
|
strokeWidth: 2.4
|
|
209
231
|
}),
|
|
@@ -253,7 +275,7 @@ function IMessageChannel({
|
|
|
253
275
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(ChannelButton, {
|
|
254
276
|
disabled: !onOpenIMessage || isBusy,
|
|
255
277
|
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.ExternalLink, {
|
|
256
|
-
color:
|
|
278
|
+
color: (0, _theme.themedColor)('#111111'),
|
|
257
279
|
size: 15,
|
|
258
280
|
strokeWidth: 2.4
|
|
259
281
|
}),
|
|
@@ -266,7 +288,7 @@ function IMessageChannel({
|
|
|
266
288
|
secondary: true,
|
|
267
289
|
disabled: !onShareIMessageCode,
|
|
268
290
|
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.Copy, {
|
|
269
|
-
color:
|
|
291
|
+
color: (0, _theme.themedColor)('#F4F4F5'),
|
|
270
292
|
size: 15,
|
|
271
293
|
strokeWidth: 2.4
|
|
272
294
|
}),
|
|
@@ -324,7 +346,7 @@ function TelegramChannel({
|
|
|
324
346
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
325
347
|
style: channelStyles.connectedTitleRow,
|
|
326
348
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.CheckCircle2, {
|
|
327
|
-
color:
|
|
349
|
+
color: (0, _theme.themedColor)('#34D399'),
|
|
328
350
|
size: 17,
|
|
329
351
|
strokeWidth: 2.4
|
|
330
352
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
@@ -338,7 +360,7 @@ function TelegramChannel({
|
|
|
338
360
|
style: channelStyles.actionRow,
|
|
339
361
|
children: [telegram.botLink ? /*#__PURE__*/(0, _jsxRuntime.jsx)(ChannelButton, {
|
|
340
362
|
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.ExternalLink, {
|
|
341
|
-
color:
|
|
363
|
+
color: (0, _theme.themedColor)('#111111'),
|
|
342
364
|
size: 15,
|
|
343
365
|
strokeWidth: 2.4
|
|
344
366
|
}),
|
|
@@ -351,7 +373,7 @@ function TelegramChannel({
|
|
|
351
373
|
danger: true,
|
|
352
374
|
disabled: !onDisconnectTelegram || isBusy,
|
|
353
375
|
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.Unplug, {
|
|
354
|
-
color:
|
|
376
|
+
color: (0, _theme.themedColor)('#FCA5A5'),
|
|
355
377
|
size: 15,
|
|
356
378
|
strokeWidth: 2.4
|
|
357
379
|
}),
|
|
@@ -378,7 +400,7 @@ function TelegramChannel({
|
|
|
378
400
|
}
|
|
379
401
|
},
|
|
380
402
|
placeholder: "123456789:AA...",
|
|
381
|
-
placeholderTextColor:
|
|
403
|
+
placeholderTextColor: (0, _theme.themedColor)('#71717A'),
|
|
382
404
|
style: channelStyles.tokenInput,
|
|
383
405
|
value: tokenText
|
|
384
406
|
}), tokenError ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
@@ -389,7 +411,7 @@ function TelegramChannel({
|
|
|
389
411
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ChannelButton, {
|
|
390
412
|
disabled: !onSetupTelegram || isBusy,
|
|
391
413
|
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.CheckCircle2, {
|
|
392
|
-
color:
|
|
414
|
+
color: (0, _theme.themedColor)('#111111'),
|
|
393
415
|
size: 15,
|
|
394
416
|
strokeWidth: 2.4
|
|
395
417
|
}),
|
|
@@ -433,7 +455,7 @@ function LineChannel({
|
|
|
433
455
|
style: channelStyles.actionRow,
|
|
434
456
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(ChannelButton, {
|
|
435
457
|
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.ExternalLink, {
|
|
436
|
-
color:
|
|
458
|
+
color: (0, _theme.themedColor)('#111111'),
|
|
437
459
|
size: 15,
|
|
438
460
|
strokeWidth: 2.4
|
|
439
461
|
}),
|
|
@@ -445,7 +467,7 @@ function LineChannel({
|
|
|
445
467
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(ChannelButton, {
|
|
446
468
|
secondary: true,
|
|
447
469
|
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.Copy, {
|
|
448
|
-
color:
|
|
470
|
+
color: (0, _theme.themedColor)('#F4F4F5'),
|
|
449
471
|
size: 15,
|
|
450
472
|
strokeWidth: 2.4
|
|
451
473
|
}),
|
|
@@ -461,7 +483,7 @@ function LineChannel({
|
|
|
461
483
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(ChannelButton, {
|
|
462
484
|
disabled: !onGenerateLineCode || isBusy,
|
|
463
485
|
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_lucideReactNative.RefreshCw, {
|
|
464
|
-
color:
|
|
486
|
+
color: (0, _theme.themedColor)('#111111'),
|
|
465
487
|
size: 15,
|
|
466
488
|
strokeWidth: 2.4
|
|
467
489
|
}),
|
|
@@ -527,7 +549,7 @@ function ChannelButton({
|
|
|
527
549
|
pressed
|
|
528
550
|
}) => [channelStyles.button, secondary && channelStyles.buttonSecondary, danger && channelStyles.buttonDanger, disabled && channelStyles.disabled, pressed && _styles.styles.pressed],
|
|
529
551
|
children: [isBusy ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
530
|
-
color: danger || secondary ? '#F4F4F5' : '#111111',
|
|
552
|
+
color: danger || secondary ? (0, _theme.themedColor)('#F4F4F5') : (0, _theme.themedColor)('#111111'),
|
|
531
553
|
size: "small"
|
|
532
554
|
}) : icon, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
533
555
|
style: [channelStyles.buttonText, secondary && channelStyles.buttonTextSecondary, danger && channelStyles.buttonTextDanger],
|
|
@@ -542,7 +564,7 @@ function extractTelegramToken(value) {
|
|
|
542
564
|
}
|
|
543
565
|
return TELEGRAM_TOKEN_SEARCH.exec(trimmed)?.[0] ?? null;
|
|
544
566
|
}
|
|
545
|
-
const channelStyles =
|
|
567
|
+
const channelStyles = (0, _theme.createThemedStyles)({
|
|
546
568
|
actionRow: {
|
|
547
569
|
flexDirection: 'row',
|
|
548
570
|
flexWrap: 'wrap',
|