@frak-labs/components 1.0.10-beta.5b65e64f → 1.0.10-beta.7c6aae18
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.Dru5ABCm.js +167 -0
- package/cdn/ButtonShare.CI5VzJzJ.js +1 -0
- package/cdn/ButtonWallet.Bwr7CW0_.js +40 -0
- package/cdn/GiftIcon.QppqMfWS.js +1 -0
- package/cdn/OpenInAppButton.D1UzTuHx.js +1 -0
- package/cdn/PostPurchase.CQG0oNyg.js +89 -0
- package/cdn/components.js +1 -1
- package/cdn/defaults.kWEdCyGS.js +58 -0
- package/cdn/loader.js +1 -1
- package/cdn/{rewards.ObaTYOMx.js → rewards.BCqPhk1l.js} +1 -1
- package/cdn/useGlobalComponents.BC6Jgzg5.js +1 -0
- package/cdn/useLightDomStyles.imPXuAtf.js +1 -0
- package/cdn/useReward.DCRWg-Kp.js +1 -0
- package/dist/banner.d.ts +1 -1
- package/dist/banner.js +18 -13
- package/dist/buttonShare.d.ts +3 -1
- package/dist/buttonShare.js +9 -7
- package/dist/buttonWallet.js +5 -3
- package/dist/i18n/defaults.d.ts +54 -0
- package/dist/i18n/defaults.js +70 -0
- package/dist/openInApp.d.ts +4 -2
- package/dist/openInApp.js +7 -5
- package/dist/postPurchase.d.ts +1 -1
- package/dist/postPurchase.js +12 -7
- package/dist/{rewards-4ZjvQInq.js → rewards-DOvCuem3.js} +8 -1
- package/dist/useGlobalComponents-CZ7Sh2tZ.js +17 -0
- package/dist/{useLightDomStyles-DPKMhggr.js → useLightDomStyles-DphuQhvx.js} +1 -1
- package/dist/{usePlacement-DTN6H6vW.js → usePlacement-4PoDbn2X.js} +54 -12
- package/dist/{useReward-CJIKPMmq.js → useReward-CcWcDc3G.js} +3 -3
- package/package.json +9 -3
- package/cdn/Banner.Ds4HXhVK.js +0 -167
- package/cdn/ButtonShare.DiC5e1BJ.js +0 -1
- package/cdn/ButtonWallet.CoFDK0ky.js +0 -40
- package/cdn/GiftIcon.DnSW4dJQ.js +0 -1
- package/cdn/OpenInAppButton.B8O6YFx-.js +0 -1
- package/cdn/PostPurchase.BqxojeOo.js +0 -89
- package/cdn/useGlobalComponents.pjgSwLk9.js +0 -1
- package/cdn/useLightDomStyles.2RQE6Iby.js +0 -1
- package/cdn/usePlacement.CRfzWKVY.js +0 -58
- package/cdn/useReward.BxGRytCE.js +0 -1
- package/dist/useGlobalComponents-mSs9unyN.js +0 -21
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { sdkConfigStore } from "@frak-labs/core-sdk";
|
|
2
|
-
import { useEffect, useMemo, useState } from "preact/hooks";
|
|
3
|
-
//#region src/hooks/useGlobalComponents.ts
|
|
4
|
-
/**
|
|
5
|
-
* Subscribe to the global component defaults from the SDK config store.
|
|
6
|
-
* These serve as fallbacks when no placement-level override exists.
|
|
7
|
-
*/
|
|
8
|
-
function useGlobalComponents() {
|
|
9
|
-
const [configVersion, setConfigVersion] = useState(0);
|
|
10
|
-
useEffect(() => {
|
|
11
|
-
const onConfig = (_e) => {
|
|
12
|
-
setConfigVersion((v) => v + 1);
|
|
13
|
-
};
|
|
14
|
-
window.addEventListener("frak:config", onConfig);
|
|
15
|
-
setConfigVersion((v) => v + 1);
|
|
16
|
-
return () => window.removeEventListener("frak:config", onConfig);
|
|
17
|
-
}, []);
|
|
18
|
-
return useMemo(() => sdkConfigStore.getConfig().components, [configVersion]);
|
|
19
|
-
}
|
|
20
|
-
//#endregion
|
|
21
|
-
export { useGlobalComponents as t };
|