@frak-labs/components 1.3.3-beta.a79006c4 → 1.3.3-beta.b5bbb625

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.
Files changed (47) hide show
  1. package/cdn/Ambassador.DIumLn1z.js +392 -0
  2. package/cdn/Banner.8mqstDGK.js +208 -0
  3. package/cdn/ButtonShare.C7xLonci.js +1 -0
  4. package/cdn/ButtonWallet.CYf4UqML.js +40 -0
  5. package/cdn/{GiftIcon.CX0gLPUJ.js → GiftIcon.CW1SwrXH.js} +1 -1
  6. package/cdn/OpenInAppButton.Djz_cb9Y.js +1 -0
  7. package/cdn/PostPurchase.CxuZ9cs-.js +102 -0
  8. package/cdn/components.js +1 -1
  9. package/cdn/{jsxRuntime.module.CUZaa90V.js → jsxRuntime.module.DWH-kRVd.js} +1 -1
  10. package/cdn/loader.js +14 -14
  11. package/cdn/useGlobalComponents.DVgSWfOp.js +1 -0
  12. package/cdn/useLightDomStyles.B72V1WPK.js +31 -0
  13. package/cdn/usePlacement.DEOEf5_6.js +1 -0
  14. package/cdn/useReward.g4cWDddX.js +1 -0
  15. package/dist/{GiftIcon-JVhSFEhP.js → GiftIcon-B9k_syq6.js} +6 -12
  16. package/dist/ambassador.d.ts +0 -6
  17. package/dist/ambassador.js +105 -33
  18. package/dist/banner.d.ts +0 -6
  19. package/dist/banner.js +20 -29
  20. package/dist/buttonShare.d.ts +0 -6
  21. package/dist/buttonShare.js +8 -10
  22. package/dist/buttonWallet.d.ts +0 -6
  23. package/dist/buttonWallet.js +7 -11
  24. package/dist/i18n/defaults.d.ts +0 -2
  25. package/dist/i18n/defaults.js +1 -2
  26. package/dist/openInApp.d.ts +0 -6
  27. package/dist/openInApp.js +7 -11
  28. package/dist/postPurchase.d.ts +0 -6
  29. package/dist/postPurchase.js +10 -13
  30. package/dist/{rewards-HJlTkTcY.js → rewards-CfGynCt6.js} +2 -4
  31. package/dist/{sharedBaseCss.css-BkMpQeRx.js → sharedBaseCss.css-nYy9vlzH.js} +1 -3
  32. package/dist/{sharedCss-CPNmnpXA.js → sharedCss-SKmJGZgN.js} +10 -20
  33. package/dist/{useGlobalComponents-B3s2UQFk.js → useGlobalComponents-BF47jsBt.js} +2 -3
  34. package/dist/{useLightDomStyles-BQ5FvCPi.js → useLightDomStyles-wGaNXHqN.js} +4 -6
  35. package/dist/{usePlacement-BpaIbzun.js → usePlacement-Dd7itnCf.js} +2 -3
  36. package/dist/{useReward-WmsNOFlz.js → useReward-DmukZKoh.js} +2 -3
  37. package/package.json +13 -13
  38. package/cdn/Ambassador.7wEDPaYu.js +0 -392
  39. package/cdn/Banner.8NeKFnVj.js +0 -208
  40. package/cdn/ButtonShare.BTT49Sbn.js +0 -1
  41. package/cdn/ButtonWallet.CB0Ysymx.js +0 -40
  42. package/cdn/OpenInAppButton.DdL3xii8.js +0 -1
  43. package/cdn/PostPurchase.ClgDFxmZ.js +0 -102
  44. package/cdn/useGlobalComponents.CXuceSQ0.js +0 -1
  45. package/cdn/useLightDomStyles.C3oQ3HLu.js +0 -1
  46. package/cdn/usePlacement.Cq64cZ9Q.js +0 -1
  47. package/cdn/useReward.BpO3D675.js +0 -1
@@ -1,4 +1,4 @@
1
- //#region src/i18n/defaults.ts
1
+ // src/i18n/defaults.ts
2
2
  /**
3
3
  * Built-in, per-language default copy for the SDK Web Components.
4
4
  *
@@ -180,5 +180,4 @@ const componentDefaults = {
180
180
  }
181
181
  }
182
182
  };
183
- //#endregion
184
183
  export { componentDefaults };
@@ -1,4 +1,3 @@
1
- //#region src/components/OpenInAppButton/types.d.ts
2
1
  /**
3
2
  * The props type for {@link OpenInAppButton}.
4
3
  * @inline
@@ -17,8 +16,6 @@ type OpenInAppButtonProps = {
17
16
  */
18
17
  classname?: string;
19
18
  };
20
- //#endregion
21
- //#region src/components/OpenInAppButton/OpenInAppButton.d.ts
22
19
  /**
23
20
  * Button to open the Frak Wallet mobile app via deep link
24
21
  *
@@ -46,8 +43,6 @@ type OpenInAppButtonProps = {
46
43
  * ```
47
44
  */
48
45
  export declare function OpenInAppButton({ placement: placementId, text, classname }: OpenInAppButtonProps): import("preact").JSX.Element | null;
49
- //#endregion
50
- //#region src/components/OpenInAppButton/index.d.ts
51
46
  /**
52
47
  * Custom element interface for `<frak-open-in-app>`.
53
48
  * Combines standard {@link HTMLElement} with {@link OpenInAppButtonProps}.
@@ -58,5 +53,4 @@ declare global {
58
53
  "frak-open-in-app": OpenInAppButtonElement;
59
54
  }
60
55
  }
61
- //#endregion
62
56
  export {};
package/dist/openInApp.js CHANGED
@@ -1,10 +1,10 @@
1
- import { a as useClientReady, o as registerWebComponent, r as useLang } from "./sharedCss-CPNmnpXA.js";
2
- import { t as useLightDomStyles } from "./useLightDomStyles-BQ5FvCPi.js";
1
+ import { a as useClientReady, o as registerWebComponent, r as useLang } from "./sharedCss-SKmJGZgN.js";
2
+ import { t as useLightDomStyles } from "./useLightDomStyles-wGaNXHqN.js";
3
+ import { t as usePlacement } from "./usePlacement-Dd7itnCf.js";
3
4
  import { componentDefaults } from "./i18n/defaults.js";
4
- import { t as usePlacement } from "./usePlacement-BpaIbzun.js";
5
5
  import { DEEP_LINK_SCHEME, isMobile, trackEvent, triggerDeepLinkWithFallback } from "@frak-labs/core-sdk";
6
6
  import { jsx } from "preact/jsx-runtime";
7
- //#region src/actions/openInApp.ts
7
+ // src/actions/openInApp.ts
8
8
  const DEFAULT_PATH = "wallet";
9
9
  /**
10
10
  * Open the Frak Wallet mobile app via deep link with fallback detection.
@@ -27,13 +27,11 @@ function openFrakWalletApp(path = DEFAULT_PATH, placement) {
27
27
  });
28
28
  } });
29
29
  }
30
- //#endregion
31
- //#region src/hooks/useIsMobile.ts
30
+ // src/hooks/useIsMobile.ts
32
31
  function useIsMobile() {
33
32
  return { isMobile: isMobile() };
34
33
  }
35
- //#endregion
36
- //#region src/components/OpenInAppButton/OpenInAppButton.tsx
34
+ // src/components/OpenInAppButton/OpenInAppButton.tsx
37
35
  /**
38
36
  * Button to open the Frak Wallet mobile app via deep link
39
37
  *
@@ -85,12 +83,10 @@ function OpenInAppButton({ placement: placementId, text, classname = "" }) {
85
83
  children: resolvedText
86
84
  });
87
85
  }
88
- //#endregion
89
- //#region src/components/OpenInAppButton/index.ts
86
+ // src/components/OpenInAppButton/index.ts
90
87
  registerWebComponent(OpenInAppButton, "frak-open-in-app", [
91
88
  "text",
92
89
  "placement",
93
90
  "classname"
94
91
  ], { shadow: false });
95
- //#endregion
96
92
  export { OpenInAppButton };
@@ -1,5 +1,4 @@
1
1
  import { SharingPageProduct } from "@frak-labs/core-sdk";
2
- //#region src/components/PostPurchase/types.d.ts
3
2
  /**
4
3
  * Props for the {@link PostPurchase} component.
5
4
  * @inline
@@ -91,8 +90,6 @@ type PostPurchaseProps = {
91
90
  */
92
91
  previewVariant?: "referrer" | "referee";
93
92
  };
94
- //#endregion
95
- //#region src/components/PostPurchase/PostPurchase.d.ts
96
93
  /**
97
94
  * Post-purchase card component.
98
95
  *
@@ -122,8 +119,6 @@ type PostPurchaseProps = {
122
119
  * ```
123
120
  */
124
121
  export declare function PostPurchase({ customerId, orderId, token, sharingUrl, merchantId, placement: placementId, classname, variant: forcedVariant, badgeText: propBadgeText, referrerText: propReferrerText, refereeText: propRefereeText, ctaText: propCtaText, preview, previewVariant, products, imageUrl: propImageUrl }: PostPurchaseProps): import("preact").JSX.Element | null;
125
- //#endregion
126
- //#region src/components/PostPurchase/index.d.ts
127
122
  /**
128
123
  * Custom element interface for `<frak-post-purchase>`.
129
124
  * Combines standard {@link HTMLElement} with {@link PostPurchaseProps}.
@@ -134,5 +129,4 @@ declare global {
134
129
  "frak-post-purchase": PostPurchaseElement;
135
130
  }
136
131
  }
137
- //#endregion
138
132
  export {};
@@ -1,17 +1,17 @@
1
- import { a as useClientReady, o as registerWebComponent, r as useLang, s as openSharingPage } from "./sharedCss-CPNmnpXA.js";
2
- import { i as w, n as K, t as C } from "./rewards-HJlTkTcY.js";
3
- import { t as useGlobalComponents } from "./useGlobalComponents-B3s2UQFk.js";
4
- import { t as useLightDomStyles } from "./useLightDomStyles-BQ5FvCPi.js";
1
+ import { a as useClientReady, o as registerWebComponent, r as useLang, s as openSharingPage } from "./sharedCss-SKmJGZgN.js";
2
+ import { i as w, n as K, t as C } from "./rewards-CfGynCt6.js";
3
+ import { r as LogoFrakWithName, t as GiftIcon } from "./GiftIcon-B9k_syq6.js";
4
+ import { t as useGlobalComponents } from "./useGlobalComponents-BF47jsBt.js";
5
+ import { t as useLightDomStyles } from "./useLightDomStyles-wGaNXHqN.js";
6
+ import { t as usePlacement } from "./usePlacement-Dd7itnCf.js";
5
7
  import { componentDefaults } from "./i18n/defaults.js";
6
- import { t as cssSource$2 } from "./sharedBaseCss.css-BkMpQeRx.js";
7
- import { t as usePlacement } from "./usePlacement-BpaIbzun.js";
8
- import { r as LogoFrakWithName, t as GiftIcon } from "./GiftIcon-JVhSFEhP.js";
8
+ import { t as cssSource$2 } from "./sharedBaseCss.css-nYy9vlzH.js";
9
9
  import { sanitizeSharingProducts, trackEvent } from "@frak-labs/core-sdk";
10
10
  import { getMerchantInformation, getUserReferralStatus, trackPurchaseStatus } from "@frak-labs/core-sdk/actions";
11
11
  import { useCallback, useEffect, useMemo, useRef, useState } from "preact/hooks";
12
12
  import { jsx, jsxs } from "preact/jsx-runtime";
13
13
  import { FrakRpcError, RpcErrorCodes } from "@frak-labs/frame-connector";
14
- //#region \0ve-inline:src/components/PostPurchase/PostPurchase.css.ts.vanilla.js
14
+ // \0ve-inline:src/components/PostPurchase/PostPurchase.css.ts.vanilla.js
15
15
  const cssSource$1 = `.PostPurchase_card__5fv5lh0 {
16
16
  background-color: var(--surface-background__pbq4akc);
17
17
  border: 1px solid var(--border-default__pbq4akv);
@@ -126,8 +126,7 @@ var icon = "PostPurchase_icon__5fv5lh7";
126
126
  var imageWrapper = "PostPurchase_imageWrapper__5fv5lh9";
127
127
  var message = "PostPurchase_message__5fv5lh5";
128
128
  const cssSource = cssSource$1;
129
- //#endregion
130
- //#region src/components/PostPurchase/PostPurchase.tsx
129
+ // src/components/PostPurchase/PostPurchase.tsx
131
130
  /**
132
131
  * `onChainMetadata.domain` is a bare host and `sharing-url` defaults to `""` in
133
132
  * the WordPress shortcode; both would throw inside `FrakContextManager.update`.
@@ -368,8 +367,7 @@ function PostPurchase({ customerId, orderId, token, sharingUrl, merchantId, plac
368
367
  })
369
368
  });
370
369
  }
371
- //#endregion
372
- //#region src/components/PostPurchase/index.ts
370
+ // src/components/PostPurchase/index.ts
373
371
  registerWebComponent(PostPurchase, "frak-post-purchase", [
374
372
  "customerId",
375
373
  "orderId",
@@ -388,5 +386,4 @@ registerWebComponent(PostPurchase, "frak-post-purchase", [
388
386
  "previewVariant",
389
387
  "imageUrl"
390
388
  ], { shadow: false });
391
- //#endregion
392
389
  export { PostPurchase };
@@ -1,4 +1,4 @@
1
- //#region ../core/dist/getCurrencyAmountKey-mJ3_Eamt.js
1
+ // ../core/dist/getCurrencyAmountKey-mJ3_Eamt.js
2
2
  const e = {
3
3
  eur: `fr-FR`,
4
4
  usd: `en-US`,
@@ -57,8 +57,7 @@ function o$1(e) {
57
57
  function s$1(e) {
58
58
  return e ? `${e}Amount` : `eurAmount`;
59
59
  }
60
- //#endregion
61
- //#region ../core/dist/rewards.js
60
+ // ../core/dist/rewards.js
62
61
  function a(e) {
63
62
  return Array.isArray(e) ? e : e.conditions;
64
63
  }
@@ -281,5 +280,4 @@ function q(e, n = {}) {
281
280
  matchedProducts: r$3.matchedProducts
282
281
  };
283
282
  }
284
- //#endregion
285
283
  export { w as i, K as n, q as r, C as t };
@@ -1,5 +1,3 @@
1
- //#endregion
2
- //#region src/styles/sharedBaseCss.css.ts
1
+ // src/styles/sharedBaseCss.css.ts
3
2
  const cssSource = ".reset_base__1831jhd0 {\n box-sizing: border-box;\n font-size: 100%;\n font: inherit;\n vertical-align: baseline;\n -webkit-tap-highlight-color: transparent;\n border: 0;\n margin: 0;\n padding: 0;\n}\n\n.reset_focusRing__1831jhd1 {\n outline-offset: 2px;\n outline: 2px solid #0000;\n}\n\n.reset_focusRing__1831jhd1:focus-visible {\n outline-color: currentColor;\n}\n\n.reset_fieldAppearance__1831jhd2 {\n appearance: none;\n background-color: #0000;\n}\n\n.reset_visuallyHidden__1831jhd3 {\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n position: absolute;\n overflow: hidden;\n}\n\n.reset_element_ul__1831jhd4, .reset_element_ol__1831jhd5 {\n list-style: none;\n}\n\n.reset_element_button__1831jhd6 {\n cursor: pointer;\n}\n\n.reset_element_a__1831jhd7 {\n color: inherit;\n text-decoration: none;\n}\n\n.reset_element_table__1831jhdb {\n border-collapse: collapse;\n border-spacing: 0;\n}\n\n.reset_element_img__1831jhdc {\n max-width: 100%;\n display: block;\n}\n:root {\n --text-primary__pbq4ak0: #000;\n --text-secondary__pbq4ak1: #525252;\n --text-tertiary__pbq4ak2: #a3a3a3;\n --text-disabled__pbq4ak3: #a3a3a3;\n --text-action__pbq4ak4: #0043ef;\n --text-actionHover__pbq4ak5: #0036bf;\n --text-onAction__pbq4ak6: #fff;\n --text-error__pbq4ak7: #e31c31;\n --text-success__pbq4ak8: #09be67;\n --text-warning__pbq4ak9: #ec7e00;\n --surface-primary__pbq4aka: #0043ef;\n --surface-secondary__pbq4akb: #f2f6fe;\n --surface-background__pbq4akc: #fff;\n --surface-background2__pbq4akd: #f9fafb;\n --surface-elevated__pbq4ake: #fff;\n --surface-muted__pbq4akf: #f7f7f7;\n --surface-tertiary__pbq4akg: #f7f7f7;\n --surface-overlay__pbq4akh: #000000b2;\n --surface-disabled__pbq4aki: #e2e2e2;\n --surface-primaryHover__pbq4akj: #0036bf;\n --surface-primaryPressed__pbq4akk: #00288f;\n --surface-secondaryHover__pbq4akl: #e5ecfd;\n --surface-secondaryPressed__pbq4akm: #ccd9fc;\n --surface-error__pbq4akn: #fce8ea;\n --surface-success__pbq4ako: #f3fcf7;\n --surface-warning__pbq4akp: #fef9f2;\n --border-subtle__pbq4akq: #f5f5f5;\n --border-focus__pbq4akr: #a3a3a3;\n --border-error__pbq4aks: #e31c31;\n --border-success__pbq4akt: #09be67;\n --border-warning__pbq4aku: #ec7e00;\n --border-default__pbq4akv: #e2e2e2;\n --icon-primary__pbq4akw: #000;\n --icon-secondary__pbq4akx: #525252;\n --icon-tertiary__pbq4aky: #a3a3a3;\n --icon-disabled__pbq4akz: #a3a3a3;\n --icon-action__pbq4ak10: #0043ef;\n --icon-actionHover__pbq4ak11: #0036bf;\n --icon-onAction__pbq4ak12: #fff;\n --icon-error__pbq4ak13: #e31c31;\n --icon-success__pbq4ak14: #09be67;\n --icon-warning__pbq4ak15: #ec7e00;\n}\n.sharedBaseCss_buttonReset__7cswil0 {\n appearance: none;\n box-sizing: border-box;\n -webkit-tap-highlight-color: transparent;\n cursor: pointer;\n outline-offset: 2px;\n background-color: #0000;\n border: 0;\n outline: 2px solid #0000;\n margin: 0;\n font-family: inherit;\n}\n\n.sharedBaseCss_buttonReset__7cswil0:focus-visible {\n outline-color: currentColor;\n}\n";
4
- //#endregion
5
3
  export { cssSource as t };
@@ -5,7 +5,7 @@ import * as coreSdkActions from "@frak-labs/core-sdk/actions";
5
5
  import { displaySharingPage } from "@frak-labs/core-sdk/actions";
6
6
  import { useEffect, useState } from "preact/hooks";
7
7
  import { useSyncExternalStore } from "preact/compat";
8
- //#region src/actions/sharingPage.ts
8
+ // src/actions/sharingPage.ts
9
9
  async function openSharingPage(entryPoint, targetInteraction, placement, options) {
10
10
  if (!window.FrakSetup?.client) {
11
11
  console.error("Frak client not found");
@@ -21,8 +21,7 @@ async function openSharingPage(entryPoint, targetInteraction, placement, options
21
21
  }
22
22
  }, placement).catch((error) => console.error("Frak sharing page failed", error));
23
23
  }
24
- //#endregion
25
- //#region src/utils/dom/detectListenerPreloads.ts
24
+ // src/utils/dom/detectListenerPreloads.ts
26
25
  /**
27
26
  * Tags that count as "Frak components" for the purpose of preload detection.
28
27
  *
@@ -58,8 +57,7 @@ function detectListenerPreloads() {
58
57
  if (typeof document === "undefined") return [];
59
58
  return document.querySelector(FRAK_COMPONENT_SELECTOR) !== null ? ["sharing"] : [];
60
59
  }
61
- //#endregion
62
- //#region src/bootstrap/clientReady.ts
60
+ // src/bootstrap/clientReady.ts
63
61
  const CUSTOM_EVENT_NAME = "frak:client";
64
62
  /**
65
63
  * Dispatch a custom event when the Frak client is ready
@@ -79,8 +77,7 @@ function onClientReady(action, callback) {
79
77
  }
80
78
  (action === "add" ? window.addEventListener : window.removeEventListener)(CUSTOM_EVENT_NAME, callback, false);
81
79
  }
82
- //#endregion
83
- //#region src/bootstrap/initFrakSdk.ts
80
+ // src/bootstrap/initFrakSdk.ts
84
81
  /**
85
82
  * Initializes the Frak SDK client and sets up necessary configurations.
86
83
  * Uses withCache for inflight dedup — concurrent callers share the same promise.
@@ -154,8 +151,7 @@ function handleActionQueryParam() {
154
151
  products
155
152
  });
156
153
  }
157
- //#endregion
158
- //#region src/utils/browser/onDocumentReady.ts
154
+ // src/utils/browser/onDocumentReady.ts
159
155
  /**
160
156
  * When the document is ready, run the callback
161
157
  */
@@ -163,8 +159,7 @@ function onDocumentReady(callback) {
163
159
  if (document.readyState === "complete" || document.readyState === "interactive") setTimeout(callback, 1);
164
160
  else document.addEventListener("DOMContentLoaded", callback);
165
161
  }
166
- //#endregion
167
- //#region src/webcomponent/registerWebComponent.ts
162
+ // src/webcomponent/registerWebComponent.ts
168
163
  /**
169
164
  * Registers a Preact component as a custom web component
170
165
  *
@@ -184,8 +179,7 @@ function registerWebComponent(component, tagName, observedAttributes = [], optio
184
179
  }
185
180
  }
186
181
  }
187
- //#endregion
188
- //#region src/hooks/useClientReady.ts
182
+ // src/hooks/useClientReady.ts
189
183
  function useClientReady() {
190
184
  const [shouldRender, setShouldRender] = useState(() => {
191
185
  if (!(window.FrakSetup?.config?.waitForBackendConfig !== false)) return true;
@@ -219,8 +213,7 @@ function useClientReady() {
219
213
  isClientReady
220
214
  };
221
215
  }
222
- //#endregion
223
- //#region src/hooks/sdkConfigSubscription.ts
216
+ // src/hooks/sdkConfigSubscription.ts
224
217
  /**
225
218
  * Shared `useSyncExternalStore` plumbing for the SDK config store.
226
219
  *
@@ -240,8 +233,7 @@ function subscribeSdkConfig(onStoreChange) {
240
233
  window.addEventListener("frak:config", onStoreChange);
241
234
  return () => window.removeEventListener("frak:config", onStoreChange);
242
235
  }
243
- //#endregion
244
- //#region src/hooks/useLang.ts
236
+ // src/hooks/useLang.ts
245
237
  /**
246
238
  * Resolve the active display language for the Web Components.
247
239
  *
@@ -254,8 +246,7 @@ function subscribeSdkConfig(onStoreChange) {
254
246
  function useLang() {
255
247
  return useSyncExternalStore(subscribeSdkConfig, () => sdkConfigStore.getConfig().lang ?? detectPageLanguage() ?? "en");
256
248
  }
257
- //#endregion
258
- //#region src/styles/sharedCss.ts
249
+ // src/styles/sharedCss.ts
259
250
  const sharedCss = `
260
251
  :host {
261
252
  display: contents;
@@ -318,5 +309,4 @@ const lightDomBaseCss = `
318
309
  }
319
310
  }
320
311
  `;
321
- //#endregion
322
312
  export { useClientReady as a, subscribeSdkConfig as i, lightDomBaseCss as n, registerWebComponent as o, useLang as r, openSharingPage as s, buildStyleContent as t };
@@ -1,7 +1,7 @@
1
- import { i as subscribeSdkConfig } from "./sharedCss-CPNmnpXA.js";
1
+ import { i as subscribeSdkConfig } from "./sharedCss-SKmJGZgN.js";
2
2
  import { sdkConfigStore } from "@frak-labs/core-sdk";
3
3
  import { useSyncExternalStore } from "preact/compat";
4
- //#region src/hooks/useGlobalComponents.ts
4
+ // src/hooks/useGlobalComponents.ts
5
5
  /**
6
6
  * Subscribe to the global component defaults from the SDK config store.
7
7
  * These serve as fallbacks when no placement-level override exists.
@@ -13,5 +13,4 @@ import { useSyncExternalStore } from "preact/compat";
13
13
  function useGlobalComponents() {
14
14
  return useSyncExternalStore(subscribeSdkConfig, () => sdkConfigStore.getConfig().components);
15
15
  }
16
- //#endregion
17
16
  export { useGlobalComponents as t };
@@ -1,6 +1,6 @@
1
- import { n as lightDomBaseCss } from "./sharedCss-CPNmnpXA.js";
1
+ import "./sharedCss-SKmJGZgN.js";
2
2
  import { useEffect } from "preact/hooks";
3
- //#region src/styles/styleManager.ts
3
+ // src/styles/styleManager.ts
4
4
  function ensureStyle(id, css) {
5
5
  const existing = document.getElementById(id);
6
6
  if (existing) {
@@ -28,12 +28,11 @@ const styleManager = {
28
28
  injectBase,
29
29
  injectPlacement
30
30
  };
31
- //#endregion
32
- //#region src/hooks/useLightDomStyles.ts
31
+ // src/hooks/useLightDomStyles.ts
33
32
  function useLightDomStyles(tag, placementId, placementCss, baseCss, sharedBaseCss) {
34
33
  useEffect(() => {
35
34
  if (sharedBaseCss) styleManager.injectBase("shared", sharedBaseCss);
36
- styleManager.injectBase(tag, baseCss ?? lightDomBaseCss);
35
+ styleManager.injectBase(tag, baseCss ?? "\n:where(frak-button-share, frak-open-in-app) {\n display: contents;\n}\n\n:where(frak-button-share .button, frak-open-in-app .button) {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 10px;\n}\n\n:where(frak-button-share .button:disabled, frak-open-in-app .button:disabled) {\n opacity: 0.7;\n cursor: default;\n}\n\n:where(frak-button-share .button__fadeIn, frak-open-in-app .button__fadeIn) {\n animation: frak-fadeIn 300ms ease-in;\n}\n\n@keyframes frak-fadeIn {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n}\n");
37
36
  }, [tag]);
38
37
  useEffect(() => {
39
38
  if (!placementCss) return;
@@ -44,5 +43,4 @@ function useLightDomStyles(tag, placementId, placementCss, baseCss, sharedBaseCs
44
43
  placementCss
45
44
  ]);
46
45
  }
47
- //#endregion
48
46
  export { useLightDomStyles as t };
@@ -1,8 +1,8 @@
1
- import { i as subscribeSdkConfig } from "./sharedCss-CPNmnpXA.js";
1
+ import { i as subscribeSdkConfig } from "./sharedCss-SKmJGZgN.js";
2
2
  import { sdkConfigStore } from "@frak-labs/core-sdk";
3
3
  import { useCallback } from "preact/hooks";
4
4
  import { useSyncExternalStore } from "preact/compat";
5
- //#region src/hooks/usePlacement.ts
5
+ // src/hooks/usePlacement.ts
6
6
  function getPlacement(id) {
7
7
  return sdkConfigStore.getConfig().placements?.[id];
8
8
  }
@@ -17,5 +17,4 @@ function usePlacement(placementId) {
17
17
  const getSnapshot = useCallback(() => placementId ? getPlacement(placementId) : void 0, [placementId]);
18
18
  return useSyncExternalStore(subscribeSdkConfig, getSnapshot);
19
19
  }
20
- //#endregion
21
20
  export { usePlacement as t };
@@ -1,7 +1,7 @@
1
- import { r as q } from "./rewards-HJlTkTcY.js";
1
+ import { r as q } from "./rewards-CfGynCt6.js";
2
2
  import { getMerchantInformation } from "@frak-labs/core-sdk/actions";
3
3
  import { useEffect, useState } from "preact/hooks";
4
- //#region src/hooks/useReward.ts
4
+ // src/hooks/useReward.ts
5
5
  /**
6
6
  * Hook to fetch and format the best reward for a given interaction type.
7
7
  *
@@ -46,5 +46,4 @@ function useReward(shouldUseReward, targetInteraction, audience, products) {
46
46
  hasReward
47
47
  };
48
48
  }
49
- //#endregion
50
49
  export { useReward as t };
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "url": "https://twitter.com/QNivelais"
12
12
  }
13
13
  ],
14
- "version": "1.3.3-beta.a79006c4",
14
+ "version": "1.3.3-beta.b5bbb625",
15
15
  "description": "Frak web components (share button, banner, post-purchase, ambassador page) 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",
@@ -108,21 +108,21 @@
108
108
  "try:merchant": "bun scripts/tryOnMerchant.ts"
109
109
  },
110
110
  "dependencies": {
111
- "@frak-labs/core-sdk": "1.5.3-beta.a79006c4",
112
- "@frak-labs/frame-connector": "1.5.2-beta.a79006c4",
111
+ "@frak-labs/core-sdk": "1.5.3-beta.b5bbb625",
112
+ "@frak-labs/frame-connector": "1.5.2-beta.b5bbb625",
113
113
  "preact": "^10.29.8",
114
114
  "preact-custom-element": "^4.6.0",
115
115
  "qr": "^0.7.0"
116
116
  },
117
117
  "devDependencies": {
118
- "@playwright/test": "^1.64.0",
118
+ "@playwright/test": "^1.64.1",
119
119
  "@frak-labs/design-system": "0.0.0",
120
120
  "@frak-labs/test-foundation": "0.1.0",
121
121
  "@preact/preset-vite": "^2.10.6",
122
- "@rolldown/plugin-node-polyfills": "^1.0.3",
122
+ "@rolldown/plugin-node-polyfills": "^1.0.4",
123
123
  "@testing-library/jest-dom": "^7.0.1",
124
- "@testing-library/preact": "^3.2.4",
125
- "@testing-library/user-event": "^14.6.7",
124
+ "@testing-library/preact": "^3.2.6",
125
+ "@testing-library/user-event": "^14.6.8",
126
126
  "@types/jsdom": "^30.0.0",
127
127
  "@types/node": "^25.9.9",
128
128
  "@types/preact-custom-element": "^4.0.4",
@@ -131,13 +131,13 @@
131
131
  "@vanilla-extract/integration": "^8.0.10",
132
132
  "@vanilla-extract/sprinkles": "^1.7.1",
133
133
  "@vanilla-extract/vite-plugin": "^5.2.6",
134
- "@vitest/coverage-v8": "^5.0.0",
135
- "@vitest/ui": "^5.0.0",
136
- "jsdom": "^30.0.1",
134
+ "@vitest/coverage-v8": "^5.0.5",
135
+ "@vitest/ui": "^5.0.5",
136
+ "jsdom": "^30.1.3",
137
137
  "lightningcss": "^1.33.0",
138
- "rolldown": "~1.2.0",
139
- "tsdown": "^0.23.1",
138
+ "rolldown": "~1.2.16",
139
+ "tsdown": "^0.23.4",
140
140
  "typescript": "^6.0.3",
141
- "vitest": "^5.0.0"
141
+ "vitest": "^5.0.5"
142
142
  }
143
143
  }