Liquid rendering SDK reference

Liquid section, block, context and rendering helpers.

Import these public values from @upstorr/theme-sdk/v1. Do not import their internal source files.

createThemeLiquidContext

createThemeLiquidContext(input: ThemeLiquidContextInput): Record<string, unknown>

createThemeLiquidDigitalDeliveryResources

createThemeLiquidDigitalDeliveryResources(data: unknown): { digitalDelivery: import("@upstorr/theme-sdk/v1").ThemeDigitalDeliveryView; product: import("@upstorr/theme-sdk/v1").ThemeDigitalDeliveryProductView; }

createThemeLiquidMenu

createThemeLiquidMenu(menuSetting: unknown, linkLists: Record<string, unknown>): { handle: string; title: string; items: Record<string, unknown>[]; depth: number; }

createThemeLiquidSectionView

createThemeLiquidSectionView(section: Section, resources: Resources, config: ThemeLiquidStorefrontConfig): { authenticated: boolean; show_auth: boolean; show_preview: boolean; can_retry: boolean; current: { cards: { id: string; selected: boolean; key: string; numberLabel: string; dateLabel: string; ariaLabel: string; metaRows: import("@upstorr/theme-sdk/v1").ThemeOrderMetaRowView[]; }[]; error: string; blocking_error: boolean; loading: boolean; show_empty: boolean; empty_message: string; pagination: import("@upstorr/theme-sdk/v1").ThemeOrdersPaginationView; has_selection: boolean; mobile_view: string; detail_loading: boolean; detail: { empty: boolean; empty_message: string; loading: boolean; error: string; order_id: string; view: import("@upstorr/theme-sdk/v1").ThemeOrderDetailView | null; selected: boolean; booking_message: string; image_ratios: { [k: string]: string; }; returns: import("@upstorr/theme-sdk/v1").ThemeOrderReturnRequestView | null; allow_returns: boolean; return_open: boolean; return_submitting: boolean; }; }; preview: { cards: { id: string; selected: boolean; key: string; numberLabel: string; dateLabel: string; ariaLabel: string; metaRows: import("@upstorr/theme-sdk/v1").ThemeOrderMetaRowView[]; }[]; blocking_error: boolean; detail_loading: boolean; empty_message: string; pagination: import("@upstorr/theme-sdk/v1").ThemeOrdersPaginationView; has_selection: boolean; mobile_view: string; empty_detail: { empty: boolean; empty_message: string; loading: boolean; error: string; order_id: string; view: import("@upstorr/theme-sdk/v1").ThemeOrderDetailView | null; selected: boolean; booking_message: string; image_ratios: { [k: string]: string; }; returns: import("@upstorr/theme-sdk/v1").ThemeOrderReturnRequestView | null; allow_returns: boolean; return_open: boolean; return_submitting: boolean; }; details: { empty: boolean; empty_message: string; loading: boolean; error: string; order_id: string; view: import("@upstorr/theme-sdk/v1").ThemeOrderDetailView | null; selected: boolean; booking_message: string; image_ratios: { [k: string]: string; }; returns: import("@upstorr/theme-sdk/v1").ThemeOrderReturnRequestView | null; allow_returns: boolean; return_open: boolean; return_submitting: boolean; }[]; }; } | { signed_in: boolean; positions: any; items?: undefined; item_locals?: undefined; item_indices?: undefined; collection_indices?: undefined; active_index?: undefined; offer?: undefined; availability?: undefined; has_media?: undefined; ready?: undefined; empty?: undefined; message?: undefined; listing?: undefined; query?: undefined; mode?: undefined; section_type?: undefined; variants?: undefined; digital_delivery?: undefined; gallery_ratio?: undefined; reviews?: undefined; hotspot_products?: undefined; empty_hotspot?: undefined; article_info?: undefined; content?: undefined; gift?: undefined; error?: undefined; heading?: undefined; header_id?: undefined; label?: undefined; paused?: undefined; drag_template?: undefined; measured?: undefined; speed?: undefined; copy_count?: undefined; } | { items: never[]; item_locals: { current: boolean; loading: string | undefined; count: string | number; count_value: string | number; placeholder_name: string; index: number; }[]; item_indices: number[]; collection_indices: number[]; active_index: number; signed_in?: undefined; positions?: undefined; offer?: undefined; availability?: undefined; has_media?: undefined; ready?: undefined; empty?: undefined; message?: undefined; listing?: undefined; query?: undefined; mode?: undefined; section_type?: undefined; variants?: undefined; digital_delivery?: undefined; gallery_ratio?: undefined; reviews?: undefined; hotspot_products?: undefined; empty_hotspot?: undefined; article_info?: undefined; content?: undefined; gift?: undefined; error?: undefined; heading?: undefined; header_id?: undefined; label?: undefined; paused?: undefined; drag_template?: undefined; measured?: undefined; speed?: undefined; copy_count?: undefined; } | { items: import("@upstorr/theme-sdk/v1").ThemeBookingListCardView[]; limit: number; item_indices: number[]; desktop: { canScrollPrevious: boolean; canScrollNext: boolean; }; mobile: { canScrollPrevious: boolean; canScrollNext: boolean; }; signed_in?: undefined; positions?: undefined; item_locals?: undefined; collection_indices?: undefined; active_index?: undefined; offer?: undefined; availability?: undefined; has_media?: undefined; ready?: undefined; empty?: undefined; message?: undefined; listing?: undefined; query?: undefined; mode?: undefined; section_type?: undefined; variants?: undefined; digital_delivery?: undefined; gallery_ratio?: undefined; reviews?: undefined; hotspot_products?: undefined; empty_hotspot?: undefined; article_info?: undefined; content?: undefined; gift?: undefined; error?: undefined; heading?: undefined; header_id?: undefined; label?: undefined; paused?: undefined; drag_template?: undefined; measured?: undefined; speed?: undefined; copy_count?: undefined; } | { offer: import("@upstorr/theme-sdk/v1").ThemeBookingOfferView | null; availability: import("@upstorr/theme-sdk/v1").ThemeBookingAvailabilityView; has_media: boolean; signed_in?: undefined; positions?: undefined; items?: undefined; item_locals?: undefined; item_indices?: undefined; collection_indices?: undefined; active_index?: undefined; ready?: undefined; empty?: undefined; message?: undefined; listing?: undefined; query?: undefined; mode?: undefined; section_type?: undefined; variants?: undefined; digital_delivery?: undefined; gallery_ratio?: undefined; reviews?: undefined; hotspot_products?: undefined; empty_hotspot?: undefined; article_info?: undefined; content?: undefined; gift?: undefined; error?: undefined; heading?: undefined; header_id?: undefined; label?: undefined; paused?: undefined; drag_template?: undefined; measured?: undefined; speed?: undefined; copy_count?: undefined; } | { ready: boolean; empty: boolean; message: string; signed_in?: undefined; positions?: undefined; items?: undefined; item_locals?: undefined; item_indices?: undefined; collection_indices?: undefined; active_index?: undefined; offer?: undefined; availability?: undefined; has_media?: undefined; listing?: undefined; query?: undefined; mode?: undefined; section_type?: undefined; variants?: undefined; digital_delivery?: undefined; gallery_ratio?: undefined; reviews?: undefined; hotspot_products?: undefined; empty_hotspot?: undefined; article_info?: undefined; content?: undefined; gift?: undefined; error?: undefined; heading?: undefined; header_id?: undefined; label?: undefined; paused?: undefined; drag_template?: undefined; measured?: undefined; speed?: undefined; copy_count?: undefined; } | { listing: { readonly products: unknown[]; readonly isEmpty: boolean; readonly resetHref: string; readonly pagination: import("@upstorr/theme-sdk/v1").ThemePaginationView; readonly loadMore: import("@upstorr/theme-sdk/v1").ThemePaginationDirectionView; }; signed_in?: undefined; positions?: undefined; items?: undefined; item_locals?: undefined; item_indices?: undefined; collection_indices?: undefined; active_index?: undefined; offer?: undefined; availability?: undefined; has_media?: undefined; ready?: undefined; empty?: undefined; message?: undefined; query?: undefined; mode?: undefined; section_type?: undefined; variants?: undefined; digital_delivery?: undefined; gallery_ratio?: undefined; reviews?: undefined; hotspot_products?: undefined; empty_hotspot?: undefined; article_info?: undefined; content?: undefined; gift?: undefined; error?: undefined; heading?: undefined; header_id?: undefined; label?: undefined; paused?: undefined; drag_template?: undefined; measured?: undefined; speed?: undefined; copy_count?: undefined; } | { listing: { readonly products: unknown[]; readonly resultsCount: number; readonly isEmpty: boolean; readonly pagination: import("@upstorr/theme-sdk/v1").ThemePaginationView; readonly loadMore: import("@upstorr/theme-sdk/v1").ThemePaginationDirectionView; }; query: string; signed_in?: undefined; positions?: undefined; items?: undefined; item_locals?: undefined; item_indices?: undefined; collection_indices?: undefined; active_index?: undefined; offer?: undefined; availability?: undefined; has_media?: undefined; ready?: undefined; empty?: undefined; message?: undefined; mode?: undefined; section_type?: undefined; variants?: undefined; digital_delivery?: undefined; gallery_ratio?: undefined; reviews?: undefined; hotspot_products?: undefined; empty_hotspot?: undefined; article_info?: undefined; content?: undefined; gift?: undefined; error?: undefined; heading?: undefined; header_id?: undefined; label?: undefined; paused?: undefined; drag_template?: undefined; measured?: undefined; speed?: undefined; copy_count?: undefined; } | { items: unknown[]; item_indices: number[]; desktop: { canScrollPrevious: boolean; canScrollNext: boolean; }; mobile: { canScrollPrevious: boolean; canScrollNext: boolean; }; signed_in?: undefined; positions?: undefined; item_locals?: undefined; collection_indices?: undefined; active_index?: undefined; offer?: undefined; availability?: undefined; has_media?: undefined; ready?: undefined; empty?: undefined; message?: undefined; listing?: undefined; query?: undefined; mode?: undefined; section_type?: undefined; variants?: undefined; digital_delivery?: undefined; gallery_ratio?: undefined; reviews?: undefined; hotspot_products?: undefined; empty_hotspot?: undefined; article_info?: undefined; content?: undefined; gift?: undefined; error?: undefined; heading?: undefined; header_id?: undefined; label?: undefined; paused?: undefined; drag_template?: undefined; measured?: undefined; speed?: undefined; copy_count?: undefined; } | { items: (ThemeProductPurchaseProduct | null)[]; recommendations: { hasVisibleItems: boolean; runtimeProps: { readonly 'data-url': string; readonly 'data-section-id': string | undefined; readonly 'data-product-id': string | undefined; readonly 'data-intent': string; readonly 'data-recommendations-performed': "true" | "false"; }; }; item_indices: number[]; desktop: { canScrollPrevious: boolean; canScrollNext: boolean; }; mobile: { canScrollPrevious: boolean; canScrollNext: boolean; }; signed_in?: undefined; positions?: undefined; item_locals?: undefined; collection_indices?: undefined; active_index?: undefined; offer?: undefined; availability?: undefined; has_media?: undefined; ready?: undefined; empty?: undefined; message?: undefined; listing?: undefined; query?: undefined; mode?: undefined; section_type?: undefined; variants?: undefined; digital_delivery?: undefined; gallery_ratio?: undefined; reviews?: undefined; hotspot_products?: undefined; empty_hotspot?: undefined; article_info?: undefined; content?: undefined; gift?: undefined; error?: undefined; heading?: undefined; header_id?: undefined; label?: undefined; paused?: undefined; drag_template?: undefined; measured?: undefined; speed?: undefined; copy_count?: undefined; } | { mode: string; section_type: string; has_media: boolean; variants: import("@upstorr/theme-sdk/v1").ThemeProductPurchaseVariant[]; digital_delivery: {} | null; signed_in?: undefined; positions?: undefined; items?: undefined; item_locals?: undefined; item_indices?: undefined; collection_indices?: undefined; active_index?: undefined; offer?: undefined; availability?: undefined; ready?: undefined; empty?: undefined; message?: undefined; listing?: undefined; query?: undefined; gallery_ratio?: undefined; reviews?: undefined; hotspot_products?: undefined; empty_hotspot?: undefined; article_info?: undefined; content?: undefined; gift?: undefined; error?: undefined; heading?: undefined; header_id?: undefined; label?: undefined; paused?: undefined; drag_template?: undefined; measured?: undefined; speed?: undefined; copy_count?: undefined; } | { gallery_ratio: {}; signed_in?: undefined; positions?: undefined; items?: undefined; item_locals?: undefined; item_indices?: undefined; collection_indices?: undefined; active_index?: undefined; offer?: undefined; availability?: undefined; has_media?: undefined; ready?: undefined; empty?: undefined; message?: undefined; listing?: undefined; query?: undefined; mode?: undefined; section_type?: undefined; variants?: undefined; digital_delivery?: undefined; reviews?: undefined; hotspot_products?: undefined; empty_hotspot?: undefined; article_info?: undefined; content?: undefined; gift?: undefined; error?: undefined; heading?: undefined; header_id?: undefined; label?: undefined; paused?: undefined; drag_template?: undefined; measured?: undefined; speed?: undefined; copy_count?: undefined; } | { reviews: { items: import("@upstorr/theme-sdk/v1").ThemeReviewInput[]; columns: number; initialReviews: number; reviewsPerClick: number; canShowMore: boolean; }; signed_in?: undefined; positions?: undefined; items?: undefined; item_locals?: undefined; item_indices?: undefined; collection_indices?: undefined; active_index?: undefined; offer?: undefined; availability?: undefined; has_media?: undefined; ready?: undefined; empty?: undefined; message?: undefined; listing?: undefined; query?: undefined; mode?: undefined; section_type?: undefined; variants?: undefined; digital_delivery?: undefined; gallery_ratio?: undefined; hotspot_products?: undefined; empty_hotspot?: undefined; article_info?: undefined; content?: undefined; gift?: undefined; error?: undefined; heading?: undefined; header_id?: undefined; label?: undefined; paused?: undefined; drag_template?: undefined; measured?: undefined; speed?: undefined; copy_count?: undefined; } | { hotspot_products: { [k: string]: import("@upstorr/theme-sdk/v1").ThemeProductHotspotView; }; empty_hotspot: import("@upstorr/theme-sdk/v1").ThemeProductHotspotView; signed_in?: undefined; positions?: undefined; items?: undefined; item_locals?: undefined; item_indices?: undefined; collection_indices?: undefined; active_index?: undefined; offer?: undefined; availability?: undefined; has_media?: undefined; ready?: undefined; empty?: undefined; message?: undefined; listing?: undefined; query?: undefined; mode?: undefined; section_type?: undefined; variants?: undefined; digital_delivery?: undefined; gallery_ratio?: undefined; reviews?: undefined; article_info?: undefined; content?: undefined; gift?: undefined; error?: undefined; heading?: undefined; header_id?: undefined; label?: undefined; paused?: undefined; drag_template?: undefined; measured?: undefined; speed?: undefined; copy_count?: undefined; } | { article_info: string; content: string; signed_in?: undefined; positions?: undefined; items?: undefined; item_locals?: undefined; item_indices?: undefined; collection_indices?: undefined; active_index?: undefined; offer?: undefined; availability?: undefined; has_media?: undefined; ready?: undefined; empty?: undefined; message?: undefined; listing?: undefined; query?: undefined; mode?: undefined; section_type?: undefined; variants?: undefined; digital_delivery?: undefined; gallery_ratio?: undefined; reviews?: undefined; hotspot_products?: undefined; empty_hotspot?: undefined; gift?: undefined; error?: undefined; heading?: undefined; header_id?: undefined; label?: undefined; paused?: undefined; drag_template?: undefined; measured?: undefined; speed?: undefined; copy_count?: undefined; } | { gift: import("@upstorr/theme-sdk/v1").ThemeGiftCardView; signed_in?: undefined; positions?: undefined; items?: undefined; item_locals?: undefined; item_indices?: undefined; collection_indices?: undefined; active_index?: undefined; offer?: undefined; availability?: undefined; has_media?: undefined; ready?: undefined; empty?: undefined; message?: undefined; listing?: undefined; query?: undefined; mode?: undefined; section_type?: undefined; variants?: undefined; digital_delivery?: undefined; gallery_ratio?: undefined; reviews?: undefined; hotspot_products?: undefined; empty_hotspot?: undefined; article_info?: undefined; content?: undefined; error?: undefined; heading?: undefined; header_id?: undefined; label?: undefined; paused?: undefined; drag_template?: undefined; measured?: undefined; speed?: undefined; copy_count?: undefined; } | { empty: boolean; error: string; items: ({ id: string; title: string; remove_id: string; variant_id: string; can_add: boolean; label: string; product: null; } | { id: string; title: string; remove_id: string; variant_id: string; can_add: boolean; label: string; product: ThemeProductPurchaseProduct; })[]; signed_in?: undefined; positions?: undefined; item_locals?: undefined; item_indices?: undefined; collection_indices?: undefined; active_index?: undefined; offer?: undefined; availability?: undefined; has_media?: undefined; ready?: undefined; message?: undefined; listing?: undefined; query?: undefined; mode?: undefined; section_type?: undefined; variants?: undefined; digital_delivery?: undefined; gallery_ratio?: undefined; reviews?: undefined; hotspot_products?: undefined; empty_hotspot?: undefined; article_info?: undefined; content?: undefined; gift?: undefined; heading?: undefined; header_id?: undefined; label?: undefined; paused?: undefined; drag_template?: undefined; measured?: undefined; speed?: undefined; copy_count?: undefined; } | { mode: string; heading: string; header_id: string; items: { product_id: string; variant_id: string; variants: import("@upstorr/theme-sdk/v1").ThemeProductPurchaseVariant[]; quick_add: { readonly mode: "add" | "choose"; readonly optionCount: number; readonly canAdd: boolean; readonly disabled: boolean; readonly addLabel: "Adding" | "Add"; readonly addAriaLabel: "Add"; readonly chooseLabel: "Choose"; readonly chooseAriaLabel: "Choose"; }; key: string; product: ThemeProductPurchaseProduct; title: string; href: string; image: string; sku: string; }[]; signed_in?: undefined; positions?: undefined; item_locals?: undefined; item_indices?: undefined; collection_indices?: undefined; active_index?: undefined; offer?: undefined; availability?: undefined; has_media?: undefined; ready?: undefined; empty?: undefined; message?: undefined; listing?: undefined; query?: undefined; section_type?: undefined; variants?: undefined; digital_delivery?: undefined; gallery_ratio?: undefined; reviews?: undefined; hotspot_products?: undefined; empty_hotspot?: undefined; article_info?: undefined; content?: undefined; gift?: undefined; error?: undefined; label?: undefined; paused?: undefined; drag_template?: undefined; measured?: undefined; speed?: undefined; copy_count?: undefined; } | { label: string; content: string; signed_in?: undefined; positions?: undefined; items?: undefined; item_locals?: undefined; item_indices?: undefined; collection_indices?: undefined; active_index?: undefined; offer?: undefined; availability?: undefined; has_media?: undefined; ready?: undefined; empty?: undefined; message?: undefined; listing?: undefined; query?: undefined; mode?: undefined; section_type?: undefined; variants?: undefined; digital_delivery?: undefined; gallery_ratio?: undefined; reviews?: undefined; hotspot_products?: undefined; empty_hotspot?: undefined; article_info?: undefined; gift?: undefined; error?: undefined; heading?: undefined; header_id?: undefined; paused?: undefined; drag_template?: undefined; measured?: undefined; speed?: undefined; copy_count?: undefined; } | { active_index: number; paused: boolean; drag_template: string; measured: {}; signed_in?: undefined; positions?: undefined; items?: undefined; item_locals?: undefined; item_indices?: undefined; collection_indices?: undefined; offer?: undefined; availability?: undefined; has_media?: undefined; ready?: undefined; empty?: undefined; message?: undefined; listing?: undefined; query?: undefined; mode?: undefined; section_type?: undefined; variants?: undefined; digital_delivery?: undefined; gallery_ratio?: undefined; reviews?: undefined; hotspot_products?: undefined; empty_hotspot?: undefined; article_info?: undefined; content?: undefined; gift?: undefined; error?: undefined; heading?: undefined; header_id?: undefined; label?: undefined; speed?: undefined; copy_count?: undefined; } | { speed: number; copy_count: number; signed_in?: undefined; positions?: undefined; items?: undefined; item_locals?: undefined; item_indices?: undefined; collection_indices?: undefined; active_index?: undefined; offer?: undefined; availability?: undefined; has_media?: undefined; ready?: undefined; empty?: undefined; message?: undefined; listing?: undefined; query?: undefined; mode?: undefined; section_type?: undefined; variants?: undefined; digital_delivery?: undefined; gallery_ratio?: undefined; reviews?: undefined; hotspot_products?: undefined; empty_hotspot?: undefined; article_info?: undefined; content?: undefined; gift?: undefined; error?: undefined; heading?: undefined; header_id?: undefined; label?: undefined; paused?: undefined; drag_template?: undefined; measured?: undefined; } | { signed_in?: undefined; positions?: undefined; items?: undefined; item_locals?: undefined; item_indices?: undefined; collection_indices?: undefined; active_index?: undefined; offer?: undefined; availability?: undefined; has_media?: undefined; ready?: undefined; empty?: undefined; message?: undefined; listing?: undefined; query?: undefined; mode?: undefined; section_type?: undefined; variants?: undefined; digital_delivery?: undefined; gallery_ratio?: undefined; reviews?: undefined; hotspot_products?: undefined; empty_hotspot?: undefined; article_info?: undefined; content?: undefined; gift?: undefined; error?: undefined; heading?: undefined; header_id?: undefined; label?: undefined; paused?: undefined; drag_template?: undefined; measured?: undefined; speed?: undefined; copy_count?: undefined; }

createThemeLiquidStickyProductView

createThemeLiquidStickyProductView(productValue: unknown): { mode: string; sticky: { readonly title: string; readonly image: string | null; readonly variantTitle: string; readonly canAddToCart: boolean; }; stuck: boolean; variant_id: string; add: { disabled: boolean; canSubmit: boolean; label: string; productId: string; variantId: string; quantitySuffix: string; }; } | null

createThemeStorefrontLiquidContext

createThemeStorefrontLiquidContext(config: ThemeLiquidStorefrontConfig, section: { id: string; settings: Record<string, unknown>; }, defaultStoreName?: string, resources?: Pick<ThemeLiquidContextInput, "product" | "products" | "collection" | "collections" | "blog" | "article" | "page" | "cart">): Record<string, unknown>

defineThemeLiquidBlock

defineThemeLiquidBlock(sources: ThemeLiquidBlockLibrary, controlPacks?: LiquidControlPackLibrary, themeAssets?: Record<string, unknown>, snippets?: Record<string, string>): ({ block, resources, slots, sourceType }: { block: ThemeLiquidBlockInstance; resources?: ThemeRuntimeResourceContext; slots?: Record<string, ReactNode>; sourceType?: string; }) => ReactNode

defineThemeLiquidSection

defineThemeLiquidSection(schema: { settings: Array<{ id?: string; defaultSource?: string; }>; }, registration?: ThemeLiquidRegistration, controlPacks?: LiquidControlPackLibrary, snippets?: Record<string, string>): ({ section, checkout, renderPreset, labels, slots, resources, themeData, globals }: ThemeRegisteredLiquidSectionProps) => import("react").JSX.Element | null

LiquidContext

LiquidContext(props: import("react").ProviderProps<LiquidProviderValue | null>): ReactNode

LocalBlock

interface LocalBlock extends ThemeEditorBlock { blocks?: LocalBlock[]; hidden?: boolean; renderArgs?: Record<string, unknown>; settings: Record<string, unknown> }

renderThemeCustomLiquid

renderThemeCustomLiquid(source: unknown, scope: Record<string, unknown>, options?: { sectionBehaviors?: boolean; slots?: readonly string[]; attributes?: ReadonlyMap<string, Record<string, string | undefined>>; controlPacks?: LiquidControlPackLibrary; snippets?: Record<string, string>; }): ThemeLiquidResult

renderThemeSectionLiquid

renderThemeSectionLiquid(source: unknown, scope: Record<string, unknown>, slots: Record<string, ReactNode>, attributes?: ReadonlyMap<string, Record<string, string | undefined>>, controlPacks?: LiquidControlPackLibrary, snippets?: Record<string, string>): { ok: true; content: ReactNode; } | { ok: false; error: string; }

THEME_LIQUID_MAX_SOURCE_LENGTH

THEME_LIQUID_MAX_SOURCE_LENGTH: 500000

ThemeLiquidBlockBinding

interface ThemeLiquidBlockBinding { type: string; variant?: string }

ThemeLiquidBlockInstance

interface ThemeLiquidBlockInstance extends ThemeEditorBlock {
    renderArgs?: Record<string, unknown>;
    settings: Record<string, unknown>;
}

ThemeLiquidBlockLibrary

type ThemeLiquidBlockLibrary = Record<string, string>;

ThemeLiquidContextInput

interface ThemeLiquidContextInput {
    section: { id: string; settings: Record<string, unknown> };
    shop: { name: string | null; currency: string };
    routes: object;
    settings: Record<string, unknown>;
    product?: unknown;
    products?: unknown[];
    collection?: unknown;
    collections?: unknown[];
    blog?: unknown;
    article?: unknown;
    page?: unknown;
    cart?: unknown;
    linklists?: Record<string, unknown>;
}

ThemeLiquidMenuBinding

interface ThemeLiquidMenuBinding { setting: string; block?: string; format?: string }

ThemeLiquidProvider

ThemeLiquidProvider({ storefrontConfig, textBootstrap, children }: { storefrontConfig: ThemeLiquidStorefrontConfig; textBootstrap?: unknown; children?: ReactNode; }): import("react").JSX.Element

ThemeLiquidRegistration

interface ThemeLiquidRegistration {
    behavior?: 'cookie-consent' | 'checkout';
    defaultStoreName?: string;
    localBlocks?: Record<string, ThemeLiquidBlockBinding>;
    menus?: Record<string, ThemeLiquidMenuBinding>;
}

ThemeLiquidResult

type ThemeLiquidResult = { ok: true; html: string } | { ok: false; error: string };

themeLiquidSectionId

themeLiquidSectionId(id: string): string

ThemeLiquidSectionInstance

interface ThemeLiquidSectionInstance extends ThemeEditorSection { hidden?: boolean }

ThemeLiquidStorefrontConfig

interface ThemeLiquidStorefrontConfig {
    routes?: object;
    localization?: ThemeMarketsLocalization;
    themeSettings?: Record<string, unknown>;
    storeProfile?: { name?: string | null } | null;
    composition?: unknown;
    currentTemplate?: string;
    currentRoute?: { kind?: string };
    renderMode?: string;
    previewAccount?: { name?: string | null; email?: string | null } | null;
    contentPages?: Array<{ id?: string | null; path?: string | null; title?: string | null; content?: string | null }> | null;
}

ThemeOrdersLiquidActions

interface ThemeOrdersLiquidActions {
    rootId: string
    pinned: boolean
    authenticated: boolean
    orders: ThemeOrderListItem[]
    previewOrders: ThemeOrderDetail[]
    selectedOrder: ThemeOrderDetail | null
    selectedOrderId: string | null
    source: ThemeOrdersSource
    pagination: ReturnType<typeof useThemeOrders>['pagination']
    actions: ReturnType<typeof useThemeOrders>['actions']
    back: () => void
    previewSelect: (order: ThemeOrderListItem) => void
    returnForms: Record<string, ThemeOrdersReturnFormState>
    setReturnForms: Dispatch<SetStateAction<Record<string, ThemeOrdersReturnFormState>>>
    submitting: boolean
}

ThemeOrdersReturnFormState

interface ThemeOrdersReturnFormState { open: boolean; requestId: string; reason: string; quantities: Record<string, number> }

ThemeRegisteredLiquidSectionProps

interface ThemeRegisteredLiquidSectionProps {
    section: ThemeLiquidSectionInstance;
    checkout?: unknown;
    renderPreset?: (block: LocalBlock) => ReactNode;
    labels?: Record<string, unknown>;
    slots?: Record<string, ReactNode>;
    themeData?: Record<string, unknown>;
    globals?: Record<string, unknown>;
    resources?: Pick<ThemeLiquidContextInput, 'product' | 'products' | 'collection' | 'collections' | 'blog' | 'article' | 'page' | 'cart'>;
}

useThemeOrdersLiquidActions

useThemeOrdersLiquidActions(state: ThemeOrdersLiquidActions): void