@frak-labs/components 0.0.26-beta.9d5371b4 → 0.0.26-beta.bbbb3d22
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/cdn/Banner.BrrxJ-YP.js +132 -0
- package/cdn/ButtonShare.D6sav-O3.js +1 -0
- package/cdn/{ButtonWallet.B7UmJcbb.js → ButtonWallet.DalZLwGv.js} +2 -2
- package/cdn/OpenInAppButton.BBj09SVF.js +1 -0
- package/cdn/PostPurchase.CXHETVu7.js +47 -0
- package/cdn/components.js +1 -1
- package/cdn/formatReward.CU8k_jx9.js +1 -0
- package/cdn/jsxRuntime.module.D7jbXhdY.js +58 -0
- package/cdn/loader.js +26 -26
- package/cdn/sprinkles.css.ts.vanilla.BtNHSSRm.js +1175 -0
- package/cdn/useLightDomStyles.x0mCz8nV.js +1 -0
- package/cdn/useReward.Cbh2WzQ3.js +1 -0
- package/cdn/useShareModal.DsoI-v9u.js +1 -0
- package/dist/GiftIcon-BrNVWoWm.js +1246 -0
- package/dist/banner.d.ts +24 -11
- package/dist/banner.js +314 -96
- package/dist/buttonShare.d.ts +2 -2
- package/dist/buttonShare.js +5 -11
- package/dist/buttonWallet.d.ts +2 -2
- package/dist/buttonWallet.js +3 -7
- package/dist/{formatReward-6JQldDEC.js → formatReward-_UYA3aHE.js} +1 -3
- package/dist/openInApp.d.ts +2 -2
- package/dist/openInApp.js +3 -9
- package/dist/postPurchase.d.ts +8 -2
- package/dist/postPurchase.js +1623 -25
- package/dist/{useLightDomStyles-DukxuNnJ.js → useLightDomStyles-Cjpf0MnX.js} +2 -5
- package/dist/{usePlacement-BbMuz8_A.js → usePlacement-LqYjZLX_.js} +1 -93
- package/dist/{useReward-CI2yRrCj.js → useReward-XF2hB_C_.js} +2 -4
- package/dist/{useShareModal-DHlayNqk.js → useShareModal-Bmlk3eBJ.js} +1 -3
- package/package.json +13 -9
- package/cdn/Banner.BfkMel9Q.js +0 -1
- package/cdn/ButtonShare.BM9Inhmf.js +0 -1
- package/cdn/OpenInAppButton.B4mrsz6L.js +0 -1
- package/cdn/PostPurchase.BIc0C4Ma.js +0 -1
- package/cdn/formatReward.C8hlSKRj.js +0 -1
- package/cdn/jsxRuntime.module.5UNmmhNi.js +0 -138
- package/cdn/useLightDomStyles.D895e4W1.js +0 -1
- package/cdn/useReward.DEU0AF3P.js +0 -1
- package/cdn/useShareModal.CN9_P7Sl.js +0 -1
package/dist/openInApp.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as preact from "preact";
|
|
1
|
+
import * as _$preact from "preact";
|
|
2
2
|
|
|
3
3
|
//#region src/components/OpenInAppButton/types.d.ts
|
|
4
4
|
/**
|
|
@@ -49,7 +49,7 @@ declare function OpenInAppButton({
|
|
|
49
49
|
placement: placementId,
|
|
50
50
|
text,
|
|
51
51
|
classname
|
|
52
|
-
}: OpenInAppButtonProps): preact.JSX.Element | null;
|
|
52
|
+
}: OpenInAppButtonProps): _$preact.JSX.Element | null;
|
|
53
53
|
//#endregion
|
|
54
54
|
//#region src/components/OpenInAppButton/index.d.ts
|
|
55
55
|
/**
|
package/dist/openInApp.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { a as
|
|
2
|
-
import { t as useLightDomStyles } from "./useLightDomStyles-
|
|
1
|
+
import { a as registerWebComponent, i as useClientReady, t as usePlacement } from "./usePlacement-LqYjZLX_.js";
|
|
2
|
+
import { t as useLightDomStyles } from "./useLightDomStyles-Cjpf0MnX.js";
|
|
3
3
|
import { DEEP_LINK_SCHEME, trackEvent, triggerDeepLinkWithFallback } from "@frak-labs/core-sdk";
|
|
4
4
|
import { useMemo } from "preact/hooks";
|
|
5
5
|
import { jsx } from "preact/jsx-runtime";
|
|
6
|
-
|
|
7
6
|
//#region src/utils/isMobile.ts
|
|
8
7
|
/**
|
|
9
8
|
* Check if the current device is a mobile device
|
|
@@ -20,13 +19,11 @@ function isMobile() {
|
|
|
20
19
|
if (/Macintosh/i.test(navigator.userAgent) && navigator.maxTouchPoints > 1) return true;
|
|
21
20
|
return false;
|
|
22
21
|
}
|
|
23
|
-
|
|
24
22
|
//#endregion
|
|
25
23
|
//#region src/hooks/useIsMobile.ts
|
|
26
24
|
function useIsMobile() {
|
|
27
25
|
return { isMobile: useMemo(() => isMobile(), []) };
|
|
28
26
|
}
|
|
29
|
-
|
|
30
27
|
//#endregion
|
|
31
28
|
//#region src/utils/openInApp.ts
|
|
32
29
|
const DEFAULT_PATH = "wallet";
|
|
@@ -46,7 +43,6 @@ function openFrakWalletApp(path = DEFAULT_PATH) {
|
|
|
46
43
|
if (client) trackEvent(client, "app_not_installed");
|
|
47
44
|
} });
|
|
48
45
|
}
|
|
49
|
-
|
|
50
46
|
//#endregion
|
|
51
47
|
//#region src/components/OpenInAppButton/OpenInAppButton.tsx
|
|
52
48
|
/**
|
|
@@ -99,7 +95,6 @@ function OpenInAppButton({ placement: placementId, text = "Open in App", classna
|
|
|
99
95
|
children: resolvedText
|
|
100
96
|
});
|
|
101
97
|
}
|
|
102
|
-
|
|
103
98
|
//#endregion
|
|
104
99
|
//#region src/components/OpenInAppButton/index.ts
|
|
105
100
|
registerWebComponent(OpenInAppButton, "frak-open-in-app", [
|
|
@@ -107,6 +102,5 @@ registerWebComponent(OpenInAppButton, "frak-open-in-app", [
|
|
|
107
102
|
"placement",
|
|
108
103
|
"classname"
|
|
109
104
|
], { shadow: false });
|
|
110
|
-
|
|
111
105
|
//#endregion
|
|
112
|
-
export { OpenInAppButton };
|
|
106
|
+
export { OpenInAppButton };
|
package/dist/postPurchase.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as preact from "preact";
|
|
1
|
+
import * as _$preact from "preact";
|
|
2
2
|
|
|
3
3
|
//#region src/components/PostPurchase/types.d.ts
|
|
4
4
|
/**
|
|
@@ -41,6 +41,11 @@ type PostPurchaseProps = {
|
|
|
41
41
|
* Force a display variant instead of relying on the backend evaluation.
|
|
42
42
|
*/
|
|
43
43
|
variant?: "referrer" | "referee";
|
|
44
|
+
/**
|
|
45
|
+
* Label for the pill badge displayed above the message.
|
|
46
|
+
* When omitted (and no placement config provides one), the badge is hidden.
|
|
47
|
+
*/
|
|
48
|
+
badgeText?: string;
|
|
44
49
|
/**
|
|
45
50
|
* Override the message shown to referrers.
|
|
46
51
|
* Use `{REWARD}` as placeholder for the reward amount.
|
|
@@ -96,10 +101,11 @@ declare function PostPurchase({
|
|
|
96
101
|
placement: placementId,
|
|
97
102
|
classname,
|
|
98
103
|
variant: forcedVariant,
|
|
104
|
+
badgeText: propBadgeText,
|
|
99
105
|
referrerText: propReferrerText,
|
|
100
106
|
refereeText: propRefereeText,
|
|
101
107
|
ctaText: propCtaText
|
|
102
|
-
}: PostPurchaseProps): preact.JSX.Element | null;
|
|
108
|
+
}: PostPurchaseProps): _$preact.JSX.Element | null;
|
|
103
109
|
//#endregion
|
|
104
110
|
//#region src/components/PostPurchase/index.d.ts
|
|
105
111
|
/**
|