@reblu/site-blocks 0.11.0 → 0.12.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/CHANGELOG.md +11 -0
- package/README.md +24 -0
- package/dist/index.cjs +281 -249
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +21 -1
- package/dist/index.d.ts +21 -1
- package/dist/index.js +280 -249
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.d.cts
CHANGED
|
@@ -285,6 +285,26 @@ interface ParentPageProps {
|
|
|
285
285
|
}
|
|
286
286
|
declare function ParentPage({ page, childPages, childPageHref, childPagesLabel, treatments, treatmentHref, treatmentsLabel, className, }: ParentPageProps): react_jsx_runtime.JSX.Element;
|
|
287
287
|
|
|
288
|
+
/**
|
|
289
|
+
* `PageCardGrid` — a linked grid of page cards (cover image, title, excerpt)
|
|
290
|
+
* over any `PageListItem[]`, in the order given. Token-driven, RSC-safe.
|
|
291
|
+
*
|
|
292
|
+
* REB-869: extracted from `ParentPage`'s child-pages grid (same markup) so a
|
|
293
|
+
* SITE can drop it in anywhere — typically a landing teaser over
|
|
294
|
+
* `client.pages.featured(category)`, which returns the category's featured
|
|
295
|
+
* pages in the tenant's order, or its first pages when none are featured.
|
|
296
|
+
* Renders nothing for an empty list.
|
|
297
|
+
*/
|
|
298
|
+
interface PageCardGridProps {
|
|
299
|
+
pages: PageListItem[];
|
|
300
|
+
/** Builds a card's href from its page. Defaults to `/{slug}`. */
|
|
301
|
+
pageHref?: (page: PageListItem) => string;
|
|
302
|
+
/** Optional `<h2>` above the grid. */
|
|
303
|
+
heading?: string;
|
|
304
|
+
className?: string;
|
|
305
|
+
}
|
|
306
|
+
declare function PageCardGrid(props: PageCardGridProps): react_jsx_runtime.JSX.Element;
|
|
307
|
+
|
|
288
308
|
/**
|
|
289
309
|
* @deprecated Renamed to `ParentPage` (REB-853) — the SDK is niche-agnostic.
|
|
290
310
|
* Removed in the next major, not before 2027-03-31.
|
|
@@ -905,4 +925,4 @@ interface OrderConfirmationProps {
|
|
|
905
925
|
}
|
|
906
926
|
declare function OrderConfirmation({ status, order, sessionId, cartHref, onRecheck, labels, currencyCode, locale, className, }: OrderConfirmationProps): react_jsx_runtime.JSX.Element;
|
|
907
927
|
|
|
908
|
-
export { ALLOWED_YOUTUBE_HOSTS, AddedToCartToast, type AddedToCartToastLabels, type AddedToCartToastProps, type AddedToCartToastStatus, type BlockRendererProps, type CanonicalBlockType, type CartLineItemView, CartLineList, type CartLineListLabels, type CartLineListProps, CartSummary, type CartSummaryLabels, type CartSummaryProps, type CheckoutAppliedDiscount, type CheckoutContactErrors, type CheckoutContactValues, CheckoutForm, type CheckoutFormLabels, type CheckoutFormProps, CheckoutLoginPrompt, type CheckoutLoginPromptLabels, type CheckoutLoginPromptProps, DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE, DEFAULT_SHOP_ERROR_MESSAGES, DEFAULT_SHOP_PRICE_BANDS, DEFAULT_TRUST_ICONS, FaqAccordion, type FaqAccordionProps, FaqItem, type HeadingLevel, MarkdownRenderer, type MarkdownRendererProps, OrderConfirmation, type OrderConfirmationLabels, type OrderConfirmationOrder, type OrderConfirmationProps, type OrderConfirmationStatus, PageBlocks, type PageBlocksComponents, type PageBlocksProps, ParentPage, type ParentPageProps, ProductCard, type ProductCardProps, ProductTrustItems, type ProductTrustItemsProps, ProfileCard, type ProfileCardProps, type RenderableBlock, SafeHtml, type SafeHtmlProps, type ShareUrls, type ShopFilterPriceBand, ShopFilters, type ShopFiltersActive, type ShopFiltersHrefs, type ShopFiltersLabels, type ShopFiltersProps, Specialty, type SpecialtyProps, Treatment, type TreatmentProps, type TrustIconComponent, type TrustIconProps, buildShareUrls, formatPrice, getShopErrorMessage, isAllowedYouTubeHost, markdownToSafeHtml, readingTime, sanitizeHtml, shouldRenderShopFilters };
|
|
928
|
+
export { ALLOWED_YOUTUBE_HOSTS, AddedToCartToast, type AddedToCartToastLabels, type AddedToCartToastProps, type AddedToCartToastStatus, type BlockRendererProps, type CanonicalBlockType, type CartLineItemView, CartLineList, type CartLineListLabels, type CartLineListProps, CartSummary, type CartSummaryLabels, type CartSummaryProps, type CheckoutAppliedDiscount, type CheckoutContactErrors, type CheckoutContactValues, CheckoutForm, type CheckoutFormLabels, type CheckoutFormProps, CheckoutLoginPrompt, type CheckoutLoginPromptLabels, type CheckoutLoginPromptProps, DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE, DEFAULT_SHOP_ERROR_MESSAGES, DEFAULT_SHOP_PRICE_BANDS, DEFAULT_TRUST_ICONS, FaqAccordion, type FaqAccordionProps, FaqItem, type HeadingLevel, MarkdownRenderer, type MarkdownRendererProps, OrderConfirmation, type OrderConfirmationLabels, type OrderConfirmationOrder, type OrderConfirmationProps, type OrderConfirmationStatus, PageBlocks, type PageBlocksComponents, type PageBlocksProps, PageCardGrid, type PageCardGridProps, ParentPage, type ParentPageProps, ProductCard, type ProductCardProps, ProductTrustItems, type ProductTrustItemsProps, ProfileCard, type ProfileCardProps, type RenderableBlock, SafeHtml, type SafeHtmlProps, type ShareUrls, type ShopFilterPriceBand, ShopFilters, type ShopFiltersActive, type ShopFiltersHrefs, type ShopFiltersLabels, type ShopFiltersProps, Specialty, type SpecialtyProps, Treatment, type TreatmentProps, type TrustIconComponent, type TrustIconProps, buildShareUrls, formatPrice, getShopErrorMessage, isAllowedYouTubeHost, markdownToSafeHtml, readingTime, sanitizeHtml, shouldRenderShopFilters };
|
package/dist/index.d.ts
CHANGED
|
@@ -285,6 +285,26 @@ interface ParentPageProps {
|
|
|
285
285
|
}
|
|
286
286
|
declare function ParentPage({ page, childPages, childPageHref, childPagesLabel, treatments, treatmentHref, treatmentsLabel, className, }: ParentPageProps): react_jsx_runtime.JSX.Element;
|
|
287
287
|
|
|
288
|
+
/**
|
|
289
|
+
* `PageCardGrid` — a linked grid of page cards (cover image, title, excerpt)
|
|
290
|
+
* over any `PageListItem[]`, in the order given. Token-driven, RSC-safe.
|
|
291
|
+
*
|
|
292
|
+
* REB-869: extracted from `ParentPage`'s child-pages grid (same markup) so a
|
|
293
|
+
* SITE can drop it in anywhere — typically a landing teaser over
|
|
294
|
+
* `client.pages.featured(category)`, which returns the category's featured
|
|
295
|
+
* pages in the tenant's order, or its first pages when none are featured.
|
|
296
|
+
* Renders nothing for an empty list.
|
|
297
|
+
*/
|
|
298
|
+
interface PageCardGridProps {
|
|
299
|
+
pages: PageListItem[];
|
|
300
|
+
/** Builds a card's href from its page. Defaults to `/{slug}`. */
|
|
301
|
+
pageHref?: (page: PageListItem) => string;
|
|
302
|
+
/** Optional `<h2>` above the grid. */
|
|
303
|
+
heading?: string;
|
|
304
|
+
className?: string;
|
|
305
|
+
}
|
|
306
|
+
declare function PageCardGrid(props: PageCardGridProps): react_jsx_runtime.JSX.Element;
|
|
307
|
+
|
|
288
308
|
/**
|
|
289
309
|
* @deprecated Renamed to `ParentPage` (REB-853) — the SDK is niche-agnostic.
|
|
290
310
|
* Removed in the next major, not before 2027-03-31.
|
|
@@ -905,4 +925,4 @@ interface OrderConfirmationProps {
|
|
|
905
925
|
}
|
|
906
926
|
declare function OrderConfirmation({ status, order, sessionId, cartHref, onRecheck, labels, currencyCode, locale, className, }: OrderConfirmationProps): react_jsx_runtime.JSX.Element;
|
|
907
927
|
|
|
908
|
-
export { ALLOWED_YOUTUBE_HOSTS, AddedToCartToast, type AddedToCartToastLabels, type AddedToCartToastProps, type AddedToCartToastStatus, type BlockRendererProps, type CanonicalBlockType, type CartLineItemView, CartLineList, type CartLineListLabels, type CartLineListProps, CartSummary, type CartSummaryLabels, type CartSummaryProps, type CheckoutAppliedDiscount, type CheckoutContactErrors, type CheckoutContactValues, CheckoutForm, type CheckoutFormLabels, type CheckoutFormProps, CheckoutLoginPrompt, type CheckoutLoginPromptLabels, type CheckoutLoginPromptProps, DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE, DEFAULT_SHOP_ERROR_MESSAGES, DEFAULT_SHOP_PRICE_BANDS, DEFAULT_TRUST_ICONS, FaqAccordion, type FaqAccordionProps, FaqItem, type HeadingLevel, MarkdownRenderer, type MarkdownRendererProps, OrderConfirmation, type OrderConfirmationLabels, type OrderConfirmationOrder, type OrderConfirmationProps, type OrderConfirmationStatus, PageBlocks, type PageBlocksComponents, type PageBlocksProps, ParentPage, type ParentPageProps, ProductCard, type ProductCardProps, ProductTrustItems, type ProductTrustItemsProps, ProfileCard, type ProfileCardProps, type RenderableBlock, SafeHtml, type SafeHtmlProps, type ShareUrls, type ShopFilterPriceBand, ShopFilters, type ShopFiltersActive, type ShopFiltersHrefs, type ShopFiltersLabels, type ShopFiltersProps, Specialty, type SpecialtyProps, Treatment, type TreatmentProps, type TrustIconComponent, type TrustIconProps, buildShareUrls, formatPrice, getShopErrorMessage, isAllowedYouTubeHost, markdownToSafeHtml, readingTime, sanitizeHtml, shouldRenderShopFilters };
|
|
928
|
+
export { ALLOWED_YOUTUBE_HOSTS, AddedToCartToast, type AddedToCartToastLabels, type AddedToCartToastProps, type AddedToCartToastStatus, type BlockRendererProps, type CanonicalBlockType, type CartLineItemView, CartLineList, type CartLineListLabels, type CartLineListProps, CartSummary, type CartSummaryLabels, type CartSummaryProps, type CheckoutAppliedDiscount, type CheckoutContactErrors, type CheckoutContactValues, CheckoutForm, type CheckoutFormLabels, type CheckoutFormProps, CheckoutLoginPrompt, type CheckoutLoginPromptLabels, type CheckoutLoginPromptProps, DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE, DEFAULT_SHOP_ERROR_MESSAGES, DEFAULT_SHOP_PRICE_BANDS, DEFAULT_TRUST_ICONS, FaqAccordion, type FaqAccordionProps, FaqItem, type HeadingLevel, MarkdownRenderer, type MarkdownRendererProps, OrderConfirmation, type OrderConfirmationLabels, type OrderConfirmationOrder, type OrderConfirmationProps, type OrderConfirmationStatus, PageBlocks, type PageBlocksComponents, type PageBlocksProps, PageCardGrid, type PageCardGridProps, ParentPage, type ParentPageProps, ProductCard, type ProductCardProps, ProductTrustItems, type ProductTrustItemsProps, ProfileCard, type ProfileCardProps, type RenderableBlock, SafeHtml, type SafeHtmlProps, type ShareUrls, type ShopFilterPriceBand, ShopFilters, type ShopFiltersActive, type ShopFiltersHrefs, type ShopFiltersLabels, type ShopFiltersProps, Specialty, type SpecialtyProps, Treatment, type TreatmentProps, type TrustIconComponent, type TrustIconProps, buildShareUrls, formatPrice, getShopErrorMessage, isAllowedYouTubeHost, markdownToSafeHtml, readingTime, sanitizeHtml, shouldRenderShopFilters };
|