@lime-bundles/react 6.0.0 → 6.2.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/README.md +7 -1
- package/dist/index.cjs +688 -518
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +22 -3
- package/dist/index.d.ts +22 -3
- package/dist/index.js +633 -461
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1901 -0
- package/docs/css-variables.md +7 -1
- package/docs/hydrogen.md +29 -4
- package/docs/react-nextjs.md +24 -4
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { CartLineInput, BuyerResolver, ProductVariant, ParsedBundle, OutOfStockBehavior
|
|
2
|
+
import { CartLineInput, BuyerResolver, WidgetConfig, ProductVariant, ParsedBundle, OutOfStockBehavior } from '@lime-bundles/core';
|
|
3
3
|
export { BUNDLES_FOR_PRODUCT_QUERY, BUNDLE_METAOBJECT_QUERY, BogoBundleData, BundleParseError, BundleType, CartLineInput, CountdownConfig, CtaConfig, DEFAULT_OUT_OF_STOCK_BEHAVIOR, DiscountConfig, FixedBundleData, FixedBundlePricing, HeaderConfig, ImageTransform, LayoutConfig, MixMatchBundleData, MultiStepBundleData, OutOfStockBehavior, ParsedBundle, ParsedMultiStep, PopularBadgeConfig, PricingConfig, PricingRow, Product, ProductListConfig, ProductVariant, SHOP_SETTINGS_QUERY, SavingsBarConfig, StorefrontApiError, ThumbnailRatio, VolumeBundleData, VolumeTier, WIDGET_CONFIG_DEFAULTS, WidgetConfig, applyWidgetConfigVars, calculateDiscount, calculateTierSavings, computeBundleSaleCents, computeFixedPricing, createStorefrontClient, fetchBundlesForProduct, formatCents, formatCountdown, formatMoney, formatUnitPrice, getActiveTier, injectCustomCss, mergeWidgetConfig, observeImpression, parseCents, parseMetaobjectBundle, parseMetaobjectBundleStrict, parseOutOfStockBehavior, percentageDiscountUnit, productsForStep, reportAddToCart, reportImpression, sanitizeCustomCss, stepHeadroom, thumbnailRatioVars, transformImageUrl, validateQuantity } from '@lime-bundles/core';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -55,7 +55,26 @@ interface BundleComponentProps {
|
|
|
55
55
|
|
|
56
56
|
declare function FixedBundle(props: BundleComponentProps): react_jsx_runtime.JSX.Element | null;
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
interface MixMatchBundleProps extends BundleComponentProps {
|
|
59
|
+
/**
|
|
60
|
+
* Handle of the product page this component is rendered on, when there is
|
|
61
|
+
* one. Enables the theme widget's courtesy seed: with no required products,
|
|
62
|
+
* the bundle starts with this product (or the first that qualifies)
|
|
63
|
+
* pre-added at its rule minimum. Omit on non-product pages to start empty.
|
|
64
|
+
*/
|
|
65
|
+
productHandle?: string | null;
|
|
66
|
+
}
|
|
67
|
+
declare function MixMatchBundle(props: MixMatchBundleProps): react_jsx_runtime.JSX.Element | null;
|
|
68
|
+
|
|
69
|
+
interface BundleCountdownProps {
|
|
70
|
+
/** The bundle's ISO end date; renders nothing when null. */
|
|
71
|
+
endsAt: string | null | undefined;
|
|
72
|
+
/** The bundle's widget config — gates on `countdown.showCountdown`. */
|
|
73
|
+
widgetConfig: WidgetConfig | undefined;
|
|
74
|
+
/** Label text; defaults to the theme's translation default. */
|
|
75
|
+
label?: string;
|
|
76
|
+
}
|
|
77
|
+
declare function BundleCountdown({ endsAt, widgetConfig, label, }: BundleCountdownProps): react_jsx_runtime.JSX.Element | null;
|
|
59
78
|
|
|
60
79
|
declare function VolumeBundle(props: BundleComponentProps): react_jsx_runtime.JSX.Element | null;
|
|
61
80
|
|
|
@@ -285,4 +304,4 @@ declare function useAnalytics(options: UseAnalyticsOptions): {
|
|
|
285
304
|
|
|
286
305
|
declare function useWidgetConfigVars(config: WidgetConfig | null | undefined): (el: HTMLElement | null) => void;
|
|
287
306
|
|
|
288
|
-
export { BogoBundle, type BundleComponentProps, type FetchBundleDataOptions, type FetchShopCustomCssOptions, type FetchShopSettingsOptions, FixedBundle, MixMatchBundle, MultiStepBundle, type ShopSettings, type UseBundleDataOptions, type UseBundleDataResult, type UseBundlesForProductOptions, type UseBundlesForProductResult, type UseShopSettingsOptions, type UseShopSettingsResult, type UseVariantSelectionOptions, type UseVariantSelectionResult, VariantDropdown, type VariantDropdownOption, type VariantDropdownProps, VolumeBundle, fetchBundleData, fetchShopCustomCss, fetchShopSettings, fetchShopSettingsOrDefault, useAnalytics, useBundleData, useBundlesForProduct, useShopSettings, useVariantSelection, useWidgetConfigVars };
|
|
307
|
+
export { BogoBundle, type BundleComponentProps, BundleCountdown, type BundleCountdownProps, type FetchBundleDataOptions, type FetchShopCustomCssOptions, type FetchShopSettingsOptions, FixedBundle, MixMatchBundle, type MixMatchBundleProps, MultiStepBundle, type ShopSettings, type UseBundleDataOptions, type UseBundleDataResult, type UseBundlesForProductOptions, type UseBundlesForProductResult, type UseShopSettingsOptions, type UseShopSettingsResult, type UseVariantSelectionOptions, type UseVariantSelectionResult, VariantDropdown, type VariantDropdownOption, type VariantDropdownProps, VolumeBundle, fetchBundleData, fetchShopCustomCss, fetchShopSettings, fetchShopSettingsOrDefault, useAnalytics, useBundleData, useBundlesForProduct, useShopSettings, useVariantSelection, useWidgetConfigVars };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { CartLineInput, BuyerResolver, ProductVariant, ParsedBundle, OutOfStockBehavior
|
|
2
|
+
import { CartLineInput, BuyerResolver, WidgetConfig, ProductVariant, ParsedBundle, OutOfStockBehavior } from '@lime-bundles/core';
|
|
3
3
|
export { BUNDLES_FOR_PRODUCT_QUERY, BUNDLE_METAOBJECT_QUERY, BogoBundleData, BundleParseError, BundleType, CartLineInput, CountdownConfig, CtaConfig, DEFAULT_OUT_OF_STOCK_BEHAVIOR, DiscountConfig, FixedBundleData, FixedBundlePricing, HeaderConfig, ImageTransform, LayoutConfig, MixMatchBundleData, MultiStepBundleData, OutOfStockBehavior, ParsedBundle, ParsedMultiStep, PopularBadgeConfig, PricingConfig, PricingRow, Product, ProductListConfig, ProductVariant, SHOP_SETTINGS_QUERY, SavingsBarConfig, StorefrontApiError, ThumbnailRatio, VolumeBundleData, VolumeTier, WIDGET_CONFIG_DEFAULTS, WidgetConfig, applyWidgetConfigVars, calculateDiscount, calculateTierSavings, computeBundleSaleCents, computeFixedPricing, createStorefrontClient, fetchBundlesForProduct, formatCents, formatCountdown, formatMoney, formatUnitPrice, getActiveTier, injectCustomCss, mergeWidgetConfig, observeImpression, parseCents, parseMetaobjectBundle, parseMetaobjectBundleStrict, parseOutOfStockBehavior, percentageDiscountUnit, productsForStep, reportAddToCart, reportImpression, sanitizeCustomCss, stepHeadroom, thumbnailRatioVars, transformImageUrl, validateQuantity } from '@lime-bundles/core';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -55,7 +55,26 @@ interface BundleComponentProps {
|
|
|
55
55
|
|
|
56
56
|
declare function FixedBundle(props: BundleComponentProps): react_jsx_runtime.JSX.Element | null;
|
|
57
57
|
|
|
58
|
-
|
|
58
|
+
interface MixMatchBundleProps extends BundleComponentProps {
|
|
59
|
+
/**
|
|
60
|
+
* Handle of the product page this component is rendered on, when there is
|
|
61
|
+
* one. Enables the theme widget's courtesy seed: with no required products,
|
|
62
|
+
* the bundle starts with this product (or the first that qualifies)
|
|
63
|
+
* pre-added at its rule minimum. Omit on non-product pages to start empty.
|
|
64
|
+
*/
|
|
65
|
+
productHandle?: string | null;
|
|
66
|
+
}
|
|
67
|
+
declare function MixMatchBundle(props: MixMatchBundleProps): react_jsx_runtime.JSX.Element | null;
|
|
68
|
+
|
|
69
|
+
interface BundleCountdownProps {
|
|
70
|
+
/** The bundle's ISO end date; renders nothing when null. */
|
|
71
|
+
endsAt: string | null | undefined;
|
|
72
|
+
/** The bundle's widget config — gates on `countdown.showCountdown`. */
|
|
73
|
+
widgetConfig: WidgetConfig | undefined;
|
|
74
|
+
/** Label text; defaults to the theme's translation default. */
|
|
75
|
+
label?: string;
|
|
76
|
+
}
|
|
77
|
+
declare function BundleCountdown({ endsAt, widgetConfig, label, }: BundleCountdownProps): react_jsx_runtime.JSX.Element | null;
|
|
59
78
|
|
|
60
79
|
declare function VolumeBundle(props: BundleComponentProps): react_jsx_runtime.JSX.Element | null;
|
|
61
80
|
|
|
@@ -285,4 +304,4 @@ declare function useAnalytics(options: UseAnalyticsOptions): {
|
|
|
285
304
|
|
|
286
305
|
declare function useWidgetConfigVars(config: WidgetConfig | null | undefined): (el: HTMLElement | null) => void;
|
|
287
306
|
|
|
288
|
-
export { BogoBundle, type BundleComponentProps, type FetchBundleDataOptions, type FetchShopCustomCssOptions, type FetchShopSettingsOptions, FixedBundle, MixMatchBundle, MultiStepBundle, type ShopSettings, type UseBundleDataOptions, type UseBundleDataResult, type UseBundlesForProductOptions, type UseBundlesForProductResult, type UseShopSettingsOptions, type UseShopSettingsResult, type UseVariantSelectionOptions, type UseVariantSelectionResult, VariantDropdown, type VariantDropdownOption, type VariantDropdownProps, VolumeBundle, fetchBundleData, fetchShopCustomCss, fetchShopSettings, fetchShopSettingsOrDefault, useAnalytics, useBundleData, useBundlesForProduct, useShopSettings, useVariantSelection, useWidgetConfigVars };
|
|
307
|
+
export { BogoBundle, type BundleComponentProps, BundleCountdown, type BundleCountdownProps, type FetchBundleDataOptions, type FetchShopCustomCssOptions, type FetchShopSettingsOptions, FixedBundle, MixMatchBundle, type MixMatchBundleProps, MultiStepBundle, type ShopSettings, type UseBundleDataOptions, type UseBundleDataResult, type UseBundlesForProductOptions, type UseBundlesForProductResult, type UseShopSettingsOptions, type UseShopSettingsResult, type UseVariantSelectionOptions, type UseVariantSelectionResult, VariantDropdown, type VariantDropdownOption, type VariantDropdownProps, VolumeBundle, fetchBundleData, fetchShopCustomCss, fetchShopSettings, fetchShopSettingsOrDefault, useAnalytics, useBundleData, useBundlesForProduct, useShopSettings, useVariantSelection, useWidgetConfigVars };
|