import { WidgetInstance } from '@evershop/evershop/types/widget'; import { PageMetaInfo } from './pageMeta.js'; type GraphqlScalar = string | number | boolean | null; type GraphqlResponseValue = GraphqlScalar | GraphqlResponseValue[] | { [key: string]: GraphqlResponseValue; }; interface Config { pageMeta: PageMetaInfo; tax: { priceIncludingTax: boolean; }; catalog: { imageDimensions: { width: number; height: number; }; }; /** Manifest-descriptor projection for — the active theme's * declared fields keyed 'owner.namespace.key' (lib/metafield/projection). */ themeMetafieldDescriptors?: Record; } interface AppStateContextValue { graphqlResponse: Record; config: Config; propsMap: Record; widgets?: WidgetInstance[]; fetching: boolean; /** Locale payload injected into eContext (spec §6.11). */ locale?: string; defaultLocale?: string; availableLocales?: string[]; translations?: Record; } interface AppContextDispatchValue { setData: React.Dispatch>; setFetching: React.Dispatch>; fetchPageData: (url: string | URL) => Promise; } export { AppStateContextValue, Config, AppContextDispatchValue };