/** * Helpers for rendering store catalogue imagery (product icons, banners, * screenshots, publisher logos) safely in an ``. * * Stored icon values are not always browser-renderable: bare Iconify names * such as `mdi:robot`, presigned object-storage links that have expired, and * insecure or exotic schemes all end up as broken images. global-store-svc * resolves `StoreProduct.iconUrl` to an https URL or an offline-rendered * `data:image/svg+xml` value (or null), so callers prefer it over the raw * `icon` and still pass the result through {@link classifyStoreImageSrc}. * This mirrors the helpers in `@burdenoff/web-sdk` (`src/store/store-image.tsx`). */ /** Result of deciding whether a stored image value can go into an ``. */ export type StoreImageSource = { kind: 'url'; src: string; } | { kind: 'none'; }; /** * Decides whether a store image value is safe and likely to render. * * Accepted: absolute `https:` URLs that are not signed expiring links, * `data:image/...` URIs, and root-relative paths such as `/icon.png`. * Rejected: bare Iconify names, protocol-relative `//host` URLs, `http:`, * `javascript:` and every other scheme, signed URLs, and empty or malformed * values. */ export declare function classifyStoreImageSrc(value: string | null | undefined): StoreImageSource; /** * The image value to render for a store product's icon: the server-resolved * `iconUrl` when present, else the raw `icon`. */ export declare function storeProductIconSrc(product: { icon?: string | null; iconUrl?: string | null; }): string | null; /** * True when a GraphQL response failed only because the gateway's supergraph * does not know `StoreProduct.iconUrl` yet (for example a stale CDN edge or an * environment that has not picked up the field). The caller then retries the * query without that field. */ export declare function storeQueryRejectedIconUrl(body: { data?: unknown; errors?: ReadonlyArray<{ message?: string; }>; }): boolean;