@reblu/site-blocks 0.20.0 → 0.22.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,4 +1,4 @@
1
- import { ShopErrorCode, PageDetail, PageListItem, ProfessionalField, ShopProductListItem, ShopProductTrustIcon, ShopProductTrustItem, TrustBadgeType, TrustBadge, BlockType, PageBlock, ResolvedEmbed, ShopFacets, ShopStaffAutoDiscount, ShopOrder, ShopBillingInput, ShopCheckoutInput, ShopOrderInvoice } from '@reblu/site-contracts';
1
+ import { ShopErrorCode, AcademyLessonPreview, PageDetail, PageListItem, ProfessionalField, ShopProductListItem, ShopProductTrustIcon, ShopProductTrustItem, TrustBadgeType, TrustBadge, BlockType, PageBlock, ResolvedEmbed, ShopFacets, AcademyInstructorPublic, ShopStaffAutoDiscount, ShopOrder, ShopBillingInput, ShopCheckoutInput, Config, ShopOrderInvoice } from '@reblu/site-contracts';
2
2
  export { DATA_REQUEST_TYPES } from '@reblu/site-contracts';
3
3
  import { FaqItem } from './seo.cjs';
4
4
  export { FaqPageJsonLd, MarkdownToPlainTextOptions, buildFaqPageJsonLd, collectFaqItems, markdownToPlainText } from './seo.cjs';
@@ -319,6 +319,49 @@ interface CourseDescriptionProps {
319
319
  }
320
320
  declare function CourseDescription({ description, heading, headingLevel, headingId, headingOffset, className, headingClassName, contentClassName, }: CourseDescriptionProps): react_jsx_runtime.JSX.Element | null;
321
321
 
322
+ /**
323
+ * `LessonPreview` — the drop-in for a PUBLIC free-preview lesson (REB-1135),
324
+ * over `getLessonPreview()` (`@reblu/site-next/academy-server`), i.e.
325
+ * `GET /api/site/academy/courses/{slug}/lessons/{lessonSlug}`.
326
+ *
327
+ * Server Component, RSC-safe: no hooks, no state, no `'use client'`, no player
328
+ * dependency. The video is the provider's hosted player in an `<iframe>`
329
+ * (`video.embedUrl`, already carrying its short-lived token), so the SDK pulls
330
+ * in no video library and a SITE needs no player code. Only an `https:` URL is
331
+ * ever embedded.
332
+ *
333
+ * The body (`content`, Markdown) goes through the same pipeline as
334
+ * `CourseDescription` / `MarkdownRenderer` (`marked` → hast-util-sanitize):
335
+ * never raw HTML, no scripts, no `javascript:` links. Its own headings sit one
336
+ * level below the lesson title.
337
+ *
338
+ * CSP note for the SITE: the player needs `frame-src https://player.mux.com`.
339
+ */
340
+ interface LessonPreviewLabels {
341
+ /** Badge above the title. */
342
+ badge: string;
343
+ /** Prefix of the player's accessible name: «Vídeo: {title}». */
344
+ player: string;
345
+ /** Visually hidden name of the duration. */
346
+ duration: string;
347
+ }
348
+ declare const DEFAULT_LESSON_PREVIEW_LABELS: LessonPreviewLabels;
349
+ interface LessonPreviewProps {
350
+ /** The preview as served (`AcademyLessonPreview`). */
351
+ lesson: AcademyLessonPreview;
352
+ labels?: Partial<LessonPreviewLabels>;
353
+ /** Level of the lesson title. Default `2`; use `1` on a dedicated preview page. */
354
+ headingLevel?: HeadingLevel;
355
+ /** `id` of the title (the article's `aria-labelledby`). */
356
+ headingId?: string;
357
+ /** Replaces the title's default typography (see the className rule in the README). */
358
+ headingClassName?: string;
359
+ /** Replaces the body's default colour. */
360
+ contentClassName?: string;
361
+ className?: string;
362
+ }
363
+ declare function LessonPreview({ lesson, labels: labelOverrides, headingLevel, headingId, headingClassName, contentClassName, className, }: LessonPreviewProps): react_jsx_runtime.JSX.Element;
364
+
322
365
  /**
323
366
  * `Treatment` — full treatment page organism over a `PageDetail` (a SERVICE-type
324
367
  * page). Renders the hero band followed by the ordered content sections.
@@ -771,6 +814,78 @@ interface ShopFiltersProps {
771
814
  declare function shouldRenderShopFilters(facets: ShopFacets, active?: ShopFiltersActive): boolean;
772
815
  declare function ShopFilters({ facets, hrefs, active, onChange, priceBands, labels, currencyCode, locale, className, }: ShopFiltersProps): react_jsx_runtime.JSX.Element | null;
773
816
 
817
+ /**
818
+ * `CourseCatalogFilters` — plug-and-play filter chrome for the academy course
819
+ * catalogue (REB-547): an instructor filter fed by `client.academy.instructors()`
820
+ * and a price filter (bands in integer cents plus «Gratis») that map 1:1 onto
821
+ * `client.academy.courses({ instructor, priceMin, priceMax, free })`.
822
+ *
823
+ * Same RSC-safe contract as `ShopFilters`: every option is a real `<a href>`
824
+ * built by the `hrefs` prop, so it renders from a Server Component with no
825
+ * event handler. `onChange` is additive and client-only: when given, a click is
826
+ * intercepted and reported as a patch instead of navigating.
827
+ *
828
+ * `free` and a price band are mutually exclusive in practice: the API applies
829
+ * `free=true` OVER any price range. So turning «Gratis» on clears the band, and
830
+ * picking a band turns «Gratis» off; a consumer building `hrefs` should do the
831
+ * same (drop `free` in `hrefs.price`, drop the range in `hrefs.free(true)`).
832
+ *
833
+ * Tokens only, Spanish defaults, every label overridable.
834
+ */
835
+ /** One price band. `min`/`max` are integer cents; either may be omitted for an open end. */
836
+ interface CourseCatalogPriceBand {
837
+ min?: number;
838
+ max?: number;
839
+ /** Overrides the auto-generated `formatPrice`-based label. */
840
+ label?: string;
841
+ }
842
+ /** EUR defaults sized for courses — override via `priceBands` for another catalogue. */
843
+ declare const DEFAULT_COURSE_PRICE_BANDS: CourseCatalogPriceBand[];
844
+ /** The selection currently reflected in the URL (or component state). */
845
+ interface CourseCatalogFiltersActive {
846
+ /** An instructor id (`AcademyInstructorPublic.id`). */
847
+ instructor?: string;
848
+ priceMin?: number;
849
+ priceMax?: number;
850
+ free?: boolean;
851
+ }
852
+ /** Href generators — the RSC-safe navigation seam. Keep the other current params. */
853
+ interface CourseCatalogFiltersHrefs {
854
+ /** `id` undefined clears the instructor filter. */
855
+ instructor: (id: string | undefined) => string;
856
+ /** Both undefined clears the price range. Should also drop `free`. */
857
+ price: (min: number | undefined, max: number | undefined) => string;
858
+ /** `true` should also drop `priceMin`/`priceMax`. */
859
+ free: (next: boolean) => string;
860
+ clearAll: () => string;
861
+ }
862
+ interface CourseCatalogFiltersLabels {
863
+ instructor: string;
864
+ allInstructors: string;
865
+ price: string;
866
+ free: string;
867
+ clearAll: string;
868
+ priceUnder: (formattedMax: string) => string;
869
+ priceOver: (formattedMin: string) => string;
870
+ priceRange: (formattedMin: string, formattedMax: string) => string;
871
+ }
872
+ declare const DEFAULT_COURSE_CATALOG_FILTERS_LABELS: CourseCatalogFiltersLabels;
873
+ interface CourseCatalogFiltersProps {
874
+ /** From `client.academy.instructors()`. Unnamed instructors are not offered. */
875
+ instructors: AcademyInstructorPublic[];
876
+ hrefs: CourseCatalogFiltersHrefs;
877
+ active?: CourseCatalogFiltersActive;
878
+ /** Client-only: intercepts navigation with a callback instead. */
879
+ onChange?: (patch: Partial<CourseCatalogFiltersActive>) => void;
880
+ priceBands?: CourseCatalogPriceBand[];
881
+ labels?: Partial<CourseCatalogFiltersLabels>;
882
+ /** Forwarded to `formatPrice` for band labels (default EUR / es-ES). */
883
+ currencyCode?: string;
884
+ locale?: string;
885
+ className?: string;
886
+ }
887
+ declare function CourseCatalogFilters({ instructors, hrefs, active, onChange, priceBands, labels, currencyCode, locale, className, }: CourseCatalogFiltersProps): react_jsx_runtime.JSX.Element;
888
+
774
889
  /**
775
890
  * `CartLineList` — presentational cart lines (REB-829), container/
776
891
  * presentational split: it takes `items` + optional `onQuantityChange`/
@@ -1280,6 +1395,33 @@ interface FullInvoiceFieldsProps {
1280
1395
  }
1281
1396
  declare function FullInvoiceFields({ value, onChange, overCap, issuesInvoices, errors, countries, labels, className, }: FullInvoiceFieldsProps): react_jsx_runtime.JSX.Element | null;
1282
1397
 
1398
+ /**
1399
+ * `ContactInterestField` — the contact form's tenant-configurable interest
1400
+ * question, drop-in (REB-759). Fully controlled (`value`/`onChange`), no hooks,
1401
+ * no fetch: the SITE owns the state and sends `value` as `interests` with its
1402
+ * `client.contactForm.submit(...)` body.
1403
+ *
1404
+ * Pass `config.contactInterest` from `/api/site/config`. The tenant names the
1405
+ * question and its options in nexus; when it has configured neither (or an
1406
+ * older base-api does not serve the field) this renders NOTHING. There is no
1407
+ * default catalogue, and a SITE must never supply one. The server keeps only
1408
+ * labels the tenant offers, so a stale page cannot store a removed option.
1409
+ */
1410
+ type ContactInterest = NonNullable<Config['contactInterest']>;
1411
+ interface ContactInterestFieldProps {
1412
+ /** `config.contactInterest`: null/undefined renders nothing. */
1413
+ interest: ContactInterest | null | undefined;
1414
+ /** The chosen option labels. */
1415
+ value: readonly string[];
1416
+ /** Receives the chosen labels, in the tenant's option order. */
1417
+ onChange: (value: string[]) => void;
1418
+ /** Optional id prefix, for two forms on one page. */
1419
+ idPrefix?: string;
1420
+ disabled?: boolean;
1421
+ className?: string;
1422
+ }
1423
+ declare function ContactInterestField({ interest, value, onChange, idPrefix, disabled, className, }: ContactInterestFieldProps): react_jsx_runtime.JSX.Element | null;
1424
+
1283
1425
  /**
1284
1426
  * `OrderInvoiceLink` — the sale invoice of an order, drop-in (REB-73). Pure
1285
1427
  * data in, RSC-safe (no hooks). Pass `order.invoice` from the order lookup
@@ -1302,4 +1444,4 @@ interface OrderInvoiceLinkProps {
1302
1444
  }
1303
1445
  declare function OrderInvoiceLink({ invoice, labels, className }: OrderInvoiceLinkProps): react_jsx_runtime.JSX.Element | null;
1304
1446
 
1305
- 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, HeadingLevel, type MarkdownImageOptions, 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, ProfessionalFields, type ProfessionalFieldsProps, 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 };
1447
+ 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, type ContactInterest, ContactInterestField, type ContactInterestFieldProps, CourseCatalogFilters, type CourseCatalogFiltersActive, type CourseCatalogFiltersHrefs, type CourseCatalogFiltersLabels, type CourseCatalogFiltersProps, type CourseCatalogPriceBand, CourseDescription, type CourseDescriptionProps, DEFAULT_COURSE_CATALOG_FILTERS_LABELS, DEFAULT_COURSE_PRICE_BANDS, DEFAULT_INVOICE_COUNTRIES, DEFAULT_LESSON_PREVIEW_LABELS, 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, HeadingLevel, LessonPreview, type LessonPreviewLabels, type LessonPreviewProps, type MarkdownImageOptions, 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, ProfessionalFields, type ProfessionalFieldsProps, 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,4 +1,4 @@
1
- import { ShopErrorCode, PageDetail, PageListItem, ProfessionalField, ShopProductListItem, ShopProductTrustIcon, ShopProductTrustItem, TrustBadgeType, TrustBadge, BlockType, PageBlock, ResolvedEmbed, ShopFacets, ShopStaffAutoDiscount, ShopOrder, ShopBillingInput, ShopCheckoutInput, ShopOrderInvoice } from '@reblu/site-contracts';
1
+ import { ShopErrorCode, AcademyLessonPreview, PageDetail, PageListItem, ProfessionalField, ShopProductListItem, ShopProductTrustIcon, ShopProductTrustItem, TrustBadgeType, TrustBadge, BlockType, PageBlock, ResolvedEmbed, ShopFacets, AcademyInstructorPublic, ShopStaffAutoDiscount, ShopOrder, ShopBillingInput, ShopCheckoutInput, Config, ShopOrderInvoice } from '@reblu/site-contracts';
2
2
  export { DATA_REQUEST_TYPES } from '@reblu/site-contracts';
3
3
  import { FaqItem } from './seo.js';
4
4
  export { FaqPageJsonLd, MarkdownToPlainTextOptions, buildFaqPageJsonLd, collectFaqItems, markdownToPlainText } from './seo.js';
@@ -319,6 +319,49 @@ interface CourseDescriptionProps {
319
319
  }
320
320
  declare function CourseDescription({ description, heading, headingLevel, headingId, headingOffset, className, headingClassName, contentClassName, }: CourseDescriptionProps): react_jsx_runtime.JSX.Element | null;
321
321
 
322
+ /**
323
+ * `LessonPreview` — the drop-in for a PUBLIC free-preview lesson (REB-1135),
324
+ * over `getLessonPreview()` (`@reblu/site-next/academy-server`), i.e.
325
+ * `GET /api/site/academy/courses/{slug}/lessons/{lessonSlug}`.
326
+ *
327
+ * Server Component, RSC-safe: no hooks, no state, no `'use client'`, no player
328
+ * dependency. The video is the provider's hosted player in an `<iframe>`
329
+ * (`video.embedUrl`, already carrying its short-lived token), so the SDK pulls
330
+ * in no video library and a SITE needs no player code. Only an `https:` URL is
331
+ * ever embedded.
332
+ *
333
+ * The body (`content`, Markdown) goes through the same pipeline as
334
+ * `CourseDescription` / `MarkdownRenderer` (`marked` → hast-util-sanitize):
335
+ * never raw HTML, no scripts, no `javascript:` links. Its own headings sit one
336
+ * level below the lesson title.
337
+ *
338
+ * CSP note for the SITE: the player needs `frame-src https://player.mux.com`.
339
+ */
340
+ interface LessonPreviewLabels {
341
+ /** Badge above the title. */
342
+ badge: string;
343
+ /** Prefix of the player's accessible name: «Vídeo: {title}». */
344
+ player: string;
345
+ /** Visually hidden name of the duration. */
346
+ duration: string;
347
+ }
348
+ declare const DEFAULT_LESSON_PREVIEW_LABELS: LessonPreviewLabels;
349
+ interface LessonPreviewProps {
350
+ /** The preview as served (`AcademyLessonPreview`). */
351
+ lesson: AcademyLessonPreview;
352
+ labels?: Partial<LessonPreviewLabels>;
353
+ /** Level of the lesson title. Default `2`; use `1` on a dedicated preview page. */
354
+ headingLevel?: HeadingLevel;
355
+ /** `id` of the title (the article's `aria-labelledby`). */
356
+ headingId?: string;
357
+ /** Replaces the title's default typography (see the className rule in the README). */
358
+ headingClassName?: string;
359
+ /** Replaces the body's default colour. */
360
+ contentClassName?: string;
361
+ className?: string;
362
+ }
363
+ declare function LessonPreview({ lesson, labels: labelOverrides, headingLevel, headingId, headingClassName, contentClassName, className, }: LessonPreviewProps): react_jsx_runtime.JSX.Element;
364
+
322
365
  /**
323
366
  * `Treatment` — full treatment page organism over a `PageDetail` (a SERVICE-type
324
367
  * page). Renders the hero band followed by the ordered content sections.
@@ -771,6 +814,78 @@ interface ShopFiltersProps {
771
814
  declare function shouldRenderShopFilters(facets: ShopFacets, active?: ShopFiltersActive): boolean;
772
815
  declare function ShopFilters({ facets, hrefs, active, onChange, priceBands, labels, currencyCode, locale, className, }: ShopFiltersProps): react_jsx_runtime.JSX.Element | null;
773
816
 
817
+ /**
818
+ * `CourseCatalogFilters` — plug-and-play filter chrome for the academy course
819
+ * catalogue (REB-547): an instructor filter fed by `client.academy.instructors()`
820
+ * and a price filter (bands in integer cents plus «Gratis») that map 1:1 onto
821
+ * `client.academy.courses({ instructor, priceMin, priceMax, free })`.
822
+ *
823
+ * Same RSC-safe contract as `ShopFilters`: every option is a real `<a href>`
824
+ * built by the `hrefs` prop, so it renders from a Server Component with no
825
+ * event handler. `onChange` is additive and client-only: when given, a click is
826
+ * intercepted and reported as a patch instead of navigating.
827
+ *
828
+ * `free` and a price band are mutually exclusive in practice: the API applies
829
+ * `free=true` OVER any price range. So turning «Gratis» on clears the band, and
830
+ * picking a band turns «Gratis» off; a consumer building `hrefs` should do the
831
+ * same (drop `free` in `hrefs.price`, drop the range in `hrefs.free(true)`).
832
+ *
833
+ * Tokens only, Spanish defaults, every label overridable.
834
+ */
835
+ /** One price band. `min`/`max` are integer cents; either may be omitted for an open end. */
836
+ interface CourseCatalogPriceBand {
837
+ min?: number;
838
+ max?: number;
839
+ /** Overrides the auto-generated `formatPrice`-based label. */
840
+ label?: string;
841
+ }
842
+ /** EUR defaults sized for courses — override via `priceBands` for another catalogue. */
843
+ declare const DEFAULT_COURSE_PRICE_BANDS: CourseCatalogPriceBand[];
844
+ /** The selection currently reflected in the URL (or component state). */
845
+ interface CourseCatalogFiltersActive {
846
+ /** An instructor id (`AcademyInstructorPublic.id`). */
847
+ instructor?: string;
848
+ priceMin?: number;
849
+ priceMax?: number;
850
+ free?: boolean;
851
+ }
852
+ /** Href generators — the RSC-safe navigation seam. Keep the other current params. */
853
+ interface CourseCatalogFiltersHrefs {
854
+ /** `id` undefined clears the instructor filter. */
855
+ instructor: (id: string | undefined) => string;
856
+ /** Both undefined clears the price range. Should also drop `free`. */
857
+ price: (min: number | undefined, max: number | undefined) => string;
858
+ /** `true` should also drop `priceMin`/`priceMax`. */
859
+ free: (next: boolean) => string;
860
+ clearAll: () => string;
861
+ }
862
+ interface CourseCatalogFiltersLabels {
863
+ instructor: string;
864
+ allInstructors: string;
865
+ price: string;
866
+ free: string;
867
+ clearAll: string;
868
+ priceUnder: (formattedMax: string) => string;
869
+ priceOver: (formattedMin: string) => string;
870
+ priceRange: (formattedMin: string, formattedMax: string) => string;
871
+ }
872
+ declare const DEFAULT_COURSE_CATALOG_FILTERS_LABELS: CourseCatalogFiltersLabels;
873
+ interface CourseCatalogFiltersProps {
874
+ /** From `client.academy.instructors()`. Unnamed instructors are not offered. */
875
+ instructors: AcademyInstructorPublic[];
876
+ hrefs: CourseCatalogFiltersHrefs;
877
+ active?: CourseCatalogFiltersActive;
878
+ /** Client-only: intercepts navigation with a callback instead. */
879
+ onChange?: (patch: Partial<CourseCatalogFiltersActive>) => void;
880
+ priceBands?: CourseCatalogPriceBand[];
881
+ labels?: Partial<CourseCatalogFiltersLabels>;
882
+ /** Forwarded to `formatPrice` for band labels (default EUR / es-ES). */
883
+ currencyCode?: string;
884
+ locale?: string;
885
+ className?: string;
886
+ }
887
+ declare function CourseCatalogFilters({ instructors, hrefs, active, onChange, priceBands, labels, currencyCode, locale, className, }: CourseCatalogFiltersProps): react_jsx_runtime.JSX.Element;
888
+
774
889
  /**
775
890
  * `CartLineList` — presentational cart lines (REB-829), container/
776
891
  * presentational split: it takes `items` + optional `onQuantityChange`/
@@ -1280,6 +1395,33 @@ interface FullInvoiceFieldsProps {
1280
1395
  }
1281
1396
  declare function FullInvoiceFields({ value, onChange, overCap, issuesInvoices, errors, countries, labels, className, }: FullInvoiceFieldsProps): react_jsx_runtime.JSX.Element | null;
1282
1397
 
1398
+ /**
1399
+ * `ContactInterestField` — the contact form's tenant-configurable interest
1400
+ * question, drop-in (REB-759). Fully controlled (`value`/`onChange`), no hooks,
1401
+ * no fetch: the SITE owns the state and sends `value` as `interests` with its
1402
+ * `client.contactForm.submit(...)` body.
1403
+ *
1404
+ * Pass `config.contactInterest` from `/api/site/config`. The tenant names the
1405
+ * question and its options in nexus; when it has configured neither (or an
1406
+ * older base-api does not serve the field) this renders NOTHING. There is no
1407
+ * default catalogue, and a SITE must never supply one. The server keeps only
1408
+ * labels the tenant offers, so a stale page cannot store a removed option.
1409
+ */
1410
+ type ContactInterest = NonNullable<Config['contactInterest']>;
1411
+ interface ContactInterestFieldProps {
1412
+ /** `config.contactInterest`: null/undefined renders nothing. */
1413
+ interest: ContactInterest | null | undefined;
1414
+ /** The chosen option labels. */
1415
+ value: readonly string[];
1416
+ /** Receives the chosen labels, in the tenant's option order. */
1417
+ onChange: (value: string[]) => void;
1418
+ /** Optional id prefix, for two forms on one page. */
1419
+ idPrefix?: string;
1420
+ disabled?: boolean;
1421
+ className?: string;
1422
+ }
1423
+ declare function ContactInterestField({ interest, value, onChange, idPrefix, disabled, className, }: ContactInterestFieldProps): react_jsx_runtime.JSX.Element | null;
1424
+
1283
1425
  /**
1284
1426
  * `OrderInvoiceLink` — the sale invoice of an order, drop-in (REB-73). Pure
1285
1427
  * data in, RSC-safe (no hooks). Pass `order.invoice` from the order lookup
@@ -1302,4 +1444,4 @@ interface OrderInvoiceLinkProps {
1302
1444
  }
1303
1445
  declare function OrderInvoiceLink({ invoice, labels, className }: OrderInvoiceLinkProps): react_jsx_runtime.JSX.Element | null;
1304
1446
 
1305
- 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, HeadingLevel, type MarkdownImageOptions, 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, ProfessionalFields, type ProfessionalFieldsProps, 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 };
1447
+ 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, type ContactInterest, ContactInterestField, type ContactInterestFieldProps, CourseCatalogFilters, type CourseCatalogFiltersActive, type CourseCatalogFiltersHrefs, type CourseCatalogFiltersLabels, type CourseCatalogFiltersProps, type CourseCatalogPriceBand, CourseDescription, type CourseDescriptionProps, DEFAULT_COURSE_CATALOG_FILTERS_LABELS, DEFAULT_COURSE_PRICE_BANDS, DEFAULT_INVOICE_COUNTRIES, DEFAULT_LESSON_PREVIEW_LABELS, 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, HeadingLevel, LessonPreview, type LessonPreviewLabels, type LessonPreviewProps, type MarkdownImageOptions, 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, ProfessionalFields, type ProfessionalFieldsProps, 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 };