@frak-labs/components 1.2.3 → 1.2.4
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/README.md +14 -2
- package/cdn/components.js +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -13,10 +13,22 @@ How it works under the hood: [Under the hood](https://docs.frak.id/wallet-sdk/un
|
|
|
13
13
|
|
|
14
14
|
## Setup
|
|
15
15
|
|
|
16
|
-
Add the following
|
|
16
|
+
Add the following to your HTML file's `<head>`. `sdk.frak.id` is a first-party
|
|
17
|
+
pointer with a 5-minute cache, so a release reaches you within minutes; if it
|
|
18
|
+
is ever unreachable, `onerror` falls back to jsDelivr's `@latest` tag (a
|
|
19
|
+
7-day browser cache, but still your SDK). The pointer's own fetch is
|
|
20
|
+
no-cors, so only jsDelivr's preconnect carries `crossorigin`:
|
|
17
21
|
|
|
18
22
|
```html
|
|
19
|
-
<
|
|
23
|
+
<link rel="dns-prefetch" href="https://sdk.frak.id">
|
|
24
|
+
<link rel="preconnect" href="https://sdk.frak.id">
|
|
25
|
+
<link rel="dns-prefetch" href="https://cdn.jsdelivr.net">
|
|
26
|
+
<link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin>
|
|
27
|
+
<script
|
|
28
|
+
src="https://sdk.frak.id/components.js"
|
|
29
|
+
defer="defer"
|
|
30
|
+
onerror="var s=document.createElement('script');s.src='https://cdn.jsdelivr.net/npm/@frak-labs/components@latest/cdn/components.js';s.defer=true;document.head.appendChild(s)"
|
|
31
|
+
></script>
|
|
20
32
|
```
|
|
21
33
|
|
|
22
34
|
## Quick start
|
package/cdn/components.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import(`https://cdn.jsdelivr.net/npm/@frak-labs/components@
|
|
1
|
+
import(`https://cdn.jsdelivr.net/npm/@frak-labs/components@1.2.4/cdn/loader.js`);
|
package/package.json
CHANGED
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"url": "https://twitter.com/QNivelais"
|
|
12
12
|
}
|
|
13
13
|
],
|
|
14
|
-
"version": "1.2.
|
|
15
|
-
"description": "Frak
|
|
14
|
+
"version": "1.2.4",
|
|
15
|
+
"description": "Frak web components (share button, banner, post-purchase) for any merchant page; load the shim from https://sdk.frak.id/components.js.",
|
|
16
16
|
"repository": {
|
|
17
17
|
"url": "https://github.com/frak-id/wallet",
|
|
18
18
|
"directory": "sdk/components"
|