@onairosofficial/onairos-capacitor 0.1.0 → 0.1.2

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.
Files changed (202) hide show
  1. package/CAPACITOR_QUICK_START.md +379 -0
  2. package/CONNECTORS.md +122 -0
  3. package/LICENSE +194 -10
  4. package/OnairosofficialOnairosCapacitor.podspec +13 -0
  5. package/Package.swift +26 -0
  6. package/README.md +176 -25
  7. package/dist/onairos.capacitor.esm.js +1 -0
  8. package/dist/onairos.capacitor.esm.turbopack.js +1 -0
  9. package/docs/CAPACITOR_INTEGRATION_GUIDE.md +159 -0
  10. package/docs/CAPACITOR_MOCK_APP_TESTING.md +213 -0
  11. package/docs/CAPACITOR_SDK_FIXES_SUMMARY.md +65 -0
  12. package/docs/CROSS_SDK_PARITY.md +239 -0
  13. package/docs/DATA_FREQUENCY.md +57 -0
  14. package/docs/DEVELOPER_SDK_CHANGES.md +532 -0
  15. package/docs/INCIDENT_ENABLETRAINING_PIN_WEB_8.1.9.md +82 -0
  16. package/docs/ONAIROS_BUTTON_PROPS.md +152 -0
  17. package/docs/PLATFORM_APIS.md +559 -0
  18. package/docs/RAW_MEMORIES_API.md +305 -0
  19. package/docs/RAW_MEMORIES_SDK_UPDATE.md +54 -0
  20. package/docs/SDK_PARITY_ROLLUP_2026_04_24_to_05_02.md +96 -0
  21. package/docs/oldFixes.md +216 -0
  22. package/ios/Sources/OnairosNativeConnectorsPlugin/OnairosChatGPTNativePlugin.swift +993 -0
  23. package/ios/Sources/OnairosNativeConnectorsPlugin/OnairosNetflixNativePlugin.swift +33 -0
  24. package/ios/Sources/OnairosNativeConnectorsPlugin/OnairosSpotifyNativePlugin.swift +1082 -0
  25. package/onairos.d.ts +656 -0
  26. package/package.json +188 -37
  27. package/src/OnairosReconnectButton.jsx +272 -0
  28. package/src/RSA.jsx +57 -0
  29. package/src/assets/NewLogo.png +0 -0
  30. package/src/assets/OnairosNewLogo.png +0 -0
  31. package/src/assets/chatgpt-icon.png +0 -0
  32. package/src/assets/fire-horse.png +0 -0
  33. package/src/assets/fire-horse.transparent.png +0 -0
  34. package/src/assets/latest-firehorse.png +0 -0
  35. package/src/assets/perplexity.png +0 -0
  36. package/src/assets/persona.png +0 -0
  37. package/src/assets/persona1.png +0 -0
  38. package/src/assets/persona2.png +0 -0
  39. package/src/assets/persona3.png +0 -0
  40. package/src/assets/persona4.png +0 -0
  41. package/src/assets/persona5.png +0 -0
  42. package/src/capacitorConnectorCatalog.js +38 -0
  43. package/src/capacitorOAuthConfig.js +52 -0
  44. package/src/chatgptHostedImport/index.js +303 -0
  45. package/src/components/AuthButtons.jsx +48 -0
  46. package/src/components/ConnectChatGPTModal.jsx +666 -0
  47. package/src/components/ConnectClaudeModal.jsx +610 -0
  48. package/src/components/ConnectGeminiModal.jsx +639 -0
  49. package/src/components/ConnectGrokModal.jsx +701 -0
  50. package/src/components/ConnectPerplexityModal.jsx +726 -0
  51. package/src/components/DataExplainerScreen.jsx +349 -0
  52. package/src/components/DataRequest.js +885 -0
  53. package/src/components/DataRequest.jsx +1055 -0
  54. package/src/components/EmailAuth.js +1871 -0
  55. package/src/components/EmailAuth.jsx +2062 -0
  56. package/src/components/ExtensionInstallPrompt.jsx +142 -0
  57. package/src/components/GoogleButton.js +133 -0
  58. package/src/components/LLMConnectorManager.jsx +201 -0
  59. package/src/components/LoadingPage.jsx +19 -0
  60. package/src/components/LoadingScreen.jsx +81 -0
  61. package/src/components/LunarBirthdate.jsx +96 -0
  62. package/src/components/LunarLoadingPage.jsx +251 -0
  63. package/src/components/Notification.jsx +21 -0
  64. package/src/components/OnairosAppButton.jsx +85 -0
  65. package/src/components/OnairosSSO.jsx +645 -0
  66. package/src/components/OnairosTrigger.jsx +61 -0
  67. package/src/components/PerplexityLogo.jsx +43 -0
  68. package/src/components/PinSetup.js +200 -0
  69. package/src/components/PinSetup.jsx +228 -0
  70. package/src/components/SDK_PIN_INTEGRATION_REQUIRED_CHANGES.md +526 -0
  71. package/src/components/SdkErrorBoundary.jsx +36 -0
  72. package/src/components/SecuritySetup.js +81 -0
  73. package/src/components/SessionUserBar.jsx +83 -0
  74. package/src/components/SignUp.js +123 -0
  75. package/src/components/TestTelegramButton.js +53 -0
  76. package/src/components/TrainingComponent.jsx +200 -0
  77. package/src/components/TrainingScreen.jsx +897 -0
  78. package/src/components/UniversalOnboarding.js +306 -0
  79. package/src/components/UniversalOnboarding.jsx +4837 -0
  80. package/src/components/ValentineLoadingPage.jsx +502 -0
  81. package/src/components/ValentineModeSelector.jsx +162 -0
  82. package/src/components/WelcomeScreen.jsx +435 -0
  83. package/src/components/WrappedLoadingPage.jsx +205 -0
  84. package/src/components/connectors/ChatGPTConnector.js +348 -0
  85. package/src/components/connectors/ChatGPTConnector.jsx +348 -0
  86. package/src/components/connectors/ClaudeConnector.js +44 -0
  87. package/src/components/connectors/ClaudeConnector.jsx +44 -0
  88. package/src/components/connectors/GeminiConnector.js +170 -0
  89. package/src/components/connectors/GeminiConnector.jsx +170 -0
  90. package/src/components/connectors/GmailConnector.js +148 -0
  91. package/src/components/connectors/GmailConnector.jsx +148 -0
  92. package/src/components/connectors/GrokConnector.js +16 -0
  93. package/src/components/connectors/GrokConnector.jsx +16 -0
  94. package/src/components/connectors/HingeConnector.js +419 -0
  95. package/src/components/connectors/HingeConnector.jsx +419 -0
  96. package/src/components/connectors/InstagramDataConnector.js +726 -0
  97. package/src/components/connectors/InstagramDataConnector.jsx +726 -0
  98. package/src/components/connectors/LinkedInConnector.js +4 -0
  99. package/src/components/connectors/LinkedInConnector.jsx +296 -0
  100. package/src/components/connectors/PerplexityConnector.jsx +16 -0
  101. package/src/components/connectors/PinterestConnector.js +208 -0
  102. package/src/components/connectors/PinterestConnector.jsx +208 -0
  103. package/src/components/connectors/README.md +292 -0
  104. package/src/components/connectors/RedditConnector.js +229 -0
  105. package/src/components/connectors/RedditConnector.jsx +229 -0
  106. package/src/components/connectors/SephoraConnector.js +482 -0
  107. package/src/components/connectors/SephoraConnector.jsx +482 -0
  108. package/src/components/connectors/TikTokConnector.jsx +430 -0
  109. package/src/components/connectors/YoutubeConnector.js +361 -0
  110. package/src/components/connectors/YoutubeConnector.jsx +361 -0
  111. package/src/components/connectors/index.js +50 -0
  112. package/src/components/icons.jsx +46 -0
  113. package/src/components/icons.tsx +21 -0
  114. package/src/components/ui/PageLayout.jsx +1255 -0
  115. package/src/components/ui/PrimaryButton.jsx +162 -0
  116. package/src/components/ui/button.jsx +49 -0
  117. package/src/components/ui/card.jsx +61 -0
  118. package/src/components/ui/checkbox.jsx +33 -0
  119. package/src/components/ui/label.jsx +29 -0
  120. package/src/components/utils/UpdateConnections.js +45 -0
  121. package/src/components/utils/oauthHelper.js +97 -0
  122. package/src/config/api-config.js +138 -0
  123. package/src/deepLink.jsx +38 -0
  124. package/src/getPin.js +26 -0
  125. package/src/icons/Avatar.png +0 -0
  126. package/src/icons/Sentiment.png +0 -0
  127. package/src/icons/Trait.png +0 -0
  128. package/src/iframe/DataRequestPage.jsx +285 -0
  129. package/src/iframe/OnairosButtonIntegration.md +148 -0
  130. package/src/iframe/components/Box.jsx +56 -0
  131. package/src/iframe/components/IndividualConnection.jsx +88 -0
  132. package/src/iframe/dataRequestHandler.js +714 -0
  133. package/src/iframe/data_request_iframe.html +27 -0
  134. package/src/iframe/data_request_page.js +47 -0
  135. package/src/iframe/icons/Avatar.png +1 -0
  136. package/src/iframe/icons/Avatar2.png +1 -0
  137. package/src/iframe/icons/Sentiment.png +1 -0
  138. package/src/iframe/icons/Trait.png +1 -0
  139. package/src/iframe/icons/onairos_logo.png +0 -0
  140. package/src/iframe/utils/api.js +57 -0
  141. package/src/index.js +274 -0
  142. package/src/laravel/OnairosVue.vue +410 -0
  143. package/src/laravel/blade-helpers.js +320 -0
  144. package/src/laravel/vite-plugin.js +179 -0
  145. package/src/mobile/MobileDataRequestPage.jsx +233 -0
  146. package/src/mobile/components/MobileBox.jsx +71 -0
  147. package/src/mobile/components/MobileIndividualConnection.jsx +51 -0
  148. package/src/mobile/shims/browser-apis.js +78 -0
  149. package/src/mobile/shims/lucide-shim.js +85 -0
  150. package/src/nativeConnectors.js +5 -0
  151. package/src/newUI/EMAIL_VERIFICATION_API_SCHEMA.md +268 -0
  152. package/src/newUI/PlatformConnectorsStep.tsx +435 -0
  153. package/src/newUI/PrimaryButton.tsx +213 -0
  154. package/src/newUI/SignInStep.tsx +194 -0
  155. package/src/newUI/VerificationStep.tsx +133 -0
  156. package/src/newUI/WelcomeScreen.tsx +311 -0
  157. package/src/newUI/services/connectedAccountsService.js +129 -0
  158. package/src/onairos.capacitor.jsx +15 -0
  159. package/src/onairos.core.jsx +133 -0
  160. package/src/onairos.jsx +14 -0
  161. package/src/onairos.native.jsx +15 -0
  162. package/src/onairosButton.jsx +9000 -0
  163. package/src/overlay/CheckBox.jsx +114 -0
  164. package/src/overlay/IndividualConnection copy.js +86 -0
  165. package/src/overlay/IndividualConnection.js +191 -0
  166. package/src/overlay/IndividualConnectionNew.jsx +157 -0
  167. package/src/overlay/box.js +84 -0
  168. package/src/overlay/overlay.js +437 -0
  169. package/src/styles/onairos-scoped-preflight.css +97 -0
  170. package/src/styles/sdkCssRegistry.js +20 -0
  171. package/src/styles/styleLoaderInsertShadow.js +69 -0
  172. package/src/styles/tailwind.capacitor.css +395 -0
  173. package/src/styles/tailwind.css +395 -0
  174. package/src/theme/colors.js +40 -0
  175. package/src/utils/apiKeyValidation.js +341 -0
  176. package/src/utils/apiResponseLogger.js +316 -0
  177. package/src/utils/authHeaders.js +275 -0
  178. package/src/utils/biometrics.js +26 -0
  179. package/src/utils/bookmarkletUtils.js +28 -0
  180. package/src/utils/capacitorDetection.js +278 -0
  181. package/src/utils/capacitorLLMHelper.js +352 -0
  182. package/src/utils/capacitorPlugins.js +366 -0
  183. package/src/utils/crossDomainSSO.js +587 -0
  184. package/src/utils/deepLinking.js +27 -0
  185. package/src/utils/devLogger.js +46 -0
  186. package/src/utils/extensionDetection.js +418 -0
  187. package/src/utils/extractMemory.js +277 -0
  188. package/src/utils/framerBrandingOverrides.js +40 -0
  189. package/src/utils/googleWebClientId.js +55 -0
  190. package/src/utils/overlayHandler.js +224 -0
  191. package/src/utils/platformDisconnect.js +309 -0
  192. package/src/utils/pollTrainingStatus.js +200 -0
  193. package/src/utils/rawMemoriesAccess.js +211 -0
  194. package/src/utils/resolveBackendAppId.js +47 -0
  195. package/src/utils/responseFormatter.js +140 -0
  196. package/src/utils/sdkDebugStorage.js +113 -0
  197. package/src/utils/sdkInitialization.js +645 -0
  198. package/src/utils/sessionManager.js +1258 -0
  199. package/src/utils/startBackgroundTraining.js +100 -0
  200. package/src/utils/userDataFormatter.js +222 -0
  201. package/index.d.ts +0 -1
  202. package/index.js +0 -1
@@ -0,0 +1,419 @@
1
+ import React, { Component } from 'react';
2
+ import { getUserAuthHeaders, isUserAuthenticated } from '../../utils/authHeaders';
3
+ import { API_CONFIG } from '../../config/api-config';
4
+ import { buildBookmarkletHref } from '../../utils/bookmarkletUtils';
5
+
6
+ /**
7
+ * Hinge Connector - Dating App Data Extraction
8
+ * Uses bookmarklet pattern for web-based extraction
9
+ * Platform identifier: mobile-hinge
10
+ * Brand Color: #7C3AED (Purple)
11
+ */
12
+
13
+ // Hinge bookmarklet: Extracts matches and chat data
14
+ const HINGE_BOOKMARKLET_CODE = `javascript:(async function(){
15
+ try {
16
+ var host = (location.hostname || '').toLowerCase();
17
+ if (!(host === 'hinge.co' || host.endsWith('.hinge.co') || host === 'app.hinge.co')) {
18
+ alert('⚠️ Please open Hinge (app.hinge.co) and try again.');
19
+ return;
20
+ }
21
+
22
+ var ON_TOKEN = "__ONAIROS_TOKEN__";
23
+ var ON_EMAIL = "__ONAIROS_EMAIL__";
24
+
25
+ // Show consent popup
26
+ var consent = window.confirm(
27
+ '🔒 Onairos Hinge Export\\n\\n' +
28
+ 'Allow Onairos to export your Hinge data?\\n\\n' +
29
+ '• Your matches\\n' +
30
+ '• Your sent messages (not their messages)\\n\\n' +
31
+ 'Your data is encrypted and only used to build your personal AI model.'
32
+ );
33
+
34
+ if (!consent) {
35
+ console.log('❌ Onairos Hinge export cancelled by user.');
36
+ return;
37
+ }
38
+
39
+ console.log('✅ Onairos Hinge export consent granted. Extracting data...');
40
+
41
+ // Helper functions
42
+ function getCookie(name) {
43
+ var match = document.cookie.match(new RegExp('(^| )' + name + '=([^;]+)'));
44
+ return match ? match[2] : null;
45
+ }
46
+
47
+ function getAuthToken() {
48
+ // Check common auth storage locations
49
+ var token = getCookie('auth_token') || getCookie('hinge_auth_token');
50
+ if (!token) {
51
+ try {
52
+ token = localStorage.getItem('auth_token') || localStorage.getItem('hinge_token');
53
+ } catch(e) {}
54
+ }
55
+ if (!token) {
56
+ try {
57
+ token = sessionStorage.getItem('auth_token');
58
+ } catch(e) {}
59
+ }
60
+ return token;
61
+ }
62
+
63
+ var authToken = getAuthToken();
64
+ if (!authToken) {
65
+ alert('⚠️ Could not find Hinge auth token. Please make sure you are logged in.');
66
+ return;
67
+ }
68
+
69
+ // Extract matches from DOM or API
70
+ var matches = [];
71
+ var chats = [];
72
+
73
+ // Try to find matches in the DOM
74
+ var matchElements = document.querySelectorAll('[data-testid*="match"], [class*="match"], [class*="Match"]');
75
+ matchElements.forEach(function(el, idx) {
76
+ var nameEl = el.querySelector('[class*="name"], h2, h3');
77
+ var name = nameEl ? nameEl.textContent.trim() : 'Match ' + (idx + 1);
78
+ matches.push({
79
+ id: 'match_' + idx,
80
+ name: name
81
+ });
82
+ });
83
+
84
+ // Try to extract chat messages from visible conversation
85
+ var messageElements = document.querySelectorAll('[data-testid*="message"], [class*="message"], [class*="Message"]');
86
+ var userMessages = [];
87
+ messageElements.forEach(function(el) {
88
+ // Only extract user's own messages (usually marked differently)
89
+ var isSent = el.classList.contains('sent') ||
90
+ el.getAttribute('data-sent') === 'true' ||
91
+ el.querySelector('[class*="sent"], [class*="outgoing"]');
92
+ if (isSent) {
93
+ var content = el.textContent.trim();
94
+ if (content && content.length > 0) {
95
+ userMessages.push({
96
+ content: content,
97
+ timestamp: new Date().toISOString(),
98
+ role: 'user'
99
+ });
100
+ }
101
+ }
102
+ });
103
+
104
+ if (userMessages.length > 0) {
105
+ chats.push({
106
+ matchId: 'current_chat',
107
+ matchName: 'Current Conversation',
108
+ messages: userMessages,
109
+ totalMessages: userMessages.length
110
+ });
111
+ }
112
+
113
+ // Build payload
114
+ var payload = {
115
+ platform: 'mobile-hinge',
116
+ dataType: 'dating',
117
+ data: {
118
+ matches: matches,
119
+ chats: chats
120
+ },
121
+ summary: {
122
+ matchCount: matches.length,
123
+ chatCount: chats.length,
124
+ totalUserMessages: userMessages.length
125
+ },
126
+ mobileMetadata: {
127
+ platform: 'web',
128
+ source: 'bookmarklet',
129
+ extractedAt: new Date().toISOString()
130
+ }
131
+ };
132
+
133
+ console.log('[Onairos Hinge] ✅ Extracted:', payload);
134
+
135
+ if (!ON_TOKEN || ON_TOKEN === '__ONAIROS_TOKEN__') {
136
+ console.warn('[Onairos Hinge] No token embedded. Open Onairos and re-drag the bookmarklet.');
137
+ alert('⚠️ Onairos Hinge: Data extracted, but no token to store.\\n\\nOpen Onairos → Connect Hinge → drag bookmarklet again.');
138
+ return;
139
+ }
140
+
141
+ // Post to backend
142
+ var baseUrl = '__ONAIROS_BASE_URL__';
143
+ var response = await fetch(baseUrl + '/platform-data/store', {
144
+ method: 'POST',
145
+ headers: {
146
+ 'Content-Type': 'application/json',
147
+ 'Authorization': 'Bearer ' + ON_TOKEN
148
+ },
149
+ body: JSON.stringify(payload)
150
+ });
151
+
152
+ if (!response.ok) {
153
+ throw new Error('HTTP ' + response.status);
154
+ }
155
+
156
+ var result = await response.json();
157
+ console.log('[Onairos Hinge] ✅ Stored:', result);
158
+ alert('✅ Onairos Hinge: Successfully exported ' + matches.length + ' matches and ' + userMessages.length + ' messages!');
159
+
160
+ } catch(e) {
161
+ console.error('[Onairos Hinge] Error:', e);
162
+ alert('❌ Onairos Hinge error: ' + (e && e.message ? e.message : e));
163
+ }
164
+ })();`;
165
+
166
+ class HingeConnector extends Component {
167
+ constructor(props) {
168
+ super(props);
169
+ this.state = {
170
+ connected: false,
171
+ open: false,
172
+ isConnecting: false,
173
+ };
174
+ this.handleClose = this.handleClose.bind(this);
175
+ this.handleOpen = this.handleOpen.bind(this);
176
+ this.setConnected = this.setConnected.bind(this);
177
+ this.setDisconnected = this.setDisconnected.bind(this);
178
+ }
179
+
180
+ getUserToken() {
181
+ try {
182
+ const directToken = localStorage.getItem('onairos_user_token');
183
+ if (directToken) return directToken;
184
+ const userData = JSON.parse(localStorage.getItem('onairosUser') || '{}');
185
+ if (userData.token) return userData.token;
186
+ return null;
187
+ } catch {
188
+ return null;
189
+ }
190
+ }
191
+
192
+ getUserEmail() {
193
+ try {
194
+ const userData = JSON.parse(localStorage.getItem('onairosUser') || '{}');
195
+ return userData.email || userData.userEmail || null;
196
+ } catch {
197
+ return null;
198
+ }
199
+ }
200
+
201
+ getBookmarkletWithToken() {
202
+ const token = this.getUserToken();
203
+ const email = this.getUserEmail();
204
+ let code = HINGE_BOOKMARKLET_CODE;
205
+ if (token) {
206
+ code = code.replace('__ONAIROS_TOKEN__', token);
207
+ }
208
+ if (email) {
209
+ code = code.replace('__ONAIROS_EMAIL__', email);
210
+ }
211
+ code = code.replace('__ONAIROS_BASE_URL__', API_CONFIG.getBaseUrl());
212
+ return buildBookmarkletHref(code);
213
+ }
214
+
215
+ setConnected() {
216
+ this.setState({ connected: true });
217
+ if (this.props.onConnectionChange) {
218
+ this.props.onConnectionChange('Hinge', true);
219
+ }
220
+ this.handleClose();
221
+ }
222
+
223
+ setDisconnected() {
224
+ this.setState({ connected: false });
225
+ if (this.props.onConnectionChange) {
226
+ this.props.onConnectionChange('Hinge', false);
227
+ }
228
+ this.handleClose();
229
+ }
230
+
231
+ handleOpen() {
232
+ this.setState({ open: true });
233
+ }
234
+
235
+ handleClose() {
236
+ this.setState({ open: false });
237
+ if (this.props.onClose) {
238
+ this.props.onClose();
239
+ }
240
+ }
241
+
242
+ render() {
243
+ const { open = this.props.open || this.state.open } = this.props;
244
+
245
+ if (!open) return null;
246
+
247
+ const bookmarkletCode = this.getBookmarkletWithToken();
248
+
249
+ return (
250
+ <>
251
+ <style>{`
252
+ @keyframes hingePulse {
253
+ 0%, 100% { box-shadow: 0 0 0 0 rgba(124, 58, 237, 0.35); }
254
+ 50% { box-shadow: 0 0 0 10px rgba(124, 58, 237, 0); }
255
+ }
256
+ .hinge-bookmarklet-button {
257
+ background: linear-gradient(135deg, #7C3AED 0%, #9333EA 100%);
258
+ border-radius: 9999px;
259
+ border: 1px solid rgba(255,255,255,0.2);
260
+ }
261
+ .hinge-bookmarklet-button:hover {
262
+ background: linear-gradient(135deg, #8B5CF6 0%, #A855F7 100%);
263
+ }
264
+ @keyframes fadeInScale {
265
+ 0% { opacity: 0; transform: translateY(8px) scale(0.96); }
266
+ 100% { opacity: 1; transform: translateY(0) scale(1); }
267
+ }
268
+ .hinge-modal-card {
269
+ animation: fadeInScale 200ms cubic-bezier(0.16, 1, 0.3, 1);
270
+ }
271
+ .hinge-step-circle {
272
+ background: linear-gradient(135deg, #7C3AED 0%, #9333EA 100%);
273
+ min-width: 28px;
274
+ width: 28px;
275
+ height: 28px;
276
+ }
277
+ `}</style>
278
+
279
+ <div className="fixed inset-0 flex items-center justify-center z-[2147483647] p-4 pointer-events-none">
280
+ <div className="w-full max-w-md pointer-events-auto !text-white">
281
+ <div className="hinge-modal-card rounded-3xl overflow-hidden shadow-[0_30px_80px_rgba(124,58,237,0.40)] border border-white/10 bg-[radial-gradient(circle_at_top,_rgba(124,58,237,0.3),_transparent_55%),radial-gradient(circle_at_bottom,_rgba(15,23,42,0.95),_rgba(15,23,42,1))] backdrop-blur-3xl">
282
+
283
+ {/* Header */}
284
+ <div className="relative px-5 py-4 border-b border-white/10 bg-purple-500/20">
285
+ <button
286
+ onClick={this.handleClose}
287
+ className="absolute right-4 top-4 p-1.5 hover:bg-white/20 rounded-full transition-colors"
288
+ aria-label="Close"
289
+ >
290
+ <svg className="w-4 h-4 text-slate-100" fill="none" stroke="currentColor" viewBox="0 0 24 24">
291
+ <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M6 18L18 6M6 6l12 12" />
292
+ </svg>
293
+ </button>
294
+
295
+ <h2 className="text-xl font-semibold pr-8" style={{ color: '#FFFFFF' }}>
296
+ Connect Hinge
297
+ </h2>
298
+ <p className="text-sm mt-0.5" style={{ color: '#E2E8F0' }}>
299
+ Export your matches and conversations
300
+ </p>
301
+
302
+ {/* Privacy Notice */}
303
+ <div className="mt-3 flex items-start gap-2 bg-white/12 rounded-2xl px-3 py-2">
304
+ <svg className="w-4 h-4 text-purple-300 mt-0.5 flex-shrink-0" fill="currentColor" viewBox="0 0 20 20">
305
+ <path fillRule="evenodd" d="M2.166 4.999A11.954 11.954 0 0010 1.944 11.954 11.954 0 0017.834 5c.11.65.166 1.32.166 2.001 0 5.225-3.34 9.67-8 11.317C5.34 16.67 2 12.225 2 7c0-.682.057-1.35.166-2.001zm11.541 3.708a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z" clipRule="evenodd" />
306
+ </svg>
307
+ <p className="text-xs leading-relaxed" style={{ color: '#FFFFFF' }}>
308
+ <strong className="font-semibold">Privacy first.</strong> We only export YOUR messages, not your matches' messages.
309
+ </p>
310
+ </div>
311
+ </div>
312
+
313
+ {/* Steps Content */}
314
+ <div className="px-5 py-4 space-y-4">
315
+
316
+ {/* Step 1 */}
317
+ <div className="flex gap-3">
318
+ <div className="flex-shrink-0">
319
+ <div className="hinge-step-circle rounded-full flex items-center justify-center">
320
+ <span className="text-white font-bold text-sm">1</span>
321
+ </div>
322
+ </div>
323
+ <div className="flex-1 pt-0.5">
324
+ <h3 className="text-sm font-semibold mb-1" style={{ color: '#FFFFFF' }}>
325
+ Drag this button to your bookmarks bar
326
+ </h3>
327
+ <div className="relative inline-block mt-2">
328
+ <div className="absolute inset-0 rounded-full" style={{ animation: 'hingePulse 2s ease-in-out infinite' }}></div>
329
+ <a
330
+ href={bookmarkletCode}
331
+ draggable="true"
332
+ onDragStart={(e) => {
333
+ e.dataTransfer.setData('text/plain', bookmarkletCode);
334
+ e.dataTransfer.effectAllowed = 'copy';
335
+ }}
336
+ onClick={(e) => {
337
+ e.preventDefault();
338
+ alert('Please drag this button to your bookmarks bar');
339
+ }}
340
+ className="hinge-bookmarklet-button relative inline-flex items-center gap-1.5 px-4 py-2 font-medium cursor-move select-none transition-all hover:scale-[1.03]"
341
+ style={{ color: '#FFFFFF' }}
342
+ >
343
+ <span className="text-base">💜</span>
344
+ <span className="text-sm">Onairos Hinge</span>
345
+ </a>
346
+ </div>
347
+ </div>
348
+ </div>
349
+
350
+ <div className="border-t border-white/10 ml-10"></div>
351
+
352
+ {/* Step 2 */}
353
+ <div className="flex gap-3">
354
+ <div className="flex-shrink-0">
355
+ <div className="hinge-step-circle rounded-full flex items-center justify-center">
356
+ <span className="text-white font-bold text-sm">2</span>
357
+ </div>
358
+ </div>
359
+ <div className="flex-1 pt-0.5">
360
+ <h3 className="text-sm font-semibold mb-1" style={{ color: '#FFFFFF' }}>
361
+ Open Hinge Web and log in
362
+ </h3>
363
+ <p className="text-xs mb-2" style={{ color: '#E2E8F0' }}>
364
+ Make sure you're logged into your Hinge account
365
+ </p>
366
+ <button
367
+ onClick={() => window.open('https://hinge.co', '_blank')}
368
+ className="inline-flex items-center gap-1.5 px-4 py-2 rounded-full bg-purple-400/90 hover:bg-purple-300 text-slate-900 text-xs font-medium transition-colors shadow-[0_0_25px_rgba(124,58,237,0.35)]"
369
+ >
370
+ <svg className="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
371
+ <path strokeLinecap="round" strokeLinejoin="round" strokeWidth={2} d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14" />
372
+ </svg>
373
+ Open Hinge
374
+ </button>
375
+ </div>
376
+ </div>
377
+
378
+ <div className="border-t border-white/10 ml-10"></div>
379
+
380
+ {/* Step 3 */}
381
+ <div className="flex gap-3">
382
+ <div className="flex-shrink-0">
383
+ <div className="hinge-step-circle rounded-full flex items-center justify-center">
384
+ <span className="text-white font-bold text-sm">3</span>
385
+ </div>
386
+ </div>
387
+ <div className="flex-1 pt-0.5">
388
+ <h3 className="text-sm font-semibold mb-1" style={{ color: '#FFFFFF' }}>
389
+ Click the bookmark on Hinge
390
+ </h3>
391
+ <p className="text-xs" style={{ color: '#E2E8F0' }}>
392
+ Click <strong style={{ color: '#FFFFFF' }}>"Onairos Hinge"</strong> bookmark. We'll securely export your matches and messages.
393
+ </p>
394
+ </div>
395
+ </div>
396
+
397
+ </div>
398
+
399
+ {/* Footer */}
400
+ <div className="px-5 py-4 bg-white/5 border-t border-white/10">
401
+ <button
402
+ onClick={() => this.setConnected()}
403
+ className="w-full px-4 py-2.5 rounded-full font-medium text-sm transition-all hover:scale-[1.01] active:scale-[0.99] shadow-[0_10px_30px_rgba(124,58,237,0.45)] border border-white/40"
404
+ style={{ background: 'linear-gradient(135deg, #7C3AED 0%, #9333EA 100%)', color: '#FFFFFF' }}
405
+ >
406
+ Got it! ✓
407
+ </button>
408
+ </div>
409
+
410
+ </div>
411
+ </div>
412
+ </div>
413
+ </>
414
+ );
415
+ }
416
+ }
417
+
418
+ export default HingeConnector;
419
+