onairos 1.0.4 → 1.0.6
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/debug-overlay.html +226 -0
- package/dist/data_request_iframe.html +1 -1
- package/dist/iframe.bundle.js +1 -1
- package/dist/iframe.bundle.js.map +1 -1
- package/dist/onairos.bundle.js +1 -1
- package/dist/onairos.bundle.js.map +1 -1
- package/dist/onairos.cjs.js +16698 -0
- package/dist/onairos.cjs.js.map +1 -0
- package/dist/onairos.esm.js +16685 -8
- package/dist/onairos.esm.js.map +1 -0
- package/dist/onairos.umd.js +47 -31794
- package/dist/onairos.umd.js.map +1 -1
- package/package.json +18 -16
- package/rollup.config.js +83 -39
- package/simple-overlay-demo.html +253 -0
- package/src/components/OthentButton.jsx +1 -5
- package/src/components/SecuritySetup.js +12 -29
- package/src/components/UniversalOnboarding.js +32 -74
- package/src/index.js +21 -7
- package/src/mobile/MobileDataRequestPage.jsx +1 -1
- package/src/onairosButton.jsx +2 -10
- package/test-overlay-fixed.html +246 -0
- package/test-overlay.html +99 -0
- package/webpack.config.js +42 -28
- package/dist/423.onairos.bundle.js +0 -2
- package/dist/423.onairos.bundle.js.map +0 -1
- package/dist/423.onairos.native.js +0 -1
- package/dist/874.onairos.bundle.js +0 -2
- package/dist/874.onairos.bundle.js.LICENSE.txt +0 -22
- package/dist/RSA.js +0 -52
- package/dist/backButton.js +0 -24
- package/dist/common.bundle.js +0 -2
- package/dist/common.bundle.js.map +0 -1
- package/dist/components/AuthButtons.js +0 -48
- package/dist/components/GoogleButton.js +0 -111
- package/dist/components/Notification.js +0 -32
- package/dist/components/OnairosAppButton.js +0 -84
- package/dist/components/OthentButton.js +0 -91
- package/dist/components/SecuritySetup.js +0 -150
- package/dist/components/SignUp.js +0 -125
- package/dist/components/TestTelegramButton.js +0 -60
- package/dist/components/UniversalOnboarding.js +0 -444
- package/dist/components/utils/oauthHelper.js +0 -102
- package/dist/deepLink.js +0 -49
- package/dist/getPin.js +0 -25
- package/dist/hooks/useAccountInfo.js +0 -87
- package/dist/icons/Avatar.png +0 -0
- package/dist/icons/Sentiment.png +0 -0
- package/dist/icons/Trait.png +0 -0
- package/dist/iframe/DataRequestPage.js +0 -273
- package/dist/iframe/OnairosButtonIntegration.md +0 -148
- package/dist/iframe/components/Box.js +0 -86
- package/dist/iframe/components/IndividualConnection.js +0 -66
- package/dist/iframe/dataRequestHandler.js +0 -147
- package/dist/iframe/data_request_iframe.html +0 -27
- package/dist/iframe/data_request_page.js +0 -55
- package/dist/iframe/icons/Avatar.png +0 -1
- package/dist/iframe/icons/Avatar2.png +0 -1
- package/dist/iframe/icons/Sentiment.png +0 -1
- package/dist/iframe/icons/Trait.png +0 -1
- package/dist/iframe/utils/api.js +0 -81
- package/dist/index.js +0 -12
- package/dist/main.bundle.js +0 -2
- package/dist/main.bundle.js.map +0 -1
- package/dist/mobile/MobileDataRequestPage.js +0 -178
- package/dist/mobile/components/MobileBox.js +0 -71
- package/dist/mobile/components/MobileIndividualConnection.js +0 -54
- package/dist/mobile/shims/browser-apis.js +0 -84
- package/dist/mobile/shims/lucide-shim.js +0 -93
- package/dist/onairos.bundle.js.LICENSE.txt +0 -9
- package/dist/onairos.js +0 -21
- package/dist/onairos.native.js +0 -1
- package/dist/onairosButton.js +0 -1066
- package/dist/onairosOld.js +0 -208
- package/dist/othent-kms.js +0 -2
- package/dist/othent-kms.js.map +0 -1
- package/dist/overlay/CheckBox.js +0 -58
- package/dist/overlay/IndividualConnection copy.js +0 -80
- package/dist/overlay/IndividualConnection.js +0 -62
- package/dist/overlay/IndividualConnectionNew.js +0 -68
- package/dist/overlay/box.js +0 -78
- package/dist/overlay/boxNew.js +0 -33
- package/dist/overlay/overlay.js +0 -399
- package/dist/sha256.bundle.js +0 -1
- package/dist/sha256.bundle.js.map +0 -1
- package/dist/sha256.js +0 -2
- package/dist/sha256.js.map +0 -1
- package/dist/utils/biometrics.js +0 -31
- package/dist/utils/deepLinking.js +0 -36
- package/dist/vendors.bundle.js +0 -2
- package/dist/vendors.bundle.js.map +0 -1
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Debug Onairos Overlay</title>
|
|
7
|
+
<script src="https://unpkg.com/react@18/umd/react.development.js"></script>
|
|
8
|
+
<script src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>
|
|
9
|
+
<script src="https://unpkg.com/framer-motion@10/dist/framer-motion.umd.js"></script>
|
|
10
|
+
<script src="https://cdn.tailwindcss.com"></script>
|
|
11
|
+
<style>
|
|
12
|
+
body {
|
|
13
|
+
margin: 0;
|
|
14
|
+
padding: 20px;
|
|
15
|
+
font-family: Arial, sans-serif;
|
|
16
|
+
background-color: #f0f0f0;
|
|
17
|
+
}
|
|
18
|
+
.debug-container {
|
|
19
|
+
max-width: 800px;
|
|
20
|
+
margin: 0 auto;
|
|
21
|
+
background: white;
|
|
22
|
+
padding: 20px;
|
|
23
|
+
border-radius: 8px;
|
|
24
|
+
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
|
|
25
|
+
}
|
|
26
|
+
.debug-log {
|
|
27
|
+
background: #f8f9fa;
|
|
28
|
+
border: 1px solid #dee2e6;
|
|
29
|
+
border-radius: 4px;
|
|
30
|
+
padding: 10px;
|
|
31
|
+
margin: 10px 0;
|
|
32
|
+
font-family: monospace;
|
|
33
|
+
font-size: 12px;
|
|
34
|
+
max-height: 300px;
|
|
35
|
+
overflow-y: auto;
|
|
36
|
+
}
|
|
37
|
+
</style>
|
|
38
|
+
</head>
|
|
39
|
+
<body>
|
|
40
|
+
<div class="debug-container">
|
|
41
|
+
<h1>Debug Onairos Overlay</h1>
|
|
42
|
+
|
|
43
|
+
<div>
|
|
44
|
+
<h3>Step 1: Check if bundle loads</h3>
|
|
45
|
+
<div id="bundle-status">Loading...</div>
|
|
46
|
+
</div>
|
|
47
|
+
|
|
48
|
+
<div>
|
|
49
|
+
<h3>Step 2: Check Onairos object</h3>
|
|
50
|
+
<div id="onairos-status">Checking...</div>
|
|
51
|
+
</div>
|
|
52
|
+
|
|
53
|
+
<div>
|
|
54
|
+
<h3>Step 3: Create button</h3>
|
|
55
|
+
<div id="button-container"></div>
|
|
56
|
+
<div id="button-status">Waiting...</div>
|
|
57
|
+
</div>
|
|
58
|
+
|
|
59
|
+
<div>
|
|
60
|
+
<h3>Step 4: Test overlay</h3>
|
|
61
|
+
<button id="test-overlay-btn" onclick="testOverlay()" style="padding: 10px 20px; background: #007bff; color: white; border: none; border-radius: 4px; cursor: pointer;">
|
|
62
|
+
Test Overlay Manually
|
|
63
|
+
</button>
|
|
64
|
+
<div id="overlay-status">Ready to test</div>
|
|
65
|
+
</div>
|
|
66
|
+
|
|
67
|
+
<div>
|
|
68
|
+
<h3>Debug Log:</h3>
|
|
69
|
+
<div id="debug-log" class="debug-log"></div>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
|
|
73
|
+
<script src="./dist/onairos.bundle.js"></script>
|
|
74
|
+
<script>
|
|
75
|
+
let onairosComponent = null;
|
|
76
|
+
let root = null;
|
|
77
|
+
|
|
78
|
+
function log(message) {
|
|
79
|
+
const logDiv = document.getElementById('debug-log');
|
|
80
|
+
const timestamp = new Date().toLocaleTimeString();
|
|
81
|
+
logDiv.innerHTML += `<div>[${timestamp}] ${message}</div>`;
|
|
82
|
+
logDiv.scrollTop = logDiv.scrollHeight;
|
|
83
|
+
console.log(`[DEBUG] ${message}`);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
function updateStatus(elementId, message, isError = false) {
|
|
87
|
+
const element = document.getElementById(elementId);
|
|
88
|
+
element.textContent = message;
|
|
89
|
+
element.style.color = isError ? 'red' : 'green';
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Step 1: Check bundle
|
|
93
|
+
log('Checking if bundle loaded...');
|
|
94
|
+
if (typeof window.Onairos !== 'undefined') {
|
|
95
|
+
updateStatus('bundle-status', '✓ Bundle loaded successfully');
|
|
96
|
+
log('Bundle loaded successfully');
|
|
97
|
+
} else {
|
|
98
|
+
updateStatus('bundle-status', '✗ Bundle failed to load', true);
|
|
99
|
+
log('ERROR: Bundle failed to load');
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// Check if framer-motion is available
|
|
103
|
+
log('Checking framer-motion availability...');
|
|
104
|
+
if (typeof window.FramerMotion !== 'undefined') {
|
|
105
|
+
log('✓ Framer Motion loaded successfully');
|
|
106
|
+
window['framer-motion'] = window.FramerMotion;
|
|
107
|
+
} else {
|
|
108
|
+
log('⚠️ Framer Motion not found - animations may not work');
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// Step 2: Check Onairos object
|
|
112
|
+
setTimeout(() => {
|
|
113
|
+
log('Checking Onairos object...');
|
|
114
|
+
if (window.Onairos && window.Onairos.Onairos) {
|
|
115
|
+
updateStatus('onairos-status', '✓ Onairos component found');
|
|
116
|
+
log('Onairos component found');
|
|
117
|
+
log('Available properties: ' + Object.keys(window.Onairos).join(', '));
|
|
118
|
+
|
|
119
|
+
// Step 3: Create button
|
|
120
|
+
createButton();
|
|
121
|
+
} else {
|
|
122
|
+
updateStatus('onairos-status', '✗ Onairos component not found', true);
|
|
123
|
+
log('ERROR: Onairos component not found');
|
|
124
|
+
if (window.Onairos) {
|
|
125
|
+
log('Available properties: ' + Object.keys(window.Onairos).join(', '));
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}, 100);
|
|
129
|
+
|
|
130
|
+
function createButton() {
|
|
131
|
+
log('Creating Onairos button...');
|
|
132
|
+
try {
|
|
133
|
+
const buttonContainer = document.getElementById('button-container');
|
|
134
|
+
|
|
135
|
+
// Use React 18's createRoot instead of ReactDOM.render
|
|
136
|
+
if (ReactDOM.createRoot) {
|
|
137
|
+
root = ReactDOM.createRoot(buttonContainer);
|
|
138
|
+
|
|
139
|
+
onairosComponent = React.createElement(window.Onairos.Onairos, {
|
|
140
|
+
requestData: {
|
|
141
|
+
personality: {
|
|
142
|
+
type: 'Personality',
|
|
143
|
+
descriptions: ['Basic personality traits'],
|
|
144
|
+
reward: 10
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
webpageName: 'Debug Test Page',
|
|
148
|
+
onComplete: (result) => {
|
|
149
|
+
log('Onboarding completed: ' + JSON.stringify(result));
|
|
150
|
+
updateStatus('overlay-status', '✓ Onboarding completed');
|
|
151
|
+
},
|
|
152
|
+
visualType: 'full',
|
|
153
|
+
buttonType: 'pill',
|
|
154
|
+
textColor: 'black'
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
root.render(onairosComponent);
|
|
158
|
+
updateStatus('button-status', '✓ Button created successfully');
|
|
159
|
+
log('Button created and rendered with React 18 createRoot');
|
|
160
|
+
} else {
|
|
161
|
+
// Fallback to legacy ReactDOM.render
|
|
162
|
+
onairosComponent = React.createElement(window.Onairos.Onairos, {
|
|
163
|
+
requestData: {
|
|
164
|
+
personality: {
|
|
165
|
+
type: 'Personality',
|
|
166
|
+
descriptions: ['Basic personality traits'],
|
|
167
|
+
reward: 10
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
webpageName: 'Debug Test Page',
|
|
171
|
+
onComplete: (result) => {
|
|
172
|
+
log('Onboarding completed: ' + JSON.stringify(result));
|
|
173
|
+
updateStatus('overlay-status', '✓ Onboarding completed');
|
|
174
|
+
},
|
|
175
|
+
visualType: 'full',
|
|
176
|
+
buttonType: 'pill',
|
|
177
|
+
textColor: 'black'
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
ReactDOM.render(onairosComponent, buttonContainer);
|
|
181
|
+
updateStatus('button-status', '✓ Button created successfully (legacy)');
|
|
182
|
+
log('Button created and rendered with legacy ReactDOM.render');
|
|
183
|
+
}
|
|
184
|
+
} catch (error) {
|
|
185
|
+
updateStatus('button-status', '✗ Failed to create button: ' + error.message, true);
|
|
186
|
+
log('ERROR creating button: ' + error.message);
|
|
187
|
+
console.error('Full error:', error);
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
function testOverlay() {
|
|
192
|
+
log('Testing overlay manually...');
|
|
193
|
+
updateStatus('overlay-status', 'Testing overlay...');
|
|
194
|
+
|
|
195
|
+
// Try to trigger the overlay directly
|
|
196
|
+
const button = document.querySelector('.OnairosConnect');
|
|
197
|
+
if (button) {
|
|
198
|
+
log('Found Onairos button, clicking...');
|
|
199
|
+
button.click();
|
|
200
|
+
updateStatus('overlay-status', 'Button clicked');
|
|
201
|
+
} else {
|
|
202
|
+
log('ERROR: Could not find Onairos button');
|
|
203
|
+
updateStatus('overlay-status', '✗ Button not found', true);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
// Capture all console logs
|
|
208
|
+
const originalLog = console.log;
|
|
209
|
+
const originalError = console.error;
|
|
210
|
+
|
|
211
|
+
console.log = function(...args) {
|
|
212
|
+
if (args[0] && args[0].includes && args[0].includes('🔥')) {
|
|
213
|
+
log('CONSOLE: ' + args.join(' '));
|
|
214
|
+
}
|
|
215
|
+
originalLog.apply(console, args);
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
console.error = function(...args) {
|
|
219
|
+
log('ERROR: ' + args.join(' '));
|
|
220
|
+
originalError.apply(console, args);
|
|
221
|
+
};
|
|
222
|
+
|
|
223
|
+
log('Debug page initialized');
|
|
224
|
+
</script>
|
|
225
|
+
</body>
|
|
226
|
+
</html>
|
|
@@ -9,4 +9,4 @@
|
|
|
9
9
|
#root {
|
|
10
10
|
width: 100%;
|
|
11
11
|
height: 100vh;
|
|
12
|
-
}</style><script defer="defer" src="
|
|
12
|
+
}</style><script defer="defer" src="iframe.bundle.js"></script></head><body><div id="root"></div><script src="data_request_page.js"></script></body></html>
|