@ikonai/sdk 1.0.61 → 1.0.62
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/assets/{audio-playback-worker-BhikbMvg.js → audio-playback-worker-CC2FKp8X.js} +42 -42
- package/assets/{protocol-worker-C1bzc65g.js → protocol-worker-DCLZvHGe.js} +1 -1
- package/assets/{video-capture-worker-aMgUqmMd.js → video-capture-worker-CzOnKSIv.js} +40 -40
- package/assets/{video-playback-worker-Cfg2cyD1.js → video-playback-worker-BTMuFG90.js} +17 -17
- package/client/ikon-client.d.ts +15 -0
- package/index.js +454 -380
- package/package.json +1 -1
- package/utils/external-link.d.ts +23 -0
package/package.json
CHANGED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Handling for links that hand off to an external OS application (mailto:, tel:, sms:) rather than
|
|
3
|
+
* navigating the page.
|
|
4
|
+
*
|
|
5
|
+
* Clicking a plain `<a href="mailto:...">` makes the browser begin a top-level navigation: it fires
|
|
6
|
+
* `beforeunload`/`pagehide`, *then* recognises the scheme is externally handled, hands off to the OS
|
|
7
|
+
* and aborts the navigation. The document never actually unloads, but the unload events already
|
|
8
|
+
* fired — which tears down the Ikon connection and leaves the page unresponsive after the user
|
|
9
|
+
* returns from their mail/phone app.
|
|
10
|
+
*
|
|
11
|
+
* Launching the same URL through a transient hidden iframe triggers the OS handler without starting
|
|
12
|
+
* a top-level navigation, so none of the unload lifecycle fires and the connection stays alive.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* True when `href` uses a scheme that launches an external OS handler instead of navigating the
|
|
16
|
+
* page. Relative URLs, fragments and protocol-relative URLs (no scheme) are in-app navigation and
|
|
17
|
+
* return false; any scheme not in {@link NAVIGABLE_SCHEMES} is treated as an external handler.
|
|
18
|
+
*/
|
|
19
|
+
export declare function isExternalHandlerScheme(href: string): boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Trigger an external-handler URL (mailto:/tel:/sms:) without navigating the top-level document.
|
|
22
|
+
*/
|
|
23
|
+
export declare function launchExternalHandler(href: string): void;
|