@reblu/site-blocks 0.18.0 → 0.19.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 +17 -0
- package/README.md +123 -0
- package/dist/_heading-BsNbc1wc.d.cts +4 -0
- package/dist/_heading-BsNbc1wc.d.ts +4 -0
- package/dist/client.cjs +256 -49
- package/dist/client.cjs.map +1 -1
- package/dist/client.d.cts +60 -2
- package/dist/client.d.ts +60 -2
- package/dist/client.js +255 -50
- package/dist/client.js.map +1 -1
- package/dist/index.cjs +352 -302
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +28 -6
- package/dist/index.d.ts +28 -6
- package/dist/index.js +351 -302
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.cts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { ShopErrorCode, PageDetail, PageListItem, ShopProductListItem, ShopProductTrustIcon, ShopProductTrustItem, TrustBadgeType, TrustBadge, BlockType, PageBlock, ResolvedEmbed, ShopFacets, ShopOrder, ShopBillingInput, ShopCheckoutInput, ShopOrderInvoice } from '@reblu/site-contracts';
|
|
1
|
+
import { ShopErrorCode, PageDetail, PageListItem, ProfessionalField, ShopProductListItem, ShopProductTrustIcon, ShopProductTrustItem, TrustBadgeType, TrustBadge, BlockType, PageBlock, ResolvedEmbed, ShopFacets, ShopOrder, ShopBillingInput, ShopCheckoutInput, 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';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
6
|
import * as React$1 from 'react';
|
|
7
7
|
import { ReactNode, ComponentType, FormEvent } from 'react';
|
|
8
|
+
import { H as HeadingLevel } from './_heading-BsNbc1wc.cjs';
|
|
8
9
|
|
|
9
10
|
declare function readingTime(content: string | null | undefined): number | null;
|
|
10
11
|
|
|
@@ -271,9 +272,6 @@ interface SafeHtmlProps {
|
|
|
271
272
|
}
|
|
272
273
|
declare function SafeHtml({ html, className, headingOffset, normalizeHeadings, }: SafeHtmlProps): react_jsx_runtime.JSX.Element | null;
|
|
273
274
|
|
|
274
|
-
/** A heading level a caller can configure — `h1`…`h6`. */
|
|
275
|
-
type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
276
|
-
|
|
277
275
|
/**
|
|
278
276
|
* `CourseDescription` — the drop-in for `AcademyCourseDetail.description`
|
|
279
277
|
* (`client.academy.bySlug()`), REB-879. The description is rich-text Markdown
|
|
@@ -410,11 +408,35 @@ interface ProfileCardProps {
|
|
|
410
408
|
/** Short list of specialties / tags shown as chips. */
|
|
411
409
|
specialties?: string[];
|
|
412
410
|
bio?: string;
|
|
411
|
+
/**
|
|
412
|
+
* REB-1099 — the tenant's professional fields (`professional.fields` from
|
|
413
|
+
* `client.pages.list`). Only the `showOnCard` ones are shown.
|
|
414
|
+
*/
|
|
415
|
+
fields?: ProfessionalField[] | null;
|
|
413
416
|
/** Link target for the full profile. Omit to render non-linking. */
|
|
414
417
|
href?: string;
|
|
415
418
|
className?: string;
|
|
416
419
|
}
|
|
417
|
-
declare function ProfileCard({ name, role, imageUrl, specialties, bio, href, className }: ProfileCardProps): react_jsx_runtime.JSX.Element;
|
|
420
|
+
declare function ProfileCard({ name, role, imageUrl, specialties, bio, fields, href, className, }: ProfileCardProps): react_jsx_runtime.JSX.Element;
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* `ProfessionalFields` — the tenant-defined professional fields of a team
|
|
424
|
+
* profile (REB-1099), e.g. a registration number, as a `<dl>`.
|
|
425
|
+
*
|
|
426
|
+
* Feed it `professional.fields` from the SITE API as-is: the list card
|
|
427
|
+
* (`client.pages.list`) already carries only the card fields, the profile
|
|
428
|
+
* (`client.pages.bySlug`) carries every public one. `variant='card'` filters
|
|
429
|
+
* to `showOnCard` anyway, so one list can feed both places. The labels are the
|
|
430
|
+
* tenant's own; nothing here names a field. Renders nothing when there is
|
|
431
|
+
* nothing to show. RSC-safe.
|
|
432
|
+
*/
|
|
433
|
+
interface ProfessionalFieldsProps {
|
|
434
|
+
fields: ProfessionalField[] | null | undefined;
|
|
435
|
+
/** `'card'` keeps only `showOnCard` fields. Default `'profile'`: every field. */
|
|
436
|
+
variant?: 'card' | 'profile';
|
|
437
|
+
className?: string;
|
|
438
|
+
}
|
|
439
|
+
declare function ProfessionalFields({ fields, variant, className, }: ProfessionalFieldsProps): react_jsx_runtime.JSX.Element | null;
|
|
418
440
|
|
|
419
441
|
/**
|
|
420
442
|
* `ProductCard` — presentational shop product tile over `ShopProductListItem`.
|
|
@@ -1259,4 +1281,4 @@ interface OrderInvoiceLinkProps {
|
|
|
1259
1281
|
}
|
|
1260
1282
|
declare function OrderInvoiceLink({ invoice, labels, className }: OrderInvoiceLinkProps): react_jsx_runtime.JSX.Element | null;
|
|
1261
1283
|
|
|
1262
|
-
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,
|
|
1284
|
+
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 };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { ShopErrorCode, PageDetail, PageListItem, ShopProductListItem, ShopProductTrustIcon, ShopProductTrustItem, TrustBadgeType, TrustBadge, BlockType, PageBlock, ResolvedEmbed, ShopFacets, ShopOrder, ShopBillingInput, ShopCheckoutInput, ShopOrderInvoice } from '@reblu/site-contracts';
|
|
1
|
+
import { ShopErrorCode, PageDetail, PageListItem, ProfessionalField, ShopProductListItem, ShopProductTrustIcon, ShopProductTrustItem, TrustBadgeType, TrustBadge, BlockType, PageBlock, ResolvedEmbed, ShopFacets, ShopOrder, ShopBillingInput, ShopCheckoutInput, 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';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
6
|
import * as React$1 from 'react';
|
|
7
7
|
import { ReactNode, ComponentType, FormEvent } from 'react';
|
|
8
|
+
import { H as HeadingLevel } from './_heading-BsNbc1wc.js';
|
|
8
9
|
|
|
9
10
|
declare function readingTime(content: string | null | undefined): number | null;
|
|
10
11
|
|
|
@@ -271,9 +272,6 @@ interface SafeHtmlProps {
|
|
|
271
272
|
}
|
|
272
273
|
declare function SafeHtml({ html, className, headingOffset, normalizeHeadings, }: SafeHtmlProps): react_jsx_runtime.JSX.Element | null;
|
|
273
274
|
|
|
274
|
-
/** A heading level a caller can configure — `h1`…`h6`. */
|
|
275
|
-
type HeadingLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
276
|
-
|
|
277
275
|
/**
|
|
278
276
|
* `CourseDescription` — the drop-in for `AcademyCourseDetail.description`
|
|
279
277
|
* (`client.academy.bySlug()`), REB-879. The description is rich-text Markdown
|
|
@@ -410,11 +408,35 @@ interface ProfileCardProps {
|
|
|
410
408
|
/** Short list of specialties / tags shown as chips. */
|
|
411
409
|
specialties?: string[];
|
|
412
410
|
bio?: string;
|
|
411
|
+
/**
|
|
412
|
+
* REB-1099 — the tenant's professional fields (`professional.fields` from
|
|
413
|
+
* `client.pages.list`). Only the `showOnCard` ones are shown.
|
|
414
|
+
*/
|
|
415
|
+
fields?: ProfessionalField[] | null;
|
|
413
416
|
/** Link target for the full profile. Omit to render non-linking. */
|
|
414
417
|
href?: string;
|
|
415
418
|
className?: string;
|
|
416
419
|
}
|
|
417
|
-
declare function ProfileCard({ name, role, imageUrl, specialties, bio, href, className }: ProfileCardProps): react_jsx_runtime.JSX.Element;
|
|
420
|
+
declare function ProfileCard({ name, role, imageUrl, specialties, bio, fields, href, className, }: ProfileCardProps): react_jsx_runtime.JSX.Element;
|
|
421
|
+
|
|
422
|
+
/**
|
|
423
|
+
* `ProfessionalFields` — the tenant-defined professional fields of a team
|
|
424
|
+
* profile (REB-1099), e.g. a registration number, as a `<dl>`.
|
|
425
|
+
*
|
|
426
|
+
* Feed it `professional.fields` from the SITE API as-is: the list card
|
|
427
|
+
* (`client.pages.list`) already carries only the card fields, the profile
|
|
428
|
+
* (`client.pages.bySlug`) carries every public one. `variant='card'` filters
|
|
429
|
+
* to `showOnCard` anyway, so one list can feed both places. The labels are the
|
|
430
|
+
* tenant's own; nothing here names a field. Renders nothing when there is
|
|
431
|
+
* nothing to show. RSC-safe.
|
|
432
|
+
*/
|
|
433
|
+
interface ProfessionalFieldsProps {
|
|
434
|
+
fields: ProfessionalField[] | null | undefined;
|
|
435
|
+
/** `'card'` keeps only `showOnCard` fields. Default `'profile'`: every field. */
|
|
436
|
+
variant?: 'card' | 'profile';
|
|
437
|
+
className?: string;
|
|
438
|
+
}
|
|
439
|
+
declare function ProfessionalFields({ fields, variant, className, }: ProfessionalFieldsProps): react_jsx_runtime.JSX.Element | null;
|
|
418
440
|
|
|
419
441
|
/**
|
|
420
442
|
* `ProductCard` — presentational shop product tile over `ShopProductListItem`.
|
|
@@ -1259,4 +1281,4 @@ interface OrderInvoiceLinkProps {
|
|
|
1259
1281
|
}
|
|
1260
1282
|
declare function OrderInvoiceLink({ invoice, labels, className }: OrderInvoiceLinkProps): react_jsx_runtime.JSX.Element | null;
|
|
1261
1283
|
|
|
1262
|
-
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,
|
|
1284
|
+
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 };
|