@numueg/theme-sdk 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-PUR3FRGQ.mjs → chunk-4TMO5Y5W.mjs} +2 -2
- package/dist/chunk-4TMO5Y5W.mjs.map +1 -0
- package/dist/{chunk-JIAA7TGR.mjs → chunk-EB2ESBLD.mjs} +3 -3
- package/dist/{chunk-JIAA7TGR.mjs.map → chunk-EB2ESBLD.mjs.map} +1 -1
- package/dist/{chunk-3C37JX2X.cjs → chunk-IBNAZRUT.cjs} +2 -2
- package/dist/chunk-IBNAZRUT.cjs.map +1 -0
- package/dist/{chunk-X3J4GDI7.cjs → chunk-KWODVI7F.cjs} +3 -3
- package/dist/{chunk-X3J4GDI7.cjs.map → chunk-KWODVI7F.cjs.map} +1 -1
- package/dist/index.cjs +118 -69
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.mts +74 -15
- package/dist/index.d.ts +74 -15
- package/dist/index.mjs +53 -8
- package/dist/index.mjs.map +1 -1
- package/dist/{mount-CM4kGg9w.d.ts → mount-HbnOAYZ-.d.ts} +4 -1
- package/dist/{mount-NLjFNyBv.d.mts → mount-eAhGgGtZ.d.mts} +4 -1
- package/dist/v2-compat.cjs +6 -6
- package/dist/v2-compat.mjs +1 -1
- package/dist/validation.cjs +11 -11
- package/dist/validation.mjs +1 -1
- package/dist/verify.cjs +3 -3
- package/dist/verify.d.mts +1 -1
- package/dist/verify.d.ts +1 -1
- package/dist/verify.mjs +2 -2
- package/package.json +1 -1
- package/dist/chunk-3C37JX2X.cjs.map +0 -1
- package/dist/chunk-PUR3FRGQ.mjs.map +0 -1
package/dist/index.d.mts
CHANGED
|
@@ -3,8 +3,8 @@ export { A as Address, a as CartItem, O as Order, d as OrderItem, f as ProductIm
|
|
|
3
3
|
import { T as ThemeSettingsV3, c as SectionInstance, M as MountResult, B as BlockInstance, b as BlockSchema, a as BlockProps$1, f as SectionSchema, e as SectionProps$1 } from './theme-CNTB4KnU.mjs';
|
|
4
4
|
export { E as ExternalThemeMetadata, h as MAX_BLOCK_DEPTH, P as PageTemplate, i as PresetBlock, S as SectionGroup, d as SectionPreset, g as SettingDefinition } from './theme-CNTB4KnU.mjs';
|
|
5
5
|
export { KNOWN_SETTING_TYPES, KNOWN_TEMPLATES, REQUIRED_TEMPLATES, SDK_VERSION, THEME_CONTRACT_VERSION, ValidationIssue, ValidationResult, mergeResults, validateBuiltManifest, validateManifest, validateSectionSchema, validateSettingsAgainstSchema } from './validation.mjs';
|
|
6
|
-
import { C as CartContextValue, L as LocalizationState, a as CurrencyState, T as ThemeMountContext, b as ThemeRenderArgs, M as MenuItemData } from './mount-
|
|
7
|
-
export { c as CartContext, d as CartMutationResult, e as CollectionContext, f as CurrencyConfig, g as CurrencyContext, h as CustomerContext, i as LocalizationContext, N as NavigationContext, P as PageContext, j as ProductContext, S as ShopContext, k as ThemeMountPage, l as ThemeSettingsContext, m as buildThemeElement, n as mountTheme } from './mount-
|
|
6
|
+
import { C as CartContextValue, L as LocalizationState, a as CurrencyState, T as ThemeMountContext, b as ThemeRenderArgs, M as MenuItemData } from './mount-eAhGgGtZ.mjs';
|
|
7
|
+
export { c as CartContext, d as CartMutationResult, e as CollectionContext, f as CurrencyConfig, g as CurrencyContext, h as CustomerContext, i as LocalizationContext, N as NavigationContext, P as PageContext, j as ProductContext, S as ShopContext, k as ThemeMountPage, l as ThemeSettingsContext, m as buildThemeElement, n as mountTheme } from './mount-eAhGgGtZ.mjs';
|
|
8
8
|
import * as react from 'react';
|
|
9
9
|
import { ReactElement, ReactNode, ElementType, CSSProperties, ImgHTMLAttributes, AnchorHTMLAttributes, ButtonHTMLAttributes, HTMLAttributes, FormHTMLAttributes, ComponentType } from 'react';
|
|
10
10
|
export { resolveThemeSettings } from './normalize.mjs';
|
|
@@ -928,10 +928,30 @@ interface UseVariantSelection {
|
|
|
928
928
|
* Shopify's behavior. Themes that prefer "Choose your size" empty
|
|
929
929
|
* state can pass `autoSelect: false`.
|
|
930
930
|
*/
|
|
931
|
-
declare function useVariantSelection(product: Pick<Product, "options" | "variants"
|
|
931
|
+
declare function useVariantSelection(product: Pick<Product, "options" | "variants"> & {
|
|
932
|
+
id?: string;
|
|
933
|
+
}, opts?: {
|
|
932
934
|
autoSelect?: boolean;
|
|
933
935
|
}): UseVariantSelection;
|
|
934
936
|
|
|
937
|
+
/**
|
|
938
|
+
* Live variant-picker selection registry.
|
|
939
|
+
*
|
|
940
|
+
* `useVariantSelection` publishes its current axis→value map here keyed by
|
|
941
|
+
* product id; `AddToCartButton` reads it back at click time. This is what
|
|
942
|
+
* lets the selection reach the cart even when no real variant row matches —
|
|
943
|
+
* legacy products keep their axes in attributes JSON with a single
|
|
944
|
+
* placeholder variant whose option_values is {}, so `findVariantByOptions`
|
|
945
|
+
* returns null and there'd otherwise be nothing to send.
|
|
946
|
+
*
|
|
947
|
+
* Module-scoped (not React context) on purpose: the hook instance lives in
|
|
948
|
+
* the theme's PDP section while the button may be a sibling — they share no
|
|
949
|
+
* provider of ours. Bounded: one entry per product id, last write wins.
|
|
950
|
+
*/
|
|
951
|
+
declare function publishVariantSelection(productId: string | undefined | null, selection: Record<string, string>): void;
|
|
952
|
+
/** Latest non-empty selection for a product, or null. */
|
|
953
|
+
declare function readVariantSelection(productId: string | undefined | null): Record<string, string> | null;
|
|
954
|
+
|
|
935
955
|
/**
|
|
936
956
|
* Gift card balance check — Phase 8.3.
|
|
937
957
|
*
|
|
@@ -1516,27 +1536,66 @@ interface LinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "href"
|
|
|
1516
1536
|
to: string;
|
|
1517
1537
|
children: ReactNode;
|
|
1518
1538
|
}
|
|
1539
|
+
/**
|
|
1540
|
+
* Event dispatched on `window` when a Link is clicked and eligible for
|
|
1541
|
+
* client-side (soft) navigation. `detail.href` is the target path.
|
|
1542
|
+
*
|
|
1543
|
+
* Contract: the event is CANCELABLE. A host that can perform soft
|
|
1544
|
+
* navigation (e.g. the Next.js storefront routing through its client
|
|
1545
|
+
* router) listens for it and calls `event.preventDefault()` to claim
|
|
1546
|
+
* the navigation. If no listener claims it, the Link falls back to
|
|
1547
|
+
* default anchor behavior — a normal full-page navigation — so themes
|
|
1548
|
+
* running under hosts without the bridge (older storefronts, the CLI
|
|
1549
|
+
* dev server, static previews) keep working unchanged.
|
|
1550
|
+
*/
|
|
1551
|
+
declare const NAVIGATE_EVENT = "numu:navigate";
|
|
1552
|
+
interface NavigateEventDetail {
|
|
1553
|
+
href: string;
|
|
1554
|
+
}
|
|
1555
|
+
/**
|
|
1556
|
+
* Ask the host to soft-navigate to `href`. Returns true when a host
|
|
1557
|
+
* listener claimed the navigation (the caller should suppress its own
|
|
1558
|
+
* default behavior), false when no handler is present (the caller
|
|
1559
|
+
* should fall back to a full navigation). Exposed for themes that
|
|
1560
|
+
* navigate programmatically (e.g. after a search submit).
|
|
1561
|
+
*/
|
|
1562
|
+
declare function requestNavigate(href: string): boolean;
|
|
1519
1563
|
/**
|
|
1520
1564
|
* Route-aware <Link>. Themes write paths as `/products/<slug>` (matches
|
|
1521
1565
|
* the production subdomain root). The storefront proxy rewrites those
|
|
1522
1566
|
* under `/<subdomain>/...` in dev path-segment routing; in production
|
|
1523
1567
|
* the subdomain hostname does the same job at the edge.
|
|
1524
1568
|
*
|
|
1525
|
-
*
|
|
1526
|
-
*
|
|
1527
|
-
*
|
|
1528
|
-
*
|
|
1529
|
-
*
|
|
1530
|
-
*
|
|
1531
|
-
*
|
|
1532
|
-
*
|
|
1533
|
-
|
|
1534
|
-
|
|
1569
|
+
* Navigation is a two-tier contract:
|
|
1570
|
+
* 1. Soft (preferred): on an eligible plain left-click we dispatch a
|
|
1571
|
+
* cancelable NAVIGATE_EVENT. A router-aware host claims it with
|
|
1572
|
+
* preventDefault() and performs a client-side transition — React,
|
|
1573
|
+
* the SDK runtime, and the evaluated theme bundle all stay warm,
|
|
1574
|
+
* so page-to-page moves skip the full document reload + remount.
|
|
1575
|
+
* 2. Hard (fallback): no listener claims the event → default anchor
|
|
1576
|
+
* behavior, a normal full-page navigation. Identical to the
|
|
1577
|
+
* pre-0.10 behavior, so themes never break on hosts without the
|
|
1578
|
+
* bridge.
|
|
1579
|
+
*
|
|
1580
|
+
* Soft navigation is only attempted for storefront-internal paths and
|
|
1581
|
+
* unmodified left-clicks: external URLs (protocol or `//`), hash-only
|
|
1582
|
+
* anchors, modified clicks (ctrl/cmd/shift/alt — "open in new tab"),
|
|
1583
|
+
* non-left buttons, `target` other than `_self`, and `download` links
|
|
1584
|
+
* all keep default browser behavior.
|
|
1585
|
+
*/
|
|
1586
|
+
declare function Link({ to, children, onClick, ...rest }: LinkProps): react.JSX.Element;
|
|
1535
1587
|
|
|
1536
1588
|
interface AddToCartButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "onClick" | "disabled"> {
|
|
1537
1589
|
product: Product;
|
|
1538
1590
|
variant?: ProductVariant;
|
|
1539
1591
|
quantity?: number;
|
|
1592
|
+
/**
|
|
1593
|
+
* Picker axes to persist on the cart line ({Color: "Black"}). Optional —
|
|
1594
|
+
* when omitted, the button reads the live useVariantSelection state for
|
|
1595
|
+
* this product from the SDK registry, so existing themes get the variant
|
|
1596
|
+
* label end-to-end (cart → checkout → order → email) with no changes.
|
|
1597
|
+
*/
|
|
1598
|
+
selectedOptions?: Record<string, string>;
|
|
1540
1599
|
/** Custom labels — fallbacks are English defaults. */
|
|
1541
1600
|
label?: ReactNode;
|
|
1542
1601
|
loadingLabel?: ReactNode;
|
|
@@ -1559,7 +1618,7 @@ interface AddToCartButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonEleme
|
|
|
1559
1618
|
* Doesn't trap navigation — for "buy now" flows that should redirect
|
|
1560
1619
|
* to checkout, themes wrap this in their own `<a>` after onAdded.
|
|
1561
1620
|
*/
|
|
1562
|
-
declare function AddToCartButton({ product, variant, quantity, label, loadingLabel, soldOutLabel, errorLabel, onAdded, ...rest }: AddToCartButtonProps): react.JSX.Element;
|
|
1621
|
+
declare function AddToCartButton({ product, variant, quantity, selectedOptions, label, loadingLabel, soldOutLabel, errorLabel, onAdded, ...rest }: AddToCartButtonProps): react.JSX.Element;
|
|
1563
1622
|
|
|
1564
1623
|
interface SectionProps extends HTMLAttributes<HTMLElement> {
|
|
1565
1624
|
/** Section instance id (the order key in templates). Required for the
|
|
@@ -2400,4 +2459,4 @@ declare function pickTranslations(bundle: LocaleBundle, locale: string): LocaleM
|
|
|
2400
2459
|
*/
|
|
2401
2460
|
declare function buildLocaleBundle<T extends Record<string, unknown>>(modules: T): LocaleBundle;
|
|
2402
2461
|
|
|
2403
|
-
export { AddToCartButton, type AddressInput, type AnalyticsApi, type AnalyticsPayload, type AppManifestBlock, type AppPayload, type AppState, Block, BlockInstance, BlockProps$1 as BlockProps, BlockSchema, type CacheFetcher, type CacheMutator, type CachedResource, type CachedResourceState, Cart, CartContextValue, type CheckoutAddress, type CheckoutApi, type CheckoutSessionState, type CheckoutStep, Collection, CollectionCard, type CollectionCardProps, type CollectionCardSlots, CollectionProvider, type ComputedStyleTokens, CurrencyState, CurrencySwitcher, type CurrencySwitcherProps, Customer, type CustomerAddress, type CustomerAddressesState, type DefineBlockInput, type DefineSectionInput, type DefinedBlock, type DefinedSection, type DynamicResolveContext, type DynamicSourceRef, EditableImage, type EditableImageProps, EditableText, type EditableTextProps, type FocalSrcOptions, Form, type GiftCardBalance, HeroMedia, type HeroMediaProps, ICON_NAMES, Icon, IconMap, type IconProps, Image, type ImageTransform, LOGO_SHAPE_OPTIONS, LOGO_SIZE_OPTIONS, Link, type LocaleBundle, type LocaleMessages, LocaleSwitcher, type LocaleSwitcherProps, Logo, type LogoProps, type LogoShape, type LogoSize, MenuItemData, Money, MountResult, type MutateOptions, type NavigationItem, type NavigationState, NuMuProvider, type OrderDetail, type OrderListEntry, type OrderListState, type OrderState, Page, type PlaceOrderResult, Product, ProductCard, type ProductCardProps, type ProductCardSlots, ProductProvider, ProductVariant, type RelatedProductsState, type ReorderResult, type ReorderSkipReason, type ReorderSkippedItem, RichText, type RichTextProps, type SearchResults, type SearchState, Section, SectionContext, type SectionGroupInstance, SectionInstance, SectionProps$1 as SectionProps, SectionSchema, type ShippingRateOption, type ShopWithHelpers, SizeChart, Store, type ThemeEntry, ThemeMountContext, ThemeRenderArgs, ThemeSettingsV3, type UseCachedResourceOptions, type UseGiftCardBalance, type UseReorder, type UseSearchOptions, type UseShippingRatesOptions, type UseShippingRatesState, type UseVariantSelection, type WishlistItem, type WishlistState, applyGlobalStyleTokens, applyImageTransform, asImageTransform, assetUrl, availableValues, buildLocaleBundle, clearSdkSingleton, collectBlocks, collectSections, computeGlobalStyleTokens, defaultVariant, defineBlock, defineSection, defineThemeEntry, dynamicSource, findVariantByOptions, flattenMessages, focalSrc, getReactSingleton, getSdkSingleton, isDefinedBlock, isDefinedSection, isDynamicSource, isSdkAvailable, logoImgStyle, logoStyleTokens, pickTranslations, registerReactSingleton, registerSdkSingleton, resolveDynamicValue, resolveFontStack, resolveSettingsMap, resolveSizeChart, resolveSourcePath, sanitizeHtml, useAnalytics, useApp, useCachedResource, useCart, useCheckout, useCollection, useCollectionOptional, useCollections, useCurrency, useCurrentTemplate, useCustomer, useCustomerActions, useCustomerAddresses, useDirection, useFieldTranslation, useGiftCardBalance, useImage, useLocale, useLocalization, useMoney, useNavigation, useNumberFormat, useOrder, useOrders, usePage, useProduct, useProductOptional, useProductSizeChart, useProducts, useRelatedProducts, useReorder, useResolvedSettings, useSearch, useSection, useSectionGroup, useSectionOptional, useShippingRates, useShop, useThemeSettings, useTranslation, useVariantSelection, useWishlist };
|
|
2462
|
+
export { AddToCartButton, type AddressInput, type AnalyticsApi, type AnalyticsPayload, type AppManifestBlock, type AppPayload, type AppState, Block, BlockInstance, BlockProps$1 as BlockProps, BlockSchema, type CacheFetcher, type CacheMutator, type CachedResource, type CachedResourceState, Cart, CartContextValue, type CheckoutAddress, type CheckoutApi, type CheckoutSessionState, type CheckoutStep, Collection, CollectionCard, type CollectionCardProps, type CollectionCardSlots, CollectionProvider, type ComputedStyleTokens, CurrencyState, CurrencySwitcher, type CurrencySwitcherProps, Customer, type CustomerAddress, type CustomerAddressesState, type DefineBlockInput, type DefineSectionInput, type DefinedBlock, type DefinedSection, type DynamicResolveContext, type DynamicSourceRef, EditableImage, type EditableImageProps, EditableText, type EditableTextProps, type FocalSrcOptions, Form, type GiftCardBalance, HeroMedia, type HeroMediaProps, ICON_NAMES, Icon, IconMap, type IconProps, Image, type ImageTransform, LOGO_SHAPE_OPTIONS, LOGO_SIZE_OPTIONS, Link, type LocaleBundle, type LocaleMessages, LocaleSwitcher, type LocaleSwitcherProps, Logo, type LogoProps, type LogoShape, type LogoSize, MenuItemData, Money, MountResult, type MutateOptions, NAVIGATE_EVENT, type NavigateEventDetail, type NavigationItem, type NavigationState, NuMuProvider, type OrderDetail, type OrderListEntry, type OrderListState, type OrderState, Page, type PlaceOrderResult, Product, ProductCard, type ProductCardProps, type ProductCardSlots, ProductProvider, ProductVariant, type RelatedProductsState, type ReorderResult, type ReorderSkipReason, type ReorderSkippedItem, RichText, type RichTextProps, type SearchResults, type SearchState, Section, SectionContext, type SectionGroupInstance, SectionInstance, SectionProps$1 as SectionProps, SectionSchema, type ShippingRateOption, type ShopWithHelpers, SizeChart, Store, type ThemeEntry, ThemeMountContext, ThemeRenderArgs, ThemeSettingsV3, type UseCachedResourceOptions, type UseGiftCardBalance, type UseReorder, type UseSearchOptions, type UseShippingRatesOptions, type UseShippingRatesState, type UseVariantSelection, type WishlistItem, type WishlistState, applyGlobalStyleTokens, applyImageTransform, asImageTransform, assetUrl, availableValues, buildLocaleBundle, clearSdkSingleton, collectBlocks, collectSections, computeGlobalStyleTokens, defaultVariant, defineBlock, defineSection, defineThemeEntry, dynamicSource, findVariantByOptions, flattenMessages, focalSrc, getReactSingleton, getSdkSingleton, isDefinedBlock, isDefinedSection, isDynamicSource, isSdkAvailable, logoImgStyle, logoStyleTokens, pickTranslations, publishVariantSelection, readVariantSelection, registerReactSingleton, registerSdkSingleton, requestNavigate, resolveDynamicValue, resolveFontStack, resolveSettingsMap, resolveSizeChart, resolveSourcePath, sanitizeHtml, useAnalytics, useApp, useCachedResource, useCart, useCheckout, useCollection, useCollectionOptional, useCollections, useCurrency, useCurrentTemplate, useCustomer, useCustomerActions, useCustomerAddresses, useDirection, useFieldTranslation, useGiftCardBalance, useImage, useLocale, useLocalization, useMoney, useNavigation, useNumberFormat, useOrder, useOrders, usePage, useProduct, useProductOptional, useProductSizeChart, useProducts, useRelatedProducts, useReorder, useResolvedSettings, useSearch, useSection, useSectionGroup, useSectionOptional, useShippingRates, useShop, useThemeSettings, useTranslation, useVariantSelection, useWishlist };
|
package/dist/index.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ export { A as Address, a as CartItem, O as Order, d as OrderItem, f as ProductIm
|
|
|
3
3
|
import { T as ThemeSettingsV3, c as SectionInstance, M as MountResult, B as BlockInstance, b as BlockSchema, a as BlockProps$1, f as SectionSchema, e as SectionProps$1 } from './theme-CNTB4KnU.js';
|
|
4
4
|
export { E as ExternalThemeMetadata, h as MAX_BLOCK_DEPTH, P as PageTemplate, i as PresetBlock, S as SectionGroup, d as SectionPreset, g as SettingDefinition } from './theme-CNTB4KnU.js';
|
|
5
5
|
export { KNOWN_SETTING_TYPES, KNOWN_TEMPLATES, REQUIRED_TEMPLATES, SDK_VERSION, THEME_CONTRACT_VERSION, ValidationIssue, ValidationResult, mergeResults, validateBuiltManifest, validateManifest, validateSectionSchema, validateSettingsAgainstSchema } from './validation.js';
|
|
6
|
-
import { C as CartContextValue, L as LocalizationState, a as CurrencyState, T as ThemeMountContext, b as ThemeRenderArgs, M as MenuItemData } from './mount-
|
|
7
|
-
export { c as CartContext, d as CartMutationResult, e as CollectionContext, f as CurrencyConfig, g as CurrencyContext, h as CustomerContext, i as LocalizationContext, N as NavigationContext, P as PageContext, j as ProductContext, S as ShopContext, k as ThemeMountPage, l as ThemeSettingsContext, m as buildThemeElement, n as mountTheme } from './mount-
|
|
6
|
+
import { C as CartContextValue, L as LocalizationState, a as CurrencyState, T as ThemeMountContext, b as ThemeRenderArgs, M as MenuItemData } from './mount-HbnOAYZ-.js';
|
|
7
|
+
export { c as CartContext, d as CartMutationResult, e as CollectionContext, f as CurrencyConfig, g as CurrencyContext, h as CustomerContext, i as LocalizationContext, N as NavigationContext, P as PageContext, j as ProductContext, S as ShopContext, k as ThemeMountPage, l as ThemeSettingsContext, m as buildThemeElement, n as mountTheme } from './mount-HbnOAYZ-.js';
|
|
8
8
|
import * as react from 'react';
|
|
9
9
|
import { ReactElement, ReactNode, ElementType, CSSProperties, ImgHTMLAttributes, AnchorHTMLAttributes, ButtonHTMLAttributes, HTMLAttributes, FormHTMLAttributes, ComponentType } from 'react';
|
|
10
10
|
export { resolveThemeSettings } from './normalize.js';
|
|
@@ -928,10 +928,30 @@ interface UseVariantSelection {
|
|
|
928
928
|
* Shopify's behavior. Themes that prefer "Choose your size" empty
|
|
929
929
|
* state can pass `autoSelect: false`.
|
|
930
930
|
*/
|
|
931
|
-
declare function useVariantSelection(product: Pick<Product, "options" | "variants"
|
|
931
|
+
declare function useVariantSelection(product: Pick<Product, "options" | "variants"> & {
|
|
932
|
+
id?: string;
|
|
933
|
+
}, opts?: {
|
|
932
934
|
autoSelect?: boolean;
|
|
933
935
|
}): UseVariantSelection;
|
|
934
936
|
|
|
937
|
+
/**
|
|
938
|
+
* Live variant-picker selection registry.
|
|
939
|
+
*
|
|
940
|
+
* `useVariantSelection` publishes its current axis→value map here keyed by
|
|
941
|
+
* product id; `AddToCartButton` reads it back at click time. This is what
|
|
942
|
+
* lets the selection reach the cart even when no real variant row matches —
|
|
943
|
+
* legacy products keep their axes in attributes JSON with a single
|
|
944
|
+
* placeholder variant whose option_values is {}, so `findVariantByOptions`
|
|
945
|
+
* returns null and there'd otherwise be nothing to send.
|
|
946
|
+
*
|
|
947
|
+
* Module-scoped (not React context) on purpose: the hook instance lives in
|
|
948
|
+
* the theme's PDP section while the button may be a sibling — they share no
|
|
949
|
+
* provider of ours. Bounded: one entry per product id, last write wins.
|
|
950
|
+
*/
|
|
951
|
+
declare function publishVariantSelection(productId: string | undefined | null, selection: Record<string, string>): void;
|
|
952
|
+
/** Latest non-empty selection for a product, or null. */
|
|
953
|
+
declare function readVariantSelection(productId: string | undefined | null): Record<string, string> | null;
|
|
954
|
+
|
|
935
955
|
/**
|
|
936
956
|
* Gift card balance check — Phase 8.3.
|
|
937
957
|
*
|
|
@@ -1516,27 +1536,66 @@ interface LinkProps extends Omit<AnchorHTMLAttributes<HTMLAnchorElement>, "href"
|
|
|
1516
1536
|
to: string;
|
|
1517
1537
|
children: ReactNode;
|
|
1518
1538
|
}
|
|
1539
|
+
/**
|
|
1540
|
+
* Event dispatched on `window` when a Link is clicked and eligible for
|
|
1541
|
+
* client-side (soft) navigation. `detail.href` is the target path.
|
|
1542
|
+
*
|
|
1543
|
+
* Contract: the event is CANCELABLE. A host that can perform soft
|
|
1544
|
+
* navigation (e.g. the Next.js storefront routing through its client
|
|
1545
|
+
* router) listens for it and calls `event.preventDefault()` to claim
|
|
1546
|
+
* the navigation. If no listener claims it, the Link falls back to
|
|
1547
|
+
* default anchor behavior — a normal full-page navigation — so themes
|
|
1548
|
+
* running under hosts without the bridge (older storefronts, the CLI
|
|
1549
|
+
* dev server, static previews) keep working unchanged.
|
|
1550
|
+
*/
|
|
1551
|
+
declare const NAVIGATE_EVENT = "numu:navigate";
|
|
1552
|
+
interface NavigateEventDetail {
|
|
1553
|
+
href: string;
|
|
1554
|
+
}
|
|
1555
|
+
/**
|
|
1556
|
+
* Ask the host to soft-navigate to `href`. Returns true when a host
|
|
1557
|
+
* listener claimed the navigation (the caller should suppress its own
|
|
1558
|
+
* default behavior), false when no handler is present (the caller
|
|
1559
|
+
* should fall back to a full navigation). Exposed for themes that
|
|
1560
|
+
* navigate programmatically (e.g. after a search submit).
|
|
1561
|
+
*/
|
|
1562
|
+
declare function requestNavigate(href: string): boolean;
|
|
1519
1563
|
/**
|
|
1520
1564
|
* Route-aware <Link>. Themes write paths as `/products/<slug>` (matches
|
|
1521
1565
|
* the production subdomain root). The storefront proxy rewrites those
|
|
1522
1566
|
* under `/<subdomain>/...` in dev path-segment routing; in production
|
|
1523
1567
|
* the subdomain hostname does the same job at the edge.
|
|
1524
1568
|
*
|
|
1525
|
-
*
|
|
1526
|
-
*
|
|
1527
|
-
*
|
|
1528
|
-
*
|
|
1529
|
-
*
|
|
1530
|
-
*
|
|
1531
|
-
*
|
|
1532
|
-
*
|
|
1533
|
-
|
|
1534
|
-
|
|
1569
|
+
* Navigation is a two-tier contract:
|
|
1570
|
+
* 1. Soft (preferred): on an eligible plain left-click we dispatch a
|
|
1571
|
+
* cancelable NAVIGATE_EVENT. A router-aware host claims it with
|
|
1572
|
+
* preventDefault() and performs a client-side transition — React,
|
|
1573
|
+
* the SDK runtime, and the evaluated theme bundle all stay warm,
|
|
1574
|
+
* so page-to-page moves skip the full document reload + remount.
|
|
1575
|
+
* 2. Hard (fallback): no listener claims the event → default anchor
|
|
1576
|
+
* behavior, a normal full-page navigation. Identical to the
|
|
1577
|
+
* pre-0.10 behavior, so themes never break on hosts without the
|
|
1578
|
+
* bridge.
|
|
1579
|
+
*
|
|
1580
|
+
* Soft navigation is only attempted for storefront-internal paths and
|
|
1581
|
+
* unmodified left-clicks: external URLs (protocol or `//`), hash-only
|
|
1582
|
+
* anchors, modified clicks (ctrl/cmd/shift/alt — "open in new tab"),
|
|
1583
|
+
* non-left buttons, `target` other than `_self`, and `download` links
|
|
1584
|
+
* all keep default browser behavior.
|
|
1585
|
+
*/
|
|
1586
|
+
declare function Link({ to, children, onClick, ...rest }: LinkProps): react.JSX.Element;
|
|
1535
1587
|
|
|
1536
1588
|
interface AddToCartButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "onClick" | "disabled"> {
|
|
1537
1589
|
product: Product;
|
|
1538
1590
|
variant?: ProductVariant;
|
|
1539
1591
|
quantity?: number;
|
|
1592
|
+
/**
|
|
1593
|
+
* Picker axes to persist on the cart line ({Color: "Black"}). Optional —
|
|
1594
|
+
* when omitted, the button reads the live useVariantSelection state for
|
|
1595
|
+
* this product from the SDK registry, so existing themes get the variant
|
|
1596
|
+
* label end-to-end (cart → checkout → order → email) with no changes.
|
|
1597
|
+
*/
|
|
1598
|
+
selectedOptions?: Record<string, string>;
|
|
1540
1599
|
/** Custom labels — fallbacks are English defaults. */
|
|
1541
1600
|
label?: ReactNode;
|
|
1542
1601
|
loadingLabel?: ReactNode;
|
|
@@ -1559,7 +1618,7 @@ interface AddToCartButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonEleme
|
|
|
1559
1618
|
* Doesn't trap navigation — for "buy now" flows that should redirect
|
|
1560
1619
|
* to checkout, themes wrap this in their own `<a>` after onAdded.
|
|
1561
1620
|
*/
|
|
1562
|
-
declare function AddToCartButton({ product, variant, quantity, label, loadingLabel, soldOutLabel, errorLabel, onAdded, ...rest }: AddToCartButtonProps): react.JSX.Element;
|
|
1621
|
+
declare function AddToCartButton({ product, variant, quantity, selectedOptions, label, loadingLabel, soldOutLabel, errorLabel, onAdded, ...rest }: AddToCartButtonProps): react.JSX.Element;
|
|
1563
1622
|
|
|
1564
1623
|
interface SectionProps extends HTMLAttributes<HTMLElement> {
|
|
1565
1624
|
/** Section instance id (the order key in templates). Required for the
|
|
@@ -2400,4 +2459,4 @@ declare function pickTranslations(bundle: LocaleBundle, locale: string): LocaleM
|
|
|
2400
2459
|
*/
|
|
2401
2460
|
declare function buildLocaleBundle<T extends Record<string, unknown>>(modules: T): LocaleBundle;
|
|
2402
2461
|
|
|
2403
|
-
export { AddToCartButton, type AddressInput, type AnalyticsApi, type AnalyticsPayload, type AppManifestBlock, type AppPayload, type AppState, Block, BlockInstance, BlockProps$1 as BlockProps, BlockSchema, type CacheFetcher, type CacheMutator, type CachedResource, type CachedResourceState, Cart, CartContextValue, type CheckoutAddress, type CheckoutApi, type CheckoutSessionState, type CheckoutStep, Collection, CollectionCard, type CollectionCardProps, type CollectionCardSlots, CollectionProvider, type ComputedStyleTokens, CurrencyState, CurrencySwitcher, type CurrencySwitcherProps, Customer, type CustomerAddress, type CustomerAddressesState, type DefineBlockInput, type DefineSectionInput, type DefinedBlock, type DefinedSection, type DynamicResolveContext, type DynamicSourceRef, EditableImage, type EditableImageProps, EditableText, type EditableTextProps, type FocalSrcOptions, Form, type GiftCardBalance, HeroMedia, type HeroMediaProps, ICON_NAMES, Icon, IconMap, type IconProps, Image, type ImageTransform, LOGO_SHAPE_OPTIONS, LOGO_SIZE_OPTIONS, Link, type LocaleBundle, type LocaleMessages, LocaleSwitcher, type LocaleSwitcherProps, Logo, type LogoProps, type LogoShape, type LogoSize, MenuItemData, Money, MountResult, type MutateOptions, type NavigationItem, type NavigationState, NuMuProvider, type OrderDetail, type OrderListEntry, type OrderListState, type OrderState, Page, type PlaceOrderResult, Product, ProductCard, type ProductCardProps, type ProductCardSlots, ProductProvider, ProductVariant, type RelatedProductsState, type ReorderResult, type ReorderSkipReason, type ReorderSkippedItem, RichText, type RichTextProps, type SearchResults, type SearchState, Section, SectionContext, type SectionGroupInstance, SectionInstance, SectionProps$1 as SectionProps, SectionSchema, type ShippingRateOption, type ShopWithHelpers, SizeChart, Store, type ThemeEntry, ThemeMountContext, ThemeRenderArgs, ThemeSettingsV3, type UseCachedResourceOptions, type UseGiftCardBalance, type UseReorder, type UseSearchOptions, type UseShippingRatesOptions, type UseShippingRatesState, type UseVariantSelection, type WishlistItem, type WishlistState, applyGlobalStyleTokens, applyImageTransform, asImageTransform, assetUrl, availableValues, buildLocaleBundle, clearSdkSingleton, collectBlocks, collectSections, computeGlobalStyleTokens, defaultVariant, defineBlock, defineSection, defineThemeEntry, dynamicSource, findVariantByOptions, flattenMessages, focalSrc, getReactSingleton, getSdkSingleton, isDefinedBlock, isDefinedSection, isDynamicSource, isSdkAvailable, logoImgStyle, logoStyleTokens, pickTranslations, registerReactSingleton, registerSdkSingleton, resolveDynamicValue, resolveFontStack, resolveSettingsMap, resolveSizeChart, resolveSourcePath, sanitizeHtml, useAnalytics, useApp, useCachedResource, useCart, useCheckout, useCollection, useCollectionOptional, useCollections, useCurrency, useCurrentTemplate, useCustomer, useCustomerActions, useCustomerAddresses, useDirection, useFieldTranslation, useGiftCardBalance, useImage, useLocale, useLocalization, useMoney, useNavigation, useNumberFormat, useOrder, useOrders, usePage, useProduct, useProductOptional, useProductSizeChart, useProducts, useRelatedProducts, useReorder, useResolvedSettings, useSearch, useSection, useSectionGroup, useSectionOptional, useShippingRates, useShop, useThemeSettings, useTranslation, useVariantSelection, useWishlist };
|
|
2462
|
+
export { AddToCartButton, type AddressInput, type AnalyticsApi, type AnalyticsPayload, type AppManifestBlock, type AppPayload, type AppState, Block, BlockInstance, BlockProps$1 as BlockProps, BlockSchema, type CacheFetcher, type CacheMutator, type CachedResource, type CachedResourceState, Cart, CartContextValue, type CheckoutAddress, type CheckoutApi, type CheckoutSessionState, type CheckoutStep, Collection, CollectionCard, type CollectionCardProps, type CollectionCardSlots, CollectionProvider, type ComputedStyleTokens, CurrencyState, CurrencySwitcher, type CurrencySwitcherProps, Customer, type CustomerAddress, type CustomerAddressesState, type DefineBlockInput, type DefineSectionInput, type DefinedBlock, type DefinedSection, type DynamicResolveContext, type DynamicSourceRef, EditableImage, type EditableImageProps, EditableText, type EditableTextProps, type FocalSrcOptions, Form, type GiftCardBalance, HeroMedia, type HeroMediaProps, ICON_NAMES, Icon, IconMap, type IconProps, Image, type ImageTransform, LOGO_SHAPE_OPTIONS, LOGO_SIZE_OPTIONS, Link, type LocaleBundle, type LocaleMessages, LocaleSwitcher, type LocaleSwitcherProps, Logo, type LogoProps, type LogoShape, type LogoSize, MenuItemData, Money, MountResult, type MutateOptions, NAVIGATE_EVENT, type NavigateEventDetail, type NavigationItem, type NavigationState, NuMuProvider, type OrderDetail, type OrderListEntry, type OrderListState, type OrderState, Page, type PlaceOrderResult, Product, ProductCard, type ProductCardProps, type ProductCardSlots, ProductProvider, ProductVariant, type RelatedProductsState, type ReorderResult, type ReorderSkipReason, type ReorderSkippedItem, RichText, type RichTextProps, type SearchResults, type SearchState, Section, SectionContext, type SectionGroupInstance, SectionInstance, SectionProps$1 as SectionProps, SectionSchema, type ShippingRateOption, type ShopWithHelpers, SizeChart, Store, type ThemeEntry, ThemeMountContext, ThemeRenderArgs, ThemeSettingsV3, type UseCachedResourceOptions, type UseGiftCardBalance, type UseReorder, type UseSearchOptions, type UseShippingRatesOptions, type UseShippingRatesState, type UseVariantSelection, type WishlistItem, type WishlistState, applyGlobalStyleTokens, applyImageTransform, asImageTransform, assetUrl, availableValues, buildLocaleBundle, clearSdkSingleton, collectBlocks, collectSections, computeGlobalStyleTokens, defaultVariant, defineBlock, defineSection, defineThemeEntry, dynamicSource, findVariantByOptions, flattenMessages, focalSrc, getReactSingleton, getSdkSingleton, isDefinedBlock, isDefinedSection, isDynamicSource, isSdkAvailable, logoImgStyle, logoStyleTokens, pickTranslations, publishVariantSelection, readVariantSelection, registerReactSingleton, registerSdkSingleton, requestNavigate, resolveDynamicValue, resolveFontStack, resolveSettingsMap, resolveSizeChart, resolveSourcePath, sanitizeHtml, useAnalytics, useApp, useCachedResource, useCart, useCheckout, useCollection, useCollectionOptional, useCollections, useCurrency, useCurrentTemplate, useCustomer, useCustomerActions, useCustomerAddresses, useDirection, useFieldTranslation, useGiftCardBalance, useImage, useLocale, useLocalization, useMoney, useNavigation, useNumberFormat, useOrder, useOrders, usePage, useProduct, useProductOptional, useProductSizeChart, useProducts, useRelatedProducts, useReorder, useResolvedSettings, useSearch, useSection, useSectionGroup, useSectionOptional, useShippingRates, useShop, useThemeSettings, useTranslation, useVariantSelection, useWishlist };
|
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { resolveThemeSettings } from './chunk-XF2FGIVS.mjs';
|
|
2
|
-
export { KNOWN_SETTING_TYPES, KNOWN_TEMPLATES, REQUIRED_TEMPLATES, SDK_VERSION, THEME_CONTRACT_VERSION, mergeResults, validateBuiltManifest, validateManifest, validateSectionSchema, validateSettingsAgainstSchema } from './chunk-
|
|
3
|
-
import { ShopContext, ThemeSettingsContext, CurrentTemplateContext, PageContext, LocalizationContext, CurrencyContext, CartContext, CustomerContext, NavigationContext, CollectionContext, ProductContext, useShop, useLocalization, useCustomer, useThemeSettings } from './chunk-
|
|
4
|
-
export { CartContext, CollectionContext, CurrencyContext, CustomerContext, LocalizationContext, NavigationContext, PageContext, ProductContext, ShopContext, ThemeSettingsContext, useCollections, useCustomer, useDirection, useFieldTranslation, useLocale, useLocalization, useNumberFormat, usePage, useProducts, useShop, useThemeSettings, useTranslation } from './chunk-
|
|
2
|
+
export { KNOWN_SETTING_TYPES, KNOWN_TEMPLATES, REQUIRED_TEMPLATES, SDK_VERSION, THEME_CONTRACT_VERSION, mergeResults, validateBuiltManifest, validateManifest, validateSectionSchema, validateSettingsAgainstSchema } from './chunk-EB2ESBLD.mjs';
|
|
3
|
+
import { ShopContext, ThemeSettingsContext, CurrentTemplateContext, PageContext, LocalizationContext, CurrencyContext, CartContext, CustomerContext, NavigationContext, CollectionContext, ProductContext, useShop, useLocalization, useCustomer, useThemeSettings } from './chunk-4TMO5Y5W.mjs';
|
|
4
|
+
export { CartContext, CollectionContext, CurrencyContext, CustomerContext, LocalizationContext, NavigationContext, PageContext, ProductContext, ShopContext, ThemeSettingsContext, useCollections, useCustomer, useDirection, useFieldTranslation, useLocale, useLocalization, useNumberFormat, usePage, useProducts, useShop, useThemeSettings, useTranslation } from './chunk-4TMO5Y5W.mjs';
|
|
5
5
|
import { createContext, forwardRef, useState, useImperativeHandle, useEffect, useCallback, useMemo, useRef, useContext, useSyncExternalStore, StrictMode, createElement, Component } from 'react';
|
|
6
6
|
import { hydrateRoot, createRoot } from 'react-dom/client';
|
|
7
7
|
import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
|
|
@@ -1020,6 +1020,25 @@ function availableValues(product, selection) {
|
|
|
1020
1020
|
}
|
|
1021
1021
|
return out;
|
|
1022
1022
|
}
|
|
1023
|
+
|
|
1024
|
+
// src/utils/selectionRegistry.ts
|
|
1025
|
+
var selections = /* @__PURE__ */ new Map();
|
|
1026
|
+
function publishVariantSelection(productId, selection) {
|
|
1027
|
+
if (!productId) return;
|
|
1028
|
+
selections.set(productId, selection);
|
|
1029
|
+
}
|
|
1030
|
+
function readVariantSelection(productId) {
|
|
1031
|
+
if (!productId) return null;
|
|
1032
|
+
const sel = selections.get(productId);
|
|
1033
|
+
if (!sel) return null;
|
|
1034
|
+
const filtered = {};
|
|
1035
|
+
for (const [k, v] of Object.entries(sel)) {
|
|
1036
|
+
if (v) filtered[k] = v;
|
|
1037
|
+
}
|
|
1038
|
+
return Object.keys(filtered).length > 0 ? filtered : null;
|
|
1039
|
+
}
|
|
1040
|
+
|
|
1041
|
+
// src/hooks/useVariantSelection.ts
|
|
1023
1042
|
function useVariantSelection(product, opts = {}) {
|
|
1024
1043
|
const autoSelect = opts.autoSelect ?? true;
|
|
1025
1044
|
const initial = useMemo(() => {
|
|
@@ -1038,6 +1057,9 @@ function useVariantSelection(product, opts = {}) {
|
|
|
1038
1057
|
() => findVariantByOptions(product, selection),
|
|
1039
1058
|
[product, selection]
|
|
1040
1059
|
);
|
|
1060
|
+
useEffect(() => {
|
|
1061
|
+
publishVariantSelection(product.id, selection);
|
|
1062
|
+
}, [product.id, selection]);
|
|
1041
1063
|
const availability = useMemo(
|
|
1042
1064
|
() => availableValues(product, selection),
|
|
1043
1065
|
[product, selection]
|
|
@@ -1705,13 +1727,15 @@ function NuMuProvider({
|
|
|
1705
1727
|
[reserveToken, buildApplyCart]
|
|
1706
1728
|
);
|
|
1707
1729
|
const addItem = useCallback(
|
|
1708
|
-
async (productId, variantId, quantity) => {
|
|
1730
|
+
async (productId, variantId, quantity, selectedOptions) => {
|
|
1709
1731
|
const eventId = typeof crypto !== "undefined" && crypto.randomUUID ? crypto.randomUUID() : `${Date.now()}`;
|
|
1710
1732
|
const qty = quantity || 1;
|
|
1733
|
+
const axes = selectedOptions && Object.keys(selectedOptions).length > 0 ? selectedOptions : readVariantSelection(productId) ?? void 0;
|
|
1711
1734
|
const result = await mutate("/api/cart/add", {
|
|
1712
1735
|
product_id: productId,
|
|
1713
1736
|
variant_id: variantId,
|
|
1714
1737
|
quantity: qty,
|
|
1738
|
+
selected_options: axes,
|
|
1715
1739
|
_event_id: eventId
|
|
1716
1740
|
});
|
|
1717
1741
|
if (!result.ok) return result;
|
|
@@ -2608,19 +2632,40 @@ function Logo({
|
|
|
2608
2632
|
);
|
|
2609
2633
|
}
|
|
2610
2634
|
var ABSOLUTE_URL = /^[a-z]+:|^\/\//i;
|
|
2611
|
-
|
|
2635
|
+
var NAVIGATE_EVENT = "numu:navigate";
|
|
2636
|
+
function requestNavigate(href) {
|
|
2637
|
+
if (typeof window === "undefined") return false;
|
|
2638
|
+
const event = new CustomEvent(NAVIGATE_EVENT, {
|
|
2639
|
+
detail: { href },
|
|
2640
|
+
cancelable: true
|
|
2641
|
+
});
|
|
2642
|
+
return !window.dispatchEvent(event);
|
|
2643
|
+
}
|
|
2644
|
+
function Link({ to, children, onClick, ...rest }) {
|
|
2612
2645
|
const shop = useShop();
|
|
2613
2646
|
const isAbsolute = ABSOLUTE_URL.test(to);
|
|
2614
2647
|
let href = to;
|
|
2615
2648
|
if (!isAbsolute && shop && !to.startsWith("/")) {
|
|
2616
2649
|
href = `/${to}`;
|
|
2617
2650
|
}
|
|
2618
|
-
|
|
2651
|
+
const handleClick = (e) => {
|
|
2652
|
+
onClick?.(e);
|
|
2653
|
+
if (e.defaultPrevented) return;
|
|
2654
|
+
if (e.button !== 0) return;
|
|
2655
|
+
if (e.metaKey || e.ctrlKey || e.shiftKey || e.altKey) return;
|
|
2656
|
+
if (rest.target && rest.target !== "_self") return;
|
|
2657
|
+
if (rest.download !== void 0) return;
|
|
2658
|
+
if (isAbsolute) return;
|
|
2659
|
+
if (to.startsWith("#") || href.startsWith("#")) return;
|
|
2660
|
+
if (requestNavigate(href)) e.preventDefault();
|
|
2661
|
+
};
|
|
2662
|
+
return /* @__PURE__ */ jsx("a", { href, onClick: handleClick, ...rest, children });
|
|
2619
2663
|
}
|
|
2620
2664
|
function AddToCartButton({
|
|
2621
2665
|
product,
|
|
2622
2666
|
variant,
|
|
2623
2667
|
quantity = 1,
|
|
2668
|
+
selectedOptions,
|
|
2624
2669
|
label = "Add to cart",
|
|
2625
2670
|
loadingLabel = "Adding\u2026",
|
|
2626
2671
|
soldOutLabel = "Sold out",
|
|
@@ -2647,7 +2692,7 @@ function AddToCartButton({
|
|
|
2647
2692
|
if (state === "adding") return;
|
|
2648
2693
|
setState("adding");
|
|
2649
2694
|
try {
|
|
2650
|
-
await addItem(product.id, variant?.id, quantity);
|
|
2695
|
+
await addItem(product.id, variant?.id, quantity, selectedOptions);
|
|
2651
2696
|
setState("idle");
|
|
2652
2697
|
onAdded?.(product, variant);
|
|
2653
2698
|
} catch {
|
|
@@ -3744,6 +3789,6 @@ function buildLocaleBundle(modules) {
|
|
|
3744
3789
|
return bundle;
|
|
3745
3790
|
}
|
|
3746
3791
|
|
|
3747
|
-
export { AddToCartButton, Block, CollectionCard, CollectionProvider, CurrencySwitcher, EditableImage, EditableText, Form, HeroMedia, ICON_NAMES, Icon, IconMap, Image, LOGO_SHAPE_OPTIONS, LOGO_SIZE_OPTIONS, Link, LocaleSwitcher, Logo, MAX_BLOCK_DEPTH, Money, NuMuProvider, ProductCard, ProductProvider, RichText, Section, SectionContext, applyGlobalStyleTokens, applyImageTransform, asImageTransform, assetUrl, availableValues, buildLocaleBundle, buildThemeElement, clearSdkSingleton, collectBlocks, collectSections, computeGlobalStyleTokens, defaultVariant, defineBlock, defineSection, defineThemeEntry, dynamicSource, findVariantByOptions, flattenMessages, focalSrc, getReactSingleton, getSdkSingleton, isDefinedBlock, isDefinedSection, isDynamicSource, isSdkAvailable, logoImgStyle, logoStyleTokens, mountTheme, pickTranslations, registerReactSingleton, registerSdkSingleton, resolveDynamicValue, resolveFontStack, resolveSettingsMap, resolveSizeChart, resolveSourcePath, sanitizeHtml, useAnalytics, useApp, useCachedResource, useCart, useCheckout, useCollection, useCollectionOptional, useCurrency, useCurrentTemplate, useCustomerActions, useCustomerAddresses, useGiftCardBalance, useImage, useMoney, useNavigation, useOrder, useOrders, useProduct, useProductOptional, useProductSizeChart, useRelatedProducts, useReorder, useResolvedSettings, useSearch, useSection, useSectionGroup, useSectionOptional, useShippingRates, useVariantSelection, useWishlist };
|
|
3792
|
+
export { AddToCartButton, Block, CollectionCard, CollectionProvider, CurrencySwitcher, EditableImage, EditableText, Form, HeroMedia, ICON_NAMES, Icon, IconMap, Image, LOGO_SHAPE_OPTIONS, LOGO_SIZE_OPTIONS, Link, LocaleSwitcher, Logo, MAX_BLOCK_DEPTH, Money, NAVIGATE_EVENT, NuMuProvider, ProductCard, ProductProvider, RichText, Section, SectionContext, applyGlobalStyleTokens, applyImageTransform, asImageTransform, assetUrl, availableValues, buildLocaleBundle, buildThemeElement, clearSdkSingleton, collectBlocks, collectSections, computeGlobalStyleTokens, defaultVariant, defineBlock, defineSection, defineThemeEntry, dynamicSource, findVariantByOptions, flattenMessages, focalSrc, getReactSingleton, getSdkSingleton, isDefinedBlock, isDefinedSection, isDynamicSource, isSdkAvailable, logoImgStyle, logoStyleTokens, mountTheme, pickTranslations, publishVariantSelection, readVariantSelection, registerReactSingleton, registerSdkSingleton, requestNavigate, resolveDynamicValue, resolveFontStack, resolveSettingsMap, resolveSizeChart, resolveSourcePath, sanitizeHtml, useAnalytics, useApp, useCachedResource, useCart, useCheckout, useCollection, useCollectionOptional, useCurrency, useCurrentTemplate, useCustomerActions, useCustomerAddresses, useGiftCardBalance, useImage, useMoney, useNavigation, useOrder, useOrders, useProduct, useProductOptional, useProductSizeChart, useRelatedProducts, useReorder, useResolvedSettings, useSearch, useSection, useSectionGroup, useSectionOptional, useShippingRates, useVariantSelection, useWishlist };
|
|
3748
3793
|
//# sourceMappingURL=index.mjs.map
|
|
3749
3794
|
//# sourceMappingURL=index.mjs.map
|