UNPKG

@frak-labs/components

Version:

Frak Wallet components, helping any person to interact with the Frak wallet.

55 lines 1.85 kB
import { Language } from "@frak-labs/core-sdk"; //#region src/i18n/defaults.d.ts /** * Shape of the built-in copy for every SDK Web Component. Declared explicitly * so each supported {@link Language} is forced to provide the exact same set * of keys (a missing translation is a type error, not a silent fallback). */ type ComponentCopy = { buttonShare: { text: string; }; postPurchase: { refereeText: string; refereeNoRewardText: string; referrerText: string; referrerNoRewardText: string; ctaText: string; ctaNoRewardText: string; }; openInApp: { text: string; ariaLabel: string; }; buttonWallet: { ariaLabel: string; }; banner: { /** Referral title used when an estimated reward is available (carries the `{REWARD}` token). */ referralTitleReward: string; /** Referral title used when no reward could be resolved. */ referralTitle: string; referralDescription: string; referralCta: string; inappTitle: string; inappDescription: string; inappCta: string; dismissLabel: string; }; }; /** * Built-in, per-language default copy for the SDK Web Components. * * These strings are the last-resort fallback, used only when a merchant * provides neither an HTML attribute override nor a backend-config override. * They keep the components bilingual out of the box **without** pulling an * i18n runtime (e.g. i18next) into the size-critical CDN bundle — resolution * is a plain object lookup keyed by the active language (see `useLang`). * * Adding a new language is a matter of adding one entry here plus extending * the `Language` union in `@frak-labs/core-sdk` — no new dependency, no * merchant action, no SDK API change. */ declare const componentDefaults: Record<Language, ComponentCopy>; //#endregion export { componentDefaults };