@reblu/site-blocks 0.13.0 → 0.15.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/index.d.cts CHANGED
@@ -1,8 +1,8 @@
1
- import { ShopErrorCode, PageDetail, PageListItem, ShopProductListItem, ShopProductTrustIcon, ShopProductTrustItem, BlockType, PageBlock, ResolvedEmbed, ShopFacets, ShopOrder, ShopBillingInput, ShopCheckoutInput, ShopOrderInvoice } from '@reblu/site-contracts';
1
+ import { ShopErrorCode, PageDetail, PageListItem, ShopProductListItem, ShopProductTrustIcon, ShopProductTrustItem, TrustBadgeType, TrustBadge, BlockType, PageBlock, ResolvedEmbed, ShopFacets, ShopOrder, ShopBillingInput, ShopCheckoutInput, ShopOrderInvoice } from '@reblu/site-contracts';
2
2
  import { FaqItem } from './seo.cjs';
3
- export { FaqPageJsonLd, buildFaqPageJsonLd, collectFaqItems } from './seo.cjs';
3
+ export { FaqPageJsonLd, MarkdownToPlainTextOptions, buildFaqPageJsonLd, collectFaqItems, markdownToPlainText } from './seo.cjs';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
- import { ComponentType, ReactNode, FormEvent } from 'react';
5
+ import { ReactNode, ComponentType, FormEvent } from 'react';
6
6
 
7
7
  declare function readingTime(content: string | null | undefined): number | null;
8
8
 
@@ -240,6 +240,56 @@ interface SafeHtmlProps {
240
240
  }
241
241
  declare function SafeHtml({ html, className, headingOffset }: SafeHtmlProps): react_jsx_runtime.JSX.Element | null;
242
242
 
243
+ /** A heading level a caller can configure — `h1`…`h6`. */
244
+ type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
245
+
246
+ /**
247
+ * `CourseDescription` — the drop-in for `AcademyCourseDetail.description`
248
+ * (`client.academy.bySlug()`), REB-879. The description is rich-text Markdown
249
+ * written in nexus with the shared editor: headings, GFM tables, images.
250
+ *
251
+ * Server Component, RSC-safe: no hooks, no state, no `'use client'`.
252
+ *
253
+ * Semantics:
254
+ * - The Markdown goes through the same pipeline as {@link MarkdownRenderer}
255
+ * (`marked` → hast-util-sanitize → token-driven component map). It is never
256
+ * rendered as raw HTML: `<script>`, event handlers, `javascript:` links and
257
+ * non-allowlisted iframes are dropped.
258
+ * - `null`, `undefined`, blank text, or content the sanitiser empties render
259
+ * NOTHING — not even the heading. No default copy is ever invented.
260
+ * - `heading` is the SITE's own section title (its language, its words). When
261
+ * given, the block is a `<section>` labelled by it, and the description's own
262
+ * headings are demoted under it (`##` → one level below `headingLevel`).
263
+ */
264
+ interface CourseDescriptionProps {
265
+ /** `AcademyCourseDetail.description` as served — may be `null` / `undefined`. */
266
+ description: string | null | undefined;
267
+ /** Optional section heading, e.g. «Sobre el curso». Omit to render the description alone. */
268
+ heading?: ReactNode;
269
+ /** Level of `heading`. Defaults to `2`. */
270
+ headingLevel?: HeadingLevel;
271
+ /** `id` of the heading element (the section's `aria-labelledby`). */
272
+ headingId?: string;
273
+ /**
274
+ * Levels added to the description's own headings. Defaults to `headingLevel - 1`
275
+ * with a `heading` (so its `##` sits one level below it) and `0` without one.
276
+ */
277
+ headingOffset?: number;
278
+ /** Classes for the outer element (added to its `space-y-3` layout). */
279
+ className?: string;
280
+ /**
281
+ * Classes for the heading. When given, they REPLACE the default
282
+ * `text-xl font-semibold` (REB-997) — pass the full typography you want.
283
+ */
284
+ headingClassName?: string;
285
+ /**
286
+ * Classes for the rendered Markdown body. When given, they REPLACE the
287
+ * default `text-muted-foreground` (REB-997).
288
+ */
289
+ contentClassName?: string;
290
+ }
291
+ declare function CourseDescription({ description, heading, headingLevel, headingId, headingOffset, className, headingClassName, contentClassName, }: CourseDescriptionProps): react_jsx_runtime.JSX.Element | null;
292
+
243
293
  /**
244
294
  * `Treatment` — full treatment page organism over a `PageDetail` (a SERVICE-type
245
295
  * page). Renders the hero band followed by the ordered content sections.
@@ -384,16 +434,17 @@ interface ProductTrustItemsProps {
384
434
  icons?: Partial<Record<ShopProductTrustIcon, TrustIconComponent>>;
385
435
  /** List element. Defaults to `ul`. */
386
436
  as?: 'ul' | 'ol';
387
- /** Classes for the list element. */
437
+ /** Classes for the list element (added to its `space-y-2.5` layout). */
388
438
  className?: string;
389
- /** Classes for each `<li>` row. */
439
+ /**
440
+ * Classes for each `<li>` row. When given, they REPLACE the default
441
+ * `text-sm text-muted-foreground` (REB-997); the row's `flex items-center
442
+ * gap-3` layout is kept.
443
+ */
390
444
  itemClassName?: string;
391
445
  }
392
446
  declare function ProductTrustItems({ items, icons, as: List, className, itemClassName, }: ProductTrustItemsProps): react_jsx_runtime.JSX.Element | null;
393
447
 
394
- /** A heading level a caller can configure — `h1`…`h6`. */
395
- type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
396
-
397
448
  /**
398
449
  * REB-850 — accessible FAQ list on native `<details>`/`<summary>`.
399
450
  *
@@ -422,6 +473,55 @@ interface FaqAccordionProps {
422
473
  }
423
474
  declare function FaqAccordion({ items, heading, headingLevel, questionHeadingLevel, defaultOpen, className, }: FaqAccordionProps): react_jsx_runtime.JSX.Element | null;
424
475
 
476
+ /**
477
+ * `TrustBadges` — the tenant's trust badges (partners, insurers, funding,
478
+ * certifications, awards) configured in nexus and served by
479
+ * `client.trustBadges.list()` (REB-996). Drop it in a footer or an "about"
480
+ * section; switching a badge off or letting its validity date pass in nexus
481
+ * removes it from the SITE on the next revalidation, with no deploy.
482
+ *
483
+ * Server Component, RSC-safe: no hooks, no state, no `'use client'`.
484
+ *
485
+ * Semantics — the API is the only source of claims:
486
+ * - `null`, `undefined`, a non-array or `[]` render NOTHING.
487
+ * - An entry with an unknown `type` or an empty name is skipped; if nothing
488
+ * survives, nothing is rendered.
489
+ * - Badges are grouped by type (in {@link DEFAULT_TRUST_BADGE_TYPE_ORDER}, or
490
+ * the `types` prop), each group under an overridable heading, and ordered by
491
+ * `sortOrder` inside it.
492
+ * - A logo is an `<img>` whose `alt` is the badge name; a badge without a logo
493
+ * shows its name as text.
494
+ * - `url` links only when it is http(s), in a new window with
495
+ * `rel="noopener noreferrer"` and a visually hidden new-window hint.
496
+ */
497
+ /** Default group heading per badge type. Override any of them with `headings`. */
498
+ declare const DEFAULT_TRUST_BADGE_HEADINGS: Readonly<Record<TrustBadgeType, string>>;
499
+ /** Default order of the groups. */
500
+ declare const DEFAULT_TRUST_BADGE_TYPE_ORDER: readonly TrustBadgeType[];
501
+ interface TrustBadgesProps {
502
+ /** `client.trustBadges.list()`'s `data` as served — may be `null` / `undefined`. */
503
+ badges: readonly TrustBadge[] | null | undefined;
504
+ /** Per-type heading overrides; `null` renders that group without a heading. */
505
+ headings?: Partial<Record<TrustBadgeType, string | null>>;
506
+ /** Which groups to render, in this order. Defaults to every type. */
507
+ types?: readonly TrustBadgeType[];
508
+ /** Heading level of each group title. Defaults to `2`. */
509
+ headingLevel?: HeadingLevel;
510
+ /** Visually hidden text appended to linked badges. */
511
+ newWindowLabel?: string;
512
+ /** Classes for the root element. */
513
+ className?: string;
514
+ /** Classes for each group. */
515
+ groupClassName?: string;
516
+ /** Classes for each group heading. */
517
+ headingClassName?: string;
518
+ /** Classes for each group's `<ul>`. */
519
+ listClassName?: string;
520
+ /** Classes for each logo `<img>`. */
521
+ logoClassName?: string;
522
+ }
523
+ declare function TrustBadges({ badges, headings, types, headingLevel, newWindowLabel, className, groupClassName, headingClassName, listClassName, logoClassName, }: TrustBadgesProps): react_jsx_runtime.JSX.Element | null;
524
+
425
525
  /**
426
526
  * REB-850 — `PageBlocks`: the shared renderer for a page's registry blocks
427
527
  * (`PageDetail.blocks`, REB-75), so a SITE stops hand-writing its own.
@@ -642,12 +742,18 @@ interface CartLineListProps {
642
742
  * `ReactNode` for custom content, or omit/`false` to render nothing.
643
743
  */
644
744
  notice?: boolean | React.ReactNode;
745
+ /**
746
+ * REB-981 — a message rendered under a line (e.g. its cart-validation
747
+ * error from `useCartValidation().getLineError(...)?.message`). Return
748
+ * `null`/`undefined` for lines without one.
749
+ */
750
+ lineMessage?: (item: CartLineItemView) => React.ReactNode;
645
751
  labels?: Partial<CartLineListLabels>;
646
752
  currencyCode?: string;
647
753
  locale?: string;
648
754
  className?: string;
649
755
  }
650
- declare function CartLineList({ items, onQuantityChange, onRemove, liveMessage, notice, labels, currencyCode, locale, className, }: CartLineListProps): react_jsx_runtime.JSX.Element;
756
+ declare function CartLineList({ items, onQuantityChange, onRemove, liveMessage, notice, lineMessage, labels, currencyCode, locale, className, }: CartLineListProps): react_jsx_runtime.JSX.Element;
651
757
 
652
758
  /**
653
759
  * `CartSummary` — presentational price breakdown (REB-829): subtotal,
@@ -699,6 +805,42 @@ interface CartSummaryProps {
699
805
  }
700
806
  declare function CartSummary({ subtotal, discount, discountCode, shipping, shippingEnabled, total, notice, labels, currencyCode, locale, className, }: CartSummaryProps): react_jsx_runtime.JSX.Element;
701
807
 
808
+ /**
809
+ * `CartAdjustmentsNotice` (REB-981) — tells the visitor what cart validation
810
+ * changed: lines removed because they can no longer be bought, quantities
811
+ * clamped to the stock left, and prices that changed since the line was
812
+ * added. Presentational only: feed it `@reblu/site-next/cart`'s
813
+ * `useCartValidation()` result (`removed`, `quantityChanges`,
814
+ * `priceChanges`) — every item shape is a structural subset of those.
815
+ * Renders nothing when there is nothing to report.
816
+ */
817
+ interface CartAdjustmentLine {
818
+ name: string;
819
+ variantName?: string;
820
+ }
821
+ interface CartAdjustmentsNoticeLabels {
822
+ /** `names` already include the variant, e.g. `Gel (200 ml)`. */
823
+ removed: (names: string[]) => string;
824
+ quantityChanged: (name: string, quantity: number) => string;
825
+ priceChanged: (name: string, from: string, to: string) => string;
826
+ }
827
+ interface CartAdjustmentsNoticeProps {
828
+ removed?: CartAdjustmentLine[];
829
+ quantityChanges?: Array<CartAdjustmentLine & {
830
+ to: number;
831
+ }>;
832
+ /** `from`/`to` in integer cents. */
833
+ priceChanges?: Array<CartAdjustmentLine & {
834
+ from: number;
835
+ to: number;
836
+ }>;
837
+ labels?: Partial<CartAdjustmentsNoticeLabels>;
838
+ currencyCode?: string;
839
+ locale?: string;
840
+ className?: string;
841
+ }
842
+ declare function CartAdjustmentsNotice({ removed, quantityChanges, priceChanges, labels, currencyCode, locale, className, }: CartAdjustmentsNoticeProps): react_jsx_runtime.JSX.Element | null;
843
+
702
844
  /**
703
845
  * `AddedToCartToast` — add-to-cart feedback toast CONTENT (REB-837). Pure
704
846
  * presentational, no hooks.
@@ -1061,4 +1203,4 @@ interface OrderInvoiceLinkProps {
1061
1203
  }
1062
1204
  declare function OrderInvoiceLink({ invoice, labels, className }: OrderInvoiceLinkProps): react_jsx_runtime.JSX.Element | null;
1063
1205
 
1064
- 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_INVOICE_COUNTRIES, DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE, DEFAULT_SHOP_ERROR_MESSAGES, DEFAULT_SHOP_PRICE_BANDS, DEFAULT_TRUST_ICONS, EMPTY_FULL_INVOICE_VALUE, FaqAccordion, type FaqAccordionProps, FaqItem, type FullInvoiceErrors, FullInvoiceFields, type FullInvoiceFieldsLabels, type FullInvoiceFieldsProps, type FullInvoiceIdType, type FullInvoiceValue, type HeadingLevel, MarkdownRenderer, type MarkdownRendererProps, OrderConfirmation, type OrderConfirmationLabels, type OrderConfirmationOrder, type OrderConfirmationProps, type OrderConfirmationStatus, OrderInvoiceLink, type OrderInvoiceLinkLabels, type OrderInvoiceLinkProps, 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, isOverSimplifiedInvoiceCap, markdownToSafeHtml, readingTime, sanitizeHtml, shopIssuesInvoices, shouldRenderShopFilters, toCheckoutInvoiceFields };
1206
+ export { ALLOWED_YOUTUBE_HOSTS, AddedToCartToast, type AddedToCartToastLabels, type AddedToCartToastProps, type AddedToCartToastStatus, type BlockRendererProps, type CanonicalBlockType, type CartAdjustmentLine, CartAdjustmentsNotice, type CartAdjustmentsNoticeLabels, type CartAdjustmentsNoticeProps, 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, CourseDescription, type CourseDescriptionProps, DEFAULT_INVOICE_COUNTRIES, DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE, DEFAULT_SHOP_ERROR_MESSAGES, DEFAULT_SHOP_PRICE_BANDS, DEFAULT_TRUST_BADGE_HEADINGS, DEFAULT_TRUST_BADGE_TYPE_ORDER, DEFAULT_TRUST_ICONS, EMPTY_FULL_INVOICE_VALUE, FaqAccordion, type FaqAccordionProps, FaqItem, type FullInvoiceErrors, FullInvoiceFields, type FullInvoiceFieldsLabels, type FullInvoiceFieldsProps, type FullInvoiceIdType, type FullInvoiceValue, type HeadingLevel, MarkdownRenderer, type MarkdownRendererProps, OrderConfirmation, type OrderConfirmationLabels, type OrderConfirmationOrder, type OrderConfirmationProps, type OrderConfirmationStatus, OrderInvoiceLink, type OrderInvoiceLinkLabels, type OrderInvoiceLinkProps, 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, TrustBadges, type TrustBadgesProps, type TrustIconComponent, type TrustIconProps, buildShareUrls, formatPrice, getShopErrorMessage, isAllowedYouTubeHost, isOverSimplifiedInvoiceCap, markdownToSafeHtml, readingTime, sanitizeHtml, shopIssuesInvoices, shouldRenderShopFilters, toCheckoutInvoiceFields };
package/dist/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { ShopErrorCode, PageDetail, PageListItem, ShopProductListItem, ShopProductTrustIcon, ShopProductTrustItem, BlockType, PageBlock, ResolvedEmbed, ShopFacets, ShopOrder, ShopBillingInput, ShopCheckoutInput, ShopOrderInvoice } from '@reblu/site-contracts';
1
+ import { ShopErrorCode, PageDetail, PageListItem, ShopProductListItem, ShopProductTrustIcon, ShopProductTrustItem, TrustBadgeType, TrustBadge, BlockType, PageBlock, ResolvedEmbed, ShopFacets, ShopOrder, ShopBillingInput, ShopCheckoutInput, ShopOrderInvoice } from '@reblu/site-contracts';
2
2
  import { FaqItem } from './seo.js';
3
- export { FaqPageJsonLd, buildFaqPageJsonLd, collectFaqItems } from './seo.js';
3
+ export { FaqPageJsonLd, MarkdownToPlainTextOptions, buildFaqPageJsonLd, collectFaqItems, markdownToPlainText } from './seo.js';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
- import { ComponentType, ReactNode, FormEvent } from 'react';
5
+ import { ReactNode, ComponentType, FormEvent } from 'react';
6
6
 
7
7
  declare function readingTime(content: string | null | undefined): number | null;
8
8
 
@@ -240,6 +240,56 @@ interface SafeHtmlProps {
240
240
  }
241
241
  declare function SafeHtml({ html, className, headingOffset }: SafeHtmlProps): react_jsx_runtime.JSX.Element | null;
242
242
 
243
+ /** A heading level a caller can configure — `h1`…`h6`. */
244
+ type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
245
+
246
+ /**
247
+ * `CourseDescription` — the drop-in for `AcademyCourseDetail.description`
248
+ * (`client.academy.bySlug()`), REB-879. The description is rich-text Markdown
249
+ * written in nexus with the shared editor: headings, GFM tables, images.
250
+ *
251
+ * Server Component, RSC-safe: no hooks, no state, no `'use client'`.
252
+ *
253
+ * Semantics:
254
+ * - The Markdown goes through the same pipeline as {@link MarkdownRenderer}
255
+ * (`marked` → hast-util-sanitize → token-driven component map). It is never
256
+ * rendered as raw HTML: `<script>`, event handlers, `javascript:` links and
257
+ * non-allowlisted iframes are dropped.
258
+ * - `null`, `undefined`, blank text, or content the sanitiser empties render
259
+ * NOTHING — not even the heading. No default copy is ever invented.
260
+ * - `heading` is the SITE's own section title (its language, its words). When
261
+ * given, the block is a `<section>` labelled by it, and the description's own
262
+ * headings are demoted under it (`##` → one level below `headingLevel`).
263
+ */
264
+ interface CourseDescriptionProps {
265
+ /** `AcademyCourseDetail.description` as served — may be `null` / `undefined`. */
266
+ description: string | null | undefined;
267
+ /** Optional section heading, e.g. «Sobre el curso». Omit to render the description alone. */
268
+ heading?: ReactNode;
269
+ /** Level of `heading`. Defaults to `2`. */
270
+ headingLevel?: HeadingLevel;
271
+ /** `id` of the heading element (the section's `aria-labelledby`). */
272
+ headingId?: string;
273
+ /**
274
+ * Levels added to the description's own headings. Defaults to `headingLevel - 1`
275
+ * with a `heading` (so its `##` sits one level below it) and `0` without one.
276
+ */
277
+ headingOffset?: number;
278
+ /** Classes for the outer element (added to its `space-y-3` layout). */
279
+ className?: string;
280
+ /**
281
+ * Classes for the heading. When given, they REPLACE the default
282
+ * `text-xl font-semibold` (REB-997) — pass the full typography you want.
283
+ */
284
+ headingClassName?: string;
285
+ /**
286
+ * Classes for the rendered Markdown body. When given, they REPLACE the
287
+ * default `text-muted-foreground` (REB-997).
288
+ */
289
+ contentClassName?: string;
290
+ }
291
+ declare function CourseDescription({ description, heading, headingLevel, headingId, headingOffset, className, headingClassName, contentClassName, }: CourseDescriptionProps): react_jsx_runtime.JSX.Element | null;
292
+
243
293
  /**
244
294
  * `Treatment` — full treatment page organism over a `PageDetail` (a SERVICE-type
245
295
  * page). Renders the hero band followed by the ordered content sections.
@@ -384,16 +434,17 @@ interface ProductTrustItemsProps {
384
434
  icons?: Partial<Record<ShopProductTrustIcon, TrustIconComponent>>;
385
435
  /** List element. Defaults to `ul`. */
386
436
  as?: 'ul' | 'ol';
387
- /** Classes for the list element. */
437
+ /** Classes for the list element (added to its `space-y-2.5` layout). */
388
438
  className?: string;
389
- /** Classes for each `<li>` row. */
439
+ /**
440
+ * Classes for each `<li>` row. When given, they REPLACE the default
441
+ * `text-sm text-muted-foreground` (REB-997); the row's `flex items-center
442
+ * gap-3` layout is kept.
443
+ */
390
444
  itemClassName?: string;
391
445
  }
392
446
  declare function ProductTrustItems({ items, icons, as: List, className, itemClassName, }: ProductTrustItemsProps): react_jsx_runtime.JSX.Element | null;
393
447
 
394
- /** A heading level a caller can configure — `h1`…`h6`. */
395
- type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
396
-
397
448
  /**
398
449
  * REB-850 — accessible FAQ list on native `<details>`/`<summary>`.
399
450
  *
@@ -422,6 +473,55 @@ interface FaqAccordionProps {
422
473
  }
423
474
  declare function FaqAccordion({ items, heading, headingLevel, questionHeadingLevel, defaultOpen, className, }: FaqAccordionProps): react_jsx_runtime.JSX.Element | null;
424
475
 
476
+ /**
477
+ * `TrustBadges` — the tenant's trust badges (partners, insurers, funding,
478
+ * certifications, awards) configured in nexus and served by
479
+ * `client.trustBadges.list()` (REB-996). Drop it in a footer or an "about"
480
+ * section; switching a badge off or letting its validity date pass in nexus
481
+ * removes it from the SITE on the next revalidation, with no deploy.
482
+ *
483
+ * Server Component, RSC-safe: no hooks, no state, no `'use client'`.
484
+ *
485
+ * Semantics — the API is the only source of claims:
486
+ * - `null`, `undefined`, a non-array or `[]` render NOTHING.
487
+ * - An entry with an unknown `type` or an empty name is skipped; if nothing
488
+ * survives, nothing is rendered.
489
+ * - Badges are grouped by type (in {@link DEFAULT_TRUST_BADGE_TYPE_ORDER}, or
490
+ * the `types` prop), each group under an overridable heading, and ordered by
491
+ * `sortOrder` inside it.
492
+ * - A logo is an `<img>` whose `alt` is the badge name; a badge without a logo
493
+ * shows its name as text.
494
+ * - `url` links only when it is http(s), in a new window with
495
+ * `rel="noopener noreferrer"` and a visually hidden new-window hint.
496
+ */
497
+ /** Default group heading per badge type. Override any of them with `headings`. */
498
+ declare const DEFAULT_TRUST_BADGE_HEADINGS: Readonly<Record<TrustBadgeType, string>>;
499
+ /** Default order of the groups. */
500
+ declare const DEFAULT_TRUST_BADGE_TYPE_ORDER: readonly TrustBadgeType[];
501
+ interface TrustBadgesProps {
502
+ /** `client.trustBadges.list()`'s `data` as served — may be `null` / `undefined`. */
503
+ badges: readonly TrustBadge[] | null | undefined;
504
+ /** Per-type heading overrides; `null` renders that group without a heading. */
505
+ headings?: Partial<Record<TrustBadgeType, string | null>>;
506
+ /** Which groups to render, in this order. Defaults to every type. */
507
+ types?: readonly TrustBadgeType[];
508
+ /** Heading level of each group title. Defaults to `2`. */
509
+ headingLevel?: HeadingLevel;
510
+ /** Visually hidden text appended to linked badges. */
511
+ newWindowLabel?: string;
512
+ /** Classes for the root element. */
513
+ className?: string;
514
+ /** Classes for each group. */
515
+ groupClassName?: string;
516
+ /** Classes for each group heading. */
517
+ headingClassName?: string;
518
+ /** Classes for each group's `<ul>`. */
519
+ listClassName?: string;
520
+ /** Classes for each logo `<img>`. */
521
+ logoClassName?: string;
522
+ }
523
+ declare function TrustBadges({ badges, headings, types, headingLevel, newWindowLabel, className, groupClassName, headingClassName, listClassName, logoClassName, }: TrustBadgesProps): react_jsx_runtime.JSX.Element | null;
524
+
425
525
  /**
426
526
  * REB-850 — `PageBlocks`: the shared renderer for a page's registry blocks
427
527
  * (`PageDetail.blocks`, REB-75), so a SITE stops hand-writing its own.
@@ -642,12 +742,18 @@ interface CartLineListProps {
642
742
  * `ReactNode` for custom content, or omit/`false` to render nothing.
643
743
  */
644
744
  notice?: boolean | React.ReactNode;
745
+ /**
746
+ * REB-981 — a message rendered under a line (e.g. its cart-validation
747
+ * error from `useCartValidation().getLineError(...)?.message`). Return
748
+ * `null`/`undefined` for lines without one.
749
+ */
750
+ lineMessage?: (item: CartLineItemView) => React.ReactNode;
645
751
  labels?: Partial<CartLineListLabels>;
646
752
  currencyCode?: string;
647
753
  locale?: string;
648
754
  className?: string;
649
755
  }
650
- declare function CartLineList({ items, onQuantityChange, onRemove, liveMessage, notice, labels, currencyCode, locale, className, }: CartLineListProps): react_jsx_runtime.JSX.Element;
756
+ declare function CartLineList({ items, onQuantityChange, onRemove, liveMessage, notice, lineMessage, labels, currencyCode, locale, className, }: CartLineListProps): react_jsx_runtime.JSX.Element;
651
757
 
652
758
  /**
653
759
  * `CartSummary` — presentational price breakdown (REB-829): subtotal,
@@ -699,6 +805,42 @@ interface CartSummaryProps {
699
805
  }
700
806
  declare function CartSummary({ subtotal, discount, discountCode, shipping, shippingEnabled, total, notice, labels, currencyCode, locale, className, }: CartSummaryProps): react_jsx_runtime.JSX.Element;
701
807
 
808
+ /**
809
+ * `CartAdjustmentsNotice` (REB-981) — tells the visitor what cart validation
810
+ * changed: lines removed because they can no longer be bought, quantities
811
+ * clamped to the stock left, and prices that changed since the line was
812
+ * added. Presentational only: feed it `@reblu/site-next/cart`'s
813
+ * `useCartValidation()` result (`removed`, `quantityChanges`,
814
+ * `priceChanges`) — every item shape is a structural subset of those.
815
+ * Renders nothing when there is nothing to report.
816
+ */
817
+ interface CartAdjustmentLine {
818
+ name: string;
819
+ variantName?: string;
820
+ }
821
+ interface CartAdjustmentsNoticeLabels {
822
+ /** `names` already include the variant, e.g. `Gel (200 ml)`. */
823
+ removed: (names: string[]) => string;
824
+ quantityChanged: (name: string, quantity: number) => string;
825
+ priceChanged: (name: string, from: string, to: string) => string;
826
+ }
827
+ interface CartAdjustmentsNoticeProps {
828
+ removed?: CartAdjustmentLine[];
829
+ quantityChanges?: Array<CartAdjustmentLine & {
830
+ to: number;
831
+ }>;
832
+ /** `from`/`to` in integer cents. */
833
+ priceChanges?: Array<CartAdjustmentLine & {
834
+ from: number;
835
+ to: number;
836
+ }>;
837
+ labels?: Partial<CartAdjustmentsNoticeLabels>;
838
+ currencyCode?: string;
839
+ locale?: string;
840
+ className?: string;
841
+ }
842
+ declare function CartAdjustmentsNotice({ removed, quantityChanges, priceChanges, labels, currencyCode, locale, className, }: CartAdjustmentsNoticeProps): react_jsx_runtime.JSX.Element | null;
843
+
702
844
  /**
703
845
  * `AddedToCartToast` — add-to-cart feedback toast CONTENT (REB-837). Pure
704
846
  * presentational, no hooks.
@@ -1061,4 +1203,4 @@ interface OrderInvoiceLinkProps {
1061
1203
  }
1062
1204
  declare function OrderInvoiceLink({ invoice, labels, className }: OrderInvoiceLinkProps): react_jsx_runtime.JSX.Element | null;
1063
1205
 
1064
- 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_INVOICE_COUNTRIES, DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE, DEFAULT_SHOP_ERROR_MESSAGES, DEFAULT_SHOP_PRICE_BANDS, DEFAULT_TRUST_ICONS, EMPTY_FULL_INVOICE_VALUE, FaqAccordion, type FaqAccordionProps, FaqItem, type FullInvoiceErrors, FullInvoiceFields, type FullInvoiceFieldsLabels, type FullInvoiceFieldsProps, type FullInvoiceIdType, type FullInvoiceValue, type HeadingLevel, MarkdownRenderer, type MarkdownRendererProps, OrderConfirmation, type OrderConfirmationLabels, type OrderConfirmationOrder, type OrderConfirmationProps, type OrderConfirmationStatus, OrderInvoiceLink, type OrderInvoiceLinkLabels, type OrderInvoiceLinkProps, 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, isOverSimplifiedInvoiceCap, markdownToSafeHtml, readingTime, sanitizeHtml, shopIssuesInvoices, shouldRenderShopFilters, toCheckoutInvoiceFields };
1206
+ export { ALLOWED_YOUTUBE_HOSTS, AddedToCartToast, type AddedToCartToastLabels, type AddedToCartToastProps, type AddedToCartToastStatus, type BlockRendererProps, type CanonicalBlockType, type CartAdjustmentLine, CartAdjustmentsNotice, type CartAdjustmentsNoticeLabels, type CartAdjustmentsNoticeProps, 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, CourseDescription, type CourseDescriptionProps, DEFAULT_INVOICE_COUNTRIES, DEFAULT_SHOP_ERROR_FALLBACK_MESSAGE, DEFAULT_SHOP_ERROR_MESSAGES, DEFAULT_SHOP_PRICE_BANDS, DEFAULT_TRUST_BADGE_HEADINGS, DEFAULT_TRUST_BADGE_TYPE_ORDER, DEFAULT_TRUST_ICONS, EMPTY_FULL_INVOICE_VALUE, FaqAccordion, type FaqAccordionProps, FaqItem, type FullInvoiceErrors, FullInvoiceFields, type FullInvoiceFieldsLabels, type FullInvoiceFieldsProps, type FullInvoiceIdType, type FullInvoiceValue, type HeadingLevel, MarkdownRenderer, type MarkdownRendererProps, OrderConfirmation, type OrderConfirmationLabels, type OrderConfirmationOrder, type OrderConfirmationProps, type OrderConfirmationStatus, OrderInvoiceLink, type OrderInvoiceLinkLabels, type OrderInvoiceLinkProps, 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, TrustBadges, type TrustBadgesProps, type TrustIconComponent, type TrustIconProps, buildShareUrls, formatPrice, getShopErrorMessage, isAllowedYouTubeHost, isOverSimplifiedInvoiceCap, markdownToSafeHtml, readingTime, sanitizeHtml, shopIssuesInvoices, shouldRenderShopFilters, toCheckoutInvoiceFields };