From bce557cc2dc767628bed6aac87301a1be7c5431b Mon Sep 17 00:00:00 2001 From: rxliuli Date: Tue, 4 Nov 2025 05:03:50 +0800 Subject: init commit --- src/constants/footer-items.ts | 24 +++++++++++++++++ src/constants/media-metrics.ts | 18 +++++++++++++ src/constants/storefront.ts | 60 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 102 insertions(+) create mode 100644 src/constants/footer-items.ts create mode 100644 src/constants/media-metrics.ts create mode 100644 src/constants/storefront.ts (limited to 'src/constants') diff --git a/src/constants/footer-items.ts b/src/constants/footer-items.ts new file mode 100644 index 0000000..6538d71 --- /dev/null +++ b/src/constants/footer-items.ts @@ -0,0 +1,24 @@ +import type { FooterItem } from '@amp/web-app-components/src/components/Footer/types'; + +export const items: FooterItem[] = [ + { + id: 'terms-of-use', + url: 'AMP.Shared.Footer.TermsOfUse.URL', + locKey: 'AMP.Shared.Footer.TermsOfUse.Text', + }, + { + id: 'privacy-policy', + url: 'ASE.Web.AppStore.Shared.Footer.PrivacyPolicy.URL', + locKey: 'ASE.Web.AppStore.Shared.Footer.PrivacyPolicy.Text', + }, + { + id: 'cookie-policy', + url: 'AMP.Shared.Footer.CookiePolicy.URL', + locKey: 'AMP.Shared.Footer.CookiePolicy.Text', + }, + { + id: 'get-help', + url: 'ASE.Web.AppStore.Shared.Footer.GetHelp.URL', + locKey: 'ASE.Web.AppStore.Shared.Footer.GetHelp.Text', + }, +]; diff --git a/src/constants/media-metrics.ts b/src/constants/media-metrics.ts new file mode 100644 index 0000000..67d30b2 --- /dev/null +++ b/src/constants/media-metrics.ts @@ -0,0 +1,18 @@ +type ValueOf = T[keyof T]; + +export const MetricsActionType = { + PLAY: 'play', + STOP: 'stop', +} as const; + +export type MetricsActionTypeItem = ValueOf; + +export const MetricsActionDetails = { + AUTOPLAY: 'autoplay', + AUTOPAUSE: 'autopause', + PLAY: 'play', + COMPLETE: 'complete', + PAUSE: 'pause', +} as const; + +export type MetricsActionDetailItem = ValueOf; diff --git a/src/constants/storefront.ts b/src/constants/storefront.ts new file mode 100644 index 0000000..e73f111 --- /dev/null +++ b/src/constants/storefront.ts @@ -0,0 +1,60 @@ +import type { + NormalizedLanguage, + NormalizedStorefront, +} from '@jet-app/app-store/api/locale'; + +export const DEFAULT_STOREFRONT_CODE = 'us' as NormalizedStorefront; +export const DEFAULT_LANGUAGE_BCP47 = 'en-US' as NormalizedLanguage; + +export const EU_STOREFRONTS = [ + 'at', + 'be', + 'bg', + 'cy', + 'cz', + 'dk', + 'ee', + 'fi', + 'fr', + 'de', + 'gr', + 'hr', + 'hu', + 'ie', + 'it', + 'lv', + 'lt', + 'lu', + 'mt', + 'nl', + 'pl', + 'pt', + 'ro', + 'sk', + 'si', + 'es', + 'se', + 'uk', +]; + +export const SUPPORTED_STOREFRONTS_FOR_VISION = new Set([ + 'us', + 'cn', + 'hk', + 'jp', + 'sg', + 'au', + 'ca', + 'fr', + 'de', + 'gb', + 'kr', + 'ae', + 'tw', +] as NormalizedStorefront[]); + +export const UNSUPPORTED_STOREFRONTS_FOR_ARCADE = new Set([ + 'cn', + 'hk', + 'mo', +] as NormalizedStorefront[]); -- cgit v1.2.3