@reblu/site-blocks 0.25.0 → 0.26.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
@@ -360,6 +360,43 @@ interface CoursePurchaseTermsProps {
360
360
  }
361
361
  declare function CoursePurchaseTerms({ course, heading, headingLevel, headingId, labels, className, headingClassName, listClassName, }: CoursePurchaseTermsProps): react_jsx_runtime.JSX.Element | null;
362
362
 
363
+ /**
364
+ * `LegalDocument` — the drop-in for a legal page the tenant writes in nexus
365
+ * (`client.legal.get()`: `legalNotice`, `withdrawalPolicy`, `privacyPolicy`,
366
+ * `termsAndConditions`, `cookiePolicy`), REB-1201.
367
+ *
368
+ * Server Component, RSC-safe: no hooks, no state, no `'use client'`.
369
+ *
370
+ * Semantics:
371
+ * - The Markdown goes through the same sanitised pipeline as `MarkdownRenderer`;
372
+ * it is never rendered as raw HTML.
373
+ * - `title` is the SITE's own page title (its language, its words), rendered as
374
+ * the page's only `<h1>`; the document's shallowest heading lands at `<h2>`
375
+ * and every other heading keeps its depth (a withdrawal page's sections per
376
+ * purchase modality stay one level below the document heading).
377
+ * - `null`, blank, or content the sanitiser empties render `fallback` under the
378
+ * title — or NOTHING when no `fallback` is given. The block never invents
379
+ * legal copy: what a page says when the tenant has not written it is the
380
+ * SITE's decision.
381
+ */
382
+ interface LegalDocumentProps {
383
+ /** The Markdown as served, e.g. `legal.withdrawalPolicy` — may be `null` / `undefined`. */
384
+ content: string | null | undefined;
385
+ /** The page's `<h1>`, e.g. «Desistimiento y devoluciones». Omit when the page renders its own. */
386
+ title?: ReactNode;
387
+ /** What to show when there is no content, e.g. «Esta página aún no está disponible». */
388
+ fallback?: ReactNode;
389
+ /** `id` of the title element (the article's `aria-labelledby`). */
390
+ titleId?: string;
391
+ /** Classes for the `<article>`. */
392
+ className?: string;
393
+ /** Classes for the title. When given, they REPLACE the default `text-3xl font-bold` (REB-997). */
394
+ titleClassName?: string;
395
+ /** Classes for the rendered Markdown body. */
396
+ contentClassName?: string;
397
+ }
398
+ declare function LegalDocument({ content, title, fallback, titleId, className, titleClassName, contentClassName, }: LegalDocumentProps): react_jsx_runtime.JSX.Element | null;
399
+
363
400
  /**
364
401
  * `LessonPreview` — the drop-in for a PUBLIC free-preview lesson (REB-1135),
365
402
  * over `getLessonPreview()` (`@reblu/site-next/academy-server`), i.e.
@@ -1505,4 +1542,4 @@ interface OrderInvoiceLinkProps {
1505
1542
  }
1506
1543
  declare function OrderInvoiceLink({ invoice, labels, className }: OrderInvoiceLinkProps): react_jsx_runtime.JSX.Element | null;
1507
1544
 
1508
- 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, CoursePurchaseTerms, type CoursePurchaseTermsLabels, type CoursePurchaseTermsProps, DEFAULT_COURSE_CATALOG_FILTERS_LABELS, DEFAULT_COURSE_PRICE_BANDS, DEFAULT_COURSE_PURCHASE_TERMS_LABELS, 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 };
1545
+ 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, CoursePurchaseTerms, type CoursePurchaseTermsLabels, type CoursePurchaseTermsProps, DEFAULT_COURSE_CATALOG_FILTERS_LABELS, DEFAULT_COURSE_PRICE_BANDS, DEFAULT_COURSE_PURCHASE_TERMS_LABELS, 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, LegalDocument, type LegalDocumentProps, 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
@@ -360,6 +360,43 @@ interface CoursePurchaseTermsProps {
360
360
  }
361
361
  declare function CoursePurchaseTerms({ course, heading, headingLevel, headingId, labels, className, headingClassName, listClassName, }: CoursePurchaseTermsProps): react_jsx_runtime.JSX.Element | null;
362
362
 
363
+ /**
364
+ * `LegalDocument` — the drop-in for a legal page the tenant writes in nexus
365
+ * (`client.legal.get()`: `legalNotice`, `withdrawalPolicy`, `privacyPolicy`,
366
+ * `termsAndConditions`, `cookiePolicy`), REB-1201.
367
+ *
368
+ * Server Component, RSC-safe: no hooks, no state, no `'use client'`.
369
+ *
370
+ * Semantics:
371
+ * - The Markdown goes through the same sanitised pipeline as `MarkdownRenderer`;
372
+ * it is never rendered as raw HTML.
373
+ * - `title` is the SITE's own page title (its language, its words), rendered as
374
+ * the page's only `<h1>`; the document's shallowest heading lands at `<h2>`
375
+ * and every other heading keeps its depth (a withdrawal page's sections per
376
+ * purchase modality stay one level below the document heading).
377
+ * - `null`, blank, or content the sanitiser empties render `fallback` under the
378
+ * title — or NOTHING when no `fallback` is given. The block never invents
379
+ * legal copy: what a page says when the tenant has not written it is the
380
+ * SITE's decision.
381
+ */
382
+ interface LegalDocumentProps {
383
+ /** The Markdown as served, e.g. `legal.withdrawalPolicy` — may be `null` / `undefined`. */
384
+ content: string | null | undefined;
385
+ /** The page's `<h1>`, e.g. «Desistimiento y devoluciones». Omit when the page renders its own. */
386
+ title?: ReactNode;
387
+ /** What to show when there is no content, e.g. «Esta página aún no está disponible». */
388
+ fallback?: ReactNode;
389
+ /** `id` of the title element (the article's `aria-labelledby`). */
390
+ titleId?: string;
391
+ /** Classes for the `<article>`. */
392
+ className?: string;
393
+ /** Classes for the title. When given, they REPLACE the default `text-3xl font-bold` (REB-997). */
394
+ titleClassName?: string;
395
+ /** Classes for the rendered Markdown body. */
396
+ contentClassName?: string;
397
+ }
398
+ declare function LegalDocument({ content, title, fallback, titleId, className, titleClassName, contentClassName, }: LegalDocumentProps): react_jsx_runtime.JSX.Element | null;
399
+
363
400
  /**
364
401
  * `LessonPreview` — the drop-in for a PUBLIC free-preview lesson (REB-1135),
365
402
  * over `getLessonPreview()` (`@reblu/site-next/academy-server`), i.e.
@@ -1505,4 +1542,4 @@ interface OrderInvoiceLinkProps {
1505
1542
  }
1506
1543
  declare function OrderInvoiceLink({ invoice, labels, className }: OrderInvoiceLinkProps): react_jsx_runtime.JSX.Element | null;
1507
1544
 
1508
- 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, CoursePurchaseTerms, type CoursePurchaseTermsLabels, type CoursePurchaseTermsProps, DEFAULT_COURSE_CATALOG_FILTERS_LABELS, DEFAULT_COURSE_PRICE_BANDS, DEFAULT_COURSE_PURCHASE_TERMS_LABELS, 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 };
1545
+ 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, CoursePurchaseTerms, type CoursePurchaseTermsLabels, type CoursePurchaseTermsProps, DEFAULT_COURSE_CATALOG_FILTERS_LABELS, DEFAULT_COURSE_PRICE_BANDS, DEFAULT_COURSE_PURCHASE_TERMS_LABELS, 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, LegalDocument, type LegalDocumentProps, 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 };