react-native-tapline 0.0.0-stage → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +86 -2
- package/TaplineNative.podspec +14 -0
- package/dist/actions.d.ts +203 -0
- package/dist/actions.js +1991 -0
- package/dist/actions.js.map +1 -0
- package/dist/agent.d.ts +117 -0
- package/dist/agent.js +352 -0
- package/dist/agent.js.map +1 -0
- package/dist/alerts.d.ts +35 -0
- package/dist/alerts.js +437 -0
- package/dist/alerts.js.map +1 -0
- package/dist/awake.d.ts +2 -0
- package/dist/awake.js +53 -0
- package/dist/awake.js.map +1 -0
- package/dist/checks.d.ts +35 -0
- package/dist/checks.js +501 -0
- package/dist/checks.js.map +1 -0
- package/dist/client.d.ts +111 -0
- package/dist/client.js +446 -0
- package/dist/client.js.map +1 -0
- package/dist/commands.d.ts +24 -0
- package/dist/commands.js +111 -0
- package/dist/commands.js.map +1 -0
- package/dist/events.d.ts +5 -0
- package/dist/events.js +22 -0
- package/dist/events.js.map +1 -0
- package/dist/feed.d.ts +117 -0
- package/dist/feed.js +440 -0
- package/dist/feed.js.map +1 -0
- package/dist/fiber.d.ts +43 -0
- package/dist/fiber.js +100 -0
- package/dist/fiber.js.map +1 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.js +181 -0
- package/dist/index.js.map +1 -0
- package/dist/inspect.d.ts +249 -0
- package/dist/inspect.js +1354 -0
- package/dist/inspect.js.map +1 -0
- package/dist/keyboard.d.ts +10 -0
- package/dist/keyboard.js +63 -0
- package/dist/keyboard.js.map +1 -0
- package/dist/link.d.ts +21 -0
- package/dist/link.js +63 -0
- package/dist/link.js.map +1 -0
- package/dist/live.d.ts +30 -0
- package/dist/live.js +279 -0
- package/dist/live.js.map +1 -0
- package/dist/logs.d.ts +16 -0
- package/dist/logs.js +171 -0
- package/dist/logs.js.map +1 -0
- package/dist/methods.d.ts +3 -0
- package/dist/methods.js +49 -0
- package/dist/methods.js.map +1 -0
- package/dist/native.d.ts +34 -0
- package/dist/native.js +63 -0
- package/dist/native.js.map +1 -0
- package/dist/network.d.ts +27 -0
- package/dist/network.js +238 -0
- package/dist/network.js.map +1 -0
- package/dist/register.d.ts +24 -0
- package/dist/register.js +180 -0
- package/dist/register.js.map +1 -0
- package/dist/settle.d.ts +27 -0
- package/dist/settle.js +70 -0
- package/dist/settle.js.map +1 -0
- package/dist/source.d.ts +60 -0
- package/dist/source.js +214 -0
- package/dist/source.js.map +1 -0
- package/dist/storage.d.ts +10 -0
- package/dist/storage.js +45 -0
- package/dist/storage.js.map +1 -0
- package/dist/touches.d.ts +15 -0
- package/dist/touches.js +89 -0
- package/dist/touches.js.map +1 -0
- package/dist/types.d.ts +168 -0
- package/dist/types.js +32 -0
- package/dist/types.js.map +1 -0
- package/dist/wait.d.ts +8 -0
- package/dist/wait.js +99 -0
- package/dist/wait.js.map +1 -0
- package/expo-module.config.json +7 -0
- package/ios/TaplineNativeModule.swift +79 -0
- package/metro.d.ts +26 -0
- package/metro.js +146 -0
- package/package.json +100 -4
- package/register.d.ts +1 -0
- package/register.js +3 -0
package/dist/agent.js
ADDED
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TaplineAgent = exports.HOST_PORTS = exports.INSTALL_KEY = exports.PAIRING_KEY = void 0;
|
|
4
|
+
exports.isLocalNetworkHost = isLocalNetworkHost;
|
|
5
|
+
exports.isNearbyAddress = isNearbyAddress;
|
|
6
|
+
const client_1 = require("./client");
|
|
7
|
+
const link_1 = require("./link");
|
|
8
|
+
const logs_1 = require("./logs");
|
|
9
|
+
const types_1 = require("./types");
|
|
10
|
+
exports.PAIRING_KEY = 'tapline.pairing';
|
|
11
|
+
exports.INSTALL_KEY = 'tapline.install';
|
|
12
|
+
/** The ports a Tapline host takes (7210, else up to 7219). */
|
|
13
|
+
exports.HOST_PORTS = [7210, 7211, 7212, 7213, 7214, 7215, 7216, 7217, 7218, 7219];
|
|
14
|
+
/** Loopback (a simulator) or a private LAN address; never Tailscale or the internet: offers stay on the Wi-Fi. */
|
|
15
|
+
function isLocalNetworkHost(host) {
|
|
16
|
+
const h = host.replace(/^\[|\]$/g, '').toLowerCase();
|
|
17
|
+
if (h === 'localhost' || h === '::1' || h.endsWith('.local'))
|
|
18
|
+
return true;
|
|
19
|
+
const v4 = /^(\d{1,3})\.(\d{1,3})\.\d{1,3}\.\d{1,3}$/.exec(h);
|
|
20
|
+
if (v4) {
|
|
21
|
+
const a = Number(v4[1]);
|
|
22
|
+
const b = Number(v4[2]);
|
|
23
|
+
return a === 127 || a === 10 || (a === 192 && b === 168) || (a === 172 && b >= 16 && b <= 31) || (a === 169 && b === 254);
|
|
24
|
+
}
|
|
25
|
+
// unique-local IPv6, but not Tailscale's own range (fd7a:115c:a1e0::/48)
|
|
26
|
+
return (/^f[cd][0-9a-f]{2}:/.test(h) && !h.startsWith('fd7a:115c:a1e0:')) || h.startsWith('fe80:');
|
|
27
|
+
}
|
|
28
|
+
function randomId() {
|
|
29
|
+
let id = '';
|
|
30
|
+
while (id.length < 12)
|
|
31
|
+
id += Math.floor(Math.random() * 16).toString(16);
|
|
32
|
+
return id;
|
|
33
|
+
}
|
|
34
|
+
/** host:port of a ws:// URL. */
|
|
35
|
+
function addressOf(url) {
|
|
36
|
+
return /^wss?:\/\/([^/?#]+)/i.exec(url)?.[1] ?? url;
|
|
37
|
+
}
|
|
38
|
+
/** True for loopback, Tailscale (100.64.0.0/10, *.ts.net, fd7a:115c:a1e0::/48) and private LAN addresses. */
|
|
39
|
+
function isNearbyAddress(address) {
|
|
40
|
+
const host = (address.startsWith('[') ? address.slice(1, address.indexOf(']')) : address.replace(/:\d+$/, '')).toLowerCase();
|
|
41
|
+
if (host === 'localhost' || host.endsWith('.ts.net') || host.endsWith('.local'))
|
|
42
|
+
return true;
|
|
43
|
+
const v4 = /^(\d{1,3})\.(\d{1,3})\.\d{1,3}\.\d{1,3}$/.exec(host);
|
|
44
|
+
if (v4) {
|
|
45
|
+
const a = Number(v4[1]);
|
|
46
|
+
const b = Number(v4[2]);
|
|
47
|
+
return (a === 127 ||
|
|
48
|
+
a === 10 ||
|
|
49
|
+
(a === 100 && b >= 64 && b <= 127) ||
|
|
50
|
+
(a === 192 && b === 168) ||
|
|
51
|
+
(a === 172 && b >= 16 && b <= 31) ||
|
|
52
|
+
(a === 169 && b === 254));
|
|
53
|
+
}
|
|
54
|
+
return host === '::1' || /^f[cd][0-9a-f]{2}:/.test(host) || host.startsWith('fe80:');
|
|
55
|
+
}
|
|
56
|
+
function readPairing(raw) {
|
|
57
|
+
if (raw === null)
|
|
58
|
+
return null;
|
|
59
|
+
try {
|
|
60
|
+
const value = JSON.parse(raw);
|
|
61
|
+
if ((0, types_1.isRecord)(value) && typeof value.url === 'string' && typeof value.token === 'string') {
|
|
62
|
+
const pairing = { url: value.url, token: value.token, name: typeof value.name === 'string' ? value.name : 'a computer' };
|
|
63
|
+
if (typeof value.code === 'string' && value.code !== '')
|
|
64
|
+
pairing.code = value.code;
|
|
65
|
+
return pairing;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
catch {
|
|
69
|
+
// a broken entry: treat as not paired
|
|
70
|
+
}
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* The in-app side of pairing: connects to the remembered computer, and handles pairing and
|
|
75
|
+
* forget links (asking the user before connecting anywhere new). Work runs one step at a time.
|
|
76
|
+
*/
|
|
77
|
+
class TaplineAgent {
|
|
78
|
+
options;
|
|
79
|
+
deps;
|
|
80
|
+
client = null;
|
|
81
|
+
subscription = null;
|
|
82
|
+
pairing = null;
|
|
83
|
+
installId;
|
|
84
|
+
stopped = false;
|
|
85
|
+
chain = Promise.resolve();
|
|
86
|
+
/** Pairing codes already handled: the launch link can arrive twice (initial URL and event). */
|
|
87
|
+
seenCodes = new Set();
|
|
88
|
+
offerTimer = null;
|
|
89
|
+
offerStarted = 0;
|
|
90
|
+
asking = false;
|
|
91
|
+
constructor(options, deps) {
|
|
92
|
+
this.options = options;
|
|
93
|
+
this.deps = deps;
|
|
94
|
+
}
|
|
95
|
+
/** Resolves once the remembered computer is dialled and the launch link handled. Never rejects. */
|
|
96
|
+
start() {
|
|
97
|
+
try {
|
|
98
|
+
this.subscription = this.deps.linking.addEventListener('url', (event) => {
|
|
99
|
+
void this.handleUrl(event.url);
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
103
|
+
// no link events: only the launch link can pair
|
|
104
|
+
}
|
|
105
|
+
return this.enqueue(async () => {
|
|
106
|
+
this.installId = await this.loadInstallId();
|
|
107
|
+
if (this.stopped)
|
|
108
|
+
return;
|
|
109
|
+
if (!this.options.direct) {
|
|
110
|
+
this.pairing = readPairing(await this.deps.storage.getItem(exports.PAIRING_KEY).catch(() => null));
|
|
111
|
+
}
|
|
112
|
+
this.reconnectHome();
|
|
113
|
+
const initial = await this.deps.linking.getInitialURL().catch(() => null);
|
|
114
|
+
if (typeof initial === 'string' && initial !== '')
|
|
115
|
+
await this.onLink(initial, true);
|
|
116
|
+
this.watchOffers();
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Zero-QR pairing (Tapline 1.1): while this development build isn't paired, it looks for an offer from the
|
|
121
|
+
* computer its code comes from (every 2 s for a minute, then every 5 s). The person still taps Connect.
|
|
122
|
+
*/
|
|
123
|
+
watchOffers() {
|
|
124
|
+
const offers = this.deps.offers;
|
|
125
|
+
if (offers === undefined || this.options.direct || this.stopped)
|
|
126
|
+
return;
|
|
127
|
+
const server = offers.devServer();
|
|
128
|
+
if (server === null || !isLocalNetworkHost(server.host))
|
|
129
|
+
return;
|
|
130
|
+
this.offerStarted = Date.now();
|
|
131
|
+
this.scheduleOffer(offers, server, 0);
|
|
132
|
+
}
|
|
133
|
+
scheduleOffer(offers, host, ms) {
|
|
134
|
+
if (this.stopped)
|
|
135
|
+
return;
|
|
136
|
+
const set = offers.setTimeout ?? ((fn, wait) => setTimeout(fn, wait));
|
|
137
|
+
this.offerTimer = set(() => {
|
|
138
|
+
this.offerTimer = null;
|
|
139
|
+
void this.checkOffer(offers, host);
|
|
140
|
+
}, ms);
|
|
141
|
+
}
|
|
142
|
+
async checkOffer(offers, server) {
|
|
143
|
+
if (this.stopped)
|
|
144
|
+
return;
|
|
145
|
+
const next = Date.now() - this.offerStarted < 60_000 ? 2000 : 5000;
|
|
146
|
+
if (this.pairing !== null || this.asking || (offers.active !== undefined && !offers.active())) {
|
|
147
|
+
this.scheduleOffer(offers, server, next);
|
|
148
|
+
return;
|
|
149
|
+
}
|
|
150
|
+
const { host } = server;
|
|
151
|
+
// Metro first (the phone always reaches it), then the ports a host takes.
|
|
152
|
+
const viaMetro = await offers.fetchOffer(host, server.port, 1500).catch(() => null);
|
|
153
|
+
let hit = viaMetro !== null && typeof viaMetro.port === 'number' && !this.seenCodes.has(viaMetro.code) ? { offer: viaMetro, port: viaMetro.port } : null;
|
|
154
|
+
if (hit === null) {
|
|
155
|
+
const found = await Promise.all(exports.HOST_PORTS.map((port) => offers.fetchOffer(host, port, 1500).then((offer) => (offer ? { offer, port } : null), () => null)));
|
|
156
|
+
hit = found.find((f) => f !== null && !this.seenCodes.has(f.offer.code)) ?? null;
|
|
157
|
+
}
|
|
158
|
+
if (hit !== null && this.pairing === null && !this.stopped) {
|
|
159
|
+
const chosen = hit;
|
|
160
|
+
this.seenCodes.add(chosen.offer.code);
|
|
161
|
+
await this.enqueue(() => this.onOffer(host, chosen.port, chosen.offer));
|
|
162
|
+
}
|
|
163
|
+
this.scheduleOffer(offers, server, next);
|
|
164
|
+
}
|
|
165
|
+
async onOffer(host, port, offer) {
|
|
166
|
+
if (this.stopped || this.pairing !== null)
|
|
167
|
+
return;
|
|
168
|
+
// The address is Metro's own: the computer that already runs this app's code, never one the offer names.
|
|
169
|
+
const url = `ws://${host.includes(':') && !host.startsWith('[') ? `[${host}]` : host}:${port}/`;
|
|
170
|
+
this.asking = true;
|
|
171
|
+
let agreed = false;
|
|
172
|
+
try {
|
|
173
|
+
agreed = await this.deps.confirm('Connect for testing?', `${offer.name} (${host}), the computer this app's code comes from, will be able to see and use this app while it is open. Only connect to your own computer.`, 'Connect');
|
|
174
|
+
}
|
|
175
|
+
finally {
|
|
176
|
+
this.asking = false;
|
|
177
|
+
}
|
|
178
|
+
if (!agreed || this.stopped)
|
|
179
|
+
return;
|
|
180
|
+
const name = offer.name;
|
|
181
|
+
this.connect({
|
|
182
|
+
url,
|
|
183
|
+
pairCode: offer.code,
|
|
184
|
+
onPaired: (token) => {
|
|
185
|
+
void this.enqueue(() => this.remember({ url, token, name, code: offer.code }));
|
|
186
|
+
},
|
|
187
|
+
onRejected: () => this.onPairingRefused(name),
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
/** Connects to the direct host, else the paired computer, if there is one. */
|
|
191
|
+
reconnectHome() {
|
|
192
|
+
const direct = this.options.direct;
|
|
193
|
+
const home = direct ?? this.pairing;
|
|
194
|
+
if (home === null) {
|
|
195
|
+
this.client?.stop();
|
|
196
|
+
this.client = null;
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
const name = direct ? 'the computer' : (this.pairing?.name ?? 'the computer');
|
|
200
|
+
this.connect({ url: home.url, token: home.token, onRejected: (code) => this.onTokenRefused(code, name) });
|
|
201
|
+
}
|
|
202
|
+
stop() {
|
|
203
|
+
this.stopped = true;
|
|
204
|
+
if (this.offerTimer !== null) {
|
|
205
|
+
const clear = this.deps.offers?.clearTimeout ?? ((handle) => clearTimeout(handle));
|
|
206
|
+
clear(this.offerTimer);
|
|
207
|
+
this.offerTimer = null;
|
|
208
|
+
}
|
|
209
|
+
try {
|
|
210
|
+
this.subscription?.remove();
|
|
211
|
+
}
|
|
212
|
+
catch {
|
|
213
|
+
// ignore
|
|
214
|
+
}
|
|
215
|
+
this.subscription = null;
|
|
216
|
+
this.client?.stop();
|
|
217
|
+
this.client = null;
|
|
218
|
+
}
|
|
219
|
+
/** Handles a pairing or forget link; other links are ignored. */
|
|
220
|
+
handleUrl(url) {
|
|
221
|
+
return this.enqueue(() => this.onLink(url));
|
|
222
|
+
}
|
|
223
|
+
enqueue(task) {
|
|
224
|
+
const next = this.chain.then(task).catch((error) => {
|
|
225
|
+
this.log(`pairing step failed: ${error instanceof Error ? error.message : String(error)}`);
|
|
226
|
+
});
|
|
227
|
+
this.chain = next;
|
|
228
|
+
return next;
|
|
229
|
+
}
|
|
230
|
+
log(line) {
|
|
231
|
+
try {
|
|
232
|
+
(this.deps.log ?? logs_1.originalLog)(`[tapline] ${line}`);
|
|
233
|
+
}
|
|
234
|
+
catch {
|
|
235
|
+
// never throw into the app
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
connect(options) {
|
|
239
|
+
this.client?.stop();
|
|
240
|
+
this.client = null;
|
|
241
|
+
if (this.stopped)
|
|
242
|
+
return;
|
|
243
|
+
const client = new client_1.TaplineClient({ ...options, app: this.options.app, deviceId: this.installId }, this.deps.clientDeps);
|
|
244
|
+
this.client = client;
|
|
245
|
+
client.start();
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* `launch`: the link the app was opened by. Expo Go hands that same link to every reload of the
|
|
249
|
+
* project, so a launch link this phone has already acted on is not acted on again.
|
|
250
|
+
*/
|
|
251
|
+
async onLink(url, launch = false) {
|
|
252
|
+
if (this.stopped)
|
|
253
|
+
return;
|
|
254
|
+
const link = (0, link_1.parseTaplineLink)(url);
|
|
255
|
+
if (link === null)
|
|
256
|
+
return;
|
|
257
|
+
if (link.kind === 'forget') {
|
|
258
|
+
if (launch && this.pairing === null && !this.options.direct)
|
|
259
|
+
return; // forgotten already
|
|
260
|
+
await this.forget();
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
if (this.seenCodes.has(link.code))
|
|
264
|
+
return;
|
|
265
|
+
this.seenCodes.add(link.code);
|
|
266
|
+
if (this.pairing?.code === link.code) {
|
|
267
|
+
this.log(`this pairing link was used already: paired with ${this.pairing.name}`);
|
|
268
|
+
return;
|
|
269
|
+
}
|
|
270
|
+
// At launch, a link to the computer this phone is already paired with needs no question: Expo Go
|
|
271
|
+
// hands every reload the link it was opened by, and a pairing saved before codes were kept can't
|
|
272
|
+
// recognise its code. A link opened while the app runs still asks (re-pairing on purpose).
|
|
273
|
+
if (launch && this.pairing !== null && this.pairing.url === link.url) {
|
|
274
|
+
this.log(`already paired with ${this.pairing.name}`);
|
|
275
|
+
return;
|
|
276
|
+
}
|
|
277
|
+
const address = addressOf(link.url);
|
|
278
|
+
const warning = isNearbyAddress(address)
|
|
279
|
+
? ''
|
|
280
|
+
: ' Careful: this address is not on your Tailscale network or your local network.';
|
|
281
|
+
const agreed = await this.deps.confirm('Connect for testing?', `${link.name} (${address}) will be able to see and use this app while it is open.${warning} ` +
|
|
282
|
+
'Only connect to your own computer.', 'Connect');
|
|
283
|
+
if (!agreed || this.stopped)
|
|
284
|
+
return;
|
|
285
|
+
const { url: hostUrl, name } = link;
|
|
286
|
+
this.connect({
|
|
287
|
+
url: hostUrl,
|
|
288
|
+
pairCode: link.code,
|
|
289
|
+
onPaired: (token) => {
|
|
290
|
+
// In the queue, so a forget link that follows can't be undone by a late save.
|
|
291
|
+
void this.enqueue(() => this.remember({ url: hostUrl, token, name, code: link.code }));
|
|
292
|
+
},
|
|
293
|
+
onRejected: () => this.onPairingRefused(name),
|
|
294
|
+
});
|
|
295
|
+
}
|
|
296
|
+
async remember(pairing) {
|
|
297
|
+
if (this.stopped)
|
|
298
|
+
return;
|
|
299
|
+
this.pairing = pairing;
|
|
300
|
+
this.log(`paired with ${pairing.name}`);
|
|
301
|
+
try {
|
|
302
|
+
await this.deps.storage.setItem(exports.PAIRING_KEY, JSON.stringify(pairing));
|
|
303
|
+
}
|
|
304
|
+
catch {
|
|
305
|
+
this.log('could not save the pairing; it lasts until the app restarts');
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
onPairingRefused(name) {
|
|
309
|
+
if (this.stopped)
|
|
310
|
+
return;
|
|
311
|
+
this.deps.notify('Tapline', `The pairing code from ${name} has expired or was already used. Make a new one on the computer and scan or open it again.`);
|
|
312
|
+
this.reconnectHome();
|
|
313
|
+
}
|
|
314
|
+
onTokenRefused(code, name) {
|
|
315
|
+
if (this.stopped || code !== client_1.CLOSE_BAD_TOKEN)
|
|
316
|
+
return;
|
|
317
|
+
this.client = null;
|
|
318
|
+
if (!this.options.direct && this.pairing !== null) {
|
|
319
|
+
// The key is dead: forget it, so the computer's next pairing link is asked about, even at launch.
|
|
320
|
+
this.pairing = null;
|
|
321
|
+
void this.enqueue(() => this.deps.storage.removeItem(exports.PAIRING_KEY).catch(() => undefined));
|
|
322
|
+
}
|
|
323
|
+
this.deps.notify('Tapline', `${name} no longer accepts this phone (its Tapline key changed). Scan or open a new pairing code from it to connect again.`);
|
|
324
|
+
}
|
|
325
|
+
async forget() {
|
|
326
|
+
const name = this.options.direct ? 'the computer' : this.pairing?.name;
|
|
327
|
+
this.client?.stop();
|
|
328
|
+
this.client = null;
|
|
329
|
+
this.pairing = null;
|
|
330
|
+
await this.deps.storage.removeItem(exports.PAIRING_KEY).catch(() => undefined);
|
|
331
|
+
if (this.stopped)
|
|
332
|
+
return;
|
|
333
|
+
this.deps.notify('Tapline', name !== undefined
|
|
334
|
+
? `Disconnected from ${name}. Scan or open a new pairing code to connect again.`
|
|
335
|
+
: 'This app was not paired with a computer.');
|
|
336
|
+
}
|
|
337
|
+
async loadInstallId() {
|
|
338
|
+
try {
|
|
339
|
+
const saved = await this.deps.storage.getItem(exports.INSTALL_KEY);
|
|
340
|
+
if (saved !== null && /^[0-9a-f]{12}$/.test(saved))
|
|
341
|
+
return saved;
|
|
342
|
+
const id = randomId();
|
|
343
|
+
await this.deps.storage.setItem(exports.INSTALL_KEY, id);
|
|
344
|
+
return id;
|
|
345
|
+
}
|
|
346
|
+
catch {
|
|
347
|
+
return randomId();
|
|
348
|
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A0C,CAC/C,CAAC;IACJ,CAAC;IAEO,KAAK,CAAC,aAAa;QACzB,IAAI,CAAC;YACH,MAAM,KAAK,GAAG,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,mBAAW,CAAC,CAAC;YAC3D,IAAI,KAAK,KAAK,IAAI,IAAI,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC;gBAAE,OAAO,KAAK,CAAC;YACjE,MAAM,EAAE,GAAG,QAAQ,EAAE,CAAC;YACtB,MAAM,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,mBAAW,EAAE,EAAE,CAAC,CAAC;YACjD,OAAO,EAAE,CAAC;QACZ,CAAC;QAAC,MAAM,CAAC;YACP,OAAO,QAAQ,EAAE,CAAC;QACpB,CAAC;IACH,CAAC;CACF;AA5RD,oCA4RC"}
|
package/dist/alerts.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Alert } from 'react-native';
|
|
3
|
+
export interface AlertButtonInfo {
|
|
4
|
+
text: string;
|
|
5
|
+
style: 'default' | 'cancel' | 'destructive';
|
|
6
|
+
}
|
|
7
|
+
export interface OpenAlert {
|
|
8
|
+
id: number;
|
|
9
|
+
kind: 'alert' | 'prompt';
|
|
10
|
+
title: string;
|
|
11
|
+
message: string | null;
|
|
12
|
+
buttons: AlertButtonInfo[];
|
|
13
|
+
at: number;
|
|
14
|
+
standIn: boolean;
|
|
15
|
+
}
|
|
16
|
+
type AlertFn = typeof Alert.alert;
|
|
17
|
+
export declare function installAlertTracking(options?: {
|
|
18
|
+
standIn?: boolean;
|
|
19
|
+
}): void;
|
|
20
|
+
export declare function uninstallAlertTracking(): void;
|
|
21
|
+
/** True for an open alert that is one of Tapline's own prompts, which only the person answers. */
|
|
22
|
+
export declare function isOwnAlert(id: number): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* A real (native) alert, never replaced by the stand-in: for Tapline's own prompts, such as
|
|
25
|
+
* "Connect for testing?", which only the person holding the phone should answer. It is listed as
|
|
26
|
+
* a real alert (not a stand-in) while open, so the agent sees it and its taps behind it are
|
|
27
|
+
* refused, but it has no way to press its buttons.
|
|
28
|
+
*/
|
|
29
|
+
export declare function nativeAlert(...args: Parameters<AlertFn>): void;
|
|
30
|
+
/** The id of an alert that only the native module saw (an alert or the share sheet UIKit shows). */
|
|
31
|
+
export declare const NATIVE_COVER_ID = -1;
|
|
32
|
+
export declare function openAlerts(): OpenAlert[];
|
|
33
|
+
/** Draws the oldest open stand-in alert. Only the first mounted host renders. */
|
|
34
|
+
export declare function TaplineAlertHost(): React.ReactElement | null;
|
|
35
|
+
export {};
|